PageSourceSearch

https://www.datalogic.com/bundles/custom?v=sR_cjYJX1teYF671MgPVPOV2Ud5IZPa0hjq-1BlxZjY1

js datalogic.com collected 2026-09-24 09:18:40 UTC 41,236 bytes, 1,463 lines download raw bytes

1/* Minification failed. Returning unminified contents.
2(1445,6): run-time error JS1004: Expected ';'
3(1447,24): run-time error JS1004: Expected ';'
4(1453,14): run-time error JS1004: Expected ';'
5 */
6window.onload = function () {
7  setTimeout(setchat, 2000);
8
9  $("#chat-button").click(function () {
10	$(".LPMcontainer").trigger('click');
11  });
12
13  if ($("#chartContainer").length > 0) {
14	CanvasJS.addCultureInfo("en",
15	  {
16		decimalSeparator: "."
17	  });
18	CanvasJS.addCultureInfo("it",
19	  {
20		decimalSeparator: ","
21	  });
22  }
23}
24
25$(function () {
26
27  if (window.location.hash.length > 0) {
28	if ($("a[name='" + window.location.hash.substring(1) + "']").length > 0) {
29	  $("a[name='" + window.location.hash.substring(1) + "']").animatescroll({
30		scrollSpeed: 800,
31		easing: 'easeInOutExpo',
32		padding: $('#primary-nav').height()
33	  });
34	}
35  }
36  function IsEmail(email) {
37	const regex =
38	  /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
39	if (!regex.test(email)) {
40	  return false;
41	}
42	else {
43	  return true;
44	}
45  }
46
47  //HOME CONTACT SELECTOR
48  $(".subj-item").click(function () {
49	if ($(this).hasClass('active')) {
50	  $('.subj-item.active').removeClass('active');
51	  $('#contact-cta').attr("href", "#");
52	} else {
53	  $(".subj-item.active").removeClass('active');
54	  $(".subj-item").removeClass('error');
55	  $(this).addClass('active');
56	  $('#contact-cta').attr("href", $(this).attr("href"));
57	}
58  });
59  $("#contact-cta").click(function () {
60	if ($(this).attr("href") === '#') {
61	  $('.subj-item').addClass('error');
62	}
63  });
64
65  //STEPS FORMS
66  $('.webform .step .btn').click(function () {
67	var valid = true;
68	var groupCheckValid = false;
69	var currentStep = $('.webform .step.active')[0];
70	var nextStepId = $(this).attr("for");
71	var Idnum = nextStepId.substring(nextStepId.length - 1, this.length);
72	var formControls = $('.webform .step.active').find(".form-group.required > .form-control");
73	if (nextStepId == "back") {
74	  event.preventDefault();
75	  history.back(1);
76	  return;
77	}
78	if ($(this).attr('action') == "NEXT") {
79	  formControls.each(function (i) {
80		if ($(this).is("input") && $(this).attr('type') === 'text' && $(this).val() === '') {
81		  $(this).addClass('error');
82		  valid = false;
83		} else if ($(this).is("input") && $(this).attr('type') === 'email' && !IsEmail($(this).val())) {
84		  $(this).addClass('error');
85		  valid = false;
86		} else if ($(this).is("input") && $(this).attr('type') === 'checkbox' && $(this).attr('group') != "" && !$(this).prop('checked')) {
87		  $('input[group="' + $(this).attr('group') + '"]').each(function (y) {
88			if ($(this).prop('checked')) {
89			  groupCheckValid = true;
90			}
91		  });
92		  if (!groupCheckValid) {
93			$('input[group="' + $(this).attr('group') + '"]').parent().addClass('error');
94			valid = false;
95		  }
96		} else if ($(this).is("div")) {
97		  var input = $(this).find('input');
98
99		  var select = $(this).find('.selectpicker.required');
100		  select.each(function (y) {
101			if ($(this).val() === '') {
102			  valid = false;
103			  $(this).siblings(".dropdown-toggle").addClass('in-error');
104
105			} else {
106			  $(this).siblings(".dropdown-toggle").removeClass('in-error');
107			}
108		  });
109
110		} else {
111		  $(this).removeClass('error');
112		}
113
114		// check email in CRM contacts and leads
115		if ($(this).attr('id') === 'FormModel_Email' // contact forms email
116		  || $(this).attr('id') === 'dlEmail' // form download new email
117		  || $(this).attr('id') === 'Email') // landing crm form email 
118		{
119		  $('.webform .step .btn').prop('disabled', true);
120		  $('#gdprMktgList').prop('checked', false);
121		  if ($(this).attr('id') === 'FormModel_Email') {
122			$('#FormModel_HideGDPR').val(false);
123		  } else if ($(this).attr('id') === 'dlEmail' || $(this).attr('id') === 'Email') {
124			$('#HideGDPR').val(false);
125		  }
126		  $('.form-group.gdpr').show();
127		  $('.form-group.nogdpr').hide();
128
129		  checkEmailInCRM($(this).val())
130			.then(data => {
131			  if (data) {
132				console.log(JSON.stringify(data));
133
134				// email is in CRM
135				if (data.email !== '' && data.isInCRM && data.isInDB) {
136				  // mktg ok
137				  if (data.gdprMktList === true) {
138					// contact forms email
139					if ($(this).attr('id') === 'FormModel_Email') {
140					  $('#FormModel_HideGDPR').val(true);
141					  // form download new email + landing crm form email
142					} else if ($(this).attr('id') === 'dlEmail' || $(this).attr('id') === 'Email') {
143					  $('#HideGDPR').val(true);
144					}
145					$('.form-group.nogdpr').show();
146					$('.form-group.gdpr').hide();
147					$('#gdprMktgList').prop('checked', true);
148				  }
149				  // unknown email or missing record in CRM or DB
150				} else {
151				  if (data.isInCRM || data.isInDB) {
152					// mktg ok => submit
153					if (data.gdprMktList === true) {
154					  $('#HideGDPR').val(true);
155					  $('.form-group.nogdpr').show();
156					  $('.form-group.gdpr').hide();
157					  $('#gdprMktgList').prop('checked', true);
158					}
159				  }
160				}
161			  }
162			})
163			.catch(error => {
164			  console.error("Errore nella chiamata: " + error.message);
165			});
166		  $('.webform .step .btn').prop('disabled', false);
167		}
168	  });
169	}
170	if (valid) {
171	  $('.webform .step').removeClass('active');
172	  $('.steps-info > span').removeClass('active');
173	  $(nextStepId).addClass('active');
174	  for (let i = 1; i <= Idnum; i++) {
175		$('.steps-info > span:nth-child(' + i + ')').addClass('active');
176	  }
177	  $('#step-numbers').html(Idnum);
178	}
179  });
180
181  //DOWNLOAD FORM 1ST STEPS USER CHECK
182  $('.webform .stepf .btn').click(function () {
183	var valid = true;
184	var currentStep = $('.webform .stepf.active')[0];
185	var nextStepId = $(this).attr("for");
186	var formControls = $('.webform .stepf.active').find(".form-group.required > .form-control");
187	if ($(this).attr('action') === 'PREV') {
188	  $('.webform .stepf').removeClass('active');
189	  $(nextStepId).addClass('active');
190	}
191	if ($(this).attr('action') === 'NEXT') {
192	  formControls.each(function (i) {
193		if ($(this).is("input") && $(this).attr('type') === 'email' && !IsEmail($(this).val())) {
194		  $(this).addClass('error');
195		  valid = false;
196		} else {
197		  $(this).removeClass('error');
198		}
199		// check email in CRM contacts and leads
200		if (valid && $(this).attr('id') === 'dlAlreadyRegisteredEmail') // form download check email
201		{
202		  $('.webform .stepf .btn').prop('disabled', true);
203		  $('#HideGDPR').val(false);
204		  $('#LeadInCRM').val(false);
205		  $('#MarketingList').val(false);
206		  if ($('.form-group.gdpr').length > 0) {
207			$('#gdprMktgList').prop('checked', false);
208			$('.form-group.gdpr').show();
209		  }
210		  $('.form-group.nogdpr').hide();
211
212		  checkEmailInCRM($(this).val())
213			.then(data => {
214			  $('.webform .stepf .btn').prop('disabled', false);
215			  if (data) {
216				console.log(JSON.stringify(data));
217
218				// US/CA con stato/provincia mancante a DB: forza compilazione Form 2
219				// email is in CRM + DB
220				if (data.email !== '' && data.isInCRM && data.isInDB) {
221				  $('#LeadInCRM').val(true);
222
223				  // mktg ok => submit
224				  if (data.gdprMktList === true) {
225					$('#MarketingList').val(true);
226					$('#HideGDPR').val(true);
227					$('.form-group.nogdpr').show();
228					if ($('.form-group.gdpr').length > 0) {
229					  $('.form-group.gdpr').hide();
230					  $('#gdprMktgList').prop('checked', true);
231					}
232					$('#DownloadForm1').submit();
233
234				  // mktg ko => show GDPR
235				  } else {
236					$('.webform .stepf').removeClass('active');
237					$(nextStepId).addClass('active');
238				  }
239
240				  // unknown email or missing record in CRM or DB => submit
241				} else {
242				  if (data.isInCRM || data.isInDB) {
243					$('#LeadInCRM').val(data.isInCRM);
244					// mktg ok => submit
245					if (data.gdprMktList === true) {
246					  $('#MarketingList').val(true);
247					  $('#HideGDPR').val(true);
248					  $('.form-group.nogdpr').show();
249					  if ($('.form-group.gdpr').length > 0) {
250						$('.form-group.gdpr').hide();
251						$('#gdprMktgList').prop('checked', true);
252					  }
253					}
254				  }
255				  $('#DownloadForm1').submit();
256				}
257			  } else {
258				console.log("Errore nel controllo dell'email.");
259			  }
260			})
261			.catch(error => {
262			  console.error("Errore nella chiamata:", error.message);
263			});
264		}
265	  });
266	}
267  });
268
269  //CHECKBOX VALIDATE "at least one"
270  $(".checkbox.required > .form-control").change(function () {
271
272	if ($(this).prop('checked')) {
273
274	  $('input[group="' + $(this).attr('group') + '"]').parent().removeClass('error');
275	} else {
276	  groupCheckValid = false;
277	  $('input[group="' + $(this).attr('group') + '"]').each(function (y) {
278		if ($(this).prop('checked')) {
279
280		  groupCheckValid = true;
281		}
282	  });
283	  if (!groupCheckValid) {
284		$('input[group="' + $(this).attr('group') + '"]').parent().addClass('error');
285	  }
286	}
287  });
288
289  //SPECIAL US + CA in CRM FORMS
290  $('#CountryCode').on("change", function () {
291	if ($(this).val() === '') {
292	  $(this).siblings(".dropdown-toggle").addClass('in-error');
293	} else {
294	  $(this).siblings(".dropdown-toggle").removeClass('in-error');
295	}
296  });
297  $('.selectpicker.required').on("change", function () {
298		if ($(this).val() === '') {
299			$(this).siblings(".dropdown-toggle").addClass('in-error');
300		} else {
301			$(this).siblings(".dropdown-toggle").removeClass('in-error');
302		}
303	});
304
305	$('#dlCountryCode').on("change", function () {
306		if ($(this).val() === '') {
307			$(this).siblings(".dropdown-toggle").addClass('in-error');
308		} else {
309			$(this).siblings(".dropdown-toggle").removeClass('in-error');
310		}
311	});
312	$('.selectpicker.required').on("change", function () {
313		if ($(this).val() === '') {
314			$(this).siblings(".dropdown-toggle").addClass('in-error');
315		} else {
316			$(this).siblings(".dropdown-toggle").removeClass('in-error');
317		}
318	});
319	//END SPECIAL US + CA in CRM FORMS
320
321  $('#close-pop').click(function () {
322	$('.error-pop-container').addClass('hidden');
323  });
324
325  if ($('#ir_home_second_row').length > 0) {
326	var maxheight = 0;
327	$('#ir_home_second_row').find('.second_row-item').each(function () {
328	  //alert($(this).height());
329	  if (maxheight < $(this).height()) {
330		maxheight = $(this).height();
331	  }
332	});
333	$('.second_row-item').css("height", maxheight);
334  }
335
336  if ($('#chartValue').length) {
337	var lang = $('#chartValue').data('lang');
338	var dataPoints = [];
339	$('#chartValue').find('.graphData-value').each(function () {
340	  var gd = $(this).val().split('|');
341	  dataPoints.push({ label: gd[0], y: parseFloat(gd[1].replace(',', '.')), toolTipContent: gd[1] + "%" });
342	});
343	var options = {
344	  culture: lang,
345	  animationEnabled: true,
346	  data: [{
347		type: "doughnut",
348		innerRadius: "35%",
349		legendText: "{label}",
350		percentFormatString: "#0.#0",
351		indexLabel: "{label}: #percent%",
352		dataPoints: dataPoints
353	  }]
354	};
355	$("#chartContainer").CanvasJSChart(options);
356  }
357
358  if ($('#chartValue-rev-0').length) {
359	var lang = $('#chartValue-rev-0').data('lang');
360	var j = 0;
361	while ($('#chartValue-rev-' + j).length > 0) {
362	  var dataPoints = [];
363	  var k = 0;
364	  $('#chartValue-rev-' + j).find('.graphData-value').each(function () {
365		var gd = $(this).val().split('|');
366		dataPoints.push({ label: gd[0], y: parseFloat(gd[1].replace(',', '.')), toolTipContent: gd[1] + "%" });
367		k++;
368	  });
369	  var options = {
370		culture: lang,
371		animationEnabled: true,
372		backgroundColor: "#F0F2F7",
373		data: [{
374		  type: "pie",
375		  innerRadius: "40%",
376		  legendText: "{label}",
377		  percentFormatString: "#0.#0",
378		  indexLabel: "{label}: #percent%",
379		  dataPoints: dataPoints,
380		}]
381	  };
382	  $("#chartContainer-rev-" + j).CanvasJSChart(options);
383	  j++;
384	}
385  }
386
387  $('.image-gallery .item a ').click(function () {
388	$('.image-gallery .item a ').removeClass('current');
389	$(this).addClass('current');
390	$('#main-img').attr('src', $(this).attr('href'));
391	return false;
392  });
393
394  $('.nav-mobile').click(function () {
395	if ($('.top-menu-mobile').hasClass('open')) {
396	  $('.top-menu-mobile').removeClass('open');
397
398	} else {
399	  $('.top-menu-mobile').addClass('open');
400	}
401  });
402
403  $('.widget-arrow').click(function () {
404	if ($('.support-widget').hasClass('open')) {
405	  $('.support-widget').removeClass('open');
406	} else {
407	  $('.support-widget').addClass('open');
408	}
409
410  });
411
412  $(".link-home").click(function () {
413
414	window.location.href = $(this).attr('url');
415	return false;
416  });
417
418  $(".dropdown .dropdown-toggle").click(function () {
419
420	window.location.href = $(this).attr('href');
421	return false;
422  });
423
424  $('.dropdown-menu').not('.bootstrap-select .dropdown-menu').css('top', '97px');
425
426  setViewMailMenu();
427
428  var owl;
429  owl = $('.home-carousel .owl-carousel').owlCarousel({
430	items: 1,
431	loop: false,
432	center: true,
433	nav: false,
434	margin: 30,
435	callbacks: true,
436	onDragged: callbackexp,
437	onTranslated: callbackexp,
438	URLhashListener: true,
439	autoplayHoverPause: true,
440	startPosition: 'URLHash'
441  });
442
443  var owl2;
444  owl2 = $('.irevent-carousel .owl-carousel').owlCarousel({
445	items: 1,
446	loop: true,
447	center: true,
448	nav: true,
449	navText: ["<", ">"],
450	margin: 0,
451
452	autoplayHoverPause: true
453
454  });
455
456  function callbackexp(event) {
457	var idnavexp = $(this).attr('data-hash');
458
459	var idnavexp = "#" + $('.home-carousel .owl-item.active .carousel-item').attr('data-hash');
460
461	$('.nav-explore > li > a').removeClass('active');
462	$('.nav-explore li a[href="' + idnavexp + '"]').addClass('active');
463  }
464
465  $('.container-fluid.containerHome .owl-carousel').owlCarousel({
466	items: 1,
467	loop: true,
468	center: true,
469	nav: true,
470	navText: ["<img src='/images/arrox-sx.svg'>", "<img src='/images/arrox-dx.svg'>"],
471	autoplay: true,
472	autoplayTimeout: 9000,
473	autoplayHoverPause: true
474  });
475
476  $('body').bind('touchstart', function () { });
477
478  var offsetTop = 0;
479
480  if ($(window).width() > 568) {
481	$('.aboutus-home').find('.about-text').each(function () {
482	  $(this).siblings().css("height", $(this).css("height"));
483	});
484	$('.ir_vision').find('.about-text').each(function () {
485	  $(this).siblings().css("height", $(this).css("height"));
486	});
487
488	$('#organization-box').css("height", $('#global-location-box').css("height"));
489	$('.fluid-box').find('.about-text.careers-box').each(function () {
490
491	  $(this).siblings().css("height", $(this).css("height"));
492	});
493	$('.fluid-box').find('.about-text').each(function () {
494
495	  $(this).siblings().css("height", $(this).css("height"));
496	});
497
498  } else {
499	$('#organization-box').css("height", "auto");
500	$('.footer-col li').click(function () {
501	  if ($(this).find('.mobile-accordion').hasClass('open')) {
502		$('.mobile-accordion').removeClass('open');
503		$(this).find('i.fa-angle-down').removeClass('open');
504	  } else {
505		$('i').removeClass('open');
506		$('.mobile-accordion').removeClass('open');
507		$(this).find('i.fa-angle-down').addClass('open');
508		$(this).find('.mobile-accordion').addClass('open');
509	  }
510	});
511  }
512
513  if ($(window).width() > 767) {
514	$('.cghome-third-item').css("height", $('#control-bodies').css("height"));
515	$('.irhome-third-item').css("height", $('#page_analysts').css("height"));
516  }
517
518  if ($('#dlh').length > 0) {
519	if ($(window).width() > 767) {
520
521	  $('.contact-home-box').css("height", $('#dlh').css("height"));
522	}
523  }
524
525  if ($("#navTabs").length > 0) {
526	var num_item = $('#navTabs li').length;
527	var width = $("#navTabs").width();
528
529	var item_width = (width / num_item) - 3;
530	$('#navTabs li').css("width", item_width + "px");
531  }
532
533  if ($("#navTabs2").length > 0) {
534	var num_item = $('#navTabs2 li').length;
535	var width = $("#navTabs2").width();
536	var item_width = (width / num_item) - 3;
537	$('#navTabs2 li').css("width", item_width + "px");
538  }
539
540  if ($("#type-filters").length > 0) {
541	var num_item = $('#type-filters li').length;
542	var width = $("#type-filters").width();
543	var item_width = (width / num_item) - 3;
544	$('#type-filters li').css("width", item_width + "px");
545  }
546
547  if ($("#subnav-content").length > 0) {
548	var num_item = $('#navbarResponsive .nav-item').length;
549	var width = $("#navbarResponsive").width();
550	var item_width = (width / num_item) - 6;
551	$('#navbarResponsive-list li').css("width", item_width + "px");
552  }
553
554  if ($("#overview").length > 0) {
555	var num_item = $('#navbarResponsive-ql .nav-item').length;
556	var width = $("#navbarResponsive-ql").width();
557	var item_width = (width / num_item) - 6;
558	$('#navbarResponsive-list-ql li').css("width", item_width + "px");
559  }
560
561  // scroll body to 0px on click
562  $('#back-to-top').click(function () {
563	$('#back-to-top').tooltip('hide');
564	$('body,html').animatescroll({
565	  scrollSpeed: 800,
566	  easing: 'easeInOutExpo',
567	  scrollTop: 0,
568	  padding: 0
569	});
570	return false;
571  });
572
573  $('#back-to-top').tooltip('show');
574
575  // sticky
576  $(window).scroll(function () {
577
578	if ($(this).scrollTop() > 50) {
579	  $('#back-to-top').fadeIn();
580	} else {
581	  $('#back-to-top').fadeOut();
582	}
583
584	// fixed top menu
585	var offsetTop = 0;
586	if ($("#subnav-content").length > 0) {
587	  offsetTop = $("#subnav-content").offset().top - 86;
588	}
589
590	if ($("#subnav-content").length > 0) {
591	  // fixed subnav
592	  if ($(document).scrollTop() > offsetTop) {
593
594		if ($('#fixed-subnav-placeholder').length <= 0) {
595		}
596		if ($(window).width() > 950) {
597		  $('.fixed.shrink').addClass('hidden');
598		} else {
599		  $('.fixed.shrink').removeClass('hidden');
600		}
601		$('#subnav').addClass('fixed-sub');
602		$('#subnav-mobile').addClass('fixed-sub');
603	  } else {
604		if ($(window).width() > 950) {
605		  $('.fixed.shrink').removeClass('hidden');
606		}
607		$('#subnav').removeClass('fixed-sub');
608		$('#subnav-mobile').removeClass('fixed-sub');
609	  }
610	}
611  });
612
613  function src_set() {
614	if ($(window).width() < 577 && $(window).width() > 375) {
615	  $("[sm-src]").each(function () {
616		if ($(this).attr("sm-src") != "") {
617
618		  $(this).attr("src", $(this).attr("sm-src"));
619		}
620	  });
621	}
622	else if ($(window).width() < 773 && $(window).width() > 375) {
623	  $("[md-src]").each(function () {
624		if ($(this).attr("md-src") != "") {
625
626		  $(this).attr("src", $(this).attr("md-src"));
627		}
628	  });
629	} else if ($(window).width() < 992 && $(window).width() > 375) {
630	  $("[lg-src]").each(function () {
631		if ($(this).attr("lg-src") != "") {
632
633		  $(this).attr("src", $(this).attr("lg-src"));
634		}
635	  });
636	} else if ($(window).width() > 375) {
637	  $("[xl-src]").each(function () {
638		$(this).attr("src", $(this).attr("xl-src"));
639	  });
640	}
641  }
642  src_set();
643
644  $(window).resize(function () {
645	src_set();
646
647	if ($('#ir_home_second_row').length > 0) {
648
649	  var maxheight = 0;
650	  $('#ir_home_second_row').find('.second_row-item').each(function () {
651		if (maxheight < $(this).height()) {
652		  maxheight = $(this).height();
653		}
654	  });
655	  $('.second_row-item').css("height", maxheight);
656	}
657
658	if ($(window).width() > 767) {
659	  $('.cghome-third-item').css("height", $('#control-bodies').css("height"));
660	  $('.irhome-third-item').css("height", $('#page_analysts').css("height"));
661	}
662	if ($('#dlh').length > 0) {
663	  if ($(window).width() > 767) {
664
665		$('.contact-home-box').css("height", $('#dlh').css("height"));
666	  }
667	}
668
669	if ($(window).width() > 568) {
670	  $('.aboutus-home').find('.about-text').each(function () {
671		$(this).siblings().css("height", $(this).css("height"));
672	  });
673	  $('.ir_vision').find('.about-text').each(function () {
674		$(this).siblings().css("height", $(this).css("height"));
675	  });
676	  $('#organization-box').css("height", $('#global-location-box').css("height"));
677	  $('.fluid-box').find('.about-text.careers-box').each(function () {
678
679		$(this).siblings().css("height", $(this).css("height"));
680	  });
681	  $('.fluid-box').find('.about-text').each(function () {
682		$(this).siblings().css("height", $(this).css("height"));
683	  });
684	} else {
685	  $('#organization-box').css("height", "auto");
686	}
687	setViewMailMenu();
688
689	if ($("#navTabs").length > 0) {
690	  var num_item = $('#navTabs li').length;
691	  var width = $("#navTabs").width();
692
693	  var item_width = (width / num_item) - 3;
694	  $('#navTabs li').css("width", item_width + "px");
695	}
696	if ($("#navTabs2").length > 0) {
697	  var num_item = $('#navTabs2 li').length;
698	  var width = $("#navTabs2").width();
699
700	  var item_width = (width / num_item) - 3;
701	  $('#navTabs2 li').css("width", item_width + "px");
702	}
703
704	if ($("#type-filters").length > 0) {
705	  var num_item = $('#type-filters li').length;
706	  var width = $("#type-filters").width();
707
708	  var item_width = (width / num_item) - 3;
709	  $('#type-filters li').css("width", item_width + "px");
710	}
711
712	if ($("#subnav-content").length > 0) {
713	  var num_item = $('#navbarResponsive .nav-item').length;
714	  var width = $("#navbarResponsive").width();
715	  var item_width = (width / num_item) - 3;
716	  $('#navbarResponsive-list li').css("width", item_width + "px");
717	}
718  });
719
720  // animatescroll
721  $("#mainNav li > a").click(function () {
722	$($.attr(this, 'href')).animatescroll({
723	  scrollSpeed: 800,
724	  easing: 'easeInOutExpo',
725	  padding: $('#subnav').hasClass('fixed-sub') ? ($.attr(this, 'data-pad') === undefined ? 60 : $.attr(this, 'data-pad')) : 130
726	});
727  });
728
729  $(".nav.nav-stacked.subnav > li > a").click(function () {
730	$($.attr(this, 'href')).animatescroll({
731	  scrollSpeed: 800,
732	  easing: 'easeInOutExpo',
733	  padding: $.attr(this, 'data-pad') === undefined ? 60 : $.attr(this, 'data-pad')
734	});
735  });
736  $("#tryitnowCta").click(function () {
737	$($.attr(this, 'href')).animatescroll({
738	  scrollSpeed: 800,
739	  easing: 'easeInOutExpo',
740	  padding: $.attr(this, 'data-pad') === undefined ? 60 : $.attr(this, 'data-pad')
741	});
742  });
743  $("#downloadCta").click(function () {
744	$($.attr(this, 'href')).animatescroll({
745	  scrollSpeed: 800,
746	  easing: 'easeInOutExpo',
747	  padding: $('#subnav').hasClass('fixed-sub') ? ($.attr(this, 'data-pad') === undefined ? 60 : $.attr(this, 'data-pad')) : 130
748	});
749  });
750  $(".nav.nav-pills.subnav > li > a").click(function () {
751	$($.attr(this, 'href')).animatescroll({
752	  scrollSpeed: 800,
753	  easing: 'easeInOutExpo',
754	  padding: $.attr(this, 'data-pad') === undefined ? 60 : $.attr(this, 'data-pad')
755	});
756  });
757
758  $('.nav.nav-stacked.subnav .selectpicker').change(function () {
759	if ($(this).val().indexOf('#') === 0) {
760	  $($(this).val()).animatescroll({
761		scrollSpeed: 800,
762		easing: 'easeInOutExpo',
763		padding: $.attr(this, 'data-pad') === undefined ? 60 : $.attr(this, 'data-pad')
764	  });
765	}
766	else {
767	  window.location.href = $(this).val();
768	}
769  });
770
771  $(document).on('change', '#filter-application', function () {
772	if ($("#filter-group").val() > 0) {
773	  $("#filter-group").val(0);
774	  $("#filter-group").selectpicker('refresh');
775	}
776	if ($("#filter-category").val() > 0) {
777	  $("#filter-category ").val(0).trigger('change');
778	  $("#filter-category").selectpicker('refresh');
779	}
780  });
781
782  $(document).on('change', '#filter-group', function () {
783	if ($("#filter-industry").val() > 0) {
784	  $("#filter-industry").val(0).trigger('change');
785	  $("#filter-industry").selectpicker('refresh');
786	}
787	if ($("#filter-application").val() > 0) {
788	  $("#filter-application").val(0);
789	  $("#filter-application").selectpicker('refresh');
790	}
791  });
792
793  $(document).on('change', '#filter-industry', function () {
794	if ($("#filter-industry").val() > 0) {
795	  $("#filter-group").val(0);
796	  $("#filter-group").selectpicker('refresh');
797	  $("#filter-category").val(0).trigger('change');
798	  $("#filter-category").selectpicker('refresh');
799	}
800	var cat = 0;
801	if ($("#cat-selected").val() > 0) {
802	  cat = $("#cat-selected").val();
803	}
804	var elencostring = "";
805	$.post("/Ajax/getProductsRelatedApplications",
806	  {
807		ind: $(this).val(),
808		cat: cat
809	  },
810	  function (json) {
811		elencostring = '<option value="0" selected>' + json[0].TitleDefaultLang + '</option>';
812		$.each(json, function (i, item) {
813		  elencostring += '<optgroup label="' + item.Title + '">'
814
815		  $.each(json[i].Applications, function (y, item) {
816			elencostring += '<option value="' + item.Id + '">' + item.Title + '</option>';
817		  });
818		  elencostring += '</optgroup>';
819		});
820		$("#filter-application").html(elencostring);
821		$("#filter-application").selectpicker('refresh');
822	  });
823  });
824
825  $(document).on('change', '#filter-category', function () {
826	var elencostring = "";
827
828	if ($("#filter-category").val() > 0) {
829	  $("#filter-industry").val(0).trigger('change');
830	  $("#filter-industry").selectpicker('refresh');
831	}
832	$.post("/Ajax/getProductsRelatedFamilies",
833	  {
834		cat: $(this).val()
835	  },
836	  function (json) {
837		elencostring = '<option value="0" selected>' + json[0].TitleDefaultLang + '</option>';
838		$.each(json, function (i, item) {
839		  elencostring += '<optgroup label="' + item.Title + '">'
840
841		  $.each(json[i].Groups, function (y, item) {
842			elencostring += '<option value="' + item.Id + '">' + item.Title + '</option>';
843		  });
844		  elencostring += '</optgroup>';
845		});
846		$("#filter-group").html(elencostring);
847		$("#filter-group").selectpicker('refresh');
848	  });
849  });
850
851  //dropdown tab toggler
852  $(document).on('change', '.selectpicker.tab-toggler', function () {
853	if ($(this).val() == "#all") {
854	  $(this).closest('section').find('.tab-content').find('.tab-pane').addClass('fade-in active').addClass('fade');
855	} else {
856	  $(this).closest('section').find('.tab-content').find('.tab-pane').removeClass('fade-in active').addClass('fade');
857	  $(this).closest('section').find('.tab-content').find($(this).val()).removeClass('fade').addClass('fade-in active');
858	}
859  });
860
861  $(document).on('change', '#subnav-mobile.app-mobile-nav .selectpicker', function () {
862	var idlink = $(this).val().replace("#", "#Link_");
863	$(idlink).trigger("click");
864  });
865
866  $(document).on('change', '.selectpicker.tab-toggler', function () {
867	if ($(this).val() == "#all") {
868	  $(this).closest('section').find('.tab-content').find('.tab-pane').addClass('fade-in active').addClass('fade');
869	} else {
870	  $(this).closest('section').find('.tab-content').find('.tab-pane').removeClass('fade-in active').addClass('fade');
871	  $(this).closest('section').find('.tab-content').find($(this).val()).removeClass('fade').addClass('fade-in active');
872	}
873  });
874
875  $(document).on('click', '.quality-picker ul.nav-tabs.subnav li a', function () {
876	$(this).closest('ul').children().removeClass('active');
877	$(this).parent().addClass('active');
878	$(this).closest('section').find('.tab-content').find('.tab-pane').removeClass('fade-in active').addClass('fade');
879	$(this).closest('section').find('.tab-content').find($(this).attr('href')).removeClass('fade').addClass('fade-in active');
880	return false;
881  });
882
883  // select lingua
884  $('.selectpicker.top-lang').selectpicker({
885	width: 'fit'
886  });
887
888  $('#search-btn').on('click', function (e) {
889	//if ($(window).width() < 768) {
890	if ($('#search-popup').hasClass('open')) {
891	  if ($('#search_txt').val() != "") {
892		$('form#topSearch').submit();
893	  } else {
894		$('#search-popup').removeClass('open');
895		$('#search-btn').removeClass('active');
896	  }
897	} else {
898	  $('#search-btn').addClass('active');
899	  $('#search_txt').val('');
900
901	  setTimeout(function () { $('#search_txt').focus() }, 500);
902	  $('#search-popup').addClass('open');
903	}
904	return false;
905  });
906
907  $('#search-txt').on('blur', function (e) {
908	$('#search-txt').val('');
909	$('#search-popup').animate({ 'z-index': -1, opacity: 0 }, 400);
910	$('#search-popup').removeClass('open');
911	$('.sel-lang').show('slow');
912  })
913
914  $('#search-txt').keypress(function (e) {
915	if (e.which === 13 && $(this).val() !== '') {
916	  $('form#topSearch').submit();
917	  return false;
918	}
919  });
920
921  // select
922  $('.selectpicker.sel-data').selectpicker();
923  $('.selectpicker.form-control').selectpicker();
924
925  // ancore famiglie & prodotti
926  $('ul.nav-stacked li a').click(function (e) {
927	$('ul.nav-stacked li.active').removeClass('active');
928	$(this).parent('li').addClass('active');
929  })
930
931  // carousel prodotti cambia immagini navigazione a seconda della slide
932  $('#prodCarousel').on('slid.bs.carousel', function () {
933	var current = $('#prodCarousel .item.active');
934	if (current.hasClass('square')) {
935	  $('#prodCarousel a.left.carousel-control span img').attr('src', '/images/prev-blue.png');
936	  $('#prodCarousel a.right.carousel-control span img').attr('src', '/images/next-blue.png');
937	} else {
938	  $('#prodCarousel a.left.carousel-control span img').attr('src', '/images/prev.png');
939	  $('#prodCarousel a.right.carousel-control span img').attr('src', '/images/next.png');
940	}
941  })
942
943  if ($('.carousel-inner').length > 0) {
944	$('.carousel-inner').each(function () {
945	  if ($(this).children('div').length === 1) $(this).siblings('.carousel-control, .carousel-indicators').hide();
946	});
947  }
948
949  // prodotto: gallery immagini e video
950  if ($('.media-gallery.industry').length > 0) {
951	$(".media-gallery.industry").owlCarousel({
952	  responsiveClass: true,
953	  nav: true,
954	  dots: false,
955	  loop: false,
956	  margin: 20,
957	  items: 4,
958	  lazyLoad: true,
959	  autoplay: true,
960	  autoplayTimeout: 2000,
961	  autoplayHoverPause: true,
962	  responsive: {
963		0: {
964		  items: 1
965		},
966		350: {
967		  items: 2
968		},
969		600: {
970		  items: 4
971		},
972		1878: {
973		  items: 4
974		}
975	  }
976	});
977
978  };
979
980  // prodotto: gallery immagini e video
981  if ($('.media-gallery').length > 0) {
982	$(".media-gallery").owlCarousel({
983	  responsiveClass: true,
984	  nav: true,
985	  loop: false,
986	  dots: false,
987	  center: true,
988	  margin: 20,
989	  items: 6,
990	  lazyLoad: true,
991	  autoplay: true,
992	  autoplayTimeout: 2000,
993	  autoplayHoverPause: true,
994	  responsive: {
995		0: {
996		  items: 1
997		},
998		350: {
999		  items: 3
1000		},
1001		600: {
1002		  items: 5
1003		},
1004		1878: {
1005		  items: 6
1006		}
1007	  }
1008	});
1009  };
1010
1011  if ($('.mini-banners').length > 0) {
1012	$(".mini-banners").owlCarousel({
1013	  responsiveClass: true,
1014
1015	  margin: 40,
1016	  items: 3,
1017	  dots: true,
1018	  dotsEach: 1,
1019	  lazyLoad: true,
1020	  autoplayTimeout: 2000,
1021	  autoplayHoverPause: true,
1022	  nav: true
1023	});
1024	var owl2 = $('.mini-banners');
1025	owl2.owlCarousel();
1026  };
1027
1028  // breadcrumb prodotti
1029  if ($('.products-gallery').length > 0) {
1030	$(".products-gallery").owlCarousel({
1031	  margin: 40,
1032	  items: 7,
1033	  nav: false
1034	});
1035  }
1036
1037  // partners
1038  if ($('.partners-gallery').length > 0) {
1039	$(".partners-gallery").owlCarousel({
1040	  margin: 40,
1041	  items: 6,
1042	  dotsEach: 3,
1043	  autoplay: true,
1044	  autoplayTimeout: 2000,
1045	  autoplayHoverPause: true,
1046	  rewind: true
1047	})
1048  }
1049
1050  // solution partners
1051  if ($('.solution-partners-gallery').length > 0) {
1052	$(".solution-partners-gallery").owlCarousel({
1053	  margin: 40,
1054	  items: 6,
1055	  dotsEach: 3,
1056	  autoplay: true,
1057	  autoplayTimeout: 2000,
1058	  autoplayHoverPause: true,
1059	  rewind: true
1060	})
1061  }
1062
1063  // mesi eventi
1064  if ($('.events-months').length > 0) {
1065	var owl = $('.events-months');
1066	owl.on('initialized.owl.carousel', function (e) {
1067	  if (e.item !== undefined) {
1068		var counter = 0;
1069		$('.owl-stage .owl-item .owl-item .item').each(function () {
1070		  if ($(this).hasClass('current')) {
1071			owl.trigger('to.owl.carousel', [counter, 1, true]);
1072		  }
1073		  counter++;
1074		});
1075	  }
1076	});
1077	owl.owlCarousel({
1078	  loop: false,
1079	  dots: false,
1080	  nav: true,
1081	  items: 5,
1082	  margin: 20,
1083	  startPosition: 4,
1084	  stageOuterClass: 'owl-stage-outer-bordered'
1085	});
1086  }
1087
1088  // breadcrumb: apertura esclusiva (da sistemare...)
1089  var $myGroup = $('#bread-cont');
1090  $myGroup.on('show.bs.collapse', '.collapse', function () {
1091	$myGroup.find('.collapse.in').collapse('hide');
1092  });
1093
1094  $(".fancy-img").fancybox({
1095	'type': 'image',
1096	helpers: {
1097	  title: {
1098		type: 'inside'
1099	  }
1100	}
1101  });
1102
1103  $(".fancy-video").fancybox({
1104	'type': 'iframe',
1105	'width': 1344,
1106	'height': 756,
1107	helpers: {
1108	  title: {
1109		type: 'inside'
1110	  }
1111	}
1112  });
1113
1114  $(".fancy-form").fancybox({
1115	autoSize: true,
1116	type: 'iframe',
1117	'width': 800,
1118	'minHeight': 500,
1119	wrapCSS: 'justify-center',
1120	helpers: {
1121	  title: {
1122		type: 'inside'
1123	  }
1124	}
1125  });
1126
1127  $(".fancy-inline").fancybox({
1128	autoSize: true,
1129	width: 800,
1130	minHeight: 500,
1131	wrapCSS: 'justify-center',
1132	helpers: {
1133	  title: {
1134		type: 'inside'
1135	  }
1136	},
1137	afterShow: function () {
1138	  var linkSource = $(this.element).hasClass('howto') ? 'howto' : 'tryit';
1139	  if (linkSource === 'howto') {
1140		$('#FormModel_TryIt').val('0');
1141	  }
1142	}
1143  });
1144
1145  // debug
1146  $.validator.setDefaults({
1147	errorPlacement: function (error, element) {
1148	  error.insertAfter(element);
1149	},
1150	ignore: '.bootstrap-select'
1151  });
1152
1153  // validazione custom di un gruppo di controlli
1154  if ($('#frmImageGallery').length > 0) {
1155	$("#frmImageGallery").validate({
1156	  rules: {
1157		product: {
1158		  require_from_group: [1, ".selgroup"]
1159		},
1160		category: {
1161		  require_from_group: [1, ".selgroup"]
1162		}
1163	  },
1164	  messages: {
1165		product: {
1166		  require_from_group: 'Please choose a product or a category'
1167		},
1168		category: {
1169		  require_from_group: 'Please choose a product or a category'
1170		}
1171	  },
1172	  groups: {
1173		selGroup: 'product category'
1174	  }
1175	});
1176  }
1177
1178  // validazione standard per tutti i form (lasciarlo qui in fondo a tutti i .validate() custom!)
1179  $("form").each(function () {
1180	$(this).validate();
1181  });
1182
1183  $('.input-group.date:not(.deliveryDate)').datepicker({
1184	format: 'mm/dd/yyyy',
1185	calendarWeeks: true
1186  });
1187
1188  $('.input-numeric').on('input', function (event) {
1189	this.value = this.value.replace(/[^0-9]/g, '');
1190  });
1191
1192  $('[name="search-prod"]').autocomplete({
1193	serviceUrl: '/Ajax/supportAutocompleteProducts',
1194	minLength: 3,
1195	onSelect: function (suggestion) {
1196	  $('#wait').show();
1197	  if (suggestion.target == '_blank') {
1198		window.open(suggestion.data);
1199	  } else {
1200		window.location.href = suggestion.data;
1201	  }
1202	}
1203  });
1204
1205  $('[name="search-prod2"]').autocomplete({
1206	serviceUrl: '/Ajax/productsAutocomplete',
1207	minLength: 3,
1208	onSelect: function (suggestion) {
1209	  $('#wait').show();
1210	  if (suggestion.target == '_blank') {
1211		window.open(suggestion.data);
1212	  } else {
1213		window.location.href = suggestion.data;
1214	  }
1215	}
1216  });
1217
1218  if ($('.hideme2').length > 0) {
1219	$('.hideme2').css('display', 'none');
1220  }
1221
1222  ///// Deferring youtube script to improve GT Matrix ////////
1223  if ($('iframe[data-src]').length) {
1224	setTimeout(function () {
1225	  $('iframe[data-src]').each(function (index, item) {
1226		var src = $(item).attr('data-src');
1227		$(item).attr('src', src);
1228	  });
1229	}, 15000);
1230  }
1231  ///// Deferring youtube script to improve GT Matrix ////////
1232
1233  ///// ADD COOKIE FROM QUERYSTRING /////////
1234  var src = getParameterByName('utm_source');
1235  var mdn = getParameterByName('utm_medium');
1236  var cmp = getParameterByName('utm_campaign');
1237
1238  if (src !== null) {
1239	Cookies.set('utmstore_src', src, { expires: 5, secure: true });
1240  }
1241  if (mdn !== null) {
1242	Cookies.set('utmstore_mdn', mdn, { expires: 5, secure: true });
1243  }
1244  if (cmp !== null) {
1245	Cookies.set('utmstore_cmp', cmp, { expires: 5, secure: true });
1246  }
1247  ///// ADD COOKIE FROM QUERYSTRING /////////
1248}); // ready
1249
1250function setViewMailMenu() {
1251
1252  if ($(window).width() > 950) {
1253
1254	var $menuItem = $('.top-menu-container > .top-menu').find('.dropdown');
1255	$menuItem.each(function (i) {
1256	  var hovertimer;
1257	  $(this).hover(
1258		function () {
1259		  var self = this;
1260		  hovertimer = setTimeout(function () {
1261			$(self).addClass('open');
1262		  }, 500);
1263
1264		},
1265		function () {
1266		  clearTimeout(hovertimer);
1267		  $(this).removeClass('open');
1268		}
1269	  );
1270
1271	});
1272
1273  }
1274}
1275
1276function setchat() {
1277  if ($(".LPMcontainer").length > 0) {
1278	$('#chat-button-wrapper').show();
1279
1280  } else {
1281	$('#chat-button-wrapper').hide();
1282  }
1283}
1284
1285function setCountry(iso) {
1286  Cookies.set('user_country', iso, { expires: 15 });
1287}
1288
1289function msieversion() {
1290  var ua = window.navigator.userAgent;
1291  var msie = ua.indexOf("MSIE ");
1292  var msie11 = ua.indexOf("Trident/7.0");
1293  if (msie > -1 || msie11 > -1)
1294	return 1;
1295  else
1296	return 0;
1297}
1298
1299function pad(value, length) {
1300  return (value.toString().length < length) ? pad("0" + value, length) : value;
1301}
1302
1303function goPrev() {
1304  $('.timeline > .active').prev('li').prev('li').find('a').trigger('click');
1305  $('.tab-next').show('slow');
1306  $('.timeline > .active').prev('li').length === 0 ? $('.tab-prev').hide() : $('.tab-prev').show('slow');
1307}
1308
1309function goNext() {
1310  $('.timeline > .active').next('li').next('li').find('a').trigger('click');
1311  $('.tab-prev').show('slow');
1312  $('.timeline > .active').next('li').length === 0 ? $('.tab-next').hide() : $('.tab-next').show('slow');
1313}
1314
1315function setNavigation(e) {
1316  e.parent('li').prev('li').length === 0 ? $('.tab-prev').hide() : $('.tab-prev').show('slow');
1317  e.parent('li').next('li').length === 0 ? $('.tab-next').hide() : $('.tab-next').show('slow');
1318}
1319
1320function submenuHighlight(current, hr, offsetWidth, offsetLeft) {
1321  if (current !== undefined && current.length > 0) {
1322	var bodyWidth = $(window).innerWidth();
1323	var bodyOffset = (Math.max(bodyWidth, 1170) - 1170) / 2;
1324	var pos = $(current).offset();
1325	var width = $(current).width();
1326	hr.width(width + offsetWidth);
1327	hr.css('left', pos.left + offsetLeft - bodyOffset);
1328  }
1329}
1330
1331function animateHighlight(link, hr, offsetWidth, offsetLeft) {
1332  if (link !== undefined && link.length > 0) {
1333	var current = link.parent();
1334	var bodyWidth = $(window).innerWidth();
1335	var bodyOffset = (Math.max(bodyWidth, 1170) - 1170) / 2;
1336	var pos = $(current).offset();
1337	var width = $(current).width();
1338	hr.width(width + offsetWidth);
1339	hr.css('left', pos.left + offsetLeft - bodyOffset);
1340  }
1341}
1342
1343function adjustTopMenu() {
1344  var menuLeft = menuLeft = $('.top-menu-container .top-menu').parent().offset().left;
1345  $('.dropdown-menu').not('.bootstrap-select .dropdown-menu').css('left', -menuLeft + 'px');
1346}
1347
1348function togglePlus(clickedElement) {
1349
1350
1351  var plus = $(clickedElement).find('i');
1352  if (plus.hasClass('fa-minus')) {
1353	plus.removeClass('fa-minus').addClass('fa-plus');
1354	$($(clickedElement).attr('href')).removeClass("in");
1355  }
1356  else {
1357	plus.removeClass('fa-plus').addClass('fa-minus');
1358	$($(clickedElement).attr('href')).addClass("in");
1359  }
1360  return false;
1361}
1362
1363function sanitizeString(str) {
1364  if (typeof str !== 'string') return str; // Controllo per evitare errori con valori non stringa
1365  return str.replace(/[&%]/g, '').replace(/\s+/g, ' ').trim(); // Sostituisci o rimuovi i caratteri non validi e più spazi consecutivi con uno solo
1366}
1367
1368function gtagEvent(category, action, label) {
1369  if (typeof gtag !== 'undefined') {
1370
1371	// Pulizia delle stringhe
1372	category = sanitizeString(category);
1373
1374	gtag('event', action, { 'event_category': category, 'event_label': label });
1375  }
1376  return true;
1377}
1378
1379function gtagEvent2(category, categoryGA, subcategoryGA, action, label) {
1380  if (typeof gtag !== 'undefined') {
1381
1382	// Pulizia delle stringhe
1383	category = sanitizeString(category);
1384	categoryGA = sanitizeString(categoryGA);
1385	subcategoryGA = sanitizeString(subcategoryGA);
1386	action = sanitizeString(action);
1387	label = sanitizeString(label);
1388
1389	// legacy: nome categoria in lingua
1390	gtag('event', action, { 'event_category': category, 'event_label': label });
1391	// new 1: nome categoria generico
1392	gtag('event', action, { 'event_category': categoryGA, 'event_label': label });
1393	// new 2: nome categoria + sub-categoria generico
1394	gtag('event', action, { 'event_category': categoryGA + ' - ' + subcategoryGA, 'event_label': label });
1395  }
1396  return true;
1397}
1398
1399function gtagEventWebinar(category, action, label, id, guid, name, email, company, country) {
1400  if (id !== undefined && guid !== undefined) {
1401	$.ajax({
1402	  url: '/Ajax/trackWebinarClick',
1403	  method: 'get',
1404	  data: {
1405		'id': id,
1406		'guid': guid,
1407		'name': name,
1408		'email': email,
1409		'company': company,
1410		'country': country
1411	  }
1412	});
1413  }
1414  if (typeof gtag !== 'undefined') {
1415	gtag('event', action, { 'event_category': category, 'event_label': label });
1416  }
1417  return true;
1418}
1419
1420function checkCaptcha(msg) {
1421  if ($("#recaptcha_nl").length > 0) {
1422	if ($("#recaptcha_nl").find("[name='g-recaptcha-response']").val() == '') {
1423	  $.fancybox.open(msg);
1424	  return false;
1425	}
1426	else {
1427	  return true;
1428	}
1429  }
1430  else if ($(".mtcaptcha-verifiedtoken").length > 0) {
1431	if ($(".mtcaptcha-verifiedtoken").val() == '') {
1432	  $.fancybox.open(msg);
1433	  return false;
1434	}
1435	else {
1436	  return true;
1437	}
1438  }
1439  return true;
1440}
1441
1442function getParameterByName(name, url = window.location.href) {
1443  name = name.replace(/[\[\]]/g, '\\$&');
1444  var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
1445	results = regex.exec(url);
1446  if (!results) return null;
1447  if (!results[2]) return '';
1448  return decodeURIComponent(results[2].replace(/\+/g, ' '));
1449}
1450async function checkEmailInCRM(email) {
1451  try {
1452	const response = await fetch('/AjaxAsync/CheckEmailInCRM?email=' + encodeURIComponent(email), {
1453	  method: 'GET',
1454	});
1455	if (!response.ok) {
1456	  throw new Error('HTTP error! status: ${response.status}');
1457	}
1458	return await response.json();
1459  } catch (error) {
1460	console.error('Error: ' + error.message);
1461	return null;
1462  }
1463};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.