{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/app.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","jQuery","window","on","this","scrollTop","addClass","removeClass","Swiper","loop","autoplay","delay","navigation","nextEl","slidesPerView","prevEl","breakpoints","767","992","length","SwiperHomeVideoThumbs","simulateTouch","threshold","watchSlidesVisibility","watchSlidesProgress","spaceBetween","thumbs","swiper","parallax","autoHeight","1300","click","page","attr","taxonomy","terms","button","maxPages","data","action","one","ajax","url","ajaxurl","type","beforeSend","text","success","response","append","hide","console","log","val","siblings","change","each","jQueryinput","jQuerylabel","next","labelVal","html","e","fileName","files","getAttribute","replace","target","split","pop","find","width","height","offset","top","slideUp","slideDown","toggleClass","hasClass","magnificPopup","midClick","callbacks","open","content","play","close","load","1200","showMegamenu","hideMegamenu","mouseenter","mouseleave","prev","first","stop"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDm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WF,GACzCxF,OAAO,iEAAiEyF,WAAWD,IAEnFxF,OAAO,uBAAuBE,GAAG,QAAS,WACzCqF,MAUFvF,OAAO,cAAcE,GAAG,mBAAoB,SAAU2D,GACpD7D,OAAO6D,EAAEK,QAAQyB,KAAK,gBAAgBtB,KAAK,QAAQhE,SAAS,cAG9DL,OAAO,cAAcE,GAAG,mBAAoB,SAAU2D,GACpD7D,OAAO6D,EAAEK,QAAQyB,KAAK,gBAAgBtB,KAAK,QAAQ/D,YAAY,cAa7DN,OAAOC,QAAQqE,QAAU,MAE3BtE,OAAO,aAAaE,GAAG,mBAAoB,WACzCF,OAAOG,MAAMkE,KAAK,kBAAkBuB,QAAQC,MAAK,GAAM,GAAMlB,cAI/D3E,OAAO,aAAaE,GAAG,mBAAoB,WACzCF,OAAOG,MAAMkE,KAAK,kBAAkBuB,QAAQC,MAAK,GAAM,GAAMnB,aAIjE1E,OAAO,sBAAsBE,GAAG,QAAS,WACxCsF,MASDxF,OAAO,0BAA0BE,GAAG,QAAS,WAC3CF,OAAO,mBAAmB4E,YAAY","file":"app.bundle.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 = 1);\n","/*\n|--------------------------------------------------------------------------\n| Scss - Import scss so Webpack can elaborate it\n|--------------------------------------------------------------------------\n*/\nimport \"../scss/main.scss\";\n\n\n/*\n|--------------------------------------------------------------------------\n| Navbar - Make navbar fixed top in Tablet portrait and mobile\n|--------------------------------------------------------------------------\n*/\n\n// jQuery('#page').css({\n// \t'margin-top': jQuery('.js-navbar').outerHeight()\n// })\n// jQuery(window).on('resize', function() {\n// navbarFixed()\n// })\n\n\njQuery(window).on('scroll', function() {\n\tif (jQuery(this).scrollTop() > 0) {\n\t\tjQuery('.js-header').addClass('has--white-bg')\n\t} else {\n\t\tjQuery('.js-header').removeClass('has--white-bg')\n\t}\n})\n\n/*\n|--------------------------------------------------------------------------\n| Swiper - Init about home swiper slider\n|--------------------------------------------------------------------------\n*/\nvar SwiperHomeAbout = new Swiper ('.c-home__about__slider', {\n // Optional parameters\n\tloop: true,\n\tautoplay: {\n delay: 3000,\n },\n // Navigation arrows\n navigation: {\n nextEl: '.c-home__about__slider__next',\n }\n})\n\n/*\n|--------------------------------------------------------------------------\n| Swiper - Init soluzioni home swiper slider\n|--------------------------------------------------------------------------\n*/\nvar SwiperHomeSoluzioni = new Swiper ('.c-home__soluzioni__slider', {\n // Optional parameters\n loop: true,\n slidesPerView: 3,\n navigation: {\n prevEl: '.c-home__soluzioni__prev',\n nextEl: '.c-home__soluzioni__next',\n },\n\tautoplay: {\n delay: 3200,\n },\n breakpoints: {\n // when window width is <= 320px\n 767: {\n slidesPerView: 1\n },\n // when window width is <= 480px\n 992: {\n slidesPerView: 3,\n },\n }\n})\n\n/*\n|--------------------------------------------------------------------------\n| Swiper - Init VIDEO home swiper slider\n|--------------------------------------------------------------------------\n*/\n\nif (jQuery('.c-home__video-slider__wrapper').length) {\n\tvar SwiperHomeVideoThumbs = new Swiper ('.c-home__video-slider__thumbs', {\n\t\t// Optional parameters\n\t\tloop: false,\n\t\tsimulateTouch: true,\n\t\tthreshold: 50,\n\t\twatchSlidesVisibility: true,\n\t\twatchSlidesProgress: true,\n\t\tspaceBetween: 10,\n\t\tslidesPerView: 3,\n\t\tnavigation: {\n\t\t\tnextEl: '.c-home__video-slider__thumbs__next',\n\t\t\tprevEl: '.c-home__video-slider__thumbs__prev'\n\t\t}\n\t})\n}\n\n\n\n\nvar SwiperHomeVideo = new Swiper ('.c-home__video-slider', {\n // Optional parameters\n\tloop: true,\n\tthreshold: 50,\n\tslidesPerView: 1,\n\tsimulateTouch: true,\n\tthumbs: {\n\t\tswiper: SwiperHomeVideoThumbs\n\t}\n})\n\n\n/*\n|--------------------------------------------------------------------------\n| Swiper - Init latest news home swiper slider\n|--------------------------------------------------------------------------\n*/\nvar SwiperHomeNews = new Swiper ('.c-home__latest-news__slider', {\n // Optional parameters\n loop: true,\n parallax: true,\n\tslidesPerView: 2,\n\tthreshold: 30,\n simulateTouch: true,\n navigation: {\n prevEl: '.c-home__latest-news__prev',\n nextEl: '.c-home__latest-news__next',\n },\n breakpoints: {\n // when window width is <= 320px\n 767: {\n slidesPerView: 1,\n autoHeight: true\n },\n // when window width is <= 480px\n 992: {\n slidesPerView: 2,\n spaceBetween: 0,\n },\n 1300: {\n slidesPerView: 2,\n spaceBetween: 0,\n },\n },\n\n})\n\n/*\n|--------------------------------------------------------------------------\n| AJAX load more - Load more news on click\n|--------------------------------------------------------------------------\n*/\n\njQuery('.c-load-more-button--news').click(function(){\n\tvar cssAnimationEnd = \"webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend\";\n\tvar page=jQuery(this).attr('data-page');\n\tjQuery(this).attr('data-page', page++)\n\tvar taxonomy=jQuery(this).attr('data-taxonomy');\n\tvar terms=jQuery(this).attr('data-terms');\n\tvar button=jQuery(this);\n\tvar maxPages=jQuery(this).attr('data-max-page');\n\tvar data = {\n\t\t\t'action': 'net_news_load_more',\n\t\t\t'page' : page,\n\t\t\t'taxonomy' : taxonomy,\n\t\t\t'terms' : terms,\n\t};\n\n\tjQuery('.is--loaded').addClass(\"animate\").one(cssAnimationEnd , function() {\n\t\tjQuery('.is--loaded').removeClass(\"animate\");\n\t});\n\n\tjQuery.ajax({ // you can also use jQuery.post here\n\t\t\turl : ajaxurl, // AJAX handler\n\t\t\tdata : data,\n\t\t\ttype : 'POST',\n\t\t\tbeforeSend: function() {\n\t\t\t\tjQuery(button).text('Sto caricando...')\n\t\t\t},\n\t\t\tsuccess : function( response ){\n\t\t\t\t\tjQuery('.c-taxonomy__list').append(response);\n\t\t\t\t\tif (data.page >= maxPages){\n\t\t\t\t\t\tbutton.hide();\n\t\t\t\t\t} else{\n\t\t\t\t\t\tbutton.attr('data-page',data.page);\n\t\t\t\t\t}\n\t\t\t}\n\t\t});\n})\n\n\n/*\n|--------------------------------------------------------------------------\n| AJAX load more - Load more soluzioni on click\n|--------------------------------------------------------------------------\n*/\n\njQuery('.c-load-more-button--soluzioni').click(function(){\n\tvar cssAnimationEnd = \"webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend\";\n\tvar page=jQuery(this).attr('data-page');\n\tjQuery(this).attr('data-page', page++)\n\tvar taxonomy=jQuery(this).attr('data-taxonomy');\n\tvar terms=jQuery(this).attr('data-terms');\n\tvar button=jQuery(this);\n\tvar maxPages=jQuery(this).attr('data-max-page');\n\tvar data = {\n\t\t\t'action': 'net_soluzioni_load_more',\n\t\t\t'page' : page,\n\t\t\t'taxonomy' : taxonomy,\n\t\t\t'terms' : terms,\n\t};\n\n\tjQuery('.is--loaded').addClass(\"animate\").one(cssAnimationEnd , function() {\n\t\tjQuery('.is--loaded').removeClass(\"animate\");\n\t});\n\n\tjQuery.ajax({ // you can also use jQuery.post here\n\t\t\turl : ajaxurl, // AJAX handler\n\t\t\tdata : data,\n\t\t\ttype : 'POST',\n\t\t\tbeforeSend: function() {\n\t\t\t\tjQuery(button).text('Sto caricando...')\n\t\t\t},\n\t\t\tsuccess : function( response ){\n\t\t\t\tconsole.log(data.page);\n\t\t\t\t\tjQuery('.c-taxonomy__list').append(response);\n\t\t\t\t\tif (data.page >= maxPages){\n\t\t\t\t\t\tbutton.hide();\n\t\t\t\t\t} else{\n\t\t\t\t\t\tbutton.attr('data-page',data.page);\n\t\t\t\t\t}\n\t\t\t}\n\t\t});\n})\n\n\n/*\n|--------------------------------------------------------------------------\n| Material inputs animation behavior\n|--------------------------------------------------------------------------\n*/\n\n\nlabelMaterialBehaviour();\n\nfunction labelMaterialBehaviour() {\n\tif (jQuery('.c-input__material-wrapper input').val()) {\n\t\tjQuery('.c-input__material-wrapper input').siblings('label').addClass('active');\n\t} else {\n\t\tjQuery('.c-input__material-wrapper input').siblings('label').removeClass('active');\n\t}\n}\n\njQuery('.c-input__material-wrapper input').change(function() {\n\tif (jQuery(this).val()) {\n\t\tjQuery(this).siblings('label').addClass('active');\n\t} else {\n\t\tjQuery(this).siblings('label').removeClass('active');\n\t}\n})\n\n\n/*\n|---------------------------------------------------------------------------------\n| Custom file input - This function enable the file name to show in custom button\n|---------------------------------------------------------------------------------\n*/\n\njQuery( '.c-material__file' ).each( function()\n\t{\n\t\tvar jQueryinput\t = jQuery( this ),\n\t\t\tjQuerylabel\t = jQueryinput.next( 'label' ),\n\t\t\tlabelVal = jQuerylabel.html();\n\n\t\tjQueryinput.on( 'change', function( e )\n\t\t{\n\t\t\tvar fileName = '';\n\n\t\t\tif( this.files && this.files.length > 1 )\n\t\t\t\tfileName = ( this.getAttribute( 'data-text' ) || '' ).replace( '', this.files.length );\n\t\t\telse if( e.target.value )\n\t\t\t\tfileName = e.target.value.split( '\\\\' ).pop();\n\n\t\t\tif( fileName )\n\t\t\t\tjQuerylabel.find( 'span' ).html( fileName );\n\t\t\telse\n\t\t\t\tjQuerylabel.html( labelVal );\n\t\t});\n\n\t\t// Firefox bug fix\n\t\tjQueryinput\n\t\t.on( 'focus', function(){ jQueryinput.addClass( 'has-focus' ); })\n\t\t.on( 'blur', function(){ jQueryinput.removeClass( 'has-focus' ); });\n\t});\n\n\n\n\t// jQuery('.test').height(jQuery('.c-home__video-item').outerHeight())\n\n\n/*\n|---------------------------------------------------------------------------------------\n| Accessibility + Design - Remove outline on buttons only if user is not using keyboard\n|---------------------------------------------------------------------------------------\n*/\n// function handleFirstTab(e) {\n// if (e.keyCode === 9) {\n// document.body.classList.add('js-user-is-tabbing');\n\n// window.removeEventListener('keydown', handleFirstTab);\n// window.addEventListener('mousedown', handleMouseDownOnce);\n// }\n// }\n\n// function handleMouseDownOnce() {\n// document.body.classList.remove('js-user-is-tabbing');\n\n// window.removeEventListener('mousedown', handleMouseDownOnce);\n// window.addEventListener('keydown', handleFirstTab);\n// }\n\n// window.addEventListener('keydown', handleFirstTab);\n\n\n\n\n/*\n|---------------------------------------------------------------------------------------\n| Social share in single post fixed bottom\n|---------------------------------------------------------------------------------------\n*/\n\nif (jQuery(window).width() < 768) {\n\tjQuery(window).on('scroll', function() {\n\t\tvar scrollTop = jQuery(this).scrollTop() + jQuery(window).height()\n\t\tvar\telBottom = jQuery('.c-footer__box').offset().top\n\t\tif (scrollTop > elBottom) {\n\t\t\tjQuery('.c-single-post__social').slideUp(300)\n\t\t} else {\n\t\t\tjQuery('.c-single-post__social').slideDown(300)\n\t\t}\n\t})\n}\n\n/*\n|---------------------------------------------------------------------------------------\n| Mobile menu behaviour\n|---------------------------------------------------------------------------------------\n*/\n\njQuery('.c-navbar__toggler-icon').on('click', function() {\n\tjQuery('.c-mobile_menu').toggleClass('is--mobile-show')\n\tif (jQuery('.c-megamenu-wrapper').hasClass('is--open')) {\n\t\tjQuery('.c-megamenu-wrapper').removeClass('is--open')\n\t}\n})\n\n/*\n|---------------------------------------------------------------------------------------\n| Hack to add class to 3 depth menu\n|---------------------------------------------------------------------------------------\n*/\n\njQuery('.c-home__video-play').magnificPopup({\n type:'inline',\n\tmidClick: true,\n\tcallbacks: {\n open: function() {\n jQuery(this.content).find('video')[0].play();\n },\n close: function() {\n jQuery(this.content).find('video')[0].load();\n }\n }\n});\n\n/*\n|---------------------------------------------------------------------------------------\n| Soluzioni // Swiper slider\n|---------------------------------------------------------------------------------------\n*/\nvar SwiperDistributori = new Swiper ('.c-polizza__distributori-slider', {\n // Optional parameters\n loop: false,\n parallax: true,\n\tslidesPerView: 3,\n\tthreshold: 30,\n simulateTouch: true,\n navigation: {\n prevEl: '.c-polizza__arrows--prev',\n nextEl: '.c-polizza__arrows--next',\n },\n breakpoints: {\n // when window width is <= 320px\n 767: {\n slidesPerView: 1\n },\n // when window width is <= 1200px\n\t\t1200: {\n slidesPerView: 2,\n spaceBetween: 0,\n }\n },\n\n})\n\n\n/*\n|---------------------------------------------------------------------------------------\n| Soluzioni Megamenu\n|---------------------------------------------------------------------------------------\n*/\n\n\nfunction showMegamenu() {\n\tjQuery('.c-megamenu-wrapper').addClass('is--open')\n\tjQuery('.js-header').addClass('has--white-bg')\n}\n\nfunction addWhiteBg() {\n\tjQuery('.js-header').addClass('has--white-bg2')\n}\n\nfunction removeWhiteBg() {\n\tjQuery('.js-header').removeClass('has--white-bg2')\n}\n\nfunction hideMegamenu() {\n\tjQuery('.c-megamenu-wrapper').removeClass('is--open')\n\t\n\tif (jQuery(window).scrollTop() === 0) {\n\t\tjQuery('.js-header').removeClass('has--white-bg')\n\t}\n}\n\nif (jQuery(window).width() > 767) {\n\tjQuery('.c-megamenu-trigger').mouseenter(showMegamenu);\n jQuery('.dropdown-toggle').mouseenter(addWhiteBg);\n jQuery('.dropdown-menu').mouseleave(removeWhiteBg);\n\tjQuery('.c-megamenu-wrapper').mouseleave(hideMegamenu);\n\tjQuery('.menu-item:not(\".c-megamenu-trigger, .c-megamenu .menu-item\")').mouseenter(hideMegamenu);\n} else {\n\tjQuery('.c-megamenu-trigger').on('click', function() {\n\t\tshowMegamenu()\n\t})\n}\n\n/*\n|---------------------------------------------------------------------------------------\n| FAQ Accordion icon animation\n|---------------------------------------------------------------------------------------\n*/\n\njQuery('.accordion').on('show.bs.collapse', function (e) {\n jQuery(e.target).prev('.card-header').find('.fas').addClass('is--open');\n})\n\njQuery('.accordion').on('hide.bs.collapse', function (e) {\n jQuery(e.target).prev('.card-header').find('.fas').removeClass('is--open');\n})\n\n/*\n|---------------------------------------------------------------------------------------\n| Hack to assign current menu item class to Soluzioni\n|---------------------------------------------------------------------------------------\n*/\n// if (window.location.href.indexOf(\"soluzion\") > -1 || window.location.href.indexOf(\"prodotti-non\") > -1 || window.location.href.indexOf(\"wecare\") > -1 ) {\n// \tjQuery('.c-megamenu-trigger').addClass('current-menu-item')\n// }\n\n\nif (jQuery(window).width() < 768) {\n\t// Add slideDown animation to Bootstrap dropdown when expanding.\n jQuery('.dropdown').on('show.bs.dropdown', function() {\n jQuery(this).find('.dropdown-menu').first().stop(true, true).slideDown();\n });\n\n // Add slideUp animation to Bootstrap dropdown when collapsing.\n jQuery('.dropdown').on('hide.bs.dropdown', function() {\n jQuery(this).find('.dropdown-menu').first().stop(true, true).slideUp();\n });\n}\n\njQuery('.js-megamenu__back').on('click', function() {\n\thideMegamenu();\n})\n\n/*\n|---------------------------------------------------------------------------------------\n| Search form\n|---------------------------------------------------------------------------------------\n*/\n\njQuery('.js-c-top-menu__search').on('click', function() {\n jQuery('.js-search-menu').toggleClass('is--open')\n})\n\n\n// if (jQuery(window).width() < 768) {\n// jQuery('.dropdown-menu a').click(function(e) {\n// e.stopPropagation();\n// });\n// if (jQuery('.dropdown').hasClass('show')) {\n \n// }\n// }\n"],"sourceRoot":""}