{"version":3,"file":"application_hachette-02baa017.js","sources":["../../../app/frontend/src/hachette/components/header.js","../../../app/whitelabels/hachette/assets/javascripts/custom.js","../../../app/whitelabels/hachette/assets/javascripts/events.js","../../../app/whitelabels/hachette/assets/javascripts/tutors/check_box_form.js","../../../app/whitelabels/hachette/assets/javascripts/tutors/flash.js","../../../app/whitelabels/hachette/assets/javascripts/tutors/login.js","../../../app/whitelabels/hachette/assets/javascripts/tutors/custom.js","../../../app/whitelabels/hachette/assets/javascripts/tableau/custom.js","../../../app/whitelabels/hachette/assets/javascripts/modals.js","../../../app/whitelabels/hachette/assets/javascripts/application.js","../../../app/frontend/entrypoints/application_hachette.js"],"sourcesContent":["const CLASSES = {\n NAVBAR_LIFTED: \"nav-bar--lifted\",\n};\n\nclass Header {\n constructor({ selector } = {}) {\n this.selector = selector;\n this.bindElements();\n this.setupListeners();\n }\n\n start() {\n this.toggleHeaderLifted();\n }\n\n bindElements() {\n this.navbar = document.querySelector(this.selector);\n }\n\n setupListeners() {\n window.addEventListener(\"scroll\", () => this.handleWindowScroll());\n }\n\n handleWindowScroll() {\n this.toggleHeaderLifted();\n }\n\n toggleHeaderLifted() {\n if (window.scrollY > 0) {\n this.navbar.classList.add(CLASSES.NAVBAR_LIFTED);\n } else {\n this.navbar.classList.remove(CLASSES.NAVBAR_LIFTED);\n }\n }\n}\n\nexport default Header;\n","$(function () {\n var $myCarousel = $(\"header.carousel\");\n // Initialize carousel\n $myCarousel.carousel({\n interval: 5000,\n });\n //*****************************//\n // ** slider for reviews box **\n var $myCarousel2 = $(\"#bottom-slider\");\n // Initialize carousel\n $myCarousel2.carousel({\n interval: 5000,\n });\n\n //*****************************//\n // slider on genitori page\n var $myCarousel2 = $(\"#genitori-slider\");\n // Initialize carousel\n $myCarousel2.carousel({\n interval: 5000,\n });\n\n $myCarousel2.bind(\"slid.bs.carousel\", function (e) {\n var indx = $(\"ol.carousel-indicators li.active\").data(\"slide-to\");\n $(\".genitori .box-slider a\").each(function () {\n $(this).removeClass(\"focused\");\n });\n $('div.slider-console a[data-bs-target=\"#genitori-slider\"][data-bs-slide-to=' + indx + \"]\").addClass(\"focused\");\n });\n\n var $myCarousel3 = $(\"#insegnanti-slider\");\n // Initialize carousel\n $myCarousel3.carousel({\n interval: 5000,\n });\n //*****************************//\n // slider on genitori page\n var $myCarouselBlog = $(\"#blog-slider\");\n // Initialize carousel\n $myCarouselBlog.carousel({\n interval: 5000,\n });\n //*****************************//\n // slider on insegnanti page\n // Instantiate the Bootstrap carousel\n $(\".multi-item-carousel\").carousel({\n interval: false,\n });\n // for every slide in carousel, copy the next slide's item in the slide.\n // Do the same for the next, next item.\n $(\".multi-item-carousel .item\").each(function () {\n var next = $(this).next();\n if (!next.length) {\n next = $(this).siblings(\":first\");\n }\n next.children(\":first-child\").clone().appendTo($(this));\n\n if (next.next().length > 0) {\n next.next().children(\":first-child\").clone().appendTo($(this));\n } else {\n $(this).siblings(\":first\").children(\":first-child\").clone().appendTo($(this));\n }\n });\n\n // Select all links with hashes\n $('a.scrollAnimation[href*=\"#\"]')\n // Remove links that don't actually link to anything\n .not('[href=\"#\"]')\n .not('[href=\"#0\"]')\n .click(function (event) {\n // On-page links\n if (location.pathname.replace(/^\\//, \"\") == this.pathname.replace(/^\\//, \"\") && location.hostname == this.hostname) {\n // Figure out element to scroll to\n var target = $(this.hash);\n target = target.length ? target : $(\"[name=\" + this.hash.slice(1) + \"]\");\n // Does a scroll target exist?\n if (target.length) {\n // Only prevent default if animation is actually gonna happen\n event.preventDefault();\n $(\"html, body\").animate(\n {\n scrollTop: target.offset().top,\n },\n 1000,\n function () {\n // Callback after animation\n // Must change focus!\n var $target = $(target);\n $target.focus();\n if ($target.is(\":focus\")) {\n // Checking if the target was focused\n return false;\n } else {\n $target.attr(\"tabindex\", \"-1\"); // Adding tabindex for elements not focusable\n $target.focus(); // Set focus again\n }\n }\n );\n }\n }\n });\n});\n\n//*********************************************************************//\n//**** header carousel scripts for text and buttons animations ****//\n//*********************************************************************//\n// slider on the homepage\n\n$(function () {\n $(\"#reg_teacher_form\").submit(function () {\n return validate(this);\n });\n\n if ($(\"#countainer_schools\").children().length == 1) {\n $(\".remove_school_link\").css(\"display\", \"none\");\n }\n});\n\nwindow.toggle_visibility = function toggle_visibility(id) {\n var e = document.getElementById(id);\n if (e.style.display != \"none\") e.style.display = \"none\";\n else e.style.display = \"block\";\n};\n\n$(document).on(\"change focusout\", '[data-purpose=\"fill-dropdown\"]', function (e) {\n var input = $(this).closest(\".dynamic_section\").find(\"input\")[1];\n $.each($('[data-purpose=\"auto-school\"]'), function (idx, v) {\n set_autocomplete_school($(v));\n });\n});\n\n/**\n * Get the parent-element and then the first block of fileds \"city\" and \"schools\".\n * We have to use the document.ready workaround just to be sure all fields are correctly loaded in page\n */\n\n// used in add_school function\nvar containerSchools = null;\nvar firstSchoolBlock = null;\n\n$(function () {\n containerSchools = $(\"#countainer_schools\");\n firstSchoolBlock = containerSchools.find(\" > .dynamic_section:first\").clone(); // force to select the first one\n firstSchoolBlock.find(\"select.selectpicker\").selectpicker(\"destroy\").addClass(\"selectpicker\");\n});\n\n$('[data-purpose=\"fill-dropdown\"]').change();\n\nwindow.add_school = function add_school() {\n // Fat: refactor js in order to avoid duplicate-field manipulation\n\n // var containerSchools = $(\"#countainer_schools\");\n\n if (containerSchools.children().length < 5) {\n // clone the first block without events\n var new_block = firstSchoolBlock.clone();\n // fix: remove duplicated IDs\n new_block.find(\"input, select\").each(function (i, e) {\n e.id = \"\";\n });\n\n // prepare new html fileds\n new_block.find(\"input\").val(\"\");\n new_block.find(\"select option\").remove();\n\n set_autocomplete_city(new_block.find('[data-purpose=\"fill-dropdown\"]'));\n\n new_block.find(\".remove_school_link\").css(\"display\", \"block\");\n\n // re-initialize selectpicker for school (code taken from application.js)\n new_block.find(\"select\").selectpicker();\n if (/Android|webOS|BlackBerry/i.test(navigator.userAgent)) {\n $(\".selectpicker\").selectpicker(\"mobile\");\n }\n\n containerSchools.append(new_block);\n\n containerSchools.find(\".remove_school_link\").css(\"display\", \"block\");\n }\n};\n\nwindow.remove_school = function remove_school(me) {\n if ($(\"#countainer_schools\").children().length > 1) {\n $(me).closest(\".dynamic_section\").remove();\n }\n if ($(\"#countainer_schools\").children().length == 1) {\n $(\".remove_school_link\").css(\"display\", \"none\");\n }\n};\n\nwindow.isOdd = function isOdd(value) {\n if (value % 2 != 0) return true;\n else return false;\n};\n\nwindow.update_panel_school_subjects = function update_panel_school_subjects(me) {\n var summary = $(\"#school_subject_summary\").text();\n var selected = $(me).text();\n $(\"#school_subject_summary\").text((summary += selected));\n};\n\n$(document).on(\"click\", 'input[data-purpose=\"fill_summary_school_subjects\"]', function () {\n $(\".panel_checkboxes\").css(\"display\", \"block\");\n var $checked = $(\"input:checked\");\n var texts = $checked.map(function (i, el) {\n return $(el).closest(\"label\").find(\"span\").html();\n });\n $(\"#school_subject_summary\").text($.makeArray(texts).join(\", \"));\n});\n\nwindow.trim = function trim(s) {\n if (s != null) {\n s = s.replace(/(^\\s*)|(\\s*$)/gi, \"\");\n s = s.replace(/[ ]{2,}/gi, \" \");\n s = s.replace(/\\n /, \"\\n\");\n return s;\n }\n};\n\n$(\"#areadropdown\")\n .change(function (e) {\n var container1 = document.getElementById(\"container_school_subjects_1\");\n var container2 = document.getElementById(\"container_school_subjects_2\");\n $(\"#school_subject_summary\").text(\"\");\n container1.innerHTML = \"\";\n container2.innerHTML = \"\";\n var selected = this.value.split(\"-\");\n var term = trim(selected[0]);\n var area = trim(selected[1]);\n var query = \"/profile/school-subject?term=\" + term;\n if (area != null) {\n query += \"&area=\" + area;\n }\n $.getJSON(query, function (schoolSubjects) {\n for (var i = 0; i < schoolSubjects.length; i++) {\n var obj = schoolSubjects[i];\n var target = container1;\n if (isOdd(i)) target = container2;\n\n var content = \"
\";\n content += '';\n content += '\";\n content += \"
\";\n\n $(content).appendTo(target);\n }\n });\n })\n .change();\n\n$(function () {\n var pickerOpts = {\n monthNames: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\n monthNamesShort: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\n dayNames: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\n dayNamesShort: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"],\n dayNamesMin: [\"Do\", \"Lu\", \"Ma\", \"Me\", \"Gi\", \"Ve\", \"Sa\"],\n prevText: \"<Prec\",\n prevStatus: \"\",\n prevJumpText: \"<<\",\n prevJumpStatus: \"\",\n nextText: \"Succ>\",\n nextStatus: \"\",\n nextJumpText: \">>\",\n nextJumpStatus: \"\",\n currentText: \"Oggi\",\n currentStatus: \"\",\n todayText: \"Oggi\",\n todayStatus: \"\",\n clearText: \"-\",\n clearStatus: \"\",\n closeText: \"Chiudi\",\n closeStatus: \"\",\n yearStatus: \"\",\n monthStatus: \"\",\n weekText: \"Sm\",\n weekStatus: \"\",\n dayStatus: \"DD d MM\",\n defaultStatus: \"\",\n dateFormat: \"dd/mm/yy\",\n firstDay: 1,\n isRTL: false,\n showButtonPanel: false,\n changeMonth: true,\n changeYear: true,\n yearRange: \"1920:2020\",\n defaultDate: \"1/1/1980\",\n };\n $(\"#profile_birthdate\").datepicker(pickerOpts);\n});\n\nwindow.toTitleCase = function toTitleCase(str) {\n return str.replace(/\\w\\S*/g, function (txt) {\n return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();\n });\n};\n\nwindow.set_autocomplete_city = function set_autocomplete_city(obj) {\n var region_id = $(\"#region_id\").val();\n var regionPart = region_id ? \"?region_id=\" + region_id : \"\";\n\n obj\n .autocomplete({\n minLength: 2,\n delay: 500,\n source: \"/school_data/cities_list_by_name\" + regionPart,\n\n focus: function (event, ui) {\n obj.val(ui.item.label);\n return false;\n },\n\n select: function (event, ui) {\n obj.data(\"id\", ui.item.id);\n obj.val(toTitleCase(ui.item.city_name));\n $(\".school-type\").show();\n var classroom = $(\"#classroom\");\n classroom.find(\"option\").remove();\n return false;\n },\n })\n .data(\"ui-autocomplete\")._renderItem = function (ul, item) {\n return $(\"
  • \")\n .append(\"
    \" + toTitleCase(item.city_name) + \"
  • \")\n .appendTo(ul);\n };\n};\n\nwindow.set_autocomplete_school = function set_autocomplete_school(obj) {\n var city = $(obj).closest(\".dynamic_section\").find(\"input\")[0].value;\n obj\n .autocomplete({\n minLength: 2,\n source: \"/school_data/schools_list_by_name?term=\" + city,\n\n focus: function (event, ui) {\n obj.val(ui.item.label);\n return false;\n },\n\n select: function (event, ui) {\n obj.val(toTitleCase(ui.item.name));\n $(obj).closest(\".dynamic_section\").find(\".id_school\").val(ui.item.id);\n $(obj).closest(\".dynamic_section\").find(\".auto_mail\").val(ui.item.email);\n $(\".mail_miur\").val(\"\");\n return false;\n },\n })\n .data(\"ui-autocomplete\")._renderItem = function (ul, item) {\n return $(\"
  • \")\n .append(\"
    \" + toTitleCase(item.name) + \" - \" + toTitleCase(item.city.city_name) + \"
  • \")\n .appendTo(ul);\n };\n};\n\n$(function () {\n $(document).on(\"click\", \".mail_miur\", function () {\n $.each($(\".dynamic_section :input\"), function (idx, v) {\n $(v).val(null);\n });\n });\n});\n\n$(function () {\n $.each($('[data-purpose=\"fill-dropdown\"]'), function (idx, v) {\n set_autocomplete_city($(v));\n });\n});\n\n$(function () {\n $.each($('[data-purpose=\"open-modal\"]'), function () {\n $(\"#post_reg_popup\").foundation(\"reveal\", \"open\");\n });\n});\n\n$(function () {\n var searchStyle = $('[data-purpose=\"virtual_class_search_style\"]').get(0);\n if ($('[data-purpose=\"virtual_class_search\"]').length) {\n $('[data-purpose=\"virtual_class_search\"]')\n .get(0)\n .addEventListener(\"input\", function () {\n if (!this.value) {\n searchStyle.innerHTML = \"\";\n return;\n }\n searchStyle.innerHTML = '.searchable:not([data-index*=\"' + this.value.toLowerCase() + '\"]) { display: none; }';\n });\n }\n});\n\nwindow.update_school_mail = function update_school_mail() {\n $(\"#school_subject_summary\").text((summary += selected));\n};\n\n$(document).on(\"change\", '[data-purpose=\"virtual_class_jump\"]', function () {\n document.location.href = this.options[this.selectedIndex].value;\n});\n\nvar hide_show_others = (window.hide_show_others = function (event) {\n $(\".show_hide_others\").toggle();\n content = $(\".show_hide_others_link\").html().trim() == \"Mostra altre della tua scuola:\" ? \"Nascondi altre della tua scuola:\" : \"Mostra altre della tua scuola:\";\n return $(\".show_hide_others_link\").html(content);\n});\n\n$(document).on(\"ready page:load\", function () {\n return $(document).on(\"click\", \".show_hide_others_link\", hide_show_others);\n});\n\n$(document).on(\"click\", \"a\", function (e) {\n if (this.pathname === window.location.pathname && /Modal$/.test(this.hash) && $(this.hash).length) {\n e.preventDefault();\n $(this.hash).foundation(\"reveal\", \"open\");\n }\n});\n\n$(function () {\n if (/Modal$/.test(window.location.hash) && $(window.location.hash).length) {\n $(window.location.hash).foundation(\"reveal\", \"open\");\n }\n});\n\n// $(function () {\n// $(\".with_smooth_scroll\").smoothScroll();\n// });\n\n$(document).on(\"click\", \".hide_strip_button\", function hideButton() {\n $(\".containg_strip\").css(\"visibility\", \"hidden\");\n});\n\n$(document).on(\"change\", '[data-purpose=\"render_modal_activation\"]', function () {\n var brandId = $('[data-purpose=\"render_modal_activation\"]').val();\n var divToShow = [\"#modal_activation_for_brand_id_\", brandId].join(\"\");\n $(\"[id^=modal_activation_for_brand_id_]\").hide();\n $(divToShow).show();\n});\n\n$(\"#user_pwd\").capsChecker({\n capson: function (e, isOn) {\n $(\".registrazione_pw span.capsLockMessage\").html(\"MAIUSC BLOCK attivato\");\n },\n capsoff: function (e, isOn) {\n $(\".registrazione_pw span.capsLockMessage\").html(\"\");\n },\n});\n\n$(document).on(\"click\", '[data-purpose=\"with-book-stats\"]', function (e) {\n e.preventDefault();\n var query = this.href;\n $.getJSON(query, function (data) {\n var source = $(\"#bookStatModalTemplate\").html();\n var template = Handlebars.compile(source);\n var html = template(data);\n $(\"#bookStatModal\").html(html).foundation(\"reveal\", \"open\");\n });\n});\n\n$(document).on(\"change\", 'select[data-purpose=\"hideOrShowSchool\"]', function (e) {\n if (e.target.value == \"teacher\") {\n $(\".hide_or_show_school\").show();\n } else {\n $(\".hide_or_show_school\").hide();\n }\n});\n\n$(document).on(\"click\", \"#open_drop_for_login_menu img\", function (e) {\n e.preventDefault();\n Foundation.libs.dropdown.open($(\"#drop_for_login_menu\"), $(\"#open_drop_for_login_menu\"));\n return false;\n});\n\n$(document).on(\"click\", '[data-purpose=\"showJsonHelp\"]', function (e) {\n e.preventDefault();\n $(\"#help_for_json\").toggle();\n $('[data-purpose=\"showJsonHelp\"]').text($(\"#help_for_json\").is(\":visible\") ? \"Nascondi\" : \"Mostra esempio\");\n return false;\n});\n\n$(document).on(\"click\", '[data-purpose=\"changeWelcomeSlideshow\"]', function (a) {\n $(\"[class^=welcome_slideshow_content_panel_activate]\").removeClass(\"block\");\n var target = $(this).attr(\"data-bs-target\");\n var divToShow = [\".welcome_slideshow_content_panel_\", target].join(\"\");\n var cellToActivate = [\".welcome_cell_\", target].join(\"\");\n $(\"[class^=welcome_slideshow_content_panel_]\").hide();\n $(\"[class^=welcome_cell_]\").removeClass(\"welcome_selected_cell\");\n $(divToShow).show();\n $(cellToActivate).addClass(\"welcome_selected_cell\");\n window.location.hash = target;\n return false;\n});\n\n$(function () {\n var welcomeTarget = window.location.hash.substring(1);\n if (welcomeTarget && /activate|downloadapp|downloadbook|profile/.test(welcomeTarget)) {\n $(\"[class^=welcome_slideshow_content_panel_]\").hide();\n $(\".welcome_slideshow_content_panel_\" + welcomeTarget).show();\n $(\"[class^=welcome_cell_]\").removeClass(\"welcome_selected_cell\");\n $([\".welcome_cell_\", welcomeTarget].join(\"\")).addClass(\"welcome_selected_cell\");\n }\n});\n\n$(function () {\n $(\"img[usemap]\").rwdImageMaps();\n});\n\n// $(window).load(function() {\n// $('.welcome_carousel').flexslider({\n// animation: \"slide\",\n// controlNav: false,\n// animationLoop: true,\n// slideshow: false,\n// minItems: 4,\n// itemWidth: 150,\n// itemMargin: 5,\n// });\n// });\n\n$(document).on(\"click\", \".slide_carousel\", function (a) {\n var slideNumber = $(this).attr(\"data-orbit-slide-number\");\n $(\"#welcomeExerciseModal\").foundation(\"reveal\", \"open\");\n $(\"#exerciseOrbit\")\n .siblings(\".orbit-bullets\")\n .find(\"[data-orbit-slide='\" + slideNumber + \"']\")\n .click();\n});\n\n$(document).on(\"click\", \"#welcomeExerciseModal a.close-reveal-modal\", function (a) {\n $(\"#welcomeExerciseModal\").foundation(\"reveal\", \"close\");\n});\n\n$(document).on(\"click\", \".clearing-blackout\", function (e) {\n // $('a.clearing-close').trigger('click');\n});\n","$(function () {\n // hide fullname if avatar is clicked and show when not clicked\n $('#drop-avatar').change(function() {\n if (this.checked) {\n $('#fullname-header').hide();\n } else {\n $('#fullname-header').show();\n }\n });\n\n $('.boxed.parent').click(function () {\n $(this).toggleClass('open');\n });\n});\n","// Rails wraps input[type=checkbox] with div.field_with_errors tag\n// this script exists to keep the same style of the clear form\n\n(function () {\n $(function () {\n return $(\".field_with_errors > input[type=checkbox]\").change(function (event) {\n if (this.checked) {\n return $(\".field_with_errors + label.checktype\").addClass(\"checked\");\n } else {\n return $(\".field_with_errors + label.checktype\").removeClass(\"checked\");\n }\n });\n });\n}.call(this));\n","(function() {\n $(function() {\n return $('a.close-action').on('click', function(e) {\n e.preventDefault();\n return $(this).closest('.messages').slideUp(200);\n });\n });\n\n}).call(this);\n","$(function () {\n\n $('.role-select-trigger').click(function() {\n var wrapper = $(this).closest('.user-role-select-form')\n var role = $(this).data('role');\n $(wrapper).find('#user_role_select_form_role').val(role);\n\n\n if (role === 'teacher') {\n if ( $(this).data('locale') === 'it') {\n $(wrapper).find('.first-step').hide();\n $(wrapper).find('.second-step').show();\n $(wrapper).find('.birthday-select').hide();\n $(wrapper).find('.users-select-school-teacher-subtitle').show();\n $(wrapper).find('.users-select-school-student-subtitle').hide();\n } else {\n $(wrapper).find('.btn-submit').trigger('click');\n }\n\n } else {\n $(wrapper).find('.users-select-school-teacher-subtitle').hide();\n $(wrapper).find('.users-select-school-student-subtitle').show();\n $(wrapper).find('.first-step').hide();\n $(wrapper).find('.second-step').show();\n };\n\n var birthdayOK = true;\n var schoolOK = true;\n\n\n $(wrapper).find('.birthday-select select').on('change', function() {\n var complete = true;\n var count = $(wrapper).find('.birthday-select select').size();\n var index = 0;\n birthdayOK = true;\n $(wrapper).find('.birthday-select select').each(function(i, obj) {\n var val = $(this).val();\n if (val === '') {\n index++;\n complete = false;\n }\n });\n if (!complete && index !== count && index !== 0) {\n // console.warn(\"Birthday is NOT OK\");\n birthdayOK = false;\n }\n\n checkBDayAndSchool();\n });\n\n $(wrapper).find('.school-select input.to-complete').on('change', function() {\n var complete = true;\n var count = $(wrapper).find('.school-select input.to-complete').size();\n var index = 0;\n schoolOK = true;\n $(wrapper).find('.school-select input.to-complete').each(function(i, obj) {\n var val = $(this).val();\n if (val === '') {\n index++;\n complete = false;\n }\n });\n if (!complete && index !== count && index !== 0) {\n schoolOK = false;\n }\n\n checkBDayAndSchool();\n });\n\n var checkBDayAndSchool = function() {\n if (birthdayOK && schoolOK) {\n // console.log(\"Everything is fine!\");\n $(wrapper).find('.btn-submit').attr(\"disabled\",false);\n } else {\n // console.warn(\"Something is NOT OK\");\n $(wrapper).find('.btn-submit').attr(\"disabled\",true);\n }\n };\n });\n\n});\n","import \"./check_box_form\";\r\nimport \"./flash\";\r\nimport \"./login\";\r\n\r\n$(function () {\r\n // search-navbar class switch to open the input\r\n $(\".search-form-opener\").on(\"click\", function () {\r\n $(this).prev().toggleClass(\"opened\");\r\n });\r\n});\r\n\r\n$(function () {\r\n $('[data-bs-toggle=\"tooltip\"]').tooltip();\r\n});\r\n","$(function () {\n var viz;\n var div = document.getElementById('tableau-viz-cont');\n\n var options = {\n hideTabs: true,\n hideToolbar: true,\n width: \"1016px\",\n height: \"964px\"\n };\n\n window.createViz = function createViz(url) {\n if (!div) {\n return;\n }\n if (viz) {\n viz.dispose();\n }\n viz = new tableau.Viz(div, url, options);\n }\n\n window.select = function select($el) {\n var url = $el.attr('href');\n if (!viz || viz.getUrl() !== url) {\n createViz(url);\n }\n }\n\n var first = $('.tableau-wb-link').first();\n if (first) {\n select(first);\n }\n\n $('.tableau-wb-link').on('click', function(evt) {\n evt.preventDefault();\n select($(this));\n });\n\n});\n","$(function () {\n if ($(\"#change-password-modal\").length > 0) {\n $(\"#change-password-modal\").modal(\"show\");\n }\n});\n","import \"parsleyjs/src/parsley.js\";\nimport \"parsleyjs/src/i18n/fr.js\";\nimport \"parsleyjs/src/i18n/es.js\";\nimport \"parsleyjs/src/i18n/it.js\";\nimport \"parsleyjs/src/i18n/de.js\";\nimport \"jquery-ui/dist/jquery-ui.js\";\nimport \"@hotwired/turbo-rails\";\n// import \"jquery-smooth-scroll/jquery.smooth-scroll.js\";\n// import \"bootstrap/dist/js/bootstrap.bundle.js\";\nimport \"moment/src/moment.js\";\nimport \"moment/src/locale/de.js\";\nimport \"moment/src/locale/es.js\";\nimport \"moment/src/locale/fr.js\";\nimport \"moment/src/locale/it.js\";\n// import \"flexslider/jquery.flexslider.js\";\nimport \"@vendor/jquery.rwdImageMaps.js\";\nimport \"@vendor/jquery.capsChecker.js\";\nimport \"@vendor/handlebars-v1.2.0\";\nimport \"bootstrap-select\";\n\nimport \"./custom.js\";\nimport \"./events.js\";\nimport \"./tutors/custom.js\";\nimport \"./tableau/custom.js\";\nimport \"./modals.js\";\n\n$(function () {\n window.Parsley.addValidator(\"checkOverAge\", {\n requirementType: \"string\",\n validateString: function (value, requirements) {\n var classId = requirements.split(\"-\")[0];\n var age = requirements.split(\"-\")[1];\n var day = $(\".\" + classId + \"-day\").val(),\n month = $(\".\" + classId + \"-month\").val(),\n year = $(\".\" + classId + \"-year\").val();\n\n if (isNumeric(day) === false || isNumeric(month) === false || isNumeric(year) === false) {\n return true;\n }\n\n day = zeroPad(day, 2);\n month = zeroPad(month, 2);\n year = zeroPad(year, 4);\n\n var inputDate = moment(year + \"-\" + month + \"-\" + day, \"YYYY-MM-DD\");\n var birthDate = moment().subtract(age, \"years\");\n\n if (inputDate.isValid() && inputDate <= birthDate) {\n return true;\n } else {\n return false;\n }\n },\n });\n\n window.Parsley.addValidator(\"checkUnderAge\", {\n requirementType: \"string\",\n validateString: function (value, requirements) {\n var classId = requirements.split(\"-\")[0];\n var age = requirements.split(\"-\")[1];\n var day = $(\".\" + classId + \"-day\").val(),\n month = $(\".\" + classId + \"-month\").val(),\n year = $(\".\" + classId + \"-year\").val();\n\n if (isNumeric(day) === false || isNumeric(month) === false || isNumeric(year) === false) {\n return true;\n }\n\n day = zeroPad(day, 2);\n month = zeroPad(month, 2);\n year = zeroPad(year, 4);\n\n var inputDate = moment(year + \"-\" + month + \"-\" + day, \"YYYY-MM-DD\");\n var birthDate = moment().subtract(age, \"years\");\n\n if (inputDate.isValid() && inputDate > birthDate) {\n return true;\n } else {\n return false;\n }\n },\n });\n\n window.Parsley.addValidator('rejectPattern', {\n requirementType: 'string',\n validateString: function(value, requirement) {\n // check that the email value does not contain http or // via regex\n var regex = new RegExp(requirement);\n return !regex.test(value);\n },\n });\n\n window.Parsley.addValidator(\"rejectEmoji\", {\n // requirementType: \"string\",\n validateString: function (value) {\n var regex = new RegExp(\n /[\\u{1f300}-\\u{1f5ff}\\u{1f900}-\\u{1f9ff}\\u{1f600}-\\u{1f64f}\\u{1f680}-\\u{1f6ff}\\u{2600}-\\u{26ff}\\u{2700}-\\u{27bf}\\u{1f1e6}-\\u{1f1ff}\\u{1f191}-\\u{1f251}\\u{1f004}\\u{1f0cf}\\u{1f170}-\\u{1f171}\\u{1f17e}-\\u{1f17f}\\u{1f18e}\\u{3030}\\u{2b50}\\u{2b55}\\u{2934}-\\u{2935}\\u{2b05}-\\u{2b07}\\u{2b1b}-\\u{2b1c}\\u{3297}\\u{3299}\\u{303d}\\u{00a9}\\u{00ae}\\u{2122}\\u{23f3}\\u{24c2}\\u{23e9}-\\u{23ef}\\u{25b6}\\u{23f8}-\\u{23fa}]/gu\n );\n return !regex.test(value);\n },\n });\n\n window.Parsley.addAsyncValidator(\n \"emailUnique\",\n function (xhr) {\n // Ritorna true anche se la richiesta non funziona per far\n // comunque andare avanti l'utente.\n // La validazione della mail c'è comunque alla fine del form.\n return xhr.status !== 200 || !xhr.responseJSON.found;\n },\n \"/api/v5/users/email/check?email={value}\"\n );\n\n if (!localStorage.getItem(\"adomaniaClosed\")) {\n $(\"#adomania-popup\").modal();\n $(\"#adomania-popup\").on(\"hidden.bs.modal\", function () {\n localStorage.setItem(\"adomaniaClosed\", true);\n });\n }\n\n // Nel caso in cui la data di nascita non viene passata dal provider\n // oauth, non si può avanzare automaticamente il primo step\n if (isOauth() && isBirthdaySet()) {\n $(\"#new_user\").hide();\n $(\"#oauth-spinner\").show();\n }\n\n $('[data-bs-toggle=\"tooltip\"]').tooltip();\n\n if (/Android|webOS|BlackBerry/i.test(navigator.userAgent)) {\n $(\".selectpicker\").selectpicker(\"mobile\");\n }\n\n if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {\n $(\".selectpicker\").removeClass(\"selectpicker\");\n }\n\n // chrome workaround, altrimenti non onora 'autocomplete='off''\n $(\"#city_id\").attr(\"autocomplete\", \"random\");\n $(\"#city\").attr(\"autocomplete\", \"none\");\n\n $(\"#countainer_schools\").on(\"autocompletechange\", \".dynamic_section .user-field .schools_city\", function () {\n var parent = $(this).closest(\".dynamic_section\");\n var sel = parent.find(\"select.schools_select\");\n var city = $(this).data();\n var course = parent.find(\"select.courses_select\");\n course.find(\"option\").remove();\n fill_schools($(sel), city.id);\n });\n\n $(function () {\n setTimeout(function () {\n $(\".alert\").slideUp(700, \"linear\", function () {\n $(\"header.welcome-page\").removeClass(\"lets-display-alert\");\n });\n }, 7000);\n });\n\n (function ($) {\n $.each([\"show\", \"hide\", \"fadeOut\", \"fadeIn\", \"slideUp\"], function (i, ev) {\n var el = $.fn[ev];\n $.fn[ev] = function () {\n var result = el.apply(this, arguments);\n result.promise().done(function () {\n this.trigger(ev, [result]);\n });\n return result;\n };\n });\n })(jQuery);\n\n $(\".alert\").on(\"show\", function () {\n $(\"header.welcome-page\").addClass(\"lets-display-alert\");\n });\n\n $(\"select[name='filter_for_publisher_select']\").on(\"change\", function () {\n var url = $(this).val();\n if (url) {\n // require a URL\n window.location = url; // redirect\n }\n return false;\n });\n\n $(\"header.user-role-select-form .signup-steps input:submit[name!='commit']\").on(\"click\", function (event) {\n event.preventDefault();\n manageStepChange(this);\n });\n\n $(\"header.user-role-select-form .signup-steps input:submit[name='commit']\").on(\"click\", function (event) {\n event.preventDefault();\n $(this).closest(\"form\").submit();\n });\n\n $(\"header.user-role-select-form .flat-box-steps-circle div\").on(\"click\", function () {\n manageStepCircles(this);\n });\n\n var userLang = navigator.language || navigator.userLanguage;\n userLang = userLang.substring(0, 2).toLowerCase();\n\n if (![\"it\", \"en\", \"fr\", \"de\", \"es\"].includes(userLang)) {\n userLang = \"en\";\n }\n window.Parsley.setLocale(userLang);\n\n if ($(\"#new_user\").length != 0) {\n $(\"#new_user\").parsley();\n }\n\n // New parent link form\n $(\"#new_connect_existing_account_form\").parsley();\n\n $(\"#connect_existing_account_form_email\").on(\"change keyup\", function () {\n manageNewParentLinkDisableBtn(this);\n });\n\n $(\"header.new_user_relation_form .signup-steps input:submit[name='commit']\").on(\"click\", function (event) {\n event.preventDefault();\n $(this).closest(\"form\").submit();\n });\n // End New parent link form\n\n $(\"header.user-role-select-form input\").on(\"change keyup\", function () {\n manageInputChange(this);\n });\n\n $(\".step-1-adult input\").on(\"change keyup\", function () {\n manageDisableBtn(this, 1);\n });\n\n $(\".step-1-adult select\").on(\"change keyup\", function () {\n manageDisableBtn(this, 1);\n });\n\n $(\".step-2-adult input\").on(\"change keyup\", function () {\n manageDisableBtn(this, 2);\n });\n\n $(\".step-1-parent input\").on(\"change keyup\", function () {\n manageDisableBtn(this, 1);\n });\n\n $(\".step-2-parent input\").on(\"change keyup\", function () {\n manageDisableBtn(this, 2);\n });\n\n $(\".step-1-parent select\").on(\"change keyup\", function () {\n if (!isDateFullyEntered()) return;\n\n $(\".userbday-day\").parsley().validate();\n $(\".userbday-month\").parsley().validate();\n $(\".userbday-year\").parsley().validate();\n manageDisableBtn(this, 1);\n });\n\n $(\".step-1-teacher input\").on(\"change keyup\", function () {\n manageDisableBtn(this, 1);\n });\n\n $(\".step-1-adult select\").on(\"change keyup\", function () {\n if (!isDateFullyEntered()) return;\n\n $(\".userbday-day\").parsley().validate();\n $(\".userbday-month\").parsley().validate();\n $(\".userbday-year\").parsley().validate();\n manageDisableBtn(this, 1);\n });\n\n $(\".step-2-teacher input\").on(\"change keyup\", function () {\n manageDisableBtn(this, 2);\n });\n\n $(\".step-1-teacher select\").on(\"change keyup\", function () {\n if (!isDateFullyEntered()) return;\n\n $(\".userbday-day\").parsley().validate();\n $(\".userbday-month\").parsley().validate();\n $(\".userbday-year\").parsley().validate();\n manageDisableBtn(this, 1);\n });\n\n $(\".step-2-teacher select\").on(\"change keyup\", function () {\n manageDisableBtn(this, 2);\n });\n\n $(\".step-1-young input\").on(\"change keyup\", function () {\n manageDisableBtn(this, 1);\n });\n\n $(\".step-1-young select\").on(\"change keyup\", function () {\n if (!isDateFullyEntered()) return;\n\n $(\".userbday-day\").parsley().validate();\n $(\".userbday-month\").parsley().validate();\n $(\".userbday-year\").parsley().validate();\n manageDisableBtn(this, 1);\n });\n\n $(\".step-2-young input\").on(\"change keyup\", function () {\n manageDisableBtn(this, 2);\n });\n\n $(\".step-2-young select\").on(\"change keyup\", function () {\n manageDisableBtn(this, 2);\n });\n\n $(\".step-3-young input\").on(\"change keyup\", function () {\n manageDisableBtn(this, 3);\n });\n\n $(\".step-3-teacher input\").on(\"change keyup\", function () {\n manageDisableBtn(this, 3);\n });\n\n $(\".required-by-fake-email\").on(\"change keyup\", function () {\n $(\"#new_user\")\n .parsley()\n .whenValid({ group: \"fake_email\" })\n .then(function () {\n $(\"#checkbox-form-fake-email\").removeAttr(\"disabled\"); // firefox compatibility\n })\n .catch(function () {\n $(\"#checkbox-form-fake-email\").prop(\"disabled\", true);\n });\n });\n\n var region_sel = $(\"#region_id\");\n if(region_sel.length > 0) {\n fill_regions(region_sel);\n }\n\n $(\".ui-autocomplete\").on(\"click\", function (event) {\n var sel = $(\"#school_code\");\n var city = $(\"#city_id\").data();\n sel.find(\"option\").remove();\n fill_schools(sel, city.id);\n });\n\n // required to avoid double-click on submit button\n $(\".btn-signup-flow-last\").one(\"click\", function (event) {\n $(this).prop(\"disabled\", true);\n });\n $(\".btn-signup-flow-last\").dblclick(function (e) {\n e.preventDefault();\n });\n\n $(\"#new_bsmart_activation_form\").submit(function (event) {\n $(\"#new_bsmart_activation_form .btn.btn-bsmart\").prop(\"disabled\", true);\n });\n $(\".btn.btn-default.btn-eli.btn-bsmart\").dblclick(function (e) {\n e.preventDefault();\n });\n\n $(\"#header.user-role-select-form select#nation\").on(\"change\", function () {\n if ($(this).val() == \"NP\") {\n $(\".school-inputs\").hide();\n $(\".user-field.classroom-name\").hide();\n $(\".user-field.school-name\").hide();\n $(\"#city_id\").prop(\"required\", false);\n $(\"#city_id\").attr(\"data-parsley-required\", \"false\");\n $(\"#region_id\").prop(\"required\", false);\n $(\"#region_id\").attr(\"data-parsley-required\", \"false\");\n $(\"#school_code\").prop(\"required\", false);\n $(\"#school_code\").attr(\"data-parsley-required\", \"false\");\n $(\"#classroom\").prop(\"required\", false);\n $(\"#classroom\").attr(\"data-parsley-required\", \"false\");\n $(\"#classroom\").val(\"\");\n $(\"#city_id\").val(\"\");\n $(\"input[name='school_type']\").prop(\"required\", false);\n $(\"input[name='school_type']\").attr(\"data-parsley-required\", \"false\");\n $('input[name=\"school_type\"]').prop(\"checked\", false);\n $(\"#school_code\").empty();\n $(\"#nation\").parsley().validate();\n manageDisableBtn(this, 1);\n } else {\n $(\".school-inputs\").not(\".school-type\", \".school-details\").show();\n $(\"#city_id\").prop(\"required\", true);\n $(\"#city_id\").attr(\"data-parsley-required\", \"true\");\n $(\"#region_id\").prop(\"required\", true);\n $(\"#region_id\").attr(\"data-parsley-required\", \"true\");\n $(\"input[name='school_type']\").prop(\"required\", true);\n $(\"input[name='school_type']\").attr(\"data-parsley-required\", \"true\");\n $(\"#school_code\").prop(\"required\", true);\n $(\"#school_code\").attr(\"data-parsley-required\", \"true\");\n $(\"#classroom\").prop(\"required\", true);\n $(\"#classroom\").attr(\"data-parsley-required\", \"true\");\n }\n });\n\n $(\"#school_code\").on(\"change\", function () {\n if ($(this).val() !== \"\") {\n fill_courses($(\"#course\"), $(this).val());\n $(\".course-name\").show();\n } else {\n $(\".course-name\").hide();\n }\n });\n\n $(\"#user_schools_field\").on(\"change\", function () {\n if ($(this).val() !== \"\") {\n fill_courses($(\"#course\"), $(this).val());\n }\n });\n\n $(\"#region_id\").on(\"change\", function () {\n if ($(this).val()) {\n $(\"#city_id\").val(\"\");\n $(\"#city_id\").autocomplete(\"option\", \"source\", \"/school_data/cities_list_by_name?region_id=\" + $(this).val());\n }\n });\n\n $(\"#checkbox-form-fake-email\").on(\"click\", function () {\n if ($(this)[0].checked) {\n var name = $(\"#user_name\")[0].value;\n var surname = $(\"#user_surname\")[0].value;\n var birthday = $(\".userbday-year\")[0].value + \"/\" + $(\".userbday-month\")[0].value + \"/\" + $(\".userbday-day\")[0].value;\n generate_fake_email($(\"#user_email\")[0], $(\"#email_confirmation\")[0], name, surname, birthday);\n disable_email_fields();\n } else {\n enable_email_fields();\n }\n });\n\n $(\"input[name='school_type']\").on(\"click\", function () {\n var radio_value = $(\"input[name='school_type']:checked\").val();\n if (radio_value == \"public\") {\n enable_school_fields();\n } else {\n disable_school_fields(radio_value);\n }\n });\n\n // Required to trigger validation when step 1 is\n // completely autofilled with oauth data\n $(\"#user_name\").trigger(\"change\");\n\n // Is `n` a number or numeric string (eg \"3\")?\n window.isNumeric = function isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n };\n\n // Pad `n` with `z` (or `0` by default) to `width`.\n window.zeroPad = function zeroPad(n, width, z) {\n z = z || \"0\";\n n = n + \"\";\n return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;\n };\n\n // Return true if day, month and year is entered and\n // the date is ready to be validated\n // otherwise return false\n // This is needed to prevent starting validation\n // when the user select just the day\n window.isDateFullyEntered = function isDateFullyEntered() {\n var day = $(\".userbday-day\").val();\n var month = $(\".userbday-month\").val();\n var year = $(\".userbday-year\").val();\n\n if (isNumeric(day) === false || isNumeric(month) === false || isNumeric(year) === false) {\n return false;\n }\n\n return true;\n };\n\n if (isOauth()) {\n // SPIEGONE PARTE 4 - 1/10/2020\n // Non perdere le puntate precedenti, su un cerca vicino a te!\n // al momento abbiamo 3 flussi di registrazione: student, teacher e parent.\n // Quest'ultimo prevede solo anagrafica e TOS (niente scuola), quindi saltiamo\n // tutto il pezzo dello spiegone parte 1!\n var flow = $(\"#user_flow\").val();\n\n if (flow === \"parent\") {\n advanceStep();\n }\n }\n});\n\n// Just create a scope\n(function () {\n $(function checkCapsLock() {\n var inputWrappers = $(\".check-caps-lock\").each(function (i, wrap) {\n var el = null;\n if (wrap.tagName == \"INPUT\") {\n el = wrap;\n wrap = $(el).closest(\".form-group\");\n } else {\n el = $(wrap).find(\"input\");\n }\n if (!el) {\n // No input element found, skip\n return true;\n }\n\n $(el).on(\"keyup\", function (evt) {\n // some events has not `getModifierState`\n if (!evt.originalEvent.getModifierState) return true;\n var capsLock = evt.originalEvent.getModifierState(\"CapsLock\");\n $(this).trigger(\"hasCapsLockEnable\", { status: capsLock });\n if (wrap) {\n $(wrap).find(\"small.caps-lock-message\")[capsLock ? \"removeClass\" : \"addClass\"](\"hide\");\n }\n });\n });\n });\n\n $(function showHidePassword() {\n var inputWrappers = $(\".show-hide-password\").each(function (i, wrap) {\n var $self = $(this);\n var handler = $(wrap).find(\".label-for-show-password\");\n handler.on(\"click\", function (event) {\n handler.toggleClass(\"open\");\n let input = $self.find(\"input[type]\");\n if (input.length) {\n input[0].type = input[0].type == \"password\" ? \"text\" : \"password\";\n } else {\n console.warn(\"cannot find input[type]\");\n }\n });\n });\n });\n})();\n\nwindow.isOauth = function isOauth() {\n // SPIEGONE PARTE 3 - 1/10/2020\n // Hai perso le puntate precedenti? cerca è tuo amico!\n // Per evitare di far saltare step quando non siamo in oauth, usiamo il valore\n // di questo input, che al momento viene valorizzato sempre con l'uid della\n // richiesta. OCCHIO!!\n var uid = $(\"#user_identity_uid\").val();\n return uid !== undefined && uid !== null && uid !== \"\";\n};\n\nwindow.isStepValid = function isStepValid(step) {\n return $(\"#new_user\")\n .parsley({ excluded: \"select:hidden\" })\n .whenValid({ group: \"step_\" + step });\n};\n\nwindow.changeStep = function changeStep(step, flow) {\n // SPIEGONE PARTE 2 - 1/10/2020\n // Per le puntate precedenti usa il cerca!\n // Altro spiegone: per come sono fatti i flussi di registrazione oggi, i campi\n // sono tutti dipendenti uno con l'altro e vengono mostrati in sequenza._\n // Questo metodo serve appositamente per gestire i casi \"anomali\":\n // - Se siamo in oauth e abbiamo i dati della scuola, dobbiamo abilitare a manina\n // il bottone dello step 2 (se no parsley non lo fa) ed evitare di fare tutto\n // il teatrino dela mostra/nascondi condizionale. L'utente si trova con tutto\n // popolato e via.\n // - Stessa cosa se saltiamo a piè pari lo step 2 (è tutto compilato da oauth\n // tranne le tos) - se non abilitiamo il pulsante del bottone 2 e l'utente\n // fa back, rimane incastrato.\n // \"Not the code we want, but the want we need.\" - Dark bweb rises, 2020\n\n if (step === 2) {\n var prefilled = $(\"#user_prefilled_region\").val();\n var oauth = isOauth();\n\n if (oauth && prefilled) {\n manageDisableBtn($(\"#nation\"), 2);\n } else {\n $(\".school-inputs\").not(\".school-geo-info\").hide();\n }\n }\n\n if (step === 3) {\n manageDisableBtn($(\"#nation\"), 2);\n }\n\n $(\".signup-steps\").hide();\n $(\".step-\" + step + \"-\" + flow).show();\n $(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n};\n\nwindow.getTargetStep = function getTargetStep(callback) {\n isStepValid(1)\n .then(function () {\n isStepValid(2)\n .then(function () {\n isStepValid(3)\n .then(function () {\n callback(null);\n })\n .catch(function () {\n callback(3);\n });\n })\n .catch(function () {\n callback(2);\n });\n })\n .catch(function () {\n callback(1);\n });\n};\n\nwindow.advanceStep = function advanceStep() {\n getTargetStep(function (step) {\n var flow = $(\"#user_flow\").val();\n if (step) {\n changeStep(step, flow);\n $(\"#oauth-spinner\").hide();\n $(\"#new_user\").show();\n }\n });\n};\n\nvar getCurrentStep = (window.getCurrentStep = function ($this) {\n var classesParent = $($this).closest(\".signup-steps\").attr(\"class\").split(\" \");\n var curStep = classesParent[2].split(\"-\")[1];\n return curStep;\n});\n\nvar manageDisableBtn = (window.manageDisableBtn = function ($this, step) {\n var btn = $($this).closest(\".signup-steps\").find(\"input[type='submit']\");\n $(\"#new_user\")\n .parsley({ excluded: \"select:hidden\" })\n .whenValid({ group: \"step_\" + step })\n .then(function () {\n $(btn).removeAttr(\"disabled\"); // firefox compatibility\n })\n .catch(function () {\n $(btn).prop(\"disabled\", true);\n });\n});\n\n// submit button for parent link form\nvar manageNewParentLinkDisableBtn = (window.manageNewParentLinkDisableBtn = function ($this) {\n var btn = $(\"input[type='submit']\")[0];\n if ($(\"#connect_existing_account_form_email\").parsley().isValid() === true) {\n $(btn).removeAttr(\"disabled\");\n } else {\n $(btn).prop(\"disabled\", true);\n }\n});\n\nvar onPrivaciesChange = (window.onPrivaciesChange = function ($this, step) {\n if ($($this).is(\":checked\")) {\n $($this).attr(\"value\", \"1\");\n $($this).attr(\"checked\", true);\n } else {\n $($this).attr(\"value\", \"\");\n $($this).attr(\"checked\", null);\n }\n manageDisableBtn($this, step);\n});\n\nvar dateSeparator = \"/\";\n\nvar correctCaptcha = (window.correctCaptcha = function (response) {\n $(\"#recaptcha_status\").val(\"1\");\n var classesParent = $(\".g-recaptcha\").closest(\".signup-steps\").attr(\"class\").split(\" \");\n var curStep = classesParent[2].split(\"-\")[1];\n manageDisableBtn(\".g-recaptcha\", curStep);\n});\n\nwindow.captchaSubmit = function captchaSubmit(token) {\n document.getElementById(\"captcha_response\").value = token;\n document.getElementById(\"new_user\").submit();\n};\n\nvar manageStepCircles = (window.manageStepCircles = function ($this) {\n var currentIndex = $($this).siblings(\".active\").attr(\"class\").split(\" \")[0].split(\"-\")[1];\n var selected = $($this).attr(\"class\").split(\" \")[0];\n var selectedIndex = selected.split(\"-\")[1];\n if (selectedIndex * 1 < currentIndex * 1) {\n $(\".flat-box.signup-steps\").hide();\n $(\".flat-box-header.signup-steps\").hide();\n $(\".flat-box-steps-circle\").hide();\n $(\".flat-box.signup-steps.\" + selected).show();\n $(\".flat-box-header.signup-steps.\" + selected).show();\n $(\".flat-box-steps-circle.\" + selected).show();\n $(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n }\n});\n\nvar manageInputChange = (window.manageInputChange = function ($this) {\n var step = getCurrentStep($this);\n if ($($this).is(\":checkbox\")) {\n if ($($this).attr(\"id\") == \"checkbox-form-tos_agreement\") {\n $(\".privacies input:checkbox\").prop(\"checked\", $($this).is(\":checked\"));\n $(\".privacies input:checkbox\").each(function () {\n onPrivaciesChange(this);\n });\n } else if ($($this).data(\"privacies\") !== undefined) {\n $(\"#checkbox-form-tos_agreement\").prop(\"checked\", false);\n $(\"#checkbox-form-tos_agreement\").attr(\"value\", \"\");\n onPrivaciesChange($this, step);\n }\n }\n});\n\nvar manageStepChange = (window.manageStepChange = function ($this) {\n var classesParent = $($this).closest(\".signup-steps\").attr(\"class\").split(\" \");\n var curStep = classesParent[2].split(\"-\")[1];\n var curFlow = classesParent[2].split(\"-\")[2];\n var nextStep = curStep * 1 + 1;\n\n changeStep(nextStep, curFlow);\n});\n\nvar gobackSignupFlow = (window.gobackSignupFlow = function ($this) {\n // event.preventDefault();\n var classesParent = $($this).closest(\".signup-steps\").attr(\"class\").split(\" \");\n var curStep = classesParent[2].split(\"-\")[1];\n var curFlow = classesParent[2].split(\"-\")[2];\n var nextStep = curStep * 1 - 1;\n $(\".signup-steps\").hide();\n $(\".step-\" + nextStep + \"-\" + curFlow).show();\n $(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n});\n\n// SPIEGONE PARTE 5 - 15/01/2021\n// Nel caso in cui non viene pre-compilata la parte\n// birthday, non si può skippare la prima parte della registazione\n// nemmeno in oAuth\nwindow.isBirthdaySet = function isBirthdaySet() {\n var day = $(\".userbday-day\").val();\n var month = $(\".userbday-month\").val();\n var year = $(\".userbday-year\").val();\n\n return day && month && year;\n};\n\nwindow.fill_regions = function fill_regions(obj) {\n obj.find(\"option\").remove();\n obj.append(\"\");\n\n $.ajax({\n url: \"/school_data/regions_list\",\n dataType: \"json\",\n success: function (result) {\n $.each(result, function (key, value) {\n obj.append(\"\");\n });\n // SPIEGONE PARTE 1 - 1/10/2020\n // Spiegone unico valido per tutto questo discorso: al 1/10/2020 abbiamo\n // deciso di implementare l'avanzamento automatico negli step di registrazione,\n // che al momento sono:\n // 1 - Info anagrafiche (data di nascita, mail e generalità);\n // 2 - Scuola e classe;\n // 3 - TOS\n //\n // Abbiamo 3 possibili flussi di registrazione: student, teacher e parent.\n // I primi due hanno tutti e 3 gli step (il teacher non deve però impostare\n // la classe), mentre l'ultimo salta lo step intermedio.\n //\n // Visto che le chiamate che popolano i vari elenchi di regioni, città,\n // scuole e classi sono tutte asincrone, le facciamo una volta sola (e solo\n // in caso di oauth) qui. Finchè non completano l'utente vede uno spinner.\n if (isOauth()) {\n var prefilled = $(\"#user_prefilled_region\").val();\n if (prefilled) {\n $(obj).val(prefilled);\n var city = $(\"#user_prefilled_city\").val();\n var cityId = $(\"#user_prefilled_city_id\").val();\n $(\"#city_id\").val(city);\n $(\".school-inputs\").show();\n $(\"#radio-form-school-type-public\").prop(\"checked\", true);\n var school = $(\"#school_code\");\n var schoolCode = school.val();\n var city = $(\"#city_id\").data();\n var course = $(\"#course\");\n fill_schools($(school), cityId, schoolCode);\n fill_courses($(course), schoolCode, course.val());\n }\n\n // Nel caso in cui la data di nascita non viene passata dal provider\n // oauth, non si può avanzare automaticamente il primo step\n var birthdaySet = isBirthdaySet();\n\n if (birthdaySet) {\n advanceStep();\n }\n }\n },\n });\n};\n\nwindow.fill_schools = function fill_schools(obj, city, selected) {\n obj.find(\"option\").remove();\n obj.append(\"\");\n if (city) {\n $.ajax({\n url: \"/school_data/schools_list_by_city_id?city_id=\" + city,\n dataType: \"json\",\n success: function (result) {\n $.each(result, function (key, value) {\n var typeSafe = value.school_type.replace(/\"/gi, \"\");\n var nameSafe = value.name.replace(/\"/gi, \"\");\n var addressSafe = value.address.replace(/\"/gi, \"\");\n var type = \"\" + typeSafe + \"\";\n var name = \"\" + nameSafe + \"\";\n var address = \"\" + addressSafe + \"\";\n var label = type + \"
    \" + name + \"
    \" + address;\n obj.append(\"\");\n });\n if (selected) {\n obj.val(selected);\n }\n $(\".selectpicker\").selectpicker(\"refresh\");\n },\n });\n }\n};\n\nwindow.fill_school_email = function fill_school_email() {\n var email = $(\"#school_email\")[0].value;\n console.log(email);\n $(\"#mail_from_school\")[0].value = email;\n};\n\nwindow.fill_courses = function fill_courses(obj, school_code, selected) {\n obj.find(\"option\").remove();\n obj.append(\"\");\n\n $.ajax({\n url: \"/school_data/courses_by_school_code?school_code=\" + school_code,\n dataType: \"json\",\n success: function (result) {\n $.each(result, function (key, value) {\n obj.append(\"\");\n });\n if (selected) {\n obj.val(selected);\n }\n },\n });\n};\n\nwindow.generate_fake_email = function generate_fake_email(email_obj, fake_email_obj, name, surname, birthday) {\n $.ajax({\n url: \"/profile/generate_fake_email\",\n type: \"POST\",\n data: { name: name, surname: surname, birthday: birthday },\n dataType: \"json\",\n success: function (result) {\n $.each(result, function (key, value) {\n email_obj.value = value;\n fake_email_obj.value = value;\n });\n },\n });\n};\n\nwindow.disable_email_fields = function disable_email_fields() {\n $(\"#user_email\").prop(\"readonly\", true);\n $(\"label[for=email_confirmation], #email_confirmation\").hide();\n};\n\nwindow.enable_email_fields = function enable_email_fields() {\n $(\"#user_email\")[0].value = \"\";\n $(\"#user_email\").prop(\"readonly\", false);\n $(\"#email_confirmation\")[0].value = \"\";\n $(\"label[for=email_confirmation], #email_confirmation\").show();\n};\n\nwindow.disable_school_fields = function disable_school_fields(private_institute = false) {\n var school = $(\"#school_code\");\n var school_code = private_institute ? school.data(\"private-institutes-school-code\") : school.data(\"universities-school-code\");\n school.find(\"option\").remove();\n school.append(\"\");\n school.value = school_code;\n\n var classroom = $(\"#classroom\");\n classroom.find(\"option\").remove();\n classroom.append(\"\");\n classroom.value = \"other\";\n\n $(\".school-details\").hide();\n};\n\nwindow.enable_school_fields = function enable_school_fields() {\n var school = $(\"#school_code\");\n var city = $(\"#city_id\").data();\n fill_schools(school, city.id);\n\n var classroom = $(\"#classroom\");\n classroom.find(\"option\").remove();\n classroom.val(\"\");\n\n $(\".user-field.classroom-name\").hide();\n $(\".school-details\").show();\n $(\".user-field.school-name\").show();\n};\n\nwindow.fillProfileSchoolDets = function fillProfileSchoolDets() {\n $(\"#countainer_schools .dynamic_section\").each(function (i, container) {\n container = $(container);\n var school = container.find(\"select.schools_select\");\n var schoolCode = school.val();\n var city = container.find(\"input.schools_city\").data();\n var course = container.find(\"select.courses_select\");\n fill_schools($(school), city.id, schoolCode);\n fill_courses($(course), schoolCode, course.val());\n });\n};\n","import \"../src/shared/wrap_ready.js\";\nimport Cookie from \"../src/shared/cookie\";\nimport Header from \"../src/hachette/components/header\";\n\nwindow.Hachette = {};\n\nwindow.addEventListener(\"DOMContentLoaded\", () => {\n window.Hachette.Cookie = new Cookie();\n\n window.Hachette.Header = new Header({ selector: \".nav-bar\" });\n window.Hachette.Header.start();\n});\n\n// we moved Bootstrap here afer updating to BS5 because\n// it wasn't loaded in the right order in application.js\nimport * as bootstrap from '../../../node_modules/bootstrap/dist/js/bootstrap.bundle.js';\n\nwindow.bootstrap = bootstrap;\n\nimport \"../../whitelabels/hachette/assets/javascripts/application.js\";\n"],"names":["CLASSES","Header","selector","$","$myCarousel","$myCarousel2","e","indx","$myCarousel3","$myCarouselBlog","next","event","target","$target","id","idx","v","containerSchools","firstSchoolBlock","new_block","i","me","value","summary","selected","$checked","texts","el","s","container1","container2","term","area","query","schoolSubjects","obj","content","pickerOpts","str","txt","region_id","regionPart","ui","classroom","ul","item","city","searchStyle","hide_show_others","brandId","divToShow","isOn","data","source","template","html","cellToActivate","welcomeTarget","slideNumber","this","wrapper","role","birthdayOK","schoolOK","complete","count","index","val","checkBDayAndSchool","viz","div","options","url","$el","first","evt","requirements","classId","age","day","month","year","inputDate","moment","birthDate","requirement","regex","xhr","parent","sel","course","ev","result","jQuery","manageStepChange","manageStepCircles","userLang","manageNewParentLinkDisableBtn","manageInputChange","manageDisableBtn","region_sel","name","surname","birthday","radio_value","n","width","z","flow","wrap","capsLock","$self","handler","input","uid","step","prefilled","oauth","callback","getCurrentStep","$this","classesParent","curStep","btn","onPrivaciesChange","response","token","currentIndex","selectedIndex","curFlow","nextStep","key","cityId","school","schoolCode","birthdaySet","typeSafe","nameSafe","addressSafe","type","address","label","email","school_code","email_obj","fake_email_obj","private_institute","container","Cookie","bootstrap"],"mappings":"+SAAA,MAAMA,EAAU,CACd,cAAe,iBACjB,EAEA,MAAMC,CAAO,CACX,YAAY,CAAE,SAAAC,CAAU,EAAG,GAAI,CAC7B,KAAK,SAAWA,EAChB,KAAK,aAAY,EACjB,KAAK,eAAc,CACpB,CAED,OAAQ,CACN,KAAK,mBAAkB,CACxB,CAED,cAAe,CACb,KAAK,OAAS,SAAS,cAAc,KAAK,QAAQ,CACnD,CAED,gBAAiB,CACf,OAAO,iBAAiB,SAAU,IAAM,KAAK,mBAAoB,CAAA,CAClE,CAED,oBAAqB,CACnB,KAAK,mBAAkB,CACxB,CAED,oBAAqB,CACf,OAAO,QAAU,EACnB,KAAK,OAAO,UAAU,IAAIF,EAAQ,aAAa,EAE/C,KAAK,OAAO,UAAU,OAAOA,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