1$j(document).on("_page_ready",function(){transferHandler.init()});const transferHandler={baseReportCard:"",$transferForm:null,$departureDatePicker:null,$returnDatePicker:null,locale:{},init(){const myself=this;this.$transferForm=$j('form[name="transfer_form"]');this.$departureDatePicker=$j("#transfer_form_departureDate_datePicker");this.$returnDatePicker=$j("#transfer_form_returnDate_datePicker");this.initDatePickers();this.initBookButton();this.$transferForm.find(".checkradio").on("change",function(){myself.checkForm()});this.checkForm();this.disableBookButtonStatus();this.initLocale();this.checkNoteHeight();this.submitFormIfJustOnePickUpDestination()},initLocale(){this.locale.selectedTransfer=$j("#localeSelectedTransfer").val();this.locale.selectedTransfers=$j("#localeSelectedTransfers").val()},loadBaseHtmlReport(cardReport){this.baseReportCard=cardReport},initBookButton(){const myself=this;$j(window).scroll(function(){myself.updateScrollButtonStatus()});$j(window).resize(function(){myself.updateScrollButtonStatus()});$j(".mainContainer").scroll(function(){myself.updateScrollButtonStatus()})},initDatePickers(){const myself=this;this.$departureDatePicker.change(function(){const departurePicker=$j(this).data("daterangepicker");if(departurePicker){const returnPicker=myself.$returnDatePicker.data("daterangepicker");returnPicker.minDate=departurePicker.startDate;if(departurePicker.startDate>returnPicker.startDate){returnPicker.setStartDate(departurePicker.startDate);const dateISO=departurePicker.startDate.format(dateHelper.FORMAT_ISO);myself.$returnDatePicker.closest(".checkInOut").find(".dateRangePickerInputISO").val(dateISO)}}});this.$returnDatePicker.change(function(){const picker=$j(this).data("daterangepicker");if(picker){myself.$departureDatePicker.data("daterangepicker").maxDate=picker.startDate}})},checkForm(){const $target=this.$returnDatePicker.closest(".checkInOut").closest(".group");const checkedValue=this.$transferForm.find('input[name="transfer_form[ar]"]:checked').val();if(parseInt(checkedValue,10)){const pickerReturn=this.$returnDatePicker.data("daterangepicker");if(pickerReturn){this.$departureDatePicker.data("daterangepicker").maxDate=pickerReturn.startDate} 2$target.show(300)}else{if(this.$departureDatePicker.data("daterangepicker")){this.$departureDatePicker.data("daterangepicker").maxDate=!1} 3$target.hide(300)}},toggleChoice(element){const $selected=$j(element).closest(".containerTicket");const $listElementsContainer=$j(element).closest(".blockTrsGroup").find(".containerTicket");const yetActive=$selected.hasClass("active");$listElementsContainer.each(function(){$j(this).removeClass("active")});if(!yetActive){$selected.addClass("active")} 4const $activeBlocks=$selected.closest(".blockTrsGeneral").find(".active");const cartTransfer=[];let totalCurrency="";$activeBlocks.each(function(){const $labelPriceElem=$j(this).find(".labelTotalPrice");totalCurrency=$labelPriceElem.attr("data-currency");const price=parseFloat($labelPriceElem.attr("data-price"));const $labelDescriptionTrsElem=$j(this).find(".labelDescriptionTrs");const description=$labelDescriptionTrsElem.text().trim();const $labelStartHourTrsElem=$j(this).find(".labelStartHourTrsElem");const hour=$labelStartHourTrsElem.text().trim();cartTransfer.push({price,description,hour,})});const $reportBlock=$selected.closest(".listTransferRow").find(".reportBlock");this.generateReport(cartTransfer,$reportBlock,totalCurrency);this.disableBookButtonStatus(!$activeBlocks.length)},disableBookButtonStatus(isDisabled=!0){$j('.addToCartAction[data-type="transfer"]').toggleClass("disabled",isDisabled)},generateReport(data,$element,currency){const myself=this;const $trsBlockReport=$element.find(".trsBlockReport");const language=$trsBlockReport.attr("data-lang");$trsBlockReport.empty();if(data.length){const $ret=$trsBlockReport.append(myself.baseReportCard);const $description=$ret.find(".descriptionTrs");const localeText=this.locale[data.length>1?"selectedTransfer":"selectedTransfers"];$description.text(localeText.replace("{{nTransfer}}",data.length))}},generateOldReport($trsBlockReport,item){const $ret=$trsBlockReport.append(this.baseReportCard);const $description=$ret.find(".descriptionTrs");$description.eq($description.length-1).text(item.description);const $hour=$ret.find(".hourTrs");$hour.eq($hour.length-1).text(item.hour);const $price=$ret.find(".labelPriceVal");const valueIntlPrice=new Intl.NumberFormat(language,{style:"currency",currency,});$price.eq($price.length-1).text(valueIntlPrice.format(item.price))},updateScrollButtonStatus(){const $mainContainer=$j(".mainContainer");const mainContainerHeight=$mainContainer.length&&$mainContainer.scrollTop()>=$mainContainer.children(".container-fluid").height()-$mainContainer.height();const windowBottomControl=$j(window).scrollTop()+$j(window).height()>=($j(".unfixedCartButtonContainer").length?$j(".unfixedCartButtonContainer").offset().top:0);const aboveOffset=$j(".aboveCartAction").length?$j(".aboveCartAction").offset().top:0;const topControl=(!$mainContainer.length||$j(".mainContainer").scrollTop()<aboveOffset)&&$j(window).scrollTop()<aboveOffset;$j(".fixedCartButtonContainer").toggleClass("unFixed",mainContainerHeight||windowBottomControl||topControl)},checkNoteHeight(){const $note=$j(".containerNoteTicket td .noteTicket");const $showMoreBtn=$j(".containerNoteTicket .showMore");
4$note.each(function(index){if(this.scrollHeight>this.clientHeight){$showMoreBtn[index].style.display="block"}})},submitFormIfJustOnePickUpDestination(){const $pickUp=$j("#transfer_form_pickUp_destinations");let dataSource=$pickUp.data("source");if(dataSource&&dataSource.length===1){const description=dataSource[0].description;$pickUp.val(description);$pickUp.attr("data-selected",description);$j("#transfer_form_pickUp_destinationsTarget").val(dataSource[0].value);$pickUp.trigger("change");if($j(".singleBlockTransfer").length===0){this.$transferForm.submit()}}},}
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.