wonder-image 1.8.4 → 1.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/frontend/body-end.js +1 -1
- package/dist/frontend/body-end.js.map +1 -1
- package/dist/frontend/head.css +1 -1
- package/dist/frontend/head.css.map +1 -1
- package/dist/frontend/head.js +1 -1
- package/dist/frontend/head.js.map +1 -1
- package/dist/frontend/lib.js +1 -1
- package/dist/frontend/lib.js.LICENSE.txt +158 -0
- package/dist/frontend/lib.js.map +1 -1
- package/dist/lib/colorjs/color.js +3 -0
- package/dist/lib/colorjs/color.js.LICENSE.txt +5 -0
- package/dist/lib/colorjs/color.js.map +1 -0
- package/dist/lib/rellax/rellax.js +3 -0
- package/dist/lib/rellax/rellax.js.LICENSE.txt +139 -0
- package/dist/lib/rellax/rellax.js.map +1 -0
- package/dist/lib/swiperjs/swiper-plugin.css +1 -1
- package/dist/lib/swiperjs/swiper-plugin.css.map +1 -1
- package/dist/lib/swiperjs/swiper-plugin.js +1 -1
- package/dist/lib/swiperjs/swiper-plugin.js.LICENSE.txt +33 -0
- package/dist/lib/swiperjs/swiper-plugin.js.map +1 -1
- package/dist/lib/vivus/vivus.js +3 -0
- package/dist/lib/vivus/vivus.js.LICENSE.txt +522 -0
- package/dist/lib/vivus/vivus.js.map +1 -0
- package/package.json +6 -2
- package/src/build/frontend/css/class/function.css +22 -0
- package/src/build/frontend/css/class/text.css +51 -0
- package/src/build/frontend/css/components/form/select.css +1 -0
- package/src/build/frontend/css/components/tooltip.css +22 -0
- package/src/build/frontend/css/lib.css +6 -0
- package/src/build/frontend/js/form/input.js +1 -0
- package/src/build/frontend/js/form/recaptcha.js +71 -0
- package/src/build/frontend/js/pageSetUp.js +1 -0
- package/src/build/frontend/js/tooltip.js +91 -0
- package/src/build/lib/swiperjs/fashion-slider.css +166 -0
- package/src/build/lib/swiperjs/fashion-slider.js +199 -0
- package/src/export/frontend/head.js +3 -0
- package/src/export/frontend/lib.js +11 -1
- package/src/export/lib/colorjs/color.js +4 -0
- package/src/export/lib/rellax/rellax.js +2 -0
- package/src/export/lib/swiperjs/swiper-plugin.js +9 -1
- package/src/export/lib/vivus/vivus.js +2 -0
- package/test/backend/index.html +0 -0
- package/test/frontend/css/color.css +331 -0
- package/test/frontend/css/root.css +430 -0
- package/test/frontend/index.html +58 -0
- package/demo/backend/body-end.php +0 -10
- package/demo/backend/head.php +0 -97
- package/demo/frontend/body-end.php +0 -19
- package/demo/frontend/head.php +0 -244
- package/demo/wonder-image.php +0 -41
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see body-end.js.LICENSE.txt */
|
|
2
|
-
(()=>{var n={6867:n=>{n.exports="function alertContainer() {\n\n if (document.querySelector('.alert-container')) {\n\n var container = document.querySelector('.alert-container');\n\n } else {\n\n var container = document.createElement('div');\n container.classList.add('alert-container');\n container.classList.add('p-f');\n container.classList.add('top');\n container.classList.add('start');\n container.classList.add('w-100');\n container.classList.add('h-100');\n container.classList.add('no-interaction');\n container.style.zIndex = \"1000\";\n\n document.body.insertBefore(container, document.body.firstChild);\n\n }\n\n return container;\n\n}\n\nfunction alertToast(alert) {\n\n var container = alertContainer();\n\n if (alert == 801) {\n\n container.innerHTML += NO_INTERNET_ALERT;\n\n } else {\n\n $.ajax({\n type: \"POST\",\n url: pathApp+'/api/alert.php',\n data: { \n post: 'true',\n frontend: 'true',\n alert: alert\n }, \n success: function (data) {\n\n container.innerHTML += data;\n \n var url = new URL(window.location.href);\n url.searchParams.delete('alert');\n window.history.replaceState(null, null, url);\n\n }\n });\n\n }\n\n setTimeout(() => {\n document.querySelectorAll('.wi-alert.wi-show').forEach(element => {\n element.classList.remove('wi-show');\n });\n }, 4000);\n\n}"},5068:n=>{n.exports="function setAos() {\n\n if (isMobile() && (typeof MOBILE_REMOVE_AOS == 'undefined' || MOBILE_REMOVE_AOS == true)) {\n AOS.init({\n disable: 'mobile'\n });\n } else {\n AOS.init();\n }\n\n}"},7244:n=>{n.exports="function toggleDropdown(container) {\n\n if (container.classList.contains('wi-show')) {\n closeDropdown(container);\n } else {\n openDropdown(container);\n }\n \n}\n\nfunction openDropdown(container) {\n\n container.classList.add('wi-show'); \n\n if (container.querySelector('i.bi-chevron-down')) {\n container.querySelector('i.bi-chevron-down').classList.add('bi-chevron-up');\n container.querySelector('i.bi-chevron-down').classList.remove('bi-chevron-down');\n }\n\n if (container.querySelector('i.bi-plus')) {\n container.querySelector('i.bi-plus').classList.add('bi-dash');\n container.querySelector('i.bi-plus').classList.remove('bi-plus');\n }\n\n if (container.querySelector('i.bi-plus-lg')) {\n container.querySelector('i.bi-plus-lg').classList.add('bi-dash-lg');\n container.querySelector('i.bi-plus-lg').classList.remove('bi-plus-lg');\n }\n \n}\n\nfunction closeDropdown(container) {\n\n container.classList.remove('wi-show'); \n\n if (container.querySelector('i.bi-chevron-up')) {\n container.querySelector('i.bi-chevron-up').classList.add('bi-chevron-down');\n container.querySelector('i.bi-chevron-up').classList.remove('bi-chevron-up');\n }\n\n if (container.querySelector('i.bi-dash')) {\n container.querySelector('i.bi-dash').classList.add('bi-plus');\n container.querySelector('i.bi-dash').classList.remove('bi-dash');\n }\n\n if (container.querySelector('i.bi-dash-lg')) {\n container.querySelector('i.bi-dash-lg').classList.add('bi-plus-lg');\n container.querySelector('i.bi-dash-lg').classList.remove('bi-dash-lg');\n }\n \n}\n\nfunction setDropdown() {\n \n document.querySelectorAll(\".wi-dropdown-btn .wi-switcher\").forEach(element => {\n\n element.onclick = function() { toggleDropdown(element.parentElement); };\n \n element.parentElement.onmouseleave = function() { closeDropdown(element.parentElement); };\n \n });\n\n document.querySelectorAll(\".wi-dropdown-box .wi-switcher\").forEach(element => {\n\n if (element.parentElement.classList.contains('wi-show')) {\n openDropdown(element.parentElement);\n }\n\n element.onclick = function() { toggleDropdown(element.parentElement); };\n \n });\n\n}"},2787:n=>{n.exports='/**\n * \n * GOOGLE MAPS API\n * \n */\n\nfunction placeNeedCheck(input) {\n\n inputError(input, \'Indirizzo non valido, è necessario selezionare un indirizzo dall\\\'elenco!\');\n\n}\n\nfunction checkInputPlace(input, autocomplete) {\n \n var inputContainer = input.parentElement;\n\n var country = inputContainer.querySelector(\'[data-wi-spi="country"]\');\n var province = inputContainer.querySelector(\'[data-wi-spi="province"]\');\n var cap = inputContainer.querySelector(\'[data-wi-spi="cap"]\');\n var city = inputContainer.querySelector(\'[data-wi-spi="city"]\');\n var street = inputContainer.querySelector(\'[data-wi-spi="street"]\');\n var number = inputContainer.querySelector(\'[data-wi-spi="number"]\');\n\n country.value = "";\n province.value = "";\n cap.value = "";\n city.value = "";\n street.value = "";\n number.value = "";\n\n removeInputError(input);\n\n if (autocomplete.getPlace()) {\n\n var place = autocomplete.getPlace();\n\n if (place.address_components) {\n\n for (const component of place.address_components) {\n \n const componentType = component.types;\n\n if (componentType.includes(\'street_number\')) { number.value = component.long_name; }\n if (componentType.includes(\'route\')) { street.value = component.short_name; }\n if (componentType.includes(\'administrative_area_level_3\') || componentType.includes(\'postal_town\')) { city.value = component.short_name; }\n if (componentType.includes(\'postal_code\') || componentType.includes(\'postal_code_prefix\')) { cap.value = component.short_name; }\n if (componentType.includes(\'administrative_area_level_2\')) { province.value = component.short_name; }\n if (componentType.includes(\'country\')) { country.value = component.short_name; }\n\n }\n\n if (country.value == "" || province.value == "" || cap.value == "" || city.value == "" || street.value == "" || number.value == "") {\n \n var error = "Indirizzo non valido";\n\n if (country.value == "") {\n error += ", manca il paese";\n } else if (province.value == "") {\n error += ", manca la provincia";\n } else if (cap.value == "") {\n error += ", manca il cap";\n } else if (city.value == "") {\n error += ", manca la città";\n } else if (street.value == "") {\n error += ", manca la via";\n } else if (number.value == "") {\n error += ", manca il numero civico";\n }\n\n inputError(input, error);\n \n }\n\n } else {\n\n inputError(input, \'Indirizzo non valido\');\n\n }\n\n } else {\n\n inputError(input, \'Indirizzo non valido\');\n\n }\n\n check();\n\n}\n\nfunction setPlace(input, country = null, province = null, cap = null, city = null, street = null, number = null) {\n\n var inputContainer = input.parentElement;\n\n var countryInput = inputContainer.querySelector(\'[data-wi-spi="country"]\');\n var provinceInput = inputContainer.querySelector(\'[data-wi-spi="province"]\');\n var capInput = inputContainer.querySelector(\'[data-wi-spi="cap"]\');\n var cityInput = inputContainer.querySelector(\'[data-wi-spi="city"]\');\n var streetInput = inputContainer.querySelector(\'[data-wi-spi="street"]\');\n var numberInput = inputContainer.querySelector(\'[data-wi-spi="number"]\');\n\n if (country == null) {\n\n country = countryInput.value;\n province = provinceInput.value;\n cap = capInput.value;\n city = cityInput.value;\n street = streetInput.value;\n number = numberInput.value;\n\n } else {\n\n countryInput.value = country;\n provinceInput.value = province;\n capInput.value = cap;\n cityInput.value = city;\n streetInput.value = street;\n numberInput.value = number;\n \n }\n\n if (country != "" || province != "" || cap != "" || city != "" || street != "" || number != "") {\n \n var address = street+\', \'+number+\', \'+city+\', \'+province+\', \'+country;\n input.value = address;\n\n checkLabel();\n check();\n\n }\n\n}\n\nfunction setGoogleMapsPlace() {\n\n document.querySelectorAll("[data-wi-search-place=\'true\']").forEach(input => {\n\n input.disabled = false;\n \n var options = {};\n\n if (input.dataset.wiRestriction != \'[]\') { \n\n var restrictions = JSON.parse(input.dataset.wiRestriction);\n options.componentRestrictions = restrictions; \n \n }\n\n options.fields = [ "address_components" ];\n options.types = [ "address" ];\n \n var googlePlace = new google.maps.places.Autocomplete(input, options);\n\n input.addEventListener("change", () => { placeNeedCheck(input); });\n googlePlace.addListener("place_changed", () => { checkInputPlace(input, googlePlace); });\n\n });\n\n}\n\nfunction setGoogleMapsApi() {\n\n if (document.querySelector("[data-wi-search-place]")) {\n\n var GOOGLE_API_KEY = "AIzaSyAhBslKzmgy6pRrLGyhlN34pN1yQYE1hvI";\n\n /**\n * \n * Se ci sono degli input Place chiama le API di Google Place\n * Documentazione: https://developers.google.com/maps/documentation/javascript/place-autocomplete?hl=it\n * \n */\n\n var script = document.createElement(\'script\');\n script.type = \'text/javascript\';\n script.async = true;\n script.src = \'https://maps.googleapis.com/maps/api/js?key=\'+GOOGLE_API_KEY+\'&loading=async&libraries=places&callback=setGoogleMapsPlace\'; \n\n document.head.appendChild(script);\n \n }\n\n}\n\n/**\n * \n * inputCountry() - inputStates()\n * \n */\n\nfunction setInputCountry() {\n\n document.querySelectorAll("[data-wi-input-country=\'true\']").forEach(element => {\n element.addEventListener("change", searchStates);\n element.addEventListener("focusout", searchStates);\n });\n\n}\n\nfunction setCountryState(input, country, state) {\n\n textListValue(input, country);\n searchStates(input, state);\n \n}\n\nfunction searchStates(event, stateValue = null) {\n\n if (typeof event.target !== "undefined") {\n var inputCountry = event.target;\n } else {\n var inputCountry = event;\n }\n \n var form = inputCountry.form;\n var inputCountryName = inputCountry.dataset.wiName.replace(\'-text\', \'\');\n var inputStateName = inputCountry.dataset.wiInputState;\n\n var inputState = form.querySelector(\'input[data-wi-name="\'+inputStateName+\'-text"]\');\n\n inputState.disabled = true;\n inputState.value = "";\n\n delay(100).then(() => {\n\n if (form.querySelector(\'input[name="\'+inputCountryName+\'"]:checked\') != null) {\n\n var country = form.querySelector(\'input[name="\'+inputCountryName+\'"]:checked\').value;\n \n if (inputState.dataset.wiListStates != country) {\n \n inputState.dataset.wiListStates = country;\n\n loadingSpinner();\n\n $.ajax({\n type: "POST",\n url: pathApp+\'/api/states.php\',\n data: { \n post: \'true\',\n country: country\n }, \n success: function (data) {\n\n const response = JSON.parse(data);\n\n textListOptions( inputState, response );\n\n inputState.disabled = false;\n\n if (stateValue != null && stateValue != "") { textListValue(inputState, stateValue); }\n\n loadingSpinner();\n\n },\n error: function (XMLHttpRequest) {\n\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n\n }\n });\n\n } else {\n\n inputState.disabled = false;\n \n }\n\n }\n\n });\n\n}'},7350:n=>{n.exports='var x, i, j, l, ll, selElmnt, a, b, c;\n\n// Look for any elements with the class "custom-select":\nx = document.querySelectorAll("[data-wi-select=\'true\']");\nl = x.length;\n\nfor (i = 0; i < l; i++) {\n\n selElmnt = x[i].getElementsByTagName("select")[0];\n ll = selElmnt.length;\n\n // For each element, create a new DIV that will act as the selected item:\n a = document.createElement("DIV");\n a.setAttribute("class", "select-selected wi-input");\n a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;\n x[i].appendChild(a);\n\n // For each element, create a new DIV that will contain the option list:\n b = document.createElement("DIV");\n b.setAttribute("class", "select-items wi-input-list no-scrollbar");\n\n for (j = 0; j < ll; j++) {\n\n // For each option in the original select element, create a new DIV that will act as an option item:\n c = document.createElement("DIV");\n c.id = selElmnt.options[j].value;\n c.setAttribute("class", "wi-input-list-value");\n c.innerHTML = selElmnt.options[j].innerHTML;\n\n // Se è impostato un valore di default selezionalo\n if (selElmnt.value != undefined) { if (c.id == selElmnt.value) { c.classList.add("same-as-selected"); } }\n\n c.addEventListener("click", function(e) {\n\n // When an item is clicked, update the original select box, and the selected item:\n var y, i, k, s, h, sl, yl;\n s = this.parentNode.parentNode.getElementsByTagName("select")[0];\n sl = s.length;\n selElmnt.value = this.id;\n h = this.parentNode.previousSibling;\n\n for (i = 0; i < sl; i++) {\n if (s.options[i].innerHTML == this.innerHTML) {\n s.selectedIndex = i;\n h.innerHTML = this.innerHTML;\n y = this.parentNode.getElementsByClassName("same-as-selected");\n yl = y.length;\n for (k = 0; k < yl; k++) {\n y[k].classList.remove("same-as-selected");\n }\n this.setAttribute("class", "wi-input-list-value same-as-selected");\n break;\n }\n }\n\n h.click();\n\n });\n\n // Passa le funzioni onchange dal select alle nuove opzioni\n c.onclick = selElmnt.onchange;\n c.mousedown = selElmnt.onchange;\n\n b.appendChild(c);\n\n }\n\n x[i].appendChild(b);\n\n a.addEventListener("click", function(e) {\n\n // When the select box is clicked, close any other select boxes, and open/close the current select box\n e.stopPropagation();\n closeAllSelect(this);\n this.classList.toggle("select-arrow-active");\n this.parentNode.classList.toggle("wi-list-active");\n check();\n\n });\n\n}\n\nfunction closeAllSelect(elmnt) {\n\n // A function that will close all select boxes in the document, except the current select box:\n var x, y, i, xl, yl, arrNo = [];\n x = document.getElementsByClassName("select-items");\n y = document.getElementsByClassName("select-selected");\n var container = document.querySelector(".wi-input-container.wi-list-active");\n xl = x.length;\n yl = y.length;\n\n for (i = 0; i < yl; i++) {\n if (elmnt == y[i]) {\n arrNo.push(i)\n }else{\n y[i].classList.remove("select-arrow-active");\n }\n }\n\n if (container != null) {\n container.classList.remove("wi-list-active");\n }\n\n}\n\n// If the user clicks anywhere outside the select box, then close all select boxes:\ndocument.addEventListener("click", closeAllSelect);'},4428:n=>{n.exports='function formToArray(formElements) {\n\n const ARRAY = {};\n\n for (let i = 0; i < formElements.length; i++) {\n\n var add = false;\n\n var input = formElements[i];\n\n if (input.type == \'checkbox\' || input.type == \'radio\') {\n if (input.checked == true) { var add = true; }\n } else {\n if (input.value != "") { var add = true;}\n }\n\n if (add) {\n\n var inputName = input.name;\n var inputValue = input.value;\n\n if (inputName.includes("[]")) {\n\n inputName = inputName.replace("[]", "");\n\n if (inputName in ARRAY) {\n inputName = inputName.replace("[]", "");\n ARRAY[inputName].push(inputValue);\n } else {\n inputName = inputName.replace("[]", "");\n ARRAY[inputName] = [];\n ARRAY[inputName].push(inputValue);\n }\n \n } else {\n\n if (inputName in ARRAY) {\n\n } else {\n ARRAY[inputName] = inputValue;\n }\n\n }\n\n }\n\n }\n\n return ARRAY;\n \n}\n\nfunction prettyFormResponse(data) {\n\n if (data != \'\') {\n \n console.log(\'ERRORE FORM: \'+data);\n\n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n container.innerHTML = \'<div class="title-big a-c"><i class="bi bi-x-circle tx-danger"></i></div><div class="subtitle mt-8 a-c">C\\\'è stato un problema con l\\\'invio della tua richiesta</div><div class="c-w mt-10"><a onclick="location.reload();" class="btn btn-primary c-w">Riprova</a></div>\';\n\n } else {\n \n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n container.innerHTML = \'<div class="title-big a-c"><i class="bi bi-check2-circle tx-success"></i></div><div class="subtitle mt-8 a-c">La tua richiesta è stata inviata con successo!</div><div class="c-w mt-10"><a onclick="location.reload(); " class="btn btn-primary c-w">Torna al sito</a></div>\';\n\n }\n \n}\n\nfunction sendForm(button, url, responseFunction = prettyFormResponse) {\n\n loadingSpinner();\n\n const VALUES = formToArray(button.form.elements);\n var form = JSON.stringify(VALUES);\n\n $.ajax({\n type: "POST",\n url: url,\n data: { \n post: \'true\',\n form: form\n }, \n success: function (data) {\n\n if (responseFunction != null) {\n if (typeof responseFunction === \'function\') {\n responseFunction(data);\n } else {\n loadingSpinner();\n }\n }\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}\n\nfunction formUpload(form, url, responseFunction = prettyFormResponse) {\n\n loadingSpinner();\n \n var formData = new FormData(form);\n formData.append(\'post\', \'true\');\n \n $.ajax({\n type: "POST",\n url: url,\n data: formData,\n contentType: false,\n cache: false,\n processData:false, \n success: function (data) {\n\n if (responseFunction != null) {\n if (typeof responseFunction === \'function\') {\n responseFunction(data);\n } else {\n loadingSpinner();\n }\n }\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}'},8516:n=>{n.exports='function menuMobile(hamburger = "#hamburger", navMobile = "#nav-mobile") { \n \n if (hamburger != null) { document.querySelector(hamburger).classList.toggle("click"); }\n if (navMobile != null) { document.querySelector(navMobile).classList.toggle("show"); }\n\n if (document.querySelector(hamburger).classList.contains("click")) {\n disableScroll();\n } else {\n enableScroll();\n }\n\n}'},148:n=>{n.exports="function modal(selector) {\n\n setUpModal(selector);\n\n var modal = document.querySelector(selector);\n\n modal.classList.toggle('wi-show');\n modal.classList.toggle('no-interaction');\n\n if (modal.classList.contains('wi-show')) {\n disableScroll();\n } else {\n enableScroll();\n }\n\n}\n\nfunction setUpModal(selector) {\n \n document.querySelectorAll(selector + ' .wi-close-modal').forEach(element => {\n if (element.onclick == null) {\n element.onclick = function() { modal(selector) };\n }\n });\n\n}"},225:n=>{n.exports="function setUpPage() {\n \n $.ajax({\n type: \"POST\",\n url: pathApp+'/api/alert.php',\n data: { \n post: 'true',\n frontend: 'true',\n alert: 801\n }, \n success: function (data) {\n NO_INTERNET_ALERT = data;\n }\n });\n\n var PAGE_URL = new URL(window.location.href);\n\n if (PAGE_URL.searchParams.get('scroll')) {\n \n var idScroll = PAGE_URL.searchParams.get('scroll');\n scrolla('#'+idScroll);\n\n }\n\n // L'alert non viene passato solo tramite GET ma anche tramite variabile php\n // if (PAGE_URL.searchParams.get('alert')) {\n // var alertCode = PAGE_URL.searchParams.get('alert'); alertToast(alertCode);\n // }\n\n setInput();\n setDropdown();\n setVideoJS();\n \n window.dispatchEvent(new Event('loaded'));\n \n};"},4642:n=>{n.exports=function(n){function e(n){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",n)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(n):"undefined"!=typeof eval?eval.call(null,n):e("EvalError: No eval function available")}catch(n){e(n)}}},1120:(n,e,t)=>{t(4642)(t(6867))},2051:(n,e,t)=>{t(4642)(t(5068))},1809:(n,e,t)=>{t(4642)(t(7244))},7154:(n,e,t)=>{t(4642)(t(2787))},8865:(n,e,t)=>{t(4642)(t(7350))},1123:(n,e,t)=>{t(4642)(t(4428))},5329:(n,e,t)=>{t(4642)(t(8516))},871:(n,e,t)=>{t(4642)(t(148))},7186:(n,e,t)=>{t(4642)(t(225))}},e={};function t(a){var i=e[a];if(void 0!==i)return i.exports;var o=e[a]={exports:{}};return n[a](o,o.exports,t),o.exports}t.n=n=>{var e=n&&n.__esModule?()=>n.default:()=>n;return t.d(e,{a:e}),e},t.d=(n,e)=>{for(var a in e)t.o(e,a)&&!t.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:e[a]})},t.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),t.r=n=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})};var a={};(()=>{"use strict";t.r(a);t(2051),t(5329),t(1120),t(1809),t(871),t(7154),t(8865),t(1123),t(7186)})(),window.wonder=a})();
|
|
2
|
+
(()=>{var n={6867:n=>{n.exports="function alertContainer() {\n\n if (document.querySelector('.alert-container')) {\n\n var container = document.querySelector('.alert-container');\n\n } else {\n\n var container = document.createElement('div');\n container.classList.add('alert-container');\n container.classList.add('p-f');\n container.classList.add('top');\n container.classList.add('start');\n container.classList.add('w-100');\n container.classList.add('h-100');\n container.classList.add('no-interaction');\n container.style.zIndex = \"1000\";\n\n document.body.insertBefore(container, document.body.firstChild);\n\n }\n\n return container;\n\n}\n\nfunction alertToast(alert) {\n\n var container = alertContainer();\n\n if (alert == 801) {\n\n container.innerHTML += NO_INTERNET_ALERT;\n\n } else {\n\n $.ajax({\n type: \"POST\",\n url: pathApp+'/api/alert.php',\n data: { \n post: 'true',\n frontend: 'true',\n alert: alert\n }, \n success: function (data) {\n\n container.innerHTML += data;\n \n var url = new URL(window.location.href);\n url.searchParams.delete('alert');\n window.history.replaceState(null, null, url);\n\n }\n });\n\n }\n\n setTimeout(() => {\n document.querySelectorAll('.wi-alert.wi-show').forEach(element => {\n element.classList.remove('wi-show');\n });\n }, 4000);\n\n}"},5068:n=>{n.exports="function setAos() {\n\n if (isMobile() && (typeof MOBILE_REMOVE_AOS == 'undefined' || MOBILE_REMOVE_AOS == true)) {\n AOS.init({\n disable: 'mobile'\n });\n } else {\n AOS.init();\n }\n\n}"},7244:n=>{n.exports="function toggleDropdown(container) {\n\n if (container.classList.contains('wi-show')) {\n closeDropdown(container);\n } else {\n openDropdown(container);\n }\n \n}\n\nfunction openDropdown(container) {\n\n container.classList.add('wi-show'); \n\n if (container.querySelector('i.bi-chevron-down')) {\n container.querySelector('i.bi-chevron-down').classList.add('bi-chevron-up');\n container.querySelector('i.bi-chevron-down').classList.remove('bi-chevron-down');\n }\n\n if (container.querySelector('i.bi-plus')) {\n container.querySelector('i.bi-plus').classList.add('bi-dash');\n container.querySelector('i.bi-plus').classList.remove('bi-plus');\n }\n\n if (container.querySelector('i.bi-plus-lg')) {\n container.querySelector('i.bi-plus-lg').classList.add('bi-dash-lg');\n container.querySelector('i.bi-plus-lg').classList.remove('bi-plus-lg');\n }\n \n}\n\nfunction closeDropdown(container) {\n\n container.classList.remove('wi-show'); \n\n if (container.querySelector('i.bi-chevron-up')) {\n container.querySelector('i.bi-chevron-up').classList.add('bi-chevron-down');\n container.querySelector('i.bi-chevron-up').classList.remove('bi-chevron-up');\n }\n\n if (container.querySelector('i.bi-dash')) {\n container.querySelector('i.bi-dash').classList.add('bi-plus');\n container.querySelector('i.bi-dash').classList.remove('bi-dash');\n }\n\n if (container.querySelector('i.bi-dash-lg')) {\n container.querySelector('i.bi-dash-lg').classList.add('bi-plus-lg');\n container.querySelector('i.bi-dash-lg').classList.remove('bi-dash-lg');\n }\n \n}\n\nfunction setDropdown() {\n \n document.querySelectorAll(\".wi-dropdown-btn .wi-switcher\").forEach(element => {\n\n element.onclick = function() { toggleDropdown(element.parentElement); };\n \n element.parentElement.onmouseleave = function() { closeDropdown(element.parentElement); };\n \n });\n\n document.querySelectorAll(\".wi-dropdown-box .wi-switcher\").forEach(element => {\n\n if (element.parentElement.classList.contains('wi-show')) {\n openDropdown(element.parentElement);\n }\n\n element.onclick = function() { toggleDropdown(element.parentElement); };\n \n });\n\n}"},2787:n=>{n.exports='/**\n * \n * GOOGLE MAPS API\n * \n */\n\nfunction placeNeedCheck(input) {\n\n inputError(input, \'Indirizzo non valido, è necessario selezionare un indirizzo dall\\\'elenco!\');\n\n}\n\nfunction checkInputPlace(input, autocomplete) {\n \n var inputContainer = input.parentElement;\n\n var country = inputContainer.querySelector(\'[data-wi-spi="country"]\');\n var province = inputContainer.querySelector(\'[data-wi-spi="province"]\');\n var cap = inputContainer.querySelector(\'[data-wi-spi="cap"]\');\n var city = inputContainer.querySelector(\'[data-wi-spi="city"]\');\n var street = inputContainer.querySelector(\'[data-wi-spi="street"]\');\n var number = inputContainer.querySelector(\'[data-wi-spi="number"]\');\n\n country.value = "";\n province.value = "";\n cap.value = "";\n city.value = "";\n street.value = "";\n number.value = "";\n\n removeInputError(input);\n\n if (autocomplete.getPlace()) {\n\n var place = autocomplete.getPlace();\n\n if (place.address_components) {\n\n for (const component of place.address_components) {\n \n const componentType = component.types;\n\n if (componentType.includes(\'street_number\')) { number.value = component.long_name; }\n if (componentType.includes(\'route\')) { street.value = component.short_name; }\n if (componentType.includes(\'administrative_area_level_3\') || componentType.includes(\'postal_town\')) { city.value = component.short_name; }\n if (componentType.includes(\'postal_code\') || componentType.includes(\'postal_code_prefix\')) { cap.value = component.short_name; }\n if (componentType.includes(\'administrative_area_level_2\')) { province.value = component.short_name; }\n if (componentType.includes(\'country\')) { country.value = component.short_name; }\n\n }\n\n if (country.value == "" || province.value == "" || cap.value == "" || city.value == "" || street.value == "" || number.value == "") {\n \n var error = "Indirizzo non valido";\n\n if (country.value == "") {\n error += ", manca il paese";\n } else if (province.value == "") {\n error += ", manca la provincia";\n } else if (cap.value == "") {\n error += ", manca il cap";\n } else if (city.value == "") {\n error += ", manca la città";\n } else if (street.value == "") {\n error += ", manca la via";\n } else if (number.value == "") {\n error += ", manca il numero civico";\n }\n\n inputError(input, error);\n \n }\n\n } else {\n\n inputError(input, \'Indirizzo non valido\');\n\n }\n\n } else {\n\n inputError(input, \'Indirizzo non valido\');\n\n }\n\n check();\n\n}\n\nfunction setPlace(input, country = null, province = null, cap = null, city = null, street = null, number = null) {\n\n var inputContainer = input.parentElement;\n\n var countryInput = inputContainer.querySelector(\'[data-wi-spi="country"]\');\n var provinceInput = inputContainer.querySelector(\'[data-wi-spi="province"]\');\n var capInput = inputContainer.querySelector(\'[data-wi-spi="cap"]\');\n var cityInput = inputContainer.querySelector(\'[data-wi-spi="city"]\');\n var streetInput = inputContainer.querySelector(\'[data-wi-spi="street"]\');\n var numberInput = inputContainer.querySelector(\'[data-wi-spi="number"]\');\n\n if (country == null) {\n\n country = countryInput.value;\n province = provinceInput.value;\n cap = capInput.value;\n city = cityInput.value;\n street = streetInput.value;\n number = numberInput.value;\n\n } else {\n\n countryInput.value = country;\n provinceInput.value = province;\n capInput.value = cap;\n cityInput.value = city;\n streetInput.value = street;\n numberInput.value = number;\n \n }\n\n if (country != "" || province != "" || cap != "" || city != "" || street != "" || number != "") {\n \n var address = street+\', \'+number+\', \'+city+\', \'+province+\', \'+country;\n input.value = address;\n\n checkLabel();\n check();\n\n }\n\n}\n\nfunction setGoogleMapsPlace() {\n\n document.querySelectorAll("[data-wi-search-place=\'true\']").forEach(input => {\n\n input.disabled = false;\n \n var options = {};\n\n if (input.dataset.wiRestriction != \'[]\') { \n\n var restrictions = JSON.parse(input.dataset.wiRestriction);\n options.componentRestrictions = restrictions; \n \n }\n\n options.fields = [ "address_components" ];\n options.types = [ "address" ];\n \n var googlePlace = new google.maps.places.Autocomplete(input, options);\n\n input.addEventListener("change", () => { placeNeedCheck(input); });\n googlePlace.addListener("place_changed", () => { checkInputPlace(input, googlePlace); });\n\n });\n\n}\n\nfunction setGoogleMapsApi() {\n\n if (document.querySelector("[data-wi-search-place]")) {\n\n var GOOGLE_API_KEY = "AIzaSyAhBslKzmgy6pRrLGyhlN34pN1yQYE1hvI";\n\n /**\n * \n * Se ci sono degli input Place chiama le API di Google Place\n * Documentazione: https://developers.google.com/maps/documentation/javascript/place-autocomplete?hl=it\n * \n */\n\n var script = document.createElement(\'script\');\n script.type = \'text/javascript\';\n script.async = true;\n script.src = \'https://maps.googleapis.com/maps/api/js?key=\'+GOOGLE_API_KEY+\'&loading=async&libraries=places&callback=setGoogleMapsPlace\'; \n\n document.head.appendChild(script);\n \n }\n\n}\n\n/**\n * \n * inputCountry() - inputStates()\n * \n */\n\nfunction setInputCountry() {\n\n document.querySelectorAll("[data-wi-input-country=\'true\']").forEach(element => {\n element.addEventListener("change", searchStates);\n element.addEventListener("focusout", searchStates);\n });\n\n}\n\nfunction setCountryState(input, country, state) {\n\n textListValue(input, country);\n searchStates(input, state);\n \n}\n\nfunction searchStates(event, stateValue = null) {\n\n if (typeof event.target !== "undefined") {\n var inputCountry = event.target;\n } else {\n var inputCountry = event;\n }\n \n var form = inputCountry.form;\n var inputCountryName = inputCountry.dataset.wiName.replace(\'-text\', \'\');\n var inputStateName = inputCountry.dataset.wiInputState;\n\n var inputState = form.querySelector(\'input[data-wi-name="\'+inputStateName+\'-text"]\');\n\n inputState.disabled = true;\n inputState.value = "";\n\n delay(100).then(() => {\n\n if (form.querySelector(\'input[name="\'+inputCountryName+\'"]:checked\') != null) {\n\n var country = form.querySelector(\'input[name="\'+inputCountryName+\'"]:checked\').value;\n \n if (inputState.dataset.wiListStates != country) {\n \n inputState.dataset.wiListStates = country;\n\n loadingSpinner();\n\n $.ajax({\n type: "POST",\n url: pathApp+\'/api/states.php\',\n data: { \n post: \'true\',\n country: country\n }, \n success: function (data) {\n\n const response = JSON.parse(data);\n\n textListOptions( inputState, response );\n\n inputState.disabled = false;\n\n if (stateValue != null && stateValue != "") { textListValue(inputState, stateValue); }\n\n loadingSpinner();\n\n },\n error: function (XMLHttpRequest) {\n\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n\n }\n });\n\n } else {\n\n inputState.disabled = false;\n \n }\n\n }\n\n });\n\n}'},7350:n=>{n.exports='var x, i, j, l, ll, selElmnt, a, b, c;\n\n// Look for any elements with the class "custom-select":\nx = document.querySelectorAll("[data-wi-select=\'true\']");\nl = x.length;\n\nfor (i = 0; i < l; i++) {\n\n selElmnt = x[i].getElementsByTagName("select")[0];\n ll = selElmnt.length;\n\n // For each element, create a new DIV that will act as the selected item:\n a = document.createElement("DIV");\n a.setAttribute("class", "select-selected wi-input");\n a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;\n x[i].appendChild(a);\n\n // For each element, create a new DIV that will contain the option list:\n b = document.createElement("DIV");\n b.setAttribute("class", "select-items wi-input-list no-scrollbar");\n\n for (j = 0; j < ll; j++) {\n\n // For each option in the original select element, create a new DIV that will act as an option item:\n c = document.createElement("DIV");\n c.id = selElmnt.options[j].value;\n c.setAttribute("class", "wi-input-list-value");\n c.innerHTML = selElmnt.options[j].innerHTML;\n\n // Se è impostato un valore di default selezionalo\n if (selElmnt.value != undefined) { if (c.id == selElmnt.value) { c.classList.add("same-as-selected"); } }\n\n c.addEventListener("click", function(e) {\n\n // When an item is clicked, update the original select box, and the selected item:\n var y, i, k, s, h, sl, yl;\n s = this.parentNode.parentNode.getElementsByTagName("select")[0];\n sl = s.length;\n selElmnt.value = this.id;\n h = this.parentNode.previousSibling;\n\n for (i = 0; i < sl; i++) {\n if (s.options[i].innerHTML == this.innerHTML) {\n s.selectedIndex = i;\n h.innerHTML = this.innerHTML;\n y = this.parentNode.getElementsByClassName("same-as-selected");\n yl = y.length;\n for (k = 0; k < yl; k++) {\n y[k].classList.remove("same-as-selected");\n }\n this.setAttribute("class", "wi-input-list-value same-as-selected");\n break;\n }\n }\n\n h.click();\n\n });\n\n // Passa le funzioni onchange dal select alle nuove opzioni\n c.onclick = selElmnt.onchange;\n c.mousedown = selElmnt.onchange;\n\n b.appendChild(c);\n\n }\n\n x[i].appendChild(b);\n\n a.addEventListener("click", function(e) {\n\n // When the select box is clicked, close any other select boxes, and open/close the current select box\n e.stopPropagation();\n closeAllSelect(this);\n this.classList.toggle("select-arrow-active");\n this.parentNode.classList.toggle("wi-list-active");\n check();\n\n });\n\n}\n\nfunction closeAllSelect(elmnt) {\n\n // A function that will close all select boxes in the document, except the current select box:\n var x, y, i, xl, yl, arrNo = [];\n x = document.getElementsByClassName("select-items");\n y = document.getElementsByClassName("select-selected");\n var container = document.querySelector(".wi-input-container.wi-list-active");\n xl = x.length;\n yl = y.length;\n\n for (i = 0; i < yl; i++) {\n if (elmnt == y[i]) {\n arrNo.push(i)\n }else{\n y[i].classList.remove("select-arrow-active");\n }\n }\n\n if (container != null) {\n container.classList.remove("wi-list-active");\n }\n\n}\n\n// If the user clicks anywhere outside the select box, then close all select boxes:\ndocument.addEventListener("click", closeAllSelect);'},4428:n=>{n.exports='function formToArray(formElements) {\n\n const ARRAY = {};\n\n for (let i = 0; i < formElements.length; i++) {\n\n var add = false;\n\n var input = formElements[i];\n\n if (input.type == \'checkbox\' || input.type == \'radio\') {\n if (input.checked == true) { var add = true; }\n } else {\n if (input.value != "") { var add = true;}\n }\n\n if (add) {\n\n var inputName = input.name;\n var inputValue = input.value;\n\n if (inputName.includes("[]")) {\n\n inputName = inputName.replace("[]", "");\n\n if (inputName in ARRAY) {\n inputName = inputName.replace("[]", "");\n ARRAY[inputName].push(inputValue);\n } else {\n inputName = inputName.replace("[]", "");\n ARRAY[inputName] = [];\n ARRAY[inputName].push(inputValue);\n }\n \n } else {\n\n if (inputName in ARRAY) {\n\n } else {\n ARRAY[inputName] = inputValue;\n }\n\n }\n\n }\n\n }\n\n return ARRAY;\n \n}\n\nfunction prettyFormResponse(data) {\n\n if (data != \'\') {\n \n console.log(\'ERRORE FORM: \'+data);\n\n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n container.innerHTML = \'<div class="title-big a-c"><i class="bi bi-x-circle tx-danger"></i></div><div class="subtitle mt-8 a-c">C\\\'è stato un problema con l\\\'invio della tua richiesta</div><div class="c-w mt-10"><a onclick="location.reload();" class="btn btn-primary c-w">Riprova</a></div>\';\n\n } else {\n \n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n container.innerHTML = \'<div class="title-big a-c"><i class="bi bi-check2-circle tx-success"></i></div><div class="subtitle mt-8 a-c">La tua richiesta è stata inviata con successo!</div><div class="c-w mt-10"><a onclick="location.reload(); " class="btn btn-primary c-w">Torna al sito</a></div>\';\n\n }\n \n}\n\nfunction sendForm(button, url, responseFunction = prettyFormResponse) {\n\n loadingSpinner();\n\n const VALUES = formToArray(button.form.elements);\n var form = JSON.stringify(VALUES);\n\n $.ajax({\n type: "POST",\n url: url,\n data: { \n post: \'true\',\n form: form\n }, \n success: function (data) {\n\n if (responseFunction != null) {\n if (typeof responseFunction === \'function\') {\n responseFunction(data);\n } else {\n loadingSpinner();\n }\n }\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}\n\nfunction formUpload(form, url, responseFunction = prettyFormResponse) {\n\n loadingSpinner();\n \n var formData = new FormData(form);\n formData.append(\'post\', \'true\');\n \n $.ajax({\n type: "POST",\n url: url,\n data: formData,\n contentType: false,\n cache: false,\n processData:false, \n success: function (data) {\n\n if (responseFunction != null) {\n if (typeof responseFunction === \'function\') {\n responseFunction(data);\n } else {\n loadingSpinner();\n }\n }\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}'},8516:n=>{n.exports='function menuMobile(hamburger = "#hamburger", navMobile = "#nav-mobile") { \n \n if (hamburger != null) { document.querySelector(hamburger).classList.toggle("click"); }\n if (navMobile != null) { document.querySelector(navMobile).classList.toggle("show"); }\n\n if (document.querySelector(hamburger).classList.contains("click")) {\n disableScroll();\n } else {\n enableScroll();\n }\n\n}'},148:n=>{n.exports="function modal(selector) {\n\n setUpModal(selector);\n\n var modal = document.querySelector(selector);\n\n modal.classList.toggle('wi-show');\n modal.classList.toggle('no-interaction');\n\n if (modal.classList.contains('wi-show')) {\n disableScroll();\n } else {\n enableScroll();\n }\n\n}\n\nfunction setUpModal(selector) {\n \n document.querySelectorAll(selector + ' .wi-close-modal').forEach(element => {\n if (element.onclick == null) {\n element.onclick = function() { modal(selector) };\n }\n });\n\n}"},225:n=>{n.exports="function setUpPage() {\n \n $.ajax({\n type: \"POST\",\n url: pathApp+'/api/alert.php',\n data: { \n post: 'true',\n frontend: 'true',\n alert: 801\n }, \n success: function (data) {\n NO_INTERNET_ALERT = data;\n }\n });\n\n var PAGE_URL = new URL(window.location.href);\n\n if (PAGE_URL.searchParams.get('scroll')) {\n \n var idScroll = PAGE_URL.searchParams.get('scroll');\n scrolla('#'+idScroll);\n\n }\n\n // L'alert non viene passato solo tramite GET ma anche tramite variabile php\n // if (PAGE_URL.searchParams.get('alert')) {\n // var alertCode = PAGE_URL.searchParams.get('alert'); alertToast(alertCode);\n // }\n\n setInput();\n setDropdown();\n setVideoJS();\n setTooltip();\n \n window.dispatchEvent(new Event('loaded'));\n \n};"},4642:n=>{n.exports=function(n){function e(n){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",n)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(n):"undefined"!=typeof eval?eval.call(null,n):e("EvalError: No eval function available")}catch(n){e(n)}}},1120:(n,e,t)=>{t(4642)(t(6867))},2051:(n,e,t)=>{t(4642)(t(5068))},1809:(n,e,t)=>{t(4642)(t(7244))},7154:(n,e,t)=>{t(4642)(t(2787))},8865:(n,e,t)=>{t(4642)(t(7350))},1123:(n,e,t)=>{t(4642)(t(4428))},5329:(n,e,t)=>{t(4642)(t(8516))},871:(n,e,t)=>{t(4642)(t(148))},7186:(n,e,t)=>{t(4642)(t(225))}},e={};function t(a){var i=e[a];if(void 0!==i)return i.exports;var o=e[a]={exports:{}};return n[a](o,o.exports,t),o.exports}t.n=n=>{var e=n&&n.__esModule?()=>n.default:()=>n;return t.d(e,{a:e}),e},t.d=(n,e)=>{for(var a in e)t.o(e,a)&&!t.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:e[a]})},t.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),t.r=n=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})};var a={};(()=>{"use strict";t.r(a);t(2051),t(5329),t(1120),t(1809),t(871),t(7154),t(8865),t(1123),t(7186)})(),window.wonder=a})();
|
|
3
3
|
//# sourceMappingURL=body-end.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontend/body-end.js","mappings":";sBAAAA,EAAOC,QAAU,ilDCAjBD,EAAOC,QAAU,kPCAjBD,EAAOC,QAAU,g0ECAjBD,EAAOC,QAAU,qyQCAjBD,EAAOC,QAAU,orHCAjBD,EAAOC,QAAU,8xHCAjBD,EAAOC,QAAU,ubCAjBD,EAAOC,QAAU,4kBCAjBD,EAAOC,QAAU,o4BCIjBD,EAAOC,QAAU,SAASC,GACzB,SAASC,EAAIC,GACQ,oBAAZC,UACJA,QAAQD,OAASC,QAAQF,KAAK,kBAAmBC,EACtD,CAOA,IAC2B,oBAAfE,YAJmB,oBAAhBC,aAA2D,oBAArBC,iBAKnDF,WAAWJ,GACe,oBAATO,KACjBA,KAAKC,KAAK,KAAMR,GAEhBC,EAAI,wCAEN,CAAE,MAAOC,GACRD,EAAIC,EACL,CACD,kBC1BA,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,sBCAjH,EAAQ,KAAR,CAAyG,EAAQ,sBCAjH,EAAQ,KAAR,CAAyG,EAAQ,QCC7GO,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAab,QAGrB,IAAID,EAASW,EAAyBE,GAAY,CAGjDZ,QAAS,CAAC,GAOX,OAHAe,EAAoBH,GAAUb,EAAQA,EAAOC,QAASW,GAG/CZ,EAAOC,OACf,CCrBAW,EAAoBK,EAAKjB,IACxB,IAAIkB,EAASlB,GAAUA,EAAOmB,WAC7B,IAAOnB,EAAiB,QACxB,IAAM,EAEP,OADAY,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdN,EAAoBQ,EAAI,CAACnB,EAASqB,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEvB,EAASsB,IAC5EE,OAAOC,eAAezB,EAASsB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAetB,KAAKmB,EAAKC,GCClFlB,EAAoBqB,EAAKhC,IACH,oBAAXiC,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAezB,EAASiC,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAezB,EAAS,aAAc,CAAEmC,OAAO,GAAO","sources":["webpack://wonder/./src/build/frontend/js/alert.js","webpack://wonder/./src/build/frontend/js/aos.js","webpack://wonder/./src/build/frontend/js/dropdown.js","webpack://wonder/./src/build/frontend/js/form/place.js","webpack://wonder/./src/build/frontend/js/form/select.js","webpack://wonder/./src/build/frontend/js/form/send.js","webpack://wonder/./src/build/frontend/js/header.js","webpack://wonder/./src/build/frontend/js/modal.js","webpack://wonder/./src/build/frontend/js/pageSetUp.js","webpack://wonder/./node_modules/script-loader/addScript.js","webpack://wonder/./src/build/frontend/js/alert.js?37ef","webpack://wonder/./src/build/frontend/js/aos.js?68ca","webpack://wonder/./src/build/frontend/js/dropdown.js?51db","webpack://wonder/./src/build/frontend/js/form/place.js?6f16","webpack://wonder/./src/build/frontend/js/form/select.js?c3d3","webpack://wonder/./src/build/frontend/js/form/send.js?2a0e","webpack://wonder/./src/build/frontend/js/header.js?c891","webpack://wonder/./src/build/frontend/js/modal.js?9265","webpack://wonder/./src/build/frontend/js/pageSetUp.js?f423","webpack://wonder/webpack/bootstrap","webpack://wonder/webpack/runtime/compat get default export","webpack://wonder/webpack/runtime/define property getters","webpack://wonder/webpack/runtime/hasOwnProperty shorthand","webpack://wonder/webpack/runtime/make namespace object"],"sourcesContent":["module.exports = \"function alertContainer() {\\n\\n if (document.querySelector('.alert-container')) {\\n\\n var container = document.querySelector('.alert-container');\\n\\n } else {\\n\\n var container = document.createElement('div');\\n container.classList.add('alert-container');\\n container.classList.add('p-f');\\n container.classList.add('top');\\n container.classList.add('start');\\n container.classList.add('w-100');\\n container.classList.add('h-100');\\n container.classList.add('no-interaction');\\n container.style.zIndex = \\\"1000\\\";\\n\\n document.body.insertBefore(container, document.body.firstChild);\\n\\n }\\n\\n return container;\\n\\n}\\n\\nfunction alertToast(alert) {\\n\\n var container = alertContainer();\\n\\n if (alert == 801) {\\n\\n container.innerHTML += NO_INTERNET_ALERT;\\n\\n } else {\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/alert.php',\\n data: { \\n post: 'true',\\n frontend: 'true',\\n alert: alert\\n }, \\n success: function (data) {\\n\\n container.innerHTML += data;\\n \\n var url = new URL(window.location.href);\\n url.searchParams.delete('alert');\\n window.history.replaceState(null, null, url);\\n\\n }\\n });\\n\\n }\\n\\n setTimeout(() => {\\n document.querySelectorAll('.wi-alert.wi-show').forEach(element => {\\n element.classList.remove('wi-show');\\n });\\n }, 4000);\\n\\n}\"","module.exports = \"function setAos() {\\n\\n if (isMobile() && (typeof MOBILE_REMOVE_AOS == 'undefined' || MOBILE_REMOVE_AOS == true)) {\\n AOS.init({\\n disable: 'mobile'\\n });\\n } else {\\n AOS.init();\\n }\\n\\n}\"","module.exports = \"function toggleDropdown(container) {\\n\\n if (container.classList.contains('wi-show')) {\\n closeDropdown(container);\\n } else {\\n openDropdown(container);\\n }\\n \\n}\\n\\nfunction openDropdown(container) {\\n\\n container.classList.add('wi-show'); \\n\\n if (container.querySelector('i.bi-chevron-down')) {\\n container.querySelector('i.bi-chevron-down').classList.add('bi-chevron-up');\\n container.querySelector('i.bi-chevron-down').classList.remove('bi-chevron-down');\\n }\\n\\n if (container.querySelector('i.bi-plus')) {\\n container.querySelector('i.bi-plus').classList.add('bi-dash');\\n container.querySelector('i.bi-plus').classList.remove('bi-plus');\\n }\\n\\n if (container.querySelector('i.bi-plus-lg')) {\\n container.querySelector('i.bi-plus-lg').classList.add('bi-dash-lg');\\n container.querySelector('i.bi-plus-lg').classList.remove('bi-plus-lg');\\n }\\n \\n}\\n\\nfunction closeDropdown(container) {\\n\\n container.classList.remove('wi-show'); \\n\\n if (container.querySelector('i.bi-chevron-up')) {\\n container.querySelector('i.bi-chevron-up').classList.add('bi-chevron-down');\\n container.querySelector('i.bi-chevron-up').classList.remove('bi-chevron-up');\\n }\\n\\n if (container.querySelector('i.bi-dash')) {\\n container.querySelector('i.bi-dash').classList.add('bi-plus');\\n container.querySelector('i.bi-dash').classList.remove('bi-dash');\\n }\\n\\n if (container.querySelector('i.bi-dash-lg')) {\\n container.querySelector('i.bi-dash-lg').classList.add('bi-plus-lg');\\n container.querySelector('i.bi-dash-lg').classList.remove('bi-dash-lg');\\n }\\n \\n}\\n\\nfunction setDropdown() {\\n \\n document.querySelectorAll(\\\".wi-dropdown-btn .wi-switcher\\\").forEach(element => {\\n\\n element.onclick = function() { toggleDropdown(element.parentElement); };\\n \\n element.parentElement.onmouseleave = function() { closeDropdown(element.parentElement); };\\n \\n });\\n\\n document.querySelectorAll(\\\".wi-dropdown-box .wi-switcher\\\").forEach(element => {\\n\\n if (element.parentElement.classList.contains('wi-show')) {\\n openDropdown(element.parentElement);\\n }\\n\\n element.onclick = function() { toggleDropdown(element.parentElement); };\\n \\n });\\n\\n}\"","module.exports = \"/**\\n * \\n * GOOGLE MAPS API\\n * \\n */\\n\\nfunction placeNeedCheck(input) {\\n\\n inputError(input, 'Indirizzo non valido, è necessario selezionare un indirizzo dall\\\\'elenco!');\\n\\n}\\n\\nfunction checkInputPlace(input, autocomplete) {\\n \\n var inputContainer = input.parentElement;\\n\\n var country = inputContainer.querySelector('[data-wi-spi=\\\"country\\\"]');\\n var province = inputContainer.querySelector('[data-wi-spi=\\\"province\\\"]');\\n var cap = inputContainer.querySelector('[data-wi-spi=\\\"cap\\\"]');\\n var city = inputContainer.querySelector('[data-wi-spi=\\\"city\\\"]');\\n var street = inputContainer.querySelector('[data-wi-spi=\\\"street\\\"]');\\n var number = inputContainer.querySelector('[data-wi-spi=\\\"number\\\"]');\\n\\n country.value = \\\"\\\";\\n province.value = \\\"\\\";\\n cap.value = \\\"\\\";\\n city.value = \\\"\\\";\\n street.value = \\\"\\\";\\n number.value = \\\"\\\";\\n\\n removeInputError(input);\\n\\n if (autocomplete.getPlace()) {\\n\\n var place = autocomplete.getPlace();\\n\\n if (place.address_components) {\\n\\n for (const component of place.address_components) {\\n \\n const componentType = component.types;\\n\\n if (componentType.includes('street_number')) { number.value = component.long_name; }\\n if (componentType.includes('route')) { street.value = component.short_name; }\\n if (componentType.includes('administrative_area_level_3') || componentType.includes('postal_town')) { city.value = component.short_name; }\\n if (componentType.includes('postal_code') || componentType.includes('postal_code_prefix')) { cap.value = component.short_name; }\\n if (componentType.includes('administrative_area_level_2')) { province.value = component.short_name; }\\n if (componentType.includes('country')) { country.value = component.short_name; }\\n\\n }\\n\\n if (country.value == \\\"\\\" || province.value == \\\"\\\" || cap.value == \\\"\\\" || city.value == \\\"\\\" || street.value == \\\"\\\" || number.value == \\\"\\\") {\\n \\n var error = \\\"Indirizzo non valido\\\";\\n\\n if (country.value == \\\"\\\") {\\n error += \\\", manca il paese\\\";\\n } else if (province.value == \\\"\\\") {\\n error += \\\", manca la provincia\\\";\\n } else if (cap.value == \\\"\\\") {\\n error += \\\", manca il cap\\\";\\n } else if (city.value == \\\"\\\") {\\n error += \\\", manca la città\\\";\\n } else if (street.value == \\\"\\\") {\\n error += \\\", manca la via\\\";\\n } else if (number.value == \\\"\\\") {\\n error += \\\", manca il numero civico\\\";\\n }\\n\\n inputError(input, error);\\n \\n }\\n\\n } else {\\n\\n inputError(input, 'Indirizzo non valido');\\n\\n }\\n\\n } else {\\n\\n inputError(input, 'Indirizzo non valido');\\n\\n }\\n\\n check();\\n\\n}\\n\\nfunction setPlace(input, country = null, province = null, cap = null, city = null, street = null, number = null) {\\n\\n var inputContainer = input.parentElement;\\n\\n var countryInput = inputContainer.querySelector('[data-wi-spi=\\\"country\\\"]');\\n var provinceInput = inputContainer.querySelector('[data-wi-spi=\\\"province\\\"]');\\n var capInput = inputContainer.querySelector('[data-wi-spi=\\\"cap\\\"]');\\n var cityInput = inputContainer.querySelector('[data-wi-spi=\\\"city\\\"]');\\n var streetInput = inputContainer.querySelector('[data-wi-spi=\\\"street\\\"]');\\n var numberInput = inputContainer.querySelector('[data-wi-spi=\\\"number\\\"]');\\n\\n if (country == null) {\\n\\n country = countryInput.value;\\n province = provinceInput.value;\\n cap = capInput.value;\\n city = cityInput.value;\\n street = streetInput.value;\\n number = numberInput.value;\\n\\n } else {\\n\\n countryInput.value = country;\\n provinceInput.value = province;\\n capInput.value = cap;\\n cityInput.value = city;\\n streetInput.value = street;\\n numberInput.value = number;\\n \\n }\\n\\n if (country != \\\"\\\" || province != \\\"\\\" || cap != \\\"\\\" || city != \\\"\\\" || street != \\\"\\\" || number != \\\"\\\") {\\n \\n var address = street+', '+number+', '+city+', '+province+', '+country;\\n input.value = address;\\n\\n checkLabel();\\n check();\\n\\n }\\n\\n}\\n\\nfunction setGoogleMapsPlace() {\\n\\n document.querySelectorAll(\\\"[data-wi-search-place='true']\\\").forEach(input => {\\n\\n input.disabled = false;\\n \\n var options = {};\\n\\n if (input.dataset.wiRestriction != '[]') { \\n\\n var restrictions = JSON.parse(input.dataset.wiRestriction);\\n options.componentRestrictions = restrictions; \\n \\n }\\n\\n options.fields = [ \\\"address_components\\\" ];\\n options.types = [ \\\"address\\\" ];\\n \\n var googlePlace = new google.maps.places.Autocomplete(input, options);\\n\\n input.addEventListener(\\\"change\\\", () => { placeNeedCheck(input); });\\n googlePlace.addListener(\\\"place_changed\\\", () => { checkInputPlace(input, googlePlace); });\\n\\n });\\n\\n}\\n\\nfunction setGoogleMapsApi() {\\n\\n if (document.querySelector(\\\"[data-wi-search-place]\\\")) {\\n\\n var GOOGLE_API_KEY = \\\"AIzaSyAhBslKzmgy6pRrLGyhlN34pN1yQYE1hvI\\\";\\n\\n /**\\n * \\n * Se ci sono degli input Place chiama le API di Google Place\\n * Documentazione: https://developers.google.com/maps/documentation/javascript/place-autocomplete?hl=it\\n * \\n */\\n\\n var script = document.createElement('script');\\n script.type = 'text/javascript';\\n script.async = true;\\n script.src = 'https://maps.googleapis.com/maps/api/js?key='+GOOGLE_API_KEY+'&loading=async&libraries=places&callback=setGoogleMapsPlace'; \\n\\n document.head.appendChild(script);\\n \\n }\\n\\n}\\n\\n/**\\n * \\n * inputCountry() - inputStates()\\n * \\n */\\n\\nfunction setInputCountry() {\\n\\n document.querySelectorAll(\\\"[data-wi-input-country='true']\\\").forEach(element => {\\n element.addEventListener(\\\"change\\\", searchStates);\\n element.addEventListener(\\\"focusout\\\", searchStates);\\n });\\n\\n}\\n\\nfunction setCountryState(input, country, state) {\\n\\n textListValue(input, country);\\n searchStates(input, state);\\n \\n}\\n\\nfunction searchStates(event, stateValue = null) {\\n\\n if (typeof event.target !== \\\"undefined\\\") {\\n var inputCountry = event.target;\\n } else {\\n var inputCountry = event;\\n }\\n \\n var form = inputCountry.form;\\n var inputCountryName = inputCountry.dataset.wiName.replace('-text', '');\\n var inputStateName = inputCountry.dataset.wiInputState;\\n\\n var inputState = form.querySelector('input[data-wi-name=\\\"'+inputStateName+'-text\\\"]');\\n\\n inputState.disabled = true;\\n inputState.value = \\\"\\\";\\n\\n delay(100).then(() => {\\n\\n if (form.querySelector('input[name=\\\"'+inputCountryName+'\\\"]:checked') != null) {\\n\\n var country = form.querySelector('input[name=\\\"'+inputCountryName+'\\\"]:checked').value;\\n \\n if (inputState.dataset.wiListStates != country) {\\n \\n inputState.dataset.wiListStates = country;\\n\\n loadingSpinner();\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/states.php',\\n data: { \\n post: 'true',\\n country: country\\n }, \\n success: function (data) {\\n\\n const response = JSON.parse(data);\\n\\n textListOptions( inputState, response );\\n\\n inputState.disabled = false;\\n\\n if (stateValue != null && stateValue != \\\"\\\") { textListValue(inputState, stateValue); }\\n\\n loadingSpinner();\\n\\n },\\n error: function (XMLHttpRequest) {\\n\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n\\n }\\n });\\n\\n } else {\\n\\n inputState.disabled = false;\\n \\n }\\n\\n }\\n\\n });\\n\\n}\"","module.exports = \"var x, i, j, l, ll, selElmnt, a, b, c;\\n\\n// Look for any elements with the class \\\"custom-select\\\":\\nx = document.querySelectorAll(\\\"[data-wi-select='true']\\\");\\nl = x.length;\\n\\nfor (i = 0; i < l; i++) {\\n\\n selElmnt = x[i].getElementsByTagName(\\\"select\\\")[0];\\n ll = selElmnt.length;\\n\\n // For each element, create a new DIV that will act as the selected item:\\n a = document.createElement(\\\"DIV\\\");\\n a.setAttribute(\\\"class\\\", \\\"select-selected wi-input\\\");\\n a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;\\n x[i].appendChild(a);\\n\\n // For each element, create a new DIV that will contain the option list:\\n b = document.createElement(\\\"DIV\\\");\\n b.setAttribute(\\\"class\\\", \\\"select-items wi-input-list no-scrollbar\\\");\\n\\n for (j = 0; j < ll; j++) {\\n\\n // For each option in the original select element, create a new DIV that will act as an option item:\\n c = document.createElement(\\\"DIV\\\");\\n c.id = selElmnt.options[j].value;\\n c.setAttribute(\\\"class\\\", \\\"wi-input-list-value\\\");\\n c.innerHTML = selElmnt.options[j].innerHTML;\\n\\n // Se è impostato un valore di default selezionalo\\n if (selElmnt.value != undefined) { if (c.id == selElmnt.value) { c.classList.add(\\\"same-as-selected\\\"); } }\\n\\n c.addEventListener(\\\"click\\\", function(e) {\\n\\n // When an item is clicked, update the original select box, and the selected item:\\n var y, i, k, s, h, sl, yl;\\n s = this.parentNode.parentNode.getElementsByTagName(\\\"select\\\")[0];\\n sl = s.length;\\n selElmnt.value = this.id;\\n h = this.parentNode.previousSibling;\\n\\n for (i = 0; i < sl; i++) {\\n if (s.options[i].innerHTML == this.innerHTML) {\\n s.selectedIndex = i;\\n h.innerHTML = this.innerHTML;\\n y = this.parentNode.getElementsByClassName(\\\"same-as-selected\\\");\\n yl = y.length;\\n for (k = 0; k < yl; k++) {\\n y[k].classList.remove(\\\"same-as-selected\\\");\\n }\\n this.setAttribute(\\\"class\\\", \\\"wi-input-list-value same-as-selected\\\");\\n break;\\n }\\n }\\n\\n h.click();\\n\\n });\\n\\n // Passa le funzioni onchange dal select alle nuove opzioni\\n c.onclick = selElmnt.onchange;\\n c.mousedown = selElmnt.onchange;\\n\\n b.appendChild(c);\\n\\n }\\n\\n x[i].appendChild(b);\\n\\n a.addEventListener(\\\"click\\\", function(e) {\\n\\n // When the select box is clicked, close any other select boxes, and open/close the current select box\\n e.stopPropagation();\\n closeAllSelect(this);\\n this.classList.toggle(\\\"select-arrow-active\\\");\\n this.parentNode.classList.toggle(\\\"wi-list-active\\\");\\n check();\\n\\n });\\n\\n}\\n\\nfunction closeAllSelect(elmnt) {\\n\\n // A function that will close all select boxes in the document, except the current select box:\\n var x, y, i, xl, yl, arrNo = [];\\n x = document.getElementsByClassName(\\\"select-items\\\");\\n y = document.getElementsByClassName(\\\"select-selected\\\");\\n var container = document.querySelector(\\\".wi-input-container.wi-list-active\\\");\\n xl = x.length;\\n yl = y.length;\\n\\n for (i = 0; i < yl; i++) {\\n if (elmnt == y[i]) {\\n arrNo.push(i)\\n }else{\\n y[i].classList.remove(\\\"select-arrow-active\\\");\\n }\\n }\\n\\n if (container != null) {\\n container.classList.remove(\\\"wi-list-active\\\");\\n }\\n\\n}\\n\\n// If the user clicks anywhere outside the select box, then close all select boxes:\\ndocument.addEventListener(\\\"click\\\", closeAllSelect);\"","module.exports = \"function formToArray(formElements) {\\n\\n const ARRAY = {};\\n\\n for (let i = 0; i < formElements.length; i++) {\\n\\n var add = false;\\n\\n var input = formElements[i];\\n\\n if (input.type == 'checkbox' || input.type == 'radio') {\\n if (input.checked == true) { var add = true; }\\n } else {\\n if (input.value != \\\"\\\") { var add = true;}\\n }\\n\\n if (add) {\\n\\n var inputName = input.name;\\n var inputValue = input.value;\\n\\n if (inputName.includes(\\\"[]\\\")) {\\n\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n\\n if (inputName in ARRAY) {\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n ARRAY[inputName].push(inputValue);\\n } else {\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n ARRAY[inputName] = [];\\n ARRAY[inputName].push(inputValue);\\n }\\n \\n } else {\\n\\n if (inputName in ARRAY) {\\n\\n } else {\\n ARRAY[inputName] = inputValue;\\n }\\n\\n }\\n\\n }\\n\\n }\\n\\n return ARRAY;\\n \\n}\\n\\nfunction prettyFormResponse(data) {\\n\\n if (data != '') {\\n \\n console.log('ERRORE FORM: '+data);\\n\\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n container.innerHTML = '<div class=\\\"title-big a-c\\\"><i class=\\\"bi bi-x-circle tx-danger\\\"></i></div><div class=\\\"subtitle mt-8 a-c\\\">C\\\\'è stato un problema con l\\\\'invio della tua richiesta</div><div class=\\\"c-w mt-10\\\"><a onclick=\\\"location.reload();\\\" class=\\\"btn btn-primary c-w\\\">Riprova</a></div>';\\n\\n } else {\\n \\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n container.innerHTML = '<div class=\\\"title-big a-c\\\"><i class=\\\"bi bi-check2-circle tx-success\\\"></i></div><div class=\\\"subtitle mt-8 a-c\\\">La tua richiesta è stata inviata con successo!</div><div class=\\\"c-w mt-10\\\"><a onclick=\\\"location.reload(); \\\" class=\\\"btn btn-primary c-w\\\">Torna al sito</a></div>';\\n\\n }\\n \\n}\\n\\nfunction sendForm(button, url, responseFunction = prettyFormResponse) {\\n\\n loadingSpinner();\\n\\n const VALUES = formToArray(button.form.elements);\\n var form = JSON.stringify(VALUES);\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: url,\\n data: { \\n post: 'true',\\n form: form\\n }, \\n success: function (data) {\\n\\n if (responseFunction != null) {\\n if (typeof responseFunction === 'function') {\\n responseFunction(data);\\n } else {\\n loadingSpinner();\\n }\\n }\\n\\n },\\n error: function (XMLHttpRequest) {\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n }\\n });\\n\\n}\\n\\nfunction formUpload(form, url, responseFunction = prettyFormResponse) {\\n\\n loadingSpinner();\\n \\n var formData = new FormData(form);\\n formData.append('post', 'true');\\n \\n $.ajax({\\n type: \\\"POST\\\",\\n url: url,\\n data: formData,\\n contentType: false,\\n cache: false,\\n processData:false, \\n success: function (data) {\\n\\n if (responseFunction != null) {\\n if (typeof responseFunction === 'function') {\\n responseFunction(data);\\n } else {\\n loadingSpinner();\\n }\\n }\\n\\n },\\n error: function (XMLHttpRequest) {\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n }\\n });\\n\\n}\"","module.exports = \"function menuMobile(hamburger = \\\"#hamburger\\\", navMobile = \\\"#nav-mobile\\\") { \\n \\n if (hamburger != null) { document.querySelector(hamburger).classList.toggle(\\\"click\\\"); }\\n if (navMobile != null) { document.querySelector(navMobile).classList.toggle(\\\"show\\\"); }\\n\\n if (document.querySelector(hamburger).classList.contains(\\\"click\\\")) {\\n disableScroll();\\n } else {\\n enableScroll();\\n }\\n\\n}\"","module.exports = \"function modal(selector) {\\n\\n setUpModal(selector);\\n\\n var modal = document.querySelector(selector);\\n\\n modal.classList.toggle('wi-show');\\n modal.classList.toggle('no-interaction');\\n\\n if (modal.classList.contains('wi-show')) {\\n disableScroll();\\n } else {\\n enableScroll();\\n }\\n\\n}\\n\\nfunction setUpModal(selector) {\\n \\n document.querySelectorAll(selector + ' .wi-close-modal').forEach(element => {\\n if (element.onclick == null) {\\n element.onclick = function() { modal(selector) };\\n }\\n });\\n\\n}\"","module.exports = \"function setUpPage() {\\n \\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/alert.php',\\n data: { \\n post: 'true',\\n frontend: 'true',\\n alert: 801\\n }, \\n success: function (data) {\\n NO_INTERNET_ALERT = data;\\n }\\n });\\n\\n var PAGE_URL = new URL(window.location.href);\\n\\n if (PAGE_URL.searchParams.get('scroll')) {\\n \\n var idScroll = PAGE_URL.searchParams.get('scroll');\\n scrolla('#'+idScroll);\\n\\n }\\n\\n // L'alert non viene passato solo tramite GET ma anche tramite variabile php\\n // if (PAGE_URL.searchParams.get('alert')) {\\n // var alertCode = PAGE_URL.searchParams.get('alert'); alertToast(alertCode);\\n // }\\n\\n setInput();\\n setDropdown();\\n setVideoJS();\\n \\n window.dispatchEvent(new Event('loaded'));\\n \\n};\"","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nmodule.exports = function(src) {\n\tfunction log(error) {\n\t\t(typeof console !== \"undefined\")\n\t\t&& (console.error || console.log)(\"[Script Loader]\", error);\n\t}\n\n\t// Check for IE =< 8\n\tfunction isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}\n\n\ttry {\n\t\tif (typeof execScript !== \"undefined\" && isIE()) {\n\t\t\texecScript(src);\n\t\t} else if (typeof eval !== \"undefined\") {\n\t\t\teval.call(null, src);\n\t\t} else {\n\t\t\tlog(\"EvalError: No eval function available\");\n\t\t}\n\t} catch (error) {\n\t\tlog(error);\n\t}\n}\n","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/alert.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/aos.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/dropdown.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/form/place.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/form/select.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/form/send.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/header.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/modal.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/pageSetUp.js\"))","// 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](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\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};"],"names":["module","exports","src","log","error","console","execScript","attachEvent","addEventListener","eval","call","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","value"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"frontend/body-end.js","mappings":";sBAAAA,EAAOC,QAAU,ilDCAjBD,EAAOC,QAAU,kPCAjBD,EAAOC,QAAU,g0ECAjBD,EAAOC,QAAU,qyQCAjBD,EAAOC,QAAU,orHCAjBD,EAAOC,QAAU,8xHCAjBD,EAAOC,QAAU,ubCAjBD,EAAOC,QAAU,4kBCAjBD,EAAOC,QAAU,u5BCIjBD,EAAOC,QAAU,SAASC,GACzB,SAASC,EAAIC,GACQ,oBAAZC,UACJA,QAAQD,OAASC,QAAQF,KAAK,kBAAmBC,EACtD,CAOA,IAC2B,oBAAfE,YAJmB,oBAAhBC,aAA2D,oBAArBC,iBAKnDF,WAAWJ,GACe,oBAATO,KACjBA,KAAKC,KAAK,KAAMR,GAEhBC,EAAI,wCAEN,CAAE,MAAOC,GACRD,EAAIC,EACL,CACD,kBC1BA,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,sBCAjH,EAAQ,KAAR,CAAyG,EAAQ,sBCAjH,EAAQ,KAAR,CAAyG,EAAQ,QCC7GO,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAab,QAGrB,IAAID,EAASW,EAAyBE,GAAY,CAGjDZ,QAAS,CAAC,GAOX,OAHAe,EAAoBH,GAAUb,EAAQA,EAAOC,QAASW,GAG/CZ,EAAOC,OACf,CCrBAW,EAAoBK,EAAKjB,IACxB,IAAIkB,EAASlB,GAAUA,EAAOmB,WAC7B,IAAOnB,EAAiB,QACxB,IAAM,EAEP,OADAY,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdN,EAAoBQ,EAAI,CAACnB,EAASqB,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEvB,EAASsB,IAC5EE,OAAOC,eAAezB,EAASsB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAetB,KAAKmB,EAAKC,GCClFlB,EAAoBqB,EAAKhC,IACH,oBAAXiC,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAezB,EAASiC,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAezB,EAAS,aAAc,CAAEmC,OAAO,GAAO","sources":["webpack://wonder/./src/build/frontend/js/alert.js","webpack://wonder/./src/build/frontend/js/aos.js","webpack://wonder/./src/build/frontend/js/dropdown.js","webpack://wonder/./src/build/frontend/js/form/place.js","webpack://wonder/./src/build/frontend/js/form/select.js","webpack://wonder/./src/build/frontend/js/form/send.js","webpack://wonder/./src/build/frontend/js/header.js","webpack://wonder/./src/build/frontend/js/modal.js","webpack://wonder/./src/build/frontend/js/pageSetUp.js","webpack://wonder/./node_modules/script-loader/addScript.js","webpack://wonder/./src/build/frontend/js/alert.js?37ef","webpack://wonder/./src/build/frontend/js/aos.js?68ca","webpack://wonder/./src/build/frontend/js/dropdown.js?51db","webpack://wonder/./src/build/frontend/js/form/place.js?6f16","webpack://wonder/./src/build/frontend/js/form/select.js?c3d3","webpack://wonder/./src/build/frontend/js/form/send.js?2a0e","webpack://wonder/./src/build/frontend/js/header.js?c891","webpack://wonder/./src/build/frontend/js/modal.js?9265","webpack://wonder/./src/build/frontend/js/pageSetUp.js?f423","webpack://wonder/webpack/bootstrap","webpack://wonder/webpack/runtime/compat get default export","webpack://wonder/webpack/runtime/define property getters","webpack://wonder/webpack/runtime/hasOwnProperty shorthand","webpack://wonder/webpack/runtime/make namespace object"],"sourcesContent":["module.exports = \"function alertContainer() {\\n\\n if (document.querySelector('.alert-container')) {\\n\\n var container = document.querySelector('.alert-container');\\n\\n } else {\\n\\n var container = document.createElement('div');\\n container.classList.add('alert-container');\\n container.classList.add('p-f');\\n container.classList.add('top');\\n container.classList.add('start');\\n container.classList.add('w-100');\\n container.classList.add('h-100');\\n container.classList.add('no-interaction');\\n container.style.zIndex = \\\"1000\\\";\\n\\n document.body.insertBefore(container, document.body.firstChild);\\n\\n }\\n\\n return container;\\n\\n}\\n\\nfunction alertToast(alert) {\\n\\n var container = alertContainer();\\n\\n if (alert == 801) {\\n\\n container.innerHTML += NO_INTERNET_ALERT;\\n\\n } else {\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/alert.php',\\n data: { \\n post: 'true',\\n frontend: 'true',\\n alert: alert\\n }, \\n success: function (data) {\\n\\n container.innerHTML += data;\\n \\n var url = new URL(window.location.href);\\n url.searchParams.delete('alert');\\n window.history.replaceState(null, null, url);\\n\\n }\\n });\\n\\n }\\n\\n setTimeout(() => {\\n document.querySelectorAll('.wi-alert.wi-show').forEach(element => {\\n element.classList.remove('wi-show');\\n });\\n }, 4000);\\n\\n}\"","module.exports = \"function setAos() {\\n\\n if (isMobile() && (typeof MOBILE_REMOVE_AOS == 'undefined' || MOBILE_REMOVE_AOS == true)) {\\n AOS.init({\\n disable: 'mobile'\\n });\\n } else {\\n AOS.init();\\n }\\n\\n}\"","module.exports = \"function toggleDropdown(container) {\\n\\n if (container.classList.contains('wi-show')) {\\n closeDropdown(container);\\n } else {\\n openDropdown(container);\\n }\\n \\n}\\n\\nfunction openDropdown(container) {\\n\\n container.classList.add('wi-show'); \\n\\n if (container.querySelector('i.bi-chevron-down')) {\\n container.querySelector('i.bi-chevron-down').classList.add('bi-chevron-up');\\n container.querySelector('i.bi-chevron-down').classList.remove('bi-chevron-down');\\n }\\n\\n if (container.querySelector('i.bi-plus')) {\\n container.querySelector('i.bi-plus').classList.add('bi-dash');\\n container.querySelector('i.bi-plus').classList.remove('bi-plus');\\n }\\n\\n if (container.querySelector('i.bi-plus-lg')) {\\n container.querySelector('i.bi-plus-lg').classList.add('bi-dash-lg');\\n container.querySelector('i.bi-plus-lg').classList.remove('bi-plus-lg');\\n }\\n \\n}\\n\\nfunction closeDropdown(container) {\\n\\n container.classList.remove('wi-show'); \\n\\n if (container.querySelector('i.bi-chevron-up')) {\\n container.querySelector('i.bi-chevron-up').classList.add('bi-chevron-down');\\n container.querySelector('i.bi-chevron-up').classList.remove('bi-chevron-up');\\n }\\n\\n if (container.querySelector('i.bi-dash')) {\\n container.querySelector('i.bi-dash').classList.add('bi-plus');\\n container.querySelector('i.bi-dash').classList.remove('bi-dash');\\n }\\n\\n if (container.querySelector('i.bi-dash-lg')) {\\n container.querySelector('i.bi-dash-lg').classList.add('bi-plus-lg');\\n container.querySelector('i.bi-dash-lg').classList.remove('bi-dash-lg');\\n }\\n \\n}\\n\\nfunction setDropdown() {\\n \\n document.querySelectorAll(\\\".wi-dropdown-btn .wi-switcher\\\").forEach(element => {\\n\\n element.onclick = function() { toggleDropdown(element.parentElement); };\\n \\n element.parentElement.onmouseleave = function() { closeDropdown(element.parentElement); };\\n \\n });\\n\\n document.querySelectorAll(\\\".wi-dropdown-box .wi-switcher\\\").forEach(element => {\\n\\n if (element.parentElement.classList.contains('wi-show')) {\\n openDropdown(element.parentElement);\\n }\\n\\n element.onclick = function() { toggleDropdown(element.parentElement); };\\n \\n });\\n\\n}\"","module.exports = \"/**\\n * \\n * GOOGLE MAPS API\\n * \\n */\\n\\nfunction placeNeedCheck(input) {\\n\\n inputError(input, 'Indirizzo non valido, è necessario selezionare un indirizzo dall\\\\'elenco!');\\n\\n}\\n\\nfunction checkInputPlace(input, autocomplete) {\\n \\n var inputContainer = input.parentElement;\\n\\n var country = inputContainer.querySelector('[data-wi-spi=\\\"country\\\"]');\\n var province = inputContainer.querySelector('[data-wi-spi=\\\"province\\\"]');\\n var cap = inputContainer.querySelector('[data-wi-spi=\\\"cap\\\"]');\\n var city = inputContainer.querySelector('[data-wi-spi=\\\"city\\\"]');\\n var street = inputContainer.querySelector('[data-wi-spi=\\\"street\\\"]');\\n var number = inputContainer.querySelector('[data-wi-spi=\\\"number\\\"]');\\n\\n country.value = \\\"\\\";\\n province.value = \\\"\\\";\\n cap.value = \\\"\\\";\\n city.value = \\\"\\\";\\n street.value = \\\"\\\";\\n number.value = \\\"\\\";\\n\\n removeInputError(input);\\n\\n if (autocomplete.getPlace()) {\\n\\n var place = autocomplete.getPlace();\\n\\n if (place.address_components) {\\n\\n for (const component of place.address_components) {\\n \\n const componentType = component.types;\\n\\n if (componentType.includes('street_number')) { number.value = component.long_name; }\\n if (componentType.includes('route')) { street.value = component.short_name; }\\n if (componentType.includes('administrative_area_level_3') || componentType.includes('postal_town')) { city.value = component.short_name; }\\n if (componentType.includes('postal_code') || componentType.includes('postal_code_prefix')) { cap.value = component.short_name; }\\n if (componentType.includes('administrative_area_level_2')) { province.value = component.short_name; }\\n if (componentType.includes('country')) { country.value = component.short_name; }\\n\\n }\\n\\n if (country.value == \\\"\\\" || province.value == \\\"\\\" || cap.value == \\\"\\\" || city.value == \\\"\\\" || street.value == \\\"\\\" || number.value == \\\"\\\") {\\n \\n var error = \\\"Indirizzo non valido\\\";\\n\\n if (country.value == \\\"\\\") {\\n error += \\\", manca il paese\\\";\\n } else if (province.value == \\\"\\\") {\\n error += \\\", manca la provincia\\\";\\n } else if (cap.value == \\\"\\\") {\\n error += \\\", manca il cap\\\";\\n } else if (city.value == \\\"\\\") {\\n error += \\\", manca la città\\\";\\n } else if (street.value == \\\"\\\") {\\n error += \\\", manca la via\\\";\\n } else if (number.value == \\\"\\\") {\\n error += \\\", manca il numero civico\\\";\\n }\\n\\n inputError(input, error);\\n \\n }\\n\\n } else {\\n\\n inputError(input, 'Indirizzo non valido');\\n\\n }\\n\\n } else {\\n\\n inputError(input, 'Indirizzo non valido');\\n\\n }\\n\\n check();\\n\\n}\\n\\nfunction setPlace(input, country = null, province = null, cap = null, city = null, street = null, number = null) {\\n\\n var inputContainer = input.parentElement;\\n\\n var countryInput = inputContainer.querySelector('[data-wi-spi=\\\"country\\\"]');\\n var provinceInput = inputContainer.querySelector('[data-wi-spi=\\\"province\\\"]');\\n var capInput = inputContainer.querySelector('[data-wi-spi=\\\"cap\\\"]');\\n var cityInput = inputContainer.querySelector('[data-wi-spi=\\\"city\\\"]');\\n var streetInput = inputContainer.querySelector('[data-wi-spi=\\\"street\\\"]');\\n var numberInput = inputContainer.querySelector('[data-wi-spi=\\\"number\\\"]');\\n\\n if (country == null) {\\n\\n country = countryInput.value;\\n province = provinceInput.value;\\n cap = capInput.value;\\n city = cityInput.value;\\n street = streetInput.value;\\n number = numberInput.value;\\n\\n } else {\\n\\n countryInput.value = country;\\n provinceInput.value = province;\\n capInput.value = cap;\\n cityInput.value = city;\\n streetInput.value = street;\\n numberInput.value = number;\\n \\n }\\n\\n if (country != \\\"\\\" || province != \\\"\\\" || cap != \\\"\\\" || city != \\\"\\\" || street != \\\"\\\" || number != \\\"\\\") {\\n \\n var address = street+', '+number+', '+city+', '+province+', '+country;\\n input.value = address;\\n\\n checkLabel();\\n check();\\n\\n }\\n\\n}\\n\\nfunction setGoogleMapsPlace() {\\n\\n document.querySelectorAll(\\\"[data-wi-search-place='true']\\\").forEach(input => {\\n\\n input.disabled = false;\\n \\n var options = {};\\n\\n if (input.dataset.wiRestriction != '[]') { \\n\\n var restrictions = JSON.parse(input.dataset.wiRestriction);\\n options.componentRestrictions = restrictions; \\n \\n }\\n\\n options.fields = [ \\\"address_components\\\" ];\\n options.types = [ \\\"address\\\" ];\\n \\n var googlePlace = new google.maps.places.Autocomplete(input, options);\\n\\n input.addEventListener(\\\"change\\\", () => { placeNeedCheck(input); });\\n googlePlace.addListener(\\\"place_changed\\\", () => { checkInputPlace(input, googlePlace); });\\n\\n });\\n\\n}\\n\\nfunction setGoogleMapsApi() {\\n\\n if (document.querySelector(\\\"[data-wi-search-place]\\\")) {\\n\\n var GOOGLE_API_KEY = \\\"AIzaSyAhBslKzmgy6pRrLGyhlN34pN1yQYE1hvI\\\";\\n\\n /**\\n * \\n * Se ci sono degli input Place chiama le API di Google Place\\n * Documentazione: https://developers.google.com/maps/documentation/javascript/place-autocomplete?hl=it\\n * \\n */\\n\\n var script = document.createElement('script');\\n script.type = 'text/javascript';\\n script.async = true;\\n script.src = 'https://maps.googleapis.com/maps/api/js?key='+GOOGLE_API_KEY+'&loading=async&libraries=places&callback=setGoogleMapsPlace'; \\n\\n document.head.appendChild(script);\\n \\n }\\n\\n}\\n\\n/**\\n * \\n * inputCountry() - inputStates()\\n * \\n */\\n\\nfunction setInputCountry() {\\n\\n document.querySelectorAll(\\\"[data-wi-input-country='true']\\\").forEach(element => {\\n element.addEventListener(\\\"change\\\", searchStates);\\n element.addEventListener(\\\"focusout\\\", searchStates);\\n });\\n\\n}\\n\\nfunction setCountryState(input, country, state) {\\n\\n textListValue(input, country);\\n searchStates(input, state);\\n \\n}\\n\\nfunction searchStates(event, stateValue = null) {\\n\\n if (typeof event.target !== \\\"undefined\\\") {\\n var inputCountry = event.target;\\n } else {\\n var inputCountry = event;\\n }\\n \\n var form = inputCountry.form;\\n var inputCountryName = inputCountry.dataset.wiName.replace('-text', '');\\n var inputStateName = inputCountry.dataset.wiInputState;\\n\\n var inputState = form.querySelector('input[data-wi-name=\\\"'+inputStateName+'-text\\\"]');\\n\\n inputState.disabled = true;\\n inputState.value = \\\"\\\";\\n\\n delay(100).then(() => {\\n\\n if (form.querySelector('input[name=\\\"'+inputCountryName+'\\\"]:checked') != null) {\\n\\n var country = form.querySelector('input[name=\\\"'+inputCountryName+'\\\"]:checked').value;\\n \\n if (inputState.dataset.wiListStates != country) {\\n \\n inputState.dataset.wiListStates = country;\\n\\n loadingSpinner();\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/states.php',\\n data: { \\n post: 'true',\\n country: country\\n }, \\n success: function (data) {\\n\\n const response = JSON.parse(data);\\n\\n textListOptions( inputState, response );\\n\\n inputState.disabled = false;\\n\\n if (stateValue != null && stateValue != \\\"\\\") { textListValue(inputState, stateValue); }\\n\\n loadingSpinner();\\n\\n },\\n error: function (XMLHttpRequest) {\\n\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n\\n }\\n });\\n\\n } else {\\n\\n inputState.disabled = false;\\n \\n }\\n\\n }\\n\\n });\\n\\n}\"","module.exports = \"var x, i, j, l, ll, selElmnt, a, b, c;\\n\\n// Look for any elements with the class \\\"custom-select\\\":\\nx = document.querySelectorAll(\\\"[data-wi-select='true']\\\");\\nl = x.length;\\n\\nfor (i = 0; i < l; i++) {\\n\\n selElmnt = x[i].getElementsByTagName(\\\"select\\\")[0];\\n ll = selElmnt.length;\\n\\n // For each element, create a new DIV that will act as the selected item:\\n a = document.createElement(\\\"DIV\\\");\\n a.setAttribute(\\\"class\\\", \\\"select-selected wi-input\\\");\\n a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;\\n x[i].appendChild(a);\\n\\n // For each element, create a new DIV that will contain the option list:\\n b = document.createElement(\\\"DIV\\\");\\n b.setAttribute(\\\"class\\\", \\\"select-items wi-input-list no-scrollbar\\\");\\n\\n for (j = 0; j < ll; j++) {\\n\\n // For each option in the original select element, create a new DIV that will act as an option item:\\n c = document.createElement(\\\"DIV\\\");\\n c.id = selElmnt.options[j].value;\\n c.setAttribute(\\\"class\\\", \\\"wi-input-list-value\\\");\\n c.innerHTML = selElmnt.options[j].innerHTML;\\n\\n // Se è impostato un valore di default selezionalo\\n if (selElmnt.value != undefined) { if (c.id == selElmnt.value) { c.classList.add(\\\"same-as-selected\\\"); } }\\n\\n c.addEventListener(\\\"click\\\", function(e) {\\n\\n // When an item is clicked, update the original select box, and the selected item:\\n var y, i, k, s, h, sl, yl;\\n s = this.parentNode.parentNode.getElementsByTagName(\\\"select\\\")[0];\\n sl = s.length;\\n selElmnt.value = this.id;\\n h = this.parentNode.previousSibling;\\n\\n for (i = 0; i < sl; i++) {\\n if (s.options[i].innerHTML == this.innerHTML) {\\n s.selectedIndex = i;\\n h.innerHTML = this.innerHTML;\\n y = this.parentNode.getElementsByClassName(\\\"same-as-selected\\\");\\n yl = y.length;\\n for (k = 0; k < yl; k++) {\\n y[k].classList.remove(\\\"same-as-selected\\\");\\n }\\n this.setAttribute(\\\"class\\\", \\\"wi-input-list-value same-as-selected\\\");\\n break;\\n }\\n }\\n\\n h.click();\\n\\n });\\n\\n // Passa le funzioni onchange dal select alle nuove opzioni\\n c.onclick = selElmnt.onchange;\\n c.mousedown = selElmnt.onchange;\\n\\n b.appendChild(c);\\n\\n }\\n\\n x[i].appendChild(b);\\n\\n a.addEventListener(\\\"click\\\", function(e) {\\n\\n // When the select box is clicked, close any other select boxes, and open/close the current select box\\n e.stopPropagation();\\n closeAllSelect(this);\\n this.classList.toggle(\\\"select-arrow-active\\\");\\n this.parentNode.classList.toggle(\\\"wi-list-active\\\");\\n check();\\n\\n });\\n\\n}\\n\\nfunction closeAllSelect(elmnt) {\\n\\n // A function that will close all select boxes in the document, except the current select box:\\n var x, y, i, xl, yl, arrNo = [];\\n x = document.getElementsByClassName(\\\"select-items\\\");\\n y = document.getElementsByClassName(\\\"select-selected\\\");\\n var container = document.querySelector(\\\".wi-input-container.wi-list-active\\\");\\n xl = x.length;\\n yl = y.length;\\n\\n for (i = 0; i < yl; i++) {\\n if (elmnt == y[i]) {\\n arrNo.push(i)\\n }else{\\n y[i].classList.remove(\\\"select-arrow-active\\\");\\n }\\n }\\n\\n if (container != null) {\\n container.classList.remove(\\\"wi-list-active\\\");\\n }\\n\\n}\\n\\n// If the user clicks anywhere outside the select box, then close all select boxes:\\ndocument.addEventListener(\\\"click\\\", closeAllSelect);\"","module.exports = \"function formToArray(formElements) {\\n\\n const ARRAY = {};\\n\\n for (let i = 0; i < formElements.length; i++) {\\n\\n var add = false;\\n\\n var input = formElements[i];\\n\\n if (input.type == 'checkbox' || input.type == 'radio') {\\n if (input.checked == true) { var add = true; }\\n } else {\\n if (input.value != \\\"\\\") { var add = true;}\\n }\\n\\n if (add) {\\n\\n var inputName = input.name;\\n var inputValue = input.value;\\n\\n if (inputName.includes(\\\"[]\\\")) {\\n\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n\\n if (inputName in ARRAY) {\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n ARRAY[inputName].push(inputValue);\\n } else {\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n ARRAY[inputName] = [];\\n ARRAY[inputName].push(inputValue);\\n }\\n \\n } else {\\n\\n if (inputName in ARRAY) {\\n\\n } else {\\n ARRAY[inputName] = inputValue;\\n }\\n\\n }\\n\\n }\\n\\n }\\n\\n return ARRAY;\\n \\n}\\n\\nfunction prettyFormResponse(data) {\\n\\n if (data != '') {\\n \\n console.log('ERRORE FORM: '+data);\\n\\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n container.innerHTML = '<div class=\\\"title-big a-c\\\"><i class=\\\"bi bi-x-circle tx-danger\\\"></i></div><div class=\\\"subtitle mt-8 a-c\\\">C\\\\'è stato un problema con l\\\\'invio della tua richiesta</div><div class=\\\"c-w mt-10\\\"><a onclick=\\\"location.reload();\\\" class=\\\"btn btn-primary c-w\\\">Riprova</a></div>';\\n\\n } else {\\n \\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n container.innerHTML = '<div class=\\\"title-big a-c\\\"><i class=\\\"bi bi-check2-circle tx-success\\\"></i></div><div class=\\\"subtitle mt-8 a-c\\\">La tua richiesta è stata inviata con successo!</div><div class=\\\"c-w mt-10\\\"><a onclick=\\\"location.reload(); \\\" class=\\\"btn btn-primary c-w\\\">Torna al sito</a></div>';\\n\\n }\\n \\n}\\n\\nfunction sendForm(button, url, responseFunction = prettyFormResponse) {\\n\\n loadingSpinner();\\n\\n const VALUES = formToArray(button.form.elements);\\n var form = JSON.stringify(VALUES);\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: url,\\n data: { \\n post: 'true',\\n form: form\\n }, \\n success: function (data) {\\n\\n if (responseFunction != null) {\\n if (typeof responseFunction === 'function') {\\n responseFunction(data);\\n } else {\\n loadingSpinner();\\n }\\n }\\n\\n },\\n error: function (XMLHttpRequest) {\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n }\\n });\\n\\n}\\n\\nfunction formUpload(form, url, responseFunction = prettyFormResponse) {\\n\\n loadingSpinner();\\n \\n var formData = new FormData(form);\\n formData.append('post', 'true');\\n \\n $.ajax({\\n type: \\\"POST\\\",\\n url: url,\\n data: formData,\\n contentType: false,\\n cache: false,\\n processData:false, \\n success: function (data) {\\n\\n if (responseFunction != null) {\\n if (typeof responseFunction === 'function') {\\n responseFunction(data);\\n } else {\\n loadingSpinner();\\n }\\n }\\n\\n },\\n error: function (XMLHttpRequest) {\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n }\\n });\\n\\n}\"","module.exports = \"function menuMobile(hamburger = \\\"#hamburger\\\", navMobile = \\\"#nav-mobile\\\") { \\n \\n if (hamburger != null) { document.querySelector(hamburger).classList.toggle(\\\"click\\\"); }\\n if (navMobile != null) { document.querySelector(navMobile).classList.toggle(\\\"show\\\"); }\\n\\n if (document.querySelector(hamburger).classList.contains(\\\"click\\\")) {\\n disableScroll();\\n } else {\\n enableScroll();\\n }\\n\\n}\"","module.exports = \"function modal(selector) {\\n\\n setUpModal(selector);\\n\\n var modal = document.querySelector(selector);\\n\\n modal.classList.toggle('wi-show');\\n modal.classList.toggle('no-interaction');\\n\\n if (modal.classList.contains('wi-show')) {\\n disableScroll();\\n } else {\\n enableScroll();\\n }\\n\\n}\\n\\nfunction setUpModal(selector) {\\n \\n document.querySelectorAll(selector + ' .wi-close-modal').forEach(element => {\\n if (element.onclick == null) {\\n element.onclick = function() { modal(selector) };\\n }\\n });\\n\\n}\"","module.exports = \"function setUpPage() {\\n \\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/alert.php',\\n data: { \\n post: 'true',\\n frontend: 'true',\\n alert: 801\\n }, \\n success: function (data) {\\n NO_INTERNET_ALERT = data;\\n }\\n });\\n\\n var PAGE_URL = new URL(window.location.href);\\n\\n if (PAGE_URL.searchParams.get('scroll')) {\\n \\n var idScroll = PAGE_URL.searchParams.get('scroll');\\n scrolla('#'+idScroll);\\n\\n }\\n\\n // L'alert non viene passato solo tramite GET ma anche tramite variabile php\\n // if (PAGE_URL.searchParams.get('alert')) {\\n // var alertCode = PAGE_URL.searchParams.get('alert'); alertToast(alertCode);\\n // }\\n\\n setInput();\\n setDropdown();\\n setVideoJS();\\n setTooltip();\\n \\n window.dispatchEvent(new Event('loaded'));\\n \\n};\"","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nmodule.exports = function(src) {\n\tfunction log(error) {\n\t\t(typeof console !== \"undefined\")\n\t\t&& (console.error || console.log)(\"[Script Loader]\", error);\n\t}\n\n\t// Check for IE =< 8\n\tfunction isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}\n\n\ttry {\n\t\tif (typeof execScript !== \"undefined\" && isIE()) {\n\t\t\texecScript(src);\n\t\t} else if (typeof eval !== \"undefined\") {\n\t\t\teval.call(null, src);\n\t\t} else {\n\t\t\tlog(\"EvalError: No eval function available\");\n\t\t}\n\t} catch (error) {\n\t\tlog(error);\n\t}\n}\n","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/alert.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/aos.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/dropdown.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/form/place.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/form/select.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/form/send.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/header.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/modal.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/pageSetUp.js\"))","// 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](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\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};"],"names":["module","exports","src","log","error","console","execScript","attachEvent","addEventListener","eval","call","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","value"],"sourceRoot":""}
|