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I,GAC9B8I,aAAaN,GACbnI,IAAE,eAAe0I,YACK,IAAXR,GACPA,EAAOvI,EAEf,GACJ,EAEAiJ,SAAQ,SAACd,EAAKe,EAAQd,EAASC,EAAOE,GAClC,IAAMC,EAAUC,YAAW,WACvB3I,EAAKgI,YACT,GAAG,KAEGY,EAAa5I,EAAKoI,cAAcC,EAAKC,EAASC,GAGpD,OAFAK,EAAWJ,KAAOjI,IAAE6I,GAAQC,YAErB9I,IAAAA,KAAOqI,GAAYH,QAAO,SAACvI,GAC9B8I,aAAaN,GACbnI,IAAE,eAAe0I,YACK,IAAXR,GACPA,EAAOvI,EAEf,GACJ,EAEAoJ,aAAY,SAACjB,EAAKG,EAAMF,EAASC,EAAOE,GACpC,IAAMC,EAAUC,YAAW,WACvB3I,EAAKgI,YACT,GAAG,KAEGY,EAAa5I,EAAKoI,cAAcC,EAAKC,EAASC,GAOpD,OANAK,EAAWW,OAAQ,EACnBX,EAAWC,aAAc,EACzBD,EAAWY,aAAc,EACzBZ,EAAWE,SAAW,YACtBF,EAAWJ,KAAOA,EAEXjI,IAAAA,KAAOqI,GAAYH,QAAO,SAACvI,GAC9B8I,aAAaN,GACbnI,IAAE,eAAe0I,YACK,IAAXR,GACPA,EAAOvI,EAEf,GACJ,E","sources":["webpack://sitecore-web-schreuderssport/./scripts/utils/popover.js","webpack://sitecore-web-schreuderssport/./scripts/modules/products/product-detail.js","webpack://sitecore-web-schreuderssport/./scripts/utils/ajax.js"],"sourcesContent":["// Description: Popover utility functions\r\n\"use strict\";\r\n\r\nimport { computePosition, inspect, autoUpdate, autoPlacement, offset, flip, shift } from \"@floating-ui/dom\";\r\n\r\nclass ToolTip {\r\n constructor(selector) {\r\n this.tooltip = document.getElementById('tooltip'); // get the tooltip element\r\n this.tooltipContent = this.tooltip ? this.tooltip.querySelector('.tooltip-content') : null;\r\n this.elements = document.querySelectorAll(selector);\r\n this.activeElement = null;\r\n this.navbarHeight = document.getElementById('nav').offsetHeight;\r\n\r\n this.elements.forEach((element) => {\r\n element.addEventListener('click', (event) => this.handleClick(event));\r\n element.addEventListener('mouseover', (event) => this.handleMouseOver(event)); \r\n element.addEventListener('mouseout', (event) => this.handleMouseOut(event)); \r\n });\r\n\r\n document.addEventListener('click', (event) => this.handleDocumentClick(event));\r\n }\r\n\r\n async showPopover(anchor) {\r\n const { x, y } = await computePosition(anchor, this.tooltip, {\r\n placement: 'right',\r\n middleware: [offset(2), flip(), shift({ padding: 0 })],\r\n });\r\n\r\n this.tooltip.style.left = `${x}px`;\r\n this.tooltip.style.top = `${y - this.navbarHeight}px`;\r\n this.tooltip.classList.remove('hidden');\r\n }\r\n \r\n handleMouseOver(event) {\r\n let content = event.currentTarget.getAttribute('data-content');\r\n this.tooltipContent.innerHTML = content;\r\n\r\n this.showPopover(event.currentTarget);\r\n }\r\n\r\n handleMouseOut(event) {\r\n this.tooltip.classList.add('hidden');\r\n }\r\n\r\n handleClick(event) {\r\n event.preventDefault();\r\n\r\n let content = event.currentTarget.getAttribute('data-content');\r\n this.tooltipContent.innerHTML = content;\r\n\r\n if (this.activeElement === event.target) {\r\n this.tooltip.classList.add('hidden');\r\n this.activeElement = null;\r\n return;\r\n }\r\n\r\n this.activeElement = event.target;\r\n this.showPopover(event.target);\r\n }\r\n\r\n handleDocumentClick(event) {\r\n if (![...this.elements].some(el => el.contains(event.target)) && event.target !== this.tooltip) {\r\n this.tooltip.classList.add('hidden');\r\n this.activeElement = null;\r\n }\r\n }\r\n\r\n setUpTooltip(element) {\r\n computePosition(element, this.tooltip, {\r\n placement: 'top',\r\n middleware: middleware,\r\n }).then(({ x, y }) => {\r\n Object.assign(this.tooltip.style, {\r\n left: `${x + window.scrollX}px`,\r\n top: `${y + window.scrollY}px`\r\n });\r\n });\r\n }\r\n\r\n showTooltip(e) {\r\n this.tooltip.style.display = \"block\";\r\n this.setUpTooltip(e);\r\n }\r\n\r\n hideTooltip() {\r\n this.tooltip.style.display = \"none\";\r\n }\r\n}\r\n\r\n/**\r\n * ToolTip module.\r\n * \r\n * This module provides functionality for creating and managing tooltips in the application.\r\n * \r\n * @module ToolTip\r\n */\r\nexport default ToolTip;","// product-detail.js\r\n\"use strict\";\r\n\r\nimport $ from \"jquery\";\r\nimport { ajax } from \"../../utils/ajax\";\r\nimport SimpleBar from \"simplebar\";\r\nimport 'simplebar/dist/simplebar.css';\r\nimport ResizeObserver from 'resize-observer-polyfill';\r\nimport ToolTip from \"../../utils/popover\";\r\nimport PhotoSwipeLightbox from \"photoswipe/lightbox\";\r\nimport 'photoswipe/style.css';\r\n\r\nwindow.ResizeObserver = ResizeObserver;\r\n\r\nclass ProductDetail {\r\n constructor(basketData, images) {\r\n this.basketData = basketData;\r\n this.images = images;\r\n this.isMobile = document.body.classList.contains(\"mobile-device\");\r\n this.isLoggedIn = document.body.classList.contains(\"loggedIn\");\r\n this.hasThumbs = document.getElementById(\"product-images-thumbnails\") !== null;\r\n this.hasRightClicked = false;\r\n this.players = {};\r\n }\r\n\r\n init() {\r\n // Show first product image on load\r\n this.selectPhoto(0);\r\n\r\n // wire up the product basket quantity inputs\r\n const enableUpdateBasket = () => {\r\n document.getElementById(\"btnUpdateBasketGoToBasket\").style.display = \"none\";\r\n document.getElementById(\"btnUpdateBasket\").classList.remove(\"hidden\");\r\n };\r\n\r\n document.querySelectorAll(\".productBasket input[data-entity-id]\").forEach(input => input.addEventListener(\"input\", enableUpdateBasket)); // covers both keypress and change \r\n\r\n // Thumbnail click events\r\n if (this.hasThumbs) {\r\n document.querySelectorAll('#product-images-thumbnails [data-slide-index]').forEach(element => {\r\n element.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n const photoIdx = element.getAttribute('data-slide-index');\r\n console.log('photoIdx', photoIdx);\r\n this.selectPhoto(photoIdx);\r\n });\r\n });\r\n }\r\n\r\n // Product colour menu click events\r\n if (!this.isMobile) {\r\n const productColourMenu = document.querySelector(\".productBasket ul.productStock\");\r\n if (productColourMenu) {\r\n const colourMenuItems = productColourMenu.querySelectorAll(\"li\");\r\n\r\n colourMenuItems.forEach(item => {\r\n item.addEventListener(\"click\", (event) => {\r\n event.preventDefault();\r\n colourMenuItems.forEach(otherItem => {\r\n otherItem.classList.remove(\"selected\");\r\n });\r\n item.classList.add(\"selected\");\r\n const colour = item.getAttribute(\"productColour\");\r\n const stockDetails = document.querySelector(`.stockDetails[productColour=\"${colour}\"]`);\r\n\r\n document.querySelectorAll(\".stockDetails\").forEach(el => el.style.display = \"none\");\r\n stockDetails.style.display = \"block\";\r\n\r\n });\r\n });\r\n\r\n if (productColourMenu.children.length === 1) {\r\n productColourMenu.classList.add(\"hidden\");\r\n }\r\n\r\n productColourMenu.children[0].click();\r\n }\r\n }\r\n\r\n if (this.isMobile) {\r\n const assortmentTables = document.querySelectorAll(\".productBasket table.assortment-table\");\r\n\r\n assortmentTables.forEach(table => {\r\n const tableHtml = table.outerHTML;\r\n const assortmentCode = table.getAttribute(\"data-assortment-code\");\r\n const assortmentTooltip = document.createElement(\"div\");\r\n assortmentTooltip.setAttribute(\"title\", tableHtml);\r\n assortmentTooltip.setAttribute(\"data-html\", \"true\");\r\n assortmentTooltip.innerHTML = assortmentCode;\r\n table.parentNode.insertBefore(assortmentTooltip, table.nextSibling);\r\n table.style.display = \"none\";\r\n\r\n new ToolTip(assortmentTooltip).template('
');\r\n // assortmentTooltip.tooltip({\r\n // template: '
'\r\n // });\r\n });\r\n }\r\n\r\n // preload images and setup video players\r\n if (!this.isMobile) {\r\n this.preLoadImages();\r\n }\r\n\r\n // Setup custom tooltips\r\n if (document.querySelector('.futurestocktooltip')) {\r\n new ToolTip('.futurestocktooltip');\r\n }\r\n\r\n // Highlight the selected tab\r\n const tabs = document.querySelectorAll('[data-role=\"product-tabs\"] a');\r\n if (tabs) {\r\n tabs.forEach((tab) => {\r\n tab.addEventListener('click', () => {\r\n tabs.forEach(t => t.classList.remove('active'));\r\n tab.classList.add('active');\r\n });\r\n });\r\n }\r\n\r\n // PhotoSwipe Lightbox\r\n const gallery = document.getElementById('product-images');\r\n if (gallery) {\r\n const options = {\r\n gallery: '#product-images',\r\n children: '.gall-item',\r\n bgOpacity: 0.8,\r\n pswpModule: () => import('photoswipe')\r\n };\r\n const lightbox = new PhotoSwipeLightbox(options);\r\n lightbox.init();\r\n }\r\n\r\n if (this.isLoggedIn) {\r\n this.wireUpUpdateBasket();\r\n }\r\n }\r\n\r\n /**\r\n * Handles the download functionality for product photos, specifically enabling right-click download options and managing JPEG information display.\r\n * It checks if the user is logged in and then attaches event listeners to the main product image and download button.\r\n * When a user right-clicks on the image, a download section is displayed. Additionally, if a user hasn't dismissed the JPEG info, it will display that as well.\r\n * A dismiss button is also handled to prevent the JPEG info from displaying again.\r\n */\r\n photoDownload() {\r\n if (this.isLoggedIn) {\r\n let dismissed = localStorage && localStorage.getItem('product-images-jpeg-info-dismissed');\r\n const productImage = document.querySelector('#product-images-main li.selected a');\r\n if (productImage) {\r\n productImage.addEventListener('mousedown', (event) => {\r\n if (event.button === 2) { // Right click on image\r\n this.hasRightClicked = true;\r\n const downloadSection = document.getElementById('media-download');\r\n\r\n if (downloadSection) {\r\n downloadSection.style.display = 'block';\r\n }\r\n\r\n if (!dismissed) {\r\n const jpegInfo = document.getElementById('jpeg-info');\r\n if (jpegInfo) {\r\n jpegInfo.style.display = 'block';\r\n }\r\n }\r\n }\r\n });\r\n }\r\n\r\n document.querySelector('#image-download a').addEventListener('click', () => {\r\n dismissed = localStorage && localStorage.getItem('product-images-jpeg-info-dismissed');\r\n if (!dismissed) {\r\n document.getElementById('media-download').style.display = 'block';\r\n }\r\n });\r\n\r\n if (localStorage) {\r\n const dismissButton = document.getElementById('product-images-jpeg-info-dismiss');\r\n if (dismissButton) {\r\n dismissButton.addEventListener('click', () => {\r\n localStorage.setItem('product-images-jpeg-info-dismissed', '1');\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Stops all currently playing videos.\r\n *\r\n * @function stopVideos\r\n * @memberof ProductDetail\r\n * @instance\r\n * @returns {void}\r\n */\r\n stopVideos() {\r\n for (const videoId in this.players) {\r\n if (this.players.hasOwnProperty(videoId)) {\r\n this.players[videoId].pauseVideo();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Calculates the scroll offset for the thumbnail list to center a specific thumbnail.\r\n *\r\n * @param {number} photoIdx - The index of the photo to center in the thumbnail list.\r\n * @returns {number} The calculated scroll offset, or 0 if there are no thumbnails.\r\n */\r\n scrollWithOffset(photoIdx) {\r\n if (!this.hasThumbs) {\r\n return 0;\r\n }\r\n const offset = (document.querySelector(\"#product-images-main\").offsetWidth - 118) / 2;\r\n const thumbList = document.getElementById(\"product-images-thumbnails\");\r\n const $el = thumbList.querySelector(`li[data-slide-index=\"${photoIdx}\"]`);\r\n const elLeft = $el.offsetLeft - thumbList.offsetLeft;\r\n return elLeft < 0 ? 0 : elLeft;\r\n }\r\n\r\n /**\r\n * Selects a photo by its index, updating the main image and thumbnail displays,\r\n * handling video playback for YouTube videos, managing download button visibility,\r\n * and attaching a download link to the image.\r\n *\r\n * @param {number} photoIdx - The index of the photo to select.\r\n */\r\n selectPhoto(photoIdx) {\r\n this.stopVideos();\r\n document.querySelectorAll(\"#product-images-main li, #product-images-thumbnails li\")\r\n .forEach(el => el.classList.remove(\"selected\"));\r\n \r\n const mainImage = document.querySelector(`#product-images-main li[data-slide-index=\"${photoIdx}\"]`);\r\n if (mainImage) {\r\n mainImage.classList.add(\"selected\");\r\n }\r\n \r\n const thumbnail = document.querySelector(`#product-images-thumbnails li[data-slide-index=\"${photoIdx}\"]`);\r\n if (thumbnail) {\r\n thumbnail.classList.add(\"selected\");\r\n }\r\n\r\n if (this.hasThumbs) {\r\n const thumbnails = document.getElementById(\"product-images-thumbnails\");\r\n thumbnails.scrollTo(this.scrollWithOffset(photoIdx), 0);\r\n }\r\n\r\n const image = this.images[photoIdx];\r\n if (image && image.dataset.mediatype === \"YouTube\") {\r\n this.playVideo(\"youtube-player-\" + photoIdx, image.dataset.src);\r\n document.getElementById(\"media-download\").style.display = \"none\";\r\n } else if (this.isLoggedIn) {\r\n const downloadButton = document.getElementById('image-download');\r\n\r\n if (downloadButton) {\r\n downloadButton.style.display = 'block';\r\n const downloadLink = downloadButton.querySelector('a');\r\n downloadLink.href = image ? image.dataset.src : mainImage.dataset.src;\r\n downloadLink.setAttribute('mediatype', 'jpeg');\r\n downloadLink.setAttribute('download', '');\r\n }\r\n }\r\n\r\n const imageLink = document.querySelector(`#product-images-main li[data-slide-index=\"${photoIdx}\"] a`);\r\n if (this.isMobile && imageLink) {\r\n imageLink.addEventListener('click', (event) => {\r\n event.preventDefault();\r\n });\r\n }\r\n\r\n // attach download link to image\r\n this.photoDownload();\r\n }\r\n\r\n /**\r\n * Preloads images to improve performance by caching them in the browser.\r\n * It iterates through the `this.images` array, filters out non-image media types,\r\n * and creates new `Image` objects with the `src` attribute set to the image URL.\r\n */\r\n preLoadImages() {\r\n for (const imgIdx in this.images) {\r\n if (this.images.hasOwnProperty(imgIdx)) {\r\n const image = this.images[imgIdx];\r\n if (image.dataset.mediatype !== \"Image\" && image.dataset.mediatype !== \"YouTube\") {\r\n continue;\r\n }\r\n\r\n const img = new Image(1, 1);\r\n img.src = image.dataset.src; \r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Plays a YouTube video in the specified container.\r\n * If the video is already loaded, it plays the video.\r\n * If the YouTube API is not available, it loads the API and then loads the player.\r\n * If the YouTube API is available, it loads the player.\r\n *\r\n * @param {HTMLElement} container - The HTML element that will contain the video player.\r\n * @param {string} videoId - The ID of the YouTube video to play.\r\n */\r\n playVideo(container, videoId) {\r\n if (this.players.hasOwnProperty(videoId)) {\r\n this.players[videoId].playVideo();\r\n return;\r\n }\r\n\r\n if (typeof YT === \"undefined\" || typeof YT.Player === \"undefined\") {\r\n window.onYouTubeIframeAPIReady = () => {\r\n this.loadPlayer(container, videoId);\r\n };\r\n const script = document.createElement(\"script\");\r\n script.src = \"//www.youtube.com/iframe_api\";\r\n document.body.appendChild(script);\r\n } else {\r\n this.loadPlayer(container, videoId);\r\n }\r\n }\r\n\r\n /**\r\n * Loads a YouTube video player into the specified container.\r\n *\r\n * @param {string} container - The ID of the HTML element where the player will be embedded.\r\n * @param {string} videoId - The YouTube video ID.\r\n */\r\n loadPlayer(container, videoId) {\r\n this.players[videoId] = new YT.Player(container, {\r\n videoId: videoId,\r\n width: \"100%\",\r\n events: {\r\n \"onReady\": (event) => { event.target.playVideo(); }\r\n },\r\n playerVars: {\r\n autoplay: 1,\r\n controls: 1,\r\n modestbranding: 0,\r\n mute: 0,\r\n rel: 0,\r\n showinfo: 0\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * @function wireUpUpdateBasket\r\n * @description Wires up the event listeners for the update basket functionality.\r\n * Attaches click event listeners to the \"Update Basket\", \"Enable Pre-Order No\", and \"Enable Pre-Order Yes\" buttons.\r\n * - \"Update Basket\" button triggers the saveBasket function with preOrder set to false.\r\n * - \"Enable Pre-Order No\" button closes the modal without enabling pre-order.\r\n * - \"Enable Pre-Order Yes\" button closes the modal and triggers the saveBasket function with preOrder set to true.\r\n * @returns {void}\r\n */\r\n wireUpUpdateBasket = () => {\r\n document.getElementById(\"btnUpdateBasket\").addEventListener(\"click\", () => {\r\n this.saveBasket(false);\r\n });\r\n\r\n document.getElementById(\"btnEnablePreOrderNo\").addEventListener(\"click\", () => {\r\n const modal = document.querySelector(\".modal.in\");\r\n const backdrop = document.querySelector(\".modal-backdrop\");\r\n modal.classList.remove(\"show\");\r\n modal.style.display = \"none\";\r\n backdrop.style.display = \"none\";\r\n backdrop.remove();\r\n });\r\n\r\n document.getElementById(\"btnEnablePreOrderYes\").addEventListener(\"click\", () => {\r\n const modal = document.querySelector(\".modal.in\");\r\n const backdrop = document.querySelector(\".modal-backdrop\");\r\n modal.classList.remove(\"show\");\r\n modal.style.display = \"none\";\r\n backdrop.style.display = \"none\";\r\n backdrop.remove();\r\n this.saveBasket(true);\r\n });\r\n };\r\n\r\n /**\r\n * Saves the basket with the current quantities for each entity.\r\n *\r\n * @param {boolean} [confirmDeliveryDate=false] - Indicates whether to confirm the delivery date.\r\n * @returns {void}\r\n */\r\n saveBasket = (confirmDeliveryDate = false) => {\r\n document.getElementById(\"btnUpdateBasket\").setAttribute(\"disabled\", \"disabled\");\r\n document.getElementById(\"spanUpdateBasket\").textContent = this.basketData.Translations.Updating;\r\n\r\n const saveBasketRequest = {\r\n \"ConfirmDeliveryDate\": confirmDeliveryDate,\r\n \"ProductCode\": document.querySelector(\".productBasket\").dataset.productcode,\r\n \"RenderMiniBasket\": true,\r\n \"RenderProductBasket\": true,\r\n \"EntityQuantityMapping\": {}\r\n };\r\n\r\n document.querySelectorAll(\".productBasket input[data-entity-id]\").forEach(input => {\r\n const entityId = input.dataset.entityId;\r\n let qty = parseInt(input.value);\r\n if (isNaN(qty)) {\r\n qty = 0;\r\n }\r\n saveBasketRequest.EntityQuantityMapping[entityId] = qty;\r\n });\r\n\r\n ajax.post(\"/api/ssi/basket/save\",\r\n saveBasketRequest,\r\n (res) => {\r\n if (res.Changes && res.Changes.length === 1 && res.Changes[0].startsWith(\"LastShipmentDate;\")) {\r\n const changeArr = res.Changes[0].split(';');\r\n document.querySelector(\".lastShipmentDate\").textContent = changeArr[1]; \r\n $('#addToBasketAskPreOrder').modal({\r\n backdrop: 'static',\r\n keyboard: false\r\n });\r\n\r\n return;\r\n }\r\n\r\n document.getElementById(\"miniBasketInner\").innerHTML = res.MiniBasketHtml;\r\n document.getElementById(\"btnUpdateBasket\").classList.add(\"hidden\");\r\n document.getElementById(\"btnUpdateBasketGoToBasket\").style.display = \"block\";\r\n document.getElementById(\"pnlProductDetailsBasketProduct\").innerHTML = res.ProductBasketHtml;\r\n\r\n document.querySelectorAll(\".productStock div[data-badge-colour]\").forEach(el => {\r\n const colour = el.getAttribute(\"data-badge-colour\");\r\n if (typeof res.UnitsPerColour[colour] === \"undefined\") {\r\n el.classList.add(\"hidden\");\r\n } else {\r\n el.classList.remove(\"hidden\");\r\n el.textContent = res.UnitsPerColour[colour];\r\n }\r\n });\r\n\r\n this.wireUpUpdateBasket();\r\n },\r\n undefined,\r\n (msg) => {\r\n document.getElementById(\"btnUpdateBasket\").removeAttribute(\"disabled\");\r\n document.getElementById(\"spanUpdateBasket\").textContent = this.basketData.Translations.Update;\r\n\r\n if (msg.NewQuantities) {\r\n for (const entityId in msg.NewQuantities) {\r\n if (msg.NewQuantities.hasOwnProperty(entityId)) {\r\n const newQuantity = msg.NewQuantities[entityId];\r\n const inputElement = document.querySelector(`input[data-entity-id=\"${entityId}\"]`);\r\n if (inputElement) {\r\n inputElement.setAttribute(\"max\", newQuantity);\r\n inputElement.value = newQuantity;\r\n }\r\n }\r\n }\r\n }\r\n });\r\n };\r\n}\r\n\r\nexport default ProductDetail;","// ajax.js\r\n\"use strict\";\r\n\r\nimport $ from \"jquery\";\r\nimport toastr from \"toastr\";\r\nimport { Spinner } from \"spin.js\";\r\n\r\nlet translations = {};\r\n\r\nexport const setTranslations = function(value) {\r\n translations = value;\r\n}\r\n\r\nexport const ajax = {\r\n doNotifications(res) {\r\n if (typeof res.Notifications === \"undefined\") {\r\n return;\r\n }\r\n\r\n for (const x in res.Notifications) {\r\n if (res.Notifications.hasOwnProperty(x)) {\r\n const n = res.Notifications[x];\r\n switch (n.NotificationType) {\r\n case \"Success\":\r\n toastr.success(n.Text, n.Title);\r\n break;\r\n case \"Info\":\r\n toastr.info(n.Text);\r\n break;\r\n case \"Warning\":\r\n toastr.warning(n.Text);\r\n break;\r\n case \"Error\":\r\n toastr.error(n.Text);\r\n break;\r\n }\r\n }\r\n }\r\n },\r\n\r\n defaultError(res) {\r\n if (typeof res.Notifications !== \"undefined\") {\r\n ajax.doNotifications(res);\r\n return;\r\n }\r\n\r\n if (\r\n typeof res.statusText !== \"undefined\" &&\r\n res.statusText === \"abort\"\r\n ) {\r\n console.log(\"Aborted\");\r\n return;\r\n }\r\n\r\n if (\r\n typeof res.status !== \"undefined\" &&\r\n res.status.toString() !== \"400\" &&\r\n res.status.toString().substring(0, 1) === \"4\"\r\n ) {\r\n toastr.error(res.statusText, res.status);\r\n return;\r\n }\r\n\r\n if (!res.responseText) {\r\n toastr.error(\r\n translations.Translations.FormUnknownErrorBody,\r\n translations.Translations.FormUnknownErrorTitle\r\n );\r\n\r\n return;\r\n }\r\n\r\n try {\r\n const obj = JSON.parse(res.responseText);\r\n let message = \"\";\r\n if (typeof obj.ExceptionType !== \"undefined\") {\r\n message = obj.ExceptionType + \": \";\r\n }\r\n\r\n message = message + obj.Message;\r\n\r\n if (typeof obj.StackTrace !== \"undefined\") {\r\n message = message + obj.StackTrace;\r\n }\r\n\r\n res.Notifications = [\r\n {\r\n NotificationType: \"Error\",\r\n Text: message,\r\n },\r\n ];\r\n\r\n ajax.doNotifications(res);\r\n } catch (e) {\r\n toastr.error(res.statusText, res.status);\r\n \r\n return;\r\n }\r\n },\r\n\r\n defaultSuccess(res) {\r\n ajax.doNotifications(res);\r\n },\r\n\r\n showLoader() {\r\n const target = document.getElementById(\"ajaxloader\");\r\n new Spinner().spin(target);\r\n \r\n $(\"#ajaxloader\").show();\r\n },\r\n\r\n getPostObject(url, success, error) {\r\n return {\r\n type: \"POST\",\r\n url: url,\r\n success(res) {\r\n ajax.defaultSuccess(res);\r\n if (typeof success !== \"undefined\") {\r\n success(res);\r\n }\r\n },\r\n error(res) {\r\n ajax.defaultError(res);\r\n if (typeof error !== \"undefined\") {\r\n error(res);\r\n }\r\n },\r\n };\r\n },\r\n\r\n post(url, data, success, error, always) {\r\n const timeout = setTimeout(() => {\r\n ajax.showLoader();\r\n }, 500);\r\n\r\n const ajaxObject = ajax.getPostObject(url, success, error);\r\n ajaxObject.contentType = \"application/json; charset=utf-8\";\r\n ajaxObject.dataType = \"text json\";\r\n ajaxObject.data = JSON.stringify(data);\r\n\r\n return $.ajax(ajaxObject).always((res) => {\r\n clearTimeout(timeout);\r\n $(\"#ajaxloader\").hide();\r\n if (typeof always !== \"undefined\") {\r\n always(res);\r\n }\r\n });\r\n },\r\n\r\n postSingle(url, value, success, error, always) {\r\n const timeout = setTimeout(() => {\r\n ajax.showLoader();\r\n }, 500);\r\n\r\n const ajaxObject = ajax.getPostObject(url, success, error);\r\n ajaxObject.dataType = \"json\";\r\n ajaxObject.data = \"=\" + value;\r\n ajaxObject.contentType = \"application/x-www-form-urlencoded\";\r\n\r\n return $.ajax(ajaxObject).always((res) => {\r\n clearTimeout(timeout);\r\n $(\"#ajaxloader\").hide();\r\n if (typeof always !== \"undefined\") {\r\n always(res);\r\n }\r\n });\r\n },\r\n\r\n postForm(url, formId, success, error, always) {\r\n const timeout = setTimeout(() => {\r\n ajax.showLoader();\r\n }, 500);\r\n\r\n const ajaxObject = ajax.getPostObject(url, success, error);\r\n ajaxObject.data = $(formId).serialize();\r\n\r\n return $.ajax(ajaxObject).always((res) => {\r\n clearTimeout(timeout);\r\n $(\"#ajaxloader\").hide();\r\n if (typeof always !== \"undefined\") {\r\n always(res);\r\n }\r\n });\r\n },\r\n\r\n postFormData(url, data, success, error, always) {\r\n const timeout = setTimeout(() => {\r\n ajax.showLoader();\r\n }, 500);\r\n\r\n const ajaxObject = ajax.getPostObject(url, success, error);\r\n ajaxObject.cache = false;\r\n ajaxObject.contentType = false;\r\n ajaxObject.processData = false;\r\n ajaxObject.dataType = \"text json\";\r\n ajaxObject.data = data;\r\n\r\n return $.ajax(ajaxObject).always((res) => {\r\n clearTimeout(timeout);\r\n $(\"#ajaxloader\").hide();\r\n if (typeof always !== \"undefined\") {\r\n always(res);\r\n }\r\n });\r\n },\r\n};\r\n\r\nexport default {\r\n ajax,\r\n setTranslations\r\n};\r\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_toConsumableArray","r","Array","isArray","_arrayLikeToArray","_arrayWithoutHoles","from","_iterableToArray","a","t","toString","call","slice","name","test","_unsupportedIterableToArray","TypeError","_nonIterableSpread","length","e","n","_regeneratorRuntime","Object","hasOwnProperty","defineProperty","value","i","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","_defineProperties","_toPropertyKey","key","toPrimitive","String","Number","_toPrimitive","ToolTip","selector","_this","_classCallCheck","this","tooltip","document","getElementById","tooltipContent","querySelector","elements","querySelectorAll","activeElement","navbarHeight","offsetHeight","element","addEventListener","event","handleClick","handleMouseOver","handleMouseOut","handleDocumentClick","_callee","anchor","_yield$computePositio","x","_context","computePosition","placement","middleware","offset","flip","shift","padding","style","left","concat","top","classList","remove","_showPopover","arguments","apply","_next","_throw","_x","content","currentTarget","getAttribute","innerHTML","showPopover","add","preventDefault","target","some","el","contains","_this2","_ref","assign","window","scrollX","scrollY","display","setUpTooltip","_defineProperty","ResizeObserver","ProductDetail","basketData","images","saveBasket","modal","backdrop","confirmDeliveryDate","undefined","setAttribute","textContent","Translations","Updating","saveBasketRequest","dataset","productcode","input","entityId","qty","parseInt","EntityQuantityMapping","ajax","post","res","Changes","startsWith","changeArr","split","$","keyboard","MiniBasketHtml","ProductBasketHtml","colour","UnitsPerColour","wireUpUpdateBasket","msg","removeAttribute","Update","NewQuantities","newQuantity","inputElement","isMobile","body","isLoggedIn","hasThumbs","hasRightClicked","players","selectPhoto","enableUpdateBasket","stopPropagation","photoIdx","productColourMenu","colourMenuItems","item","otherItem","stockDetails","children","click","table","tableHtml","outerHTML","assortmentCode","assortmentTooltip","createElement","parentNode","insertBefore","nextSibling","template","preLoadImages","tabs","tab","options","gallery","bgOpacity","pswpModule","PhotoSwipeLightbox","init","_this3","dismissed","localStorage","getItem","productImage","button","downloadSection","jpegInfo","dismissButton","setItem","videoId","pauseVideo","offsetWidth","thumbList","elLeft","offsetLeft","stopVideos","mainImage","thumbnail","scrollTo","scrollWithOffset","image","mediatype","playVideo","src","downloadButton","downloadLink","href","imageLink","photoDownload","imgIdx","Image","container","_this4","YT","Player","onYouTubeIframeAPIReady","loadPlayer","script","appendChild","width","events","playerVars","autoplay","controls","modestbranding","mute","rel","showinfo","translations","setTranslations","doNotifications","Notifications","NotificationType","toastr","Text","Title","defaultError","statusText","status","substring","responseText","obj","JSON","parse","message","ExceptionType","Message","StackTrace","FormUnknownErrorBody","FormUnknownErrorTitle","defaultSuccess","showLoader","Spinner","spin","show","getPostObject","url","success","error","data","always","timeout","setTimeout","ajaxObject","contentType","dataType","stringify","clearTimeout","hide","postSingle","postForm","formId","serialize","postFormData","cache","processData"],"sourceRoot":""}