{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./cartridges/app_bardot/cartridge/client/default/js/components/customProductImages.js","webpack:///./cartridges/app_bardot/cartridge/client/default/js/CustomSlickcarousel.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","handleProductMissingImages","imageClass","missingImages","document","getElementsByClassName","Array","from","forEach","missingImage","addEventListener","e","missingImageSource","this","dataset","missingimg","target","src","setAttribute","handleProductSwapMissingImages","tileImageSwaps","tileImageSwap","customProductImages","require","fixCarouselContentTiles","carouselContainer","$tileBodyProductName","$tileBodyPrice","$tileBodyPromo","$tileBodyMoreColor","$tileBodyProductBadge","pdSlickCarousel","querySelectorAll","length","$","fn","syncHeight","arr","makeArray","sort","a","b","height","unSyncHeight","css","el","find","ready","sliderInterval","setInterval","html","empty","slick","infinite","arrows","appendArrows","prevArrow","nextArrow","variableWidth","slidesToShow","slidesToScroll","responsive","breakpoint","settings","removeClass","addClass","clearInterval"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN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AcrB,EAAE,uBAChBsB,UAAW,4DACXC,UAAW,6DACXC,eAAe,EACfC,aAAc,EACdC,eAAgB,EAChBC,WAAY,CAAC,CACTC,WAAY,IACZC,SAAU,CACNJ,aAAc,IAGtB,CACIG,WAAY,KACZC,SAAU,CACNJ,aAAc,OAI1BzB,EAAE,+BAA+B8B,YAAY,UAC7C9B,EAAE,+BAA+B+B,SAAS,WAC1CC,cAAclB,GACd1B,EAAoBH,iCACpBK,OAEL","file":"default\\js\\CustomSlickcarousel.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 84);\n","'use strict';\r\n\r\n/**\r\n * Function is used to handle missing images when ajax update on content happen.\r\n * Error event listener using because of Image onerror fallback will not work on ajax loaded content.\r\n * This function called in PDP page, Cart Page.\r\n * This code trigger when PDP on load, PDP update attributes, Cart Edit Popup, Cart Edit Popup update attributes.\r\n* @param {string} imageClass - css class of image those to check missing images.\r\n */\r\nexports.handleProductMissingImages = function (imageClass) {\r\n var missingImages = document.getElementsByClassName(imageClass);\r\n Array.from(missingImages).forEach(function (missingImage) {\r\n missingImage.addEventListener('error', function (e) {\r\n var missingImageSource = this.dataset.missingimg;\r\n e.target.src = missingImageSource;\r\n if (imageClass === 'custom-zoom-image') {\r\n e.target.setAttribute('data-zoomimg', missingImageSource);\r\n }\r\n });\r\n });\r\n};\r\n\r\n\r\n/**\r\n * Function is used to handle missing images when hover on product tile image swap.\r\n * Error event listener using because of swap image using data attributes for first image and second image.\r\n * This function called in PLP Page and PDP pages (Reccomendation Carousel)\r\n * This code trigger when PDP on load, PLP load more, update filters, update sorting\r\n */\r\nexports.handleProductSwapMissingImages = function () {\r\n var tileImageSwaps = document.getElementsByClassName('tile-image-swap');\r\n Array.from(tileImageSwaps).forEach(function (tileImageSwap) {\r\n tileImageSwap.addEventListener('error', function (e) {\r\n var missingImage = this.dataset.missingimg;\r\n e.target.src = missingImage;\r\n e.target.setAttribute('data-first-img', missingImage);\r\n e.target.setAttribute('data-second-img', missingImage);\r\n });\r\n });\r\n};\r\n","'use strict';\r\nvar customProductImages = require('./components/customProductImages');\r\n\r\n/**\r\n * Align Carousel Tile elements height\r\n* @param {Object} carouselContainer - DOM element\r\n */\r\nfunction alignCarouselTile(carouselContainer) {\r\n // initialize syncheight function\r\n $.fn.syncHeight = function () {\r\n var arr = $.makeArray(this);\r\n arr.sort(function (a, b) {\r\n return $(a).height() - $(b).height();\r\n });\r\n this.height($(arr[arr.length - 1]).height());\r\n return this;\r\n };\r\n $.fn.unSyncHeight = function () {\r\n this.css('height', '');\r\n return this;\r\n };\r\n var $tileBodyProductName;\r\n var $tileBodyPrice;\r\n var $tileBodyPromo;\r\n var $tileBodyMoreColor;\r\n var $tileBodyProductBadge;\r\n carouselContainer.forEach(el => {\r\n $tileBodyProductName = $(el).find('.tile-body-productname');\r\n $tileBodyPrice = $(el).find('.tile-body-content-top .price');\r\n $tileBodyPromo = $(el).find('.tile-body-promo-callout-plp');\r\n $tileBodyMoreColor = $(el).find('.tile-body-more-color');\r\n $tileBodyProductBadge = $(el).find('.tile-body-product-badge');\r\n $tileBodyProductName.unSyncHeight().syncHeight();\r\n $tileBodyPrice.unSyncHeight().syncHeight();\r\n $tileBodyPromo.unSyncHeight().syncHeight();\r\n $tileBodyMoreColor.unSyncHeight().syncHeight();\r\n $tileBodyProductBadge.unSyncHeight().syncHeight();\r\n });\r\n}\r\n\r\n/**\r\n * Find and Fix Carousel Tile elements height\r\n */\r\nfunction fixCarouselContentTiles() {\r\n var pdSlickCarousel = document.querySelectorAll('div.carousel-inner');\r\n if (pdSlickCarousel.length > 0) {\r\n alignCarouselTile(pdSlickCarousel);\r\n }\r\n}\r\n\r\n/**\r\n *Function used to initialize slick carousel in Page designer.\r\n */\r\nfunction initSlick() {\r\n var sliderInterval = setInterval(function () {\r\n if ($('.experience-commerce_layouts-slickCarousel .carousel-inner').html() && $('.experience-commerce_layouts-slickCarousel .carousel-inner').html().length > 0) {\r\n $('.slick-arrow-slot-1').empty();\r\n $('.experience-commerce_layouts-slickCarousel .carousel-inner').slick({\r\n infinite: true,\r\n arrows: true,\r\n appendArrows: $('.slick-arrow-slot-1'),\r\n prevArrow: '',\r\n nextArrow: '',\r\n variableWidth: true,\r\n slidesToShow: 5,\r\n slidesToScroll: 1,\r\n responsive: [{\r\n breakpoint: 769,\r\n settings: {\r\n slidesToShow: 2\r\n }\r\n },\r\n {\r\n breakpoint: 1025,\r\n settings: {\r\n slidesToShow: 3\r\n }\r\n }]\r\n });\r\n $('.slick-carousel-slides-hide').removeClass('d-none');\r\n $('.slick-carousel-slides-hide').addClass('d-block');\r\n clearInterval(sliderInterval);\r\n customProductImages.handleProductSwapMissingImages();\r\n fixCarouselContentTiles();\r\n }\r\n }, 1000);\r\n}\r\n\r\n$(document).ready(function () {\r\n initSlick();\r\n});\r\n"],"sourceRoot":""}