{"version":3,"sources":["webpack:///webpack/bootstrap 04b84c8e21d6ecfb2423?78fc*************************","webpack:///./assets/scripts/widgets.js","webpack:///./assets/scripts/widgets/recentlyViewed.js?ee04"],"names":["widgets","$","recentlyViewed","$slides","owl","responsive","items","Foundation","setTimeout","el","rellax","center","$el","cards","cardsLength","startPosition","parseInt","owlConfig","loop","margin","slideBy","autoWidth","target","e","eventAction","dataLayer","event","gaHitType","event_category","event_label","$widgets","images","texts","boxes","$widget","count","current","move","imageLeft","imageRight","left","window","lang","country","item","locale","event_action","navigator","tag","document","firstScriptTag","isDesktopDevice","players","videoID","YT","height","width","playerVars","controls","disablekb","modestbranding","showinfo","playsinline","autoplay","rel","events","onStateChange","state","slider","dots","AOS","disable","Widgets","RecentlyViewed","Math"],"mappings":"aAIA,cAGA,QACA,oBAGA,YACA,UADA,CAEA,IAFA,CAGA,SAHA,EAaA,MANA,mCAMA,CAHA,WAGA,UACA,CAxBA,SAqCA,MATA,MASA,CANA,KAMA,CAHA,MAGA,K,uaCtCA,Q,wDAEMA,E,WACJ,YAAc,sBACZC,kBAAkB,UAAM,CACtB,eADsB,CAEtB,gBAFsB,CAGtB,kBAHsB,CAItB,WAJsB,CAKtB,YALsB,CAMtB,qBANsB,CAOtB,UAPsB,CAQtB,OARsB,CAStBC,eATFD,EAWD,C,+CAEa,IACNE,GAAUF,EAAhB,SAAgBA,CADJ,CAENG,EAAM,cAAoB,gBAG9BC,WAAY,CACV,EAAG,CACDC,MAAO,CADN,CADO,CAIV,IAAK,CACHA,MAAO,CADJ,CAJK,CAHkB,CAApB,CAFA,CA6B4C,CAAxD,CAAI,oBAAmBC,sBAAnB,QA7BQ,EA8BVC,WAAW,UAAM,IACTC,GAAKR,gDAAX,CAAWA,CADI,CAETS,EAAS,aAAe,CAC5BC,OAAQV,0BADoB,CAAf,CAFjBO,MAOH,C,sCAEc,CACbP,gCAAgC,aAAW,CACzC,GAAMW,GAAN,KACAA,kBAFyC,CAKzCA,2CALyC,IAOnCC,G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,CACV,EAAG,CACDC,MADC,EAEDa,OAAQ,CAFP,CADO,CAKV,IAAK,CACHb,MADG,EAEHa,OAAQ,EAFL,CALK,CASV,IAAK,CACHb,MADG,EAEHa,OAAQ,EAFL,CATK,CAHqC,CAApC,CAN8C,CAwB7DiD,4BAAkC,WAAO,CACvChC,EAAUb,OAAVa,KADuC,CAEvCF,+BAAqCE,EAArCF,EAFFkC,EAxB6D,CA4B7D,GAAI/B,aAAa,CACfH,+BAAqCE,EAArCF,EADe,CAEfkC,gCAFF,EAIAlC,+BAhC6D,CAiC7DA,6BAAmC,UAAM,CACnCE,EAAJ,CAAIA,GADmC,GAEvCA,GAFuC,CAGvCC,GAHuC,CAAzCH,EAjC6D,CAsC7DA,6BAAmC,UAAM,CACvC,CAAIE,IADmC,GAEvCA,GAFuC,CAGvCC,GAHuC,CAAzCH,EAtCFjC,EA4CD,C,SAIGC,EAAN,K,GACeA,O","file":"widgets.min.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\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 04b84c8e21d6ecfb2423","import recentlyViewed from \"./widgets/recentlyViewed\";\n\nclass widgets {\n  constructor() {\n    $(document).ready(() => {\n      this.shopTheLook();\n      this.customerCare();\n      this.threeColSlider();\n      this.circles();\n      this.videoBox();\n      this.productSlotSlider();\n      this.rellax();\n      this.aos();\n      recentlyViewed.run();\n    });\n  }\n\n  shopTheLook() {\n    const $slides = $(\".slides\");\n    const owl = $slides.owlCarousel({\n      loop: true,\n      nav: true,\n      responsive: {\n        0: {\n          items: 1\n        },\n        600: {\n          items: 3\n        }\n      }\n    });\n\n    /*owl.on(\"changed.owl.carousel\", event => {\n      if (Foundation.MediaQuery.current !== \"small\") return;\n      const $parent = $slides.parent(\".widget-3-col-img-shopbylook\");\n      if ($parent.length) {\n        const $bigLabel = $parent.find(\".big-text\");\n        $bigLabel.stop(true).animate(\n          {\n            textIndent: -((100 / event.page.count) * event.page.index) + \"%\"\n          },\n          1000\n        );\n      }\n    });*/\n\n    if ([\"medium\"].indexOf(Foundation.MediaQuery.current) > -1) {\n      setTimeout(() => {\n        const el = $(\".widget-3-col-img-shopbylook [data-rellax]\")[0];\n        const rellax = new Rellax(el, {\n          center: $(el).data(\"rellax-center\")\n        });\n      }, 1000);\n    }\n  }\n\n  customerCare() {\n    $(\".widget-customer-care\").each((i, el) => {\n      const $el = $(el);\n      $el.addClass(\"hide\");\n\n      // TR-2175 remove empty card items (localization)\n      $el.children(\"div.box:not(:has(a))\").remove();\n\n      const cards = $el.children(\".box\").remove();\n      const cardsLength = cards.length;\n      const startPosition = cardsLength % 2 !== 0 ? parseInt((cardsLength / 2).toFixed()) : 0;\n      const center = startPosition > 0;\n      const owlConfig = {\n        items: 1,\n        center: true,\n        loop: cardsLength > 2, // TR-2175 le card si ripetono in successione anche se ne mettiamo 1 o 2\n        dots: false,\n        margin: 40,\n        autoWidth: true,\n        slideBy: 1,\n        responsive: {\n          600: {\n            items: 5,\n            center: true,\n            loop: true,\n            autoWidth: true\n          },\n          1000: {\n            items: center ? 5 : cardsLength,\n            center,\n            loop: false,\n            autoWidth: false\n          }\n        }\n      };\n\n      if (center) {\n        owlConfig.responsive[1000].startPosition = startPosition - 1;\n      }\n\n      // this is not really nice but us necessary to svoid all contate assets rework\n      $el.append(\n        '<div class=\"grid-container\"><div class=\"widget-carousel\"></div></div>'\n      );\n      cards.appendTo($el.find(\".widget-carousel\"));\n\n      $el.find(\".widget-carousel\").owlCarousel(owlConfig);\n      $el.removeClass(\"hide\");\n\n      $el.find(\"a\").on(\"click.widgetCustomerCare\", function(e) {\n\n        const target = $(e.currentTarget);\n        const eventAction = target.find(\"h5\").text();\n        dataLayer.push({\n          event: \"asyncAction\",\n          gaHitType: \"event\",\n          event_category: \"click_footer\",\n          event_action: eventAction,\n          event_label: \"\"\n        });\n      });\n    });\n  }\n\n\n  threeColSlider() {\n    const $widgets = $(\".widget-3-col-img-txt-img-slider\");\n\n    if ([\"small\", \"medium\"].indexOf(Foundation.MediaQuery.current) > -1) {\n      const images = $widgets.find(\".image-left img\");\n      const texts = $widgets.find(\".text .inner\");\n\n      const boxes = [];\n      images.each((i, el) => {\n        boxes.push(\n          $('<div class=\"box\" />')\n            .append(el)\n            .append(texts[i])\n        );\n      });\n      $widgets.empty().append(boxes);\n\n      $widgets.owlCarousel({\n        items: 2,\n        center: true,\n        autoWidth: true,\n        responsive: {\n          0: {\n            items: 1,\n            margin: 20\n          },\n          480: {\n            margin: 40\n          },\n          768: {\n            margin: 15,\n            autoWidth: false\n          }\n        }\n      });\n    } else {\n      $widgets.each((i, el) => {\n        const $widget = $(el);\n        const count = $widget.find(\".image-left .wrap img\").length;\n        $widget.find(\".widget-total\").text(count);\n        $widget\n          .find(\".image-left .wrap, .image-right .wrap\")\n          .css(\"width\", \"100%\");\n        let current = 0;\n\n        $widget.find(\".text .inner\").each((i, el) => {\n          if (i) $(el).hide();\n          $(el).addClass(\"text-\" + i);\n        });\n\n        var move = () => {\n          $widget.find(\".widget-current\").text(current + 1);\n\n          let imageLeft = $widget.find(\".image-left .wrap\");\n          let imageRight = $widget.find(\".image-right .wrap\");\n\n          $widget.find(\".image-left .wrap\").css({\n            left:\n              -imageLeft\n                .find(\"img\")\n                .first()\n                .width() *\n                current +\n              \"px\"\n          });\n\n          $widget.find(\".image-right .wrap\").css({\n            left:\n              -imageRight\n                .find(\"img\")\n                .first()\n                .width() *\n                current +\n              \"px\"\n          });\n\n          $widget.find(\".text .inner\").hide();\n          $widget.find(\".text-\" + current).fadeIn(1000);\n        };\n\n        $widget.find(\".widget-next\").click(() => {\n          if (current + 1 >= count) return;\n          current++;\n          move();\n        });\n\n        $widget.find(\".widget-prev\").click(() => {\n          if (current - 1 < 0) return;\n          current--;\n          move();\n        });\n      });\n    }\n\n    // Refresh page to re-render threeColSlider component on screen orientation changed\n    // TODO: refactor threeColSlider component to be responsive (without page refresh)\n    window.addEventListener(\"orientationchange\", function() {\n      window.location.reload(true);\n    });\n  }\n\n  circles() {\n    if (Foundation.MediaQuery.current !== \"small\") return;\n\n    $(\".widget-circles .items\").owlCarousel({\n      loop: true,\n      nav: false,\n      autoWidth: true,\n      items: 3\n    });\n\n    $(\".widget-circles .items .owl-item a\").on(\"click\", function(e) {\n      var lang = $(\"html\").attr(\"lang\");\n      var country = $(\"body\").attr(\"data-country\");\n      var locale = lang + \"_\" + country;\n      if (dataLayer && e.currentTarget && e.currentTarget.innerText) {\n        var item = locale + \"|\" + e.currentTarget.innerText.toLowerCase();\n        dataLayer.push({\n          event: \"asyncAction\",\n          gaHitType: \"event\",\n          event_category: \"pics_for_you\",\n          event_action: \"click\",\n          event_label: item\n        });\n      }\n    });\n  }\n\n  videoBox() {\n    if (!$(\"[data-video]\").length) return;\n\n    const tag = document.createElement(\"script\");\n    tag.src = \"https://www.youtube.com/player_api\";\n    const firstScriptTag = document.getElementsByTagName(\"script\")[0];\n    firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n    const isDesktopDevice = Foundation.MediaQuery.is('xlarge up');\n\n    function iOS() {\n      return [\n        'iPad Simulator',\n        'iPhone Simulator',\n        'iPod Simulator',\n        'iPad',\n        'iPhone',\n        'iPod'\n      ].includes(navigator.platform)\n      // iPad on iOS 13 detection\n      || (navigator.userAgent.includes(\"Mac\") && \"ontouchend\" in document)\n    }\n\n    function onPlayerReady(event) {\n      event.target.playVideo();\n    }\n\n    const players = {};\n    window.onYouTubePlayerAPIReady = () => {\n      $(\"[data-video]\").each((i, el) => {\n        const videoID = $(el).data(\"video\");\n        $(el).append('<button class=\"play-btn\">Play</button>');\n        $(el).append(`<div class=\"video-wrapper\" id=\"${videoID}\"></div>`);\n\n        setTimeout(() => {\n          if (iOS()) {\n            //Player initialization on iOS mobile devices \n            if (typeof players[videoID] === \"undefined\") {\n              players[videoID] = new YT.Player(videoID, {\n                height: \"100%\",\n                width: \"100%\",\n                videoId: videoID,\n                playerVars: {\n                  controls: 0,\n                  disablekb: 1,\n                  modestbranding: 1,\n                  showinfo: 0,\n                  playsinline: 0,\n                  autoplay: 1,\n                  rel: 0\n                },\n                events: {\n                  'onReady': onPlayerReady,\n                  onStateChange: state => {\n                    if (state.data === YT.PlayerState.PLAYING) {\n                      $(el)\n                        .addClass(\"video-playing\")\n                        .removeClass(\"video-ended\");\n                    } else {\n                      $(el)\n                        .removeClass(\"video-playing\")\n                        .addClass(\"video-ended\");\n                    }\n                  }\n                }\n              });\n            }\n        } else {\n          if (!isDesktopDevice) {\n            //Player initialization on Android mobile devices \n            if (typeof players[videoID] === \"undefined\") {\n              players[videoID] = new YT.Player(videoID, {\n                height: \"100%\",\n                width: \"100%\",\n                videoId: videoID,\n                playerVars: {\n                  controls: 0,\n                  disablekb: 1,\n                  modestbranding: 1,\n                  showinfo: 0,\n                  autoplay: 1,\n                  rel: 0\n                },\n                events: {\n                  onStateChange: state => {\n                    if (state.data === YT.PlayerState.PLAYING) {\n                      $(el)\n                        .addClass(\"video-playing\")\n                        .removeClass(\"video-ended\");\n                    } else {\n                      $(el)\n                        .removeClass(\"video-playing\")\n                        .addClass(\"video-ended\");\n                    }\n                  }\n                }\n              });\n            }\n          } else {\n          //Player initialization on desktop devices \n          if (typeof players[videoID] === \"undefined\") {\n            players[videoID] = new YT.Player(videoID, {\n              height: \"100%\",\n              width: \"100%\",\n              videoId: videoID,\n              playerVars: {\n                controls: 0,\n                disablekb: 1,\n                modestbranding: 1,\n                showinfo: 0,\n                autoplay: 0,\n                rel: 0\n              },\n              events: {\n                onStateChange: state => {\n                  if (state.data === YT.PlayerState.PLAYING) {\n                    $(el)\n                      .addClass(\"video-playing\")\n                      .removeClass(\"video-ended\");\n                  } else {\n                    $(el)\n                      .removeClass(\"video-playing\")\n                      .addClass(\"video-ended\");\n                  }\n                }\n              }\n            });\n          }\n          }\n        }\n        }, 2000);\n\n\n\n        $(el)\n          .find(\".play-btn\")\n          .on(\"click\",\n            {\n              videoID,\n              el\n            },\n            e => {\n              players[e.data.videoID].playVideo();\n            }\n          );\n      });\n    };\n  }\n  productSlotSlider() {\n    const $widget = $(\".products-slot-slider\");\n    $widget\n      .find(\".widget-total\")\n      .text($(\".products-slot-slider .slider > div\").length);\n\n    const slider = $widget.find(\".slider\").owlCarousel({\n      items: 1,\n      loop: false,\n      nav: false,\n      responsive: {\n        0: {\n          items: 2,\n          margin: 10,\n          dots: true\n        },\n        768: {\n          items: 4,\n          margin: 15,\n          dots: false\n        },\n        1000: {\n          items: 1,\n          dots: false\n        }\n      }\n    });\n\n    slider.on(\"changed.owl.carousel\", e => {\n      $widget.find(\".widget-current\").text(e.item.index + 1);\n    });\n\n    $widget.find(\".widget-ctrl .widget-next\").click(e => {\n      slider.trigger(\"next.owl.carousel\");\n    });\n    $widget.find(\".widget-ctrl .widget-prev\").click(e => {\n      slider.trigger(\"prev.owl.carousel\");\n    });\n  }\n\n  rellax() {\n    if (\n      !$(\"[data-rellax]\").length ||\n      [\"small\", \"medium\"].indexOf(Foundation.MediaQuery.current) > -1\n    )\n      return;\n    $(\"[data-rellax]\").each((i, el) => {\n      setTimeout(() => {\n        const rellax = new Rellax(el, {\n          center: $(el).data(\"rellax-center\")\n        });\n      });\n    });\n  }\n\n  aos() {\n    if (typeof AOS !== 'undefined') {\n      AOS.init({\n        disable: \"phone\"\n      });\n    }\n  }\n}\n\nconst Widgets = new widgets();\nexport default Widgets;\n\n\n// WEBPACK FOOTER //\n// ./assets/scripts/widgets.js","class RecentlyViewed {\n  run() {\n    this.initialize();\n\n    $(window).off('recentlyviewed:initialize').on('recentlyviewed:initialize', (e, data) => {\n      this.initialize();\n    });\n  }\n\n\n  initialize() {\n    $('.widget-recently-viewed:not(.initialized)').each((i, el) => {\n      const $widget = $(el);\n      $widget.addClass('initialized');\n\n      const count = Math.round($widget.find('.slider').children().length / 4);\n      let current = 0;\n      const slider = $widget.find('.slider').owlCarousel({\n        loop: false,\n        nav: false,\n        responsive: {\n          0: {\n            items: 2,\n            margin: 5\n          },\n          600: {\n            items: 4,\n            margin: 16\n          },\n          800: {\n            items: 4,\n            margin: 40\n          }\n        }\n      });\n      slider.on('changed.owl.carousel', (e) => {\n        current = e.page.index;\n        $widget.find('.widget-current').text(current + 1);\n      });\n      var move = () => {\n        $widget.find('.widget-current').text(current + 1);\n        slider.trigger('to.owl.carousel', [current]);\n      };\n      $widget.find('.widget-total').text(count);\n      $widget.find('.widget-next').click(() => {\n        if (current + 1 >= count) { return; }\n        current++;\n        move();\n      });\n      $widget.find('.widget-prev').click(() => {\n        if (current - 1 < 0) { return; }\n        current--;\n        move();\n      });\n    });\n  }\n}\n\n\nconst recentlyViewed = new RecentlyViewed();\nexport default recentlyViewed;\n\n\n\n// WEBPACK FOOTER //\n// ./assets/scripts/widgets/recentlyViewed.js"],"sourceRoot":""}