PageSourceSearch

https://www.crf.it/js/index.js

js crf.it collected 2026-10-02 05:44:41 UTC 27,006 bytes, 822 lines download raw bytes

1let sendContactsInformationServicePath = '/_vti_bin/Reply.Stellantis.Balocco/SendContacts.svc/SendContact'
2let tokenCaptcha = ''
3let keyCaptcha = '6LcIuCEfAAAAALynbxR2XpgwEWiLbdZQ8L0AGJ16'
4
5function ValidateForm() {
6    let errorForm = false
7    let errorMessage = ''
8    $('#contact-form input[data-validation], #contact-form textarea[data-validation]').each(function (i) {
9        let inputElement = $(this)
10        let validationType = inputElement.data('validation')
11
12        if (validationType === 'value-required') {
13            if (inputElement.val().trim() == '') {
14                errorMessage = GetMessageNotificationForm('send_error')
15                errorForm = true
16            }
17        }
18
19        if (!errorForm) {
20            if (validationType === 'email-address') {
21                if (!CheckAddressMail(inputElement.val().trim())) {
22                    errorMessage = GetMessageNotificationForm('email_error')
23                    errorForm = true
24                }
25            }
26        }
27
28        if (!errorForm) {
29            if (validationType === 'check-required') {
30                if (!inputElement.is(':checked')) {
31                    errorMessage = GetMessageNotificationForm('privacy_error')
32                    errorForm = true
33                }
34            }
35        }
36    })
37
38    if (!errorForm) {
39        if (tokenCaptcha === '') {
40            errorMessage = GetMessageNotificationForm('captcha_error')
41            errorForm = true
42        }
43    }
44
45    return { validationError: errorForm, message: errorMessage }
46}
47
48function CheckAddressMail(addressMail) {
49    var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/gim
50    if (re.test(addressMail)) {
51        return true
52    } else {
53        return false
54    }
55}
56
57function SendRequestEmail(DTO) {
58    DTO['Response'] = tokenCaptcha
59
60    promise = $.ajax({
61        contentType: 'application/json; charset=utf-8',
62        data: JSON.stringify(DTO),
63        type: 'POST',
64        url: sendContactsInformationServicePath,
65        cache: false,
66        dataType: 'json'
67    })
68        .done(function (res) {
69            return res
70        })
71        .fail(function (errMsg) {
72            return errMsg
73        })
74        .always(function () {})
75
76    return promise
77}
78
79function GetDataForm() {
80    let returnDataFields = {}
81
82    $('#contact-form input[type=text]').each(function (i) {
83        let inputElement = $(this)
84        returnDataFields[inputElement.attr('id')] = inputElement.val()
85    })
86
87    returnDataFields['telefono'] = $('#contact-form #telefono').val()
88    returnDataFields['email'] = $('#contact-form #email').val()
89    returnDataFields['attivita'] = $('#contact-form #attivita').children('option:selected').text()
90    returnDataFields['attivitaDefault'] = $('#contact-form #attivita').children('option').first().text()
91    returnDataFields['messaggio'] = $('#contact-form #messaggio').val()
92    returnDataFields['language'] = $('#wp_language').val()
93    returnDataFields['section'] = $('#wp_section').val()
94    returnDataFields['listTitle'] = $('#wp_list').val()
95
96    return returnDataFields
97}
98
99function GetMessageNotificationForm(keyhidden) {
100    return $('#' + keyhidden).val()
101}
102
103var verifyCaptchaCallback = function (response) {
104    $('#notification-error-form').css('visibility', 'hidden')
105    $('#notification-error-form span').html('-')
106    tokenCaptcha = response
107    let resultValidation = ValidateForm()
108    if (!resultValidation.validationError) {
109        $('#form-button-container .btn-custom').removeClass('disabled')
110    } else {
111        $('#form-button-container .btn-custom').addClass('disabled')
112    }
113}
114
115var expiredCaptchaCallback = function (response) {
116    tokenCaptcha = ''
117    grecaptcha.reset()
118    $('#form-button-container .btn-custom').addClass('disabled')
119}
120
121var onloadCallback = function () {
122    grecaptcha.render('g-recaptcha', {
123        sitekey: keyCaptcha,
124        callback: verifyCaptchaCallback,
125        'expired-callback': expiredCaptchaCallback
126    })
127}
128
129function changeHeaderOnScroll(scrollTop) {
130    const scroll = scrollTop || $(window).scrollTop()
131
132    const openedMenuMobile = $('#gearOffcanvasMenuMobile').prop('checked')
133    const gearsMenuMd = $('.offcanvas-menu-md input[name=gearsMenu]')
134    const openedMenuMd = []
135
136    for (const [key, value] of Object.entries(gearsMenuMd)) {
137        if (value.checked) {
138            openedMenuMd.push(value)
139        }
140    }
141
142    if (!openedMenuMobile && openedMenuMd.length < 1) {
143        if (scroll > 0) {
144            $('.header').addClass('scroll')
145        } else {
146            $('.header').removeClass('scroll')
147        }
148    }
149}
150
151function triggerMenuMobile() {
152    if (!$('#menu-mobile').hasClass('offcanvas-menu-opened')) {
153        $('#menu-mobile').addClass('offcanvas-menu-opened')
154        $('body').css('overflow', 'hidden')
155        $('.btn-offcanvas-section').each((i, item) => {
156            if ($(item).find('a').length > 0) {
157                $('.btn-offcanvas-section a').attr('tabindex', 0)
158            } else {
159                $(item).attr('tabindex', 0)
160            }
161        })
162    } else {
163        $('body').css('overflow', 'auto')
164        $('#menu-mobile').removeClass('offcanvas-menu-opened')
165        $('.btn-offcanvas-section').each((i, item) => {
166            if ($(item).find('a').length > 0) {
167                $('.btn-offcanvas-section a').attr('tabindex', -1)
168            } else {
169                $(item).attr('tabindex', -1)
170            }
171        })
172        $(document).off('keyup')
173        $('#menu-mobile').off('keyup')
174    }
175}
176
177function openMenuMD(id) {
178    const group = "input:checkbox[name='gearsMenu']"
179    const checkbox = $(`#${id}`)
180    const prefix = id.replace('GearMenu', '')
181    const parent = $(`#${prefix}Menu`).parent()
182
183    $(group).prop('checked', false)
184    $(checkbox).prop('checked', true)
185
186    // ! VISUALIZZAZIONE MENU
187    $('.offcanvas-menu-md-item .pages-list').css('opacity', 0)
188    $('.offcanvas-menu-md-item .pages-list').css('display', 'none')
189    $('.offcanvas-menu-md-item .pages-list').css('pointer-events', 'n
189one')
190    $(`#${prefix}Menu`).css('opacity', 1)
191    $(`#${prefix}Menu`).css('display', 'block')
192    $(`#${prefix}Menu`).css('pointer-events', 'all')
193
194    //! VISUALIZZAZIONE AFTER
195    $('.offcanvas-menu-md-item').removeClass('active')
196    $(parent).toggleClass('active')
197    $('.header').addClass('scroll')
198}
199
200function closeMenuMD(scroll) {
201    const group = "input:checkbox[name='gearsMenu']"
202
203    $(group).prop('checked', false)
204    $('.offcanvas-menu-md-item').removeClass('active')
205    $('.offcanvas-menu-md-item .pages-list').css('opacity', 0)
206    $('.offcanvas-menu-md-item .pages-list').css('display', 'none')
207    $('.offcanvas-menu-md-item .pages-list').css('pointer-events', 'none')
208
209    $(document).off('keyup')
210
211    changeHeaderOnScroll(scroll)
212}
213
214function getEvents() {
215    let data
216
217    data = fetch('https://api.ccl-event.stellantis.com/events/list-events').then((response) => response.json())
218
219    return data
220}
221
222function renderEvent(event) {
223    const email = event.email && event.email !== '' ? `<span> - </span><a class='text-primary-color' href='mailto:${event.email}'>${event.email}</a>` : ''
224    const phoneNumber1 =
225        event.phoneNumber1 && event.phoneNumber1 !== '' ? `<span> - </span><a class='text-primary-color' href='tel:${event.phoneNumber1}'>${event.phoneNumber1}</a>` : ''
226    const phoneNumber2 =
227        event.phoneNumber2 && event.phoneNumber2 !== '' ? `<span> - </span><a class='text-primary-color' href='tel:${event.phoneNumber2}'>${event.phoneNumber2}</a>` : ''
228
229    const elem = `<div class='next-event'>
230		<p class='title text-primary-color event-date'>${event.eventDate}</p>
231		<p class='title text-primary-color event-title'>
232			${event.eventName}
233		</p>
234		<div class='f-w-300 text-primary-color'>
235			<a
236				class='text-primary-color'
237				href=${event.linkUrl}
238				target='_blank'>
239				${event.linkLabel || event.linkUrl}
240				<span class="sr-only">Questo link si aprirà in una nuova finestra</span>
241			</a>
242			${email}
243			${phoneNumber1}
244			${phoneNumber2}
245		</div>
246	</div>`
247
248    return elem
249}
250
251async function renderHomeEvents() {
252    let events = await getEvents()
253
254    if (!events) {
255        $('#events-loader').removeClass('d-none')
256        $('#no-events').addClass('d-none')
257        $('#next-events').addClass('d-none')
258    } else if (events.length > 0) {
259        events = events.filter((item) => !item.isExpired).slice(0, 3)
260
261        let html = events.map((item) => renderEvent(item))
262
263        $('#next-events').append(html)
264        $('#next-events').removeClass('d-none')
265        $('#no-events').addClass('d-none')
266        $('#events-loader').addClass('d-none')
267    } else {
268        $('#no-events').removeClass('d-none')
269        $('#events-loader').addClass('d-none')
270        $('#next-events').addClass('d-none')
271    }
272}
273
274function initSlickCarousel(id) {
275    $(`#${id} .slick-carousel`).slick({
276        slidesToShow: 1,
277        infinite: false,
278        prevArrow: $(`#${id} .slick-carousel`).parent().find('.slides-prev'),
279        nextArrow: $(`#${id} .slick-carousel`).parent().find('.slides-next')
280    })
281}
282
283async function renderCalendarEvents() {
284    let events = await getEvents()
285
286    const nextEvents = events.filter((item) => !item.isExpired)
287    const archiveEvents = events.filter((item) => item.isExpired).reverse()
288
289    if (!nextEvents) {
290        $('#events-loader').removeClass('d-none')
291        $('#events-container').addClass('d-none')
292    } else if (nextEvents.length > 0) {
293        let html = nextEvents.map((item, i) => {
294            let elem = renderEvent(item)
295
296            const index = i + 1
297
298            if (index === 1) {
299                elem = `<div>${elem}`
300            }
301
302            if (index % 6 === 0 && index !== nextEvents.length) {
303                elem = `${elem}</div><div>`
304            }
305
306            if (index === nextEvents.length) {
307                elem = `${elem}</div>`
308            }
309
310            return elem
311        })
312
313        $('#next-events .slick-carousel').append(html.join(''))
314        initSlickCarousel('next-events')
315        $('#events-container').removeClass('d-none')
316        $('#next-events').removeClass('d-none')
317        $('#no-next-events').addClass('d-none')
318        $('#events-loader').addClass('d-none')
319    } else {
320        $('#events-container').removeClass('d-none')
321        $('#no-next-events').removeClass('d-none')
322        $('#events-loader').addClass('d-none')
323        $('#next-events').addClass('d-none')
324    }
325
326    if (!archiveEvents) {
327        $('#archive-events-loader').removeClass('d-none')
328        $('#events-container').addClass('d-none')
329    } else if (archiveEvents.length > 0) {
330        let html = archiveEvents.map((item, i) => {
331            let elem = renderEvent(item)
332
333            const index = i + 1
334
335            if (index === 1) {
336                elem = `<div>${elem}`
337            }
338
339            if (index % 6 === 0 && index !== archiveEvents.length) {
340                elem = `${elem}</div><div>`
341            }
342
343            if (index === archiveEvents.length) {
344                elem = `${elem}</div>`
345            }
346
347            return elem
348        })
349
350        $('#archive-events .slick-carousel').append(html.join(''))
351        initSlickCarousel('archive-events')
352        $('#events-container').removeClass('d-none')
353        $('#archive-events').removeClass('d-none')
354        $('#no-archive-events').addClass('d-none')
355        $('#events-loader').addClass('d-none')
356    } else {
357        $('#events-container').removeClass('d-none')
358        $('#no-archive-events').removeClass('d-none')
359        $('#events-loader').addClass('d-none')
360        $('#archive-events').addClass('d-none')
361    }
362}
363
364function resizeActiveIndicator(id) {
365    const interactiveSvgTabs = $(`#${id}.carousel-interactive-svg  .interactive-svg-tabs`)
366
367    if (interactiveSvgTabs.length > 0) {
368        const activateBtn = $(`#${id} .interactive-svg-tabs .btn.active`)
369
370        const activateBtnTitle = activateBtn.children('.btn-title')
371
372        //? Assegna le dimensioni e translate all'indicatore
373        interactiveSvgTabs.children('.active-indicator').css({
374            translate: activateBtn.position().left + activateBtnTitle.position().left - 1,
375            width: activateBtnTitle.outerWidth()
376        })
377    }
378}
379
380function addEventScrollWithHeader(selector) {
381    $(selector).on('click', (e) => {
382        let cordinate = 0
383
384        if ($(e.delegateTarget).data('target')) {
385            cordinate = $(`#${$(e.delegateTarget).data('target')}`).position()
386        } else {
387            cordinate = $('#main').position()
388        }
389
390        window.scroll({
391            top: cordinate.top - 88,
392            left: 0,
393            behavior: 'smooth'
394        })
395    })
396}
397
398$(document).ready(function () {
399    const agent = navigator.userAgent
400
401    if (agent.match(/iPhone|iPad|iPod/i)) {
402        $('body').addClass('apple')
403    }
404
405    if ($('body').children('#iFrame1').length === 1) {
406        $('body').css('overflow', 'hidden !important')
407    }
408
409    if ($(window).scrollTop() > 0) {
410        //! changeHeaderOnScroll
411        changeHeaderOnScroll(null)
412    }
413
414    $(window).scroll(() => {
415        changeHeaderOnScroll()
416    })
417
418    //! AGGIUNTO KEYUP SU LABEL MENU
419    $('.offcanvas-menu-md-item label[for]').each((i, item) => {
420        $(item).on('keyup', (e) => {
421            const { keyCode } = e
422            const idCheckbox = $(item).attr('for')
423
424            if (keyCode === 13) {
425                openMenuMD(idCheckbox)
426            }
427
428            if (keyCode === 27) {
429                closeMenuMD(null)
430            }
431        })
432
433        $(document).on('keyup', (e) => {
434            const { keyCode } = e
435
436            if (keyCode === 9) {
437                if ($('.offcanvas-menu-md').find(':focus').length === 0) {
438                    closeMenuMD(null)
439                }
440            }
441        })
442    })
443
444    $('.offcanvas-menu-md-item ul').on('keyup', (e) => {
445        const { keyCode, currentTarget } = e
446
447        if (keyCode === 27) {
448            closeMenuMD(null)
449            $(currentTarget).prev().focus()
450        }
451    })
452
453    //! SET MENU CHIUSO
454    $('input:checkbox[name="gearsMenu"]').prop('checked', false)
455
456    //! OPENED MENU MOBILE
457    $('#trigger-menu-mobile').on('click', () => {
458        triggerMenuMobile()
459    })
460
461    $('#trigger-menu-mobile').on('keyup', (e) => {
462        const { keyCode } = e
463
464        if (keyCode === 13) {
465            $('#trigger-menu-mobile').click()
466
467            $('#menu-mobile.offcanvas-menu-opened').on('keyup', (e) => {
468                const { keyCode } = e
469
470                if (keyCode === 27) {
471                    $('#trigger-menu-mobile').focus()
472                }
473
474                $(document).on('keyup', (e) => {
475                    const { keyCode } = e
476
477                    if (keyCode === 9) {
478                        if ($('#menu-mobile').find(document.activeElement).length === 0) {
479                            e.preventDefault()
480                            $('#trigger-menu-mobile').focus()
481                        }
482                    }
483                })
484            })
485        }
486    })
487
488    //! EVENT LISTNER CAROUSEL CUSTOM INDICATORS
489    const carousels = $('.carousel.slide').not('.carousel-modal-gallery')
490
491    if (carousels.length > 0) {
492        for (let i = 0; i < carousels.length; i++) {
493            const carouselId = carousels[i].id
494
495            resizeActiveIndicator(carouselId)
496
497            $(window).on('resize', () => {
498                resizeActiveIndicator(carouselId)
499            })
500
501            $(`#${carouselId}`).on('slide.bs.carousel', (event) => {
502                let allBtn = $(`#${carouselId} .carousel-custom-indicators`).children()
503
504                $(allBtn).removeClass('active')
505
506                const activateBtn = $(`#${carouselId} .carousel-custom-indicators button[data-bs-slide-to=${event.to}]`)
507
508                activateBtn.addClass('active')
509
510                const interactiveSvgTabs = $(`#${carouselId}.carousel-interactive-svg  .interactive-svg-tabs`)
511
512                if (interactiveSvgTabs.length > 0) {
513                    const activateBtnTitle = activateBtn.children('.btn-title')
514
515                    //? Assegna le dimensioni e translate all'indicatore
516                    interactiveSvgTabs.children('.active-indicator').animate({
517                        translate: activateBtn.position().left + activateBtnTitle.position().left - 1,
518                        width: activateBtnTitle.outerWidth()
519                    })
520                }
521            })
522        }
523    }
524
525    //! ACTIVE INDICATOR BTN SELEZIONE SVG
526    if ($('.plant-btn').length > 0) {
527        const activeIndicator = $('.plant-btn-active-indicator')
528        const btnActive = $('.btn-trigger-carousel.active')
529
530        //? Assegna le dimensioni e translate all'indicatore
531        activeIndicator.css({
532            translate: btnActive.position().left,
533            width: btnActive.outerWidth()
534        })
535
536        $('.plant-btn .btn-trigger-carousel').on('click', (e) => {
537            const btn = $(`#${e.currentTarget.id}`)
538
539            $('.btn-trigger-carousel').removeClass('active')
540
541            btn.addClass('active')
542
543            //? Assegna le dimensioni e translate all'indicatore
544            activeIndicator.animate({
545                translate: btn.position().left,
546                width: btn.outerWidth()
547            })
548
549            // ? Spostamento mappa
550            if ($('.interactive-svg-animation').length > 0) {
551                $(btn.attr('data-svg'))
552            }
553        })
554
555        $('#piano_mezzanino').on('click', () => {
556            $('.carousel-interactive-svg').animate(
557                {
558                    translate: '-100%'
559                },
560                {
561                    start: () => {
562                        $('#carousel_interactive_svg_mezzanino').css('visibility', 'visible')
563                    },
564                    done: () => {
565                        $('#carousel_interactive_svg_terra').css('visibility', 'hidden')
566                    }
567                }
568            )
569        })
570
571        $('#piano_terra').on('click', () => {
572            $('.carousel-interactive-svg').animate(
573                {
574                    translate: '0%'
575                },
576                {
577                    start: () => {
578                        $('#carousel_interactive_svg_terra').css('visibility', 'visible')
579                    },
580                    done: () => {
581                        $('#carousel_interactive_svg_mezzanino').css('visibility', 'hidden')
582                    }
583                }
584            )
585        })
586    }
587
588    //! SET INTERACTIVE ELEMENT ACTIVE
589    const interactiveSvg = $('.carousel-interactive-svg')
590
591    if (interactiveSvg.length > 0) {
592        for (let carousel of interactiveSvg) {
593            const carouselId = carousel.id
594
595            $(carousel).on('slide.bs.carousel', (event) => {
596                const allItem = $(`#${carouselId} .clickable-element`)
597
598                $(allItem).removeClass('active')
599
600                const activeItem = $(`#${event.relatedTarget.id}_sala`)
601
602                activeItem.addClass('active')
603            })
604        }
605    }
606
607    //! SET NUMERO SLIDER ATTIVA MODAL-GALLERY E SET FUNZIONE CLOSE MODAL
608    const modals = $('.modal.modal-gallery')
609
610    if (modals.length > 0) {
611        let carouselLength
612
613        for (let i = 0; i < modals.length; i++) {
614            modals[i].addEventListener('show.bs.modal', (e) => {
615                const modalId = e.target.id
616
617                const slides = $(`#${modalId} .carousel .carousel-item`)
618
619                carouselLength = slides.length
620
621                $(`#${modalId} .slider-indicators .total-slide`).text(carouselLength)
622
623                const carouselItems = $(`#${modalId} .carousel .carousel-item`)
624                let carouselItemActive
625
626                for (let j = 0; j < carouselItems.length; j++) {
627                    if (carouselItems[j].className.indexOf('active') > -1) {
628                        carouselItemActive = j + 1
629                    }
630                }
631
632                $(`#${modalId} .slider-indicators .active-slide`).text(carouselItemActive)
633
634                $(`#${modalId} .slider-indicators`).attr('aria-label', `${carouselItemActive} of ${carouselLength}`)
635
636                const carousel = document.querySelector(`#${modalId} .carousel`)
637
638                if (carousel) {
639                    carousel.addEventListener('slide.bs.carousel', (e) => {
640                        $(`#${modalId} .slider-indicators .active-slide`).text(e.to + 1)
641                        $(`#${modalId} .slider-indicators`).attr('aria-label', `${e.to + 1} of ${carouselLength}`)
642                    })
643                }
644            })
645
646            const btnClose = $(`#${modals[i].id} .modal-header .btn-close`)
647
648            if (btnClose.length > 0) {
649                btnClose.on('click', () => {
650                    const iframe = $(`#${modals[i].id} .modal-body iframe`)
651
652                    if (iframe[0]) {
653                        const iframeAppend = iframe[0]
654                        iframe.remove()
655
656                        $(`#${modals[i].id} .modal-body`).append(iframeAppend)
657                    }
658
659                    $(`#${modals[i].id}`).modal('hide')
660                })
661            }
662        }
663    }
664
665    const imgPanzoom = document.querySelectorAll('.img-panzoom')
666
667    if (imgPanzoom.length > 0) {
668        imgPanzoom.forEach((img) => {
669            const panzoom = Panzoom(img, {
670                contain: 'inside',
671                startScale: 1,
672                pinchSpeed: 2,
673                startX: 0,
674                startY: 0
675            })
676            panzoom.reset()
677        })
678    }
679
680    //!SVG INTERATTIVO PAGINA LOCATIONS
681    $('#Location_svg .clickable-element, #tribuna_svg .clickable-element').on('click', (e) => {
682        $('#carouselLocations .clickable-element.active').removeClass('active')
683
684        e.target.classList.add('active')
685    })
686
687    //! SCROLL TO CARD-ROW
688    $('.arrow-link[href^="#row-card-"]').on('click', (e) => {
689        const { target } = e
690
691        e.preventDefault()
692
693        const hrefId = $(target).attr('href')
694        const hrefPosTop = $(`${hrefId}`).position().top
695
696        window.scrollTo({ top: hrefPosTop - 98, behavior: 'smooth' })
697    })
698
699    //! CHECK FORM
700    $('#contact-form input[data-validation]').on('keyup', function () {
701        if ($(this).data('validation') === 'value-required') {
702            let valueInput = $(this).val()
703
704            if (valueInput.length < 3) {
705                let resultValidation = ValidateForm()
706
707                if (!resultValidation.validationError) {
708                    $('#form-button-container .btn-custom').removeClass('disabled')
709                } else {
710                    $('#form-button-container .btn-custom').addClass('disabled')
711                }
712            }
713        }
714    })
715
716    $('.check-privacy-container input[data-validation]').on('click', function () {
717        if ($(this).is(':checked')) {
718            $('#notification-error-form').css('visibility', 'hidden')
719            $('#notification-error-form span').html('-')
720            let resultValidation = ValidateForm()
721            if (!resultValidation.validationError) {
722                $('#form-button-container .btn-custom').removeClass('disabled')
723            } else {
724                $('#form-button-container .btn-custom').addClass('disabled')
725            }
726        } else {
727            $('#form-button-container .btn-custom').addClass('disabled')
728        }
729    })
730
731    $('#contact-form input[data-validation]').on('blur', function () {
732        $('#notification-error-form').css('visibility', 'hidden')
733        $('#notification-error-form span').html('-')
734        let resultValidation = ValidateForm()
735        if (!resultValidation.validationError) {
736            $('#form-button-container .btn-custom').removeClass('disabled')
737        } else {
738            $('#form-button-container .btn-custom').addClass('disabled')
739        }
740    })
741
742    $('#btnSendRequest').on('click', function () {
743        $('#notification-error-form').css('visibility', 'hidden')
744        $('#notification-error-form span').html('-')
745
746        let resultValidation = ValidateForm()
747
748        if (!resultValidation.validationError) {
749            $('#contact-form').addClass('loading')
750            $('#form-button-container .btn-custom').removeClass('disabled')
751
752            let dataToSend = GetDataForm()
753
754            let promiseSend = SendRequestEmail(dataToSend)
755
756            promiseSend.then(
757                function (value) {
758                    //promise success
759                    $('#contact-form').removeClass('loading')
760
761                    if (value.Result === true) {
762                        //send OK
763                        $('#form-button-container').hide()
764                        $('#notification-success-form span').val(GetMessageNotificationForm(value.Information))
765                        $('#notification-success-form').show()
766                    } else {
767                        //send KO
768                        $('#notification-error-form span').html(GetMessageNotificationForm(value.Information))
769                        $('#notification-error-form').css('visibility', 'visible')
770                    }
771                },
772                function (value) {
773                    //promise failed
774                    //manage error
775                    $('#contact-form').removeClass('loading')
776                    $('#notification-error-form span').html(GetMessageNotificationForm('send_system_off'))
777                    $('#notification-error-form').css('visibility', 'visible')
778                }
779            )
780        } else {
781            $('#notification-error-form span').html(resultValidation.message)
782            $('#notification-error-form').css('visibility', 'visible')
783        }
784        return false
785    })
786
787    //! DESCRIPTION COLLAPSE
788    const collapseDesc = $('.card-description .desc.desc-collapse')
789
790    if (collapseDesc.length > 0) {
791        collapseDesc.each((i, item) => {
792            $(item)
793                .parent()
794                .find('.btn-read')
795                .on('click', () => {
796                    $(item).toggleClass('open')
797                    if ($(item).hasClass('open')) {
798                        $(item).css('max-height', $(item).children().height() + 6)
799                    } else {
800                        $(item).css('max-height', '')
801                    }
802                })
803        })
804    }
805
806    addEventScrollWithHeader('.more-content-icon')
807
808    addEventScrollWithHeader('.back-to-svg-container')
809
810    if ($('#hallAndSpace').length > 0) {
811        function showBtn() {
812            $('.back-to-svg-container').toggleClass('show', window.scrollY > 1120)
813        }
814        //? CHECK AL READY
815        showBtn()
816
817        //? TOGGLECLASS ALLO SCROLL
818        $(window).on('scroll', () => {
819            showBtn()
820        })
821    }
822})

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.