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,IAAIE,EAAsBlC,EAAoBO,OAAE5wB,EAAW,CAAC,OAAO,IAAOqwB,EAAoB,QAC9FkC,EAAsBlC,EAAoBO,EAAE2B,E","sources":["webpack://hayppgroup.commerce.web/webpack/runtime/chunk loaded","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.core.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.utils.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.decorators.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.datalayer.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.events/easyfy.eventdata.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.events/exporters/eventExporter.stats.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.events/easyfy.event.devlogger.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.events/exporters/eventExporter.ga4.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/services/features.service.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.events/exporters/eventExporter.klaviyo.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.events/easyfy.eventhandler.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.axios.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/services/filter.service.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/shared/filterSEOHelper.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/shared/filter.types.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/shared/filterQueryParamsHelper.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/shared/filterStateHelper.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/shared/filterDOMHelper.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/modules/filter.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/shared/utils.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.togglecss.ts","webpack://hayppgroup.commerce.web/./ClientApp/shared/scripts/easyfy.scrollto.ts","webpack://hayppgroup.commerce.web/./ClientApp/web/scripts/pages/articlelist.ts","webpack://hayppgroup.commerce.web/webpack/bootstrap","webpack://hayppgroup.commerce.web/webpack/runtime/compat get default export","webpack://hayppgroup.commerce.web/webpack/runtime/define property getters","webpack://hayppgroup.commerce.web/webpack/runtime/hasOwnProperty shorthand","webpack://hayppgroup.commerce.web/webpack/runtime/make namespace object","webpack://hayppgroup.commerce.web/webpack/runtime/runtimeId","webpack://hayppgroup.commerce.web/webpack/runtime/jsonp chunk loading","webpack://hayppgroup.commerce.web/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// exemple\n// element('.about'); // <div class=\"about\">\n// element('[data-action=\"top-nav\"]'); // <div class=\"nav\" data-action=\"top-nav\">\n//export const element  = (query: string) => document.querySelector(query);\nexport const element = (query: string) => document.querySelector<any>(query);\n\nexport const elements = (query: string) => document.querySelectorAll<any>(query);\n\nexport const elementsOf = (element: Element | HTMLElement, query: string) => element.querySelector<any>(query);\n\n// exemple\n// elementContains(document.querySelector('head'), document.querySelector('title')); // true\n// elementContains(document.querySelector('body'), document.querySelector('body')); // false\nexport const elementContains = (parent: Element, child: Element) => parent !== child && parent.contains(child);\n\nexport const on = (action: string | Element, type: string, callback: Function, ref?: object, meta?: object) => {\n  docReady(() => {\n    type.split(' ').forEach(function (t) {\n      (action instanceof Element ? action : element(action)).addEventListener(\n        t,\n        (e) => {\n          try {\n            callback.call(e.target, e, ref ?? null, meta ?? null);\n          } catch (err) { }\n        },\n        { once: false, passive: true }\n      );\n    });\n  });\n};\n\nexport const one = (action: string | Element, type: string, callback: Function) => {\n  docReady(() => {\n    type.split(' ').forEach(function (e) {\n      (action instanceof Element ? action : element(action)).addEventListener(e, callback, { once: true });\n    });\n  });\n};\n\nexport const event = (action: string, type: string, callback: EventListener | EventListenerObject) => {\n  docReady(() => {\n    element(`[data-event=\"${action}\"]`)?.addEventListener(type, callback, false);\n  });\n};\n\nexport const events = (action: string, type: string, callback: EventListener | EventListenerObject) => {\n  docReady(() => {\n    elements(`[data-event=\"${action}\"]`)?.forEach((item) => {\n      item.addEventListener(type, callback, false);\n    });\n  });\n};\n\nexport const action = (action: string, type: string, callback: EventListener | EventListenerObject) => {\n  docReady(() => {\n    element(`[data-action=\"${action}\"]`)?.addEventListener(type, callback, false);\n  });\n};\n\nexport const actions = (action: string, type: string, callback: EventListener | EventListenerObject | Function) => {\n  docReady(() => {\n    elements(`[data-action=\"${action}\"]`)?.forEach((el) => el?.addEventListener(type, callback, false));\n  });\n};\n\nexport const bind = (action: string, type: string, callback: EventListener | EventListenerObject) => {\n  docReady(() => {\n    elements(action || '')?.forEach((item) => {\n      type.split(' ').forEach(t => {\n        item.addEventListener(t, callback, false);\n      });\n    });\n  });\n};\n\nexport const off = (action: string | Element | HTMLElement | Array<string | Element | HTMLElement>, type: string, callback: EventListener | EventListenerObject) => {\n  if (action instanceof String || action instanceof Element || action instanceof HTMLElement) {\n    (action instanceof Element || action instanceof HTMLElement ? action : element(<string>action)).removeEventListener(type, callback, false);\n  }\n\n  if (action instanceof Array) {\n    for (let x of action) {\n      let item: any = x;\n      (item instanceof Element || item instanceof HTMLElement ? item : element(<string>item)).removeEventListener(type, callback, false);\n    }\n  }\n};\n\nexport const offAll = (action: string, type: string, callback: EventListener | EventListenerObject) => {\n  elements(action).forEach((item) => {\n    item.removeEventListener(type, callback, false);\n  });\n};\n\nexport interface IEventChain {\n  target: string;\n  type: string;\n  events: Array<IEventChainItem>;\n}\n\nexport interface IEventChainItem {\n  action?: string;\n  event?: string;\n  callback?: Function;\n}\n\nexport const eventChain = (arg: IEventChain) => {\n  bind(arg.target, arg.type, (e) => {\n    const target: any = e.target;\n    let eventTarget = target?.attributes['data-action']?.value ?? target?.attributes['data-event']?.value;\n\n    if (!eventTarget) eventTarget = target.parentNode?.attributes['data-action']?.value ?? target.parentNode?.attributes['data-event']?.value;\n\n    if (!eventTarget) return;\n\n    const item: any = arg.events.find(({ action, event }) => (action ?? event).includes(eventTarget));\n    if (item?.callback) item.callback(e);\n  });\n};\n\nexport const getBlazorEditMode = () => {\n    if (!window.isAdminModeEnabled) {\n        return false;\n    }\n    if (window.isEditModeEnabled !== undefined) {\n        // Return value to avoid parsing cookies constantly\n        return window.isEditModeEnabled;\n    }\n    const cookies = document.cookie.split(\";\");\n    const editModeCookie = cookies.find(cookie => cookie.trim().startsWith(\"_AdminEditMode\"));\n    window.isEditModeEnabled = editModeCookie?.split(\"=\")[1].toLowerCase() === \"true\";\n    return window.isEditModeEnabled;\n}\n\n\n// Need to wait for blazor\n\nexport const docReady = (callback?: Function, context?: Object | string | number | boolean) => {\n\n  let blazorFinishedLoadingEventRegistered: boolean = true;\n\n  // Method to trigger window events\n  if (!window.EasyfyMethods) {\n    window.EasyfyMethods = {};\n    window.EasyfyMethods.triggerWindowEvent = (eventName, eventData) => {\n      if (eventName) {\n        let event = new CustomEvent(eventName, {\n          detail: eventData\n        });\n        window.dispatchEvent(event);\n      }\n    }\n  }\n\n    if (getBlazorEditMode()) {\n      blazorFinishedLoadingEventRegistered = false;\n  }\n\n  // The public function name defaults to window.docReady\n  // but you can pass in your own object and own function name and those will be used\n  // if you want to put them in a different namespace\n  // funcName = funcName || \"docReady\";\n  // baseObj = baseObj || window;\n  let readyList = [];\n  let readyFired = false;\n  let readyEventHandlersInstalled = false;\n\n  // call this when the document is ready\n  // this function protects itself against being called more than once\n  const ready = () => {\n    const readyBody = () => {\n      if (!readyFired) {\n        // this must be set to true before we start calling callbacks\n        readyFired = true;\n        for (var i = 0; i < readyList.length; i++) {\n          // if a callback here happens to add new ready handlers,\n          // the docReady() function will see that it already fired\n          // and will schedule the callback to run right after\n          // this event loop finishes so all handlers will still execute\n          // in order and no new ones will be added to the readyList\n          // while we are processing the list\n          readyList[i].fn.call(window, readyList[i].ctx);\n          // allow any closures held by these functions to free\n        }\n        readyList = [];\n      }\n    }\n    if (getBlazorEditMode() && !window.blazorFinishedLoading) {\n      if (!blazorFinishedLoadingEventRegistered) {\n        blazorFinishedLoadingEventRegistered = true;\n        window.addEventListener('blazorFinishedLoading', () => {\n          window.blazorFinishedLoading = true;\n          readyBody();\n        }, false);\n      }\n    }\n    else {\n      readyBody();\n    }\n\n  };\n\n  const readyStateChange = () => {\n    if (document.readyState === 'complete') {\n      ready();\n    }\n  };\n\n  // This is the one public interface\n  // docReady(fn, context);\n  // the context argument is optional - if present, it will be passed\n  // as an argument to the callback\n\n  if (typeof callback !== 'function') {\n    throw new TypeError('callback for docReady(fn) must be a function');\n  }\n  // if ready has already fired, then just schedule the callback\n  // to fire asynchronously, but right away\n  if (readyFired) {\n    setTimeout(function () {\n      callback(context);\n    }, 1);\n    return;\n  } else {\n    // add the function and context to the list\n    readyList.push({ fn: callback, ctx: context });\n  }\n  // if document already ready to go, schedule the ready function to run\n  if (document.readyState === 'complete') {\n    setTimeout(ready, 1);\n  } else if (!readyEventHandlersInstalled) {\n    // otherwise if we don't have event handlers installed, install them\n    if (document.addEventListener) {\n      // first choice is DOMContentLoaded event\n      document.addEventListener('DOMContentLoaded', ready, false);\n      // backup is window load event\n      window.addEventListener('load', ready, false);\n    }\n    readyEventHandlersInstalled = true;\n  }\n};\n\nexport interface IEvent {\n  type: string;\n  event?: IEventItem;\n  events?: Array<IEventItem>;\n}\n\nexport interface IEventItem {\n  action?: string;\n  event?: string;\n  callback?: Function;\n}\n\ninterface IGlobalEventItem {\n  type: string;\n  action?: string;\n  event?: string;\n  callback?: Array<Function>;\n}\n\n// Global event\nexport let globalEventList: Array<IGlobalEventItem> = [];\n\nexport const globalEvent = (event: IEvent) => {\n  event.type.split(' ').forEach((type) => {\n    if (event.event) event.events = [...(event.events ?? []), ...[event.event]];\n\n    if (event.events) {\n      for (let item of event.events) {\n        let foundItem;\n\n        if (item?.action) {\n          let actionFound: IGlobalEventItem = globalFindAction(type, item?.action);\n          if (actionFound) {\n            foundItem = actionFound;\n          }\n        }\n\n        if (item?.event) {\n          let eventFound: IGlobalEventItem = globalFindEvent(type, item?.event);\n          if (eventFound) {\n            foundItem = eventFound;\n          }\n        }\n\n        if (!item?.event && !item?.action) {\n          // check global state.\n          let globalFound: IGlobalEventItem = globalFind(type);\n          if (globalFound) {\n            foundItem = globalFound;\n          }\n        }\n\n        foundItem ? foundItem.callback.push(item.callback) : globalEventAdd(type, item);\n      }\n    }\n\n    document.body.removeEventListener(type, globalEventHandler);\n    document.body.addEventListener(type, globalEventHandler);\n  });\n};\n\nexport const debounce = (func, wait) => {\n  let timeout;\n\n  return function executedFunction(...args) {\n    const later = () => {\n      clearTimeout(timeout);\n      func(...args);\n    };\n\n    clearTimeout(timeout);\n    timeout = setTimeout(later, wait);\n  };\n};\n\nconst globalEventHandler = (e) => {\n  const target: any = e.target;\n\n  // check action\n  let eventTarget = globalGetTargetAction(target);\n  if (eventTarget) {\n    const item: IGlobalEventItem = globalFindAction(e.type, eventTarget);\n    if (item?.callback) {\n      globalEventInvokeCallback(item?.callback, e);\n    }\n    return;\n  }\n\n  // check event\n  eventTarget = globalGetTargetEvent(target);\n  if (eventTarget) {\n    const item: IGlobalEventItem = globalFindEvent(e.type, eventTarget);\n    if (item?.callback) {\n      globalEventInvokeCallback(item?.callback, e);\n    }\n    return;\n  }\n\n  // check event\n  const item = globalMatchType(e.type);\n  if (item?.callback) {\n    globalEventInvokeCallback(item?.callback, e);\n    return;\n  }\n};\n\nconst globalEventInvokeCallback = (cbs: Array<Function>, e: any) => {\n  for (let item of cbs) {\n    item?.call(null, e);\n  }\n};\n\nconst globalEventAdd = (type: string, item: IEventItem): void => {\n  globalEventList.push({\n    type: type,\n    action: item?.action,\n    event: item?.event,\n    callback: [item?.callback],\n  });\n};\n\nconst globalFind = (itemType: string): IGlobalEventItem => {\n  return globalEventList.find(({ type, action, event }) => type === itemType && !action && !event);\n};\n\nconst globalFindEvent = (itemType: string, eventType: string): IGlobalEventItem => globalEventList.find(({ type, event }) => type === itemType && (event ?? '') === (eventType ?? ''));\n\nconst globalFindAction = (itemType: string, actionType: string): IGlobalEventItem => globalEventList.find(({ type, action }) => type === itemType && (action ?? '') === (actionType ?? ''));\n\nconst globalMatchType = (itemType: string): IGlobalEventItem => globalEventList.find(({ type, action, event }) => type === itemType && !action && !event);\n\nconst globalGetTargetAction = (target) => globalGetTarget(target, 'data-action');\n\nconst globalGetTargetEvent = (target) => globalGetTarget(target, 'data-event');\n\nconst globalGetTarget = (target, dataTarget: string) => {\n  let eventTarget = target?.attributes[dataTarget]?.value;\n  if (!eventTarget) eventTarget = target.parentNode?.attributes[dataTarget]?.value;\n  return eventTarget;\n};","import { element, elements } from './easyfy.core';\n/*import mobileDetect from 'mobile-detect';*/\n\nexport interface Attribute {\n  name: string;\n  value: string;\n}\n\n/*export const detector = new mobileDetect(window.navigator.userAgent);*/\n\n// exemple\n// findKey(\n//   {\n//     barney: { age: 36, active: true },\n//     fred: { age: 40, active: false },\n//     pebbles: { age: 1, active: true }\n//   },\n//   o => o['active']\n// ); // 'barney\nexport const findKey = (obj: any, fn: any) => Object.keys(obj).find((key) => fn(obj[key], key, obj));\n\n// exemple\n// findLast([1, 2, 3, 4], n => n % 2 === 1); // 3\nexport const findLast = (arr: Array<any>, fn: any) => arr.filter(fn).pop();\n\n// exemple\n// all([4, 2, 3], x => x > 1); // true\n// all([1, 2, 3]); // true\nexport const all = (arr: Array<any>, fn = Boolean) => arr.every(fn);\n\n// exemple\n// allEqual([1, 2, 3, 4, 5, 6]); // false\n// allEqual([1, 1, 1, 1]); // true\nexport const allEqual = (arr: Array<any>) => arr.every((val) => val === arr[0]);\n\n// exemple\n// arrayToHtmlList('#myListID', 'li' ,['item 1', 'item 2']);\nexport const arrayToHtmlList = (selector: string, elementType: string, arr: Array<any>) => ((el) => ((el = document.querySelector(selector)), (el.innerHTML += arr.map((item) => `<${elementType}>${item}</${elementType}>`).join(''))))();\n\n// exemple\n//hasClass(document.querySelector('p.special'), 'special'); // true\nexport const hasClass = (el: HTMLElement, className: string) => el?.classList?.contains(className);\n\n// exemple\n// isBrowserTabFocused(); // true\nexport const isBrowserTabFocused = () => !document.hidden;\n\n// exemple\n// isNil(null); // true\n// isNil(undefined); // true\nexport const isNil = (val: any) => val === undefined || val === null;\n\n// exemple\n// isNull(null); // true\nexport const isNull = (val: any) => val === null;\n\n// exemple\n// isNumber('1'); // false\n// isNumber(1); // true\nfunction isNumber(n: any) {\n  return !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n// exemple\n// isObject([1, 2, 3, 4]); // true\n// isObject([]); // true\n// isObject(['Hello!']); // true\n// isObject({ a: 1 }); // true\n// isObject({}); // true\n// isObject(true); // false\nexport const isObject = (obj: any) => obj === Object(obj);\n\n// exemple\n// isObjectLike({}); // true\n// isObjectLike([1, 2, 3]); // true\n// isObjectLike(x => x); // false\n// isObjectLike(null); // false\nexport const isObjectLike = (val: any) => val !== null && typeof val === 'object';\n\n// exemple\n// isPlainObject({ a: 1 }); // true\n// isPlainObject(new Map()); // false\n// export const isPlainObject = (val: any) =>\n//   !!val && typeof val === \"object\" && val.export && constructor === Object;\n\n// exemple\n// isString('10'); // true\nexport const isString = (val: any) => typeof val === 'string';\n\n// exemple\n// isUndefined(undefined); // true\nexport const isUndefined = (val: any) => val === undefined;\n\n// exemple\n// parse string into boolean\nexport const parseToBoolean = (val: string) => isString(val) && val?.toLowerCase() === 'true';\n\n// exemple\n// isValidJSON('{\"name\":\"Adam\",\"age\":20}'); // true\n// isValidJSON('{\"name\":\"Adam\",age:\"20\"}'); // false\n// isValidJSON(null); // true\nexport const isValidJSON = (str: string) => {\n  try {\n    JSON.parse(str);\n    return true;\n  } catch (e) {\n    return false;\n  }\n};\n\nexport const replaceHtml = (element: HTMLElement, html: string) => {\n  if (element?.outerHTML) {\n    element.outerHTML = html;\n  }\n  else {\n    let tmpElement = document.createElement(\"div\");\n    tmpElement.innerHTML = html;\n    element?.parentNode?.replaceChild(tmpElement, element);\n  }\n};\n\n// exemple\n// matches({ age: 25, hair: 'long', beard: true }, { hair: 'long', beard: true }); // true\n// matches({ hair: 'long', beard: true }, { age: 25, hair: 'long', beard: true }); // false\nexport const matches = (obj: any, source: any) => Object.keys(source).every((key) => obj.hasOwnProperty(key) && obj[key] === source[key]);\n\n// exemple\n// randomHexColorCode(); // \"#e34155\"\nexport const randomHexColorCode = () => {\n  let n = (Math.random() * 0xfffff * 1000000).toString(16);\n  return '#' + n.slice(0, 6);\n};\n\n// exemple\n// redirect('https://google.com');\nexport const redirect = (url, asLink = true) => (asLink ? (window.location.href = url) : window.location.replace(url));\n\n// exemple\n// scrollToTop();\nexport const scrollToTop = () => {\n  const c = document.documentElement.scrollTop || document.body.scrollTop;\n  if (c > 0) {\n    window.requestAnimationFrame(scrollToTop);\n    window.scrollTo(0, c - c / 8);\n  }\n};\n\n// exemple\n// setStyle('p', 'font-size', '20px');\nexport const setStyle = (selector: string, ruleName: string, val: string) => (element(selector).style[ruleName] = val);\n\n// exemple\n// getStyle('p', 'font-size');\nexport const getStyle = (selector: string, ruleName: string) => element(selector).style[ruleName];\n\n// exemple\n// show(...document.querySelectorAll(\"img\")); // Shows all <img> elements on the page\nexport const showAll = (el: Array<HTMLElement>, displayType?: string) => [...el].forEach((e) => (e.style.display = displayType || 'block'));\n\n// exemple\n// hide(document.querySelectorAll('img')); // Hides all <img> elements on the page\nexport const hideAll = (el: Array<HTMLElement> | NodeListOf<HTMLElement>) => el.forEach((e) => (e.style.display = 'none'));\n\nexport const show = (selector: string | Element, displayType?: string) => showAll([selector instanceof Element ? selector : element(selector)], displayType);\n\nexport const hide = (selector: string | Element) => hideAll([selector instanceof Element ? selector : element(selector)]);\n\nexport const toggleShow = (selector: string, displayType?: string) => {\n  const el = element(selector);\n  visible(el) ? hideAll([el]) : showAll([el], displayType);\n};\n\nexport const removeCss = (el: HTMLElement | Element | Array<HTMLElement> | NodeListOf<HTMLElement>, className: string | Array<string>) => {\n  if (Array.isArray(el) || el instanceof NodeList) {\n    el.forEach((element) => {\n      Array.isArray(className) ? element?.classList?.remove(...className) : element?.classList?.remove(className);\n    });\n  } else {\n    Array.isArray(className) ? (el as HTMLElement | Element)?.classList?.remove(...className) : (el as HTMLElement | Element)?.classList?.remove(className);\n    return el;\n  }\n};\n\nexport const addCss = (el: HTMLElement | Element, className: string | Array<string>) => {\n  if (Array.isArray(className)) {\n    el?.classList?.add(...className);\n    return el;\n  }\n\n  el?.classList?.add(className);\n  return el;\n};\n\n// exemple\n// async function sleepyWork() {\n//   console.log(\"I'm going to sleep for 1 second.\");\n//   await sleep(1000);\n//   console.log('I woke up after 1 second.');\n// }\nexport const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));\n\nexport const visible = (element: HTMLElement): boolean => {\n  return !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length);\n};\n\n// exemple\n// smoothScroll('#fooBar'); // scrolls smoothly to the element with the id fooBar\n// smoothScroll('.fooBar'); // scrolls smoothly to the first element with a class of fooBar\nexport const smoothScroll = (element: any) =>\n  document.querySelector(element).scrollIntoView({\n    behavior: 'smooth',\n  });\n\n// exemple\n// splitLines('This\\nis a\\nmultiline\\nstring.\\n'); // ['This', 'is a', 'multiline', 'string.' , '']\nexport const splitLines = (str: string) => str.split(/\\r?\\n/);\n\n// exemple\n// stripHTMLTags('<p><em>lorem</em> <strong>ipsum</strong></p>'); // 'lorem ipsum'\nexport const stripHTMLTags = (str: string) => str.replace(/<[^>]*>/g, '');\n\n// exemple\n// sum(1, 2, 3, 4); // 10\n// sum(...[1, 2, 3, 4]); // 10\nexport const sum = (...arr: any) => [...arr].reduce((acc, val) => acc + val, 0);\n\n// exemple\n// timeTaken(() => Math.pow(2, 10)); // 1024, (logged): timeTaken: 0.02099609375ms\nexport const timeTaken = (callback: any) => {\n  console.time(\"timeTaken\");\n  const r = callback();\n  console.timeEnd(\"timeTaken\");\n  return r;\n};\n\n// exemple\n// toCurrency(123456.789, \"EUR\"); // €123,456.79  | currency: Euro | currencyLangFormat: Local\n// toCurrency(123456.789, 'USD', 'en-us'); // $123,456.79  | currency: US Dollar | currencyLangFormat: English (United States)\n// toCurrency(123456.789, 'USD', 'fa'); // ۱۲۳٬۴۵۶٫۷۹ ؜$ | currency: US Dollar | currencyLangFormat: Farsi\n// toCurrency(322342436423.2435, 'JPY'); // ¥322,342,436,423 | currency: Japanese Yen | currencyLangFormat: Local\n// toCurrency(322342436423.2435, 'JPY', 'fi'); // 322 342 436 423 ¥ | currency: Japanese Yen | currencyLangFormat: Finnish\nexport const toCurrency = (n: any, curr: any, languageFormat = undefined) =>\n  Intl.NumberFormat(languageFormat, {\n    style: 'currency',\n    currency: curr,\n  }).format(n);\n\n// exemple\n// toDecimalMark(12305030388.9087); // \"12,305,030,388.909\"\n// toDecimalMark(12305030388.9087, \"en-us\"); // \"12,305,030,388.909\"\nexport const toDecimalMark = (num: any, languageFormat = undefined) => num.toLocaleString(languageFormat);\n\n// exemple\n// toggleClass('p.special', 'special'); // The paragraph will not have the 'special' class anymore\nexport const toggleClass = (selector: string | HTMLElement, className: any, force?: boolean) => {\n  //if (selector instanceof String) easyfyCore.element(selector as string).classList.toggle(className);\n\n  if (selector instanceof HTMLElement) selector.classList.toggle(className, force);\n};\n\nexport const debounce = <F extends (...args: any[]) => any>(func: F, waitFor: number) => {\n  let timeout;\n\n  return (...args: Parameters<F>): Promise<ReturnType<F>> =>\n    new Promise((resolve) => {\n      if (timeout) {\n        clearTimeout(timeout);\n      }\n\n      timeout = setTimeout(() => resolve(func(...args)), waitFor);\n    });\n};\n\nexport const isFunction = (f: Function) => {\n  return f && {}.toString.call(f) === '[object Function]';\n};\n\nexport const Id = (len: number) => {\n  return '_' + Math.random().toString(36).substr(2, len);\n};\n\nexport const toggleClassBySelector = (selector: string, className: string, toggle: boolean) => {\n  let els = elements(selector);\n  els.forEach((item) => {\n    if (toggle) {\n      addCss(item, className);\n    } else {\n      removeCss(item, className);\n    }\n  });\n};\n\nexport const setAttributes = (element: HTMLElement, attributes: Array<Attribute>): HTMLElement | Element => {\n  attributes.forEach((item) => {\n    if (item?.name && item?.value) {\n      element.setAttribute(item.name, item.value);\n    }\n  });\n  return element;\n};\n\nexport const offset = (element: HTMLElement): { top: number; left: number } => {\n  const rect = element.getBoundingClientRect(),\n    scrollLeft = window.pageXOffset || document.documentElement.scrollLeft,\n    scrollTop = window.pageYOffset || document.documentElement.scrollTop;\n  return { top: rect.top + scrollTop, left: rect.left + scrollLeft };\n};\n\nexport const winHeight = () => window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\nexport const winWidth = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\nexport const isMobile = () => window.innerWidth <= 768 ? true : false;\n\nexport const isBetweenDates = (startDate: Date, endDate: Date, checkDate: Date) => {\n  if (checkDate > startDate && checkDate < endDate) {\n    return true;\n  }\n  return false;\n};\n\n//todo: support other short date string formats other then 2020-01-01\nexport const getDate = (date: string) => {\n  if (date !== \"\") {\n    var d = date.split(\"-\");\n    if (d.length == 3) {\n      return new Date(parseInt(d[0]), parseInt(d[1]) - 1, parseInt(d[2]));\n    }\n  }\n  return new Date();\n};\nexport const getSelectedValue = (select: HTMLSelectElement) => {\n  if (select) {\n    const selectedOption = select.options[select.selectedIndex];\n    return { text: selectedOption.text, value: selectedOption.value };\n  }\n  return;\n};\n\nexport const removeHash = () => {\n  var scrollV, scrollH, loc = window.location;\n  if (\"pushState\" in history) {\n    history.pushState(\"\", document.title, loc.pathname + loc.search);\n  } else {\n    // Prevent scrolling by storing the page's current scroll offset\n    scrollV = document.body.scrollTop;\n    scrollH = document.body.scrollLeft;\n\n    loc.hash = \"\";\n\n    // Restore the scroll offset, should be flicker free\n    document.body.scrollTop = scrollV;\n    document.body.scrollLeft = scrollH;\n  }\n};","import { docReady, event as eventHandler, events as eventsHandler, action as actionHandler, actions as actionsHandler, bind as bindHandler } from './easyfy.core';\nimport { Id } from './easyfy.utils';\n\nexport interface Idependencies {\n  func: { new(...args: any[]): {} };\n  data?: any;\n}\n\ninterface IActionEvent {\n  target: string;\n  type: string;\n  meta?: object;\n}\n\ninterface IInjectorDependencies {\n  name: string;\n  func: object;\n}\n\ninterface IInjector {\n  dependencies: {\n    [key: string]: IInjectorDependencies;\n  };\n  resolveOnload: Array<string>;\n  resolve: (depends: Array<Idependencies>, ctor: any, cb: Function) => void;\n}\n\nexport const invoke = function <T extends { new(...args: any[]): {} }>(ctor: T): void {\n  let newClass: Object;\n\n  const readyAfter = () => {\n    // call class function onInit\n    try {\n      ctor?.prototype?.onInit?.apply(newClass);\n    } catch (error) {\n      console.log('Invoke onInit error', error);\n    }\n  };\n\n  const init = (resolves?: Array<Object>) => {\n    try {\n      newClass = new ctor(...(resolves || []));\n    } catch (err) {\n      console.log('Error ', err);\n    }\n\n    if (ctor.prototype.hasOwnProperty('onInit')) {\n      // Use the handy event callback\n      docReady(readyAfter);\n    }\n  };\n\n  const depends = ctor['depends'];\n  depends\n    ? injector.resolve(ctor['depends'], ctor, (resolves) => {\n      delete ctor['depends'];\n      init(resolves);\n    })\n    : init();\n};\n\n\nconst injector: IInjector = {\n  dependencies: {},\n  resolveOnload: [],\n  resolve: function (depends: Array<Idependencies>, ctor: any, cb?: Function): void {\n    depends.forEach((item) => {\n      const id = Id(10);\n      injector.dependencies[id] = { name: id, func: new item.func(item.data || {}) };\n      if (injector.dependencies[id].func.hasOwnProperty('loaded')) {\n        injector.resolveOnload.push(id);\n      }\n    });\n\n    if (injector.resolveOnload.length > 0) {\n      injector.resolveOnload.forEach((item, index) => {\n        if (injector.dependencies[item].func.hasOwnProperty('loaded')) {\n          const dependencyItem = injector.dependencies[item].func;\n\n          let loadedVal = dependencyItem['loaded'];\n          Object.defineProperty(dependencyItem, 'loaded', {\n            get: () => {\n              return loadedVal;\n            },\n            set: function (val) {\n              if (val !== loadedVal) {\n                if (val) {\n                  if (dependencyItem) {\n                    injector.resolveOnload.splice(index, 1);\n                    delete dependencyItem['loaded'];\n\n                    if (injector.resolveOnload.length === 0 && cb) {\n                      let dependencyFunc: Array<Object> = [];\n                      for (const key in injector.dependencies) {\n                        if (injector.dependencies.hasOwnProperty(key)) {\n                          const item = injector.dependencies[key];\n                          dependencyFunc.push(item.func);\n                        }\n                      }\n                      cb.call(this, dependencyFunc);\n                    }\n                  }\n                }\n              }\n\n              loadedVal = val;\n            },\n            enumerable: true,\n            configurable: true,\n          });\n        }\n      });\n    } else {\n      cb?.call(this);\n    }\n  },\n};\n\ntype InferValue<Prop extends PropertyKey, Desc> = Desc extends { get(): any; value: any } ? never : Desc extends { value: infer T } ? Record<Prop, T> : Desc extends { get(): infer T } ? Record<Prop, T> : never;\n\ntype DefineProperty<Prop extends PropertyKey, Desc extends PropertyDescriptor> = Desc extends { writable: any; set(val: any): any }\n  ? never\n  : Desc extends { writable: any; get(): any }\n  ? never\n  : Desc extends { writable: false }\n  ? Readonly<InferValue<Prop, Desc>>\n  : Desc extends { writable: true }\n  ? InferValue<Prop, Desc>\n  : Readonly<InferValue<Prop, Desc>>;\n\nfunction defineProperty<Obj extends object, Key extends PropertyKey, PDesc extends PropertyDescriptor>(obj: Obj, prop: Key, val: PDesc): asserts obj is Obj & DefineProperty<Key, PDesc> {\n  Object.defineProperty(obj, prop, val);\n}\n\ndefineProperty(Object.prototype, 'watch', {\n  enumerable: false,\n  configurable: true,\n  writable: false,\n  value(this: any, prop, handler) {\n    let oldval: any = this[prop],\n      newval: any = oldval,\n      getter = function () {\n        return newval;\n      },\n      setter = function (this: any, val) {\n        oldval = newval;\n        return (newval = handler.call(this, prop, oldval, val));\n      };\n\n    if (delete this[prop]) {\n      // can't watch constants\n      Object.defineProperty(this, prop, {\n        get: getter,\n        set: setter,\n        enumerable: true,\n        configurable: true,\n      });\n    }\n  },\n});\n\nexport const event = (event: IActionEvent) => {\n  return (_target: any, _key: string, descriptor: PropertyDescriptor) => {\n    eventHandler(event.target, event.type, actionEventHelper(descriptor, event.meta).value);\n  };\n};\n\nexport const events = (event: IActionEvent) => {\n  return (_target: any, _key: string, descriptor: PropertyDescriptor) => {\n    eventsHandler(event.target, event.type, actionEventHelper(descriptor, event.meta).value);\n  };\n};\n\nexport const action = (event: IActionEvent) => {\n  return (_target: any, _key: string, descriptor: PropertyDescriptor) => {\n    actionHandler(event.target, event.type, actionEventHelper(descriptor, event.meta).value);\n  };\n};\n\nexport const actions = (event: IActionEvent) => {\n  return (_target: any, _key: string, descriptor: PropertyDescriptor) => {\n    actionsHandler(event.target, event.type, actionEventHelper(descriptor, event.meta).value);\n  };\n};\n\nexport const bind = (event: IActionEvent) => {\n  return (_target: any, _key: string, descriptor: PropertyDescriptor) => {\n    bindHandler(event.target, event.type, actionEventHelper(descriptor, event.meta).value);\n  };\n};\n\nconst actionEventHelper = (descriptor: PropertyDescriptor, meta?: object) => {\n  const decorated: Function = descriptor.value;\n  descriptor.value = function (event: Event) {\n    if (event?.preventDefault) event?.preventDefault();\n\n    return decorated.apply(this, [...Array.from(arguments), meta]);\n  };\n  return descriptor;\n};","\nnamespace Easyfy.Shared.Scripts {\n  export interface IGtmEvent {\n    event: string;\n    ecommerce: object;\n  }\n\n  export interface IActionField {\n    list: string;\n  }\n\n  export interface ICheckoutActionField {\n    step: number;\n    option: string;\n  }\n  export interface IGtmImpressionProduct extends ProductBase {\n    position: number;\n    list: string;\n  }\n\n  export interface IGtmClickProduct extends ProductBase {\n    position: number;\n    dimension6: string; // depict-recommendation\n  }\n\n  export interface IGtmBasketProduct extends ProductBase {\n    quantity: number;\n  }\n\n  export interface IGtmDetailProduct extends ProductBase { };\n\n  interface ProductBase {\n    name: string;\n    id: string;\n    price: number;\n    brand: string,\n    category: string;\n    variant: string;\n    dimension3: string; // product-type\n    dimension4: string; // ean\n    dimension5: string; // all-categories\n    dimension7: string; //prescriptive (excluded for facebook)\n  }\n\n\n  export interface IGtmProductImpressionEvent {\n    impressions: IGtmImpressionProduct[];\n    currencyCode: string;\n  };\n\n  export interface IGtmProductClickEvent {\n    click: {\n      actionField: IActionField;\n      products: IGtmClickProduct[];\n      currencyCode: string;\n    }\n  };\n\n  export interface IGtmProductDetailEvent {\n    detail: {\n      actionField: IActionField;\n      products: IGtmDetailProduct[];\n      currencyCode: string;\n    }\n  }\n\n  export interface IGtmProductRemoveEvent {\n    remove: {\n      actionField: IActionField;\n      products: IGtmBasketProduct[];\n    }\n  };\n\n  export interface IGtmProductAddEvent {\n    add: {\n      actionField: IActionField;\n      products: IGtmBasketProduct[];\n      currencyCode: string;\n    }\n  };\n\n  export interface IGtmCheckoutEvent {\n    checkout: {\n      actionField: ICheckoutActionField;\n      products: IGtmBasketProduct[];\n    }\n  };\n\n  export const PushProductImpressionEvent = async (eventProducts: IGtmImpressionProduct[], listName: string, currencyCode: string): Promise<any> => {\n    let impressionEvent: IGtmProductImpressionEvent = {\n      impressions: eventProducts,\n      currencyCode: currencyCode\n    };\n    let gtmEvent: IGtmEvent = {\n      event: \"impressions\",\n      ecommerce: impressionEvent\n    }\n    PushToDataLayer(gtmEvent);\n  };\n\n  export const PushProductClickEvent = async (eventProducts: IGtmClickProduct[], listName: string, currencyCode: string): Promise<any> => {\n    let clickEvent: IGtmProductClickEvent = {\n      click: {\n        actionField: {\n          list: ListNameCleanUp(listName)\n        },\n        products: eventProducts,\n        currencyCode: currencyCode\n      }\n    };\n    let gtmEvent: IGtmEvent = {\n      event: \"productClick\",\n      ecommerce: clickEvent\n    }\n    PushToDataLayer(gtmEvent);\n  };\n\n  export const PushProductDetailEvent = async (eventProducts: IGtmDetailProduct[], listName: string, currencyCode): Promise<any> => {\n    let detailEvent: IGtmProductDetailEvent = {\n      detail: {\n        actionField: {\n          list: ListNameCleanUp(listName)\n        },\n        products: eventProducts,\n        currencyCode: currencyCode\n      }\n    };\n    let gtmEvent: IGtmEvent = {\n      event: \"productDetail\",\n      ecommerce: detailEvent\n    }\n    PushToDataLayer(gtmEvent);\n  };\n\n  export const PushProductAddEvent = async (eventProducts: IGtmBasketProduct[], listName: string, currencyCode: string): Promise<any> => {\n    let removeEvent: IGtmProductAddEvent = {\n      add: {\n        actionField: {\n          list: ListNameCleanUp(listName)\n        },\n        products: eventProducts,\n        currencyCode: currencyCode\n      }\n    };\n    let gtmEvent: IGtmEvent = {\n      event: \"addToCart\",\n      ecommerce: removeEvent\n    }\n    PushToDataLayer(gtmEvent);\n  };\n\n  export const PushProductRemoveEvent = async (eventProducts: IGtmBasketProduct[], listName: string): Promise<any> => {\n    let removeEvent: IGtmProductRemoveEvent = {\n      remove: {\n        actionField: {\n          list: ListNameCleanUp(listName)\n        },\n        products: eventProducts,\n      }\n    };\n    let gtmEvent: IGtmEvent = {\n      event: \"removeFromCart\",\n      ecommerce: removeEvent\n    }\n    PushToDataLayer(gtmEvent);\n  };\n\n  export const PushCheckoutEvent = async (eventProducts: IGtmBasketProduct[], step: number, option: string): Promise<any> => {\n    let checkoutEvent: IGtmCheckoutEvent = {\n      checkout: {\n        actionField: {\n          step: step,\n          option: option\n        },\n        products: eventProducts,\n      }\n    };\n    let gtmEvent: IGtmEvent = {\n      event: \"checkout\",\n      ecommerce: checkoutEvent\n    }\n    PushToDataLayer(gtmEvent);\n  };\n\n  export const HandleDataEvents = async (response: any): Promise<any> => {\n    if (response?.data?.dataLayer) {\n      BuildAndPushEvents(response.data.dataLayer);\n    }\n    return response;\n  };\n\n  export const BuildAndPushEvents = async (dataEvents: any): Promise<any> => {\n    if (!dataEvents) return;\n\n    dataEvents.forEach(dataEvent => {\n      let gtmEvent: IGtmEvent = null;\n      if (!dataEvent?.eventName) return;\n\n      switch (dataEvent.eventName) {\n        case 'addToCart': {\n          let products: IGtmBasketProduct[] = [];\n          dataEvent.products.forEach(dataProduct => {\n            let product: IGtmBasketProduct = {\n              brand: dataProduct.brand,\n              category: dataProduct.category,\n              id: dataProduct.id,\n              name: dataProduct.name,\n              price: dataProduct.price,\n              variant: dataProduct.variant,\n              quantity: dataProduct.quantity,\n              dimension3: dataProduct.dimension3,\n              dimension4: dataProduct.dimension4,\n              dimension5: dataProduct.dimension5,\n              dimension7: dataProduct.dimension7\n            };\n            products.push(product);\n          });\n          PushProductAddEvent(products, dataEvent.listName, dataEvent.currencyCode);\n          break;\n        }\n        case 'removeFromCart': {\n          let products: IGtmBasketProduct[] = [];\n          dataEvent.products.forEach(dataProduct => {\n            let product: IGtmBasketProduct = {\n              brand: dataProduct.brand,\n              category: dataProduct.category,\n              id: dataProduct.id,\n              name: dataProduct.name,\n              price: dataProduct.price,\n              variant: dataProduct.variant,\n              quantity: dataProduct.quantity,\n              dimension3: dataProduct.dimension3,\n              dimension4: dataProduct.dimension4,\n              dimension5: dataProduct.dimension5,\n              dimension7: dataProduct.dimension7\n            };\n            products.push(product);\n          });\n          PushProductRemoveEvent(products, dataEvent.listName)\n          break;\n        }\n        case 'productClick': {\n          let clickProducts: IGtmClickProduct[] = [];\n          dataEvent.products.forEach(dataProduct => {\n            let clickProduct: IGtmClickProduct = {\n              brand: dataProduct.brand,\n              category: dataProduct.category,\n              id: dataProduct.id,\n              name: dataProduct.name,\n              price: dataProduct.price,\n              variant: dataProduct.variant,\n              position: dataProduct.position,\n              dimension3: dataProduct.dimension3,\n              dimension4: dataProduct.dimension4,\n              dimension5: dataProduct.dimension5,\n              dimension6: \"\",\n              dimension7: dataProduct.dimension7\n            };\n            clickProducts.push(clickProduct);\n          });\n          PushProductClickEvent(clickProducts, dataEvent.listName, dataEvent.currencyCode)\n          break;\n        }\n        case 'impressions': {\n          let impressionProducts: IGtmImpressionProduct[] = [];\n          dataEvent.products.forEach(dataProduct => {\n            let impressionProduct: IGtmImpressionProduct = {\n              brand: dataProduct.brand,\n              category: dataProduct.category,\n              id: dataProduct.id,\n              name: dataProduct.name,\n              price: dataProduct.price,\n              variant: dataProduct.variant,\n              position: dataProduct.position,\n              list: ListNameCleanUp(dataProduct.list),\n              dimension3: dataProduct.dimension3,\n              dimension4: dataProduct.dimension4,\n              dimension5: dataProduct.dimension5,\n              dimension7: dataProduct.dimension7\n            };\n            impressionProducts.push(impressionProduct);\n          });\n          PushProductImpressionEvent(impressionProducts, dataEvent.listName, dataEvent.currencyCode)\n          break;\n        }\n        case 'checkout': {\n          let products: IGtmBasketProduct[] = [];\n          dataEvent.products.forEach(dataProduct => {\n            let product: IGtmBasketProduct = {\n              brand: dataProduct.brand,\n              category: dataProduct.category,\n              id: dataProduct.id,\n              name: dataProduct.name,\n              price: dataProduct.price,\n              variant: dataProduct.variant,\n              quantity: dataProduct.quantity,\n              dimension3: dataProduct.dimension3,\n              dimension4: dataProduct.dimension4,\n              dimension5: dataProduct.dimension5,\n              dimension7: dataProduct.dimension7\n            };\n            products.push(product);\n          });\n          PushCheckoutEvent(products, dataEvent.step, dataEvent.option)\n          break;\n        }\n        case 'productDetail': {\n          let detailProducts: IGtmDetailProduct[] = [];\n          dataEvent.products.forEach(dataProduct => {\n            let detailProduct: IGtmDetailProduct = {\n              brand: dataProduct.brand,\n              category: dataProduct.category,\n              id: dataProduct.id,\n              name: dataProduct.name,\n              price: dataProduct.price,\n              variant: dataProduct.variant,\n              dimension3: dataProduct.dimension3,\n              dimension4: dataProduct.dimension4,\n              dimension5: dataProduct.dimension5,\n              dimension7: dataProduct.dimension7\n            };\n            detailProducts.push(detailProduct);\n          });\n          PushProductDetailEvent(detailProducts, dataEvent.listName, dataEvent.currencyCode)\n          break;\n        }\n        default: {\n          console.warn(\"Faulty data event: propterties name?\")\n          console.dir(dataEvent);\n        }\n      }\n    });\n  };\n\n  async function PushToDataLayer(gtmEvent: any): Promise<any> {\n    if (!gtmEvent) return;\n    window['dataLayer'] = window['dataLayer'] || [];\n    window['dataLayer'].push(gtmEvent);\n\n    /* - For debugging the dataLayer - */\n    //console.group('%c GA DataLayer ', 'color: #bada55');\n    //console.dir(window['dataLayer']);\n    //console.groupEnd();\n  };\n\n  const ListNameCleanUp = (listname: string): string => {\n    if (!listname) return null;\n    let cleanedListName = listname.replace(/\\s+/g, '').replace('&', '').toLowerCase();\n\n    return cleanedListName;\n  };\n}\n\nexport default Easyfy.Shared.Scripts;","import { event } from \"../easyfy.core\";\nimport { LocalStorageKeys } from \"./easyfy.eventhandler\";\nimport { parseToBoolean } from '../easyfy.utils';\n\ndeclare global {\n  interface Window {\n    EasyfyEventLayer: any,\n    EasyfyEventLayerInstance: any\n    isEditModeEnabled?: boolean;\n    isAdminModeEnabled?: boolean;\n    blazorFinishedLoading?: boolean;\n    EasyfyMethods: any;\n  }\n}\n\nexport interface IDataMapper {\n  MapEventData(event: IEasyfyEvent): any;\n}\n\nexport interface IEasyfyEventExporter {\n  mapper: IDataMapper;\n  WithMapper(mapper: IDataMapper): void;\n  RegisterEvent(event: IEasyfyEvent): Promise<any>;\n};\n\nexport interface IEasyfyEvent {\n  eventName: string;\n  data: any;\n}\n\nexport interface IEasyfyEventService {\n  name: string;\n  includeAllEvents: boolean;\n  events: string;\n  enabled: boolean;\n}\n\nexport interface IEasyfySiteInfo {\n  currencyCode: string;\n  checkoutPath: string;\n}\n\nexport interface IEasyfyPageInfo {\n  PageType: string;\n  ViewName: string;\n}\n\nexport interface IProductData {\n  Id: any;\n  DomainId: any;\n  Ean: any;\n  DisplayName: any;\n  Brand: any;\n  Categories: any[];\n  Price: number;\n  PriceExVat: number;\n  CampaignCode: string;\n  AbsoluteProductUrl: string;\n  RelativeProductUrl: string;\n  ProductImageUrl: string;\n}\n\nexport interface IProductSalesUnitPrice {\n  salesUnitsCode: string;\n  packSize: number;\n  priceExVat: number;\n  priceIncVat: number;\n}\n\nexport interface IBasket {\n  priceIncVat: number;\n  priceExVat: number;\n  priceIncVatExShipping: number;\n  vat: number;\n  rows: IBasketRow[];\n}\n\nexport interface IBasketRow {\n  productIdentifier: string;\n  qty: number;\n  salesUnitCode: string;\n  purchaseFlow: string;\n}\n\nexport interface IProductList {\n  ListName: string;\n  ListId: string;\n  ProductIds: string[];\n}\n\nexport interface IBannerData {\n  Id: any;\n  DisplayName: any;\n  PageUrl: any;\n  LinkUrl: any;\n}\n\nexport interface ISearchPerformedData {\n  searchString: string;\n  source: string;\n  productIdentifiers: any[];\n  productHits: number;\n  articleHits: number;\n  brandHits: number;\n  pageHits: number;\n  totalProductResults: number;\n  suggestions: any[];\n}\n\nexport interface IPageViewData {\n  pageId: string;\n  searchPageId: string;\n}\n\nexport interface IEventNotification {\n  message: string;\n  severity: string;\n}\n\nexport interface IQuantityChangedData {\n  productIdentifier: string;\n  listName: string;\n  salesUnitCode: string;\n  oldQuantity: number;\n  newQuantity: number;\n}\n\nexport interface ISessionStarted {\n  Culture: string;\n  Currency: string;\n  IsDesktop: boolean;\n  IsMobilePhone: boolean;\n  IsTablet: boolean;\n  RecurringUser: boolean;\n  Referrer: string;\n  Path: string;\n  UserAgent: string;\n  SessionId: string;\n  ClientId: string;\n  UserId: string;\n  VisitorId: string;\n}\n\nexport interface IWorkerJob {\n  readonly Type: string;\n  Data: any;\n  Runs: number;\n  MaxRuns: number;\n\n  RunJob(data: any): Promise<any>;\n  AnonymizeWithDbId(db_id: any): any;\n}\n\nexport interface IWorkerMessage {\n  Message: string;\n  Data: any;\n}\n\nexport interface ITrackableElement {\n  Id: any;\n  Type: any;\n  Properties: Map<string, any>;\n}\n\nexport interface IClientEventMetaData {\n  ClientId: string;\n  UserId: string;\n  SessionId: string;\n  IsDesktop: boolean;\n  IsMobilePhone: boolean;\n  IsTablet: boolean;\n  IPAddress: string;\n}\n\nexport interface IStatsEventData {\n  ClientMetaData: IClientEventMetaData;\n  EventRequests: any[];\n}\n\nexport module EasyfyEventData {\n  export function AddDataToEventLayer(data: any): void {\n    if (data) {\n      window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n      data.events.forEach((event: any) => {\n        if (!window.EasyfyEventLayer.events) {\n          window.EasyfyEventLayer.events = [];\n        }\n        window.EasyfyEventLayer.events.push(event);\n      });\n\n      window.EasyfyEventLayer.products = window.EasyfyEventLayer.products || {};\n\n      for (const product in data.products) {\n        if (!window.EasyfyEventLayer.products || window.EasyfyEventLayer.products[product]) continue;\n        window.EasyfyEventLayer.products[product] = data.products[product];\n      }\n\n      window.EasyfyEventLayer.productLists = window.EasyfyEventLayer.productLists || {};\n\n      for (const productList in data.productLists) {\n        //overwrite product list values when updated\n        if (!window.EasyfyEventLayer.productLists || !window.EasyfyEventLayer.productLists[productList]) continue;\n        window.EasyfyEventLayer.productLists[productList] = data.productLists[productList];\n      }\n\n      window.EasyfyEventLayer.productPrices = window.EasyfyEventLayer.productPrices || {};\n\n      for (const price in data.productPrices) {\n        //no need to overwrite price entries already in place\n        if (!window.EasyfyEventLayer.productPrices || window.EasyfyEventLayer.productPrices[price]) continue;\n        window.EasyfyEventLayer.productPrices[price] = data.productPrices[price];\n      }\n\n      window.EasyfyEventLayer.basket = window.EasyfyEventLayer.basket || {};\n\n      if (data.basket) {\n        window.EasyfyEventLayer.basket = data.basket;\n      }\n\n      for (const notification in data.notifications) {\n        if (!window.EasyfyEventLayer.notifications) continue;\n        window.EasyfyEventLayer.notifications.push(notification);\n      }\n    }\n  }\n\n  export function AddCustomDataToEventLayer(data: Map<string, object>): void {\n\n    if (!data) return;\n\n    if (!window.EasyfyEventLayer.customData) {\n      window.EasyfyEventLayer.customData = {};\n    }\n    data.forEach((value: object, key: string) => {\n      window.EasyfyEventLayer.customData[key] = value;\n    })\n  }\n\n  export function GlobalIgnoreEvents(): boolean {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: boolean;\n    if (window.EasyfyEventLayer.configuration?.addProductImpressionsServerSide != undefined) {\n      result = (window.EasyfyEventLayer.configuration.addProductImpressionsServerSide as boolean) == false;\n    }\n\n    return result;\n  }\n\n  export function SiteInfo(): IEasyfySiteInfo {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: IEasyfySiteInfo;\n    if (window.EasyfyEventLayer.site) {\n      result = window.EasyfyEventLayer.site as IEasyfySiteInfo;\n    }\n\n    return result;\n  }\n\n  export function PageInfo(): IEasyfyPageInfo {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: IEasyfyPageInfo;\n    if (window.EasyfyEventLayer.pageInfo) {\n      result = window.EasyfyEventLayer.pageInfo as IEasyfyPageInfo;\n    }\n\n    return result;\n  }\n\n  export function Events(): IEasyfyEvent[] {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: IEasyfyEvent[] = [];\n    if (window.EasyfyEventLayer.events) {\n      result = window.EasyfyEventLayer.events as IEasyfyEvent[];\n    }\n\n    return result;\n  }\n\n  export function ClearEvents(): void {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    if (window.EasyfyEventLayer.events) {\n      window.EasyfyEventLayer.events = [];\n    }\n  }\n\n  export function ShouldRegisterProductImpressions(): boolean {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: boolean;\n    if (window.EasyfyEventLayer.configuration?.addProductImpressionsServerSide != undefined) {\n      result = (window.EasyfyEventLayer.configuration.addProductImpressionsServerSide as boolean) == false;\n    }\n\n    return result;\n  }\n\n  export function ShouldRegisterBannerImpressions(): boolean {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: boolean;\n    if (window.EasyfyEventLayer.configuration?.addBannerImpressionsServerSide != undefined) {\n      result = (window.EasyfyEventLayer.configuration.addBannerImpressionsServerSide as boolean) == false;\n    }\n\n    return result;\n  }\n\n  export function GetAllServices(): IEasyfyEventService[] {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: IEasyfyEventService[] = [];\n    if (window.EasyfyEventLayer?.configuration?.services) {\n      result = window.EasyfyEventLayer.configuration.services as IEasyfyEventService[];\n    }\n\n    return result;\n  }\n\n  export function GetService(serviceName: string): IEasyfyEventService {\n    var service = EasyfyEventData.GetAllServices().find(serviceInstance => serviceInstance.name.toLowerCase() == serviceName.toLowerCase());\n    return service;\n  }\n\n  export function GetServiceNames(): string[] {\n    var result: string[] = [];\n    EasyfyEventData.GetAllServices().forEach(service => result.push(service.name));\n    return result;\n  }\n\n  export function ServiceIsActive(serviceName: string): boolean {\n    var service = EasyfyEventData.GetAllServices().find(serviceInstance => serviceInstance.name.toLowerCase() == serviceName.toLowerCase());\n    return (service && service.enabled);\n  }\n\n  export function ConsumesEvent(serviceName: string, eventName: string): boolean {\n    var service = EasyfyEventData.GetService(serviceName);\n    if (!service || !service.enabled) return false;\n    if (service.includeAllEvents) {\n      return true;\n    }\n    else {\n      var serviceConsumables = service.events?.trim().replace(/\\s/g, '').split(\",\");\n      return serviceConsumables.find(event => event.trim().toLowerCase() == eventName.toLowerCase()) != undefined ?? false;\n    }\n  }\n\n  export function Product<T extends IProductData>(id: string): T | undefined {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: T = null;\n    if (window.EasyfyEventLayer.products) {\n      result = window.EasyfyEventLayer.products[id] as T;\n    }\n    return result;\n  }\n\n  export function ProductAt<T extends IProductData>(atIndex: number): T | undefined {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: T = null;\n    try {\n      if (window.EasyfyEventLayer.products) {\n        result = window.EasyfyEventLayer.products[atIndex] as T;\n      }\n    }\n    catch (error) { }\n\n    return result;\n  }\n\n  export function Products<T extends IProductData>(ids: string[]): T[] {\n    var productDataSet: T[] = [];\n    ids.forEach((id) => {\n      productDataSet.push(EasyfyEventData.Product<T>(id));\n    });\n    return productDataSet;\n  }\n\n  export function ProductsAt<T extends IProductData>(indexes: number[]): T[] {\n    var productDataSet: T[] = [];\n    indexes.forEach((index) => {\n      productDataSet.push(EasyfyEventData.ProductAt<T>(index));\n    });\n    return productDataSet;\n  }\n\n  export function AllProducts<T extends IProductData>(): T[] {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: T[] = [];\n    if (window.EasyfyEventLayer.products) {\n      result = window.EasyfyEventLayer.products as T[];\n    }\n    return result;\n  }\n  export function AllProductLists(): IProductList[] {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result = [];\n    if (window.EasyfyEventLayer.productLists) {\n      result = window.EasyfyEventLayer.productLists;\n    }\n    return result;\n  }\n\n  export function ProductIndexInList(listName: string, productId: string): number | null {\n    if (!listName || !productId) return null;\n    var productsInList = window.EasyfyEventLayer.productLists[listName] as IProductList;\n    if (!productsInList || !productsInList?.ProductIds) return null;\n    var indexOfProduct = productsInList.ProductIds.indexOf(productId);\n\n    return indexOfProduct;\n  }\n\n  export function ProductSalesUnitPrice(id: string): IProductSalesUnitPrice | undefined {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: IProductSalesUnitPrice = null;\n\n    if (window.EasyfyEventLayer.productPrices) {\n      result = window.EasyfyEventLayer.productPrices[id] as IProductSalesUnitPrice;\n    }\n\n    return result;\n  }\n\n  export function ProductSalesUnitPrices(ids: string[]): IProductSalesUnitPrice[] | undefined {\n    var prices: IProductSalesUnitPrice[] = [];\n    ids.forEach((id) => {\n      prices.push(EasyfyEventData.ProductSalesUnitPrice(id));\n    });\n    return prices;\n  }\n\n  export function AllProductSalesUnitPrices(): IProductSalesUnitPrice[] {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: IProductSalesUnitPrice[] = [];\n\n    if (window.EasyfyEventLayer.productPrices) {\n      result = window.EasyfyEventLayer.productPrices as IProductSalesUnitPrice[];\n    }\n\n    return result;\n  }\n\n  export function Banner(id: string): IBannerData | undefined {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: IBannerData = null;\n    if (window.EasyfyEventLayer.banners) {\n      result = window.EasyfyEventLayer.banners[id] as IBannerData;\n    }\n    return result;\n  }\n\n  export function AllBanners(): IBannerData[] {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: IBannerData[] = [];\n    if (window.EasyfyEventLayer.banners) {\n      result = window.EasyfyEventLayer.banners as IBannerData[];\n    }\n    return result;\n  }\n\n  export function HasNotifications(): boolean {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    return (window.EasyfyEventLayer && window.EasyfyEventLayer.notifications?.length > 0);\n  }\n\n  export function Notifications(): IEventNotification[] {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    var result: IEventNotification[] = [];\n    if (window.EasyfyEventLayer.notifications) {\n      result = window.EasyfyEventLayer.notifications as IEventNotification[];\n    }\n    return result;\n  }\n  export function ClearNotifications():void {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    if (window.EasyfyEventLayer.notifications) {\n      window.EasyfyEventLayer.notifications = [];\n    }\n  }\n\n  export function HasEvents(): boolean {\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    return (window.EasyfyEventLayer && window.EasyfyEventLayer.events?.length > 0);\n  };\n\n  export function Basket(): IBasket {\n    window.EasyfyEventLayer.basket = window.EasyfyEventLayer.basket || {};\n    var result: IBasket;\n    if (window.EasyfyEventLayer.basket) {\n      result = window.EasyfyEventLayer.basket as IBasket;\n    }\n    return result;\n  };\n\n  export function GetCurrencyCode(): string {\n    var returnValue = null;\n    window.EasyfyEventLayer = window.EasyfyEventLayer || {};\n    if (window.EasyfyEventLayer && window.EasyfyEventLayer.site) {\n      returnValue = window.EasyfyEventLayer.site.currencyCode as string;\n    }\n\n    return returnValue;\n  };\n\n  export function GetCustomData(key: string): any {\n    if (!window.EasyfyEventLayer.customData) {\n      window.EasyfyEventLayer.customData = {};\n    }\n    return window.EasyfyEventLayer.customData[key];\n  }\n\n  export function GetClientEventMetaData(): IClientEventMetaData {\n    var result: IClientEventMetaData = {\n      SessionId: localStorage.getItem(LocalStorageKeys.SessionId),\n      UserId: localStorage.getItem(LocalStorageKeys.UserId),\n      ClientId: localStorage.getItem(LocalStorageKeys.ClientId),\n      IsDesktop: parseToBoolean(localStorage.getItem(LocalStorageKeys.IsDekstop)),\n      IsMobilePhone: parseToBoolean(localStorage.getItem(LocalStorageKeys.IsMobilePhone)),\n      IsTablet: parseToBoolean(localStorage.getItem(LocalStorageKeys.IsTablet)),\n      IPAddress: localStorage.getItem(LocalStorageKeys.IPAddress)\n    }\n    return result;\n  }\n\n  export function IsRecurringUser(flagAsRecurringAfterCheck: boolean): boolean {\n    var cookieKey = localStorage.getItem(LocalStorageKeys.UserIdCookieKey);\n    var userId = EasyfyEventData.GetCookieValue(cookieKey);\n    var lastCheckedUserId = localStorage.getItem(LocalStorageKeys.LastCheckedUserId);\n    var result = false\n\n    if (userId == lastCheckedUserId) {\n      result = true;\n    }\n\n    if (flagAsRecurringAfterCheck) {\n      localStorage.setItem(LocalStorageKeys.LastCheckedUserId, userId);\n    }\n\n    return result;\n  }\n\n  export function GetCookieValue(cookieName) {\n    let cookie = {};\n    document.cookie.split(';').forEach(function (el) {\n      let [key, value] = el.split('=');\n      cookie[key.trim()] = value;\n    })\n    return cookie[cookieName];\n  }\n  export function SetStatsApiBlock(block: boolean) {\n    if (block) {\n      localStorage.setItem(LocalStorageKeys.StatsIsBlocked, \"1\");\n    }\n    else {\n      localStorage.removeItem(LocalStorageKeys.StatsIsBlocked);\n    }\n  }\n  export function StatsApiIsBlocked(): boolean {\n    var blockedFlag = localStorage.getItem(LocalStorageKeys.StatsIsBlocked);\n\n    if (blockedFlag) {\n      return true;\n    }\n\n    return false;\n  }\n}\n\n","import { IEasyfyEvent, IDataMapper, IEasyfyEventExporter, EasyfyEventData, IStatsEventData } from '@shared/easyfy.events/easyfy.eventdata';\nimport { EventNames, LocalStorageKeys } from '../easyfy.eventhandler';\n\n/* Stats Exporter class */\nexport class StatsEventExporter implements IEasyfyEventExporter {\n  private _eventData: IStatsEventData;\n  private _blob: Blob;\n  private readonly _payloadKbThreshold: number = 50;\n  private readonly _eventThreshold: number = 3;\n  private _eventThresholdRemoved: boolean = false;\n\n  mapper: IDataMapper;\n  async WithMapper(mapper: IDataMapper): Promise<void> {\n    this.mapper = mapper;\n    await this.LoadAndSetTransitionStatus();\n    document.addEventListener(\"visibilitychange\", this.CheckVisibility.bind(this));\n  }\n\n  public RegisterEvent(event: IEasyfyEvent): Promise<any> {\n    return new Promise<void>(async (resolve) => {\n      if (this.mapper) {\n        if (!EasyfyEventData.StatsApiIsBlocked()) {\n          const eventData = this.mapper.MapEventData(event);\n          if (eventData) {\n            if (Array.isArray(eventData)) {\n              eventData.forEach(async (event) => {\n                await this.AccumulateEvent(event);\n              });\n            }\n            else {\n              await this.AccumulateEvent(eventData);\n            }\n          }\n        }\n      }\n      resolve();\n    });\n  }\n\n  private async LoadAndSetTransitionStatus(): Promise<void> {\n    const eventThresholdRemoved = localStorage.getItem(LocalStorageKeys.StatsEventsThresholdRemoved);\n    if (eventThresholdRemoved === \"true\") {\n      this._eventThresholdRemoved = true;\n      return;\n    }\n\n    const storedDataString = localStorage.getItem(LocalStorageKeys.StatsEventsTransitionObj);\n    if (storedDataString) {\n\n      try {\n        this._eventData = JSON.parse(storedDataString) as IStatsEventData;\n      } catch (error) {\n        this._eventData = {\n          ClientMetaData: null,\n          EventRequests: []\n        };\n      }\n    }\n  }\n\n  private async RecheckAndSetTransitionStatus(): Promise<void> {\n\n    let eventsMatch = 0;\n    const skipEventNames = [EventNames.BannerImpression, EventNames.ElementImpression, EventNames.ProductImpression];\n\n    for (const event of this._eventData?.EventRequests) {\n      if (skipEventNames.includes(event?.Event?.type?.toLowerCase()) == false) {\n        eventsMatch++;\n      }\n    }\n\n    if (eventsMatch >= this._eventThreshold) {\n      localStorage.setItem(LocalStorageKeys.StatsEventsThresholdRemoved, \"true\");\n      this._eventThresholdRemoved = true;\n      localStorage.removeItem(LocalStorageKeys.StatsEventsTransitionObj);\n    }\n    else {\n      localStorage.setItem(LocalStorageKeys.StatsEventsTransitionObj, JSON.stringify(this._eventData));\n    }\n  }\n\n  private async AccumulateEvent(event: any): Promise<void> {\n    return new Promise<void>(async (resolve) => {\n      if (!this._eventData || !this._eventData?.ClientMetaData || !this._eventData?.EventRequests) {\n        this._eventData = {\n          ClientMetaData: EasyfyEventData.GetClientEventMetaData(),\n          EventRequests: []\n        }\n      }\n\n      this._eventData.EventRequests.push({ \"Event\": event });\n\n      const str = JSON.stringify(this._eventData);\n      const bytes = new TextEncoder().encode(str);\n      const blob = new Blob([bytes], {\n        type: \"application/json;charset=utf-8\"\n      });\n\n      this._blob = blob;\n\n      if (this._eventThresholdRemoved) {\n        const payloadSize = await this.GetObjectSizeInKB(this._eventData);\n        if (payloadSize > this._payloadKbThreshold) {\n          await this.SendEventsToStatsApi();\n        }\n      }\n      else {\n        await this.RecheckAndSetTransitionStatus();\n      }\n\n      resolve();\n    });\n  }\n\n  private async SendEventsToStatsApi(): Promise<void> {\n    if (this._eventData?.ClientMetaData && this._eventData?.EventRequests?.length > 0 && this._blob) {\n      navigator.sendBeacon(\"/api/stats/events\", this._blob);\n      this._eventData = null;\n      this._blob = null;\n    }\n  }\n\n  private async CheckVisibility() {\n    if (document.visibilityState === \"hidden\" && this._eventThresholdRemoved) {\n      await this.SendEventsToStatsApi();\n    }\n  }\n\n  async GetObjectSizeInKB(obj: any): Promise<number> {\n\n    const jsonString = JSON.stringify(obj);\n    const bytes = new TextEncoder().encode(jsonString).length;\n    const kilobytes = bytes / 1024;\n\n    return kilobytes;\n  }\n}","import { EasyfyEventData, IEventNotification } from '@shared/easyfy.events/easyfy.eventdata';\nimport { IEasyfyEvent } from './easyfy.eventdata';\n\ndeclare var process: {\n  env: {\n    NODE_ENV: string\n  }\n}\n\nexport module EasyfyEventLogger {\n\n  const topParagraphStyle: string = \"line-height:6px; border-radius: 5px; width: fit-content;\";\n  const paragraphStyle: string = \"line-height:6px; padding:6px; border-radius: 5px; width: fit-content;\";\n\n  let _channelName: string = \"event_logger_channel\";\n  let _broadcastChannel: BroadcastChannel = new BroadcastChannel(_channelName);\n\n  export function ConsoleLog(message: string, prefix?: string, color?: string, bgColor?: string) {\n    if (process.env.NODE_ENV === \"development\") {\n      if (color == undefined) {\n        color = '#ffffff';\n      }\n\n      var style = `color: ${color};`;\n\n      if (bgColor) {\n        style += `background: ${bgColor};`;\n      }\n\n      console.log(`%c ${prefix}${message}`, style);\n    }\n  }\n\n  export function Log(this: any, obj): void {\n    if (process.env.NODE_ENV === \"development\") {\n      //return;\n\n      try {\n        var haveInjectedCss = window[\"injectedCss\"];\n        if (!haveInjectedCss) {\n          window[\"injectedCss\"] = true;\n          var injectedCss = window.document.styleSheets[0];\n          injectedCss.insertRule(`\n          @keyframes messageFlash {\n          0%   { background-color: rgba(255, 255, 255, 0);}\n          50%  { background-color: rgba(255, 255, 255, 0.5);}\n          100% { background-color: rgba(255, 255, 255, 0);}\n          }\n          `, injectedCss.cssRules.length);\n\n          injectedCss.insertRule(`.flash{\n            animation: messageFlash 0.2s 2;\n          }`, injectedCss.cssRules.length);\n\n          injectedCss.insertRule(`\n          @keyframes impressionBorder {\n          0% { border: 0px solid #ff7600; }\n          100% { border: 8px solid #ff7600; }\n          }\n          `, injectedCss.cssRules.length);\n\n          injectedCss.insertRule(`.impressionSeen{\n            animation: impressionBorder 0.8s 1;\n            border: 8px solid #ff7600;\n          }`, injectedCss.cssRules.length);\n\n          injectedCss.insertRule(`#debugEventConsumer div{\n            font-size: 12px;\n            margin: 0px;\n            padding: 0px;\n            display: flex;\n\n            .time{\n              color:#8f8f8f;\n            }\n\n            pre {\n              margin: 0 5px;\n\n              span{\n                 color: #1fb5ff;\n              }\n            }\n          }`, injectedCss.cssRules.length);\n\n         \n        }\n      }\n      catch (error) {\n        console.warn(error);\n      }\n\n      var devEventLogButton = document.querySelector(\"#devEventLogButton\");\n      if (!devEventLogButton) {\n        var logButtonElem = document.createElement('div');\n        logButtonElem.id = \"devEventLogButton\";\n        logButtonElem.style.position = \"fixed\";\n        logButtonElem.style.cursor = \"pointer\";\n        logButtonElem.style.bottom = \"5px\";\n        logButtonElem.style.left = \"5px\";\n        logButtonElem.style.width = \"10px\";\n        logButtonElem.style.height = \"10px\";\n        logButtonElem.style.fontSize = \"10px\";\n        logButtonElem.style.zIndex = \"2147483645\";\n\n        logButtonElem.onclick = this.EnableLog;\n        logButtonElem.innerHTML = \"🖥️\";\n\n        document.querySelector('body').appendChild(logButtonElem);\n      }\n\n      var devEventOutput = document.querySelector(\"#devEventOutput\");\n      if (!devEventOutput) {\n        var outputDiv = document.createElement('div');\n        outputDiv.id = \"devEventOutput\";\n        outputDiv.style.position = \"fixed\";\n        outputDiv.style.backgroundColor = \"#000000de\";\n        outputDiv.style.color = \"#c4c4c4\";\n        outputDiv.style.zIndex = \"2147483646\";\n        outputDiv.style.width = \"100%\";\n        outputDiv.style.height = \"200px\";\n        outputDiv.style.bottom = \"0\";\n        outputDiv.style.fontSize = \"10px\";\n        outputDiv.style.fontFamily = \"Roboto, Helvetica\";\n        outputDiv.style.lineHeight = \"4px\";\n        outputDiv.style.display = \"grid\";\n        outputDiv.style.gridTemplateColumns = \"120px 1fr\";\n        outputDiv.style.gridTemplateRows = \"30px 1fr\";\n\n        var topElement = document.createElement('div');\n        topElement.style.position = \"sticky\";\n        topElement.style.top = \"0px\";\n        topElement.style.width = \"100%\";\n        topElement.style.height = \"30px\";\n        topElement.style.padding = \"7px 5px\";\n        topElement.style.color = \"#73ff69\";\n        topElement.style.display = \"flex\";\n        topElement.style.gridGap = \"20px\";\n        topElement.style.gridColumn = \"2\";\n        topElement.style.gridRow = \"1\";\n\n        topElement.innerHTML = '<p style=\"' + topParagraphStyle + '\">EventLayer.Services: <span id=\"devEventServices\">No registered</span></p>' +\n          '<p style=\"' + topParagraphStyle + '\">EventLayer.Products: <span id=\"devLayerProducts\">0</span></p>' +\n          '<p style=\"' + topParagraphStyle + '\">EventLayer.ProductLists: <span id=\"devLayerLists\">0</span></p>' +\n          '<p style=\"' + topParagraphStyle + '\">EventLayer.ProductPrices: <span id=\"devLayerPrices\">0</span></p>' +\n          '<p style=\"' + topParagraphStyle + '\">EventLayer.Banners: <span id=\"devLayerBanners\">0</span></p>' +\n          '<p style=\"' + topParagraphStyle + '\">Product impressions: <span id=\"devProductImpressions\">0</span></p>' +\n          '<p id=\"devlogger-warning-sign\" style=\"display:none; transform: scale(2);line-height: 15px;border-radius: 5px;color:#ffd76a;width: fit-content;\">⚠</p>' +\n          '<p id=\"devlogger-error-sign\" style=\"display:none; transform: scale(2);line-height: 15px;border-radius: 5px;color:#ff6a6a;width: fit-content;\">⚠</p>';\n\n        var leftElement = document.createElement('div');\n        leftElement.style.width = \"120px;\"\n        leftElement.style.height = \"30px\";\n        leftElement.style.gridColumn = \"1\";\n        leftElement.style.gridRow = \"1\";\n        leftElement.style.display = \"flex\";\n\n        var iconParagraph1 = document.createElement('p');\n        iconParagraph1.style.cursor = \"pointer\";\n        iconParagraph1.style.width = \"30px\";\n        iconParagraph1.style.height = \"30px\";\n        iconParagraph1.style.padding = \"0px 6px\";\n        iconParagraph1.style.lineHeight = \"30px\";\n        iconParagraph1.onclick = EasyfyEventLogger.DisableLog;\n        iconParagraph1.innerHTML = \"🖥️\";\n\n        leftElement.appendChild(iconParagraph1);\n\n        var iconParagraph2 = document.createElement('p');\n        iconParagraph2.style.cursor = \"pointer\";\n        iconParagraph2.style.width = \"30px\";\n        iconParagraph2.style.height = \"30px\";\n        iconParagraph2.style.padding = \"0px 6px\";\n        iconParagraph2.style.lineHeight = \"30px\";\n        iconParagraph2.onclick = EasyfyEventLogger.PrintEventLayer;\n        iconParagraph2.innerHTML = \"📄\";\n\n        leftElement.appendChild(iconParagraph2);\n\n        var iconParagraph3 = document.createElement('p');\n        iconParagraph3.style.cursor = \"pointer\";\n        iconParagraph3.style.width = \"30px\";\n        iconParagraph3.style.height = \"30px\";\n        iconParagraph3.style.padding = \"0px 8px\";\n        iconParagraph3.style.lineHeight = \"30px\";\n        iconParagraph3.style.transform = \"scale(1.6)\";\n\n        if (ImpressionVisualizerIsOn()) {\n          iconParagraph3.style.color = \"#ff7600\";\n        } else {\n          iconParagraph3.style.color = \"#c4c4c4\";\n        }\n\n        iconParagraph3.id = \"toggleImpressionBtn\"\n        iconParagraph3.onclick = EasyfyEventLogger.ToggleImpressionVisualizer;\n        iconParagraph3.innerHTML = \"👁\";\n\n        leftElement.appendChild(iconParagraph3);\n\n        var iconParagraph4 = document.createElement('p');\n        iconParagraph4.style.cursor = \"pointer\";\n        iconParagraph4.style.width = \"30px\";\n        iconParagraph4.style.height = \"30px\";\n        iconParagraph4.style.padding = \"0px 8px\";\n        iconParagraph4.style.lineHeight = \"30px\";\n        iconParagraph4.style.transform = \"scale(1.6)\";\n        iconParagraph4.onclick = EasyfyEventLogger.RunEventConsumer;\n        iconParagraph4.innerHTML = \"📡\";\n\n        leftElement.appendChild(iconParagraph4);\n\n\n        var textElement = document.createElement('div');\n        textElement.id = \"outputText\";\n        textElement.style.padding = \"5px\";\n        textElement.style.overflowY = \"scroll\";\n        textElement.style.height = \"170px\";\n        textElement.style.gridColumn = \"2\";\n        textElement.style.gridRow = \"2\";\n        textElement.style.borderRadius = \"5px\";\n\n        outputDiv.appendChild(topElement);\n        outputDiv.appendChild(leftElement);\n        outputDiv.appendChild(textElement);\n        document.querySelector('body').appendChild(outputDiv);\n\n        this.CheckLogStatus();\n      }\n\n      devEventOutput = document.querySelector(\"#devEventOutput\");\n      if (!devEventOutput) return;\n\n      if (obj.type == \"productimpression\") {\n        var textOutput = devEventOutput.querySelector('#outputText');\n        textOutput.innerHTML += \"<p style='\" + paragraphStyle + \"'>\" + obj.message + \"</p>\";\n        var productImpressions = Number.parseInt(devEventOutput.querySelector('#devProductImpressions').innerHTML);\n        devEventOutput.querySelector('#devProductImpressions').innerHTML = (productImpressions + 1).toString();\n\n        textOutput.scrollTop = textOutput.scrollHeight;\n\n        if (obj.target && ImpressionVisualizerIsOn()) {\n          (obj.target as HTMLElement).classList.add(\"impressionSeen\")\n        }\n\n        BroadcastToLogger(obj.message);\n      }\n      else if (obj.type == \"servicesregistered\") {\n        devEventOutput.querySelector('#devEventServices').innerHTML = obj.message;\n\n        BroadcastToLogger(obj.message);\n      }\n      else if (obj.type == \"updateeventlayerstatus\") {\n        var lists = EasyfyEventData.AllProductLists();\n        var products = EasyfyEventData.AllProducts();\n        var banners = EasyfyEventData.AllBanners();\n        var prices = EasyfyEventData.AllProductSalesUnitPrices();\n\n        var eventLayerProductsCount = Object.keys(products).length;\n        var eventLayerProductListsCount = Object.keys(lists).length;\n        var eventLayerBannersCount = Object.keys(banners).length;\n        var eventLayerPricesCount = Object.keys(prices).length;\n\n        devEventOutput.querySelector('#devLayerLists').innerHTML = eventLayerProductListsCount.toString();\n        devEventOutput.querySelector('#devLayerProducts').innerHTML = eventLayerProductsCount.toString();\n        devEventOutput.querySelector('#devEventServices').innerHTML = EasyfyEventData.GetServiceNames().join(\", \");\n        devEventOutput.querySelector('#devLayerBanners').innerHTML = eventLayerBannersCount.toString();\n        devEventOutput.querySelector('#devLayerPrices').innerHTML = eventLayerPricesCount.toString();\n\n        var notifications = EasyfyEventData.Notifications();\n\n        var textOutput = devEventOutput.querySelector('#outputText');\n        notifications.forEach((notification: IEventNotification) => {\n\n          var color = \"#ffffff\";\n          var message = notification.severity + \": \" + notification.message;\n          switch (notification?.severity) {\n            case \"Warning\":\n              color = \"#ffd76a\";\n              console.warn(message);\n              let warn = devEventOutput.querySelector('#devlogger-warning-sign') as HTMLElement;\n              warn.style.display = \"block\";\n              break;\n            case \"Error\":\n              color = \"#ff6a6a\";\n              console.error(message);\n              let err = devEventOutput.querySelector('#devlogger-warning-sign') as HTMLElement;\n              err.style.display = \"block\";\n              break;\n          }\n          textOutput.innerHTML += \"<p style='color: \" + color + \";\" + paragraphStyle + \"'>\" + notification.message + \"</p>\";\n\n          BroadcastToLogger(notification);\n        });\n        textOutput.scrollTop = textOutput.scrollHeight;\n        EasyfyEventData.ClearNotifications();\n      }\n      else if (obj.type == \"event\") {\n        var textOutput = devEventOutput.querySelector('#outputText');\n        textOutput.className = \"\";\n        textOutput.innerHTML += \"<p style='color: #6ad6ff;\" + paragraphStyle + \"'>\" + obj.message + \"</p>\";\n        textOutput.scrollTop = textOutput.scrollHeight;\n        setTimeout(() => {\n          var textOutput = devEventOutput.querySelector('#outputText');\n          textOutput.className = \"flash\";\n        }, 20);\n      }\n      else if (obj.type == \"warning\") {\n        var textOutput = devEventOutput.querySelector('#outputText');\n        textOutput.innerHTML += \"<p style='color: #ffd76a;\" + paragraphStyle + \"'>\" + obj.message + \"</p>\";\n        textOutput.scrollTop = textOutput.scrollHeight;\n        BroadcastToLogger(obj.message);\n      }\n      else if (obj.type == \"error\") {\n        var textOutput = devEventOutput.querySelector('#outputText');\n        textOutput.innerHTML += \"<p style='color: #ff6a6a;\" + paragraphStyle + \"'>\" + obj.message + \"</p>\";\n        textOutput.scrollTop = textOutput.scrollHeight;\n        BroadcastToLogger(obj.message);\n\n      }\n      else {\n        var textOutput = devEventOutput.querySelector('#outputText');\n        textOutput.innerHTML += \"<p style='\" + paragraphStyle + \"'>\" + obj.message + \"</p>\";\n        textOutput.scrollTop = textOutput.scrollHeight;\n        BroadcastToLogger(obj.message);\n\n      }\n    }\n  };\n\n  export function CheckLogStatus(this: any): void {\n    if (process.env.NODE_ENV === \"development\") {\n      var useEventLog = localStorage.getItem(\"easyfyDevEventLog\") == \"true\";\n\n      useEventLog ? this.EnableLog() : this.DisableLog();\n    }\n  };\n\n  export function EnableLog(): void {\n    if (process.env.NODE_ENV === \"development\") {\n      localStorage.setItem(\"easyfyDevEventLog\", \"true\");\n      var devEventOutput = document.querySelector(\"#devEventOutput\") as HTMLElement;\n      if (devEventOutput) {\n        devEventOutput.style.display = \"grid\";\n      }\n    }\n  };\n\n  export function DisableLog(): void {\n    if (process.env.NODE_ENV === \"development\") {\n      localStorage.setItem(\"easyfyDevEventLog\", \"false\");\n      var devEventOutput = document.querySelector(\"#devEventOutput\") as HTMLElement;\n      if (devEventOutput) {\n        devEventOutput.style.display = \"none\";\n      }\n    }\n  };\n\n  export function ToggleImpressionVisualizer(): void {\n    if (process.env.NODE_ENV === \"development\") {\n      var date = new Date();\n      date.setDate(date.getDate() + 30);\n      var visualizerValue = localStorage.getItem(\"easyfyDevImpVisualizer\");\n      var btn = document.querySelector(\"#toggleImpressionBtn\") as HTMLElement;\n\n      if (visualizerValue == \"true\") {\n        localStorage.setItem(\"easyfyDevImpVisualizer\", \"false\");\n        btn.style.color = \"#c4c4c4\";\n\n        document.querySelectorAll('.impressionSeen').forEach((elem) => {\n          elem.classList.remove('impressionSeen');\n        });\n      }\n      else {\n        localStorage.setItem(\"easyfyDevImpVisualizer\", \"true\");\n        btn.style.color = \"#ff7600\";\n        document.querySelectorAll('[data-track-product][data-track-impression=\"True\"]').forEach((elem) => {\n          elem.classList.add('impressionSeen');\n        });\n      }\n    }\n  };\n\n  function ImpressionVisualizerIsOn(): boolean {\n    var visualizerValue = localStorage.getItem(\"easyfyDevImpVisualizer\");\n    if (visualizerValue == \"true\") {\n      return true;\n    }\n    else {\n      return false;\n    }\n  }\n\n  export function PrintEventLayer(): void {\n    if (process.env.NODE_ENV === \"development\") {\n\n      var devEventLayerOutput = document.querySelector(\"#devEventLayerOutput\") as HTMLDivElement;\n      if (!devEventLayerOutput) {\n        var outputDiv = document.createElement('div');\n        outputDiv.id = \"devEventLayerOutput\";\n        outputDiv.style.position = \"fixed\";\n        outputDiv.style.height = \"66%\";\n        outputDiv.style.width = \"70%\";\n        outputDiv.style.top = \"100px\";\n        outputDiv.style.left = \"15%\";\n        outputDiv.style.backgroundColor = \"#000000de\";\n        outputDiv.style.color = \"#c4c4c4\";\n        outputDiv.style.zIndex = \"2147483646\";\n        outputDiv.style.borderRadius = \"5px\";\n        outputDiv.style.boxShadow = \"1px 0px 14px 1px rgba(0,0,0,0.3)\";\n        outputDiv.style.fontSize = \"11px\";\n        outputDiv.style.overflow = \"auto\";\n\n        var iconParagraph = document.createElement('p');\n        iconParagraph.style.cursor = \"pointer\";\n        iconParagraph.style.width = \"30px\";\n        iconParagraph.style.height = \"30px\";\n        iconParagraph.style.padding = \"0px 8px\";\n        iconParagraph.style.lineHeight = \"30px\";\n        iconParagraph.style.position = \"fixed\";\n        iconParagraph.onclick = EasyfyEventLogger.HidePrintedEventLayer;\n        iconParagraph.innerHTML = \"✖\";\n\n        var textElement = document.createElement('div');\n        textElement.id = \"devEventLayerOutputText\";\n        textElement.style.padding = \"30px\";\n        textElement.style.fontFamily = \"monospace\";\n        textElement.style.whiteSpace = \"pre\";\n\n        outputDiv.appendChild(iconParagraph);\n        outputDiv.appendChild(textElement);\n\n\n        document.querySelector('body').appendChild(outputDiv);\n        devEventLayerOutput = document.querySelector(\"#devEventLayerOutput\") as HTMLDivElement;\n\n      }\n\n      devEventLayerOutput.style.display = \"block\";\n      const brace = {\n        brace: 0\n      };\n\n      var jsonstring = JSON.stringify(window.EasyfyEventLayer, null, 2);\n      var outputElement = document.querySelector(\"#devEventLayerOutputText\") as HTMLDivElement;\n      outputElement.innerHTML = \"<h4>Event layer:</h4>\" + jsonstring;\n      //console.log(JSON.stringify(window.EasyfyEventLayer, null, 2));\n    }\n  };\n\n  export function HidePrintedEventLayer(): void {\n    if (process.env.NODE_ENV === \"development\") {\n      var devEventLayerOutput = document.querySelector(\"#devEventLayerOutput\") as HTMLDivElement;\n      if (devEventLayerOutput) {\n        devEventLayerOutput.style.display = \"none\";\n      }\n    }\n  };\n\n  export function RunEventConsumer(): void {\n    if (process.env.NODE_ENV === \"development\") {\n\n      var debugDiv = document.createElement('div');\n      debugDiv.id = \"debugEventConsumer\";\n      debugDiv.style.padding = \"10px\";\n      debugDiv.style.backgroundColor = \"#101010\";\n      debugDiv.style.overflowY = \"auto\";\n      debugDiv.style.height = \"100%\";\n      debugDiv.style.width = \"100%\";\n      debugDiv.style.position = \"fixed\";\n      debugDiv.style.top = \"0\";\n      debugDiv.style.left = \"0\";\n      debugDiv.style.zIndex = \"2147483647\";\n      debugDiv.style.color = \"#c5c5c5\";\n\n      document.body.appendChild(debugDiv);\n\n      document.body.style.overflowY = \"hidden\";\n\n      _broadcastChannel.addEventListener(\"message\", (event) => {\n        DisplayEventMessage(event.data);\n      });\n    }\n  };\n\n  export function DisplayEventMessage(data: object): void {\n    if (process.env.NODE_ENV === \"development\") {\n      let outputElement = document.querySelector('#debugEventConsumer');\n      if (outputElement) {\n\n        let jsonString = JSON.stringify(data);\n        let highlightedJsonString = HighlightEventNameValue(jsonString);\n\n        outputElement.innerHTML += '<div><div class=\"time\">' + GetCurrentTime() + ':</div><pre class=\"event\">' + highlightedJsonString + '</pre></div>';\n        outputElement.scrollTop = outputElement.scrollHeight;\n      }\n    }\n  }\n\n  export function BroadcastToLogger(data: any): void {\n    if (process.env.NODE_ENV === \"development\") {\n      if (_broadcastChannel) {\n        _broadcastChannel.postMessage(data);\n      }\n    }\n  }\n  function HighlightEventNameValue(jsonString: string): string {\n    // Regular expression to find `\"eventName\":\"value\"`\n    const regex = /\"eventName\":\"([^\"]+)\"/g;\n\n    // Replace matched `\"eventName\":\"value\"` with `\"eventName\":\"<span>value</span>\"`\n    const highlightedJsonString = jsonString.replace(regex, '\"eventName\":\"<span>$1</span>\"');\n\n    return highlightedJsonString;\n  }\n\n  export function GetCurrentTime(): string {\n    const now = new Date();\n\n    const hours = (now.getHours() < 10 ? '0' : '') + now.getHours();\n    const minutes = (now.getMinutes() < 10 ? '0' : '') + now.getMinutes();\n    const seconds = (now.getSeconds() < 10 ? '0' : '') + now.getSeconds();\n    const milliseconds = (now.getMilliseconds() < 10 ? '00' : (now.getMilliseconds() < 100 ? '0' : '')) + now.getMilliseconds();\n\n    return `${hours}:${minutes}:${seconds}.${milliseconds}`;\n  }\n}\n\n","import { IEasyfyEvent, IDataMapper, IEasyfyEventExporter } from '@shared/easyfy.events/easyfy.eventdata';\n\n/* Ga4 Exporter class */\nexport class Ga4EventExporter implements IEasyfyEventExporter {\n  mapper: IDataMapper;\n  WithMapper(mapper: IDataMapper): void {\n    this.mapper = mapper;\n  }\n\n  RegisterEvent(event: IEasyfyEvent): Promise<any> {\n    return new Promise<void>(async (resolve) => {\n      if (!this.mapper) return;\n      var eventData = this.mapper.MapEventData(event);\n      await this.PushToDataLayer(eventData);\n      resolve();\n    })\n  }\n\n  async PushToDataLayer(ga4Event: any): Promise<any> {\n    return new Promise<void>(async (resolve) => {\n      if (ga4Event) {\n        window['dataLayer'] = window['dataLayer'] || [];\n        window['dataLayer'].push({ ecommerce: null });\n        if (Array.isArray(ga4Event)) {\n          window['dataLayer'].push(...ga4Event);\n        } else {\n          window['dataLayer'].push(ga4Event);\n        }\n      }\n      resolve();\n    })\n\n    //console.group('%c GA DataLayer ', 'color: #bada55');\n    //console.dir(window['dataLayer']);\n    //console.groupEnd();\n  }\n}","\nexport class FeatureNames {\n  static EventTracking: string = \"eventtracking\";\n}\n\nexport class Features {\n  static FeatureIsActive = (featureName: string): boolean => {\n    var featureIsActiveForClient = document.querySelector('html').hasAttribute(featureName);\n    return featureIsActiveForClient;\n  }\n}\n\n\n\n","import { IEasyfyEvent, IDataMapper, IEasyfyEventExporter } from '@shared/easyfy.events/easyfy.eventdata';\n\n/* Klaviyo Exporter class */\nexport class KlaviyoEventExporter implements IEasyfyEventExporter {\n  mapper: IDataMapper;\n  WithMapper(mapper: IDataMapper): void {\n    this.mapper = mapper;\n  }\n\n  RegisterEvent(event: IEasyfyEvent): Promise<any> {\n    return new Promise<void>(async (resolve) => {\n      if (this.mapper) {\n        var eventData = this.mapper.MapEventData(event);\n\n        if (eventData?.event && eventData?.data) {\n          await this.PushToKlaviyo(eventData);\n        }\n\n        if (eventData?.identify) {\n          await this.IdentifyUser(eventData.identify);\n        }\n      }\n      resolve();\n    });\n  }\n\n  async PushToKlaviyo(klaviyoEvent: any): Promise<boolean> {\n    return new Promise<boolean>(async (resolve) => {\n      if (klaviyoEvent) {\n        window['klaviyo'] = window?.['klaviyo'] || [];\n        window['klaviyo'].push([\"track\", klaviyoEvent.event, klaviyoEvent.data])\n\n        //console.group('%c Klaviyo ', 'color: #bada55');\n        //console.dir(window['klaviyo']);\n        //console.groupEnd();\n        resolve(true)\n      }\n      else {\n        resolve(false);\n      }\n    });\n  }\n  async IdentifyUser(emailToRegister: any): Promise<boolean> {\n    return new Promise<boolean>(async (resolve) => {\n      if (emailToRegister) {\n        window['klaviyo'] = window?.['klaviyo'] || [];\n        window['klaviyo'].identify({\n          'email': emailToRegister\n        });\n\n        resolve(true)\n      }\n      else {\n        resolve(false);\n      }\n    });\n  }\n}","import { element } from '@shared/easyfy.core';\nimport { StatsEventExporter } from '@shared/easyfy.events/exporters/eventExporter.stats';\nimport { Ga4EventExporter } from '@shared/easyfy.events/exporters/eventExporter.ga4';\nimport { EasyfyEventData, IDataMapper, IEasyfyEvent, IEasyfyEventExporter, IWorkerJob, ITrackableElement, ISessionStarted, IClientEventMetaData, IWorkerMessage } from '@shared/easyfy.events/easyfy.eventdata';\nimport { EasyfyEventLogger } from '@shared/easyfy.events/easyfy.event.devlogger';\nimport { FeatureNames, Features } from '@webServices/features.service';\nimport { KlaviyoEventExporter } from './exporters/eventExporter.klaviyo';\n\nexport class ServiceNames {\n  static Stats: string = \"stats\";\n  static Ga4: string = \"ga4\";\n  static Klaviyo: string = \"klaviyo\";\n}\nexport class EventNames {\n  static PageView: string = \"pageview\";\n  static ProductImpression: string = \"productimpression\";\n  static ProductClick: string = \"productclick\";\n  static ProductPageView: string = \"productpageview\";\n  static BannerImpression = \"bannerimpression\";\n  static BannerClick = \"bannerclick\";\n  static ElementImpression = \"elementimpression\";\n  static ElementClick = \"elementclick\";\n  static AddToCart: string = \"addtocart\";\n  static RemoveFromCart: string = \"removefromcart\";\n  static QuantityChanged: string = \"quantitychanged\";\n  static StartedCheckout: string = \"startedcheckout\";\n  static CompletedCheckout: string = \"completedcheckout\";\n  static SearchPerformed: string = \"searchperformed\";\n  static ContinueToPayment: string = \"continuetopayment\";\n  static SessionStarted: string = \"sessionstarted\";\n  static LoggedIn: string = \"loggedin\";\n  static LoggedOut: string = \"loggedout\";\n}\n\nexport class Message {\n  static FetchClientMetaData = \"cmd_fetch_client_meta_data\";\n  static BlockStatsApi = \"cmd_block_stats_api\";\n}\n\nexport class LocalStorageKeys {\n  static SessionTimer = \"e_sessionTimer\";\n  static SessionId = \"e_sessionId\";\n  static ClientId = \"e_clientId\";\n  static UserId = \"e_userId\";\n  static LastCheckedUserId = \"e_lastCheckedUserId\";\n  static IsTablet = \"e_tablet\";\n  static IsMobilePhone = \"e_mobilephone\";\n  static IsDekstop = \"e_desktop\";\n  static UserIdCookieKey = \"e_userIdCookieKey\";\n  static IPAddress = \"e_ipAddress\";\n  static StatsIsBlocked = \"e_statsServiceBlocked\";\n  static StatsEventsThresholdRemoved = \"e_StatsEventsTresholdRemoved\"\n  static StatsEventsTransitionObj = \"e_statsEventsTransitionObj\"\n}\n\nnamespace Easyfy.Modules {\n\n  export class EasyfyEventHandler {\n    private eventExporters: Map<string, IEasyfyEventExporter> = new Map<string, IEasyfyEventExporter>();\n    private observedElements: string[] = [];\n    private intersectionObserver: IntersectionObserver;\n    private bannerIntersectionObserver: IntersectionObserver;\n    private mutationObserver: MutationObserver;\n    public static instance: EasyfyEventHandler;\n    private featureFlag: boolean;\n    private initiated: boolean = false;\n\n    constructor(eventMappers: Map<string, IDataMapper>) {\n      EasyfyEventHandler.instance = this;\n      EasyfyEventHandler.instance.featureFlag = Features.FeatureIsActive(FeatureNames.EventTracking);\n      window.EasyfyEventLayerInstance = this;\n\n      if (!EasyfyEventHandler.instance.featureFlag) return;\n\n      EasyfyEventData.GetAllServices().forEach(service => {\n        var eventExporter: IEasyfyEventExporter;\n        switch (service.name.toLowerCase()) {\n          case ServiceNames.Stats: {\n            eventExporter = new StatsEventExporter();\n            break;\n          }\n          case ServiceNames.Klaviyo: {\n            eventExporter = new KlaviyoEventExporter();\n            break;\n          }\n          case ServiceNames.Ga4: {\n            eventExporter = new Ga4EventExporter();\n            break;\n          }\n        }\n        if (eventExporter) {\n          eventExporter.WithMapper(eventMappers.get(service.name));\n          this.eventExporters.set(service.name, eventExporter);\n        }\n      })\n\n      EasyfyEventLogger.Log({\n        type: \"updateeventlayerstatus\",\n      });\n\n      EasyfyEventHandler.CheckSessionStart().then(() => {\n        EasyfyEventHandler.RunEvents().then(() => {\n          if (EasyfyEventData.ShouldRegisterProductImpressions()) {\n            EasyfyEventHandler.InitProductIntersectionObserver();\n            EasyfyEventHandler.InitMutationObserver();\n          }\n          if (EasyfyEventData.ShouldRegisterBannerImpressions()) {\n            EasyfyEventHandler.InitBannerIntersectionObserver();\n          }\n          EasyfyEventHandler.InitElementIntersectionObserver();\n          window.addEventListener('click', EasyfyEventHandler.ClickEventChecker);\n          EasyfyEventHandler.instance.initiated = true;\n        });\n      });\n    };\n\n    static async RunEvents(): Promise<void> {\n      return new Promise<void>(async (resolve) => {\n        var inlineScript = element('[data-container=\"easyfy-preload-tracking-events\"]');\n        if (inlineScript) {\n          inlineScript.remove();\n        }\n\n        if (!EasyfyEventData.HasEvents()) {\n          resolve();\n          return;\n        }\n        for await (const event of EasyfyEventData.Events()) {\n          await EasyfyEventHandler.RunEvent(event);\n        };\n\n        EasyfyEventData.ClearEvents();\n        resolve();\n      });\n    };\n\n    static async CheckSessionStart(): Promise<void> {\n      return new Promise(async (resolve) => {\n        if (EasyfyEventData.ServiceIsActive(ServiceNames.Stats) !== true) {\n          resolve();\n          return;\n        }\n        var sessionTimer = localStorage.getItem(LocalStorageKeys.SessionTimer);\n        if (!sessionTimer) {\n          localStorage.setItem(LocalStorageKeys.SessionTimer, new Date(Date.now()).toUTCString());\n          sessionTimer = localStorage.getItem(LocalStorageKeys.SessionTimer);\n          await EasyfyEventHandler.FetchClientMetaData();\n          await EasyfyEventHandler.SendStartSessionEvent();\n          resolve();\n        }\n\n        var checkTime = new Date(sessionTimer);\n        var now = new Date(Date.now());\n\n        var diff = (checkTime.getTime() - now.getTime()) / 1000;\n        diff /= 60;\n        var minutesBetween = Math.abs(Math.round(diff));\n\n        if (minutesBetween >= 20) {\n          var oldSessionId = localStorage.getItem(LocalStorageKeys.SessionId);\n          await EasyfyEventHandler.FetchClientMetaData();\n          var newSessionId = localStorage.getItem(LocalStorageKeys.SessionId);\n          if (oldSessionId != newSessionId) {\n            await EasyfyEventHandler.SendStartSessionEvent();\n          }\n        }\n\n        localStorage.setItem(LocalStorageKeys.SessionTimer, new Date(Date.now()).toUTCString());\n\n        resolve();\n      });\n    }\n\n    static async FetchClientMetaData(): Promise<boolean> {\n      return new Promise(async (resolve) => {\n\n        EasyfyEventData.SetStatsApiBlock(false);\n\n        const response = await fetch(\"/api/stats/clientmetadata/\");\n\n        if (!response.ok) {\n          if (response.status == 428 || response.status == 404) {\n            EasyfyEventData.SetStatsApiBlock(true);\n          }\n\n          localStorage.setItem(LocalStorageKeys.SessionId, null);\n          localStorage.setItem(LocalStorageKeys.ClientId, null);\n          localStorage.setItem(LocalStorageKeys.UserId, null);\n          localStorage.setItem(LocalStorageKeys.IsDekstop, null);\n          localStorage.setItem(LocalStorageKeys.IsMobilePhone, null);\n          localStorage.setItem(LocalStorageKeys.IsTablet, null);\n          localStorage.setItem(LocalStorageKeys.UserIdCookieKey, null);\n          localStorage.setItem(LocalStorageKeys.IPAddress, null);\n\n          resolve(false);\n          return;\n        }\n\n        var clientMetaData = await response.json()\n\n        localStorage.setItem(LocalStorageKeys.SessionId, clientMetaData.sessionId);\n        localStorage.setItem(LocalStorageKeys.ClientId, clientMetaData.clientId);\n        localStorage.setItem(LocalStorageKeys.UserId, clientMetaData.userId);\n        localStorage.setItem(LocalStorageKeys.IsDekstop, clientMetaData.isDesktop);\n        localStorage.setItem(LocalStorageKeys.IsMobilePhone, clientMetaData.isMobilePhone);\n        localStorage.setItem(LocalStorageKeys.IsTablet, clientMetaData.isTablet);\n        localStorage.setItem(LocalStorageKeys.UserIdCookieKey, clientMetaData.userIdCookieKey);\n        localStorage.setItem(LocalStorageKeys.IPAddress, clientMetaData.ipAddress);\n\n\n        var data: IClientEventMetaData = {\n          ClientId: clientMetaData.clientId,\n          SessionId: clientMetaData.sessionId,\n          UserId: clientMetaData.userId,\n          IsDesktop: clientMetaData.isDesktop,\n          IsMobilePhone: clientMetaData.isMobilePhone,\n          IsTablet: clientMetaData.isTablet,\n          IPAddress: clientMetaData.ipAddress\n        }\n        resolve(true);\n      });\n    }\n\n    static BlockStatsApi(): void {\n      EasyfyEventData.SetStatsApiBlock(true);\n    }\n\n    static HandleWorkerMessage(message) {\n      var typedMessage = message.data as IWorkerMessage\n      switch (typedMessage.Message) {\n        case Message.FetchClientMetaData: {\n          EasyfyEventHandler.FetchClientMetaData()\n          break;\n        }\n        case Message.BlockStatsApi: {\n          EasyfyEventHandler.BlockStatsApi()\n          break;\n        }\n      }\n    }\n\n    static SendStartSessionEvent(): Promise<void> {\n      return new Promise<void>(async (resolve) => {\n        var clientMetaData: IClientEventMetaData = EasyfyEventData.GetClientEventMetaData();\n        var clientData: ISessionStarted = {\n          Culture: \"not-set-yet\", //todo -> ? \n          Currency: EasyfyEventData.SiteInfo().currencyCode,\n          IsDesktop: clientMetaData.IsDesktop,\n          IsMobilePhone: clientMetaData.IsMobilePhone,\n          IsTablet: clientMetaData.IsTablet,\n          RecurringUser: EasyfyEventData.IsRecurringUser(true),\n          Referrer: document.referrer,\n          Path: window.location.pathname,\n          UserAgent: window.navigator.userAgent,\n          ClientId: clientMetaData.ClientId,\n          SessionId: clientMetaData.SessionId,\n          UserId: clientMetaData.UserId,\n          VisitorId: clientMetaData.UserId\n        };\n\n        var sessionStartedEvent: IEasyfyEvent = {\n          eventName: EventNames.SessionStarted,\n          data: clientData\n        };\n\n        await EasyfyEventHandler.RunEvent(sessionStartedEvent);\n        resolve();\n      });\n    }\n\n    static InitMutationObserver(): void {\n      let options = {\n        childList: true,\n        subtree: true,\n        attributes: false,\n        characterData: false\n      };\n\n      let targets = document.querySelectorAll('[data-track-list], [data-container=\"search-result\"]');\n      EasyfyEventHandler.instance.mutationObserver = new MutationObserver(this.ElementMutated);\n      targets.forEach(target => EasyfyEventHandler.instance.mutationObserver.observe(target, options));\n    }\n\n    static ElementMutated(mutations: MutationRecord[]) {\n      mutations.forEach(mutation => {\n        EasyfyEventHandler.RebindObserveProducts();\n      });\n    }\n\n    static BannerElementMutated(mutations: MutationRecord[]) {\n      mutations.forEach(mutation => {\n        EasyfyEventHandler.RebindObserveBanners();\n      });\n    }\n\n    static InitProductIntersectionObserver(): void {\n      let options = {\n        root: null,\n        rootMargin: '0px',\n        threshold: 0.1\n      };\n      EasyfyEventHandler.instance.intersectionObserver = new IntersectionObserver(this.ProductCardObserved, options);\n      let targets = document.querySelectorAll('[data-track-product]');\n      targets.forEach(target => EasyfyEventHandler.instance.intersectionObserver.observe(target));\n    }\n\n    static InitBannerIntersectionObserver(): void {\n      let options = {\n        root: null,\n        rootMargin: '0px',\n        threshold: 0.1\n      };\n      EasyfyEventHandler.instance.bannerIntersectionObserver = new IntersectionObserver(this.BannerElementObserved, options);\n      let bannerTargets = document.querySelectorAll('[data-track-banner]');\n      bannerTargets.forEach(target => EasyfyEventHandler.instance.bannerIntersectionObserver.observe(target));\n    }\n\n    static InitElementIntersectionObserver(): void {\n      let options = {\n        root: null,\n        rootMargin: '0px',\n        threshold: 0.1\n      };\n      EasyfyEventHandler.instance.bannerIntersectionObserver = new IntersectionObserver(this.TrackableElementObserved, options);\n      let bannerTargets = document.querySelectorAll('[data-track-element]');\n      bannerTargets.forEach(target => EasyfyEventHandler.instance.bannerIntersectionObserver.observe(target));\n    }\n\n    static RebindObserveProducts() {\n      EasyfyEventHandler.instance.intersectionObserver.disconnect();\n      let targets = document.querySelectorAll('[data-track-product]');\n      targets.forEach(target => EasyfyEventHandler.instance.intersectionObserver.observe(target));\n    }\n\n    static RebindObserveBanners() {\n      EasyfyEventHandler.instance.bannerIntersectionObserver.disconnect();\n      let targets = document.querySelectorAll('[data-track-banner]');\n      targets.forEach(target => EasyfyEventHandler.instance.bannerIntersectionObserver.observe(target));\n    }\n\n    static ProductCardObserved(entries: IntersectionObserverEntry[], observer: any) {\n      var eventProductIds: string[] = [];\n      var eventProductSalesUnitCodes: string[] = [];\n      var listIds: string[] = [];\n      var promotedProducts: boolean[] = [];\n\n      entries.forEach(entry => {\n        if (entry.isIntersecting) {\n          EasyfyEventHandler.instance.intersectionObserver.unobserve(entry.target);\n          var elementIsRegisteredForImpression = entry.target.getAttribute(\"data-track-impression\").toLowerCase() === 'true';\n          if (!elementIsRegisteredForImpression) return;\n\n          // points to a product but could appear multiple times on a page\n          var productIdentifier = entry.target.getAttribute(\"data-product-event-id\");\n          // id of product card element, always unique\n          var elementIdentifier = entry.target.getAttribute(\"data-element-event-id\");\n          var defaultSalesUnitCode = entry.target.getAttribute(\"data-default-sales-unit-code\");\n          var isPromotedProduct = entry.target.getAttribute(\"data-event-property-is-promotion\")?.toLowerCase() === 'true';\n\n          if (productIdentifier && elementIdentifier) {\n            if (!EasyfyEventHandler.instance.observedElements.includes(elementIdentifier)) {\n              EasyfyEventHandler.instance.observedElements.push(elementIdentifier);\n              EasyfyEventLogger.Log({\n                type: \"productimpression\",\n                message: (`Product '${productIdentifier}' with SalesCodeUnit '${defaultSalesUnitCode}' seen`),\n                target: entry.target\n              });\n              eventProductIds.push(productIdentifier);\n              eventProductSalesUnitCodes.push(defaultSalesUnitCode);\n              promotedProducts.push(isPromotedProduct);\n              var node = entry.target;\n              while (true) {\n                node = node.parentElement;\n                if (node.hasAttribute(\"data-track-list\")) {\n                  let listId = node.getAttribute(\"data-list-name\");\n                  if (listId) {\n                    listIds.push(listId);\n                    break;\n                  }\n                }\n                else if (node.nodeName == 'BODY') {\n                  listIds.push(null);\n                  break;\n                }\n              }\n            }\n          }\n          else {\n            EasyfyEventLogger.Log({\n              type: \"error\",\n              message: \"Product impression failed: missing event product ID\"\n            });\n          }\n        }\n      });\n\n      if (eventProductIds.length > 0) {\n        let event: IEasyfyEvent = {\n          eventName: EventNames.ProductImpression,\n          data: {\n            productIdentifiers: eventProductIds,\n            salesUnitCodes: eventProductSalesUnitCodes,\n            listIds: listIds,\n            promotedProducts\n          }\n        }\n        EasyfyEventHandler.RunEvent(event);\n      }\n    }\n\n    static BannerElementObserved(entries: IntersectionObserverEntry[], observer: any) {\n      var bannerIds: string[] = [];\n      entries.forEach(entry => {\n        if (entry.isIntersecting) {\n          EasyfyEventHandler.instance.bannerIntersectionObserver.unobserve(entry.target);\n          var elementIsRegisteredForImpression = entry.target.getAttribute(\"data-track-impression\").toLowerCase() === 'true';\n          if (!elementIsRegisteredForImpression) return;\n          var bannerIdentifier = entry.target.getAttribute(\"data-banner-event-id\");\n          if (bannerIdentifier) {\n            if (!EasyfyEventHandler.instance.observedElements.includes(bannerIdentifier)) {\n              EasyfyEventHandler.instance.observedElements.push(bannerIdentifier);\n              EasyfyEventLogger.Log({\n                type: \"bannerimpression\",\n                message: (\"Banner '\" + bannerIdentifier + \"' seen\")\n              });\n              bannerIds.push(bannerIdentifier);\n            }\n          }\n          else {\n            EasyfyEventLogger.Log({\n              type: \"error\",\n              message: \"Banner impression failed: missing event banner ID\"\n            });\n          }\n        }\n      });\n\n      if (bannerIds.length > 0) {\n        bannerIds.forEach(id => {\n          let event: IEasyfyEvent = {\n            eventName: EventNames.BannerImpression,\n            data: { bannerIdentifier: id }\n          }\n          EasyfyEventHandler.RunEvent(event);\n        });\n      }\n    }\n\n    static TrackableElementObserved(entries: IntersectionObserverEntry[], observer: any) {\n      var elements: ITrackableElement[] = [];\n      entries.forEach(entry => {\n        if (entry.isIntersecting) {\n          var elementIsRegisteredForImpression = entry.target.getAttribute(\"data-track-impression\")?.toLowerCase() === 'true';\n          if (!elementIsRegisteredForImpression) return;\n\n          var elementIdentifier = entry.target.getAttribute(\"data-event-id\");\n          if (elementIdentifier) {\n            var multiObserve = entry.target.getAttribute(\"data-multi-observe\").toLowerCase() === 'true';\n            if (multiObserve == false) {\n              EasyfyEventHandler.instance.bannerIntersectionObserver.unobserve(entry.target);\n              if (!EasyfyEventHandler.instance.observedElements.includes(elementIdentifier)) {\n                EasyfyEventHandler.instance.observedElements.push(elementIdentifier);\n              }\n            }\n\n            var trackType = entry.target.getAttribute(\"data-track-type\");\n            var properties = new Map<string, any>();\n\n            for (const attribute of entry.target.getAttributeNames()) {\n              if (attribute.startsWith(\"data-event-property-\")) {\n                const value = entry.target.getAttribute(attribute);\n                var key = attribute.replace(\"data-event-property-\", \"\");\n                properties.set(key, value);\n              }\n            }\n\n            elements.push({\n              Id: elementIdentifier,\n              Type: trackType,\n              Properties: properties\n            });\n\n            EasyfyEventLogger.Log({\n              type: \"elementimpression\",\n              message: (\"Element '\" + elementIdentifier + \"' seen\")\n            });\n\n          }\n          else {\n            EasyfyEventLogger.Log({\n              type: \"error\",\n              message: \"Element impression failed: missing event ID on element\"\n            });\n          }\n        }\n      });\n\n      if (elements.length > 0) {\n        elements.forEach(element => {\n          let event: IEasyfyEvent = {\n            eventName: EventNames.ElementImpression,\n            data: element\n          }\n          EasyfyEventHandler.RunEvent(event);\n        });\n      }\n    }\n\n    static ClickEventChecker(event: any) {\n      if (event.target.closest('A') != null) {\n        var node = event.target.closest('A');\n        var targetUrl = node.href;\n        if (node.closest('[data-track-product]') != null) {\n          EasyfyEventHandler.ClickEventProduct(event, node, targetUrl);\n          return;\n        }\n        else if (node.closest('[data-track-banner]') != null) {\n          EasyfyEventHandler.ClickEventBanner(event, node, targetUrl);\n          return;\n        }\n        else if (node.closest('[data-track-element]') != null) {\n          EasyfyEventHandler.ClickEventElement(event, node, targetUrl);\n          return;\n        }\n      }\n      else {\n        var node = event.target;\n        if (node.closest('[data-track-element]') != null) {\n          EasyfyEventHandler.ClickEventElement(event, node);\n          return;\n        }\n      }\n    }\n\n    static ClickEventProduct(event: any, node: any, targetUrl: any) {\n      node = node.closest('[data-track-product]');\n      var elementIsRegisteredForClick = node.getAttribute(\"data-track-click\").toLowerCase() === 'true';\n      if (elementIsRegisteredForClick) {\n        event.stopPropagation();\n        event.preventDefault();\n\n        var defaultSalesUnitCode = node.getAttribute(\"data-default-sales-unit-code\");\n        var productId = node.getAttribute('data-product-event-id');\n        var isPromotedProduct = node.getAttribute(\"data-event-property-is-promotion\")?.toLowerCase() === 'true';\n\n        if (productId) {\n          var listName\n          while (true) {\n            node = node.parentElement;\n            if (!node) {\n              break;\n            }\n            if (node.hasAttribute(\"data-track-list\")) {\n              listName = node.getAttribute(\"data-list-name\");\n              break;\n            }\n            else if (node.nodeName == 'body') {\n              listName = null;\n              break;\n            }\n          }\n\n          let event: IEasyfyEvent = {\n            eventName: EventNames.ProductClick,\n            data: {\n              productIdentifier: productId,\n              salesUnitCode: defaultSalesUnitCode,\n              listName: listName,\n              isPromotedProduct: isPromotedProduct\n            }\n          }\n          EasyfyEventHandler.RunEvent(event);\n          window.location = targetUrl;\n        }\n        else {\n          //Don't block links\n          window.location = targetUrl;\n        }\n      }\n    }\n\n    static ClickEventBanner(event: any, node: any, targetUrl: any) {\n      node = node.closest('[data-track-banner]');\n      var elementIsRegisteredForClick = node.getAttribute(\"data-track-click\").toLowerCase() === 'true';\n      if (elementIsRegisteredForClick) {\n        event.stopPropagation();\n        event.preventDefault();\n\n        var bannerId = node.getAttribute('data-banner-event-id');\n        if (bannerId) {\n          let event: IEasyfyEvent = {\n            eventName: EventNames.BannerClick,\n            data: {\n              bannerIdentifier: bannerId,\n            }\n          }\n          EasyfyEventHandler.RunEvent(event);\n          window.location = targetUrl;\n        }\n        else {\n          //Don't block links\n          window.location = targetUrl;\n        }\n      }\n    }\n\n    static ClickEventElement(event: any, node: any, targetUrl?: any) {\n      node = node.closest('[data-track-element]');\n      var elementIsRegisteredForClick = node.getAttribute(\"data-track-click\")?.toLowerCase() === 'true' ?? false;\n      if (elementIsRegisteredForClick) {\n\n        if (targetUrl) {\n          event.stopPropagation();\n          event.preventDefault();\n        }\n\n        var elementId = node.getAttribute('data-event-id');\n\n        if (elementId) {\n          var trackType = node.getAttribute('data-track-type');\n          var properties = new Map<string, any>();\n\n          for (const attribute of node.getAttributeNames()) {\n            if (attribute.startsWith(\"data-event-property-\")) {\n              const value = node.getAttribute(attribute);\n              var key = attribute.replace(\"data-event-property-\", \"\");\n              properties.set(key, value);\n            }\n          }\n\n          var data: ITrackableElement = {\n            Id: elementId,\n            Type: trackType,\n            Properties: properties\n          }\n\n          let event: IEasyfyEvent = {\n            eventName: EventNames.ElementClick,\n            data\n          }\n\n          EasyfyEventHandler.RunEvent(event);\n\n          const singleClick = node.dataset['singleClick'];\n          if (singleClick) node.removeAttribute('data-track-element');\n\n          if (targetUrl) {\n            window.location = targetUrl;\n          }\n        }\n        else if (targetUrl) {\n          //Don't block links\n          window.location = targetUrl;\n        }\n      }\n    }\n\n    static GetCurrentInstance(): EasyfyEventHandler {\n      var instance: EasyfyEventHandler;\n      if (EasyfyEventHandler.instance) {\n        instance = EasyfyEventHandler.instance\n      }\n      else if (window.EasyfyEventLayerInstance) {\n        instance = window.EasyfyEventLayerInstance as EasyfyEventHandler;\n      }\n\n      return instance;\n    }\n\n    static RunEvent(event: IEasyfyEvent): Promise<void> {\n      return new Promise<void>(async (resolve) => {\n        var dispatchedToServices = [];\n        var errors = new Map<string, string>();\n        for await (const service of EasyfyEventData.GetAllServices()) {\n          if (EasyfyEventData.ConsumesEvent(service.name, event.eventName)) {\n            try {\n              var instance = EasyfyEventHandler.GetCurrentInstance();\n\n              await instance.eventExporters.get(service.name)?.RegisterEvent(event);\n              dispatchedToServices.push(service.name);\n\n            }\n            catch (error) {\n              errors.set(service.name, event.eventName);\n              console.warn(error);\n            }\n          }\n        };\n\n        EasyfyEventLogger.BroadcastToLogger(event);\n\n        if (dispatchedToServices.length > 0) {\n          EasyfyEventLogger.Log({ type: \"event\", message: `Event '${event.eventName}' dispatched to: ${dispatchedToServices.join(', ')}` });\n        } else {\n          EasyfyEventLogger.Log({ type: \"event\", message: `Event '${event.eventName}' fired but not dispatched to any services` });\n        }\n        errors.forEach((value, key) => {\n          EasyfyEventLogger.Log({ type: \"error\", message: `Error when trying to dispatch event '${value}' to: ${key}` });\n        });\n\n        resolve();\n      });\n    }\n\n    static async RegisterResponseData(responseData: any): Promise<void> {\n      return new Promise(async (resolve) => {\n        var instance = EasyfyEventHandler.GetCurrentInstance();\n        if (instance?.initiated) {\n          await EasyfyEventHandler.CheckSessionStart();\n          if (responseData?.data?.eventLayer) {\n            EasyfyEventLogger.Log({\n              message: \"Event layer data added from response\",\n            });\n\n            EasyfyEventData.AddDataToEventLayer(responseData.data.eventLayer);\n\n            EasyfyEventLogger.Log({\n              type: \"updateeventlayerstatus\",\n            });\n            await EasyfyEventHandler.RunEvents();\n          }\n        }\n        resolve();\n      });\n    }\n\n    static GetCookie(cookieName) {\n      let cookie = {};\n      document.cookie.split(';').forEach(function (el) {\n        let [key, value] = el.split('=');\n        cookie[key.trim()] = value;\n      })\n      return cookie[cookieName];\n    }\n\n  }\n}\n\nexport default Easyfy.Modules;\n","import axios, { AxiosRequestConfig } from 'axios';\nimport EasyfyDataLayer from '@shared/easyfy.datalayer';\nimport Event from './easyfy.events/easyfy.eventhandler';\n\nnamespace Easyfy.Shared.Scripts {\n  export interface IExtraHeaders {\n    key: string;\n    value: string;\n  }\n\n  export const get = async (url: string, config?: AxiosRequestConfig): Promise<any> => {\n    axios.defaults.headers.common[\"IsAxiosRequest\"] = true;\n    axios.defaults.headers.common[\"OriginalUrl\"] = window.location.href;\n\n    url = generateFullPathWithPrefix(url);\n\n    var response = await axios.get(url, config);\n    Event.EasyfyEventHandler.RegisterResponseData(response);\n    return await EasyfyDataLayer.HandleDataEvents(response);\n  };\n\n  export const post = async (url: string, data: any, token?: string, config?: AxiosRequestConfig) => {\n    if (token) {\n      axios.defaults.headers.common[\"RequestVerificationToken\"] = token;\n    }\n    axios.defaults.headers.common[\"IsAxiosRequest\"] = true;\n    axios.defaults.headers.common[\"OriginalUrl\"] = window.location.href;\n\n    url = generateFullPathWithPrefix(url);\n\n    var response = await axios.post(url, data, config);\n    Event.EasyfyEventHandler.RegisterResponseData(response);\n    return await EasyfyDataLayer.HandleDataEvents(response);\n  };\n\n  export const patch = async (url: string, data: any, token?: string, config?: AxiosRequestConfig) => {\n    if (token) {\n      axios.defaults.headers.common[\"RequestVerificationToken\"] = token;\n    }\n    axios.defaults.headers.common[\"IsAxiosRequest\"] = true;\n    axios.defaults.headers.common[\"OriginalUrl\"] = window.location.href;\n\n    url = generateFullPathWithPrefix(url);\n\n    var response = await axios.patch(url, data, config);\n    Event.EasyfyEventHandler.RegisterResponseData(response);\n    return await EasyfyDataLayer.HandleDataEvents(response)\n  };\n\n  export const axiosDelete = async (url: string, token?: string, config?: AxiosRequestConfig) => {\n    if (token) {\n      axios.defaults.headers.common[\"RequestVerificationToken\"] = token;\n    }\n    axios.defaults.headers.common[\"IsAxiosRequest\"] = true;\n    axios.defaults.headers.common[\"OriginalUrl\"] = window.location.href;\n\n    url = generateFullPathWithPrefix(url);\n\n    var response = await axios.delete(url, config);\n    Event.EasyfyEventHandler.RegisterResponseData(response);\n    return await EasyfyDataLayer.HandleDataEvents(response)\n  };\n\n  function generateFullPathWithPrefix(url: string): string {\n    var prefixPath = document.documentElement?.getAttribute(\"data-prefix-path\");\n    if (url && !url.startsWith(\"/\"))\n      url = \"/\" + url;\n    if (prefixPath) {\n      prefixPath = prefixPath.endsWith(\"/\") ? prefixPath.slice(0, -1) : prefixPath;\n      if (prefixPath.length > 1 && !prefixPath.startsWith(\"/\"))\n        prefixPath = \"/\" + prefixPath;\n      if (url)\n        return prefixPath + url;\n      else\n        return prefixPath;\n    }\n    else\n      return url;\n  }\n}\n\nexport default Easyfy.Shared.Scripts;","import { IFilterQueryParams } from '@clientShared/filter.types';\nimport easyfyAxios from '@shared/easyfy.axios';\n\nnamespace Services.Filter {\n  export const GetProducts = async (\n    pageId: string,\n    data: IFilterQueryParams,\n    filterFor: string,\n    productListName: string,\n    productListId: string,\n    pathName: string\n  ): Promise<any> => {\n    productListName = encodeURIComponent(productListName);\n    return await easyfyAxios.post(\n      `/category?handler=ProductList&pageId=${pageId}&filterFor=${filterFor}&productListName=${productListName}&productListId=${productListId}&pathName=${pathName}`,\n      data\n    );\n  };\n\n  export const GetSubscriptionProducts = async (pageId: string, data: IFilterQueryParams, productListName: string, productListId: string): Promise<any> => {\n    productListName = encodeURIComponent(productListName);\n    return await easyfyAxios.post(`/subscription?handler=ProductList&pageId=${pageId}&productListName=${productListName}&productListId=${productListId}`, data);\n  };\n\n  export const GetArticles = async (pageId: string, data: IFilterQueryParams): Promise<any> => {\n    return await easyfyAxios.post(`/articlelist?handler=ArticleList&pageId=${pageId}`, data);\n  };\n\n  export const GetMoreOrders = async (page: number): Promise<any> => {\n    return await easyfyAxios.get(`/mypages/orderlist?handler=MoreOrders&page=${page}`);\n  };\n}\n\nexport default Services.Filter;\n","import { element } from '@shared/easyfy.core';\nimport { hide, show } from '@shared/easyfy.utils';\n\nexport class FilterSEOHelper {\n  static hideFirstPageComponents(page: number, itemsQuerySelector: string) {\n    const itemsContainer = element(itemsQuerySelector);\n    const listParentContainer = itemsContainer?.closest('main[role=main]');\n    const firstPageComponents = listParentContainer.querySelectorAll('.first-page-list-elements');\n\n    if (page != 1 && firstPageComponents != null && firstPageComponents.length > 0) {\n      firstPageComponents.forEach((x) => {\n        hide(x);\n      });\n    } else if (page == 1) {\n      firstPageComponents.forEach((x) => {\n        show(x);\n      });\n    }\n  }\n\n  static updateHeadPagination = (currentPage: number, totalPages: number) => {\n    let relPrev = element(\"link[rel='prev']\") as HTMLElement;\n    let relNext = element(\"link[rel='next']\") as HTMLElement;\n\n    if (currentPage == 1) {\n      relPrev?.remove();\n    } else if (!relPrev) {\n      relPrev = document.createElement('link');\n      relPrev.setAttribute('rel', 'prev');\n      element('head').appendChild(relPrev);\n    }\n\n    if (currentPage == totalPages) {\n      relNext?.remove();\n    } else if (!relNext) {\n      relNext = document.createElement('link');\n      relNext.setAttribute('rel', 'next');\n      element('head').appendChild(relNext);\n    }\n\n    let currBaseLink: string = relNext?.attributes['href']?.value ?? relPrev?.attributes['href']?.value;\n    currBaseLink = currBaseLink?.split('?')[0];\n\n    if (currentPage == 2) {\n      relPrev.setAttribute('href', currBaseLink);\n    } else {\n      relPrev?.setAttribute('href', currBaseLink + '?p=' + (currentPage - 1));\n    }\n\n    relNext?.setAttribute('href', currBaseLink + '?p=' + (+currentPage + 1));\n  };\n\n  static updateMetaTitle(page: number, resource: string) {\n    const metaTitle = document.querySelector('head > title');\n    if (!metaTitle) return;\n\n    let currentMetaTitle = metaTitle.innerHTML;\n    const separatorIdx = currentMetaTitle.indexOf('-') + 2;\n\n    if (page > 1) {\n      currentMetaTitle = currentMetaTitle.includes(resource) ? currentMetaTitle.slice(separatorIdx) : currentMetaTitle;\n      metaTitle.innerHTML = `${resource} ${page} - ${currentMetaTitle}`;\n    } else if (currentMetaTitle.includes(resource)) {\n      metaTitle.innerHTML = currentMetaTitle.slice(separatorIdx);\n    }\n  }\n\n  static updateMetaCanonical(page: number) {\n    const metaCanonical = document.querySelector(\"link[rel='canonical']\");\n    if (!metaCanonical) return;\n    let hrefValue = metaCanonical.getAttribute('href');\n    if (!hrefValue) return;\n\n    if (page > 1) {\n      if (hrefValue.includes('?p=')) {\n        const arrayHref = hrefValue.split('?p=');\n        hrefValue = arrayHref[0] + '?p=' + page;\n      } else {\n        hrefValue = hrefValue + '?p=' + page;\n      }\n    } else {\n      if (hrefValue.includes('?p=')) {\n        const arrayHref = hrefValue.split('?p=');\n        hrefValue = arrayHref[0];\n      }\n    }\n    metaCanonical.setAttribute('href', hrefValue);\n  }\n\n  static updateMetaAlternate() {\n    const metaCanonical = document.querySelector(\"link[rel='canonical']\");\n    if (!metaCanonical) return;\n    const canonicalHref = metaCanonical.getAttribute('href');\n    if (!canonicalHref) return;\n    const culture = document.documentElement.getAttribute('data-culture');\n    if (!culture) return;\n\n    document.querySelectorAll(\"link[rel='alternate']\").forEach((link) => link.remove());\n\n    const newAlternate = document.createElement('link');\n    newAlternate.setAttribute('rel', 'alternate');\n    newAlternate.setAttribute('hreflang', culture);\n    newAlternate.setAttribute('href', canonicalHref);\n\n    metaCanonical.insertAdjacentElement('afterend', newAlternate);\n  }\n}\n","export interface IFilterQueryParams {\n  checkedFilters: IFilter[];\n  sorter?: IQuerySorter;\n  page: number;\n  applyFilterGroupCount?: IFacetGroupCount;\n  searchString: string;\n}\n\nexport interface IUpdatePageParams {\n  responseData: any;\n  replaceProducts: boolean;\n  filterQuerySelector: string;\n  pagingQuerySelector: string;\n  itemsQuerySelector: string;\n  sortersQuerySelector: string;\n  selectedFiltersQuerySelector: string;\n}\n\nexport interface IFacetGroupCount {\n  key: string;\n  valueCountData: IFacetValueCount[];\n}\n\nexport interface IFacetValueCount {\n  value: string;\n  count: number;\n}\n\nexport interface IFilter {\n  key: string;\n  operator: FilterOperator;\n  values: string[];\n}\n\nexport interface IQuerySorter {\n  key: string;\n  sortDirection: number;\n}\n\nexport interface ISorter {\n  key: string;\n  sortDirection: string;\n}\n\nexport interface IFilterElementState {\n  elementId: string;\n  stateType: FilterStateType;\n  value: any;\n}\n\nexport enum FilterStateType {\n  Scroll,\n  Open,\n}\n\nexport enum FilterOperator {\n  Equal,\n  NotEqual,\n  GreaterThan,\n  LessThan,\n}\n\nexport enum FilterFor {\n  Category,\n  Brand,\n  Search,\n  Articles,\n  Orders,\n  Subscription,\n}\n","import { FilterOperator, IFacetGroupCount, IFilter, IFilterQueryParams, ISorter } from '@clientShared/filter.types';\nimport { element } from '@shared/easyfy.core';\n\nexport class FilterQueryParamsHelper {\n  static getQueryParams(\n    page: number,\n    sorter: ISorter,\n    useHashedUrlFragments: boolean,\n    isPageLoad: boolean,\n    filterQuerySelector: string,\n    facetGroupCount: IFacetGroupCount = null\n  ): IFilterQueryParams {\n    let queryParams: IFilterQueryParams = null;\n    const urlParams = new URLSearchParams(window.location.search);\n    const searchQuery = urlParams.get('q');\n\n    if (useHashedUrlFragments && isPageLoad) {\n      queryParams = {\n        checkedFilters: this.getFilterDataFromHashFragments(filterQuerySelector),\n        page: page,\n        sorter: {\n          key: this.getSortKeyFromHashFragments(),\n          sortDirection: this.getSortDirectionFromHashFragment(),\n        },\n        searchString: searchQuery,\n      };\n    } else {\n      queryParams = {\n        checkedFilters: this.getFilterData(filterQuerySelector),\n        page: page,\n        sorter: {\n          key: sorter?.key ?? null,\n          sortDirection: Number.parseInt(SortDirection[sorter?.sortDirection]),\n        },\n        searchString: searchQuery,\n      };\n    }\n\n    if (queryParams?.checkedFilters) {\n      queryParams.checkedFilters.forEach((filter) => {\n        filter.key = decodeURIComponent(filter.key);\n\n        for (let i = 0; i < filter.values.length; i++) {\n          filter.values[i] = decodeURIComponent(filter.values[i].replace(/\\+/g, ' '));\n        }\n      });\n    }\n\n    if (facetGroupCount) {\n      queryParams.applyFilterGroupCount = facetGroupCount;\n    }\n\n    if (queryParams.sorter.key == null || queryParams.sorter.sortDirection == null) {\n      queryParams.sorter = null;\n    }\n    return queryParams;\n  }\n\n  static setQueryParams = (queryParams: IFilterQueryParams) => {\n    const filterUrlQuery = new URLSearchParams();\n    const pagingUrlQuery = new URLSearchParams(window.location.search);\n\n    queryParams.page > 1 ? pagingUrlQuery.set('p', queryParams.page.toString()) : pagingUrlQuery.delete('p');\n\n    if (queryParams?.checkedFilters?.length > 0) {\n      const filterQuery = queryParams.checkedFilters.map((filter) => `${filter.key}:${filter.values.join('|')};`).join('');\n      filterUrlQuery.set('f', filterQuery);\n    } else {\n      filterUrlQuery.delete('f');\n    }\n\n    if (queryParams.sorter != null) {\n      filterUrlQuery.set('s', queryParams.sorter.key);\n      filterUrlQuery.set('d', queryParams.sorter.sortDirection.toString());\n    } else {\n      filterUrlQuery.delete('s');\n      filterUrlQuery.delete('d');\n    }\n\n    const url = `${window.location.origin}${window.location.pathname}`;\n    const pagingQueryString = pagingUrlQuery.toString();\n    const filterQueryString = filterUrlQuery.toString();\n\n    history.replaceState(\n      null,\n      null,\n      pagingQueryString.length > 0 || filterQueryString.length > 0\n        ? decodeURIComponent(\n            `${url}${pagingQueryString.length > 0 ? `?${pagingQueryString}` : ''}${filterQueryString.length > 0 ? `#${filterQueryString}` : ''}`\n          )\n        : url\n    );\n  };\n\n  //#region Private Methods\n  private static getSortKeyFromHashFragments = () => {\n    if (!window.location.hash) return null;\n\n    const sortKey = this.getFragmentFromHash(window.location.hash.substring(1), 's');\n    return sortKey == null || sortKey == '' ? null : sortKey;\n  };\n\n  private static getSortDirectionFromHashFragment = () => {\n    if (!window.location.hash) return null;\n\n    const sortDir = Number.parseInt(this.getFragmentFromHash(window.location.hash.substring(1), 'd'));\n    return isNaN(sortDir) ? 1 : sortDir;\n  };\n\n  private static getFilterDataFromHashFragments = (filterQuerySelector: string): IFilter[] => {\n    const filterContainer = element(filterQuerySelector);\n    if (!filterContainer) return;\n\n    const filters: IFilter[] = [];\n\n    if (!window.location.hash) {\n      return filters;\n    }\n\n    const hashFragment = window.location.hash.substring(1);\n\n    const filterFragment = this.getFragmentFromHash(hashFragment, 'f');\n\n    let parts = filterFragment.split(';');\n\n    parts = parts.filter((v) => v != '');\n\n    for (const part of parts) {\n      const key = part.split(':')[0];\n      const values = part.split(':')[1].split('|');\n\n      const filter: IFilter = {\n        key: key,\n        operator: FilterOperator.Equal,\n        values: values,\n      };\n\n      filters.push(filter);\n    }\n\n    return filters;\n  };\n\n  private static getFragmentFromHash = (hashFragment: string, part: string) => {\n    const fragments = hashFragment.split(/(?=&[^&]+=)/);\n\n    let filterFragment = '';\n    for (let frag of fragments) {\n      if (frag.charAt(0) === '&') {\n        frag = frag.slice(1);\n      }\n\n      if (frag.includes(part + '=')) {\n        filterFragment = frag;\n      }\n    }\n\n    return filterFragment.substring(2);\n  };\n\n  private static getFilterData = (filterQuerySelector): IFilter[] => {\n    const filterContainer = element(filterQuerySelector);\n    if (!filterContainer) return;\n\n    const filters: IFilter[] = [];\n    filterContainer.querySelectorAll('[data-container=\"filter-group\"]').forEach((filterGroupElement: HTMLElement) => {\n      const key = filterGroupElement.attributes['data-key']?.value;\n\n      const filter: IFilter = {\n        key: key,\n        operator: FilterOperator.Equal,\n        values: [],\n      };\n\n      (filterGroupElement.querySelectorAll('[data-action=\"change-filter\"]:checked') as NodeListOf<HTMLInputElement>)?.forEach(\n        (filterInputElement: HTMLInputElement) => {\n          filter.values.push(filterInputElement.value);\n        }\n      );\n\n      if (filter.values.length > 0) {\n        filters.push(filter);\n      }\n    });\n\n    return filters;\n  };\n  //#endregion\n}\n\nenum SortDirection {\n  'Ascending' = 0,\n  'Descending' = 1,\n}\n","import { element, elements } from '@shared/easyfy.core';\nimport { IFilterElementState, FilterStateType } from '@clientShared/filter.types';\n\nexport class FilterStateHelper {\n  private elementsStates: IFilterElementState[];\n\n  constructor() {\n    this.elementsStates = [];\n  }\n\n  saveFilterState = () => {\n    const saveElementsState = elements('[data-save-state]');\n    if (saveElementsState && saveElementsState.length > 0) {\n      this.elementsStates = [];\n      const tempStates: IFilterElementState[] = [];\n      saveElementsState.forEach((element: HTMLElement) => {\n        const elementState = this.resolveStateAndValue(element);\n        if (elementState) {\n          tempStates.push(elementState);\n        }\n      });\n\n      //arrange states so opens occur before scrolls.\n      tempStates.forEach((state) => {\n        if (state.stateType != FilterStateType.Scroll) this.elementsStates.push(state);\n      });\n      tempStates.forEach((state) => {\n        if (state.stateType == FilterStateType.Scroll) this.elementsStates.push(state);\n      });\n    }\n  };\n\n  setFilterState = () => {\n    if (!this.elementsStates) return;\n    this.elementsStates.forEach((elementState) => {\n      const domelement = element('#' + elementState.elementId) as HTMLElement;\n      if (!domelement) return;\n      switch (elementState.stateType) {\n        case FilterStateType.Open: {\n          if (domelement.nodeName.toLocaleLowerCase() == 'details' && elementState.value) domelement.setAttribute('open', 'true');\n          break;\n        }\n        case FilterStateType.Scroll: {\n          elementState.stateType = FilterStateType.Scroll;\n          domelement.scrollTop = elementState.value;\n          break;\n        }\n      }\n    });\n  };\n\n  //#region Private Methods\n  private resolveStateAndValue = (element: HTMLElement): IFilterElementState => {\n    const elementState = {} as IFilterElementState;\n    if (!element.id) return null;\n\n    elementState.elementId = element.id;\n    const stateType: FilterStateType = FilterStateType[element.getAttribute('data-save-state')];\n    const elementType = element.nodeName.toLowerCase();\n\n    switch (stateType) {\n      case FilterStateType.Open: {\n        elementState.stateType = FilterStateType.Open;\n        if (elementType == 'details') {\n          elementState.value = element.hasAttribute('open');\n        }\n        break;\n      }\n      case FilterStateType.Scroll: {\n        elementState.stateType = FilterStateType.Scroll;\n        elementState.value = element.scrollTop;\n        break;\n      }\n    }\n    return elementState;\n  };\n  //#endregion\n}\n","import { element, elements } from '@shared/easyfy.core';\nimport { IFacetGroupCount, IFacetValueCount, ISorter, IUpdatePageParams } from '@clientShared/filter.types';\nimport { hide, show } from '@shared/easyfy.utils';\n\nexport class FilterDOMHelper {\n  static getButtonElement(target: HTMLElement): HTMLElement {\n    return target.hasAttribute('data-page') ? target : (target.parentElement as HTMLElement);\n  }\n\n  static getFilterHeaderContainer(): HTMLElement {\n    return element('.filter-header-container') as HTMLElement;\n  }\n\n  static getFilterHeaderButton(): HTMLElement {\n    return element('.sticky-filter-header') as HTMLElement;\n  }\n\n  static getProductListName(itemsQuerySelector: string): string {\n    return element(itemsQuerySelector)?.dataset['listName'];\n  }\n\n  static getProductListId(itemsQuerySelector: string): string {\n    return element(itemsQuerySelector)?.dataset['listId'];\n  }\n\n  static getPage(button: HTMLElement): number {\n    return button.dataset['page'] != null ? Number.parseInt(button.dataset['page']) : 1;\n  }\n\n  static getPageId(): string {\n    let pageId = element('[data-container=\"page\"]')?.dataset['pageId'] ?? element('[data-container=\"paging-container\"]')?.dataset['pageId'];\n    return pageId?.toString();\n  }\n\n  static getTotalPages(button: HTMLElement): number {\n    const buttonParent = button.closest('[data-page-id]') as HTMLElement;\n    return +buttonParent.dataset['totalPages'];\n  }\n\n  static clearSelectedFilters(): void {\n    element('[data-container=\"all-selected-filters\"]')\n      ?.querySelectorAll('[data-container=\"selected-filter\"]')\n      ?.forEach((el) => {\n        el?.remove();\n      });\n  }\n\n  static uncheckAllFilters(filterQuerySelector: string): void {\n    const filterCheckboxes: NodeListOf<HTMLInputElement> = FilterDOMHelper.getFilterCheckboxes(filterQuerySelector);\n    if (!filterCheckboxes || filterCheckboxes.length < 1) return;\n\n    filterCheckboxes.forEach((checkbox: HTMLInputElement) => {\n      checkbox.checked = false;\n    });\n  }\n\n  static updatedPageOnFilterChange(params: IUpdatePageParams): void {\n    const responseData = params.responseData;\n    const filterContainer = element(params.filterQuerySelector);\n    const pagingContainer = element(params.pagingQuerySelector);\n    const itemsContainer = element(params.itemsQuerySelector);\n    const sorterContainers = elements(params.sortersQuerySelector);\n    const selectedFiltersContainer = element(params.selectedFiltersQuerySelector);\n\n    if (params.replaceProducts && itemsContainer) {\n      itemsContainer.innerHTML = responseData.itemsPartial;\n    } else {\n      itemsContainer?.children?.length > 0\n        ? itemsContainer.lastElementChild.insertAdjacentHTML('afterend', responseData.itemsPartial)\n        : (itemsContainer.innerHTML = responseData.itemsPartial);\n    }\n\n    if (filterContainer) {\n      filterContainer.innerHTML = responseData.filterPartial;\n    }\n\n    if (pagingContainer) {\n      pagingContainer.innerHTML = responseData.pagingPartial;\n    }\n\n    if (selectedFiltersContainer) {\n      selectedFiltersContainer.innerHTML = responseData.selectedFiltersPartial;\n    }\n\n    if (sorterContainers) {\n      sorterContainers.forEach((sorterContainer) => {\n        sorterContainer.innerHTML = responseData.sortPartial;\n      });\n    }\n  }\n\n  static getSortData(target: HTMLElement): ISorter {\n    const selectedValue = target?.dataset['value'];\n    const key = selectedValue?.split('-')[0];\n    const sortDirection = selectedValue?.split('-')[1];\n\n    return {\n      key,\n      sortDirection,\n    };\n  }\n\n  static getPageFromSearchFragment(): number {\n    const url = new URLSearchParams(window.location.search);\n    const page = Number.parseInt(url.get('p'));\n    return !Number.isNaN(page) ? page : 1;\n  }\n\n  static getFacetCountsForCurrentGroup(input: HTMLElement): IFacetGroupCount | null {\n    const filterGroupElement = input.closest('[data-container=\"filter-group\"]') as HTMLElement;\n    const facetGroupKey = filterGroupElement?.id;\n    const filterGroup = element('.filter-groups #' + facetGroupKey) as HTMLElement;\n    if (!filterGroup) return null;\n\n    const countData: Array<IFacetValueCount> = [];\n\n    filterGroup.querySelectorAll('.filter-row [data-action=\"change-filter\"]')?.forEach((filterInput) => {\n      countData.push({\n        value: filterInput.attributes['value']?.value,\n        count: Number.parseInt(filterInput.attributes['data-result']?.value) ?? 0,\n      });\n    });\n\n    const facetGroupCountValues: IFacetGroupCount = {\n      key: facetGroupKey,\n      valueCountData: countData,\n    };\n\n    return facetGroupCountValues;\n  }\n\n  static closeFilterOptionSelector(target: HTMLElement): void {\n    const details: NodeListOf<HTMLElement> = document.querySelectorAll('.filter-item');\n\n    details.forEach((el) => {\n      if (!el.contains(target) && el !== target) {\n        el.removeAttribute('open');\n      }\n    });\n  }\n\n  static toggleClearFiltersButton(anyFilterChecked: boolean): void {\n    const clearFilterLinks = document.querySelectorAll('[data-action=\"clear-filters\"]');\n    if (clearFilterLinks) {\n      clearFilterLinks.forEach((clearFilterLink) => {\n        anyFilterChecked ? show(clearFilterLink, 'flex') : hide(clearFilterLink);\n      });\n    }\n  }\n\n  static updateFilterCount(): void {\n    const filterCounter = document.querySelector('[data-container=\"filter-counter\"]');\n    const numberOfFilters = document.querySelectorAll('input[data-action=\"change-filter\"]:checked')?.length;\n\n    if (filterCounter) {\n      filterCounter.innerHTML = numberOfFilters > 0 ? `(${numberOfFilters})` : '';\n    }\n  }\n\n  //#region Private Methods\n  private static getFilterContainer(filterQuerySelector: string): HTMLElement {\n    return element(filterQuerySelector) as HTMLElement;\n  }\n\n  private static getFilterCheckboxes(filterQuerySelector: string): NodeListOf<HTMLInputElement> {\n    return this.getFilterContainer(filterQuerySelector)?.querySelectorAll('input:checked');\n  }\n  //#endregion\n}\n","import { globalEvent } from '@shared/easyfy.core';\nimport { addCss, hide, removeCss } from '@shared/easyfy.utils';\nimport filterService from '@clientWebServices/filter.service';\nimport { isMobile } from '@clientShared/utils';\nimport { FilterDOMHelper, FilterSEOHelper, FilterStateHelper, FilterQueryParamsHelper } from '@clientShared/filter.helpers';\nimport { FilterFor, IFacetGroupCount, ISorter, IUpdatePageParams } from '@clientShared/filter.types';\n\nexport class Filter {\n  static Instance: Filter;\n\n  FilterQuerySelector: string;\n  PagingQuerySelector: string;\n  ItemsQuerySelector: string;\n  SortersQuerySelector: string;\n  SelectedFiltersQuerySelector: string;\n  FilterFor: FilterFor;\n  Page: number;\n  Sorter: ISorter;\n  SearchString: string;\n  UseHashedUrlFragments: boolean;\n  FilterStateHelper: FilterStateHelper;\n\n  constructor(\n    filterFor: FilterFor,\n    filterQuerySelector: string,\n    pagingQuerySelector: string,\n    itemsQuerySelector: string,\n    sortersQuerySelector: string,\n    selectedFiltersQuerySelector: string,\n    useHashedUrlFragments: boolean\n  ) {\n    Filter.Instance = this;\n    this.FilterQuerySelector = filterQuerySelector;\n    this.PagingQuerySelector = pagingQuerySelector;\n    this.ItemsQuerySelector = itemsQuerySelector;\n    this.SortersQuerySelector = sortersQuerySelector;\n    this.SelectedFiltersQuerySelector = selectedFiltersQuerySelector;\n    this.Page = 1;\n    this.FilterFor = filterFor;\n    this.UseHashedUrlFragments = useHashedUrlFragments;\n    this.FilterStateHelper = new FilterStateHelper();\n\n    if (this.UseHashedUrlFragments && this.FilterFor != null && window.location.hash) {\n      this.refreshDataOnLoad();\n    }\n\n    globalEvent({\n      type: 'click',\n      events: [\n        {\n          action: 'load-more-items',\n          callback: this.loadMoreItems,\n        },\n        {\n          action: 'clear-filters',\n          callback: this.clearFilters,\n        },\n        {\n          action: 'remove-filter',\n          callback: this.removeFilter,\n        },\n        {\n          action: 'paging',\n          callback: this.paginate,\n        },\n        {\n          callback: this.closeFilterOptionClickOutside,\n        },\n      ],\n    });\n\n    globalEvent({\n      type: 'change',\n      events: [\n        {\n          action: 'change-filter',\n          callback: this.changeFilter,\n        },\n        {\n          action: 'change-sort',\n          callback: this.changeSort,\n        },\n      ],\n    });\n\n    document.addEventListener('change-sort-option', this.changeSort.bind(this));\n    this.applyStickyOnScroll();\n  }\n\n  private refreshDataOnLoad = () => {\n    if (!this.UseHashedUrlFragments) {\n      return false;\n    }\n\n    this.RefreshData(true, null, true);\n  };\n\n  private applyStickyOnScroll = () => {\n    const filterContainer = FilterDOMHelper.getFilterHeaderContainer();\n    const filterBtn = FilterDOMHelper.getFilterHeaderButton() as HTMLElement;\n    const sticky = filterContainer?.offsetTop;\n    let hasScrolled: boolean = false;\n\n    document.addEventListener('scroll', () => {\n      if (window.scrollY > sticky) {\n        hasScrolled = true;\n        addCss(filterContainer, 'sticky');\n        addCss(filterBtn, ['grid', 'slide-up']);\n      } else {\n        if (hasScrolled) {\n          addCss(filterBtn, 'slide-down');\n          removeCss(filterBtn, 'slide-up');\n          removeCss(filterContainer, 'sticky');\n\n          setTimeout(function () {\n            removeCss(filterBtn, ['grid', 'slide-down']);\n            hasScrolled = false;\n          }, 500);\n        }\n      }\n    });\n  };\n\n  private loadMoreItems = (e: Event, replaceProducts = false) => {\n    e.preventDefault();\n    e.stopPropagation();\n\n    const button: HTMLElement = FilterDOMHelper.getButtonElement(e.target as HTMLElement);\n\n    Filter.Instance.Page = FilterDOMHelper.getPage(button);\n    Filter.Instance.RefreshData(replaceProducts);\n\n    return false;\n  };\n\n  private paginate = (e: Event) => {\n    this.loadMoreItems(e, true);\n\n    const button: HTMLElement = FilterDOMHelper.getButtonElement(e.target as HTMLElement);\n    const totalPages: number = FilterDOMHelper.getTotalPages(button);\n\n    //hide first page components - SEO reason\n    FilterSEOHelper.hideFirstPageComponents(Filter.Instance.Page, Filter.Instance.ItemsQuerySelector);\n    FilterSEOHelper.updateHeadPagination(Filter.Instance.Page, totalPages);\n\n    window.scrollTo(0, 100); // TODO when design is ready\n\n    return false;\n  };\n\n  private changeFilter = (e: Event) => {\n    e.preventDefault();\n    e.stopPropagation();\n\n    const input: HTMLElement = e.target as HTMLElement;\n    const counts: IFacetGroupCount = FilterDOMHelper.getFacetCountsForCurrentGroup(input);\n\n    Filter.Instance.Page = 1;\n    Filter.Instance.RefreshData(true, counts);\n\n    return false;\n  };\n\n  private removeFilter = (e: Event) => {\n    e.preventDefault();\n    e.stopPropagation();\n\n    let el = e.target as HTMLElement;\n    if (el.attributes['data-id']?.value == undefined) {\n      el = el.parentElement;\n    }\n    const id = el.attributes['data-id']?.value;\n    const input = document.querySelector('input[id=\"' + id + '\"]') as HTMLElement;\n    const counts: IFacetGroupCount = FilterDOMHelper.getFacetCountsForCurrentGroup(input);\n\n    input.removeAttribute('checked');\n    el.remove();\n\n    Filter.Instance.Page = 1;\n    Filter.Instance.RefreshData(true, counts);\n\n    return false;\n  };\n\n  private clearFilters = (e: Event) => {\n    e.preventDefault();\n    e.stopPropagation();\n\n    let eventElement: HTMLElement = e.target as HTMLElement;\n    const pageId = FilterDOMHelper.getPageId();\n\n    FilterDOMHelper.clearSelectedFilters();\n    FilterDOMHelper.uncheckAllFilters(Filter.Instance.FilterQuerySelector);\n\n    if (!pageId) return false;\n\n    Filter.Instance.Page = 1;\n    Filter.Instance.RefreshData(true);\n\n    if (!eventElement.hasAttribute('data-action')) {\n      eventElement = eventElement.parentElement;\n    }\n\n    hide(eventElement);\n\n    return false;\n  };\n\n  private changeSort = (e: Event) => {\n    e.preventDefault();\n    e.stopPropagation();\n\n    const selectedElement: HTMLElement = e.target as HTMLElement;\n\n    Filter.Instance.Sorter = FilterDOMHelper.getSortData(selectedElement);\n    Filter.Instance.RefreshData(true);\n  };\n\n  private closeFilterOptionClickOutside = (e: Event) => {\n    const target = e.target as HTMLElement;\n\n    if (!target || isMobile()) return;\n    FilterDOMHelper.closeFilterOptionSelector(target);\n  };\n\n  private getItems = async (queryParams: any): Promise<any> => {\n    const pageId = FilterDOMHelper.getPageId();\n    const productListName = FilterDOMHelper.getProductListName(Filter.Instance.ItemsQuerySelector);\n    const productListId = FilterDOMHelper.getProductListId(Filter.Instance.ItemsQuerySelector);\n    const pathName = window.location.pathname;\n\n    switch (this.FilterFor) {\n      case FilterFor.Category:\n      case FilterFor.Brand:\n      case FilterFor.Search:\n        return await filterService.GetProducts(pageId, queryParams, FilterFor[this.FilterFor], productListName, productListId, pathName);\n      case FilterFor.Subscription:\n        return await filterService.GetSubscriptionProducts(pageId, queryParams, productListName, productListId);\n      case FilterFor.Articles:\n        return await filterService.GetArticles(pageId, queryParams);\n      case FilterFor.Orders:\n        return await filterService.GetMoreOrders(queryParams.page);\n    }\n  };\n\n  RefreshData = (replaceProducts: boolean = true, facetGroupCount: IFacetGroupCount = null, isPageLoad: boolean = false) => {\n    Filter.Instance.FilterStateHelper.saveFilterState();\n\n    if (this.UseHashedUrlFragments && isPageLoad) {\n      const page = FilterDOMHelper.getPageFromSearchFragment();\n      Filter.Instance.Page = page;\n    }\n\n    const queryParams = FilterQueryParamsHelper.getQueryParams(\n      Filter.Instance.Page,\n      Filter.Instance.Sorter,\n      this.UseHashedUrlFragments,\n      isPageLoad,\n      Filter.Instance.FilterQuerySelector,\n      facetGroupCount\n    );\n\n    const anyFilterChecked = queryParams.checkedFilters?.length > 0;\n\n    this.getItems(queryParams)\n      .then((response) => {\n        if (response?.status == 200 && response?.data != null && response?.data?.success) {\n          var updatePageParams: IUpdatePageParams = {\n            responseData: response.data,\n            filterQuerySelector: Filter.Instance.FilterQuerySelector,\n            pagingQuerySelector: Filter.Instance.PagingQuerySelector,\n            itemsQuerySelector: Filter.Instance.ItemsQuerySelector,\n            sortersQuerySelector: Filter.Instance.SortersQuerySelector,\n            selectedFiltersQuerySelector: Filter.Instance.SelectedFiltersQuerySelector,\n            replaceProducts,\n          };\n\n          FilterDOMHelper.updatedPageOnFilterChange(updatePageParams);\n\n          if (response.data.pageResource != null) {\n            FilterSEOHelper.updateMetaTitle(Filter.Instance.Page, response.data.pageResource);\n            FilterSEOHelper.updateMetaCanonical(Filter.Instance.Page);\n            FilterSEOHelper.updateMetaAlternate();\n          }\n\n          document.dispatchEvent(\n            new CustomEvent('filter.totalHitsUpdated', {\n              bubbles: true,\n              detail: { totalHits: response.data.totalHits },\n            })\n          );\n\n          Filter.Instance.FilterStateHelper.setFilterState();\n          FilterQueryParamsHelper.setQueryParams(queryParams);\n\n          FilterDOMHelper.toggleClearFiltersButton(anyFilterChecked);\n          FilterDOMHelper.updateFilterCount();\n        } else {\n          console.log('Error on refresh data request.');\n        }\n      })\n      .catch((error) => {\n        console.log(error);\n      });\n  };\n}\n","import { addCss } from '@shared/easyfy.utils';\n\nexport const isMobile = () => (window.innerWidth <= 768 ? true : false);\n\nexport const isDesktop = () => (window.innerWidth >= 1100 ? true : false);\n\nexport const toggleProp = (el: HTMLElement): void => {\n  !('open' in el.dataset) ? (el.dataset.open = '') : delete el.dataset.open;\n};\n\nexport const animationEnded = (el: Element | HTMLElement, func: EventListenerOrEventListenerObject) =>\n  el.addEventListener('animationend', func, { once: true });\n\nexport const deleteCookie = (name: string) => {\n  const expirationTime = Date.now() - 30 * 60 * 1000;\n  document.cookie = `${name}= ; expires=${new Date(expirationTime).toUTCString()}; path=/; domain=${window.location.hostname}`;\n};\n\nexport const setCookie = (contentCookie: string, cookieName: string, expirationDate?: Date) => {\n  deleteCookie(cookieName);\n\n  const expiration = expirationDate || new Date();\n\n  if (!expirationDate) {\n    expiration.setTime(expiration.getTime() + 30 * 60 * 1000); // default to 30 minutes\n  }\n\n  document.cookie = `${cookieName}=${contentCookie}; expires=\"${expiration.toUTCString()}\"; path=/; domain=${window.location.hostname}`;\n};\n\nexport const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));\n\nexport const clearContent = (container) => {\n  container.innerHTML = '';\n};\n\nexport const replaceContent = (container, data: string, type: string = 'append', clearData: boolean = true) => {\n  if (clearData) container.innerHTML = '';\n\n  const content = document.createRange().createContextualFragment(data).firstElementChild;\n\n  switch (type) {\n    case 'after':\n      container.after(content);\n      break;\n    case 'replaceInnerHtml':\n      container.innerHTML = content.innerHTML;\n      break;\n    case 'append':\n    default:\n      container.appendChild(content);\n      break;\n  }\n};\n\nexport const createElementWithClasses = (tag: string, classes: string | string[], innerText?: string | undefined): HTMLElement => {\n  const element = document.createElement(tag);\n  addCss(element, classes);\n\n  if (innerText) element.innerText = innerText;\n  return element;\n};\n\nexport const createLink = (href: string | undefined, text: string, classes: string | string[]): HTMLAnchorElement => {\n  const link = document.createElement('a');\n  link.href = href || '#';\n  link.innerText = text;\n  addCss(link, classes);\n  return link;\n};\n\nexport const createEventButton = (text: string, event: string, classes: string | string[]): HTMLButtonElement => {\n  const button = document.createElement('button');\n  button.innerText = text;\n  button.dataset.event = event;\n  addCss(button, classes);\n  return button;\n};\n\nexport interface UrlHistoryContent {\n  appendType: string;\n  data: string;\n}\n","import { globalEvent, elements } from '@shared/easyfy.core';\nimport { visible, hideAll, showAll, toggleClass, removeCss } from '@shared/easyfy.utils';\n\nexport default class ToggleCss {\n  static Instance: ToggleCss;\n  static Event: string;\n\n  constructor(event: string) {\n    ToggleCss.Instance = this;\n    ToggleCss.Event = event;\n    \n    globalEvent({\n      type: 'click',\n      events: [\n        {\n          callback: e => {\n            ToggleCss.Instance.hideToggle(e?.target);\n          },\n        },\n        {\n          event: ToggleCss.Event,\n          callback: this.onToggleElement,\n        },\n      ],\n    });\n  }\n\n  onToggleElement(e: any, hide: boolean) {\n    if (e?.preventDefault) e.preventDefault();\n    if (e.target) e = e.target;\n\n    let target = e.attributes['data-target']?.value;\n\n    if (!target) {\n      e = e.parentNode as HTMLElement;\n      target = e.attributes['data-target']?.value;\n    }\n\n    if (!target) return false;\n\n    const el = document.querySelectorAll<HTMLElement>(`[data-container=\"${target}\"]`);\n    const toggleClassName: string = e.attributes['data-toggleClassName']?.value;\n\n    if (!hide) {\n      ToggleCss.Instance.hideToggle(e);\n    }\n\n    el.forEach((item) => {\n\n      if (toggleClassName) {\n        toggleClass(item, toggleClassName);\n      }\n    });\n\n    return false;\n  }\n\n  hideToggle(target: any) {\n    const toggleElements: NodeListOf<HTMLElement> = elements(`[data-event=\"${ToggleCss.Event}\"]`);\n    toggleElements.forEach((el) => {\n      const dataTarget = el.attributes['data-target']?.value;\n\n      const dataTargetElement: NodeListOf<HTMLElement> = document.querySelectorAll<any>(`[data-container=\"${dataTarget}\"]`);\n      dataTargetElement.forEach((item) => {\n        if (!el.contains(target) && visible(item) && visible(el) && !item.contains(target) && el !== target) {\n          this.onToggleElement(el, true);\n        }\n      });\n    });\n  }\n}","import { globalEvent } from '@shared/easyfy.core';\n\nexport default class ScrollTo {\n  static Instance: ScrollTo;\n  static scrollBehavior: ScrollBehavior;\n  \n  // If the event is applied to a <a>-tag with hash-href, the value will show in browser url\n  static showAnchor: boolean; \n\n  constructor(scrollBehavior: ScrollBehavior, showAnchor: boolean) {\n    ScrollTo.Instance = this;\n\n    ScrollTo.scrollBehavior = scrollBehavior;\n    ScrollTo.showAnchor = showAnchor;\n    \n    globalEvent({\n      type: 'click',\n      events: [\n        {\n          event: 'scroll-to',\n          callback: this.onScrollTo,\n        },\n      ],\n    });\n  }\n  \n  onScrollTo(e: any) {\n\n    if (!ScrollTo.showAnchor && e?.preventDefault) e.preventDefault();\n\n    var element: HTMLElement = e.target as HTMLElement;\n    \n    if (element.getAttribute('data-event') != \"scroll-to\"){\n      element = element.closest('[data-event=\"scroll-to\"]');\n    }\n    \n    const targetName = element.attributes['data-target']?.value; \n\n    const targetElement = document.querySelector('[data-container=\"' + targetName + '\"]');\n    if (targetElement == null) {\n      return false;\n    }\n\n    targetElement.scrollIntoView({behavior: ScrollTo.scrollBehavior }); \n\n    return false;\n  }\n}","import { invoke } from '@shared/easyfy.decorators';\nimport { Filter } from '@clientWebModules/filter';\nimport { FilterFor } from '@clientShared/filter.types';\nimport ToggleCss from '@shared/easyfy.togglecss';\nimport ScrollTo from '@shared/easyfy.scrollto';\n\n@invoke\nexport default class ArticleList {\n  static Instance: ArticleList;\n\n  constructor() {\n    ArticleList.Instance = this;\n    new ToggleCss('togglecss');\n    new ScrollTo('smooth', true);\n  }\n\n  onInit() {\n    new Filter(\n      FilterFor.Articles,\n      '[data-container=\"filter\"]',\n      '[data-container=\"paging\"]',\n      '[data-container=\"articles\"]',\n      '[data-container=\"sorter\"]',\n      '[data-container=\"selected-filters\"]',\n      true\n    );\n  }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.j = 4292;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t4292: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackJsonpWeb\"] = self[\"webpackJsonpWeb\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [6017], () => (__webpack_require__(8667)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","query","document","querySelector","querySelectorAll","getBlazorEditMode","window","isAdminModeEnabled","undefined","isEditModeEnabled","editModeCookie","cookie","split","find","trim","startsWith","toLowerCase","docReady","callback","context","blazorFinishedLoadingEventRegistered","EasyfyMethods","triggerWindowEvent","eventName","eventData","event","CustomEvent","detail","dispatchEvent","readyList","readyFired","readyEventHandlersInstalled","ready","readyBody","i","length","fn","call","ctx","blazorFinishedLoading","addEventListener","TypeError","setTimeout","push","readyState","globalEventList","globalEvent","type","forEach","events","item","foundItem","action","actionFound","globalFindAction","eventFound","globalFindEvent","globalFound","globalFind","globalEventAdd","body","removeEventListener","globalEventHandler","e","target","eventTarget","globalGetTargetAction","globalEventInvokeCallback","globalGetTargetEvent","globalMatchType","cbs","itemType","eventType","actionType","globalGetTarget","dataTarget","attributes","value","parentNode","parseToBoolean","val","isString","showAll","el","displayType","style","display","hideAll","show","selector","Element","hide","removeCss","className","Array","isArray","NodeList","classList","remove","element","add","visible","offsetWidth","offsetHeight","getClientRects","injector","dependencies","resolveOnload","resolve","depends","ctor","cb","id","len","Math","random","toString","substr","name","func","data","hasOwnProperty","index","dependencyItem","loadedVal","Object","defineProperty","get","set","splice","dependencyFunc","key","this","enumerable","configurable","obj","prop","prototype","writable","handler","oldval","newval","getter","setter","Easyfy","Shared","Scripts","PushToDataLayer","gtmEvent","PushProductImpressionEvent","eventProducts","listName","currencyCode","ecommerce","impressions","PushProductClickEvent","click","actionField","list","ListNameCleanUp","products","PushProductDetailEvent","PushProductAddEvent","PushProductRemoveEvent","PushCheckoutEvent","step","option","checkout","HandleDataEvents","response","dataLayer","BuildAndPushEvents","dataEvents","dataEvent","dataProduct","product","brand","category","price","variant","quantity","dimension3","dimension4","dimension5","dimension7","clickProducts","clickProduct","position","dimension6","impressionProducts","impressionProduct","detailProducts","detailProduct","console","dir","listname","replace","EasyfyEventData","AddDataToEventLayer","EasyfyEventLayer","productLists","productList","productPrices","basket","notification","notifications","AddCustomDataToEventLayer","customData","GlobalIgnoreEvents","result","configuration","addProductImpressionsServerSide","SiteInfo","site","PageInfo","pageInfo","Events","ClearEvents","ShouldRegisterProductImpressions","ShouldRegisterBannerImpressions","addBannerImpressionsServerSide","GetAllServices","services","GetService","serviceName","serviceInstance","GetServiceNames","service","ServiceIsActive","enabled","ConsumesEvent","includeAllEvents","Product","ProductAt","atIndex","error","Products","ids","productDataSet","ProductsAt","indexes","AllProducts","AllProductLists","ProductIndexInList","productId","productsInList","ProductIds","indexOf","ProductSalesUnitPrice","ProductSalesUnitPrices","prices","AllProductSalesUnitPrices","Banner","banners","AllBanners","HasNotifications","Notifications","ClearNotifications","HasEvents","Basket","GetCurrencyCode","returnValue","GetCustomData","GetClientEventMetaData","SessionId","localStorage","getItem","LocalStorageKeys","UserId","ClientId","IsDesktop","IsDekstop","IsMobilePhone","IsTablet","IPAddress","IsRecurringUser","flagAsRecurringAfterCheck","cookieKey","UserIdCookieKey","userId","GetCookieValue","LastCheckedUserId","setItem","cookieName","SetStatsApiBlock","block","StatsIsBlocked","removeItem","StatsApiIsBlocked","StatsEventExporter","_payloadKbThreshold","_eventThreshold","_eventThresholdRemoved","WithMapper","mapper","LoadAndSetTransitionStatus","CheckVisibility","bind","RegisterEvent","Promise","MapEventData","AccumulateEvent","StatsEventsThresholdRemoved","storedDataString","StatsEventsTransitionObj","_eventData","JSON","parse","ClientMetaData","EventRequests","RecheckAndSetTransitionStatus","eventsMatch","skipEventNames","EventNames","BannerImpression","ElementImpression","ProductImpression","includes","Event","stringify","str","bytes","TextEncoder","encode","blob","Blob","_blob","GetObjectSizeInKB","SendEventsToStatsApi","navigator","sendBeacon","visibilityState","jsonString","EasyfyEventLogger","Ga4EventExporter","ga4Event","BroadcastChannel","ConsoleLog","message","prefix","color","bgColor","Log","CheckLogStatus","EnableLog","DisableLog","ToggleImpressionVisualizer","PrintEventLayer","HidePrintedEventLayer","RunEventConsumer","DisplayEventMessage","BroadcastToLogger","GetCurrentTime","now","Date","getHours","getMinutes","getSeconds","getMilliseconds","FeatureNames","EventTracking","Features","FeatureIsActive","featureName","hasAttribute","KlaviyoEventExporter","PushToKlaviyo","identify","IdentifyUser","klaviyoEvent","emailToRegister","ServiceNames","Stats","Ga4","Klaviyo","PageView","ProductClick","ProductPageView","BannerClick","ElementClick","AddToCart","RemoveFromCart","QuantityChanged","StartedCheckout","CompletedCheckout","SearchPerformed","ContinueToPayment","SessionStarted","LoggedIn","LoggedOut","Message","FetchClientMetaData","BlockStatsApi","SessionTimer","Modules","EasyfyEventHandler","constructor","eventMappers","eventExporters","Map","observedElements","initiated","instance","featureFlag","EasyfyEventLayerInstance","eventExporter","CheckSessionStart","then","RunEvents","InitProductIntersectionObserver","InitMutationObserver","InitBannerIntersectionObserver","InitElementIntersectionObserver","ClickEventChecker","inlineScript","RunEvent","sessionTimer","toUTCString","SendStartSessionEvent","checkTime","diff","getTime","abs","round","oldSessionId","fetch","ok","status","clientMetaData","json","sessionId","clientId","isDesktop","isMobilePhone","isTablet","userIdCookieKey","ipAddress","HandleWorkerMessage","clientData","Culture","Currency","RecurringUser","Referrer","referrer","Path","location","pathname","UserAgent","userAgent","VisitorId","sessionStartedEvent","options","childList","subtree","characterData","targets","mutationObserver","MutationObserver","ElementMutated","observe","mutations","mutation","RebindObserveProducts","BannerElementMutated","RebindObserveBanners","intersectionObserver","IntersectionObserver","ProductCardObserved","root","rootMargin","threshold","bannerIntersectionObserver","BannerElementObserved","TrackableElementObserved","disconnect","entries","observer","eventProductIds","eventProductSalesUnitCodes","listIds","promotedProducts","entry","isIntersecting","unobserve","getAttribute","productIdentifier","elementIdentifier","defaultSalesUnitCode","isPromotedProduct","node","parentElement","listId","nodeName","productIdentifiers","salesUnitCodes","bannerIds","bannerIdentifier","elements","trackType","properties","attribute","getAttributeNames","Id","Type","Properties","closest","targetUrl","href","ClickEventProduct","ClickEventBanner","ClickEventElement","stopPropagation","preventDefault","salesUnitCode","bannerId","elementId","dataset","removeAttribute","GetCurrentInstance","dispatchedToServices","errors","join","RegisterResponseData","responseData","eventLayer","GetCookie","generateFullPathWithPrefix","url","prefixPath","documentElement","endsWith","slice","config","axios","defaults","headers","common","post","token","patch","axiosDelete","delete","Services","Filter","GetProducts","pageId","filterFor","productListName","productListId","pathName","encodeURIComponent","GetSubscriptionProducts","GetArticles","GetMoreOrders","page","FilterSEOHelper","hideFirstPageComponents","itemsQuerySelector","itemsContainer","firstPageComponents","x","updateMetaTitle","resource","metaTitle","currentMetaTitle","innerHTML","separatorIdx","updateMetaCanonical","metaCanonical","hrefValue","arrayHref","setAttribute","updateMetaAlternate","canonicalHref","culture","link","newAlternate","createElement","insertAdjacentElement","FilterStateType","FilterOperator","FilterFor","SortDirection","updateHeadPagination","currentPage","totalPages","relPrev","relNext","appendChild","currBaseLink","FilterStateHelper","saveFilterState","saveElementsState","elementsStates","tempStates","elementState","resolveStateAndValue","state","stateType","Scroll","setFilterState","domelement","Open","toLocaleLowerCase","scrollTop","elementType","FilterQueryParamsHelper","getQueryParams","sorter","useHashedUrlFragments","isPageLoad","filterQuerySelector","facetGroupCount","queryParams","searchQuery","URLSearchParams","search","checkedFilters","getFilterDataFromHashFragments","getSortKeyFromHashFragments","sortDirection","getSortDirectionFromHashFragment","searchString","getFilterData","Number","parseInt","filter","decodeURIComponent","values","applyFilterGroupCount","setQueryParams","filterUrlQuery","pagingUrlQuery","filterQuery","map","origin","pagingQueryString","filterQueryString","history","replaceState","hash","sortKey","getFragmentFromHash","substring","sortDir","isNaN","filters","hashFragment","parts","v","part","operator","Equal","fragments","filterFragment","frag","charAt","filterContainer","filterGroupElement","filterInputElement","FilterDOMHelper","getButtonElement","getFilterHeaderContainer","getFilterHeaderButton","getProductListName","getProductListId","getPage","button","getPageId","getTotalPages","clearSelectedFilters","uncheckAllFilters","filterCheckboxes","getFilterCheckboxes","checkbox","checked","updatedPageOnFilterChange","params","pagingContainer","pagingQuerySelector","sorterContainers","sortersQuerySelector","selectedFiltersContainer","selectedFiltersQuerySelector","replaceProducts","itemsPartial","children","lastElementChild","insertAdjacentHTML","filterPartial","pagingPartial","selectedFiltersPartial","sorterContainer","sortPartial","getSortData","selectedValue","getPageFromSearchFragment","getFacetCountsForCurrentGroup","input","facetGroupKey","filterGroup","countData","filterInput","count","valueCountData","closeFilterOptionSelector","contains","toggleClearFiltersButton","anyFilterChecked","clearFilterLinks","clearFilterLink","updateFilterCount","filterCounter","numberOfFilters","getFilterContainer","refreshDataOnLoad","UseHashedUrlFragments","RefreshData","applyStickyOnScroll","filterBtn","sticky","offsetTop","hasScrolled","scrollY","loadMoreItems","Instance","Page","paginate","ItemsQuerySelector","scrollTo","changeFilter","counts","removeFilter","clearFilters","eventElement","FilterQuerySelector","changeSort","selectedElement","Sorter","closeFilterOptionClickOutside","innerWidth","getItems","Category","Brand","Search","Subscription","Articles","Orders","success","updatePageParams","PagingQuerySelector","SortersQuerySelector","SelectedFiltersQuerySelector","pageResource","bubbles","totalHits","catch","ToggleCss","hideToggle","onToggleElement","toggleClassName","force","HTMLElement","toggle","ScrollTo","scrollBehavior","showAnchor","onScrollTo","targetName","targetElement","scrollIntoView","behavior","ArticleList","onInit","newClass","readyAfter","apply","init","resolves","err","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","m","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","keys","every","r","n","__esModule","d","a","definition","o","Symbol","toStringTag","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""}