1"use strict";(self.webpackChunksavaari=self.webpackChunksavaari||[]).push([[643],{3735:(_t,We,F)=>{F.d(We,{f:()=>t});var r=F(2340);class t{static filterArrayForLocality(k,X){k=k.toLowerCase();const le=X.filter(_e=>{try{return new RegExp("^"+k,"gi").test(_e.subarea.toLowerCase())}catch(Te){return[]}}).sort((_e,Te)=>{const U=_e.subarea.toLowerCase(),H=Te.subarea.toLowerCase();return U.indexOf(k)-H.indexOf(k)}).slice(0,10);return 0===le.length?X.slice(0,10):le.slice(0,10)}static hasOrderedDuplicates(k){let X=[];if(k&&k.length>1)for(var le=1;le<k.length;le++)console.log(k[le]),console.log(k[le-1]),k[le]==k[le-1]&&X.push(k[le]);return X.length>0}static removeDuplicateOfPopulate(k,X){return X.filter(()=>{}),k}static getCityNameByCityId(k,X){let le="";return X.filter(_e=>{_e.cityId===parseInt(k)&&(le=_e.cityName)}),le}}t.metroCityList=r.$x.topSourceCities,t.destinationMetroCityList=r.$x.topDestinationCities},2335:(_t,We,F)=>{F.d(We,{j:()=>se});var r=F(5861),t=F(5e3),e=F(3539),k=F(4182),X=F(4277),le=F(2169),_e=F(4406),Te=F(7488),U=F(1188),H=F(6161),Ee=F(5591),xe=F(9808),Je=F(1233);function M(re,G){1&re&&t._UZ(0,"i",11)}function q(re,G){if(1&re&&(t.TgZ(0,"div",9),t.YNc(1,M,1,0,"i",10),t.qZA()),2&re){const m=t.oxw();
1t.xp6(1),t.Q6J("ngIf",!m.ispopulate)}}const te=function(re,G){return{"form-control":!0,"border-left-0":re,"pickup-new__input":G}};function ee(re,G){if(1&re){const m=t.EpF();t.TgZ(0,"input",12),t.NdJ("ngModelChange",function(f){return t.CHM(m),t.oxw().locationInput=f})("focus",function(f){return t.CHM(m),t.oxw().searchinputClickCallback(f)})("blur",function(){return t.CHM(m),t.oxw().validateFromCityOnBlur()})("click",function(f){return t.CHM(m),t.oxw().searchinputClickCallback(f)})("keyup",function(f){return t.CHM(m),t.oxw().searchinputCallback(f)}),t.qZA()}if(2&re){const m=t.oxw();t.Q6J("ngClass",t.WLB(3,te,!m.bookingPageInput,m.bookingPageInput))("ngModel",m.locationInput)("placeholder",m.newVariant?" ":m.settings.inputPlaceholderText)}}function $(re,G){1&re&&(t.TgZ(0,"label"),t._uU(1," Pickup Location "),t.qZA())}function Ce(re,G){if(1&re){const m=t.EpF();t.TgZ(0,"div",13),t.NdJ("click",function(){return t.CHM(m),t.oxw().routeBack()}),t._UZ(1,"div",14),t.qZA()}}function Ie(re,G){if(1&re){const m=t.EpF();t.TgZ(0,"input",15),t.NdJ("ngModelChange",function(f){return t.CHM(m),t.oxw().locationInput=f})("focus",function(f){return t.CHM(m),t.oxw().searchinputClickCallback(f)})("click",function(f){return t.CHM(m),t.oxw().searchinputClickCallback(f)})("keyup",function(f){return t.CHM(m),t.oxw().searchinputCallback(f)})("contextmenu",function(f){return f.preventDefault()}),t.qZA()}if(2&re){const m=t.oxw();t.s9C("placeholder",m.settings.inputPlaceholderText),t.Q6J("ngModel",m.locationInput)}}function Fe(re,G){1&re&&(t.TgZ(0,"pre",16),t._UZ(1,"i",17),t.qZA())}function ie(re,G){1&re&&(t.TgZ(0,"li",22)(1,"span"),t._uU(2,"Recent Searches"),t.qZA(),t._UZ(3,"span",23),t.qZA())}function ye(re,G){if(1&re){const m=t.EpF();t.TgZ(0,"li")(1,"a",24),t.NdJ("mouseover",function(){const f=t.CHM(m),b=f.$implicit,I=f.index,J=t.oxw(2);return!b.disabled&&J.activeListNode(I,"recent")})("click",function(){const f=t.CHM(m),b=f.$implicit,I=f.index,J=t.oxw(2);return!b.disabled&&J.selectedListNode(I)}),t.TgZ(2,"span",25),t._uU(3),t.qZA(),t.TgZ(4,"span",26),t._uU(5),t.qZA()()()}if(2&re){const m=G.$implicit;t.ekj("active",m.active&&!m.isEmptyMessage)("disabled",m.disabled),t.xp6(3),t.hij(" ",null!=m.structured_formatting&&m.structured_formatting.main_text?m.structured_formatting.main_text:m.name," "),t.xp6(2),t.Oqu(null!=m.structured_formatting&&m.structured_formatting.secondary_text?m.structured_formatting.secondary_text:m.description)}}function ve(re,G){1&re&&(t.TgZ(0,"li",22)(1,"span"),t._uU(2,"Popular Cities"),t.qZA(),t._UZ(3,"span",27),t.qZA())}function Se(re,G){if(1&re){const m=t.EpF();t.TgZ(0,"li")(1,"a",24),t.NdJ("mouseover",function(){const b=t.CHM(m).index;return t.oxw(2).activeListNode(b,"popular")})("click",function(){const b=t.CHM(m).$implicit;return t.oxw(2).selectFromTopCities(b)}),t.TgZ(2,"span",25),t._uU(3),t.qZA()()()}if(2&re){const m=G.$implicit;t.ekj("active",m.active),t.xp6(3),t.Oqu(m.cityName)}}function De(re,G){if(1&re&&(t.TgZ(0,"ul",18),t.YNc(1,ie,4,0,"li",19),t.YNc(2,ye,6,6,"li",20),t.YNc(3,ve,4,0,"li",19),t.YNc(4,Se,4,3,"li",21),t.qZA()),2&re){const m=t.oxw();
1t.xp6(1),t.Q6J("ngIf",m.recentDropdownOpen&&(m.settings.showCurrentLocation||m.queryItems.length)),t.xp6(1),t.Q6J("ngForOf",m.queryItems),t.xp6(1),t.Q6J("ngIf",m.recentDropdownOpen&&m.topSourceCitiesList.length),t.xp6(1),t.Q6J("ngForOf",m.topSourceCitiesList)}}function ge(re,G){if(1&re&&(t.TgZ(0,"div",28),t._uU(1),t.qZA()),2&re){const m=t.oxw();t.xp6(1),t.Oqu(m.settingsErrorMsg)}}const Oe=function(re,G,m,p){return{"input-group":!0,"button-included":re,"borderless-input":G,"input-with-icon":m,"float-field":p}};let se=(()=>{class re{constructor(m,p,f,b,I,J,V,Z,K,ce){this._elmRef=m,this._global=p,this._autoCompleteSearchService=f,this.bookingService=b,this.router=I,this.populateService=J,this.localStorage=V,this.cd=Z,this.outstation=K,this.local=ce,this.newVariant=!1,this.floatingLabel="",this.hideDropdown=!1,this.componentCallback=new t.vpe,this.suggestionsChanged=new t.vpe,this.ispopulate=!1,this.locationInput="",this.gettingCurrentLocationFlag=!1,this.dropdownOpen=!1,this.recentDropdownOpen=!1,this.queryItems=[],this.isSettingsError=!1,this.settingsErrorMsg="",this.moduleinit=!1,this.selectedDataIndex=-1,this.selectedPopularDataIndex=-1,this.lastAutocompleteQuery="",this.bookingPageInput=!1,this.userSelectedOption="",this.defaultSettings={geoPredictionServerUrl:"",geoLatLangServiceUrl:"",geoLocDetailServerUrl:"",geoCountryRestriction:[],geoTypes:[],geoLocation:[],geoRadius:0,serverResponseListHierarchy:[],serverResponseatLangHierarchy:[],serverResponseDetailHierarchy:[],resOnSearchButtonClickOnly:!1,useGoogleGeoApi:!0,inputPlaceholderText:"Enter Area Name",inputString:"",showSearchButton:!0,showRecentSearch:!0,showCurrentLocation:!0,recentStorageName:"recent_fromCity_searches",noOfRecentSearchSave:5,currentLocIconUrl:"",searchIconUrl:"",locationIconUrl:"",sessionTokenString:""},this.tripType="",this.topSourceCitiesList=[],this.shouldShowTopSourceCityList=!1,this.onChange=()=>{},this.onTouched=()=>{},this.mobileMode=!1,this.dropdownFlag=!0}get showBackArrow(){const m=this.populateService.getEntryType();return!this.hideDropdown&&("fromcity"===m?this.ispopulate:this.ispopulate&&["locality","airportLocality"].includes(m))}writeValue(m){this.locationInput=m||""}registerOnChange(m){this.onChange=m}registerOnTouched(m){this.onTouched=m}ngAfterViewInit(){}refreshSessionToken(){const m=this._autoCompleteSearchService.generateWrapperToken();return this.settings.sessionTokenString=m,setTimeout(()=>{this.refreshSessionToken()},18e4),m}ngOnInit(){var m=this;return(0,r.Z)(function*(){m.bookingPageInput=!!m.router.url.includes("booking"),m.ispopulate=!!/populate/i.test(m.router.url),m.moduleinit||m.moduleInit(),m.tripType||(m.tripType=m.bookingService.getTripType()),m.settings.showRecentSearch=!0})()}ngOnChanges(){this.moduleinit=!0,this.moduleInit()}focusInput(){setTimeout(()=>{const m=document.getElementById("pickupInput");this.localStorage.checkPlatform()&&window.innerWidth<=710&&(this.mobileMode=!0),m&&!this.locationInput&&!this.mobileMode&&(m.focus(),this.getTopSourceCity())},500)}getTopSourceCity(){var m=this;return(0,r.Z)(function*(){try{if(m.tripType=m.bookingService.getTripType(),"airport"==m.tripType)m.topSourceCitiesList=[];else{const p=yield m.bookingService.getTopSourceCities();m.topSourceCitiesList=Array.isArray(p)?p:[],m.shouldShowTopSourceCityList=!0}}catch(p){m.topSourceCitiesList=[]}})()}onFocus(){this.locationInput||setTimeout(()=>{this.shouldShowTopSourceCityList=!0},0)}onBlur(){setTimeout(()=>{this.shouldShowTopSourceCityList=!1},0)}selectFromTopCities(m){this.bookingService.setInvalidSourceFlag(!1),this.bookingService.setInvalidLocalFlag(!1),this.shouldShowTopSourceCityList=!1,this.dropdownOpen=!1,this.locationInput=m.cityName;let p={city_name:this.locationInput,select_type:"Click"};setTimeout(()=>{this.localStorage.save_CT_data("select_from_city",p)},2e3),this.localStorage.removeItem("custLocalityDetails"),this.localStorage.setItem("custPopularLocalityDetails",JSON.stringify(m)),this.localStorage.removeItem("nearestCityFlag"),this.componentCallback.emit(m);const f=Object.assign(Object.assign({structured_formatting:{main_text:m.cityName,secondary_text:m.stateName||""}},m),{name:m.cityName,description:m.cityName,place_id:"city:"+m.cityId,formatted_address:m.formattedAddress||m.cityName});this.settings.showRecentSearch&&(this._autoCompleteSearchService.addRecentList(this.settings.recentStorageName,f,this.settings.noOfRecentSearchSave),this.getRecentLocations())}validateFromCityOnBlur(){let m=this.bookingService.getSelectedSourceCity(),p=JSON.parse(this.localStorage.getItem("custLocalityDetails")||"{}"),f=JSON.parse(this.localStorage.getItem("cachedSourceCity")||"{}"),b=JSON.parse(this.localStorage.getItem("custPopularLocalityDetails")||"{}");
1if(!m&&null!=m&&(p||b)&&"airport"!=this.bookingService.getTripType())return this.locationInput=(null==p?void 0:p.custShortAddress)?null==p?void 0:p.custShortAddress:b.cityName,this.bookingService.setSelectedSourceCity((null==p?void 0:p.custShortAddress)?f:b),this.outstation.validateValidSource(!1),void this.bookingService.setInvalidSourceFlag(!1);"outstation"==this.bookingService.getTripType()&&(this.dropdownFlag?this.dropdownFlag&&this.outstation.validateValidSource(!0):this.bookingService.setInvalidSourceFlag(!0)),("local"==this.bookingService.getTripType()||"airport"==this.bookingService.getTripType())&&(this.dropdownFlag?this.dropdownFlag&&this.local.validateValidSource(!0):this.bookingService.setInvalidLocalFlag(!0)),setTimeout(()=>{if(m=this.bookingService.getSelectedSourceCity(),!m&&!this.settings.inputString){let I={page_url:"",user_input:"",trip_type:this.bookingService.getSubTripType()?this.bookingService.getSubTripType():this.bookingService.getTripType(),error:""};I.page_url=window.location.pathname,I.user_input=this.locationInput,I.error="Please enter a valid Pickup location",this.localStorage.save_CT_data("from_city_error",I),this.localStorage.save_analytics_data("from-city-error",I)}},2e3)}searchinputClickCallback(m){m.target.select(),(!this.settings.sessionTokenString||"string"==typeof this.settings.sessionTokenString)&&(this.settings.sessionTokenString=this.refreshSessionToken()),this.searchinputCallback(m)}searchinputCallback(m){if(this.localStorage.checkPlatform()&&window.innerWidth<=710&&(this.mobileMode=!0),this.get
1SelectedCityName()&&!this.mobileMode&&!this.bookingPageInput){this.bookingService.setSelectedSourceCity(""),this.locationInput="";const b=document.getElementById("pickupInput");setTimeout(()=>{b&&b.focus()},0)}const p=this.populateService.getEntryType();this.settings.showRecentSearch=!0,(this.bookingPageInput||"locality"===p)&&(this.settings.recentStorageName=this.getSelectedCityName()+"-RecentSearches");let f=this.locationInput;console.log(f),console.log(m),40===m.keyCode||38===m.keyCode||13===m.keyCode?this.navigateInList(m.keyCode):f?this.getListQuery(f):(this.queryItems=[],this.suggestionsChanged.emit([]),this.userSelectedOption&&this.userQuerySubmit("false"),this.userSelectedOption="",this.settings.showRecentSearch?this.showRecentSearch():(this.dropdownOpen=!1,this.shouldShowTopSourceCityList=!1))}activeListNode(m,p){if("recent"===p)for(let f=0;f<this.queryItems.length;f++)m===f?(this.queryItems[f].active=!0,this.selectedDataIndex=m):this.queryItems[f].active=!1;else if("popular"===p)for(let f=0;f<this.topSourceCitiesList.length;f++)m===f?(this.topSourceCitiesList[f].active=!0,this.selectedPopularDataIndex=m):this.topSourceCitiesList[f].active=!1}isSyntheticPlaceId(m){return!m||m.startsWith("city:")||m.startsWith("latlng:")||m.startsWith("addr:")||m.startsWith("unknown:")}buildPlaceLikeFromItem(m){var p,f,b,I,J,V;const Z=(null===(p=null==m?void 0:m.structured_formatting)||void 0===p?void 0:p.main_text)||(null==m?void 0:m.name)||"",K=(null===(f=null==m?void 0:m.structured_formatting)||void 0===f?void 0:f.secondary_text)||"",ce=[];Z&&ce.push({long_name:Z,short_name:Z,types:["locality"]}),K&&ce.push({long_name:K,short_name:K,types:["administrative_area_level_1"]});const pe=null!==(I=null===(b=null==m?void 0:m.meta)||void 0===b?void 0:b.lat)&&void 0!==I?I:void 0,be=null!==(V=null===(J=null==m?void 0:m.meta)||void 0===J?void 0:J.lng)&&void 0!==V?V:void 0;return{place_id:(null==m?void 0:m.place_id)||"",formatted_address:(null==m?void 0:m.description)||"",name:Z,address_components:ce,geometry:null!=pe&&null!=be?{location:{lat:pe,lng:be}}:void 0,_fallback:!0}}selectedListNode(m){this.dropdownOpen=!1,this.shouldShowTopSourceCityList=!1;const p=this.queryItems[m];this._autoCompleteSearchService.logFunnelStep("details_selected",this.settings.sessionTokenString,{place_id:null==p?void 0:p.place_id,context:"pickup"}),this.recentDropdownOpen?(null==p?void 0:p.cityId)?this.selectFromTopCities(p):this.validateSelectedAddress(p).then(f=>{f&&this.setRecentLocation(p)}):this.getPlaceLocationInfo(p)}closeAutocomplete(m){this._elmRef.nativeElement.contains(m.target)||(this.selectedDataIndex=-1,this.dropdownOpen=!1,this.shouldShowTopSourceCityList=!1)}userQuerySubmit(m){this.componentCallback.emit(!("false"===m||!this.userSelectedOption)&&this.userSelectedOption)}moduleInit(){this.settings=this.setUserSettings(),this.settings.geoRadius&&2!==this.settings.geoLocation.length&&(this.isSettingsError=!0,this.settingsErrorMsg=this.settingsErrorMsg+'Radius should be used with GeoLocation. Please use "geoLocation" key to set lat and lng. '),2===this.settings.geoLocation.length&&!this.settings.geoRadius&&(this.settings.geoRadius=2e7),this.settings.showRecentSearch&&this.getRecentLocations(),this.settings.useGoogleGeoApi||(this.settings.geoPredictionServerUrl||(this.isSettingsError=!0,this.settingsErrorMsg=this.settingsErrorMsg+'Prediction custom server url is not defined. Please use "geoPredictionServerUrl" key to set. '),this.settings.geoLatLangServiceUrl||(this.isSettingsError=!0,this.settingsErrorMsg=this.settingsErrorMsg+'Latitude and longitude custom server url is not defined. Please use "geoLatLangServiceUrl" key to set. '),this.settings.geoLocDetailServerUrl||(this.isSettingsError=!0,this.settingsErrorMsg=this.settingsErrorMsg+'Location detail custom server url is not defined. Please use "geoLocDetailServerUrl" key to set. ')),this.locationInput=this.settings.inputString}processSearchQuery(){this.queryItems.length&&this.selectedListNode(this.selectedDataIndex>-1?this.selectedDataIndex:0)}setUserSettings(){let m={};if(this.userSettings&&"object"==typeof this.userSettings){let p=Object.keys(this.defaultSettings);for(let f of p)m[f]=void 0!==this.userSettings[f]?this.userSettings[f]:this.defaultSettings[f];return m}return this.defaultSettings}resolveDirection(){const m=this.populateService.getEntryType();return["tocity","stopcity","dropLocality"].includes(m)?"to":"from"}getListQuery(m){let p=(m||"").trim();p=p.normalize("NFC").replace(/[\u2018\u2019\u201A\u201B]/g,"'"),p=p.replace(/'/g,""),p=p.replace(/[^\p{L}\p{M}0-9\s,.&-]/gu," "),p=p.replace(/[-.]{2,}/g,V=>V[0]),p=p.replace(/\s+/g," ").trim();const f=this.populateService.getEntryType();if((this.bookingPageInput||"locality"===f)&&p){let V="";const Z=this.bookingService.getSelectedSourceCity();"oneWay"===this.bookingService.getSubTripType()&&145===(null==Z?void 0:Z.cityId)||(V=this.getSelectedCityName()),"airport"===this.bookingService.getTr
1ipType()&&(V=""),V&&p.toLowerCase().indexOf(V.toLowerCase())<0&&(p=`${V} ${p}`)}if(this.shouldShowTopSourceCityList=!0,console.log("autocomplete query:",p),this.recentDropdownOpen=!1,this.topSourceCitiesList=[],(!p||p.length<3)&&"airport"!==this.bookingService.getTripType())return void this.showSourceCitiesFallback(p);const b=this.bookingService.getSelectedSourceCity()||JSON.parse(this.localStorage.getItem("selectedSourceCity")||"null"),I=this.resolveDirection();this.lastAutocompleteQuery=p;const J={query:p,countryRestriction:this.settings.geoCountryRestriction,geoTypes:this.settings.geoTypes,requestType:I,useWrappedApi:!0,selectedCity:(null==b?void 0:b.cityName)||"",sessionToken:this.settings.sessionTokenString};2===this.settings.geoLocation.length&&(J.geoLocation=this.settings.geoLocation,J.radius=this.settings.geoRadius),this._autoCompleteSearchService.getGeoPrediction(J).then(V=>{if(V&&!1!==V&&Array.isArray(V)||"airport"===this.bookingService.getTripType())return 0===V.length?(this.queryItems=[{main_text:"No data found",secondary_text:"",description:"No data found",disabled:!0,isEmptyMessage:!0,active:!1}],this.suggestionsChanged.emit(this.queryItems),this.dropdownFlag=!0,void(this.shouldShowTopSourceCityList=!1)):(this.updateListItem(V),this.suggestionsChanged.emit(this.queryItems),this.dropdownFlag=!0,this.bookingService.setInvalidSourceFlag(!1),void this.bookingService.setInvalidLocalFlag(!1));this.showSourceCitiesFallback(p)}).catch(V=>{console.error("wrapped autocomplete error",V),this.showSourceCitiesFallback(p)})}showSourceCitiesFallback(m){const p=(m||"").trim().toLowerCase();this.bookingService.getSourceCities().then(f=>{Array.isArray(f)||(f=[]);let b=f;if(p.length>0)try{const I=new RegExp("^"+p,"i");b=f.filter(J=>I.test(J.cityName.toLowerCase()))}catch(I){b=f.filter(J=>J.cityName.toLowerCase().includes(p))}b=b.slice(0,10),this.queryItems=b.map(I=>{const J=I.cityName||"",K=I.cityOnly||J.split(",")[0]||J,ce=I.stateOnly||(J.includes(",")?J.split(",").slice(1).join(", ").trim():"");return Object.assign(Object.assign({},I),{cityId:I.cityId,cityName:J,description:J,active:!1,structured_formatting:{main_text:K,secondary_text:ce}})}),this.suggestionsChanged.emit(this.queryItems),this.dropdownFlag=this.queryItems.length>0,this.bookingService.setInvalidSourceFlag(!1),this.bookingService.setInvalidLocalFlag(!1),this.shouldShowTopSourceCityList=!0}).catch(f=>{console.error("getSourceCities fallback error",f),this.dropdownFlag=!1,this.suggestionsChanged.emit([]);const b={page_url:window.location.pathname,user_input:m||"",trip_type:this.bookingService.getSubTripType()||this.bookingService.getTripType(),error:"Please enter a valid Pickup location"};this.localStorage.save_CT_data("from_city_error",b),this.localStorage.save_analytics_data("from-city-error",b)})}extractServerList(m,p){if(m.length){let f=p;for(let b of m)f=f[b];return f}return p}updateListItem(m){this.queryItems=Array.isArray(m)?m:[],setTimeout(()=>{this.dropdownOpen=!0},0),this.queryItems.length>0&&this._autoCompleteSearchService.logFunnelStep("places_exposure",this.settings.sessionTokenString,{count:this.queryItems.length,context:"pickup"})}showRecentSearch(){var m=this;return(0,r.Z)(function*(){let p=m.populateService.getEntryType();m.recentDropdownOpen=!0,setTimeout(()=>{m.dropdownOpen=!0},0),!m.bookingPageInput&&"locality"!==p&&(yield m.getTopSourceCity()),m._autoCompleteSearchService.getRecentList(m.settings.recentStorageName).then(f=>{const b=Array.isArray(f)?f:[];m.queryItems=m.router.url.includes("populate")||"airport"==m.bookingService.getTripType()?b.filter(I=>I&&I.address_components):b})})()}navigateInList(m){let p=0;40===m?(this.selectedDataIndex>=0&&(p=this.selectedDataIndex+1<=this.queryItems.length-1?this.selectedDataIndex+1:0),this.activeListNode(p,"recent")):38===m?(p=this.selectedDataIndex>=0&&this.selectedDataIndex-1>=0?this.selectedDataIndex-1:this.queryItems.length-1,this.activeListNode(p,"recent")):this.processSearchQuery()}getPlaceLocationInfo(m){var p=this;return(0,r.Z)(function*(){var f,b,I,J,V,Z,K,ce;const pe=p.resolveDirection(),be=(null===(b=null===(f=p.settings)||void 0===f?void 0:f.sessionTokenString)||void 0===b?void 0:b.token)||(null===(V=null===(J=null===(I=p.settings)||void 0===I?void 0:I.sessionTokenString)||void 0===J?void 0:J.toString)||void 0===V?void 0:V.call(J))||String((null===(Z=p.settings)||void 0===Z?void 0:Z.sessionTokenString)||"");if(!p.settings.useGoogleGeoApi)return void p._autoCompleteSearchService.getPlaceDetails(p.settings.geoLocDetailServerUrl,m.place_id).then(Be=>{if(!Be)return;const Re=p.extractServerList(p.settings.serverResponseDetailHierarchy,Be);p.setRecentLocation(Re)});const Ye=(null==m?void 0:m.place_id)||"",je=p.isSyntheticPlaceId(Ye);try{let Be;if(Ye&&!je){const Ge=yield p._autoCompleteSearchService.getPlaceDetailsWrapped({place_id:Ye,request:pe,token:be,query:p.lastAutocompleteQuery||"",rsource:"Web"});
1Be="OK"===(null==Ge?void 0:Ge.status)?p._autoCompleteSearchService.mapWrapperToPlaceLike(Ge,pe,(null===(K=null==m?void 0:m.structured_formatting)||void 0===K?void 0:K.main_text)||(null==m?void 0:m.description)):{place_id:Ye,formatted_address:(null==m?void 0:m.description)||"",name:(null===(ce=null==m?void 0:m.structured_formatting)||void 0===ce?void 0:ce.main_text)||"",address_components:[]}}else Be=p.buildPlaceLikeFromItem(m);(yield p.validateSelectedAddress(Be))&&p.setRecentLocation(Be)}catch(Be){const Re=p.buildPlaceLikeFromItem(m);(yield p.validateSelectedAddress(Re))&&p.setRecentLocation(Re)}finally{p.settings.sessionTokenString=""}})()}setRecentLocation(m){const p=JSON.parse(JSON.stringify(m));p.description=p.description||p.formatted_address||p.name||"",p.active=!1,this.selectedDataIndex=-1,this.locationInput=p.description,this.settings.showRecentSearch&&(this._autoCompleteSearchService.addRecentList(this.settings.recentStorageName,p,this.settings.noOfRecentSearchSave),this.getRecentLocations()),this.userSelectedOption=p,this.settings.resOnSearchButtonClickOnly||this.componentCallback.emit(p)}getRecentSearchList(){var m=this;return(0,r.Z)(function*(){var p;const f=m.populateService.getEntryType();let b=(null===(p=m.settings)||void 0===p?void 0:p.recentStorageName)||m.defaultSettings.recentStorageName;(m.bookingPageInput||"locality"===f)&&(b=m.getSelectedCityName()+"-RecentSearches");const I=yield m._autoCompleteSearchService.getRecentList(b);return Array.isArray(I)?I:[]})()}getRecentLocations(){this._autoCompleteSearchService.getRecentList(this.settings.recentStorageName).then(m=>{})}getSelectedCityName(){let m="";console.log(this.bookingService.getSelectedSourceCity());const p=this.bookingService.getSelectedSourceCity();null!==p&&"object"==typeof p&&p.cityId>0&&(m=p.cityName.split(",")[0]);const f=localStorage.getItem("selectedSourceCity");return null!==f&&(m=JSON.parse(f).cityName),"Kochi/Cochin"==m&&(m="Cochin"),"Bhubaneshwar"==m&&(m="Bhubaneswar"),("New Delhi - T1 Terminal"==m||"New Delhi - T2 Terminal"==m||"New Delhi - T3 Terminal"==m)&&(m="New Delhi"),("Mumbai, Maharashtra - Domestic T1"==m||"Mumbai, Maharashtra - International T2"==m)&&(m="Mumbai"),null!=p&&void 0!==p.org&&""!=p.org&&(m=p.org),m}routeBack(){window.history.back()}validateSelectedAddress(m){var p=this;return(0,r.Z)(function*(){let f="",b="";p.isSettingsError=!1,p.settingsErrorMsg="",console.log(m),p.localStorage.removeItem("user_city_name"),p.localStorage.removeItem("user_state_name");for(const Z of m.address_components)switch(Z.types[0]){case"locality":f=Z.long_name,p.localStorage.setItem("user_city_name",f),console.log(Z.long_name);break;case"administrative_area_level_1":b=Z.long_name,p.localStorage.setItem("user_state_name",b),console.log(Z.long_name)}if(""==p.localStorage.getItem("user_city_name")||null==p.localStorage.getItem("user_city_name"))for(const Z of m.address_components)"administrative_area_level_3"===Z.types[0]&&(f=Z.long_name,p.localStorage.setItem("user_city_name",f),console.log(Z.long_name));if(""==p.localStorage.getItem("user_city_name")||null==p.localStorage.getItem("user_city_name"))for(const Z of m.address_components)"administrative_area_level_2"===Z.types[0]&&(f=Z.long_name.split(" ")[0],p.localStorage.setItem("user_city_name",f),console.log(Z.long_name));if(""==p.localStorage.getItem("user_city_name")||null==p.localStorage.getItem("user_city_name"))for(const Z of m.address_components)"political"===Z.types[0]&&(f=Z.long_name.split(" ")[0],p.localStorage.setItem("user_city_name",f),console.log(Z.long_name));let I=p.bookingService.getSelectedSourceCity();if(console.log(I),null==I||"undefined"==I)return!0;let J=m.name+", "+m.formatted_address;return console.log(m),console.log(J),console.log(!0),!0})()}}return re.\u0275fac=function(m){return new(m||re)(t.Y36(t.SBq),t.Y36(X.D),t.Y36(e.y),t.Y36(le.L),t.Y36(_e.F0),t.Y36(Te.T),t.Y36(U.V),t.Y36(t.sBO),t.Y36(H.K,9),t.Y36(Ee.q,9))},re.\u0275cmp=t.Xpm({type:re,selectors:[["ng4geo-autocomplete"]],hostBindings:function(m,p){1&m&&t.NdJ("click",function(b){return p.closeAutocomplete(b)},!1,t.evT)},inputs:{userSettings:"userSettings",newVariant:"newVariant",floatingLabel:"floatingLabel",hideDropdown:"hideDropdown"},outputs:{componentCallback:"componentCallback",suggestionsChanged:"suggestionsChanged"},features:[t._Bn([e.y,{provide:k.JU,useExisting:(0,t.Gpc)(()=>re),multi:!0}]),t.TTD],decls:11,vars:18,consts:[[3,"ngClass"],["class","input-group-prepend bg-transparent","style","height: 33px;",4,"ngIf"],["type","search","name","search","id","pickupInput","autocomplete","off","style","font-weight: 500;color:#000;",3,"ngClass","ngModel","placeholder","ngModelChange","focus","blur","click","keyup",4,"ngIf"],[4,"ngIf"],["class","input-group-prepend bg-transparent align-items-center",3,"click",4,"ngIf"],["class","form-control google_input border-left-0 input-field","style","height: 38px !important; user-select: none; -webkit-user-select: none;","type","search","name","search","id","search_places","autocomplete","off","appFocus","",3,"ngModel","placeholder","ngModelChange","focus","click","keyup","contextmenu",4,"ngIf"],["class","custom-autocomplete__loader",4,"ngIf"],["class","custom-autocomplete__dropdown",4,"ngIf"],["class","custom-autocomplete--error",4,"ngIf"],[1,"input-group-prepend","bg-transparent",2,"height","33px"],["class","icon bg-transparent pi pi-search px-1",4,"ngIf"],[1,"icon","bg-transparent","pi","pi-search","px-1"],["type","search","name","search","id","pickupInput","autocomplete","off",2,"font-weight","500","color","#000",3,"ngClass","ngModel","placeholder","ngModelChange","focus","blur","click","keyup"],[1,"input-group-prepend","bg-transparent","align-items-center",3,"click"],[1,"left-arrow-long","input-group-text","bg-transparent","border-0","p-0","mx-2"],["type","search","name","search","id","search_places","autocomplete","off","appFocus","",1,"form-control","google_input","border-left-0","input-field",2,"height","38px !important","user-select","none","-webkit-user-select","none",3,"ngModel","placeholder","ngModelChange","focus","click","keyup","contextmenu"],[1,"custom-autocomplete__loader"],[1,"gif"],[1,"custom-autocomplete__dropdown"],["class","heading heading-recent",4,"ngIf"],[3,"active","disabled",4,"ngFor","ngForOf"],[3,"active",4,"ngFor","ngForOf"],[1,"heading","heading-recent"],[1,"line","line-recent"],["href","javascript:;",3,"mouseover","click"],[1,"main-text"],[1,"secondary_text"],[1,"line","line-location"],[1,"custom-autocomplete--error"]],template:function(m,p){1&m&&(t.TgZ(0,"div")(1,"div")(2,"div",0),t.YNc(3,q,2,1,"div",1),t.YNc(4,ee,1,6,"input",2),t.YNc(5,$,2,0,"label",3),t.YNc(6,Ce,2,0,"div",4),t.YNc(7,Ie,1,2,"input",5),t.qZA(),t.YNc(8,Fe,2,0,"pre",6),t.qZA(),t.YNc(9,De,5,4,"ul",7),t.qZA(),t.YNc(10,ge,2,1,"div",8)),2&m&&(t.xp6(2),t.ekj("fx",p.newVariant)("active",!!p.locationInput),t.Q6J("ngClass",t.l5B(13,Oe,p.settings.showSearchButton,!p.ispopulate&&!p.bookingPageInput,!p.newVariant,p.newVariant)),t.xp6(1),t.Q6J("ngIf",!p.bookingPageInput),t.xp6(1),t.Q6J("ngIf",!p.ispopulate),t.xp6(1),t.Q6J("ngIf",p.newVariant),t.xp6(1),t.Q6J("ngIf",p.showBackArrow),t.xp6(1),t.Q6J("ngIf",p.ispopulate),t.xp6(1),t.Q6J("ngIf",p.gettingCurrentLocationFlag),t.xp6(1),t.Q6J("ngIf",(p.dropdownOpen||p.shouldShowTopSourceCityList)&&!p.hideDropdown),t.xp6(1),t.Q6J("ngIf",p.isSettingsError))},directives:[xe.mk,xe.O5,k.Fj,k.JJ,k.On,Je.R,xe.sg],styles:[".float-field[_ngcontent-%COMP%]{position:relative}.float-field.fx[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;height:50px!important;border-radius:10px;border:1px solid #E5E7EB;background:#F2F4F7;font-size:15px!important;color:#111827;padding:18px 12px 8px!important;transition:border-color .18s ease,background .18s ease,box-shadow .18s ease}.float-field.fx[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{border-color:#3b82f6;background:#EBF2FF;box-shadow:0 0 0 3px #3b82f626;outline:none}.float-field.fx[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{position:absolute;
1left:12px;top:50%;transform:translateY(-50%);font-weight:700;letter-spacing:.2px;color:#667085;pointer-events:none;transition:transform .18s ease,top .18s ease,font-size .18s ease,color .18s ease,padding .18s ease,background .18s ease;background:transparent;padding:0 2px}.float-field.fx.active[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .float-field.fx[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus + label[_ngcontent-%COMP%]{top:4px;transform:none;font-size:11px;color:#20a8d9;background:transparent;padding:0 1px;z-index:7}.float-field.fx.invalid[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border-color:#dc2626;box-shadow:0 0 0 3px #dc262614}li.disabled[_ngcontent-%COMP%]{font-weight:700;pointer-events:none}li.disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:default}.backarrow[_ngcontent-%COMP%]{background:white;position:absolute;z-index:9;height:35px;top:2px;border:0px;left:2px}.input-field[_ngcontent-%COMP%]:focus{outline:none;border-color:transparent;box-shadow:none}.input-field[_ngcontent-%COMP%]{border:none;border-bottom:1px solid rgba(0,0,0,.12)}.input-with-icon[_ngcontent-%COMP%]:focus-within .icon[_ngcontent-%COMP%]{border-bottom:1px solid #80bdff}.input-with-icon[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;align-items:center;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}input[_ngcontent-%COMP%]::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.custom-autocomplete[_ngcontent-%COMP%]{display:block;position:relative;width:100%;float:left}.pickup-new__input[_ngcontent-%COMP%]{border-radius:3px;border:1px solid #E5E7EB;background:#F2f2f2;font-size:14px;color:#000}.pickup-new__input[_ngcontent-%COMP%]:focus{border-color:#c4d3f7;background:white;box-shadow:0 0 0 3px #789bff40;outline:none}.custom-autocomplete[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .custom-autocomplete[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.custom-autocomplete--error[_ngcontent-%COMP%]{color:#dc3545;font-size:10px!important}.custom-autocomplete__dropdown[_ngcontent-%COMP%]{position:absolute;background:#fff;margin:0;padding:0;width:88%;list-style:none;border:.5px solid #909090;z-index:99;border-radius:9px;max-height:300px;overflow-y:auto;overflow-x:hidden;box-shadow:0 2px 5px #00000026}.icon[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12);align-content:center;
1color:#777f86}input[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}.custom-autocomplete__dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{float:left;width:100%;font-size:11px}.custom-autocomplete__dropdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:100%;color:#20a8d9;float:left;padding:8px 10px}.custom-autocomplete__dropdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{padding:13px 10px 7px 13px;text-transform:uppercase;letter-spacing:1px;font-size:13px;position:relative}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{border-top:1px solid #c2c2c2;width:calc(100% - 115px);display:inline-block;position:absolute;top:21px;left:100px}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .line-location[_ngcontent-%COMP%]{left:143px;top:16px;width:calc(100% - 153px)}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .line-recent[_ngcontent-%COMP%]{left:158px;top:16px;width:calc(100% - 168px)}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .heading-recent[_ngcontent-%COMP%]{padding-top:8px}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .custom-icon[_ngcontent-%COMP%]{width:16px;height:16px;background-size:cover;vertical-align:bottom;display:inline-block;margin-right:4px}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .main-text[_ngcontent-%COMP%]{padding-right:4px;font-weight:700;font-size:11px}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .secondary_text[_ngcontent-%COMP%]{font-size:11px;color:#909090}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .active[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{background-color:#f4f4f4}.custom-autocomplete__loader[_ngcontent-%COMP%]{position:absolute;top:0;width:100%;height:100%;text-align:center;background:white}.custom-autocomplete__container[_ngcontent-%COMP%], .custom-autocomplete__input[_ngcontent-%COMP%]{width:inherit;float:inherit;position:relative}.custom-autocomplete__input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin:0;padding:10px;height:50px;border:1px solid #ccc;display:block;width:100%;overflow:hidden;text-overflow:ellipsis;font-size:16px}.left-arrow-long[_ngcontent-%COMP%]{width:16px;height:10px;background:url(seo-icons.9a353167a675b6f9.svg) no-repeat;background-position:-60px -30px}.borderless-input[_ngcontent-%COMP%] > input[_ngcontent-%COMP%], .borderless-input[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{border-right:0;border-left:0;border-top:0;border-radius:0}.borderless-input[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{padding:4px!important}[_ngcontent-%COMP%]::-webkit-input-placeholder{font-size:11px;font-weight:500}input[type=text][_ngcontent-%COMP%]::-webkit-input-placeholder{color:#d8d8d4}[_ngcontent-%COMP%]::-moz-placeholder{font-size:11px;font-weight:500}[_ngcontent-%COMP%]:-ms-input-placeholder{font-size:11px}[_ngcontent-%COMP%]:-moz-placeholder{font-size:11px}.button-included[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-right:60px}"]}),re})()},3539:(_t,We,F)=>{F.d(We,{y:()=>Ee});var r=F(5861),t=F(5e3),e=F(9808),k=F(520),X=F(2340),le=F(4406),_e=F(4277);let Te=(()=>{class xe{setItem(M,q){localStorage.setItem(M,q)}getItem(M){return localStorage.getItem(M)}removeItem(M){localStorage.removeItem(M)}}return xe.\u0275fac=function(M){return new(M||xe)},xe.\u0275prov=t.Yz7({token:xe,factory:xe.\u0275fac,providedIn:"root"}),xe})();var U=F(2169),H=F(1188);let Ee=(()=>{class xe{constructor(M,q,te,ee,$,Ce,Ie,Fe){this._http=M,this.platformId=q,this.route=te,this.router=ee,this._global=$,this._localStorageService=Ce,this.bookingService=Ie,this.localStorage=Fe,this.WRAPPED_AUTOCOMPLETE_URL=X.$x.WRAPPED_AUTOCOMPLETE_URL,this.PLACE_DETAILS_URL=X.$x.PLACE_DETAILS_URL,this._predictDebouncers={}}cleanQuery(M){return M?M.replace(/,+/g,"").replace(/\s+/g," ").trim():""}debKeyFor(M){return(null==M?void 0:M.sessionToken)||"__global__"}base64urlEncode(M){return btoa(M).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}encodeQueryB64(M){if(!M)return M;const q=encodeURIComponent(M).replace(/%([0-9A-F]{2})/g,(te,ee)=>
1String.fromCharCode(parseInt(ee,16)));return btoa(q).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}detectQueryLang(M){if(!M)return"en-IN";const q=[[/[\u0900-\u097f]/,"hi-IN"],[/[\u0b80-\u0bff]/,"ta-IN"],[/[\u0c00-\u0c7f]/,"te-IN"],[/[\u0c80-\u0cff]/,"kn-IN"],[/[\u0d00-\u0d7f]/,"ml-IN"],[/[\u0980-\u09ff]/,"bn-IN"],[/[\u0a80-\u0aff]/,"gu-IN"],[/[\u0a00-\u0a7f]/,"pa-IN"],[/[\u0b00-\u0b7f]/,"or-IN"]];for(const[te,ee]of q)if(te.test(M))return ee;return"en-IN"}buildQueryPayload(M){const q=this.detectQueryLang(M);return{query:"en-IN"===q?M||"":this.encodeQueryB64(M),lang:q}}maybeEncodePlaceId(M){return M&&(M.startsWith("ChI")&&M.length>20&&M.length<80&&!/[+/=]/.test(M)&&!M.startsWith("Eic")?this.base64urlEncode(M):M)}getSessionId(){try{return this.localStorage.getCacheSessionId()||""}catch(M){return""}}getDeviceId(){try{return this._localStorageService.getItem("SavaariUserDeviceID")||""}catch(M){return""}}generateWrapperToken(M=28){const q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",te=new Uint8Array(M);return crypto.getRandomValues(te),Array.from(te).map(ee=>q[ee%q.length]).join("")}getPredictions(M,q){return new Promise(te=>{this._http.get(M+"?query="+q).subscribe(ee=>{te(ee||!1)})})}getPlaceDetailsWrapped(M){var q=this;return(0,r.Z)(function*(){const te=performance.now();let ee=!1;try{const{query:$,lang:Ce}=q.buildQueryPayload(M.query||""),Ie=(new k.LE).set("place_id",q.maybeEncodePlaceId(M.place_id)).set("request",M.request).set("token",M.token).set("query",$).set("lang",Ce).set("s_id",q.getSessionId()).set("ud_id",q.getDeviceId()).set("rsource",M.rsource||"Web"),Fe=yield q._http.get(q.PLACE_DETAILS_URL,{params:Ie}).toPromise();return ee="OK"===(null==Fe?void 0:Fe.status),Fe}catch($){throw $}finally{const $=performance.now()-te;q.logApiEvent({event_type:"details",latencyMs:$,success:ee,extra:{place_id:M.place_id,request:M.request},sessionToken:M.token})}})()}mapWrapperToPlaceLike(M,q,te){var ee;if(!M)return null;const $="from"===q?null==M?void 0:M.source_city_map_info:null==M?void 0:M.destination_city_map_info,Ce=[];Array.isArray(M.address_components)&&M.address_components.forEach(ge=>{!ge||Ce.push({long_name:ge.longText||ge.long_name||"",short_name:ge.shortText||ge.short_name||"",types:Array.isArray(ge.types)?ge.types:[]})});const Ie=Ce.some(ge=>{var Oe;return null===(Oe=ge.types)||void 0===Oe?void 0:Oe.includes("locality")}),Fe=Ce.some(ge=>{var Oe;return null===(Oe=ge.types)||void 0===Oe?void 0:Oe.includes("administrative_area_level_1")});$&&(!Ie&&$.is_city&&Ce.push({long_name:$.is_city,short_name:$.is_city,types:["locality","political"]}),!Fe&&$.State&&Ce.push({long_name:$.State,short_name:$.State,types:["administrative_area_level_1","political"]}));let ie=null,ye=null;if(M.location){const ge=Number(M.location.lat),Oe=Number(null!==(ee=M.location.long)&&void 0!==ee?ee:M.location.lng);!Number.isNaN(ge)&&!Number.isNaN(Oe)&&(ie=ge,ye=Oe)}(null==ie||null==ye)&&(null==$?void 0:$.city_lat)&&(null==$?void 0:$.city_lon)&&(ie=Number($.city_lat),ye=Number($.city_lon));const ve=null==ie||Number.isNaN(ie)||null==ye||Number.isNaN(ye)?void 0:{location:{lat:ie,lng:ye}};return{place_id:M.placeId||M.place_id||"",formatted_address:M.formattedAddress||M.address||"",name:te||M.place_name||M.addressLocality||(null==$?void 0:$.is_city)||"",address_components:Ce,geometry:ve,_cityMap:$,_wrapper:M}}getLatLngDetail(M,q,te){return new Promise(ee=>{this._http.get(M+"?lat="+q+"&lng="+te).subscribe($=>{ee($||!1)})})}getPlaceDetails(M,q){return new Promise(te=>{this._http.get(M+"?query="+q).subscribe(ee=>{te(ee||!1)})})}getGeoCurrentLocation(){return new Promise(M=>{if((0,e.NF)(this.platformId)){let q=this._global.nativeGlobal;q.navigator.geolocation?q.navigator.geolocation.getCurrentPosition(te=>{let ee={lat:parseFloat(te.coords.latitude+""),lng:parseFloat(te.coords.longitude+"")};M(ee)}):M(!1)}else M(!1)})}isPlaceShape(M){return M&&"object"==typeof M&&"place_id"in M}isFallbackCityShape(M){return M&&"object"==typeof M&&("city_id"in M||"latlng"in M)&&"address"in M}normalizeAutocompleteItems(M,q){var te,ee,$,Ce,Ie,Fe,ie,ye,ve,Se,De;if(!Array.isArray(M))return[];const ge=[];for(const se of M)if(this.isPlaceShape(se))ge.push({description:null!==(te=se.address)&&void 0!==te?te:`${null!==(ee=se.main_text)&&void 0!==ee?ee:""}${se.secondary_text?", "+se.secondary_text:""}`.trim(),place_id:se.place_id,structured_formatting:{main_text:null!==($=se.main_text)&&void 0!==$?$:"",secondary_text:null!==(Ce=se.secondary_text)&&void 0!==Ce?Ce:""},meta:{source:q||"wrapped"}}
1);else if(this.isFallbackCityShape(se)){const re=null!=se.city_id?`city:${se.city_id}`:se.latlng?`latlng:${String(se.latlng)}`:`addr:${encodeURIComponent(se.address)}`;let G,m;if("string"==typeof se.latlng&&se.latlng.includes(",")){const[p,f]=se.latlng.split(",");G=Number(p),m=Number(f)}ge.push({description:null!==(Ie=se.address)&&void 0!==Ie?Ie:`${null!==(Fe=se.main_text)&&void 0!==Fe?Fe:""}${se.secondary_text?", "+se.secondary_text:""}`.trim(),place_id:re,structured_formatting:{main_text:null!==(ie=se.main_text)&&void 0!==ie?ie:"",secondary_text:null!==(ye=se.secondary_text)&&void 0!==ye?ye:""},meta:{source:q||"fallback",city_id:null!==(ve=se.city_id)&&void 0!==ve?ve:null,distance:null!==(Se=se.distance)&&void 0!==Se?Se:null,latlng:null!==(De=se.latlng)&&void 0!==De?De:null,lat:G,lng:m}})}else ge.push({description:(null==se?void 0:se.address)||(null==se?void 0:se.description)||"",place_id:(null==se?void 0:se.place_id)||`unknown:${Math.random().toString(36).slice(2)}`,structured_formatting:{main_text:(null==se?void 0:se.main_text)||"",secondary_text:(null==se?void 0:se.secondary_text)||""},meta:{source:q||"unknown"}});const Oe=new Set;return ge.filter(se=>{const re=String(se.place_id||"");return!Oe.has(re)&&(Oe.add(re),!0)})}resolveLatLngForRequest(M){var q=this;return(0,r.Z)(function*(){var te;const ee="to"===M.requestType;let $=0,Ce=0,Ie=M.selectedCity||"";const Fe=ee?null:null===(te=q.bookingService.getSelectedSourceCity())||void 0===te?void 0:te.airportLatLong;if(Fe){const[ye,ve]=String(Fe).split(",");$=Number(ye)||0,Ce=Number(ve)||0}let ie;if(ee){const ye=q.bookingService.getSelectedDestinationCity(),ve=JSON.parse(q._localStorageService.getItem("selectedDestinationCity")||"[]");ie=Array.isArray(ye)&&ye.length?ye[ye.length-1]:Array.isArray(ve)&&ve.length?ve[ve.length-1]:null}else ie=q.bookingService.getSelectedSourceCity()||JSON.parse(q._localStorageService.getItem("selectedSourceCity")||"null");if((null==ie?void 0:ie.cityName)&&!Ie&&(Ie=ie.cityName),!$||!Ce){const ye=(null==ie?void 0:ie.ll)||(null==ie?void 0:ie.latLong)||(null==ie?void 0:ie.cityLatLong)||(null==ie?void 0:ie.latlng)||"";if(ye){const[ve,Se]=String(ye).split(","),De=Number(ve),ge=Number(Se);!isNaN(De)&&!isNaN(ge)&&($=De,Ce=ge)}else if((null==ie?void 0:ie.lat)&&(null==ie?void 0:ie.lng)){const ve=Number(ie.lat),Se=Number(ie.lng);!isNaN(ve)&&!isNaN(Se)&&($=ve,Ce=Se)}}if((!$||!Ce)&&Ie)try{const ye=ee?yield q.bookingService.getDestinationCities():yield q.bookingService.getSourceCities();if(Array.isArray(ye)){const ve=Ie.toLowerCase(),Se=ye.find(De=>{var ge,Oe;return(null===(ge=De.cityName)||void 0===ge?void 0:ge.toLowerCase())===ve||(null===(Oe=De.cityOnly)||void 0===Oe?void 0:Oe.toLowerCase())===ve})||ye.find(De=>"string"==typeof De.cityName&&De.cityName.toLowerCase().includes(ve));if(Se){const De=Se.ll||Se.latLong||Se.cityLatLong||Se.latlng||"";if(De){const[ge,Oe]=String(De).split(","),se=Number(ge),re=Number(Oe);!isNaN(se)&&!isNaN(re)&&($=se,Ce=re)}else if(Se.lat&&Se.lng){const ge=Number(Se.lat),Oe=Number(Se.lng);!isNaN(ge)&&!isNaN(Oe)&&($=ge,Ce=Oe)}}}}catch(ye){console.warn("resolveLatLngForRequest: city-list lookup failed",ye)}if((!$||!Ce)&&Array.isArray(M.geoLocation)&&2===M.geoLocation.length){const ye=Number(M.geoLocation[0]),ve=Number(M.geoLocation[1]);!isNaN(ye)&&!isNaN(ve)&&($=ye,Ce=ve)}return{lat:$,lng:Ce,city:Ie}})()}wrappedGeoPrediction(M){var q=this;return(0,r.Z)(function*(){let te="",ee="",$="";if(q.router.url.includes("booking")){const Se=yield q.resolveLatLngForRequest(M);te=String(Se.lat),ee=String(Se.lng),$=Se.city}const{query:Ce,lang:Ie}=q.buildQueryPayload(M.query||""),Fe=(new k.LE).set("query",Ce).set("lang",Ie).set("lat",String(te)).set("lng",String(ee)).set("city",$||"").set("request","to"===M.requestType?"to":"from").set("token",M.sessionToken||"").set("s_id",q.getSessionId()).set("ud_id",q.getDeviceId()).set("rsource","Web"),ie=yield q._http.get(q.WRAPPED_AUTOCOMPLETE_URL,{params:Fe}).toPromise(),ye=Array.isArray(ie)?ie:Array.isArray(null==ie?void 0:ie.response)?ie.response:[];return q.normalizeAutocompleteItems(ye,(null==ie?void 0:ie.source)||"wrapped")})()}getGeoPrediction(M){var q=this;return(0,r.Z)(function*(){return new Promise(function(){var te=(0,r.Z)(function*(ee){var $;if(!(0,e.NF)(q.platformId))return void ee(!1);const Ce=q.cleanQuery(null==M?void 0:M.query);if(M.selectedCity=q.cleanQuery(null==M?void 0:M.selectedCity),M.query=Ce,!Ce||Ce.length<xe.PREDICT_MIN_LEN)return void ee({__shortQuery:!0,items:[]});const Ie=q.debKeyFor(M);(null===($=q._predictDebouncers[Ie])||void 0===$?void 0:$.cancel)&&q._predictDebouncers[Ie].cancel();let Fe=!1;const ie=ve=>{Fe||(Fe=!0,ee(ve))},ye=setTimeout((0,r.Z)(function*(){const ve=performance.now();let Se=!1;try{const De=yield q.wrappedGeoPrediction(M);Se=!(!De||!Array.isArray(De));const ge=performance.now()-ve;return q.logApiEvent({event_type:"autocomplete",latencyMs:ge,success:Se,extra:{query:Ce,requestType:M.requestType},sessionToken:M.sessionToken.token||""}),void ie(De)}catch(De){console.error("getGeoPrediction error",De);const ge=performance.now()-ve;q.logApiEvent({event_type:"autocomplete",latencyMs:ge,success:!1,extra:{query:Ce,error:String(De)},sessionToken:M.sessionToken.token||""}),console.error("getGeoPrediction error",De),ie(!1)}finally{delete q._predictDebouncers[Ie]}}),xe.PREDICT_DEBOUNCE_MS);q._predictDebouncers[Ie]={timer:ye,cancel:()=>{clearTimeout(ye),ie({__canceled:!0})}}});return function(ee){return te.apply(this,arguments)}}())})()}addRecentList(M,q,te){this.getRecentList(M).then(ee=>{if(ee){for(let $=0;$<ee.length;$++)if(ee[$].place_id===q.place_id){ee.splice($,1);break}ee.unshift(q),ee.length>te&&ee.pop(),this._localStorageService.setItem(M,JSON.stringify(ee))}})}getRecentList(M){return new Promise(q=>{let te=this._localStorageService.getItem(M);te=te?JSON.parse(te):[],q(te.slice(0,2))})}getUniqueResults(M){return Array.from(M.reduce((q,te)=>q.set(te.place_id,te),new Map).values())}logApiEvent(M){const q={session_id:M.sessionToken,event_type:M.event_type,latency:Math.round(M.latencyMs),success:M.success?1:0,ts:(new Date).toISOString(),extra:M.extra||{}};try{this.localStorage.save_analytics_data("places_api_event",q)}catch(te){console.log("places_api_event log error",te,q)}}logFunnelStep(M,q,te){const ee={session_id:q,step:M,ts:(new Date).toISOString(),extra:te||{}};try{this.localStorage.save_analytics_data("places_funnel",ee)}catch($){console.log("places_funnel log error",$,ee)}}}return xe.PREDICT_MIN_LEN=3,xe.PREDICT_DEBOUNCE_MS=280,xe.\u0275fac=function(M){return new(M||xe)(t.LFG(k.eN),t.LFG(t.Lbi),t.LFG(le.gz),t.LFG(le.F0),t.LFG(_e.D),t.LFG(Te),t.LFG(U.L),t.LFG(H.V))},xe.\u0275prov=t.Yz7({token:xe,factory:xe.\u0275fac,providedIn:"root"}),xe})()},6929:(_t,We,F)=>{F.d(We,{N:()=>le});var r=F(9808),t=F(520),e=F(4182),k=F(4277),X=F(5e3);let le=(()=>{class _e{static forRoot(){return{ngModule:_e}}}return _e.\u0275fac=function(U){return new(U||_e)},_e.\u0275mod=X.oAB({type:_e}),_e.\u0275inj=X.cJS({providers:[{provide:k.w,useClass:k.D}],imports:[[r.ez,t.JF,e.u5]]}),_e})()},4277:(_t,We,F)=>{F.d(We,{D:()=>e,w:()=>t});var r=F(5e3);let t=(()=>{class k{}return k.\u0275fac=function(le){return new(le||k)},k.\u0275prov=r.Yz7({token:k,factory:k.\u0275fac}),k})(),e=(()=>{class k extends t{get nativeGlobal(){return window}
1}return k.\u0275fac=function(){let X;return function(_e){return(X||(X=r.n5z(k)))(_e||k)}}(),k.\u0275prov=r.Yz7({token:k,factory:k.\u0275fac,providedIn:"root"}),k})()},8653:(_t,We,F)=>{F.d(We,{E:()=>r});class r{static convertToIST(){let X=5.5- -(new Date).getTimezoneOffset()/60,le=new Date;return le.setTime(le.getTime()+60*X*60*1e3),le}static convertToIST1(){let X=5.5- -(new Date).getTimezoneOffset()/60,le=new Date;le.setTime(le.getTime()+60*X*60*1e3);let _e=new Date(le);return _e.setDate(_e.getDate()+1),_e.setHours(0,0,0,0),_e}static UNIXDateTime(e){return Math.floor(e.getTime()/1e3)}static DateFormatDDMMYY(e){var k=new Date(1e3*e),X=k.getFullYear(),le=String(k.getMonth()+1).padStart(2,"0");return String(k.getDate()).padStart(2,"0")+"-"+le+"-"+X}static TimeFormatHHmm(e){var k=new Date(1e3*e);return String(k.getHours()).padStart(2,"0")+":"+String(k.getMinutes()).padStart(2,"0")}static DateTimeTZFormat(e){var H,Ee,k=new Date(1e3*e),X=k.getFullYear(),le=String(k.getMonth()+1).padStart(2,"0"),_e=String(k.getDate()).padStart(2,"0"),Te=String(k.getHours()).padStart(2,"0"),U=String(k.getMinutes()).padStart(2,"0");try{let Je=new Date,M=Je.getTimezoneOffset()>0?Je.getTimezoneOffset():-Je.getTimezoneOffset();H=String(Math.floor(M/60)).padStart(2,"0"),H=Je.getTimezoneOffset()>0?"-"+H:"+"+H,Ee=String(M%60).padStart(2,"0")}catch(Je){console.log(Je)}return X+"-"+le+"-"+_e+"T"+Te+":"+U+":00"+H+":"+Ee}static TimeFormathhmm_ampm(e){var k=new Date(1e3*e),X=k.getHours()>=12?"PM":"AM";return(k.getHours()%12||12)+":"+String(k.getMinutes()).padStart(2,"0")+" "+X}static NewDateFormatDOMMMYYYY(e){var k=new Date(1e3*e),X=k.getFullYear(),le=["January","February","March","April","May","June","July","August","September","October","November","December"][k.getMonth()],_e=k.getDate();const Te=this.GetDateName(_e);return String(_e)+Te+" "+le+" "+X}static GetDateName(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}}},5786:(_t,We,F)=>{F.d(We,{r:()=>re});var r=F(5861),t=F(5e3),e=F(3539),k=F(4182),X=F(4277),le=F(7488),_e=F(1188),Te=F(4406),U=F(2169),H=F(6161),Ee=F(8860),xe=F(9808),Je=F(1233);function M(G,m){1&G&&t._UZ(0,"i",10)}function q(G,m){if(1&G&&(t.TgZ(0,"div",8),t.YNc(1,M,1,0,"i",9),t.qZA()),2&G){const p=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!p.ispopulate)}}const te=function(G,m){return{"form-control":!0,"border-left-0":G,"pickup-new__input":m}};function ee(G,m){if(1&G){const p=t.EpF();t.TgZ(0,"input",11),t.NdJ("ngModelChange",function(b){return t.CHM(p),t.oxw(2).dropLocInput=b})("focus",function(b){return t.CHM(p),t.oxw(2).searchinputClickCallback(b)})("click",function(b){return t.CHM(p),t.oxw(2).searchinputClickCallback(b)})("blur",function(){return t.CHM(p),t.oxw(2).validateToCityOnBlur()})("keyup",function(b){return t.CHM(p),t.oxw(2).searchinputCallback(b)}),t.qZA()}if(2&G){const p=t.oxw(2);t.Q6J("ngClass",t.WLB(3,te,!p.bookingPageInput,p.bookingPageInput))("ngModel",p.dropLocInput)("placeholder",p.newVariant?" ":p.settings.inputPlaceholderText)}}function $(G,m){1&G&&(t.TgZ(0,"label"),t._uU(1," Drop Location "),t.qZA())}function Ce(G,m){if(1&G){const p=t.EpF();t.TgZ(0,"div",12),t.NdJ("click",function(){return t.CHM(p),t.oxw(2).routeBack()}),t._UZ(1,"div",13),t.qZA()}}function Ie(G,m){if(1&G){const p=t.EpF();t.TgZ(0,"input",14),t.NdJ("ngModelChange",function(b){return t.CHM(p),t.oxw(2).dropLocInput=b})("focus",function(b){return t.CHM(p),t.oxw(2).searchinputClickCallback(b)})("contextmenu",function(b){return b.preventDefault()})("click",function(b){return t.CHM(p),t.oxw(2).searchinputClickCallback(b)})("keyup",function(b){return t.CHM(p),t.oxw(2).searchinputCallback(b)}),t.qZA()}if(2&G){const p=t.oxw(2);t.s9C("placeholder",p.settings.inputPlaceholderText),t.Q6J("ngModel",p.dropLocInput)}}function Fe(G,m){1&G&&(t.TgZ(0,"pre",15),t._UZ(1,"i",16),t.qZA())}function ie(G,m){1&G&&(t.TgZ(0,"li",21)(1,"span"),t._uU(2,"Recent Searches"),t.qZA(),t._UZ(3,"span",22),t.qZA())}function ye(G,m){if(1&G){const p=t.EpF();t.TgZ(0,"li")(1,"a",23),t.NdJ("mouseover",function(){const b=t.CHM(p),I=b.$implicit,J=b.index,V=t.oxw(3);return!I.disabled&&V.activeListNode(J,"recent")}
1)("click",function(){const b=t.CHM(p),I=b.$implicit,J=b.index,V=t.oxw(3);return!I.disabled&&V.selectedListNode(J)}),t.TgZ(2,"span",24),t._uU(3),t.qZA(),t.TgZ(4,"span",25),t._uU(5),t.qZA()()()}if(2&G){const p=m.$implicit;t.ekj("active",p.active&&!p.isEmptyMessage)("disabled",p.disabled),t.xp6(3),t.hij(" ",null!=p.structured_formatting&&p.structured_formatting.main_text?p.structured_formatting.main_text:p.name," "),t.xp6(2),t.Oqu(null!=p.structured_formatting&&p.structured_formatting.secondary_text?p.structured_formatting.secondary_text:p.description)}}function ve(G,m){1&G&&(t.TgZ(0,"li",21)(1,"span"),t._uU(2,"Popular Cities"),t.qZA(),t._UZ(3,"span",26),t.qZA())}function Se(G,m){if(1&G){const p=t.EpF();t.TgZ(0,"li")(1,"a",23),t.NdJ("mouseover",function(){const I=t.CHM(p).index;return t.oxw(3).activeListNode(I,"popular")})("click",function(){const I=t.CHM(p).$implicit;return t.oxw(3).selectFromTopCities(I)}),t.TgZ(2,"span",24),t._uU(3),t.qZA()()()}if(2&G){const p=m.$implicit;t.ekj("active",p.active),t.xp6(3),t.Oqu(p.cityName)}}function De(G,m){if(1&G){const p=t.EpF();t.TgZ(0,"ul",17),t.NdJ("mousedown",function(){return t.CHM(p),t.oxw(2).selectingFromDropdown=!0}),t.YNc(1,ie,4,0,"li",18),t.YNc(2,ye,6,6,"li",19),t.YNc(3,ve,4,0,"li",18),t.YNc(4,Se,4,3,"li",20),t.qZA()}if(2&G){const p=t.oxw(2);t.xp6(1),t.Q6J("ngIf",p.recentDropdownOpen&&p.queryItems.length),t.xp6(1),t.Q6J("ngForOf",p.queryItems),t.xp6(1),t.Q6J("ngIf",p.recentDropdownOpen&&p.topSourceCitiesList.length),t.xp6(1),t.Q6J("ngForOf",p.topSourceCitiesList)}}const ge=function(G,m,p,f){return{"input-group":!0,"button-included":G,"borderless-input":m,"input-with-icon":p,"float-field":f}};function Oe(G,m){if(1&G&&(t.TgZ(0,"div")(1,"div")(2,"div"),t.YNc(3,q,2,1,"div",2),t.YNc(4,ee,1,6,"input",3),t.YNc(5,$,2,0,"label",0),t.YNc(6,Ce,2,0,"div",4),t.YNc(7,Ie,1,2,"input",5),t.qZA(),t.YNc(8,Fe,2,0,"pre",6),t.qZA(),t.YNc(9,De,5,4,"ul",7),t.qZA()),2&G){const p=t.oxw();t.xp6(2),t.Tol(t.l5B(13,ge,p.settings.showSearchButton,!p.bookingPageInput,!p.newVariant,p.newVariant)),t.ekj("fx",p.newVariant)("active",!!p.dropLocInput),t.xp6(1),t.Q6J("ngIf",!p.bookingPageInput),t.xp6(1),t.Q6J("ngIf",!p.ispopulate),t.xp6(1),t.Q6J("ngIf",p.newVariant),t.xp6(1),t.Q6J("ngIf",p.showBackArrow),t.xp6(1),t.Q6J("ngIf",p.ispopulate),t.xp6(1),t.Q6J("ngIf",p.gettingCurrentLocationFlag),t.xp6(1),t.Q6J("ngIf",(p.dropdownOpen||p.shouldShowTopSourceCityList)&&!p.hideDropdown)}}function se(G,m){if(1&G&&(t.TgZ(0,"div",27),t._uU(1),t.qZA()),2&G){const p=t.oxw();t.xp6(1),t.Oqu(p.settingsErrorMsg)}}let re=(()=>{class G{constructor(p,f,b,I,J,V,Z,K,ce,pe){this._elmRef=p,this._global=f,this.populateService=b,this._autoCompleteSearchService=I,this.localStorage=J,this.router=V,this.bookingService=Z,this.cd=K,this.outstation=ce,this.navigationStateService=pe,this.componentCallback=new t.vpe,this.suggestionsChanged=new t.vpe,this.hideDropdown=!1,this.newVariant=!1,this.floatingLabel="",this.rtIndex=-1,this.rtKey="",this.ispopulate=!1,this.dropLocInput="",this.dropLocInputs=[],this.gettingCurrentLocationFlag=!1,this.dropdownOpen=!1,this.recentDropdownOpen=!1,this.queryItems=[],this.isSettingsError=!1,this.settingsErrorMsg="",this.moduleinit=!1,this.selectedDataIndex=-1,this.selectedPopularDataIndex=-1,this.userSelectedOption="",this.lastAutocompleteQuery="",this.bookingPageInput=!1,this.defaultSettings={geoPredictionServerUrl:"",geoLatLangServiceUrl:"",geoLocDetailServerUrl:"",geoCountryRestriction:["in"],geoTypes:[],geoLocation:[],geoRadius:0,serverResponseListHierarchy:[],serverResponseatLangHierarchy:[],serverResponseDetailHierarchy:[],resOnSearchButtonClickOnly:!1,useGoogleGeoApi:!0,inputPlaceholderText:"Enter Drop Location",inputString:"",showSearchButton:!0,showRecentSearch:!0,showCurrentLocation:!0,recentStorageName:"recent_dropLocality_searches",noOfRecentSearchSave:5,currentLocIconUrl:"",searchIconUrl:"",locationIconUrl:"",sessionTokenString:""},this.tripType="",this.topSourceCitiesList=[],this.shouldShowTopSourceCityList=!1,this.onChange=()=>{},this.onTouched=()=>{},this.mobileMode=!1,this.dropdownFlag=!0,this.selectingFromDropdown=!1,this.savedInputBeforeClear="",this.savedCityBeforeClear=null}get showBackArrow(){const p=this.populateService.getEntryType();return!this.hideDropdown&&(["fromcity","tocity","stopcity"].includes(p)?this.ispopulate:this.ispopulate&&["locality","airportLocality","dropLocality"].includes(p))}readDropMap(){try{return JSON.parse(this.localStorage.getItem("custDropLocalityDetailsMap")||"{}")||{}}catch(p){return{}}}writeDropMap(p){this.localStorage.setItem("custDropLocalityDetailsMap",JSON.stringify(p||{}))}upsertDropMapEntry(p,f){if(!p)return;const b=this.readDropMap();b[p]=f,this.writeDropMap(b)}writeValue(p){this.dropLocInput=p||""}registerOnChange(p){this.onChange=p}registerOnTouched(p){this.onTouched=p}ngOnInit(){this.bookingPageInput=!!this.router.url.includes("booking"),this.localStorage.checkPlatform()&&window.innerWidth<=710&&(this.mobileMode=!0),this.ispopulate=!!/populate/i.test(this.router.url),this.moduleinit||this.moduleInit(),this.settings.showRecentSearch=!0}ngOnChanges(){this.moduleinit=!0,this.moduleInit()}getTopSourceCity(){var p=this;return(0,r.Z)(function*(){try{const f=localStorage.getItem("popularToCities");if(f)return p.topSourceCitiesList=JSON.parse(f),void(p.shouldShowTopSourceCityList=!0);const b=[{Source_city_id:"377",cityId:1076,cityName:"Bangalore, Karnataka",cityOnly:"Bangalore",stateOnly:"Karnataka",ll:"12.966,77.606"},{Source_city_id:"145",cityId:4506,cityName:"New Delhi, Delhi",cityOnly:"New Delhi",stateOnly:"Delhi",ll:"28.614,77.209"},{Source_city_id:"114",cityId:4483,cityName:"Mumbai, Maharashtra",cityOnly:"Mumbai",stateOnly:"Maharashtra",ll:"19.132,72.891"},{Source_city_id:"81",cityId:2754,cityName:"Chennai, Tamil Nadu",cityOnly:"Chennai",stateOnly:"Tamil Nadu",ll:"13.083,80.271"},{Source_city_id:"261",cityId:1993,cityName:"Pune, Maharashtra",cityOnly:"Pune",stateOnly:"Maharashtra",ll:"18.519,73.871"},{Source_city_id:"223",cityId:7878,cityName:"Hyderabad, Telangana",cityOnly:"Hyderabad",stateOnly:"Telangana",ll:"17.385,78.487"},{Source_city_id:"48",cityId:560,cityName:"Ahmedabad, Gujarat",cityOnly:"Ahmedabad",stateOnly:"Gujarat",ll:"23.012,72.562"},{Source_city_id:"320",cityId:1336,cityName:"Kochi, Kerala",cityOnly:"Kochi",stateOnly:"Kerala",ll:"9.931,76.267"},{Source_city_id:"422",cityId:427,cityName:"Chandigarh, Chandigarh",cityOnly:"Chandigarh",stateOnly:"Chandigarh",ll:"30.728,76.778"},{Source_city_id:"36",cityId:36,cityName:"Kolkata, West Bengal",cityOnly:"Kolkata",stateOnly:"West Bengal",ll:"22.573,88.364"}],J=p.localStorage.getCacheItem("outstationroundTrip")||[],V=b.map(Z=>{const K=J.find(ce=>{var pe;return(null===(pe=ce.cityOnly)||void 0===pe?void 0:pe.toLowerCase())===Z.cityOnly.toLowerCase()});return K?Object.assign({},K):{cityId:Z.cityId,cityName:Z.cityName,cityOnly:Z.cityOnly,stateOnly:Z.stateOnly,ll:Z.ll,top_dest_ids:"",org:"",Source_city_id:Z.Source_city_id}});p.topSourceCitiesList=V,p.shouldShowTopSourceCityList=!0}catch(f){console.error("Error in getTopSourceCity():",f),p.shouldShowTopSourceCityList=!1}})()}onFocus(){this.dropLocInput||setTimeout(()=>{this.shouldShowTopSourceCityList=!0},0)}focusInput(){setTimeout(()=>{const p=document.getElementById("dropInput");p&&!this.mobileMode&&(p.focus(),p.click(),this.getTopSourceCity())},100)}onBlur(){setTimeout(()=>{this.shouldShowTopSourceCityList=!1},0)}validateToCityOnBlur(){var p,f,b;if(this.selectingFromDropdown)return void(this.selectingFromDropdown=!1);const I="number"==typeof this.rtIndex&&this.rtIndex>=0?this.rtIndex:0,J="roundTrip"===this.bookingService.getSubTripType(),V=!this.mobileMode;if(this.savedInputBeforeClear&&!this.dropLocInput){if(this.dropLocInput=this.savedInputBeforeClear,this.savedCityBeforeClear){const be=this.bookingService.getSelectedDestinationCity()||[];for(;be.length<=I;)be.push(null);be[I]=this.savedCityBeforeClear,this.bookingService.setSelectedDestinationCity(be)}return this.savedInputBeforeClear="",this.savedCityBeforeClear=null,this.dropdownFlag=!0,this.bookingService.setInvalidDestinationFlag(!1),void(null===(p=this.outstation)||void 0===p||p.validateValidDestination(!1))}const Z=this.readDropMap();
1if(J&&V&&this.rtKey&&(!this.rtKey||!Z[this.rtKey]))return this.dropdownFlag=!1,void this.bookingService.setInvalidDestinationFlag(!1);this.savedInputBeforeClear="",this.savedCityBeforeClear=null;let ce=this.bookingService.getSelectedDestinationCity();(null==ce?void 0:ce.length)>0&&(null===(f=ce[I])||void 0===f?void 0:f.cityId)||(this.dropdownFlag?this.dropdownFlag&&(null===(b=this.outstation)||void 0===b||b.validateValidDestination(!0,this.rtKey)):this.bookingService.setInvalidDestinationFlag(!0),setTimeout(()=>{if(ce=this.bookingService.getSelectedDestinationCity(),0==ce.length&&!this.settings.inputString){let be={page_url:"",user_input:"",trip_type:this.bookingService.getSubTripType()?this.bookingService.getSubTripType():this.bookingService.getTripType(),error:""};be.page_url=window.location.pathname,be.user_input=this.dropLocInput,be.error="Please enter a valid Drop location",this.localStorage.save_CT_data("to_city_error",be),this.localStorage.save_analytics_data("to-city-error",be)}},2e3))}selectFromTopCities(p){var f;if(this.selectingFromDropdown=!1,this.savedInputBeforeClear="",this.savedCityBeforeClear=null,this.bookingService.setInvalidDestinationFlag(!1),this.dropdownFlag=!0,this.shouldShowTopSourceCityList=!1,this.dropdownOpen=!1,this.dropLocInput=p.cityName,this.bookingService.setCustomerDropLocalityDetails(""),!this.mobileMode){const Z="number"==typeof this.rtIndex&&this.rtIndex>=0?this.rtIndex:0,K=this.bookingService.getSelectedDestinationCity()||[];for(;K.length<=Z;)K.push(null);K[Z]=p,this.bookingService.setSelectedDestinationCity(K)}this.componentCallback.emit(p);const b=this.bookingService.getSubTripType(),I=this.navigationStateService.getRTIndex();if("roundTrip"===b&&this.navigationStateService.hasContext()&&I>=0){const Z={custShortAddress:this.dropLocInput,custFullAddress:p.formattedAddress||this.dropLocInput,custLocality:this.dropLocInput,custLatLong:p.ll||"",place_id:p.cityId?String(p.cityId):"",place:p,fullDropAddress:p.formattedAddress||this.dropLocInput,source:"popular"};this.navigationStateService.setDropLocality(I,Z);let K=JSON.parse(this.localStorage.getItem("custDropLocalityDetails")||"[]");for(Array.isArray(K)||(K=[]);K.length<=I;)K.push(null);K[I]=Z,this.localStorage.setItem("custDropLocalityDetails",JSON.stringify(K)),this.localStorage.setItem("popularDropLocalityDetails",JSON.stringify(p))}else{let Z=JSON.parse(this.localStorage.getItem("custDropLocalityDetails")||"[]"),K=this.bookingService.getSelectedDestinationCity()||[];const ce=this.rtKey||(null===(f=this.populateService)||void 0===f?void 0:f.getFocusedToCityKey)&&this.populateService.getFocusedToCityKey()||"",pe="number"==typeof this.rtIndex&&this.rtIndex>=0?this.rtIndex:-1,be={custShortAddress:this.dropLocInput,custFullAddress:p.formattedAddress||this.dropLocInput,custLocality:this.dropLocInput,custLatLong:p.ll||"",place_id:p.cityId?String(p.cityId):"",place:p,fullDropAddress:p.formattedAddress||this.dropLocInput,source:"popular"};if((null==K?void 0:K.length)<1&&Z){this.localStorage.removeItem("custDropLocalityDetailsMap"),this.localStorage.setItem("popularDropLocalityDetails",JSON.stringify(p));const Ye=pe>=0?pe:0,je=[];je[Ye]=be,this.localStorage.setItem("custDropLocalityDetails",JSON.stringify(je)),ce&&this.upsertDropMapEntry(ce,be),this.navigationStateService.setDropLocality(Ye,be)}else{Array.isArray(Z)||(Z=[]),pe>=0?(Z[pe]=be,this.navigationStateService.setDropLocality(pe,be)):K.forEach((je,Be)=>{je.cityName===p.cityName&&(Z[Be]=be,this.navigationStateService.setDropLocality(Be,be))}),this.localStorage.setItem("popularDropLocalityDetails",JSON.stringify(p)),this.localStorage.setItem("custDropLocalityDetails",JSON.stringify(Z)),ce&&this.upsertDropMapEntry(ce,be);let Ye={city_name:this.dropLocInput,select_type:"Click"};setTimeout(()=>{this.localStorage.save_CT_data("select_to_city",Ye)},2e3)}}this.localStorage.removeItem("nearestToCityFlag"),this.localStorage.setItem("cachedDestinationCity",JSON.stringify(p));const V=Object.assign(Object.assign({structured_formatting:{main_text:p.cityName,secondary_text:p.stateName||""}},p),{name:p.cityName,description:p.cityName,place_id:"city:"+p.cityId,formatted_address:p.formattedAddress||p.cityName});this.settings.showRecentSearch&&(this._autoCompleteSearchService.addRecentList(this.settings.recentStorageName,V,this.settings.noOfRecentSearchSave),this.getRecentLocations())}
1searchinputClickCallback(p){if(p.target.select(),""==this.settings.sessionTokenString){let f=this.refreshSessionToken();this.settings.sessionTokenString=f}this.searchinputCallback(p)}refreshSessionToken(){const p=this._autoCompleteSearchService.generateWrapperToken();return this.settings.sessionTokenString=p,setTimeout(()=>{this.refreshSessionToken()},18e4),p}searchinputCallback(p){this.settings.showRecentSearch=!0,this.localStorage.checkPlatform()&&window.innerWidth<=710&&(this.mobileMode=!0);const f="number"==typeof this.rtIndex&&this.rtIndex>=0?this.rtIndex:0,b=this.bookingService.getSelectedDestinationCity()||[],I=b[f];if(null!=I&&"object"==typeof I&&I.cityId>0&&!this.mobileMode&&!this.bookingPageInput){const K=b.slice();K.length>1?(K[f]=null,this.bookingService.setSelectedDestinationCity(K)):this.bookingService.setSelectedDestinationCity([]),this.localStorage.removeItem("selectedDestinationCity"),this.savedInputBeforeClear=this.dropLocInput||"",this.savedCityBeforeClear=I,this.dropLocInput=""}const V=this.populateService.getEntryType();(this.bookingPageInput||"dropLocality"===V)&&(this.settings.recentStorageName=this.getSelectedCityName(this.bookingPageInput||"dropLocality"===V)+"-RecentSearches");let Z=this.dropLocInput;console.log(Z),console.log(p),40===p.keyCode||38===p.keyCode||13===p.keyCode?this.navigateInList(p.keyCode):Z?this.getListQuery(Z):(this.queryItems=[],this.suggestionsChanged.emit([]),this.userSelectedOption&&this.userQuerySubmit("false"),this.userSelectedOption="",this.settings.showRecentSearch?this.showRecentSearch():(this.dropdownOpen=!1,this.shouldShowTopSourceCityList=!1))}activeListNode(p,f){if("recent"===f)for(let b=0;b<this.queryItems.length;b++)p===b?(this.queryItems[b].active=!0,this.selectedDataIndex=p):this.queryItems[b].active=!1;else if("popular"===f)for(let b=0;b<this.topSourceCitiesList.length;b++)p===b?(this.topSourceCitiesList[b].active=!0,this.selectedPopularDataIndex=p):this.topSourceCitiesList[b].active=!1}isSyntheticPlaceId(p){return!p||p.startsWith("city:")||p.startsWith("latlng:")||p.startsWith("addr:")||p.startsWith("unknown:")}buildPlaceLikeFromItem(p){var f,b,I,J,V,Z;const K=(null===(f=null==p?void 0:p.structured_formatting)||void 0===f?void 0:f.main_text)||(null==p?void 0:p.name)||"",ce=(null===(b=null==p?void 0:p.structured_formatting)||void 0===b?void 0:b.secondary_text)||"",pe=[];K&&pe.push({long_name:K,short_name:K,types:["locality"]}),ce&&pe.push({long_name:ce,short_name:ce,types:["administrative_area_level_1"]});const be=null!==(J=null===(I=null==p?void 0:p.meta)||void 0===I?void 0:I.lat)&&void 0!==J?J:void 0,Ye=null!==(Z=null===(V=null==p?void 0:p.meta)||void 0===V?void 0:V.lng)&&void 0!==Z?Z:void 0;return{place_id:(null==p?void 0:p.place_id)||"",formatted_address:(null==p?void 0:p.description)||"",name:K,address_components:pe,geometry:null!=be&&null!=Ye?{location:{lat:be,lng:Ye}}:void 0,_fallback:!0}}selectedListNode(p){this.selectingFromDropdown=!1,this.savedInputBeforeClear="",this.savedCityBeforeClear=null,this.dropdownOpen=!1,this.shouldShowTopSourceCityList=!1;const f=this.queryItems[p];this._autoCompleteSearchService.logFunnelStep("details_selected",this.settings.sessionTokenString,{place_id:null==f?void 0:f.place_id,context:"drop"}),this.recentDropdownOpen?(null==f?void 0:f.cityId)?this.selectFromTopCities(f):this.setRecentLocation(this.queryItems[p]):this.getPlaceLocationInfo(f)}closeAutocomplete(p){this._elmRef.nativeElement.contains(p.target)||(this.selectedDataIndex=-1,this.dropdownOpen=!1,this.shouldShowTopSourceCityList=!1)}userQuerySubmit(p){this.componentCallback.emit(!("false"===p||!this.userSelectedOption)&&this.userSelectedOption)}moduleInit(){this.settings=this.setUserSettings(),this.settings.geoRadius&&2!==this.settings.geoLocation.length&&(this.isSettingsError=!0,this.settingsErrorMsg=this.settingsErrorMsg+'Radius should be used with GeoLocation. Please use "geoLocation" key to set lat and lng. '),2===this.settings.geoLocation.length&&!this.settings.geoRadius&&(this.settings.geoRadius=2e7),this.settings.showRecentSearch&&this.getRecentLocations(),this.settings.useGoogleGeoApi||(this.settings.geoPredictionServerUrl||(this.isSettingsError=!0,this.settingsErrorMsg=this.settingsErrorMsg+'Prediction custom server url is not defined. Please use "geoPredictionServerUrl" key to
1set. '),this.settings.geoLatLangServiceUrl||(this.isSettingsError=!0,this.settingsErrorMsg=this.settingsErrorMsg+'Latitude and longitude custom server url is not defined. Please use "geoLatLangServiceUrl" key to set. '),this.settings.geoLocDetailServerUrl||(this.isSettingsError=!0,this.settingsErrorMsg=this.settingsErrorMsg+'Location detail custom server url is not defined. Please use "geoLocDetailServerUrl" key to set. ')),this.dropLocInput=this.settings.inputString}processSearchQuery(){this.queryItems.length&&this.selectedListNode(this.selectedDataIndex>-1?this.selectedDataIndex:0)}setUserSettings(){let p={};if(this.userSettings&&"object"==typeof this.userSettings){let f=Object.keys(this.defaultSettings);for(let b of f)p[b]=void 0!==this.userSettings[b]?this.userSettings[b]:this.defaultSettings[b];return p}return this.defaultSettings}getListQuery(p){let f=(p||"").trim();f=f.normalize("NFC").replace(/[\u2018\u2019\u201A\u201B]/g,"'"),f=f.replace(/'/g,""),f=f.replace(/[^\p{L}\p{M}0-9\s,.&-]/gu," "),f=f.replace(/[-.]{2,}/g,pe=>pe[0]),f=f.replace(/\s+/g," ").trim();const b=this.populateService.getEntryType();if((this.bookingPageInput||"dropLocality"===b)&&f){let pe=this.getSelectedCityName(this.bookingPageInput||"dropLocality"===b);pe&&f.toLowerCase().indexOf(pe.toLowerCase())<0&&(f=`${pe} ${f}`)}if(this.shouldShowTopSourceCityList=!0,this.topSourceCitiesList=[],console.log("drop autocomplete query:",f),this.recentDropdownOpen=!1,(!f||f.length<3)&&"airport"!==this.bookingService.getTripType())return void this.showDestinationCitiesFallback(f);const I=this.bookingService.getSelectedDestinationCity(),J=JSON.parse(this.localStorage.getItem("selectedDestinationCity")||"null"),Z=this.bookingPageInput||"dropLocality"===b?(null==I?void 0:I.length)?I[I.length-1]:(null==J?void 0:J.length)?J[J.length-1]:null:(null==I?void 0:I[0])||
1(null==J?void 0:J[0]);this.lastAutocompleteQuery=f;const ce={query:f,countryRestriction:this.settings.geoCountryRestriction,geoTypes:this.settings.geoTypes,requestType:"to",useWrappedApi:!0,sessionToken:this.settings.sessionTokenString,selectedCity:(null==Z?void 0:Z.cityName)||""};2===this.settings.geoLocation.length&&(ce.geoLocation=this.settings.geoLocation,ce.radius=this.settings.geoRadius),this._autoCompleteSearchService.getGeoPrediction(ce).then(pe=>{if(pe&&!1!==pe&&Array.isArray(pe)||"airport"===this.bookingService.getTripType())return 0===pe.length?(this.queryItems=[{main_text:"No data found",secondary_text:"",description:"No data found",disabled:!0,isEmptyMessage:!0,active:!1}],this.suggestionsChanged.emit(this.queryItems),this.dropdownFlag=!0,void(this.shouldShowTopSourceCityList=!1)):(this.updateListItem(pe),this.suggestionsChanged.emit(this.queryItems),this.dropdownFlag=!0,void this.bookingService.setInvalidDestinationFlag(!1));this.showDestinationCitiesFallback(f)}).catch(pe=>{console.error("wrapped drop autocomplete error",pe),this.showDestinationCitiesFallback(f)})}showDestinationCitiesFallback(p){const f=(p||"").trim().toLowerCase();this.bookingService.getDestinationCities().then(b=>{Array.isArray(b)||(b=[]);let I=b;if(f.length>0)try{const J=new RegExp("^"+f,"i");I=b.filter(V=>J.test(V.cityName.toLowerCase()))}catch(J){I=b.filter(V=>V.cityName.toLowerCase().includes(f))}I=I.slice(0,10),this.queryItems=I.map(J=>{const V=J.cityName||"",ce=J.cityOnly||V.split(",")[0]||V,pe=J.stateOnly||(V.includes(",")?V.split(",").slice(1).join(", ").trim():"");return Object.assign(Object.assign({},J),{cityId:J.cityId,cityName:V,description:V,active:!1,structured_formatting:{main_text:ce,secondary_text:pe}})}),this.suggestionsChanged.emit(this.queryItems),this.dropdownFlag=this.queryItems.length>0,this.bookingService.setInvalidDestinationFlag(!1),this.shouldShowTopSourceCityList=!0}).catch(b=>{console.error("getDestinationCities fallback error",b),this.dropdownFlag=!1,this.suggestionsChanged.emit([]);const I={page_url:window.location.pathname,user_input:p||"",trip_subtype:this.bookingService.getSubTripType(),error:"Please enter a valid Drop location"};this.localStorage.save_CT_data("to_city_error",I),this.localStorage.save_analytics_data("to-city-error",I)})}extractServerList(p,f){if(p.length){let b=f;for(let I of p)b=b[I];return b}return f}updateListItem(p){this.queryItems=[],this.queryItems=p||[],setTimeout(()=>{this.dropdownOpen=!0},0),this.queryItems.length>0&&this._autoCompleteSearchService.logFunnelStep("places_exposure",this.settings.sessionTokenString,{count:this.queryItems.length,context:"drop"})}showRecentSearch(){var p=this;return(0,r.Z)(function*(){let f=p.populateService.getEntryType();p.bookingService.getSelectedDestinationCity().length>0?p.bookingService.getSelectedDestinationCity():JSON.parse(p.localStorage.getItem("selectedDestinationCity")),p.recentDropdownOpen=!0,setTimeout(()=>{p.dropdownOpen=!0},0),!p.bookingPageInput&&"dropLocality"!==f&&(yield p.getTopSourceCity()),p._autoCompleteSearchService.getRecentList(p.settings.recentStorageName).then(I=>{I.length>0?p.queryItems=p.router.url.includes("populate")?I.filter(J=>J.address_components):I:(p.queryItems=[],setTimeout(()=>{p.dropdownOpen=!1},0))})})()}navigateInList(p){let f=0;40===p?(this.selectedDataIndex>=0&&(f=this.selectedDataIndex+1<=this.queryItems.length-1?this.selectedDataIndex+1:0),this.activeListNode(f,"recent")):38===p?(f=this.selectedDataIndex>=0&&this.selectedDataIndex-1>=0?this.selectedDataIndex-1:this.queryItems.length-1,this.activeListNode(f,"recent")):this.processSearchQuery()}getPlaceLocationInfo(p){var f=this;return(0,r.Z)(function*(){var b,I,J,V,Z,K,ce,pe;const Ye=(null===(I=null===(b=f.settings)||void 0===b?void 0:b.sessionTokenString)||void 0===I?void 0:I.token)||(null===(Z=null===(V=null===(J=f.settings)||void 0===J?void 0:J.sessionTokenString)||void 0===V?void 0:V.toString)||void 0===Z?void 0:Z.call(V))||String((null===(K=f.settings)||void 0===K?void 0:K.sessionTokenString)||"");if(!f.settings.useGoogleGeoApi)return void f._autoCompleteSearchService.getPlaceDetails(f.settings.geoLocDetailServerUrl,p.place_id).then(Re=>{if(!Re)return;const Ge=f.extractServerList(f.settings.serverResponseDetailHierarchy,Re);f.setRecentLocation(Ge)});const je=(null==p?void 0:p.place_id)||"",Be=f.isSyntheticPlaceId(je);try{let Re;if(je&&!Be){const mt=yield f._autoCompleteSearchService.getPlaceDetailsWrapped({place_id:je,request:"to",token:Ye,query:f.lastAutocompleteQuery||"",rsource:"Web"});Re="OK"===(null==mt?void 0:mt.status)?f._autoCompleteSearchService.mapWrapperToPlaceLike(mt,"to",(null===(ce=null==p?void 0:p.structured_formatting)||void 0===ce?void 0:ce.main_text)||(null==p?void 0:p.description)):{place_id:je,formatted_address:(null==p?void 0:p.description)||"",name:(null===(pe=null==p?void 0:p.structured_formatting)||void 0===pe?void 0:pe.main_text)||"",address_components:[]}}else Re=f.buildPlaceLikeFromItem(p);(yield f.validateSelectedAddress(Re))&&f.setRecentLocation(Re)}catch(Re){const Ge=f.buildPlaceLikeFromItem(p);(yield f.validateSelectedAddress(Ge))&&f.setRecentLocation(Ge)}finally{f.settings.sessionTokenString=""}})()}setRecentLocation(p){const f=JSON.parse(JSON.stringify(p));if(f.description=f.description||f.formatted_address||f.name||"",f.active=!1,this.selectedDataIndex=-1,this.dropLocInput=f.description,this.settings.showRecentSearch&&(this._autoCompleteSearchService.addRecentList(this.settings.recentStorageName,f,this.settings.noOfRecentSearchSave),this.getRecentLocations()),this.userSelectedOption=f,"roundTrip"===this.bookingService.getSubTripType()){const b=this.navigationStateService.getRTIndex();if(b>=0){const I=f.name||f.description||"",J=f.formatted_address||f.description||I,V={custShortAddress:I,custFullAddress:J,custLocality:I,custLatLong:"",place:f,place_id:f.place_id||"",fullDropAddress:J,source:"recent"};this.navigationStateService.setDropLocality(b,V);let Z=JSON.parse(this.localStorage.getItem("custDropLocalityDetails")||"[]");for(Array.isArray(Z)||(Z=[]);Z.length<=b;)Z.push(null);Z[b]=V,this.localStorage.setItem("custDropLocalityDetails",JSON.stringify(Z))}}this.settings.resOnSearchButtonClickOnly||this.componentCallback.emit(f)}getRecentSearchList(){var p=this;return(0,r.Z)(function*(){var f;const b=p.populateService.getEntryType();let I=(null===(f=p.settings)||void 0===f?void 0:f.recentStorageName)||p.defaultSettings.recentStorageName;(p.bookingPageInput||"dropLocality"===b)&&(I=p.getSelectedCityName(!0)+"-RecentSearches");const V=yield p._autoCompleteSearchService.getRecentList(I);return Array.isArray(V)?V:[]})()}getRecentLocations(){this._autoCompleteSearchService.getRecentList(this.settings.recentStorageName).then(()=>{})}getSelectedCityName(p=!1){let f="";const b=this.bookingService.getSelectedDestinationCity(),I=p?b[b.length-1]:b[0];console.log(I),null!==I&&"object"==typeof I&&I.cityId>0&&(f=I.cityName.split(",")[0]);const J=localStorage.getItem("selectedDestinationCity");if(null!==J){const V=JSON.parse(J);
1f=(p?V[V.length-1]:V[0]).cityName}return"Kochi/Cochin"==f&&(f="Cochin"),"Bhubaneshwar"==f&&(f="Bhubaneswar"),("New Delhi - T1 Terminal"==f||"New Delhi - T2 Terminal"==f||"New Delhi - T3 Terminal"==f)&&(f="New Delhi"),("Mumbai, Maharashtra - Domestic T1"==f||"Mumbai, Maharashtra - International T2"==f)&&(f="Mumbai"),f}routeBack(){window.history.back()}validateSelectedAddress(p){var f=this;return(0,r.Z)(function*(){let b="",I="";f.isSettingsError=!1,f.settingsErrorMsg="",console.log(p);for(const K of p.address_components)switch(K.types[0]){case"locality":b=K.long_name,f.localStorage.setItem("user_city_name",b),console.log(K.long_name);break;case"administrative_area_level_1":I=K.long_name,f.localStorage.setItem("user_state_name",I),console.log(K.long_name)}let J=f.bookingService.getSelectedDestinationCity();if(console.log(J),null==J)return!0;let V=p.name+", "+p.formatted_address;return console.log(p),console.log(V),console.log(!0),!0})()}}return G.\u0275fac=function(p){return new(p||G)(t.Y36(t.SBq),t.Y36(X.D),t.Y36(le.T),t.Y36(e.y),t.Y36(_e.V),t.Y36(Te.F0),t.Y36(U.L),t.Y36(t.sBO),t.Y36(H.K,9),t.Y36(Ee.f))},G.\u0275cmp=t.Xpm({type:G,selectors:[["droplocation-autocomplete"]],hostBindings:function(p,f){1&p&&t.NdJ("click",function(I){return f.closeAutocomplete(I)},!1,t.evT)},inputs:{userSettings:"userSettings",hideDropdown:"hideDropdown",newVariant:"newVariant",floatingLabel:"floatingLabel",rtIndex:"rtIndex",rtKey:"rtKey"},outputs:{componentCallback:"componentCallback",suggestionsChanged:"suggestionsChanged"},features:[t._Bn([e.y,{provide:k.JU,useExisting:(0,t.Gpc)(()=>G),multi:!0}]),t.TTD],decls:2,vars:2,consts:[[4,"ngIf"],["class","custom-autocomplete--error",4,"ngIf"],["class","input-group-prepend bg-transparent","style","height: 33px;",4,"ngIf"],["type","search","name","search","id","dropInput","autocomplete","off","style","font-weight: 500;color:#000;",3,"ngClass","ngModel","placeholder","ngModelChange","focus","click","blur","keyup",4,"ngIf"],["class","input-group-prepend bg-transparent align-items-center",3,"click",4,"ngIf"],["class","form-control google_input border-left-0 input-field","style","height: 38px !important;","type","search","name","search","id","search_places","autocomplete","off","appFocus","",3,"ngModel","placeholder","ngModelChange","focus","contextmenu","click","keyup",4,"ngIf"],["class","custom-autocomplete__loader",4,"ngIf"],["class","custom-autocomplete__dropdown",3,"mousedown",4,"ngIf"],[1,"input-group-prepend","bg-transparent",2,"height","33px"],["class","icon bg-transparent pi pi-search px-1",4,"ngIf"],[1,"icon","bg-transparent","pi","pi-search","px-1"],["type","search","name","search","id","dropInput","autocomplete","off",2,"font-weight","500","color","#000",3,"ngClass","ngModel","placeholder","ngModelChange","focus","click","blur","keyup"],[1,"input-group-prepend","bg-transparent","align-items-center",3,"click"],[1,"left-arrow-long","input-group-text","bg-transparent","border-0","p-0","mx-2"],["type","search","name","search","id","search_places","autocomplete","off","appFocus","",1,"form-control","google_input","border-left-0","input-field",2,"height","38px !important",3,"ngModel","placeholder","ngModelChange","focus","contextmenu","click","keyup"],[1,"custom-autocomplete__loader"],[1,"gif"],[1,"custom-autocomplete__dropdown",3,"mousedown"],["class","heading heading-recent",4,"ngIf"],[3,"active","disabled",4,"ngFor","ngForOf"],[3,"active",4,"ngFor","ngForOf"],[1,"heading","heading-recent"],[1,"line","line-recent"],["href","javascript:;",3,"mouseover","click"],[1,"main-text"],[1,"secondary_text"],[1,"line","line-location"],[1,"custom-autocomplete--error"]],template:function(p,f){1&p&&(t.YNc(0,Oe,10,18,"div",0),t.YNc(1,se,2,1,"div",1)),2&p&&(t.Q6J("ngIf",!f.isSettingsError),t.xp6(1),t.Q6J("ngIf",f.isSettingsError))},directives:[xe.O5,k.Fj,xe.mk,k.JJ,k.On,Je.R,xe.sg],styles:[".float-field[_ngcontent-%COMP%]{position:relative}.float-field.fx[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;height:50px!important;border-radius:10px;border:1px solid #E5E7EB;background:#F2F4F7;font-size:15px!important;color:#111827;padding:18px 12px 8px!important;transition:border-color .18s ease,background .18s ease,box-shadow .18s ease}.float-field.fx[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{border-color:#3b82f6;background:#EBF2FF;box-shadow:0 0 0 3px #3b82f626;outline:none}.float-field.fx[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{position:absolute;
1left:12px;top:50%;transform:translateY(-50%);font-weight:700;letter-spacing:.2px;color:#667085;pointer-events:none;transition:transform .18s ease,top .18s ease,font-size .18s ease,color .18s ease,padding .18s ease,background .18s ease;background:transparent;padding:0 2px}.float-field.fx.active[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .float-field.fx[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus + label[_ngcontent-%COMP%]{top:4px;transform:none;font-size:11px;color:#20a8d9;background:transparent;padding:0 1px;z-index:7}.float-field.fx.invalid[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border-color:#dc2626;box-shadow:0 0 0 3px #dc262614}li.disabled[_ngcontent-%COMP%]{font-weight:700;pointer-events:none}li.disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:default}.backarrow[_ngcontent-%COMP%]{background:white;position:absolute;z-index:9;height:35px;top:2px;border:0px;left:2px}.input-field[_ngcontent-%COMP%]:focus{outline:none;border-color:transparent;box-shadow:none}.input-field[_ngcontent-%COMP%]{border:none;border-bottom:1px solid rgba(0,0,0,.12)}.input-with-icon[_ngcontent-%COMP%]:focus-within .icon[_ngcontent-%COMP%]{border-bottom:1px solid #80bdff}.input-with-icon[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;align-items:center;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}input[_ngcontent-%COMP%]::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.custom-autocomplete[_ngcontent-%COMP%]{display:block;position:relative;width:100%;float:left}.pickup-new__input[_ngcontent-%COMP%]{border-radius:3px;border:1px solid #E5E7EB;background:#F2f2f2;font-size:14px;color:#000}.pickup-new__input[_ngcontent-%COMP%]:focus{border-color:#c4d3f7;background:white;box-shadow:0 0 0 3px #789bff40;outline:none}.custom-autocomplete[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .custom-autocomplete[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.custom-autocomplete--error[_ngcontent-%COMP%]{color:#dc3545;font-size:10px!important}.custom-autocomplete__dropdown[_ngcontent-%COMP%]{position:absolute;background:#fff;margin:0;padding:0;width:88%;list-style:none;border:.5px solid #909090;z-index:99;border-radius:9px;max-height:300px;overflow-y:auto;overflow-x:hidden;box-shadow:0 2px 5px #00000026}.icon[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12);align-content:center;
1color:#777f86}input[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}.custom-autocomplete__dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{float:left;width:100%;font-size:11px}.custom-autocomplete__dropdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:100%;color:#20a8d9;float:left;padding:8px 10px}.custom-autocomplete__dropdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{padding:13px 10px 7px 13px;text-transform:uppercase;letter-spacing:1px;font-size:13px;position:relative}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{border-top:1px solid #c2c2c2;width:calc(100% - 115px);display:inline-block;position:absolute;top:21px;left:100px}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .line-location[_ngcontent-%COMP%]{left:143px;top:16px;width:calc(100% - 153px)}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%] .line-recent[_ngcontent-%COMP%]{left:158px;top:16px;width:calc(100% - 168px)}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .heading-recent[_ngcontent-%COMP%]{padding-top:8px}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .custom-icon[_ngcontent-%COMP%]{width:16px;height:16px;background-size:cover;vertical-align:bottom;display:inline-block;margin-right:4px}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .main-text[_ngcontent-%COMP%]{padding-right:4px;font-weight:700;font-size:11px}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .secondary_text[_ngcontent-%COMP%]{font-size:11px;color:#909090}.custom-autocomplete__dropdown[_ngcontent-%COMP%] .active[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{background-color:#f4f4f4}.custom-autocomplete__loader[_ngcontent-%COMP%]{position:absolute;top:0;width:100%;height:100%;text-align:center;background:white}.custom-autocomplete__container[_ngcontent-%COMP%], .custom-autocomplete__input[_ngcontent-%COMP%]{width:inherit;float:inherit;position:relative}.custom-autocomplete__input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin:0;padding:10px;height:50px;border:1px solid #ccc;display:block;width:100%;overflow:hidden;text-overflow:ellipsis;font-size:16px}.left-arrow-long[_ngcontent-%COMP%]{width:16px;height:10px;background:url(seo-icons.9a353167a675b6f9.svg) no-repeat;background-position:-60px -30px}.borderless-input[_ngcontent-%COMP%] > input[_ngcontent-%COMP%], .borderless-input[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{border-right:0;border-left:0;border-top:0;border-radius:0}.borderless-input[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{padding:4px!important}[_ngcontent-%COMP%]::-webkit-input-placeholder{font-size:11px;font-weight:500}input[type=text][_ngcontent-%COMP%]::-webkit-input-placeholder{color:#d8d8d4}[_ngcontent-%COMP%]::-moz-placeholder{font-size:11px;font-weight:500}[_ngcontent-%COMP%]:-ms-input-placeholder{font-size:11px}[_ngcontent-%COMP%]:-moz-placeholder{font-size:11px}.button-included[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-right:60px}"]}),G})()},1233:(_t,We,F)=>{F.d(We,{R:()=>t});var r=F(5e3);let t=(()=>{class e{constructor(X){this.elementRef=X}ngAfterViewInit(){this.elementRef.nativeElement.focus()}}return e.\u0275fac=function(X){return new(X||e)(r.Y36(r.SBq))},e.\u0275dir=r.lG2({type:e,selectors:[["","appFocus",""]]}),e})()},7488:(_t,We,F)=>{F.d(We,{T:()=>t});var r=F(5e3);let t=(()=>{class e{constructor(){this.modifyCalendarPopOpen=!1,this.focusedToCityKey="",this._charDhamFlag=!1}getEntryType(){return this.entryType}getToCityFocusedValue(){return this.toCityFocusedValue}getModifyCalendarPopOpen(){return this.modifyCalendarPopOpen}getCalendarType(){return this.calendarType}setEntryPoint(X){this.entryType=X}setCharDhamFlag(X){this._charDhamFlag=X}getCharDhamFlag(){return this._charDhamFlag}getCharDhamCityKeys(){return["new delhi","gurgaon","noida","faridabad","ghaziabad","dehradun","haridwar","rishikesh"]}getCharDhamSourceCities(){return[{cityId:145,cityName:"Delhi, New Delhi",org:"New Delhi",cityOnly:"Delhi",stateOnly:"Delhi",ll:"28.557,77.164"},{cityId:73,cityName:"Gurgaon, Haryana",cityOnly:"Gurgaon",stateOnly:"Haryana",ll:"28.46,77.062"},{cityId:348,cityName:"Noida, Uttar Pradesh",cityOnly:"Noida",stateOnly:"Uttar Pradesh",ll:"28.535,77.381"},{cityId:266,cityName:"Faridabad, Haryana",cityOnly:"Faridabad",stateOnly:"Haryana",ll:"28.418,77.308"},{cityId:32,cityName:"Ghaziabad, Uttar Pradesh",cityOnly:"Ghaziabad",stateOnly:"Uttar Pradesh",ll:"28.686,77.432"},{cityId:404,cityName:"Haridwar, Uttarakhand",cityOnly:"Haridwar",stateOnly:"Uttarakhand",ll:"29.945,78.069"},{cityId:23,cityName:"Rishikesh, Uttarakhand",cityOnly:"Rishikesh",stateOnly:"Uttarakhand",ll:"30.125,78.317"},{cityId:5,cityName:"Dehradun, Uttarakhand",cityOnly:"Dehradun",stateOnly:"Uttarakhand",ll:"30.328,78.036"}]}setToCityFocusedValue(X){this.toCityFocusedValue=X}setFocusedToCityKey(X){this.focusedToCityKey=X||""}getFocusedToCityKey(){return this.focusedToCityKey||""}setModifyCalendarPopOpen(X){this.modifyCalendarPopOpen=X}setCalendarType(X){this.calendarType=X}}return e.\u0275fac=function(X){return new(X||e)},e.\u0275prov=r.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},5591:(_t,We,F)=>{F.d(We,{q:()=>Ci});var r=F(5861),t=F(5e3),e=F(4182),k=F(13),X=F(5778),le=F(7545),_e=F(4850),Te=F(3735),U=F(2335),H=F(8653),Ee=F(2340),xe=F(2169),Je=F(4406),M=F(8966),q=F(1188),te=F(7488),ee=F(2684);const $=["calendar"],Ce=["fromCalendar"],Ie=["pickupSelect"],Fe=["dateWheelScroll"],ie=["hourWheelScroll"],ye=["minuteWheelScroll"],ve=["meridiemWheelScroll"];
1function Se(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div",12),t.NdJ("click",function(){return t.CHM(a),t.oxw(2).hideModify()}),t.TgZ(1,"span",13),t._uU(2,"\xd7"),t.qZA()()}}const De=function(S,j){return{"border-top-color":S,"border-bottom-color":j}};function ge(S,j){if(1&S&&(t.TgZ(0,"div",14)(1,"span",15),t._uU(2),t.qZA()()),2&S){const a=t.oxw(2);t.Q6J("ngStyle",t.WLB(2,De,a.ixigoFlag?a.ixigoColor:"",a.ixigoFlag?a.ixigoColor:"")),t.xp6(2),t.Oqu("local"==a.tripType?a.messageService.getLocalText():a.messageService.getAirportText())}}const Oe=function(S){return{"background-color":S}};function se(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div",16)(1,"div",17)(2,"input",18),t.NdJ("ngModelChange",function(u){return t.CHM(a),t.oxw(2).subTripType=u})("change",function(){return t.CHM(a),t.oxw(2).changeLocalSubTripType()}),t.qZA(),t.TgZ(3,"label",19),t._uU(4,"DROP TO AIRPORT"),t.qZA(),t.TgZ(5,"input",20),t.NdJ("ngModelChange",function(u){return t.CHM(a),t.oxw(2).subTripType=u})("change",function(){return t.CHM(a),t.oxw(2).changeLocalSubTripType()}),t.qZA(),t.TgZ(6,"label",21),t._uU(7,"PICKUP FROM AIRPORT"),t.qZA()()()}if(2&S){const a=t.oxw(2);t.xp6(2),t.Q6J("ngModel",a.subTripType),t.xp6(1),t.ekj("active-trip-button","drop_airport"===a.subTripType),t.Q6J("ngStyle",t.VKq(8,Oe,a.ixigoFlag&&"drop_airport"===a.subTripType?a.ixigoColor:a.mahindraFlag&&"drop_airport"===a.subTripType?a.mahindraColor:"")),t.xp6(2),t.Q6J("ngModel",a.subTripType),t.xp6(1),t.ekj("active-trip-button","pick_airport"===a.subTripType),t.Q6J("ngStyle",t.VKq(10,Oe,a.ixigoFlag&&"pick_airport"===a.subTripType?a.ixigoColor:a.mahindraFlag&&"pick_airport"===a.subTripType?a.mahindraColor:""))}}function re(S,j){1&S&&(t.TgZ(0,"small",31),t._uU(1," Please select the pickup city "),t.qZA())}function G(S,j){if(1&S&&(t.TgZ(0,"small",31),t._uU(1),t.qZA()),2&S){const a=t.oxw(3);t.xp6(1),t.hij(" ",a.notValidSourceErrorMessage," ")}}function m(S,j){if(1&S){const a=t.EpF();t.ynx(0),t.TgZ(1,"div",22)(2,"div",23)(3,"div",24),t.O4$(),t.TgZ(4,"svg",25),t._UZ(5,"path",26),t.qZA(),t.kcU(),t.TgZ(6,"div",27)(7,"div",28),t._uU(8,"FROM"),t.qZA(),t.TgZ(9,"ng4geo-autocomplete",29),t.NdJ("componentCallback",function(u){return t.CHM(a),t.oxw(2).autoCompleteCallback(u)})("click",function(){return t.CHM(a),t.oxw(2).populateField("fromcity")}),t.qZA()()(),t.YNc(10,re,2,0,"small",30),t.YNc(11,G,2,1,"small",30),t.qZA()(),t.BQk()}if(2&S){const a=t.oxw(2);t.xp6(9),t.Q6J("userSettings",a.addressAutocompleteSettings)("hideDropdown",!0),t.xp6(1),t.Q6J("ngIf",a.localForm.controls.fromCityControl.hasError("required")&&a.localForm.controls.fromCityControl.touched),t.xp6(1),t.Q6J("ngIf",a.notValidSource)}}function p(S,j){if(1&S&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&S){const a=t.oxw(3);t.xp6(1),t.Oqu(a.selectedFromCity.airportAddress)}}function f(S,j){1&S&&(t.TgZ(0,"span",36),t._uU(1,"Start typing airport name or city"),t.qZA())}function b(S,j){1&S&&(t.TgZ(0,"small",31),t._uU(1," Please select the airport. "),t.qZA())}function I(S,j){1&S&&(t.TgZ(0,"small",31),t._uU(1," Please select the valid airport. "),t.qZA())}function J(S,j){1&S&&(t.TgZ(0,"small",31),t._uU(1," Please select your address. "),t.qZA())}function V(S,j){if(1&S){const a=t.EpF();t.ynx(0),t.TgZ(1,"div",22)(2,"div",23)(3,"div",24),t.O4$(),t.TgZ(4,"svg",25),t._UZ(5,"path",26),t.qZA(),t.kcU(),t.TgZ(6,"div",27)(7,"div",28),t._uU(8,"PICKUP AIRPORT"),t.qZA(),t.TgZ(9,"div",32),t.NdJ("click",function(){return t.CHM(a),t.oxw(2).populateField("airport")}),t.YNc(10,p,2,1,"span",0),t.YNc(11,f,2,0,"span",33),t.qZA()()(),t.YNc(12,b,2,0,"small",30),t.YNc(13,I,2,0,"small",30),t.qZA()(),t.TgZ(14,"div",22)(15,"div",34)(16,"div",24),t.O4$(),t.TgZ(17,"svg",25),t._UZ(18,"path",26),t.qZA(),t.kcU(),t.TgZ(19,"div",27)(20,"div",28),t._uU(21,"DROP ADDRESS"),t.qZA(),t.TgZ(22,"ng4geo-autocomplete",35),t.NdJ("keyup",function(u){return t.CHM(a),t.oxw(2).handleKeyUp(u)})("click",function(){return t.CHM(a),t.oxw(2).populateField("airportLocality")})("contextmenu",function(u){return u.preventDefault()})("componentCallback",function(u){return t.CHM(a),t.oxw(2).autoCompleteCallback(u)}),t.qZA()()(),t.YNc(23,J,2,0,"small",30),t.qZA()(),t.BQk()}if(2&S){const a=t.oxw(2);t.xp6(10),t.Q6J("ngIf",null==a.selectedFromCity?null:a.selectedFromCity.airportAddress),t.xp6(1),t.Q6J("ngIf",!(null!=a.selectedFromCity&&a.selectedFromCity.airportAddress)),t.xp6(1),t.Q6J("ngIf",a.localForm.controls.fromCityControl.hasError("required")&&a.localForm.controls.fromCityControl.touched),t.xp6(1),t.Q6J("ngIf",a.notValidSource),t.xp6(9),t.Q6J("userSettings",a.addressAutocompleteSettings)("hideDropdown",!0),t.xp6(1),t.Q6J("ngIf",a.localForm.controls.frmAirportLocalityControl.hasError("required")&&a.localForm.controls.frmAirportLocalityControl.touched)}}function Z(S,j){1&S&&(t.TgZ(0,"small",31),t._uU(1," Please select your address. "),t.qZA())}function K(S,j){if(1&S&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&S){const a=t.oxw(3);
1t.xp6(1),t.Oqu(a.selectedFromCity.airportAddress)}}function ce(S,j){1&S&&(t.TgZ(0,"span",36),t._uU(1,"Start typing airport name or city"),t.qZA())}function pe(S,j){1&S&&(t.TgZ(0,"small",31),t._uU(1," Please select the airport. "),t.qZA())}function be(S,j){1&S&&(t.TgZ(0,"small",31),t._uU(1," Please select the valid airport. "),t.qZA())}function Ye(S,j){if(1&S){const a=t.EpF();t.ynx(0),t.TgZ(1,"div",22)(2,"div",23)(3,"div",24),t.O4$(),t.TgZ(4,"svg",25),t._UZ(5,"path",26),t.qZA(),t.kcU(),t.TgZ(6,"div",27)(7,"div",28),t._uU(8,"PICKUP ADDRESS"),t.qZA(),t.TgZ(9,"ng4geo-autocomplete",35),t.NdJ("keyup",function(u){return t.CHM(a),t.oxw(2).handleKeyUp(u)})("click",function(){return t.CHM(a),t.oxw(2).populateField("airportLocality")})("contextmenu",function(u){return u.preventDefault()})("componentCallback",function(u){return t.CHM(a),t.oxw(2).autoCompleteCallback(u)}),t.qZA()()(),t.YNc(10,Z,2,0,"small",30),t.qZA()(),t.TgZ(11,"div",22)(12,"div",34)(13,"div",24),t.O4$(),t.TgZ(14,"svg",25),t._UZ(15,"path",26),t.qZA(),t.kcU(),t.TgZ(16,"div",27)(17,"div",28),t._uU(18,"DROP AIRPORT"),t.qZA(),t.TgZ(19,"div",32),t.NdJ("click",function(){return t.CHM(a),t.oxw(2).populateField("airport")}),t.YNc(20,K,2,1,"span",0),t.YNc(21,ce,2,0,"span",33),t.qZA()()(),t.YNc(22,pe,2,0,"small",30),t.YNc(23,be,2,0,"small",30),t.qZA()(),t.BQk()}if(2&S){const a=t.oxw(2);t.xp6(9),t.Q6J("userSettings",a.addressAutocompleteSettings)("hideDropdown",!0),t.xp6(1),t.Q6J("ngIf",a.localForm.controls.frmAirportLocalityControl.hasError("required")&&a.localForm.controls.frmAirportLocalityControl.touched),t.xp6(10),t.Q6J("ngIf",null==a.selectedFromCity?null:a.selectedFromCity.airportAddress),t.xp6(1),t.Q6J("ngIf",!(null!=a.selectedFromCity&&a.selectedFromCity.airportAddress)),t.xp6(1),t.Q6J("ngIf",a.localForm.controls.fromCityControl.hasError("required")&&a.localForm.controls.fromCityControl.touched),t.xp6(1),t.Q6J("ngIf",a.notValidSource)}}function je(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div",37)(1,"div",38)(2,"div",39)(3,"div",40),t.NdJ("click",function(){return t.CHM(a),t.oxw(2).openDateTimeSheet("start")}),t.TgZ(4,"div",41),t.O4$(),t.TgZ(5,"svg",42),t._UZ(6,"rect",43)(7,"path",44),t.qZA(),t.kcU(),t.TgZ(8,"div")(9,"div",45),t._uU(10,"TRIP DATE"),t.qZA(),t.TgZ(11,"div",46),t._uU(12),t.ALo(13,"date"),t.ALo(14,"date"),t.qZA()()()()(),t._UZ(15,"input",47),t.qZA()()}if(2&S){const a=t.oxw(2);t.xp6(12),t.AsE("",t.xi3(13,2,a.fromDate,"d MMM y"),", ",t.xi3(14,5,a.pickupTime,"shortTime"),"")}}function Be(S,j){if(1&S&&(t.TgZ(0,"option",58),t._uU(1),t.ALo(2,"date"),t.qZA()),2&S){const a=j.$implicit;t.Q6J("value",a),t.xp6(1),t.hij("",t.xi3(2,2,a,"shortTime")," ")}}function Re(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div")(1,"div",48)(2,"label",49),t._uU(3,"PICK UP"),t.qZA(),t.TgZ(4,"div",50)(5,"p-calendar",51),t.NdJ("onSelect",function(){return t.CHM(a),t.oxw(2).onFromDateChanged()})("ngModelChange",function(u){return t.CHM(a),t.oxw(2).fromDate=u})("onShow",function(){return t.CHM(a),t.oxw(2).onCalendarOpen()}),t.qZA(),t.TgZ(6,"p-calendar",52,53),t.NdJ("onSelect",function(){return t.CHM(a),t.oxw(2).onFromDateChanged()})("ngModelChange",function(u){return t.CHM(a),t.oxw(2).fromDate=u})("onShow",function(){return t.CHM(a),t.oxw(2).onCalendarOpen()}),t.qZA(),t.TgZ(8,"a"),t._UZ(9,"i",54),t.qZA()()(),t.TgZ(10,"div",48)(11,"label",55),t._uU(12,"Pick up at"),t.qZA(),t.TgZ(13,"div",50)(14,"select",56),t.NdJ("change",function(){return t.CHM(a),t.oxw(2).didSelectPickUpTime()})("ngModelChange",function(u){return t.CHM(a),t.oxw(2).pickupTime=u}),t.YNc(15,Be,3,5,"option",57),t.qZA(),t.TgZ(16,"a"),t._UZ(17,"i",54),t.qZA()()()()}if(2&S){const a=t.oxw(2);t.xp6(5),t.Q6J("readonlyInput",!0)("selectOtherMonths",!0)("minDate",a.minFromDate)("ngModel",a.fromDate),t.xp6(1),t.Q6J("readonlyInput",!0)("touchUI",!0)("selectOtherMonths",!0)("minDate",a.minFromDate)("ngModel",a.fromDate),t.xp6(8),t.Q6J("ngModel",a.pickupTime),t.xp6(1),t.Q6J("ngForOf",a.pickUpTimeOptions)}}function Ge(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div",59)(1,"p-calendar",60),t.NdJ("ngModelChange",function(u){return t.CHM(a),t.oxw(2).fromDate=u}),t.qZA()()}if(2&S){const a=t.oxw(2);t.xp6(1),t.Q6J("ngModel",a.fromDate)}}function mt(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1,"You are in incognito window please use normal browser."),t.qZA())}
1function Ut(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"button",89),t.NdJ("click",function(){const o=t.CHM(a).$implicit;return t.oxw(3).onDateWheelSelect(o.date)}),t._uU(1),t.qZA()}if(2&S){const a=j.$implicit,s=t.oxw(3);t.ekj("wheel-item-active",s.isDateWheelSelected(a.date)),t.xp6(1),t.hij(" ",a.display," ")}}function Wt(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"button",89),t.NdJ("click",function(){const o=t.CHM(a).$implicit,n=t.oxw(3);return n.selectedTimeHour=o,n.onTimeWheelHourChange(),n.onTimeWheelItemClick()}),t._uU(1),t.qZA()}if(2&S){const a=j.$implicit,s=t.oxw(3);t.ekj("wheel-item-active",s.selectedTimeHour===a),t.xp6(1),t.hij(" ",a," ")}}function Ht(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"button",89),t.NdJ("click",function(){const o=t.CHM(a).$implicit,n=t.oxw(3);return n.selectedTimeMinute=o,n.onTimeWheelMinuteChange(),n.onTimeWheelItemClick()}),t._uU(1),t.qZA()}if(2&S){const a=j.$implicit,s=t.oxw(3);t.ekj("wheel-item-active",s.selectedTimeMinute===a),t.xp6(1),t.hij(" ",a," ")}}function Rt(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"button",89),t.NdJ("click",function(){const o=t.CHM(a).$implicit,n=t.oxw(3);return n.selectedTimeMeridiem=o,n.onTimeWheelMeridiemChange(),n.onTimeWheelItemClick()}),t._uU(1),t.qZA()}if(2&S){const a=j.$implicit,s=t.oxw(3);t.ekj("wheel-item-active",s.selectedTimeMeridiem===a),t.xp6(1),t.hij(" ",a," ")}}function Ot(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div",62)(1,"div",63),t.NdJ("click",function(){return t.CHM(a),t.oxw(2).closeDateTimeSheet()}),t.qZA(),t.TgZ(2,"div",64)(3,"div",65)(4,"div",66),t._uU(5),t.qZA(),t.TgZ(6,"button",67),t.NdJ("click",function(){return t.CHM(a),t.oxw(2).closeDateTimeSheet()}),t._uU(7,"\xd7"),t.qZA()(),t.TgZ(8,"div",68)(9,"div",69)(10,"div",70)(11,"div",71,72),t.NdJ("scroll",function(){return t.CHM(a),t.oxw(2).onWheelScroll("date")}),t.YNc(13,Ut,2,3,"button",73),t.qZA(),t._UZ(14,"div",74),t.qZA(),t.TgZ(15,"div",75)(16,"div",71,76),t.NdJ("scroll",function(){return t.CHM(a),t.oxw(2).onWheelScroll("hour")}),t.YNc(18,Wt,2,3,"button",73),t.qZA(),t._UZ(19,"div",74),t.qZA(),t.TgZ(20,"div",77),t._uU(21,":"),t.qZA(),t.TgZ(22,"div",78)(23,"div",71,79),t.NdJ("scroll",function(){return t.CHM(a),t.oxw(2).onWheelScroll("minute")}),t.YNc(25,Ht,2,3,"button",73),t.qZA(),t._UZ(26,"div",74),t.qZA(),t.TgZ(27,"div",80)(28,"div",71,81),t.NdJ("scroll",function(){return t.CHM(a),t.oxw(2).onWheelScroll("meridiem")}),t.YNc(30,Rt,2,3,"button",73),t.qZA(),t._UZ(31,"div",74),t.qZA()(),t.TgZ(32,"div",82)(33,"span",83),t._uU(34,"i"),t.qZA(),t.TgZ(35,"span"),t._uU(36,"Book up to 90 days in advance"),t.qZA()()(),t.TgZ(37,"div",84)(38,"div",85)(39,"button",86)(40,"div",45),t._uU(41,"TRIP DATE"),t.qZA(),t.TgZ(42,"div",46),t._uU(43),t.ALo(44,"date"),t.ALo(45,"date"),t.qZA(),t.TgZ(46,"div",87),t._uU(47),t.ALo(48,"date"),t.qZA()()(),t.TgZ(49,"button",88),t.NdJ("click",function(){return t.CHM(a),t.oxw(2).proceedDateTimeSheet()}),t._uU(50,"Continue"),t.qZA()()()()}if(2&S){const a=t.oxw(2);t.xp6(5),t.Oqu(a.dateTimeSheetTitle),t.xp6(8),t.Q6J("ngForOf",a.dateWheelOptions),t.xp6(5),t.Q6J("ngForOf",a.timeWheelHours),t.xp6(7),t.Q6J("ngForOf",a.timeWheelMinutes),t.xp6(5),t.Q6J("ngForOf",a.timeWheelMeridiems),t.xp6(13),t.AsE("",t.xi3(44,8,a.fromDate,"d MMM y"),", ",t.xi3(45,11,a.pickupTime,"shortTime"),""),t.xp6(4),t.Oqu(t.xi3(48,14,a.fromDate,"EEEE"))}}const It=function(S){return{btn:!0,"book-button":!0,"disable-button":S}};function qt(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div"),t.YNc(1,Se,3,0,"div",1),t.YNc(2,ge,3,5,"div",2),t.TgZ(3,"form",3),t.ynx(4),t.YNc(5,se,8,12,"div",4),t.TgZ(6,"div",5),t.YNc(7,m,12,4,"ng-container",0),t.YNc(8,V,24,7,"ng-container",0),t.YNc(9,Ye,24,7,"ng-container",0),t.qZA(),t.YNc(10,je,16,8,"div",6),t.YNc(11,Re,18,11,"div",0),t.YNc(12,Ge,2,1,"div",7),t.TgZ(13,"div",8)(14,"button",9),t.NdJ("click",function(u){return t.CHM(a),t.oxw().gotoCarSelectScreen(u)}),t._uU(15,"Explore Cabs"),t.qZA(),t.YNc(16,mt,2,0,"small",10),t.qZA(),t.BQk(),t.qZA(),t.YNc(17,Ot,51,17,"div",11),t.qZA()}if(2&S){const a=t.oxw();t.xp6(1),t.Q6J("ngIf",a.localCloseIcon),t.xp6(1),t.Q6J("ngIf",!(a.variant1Flag||a.variant2Flag)),t.xp6(1),t.Q6J("formGroup",a.localForm),t.xp6(2),t.Q6J("ngIf","airport"==a.tripType),t.xp6(2),t.Q6J("ngIf","local"==a.tripType),t.xp6(1),t.Q6J("ngIf","airport"==a.tripType&&"pick_airport"==a.subTripType),t.xp6(1),t.Q6J("ngIf","airport"==a.tripType&&"drop_airport"==a.subTripType),t.xp6(1),t.Q6J("ngIf",a.useTimeWheelPicker),t.xp6(1),t.Q6J("ngIf",!a.useTimeWheelPicker),t.xp6(1),t.Q6J("ngIf",a.useTimeWheelPicker),t.xp6(2),t.Tol(t.VKq(16,It,a.disableInCognitoWindow)),t.Q6J("disabled",a.time_zone_error||a.disableInCognitoWindow)("ngStyle",t.VKq(18,Oe,a.ixigoFlag?a.ixigoColor:a.mahindraFlag?a.mahindraColor:"")),t.xp6(2),t.Q6J("ngIf",a.disableInCognitoWindow),t.xp6(1),t.Q6J("ngIf",a.useTimeWheelPicker&&a.isDateTimeSheetOpen)}}function Jt(S,j){1&S&&(t.TgZ(0,"div",105),t._uU(1,"No Airport service"),t.qZA())}
1function Yt(S,j){if(1&S&&(t.TgZ(0,"option",58),t._uU(1),t.qZA()),2&S){const a=j.$implicit;t.s9C("value",a.id),t.xp6(1),t.hij(" ",a.tripName," ")}}function Bt(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"select",106),t.NdJ("ngModelChange",function(u){return t.CHM(a),t.oxw(3).subTripType=u})("change",function(){return t.CHM(a),t.oxw(3).changeLocalSubTripType()}),t.YNc(1,Yt,2,2,"option",57),t.qZA()}if(2&S){const a=t.oxw(3);t.Q6J("ngModel",a.subTripType),t.xp6(1),t.Q6J("ngForOf",a.localTripArray)}}function Vt(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1," Please select the trip type. "),t.qZA())}function Qt(S,j){if(1&S&&(t.TgZ(0,"div",102)(1,"div",93)(2,"label",94),t._uU(3,"Trip"),t.qZA(),t.TgZ(4,"div"),t.YNc(5,Jt,2,0,"div",103),t.YNc(6,Bt,2,2,"select",104),t.YNc(7,Vt,2,0,"small",10),t.qZA()()()),2&S){const a=t.oxw(2);t.xp6(5),t.Q6J("ngIf",!a.airportFlagStatus),t.xp6(1),t.Q6J("ngIf",a.airportFlagStatus),t.xp6(1),t.Q6J("ngIf",a.localForm.controls.frmLocalSubTripType.hasError("required")&&a.localForm.controls.frmLocalSubTripType.touched)}}function zt(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1," Please select the pickup city "),t.qZA())}function bt(S,j){if(1&S&&(t.TgZ(0,"small",61),t._uU(1),t.qZA()),2&S){const a=t.oxw(3);t.xp6(1),t.hij(" ",a.notValidLocalErrorMessage," ")}}function jt(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div",107)(1,"div",92)(2,"div",93)(3,"label",94),t._uU(4,"CITY"),t.qZA(),t.TgZ(5,"div",108)(6,"ng4geo-autocomplete",109),t.NdJ("click",function(){return t.CHM(a),t.oxw(2).populateField("fromcity")})("componentCallback",function(u){return t.CHM(a),t.oxw(2).autoCompleteCallback(u)})("focus",function(){return t.CHM(a),t.oxw(2).shouldShowTopSourceCityList=!0})("blur",function(){return t.CHM(a),t.oxw(2).shouldShowTopSourceCityList=!1}),t.qZA(),t.YNc(7,zt,2,0,"small",10),t.YNc(8,bt,2,1,"small",10),t.qZA()()()()}if(2&S){const a=t.oxw(2);t.xp6(1),t.Q6J("ngClass","col-4"),t.xp6(5),t.Q6J("userSettings",a.addressAutocompleteSettings),t.xp6(1),t.Q6J("ngIf",a.localForm.controls.fromCityControl.hasError("required")&&a.localForm.controls.fromCityControl.touched&&!a.notValidLocal),t.xp6(1),t.Q6J("ngIf",a.notValidLocal)}}function Gt(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div")(1,"div",119),t.NdJ("mousedown",function(u){return u.preventDefault()})("click",function(){const o=t.CHM(a).$implicit;return t.oxw(4).selectFromTopCities(o)}),t._uU(2),t.qZA()()}if(2&S){const a=j.$implicit;t.xp6(2),t.hij(" ",a.airportAddress," ")}}function Kt(S,j){if(1&S&&(t.TgZ(0,"div",116)(1,"div",117),t._uU(2,"Popular Airports"),t.qZA(),t.YNc(3,Gt,3,1,"div",118),t.qZA()),2&S){const a=t.oxw(3);t.xp6(3),t.Q6J("ngForOf",a.topSourceCitiesList)}}function $t(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1," Please select the airport. "),t.qZA())}function Lt(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1," Please select the valid airport. "),t.qZA())}function Xt(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1," Please select from dropdown. "),t.qZA())}function ei(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"a",120),t.NdJ("click",function(){return t.CHM(a),t.oxw(3).clearInputSource()}),t._UZ(1,"img",121),t.qZA()}}function ti(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1," Please select your address. "),t.qZA())}function ii(S,j){if(1&S&&(t.TgZ(0,"small",61),t._uU(1),t.qZA()),2&S){const a=t.oxw(4);t.xp6(1),t.hij(" ",a.notValidLocalErrorMessage," ")}}function oi(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div",122)(1,"div",93)(2,"label",94),t._uU(3,"Drop Address"),t.qZA(),t.TgZ(4,"div")(5,"div",123)(6,"ng4geo-autocomplete",124),t.NdJ("keyup",function(u){return t.CHM(a),t.oxw(3).handleKeyUp(u)})("click",function(){return t.CHM(a),t.oxw(3).populateField("airportLocality")})("componentCallback",function(u){return t.CHM(a),t.oxw(3).autoCompleteCallback(u)}),t.qZA()(),t.YNc(7,ti,2,0,"small",10),t.YNc(8,ii,2,1,"small",10),t.qZA()()()}if(2&S){const a=t.oxw(3);t.xp6(6),t.Q6J("userSettings",a.addressAutocompleteSettings),t.xp6(1),t.Q6J("ngIf",a.localForm.controls.frmAirportLocalityControl.hasError("required")&&a.localForm.controls.frmAirportLocalityControl.touched&&!a.notValidLocal),t.xp6(1),t.Q6J("ngIf",a.notValidLocal)}}function ni(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div",107)(1,"div",92)(2,"div",93)(3,"label",94),t._uU(4,"PICKUP AIRPORT"),t.qZA(),t.TgZ(5,"div",110)(6,"input",111,112),t.NdJ("ngModelChange",function(u){return t.CHM(a),t.oxw(2).selectedFromCity=u})("keyup",function(){return t.CHM(a),t.oxw(2).clearlocality()})("click",function(){return t.CHM(a),t.oxw(2).populateField("airport")})("focus",function(){return t.CHM(a),t.oxw(2).shouldShowTopSourceCityList=!0})("blur",function(){t.CHM(a);const u=t.oxw(2);return u.shouldShowTopSourceCityList=!1,u.checkIfDropdownSelected()}),t.qZA(),t.YNc(8,Kt,4,1,"div",113),t.YNc(9,$t,2,0,"small",10),t.YNc(10,Lt,2,0,"small",10),t.YNc(11,Xt,2,0,"small",10),t.YNc(12,ei,2,0,"a",114),t.qZA()()(),t.YNc(13,oi,9,3,"div",115),t.qZA()}if(2&S){const a=t.oxw(2);t.xp6(1),t.Q6J("ngClass","airport"==a.tripType?"col-3":"col-4"),t.xp6(5),t.Q6J("ngModel",a.selectedFromCity)("ngbTypeahead",a.filteredFromCityList)("inputFormatter",a.formatter)("resultFormatter",a.formatter),t.xp6(2),t.Q6J("ngIf",a.shouldShowTopSourceCityList&&!a.selectedFromCity&&a.topSourceCitiesList.length),t.xp6(1),t.Q6J("ngIf",a.localForm.controls.fromCityControl.hasError("required")&&a.localForm.controls.fromCityControl.touched&&!a.notValidLocal&&!a.dropdownValueNotSelected),t.xp6(1),t.Q6J("ngIf",a.notValidSource),t.xp6(1),t.Q6J("ngIf",a.dropdownValueNotSelected),t.xp6(1),t.Q6J("ngIf",a.selectedFromCity),t.xp6(1),t.Q6J("ngIf","airport"==a.tripType)}}function ri(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1," Please select your address. "),t.qZA())}function si(S,j){if(1&S&&(t.TgZ(0,"small",61),t._uU(1),t.qZA()),2&S){const a=t.oxw(4);t.xp6(1),t.hij(" ",a.notValidLocalErrorMessage," ")}}function ai(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div",122)(1,"div",93)(2,"label",94),t._uU(3,"Pickup Address"),t.qZA(),t.TgZ(4,"div")(5,"div",123)(6,"ng4geo-autocomplete",124),t.NdJ("keyup",function(u){return t.CHM(a),t.oxw(3).handleKeyUp(u)})("click",function(){return t.CHM(a),t.oxw(3).populateField("airportLocality")})("componentCallback",function(u){return t.CHM(a),t.oxw(3).autoCompleteCallback(u)}),t.qZA()(),t.YNc(7,ri,2,0,"small",10),t.YNc(8,si,2,1,"small",10),t.qZA()()()}if(2&S){const a=t.oxw(3);t.xp6(6),t.Q6J("userSettings",a.addressAutocompleteSettings),t.xp6(1),t.Q6J("ngIf",a.localForm.controls.frmAirportLocalityControl.hasError("required")&&a.localForm.controls.frmAirportLocalityControl.touched&&!a.notValidLocal),t.xp6(1),t.Q6J("ngIf",a.notValidLocal)}}function li(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div")(1,"div",119),t.NdJ("mousedown",function(u){return u.preventDefault()})("click",function(){const o=t.CHM(a).$implicit;return t.oxw(4).selectFromTopCities(o)}),t._uU(2),t.qZA()()}if(2&S){const a=j.$implicit;t.xp6(2),t.hij(" ",a.airportAddress," ")}}function ci(S,j){if(1&S&&(t.TgZ(0,"div",116)(1,"div",117),t._uU(2,"Popular Airports"),t.qZA(),t.YNc(3,li,3,1,"div",118),t.qZA()),2&S){const a=t.oxw(3);t.xp6(3),t.Q6J("ngForOf",a.topSourceCitiesList)}}function di(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1," Please select the airport. "),t.qZA())}function Pt(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1," Please select the valid airport. "),t.qZA())}function pi(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1," Please select from dropdown. "),t.qZA())}function ui(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"a",127),t.NdJ("click",function(){return t.CHM(a),t.oxw(3).clearInputSource()}),t._UZ(1,"img",121),t.qZA()}}function hi(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div",107),t.YNc(1,ai,9,3,"div",115),t.TgZ(2,"div",92)(3,"div",93)(4,"label",94),t._uU(5,"DROP AIRPORT"),t.qZA(),t.TgZ(6,"div",110)(7,"input",125,112),t.NdJ("ngModelChange",function(u){return t.CHM(a),t.oxw(2).selectedFromCity=u})("keyup",function(){return t.CHM(a),t.oxw(2).clearlocality()})("click",function(){return t.CHM(a),t.oxw(2).populateField("airport")})("focus",function(){return t.CHM(a),t.oxw(2).shouldShowTopSourceCityList=!0})("blur",function(){t.CHM(a);const u=t.oxw(2);return u.shouldShowTopSourceCityList=!1,u.checkIfDropdownSelected()}),t.qZA(),t.YNc(9,ci,4,1,"div",113),t.YNc(10,di,2,0,"small",10),t.YNc(11,Pt,2,0,"small",10),t.YNc(12,pi,2,0,"small",10),t.YNc(13,ui,2,0,"a",126),t.qZA()()()()}if(2&S){const a=t.oxw(2);t.xp6(1),t.Q6J("ngIf","airport"==a.tripType),t.xp6(1),t.Q6J("ngClass","airport"==a.tripType?"col-3":"col-4"),t.xp6(5),t.Q6J("ngModel",a.selectedFromCity)("ngbTypeahead",a.filteredFromCityList)("inputFormatter",a.formatter)("resultFormatter",a.formatter),t.xp6(2),t.Q6J("ngIf",a.shouldShowTopSourceCityList&&!a.selectedFromCity&&a.topSourceCitiesList.length),t.xp6(1),t.Q6J("ngIf",a.localForm.controls.fromCityControl.hasError("required")&&a.localForm.controls.fromCityControl.touched&&!a.notValidLocal&&!a.dropdownValueNotSelected),t.xp6(1),t.Q6J("ngIf",a.notValidSource),t.xp6(1),t.Q6J("ngIf",a.dropdownValueNotSelected),t.xp6(1),t.Q6J("ngIf",a.selectedFromCity)}}function At(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1," Please select the departure date. "),t.qZA())}function _i(S,j){if(1&S&&(t.TgZ(0,"mat-option",58),t._uU(1),t.ALo(2,"date"),t.qZA()),2&S){const a=j.$implicit;t.Q6J("value",a),t.xp6(1),t.hij(" ",t.xi3(2,2,a,"shortTime")," ")}}function mi(S,j){if(1&S&&(t.TgZ(0,"small",61),t._uU(1),t.qZA()),2&S){const a=t.oxw(2);t.xp6(1),t.hij(" ",a.pickupTimeErrorMessage," ")}}function gi(S,j){if(1&S&&(t.TgZ(0,"small",61),t._uU(1),t.qZA()),2&S){const a=t.oxw(2);t.xp6(1),t.hij(" ",a.TimeZoneErrorMessage," ")}}function fi(S,j){1&S&&(t.TgZ(0,"small",61),t._uU(1,"You are in incognito window please use normal browser."),t.qZA())}function yi(S,j){if(1&S){const a=t.EpF();t.TgZ(0,"div")(1,"form",3)(2,"div",37),t.YNc(3,Qt,8,3,"div",90),t.YNc(4,jt,9,4,"div",91),t.YNc(5,ni,14,11,"div",91),t.YNc(6,hi,14,11,"div",91),t.TgZ(7,"div",92)(8,"div",93)(9,"label",94),t._uU(10,"PICK UP DATE"),t.qZA(),t.TgZ(11,"div",95)(12,"p-calendar",96,97),t.NdJ("onSelect",function(){return t.CHM(a),t.oxw().onFromDateChanged()})("ngModelChange",function(u){return t.CHM(a),t.oxw().fromDate=u}),t.qZA(),t.TgZ(14,"a"),t._UZ(15,"i",54),t.qZA(),t.YNc(16,At,2,0,"small",10),t.qZA()()(),t.TgZ(17,"div",92)(18,"div",93)(19,"label",94),t._uU(20,"PICK UP TIME"),t.qZA(),t.TgZ(21,"div",95)(22,"mat-select",98,99),t.NdJ("valueChange",function(u){return t.CHM(a),t.oxw().pickupTime=u})("selectionChange",function(){return t.CHM(a),t.oxw().didSelectPickUpTime()}),t.YNc(24,_i,3,5,"mat-option",57),t.qZA(),t.TgZ(25,"a"),t._UZ(26,"i",54),t.qZA(),t.YNc(27,mi,2,1,"small",10),t.YNc(28,gi,2,1,"small",10),t.qZA()()()(),t.TgZ(29,"div",100)(30,"button",101),t.NdJ("click",function(u){return t.CHM(a),t.oxw().gotoCarSelectScreen(u)}),t._uU(31,"Explore Cabs"),t.qZA(),t.YNc(32,fi,2,0,"small",10),t.qZA()()()}if(2&S){const a=t.oxw();
1t.xp6(1),t.Q6J("formGroup",a.localForm),t.xp6(2),t.Q6J("ngIf","airport"==a.tripType),t.xp6(1),t.Q6J("ngIf","local"==a.tripType),t.xp6(1),t.Q6J("ngIf","airport"==a.tripType&&"pick_airport"==a.subTripType),t.xp6(1),t.Q6J("ngIf","airport"==a.tripType&&"drop_airport"==a.subTripType),t.xp6(1),t.Q6J("ngClass","airport"==a.tripType?"col-2":"col-4"),t.xp6(5),t.Q6J("readonlyInput",!0)("selectOtherMonths",!0)("minDate",a.minFromDate)("maxDate",a.maxFromDate)("ngModel",a.fromDate),t.xp6(4),t.Q6J("ngIf",a.localForm.controls.departureDateControl.hasError("required")&&a.localForm.controls.departureDateControl.touched),t.xp6(1),t.Q6J("ngClass","airport"==a.tripType?"col-2":"col-4"),t.xp6(5),t.Q6J("value",a.pickupTime),t.xp6(2),t.Q6J("ngForOf",a.pickUpTimeOptions),t.xp6(3),t.Q6J("ngIf",a.localForm.controls.pickUpTimeControl.hasError("required")&&a.localForm.controls.pickUpTimeControl.touched),t.xp6(1),t.Q6J("ngIf",a.time_zone_error),t.xp6(2),t.Tol(t.VKq(22,It,a.disableInCognitoWindow)),t.Q6J("disabled",a.time_zone_error||a.disableInCognitoWindow)("ngStyle",t.VKq(24,Oe,a.mahindraFlag?a.mahindraColor:"")),t.xp6(2),t.Q6J("ngIf",a.disableInCognitoWindow)}}let Ci=(()=>{class S{constructor(a,s,u,o,n,d,h,x){var T=this;this.bookingService=a,this.router=s,this.route=u,this.dialog=o,this.localStorage=n,this.populateService=d,this.cd=h,this.messageService=x,this.localForm=new e.cw({fromCityControl:new e.NI(null,e.kI.required),frmAirportLocalityControl:new e.NI(null,e.kI.required),frmLocalSubTripType:new e.NI("",e.kI.required),departureDateControl:new e.NI(null,e.kI.required),pickUpTimeControl:new e.NI(null,e.kI.required)}),this.time_zone_error=!1,this.mid_night_flag=!1,this.today_date_flag=!1,this.isAirport=!1,this.subTripType="drop_airport",this.pickUpTimeOptions=[],this.pickupTimeErrorMessage="Please select the pick up time.",this.TimeZoneErrorMessage="Please check your time zone",this.selectedTimePlaceHolder="Select Time",this.selectedLocaLTypePlaceHolder="Select Trip Type",this.disableInCognitoWindow=!1,this.localCloseIcon=!0,this.notValidSource=!1,this.notValidSourceErrorMessage="",this.all_info="",this.tripType="",this.airportFlagStatus=!0,this.enterSourceCity=!1,this.mahindraColor="#734b29",this.mahindraFlag=!1,this.filteredAirports=[],this.localTripArray=[{id:"pick_airport",tripName:"Pickup from Airport",trip_id:1},{id:"drop_airport",tripName:"Drop to Airport",trip_id:2}],this.airportLocalityPlaceHolder="",this.localityList=[],this.phonePeFlag="",this.paytmFlag="",this.switchToOneWayTrip=!1,this.switchToOneWayFromCity="",this.switchToOneWayToCity="",this.topSourceCitiesList=[],this.shouldShowTopSourceCityList=!1,this.mobileMode=!1,this.ixigoFlag=!1,this.ixigoColor="",this.isFieldReadOnly=!1,this.ct_errorMessage=[],this.hasInitializedCalendar=!1,this.notValidLocal=!1,this.notValidLocalErrorMessage="",this.variant1Flag=!1,this.variant2Flag=!1,this.oneHourSlotFlag=!1,this.fromDateFocus=!0,this.timeAutoFocus=!0,this.dropdownValueNotSelected=!1,this.useNewDesign=!0,this.timeWheelOptions=[],this.timeWheelHours=[],this.timeWheelMinutes=[],this.timeWheelMeridiems=[],this.selectedTimeHour="",this.selectedTimeMinute="",this.selectedTimeMeridiem="",this.defaultPickupTime="",this.isDateTimeSheetOpen=!1,this.datePickerMode="start",this.dateWheelOptions=[],this.wheelScrollTimers={},this.ignoreWheelScroll=!1,this.filteredFromCityList=L=>L.pipe((0,k.b)(200),(0,X.x)(),(0,le.w)(function(){var R=(0,r.Z)(function*(Q){if(T.enterSourceCity=!1,T.dropdownValueNotSelected=!1,!Q)return[];var ae,N=yield T.bookingService.getSourceCities();ae="airport"===T.tripType?T.filteredAirports:N;let de={page_url:"",user_input:"",trip_subtype:T.tripType,error:""};de.page_url=window.location.pathname,console.log(ae);let we=ae.slice(0).filter(ke=>{try{return"airport"===T.tripType?(Q=Q.split(" ")[0],-1!==ke.airportAddress.toLowerCase().indexOf(Q.toLowerCase().trim())||-1!==ke.searchKeyword.toLowerCase().indexOf(Q.toLowerCase().trim())):new RegExp("^"+Q.trim(),"gi").test(ke.cityName.toLowerCase())}catch(Le){return[]}}).slice(0,10);return console.log(we),T.lastFilteredResults=we,we&&we.length>0?(T.notValidSource=!1,T.dropdownValueNotSelected=!1,we):(0==T.notValidSource&&window.dataLayer.push({event:"invalid-city-entry","city-name":Q,"city-type":"source"}),T.notValidSourceErrorMessage="Please select the valid airport.",T.dropdownValueNotSelected=!1,T.notValidSource=!0,de.user_input=Q,de.error=T.notValidSourceErrorMessage,T.localStorage.save_CT_data("from_city_error",de),T.localStorage.save_analytics_data("from-city-error",de),[])});return function(Q){return R.apply(this,arguments)}}())),this.formatter=L=>"airport"===this.tripType?L.airportAddress:L.cityName,this.filteredAirportLocalityList=L=>L.pipe((0,k.b)(200),(0,X.x)(),(0,_e.U)(R=>""===R?[]:Te.f.filterArrayForLocality(R,this.localityList))),this.formatterLocality=L=>L.subarea,this.addressAutocompleteSettings={showSearchButton:!1,showRecentSearch:!1,geoCountryRestriction:["in"],showCurrentLocation:!1,inputPlaceholderText:"Enter Pickup Location",inputString:this.selectedCustomerAddress}}get useTimeWheelPicker(){return this.mobileMode}set selectedFromCity(a){console.log(a),this.dropdownValueNotSelected=!1;try{let s=this.bookingService.getSelectedSourceCity();
1s&&145==s.cityId?s.cityName="New Delhi, Delhi":s&&234==s.cityId&&(s.cityName="Mopa Airport, Goa"),console.log(s),console.log(typeof s),"airport"===this.tripType&&this.bookingService.setAirportName(null==s?void 0:s.cityName);let u=this.bookingService.getAirportName();"airport"!=this.tripType&&s&&s.cityId&&!a?a=this.bookingService.getSelectedSourceCity():"airport"===this.tripType&&u&&!a.airportId&&(a=this.bookingService.getAirportName(),console.log(a)),this.fromCitySelected=a,"airport"===this.tripType&&this.bookingService.setAirportName(a.cityName),this.bookingService.setSelectedSourceCity(a),this.fromDate&&this.computePickUpTimeOptions(new Date(this.fromDate)),this.populateService.setToCityFocusedValue(a)}catch(s){console.log(s)}}onInputClick(){this.isFieldReadOnly=!0,setTimeout(()=>{this.onInputFocus()},0)}onInputFocus(){const a=document.getElementById("fromCityList");a&&a.focus()}get selectedFromCity(){return this.fromCitySelected}clearlocality(){"local"==this.tripType?(this.bookingService.setSubTripType(""),this.bookingService.setPreviousSubTripType(""),this.subTripType=""):(this.bookingService.setSubTripType(this.subTripType),this.bookingService.setPreviousSubTripType(this.subTripType))}selectFromTopCities(a){this.selectedFromCity=a,this.enterSourceCity=!1}changeLocalSubTripType(){var a=this;return(0,r.Z)(function*(){a.bookingService.setSubTripType(a.subTripType),a.bookingService.setPreviousSubTripType(a.subTripType),a.setAirportLocalityPlaceHolder()})()}autoCompleteCallback(a){var s=this;return(0,r.Z)(function*(){var u,o,n,d,h,x,T;s.notValidLocal=!1;const L=Q=>{const N=(Q||"").split(",").map(ae=>ae.trim()).filter(Boolean);return{cityOnly:N[0]||"",stateOnly:N[1]||""}},R=function(){var Q=(0,r.Z)(function*(){const N=null==a?void 0:a._cityMap;if(!N)return null;const ae=yield s.bookingService.getSourceCities(),de=(N.is_city||L(N.city_name).cityOnly||"").toString().trim(),we=(N.State||L(N.city_name).stateOnly||"").toString().trim();if(de&&we){const ke=ae.find(Le=>(Le.cityOnly||"").toLowerCase()===de.toLowerCase()&&(Le.stateOnly||"").toLowerCase()===we.toLowerCase());if(ke)return ke}if(N.city_id){const ke=ae.find(Le=>Number(Le.cityId)===Number(N.city_id));if(ke)return ke}return null});return function(){return Q.apply(this,arguments)}}();if(a.address_components){let Q="";const N=["sublocality_level_3","sublocality_level_2","sublocality_level_1"];for(let He=0;He<N.length;He++)for(let Ue=0;Ue<a.address_components.length;Ue++)if(a.address_components[Ue].types.indexOf(N[He])>-1){if(Q&&"sublocality_level_2"==N[He])continue;Q&&"sublocality_level_2"!=N[He]&&(Q+="-"),Q+=a.address_components[Ue].short_name}const ae=Q.split("-")[0],de=a.name,ke=a.formatted_address.split(ae)[0].replace(/,\s*$/,""),lt=`${null===(o=null===(u=a.geometry)||void 0===u?void 0:u.location)||void 0===o?void 0:o.lat},${null===(d=null===(n=a.geometry)||void 0===n?void 0:n.location)||void 0===d?void 0:d.lng}`,Ke=a.place_id;if("airport"!=s.tripType){let He=yield R();if(!He){let tt="",Qe="";for(const Ze of a.address_components)Ze.types.includes("locality")&&(tt=Ze.long_name),Ze.types.includes("administrative_area_level_1")&&(Qe=Ze.long_name);const qe=yield s.bookingService.getSourceCities();tt&&Qe&&(He=qe.find(Ze=>Ze.cityOnly.toLowerCase()===tt.toLowerCase()&&Ze.stateOnly.toLowerCase()===Qe.toLowerCase()))}He&&(s.selectedFromCity=He,s.localStorage.removeItem("nearestCityFlag")),s.localStorage.setItem("cachedSourceCity",JSON.stringify(s.selectedFromCity));const Ue={city_name:null===(h=s.selectedFromCity)||void 0===h?void 0:h.cityName,select_type:"Type"};setTimeout(()=>{s.localStorage.save_CT_data("select_from_city",Ue)},2e3)}const et={custShortAddress:de,custFullAddress:(de+", "+ke).replace(/,\s*$/,""),custLocality:Q,custLatLong:lt,isLocalityAirport:0,place_id:Ke,place:a,fullPickupAddress:a.name+", "+a.formatted_address};s.customerLocalityDetails=et,s.selectedCustomerAddress=de,"airport"!=s.tripType&&s.localStorage.setItem("custLocalityDetails",JSON.stringify(et)),s.bookingService.setCustomerLocalityDetails(et),s.addressAutocompleteSettings.inputString=s.selectedCustomerAddress,s.addressAutocompleteSettings=Object.assign({},s.addressAutocompleteSettings),s.localForm.controls.frmAirportLocalityControl.setErrors({required:!1}),s.localForm.controls.frmAirportLocalityControl.markAsTouched(),console.log(typeof s.selectedFromCity),"object"==typeof s.selectedFromCity&&(null===(x=s.selectedFromCity)||void 0===x?void 0:x.cityId)>0&&(s.localForm.controls.fromCityControl.markAsUntouched(),s.fromCalendarRef&&s.fromDateFocus&&s.fromCalendarRef.nativeElement.querySelector("input").click())}else s.selectedFromCity=a,console.log(typeof s.selectedFromCity),"object"==typeof s.selectedFromCity&&(null===(T=s.selectedFromCity)||void 0===T?void 0:T.cityId)>0&&(s.localForm.controls.fromCityControl.markAsUntouched(),s.fromCalendarRef&&s.fromDateFocus&&s.fromCalendarRef.nativeElement.querySelector("input").click())})()}ngOnInit(){var a=this;return(0,r.Z)(function*(){a.bookingService.setInvalidLocalFlag(!1);const s=yield a.bookingService.getAirportNames();a.filteredAirports=s,window.innerWidth<=710&&(a.mobileMode=!0),"1"==a.localStorage.getItem("ixigoFlag")&&(a.ixigoFlag=!0,a.ixigoColor=a.localStorage.getItem("ixigoColor")),"1"==a.localStorage.getItem("mahindraFlag")&&(a.mahindraFlag=!0);const u=a.route.snapshot.queryParams.variant;if(window.location.pathname.includes("landing")&&("2"===u?(a.variant2Flag=!0,a.variant1Flag=!1):(a.variant1Flag=!0,a.variant2Flag=!1)),a.tripType||(a.tripType=a.bookingService.getTr
1ipType()),"airport"==a.tripType&&(console.log(a.subTripType),console.log(a.bookingService),console.log(a.bookingService.getSubTripType()),a.bookingService.getSubTripType()?a.subTripType=a.bookingService.getSubTripType():a.bookingService.setSubTripType(a.subTripType)),console.log(a.subTripType),yield a.getTopSourceCity(),a.localStorage.removeItem("selectedSourceCity"),a.localStorage.removeItem("selectedDestinationCity"),"pick_airport"==a.bookingService.getSubTripType()||"drop_airport"==a.bookingService.getSubTripType()||a.bookingService.setCustomerLocalityDetails(""),a.localStorage.removeItem("selectedOutStationRoute"),!a.tripType){const N=a.localStorage.getItem("trip_toggle_type");a.tripType=""!=N&&"local"==N?"local":"airport"}if(a.localStorage.setItem("OutStationlocalityFlagSet","0"),/indigo/i.test(a.router.url)&&a.bookingService.setPreviousSubTripType("pick_airport"),a.current_date_time=H.E.UNIXDateTime(H.E.convertToIST()),a.cd.destroyed||a.cd.detectChanges(),a.minFromDate=H.E.convertToIST(),a.maxFromDate=new Date(H.E.convertToIST().setFullYear(a.minFromDate.getFullYear()+1)),a.fromDate=H.E.convertToIST(),a.localStorage.isLocalStorageAvailable()||(a.disableInCognitoWindow=!0),a.phonePeFlag=a.localStorage.getItem("InAppSource"),a.paytmFlag=a.localStorage.getItem("InAppSourcePaytm"),a.localStorage.removeItem("URGENTBOOKING"),a.localStorage.removeItem("NIGHTBOOKING"),a.localStorage.removeItem("URGENTBOOKINGSET"),window.innerWidth<=500){const N=document.getElementById("fromCityList");null==N||N.addEventListener("focus",function(){this.blur()})}a.bookingService.setTripTypeId(2);const d=a.bookingService.getPreviousSubTripType();d&&(a.bookingService.setSubTripType(d),a.subTripType=d);const h=a.bookingService.getSelectedSourceCity();let x;console.log(h),a.fromCitySelected=h&&h.cityId?h:null,console.log(a.bookingService.getCustomerLocalityDetails()),x="airport"==a.tripType&&a.localStorage.getItem("custLocalityDetailsAirportPopup")?JSON.parse(a.localStorage.getItem("custLocalityDetailsAirportPopup")):"airport"!=a.tripType||a.bookingService.getCustomerLocalityDetails()?a.bookingService.getCustomerLocalityDetails():JSON.parse(a.localStorage.getItem("custLocalityDetailsPopup")),console.log(a.bookingService.getCustomerLocalityDetails()),console.log(x),("local"==a.tripType||"airport"==a.tripType)&&x&&x.custLatLong?(a.customerLocalityDetails=x,a.selectedCustomerAddress=x.custShortAddress,a.bookingService.setCustomerLocalityDetails(a.customerLocalityDetails),a.addressAutocompleteSettings.inputString=a.selectedCustomerAddress,a.addressAutocompleteSettings=Object.assign({},a.addressAutocompleteSettings)):(a.customerLocalityDetails=null,a.selectedCustomerAddress=""),"airport"!=a.tripType&&setTimeout((0,r.Z)(function*(){const N=JSON.parse(a.localStorage.getItem("custLocalityDetails")||"{}"),ae=yield a.bookingService.getSelectedSourceCity();a.selectedFromCity&&(null==N?void 0:N.custShortAddress)?(a.customerLocalityDetails=N,a.selectedCustomerAddress=a.customerLocalityDetails.custShortAddress,a.bookingService.setCustomerLocalityDetails(a.customerLocalityDetails),a.addressAutocompleteSettings.inputString=a.selectedCustomerAddress,a.addressAutocompleteSettings=Object.assign({},a.addressAutocompleteSettings)):ae&&ae.cityId&&!(null==N?void 0:N.custShortAddress)?(a.selectedCustomerAddress=ae.cityName,a.selectedFromCity=ae,a.addressAutocompleteSettings.inputString=a.selectedCustomerAddress,a.addressAutocompleteSettings=Object.assign({},a.addressAutocompleteSettings)):(a.customerLocalityDetails=null,a.selectedCustomerAddress="",a.addressAutocompleteSettings.inputString=a.selectedCustomerAddress,a.addressAutocompleteSettings=Object.assign({},a.addressAutocompleteSettings))}),100);let T=H.E.convertToIST();"local"==a.tripType&&(T=H.E.convertToIST1());const L=900*Math.ceil(H.E.UNIXDateTime(T)/900),R=new Date(T);R.setHours(23,59,59,999);const Q=H.E.UNIXDateTime(R);if("local"==a.tripType)if(Q-L<60*Ee.$x.lessThanTimeSlab*60){const N=new Date(H.E.convertToIST1().getTime()+864e5);N.setHours(0,0,0,0),T=N,a.mid_night_flag=!0,a.rem_hour=900*Math.ceil(H.E.UNIXDateTime(T)/900)-900*Math.ceil(H.E.UNIXDateTime(H.E.convertToIST1())/900),a.computePickUpTimeOptions(T)}else{a.computePickUpTimeOptions(T);let N=900*Math.ceil(H.E.UNIXDateTime(T)/900);N+="local"==a.tripType?60*Ee.$x.lessThanTimeSlab*60:14400;
1const ae=H.E.DateTimeTZFormat(N);a.pickupTime=ae}else if(Q-L<14400){const N=new Date(H.E.convertToIST().getTime()+864e5);N.setHours(0,0,0,0),T=N,a.mid_night_flag=!0,a.rem_hour=900*Math.ceil(H.E.UNIXDateTime(T)/900)-900*Math.ceil(H.E.UNIXDateTime(H.E.convertToIST())/900),a.computePickUpTimeOptions(T)}else{a.computePickUpTimeOptions(T);let N=900*Math.ceil(H.E.UNIXDateTime(T)/900);N+="local"==a.tripType?60*Ee.$x.lessThanTimeSlab*60:14400;const ae=H.E.DateTimeTZFormat(N);a.pickupTime=ae}a.bookingService.getFromDate()?(a.fromDate=a.bookingService.getFromDate(),setTimeout(()=>{a.computePickUpTimeOptions(a.fromDate)},30)):a.fromDate=T,a.bookingService.getPickupTime()&&a.bookingService.getPickUpTimeOptions()&&(a.pickupTime=a.bookingService.getPickupTime(),a.pickUpTimeOptions=a.bookingService.getPickUpTimeOptions()),a.refreshTimeWheelOptions();try{a.server_date_time=yield a.bookingService.get_date_time()}catch(N){}"local"==a.tripType?(a.isAirport=!1,a.setAirportLocalityPlaceHolder()):"airport"==a.tripType?(a.isAirport=!0,a.setAirportLocalityPlaceHolder()):a.isAirport=!1,a.localStorage.getItem("CacheServiceLocalSubTripTypes")||(yield a.bookingService.preFetchLocalSubTripTypes()),a.bookingService.roundtripDestinationCities()})()}checkIfDropdownSelected(){var a;const s=this.selectedFromCity;this.dropdownValueNotSelected="object"!=typeof s||!(null==s?void 0:s.cityName)||(null===(a=this.lastFilteredResults)||void 0===a?void 0:a.length)>0}validateValidSource(a){var s=this;return(0,r.Z)(function*(){var u,o,n,d;const h=JSON.parse(s.localStorage.getItem("custLocalityDetails")||"{}"),x=yield s.bookingService.getSelectedSourceCity(),T=s.bookingService.getSubTripType(),L=null===(o=null===(u=s.localForm)||void 0===u?void 0:u.controls)||void 0===o?void 0:o.fromCityControl,R=null===(d=null===(n=s.localForm)||void 0===n?void 0:n.controls)||void 0===d?void 0:d.frmAirportLocalityControl,Q=!(!h||!h.custShortAddress),N=!(!x||!x.cityId);a?(L&&"airport"!==T&&(!Q||!N)&&(s.notValidLocal=!0,s.notValidLocalErrorMessage="Please select from Dropdown",L.setErrors({required:!0}),L.markAsTouched()),R&&"airport"==T&&(!Q||!N)&&(s.notValidLocal=!0,s.notValidLocalErrorMessage="Please select from dropdown",R.setErrors({required:!0}),R.markAsTouched())):s.notValidSourceSub=s.bookingService.notValidLocal$.subscribe(ae=>{L&&(ae&&"airport"!==T?(!Q||!N)&&(s.notValidLocal=!0,s.notValidLocalErrorMessage="Please enter a valid pickup city",L.setErrors({required:!0}),L.markAsTouched()):(s.notValidLocal=!1,s.notValidLocalErrorMessage="",L.setErrors(null))),R&&(ae?(!Q||!N)&&(s.notValidLocal=!0,s.notValidLocalErrorMessage="Please enter a valid locality",R.setErrors({required:!0}),R.markAsTouched()):R.setErrors(null))})})()}ngAfterViewInit(){this.validateValidSource(),setTimeout(()=>{this.fromCityComponent&&this.fromCityComponent.focusInput()},300)}ngOnDestroy(){var a;null===(a=this.notValidSourceSub)||void 0===a||a.unsubscribe(),this.toggleBodyScroll(!1),this.cd.detach()}ngOnChanges(){this.cd.destroyed||this.cd.detectChanges()}setAirportLocalityPlaceHolder(){this.airportLocalityPlaceHolder="Enter Pickup Location","pick_airport"==this.subTripType&&(this.airportLocalityPlaceHolder="Enter Drop Location"),"drop_airport"==this.subTripType&&(this.airportLocalityPlaceHolder="Enter Pickup Location"),this.addressAutocompleteSettings.inputPlaceholderText=this.airportLocalityPlaceHolder,this.addressAutocompleteSettings.inputString=this.selectedCustomerAddress,this.addressAutocompleteSettings=Object.assign({},this.addressAutocompleteSettings)}getAirportLocalities(a){var s=this;return(0,r.Z)(function*(){if(a&&s.populateField("airportLocality"),s.selectedFromCity){const u=yield s.bookingService.getAirportLocalities(s.selectedFromCity.cityId);s.localityList=u.subarea}})()}resetLocalSubTripType(a){var s=this;return(0,r.Z)(function*(){let u=a.cityId;if(u>0)if(s.localStorage.getItem("CacheServiceLocalSubTripTypes")){const o=s.localStorage.getItem("CacheServiceLocalSubTripTypes");if(JSON.parse(o).value[u]){s.localTripArray=[];let d=[];for(let h of JSON.parse(o).value[u])s.localTripArray.push({id:h.sn,tripName:h.fn,trip_id:h.id}),d.push(h.sn);d.indexOf(s.subTripType)>0&&("local"==s.tripType||"airport"==s.tripType)?(s.isAirport=!0,s.setAirportLocalityPlaceHolder()):-1==d.indexOf(s.subTripType)?(s.isAirport=!1,s.subTripType=""):s.isAirport=!1}}else yield s.bookingService.preFetchLocalSubTripTypes()})()}computePickUpTimeOptions(a){var s=this;return(0,r.Z)(function*(){var u;const n=Number(null===(u=s.fromCitySelected)||void 0===u?void 0:u.cityId);s.oneHourSlotFlag=[377,145,223,114,261,81,244,36,73,320,422,330,203,48,41,126,154,84,288,171,128,219,297,218,441,8,5,2097,266,241,32,176,163,220,404,1263,329,160,104,72,178,180,212,40,2,339,63,191,384,1983,35,294,747,348,425,401,3074,53,67,412,269,90,289,405,231,111,380,354,169,141,25,4,695,248,286,80,165,18,371,345,312,157].includes(n),console.log(s.oneHourSlotFlag);let d=s.oneHourSlotFlag?3600:7200,h=new Date(s.bookingService.getFromDate());if(console.log(a),console.log(h),isNaN(h.getTime())){let L=H.E.convertToIST();("local"==s.tripType||s.mid_night_flag)&&(L=H.E.convertToIST1());const R=H.E.convertToIST(),Q=new Date(L);let N;s.today_date_flag=!1,Q.setHours(0,0,0,0)===R.setHours(0,0,0,0)&&(L=H.E.convertToIST(),s.today_date_flag=!0),s.pickUpTimeOptions=[],s.today_date_flag?"PhonePe"==s.phonePeFlag||"Paytm"==s.paytmFlag?N=900*Math.ceil(H.E.UNIXDateTime(L)/900)+14400:(N=900*Math.ceil(H.E.UNIXDateTime(L)/900)+d,s.timeAutoFocus=!1):(N=900*Math.ceil(H.E.UNIXDateTime(L)/900),s.timeAutoFocus=!0);const ae=new Date(L);ae.setHours(23,59,59,999);const de=H.E.UNIXDateTime(ae);for(;N<de;
1)s.pickUpTimeOptions.push(H.E.DateTimeTZFormat(N)),N+=900}else{const L=H.E.convertToIST(),R=new Date(h);let Q;s.today_date_flag=!1,R.setHours(0,0,0,0)===L.setHours(0,0,0,0)&&(h=H.E.convertToIST(),s.today_date_flag=!0),s.pickUpTimeOptions=[],s.today_date_flag?"PhonePe"==s.phonePeFlag||"Paytm"==s.paytmFlag?Q=900*Math.ceil(H.E.UNIXDateTime(h)/900)+14400:(Q=900*Math.ceil(H.E.UNIXDateTime(h)/900)+d,s.timeAutoFocus=!1):(Q=900*Math.ceil(H.E.UNIXDateTime(h)/900),s.timeAutoFocus=!0);const N=new Date(h);N.setHours(23,59,59,999);const ae=H.E.UNIXDateTime(N);for(;Q<ae;)s.pickUpTimeOptions.push(H.E.DateTimeTZFormat(Q)),Q+=900}const x=new Date(s.pickupTime);h.setHours(x.getHours(),x.getMinutes(),0,0),console.log(h);const T=s.pickUpTimeOptions.findIndex(L=>new Date(L).getTime()===h.getTime());if(s.pickupTime=-1!==T?s.pickUpTimeOptions[T]:s.pickUpTimeOptions[0],s.today_date_flag||s.mid_night_flag||"airport"!=s.tripType)if(s.today_date_flag&&!s.mid_night_flag&&"local"==s.tripType)s.pickupTime=s.bookingService.getPickupTime()&&s.pickupTime===s.pickUpTimeOptions[0]?s.pickUpTimeOptions[0]:s.pickUpTimeOptions[T];else if(s.today_date_flag&&!s.mid_night_flag&&"airport"===s.tripType)s.pickupTime=s.bookingService.getPickupTime()&&s.pickupTime!==s.pickUpTimeOptions[0]?s.pickUpTimeOptions[T]:s.oneHourSlotFlag?s.pickUpTimeOptions[12]:s.pickUpTimeOptions[8];else if(s.mid_night_flag){let L=new Date(a);L.setHours(0,0,0,0);let R=900*Math.ceil(H.E.UNIXDateTime(L)/900);R+="local"==s.tripType?60*Ee.$x.lessThanTimeSlab*60-s.rem_hour:14400-s.rem_hour;const Q=H.E.DateTimeTZFormat(R);s.pickupTime=s.bookingService.getPickupTime()?s.pickUpTimeOptions[T]:Q}else{let L=H.E.convertToIST();"local"==s.tripType&&(L=H.E.convertToIST1());let R=900*Math.ceil(H.E.UNIXDateTime(L)/900);R+="local"==s.tripType?60*Ee.$x.lessThanTimeSlab*60:14400;const Q=H.E.DateTimeTZFormat(R);s.bookingService.getPickupTime()===s.pickUpTimeOptions[0]?s.pickupTime=Q:s.bookingService.getPickupTime()?(s.pickupTime=s.pickUpTimeOptions[T],console.log(s.pickupTime)):s.pickupTime=Q}else s.pickupTime=s.bookingService.getPickupTime()&&s.pickupTime===s.pickUpTimeOptions[0]?s.pickUpTimeOptions[0]:s.pickUpTimeOptions[T];s.defaultPickupTime=s.pickupTime,s.refreshTimeWheelOptions()})()}gotoCarSelectScreen(a){var s;if(console.log(this.customerLocalityDetails),console.log(this.selectedCustomerAddress),"string"==typeof this.fromCitySelected){const n=this.bookingService.getPotentialSourceCity(this.fromCitySelected);null!=n&&(this.fromCitySelected=n,this.bookingService.setSelectedSourceCity(n))}this.ct_errorMessage=[],this.notValidLocal=!1,this.dropdownValueNotSelected=!1;let u=!0;if((this.fromCitySelected&&!this.fromCitySelected.cityId||!this.fromCitySelected)&&(this.localForm.controls.fromCityControl.setErrors({required:!0}),this.localForm.controls.fromCityControl.markAsTouched(),u=!1,this.ct_errorMessage.push("airport"===this.tripType?"Please select the airport.":"Please select the pickup city")),this.fromDate||(this.localForm.controls.departureDateControl.markAsTouched(),u=!1,this.ct_errorMessage.push("Please select the departure date.")),this.didSelectPickUpTime()===Ee.k2.Invalid&&(this.pickupTimeErrorMessage="Please select the pick up time.",this.localForm.controls.pickUpTimeControl.setErrors({required:!0}),this.localForm.controls.pickUpTimeControl.markAsTouched(),u=!1,this.ct_errorMessage.push("Please select the pick up time.")),"airport"===this.tripType&&(""==this.subTripType||this.subTripType==this.selectedLocaLTypePlaceHolder)&&(this.localForm.controls.frmLocalSubTripType.setErrors({required:!0}),this.localForm.controls.frmLocalSubTripType.markAsTouched(),u=!1,this.ct_errorMessage.push("Please select the trip type.")),"airport"===this.tripType?(this.customerLocalityDetails&&!this.customerLocalityDetails.custLatLong||!this.customerLocalityDetails||!this.selectedCustomerAddress)&&(this.localForm.controls.frmAirportLocalityControl.setErrors({required:!0}),this.localForm.controls.frmAirportLocalityControl.markAsTouched(),u=!1,this.ct_errorMessage.push("Please select your address.")):(this.localForm.controls.frmAirportLocalityControl.setValidators([e.kI.minLength(3),e.kI.maxLength(50)]),this.localForm.controls.frmAirportLocalityControl.updateValueAndValidity()),!0===u){this.dialog.closeAll(),this.populateService.setModifyCalendarPopOpen(!1);const n=H.E.DateFormatDDMMYY(H.E.UNIXDateTime(this.fromDate)),d=H.E.TimeFormatHHmm(new Date(this.pickupTime).getTime()/1e3);this.bookingService.setFromDate(this.fromDate),this.bookingService.setPickupTime(this.pickupTime),this.bookingService.setPickupTimeOptions(this.pickUpTimeOptions),this.bookingService.saveParamsToLocalStorage();const h="airport"===this.tripType?this.fromCitySelected.airportAddress.split(","):this.fromCitySelected.cityName.split(","),x=1,T=900*Math.ceil(H.E.UNIXDateTime(H.E.convertToIST())/900),L=[377,145,223,114,261,81,244,36,73,320,422,330,203,48,41,126,154,84,288,171,128,219,297,218,441,8,5,2097,266,241,32,176,163,220,404,1263,329,160,104,72,178,180,212,40,2,339,63,191,384,1983,35,294,747,348,425,401,3074,53,67,412,269,90,289,405,231,111,380,354,169,141,25,4,695,248,286,80,165,18,371,345,312,157],R=Number(null===(s=this.fromCitySelected)||void 0===s?void 0:s.cityId);
1this.oneHourSlotFlag=L.includes(R),console.log(this.oneHourSlotFlag);const ae=T+14400,de=this.pickupTime;de>=T+(this.oneHourSlotFlag?3600:5400)&&de<ae&&this.checkpickuptime()&&(this.localStorage.setItem("URGENTBOOKING","1"),this.localStorage.setItem("URGENTBOOKINGSET","1"));const we=new Date(this.pickupTime),ke=H.E.UNIXDateTime(we),Le=this.selectedCustomerAddress,yt=null!=this.customerLocalityDetails&&this.customerLocalityDetails.custLatLong?this.customerLocalityDetails.custLatLong:"",lt=null!=this.customerLocalityDetails&&this.customerLocalityDetails.custLocality?this.customerLocalityDetails.custLocality:"",Ke="",et=null!=this.customerLocalityDetails&&this.customerLocalityDetails.isLocalityAirport?this.customerLocalityDetails.isLocalityAirport:"";if(this.localStorage.setItem("selectedSourceCity",JSON.stringify(this.fromCitySelected)),this.localStorage.setItem("selectedSubTripType",this.subTripType),this.localStorage.setItem("customerLocalityDetails",JSON.stringify(this.customerLocalityDetails)),"airport"==this.tripType){try{let Ze=this.localStorage.getItem("user_city_name"),vi=this.localStorage.getItem("user_state_name"),gt=this.localStorage.getCacheItem("sourceCityCache"),vt=JSON.parse(this.localStorage.getItem("selectedSourceCity")),Ft=this.localStorage.getCacheItem("outstationroundTrip");console.log(vt);let ct=!0;if("drop_airport"==this.subTripType&>.filter(nt=>{let ft=nt.cityName.split(",")[0];this.fromCitySelected.cityId==nt.cityId&&ct&&-1!==Ze.toLowerCase().indexOf(ft.toLowerCase().trim())&&(ct=!1)}),"pick_airport"==this.subTripType&&Ft.filter(nt=>{let ft=nt.cityName.split(",")[0];this.fromCitySelected.cityId==nt.Source_city_id&&ct&&-1!==Ze.toLowerCase().indexOf(ft.toLowerCase().trim())&&(ct=!1)}),ct&&-1!==vt.airportAddress.toLowerCase().indexOf(Ze.toLowerCase().trim())&&(ct=!1),ct&&-1!==vt.searchKeyword.toLowerCase().indexOf(Ze.toLowerCase().trim())&&(ct=!1),console.log(ct),this.switchToOneWayTrip=ct,this.switchToOneWayTrip&&"goa"==vi.toLowerCase()&&-1!==vt.cityName.toLowerCase().indexOf("goa")&&(this.switchToOneWayTrip=!1),console.log(this.switchToOneWayTrip),this.switchToOneWayTrip&&"drop_airport"==this.subTripType){let nt=!1;gt.filter(Xe=>{let wt=Xe.cityName.split(",")[0];!nt&&-1===wt.toLowerCase().indexOf("airport")&&wt.toLowerCase().trim()==Ze.toLowerCase().trim()&&(nt=!0,this.switchToOneWayFromCity=Xe)});let ft=!1;Ft.filter(Xe=>{!ft&&Xe.Source_city_id==this.fromCitySelected.cityId&&-1!==Xe.cityName.toLowerCase().indexOf("airport")&&(ft=!0,this.switchToOneWayToCity=Xe)})}if(console.log(this.switchToOneWayTrip),this.switchToOneWayTrip&&"pick_airport"==this.subTripType){let nt=!1;gt.filter(Xe=>{!nt&&Xe.cityId==this.fromCitySelected.cityId&&(console.log(Xe),-1!==Xe.cityName.toLowerCase().indexOf("airport")&&(nt=!0,this.switchToOneWayFromCity=Xe))});let ft=!1;Ft.filter(Xe=>{let wt=Xe.cityName.split(",")[0];!ft&&-1===wt.toLowerCase().indexOf("airport")&&wt.toLowerCase().trim()==Ze.toLowerCase().trim()&&(ft=!0,this.switchToOneWayToCity=Xe)})}console.log(this.switchToOneWayTrip),console.log(this.switchToOneWayFromCity),console.log(this.switchToOneWayToCity),this.switchToOneWayTrip&&(this.switchToOneWayFromCity.cityId||(this.switchToOneWayTrip=!1),this.switchToOneWayToCity.cityId||(this.switchToOneWayTrip=!1))}catch(Ze){console.log(Ze)}this.switchToOneWayTrip&&(this.fromCitySelected=this.switchToOneWayFromCity,this.localStorage.setItem("switchToOneWayTrip",1),this.localStorage.setItem("switchToOneWayTripMode",this.localStorage.getItem("selectedSubTripType")),this.localStorage.setItem("selectedSubTripType","oneWay"))}this.localStorage.setItem("cleverTap_data",JSON.stringify({"source-city":h[0],"source-state":h[1],"trip-type":this.subTripType,itinerary:h[0],duration:x,"start-date":n,"end-date":n,"start-time":this.pickupTime,locality:lt}));let He="",Ue="",tt="",Qe="";tt=this.fromCitySelected.cityId,Qe=h[0];let qe="";switch(this.fromCitySelected&&void 0!==this.fromCitySelected.org&&(qe=this.fromCitySelected.org),this.tripType){case"local":He="2";break;case"airport":He="1";break;case"outstation":He="3";break;default:He=""}if("airport"==this.tripType)switch(this.subTripType){case"880":Ue="3";break;case"440":Ue="4";break;case"12120":Ue="12";break;case"pick_airport":Ue="1";break;case"drop_airport":Ue="2";break;case"roundTrip":Ue="8";break;case"oneWay":Ue="7";break;default:Ue=""}if(window.dataLayer.push({event:"select-trip",triptype:this.tripType,triptypeid:He,tripsubtype:"airport"==this.tripType?this.subTripType:"880",tripsubtypeid:""!=Ue?Ue:"4",pickupcity:""!=qe?qe:h[0],pickupcityid:this.fromCitySelected.cityId,dropcity:""!=qe?qe:Qe,dropcityid:tt,pickupdate:n.split("-")[2]+"-"+n.split("-")[1]+"-"+n.split("-")[0],dropdate:n.split("-")[2]+"-"+n.split("-")[1]+"-"+n.split("-")[0],pickuptime:H.E.TimeFormatHHmm(new Date(this.pickupTime).getTime()/1e3),hourstotrip:Math.round((ke-H.E.UNIXDateTime(new Date))/3600),locality:lt}),/select_cars/i.test(this.router.url)||(this.all_info=h[0]+"*"+x+"*"+this.subTripType),""!=this.localStorage.getItem("cityDomainName")&&null!=this.localStorage.getItem("cityDomainName")){let gt;if(gt=Ee.$x.savaariDomainUrl+"/select_cars?from_city_name="+this.fromCitySelected.cityName+"&from_city_id="+this.fromCitySelected.cityId+"&ftid="+(this.fromCitySelected.tid?this.fromCitySelected.tid:"")+"&trip_sub_type="+("airport"==this.tripType?this.subTripType:"")+"&trip_type="+this.tripType+"&pickup_date="+n+"&pickup_time="+d+"&customer_address="+Le+"&locality_id="+Ke+"&locality_name="+lt+"&customer_latlong="+yt+"&locality_is_airport="+et+"&airport_id="+this.fromCitySelected.airportId+"&airport_name="+this.fromCitySelected.airportAddress,"airport"==this.tripType){let vt=JSON.parse(this.localStorage.getItem("customerLocalityDetails"));gt+="&place_id="+vt.place_id,gt+="&custFullAddress="+vt.custFullAddress,gt+="&setAddress=1"}return this.localStorage.removeItem("cityDomainName"),document.location.href=gt,a.preventDefault(),!1}this.switchToOneWayTrip?("drop_airport"==this.subTripType||"pick_airport"==this.subTripType)&&this.router.navigate(["select_cars"],{queryParams:{from_city_name:this.switchToOneWayFromCity.cityName,from_city_id:this.switchToOneWayFromCity.cityId,trip_sub_type:"oneWay",trip_type:"outstation",pickup_date:n,pickup_time:d,drop_date:"",destCityId:this.switchToOneWayToCity.cityId,destCityName:this.switchToOneWayToCity.cityName}}):this.router.navigate(["select_cars"],{queryParams:{from_city_name:this.fromCitySelected.cityName,from_city_id:this.fromCitySelected.cityId,ftid:this.fromCitySelected.tid?this.fromCitySelected.tid:"",trip_sub_type:"airport"==this.tripType?this.subTripType:"",trip_type:this.tripType,pickup_date:n,pickup_time:d,customer_address:Le,locality_id:Ke,locality_name:lt,customer_latlong:yt,locality_is_airport:et,airport_id:this.fromCitySelected.airportId,airport_name:this.fromCitySelected.airportAddress}})}else{let n={error:this.ct_errorMessage.join(", "),page_url:"",trip_type:this.tripType,trip_subtype:this.subTripType};n.page_url=window.location.pathname,this.localStorage.save_CT_data("explore_button_error",n),this.localStorage.save_analytics_data("explore-button-error",n)}}onCalendarOpen(){this.calendarRef&&!this.hasInitializedCalendar&&(this.calendarRef.overlayVisible=!1,this.hasInitializedCalendar=!0)}onFromDateChanged(){const a=new Date(this.fromDate);let s=this.bookingService.getToDate();a.setHours(0,0,0,0),a>s&&(s=new Date(this.fromDate)),console.log(this.fromDate);let u={user_input:new Date(this.fromDate),page_url:"",trip_type:this.bookingService.getTr
1ipType(),trip_subtype:this.bookingService.getSubTripType()};u.page_url=window.location.pathname,this.localStorage.save_CT_data("pickup_date_fill",u),this.localStorage.save_analytics_data("pickup-date-fill",u),this.fromDateFocus=!1,this.bookingService.setFromDate(this.fromDate),this.bookingService.setToDate(s),this.mid_night_flag=!1,this.bookingService.setPickupTime(this.pickupTime),this.computePickUpTimeOptions(a),this.pickupSelect&&this.timeAutoFocus&&this.pickupSelect.open()}didSelectPickUpTime(){if(this.pickupTime===this.selectedTimePlaceHolder){let s={user_input:this.selectedTimePlaceHolder,page_url:"",trip_type:this.bookingService.getTripType(),trip_subtype:this.bookingService.getSubTripType()};return s.page_url=window.location.pathname,this.localStorage.save_CT_data("pickup_time_fill",s),this.localStorage.save_analytics_data("pickup-time-fill",s),Ee.k2.Invalid}let a={user_input:this.pickupTime,page_url:"",trip_type:this.bookingService.getTripType(),trip_subtype:this.bookingService.getSubTripType()};return a.page_url=window.location.pathname,this.localStorage.save_CT_data("pickup_time_fill",a),this.localStorage.save_analytics_data("pickup-time-fill",a),this.timeAutoFocus=!1,Ee.k2.Valid}hideModify(){const a=JSON.parse(this.localStorage.getItem("selectedSourceCity"));this.bookingService.setSelectedSourceCity(a);const s=this.localStorage.getItem("selectedSubTripType");this.bookingService.setPreviousSubTripType(s);const u=JSON.parse(this.localStorage.getItem("SelectedLocality"));u&&this.bookingService.setSelectedLocality(u)}populateField(a){console.log(this.bookingService),window.innerWidth<=800?(this.dialog.closeAll(),this.populateService.setEntryPoint(a),this.router.navigate(["populate"])):"airport"==this.tripType&&(this.addressAutocompleteSettings.inputPlaceholderText=this.airportLocalityPlaceHolder)}checkpickuptime(){var a;const s=900*Math.ceil(H.E.UNIXDateTime(H.E.convertToIST())/900),o=Number(null===(a=this.fromCitySelected)||void 0===a?void 0:a.cityId);this.oneHourSlotFlag=[377,145,223,114,261,81,244,36,73,320,422,330,203,48,41,126,154,84,288,171,128,219,297,218,441,8,5,2097,266,241,32,176,163,220,404,1263,329,160,104,72,178,180,212,40,2,339,63,191,384,1983,35,294,747,348,425,401,3074,53,67,412,269,90,289,405,231,111,380,354,169,141,25,4,695,248,286,80,165,18,371,345,312,157].includes(o),console.log(this.oneHourSlotFlag);let n=this.oneHourSlotFlag?3600:5400;if("Select Time"!=this.pickupTime){const d=Math.floor(new Date(this.pickupTime).getTime()/1e3);return d-s>=n&&d-s<=14400||d-s>=n&&d-s<=14400||void 0}return!1}checkmetro(a){return a==Ee.iz.city1||a==Ee.iz.city2||a==Ee.iz.city3||a==Ee.iz.city4||a==Ee.iz.city5||a==Ee.iz.city6||a==Ee.iz.city7}buildTimeWheelOptions(){this.timeWheelOptions=(this.pickUpTimeOptions||[]).map(a=>{const s=new Date(a);if(isNaN(s.getTime()))return null;const u=s.getHours(),o=u>=12?"PM":"AM";return{value:a,hour:String(u%12||12),minute:String(s.getMinutes()).padStart(2,"0"),meridiem:o}}).filter(Boolean)}refreshTimeWheelOptions(){var a,s;this.buildTimeWheelOptions(),this.timeWheelMeridiems=[];for(const u of this.timeWheelOptions)this.timeWheelMeridiems.includes(u.meridiem)||this.timeWheelMeridiems.push(u.meridiem);this.timeWheelMeridiems.includes(this.selectedTimeMeridiem)||(this.selectedTimeMeridiem=this.timeWheelMeridiems[0]||"AM"),this.updateTimeWheelHoursAndMinutes(),(!this.selectedTimeHour||!this.selectedTimeMinute||this.pickupTime===this.selectedTimePlaceHolder)&&this.syncTimeWheelSelectionFromPickupTime(),(null===(s=null===(a=this.localForm)||void 0===a?void 0:a.controls)||void 0===s?void 0:s.pickUpTimeControl)&&this.pickupTime&&this.localForm.controls.pickUpTimeControl.setValue(this.pickupTime)}updateTimeWheelHoursAndMinutes(){const a=[];for(const u of this.timeWheelOptions)u.meridiem===this.selectedTimeMeridiem&&(a.includes(u.hour)||a.push(u.hour));this.timeWheelHours=a,this.timeWheelHours.includes(this.selectedTimeHour)||(this.selectedTimeHour=this.timeWheelHours[0]||"");const s=[];for(const u of this.timeWheelOptions)u.meridiem===this.selectedTimeMeridiem&&u.hour===this.selectedTimeHour&&(s.includes(u.minute)||s.push(u.minute));this.timeWheelMinutes=s,this.timeWheelMinutes.includes(this.selectedTimeMinute)||(this.selectedTimeMinute=this.timeWheelMinutes[0]||"")}syncTimeWheelSelectionFromPickupTime(){const a=[this.pickupTime,this.defaultPickupTime];for(const u of a){if(!u)continue;const o=new Date(u);if(!isNaN(o.getTime())){const n=o.getHours();return this.selectedTimeMeridiem=n>=12?"PM":"AM",this.selectedTimeHour=String(n%12||12),this.selectedTimeMinute=String(o.getMinutes()).padStart(2,"0"),void this.updateTimeWheelHoursAndMinutes()}}const s=this.timeWheelOptions[0];s&&(this.selectedTimeMeridiem=s.meridiem,this.selectedTimeHour=s.hour,this.selectedTimeMinute=s.minute,this.updateTimeWheelHoursAndMinutes())}applyTimeWheelSelection(){var a,s;if(!this.timeWheelOptions.length)return;const u=this.timeWheelOptions.find(d=>d.meridiem===this.selectedTimeMeridiem&&d.hour===this.selectedTimeHour&&d.minute===this.selectedTimeMinute),o=this.timeWheelOptions.find(d=>d.meridiem===this.selectedTimeMeridiem&&d.hour===this.selectedTimeHour);this.pickupTime=(u||o||this.timeWheelOptions[0]).value,(null===(s=null===(a=this.localForm)||void 0===a?void 0:a.controls)||void 0===s?void 0:s.pickUpTimeControl)&&this.localForm.controls.pickUpTimeControl.setValue(this.pickupTime),this.didSelectPickUpTime()}onTimeWheelMeridiemChange(){this.updateTimeWheelHoursAndMinutes(),this.applyTimeWheelSelection()}onTimeWheelHourChange(){this.updateTimeWheelHoursAndMinutes(),this.applyTimeWheelSelection()}onTimeWheelMinuteChange(){this.applyTimeWheelSelection()}openDateTimeSheet(a){this.datePickerMode=a,this.isDateTimeSheetOpen=!0,this.toggleBodyScroll(!0),this.buildDateWheelOptions(),this.refreshTimeWheelOptions(),this.bookingService.setPreventClose(!0),setTimeout(()=>{this.scrollWheelsToSelection()},0)}closeDateTimeSheet(){this.isDateTimeSheetOpen=!1,this.toggleBodyScroll(!1),this.bookingService.setPreventClose(!1)}buildDateWheelOptions(){const a=new Date(this.minFromDate),s=new Date(this.minFromDate);s.setDate(s.getDate()+90);const u=this.maxFromDate&&this.maxFromDate<s?new Date(this.maxFromDate):s,o=[],n=new Date(a);n.setHours(0,0,0,0);const d=new Date(u);for(d.setHours(0,0,0,0);n<=d;){const h=new Date(n);o.push({date:h,display:this.getDateWheelDisplay(h)}),n.setDate(n.getDate()+1)}this.dateWheelOptions=o}getDateWheelDisplay(a){return H.E.convertToIST().setHours(0,0,0,0)===new Date(a).setHours(0,0,0,0)?"Today":a.toLocaleDateString("en-US",{weekday:"short",day:"2-digit",month:"short"})}isDateWheelSelected(a){return!!this.fromDate&&new Date(this.fromDate).toDateString()===new Date(a).toDateString()}onDateWheelSelect(a){this.setDateWheelValue(a,!1)}setDateWheelValue(a,s){var u,o;this.fromDate=new Date(a),this.bookingService.setFromDate(this.fromDate),(null===(o=null===(u=this.localForm)||void 0===u?void 0:u.controls)||void 0===o?void 0:o.departureDateControl)&&this.localForm.controls.departureDateControl.setValue(this.fromDate),this.onFromDateChanged(),s||setTimeout(()=>{this.scrollWheelsToSelection()},0)}proceedDateTimeSheet(){this.closeDateTimeSheet()}get dateTimeSheetTitle(){return"Select Trip Date & Time"}toggleBodyScroll(a){a?(document.body.style.overflow="hidden",document.body.style.touchAction="none"):(document.body.style.overflow="",document.body.style.touchAction="")}scrollWheelsToSelection(){this.scrollWheelToActive(this.dateWheelScrollRef),this.scrollWheelToActive(this.hourWheelScrollRef),this.scrollWheelToActive(this.minuteWheelScrollRef),this.scrollWheelToActive(this.meridiemWheelScrollRef)}onTimeWheelItemClick(){setTimeout(()=>{this.scrollWheelsToSelection()},0)}scrollWheelToActive(a){if(!(null==a?void 0:a.nativeElement))return;const s=a.nativeElement.querySelector(".wheel-item-active");s&&"function"==typeof s.scrollIntoView&&s.scrollIntoView({block:"center"})}onWheelScroll(a){this.ignoreWheelScroll||(this.wheelScrollTimers[a]&&clearTimeout(this.wheelScrollTimers[a]),this.wheelScrollTimers[a]=setTimeout(()=>{this.applyCenteredWheelSelection(a)},120))}
1applyCenteredWheelSelection(a){if(this.ignoreWheelScroll)return;const s="date"===a?this.dateWheelScrollRef:"hour"===a?this.hourWheelScrollRef:"minute"===a?this.minuteWheelScrollRef:this.meridiemWheelScrollRef,u=null==s?void 0:s.nativeElement;if(!u)return;const o=Array.from(u.querySelectorAll(".wheel-item"));if(!o.length)return;const n=u.scrollTop+u.clientHeight/2;let d=0,h=Number.POSITIVE_INFINITY;for(let T=0;T<o.length;T++){const L=o[T],Q=Math.abs(L.offsetTop+L.offsetHeight/2-n);Q<h&&(h=Q,d=T)}this.ignoreWheelScroll=!0;const x=o[d];if(null==x||x.scrollIntoView({block:"center"}),"date"===a){const T=this.dateWheelOptions[d];(null==T?void 0:T.date)&&this.setDateWheelValue(T.date,!0)}else if("hour"===a){const T=this.timeWheelHours[d];T!==this.selectedTimeHour&&(this.selectedTimeHour=T,this.onTimeWheelHourChange())}else if("minute"===a){const T=this.timeWheelMinutes[d];T!==this.selectedTimeMinute&&(this.selectedTimeMinute=T,this.onTimeWheelMinuteChange())}else{const T=this.timeWheelMeridiems[d];T!==this.selectedTimeMeridiem&&(this.selectedTimeMeridiem=T,this.onTimeWheelMeridiemChange())}setTimeout(()=>{this.ignoreWheelScroll=!1},120)}handleKeyUp(a){this.enterSourceCity=!this.selectedFromCity,""==a.target.value&&(this.selectedCustomerAddress="")}clearInputSource(){this.selectedFromCity="",this.bookingService.setSelectedSourceCity(""),"airport"!=this.tripType&&(this.addressAutocompleteSettings.inputString="",this.addressAutocompleteSettings=Object.assign({},this.addressAutocompleteSettings)),this.localStorage.removeItem("custLocalityDetails"),this.fromCitySelected=null,this.notValidSourceErrorMessage="",this.dropdownValueNotSelected=!1,this.notValidSource=!1}getTopSourceCity(){var a=this;return(0,r.Z)(function*(){try{if("airport"==a.tripType){const s=yield a.bookingService.getAirportNames();a.topSourceCitiesList=s.slice(0,10)}else{const s=yield a.bookingService.getTopSourceCities();a.topSourceCitiesList=s}}catch(s){a.topSourceCitiesList=[]}})()}}return S.\u0275fac=function(a){return new(a||S)(t.Y36(xe.L),t.Y36(Je.F0),t.Y36(Je.gz),t.Y36(M.uw),t.Y36(q.V),t.Y36(te.T),t.Y36(t.sBO),t.Y36(ee.e))},S.\u0275cmp=t.Xpm({type:S,selectors:[["app-local"]],viewQuery:function(a,s){if(1&a&&(t.Gf($,5),t.Gf(Ce,5,t.SBq),t.Gf(U.j,5),t.Gf(Ie,5),t.Gf(Fe,5,t.SBq),t.Gf(ie,5,t.SBq),t.Gf(ye,5,t.SBq),t.Gf(ve,5,t.SBq)),2&a){let u;t.iGM(u=t.CRH())&&(s.calendarRef=u.first),t.iGM(u=t.CRH())&&(s.fromCalendarRef=u.first),t.iGM(u=t.CRH())&&(s.fromCityComponent=u.first),t.iGM(u=t.CRH())&&(s.pickupSelect=u.first),t.iGM(u=t.CRH())&&(s.dateWheelScrollRef=u.first),t.iGM(u=t.CRH())&&(s.hourWheelScrollRef=u.first),t.iGM(u=t.CRH())&&(s.minuteWheelScrollRef=u.first),t.iGM(u=t.CRH())&&(s.meridiemWheelScrollRef=u.first)}},inputs:{localCloseIcon:"localCloseIcon"},features:[t.TTD],decls:2,vars:2,consts:[[4,"ngIf"],["class","closeIcon",3,"click",4,"ngIf"],["class","experience-heading d-md-none",3,"ngStyle",4,"ngIf"],[3,"formGroup"],["class","btn-toolbar justify-content-center mb-2","role","toolbar",4,"ngIf"],[1,"ow-new-form"],["class","row mx-0",4,"ngIf"],["class","ow-hidden-controls",4,"ngIf"],[2,"margin-top","30px"],["type","button",3,"disabled","ngStyle","click"],["class","text-danger",4,"ngIf"],["class","date-time-sheet",4,"ngIf"],[1,"closeIcon",3,"click"],["aria-hidden","true"],[1,"experience-heading","d-md-none",3,"ngStyle"],[1,"text-uppercase"],["role","toolbar",1,"btn-toolbar","justify-content-center","mb-2"],["role","group",1,"btn-group","mb-2"],["type","radio","name","frmLocalSubTripType","id","dropAirport","formControlName","frmLocalSubTripType","value","drop_airport",1,"btn-check",3,"ngModel","ngModelChange","change"],["for","dropAirport",1,"btn","inactive-trip-button","mb-0","round-trip-radius",3,"ngStyle"],["type","radio","name","frmLocalSubTripType","id","pickAirport","formControlName","frmLocalSubTripType","value","pick_airport",1,"btn-check",3,"ngModel","ngModelChange","change"],["for","pickAirport",1,"btn","inactive-trip-button","mb-0",3,"ngStyle"],[1,"ow-row"],[1,"ow-card","ow-from-card"],[1,"ow-card-body"],["width","14","height","18","viewBox","0 0 14 18","fill","none",1,"ow-card-icon"],["d","M7 0C3.41 0 .5 2.91.5 6.5 .5 11.09 7 18 7 18s6.5-6.91 6.5-11.5C13.5 2.91 10.59 0 7 0zm0 8.75a2.25 2.25 0 1 1 0-4.5 2.25 2.25 0 0 1 0 4.5z","fill","#90a4ae"],[1,"ow-card-content"],[1,"ow-card-label"],["id","fromCityList","formControlName","fromCityControl",1,"ow-ac-inline",3,"userSettings","hideDropdown","componentCallback","click"],["class","ow-inline-error",4,"ngIf"],[1,"ow-inline-error"],[1,"ow-card-value",3,"click"],["class","ow-value-placeholder",4,"ngIf"],[1,"ow-card","ow-to-card"],[1,"ow-ac-inline",3,"userSettings","hideDropdown","keyup","click","contextmenu","componentCallback"],[1,"ow-value-placeholder"],[1,"row","mx-0"],[1,"col-12","px-0"],[1,"trip-date-card-group"],[1,"trip-date-card",3,"click"],[1,"trip-date-card-body"],["width","18","height","18","viewBox","0 0 24 24","fill","none",1,"ow-card-icon"],["x","3","y","4","width","18","height","17","rx","2","stroke","#20a8d9","stroke-width","2"],["d","M16 2v4M8 2v4M3 10h18","stroke","#20a8d9","stroke-width","2","stroke-linecap","round"],[1,"trip-date-card-label"],[1,"trip-date-card-date"],["type","hidden","formControlName","pickUpTimeControl"],[1,"row","form-group","pt-2"],[1,"col-3","col-form-label"],[1,"input","col-9"],["placeholder","dd-mm-yyyy","inputStyleClass","form-control single-border-input","formControlName","departureDateControl","dateFormat","dd-mm-yy",1,"pCalendar",3,"readonlyInput","selectOtherMonths","minDate","ngModel","onSelect","ngModelChange","onShow"],["placeholder","dd-mm-yyyy","inputStyleClass","form-control single-border-input","formControlName","departureDateControl","dateFormat","dd-mm-yy",1,"inputCalendar","mobiCalendar",3,"readonlyInput","touchUI","selectOtherMonths","minDate","ngModel","onSelect","ngModelChange","onShow"],["calendar",""],[1,"pi","pi-chevron-down",2,"color","#20a8d9","font-size","15px"],[1,"col-3","col-form-label","pr-1"],["formControlName","pickUpTimeControl","id","pickUpTime",1,"form-control","single-border-input",2,"font-weight","500","color","#000",3,"ngModel","change","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"ow-hidden-controls"],["formControlName","departureDateControl","dateFormat","dd-mm-yy",3,"ngModel","ngModelChange"],[1,"text-danger"],[1,"date-time-sheet"],[1,"date-time-sheet-backdrop",3,"click"],[1,"date-time-sheet-panel"],[1,"date-time-sheet-header"],[1,"date-time-sheet-title"],["type","button",1,"date-time-sheet-close",3,"click"],[1,"date-time-sheet-body"],[1,"wheel-row"],[1,"wheel-column","wheel-date"],[1,"wheel-scroll",3,"scroll"],["dateWheelScroll",""],["type","button","class","wheel-item",3,"wheel-item-active","click",4,"ngFor","ngForOf"],[1,"wheel-center-highlight"],[1,"wheel-column","wheel-hour"],["hourWheelScroll",""],[1,"wheel-separator"],[1,"wheel-column","wheel-minute"],["minuteWheelScroll",""],[1,"wheel-column","wheel-meridiem"],["meridiemWheelScroll",""],[1,"date-time-sheet-info"],[1,"date-time-sheet-info-icon"],[1,"date-time-sheet-footer"],[1,"date-time-sheet-footer-cards"],["type","button",1,"trip-date-card","trip-date-card-active"],[1,"trip-date-card-time"],["type","button",1,"date-time-sheet-cta",3,"click"],["type","button",1,"wheel-item",3,"click"],["class","col-2",4,"ngIf"],["style","display: contents;",4,"ngIf"],[3,"ngClass"],[1,"form-group"],[1,"mb-0"],[1,"input"],["id","fromCalendar","placeholder","dd-mm-yyyy","inputStyleClass","form-control single-border-input","formControlName","departureDateControl","dateFormat","dd-mm-yy",1,"pCalendar",3,"readonlyInput","selectOtherMonths","minDate","maxDate","ngModel","onSelect","ngModelChange"],["fromCalendar",""],["formControlName","pickUpTimeControl",1,"w-100","pickup-time-field","form-control","mb-1",3,"value","valueChange","selectionChange"],["pickupSelect",""],[1,"explore-cabs-btn"],["type","button",2,"font-size","21p
1x",3,"disabled","ngStyle","click"],[1,"col-2"],["class","mt-2","style","color:#ff0000;font-size: 12px;",4,"ngIf"],["class","form-control single-border-input","formControlName","frmLocalSubTripType","style","font-weight: 500;color:#000;",3,"ngModel","ngModelChange","change",4,"ngIf"],[1,"mt-2",2,"color","#ff0000","font-size","12px"],["formControlName","frmLocalSubTripType",1,"form-control","single-border-input",2,"font-weight","500","color","#000",3,"ngModel","ngModelChange","change"],[2,"display","contents"],[1,"position-relative"],["id","fromCityList","formControlName","fromCityControl",2,"width","100%",3,"userSettings","click","componentCallback","focus","blur"],[1,"position-relative",2,"width","90%"],["id","fromCityList","type","text","formControlName","fromCityControl","placeholder","Start typing airport name or city",1,"form-control","single-border-input",2,"width","90%","font-weight","500","color","#000",3,"ngModel","ngbTypeahead","inputFormatter","resultFormatter","ngModelChange","keyup","click","focus","blur"],["fromCityList",""],["class","top-source-cities-holder-airport","style","width: 90%;",4,"ngIf"],["class","position-absolute mt-1","style","top:0;right: 22px;",3,"click",4,"ngIf"],["class","col-3",4,"ngIf"],[1,"top-source-cities-holder-airport",2,"width","90%"],[1,"top-city-list-title"],[4,"ngFor","ngForOf"],[1,"dropdown-item",3,"mousedown","click"],[1,"position-absolute","mt-1",2,"top","0","right","22px",3,"click"],["alt","closeIcon","src","assets/closeicon.png","width","20px","height","20px",2,"position","absolute","background-color","white"],[1,"col-3"],[1,"input-group"],[2,"width","100%",3,"userSettings","keyup","click","componentCallback"],["id","fromCityList","type","text","formControlName","fromCityControl","placeholder","Start typing airport name or city",1,"form-control","single-border-input",2,"width","100%","font-weight","500","color","#000",3,"ngModel","ngbTypeahead","inputFormatter","resultFormatter","ngModelChange","keyup","click","focus","blur"],["class","position-absolute mt-1","style","top:2px;right: 20px;",3,"click",4,"ngIf"],[1,"position-absolute","mt-1",2,"top","2px","right","20px",3,"click"]],template:function(a,s){1&a&&(t.YNc(0,qt,18,20,"div",0),t.YNc(1,yi,33,26,"div",0)),2&a&&(t.Q6J("ngIf",s.mobileMode),t.xp6(1),t.Q6J("ngIf",!s.mobileMode))},styles:[".top-source-cities-holder[_ngcontent-%COMP%]{position:absolute;z-index:1001;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;background-color:#fff;border:1px solid rgba(0,0,0,.15);border-radius:.25rem;width:100%}.top-source-cities-holder-airport[_ngcontent-%COMP%]{position:absolute;z-index:1001;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;background-color:#fff;border:1px solid rgba(0,0,0,.15);border-radius:.25rem;width:150%!important}.pickup-time-field[_ngcontent-%COMP%]{border-top:transparent;border-left:transparent;border-right:transparent;border-radius:0;margin-top:-5px;padding:9px 0!important} .pickup-time-field .mat-select-arrow{display:none!important} .pickup-time-field .mat-select-value-text{font-weight:500!important;color:#000;font-size:14px!important} .pickup-time-field .mat-form-field-underline{background-color:#ced4da!important;height:1px} .pickup-time-field.mat-focused .mat-form-field-underline{background-color:#20a8d9!important}.form-group[_ngcontent-%COMP%] .col-form-label[_ngcontent-%COMP%], .form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700;text-transform:uppercase}.form-group[_ngcontent-%COMP%] label.col-form-label[_ngcontent-%COMP%]{font-size:12px!important}.form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:18px!important}.input[_ngcontent-%COMP%]{position:relative}#pickUpTime[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none}.book-button[_ngcontent-%COMP%]:hover{background-color:#d45a19!important}.input[_ngcontent-%COMP%]{position:relative}input[type=text][_ngcontent-%COMP%]::-webkit-input-placeholder{color:#d8d8d4}.input[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{position:absolute;top:5px;right:16px;pointer-events:none}.local-btn[_ngcontent-%COMP%]{margin-top:110px}.airport-btn[_ngcontent-%COMP%]{margin-top:22px}.experience-heading[_ngcontent-%COMP%]{text-align:center;border-top:2px solid #20a8d9;border-bottom:2px solid #20a8d9;padding:2px;width:auto;margin:0 auto 16px}.experience-heading[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:16px;font-weight:700}.inactive-trip-button[_ngcontent-%COMP%]{text-transform:uppercase;font-size:12px;font-weight:700;color:#000;border:1px solid #919191;padding:6px;width:154px;box-shadow:none!important}.active-trip-button[_ngcontent-%COMP%]{color:#fff;background-color:#20a8d9;border-color:transparent}.btn-check[_ngcontent-%COMP%]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.round-trip-radius[_ngcontent-%COMP%]{border-top-left-radius:4px!important;border-bottom-left-radius:4px!important}.explore-cabs-btn[_ngcontent-%COMP%]{position:absolute;
1left:50%;top:100%;transform:translate(-50%,-50%);width:269px}.explore-cabs-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background-color:#000;color:#fff}@media only screen and (max-width: 600px){.inactive-trip-button[_ngcontent-%COMP%]{font-size:10.5px;width:136px;padding:6px 4px}}@media only screen and (max-width: 330px){.experience-heading[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px}}.ow-new-form[_ngcontent-%COMP%]{position:relative;padding-top:8px;margin-bottom:10px}.ow-row[_ngcontent-%COMP%]{display:flex;align-items:stretch;margin-bottom:8px}.ow-card[_ngcontent-%COMP%]{flex:1;border-radius:10px;padding:4px 12px;cursor:pointer;min-height:50px;display:flex;flex-direction:column;justify-content:center}.ow-from-card[_ngcontent-%COMP%], .ow-to-card[_ngcontent-%COMP%]{background:#F4FBFF;border:1.5px solid #c8e6f5}.ow-card-body[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.ow-card-icon[_ngcontent-%COMP%]{flex-shrink:0;display:block;align-self:center;margin-top:auto;margin-bottom:auto}.ow-card-label[_ngcontent-%COMP%]{font-size:10px;font-weight:700;color:#20a8d9;letter-spacing:.8px;text-transform:uppercase}.ow-card-content[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden}.ow-card-value[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:#1d1d1d;overflow:hidden;text-overflow:ellipsis;width:100%}.ow-value-placeholder[_ngcontent-%COMP%]{color:#aaa;font-weight:400}.ow-card-invalid[_ngcontent-%COMP%]{border-color:#dc3545!important}.ow-inline-error[_ngcontent-%COMP%]{font-size:12px;color:#dc3545;margin-top:4px;padding-left:2px}.ow-hidden-controls[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0;pointer-events:none;clip:rect(0,0,0,0)}.trip-date-card-group[_ngcontent-%COMP%]{display:flex;gap:10px}.trip-date-card[_ngcontent-%COMP%]{flex:1;border-radius:8px;padding:8px 10px;text-align:left;background:#F4FBFF;border:1.5px solid #c8e6f5;align-items:center}.trip-date-card-active[_ngcontent-%COMP%]{border-color:#20a8d9;box-shadow:0 0 0 1px #20a8d9 inset}.trip-date-card-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;color:#20a8d9;text-transform:uppercase}.trip-date-card-date[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#000}.trip-date-card-time[_ngcontent-%COMP%]{font-size:12px;color:#5f6b7a}.trip-date-card-body[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-height:42px}.date-time-sheet[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:1200}.date-time-sheet-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;background:rgba(0,0,0,.4)}.date-time-sheet-panel[_ngcontent-%COMP%]{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:16px 16px 0 0;max-height:90vh;display:flex;flex-direction:column}.date-time-sheet-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #e9ecef}.date-time-sheet-title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#1d1d1d}.date-time-sheet-close[_ngcontent-%COMP%]{border:none;background:#f1f3f5;border-radius:50%;width:32px;height:32px;font-size:20px;line-height:30px;color:#1d1d1d}.date-time-sheet-body[_ngcontent-%COMP%]{padding:16px}.wheel-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:10px;padding:8px 0 16px}.wheel-column[_ngcontent-%COMP%]{position:relative;border-radius:12px;background:#fff}.wheel-date[_ngcontent-%COMP%]{width:44%}.wheel-hour[_ngcontent-%COMP%], .wheel-minute[_ngcontent-%COMP%]{width:14%}.wheel-meridiem[_ngcontent-%COMP%]{width:18%}.wheel-scroll[_ngcontent-%COMP%]{height:210px;overflow-y:auto;padding:80px 6px;scroll-snap-type:y mandatory;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none}.wheel-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:0;height:0}.wheel-item[_ngcontent-%COMP%]{width:100%;border:none;background:transparent;padding:10px 6px;font-size:16px;font-weight:600;color:#9aa0a6;scroll-snap-align:center}.wheel-item-active[_ngcontent-%COMP%]{color:#1d1d1d}.wheel-center-highlight[_ngcontent-%COMP%]{pointer-events:none;position:absolute;
1left:0;right:0;top:50%;transform:translateY(-50%);height:44px;border-radius:10px;background:rgba(32,168,217,.08)}.wheel-separator[_ngcontent-%COMP%]{font-size:22px;font-weight:700;color:#6c757d;margin:0 -2px}.date-time-sheet-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;color:#6c757d;font-size:11px;padding:6px 0 0}.date-time-sheet-info-icon[_ngcontent-%COMP%]{width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid #cbd5e1;font-size:11px;color:#6c757d}.date-time-sheet-footer[_ngcontent-%COMP%]{padding:12px 16px 20px;border-top:1px solid #e9ecef}.date-time-sheet-footer-cards[_ngcontent-%COMP%]{display:flex;gap:10px;margin-bottom:12px}.date-time-sheet-cta[_ngcontent-%COMP%]{width:100%;border:none;border-radius:10px;background:#20a8d9;color:#fff;font-weight:700;font-size:16px;padding:12px} .ow-ac-inline{display:block} .ow-ac-inline .input-group-prepend{display:none!important} .ow-ac-inline .icon{display:none!important} .ow-ac-inline .input-group{background:transparent!important;border:none!important;height:auto!important;min-height:0!important;padding:0!important} .ow-ac-inline .form-control{border:none!important;background:transparent!important;padding:0!important;height:22px!important;min-height:0!important;line-height:normal!important;font-size:15px!important;font-weight:600!important;color:#1d1d1d!important;box-shadow:none!important} .ow-ac-inline .form-control::placeholder{color:#aaa!important;font-weight:400!important;font-size:15px!important} .ow-ac-inline .borderless-input>input{padding:0!important}"]}),S})()},6161:(_t,We,F)=>{F.d(We,{K:()=>Bi});var r=F(5861),t=F(4182),e=F(5e3),k=F(6631),X=F(13),le=F(5778),_e=F(7545),Te=F(3735),U=F(8653),H=F(2340);class Ee{constructor(){this.isAdditionAllowed=!0,this.isDeletionAllowed=!0,this.errorMessage="Please select the drop city",this.hasStopConflict=!1,this.isStop=!1}set selectedToCity(P){P||(this.errorMessage=this.isStop?"Please select Stop city":"Please select the drop city"),this.toCitySelected=P}get selectedToCity(){return this.toCitySelected}}var xe=F(8966),Je=F(2169),M=F(1188),q=F(4406),te=F(7488),ee=F(9808),$=F(1968),Ce=F(2801);const Ie=["dateWheelScroll"],Fe=["hourWheelScroll"],ie=["minuteWheelScroll"],ye=["meridiemWheelScroll"];function ve(g,P){1&g&&(e.TgZ(0,"small",33),e._uU(1,"Please select a valid pickup city"),e.qZA())}function Se(g,P){if(1&g&&(e.TgZ(0,"option",34),e._uU(1),e.qZA()),2&g){const i=P.$implicit;e.Q6J("value",i.value),e.xp6(1),e.Oqu(i.name)}}function De(g,P){if(1&g&&(e.TgZ(0,"option",34),e._uU(1),e.qZA()),2&g){const i=P.$implicit;e.Q6J("value",i.value),e.xp6(1),e.Oqu(i.name)}}function ge(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",52),e.NdJ("click",function(){const _=e.CHM(i).$implicit;return e.oxw(3).onDateWheelSelect(_.date)}),e._uU(1),e.qZA()}if(2&g){const i=P.$implicit,l=e.oxw(3);e.ekj("wheel-item-active",l.isDateWheelSelected(i.date)),e.xp6(1),e.hij(" ",i.display," ")}}function Oe(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",52),e.NdJ("click",function(){const _=e.CHM(i).$implicit,y=e.oxw(4);return y.selectedTimeHour=_,y.onTimeWheelHourChange(),y.onTimeWheelItemClick()}),e._uU(1),e.qZA()}if(2&g){const i=P.$implicit,l=e.oxw(4);e.ekj("wheel-item-active",l.selectedTimeHour===i),e.xp6(1),e.hij(" ",i," ")}}function se(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",52),e.NdJ("click",function(){const _=e.CHM(i).$implicit,y=e.oxw(4);return y.selectedTimeMinute=_,y.onTimeWheelMinuteChange(),y.onTimeWheelItemClick()}),e._uU(1),e.qZA()}if(2&g){const i=P.$implicit,l=e.oxw(4);e.ekj("wheel-item-active",l.selectedTimeMinute===i),e.xp6(1),e.hij(" ",i," ")}}function re(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",52),e.NdJ("click",function(){const _=e.CHM(i).$implicit,y=e.oxw(4);return y.selectedTimeMeridiem=_,y.onTimeWheelMeridiemChange(),y.onTimeWheelItemClick()}),e._uU(1),e.qZA()}if(2&g){const i=P.$implicit,l=e.oxw(4);e.ekj("wheel-item-active",l.selectedTimeMeridiem===i),e.xp6(1),e.hij(" ",i," ")}}function G(g,P){if(1&g){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",53)(2,"div",44,54),e.NdJ("scroll",function(){return e.CHM(i),e.oxw(3).onWheelScroll("hour")}),e.YNc(4,Oe,2,3,"button",46),e.qZA(),e._UZ(5,"div",47),e.qZA(),e.TgZ(6,"div",55),e._uU(7,":"),e.qZA(),e.TgZ(8,"div",56)(9,"div",44,57),e.NdJ("scroll",function(){return e.CHM(i),e.oxw(3).onWheelScroll("minute")}),e.YNc(11,se,2,3,"button",46),e.qZA(),e._UZ(12,"div",47),e.qZA(),e.TgZ(13,"div",58)(14,"div",44,59),e.NdJ("scroll",function(){return e.CHM(i),e.oxw(3).onWheelScroll("meridiem")}),e.YNc(16,re,2,3,"button",46),e.qZA(),e._UZ(17,"div",47),e.qZA(),e.BQk()}if(2&g){const i=e.oxw(3);e.xp6(4),e.Q6J("ngForOf",i.timeWheelHours),e.xp6(7),e.Q6J("ngForOf",i.timeWheelMinutes),e.xp6(
15),e.Q6J("ngForOf",i.timeWheelMeridiems)}}function m(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",35)(1,"div",36),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).closeDateTimeSheet()}),e.qZA(),e.TgZ(2,"div",37)(3,"div",38)(4,"div",39),e._uU(5),e.qZA(),e.TgZ(6,"button",40),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).closeDateTimeSheet()}),e._uU(7,"\xd7"),e.qZA()(),e.TgZ(8,"div",41)(9,"div",42)(10,"div",43)(11,"div",44,45),e.NdJ("scroll",function(){return e.CHM(i),e.oxw(2).onWheelScroll("date")}),e.YNc(13,ge,2,3,"button",46),e.qZA(),e._UZ(14,"div",47),e.qZA(),e.YNc(15,G,18,3,"ng-container",0),e.qZA()(),e.TgZ(16,"div",48)(17,"div",49)(18,"button",50),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).setDatePickerMode("start")}),e.TgZ(19,"div",24),e._uU(20,"TRIP START"),e.qZA(),e.TgZ(21,"div",25),e._uU(22),e.ALo(23,"date"),e.ALo(24,"date"),e.qZA(),e.TgZ(25,"div",26),e._uU(26),e.ALo(27,"date"),e.qZA()(),e.TgZ(28,"button",50),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).setDatePickerMode("end")}),e.TgZ(29,"div",24),e._uU(30,"TRIP END"),e.qZA(),e.TgZ(31,"div",25),e._uU(32),e.ALo(33,"date"),e.qZA(),e.TgZ(34,"div",26),e._uU(35),e.ALo(36,"date"),e.qZA()()(),e.TgZ(37,"button",51),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).proceedDateTimeSheet()}),e._uU(38,"Continue"),e.qZA()()()()}if(2&g){const i=e.oxw(2);e.xp6(5),e.Oqu(i.dateTimeSheetTitle),e.xp6(8),e.Q6J("ngForOf",i.dateWheelOptions),e.xp6(2),e.Q6J("ngIf","start"===i.datePickerMode),e.xp6(3),e.ekj("trip-date-card-active","start"===i.datePickerMode),e.xp6(4),e.AsE("",e.xi3(23,12,i.fromDate,"d MMM y"),", ",e.xi3(24,15,i.pickupTime,"shortTime"),""),e.xp6(4),e.Oqu(e.xi3(27,18,i.fromDate,"EEEE")),e.xp6(2),e.ekj("trip-date-card-active","end"===i.datePickerMode),e.xp6(4),e.Oqu(e.xi3(33,21,i.toDate,"d MMM y")),e.xp6(3),e.Oqu(e.xi3(36,24,i.toDate,"EEEE"))}}function p(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div")(1,"div",1),e._UZ(2,"span",2),e.TgZ(3,"h5",3),e._uU(4,"Char Dham Yatra Booking"),e.qZA(),e._UZ(5,"span",2),e.qZA(),e.TgZ(6,"div",4)(7,"div",5),e.NdJ("click",function(){return e.CHM(i),e.oxw().populateField("fromcity")}),e.TgZ(8,"div",6),e.O4$(),e.TgZ(9,"svg",7),e._UZ(10,"path",8),e.qZA(),e.kcU(),e.TgZ(11,"div",9)(12,"div",10),e._uU(13,"FROM"),e.qZA(),e.TgZ(14,"div",11),e._uU(15),e.qZA()()(),e.YNc(16,ve,2,0,"small",12),e.qZA(),e.TgZ(17,"div",13)(18,"div",6),e.O4$(),e.TgZ(19,"svg",7),e._UZ(20,"path",8),e.qZA(),e.kcU(),e.TgZ(21,"div",9)(22,"div",10),e._uU(23,"NUMBER OF DHAMS"),e.qZA(),e.TgZ(24,"select",14),e.NdJ("ngModelChange",function(c){return e.CHM(i),e.oxw().tripDetails.numberofDhams=c})("change",function(){e.CHM(i);const c=e.oxw();return c.onNumberOfDhamsChange(c.tripDetails.numberofDhams)}),e.YNc(25,Se,2,2,"option",15),e.qZA()()()(),e.TgZ(26,"div",13)(27,"div",6),e._UZ(28,"img",16),e.TgZ(29,"div",9)(30,"div",10),e._uU(31,"SELECT ITINERARY"),e.qZA(),e.TgZ(32,"select",14),e.NdJ("ngModelChange",function(c){return e.CHM(i),e.oxw().tripDetails.itinerary=c})("change",function(){e.CHM(i);const c=e.oxw();return c.onTripChange(c.tripDetails.itinerary)}),e.YNc(33,De,2,2,"option",15),e.qZA()()()(),e.TgZ(34,"div",17)(35,"div",18),e.NdJ("click",function(){return e.CHM(i),e.oxw().openDateTimeSheet("start")}),e.TgZ(36,"div",19),e.O4$(),e.TgZ(37,"svg",20),e._UZ(38,"rect",21)(39,"path",22),e.qZA(),e.kcU(),e.TgZ(40,"div",23)(41,"div",24),e._uU(42,"TRIP START"),e.qZA(),e.TgZ(43,"div",25),e._uU(44),e.ALo(45,"date"),e.qZA(),e.TgZ(46,"div",26),e._uU(47),e.ALo(48,"date"),e.qZA()(),e.TgZ(49,"span",27),e._uU(50,"\u203a"),e.qZA()()(),e.TgZ(51,"div",18),e.NdJ("click",function(){return e.CHM(i),e.oxw().openDateTimeSheet("end")}),e.TgZ(52,"div",19),e.O4$(),e.TgZ(53,"svg",20),e._UZ(54,"rect",21)(55,"path",22),e.qZA(),e.kcU(),e.TgZ(56,"div",23)(57,"div",24),e._uU(58,"TRIP END"),e.qZA(),e.TgZ(59,"div",25),e._uU(60),e.ALo(61,"date"),e.qZA(),e.TgZ(62,"div",26),e._uU(63),e.ALo(64,"date"),e.qZA()(),e.TgZ(65,"span",27),e._uU(66,"\u203a"),e.qZA()()()()(),e.TgZ(67,"div",28)(68,"button",29),e.NdJ("click",function(c){return e.CHM(i),e.oxw().onSubmit(c)}),e._uU(69,"Explore Cabs"),e.qZA()(),e.TgZ(70,"div",30)(71,"button",31),e.NdJ("click",function(){return e.CHM(i),e.oxw().hideModify()}),e._uU(72,"\xd7"),e.qZA()(),e.YNc(73,m,39,27,"div",32),e.qZA()}if(2&g){const i=e.oxw();e.xp6(14),e.ekj("popup-field-city-placeholder",!i.fromCitySelected),e.xp6(1),e.hij(" ",(null==i.fromCitySelected?null:i.fromCitySelected.cityName)||(null==i.fromCitySelected?null:i.fromCitySelected.org)||"Select Pickup City"," "),e.xp6(1),e.Q6J("ngIf",i.showCityError),e.xp6(8),e.Q6J("ngModel",i.tripDetails.numberofDhams),e.xp6(1),e.Q6J("ngForOf",i.numberOfDays),e.xp6(7),e.Q6J("ngModel",i.tripDetails.itinerary),e.xp6(1),e.Q6J("ngForOf",i.filteredItineraries),e.xp6(11),e.Oqu(e.xi3(45,14,i.fromDate,"d MMM y")),e.xp6(3),e.Oqu(e.xi3(48,17,i.pickupTime,"shortTime")),e.xp6(13),e.Oqu(e.xi3(61,20,i.toDate,"d MMM y")),e.xp6(3),e.Oqu(e.xi3(64,23,i.toDate,"EEEE")),e.xp6(
15),e.Q6J("disabled",i.pickupTime==i.selectedTimePlaceHolder),e.xp6(5),e.Q6J("ngIf",i.isDateTimeSheetOpen)}}function f(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"span",88),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).clearInputSource()}),e._UZ(1,"img",89),e.qZA()}}function b(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div")(1,"div",93),e.NdJ("mousedown",function(c){return c.preventDefault()})("click",function(){const _=e.CHM(i).$implicit;return e.oxw(3).selectTopSourceCity(_)}),e._uU(2),e.qZA()()}if(2&g){const i=P.$implicit;e.xp6(2),e.Oqu(i.cityName)}}function I(g,P){if(1&g&&(e.TgZ(0,"div",90)(1,"div",91),e._uU(2,"Popular Cities"),e.qZA(),e.YNc(3,b,3,1,"div",92),e.qZA()),2&g){const i=e.oxw(2);e.xp6(3),e.Q6J("ngForOf",i.topSourceCitiesList)}}function J(g,P){1&g&&(e.TgZ(0,"small",94),e._uU(1,"Please select a valid pickup city"),e.qZA())}function V(g,P){if(1&g&&(e.TgZ(0,"option",34),e._uU(1),e.qZA()),2&g){const i=P.$implicit;e.Q6J("value",i.value),e.xp6(1),e.Oqu(i.name)}}function Z(g,P){if(1&g&&(e.TgZ(0,"option",34),e._uU(1),e.qZA()),2&g){const i=P.$implicit;e.Q6J("value",i.value),e.xp6(1),e.Oqu(i.name)}}function K(g,P){if(1&g&&(e.TgZ(0,"option",34),e._uU(1),e.ALo(2,"date"),e.qZA()),2&g){const i=P.$implicit;e.Q6J("value",i),e.xp6(1),e.hij("",e.xi3(2,2,i,"shortTime")," ")}}function ce(g,P){1&g&&(e.TgZ(0,"small",94),e._uU(1," Please select the pick up time "),e.qZA())}function pe(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div")(1,"header")(2,"button",60),e.NdJ("click",function(){return e.CHM(i),e.oxw().hideModify()}),e._uU(3,"\xd7"),e.qZA(),e.TgZ(4,"div",61)(5,"h5",62),e._uU(6," Char Dham Yatra Booking "),e.qZA()()(),e.TgZ(7,"div",63)(8,"div",64)(9,"div",65)(10,"div",66)(11,"label",67),e._uU(12,"FROM"),e.qZA(),e.TgZ(13,"div",68)(14,"input",69),e.NdJ("ngModelChange",function(c){return e.CHM(i),e.oxw().fromCitySelected=c})("ngModelChange",function(c){return e.CHM(i),e.oxw().onFromCityModelChange(c)})("input",function(c){return e.CHM(i),e.oxw().onFromCityInputEvent(c)})("selectItem",function(c){return e.CHM(i),e.oxw().onFromCitySelected(c)})("focus",function(){return e.CHM(i),e.oxw().shouldShowTopSourceCityList=!0})("blur",function(){return e.CHM(i),e.oxw().shouldShowTopSourceCityList=!1}),e.qZA(),e.YNc(15,f,2,0,"span",70),e.YNc(16,I,4,1,"div",71),e.YNc(17,J,2,0,"small",72),e.qZA()()()(),e.TgZ(18,"div",73)(19,"div",74)(20,"div",66)(21,"label",67),e._uU(22,"Number of Dhams"),e.qZA(),e.TgZ(23,"select",75),e.NdJ("ngModelChange",function(c){return e.CHM(i),e.oxw().tripDetails.numberofDhams=c})("change",function(){e.CHM(i);const c=e.oxw();return c.onNumberOfDhamsChange(c.tripDetails.numberofDhams)}),e.YNc(24,V,2,2,"option",15),e.qZA()()(),e.TgZ(25,"div",76)(26,"div",66)(27,"label",67),e._uU(28,"Select Itinerary"),e.qZA(),e.TgZ(29,"select",77),e.NdJ("ngModelChange",function(c){return e.CHM(i),e.oxw().tripDetails.itinerary=c})("change",function(){e.CHM(i);const c=e.oxw();return c.onTripChange(c.tripDetails.itinerary)}),e.YNc(30,Z,2,2,"option",15),e.qZA()()()(),e.TgZ(31,"div",78)(32,"div",79)(33,"div",66)(34,"label",67),e._uU(35,"PICK UP"),e.qZA(),e.TgZ(36,"div",68)(37,"p-calendar",80),e.NdJ("onSelect",function(){return e.CHM(i),e.oxw().onFromDateChanged()})("ngModelChange",function(c){return e.CHM(i),e.oxw().fromDate=c}),e.qZA(),e.TgZ(38,"span",81),e._UZ(39,"div",82),e.qZA()()()(),e.TgZ(40,"div",79)(41,"div",66)(42,"label",67),e._uU(43,"RETURN"),e.qZA(),e.TgZ(44,"div",68)(45,"p-calendar",83),e.NdJ("ngModelChange",function(c){return e.CHM(i),e.oxw().toDate=c})("onSelect",function(){return e.CHM(i),e.oxw().onReturnDateChanged()}),e.qZA(),e.TgZ(46,"span",81),e._UZ(47,"div",82),e.qZA()()()(),e.TgZ(48,"div",79)(49,"div",66)(50,"label",67),e._uU(51,"PICK UP AT"),e.qZA(),e.TgZ(52,"div",68)(53,"select",84),e.NdJ("change",function(){return e.CHM(i),e.oxw().didSelectPickUpTime()})("ngModelChange",function(c){return e.CHM(i),e.oxw().pickupTime=c}),e.TgZ(54,"option",34),e._uU(55),e.qZA(),e.YNc(56,K,3,5,"option",15),e.qZA(),e.TgZ(57,"span",81),e._UZ(58,"div",85),e.qZA(),e.YNc(59,ce,2,0,"small",72),e.qZA()()()(),e.TgZ(60,"div",86)(61,"button",87),e.NdJ("click",function(c){return e.CHM(i),e.oxw().onSubmit(c)}),e._uU(62,"Explore Cabs"),e.qZA()()()()}if(2&g){const i=e.oxw();e.xp6(14),e.Q6J("ngModel",i.fromCitySelected)("ngbTypeahead",i.filteredFromCityList)("inputFormatter",i.formatter)("resultFormatter",i.formatter),e.xp6(1),e.Q6J("ngIf",i.fromCitySelected),e.xp6(1),e.Q6J("ngIf",i.shouldShowTopSourceCityList&&!i.fromCitySelected&&i.topSourceCitiesList.length),e.xp6(1),e.Q6J("ngIf",i.showCityError),e.xp6(6),e.Q6J("ngModel",i.tripDetails.numberofDhams),e.xp6(1),e.Q6J("ngForOf",i.numberOfDays),e.xp6(
15),e.Q6J("ngModel",i.tripDetails.itinerary),e.xp6(1),e.Q6J("ngForOf",i.filteredItineraries),e.xp6(7),e.Q6J("readonlyInput",!0)("selectOtherMonths",!0)("minDate",i.minFromDate)("maxDate",i.maxFromDate)("ngModel",i.fromDate),e.xp6(8),e.Q6J("readonlyInput",!0)("minDate",i.minReturnDate)("maxDate",i.maxFromDate)("selectOtherMonths",!0)("ngModel",i.toDate),e.xp6(8),e.Q6J("ngModel",i.pickupTime),e.xp6(1),e.Q6J("value",i.selectedTimePlaceHolder),e.xp6(1),e.Oqu(i.selectedTimePlaceHolder),e.xp6(1),e.Q6J("ngForOf",i.pickUpTimeOptions),e.xp6(3),e.Q6J("ngIf",i.pickupTime==i.selectedTimePlaceHolder),e.xp6(2),e.Q6J("disabled",i.pickupTime==i.selectedTimePlaceHolder)}}let be=(()=>{class g{constructor(i,l,c,_,y,C,D){var O=this;this.bookingService=i,this.localStorage=l,this.dialog=c,this.router=_,this.populateService=y,this.dialogRef=C,this.data=D,this.selectedTimePlaceHolder="Select Time",this.pickUpTimeOptions=[],this.mid_night_flag=!1,this.today_date_flag=!1,this.phonePeFlag="",this.paytmFlag="",this.filteredItineraries=[],this.numberofDhams=1,this.itineraryChange=!1,this.timeWheelOptions=[],this.timeWheelHours=[],this.timeWheelMinutes=[],this.timeWheelMeridiems=[],this.selectedTimeHour="",this.selectedTimeMinute="",this.selectedTimeMeridiem="",this.isDateTimeSheetOpen=!1,this.datePickerMode="start",this.dateWheelOptions=[],this.wheelScrollTimers={},this.ignoreWheelScroll=!1,this.mobileMode=!1,this.showCityError=!1,this.topSourceCitiesList=[],this.shouldShowTopSourceCityList=!1,this.windowWidth=0,this.popupOpenTime=0,this.lastFieldInteracted="",this.analyticsInitialized=!1,this.charDhamCityKeys=["new delhi","gurgaon","noida","faridabad","ghaziabad","dehradun","haridwar","rishikesh"],this.tripDetails={numberofDhams:this.numberofDhams,itinerary:"",pickUpDate:"",returnDate:"",pickUpTime:"",fromCity:null},this.numberOfDays=[{value:1,name:"1 Dham"},{value:2,name:"2 Dhams"},{value:4,name:"4 Dhams"}],this.itineraries=[{value:"Yamunotri",name:"Yamunotri"},{value:"Gangotri",name:"Gangotri"},{value:"Badrinath",name:"Badrinath"},{value:"Kedarnath",name:"Kedarnath"},{value:"Kedarnath, Badrinath",name:"Kedarnath, Badrinath"},{value:"Gangotri, Yamunotri",name:"Gangotri, Yamunotri"},{value:"Kedarnath, Badrinath, Gangotri, Yamunotri",name:"Kedarnath, Badrinath, Gangotri, Yamunotri"}],this.dhamOffsetMap={"new delhi":{1:3,2:5,4:10},gurgaon:{1:3,2:5,4:10},noida:{1:3,2:5,4:10},faridabad:{1:3,2:5,4:10},ghaziabad:{1:3,2:5,4:10},dehradun:{1:2,2:4,4:9},haridwar:{1:2,2:4,4:9},rishikesh:{1:2,2:4,4:9}},this.formatter=v=>v.cityName,this.filteredFromCityList=v=>v.pipe((0,X.b)(200),(0,le.x)(),(0,_e.w)(function(){var w=(0,r.Z)(function*(E){try{if(!E)return[];const A=yield O.bookingService.getSourceCities();if(!Array.isArray(A))return O.showCityError=!0,[];const B=A.filter(Y=>{var oe,W;if(!Y)return!1;const Pe=(null===(oe=null==Y?void 0:Y.org)||void 0===oe?void 0:oe.toLowerCase())||"",ne=(null===(W=null==Y?void 0:Y.cityOnly)||void 0===W?void 0:W.toLowerCase())||"";return O.charDhamCityKeys.includes(Pe||ne)&&new RegExp("^"+E.trim(),"i").test((null==Y?void 0:Y.cityName)||"")}).slice(0,10);return O.showCityError=!1,B}catch(A){return O.showCityError=!0,[]}});return function(E){return w.apply(this,arguments)}}()))}get dateTimeSheetTitle(){return"end"===this.datePickerMode?"Select Trip End Date":"Select Trip Start Date & Time"}isDateWheelSelected(i){const l="end"===this.datePickerMode?this.toDate:this.fromDate;return!!l&&new Date(l).toDateString()===new Date(i).toDateString()}openDateTimeSheet(i){this.datePickerMode=i,this.isDateTimeSheetOpen=!0,this.buildDateWheelOptions(),this.refreshTimeWheelOptions(),setTimeout(()=>{this.scrollWheelsToSelection()},0)}closeDateTimeSheet(){this.isDateTimeSheetOpen=!1}setDatePickerMode(i){this.datePickerMode=i,this.buildDateWheelOptions(),setTimeout(()=>{this.scrollWheelsToSelection()},0)}proceedDateTimeSheet(){if("start"!==this.datePickerMode)this.analyticsInitialized&&(this.lastFieldInteracted="return_date",this.localStorage.save_analytics_data("chardham_return_date_selected",{return_date:this.formatLocalDate(this.toDate),trip_duration_days:this.daysDiff(this.toDate,this.fromDate)})),this.closeDateTimeSheet();else{if(this.analyticsInitialized){const i=U.E.convertToIST();this.lastFieldInteracted="pickup_time",this.localStorage.save_analytics_data("chardham_pickup_date_selected",{pickup_date:this.formatLocalDate(this.fromDate),days_from_today:this.daysDiff(this.fromDate,i)}),this.pickupTime&&this.pickupTime!==this.selectedTimePlaceHolder&&this.localStorage.save_analytics_data("chardham_pickup_time_selected",{pickup_time:new Date(this.pickupTime).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),time_bucket:this.getTimeBucket(this.pickupTime)})}this.setDatePickerMode("end")}}buildDateWheelOptions(){const i="end"===this.datePickerMode?new Date(this.minReturnDate):new Date(this.minFromDate),l=new Date(this.minFromDate);l.setFullYear(l.getFullYear()+1);const c=this.maxFromDate&&this.maxFromDate<l?new Date(this.maxFromDate):l,_=[],y=new Date(i);y.setHours(0,0,0,0);const C=new Date(c);for(C.setHours(0,0,0,0);y<=C;)_.push({date:new Date(y),display:this.getDateWheelDisplay(new Date(y))}),y.setDate(y.getDate()+1);this.dateWheelOptions=_}getDateWheelDisplay(i){return U.E.convertToIST().setHours(0,0,0,0)===new Date(i).setHours(0,0,0,0)?"Today":i.toLocaleDateString("en-US",{weekday:"short",day:"2-digit",month:"short"})}onDateWheelSelect(i){this.setDateWheelValue(i,!1)}setDateWheelValue(i,l){if("end"===this.datePickerMode){const c=this.minReturnDate;return this.toDate=i<c?new Date(c):new Date(i),this.bookingService.setToDate(this.toDate),void(l||setTimeout(()=>{this.scrollWheelsToSelection()},0))}this.fromDate=new Date(i),this.bookingService.setFromDate(this.fromDate),this.onFromDateChanged(),setTimeout(()=>{this.refreshTimeWheelOptions(),l||this.scrollWheelsToSelection()},50)}buildTimeWheelOptions(){this.timeWheelOptions=(this.pickUpTimeOptions||[]).map(i=>{const l=new Date(i);if(isNaN(l.getTime()))return null;const c=l.getHours(),_=c>=12?"PM":"AM";return{value:i,hour:String(c%12||12),minute:String(l.getMinutes()).padStart(2,"0"),meridiem:_}}
1).filter(Boolean)}refreshTimeWheelOptions(){this.buildTimeWheelOptions(),this.timeWheelMeridiems=[];for(const i of this.timeWheelOptions)this.timeWheelMeridiems.includes(i.meridiem)||this.timeWheelMeridiems.push(i.meridiem);this.timeWheelMeridiems.includes(this.selectedTimeMeridiem)||(this.selectedTimeMeridiem=this.timeWheelMeridiems[0]||"AM"),this.updateTimeWheelHoursAndMinutes(),this.syncTimeWheelSelectionFromPickupTime()}updateTimeWheelHoursAndMinutes(){const i=[];for(const c of this.timeWheelOptions)c.meridiem===this.selectedTimeMeridiem&&(i.includes(c.hour)||i.push(c.hour));this.timeWheelHours=i,this.timeWheelHours.includes(this.selectedTimeHour)||(this.selectedTimeHour=this.timeWheelHours[0]||"");const l=[];for(const c of this.timeWheelOptions)c.meridiem!==this.selectedTimeMeridiem||c.hour!==this.selectedTimeHour||l.includes(c.minute)||l.push(c.minute);this.timeWheelMinutes=l,this.timeWheelMinutes.includes(this.selectedTimeMinute)||(this.selectedTimeMinute=this.timeWheelMinutes[0]||"")}syncTimeWheelSelectionFromPickupTime(){const i=new Date(this.pickupTime);if(!isNaN(i.getTime())){const c=i.getHours();return this.selectedTimeMeridiem=c>=12?"PM":"AM",this.selectedTimeHour=String(c%12||12),this.selectedTimeMinute=String(i.getMinutes()).padStart(2,"0"),void this.updateTimeWheelHoursAndMinutes()}const l=this.timeWheelOptions[0];l&&(this.selectedTimeMeridiem=l.meridiem,this.selectedTimeHour=l.hour,this.selectedTimeMinute=l.minute,this.updateTimeWheelHoursAndMinutes())}applyTimeWheelSelection(){if(!this.timeWheelOptions.length)return;const i=this.timeWheelOptions.find(_=>_.meridiem===this.selectedTimeMeridiem&&_.hour===this.selectedTimeHour&&_.minute===this.selectedTimeMinute),l=this.timeWheelOptions.find(_=>_.meridiem===this.selectedTimeMeridiem&&_.hour===this.selectedTimeHour);this.pickupTime=(i||l||this.timeWheelOptions[0]).value,this.bookingService.setPickupTime(this.pickupTime)}onTimeWheelMeridiemChange(){this.updateTimeWheelHoursAndMinutes(),this.applyTimeWheelSelection()}onTimeWheelHourChange(){this.updateTimeWheelHoursAndMinutes(),this.applyTimeWheelSelection()}onTimeWheelMinuteChange(){this.applyTimeWheelSelection()}onTimeWheelItemClick(){setTimeout(()=>{this.scrollWheelsToSelection()},0)}scrollWheelsToSelection(){this.scrollWheelToActive(this.dateWheelScrollRef),"end"!==this.datePickerMode&&(this.scrollWheelToActive(this.hourWheelScrollRef),this.scrollWheelToActive(this.minuteWheelScrollRef),this.scrollWheelToActive(this.meridiemWheelScrollRef))}scrollWheelToActive(i){if(!(null==i?void 0:i.nativeElement))return;const l=i.nativeElement.querySelector(".wheel-item-active");l&&l.scrollIntoView({block:"center"})}onWheelScroll(i){this.ignoreWheelScroll||(this.wheelScrollTimers[i]&&clearTimeout(this.wheelScrollTimers[i]),this.wheelScrollTimers[i]=setTimeout(()=>{this.applyCenteredWheelSelection(i)},120))}applyCenteredWheelSelection(i){var l;if(this.ignoreWheelScroll)return;const c="date"===i?this.dateWheelScrollRef:"hour"===i?this.hourWheelScrollRef:"minute"===i?this.minuteWheelScrollRef:this.meridiemWheelScrollRef,_=null==c?void 0:c.nativeElement;if(!_)return;const y=Array.from(_.querySelectorAll(".wheel-item"));if(!y.length)return;const C=_.scrollTop+_.clientHeight/2;let D=0,O=Number.POSITIVE_INFINITY;for(let v=0;v<y.length;v++){const E=Math.abs(y[v].offsetTop+y[v].offsetHeight/2-C);E<O&&(O=E,D=v)}if(this.ignoreWheelScroll=!0,null===(l=y[D])||void 0===l||l.scrollIntoView({block:"center"}),"date"===i){const v=this.dateWheelOptions[D];(null==v?void 0:v.date)&&this.setDateWheelValue(v.date,!0)}else if("hour"===i){const v=this.timeWheelHours[D];v!==this.selectedTimeHour&&(this.selectedTimeHour=v,this.onTimeWheelHourChange())}else if("minute"===i){const v=this.timeWheelMinutes[D];v!==this.selectedTimeMinute&&(this.selectedTimeMinute=v,this.onTimeWheelMinuteChange())}else{const v=this.timeWheelMeridiems[D];v!==this.selectedTimeMeridiem&&(this.selectedTimeMeridiem=v,this.onTimeWheelMeridiemChange())}setTimeout(()=>{this.ignoreWheelScroll=!1},200)}getTimeBucket(i){const l=new Date(i);if(isNaN(l.getTime()))return"";const c=l.getHours();return c>=5&&c<12?"morning":c>
1=12&&c<17?"afternoon":c>=17&&c<21?"evening":"night"}daysDiff(i,l){return Math.round((new Date(i).setHours(0,0,0,0)-new Date(l).setHours(0,0,0,0))/864e5)}formatLocalDate(i){const l=new Date(i);return`${l.getFullYear()}-${String(l.getMonth()+1).padStart(2,"0")}-${String(l.getDate()).padStart(2,"0")}`}getFilledFieldsCount(){var i,l,c;let _=0;return(null===(i=this.fromCitySelected)||void 0===i?void 0:i.cityId)&&_++,(null===(l=this.tripDetails)||void 0===l?void 0:l.numberofDhams)&&_++,(null===(c=this.tripDetails)||void 0===c?void 0:c.itinerary)&&_++,this.fromDate&&!isNaN(this.fromDate.getTime())&&_++,this.toDate&&!isNaN(this.toDate.getTime())&&_++,this.pickupTime&&this.pickupTime!==this.selectedTimePlaceHolder&&_++,_}ngOnInit(){this.localStorage.checkPlatform()&&window.innerWidth<=710&&(this.mobileMode=!0),this.fromCitySelected=this.data.sourceCity,this.getTopSourceCity(),console.log(this.data.sourceCity),console.log(this.data.destinationCity.cityName);const i=U.E.convertToIST(),l=new Date(i.getTime()+864e5),c=new Date(l);c.setHours(0,0,0,0),this.minFromDate=c,this.maxFromDate=new Date(U.E.convertToIST().setFullYear(this.minFromDate.getFullYear()+1)),this.phonePeFlag=this.localStorage.getItem("InAppSource"),this.paytmFlag=this.localStorage.getItem("InAppSourcePaytm"),this.mid_night_flag=!1;const _=new Date(c);_.setHours(7,0,0,0);const y=900*Math.ceil(U.E.UNIXDateTime(_)/900);if(this.pickupTime=U.E.DateTimeTZFormat(y),this.bookingService.getFromDate()){const C=this.bookingService.getFromDate();C>=c?this.fromDate=C:(this.fromDate=new Date(c),this.bookingService.setFromDate(this.fromDate))}else this.fromDate=new Date(c),this.bookingService.setFromDate(this.fromDate);this.computePickUpTimeOptions(this.fromDate),this.toDate=this.bookingService.getToDate()?this.bookingService.getToDate():this.fromDate,this.setDefaultItinerary(),this.onNumberOfDhamsChange(this.tripDetails.numberofDhams),this.onTripChange(this.data.destinationCity.cityName.split(",")[0]),this.popupOpenTime=Date.now(),this.analyticsInitialized=!0,setTimeout(()=>{var C,D,O;this.localStorage.save_analytics_data("chardham_popup_viewed",{source:"1"===this.localStorage.getItem("charDhamSeoSource")?"seo":"route_select",city:(null===(C=this.fromCitySelected)||void 0===C?void 0:C.cityName)||(null===(O=null===(D=this.data)||void 0===D?void 0:D.sourceCity)||void 0===O?void 0:O.cityName)||""})},200)}setDefaultItinerary(){const i=this.data.destinationCity.cityName.split(",")[0],l=this.itineraries.find(c=>c.name===i);l&&(this.tripDetails.itinerary=l.value)}onTripChange(i){this.itinerary=[],this.itinerary.push(i),this.tripDetails.itinerary=i,this.itineraryChange=!0,this.analyticsInitialized&&(this.lastFieldInteracted="itinerary",this.localStorage.save_analytics_data("chardham_itinerary_selected",{itinerary_name:i,dham_type:Number(this.tripDetails.numberofDhams)}))}dhamOffset(i){var l,c,_,y,C,D,O,v;const w=((null===(l=this.fromCitySelected)||void 0===l?void 0:l.org)||(null===(c=this.fromCitySelected)||void 0===c?void 0:c.cityOnly)||(null===(y=null===(_=this.data)||void 0===_?void 0:_.sourceCity)||void 0===y?void 0:y.org)||(null===(D=null===(C=this.data)||void 0===C?void 0:C.sourceCity)||void 0===D?void 0:D.cityOnly)||"").toLowerCase().trim();return null!==(v=null===(O=this.dhamOffsetMap[w])||void 0===O?void 0:O[i])&&void 0!==v?v:1===i?4:2===i?6:11}recalcDatesForNewCity(){const i=Number(this.tripDetails.numberofDhams)||1,l=this.dhamOffset(i),c=new Date(this.fromDate);c.setDate(c.getDate()+l),this.minReturnDate=c,this.toDate=new Date(c),this.bookingService.setToDate(this.toDate)}onNumberOfDhamsChange(i){var l;this.itineraryChange=!1;const c=parseInt(i,10),_=this.dhamOffset(c),y=new Date(this.fromDate);if(y.setDate(y.getDate()+_),this.minReturnDate=y,this.toDate=new Date(y),this.filteredItineraries=this.itineraries.filter(C=>{switch(c){case 1:return!C.name.includes(",")&&(C.name.includes("Yamunotri")||C.name.includes("Gangotri")||C.name.includes("Badrinath")||C.name.includes("Kedarnath"));case 2:return"Kedarnath, Badrinath, Gangotri, Yamunotri"!==C.name&&(C.name.includes("Kedarnath, Badrinath")||C.name.includes("Gangotri, Yamunotri"));case 4:return C.name.includes("Kedarnath, Badrinath, Gangotri, Yamunotri");default:return!1}}),this.analyticsInitialized){this.lastFieldInteracted="number_of_dhams";const C=(null===(l=this.numberOfDays.find(D=>D.value===c))||void 0===l?void 0:l.name)||String(c);this.localStorage.save_analytics_data("chardham_dham_selected",{dham_type:c,label:C})}}computePickUpTimeOptions(i){var l=this;return(0,r.Z)(function*(){let c=new Date(l.bookingService.getFromDate());if(console.log(i),console.log(c),isNaN(c.getTime())){let D=U.E.convertToIST1();const O=U.E.convertToIST(),v=new Date(D);let w;l.today_date_flag=!1,v.setHours(0,0,0,0)===O.setHours(0,0,0,0)&&(D=U.E.convertToIST(),l.today_date_flag=!0),l.pickUpTimeOptions=[],w=l.today_date_flag?"PhonePe"==l.phonePeFlag||"Paytm"==l.paytmFlag?900*Math.ceil(U.E.UNIXDateTime(D)/900)+14400:900*Math.ceil(U.E.UNIXDateTime(D)/900)+72
100:900*Math.ceil(U.E.UNIXDateTime(D)/900);const E=new Date(D);E.setHours(23,59,59,999);const A=U.E.UNIXDateTime(E);for(;w<A;)l.pickUpTimeOptions.push(U.E.DateTimeTZFormat(w)),w+=900}else{const D=U.E.convertToIST(),O=new Date(c);let v;l.today_date_flag=!1,O.setHours(0,0,0,0)===D.setHours(0,0,0,0)&&(c=U.E.convertToIST(),l.today_date_flag=!0),l.pickUpTimeOptions=[],v=l.today_date_flag?"PhonePe"==l.phonePeFlag||"Paytm"==l.paytmFlag?900*Math.ceil(U.E.UNIXDateTime(c)/900)+14400:900*Math.ceil(U.E.UNIXDateTime(c)/900)+7200:900*Math.ceil(U.E.UNIXDateTime(c)/900);const w=new Date(c);w.setHours(23,59,59,999);const E=U.E.UNIXDateTime(w);for(;v<E;)l.pickUpTimeOptions.push(U.E.DateTimeTZFormat(v)),v+=900}const _=new Date(U.E.convertToIST().getTime()+864e5);l.pickUpTimeOptions=l.pickUpTimeOptions.filter(D=>new Date(D)>=_);const y=new Date(l.pickupTime);c.setHours(y.getHours(),y.getMinutes(),0,0),console.log(c);const C=l.pickUpTimeOptions.findIndex(D=>new Date(D).getTime()===c.getTime());l.pickupTime=-1!==C?l.pickUpTimeOptions[C]:l.pickUpTimeOptions.length>0?l.pickUpTimeOptions[0]:l.selectedTimePlaceHolder})()}onFromDateChanged(){const i=Number(this.tripDetails.numberofDhams);if(this.fromDate&&i){const _=this.dhamOffset(i),y=new Date(this.fromDate);y.setDate(y.getDate()+_),this.minReturnDate=y,this.toDate=new Date(y)}const l=new Date(this.fromDate),c=new Date(this.pickupTime);if(l.setHours(c.getHours(),c.getMinutes(),0,0),this.bookingService.setFromDate(this.fromDate),this.bookingService.setToDate(this.toDate),this.mid_night_flag=!1,this.bookingService.setPickupTime(this.pickupTime),this.computePickUpTimeOptions(l),this.analyticsInitialized){this.lastFieldInteracted="pickup_date";const _=U.E.convertToIST();this.localStorage.save_analytics_data("chardham_pickup_date_selected",{pickup_date:this.formatLocalDate(this.fromDate),days_from_today:this.daysDiff(this.fromDate,_)})}}onReturnDateChanged(){this.analyticsInitialized&&(this.lastFieldInteracted="return_date",U.E.convertToIST(),this.localStorage.save_analytics_data("chardham_return_date_selected",{return_date:this.formatLocalDate(this.toDate),trip_duration_days:this.daysDiff(this.toDate,this.fromDate)}))}checkpickuptime(){const i=900*Math.ceil(U.E.UNIXDateTime(U.E.convertToIST())/900);if("Select Time"==this.pickupTime)return!1;{const l=new Date(this.pickupTime).getTime()/1e3;if(l-i>=5400&&l-i<14400)return!0;if(l-i>=5400&&l-i<14400)return!0}}onSubmit(i){var l,c;if(!(null===(l=this.fromCitySelected)||void 0===l?void 0:l.cityId))return this.showCityError=!0,void this.localStorage.save_analytics_data("chardham_form_error",{error_type:"missing_city",field_name:"from_city"});if(this.pickupTime===this.selectedTimePlaceHolder)return void this.localStorage.save_analytics_data("chardham_form_error",{error_type:"missing_pickup_time",field_name:"pickup_time"});this.tripDetails.pickUpDate=this.fromDate.toISOString(),this.tripDetails.returnDate=this.toDate.toISOString(),this.tripDetails.pickUpTime=this.pickupTime,this.tripDetails.fromCity=this.fromCitySelected,this.itineraryChange||(this.tripDetails.itinerary=null===(c=this.filteredItineraries[0])||void 0===c?void 0:c.value),this.itinerary=[];const _=this.tripDetails.itinerary.split(", ");let y=0;for(const D of _)this.itinerary[y]=D,y++;const C=U.E.convertToIST();this.localStorage.save_analytics_data("chardham_explore_cabs_clicked",{dham_type:Number(this.tripDetails.numberofDhams),itinerary_name:this.tripDetails.itinerary,pickup_date:this.formatLocalDate(this.fromDate),return_date:this.formatLocalDate(this.toDate),pickup_time:new Date(this.pickupTime).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),trip_duration_days:this.daysDiff(this.toDate,this.fromDate),lead_time_days:this.daysDiff(this.fromDate,C)}),this.dialogRef.close({tripDetails:this.tripDetails,event:i,itinerary:this.itinerary}),console.log("Trip Details:",this.tripDetails)}onFromCitySelected(i){const l=null==i?void 0:i.item;if(!l)return;const c=((null==l?void 0:l.org)||(null==l?void 0:l.cityOnly)||"").toLowerCase().trim();this.charDhamCityKeys.includes(c)?(this.fromCitySelected=l,this.bookingService.setSelectedSourceCity(l),this.localStorage.setItem("cachedSourceCity",JSON.stringify(l)),this.showCityError=!1,this.lastFieldInteracted="from_city",this.recalcDatesForNewCity()):(this.fromCitySelected=null,this.bookingService.setSelectedSourceCity(null),this.showCityError=!0,this.localStorage.save_analytics_data("chardham_form_error",{error_type:"invalid_city",field_name:"from_city"}))}clearInputSource(){this.fromCitySelected="",this.bookingService.setSelectedSourceCity(""),this.localStorage.removeItem("cachedSourceCity"),this.showCityError=!1}onFromCityModelChange(i){if(!i||"object"!=typeof i||!i.cityId)return("string"==typeof i?i:"").trim()?(this.bookingService.setSelectedSourceCity(""),void this.localStorage.removeItem("cachedSourceCity")):(this.fromCitySelected="",this.bookingService.setSelectedSourceCity(""),this.localStorage.removeItem("cachedSourceCity"),void(this.showCityError=!1))}onFromCityInputEvent(i){i.target.value.trim()||(this.fromCitySelected="",this.bookingService.setSelectedSourceCity(""),this.localStorage.removeItem("cachedSourceCity"),this.showCityError=!1)}selectTopSourceCity(i){this.fromCitySelected=i,this.bookingService.setSelectedSourceCity(i),this.localStorage.setItem("cachedSourceCity",JSON.stringify(i)),this.showCityError=!1,this.shouldShowTopSourceCityList=!1,this.lastFieldInteracted="from_city",this.recalcDatesForNewCity()}getTopSourceCity(){this.topSourceCitiesList=[{cityId:145,cityName:"Delhi, New Delhi",org:"New Delhi",cityOnly:"Delhi",stateOnly:"Delhi",ll:"28.557,77.164"},{cityId:73,cityName:"Gurgaon, Haryana",cityOnly:"Gurgaon",stateOnly:"Haryana",ll:"28.46,77.062"},{cityId:348,cityName:"Noida, Uttar Pradesh",cityOnly:"Noida",stateOnly:"Uttar Pradesh",ll:"28.535,77.381"},{cityId:266,cityName:"Faridabad, Haryana",cityOnly:"Faridabad",stateOnly:"Haryana",ll:"28.418,77.308"},{cityId:32,cityName:"Ghaziabad, Uttar Pradesh",cityOnly:"Ghaziabad",stateOnly:"Uttar Pradesh",ll:"28.686,77.432"},{cityId:404,cityName:"Haridwar, Uttarakhand",cityOnly:"Haridwar",stateOnly:"Uttarakhand",ll:"29.945,78.069"},{cityId:23,cityName:"Rishikesh, Uttarakhand",cityOnly:"Rishikesh",stateOnly:"Uttarakhand",ll:"30.125,78.317"},{cityId:5,cityName:"Dehradun, Uttarakhand",cityOnly:"Dehradun",stateOnly:"Uttarakhand",ll:"30.328,78.036"}]}populateField(i){if(this.localStorage.checkPlatform()&&(this.windowWidth=window.innerWidth),this.windowWidth<=800){this.localStorage.setItem("charDhamPopulateReturnFlow","1"),this.dialog.closeAll();const l=this.bookingService.getSubTripType();this.bookingService.setPreviousSubTripType(l),this.populateService.setEntryPoint(i),this.populateService.setCharDhamFlag(!0),this.router.navigate(["populate"])}}didSelectPickUpTime(){return this.pickupTime===this.selectedTimePlaceHolder?H.k2.Invalid:(this.bookingService.setPickupTime(this.pickupTime),this.analyticsInitialized&&(this.lastFieldInteracted="pickup_time",this.localStorage.save_analytics_data("chardham_pickup_time_selected",{pickup_time:new Date(this.pickupTime).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),time_bucket:this.getTimeBucket(this.pickupTime)})),H.k2.Valid)}hideModify(){this.localStorage.save_analytics_data("chardham_popup_closed",{time_spent:Math.round((Date.now()-this.popupOpenTime)/1e3),fields_filled_count:this.getFilledFieldsCount(),last_field_interacted:this.lastFieldInteracted}),this.dialog.closeAll()}}
1return g.\u0275fac=function(i){return new(i||g)(e.Y36(Je.L),e.Y36(M.V),e.Y36(xe.uw),e.Y36(q.F0),e.Y36(te.T),e.Y36(xe.so),e.Y36(xe.WI))},g.\u0275cmp=e.Xpm({type:g,selectors:[["app-chardham-popup"]],viewQuery:function(i,l){if(1&i&&(e.Gf(Ie,5,e.SBq),e.Gf(Fe,5,e.SBq),e.Gf(ie,5,e.SBq),e.Gf(ye,5,e.SBq)),2&i){let c;e.iGM(c=e.CRH())&&(l.dateWheelScrollRef=c.first),e.iGM(c=e.CRH())&&(l.hourWheelScrollRef=c.first),e.iGM(c=e.CRH())&&(l.minuteWheelScrollRef=c.first),e.iGM(c=e.CRH())&&(l.meridiemWheelScrollRef=c.first)}},decls:2,vars:2,consts:[[4,"ngIf"],[1,"popup-title-row"],[1,"popup-title-line"],[1,"popup-title-text"],[2,"padding","12px 14px 6px"],[1,"popup-field-card",2,"margin-bottom","10px","cursor","pointer",3,"click"],[1,"popup-field-card-body"],["width","14","height","18","viewBox","0 0 14 18","fill","none",1,"ow-card-icon"],["d","M7 0C3.41 0 .5 2.91.5 6.5 .5 11.09 7 18 7 18s6.5-6.91 6.5-11.5C13.5 2.91 10.59 0 7 0zm0 8.75a2.25 2.25 0 1 1 0-4.5 2.25 2.25 0 0 1 0 4.5z","fill","#90a4ae"],[1,"popup-field-card-content"],[1,"popup-field-label"],[1,"popup-field-city-value"],["class","popup-city-error",4,"ngIf"],[1,"popup-field-card",2,"margin-bottom","10px"],[1,"popup-field-select",3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],["src","assets/img/homepage/itinerary-icon.png","width","16","height","16","alt","itinerary icon",1,"ow-card-icon",2,"filter","brightness(0) saturate(100%) invert(71%) sepia(10%) saturate(436%) hue-rotate(162deg) brightness(90%) contrast(87%)"],[1,"trip-date-card-group",2,"margin-bottom","10px"],[1,"trip-date-card",3,"click"],[1,"trip-date-card-body"],["width","18","height","18","viewBox","0 0 24 24","fill","none",1,"ow-card-icon"],["x","3","y","4","width","18","height","17","rx","2","stroke","#20a8d9","stroke-width","2"],["d","M16 2v4M8 2v4M3 10h18","stroke","#20a8d9","stroke-width","2","stroke-linecap","round"],[2,"flex","1"],[1,"trip-date-card-label"],[1,"trip-date-card-date"],[1,"trip-date-card-time"],[1,"trip-date-card-chevron"],[1,"explore-cabs-btn"],[1,"book-button","btn",2,"height","44px","padding","6px 12px","font-size","12px",3,"disabled","click"],[1,"popup-close-row"],["mat-dialog-close","",1,"popup-close-btn",3,"click"],["class","date-time-sheet",4,"ngIf"],[1,"popup-city-error"],[3,"value"],[1,"date-time-sheet"],[1,"date-time-sheet-backdrop",3,"click"],[1,"date-time-sheet-panel"],[1,"date-time-sheet-header"],[1,"date-time-sheet-title"],["type","button",1,"date-time-sheet-close",3,"click"],[1,"date-time-sheet-body"],[1,"wheel-row"],[1,"wheel-column","wheel-date"],[1,"wheel-scroll",3,"scroll"],["dateWheelScroll",""],["type","button","class","wheel-item",3,"wheel-item-active","click",4,"ngFor","ngForOf"],[1,"wheel-center-highlight"],[1,"date-time-sheet-footer"],[1,"date-time-sheet-footer-cards"],["type","button",1,"trip-date-card",3,"click"],["type","button",1,"date-time-sheet-cta",3,"click"],["type","button",1,"wheel-item",3,"click"],[1,"wheel-column","wheel-hour"],["hourWheelScroll",""],[1,"wheel-separator"],[1,"wheel-column","wheel-minute"],["minuteWheelScroll",""],[1,"wheel-column","wheel-meridiem"],["meridiemWheelScroll",""],["mat-dialog-close","",1,"closeIcon",3,"click"],[1,"lang_carr"],[2,"border-radius","16px 16px 0 0","background-color","#20a8d9","color","white","padding","10px","font-size","1rem","text-align","center","font-weight","bold"],[1,"container"],[1,"row","mx-1","mt-3"],[1,"col-12"],[1,"form-group"],[1,"mb-0"],[1,"position-relative"],["id","popupFromCityList","type","text","placeholder","Enter Pickup City",1,"single-border-input","form-control",2,"font-weight","500","color","#000",3,"ngModel","ngbTypeahead","inputFormatter","resultFormatter","ngModelChange","input","selectItem","focus","blur"],["class","position-absolute mt-1","style","top: 0; right: 0; cursor: pointer; background-color: white;",3,"click",4,"ngIf"],["class","top-source-cities-holder",4,"ngIf"],["class","text-danger",4,"ngIf"],[1,"row","mx-1","mt-2"],[1,"col-5"],["id","source-city",1,"single-border-input",3,"ngModel","ngModelChange","change"],[1,"col-7"],["id","itinerary",1,"single-border-input",3,"ngModel","ngModelChange","change"],[1,"row","mx-1"],[1,"col-4"],["placeholder","dd-mm-yyyy","inputStyleClass","form-control single-border-input","dateFormat","dd-mm-yy",1,"pCalendar",3,"readonlyInput","selectOtherMonths","minDate","maxDate","ngModel","onSelect","ngModelChange"],[1,"position-absolute",2,"top","4px","right","14px","pointer-events","none"],[1,"bg-calendar"],["placeholder","dd-mm-yyyy","inputStyleClass","form-control single-border-input","dateFormat","dd-mm-yy",1,"pCalendar",3,"readonlyInput","minDate","maxDate","selectOtherMonths","
1ngModel","ngModelChange","onSelect"],["id","pickUpTime",1,"single-border-input","form-control",2,"font-weight","500","color","#000",3,"ngModel","change","ngModelChange"],[1,"bg-clock"],[1,"explore-cabs-btn","mb-3"],[1,"book-button","btn",3,"disabled","click"],[1,"position-absolute","mt-1",2,"top","0","right","0","cursor","pointer","background-color","white",3,"click"],["alt","closeIcon","src","assets/closeicon.png","width","18","height","18"],[1,"top-source-cities-holder"],[1,"top-city-list-title"],[4,"ngFor","ngForOf"],[1,"dropdown-item",3,"mousedown","click"],[1,"text-danger"]],template:function(i,l){1&i&&(e.YNc(0,p,74,26,"div",0),e.YNc(1,pe,63,27,"div",0)),2&i&&(e.Q6J("ngIf",l.mobileMode),e.xp6(1),e.Q6J("ngIf",!l.mobileMode))},directives:[ee.O5,t.EJ,t.JJ,t.On,ee.sg,t.YN,t.Kr,xe.ZT,t.Fj,$.dR,Ce.f],pipes:[ee.uU],styles:['ul[_ngcontent-%COMP%]{list-style:none;padding:.5em;margin:0;background:#f6f6f6;z-index:9999;border-radius:.25rem}.custom-dialog-container[_ngcontent-%COMP%] .mat-dialog-container[_ngcontent-%COMP%]{overflow-y:visible!important}.pCalendar[_ngcontent-%COMP%] .p-datepicker[_ngcontent-%COMP%]{background:#fff;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;border-radius:4px;top:-228px!important}.closeIcon[_ngcontent-%COMP%]{position:absolute;cursor:pointer;top:3px;right:5px;font-size:30px;border:0px;background:transparent;line-height:.5;padding:5px}.popup-close-row[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:36px 12px 16px}.popup-close-btn[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;border:1.5px solid #ccc;background:#fff;font-size:26px;line-height:1;color:#555;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}.popup-close-btn[_ngcontent-%COMP%]:hover{background:#f1f3f5;border-color:#999}.form-group[_ngcontent-%COMP%] .col-form-label[_ngcontent-%COMP%], .form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700;text-transform:uppercase}.explore-cabs-btn[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:4px 14px 0;width:100%}.explore-cabs-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.explore-cabs-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background-color:#000;color:#fff}#pickUpTime[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none}.form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:14px!important}.form-group[_ngcontent-%COMP%] label.col-form-label[_ngcontent-%COMP%]{font-size:12px!important}#source-city[_ngcontent-%COMP%]{width:220px;margin-right:16px;border-bottom-color:#ced4da;background-color:#fff}#source-city[_ngcontent-%COMP%]:focus{outline:none}#itinerary[_ngcontent-%COMP%]{width:290px;margin-right:16px;border-bottom-color:#ced4da;background-color:#fff}#itinerary[_ngcontent-%COMP%]:focus{outline:none}.dropdown-container[_ngcontent-%COMP%]{display:grid}.contentValue[_ngcontent-%COMP%]{font-size:12px;margin-top:10px;float:left;
1width:65%;font-weight:500}.contentHead[_ngcontent-%COMP%]{font-size:12px;margin-top:10px;float:left;width:35%;font-weight:700}.main-navigation[_ngcontent-%COMP%]{margin-right:3%;margin-left:3%;border:1px solid #c8b6b6;overflow:hidden}.main-navigation[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .main-navigation[_ngcontent-%COMP%] li[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{width:100%}.main-navigation[_ngcontent-%COMP%] li[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{border:0px solid #c8b6b6}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:block;position:relative;float:left;background:#f6f6f6}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%], ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;padding:.5em 0 .5em .5em;text-decoration:none;white-space:nowrap;color:#000;font-size:12px}.main-navigation[_ngcontent-%COMP%] li[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{border-top:0}ul[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{left:0%;top:0;padding-left:0;color:#fff}ul[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding-left:10px}ul[_ngcontent-%COMP%]:before, ul[_ngcontent-%COMP%]:after{content:" ";display:table}ul[_ngcontent-%COMP%]:after{clear:both}.div-only-mobile[_ngcontent-%COMP%]{display:none}.div-no-mobile[_ngcontent-%COMP%]{display:block}.submit_btn[_ngcontent-%COMP%]{margin-top:1%;font-weight:600;color:#fff;background-color:#20a8d9;border:none;margin-left:0%;margin-bottom:2%;width:90%;border-radius:10px;height:14px!important;padding:0!important;margin:0!important;font-size:12px!important;min-height:25px!important}.container[_ngcontent-%COMP%]{font-size:17px}@media screen and (max-width: 849px){.div-no-mobile[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%]{font-size:10px}.div-only-mobile[_ngcontent-%COMP%]{display:block}#source-city[_ngcontent-%COMP%], #itinerary[_ngcontent-%COMP%]{width:100%}.explore-cabs-btn[_ngcontent-%COMP%]{position:static;transform:none;width:100%}}@media screen and (max-width: 400px){#source-city[_ngcontent-%COMP%], #itinerary[_ngcontent-%COMP%]{width:100%}.contentValue[_ngcontent-%COMP%]{font-size:10px}.explore-cabs-btn[_ngcontent-%COMP%]{position:static;transform:none}.container[_ngcontent-%COMP%], .contentHead[_ngcontent-%COMP%]{font-size:10px}}@media screen and (max-width: 340px){.contentValue[_ngcontent-%COMP%]{font-size:9px}.container[_ngcontent-%COMP%]{font-size:8px}.contentHead[_ngcontent-%COMP%]{font-size:9px}}.popup-title-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:14px 16px 10px}.popup-title-line[_ngcontent-%COMP%]{flex:1;height:1.5px;background:#20a8d9;border-radius:2px}.popup-title-text[_ngcontent-%COMP%]{font-size:14px;font-weight:700;color:#20a8d9;white-space:nowrap;margin:0;text-align:center}.trip-date-card-chevron[_ngcontent-%COMP%]{font-size:18px;color:#20a8d9;line-height:1;flex-shrink:0;margin-left:2px}.cd-tab-group[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:12px 0 6px}.cd-tab[_ngcontent-%COMP%]{border:1px solid #919191;border-right:none;background:#fff;padding:6px 0;width:90px;font-size:13px;font-weight:700;text-transform:uppercase;color:#000;cursor:pointer}.cd-tab[_ngcontent-%COMP%]:first-child{border-radius:4px 0 0 4px}.cd-tab[_ngcontent-%COMP%]:last-child{border-radius:0 4px 4px 0;border-right:1px solid #919191}.cd-tab-active[_ngcontent-%COMP%]{background:#20a8d9;border-color:#20a8d9;color:#fff}.cd-min-label[_ngcontent-%COMP%]{font-size:11px;color:#6c757d;margin-bottom:8px;text-align:center}.ow-row[_ngcontent-%COMP%]{margin-bottom:8px}.ow-card[_ngcontent-%COMP%]{border-radius:10px;padding:4px 12px;cursor:pointer;min-height:50px;display:flex;flex-direction:column;justify-content:center}.ow-from-card[_ngcontent-%COMP%]{background:#F4FBFF;border:1.5px solid #c8e6f5}.ow-card-body[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.ow-card-content[_ngcontent-%COMP%]{flex:1;min-width:0}.ow-card-label[_ngcontent-%COMP%]{font-size:10px;font-weight:700;color:#20a8d9;letter-spacing:.8px;text-transform:uppercase}.ow-card-value[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#1d1d1d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ow-value-placeholder[_ngcontent-%COMP%]{color:#aaa;font-weight:400}.trip-date-card-group[_ngcontent-%COMP%]{display:flex;gap:10px;margin-bottom:8px}.trip-date-card[_ngcontent-%COMP%]{flex:1;border-radius:8px;padding:8px 10px;text-align:left;background:#F4FBFF;border:1.5px solid #c8e6f5;cursor:pointer;position:relative}.trip-date-card-body[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;min-height:42px}.trip-date-card-label[_ngcontent-%COMP%]{font-size:10px;font-weight:700;color:#20a8d9;text-transform:uppercase}.trip-date-card-date[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#000}
1.trip-date-card-time[_ngcontent-%COMP%]{font-size:11px;color:#5f6b7a}.popup-field-card[_ngcontent-%COMP%]{background:#F4FBFF;border:1.5px solid #c8e6f5;border-radius:10px;padding:4px 12px;min-height:44px;display:flex;flex-direction:column;justify-content:center}.popup-field-card-body[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.popup-field-card-content[_ngcontent-%COMP%]{flex:1;min-width:0}.popup-date-card[_ngcontent-%COMP%]{background:#F4FBFF;border:1.5px solid #c8e6f5;border-radius:10px;padding:4px 9px;min-height:52px;display:flex;flex-direction:column;justify-content:center}.popup-field-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;color:#20a8d9;letter-spacing:.8px;text-transform:uppercase}.popup-field-select[_ngcontent-%COMP%]{width:100%;border:none;background:transparent;font-size:15px!important;font-weight:600;color:#1d1d1d;padding:0;cursor:pointer;outline:none;-webkit-appearance:none;-moz-appearance:none}.popup-field-select[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}.popup-field-city-value[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:#1d1d1d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popup-field-city-placeholder[_ngcontent-%COMP%]{color:#aaa;font-weight:400}.popup-city-error[_ngcontent-%COMP%]{font-size:11px;color:#dc3545;display:block;margin-top:2px}.top-city-list-title[_ngcontent-%COMP%]{font-size:11px;font-weight:700;color:#6c757d;padding:6px 12px 2px;text-transform:uppercase;letter-spacing:.5px}.popup-cal-input[_ngcontent-%COMP%]{border:none!important;background:transparent!important;padding:0!important;font-size:13px!important;font-weight:600!important;color:#1d1d1d!important;width:100%!important;cursor:pointer;outline:none!important;box-shadow:none!important}.toCityAdditionDeletionIcon[_ngcontent-%COMP%]{position:absolute}.custom-dialog-container[_ngcontent-%COMP%] .mat-dialog-container[_ngcontent-%COMP%]{border-radius:16px!important;padding:0!important;overflow:visible!important}.form-group[_ngcontent-%COMP%] .col-form-label[_ngcontent-%COMP%], .form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700;text-transform:uppercase}.form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:14px!important}.form-group[_ngcontent-%COMP%] label.col-form-label[_ngcontent-%COMP%]{font-size:12px!important}.top-source-cities-holder[_ngcontent-%COMP%]{position:absolute;z-index:1001;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;background-color:#fff;border:1px solid rgba(0,0,0,.15);border-radius:.25rem;width:100%}#pickUpTime[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none}.inactive-trip-button[_ngcontent-%COMP%]{text-transform:uppercase;font-size:12px;font-weight:700;color:#b5b5b5;border:1px solid #919191;padding:6px;width:90px;box-shadow:none!important}.active-trip-button[_ngcontent-%COMP%]{color:#fff;background-color:#20a8d9;border-color:transparent}.btn-check[_ngcontent-%COMP%]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.round-trip-radius[_ngcontent-%COMP%]{border-top-left-radius:4px!important;border-bottom-left-radius:4px!important}.experience-heading[_ngcontent-%COMP%]{text-align:center;border-top:2px solid #20a8d9;border-bottom:2px solid #20a8d9;padding:2px;width:auto;margin:0 auto 16px}.experience-heading[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:16px;font-weight:700}.add-another-city-btn[_ngcontent-%COMP%]{background:#f36d25;border-radius:4px;padding:4px 8px;color:#fff;border:none;font-size:11px;font-weight:600}.trip-date-card-group[_ngcontent-%COMP%]{display:flex;gap:10px;margin-bottom:8px}.trip-date-card[_ngcontent-%COMP%]{flex:1;border-radius:8px;padding:8px 10px;text-align:left;background:#F4FBFF;border:1.5px solid #c8e6f5;cursor:pointer}.trip-date-card-active[_ngcontent-%COMP%]{border-color:#20a8d9;box-shadow:0 0 0 1px #20a8d9 inset}.trip-date-card-body[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-height:42px}.trip-date-card-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;color:#20a8d9;text-transform:uppercase}.trip-date-card-date[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#000}
1.trip-date-card-time[_ngcontent-%COMP%]{font-size:12px;color:#5f6b7a}.date-time-sheet[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:2000}.date-time-sheet-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;background:rgba(0,0,0,.4)}.date-time-sheet-panel[_ngcontent-%COMP%]{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:16px 16px 0 0;max-height:90vh;display:flex;flex-direction:column}.date-time-sheet-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #e9ecef}.date-time-sheet-title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#1d1d1d}.date-time-sheet-close[_ngcontent-%COMP%]{border:none;background:#f1f3f5;border-radius:50%;width:32px;height:32px;font-size:20px;line-height:30px;color:#1d1d1d}.date-time-sheet-body[_ngcontent-%COMP%]{padding:16px}.wheel-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:10px;padding:8px 0 16px}.wheel-column[_ngcontent-%COMP%]{position:relative;border-radius:12px;background:#fff}.wheel-date[_ngcontent-%COMP%]{width:44%}.wheel-hour[_ngcontent-%COMP%], .wheel-minute[_ngcontent-%COMP%]{width:14%}.wheel-meridiem[_ngcontent-%COMP%]{width:18%}.wheel-scroll[_ngcontent-%COMP%]{height:210px;overflow-y:auto;padding:80px 6px;scroll-snap-type:y mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.wheel-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:0;height:0}.wheel-item[_ngcontent-%COMP%]{width:100%;border:none;background:transparent;padding:10px 6px;font-size:16px;font-weight:600;color:#9aa0a6;scroll-snap-align:center}.wheel-item-active[_ngcontent-%COMP%]{color:#1d1d1d}.wheel-center-highlight[_ngcontent-%COMP%]{pointer-events:none;position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);height:44px;border-radius:10px;background:rgba(32,168,217,.08)}
1.wheel-separator[_ngcontent-%COMP%]{font-size:22px;font-weight:700;color:#6c757d;margin:0 -2px}.date-time-sheet-footer[_ngcontent-%COMP%]{padding:12px 16px 20px;border-top:1px solid #e9ecef}.date-time-sheet-footer-cards[_ngcontent-%COMP%]{display:flex;gap:10px;margin-bottom:12px}.date-time-sheet-cta[_ngcontent-%COMP%]{width:100%;border:none;border-radius:10px;background:#20a8d9;color:#fff;font-weight:700;font-size:16px;padding:12px}.ow-card-icon[_ngcontent-%COMP%]{flex-shrink:0;display:block;align-self:center}@media only screen and (max-width: 600px){.toCityAdditionDeletionIcon[_ngcontent-%COMP%]{top:4px;right:16px}.toCityAdditionDeletionIcon[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:none;border:none;padding:0}.inactive-trip-button[_ngcontent-%COMP%]{font-size:11px;width:82px;padding:6px 4px}}']}),g})();var Ye=F(5786),je=F(2335),Be=F(2684),Re=F(8860);const Ge=["toCityInput"],mt=["fromCityList"],Ut=["fromCalendar"],Wt=["toCalendar"],Ht=["pickupSelect"],Rt=["dateWheelScroll"],Ot=["hourWheelScroll"],It=["minuteWheelScroll"],qt=["meridiemWheelScroll"],Jt=["calendar"];function Yt(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",20),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).hideModify()}),e.TgZ(1,"span",21),e._uU(2,"\xd7"),e.qZA()()}}const Bt=function(g,P){return{"border-top-color":g,"border-bottom-color":P}};function Vt(g,P){if(1&g&&(e.TgZ(0,"div",22)(1,"span",23),e._uU(2),e.qZA()()),2&g){const i=e.oxw(2);e.Q6J("ngStyle",e.WLB(2,Bt,i.ixigoFlag?i.ixigoColor:"",i.ixigoFlag?i.ixigoColor:"")),e.xp6(2),e.Oqu(i.message.getOutstationText())}}function Qt(g,P){1&g&&(e.TgZ(0,"div",24),e._uU(1,"Drop-off Only"),e.qZA())}function zt(g,P){1&g&&(e.TgZ(0,"div",24),e._uU(1,"Return With Same Cab"),e.qZA())}const bt=function(){return["fas","exchange-alt"]};function jt(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",38),e.NdJ("click",function(){return e.CHM(i),e.oxw(3).toggleSelectedCity()}),e._UZ(1,"fa-icon",39),e.qZA()}2&g&&(e.xp6(1),e.Q6J("icon",e.DdM(1,bt)))}function Gt(g,P){1&g&&(e.TgZ(0,"small",40),e._uU(1," Please select the pickup city "),e.qZA())}function Kt(g,P){if(1&g&&(e.TgZ(0,"small",40),e._uU(1),e.qZA()),2&g){const i=e.oxw(3);e.xp6(1),e.hij(" ",i.notValidSourceErrorMessage," ")}}function $t(g,P){if(1&g&&(e.TgZ(0,"small",40),e._uU(1),e.qZA()),2&g){const i=e.oxw(2).$implicit;e.xp6(1),e.Oqu(i.errorMessage)}}function Lt(g,P){if(1&g&&(e.TgZ(0,"small",40),e._uU(1),e.qZA()),2&g){const i=e.oxw(5);e.xp6(1),e.Oqu(i.noDestinationMatchErrorMessage)}}function Xt(g,P){if(1&g&&(e.TgZ(0,"small",40),e._uU(1),e.qZA()),2&g){const i=e.oxw(5);e.xp6(1),e.Oqu(i.notValidDestinationErrorMessage)}}function ei(g,P){1&g&&(e.TgZ(0,"small",51),e._uU(1,"Loading Destination Cities....."),e.qZA())}function ti(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",27)(1,"div",42)(2,"div",43)(3,"div",29)(4,"div",44),e._uU(5),e.qZA(),e.TgZ(6,"div",32)(7,"div",33),e._uU(8),e.qZA(),e.TgZ(9,"droplocation-autocomplete",45),e.NdJ("componentCallback",function(c){e.CHM(i);const _=e.oxw().$implicit;return e.oxw(3).autoDropCompleteCallback(c,_.key)})("click",function(c){e.CHM(i);const _=e.oxw().$implicit;return e.oxw(3).onFocusToCityList(c,_.key)}),e.qZA()()()(),e.YNc(10,$t,2,1,"small",35),e.YNc(11,Lt,2,1,"small",35),e.YNc(12,Xt,2,1,"small",35),e.YNc(13,ei,2,0,"small",46),e.qZA(),e.TgZ(14,"div",47)(15,"button",48),e.NdJ("click",function(){e.CHM(i);const c=e.oxw().$implicit;return e.oxw(3).deleteToCityField(c.key)}),e.O4$(),e.TgZ(16,"svg",49),e._UZ(17,"path",50),e.qZA()()()()}if(2&g){const i=e.oxw(),l=i.index,c=i.$implicit,_=e.oxw(3);e.xp6(5),e.Oqu(l+1),e.xp6(3),e.hij("STOP ",l+1,""),e.xp6(1),e.s9C("formControlName",c.key),e.Q6J("rtIndex",l)("rtKey",c.key)("userSettings",_.addressAutocompleteToSettingsList[c.key])("hideDropdown",!0),e.xp6(1),e.Q6J("ngIf",_.outstationForm.controls[c.key].hasError("required")&&_.outstationForm.controls[c.key].touched),e.xp6(1),e.Q6J("ngIf",_.noDestinationMatch),e.xp6(1),e.Q6J("ngIf",_.notValidDestination.has(c.key)&&!(_.outstationForm.controls[c.key].hasError("required")&&_.outstationForm.controls[c.key].touched)),e.xp6(1),e.Q6J("ngIf",_.destinationCitiesLoading)}}function ii(g,P){if(1&g&&(e.TgZ(0,"small",40),e._uU(1),e.qZA()),2&g){const i=e.oxw(2).$implicit;e.xp6(1),e.Oqu(i.errorMessage)}}function oi(g,P){if(1&g&&(e.TgZ(0,"small",40),e._uU(1),e.qZA()),2&g){const i=e.oxw(5);e.xp6(1),e.Oqu(i.noDestinationMatchErrorMessage)}}function ni(g,P){if(1&g&&(e.TgZ(0,"small",40),e._uU(1),e.qZA()),2&g){const i=e.oxw(5);e.xp6(1),e.Oqu(i.notValidDestinationErrorMessage)}}function ri(g,P){1&g&&(e.TgZ(0,"small",51),e._uU(1,"Loading Destination Cities....."),e.qZA())}function si(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",27)(1,"div",42)(2,"div",52)(3,"div",29),e.O4$(),e.TgZ(4,"svg",30),e._UZ(5,"path",31),e.qZA(),e.kcU(),e.TgZ(6,"div",32)(7,"div",33),e._uU(8,"TO"),e.qZA(),e.TgZ(9,"droplocation-autocomplete",45),e.NdJ("componentCallback",function(c){e.CHM(i);const _=e.oxw().$implicit;return e.oxw(3).autoDropCompleteCallback(c,_.key)})("click",function(c){e.CHM(i);const _=e.oxw().$implicit;return e.oxw(3).onFocusToCityList(c,_.key)}),e.qZA()()()(),e.YNc(10,ii,2,1,"small",35),e.YNc(11,oi,2,1,"small",35),e.YNc(12,ni,2,1,"small",35),e.YNc(13,ri,2,0,"small",46),e.qZA()()}if(2&g){const i=e.oxw(),l=i.$implicit,c=i.index,_=e.oxw(3);e.xp6(9),e.s9C("formControlName",l.key),e.Q6J("rtIndex",c)("rtKey",l.key)("userSettings",_.addressAutocompleteToSettingsList[l.key])("hideDropdown",!0),e.xp6(1),e.Q6J("ngIf",_.outstationForm.controls[l.key].hasError("required")&&_.outstationForm.controls[l.key].touched),e.xp6(1),e.Q6J("ngIf",_.noDestinationMatch),e.xp6(1),e.Q6J("ngIf",_.notValidDestination.has(l.key)&&!(_.outstationForm.controls[l.key].hasError("required")&&_.outstationForm.controls[l.key].touched)),e.xp6(1),e.Q6J("ngIf",_.de
1stinationCitiesLoading)}}function ai(g,P){if(1&g&&(e.ynx(0),e.YNc(1,ti,18,11,"div",41),e.YNc(2,si,14,9,"div",41),e.BQk()),2&g){const i=P.last,l=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!i&&l.stopsEnabled&&l.toCityControlsList.length>1),e.xp6(1),e.Q6J("ngIf",i)}}function li(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",53),e.NdJ("click",function(){return e.CHM(i),e.oxw(3).addToCityField()}),e._uU(1," + Add a stop "),e.qZA()}}function ci(g,P){if(1&g){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",25),e.YNc(2,jt,2,2,"button",26),e.TgZ(3,"div",27)(4,"div",28)(5,"div",29),e.O4$(),e.TgZ(6,"svg",30),e._UZ(7,"path",31),e.qZA(),e.kcU(),e.TgZ(8,"div",32)(9,"div",33),e._uU(10,"FROM"),e.qZA(),e.TgZ(11,"ng4geo-autocomplete",34),e.NdJ("componentCallback",function(c){return e.CHM(i),e.oxw(2).autoCompleteCallback(c)})("click",function(){return e.CHM(i),e.oxw(2).populateField("fromcity")}),e.qZA()()(),e.YNc(12,Gt,2,0,"small",35),e.YNc(13,Kt,2,1,"small",35),e.qZA()(),e.YNc(14,ai,3,2,"ng-container",36),e.YNc(15,li,2,0,"button",37),e.qZA(),e.BQk()}if(2&g){const i=e.oxw(2);e.xp6(2),e.Q6J("ngIf",i.toCityControlsList.length<2),e.xp6(9),e.Q6J("userSettings",i.addressAutocompleteSettings)("hideDropdown",!0),e.xp6(1),e.Q6J("ngIf",i.outstationForm.controls.fromCityControl.hasError("required")&&i.outstationForm.controls.fromCityControl.touched&&!i.notValidSource),e.xp6(1),e.Q6J("ngIf",i.notValidSource),e.xp6(1),e.Q6J("ngForOf",i.toCityControlsList),e.xp6(1),e.Q6J("ngIf",i.stopsEnabled&&i.toCityControlsList.length<5&&!i.duplicateDestinationSelected&&(null==i.toCityControlsList[i.toCityControlsList.length-1]||null==i.toCityControlsList[i.toCityControlsList.length-1].toCitySelected?null:i.toCityControlsList[i.toCityControlsList.length-1].toCitySelected.cityId))}}function di(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",60),e.NdJ("click",function(){return e.CHM(i),e.oxw(3).toggleSelectedCity()}),e._UZ(1,"fa-icon",61),e.qZA()}2&g&&(e.xp6(1),e.Q6J("icon",e.DdM(1,bt)))}function Pt(g,P){1&g&&(e.TgZ(0,"small",62),e._uU(1," Please select the pickup city "),e.qZA())}function pi(g,P){if(1&g&&(e.TgZ(0,"small",62),e._uU(1),e.qZA()),2&g){const i=e.oxw(3);e.xp6(1),e.hij(" ",i.notValidSourceErrorMessage," ")}}function ui(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",69),e.NdJ("click",function(){e.CHM(i);const c=e.oxw().$implicit;return e.oxw(3).deleteToCityField(c.key)}),e._UZ(1,"img",70),e.qZA()}}function hi(g,P){if(1&g&&(e.TgZ(0,"small",62),e._uU(1),e.qZA()),2&g){const i=e.oxw().$implicit;e.xp6(1),e.hij(" ",i.errorMessage," ")}}function At(g,P){if(1&g&&(e.TgZ(0,"small",62),e._uU(1),e.qZA()),2&g){const i=e.oxw(4);e.xp6(1),e.hij(" ",i.noDestinationMatchErrorMessage," ")}}function _i(g,P){if(1&g&&(e.TgZ(0,"small",62),e._uU(1),e.qZA()),2&g){const i=e.oxw(4);e.xp6(1),e.hij(" ",i.notValidDestinationErrorMessage," ")}}function mi(g,P){1&g&&(e.TgZ(0,"small"),e._uU(1," Loading Destination Cities..... "),e.qZA())}function gi(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",73),e.NdJ("click",function(){e.CHM(i);const c=e.oxw(2).$implicit;return e.oxw(3).addToCityField(c.key)}),e._uU(1,"ADD ANOTHER CITY"),e.qZA()}}function fi(g,P){if(1&g&&(e.TgZ(0,"div",71),e.YNc(1,gi,2,0,"button",72),e.qZA()),2&g){const i=e.oxw().index,l=e.oxw(3);e.xp6(1),e.Q6J("ngIf",l.toCityControlsList.length-1==i&&l.toCityControlsList.length<5&&l.toCityControlsList[i].selectedToCity)}}function yi(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",63)(1,"label",55),e._uU(2),e.qZA(),e.TgZ(3,"div",64)(4,"droplocation-autocomplete",65),e.NdJ("contextmenu",function(c){return c.preventDefault()})("click",function(c){const y=e.CHM(i).$implicit;return e.oxw(3).onFocusToCityList(c,y.key)})("componentCallback",function(c){const y=e.CHM(i).$implicit;return e.oxw(3).autoDropCompleteCallback(c,y.key)})("ngModelChange",function(){const _=e.CHM(i).$implicit;return e.oxw(3).handleToCityChange(_.selectedToCity)})("focus",function(c){const y=e.CHM(i).$implicit,C=e.oxw(3);return C.onFocusToCityList(c,y.key),C.isTypedCity=!1}),e.qZA(),e.TgZ(5,"div",66),e.YNc(6,ui,2,0,"button",67),e.qZA(),e.YNc(7,hi,2,1,"small",18),e.YNc(8,At,2,1,"small",18),e.YNc(9,_i,2,1,"small",18),e.YNc(10,mi,2,0,"small",1),e.qZA(),e.YNc(11,fi,2,1,"div",68),e.qZA()}if(2&g){const i=P.$implicit,l=P.index,c=e.oxw(3);e.xp6(2),e.hij(" ",c.useNewDesign&&c.stopsEnabled&&c.toCityControl
1sList.length>1&&l<c.toCityControlsList.length-1?"Stop "+(l+1):"To"," "),e.xp6(2),e.s9C("formControlName",i.key),e.Q6J("rtIndex",l)("rtKey",i.key)("userSettings",c.addressAutocompleteToSettingsList[i.key]),e.xp6(2),e.Q6J("ngIf",i.isDeletionAllowed&&c.stopsEnabled&&l<5),e.xp6(1),e.Q6J("ngIf",c.outstationForm.controls[i.key].hasError("required")&&c.outstationForm.controls[i.key].touched),e.xp6(1),e.Q6J("ngIf",c.noDestinationMatch),e.xp6(1),e.Q6J("ngIf",c.notValidDestination.has(i.key)&&!(c.outstationForm.controls[i.key].hasError("required")&&c.outstationForm.controls[i.key].touched)),e.xp6(1),e.Q6J("ngIf",c.destinationCitiesLoading),e.xp6(1),e.Q6J("ngIf",c.stopsEnabled)}}function Ci(g,P){if(1&g){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",54)(2,"label",55),e._uU(3,"From"),e.qZA(),e.TgZ(4,"div",56)(5,"ng4geo-autocomplete",57),e.NdJ("click",function(){e.CHM(i);const c=e.oxw(2);return c.populateField("fromcity"),c.onInputClick()})("componentCallback",function(c){return e.CHM(i),e.oxw(2).autoCompleteCallback(c)})("contextmenu",function(c){return c.preventDefault()})("ngModelChange",function(){e.CHM(i);const c=e.oxw(2);return c.handleFromCityChange(c.selectedFromCity)})("focus",function(){return e.CHM(i),e.oxw(2).shouldShowTopSourceCityList=!0})("blur",function(){return e.CHM(i),e.oxw(2).shouldShowTopSourceCityList=!1}),e.qZA(),e.YNc(6,di,2,2,"div",58),e.YNc(7,Pt,2,0,"small",18),e.YNc(8,pi,2,1,"small",18),e.qZA()(),e.YNc(9,yi,12,11,"div",59),e.BQk()}if(2&g){const i=e.oxw(2);e.xp6(5),e.Q6J("userSettings",i.addressAutocompleteSettings),e.xp6(1),e.Q6J("ngIf","oneWay"===i.subTripType&&i.toCityControlsList.length<2||"roundTrip"===i.subTripType&&i.toCityControlsList.length<2),e.xp6(1),e.Q6J("ngIf",i.outstationForm.controls.fromCityControl.hasError("required")&&i.outstationForm.controls.fromCityControl.touched&&!i.notValidSource),e.xp6(1),e.Q6J("ngIf",i.notValidSource),e.xp6(1),e.Q6J("ngForOf",i.toCityControlsList)}}function S(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",77),e.NdJ("click",function(){return e.CHM(i),e.oxw(3).openDateTimeSheet("end")}),e.TgZ(1,"div",78),e.O4$(),e.TgZ(2,"svg",79),e._UZ(3,"rect",80)(4,"path",81),e.qZA(),e.kcU(),e.TgZ(5,"div")(6,"div",82),e._uU(7,"TRIP END"),e.qZA(),e.TgZ(8,"div",83),e._uU(9),e.ALo(10,"date"),e.qZA(),e.TgZ(11,"div",84),e._uU(12),e.ALo(13,"date"),e.qZA()()()()}if(2&g){const i=e.oxw(3);e.xp6(9),e.Oqu(e.xi3(10,2,i.toDate,"d MMM y")),e.xp6(3),e.Oqu(e.xi3(13,5,i.toDate,"EEEE"))}}function j(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",74)(1,"div",75)(2,"div",76)(3,"div",77),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).openDateTimeSheet("start")}),e.TgZ(4,"div",78),e.O4$(),e.TgZ(5,"svg",79),e._UZ(6,"rect",80)(7,"path",81),e.qZA(),e.kcU(),e.TgZ(8,"div")(9,"div",82),e._uU(10,"TRIP START"),e.qZA(),e.TgZ(11,"div",83),e._uU(12),e.ALo(13,"date"),e.qZA(),e.TgZ(14,"div",84),e._uU(15),e.ALo(16,"date"),e.qZA()()()(),e.YNc(17,S,14,8,"div",85),e.qZA(),e._UZ(18,"input",86),e.qZA()()}if(2&g){const i=e.oxw(2);e.xp6(12),e.Oqu(e.xi3(13,3,i.fromDate,"d MMM y")),e.xp6(3),e.Oqu(e.xi3(16,6,i.pickupTime,"shortTime")),e.xp6(2),e.Q6J("ngIf",i.returnDateRequired)}}function a(g,P){1&g&&(e.TgZ(0,"small",62),e._uU(1," Please select the return date. "),e.qZA())}function s(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",95)(1,"div",87)(2,"label",96),e._uU(3,"RETURN"),e.qZA(),e.TgZ(4,"div",97)(5,"p-calendar",98),e.NdJ("ngModelChange",function(c){return e.CHM(i),e.oxw(3).toDate=c}),e.qZA(),e.TgZ(6,"p-calendar",99),e.NdJ("ngModelChange",function(c){return e.CHM(i),e.oxw(3).toDate=c}),e.qZA(),e.TgZ(7,"span",92),e._UZ(8,"i",93),e.qZA(),e.YNc(9,a,2,0,"small",18),e.qZA()()()}if(2&g){const i=e.oxw(3);e.xp6(5),e.Q6J("readonlyInput",!0)("minDate",i.fromDate)("selectOtherMonths",!0)("maxDate",i.maxFromDate)("ngModel",i.toDate),e.xp6(1),e.Q6J("readonlyInput",!0)("touchUI",!0)("minDate",i.fromDate)("maxDate",i.maxFromDate)("ngModel",i.toDate)("selectOtherMonths",!0),e.xp6(3),e.Q6J("ngIf",i.outstationForm.controls.returnDateControl.hasError("required")&&i.outstationForm.controls.returnDateControl.touched)}}const u=function(g,P,i,l,c){return{"col-12":g,"col-6":P,"pl-0":i,"pr-2":l,"px-0":c}},o=function(g,P){return{"col-3":g,"col-5":P}},n=function(g,P){return{"col-9":g,"col-7":P}};function d(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",74)(1,"div")(2,"div",87)(3,"label",88),e._uU(4,"PICK UP"),e.qZA(),e.TgZ(5,"div",89)(6,"p-calendar",90,91),e.NdJ("onSelect",function(){return e.CHM(i),e.oxw(2).onFromDateChanged()})("ngModelChange",function(c){return e.CHM(i),e.oxw(2).fromDate=c})("onShow",function(){return e.CHM(i),e.oxw(2).onCalendarOpen()}
1),e.qZA(),e.TgZ(8,"span",92),e._UZ(9,"i",93),e.qZA()()()(),e.YNc(10,s,10,12,"div",94),e.qZA()}if(2&g){const i=e.oxw(2);e.xp6(1),e.Tol(e.qbA(13,u,"oneWay"==i.subTripType&&!(i.useOWStops&&i.toCityControlsList.length>1),"roundTrip"==i.subTripType||"oneWay"==i.subTripType&&i.useOWStops&&i.toCityControlsList.length>1,"roundTrip"==i.subTripType||"oneWay"==i.subTripType&&i.useOWStops&&i.toCityControlsList.length>1,"roundTrip"==i.subTripType||"oneWay"==i.subTripType&&i.useOWStops&&i.toCityControlsList.length>1,"oneWay"==i.subTripType&&!(i.useOWStops&&i.toCityControlsList.length>1))),e.xp6(2),e.Tol(e.WLB(19,o,"oneWay"==i.subTripType&&!(i.useOWStops&&i.toCityControlsList.length>1),"roundTrip"==i.subTripType||"oneWay"==i.subTripType&&i.useOWStops&&i.toCityControlsList.length>1)),e.xp6(2),e.Tol(e.WLB(22,n,"oneWay"==i.subTripType&&!(i.useOWStops&&i.toCityControlsList.length>1),"roundTrip"==i.subTripType||"oneWay"==i.subTripType&&i.useOWStops&&i.toCityControlsList.length>1)),e.xp6(1),e.Q6J("readonlyInput",!0)("touchUI",!0)("minDate",i.minFromDate)("maxDate",i.maxFromDate)("selectOtherMonths",!0)("ngModel",i.fromDate),e.xp6(4),e.Q6J("ngIf","roundTrip"==i.subTripType||"oneWay"==i.subTripType&&i.useOWStops&&i.toCityControlsList.length>1)}}function h(g,P){if(1&g&&(e.TgZ(0,"option",103),e._uU(1),e.ALo(2,"date"),e.qZA()),2&g){const i=P.$implicit;e.Q6J("value",i),e.xp6(1),e.hij("",e.xi3(2,2,i,"shortTime")," ")}}function x(g,P){if(1&g&&(e.TgZ(0,"small",62),e._uU(1),e.qZA()),2&g){const i=e.oxw(3);e.xp6(1),e.hij(" ",i.pickupTimeErrorMessage," ")}}function T(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",87)(1,"label",100),e._uU(2,"PICK UP AT"),e.qZA(),e.TgZ(3,"div",56)(4,"select",101),e.NdJ("change",function(){return e.CHM(i),e.oxw(2).didSelectPickUpTime()})("ngModelChange",function(c){return e.CHM(i),e.oxw(2).pickupTime=c}),e.YNc(5,h,3,5,"option",102),e.qZA(),e.TgZ(6,"span",92),e._UZ(7,"i",93),e.qZA(),e.YNc(8,x,2,1,"small",18),e.qZA()()}if(2&g){const i=e.oxw(2);e.xp6(4),e.Q6J("ngModel",i.pickupTime),e.xp6(1),e.Q6J("ngForOf",i.pickUpTimeOptions),e.xp6(3),e.Q6J("ngIf",i.outstationForm.controls.pickUpTimeControl.hasError("required")&&i.outstationForm.controls.pickUpTimeControl.touched)}}function L(g,P){1&g&&(e.TgZ(0,"small",62),e._uU(1,"You are in incognito window please use normal browser."),e.qZA())}function R(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",122),e.NdJ("click",function(){const _=e.CHM(i).$implicit;return e.oxw(3).onDateWheelSelect(_.date)}),e._uU(1),e.qZA()}if(2&g){const i=P.$implicit,l=e.oxw(3);e.ekj("wheel-item-active",l.isDateWheelSelected(i.date)),e.xp6(1),e.hij(" ",i.display," ")}}function Q(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",122),e.NdJ("click",function(){const _=e.CHM(i).$implicit,y=e.oxw(4);return y.selectedTimeHour=_,y.onTimeWheelHourChange(),y.onTimeWheelItemClick()}),e._uU(1),e.qZA()}if(2&g){const i=P.$implicit,l=e.oxw(4);e.ekj("wheel-item-active",l.selectedTimeHour===i),e.xp6(1),e.hij(" ",i," ")}}function N(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",122),e.NdJ("click",function(){const _=e.CHM(i).$implicit,y=e.oxw(4);return y.selectedTimeMinute=_,y.onTimeWheelMinuteChange(),y.onTimeWheelItemClick()}),e._uU(1),e.qZA()}if(2&g){const i=P.$implicit,l=e.oxw(4);e.ekj("wheel-item-active",l.selectedTimeMinute===i),e.xp6(1),e.hij(" ",i," ")}}function ae(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",122),e.NdJ("click",function(){const _=e.CHM(i).$implicit,y=e.oxw(4);return y.selectedTimeMeridiem=_,y.onTimeWheelMeridiemChange(),y.onTimeWheelItemClick()}),e._uU(1),e.qZA()}if(2&g){const i=P.$implicit,l=e.oxw(4);e.ekj("wheel-item-active",l.selectedTimeMeridiem===i),e.xp6(1),e.hij(" ",i," ")}}function de(g,P){if(1&g){const i=e.EpF();e.ynx(0),e.TgZ(1,"div",123)(2,"div",113,124),e.NdJ("scroll",function(){return e.CHM(i),e.oxw(3).onWheelScroll("hour")}),e.YNc(4,Q,2,3,"button",115),e.qZA(),e._UZ(5,"div",116),e.qZA(),e.TgZ(6,"div",125),e._uU(7,":"),e.qZA(),e.TgZ(8,"div",126)(9,"div",113,127),e.NdJ("scroll",function(){return e.CHM(i),e.oxw(3).onWheelScroll("minute")}),e.YNc(11,N,2,3,"button",115),e.qZA(),e._UZ(12,"div",116),e.qZA(),e.TgZ(13,"div",128)(14,"div",113,129),e.NdJ("scroll",function(){return e.CHM(i),e.oxw(3).onWheelScroll("meridiem")}),e.YNc(16,ae,2,3,"button",115),e.qZA(),e._UZ(17,"div",116),e.qZA(),e.BQk()}if(2&g){const i=e.oxw(3);e.xp6(4),e.Q6J("ngForOf",i.timeWheelHours),e.xp6(7),e.Q6J("ngForOf",i.timeWheelMinutes),e.xp6(
15),e.Q6J("ngForOf",i.timeWheelMeridiems)}}function we(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"button",119),e.NdJ("click",function(){return e.CHM(i),e.oxw(3).setDatePickerMode("end")}),e.TgZ(1,"div",82),e._uU(2,"TRIP END"),e.qZA(),e.TgZ(3,"div",83),e._uU(4),e.ALo(5,"date"),e.qZA(),e.TgZ(6,"div",84),e._uU(7),e.ALo(8,"date"),e.qZA()()}if(2&g){const i=e.oxw(3);e.ekj("trip-date-card-active","end"===i.datePickerMode),e.xp6(4),e.Oqu(e.xi3(5,4,i.toDate,"d MMM y")),e.xp6(3),e.Oqu(e.xi3(8,7,i.toDate,"EEEE"))}}function ke(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",104)(1,"div",105),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).closeDateTimeSheet()}),e.qZA(),e.TgZ(2,"div",106)(3,"div",107)(4,"div",108),e._uU(5),e.qZA(),e.TgZ(6,"button",109),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).closeDateTimeSheet()}),e._uU(7,"\xd7"),e.qZA()(),e.TgZ(8,"div",110)(9,"div",111)(10,"div",112)(11,"div",113,114),e.NdJ("scroll",function(){return e.CHM(i),e.oxw(2).onWheelScroll("date")}),e.YNc(13,R,2,3,"button",115),e.qZA(),e._UZ(14,"div",116),e.qZA(),e.YNc(15,de,18,3,"ng-container",1),e.qZA()(),e.TgZ(16,"div",117)(17,"div",118)(18,"button",119),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).setDatePickerMode("start")}),e.TgZ(19,"div",82),e._uU(20,"TRIP START"),e.qZA(),e.TgZ(21,"div",83),e._uU(22),e.ALo(23,"date"),e.ALo(24,"date"),e.qZA(),e.TgZ(25,"div",84),e._uU(26),e.ALo(27,"date"),e.qZA()(),e.YNc(28,we,9,10,"button",120),e.qZA(),e.TgZ(29,"button",121),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).proceedDateTimeSheet()}),e._uU(30,"Continue"),e.qZA()()()()}if(2&g){const i=e.oxw(2);e.xp6(5),e.Oqu(i.dateTimeSheetTitle),e.xp6(8),e.Q6J("ngForOf",i.dateWheelOptions),e.xp6(2),e.Q6J("ngIf","start"===i.datePickerMode),e.xp6(3),e.ekj("trip-date-card-active","start"===i.datePickerMode),e.xp6(4),e.AsE("",e.xi3(23,9,i.fromDate,"d MMM y"),", ",e.xi3(24,12,i.pickupTime,"shortTime"),""),e.xp6(4),e.Oqu(e.xi3(27,15,i.fromDate,"EEEE")),e.xp6(2),e.Q6J("ngIf",i.returnDateRequired)}}const Le=function(g){return{"background-color":g}},yt=function(g){return{"disable-button":g}};function lt(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",3),e.YNc(1,Yt,3,0,"div",4),e.YNc(2,Vt,3,5,"div",5),e.TgZ(3,"div",6)(4,"div",7)(5,"input",8),e.NdJ("ngModelChange",function(c){return e.CHM(i),e.oxw().subTripType=c})("change",function(){return e.CHM(i),e.oxw().subTripTypeChange()}),e.qZA(),e.TgZ(6,"label",9),e.NdJ("click",function(){return e.CHM(i),e.oxw().onFieldClicked()}),e._uU(7," ONE WAY "),e.YNc(8,Qt,2,0,"div",10),e.qZA(),e.TgZ(9,"input",11),e.NdJ("ngModelChange",function(c){return e.CHM(i),e.oxw().subTripType=c})("change",function(){return e.CHM(i),e.oxw().subTripTypeChange()}),e.qZA(),e.TgZ(10,"label",12),e.NdJ("click",function(){return e.CHM(i),e.oxw().onFieldClicked()}),e._uU(11," ROUND TRIP "),e.YNc(12,zt,2,0,"div",10),e.qZA()()(),e.TgZ(13,"form",13),e.YNc(14,ci,16,7,"ng-container",1),e.YNc(15,Ci,10,5,"ng-container",1),e.YNc(16,j,19,9,"div",14),e.YNc(17,d,11,25,"div",14),e.YNc(18,T,9,3,"div",15),e.TgZ(19,"div")(20,"div",16)(21,"button",17),e.NdJ("click",function(c){return e.CHM(i),e.oxw().exploreButtonClick(c)}),e._uU(22,"Explore Cabs"),e.qZA()(),e.YNc(23,L,2,0,"small",18),e.qZA()(),e.YNc(24,ke,31,18,"div",19),e.qZA()}if(2&g){const i=e.oxw();e.xp6(1),e.Q6J("ngIf",i.outstationCloseIcon),e.xp6(1),e.Q6J("ngIf",!(i.variant1Flag||i.variant2Flag)),e.xp6(3),e.Q6J("ngModel",i.subTripType),e.xp6(1),e.ekj("active-trip-button","oneWay"===i.subTripType),e.Q6J("ngStyle",e.VKq(24,Le,i.ixigoFlag&&"oneWay"===i.subTripType?i.ixigoColor:i.mahindraFlag&&"oneWay"===i.subTripType?i.mahindraColor:"")),e.xp6(2),e.Q6J("ngIf",i.useNewDesign),e.xp6(1),e.Q6J("ngModel",i.subTripType),e.xp6(1),e.ekj("active-trip-button","roundTrip"===i.subTripType),e.Q6J("ngStyle",e.VKq(26,Le,i.ixigoFlag&&"roundTrip"===i.subTripType?i.ixigoColor:i.mahindraFlag&&"roundTrip"===i.subTripType?i.mahindraColor:"")),e.xp6(2),e.Q6J("ngIf",i.useNewDesign),e.xp6(1),e.Q6J("formGroup",i.outstationForm),e.xp6(1),e.Q6J("ngIf",i.useNewDesign),e.xp6(1),e.Q6J("ngIf",!i.useNewDesign),e.xp6(1),e.Q6J("ngIf",i.useTimeWheelPicker),e.xp6(1),e.Q6J("ngIf",!i.useTimeWheelPicker),e.xp6(1),e.Q6J("ngIf",!i.useTimeWheelPicker),e.xp6(3),e.Tol(e.VKq(28,yt,i.disableInCognitoWindow)),e.Q6J("disabled",i.time_zone_error||i.disableInCognitoWindow)("ngStyle",e.VKq(30,Le,i.ixigoFlag?i.ixigoColor:i.mahindraFlag?i.mahindraColor:"")),e.xp6(2),e.Q6J("ngIf",i.disableInCognitoWindow),e.xp6(1),e.Q6J("ngIf",i.useTimeWheelPicker&&i.isDateTimeSheetOpen)}}function Ke(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div")(1,"div",154),e.NdJ("mousedown",function(c){return c.preventDefault()})("click",function(){const _=e.CHM(i).$implicit,y=e.oxw(3);return y.selectedFromCity=_,y.selectTopSourceCity(_.cityName)}),e._uU(2),e.qZA()()}if(2&g){const i=P.$implicit;e.xp6(2),e.hij(" ",i.cityName,"")}}function et(g,P){if(1&g&&(e.TgZ(0,"div",152)(1,"div",153),e._uU(2,"Popular Cities"),e.qZA(),e.YNc(3,Ke,3,1,"div",36),e.qZA()),2&g){const i=e.oxw(2);e.xp6(3),e.Q6J("ngForOf",i.topSourceCitiesList)}}function He(g,P){1&g&&(e.TgZ(0,"small",62),e._uU(1," Please select the pickup city "),e.qZA())}function Ue(g,P){if(1&g&&(e.TgZ(0,"small",62),e._uU(1),e.qZA()),2&g){const i=e.oxw(2);e.xp6(1),e.hij(" ",i.notValidSourceErrorMessage," ")}}function tt(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",155),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).toggleSelectedCity()}),e._UZ(1,"fa-icon",156),e.qZA()}2&g&&(e.xp6(1),e.Q6J("icon",e.DdM(1,bt)))}function Qe(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"a",161),e.NdJ("click",function(){e.CHM(i);const c=e.oxw().$implicit;return e.oxw(2).deleteToCityField(c.key)}),e._UZ(1,"img",162),e.qZA()}}function qe(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"a",163),e.NdJ("click",function(){e.CHM(i);const c=e.oxw().$implicit;return e.oxw(2).addToCityField(c.key)}),e._UZ(1,"img",164),e.qZA()}}function Ze(g,P){if(1&g&&(e.TgZ(0,"small",62),e._uU(1),e.qZA()),2&g){const i=e.oxw().$implicit;e.xp6(1),e.hij(" ",i.errorMessage," ")}}function vi(g,P){if(1&g&&(e.TgZ(0,"small",62),e._uU(1),e.qZA()),2&g){const i=e.oxw(3);e.xp6(1),e.hij(" ",i.noDestinationMatchErrorMessage," ")}}function gt(g,P){if(1&g&&(e.TgZ(0,"small",62),e._uU(1),e.qZA()),2&g){const i=e.oxw(3);e.xp6(1),e.hij(" ",i.notValidDestinationErrorMessage," ")}}function vt(g,P){1&g&&(e.TgZ(0,"small"),e._uU(1," Loading Destination Cities..... "),e.qZA())}const Ft=function(g){return{"max-width":g}};function ct(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",132)(1,"div",133)(2,"label",141),e._uU(3),e.qZA(),e.TgZ(4,"div",135)(5,"droplocation-autocomplete",157,158),e.NdJ("componentCallback",function(c){const y=e.CHM(i).$implicit;return e.oxw(2).autoDropCompleteCallback(c,y.key)})("ngModelChange",function(){const _=e.CHM(i).$implicit;return e.oxw(2).handleToCityChange(_.selectedToCity)})("click",function(c){const y=e.CHM(i).$implicit,C=e.oxw(2);return C.onFocusToCityList(c,y.key),C.isTypedCity=!1})("blur",function(){return e.CHM(i),e.oxw(2).shouldShowTopDestCityList=!1}),e.qZA(),e.TgZ(7,"div"),e.YNc(8,Qe,2,0,"a",159),e.YNc(9,qe,2,0,"a",160),e.qZA(),e.YNc(10,Ze,2,1,"small",18),e.YNc(11,vi,2,1,"small",18),e.YNc(12,gt,2,1,"small",18),e.YNc(13,vt,2,0,"small",1),e.qZA()()()}if(2&g){const i=P.$implicit,l=P.index,c=e.oxw(2);e.Q6J("ngStyle",e.VKq(12,Ft,"oneWay"===c.subTripType||"roundTrip"===c.subTripType?"23%":"")),e.xp6(3),e.hij(" ",c.useNewDesign&&c.stopsEnabled&&c.toCityControl
1sList.length>1&&l<c.toCityControlsList.length-1?"Stop "+(l+1):"To"," "),e.xp6(2),e.s9C("formControlName",i.key),e.Q6J("rtIndex",l)("rtKey",i.key)("userSettings",c.addressAutocompleteToSettingsList[i.key]),e.xp6(3),e.Q6J("ngIf",i.isDeletionAllowed&&c.stopsEnabled),e.xp6(1),e.Q6J("ngIf",i.isAdditionAllowed&&c.stopsEnabled&&(null==c.toCityControlsList[c.toCityControlsList.length-1]||null==c.toCityControlsList[c.toCityControlsList.length-1].toCitySelected?null:c.toCityControlsList[c.toCityControlsList.length-1].toCitySelected.cityId)),e.xp6(1),e.Q6J("ngIf",c.outstationForm.controls[i.key].hasError("required")&&c.outstationForm.controls[i.key].touched),e.xp6(1),e.Q6J("ngIf",c.noDestinationMatch),e.xp6(1),e.Q6J("ngIf",c.notValidDestination.has(i.key)&&!(c.outstationForm.controls[i.key].hasError("required")&&c.outstationForm.controls[i.key].touched)),e.xp6(1),e.Q6J("ngIf",c.destinationCitiesLoading)}}function nt(g,P){1&g&&(e.TgZ(0,"small",62),e._uU(1," Please select the return date. "),e.qZA())}function ft(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",165)(1,"div",133)(2,"label",141),e._uU(3),e.qZA(),e.TgZ(4,"div",135)(5,"p-calendar",166,167),e.NdJ("ngModelChange",function(c){return e.CHM(i),e.oxw(2).toDate=c})("onSelect",function(){return e.CHM(i),e.oxw(2).onDateSelected()}),e.qZA(),e.TgZ(7,"span",92),e._UZ(8,"i",93),e.qZA(),e.YNc(9,nt,2,0,"small",18),e.qZA()()()}if(2&g){const i=e.oxw(2);e.xp6(3),e.Oqu("oneWay"==i.subTripType&&i.useOWStops&&i.toCityControlsList.length>1?"DROP DATE":"RETURN DATE"),e.xp6(2),e.Q6J("readonlyInput",!0)("minDate",i.fromDate)("maxDate",i.maxFromDate)("selectOtherMonths",!0)("ngModel",i.toDate),e.xp6(4),e.Q6J("ngIf",i.outstationForm.controls.returnDateControl.hasError("required")&&i.outstationForm.controls.returnDateControl.touched)}}function Xe(g,P){if(1&g&&(e.TgZ(0,"mat-option",103),e._uU(1),e.ALo(2,"date"),e.qZA()),2&g){const i=P.$implicit;e.Q6J("value",i),e.xp6(1),e.hij(" ",e.xi3(2,2,i,"shortTime")," ")}}function wt(g,P){if(1&g&&(e.TgZ(0,"small",62),e._uU(1),e.qZA()),2&g){const i=e.oxw(2);e.xp6(1),e.hij(" ",i.pickupTimeErrorMessage," ")}}function Wi(g,P){1&g&&(e.TgZ(0,"small",62),e._uU(1,"You are in incognito window please use normal browser."),e.qZA())}function Hi(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div")(1,"form",130)(2,"div",131)(3,"div",132)(4,"div",133)(5,"label",134),e._uU(6,"From"),e.qZA(),e.TgZ(7,"div",135)(8,"ng4geo-autocomplete",136),e.NdJ("click",function(){return e.CHM(i),e.oxw().populateField("fromcity")})("componentCallback",function(c){return e.CHM(i),e.oxw().autoCompleteCallback(c)})("ngModelChange",function(){e.CHM(i);const c=e.oxw();return c.handleFromCityChange(c.selectedFromCity)})("focus",function(){return e.CHM(i),e.oxw().shouldShowTopSourceCityList=!0}),e.qZA(),e.YNc(9,et,4,1,"div",137),e.YNc(10,He,2,0,"small",18),e.YNc(11,Ue,2,1,"small",18),e.qZA()()(),e.YNc(12,tt,2,2,"div",138),e.YNc(13,ct,14,14,"div",139),e.TgZ(14,"div",140)(15,"div",133)(16,"label",141),e._uU(17,"PICK UP DATE"),e.qZA(),e.TgZ(18,"div",135)(19,"p-calendar",142,143),e.NdJ("onSelect",function(){return e.CHM(i),e.oxw().onFromDateChanged()})("ngModelChange",function(c){return e.CHM(i),e.oxw().fromDate=c}),e.qZA(),e.TgZ(21,"span",92),e._UZ(22,"i",93),e.qZA()()()(),e.YNc(23,ft,10,7,"div",144),e.TgZ(24,"div",140)(25,"div",133)(26,"div",145)(27,"label",146),e._uU(28,"PICK UP TIME"),e.qZA(),e.TgZ(29,"mat-select",147,148),e.NdJ("valueChange",function(c){return e.CHM(i),e.oxw().pickupTime=c})("selectionChange",function(){return e.CHM(i),e.oxw().didSelectPickUpTime()}),e.YNc(31,Xe,3,5,"mat-option",102),e.qZA(),e.TgZ(32,"span",149),e._UZ(33,"i",93),e.qZA(),e.YNc(34,wt,2,1,"small",18),e.qZA()()()(),e.TgZ(35,"div",150)(36,"button",151),e.NdJ("click",function(c){return e.CHM(i),e.oxw().exploreButtonClick(c)}),e._uU(37,"Explore Cabs"),e.qZA(),e.YNc(38,Wi,2,0,"small",18),e.qZA()()()}if(2&g){const i=e.oxw();e.xp6(1),e.Q6J("formGroup",i.outstationForm),e.xp6(2),e.Q6J("ngStyle",e.VKq(24,Ft,"oneWay"===i.subTripType||"roundTrip"===i.subTripType?"23%":"")),e.xp6(5),e.Q6J("userSettings",i.addressAutocompleteSettings),e.xp6(1),e.Q6J("ngIf",i.shouldShowTopSourceCityList&&!i.selectedFromCity&&i.topSourceCitiesList.length),e.xp6(1),e.Q6J("ngIf",i.outstationForm.controls.fromCityControl.hasError("required")&&i.outstationForm.controls.fromCityControl.touched&&!i.notValidSource),e.xp6(1),e.Q6J("ngIf",i.notValidSource),e.xp6(1),e.Q6J("ngIf","oneWay"==i.subTripType&&i.toCityControl
1sList.length<2||"roundTrip"===i.subTripType&&i.toCityControlsList.length<2),e.xp6(1),e.Q6J("ngForOf",i.toCityControlsList),e.xp6(1),e.Q6J("ngClass","roundTrip"==i.subTripType||"oneWay"==i.subTripType&&i.useOWStops&&i.toCityControlsList.length>1?"col-2":"col-3"),e.xp6(5),e.Q6J("readonlyInput",!0)("selectOtherMonths",!0)("minDate",i.minFromDate)("maxDate",i.maxFromDate)("ngModel",i.fromDate),e.xp6(4),e.Q6J("ngIf","roundTrip"==i.subTripType||"oneWay"==i.subTripType&&i.useOWStops&&i.toCityControlsList.length>1),e.xp6(1),e.Q6J("ngClass","roundTrip"==i.subTripType||"oneWay"==i.subTripType&&i.useOWStops&&i.toCityControlsList.length>1?"col-2":"col-3"),e.xp6(5),e.Q6J("value",i.pickupTime),e.xp6(2),e.Q6J("ngForOf",i.pickUpTimeOptions),e.xp6(3),e.Q6J("ngIf",i.outstationForm.controls.pickUpTimeControl.hasError("required")&&i.outstationForm.controls.pickUpTimeControl.touched),e.xp6(2),e.Tol(e.VKq(26,yt,i.disableInCognitoWindow)),e.Q6J("disabled",i.time_zone_error||i.disableInCognitoWindow)("ngStyle",e.VKq(28,Le,i.mahindraFlag?i.mahindraColor:"")),e.xp6(2),e.Q6J("ngIf",i.disableInCognitoWindow)}}function Ri(g,P){1&g&&(e.ynx(0),e._uU(1," The Chardham packages are supported on Round Trip "),e.BQk())}function qi(g,P){1&g&&e._uU(0," Char Dham packages are supported only from the following cities: ")}function Ji(g,P){1&g&&(e.TgZ(0,"div",180),e._uU(1," Delhi \u2022 Gurgaon \u2022 Noida \u2022 Faridabad \u2022 Ghaziabad \u2022 Haridwar \u2022 Dehradun \u2022 Rishikesh "),e.qZA())}function Yi(g,P){if(1&g){const i=e.EpF();e.TgZ(0,"div",168),e.NdJ("click",function(){e.CHM(i);const c=e.oxw();return c.showCityWarningPopup=!1,c.charDhamOWMCRestriction=!1}),e.TgZ(1,"div",169),e.NdJ("click",function(c){return c.stopPropagation()}),e.TgZ(2,"div",170),e.O4$(),e.TgZ(3,"svg",171),e._UZ(4,"circle",172)(5,"path",173),e.qZA()(),e.kcU(),e.TgZ(6,"h3",174),e._uU(7,"Char Dham Package Unavailable"),e.qZA(),e.TgZ(8,"p",175),e.YNc(9,Ri,2,0,"ng-container",176),e.YNc(10,qi,1,0,"ng-template",null,177,e.W1O),e.qZA(),e.YNc(12,Ji,2,0,"div",178),e.TgZ(13,"button",179),e.NdJ("click",function(){e.CHM(i);const c=e.oxw();return c.showCityWarningPopup=!1,c.charDhamOWMCRestriction=!1}),e._uU(14,"Got it"),e.qZA()()()}if(2&g){const i=e.MAs(11),l=e.oxw();e.xp6(9),e.Q6J("ngIf",l.charDhamOWMCRestriction)("ngIfElse",i),e.xp6(3),e.Q6J("ngIf",!l.charDhamOWMCRestriction)}}let Bi=(()=>{class g{constructor(i,l,c,_,y,C,D,O,v){var w=this;this.bookingService=i,this.router=l,this.route=c,this.dialog=_,this.localStorage=y,this.message=C,this.populateService=D,this.cd=O,this.navigationStateService=v,this.outstationForm=new t.cw({fromCityControl:new t.NI(null,t.kI.required),departureDateControl:new t.NI(null,t.kI.required),returnDateControl:new t.NI(null,t.kI.required),pickUpTimeControl:new t.NI(null,t.kI.required)}),this.showInput=!1,this.isFieldReadOnly=!1,this.time_zone_error=!1,this.mid_night_flag=!1,this.today_date_flag=!1,this.subTripType="oneWay",this.pickUpTimeOptions=[],this.pickupTimeErrorMessage="Please select the pick up time.",this.convertToISTErrorMessage="Please check your time zone",this.toCityControlsList=[],this.selectedTimePlaceHolder="Select Time",this.tempSourceCityListOfDestination=Array(),this.noDestinationMatch=!1,this.noDestinationMatchErrorMessage="",this.disableInCognitoWindow=!1,this.notValidSourceErrorMessage="",this.notValidSource=!1,this.notValidDestinationErrorMessage="",this.notValidDestination=new Set,this.checkModifySearch="",this.windowWidth=0,this.destinationCitiesLoading=!1,this.outstationCloseIcon=!0,this.phonePeFlag="",this.paytmFlag="",this.all_info="",this.sameCityChangetoLocal=!1,this.topSourceCitiesList=[],this.shouldShowTopSourceCityList=!1,this.shouldShowTopDestCityList=!1,this.mobileMode=!1,this.ixigoFlag=!1,this.ixigoColor="",this.mahindraColor="#734b29",this.mahindraFlag=!1,this.popularToCities=[],this.isTypedCity=!1,this.charDhamFlag=!1,this.showCityWarningPopup=!1,this.charDhamOWMCRestriction=!1,this.ct_errorMessage=[],this.isCalendarOpen=!1,this.selectedDropAddress={},this.duplicateDestinationSelected=!1,this.circularRouteDetected=!1,this.minDistance=0,this.hasInitializedCalendar=!1,this.variant1Flag=!1,this.variant2Flag=!1,this.useNewDesign=!0,this.useOWStops=!0,this.oneHourSlotFlag=!1,this.fromDateFocus=!0,this.toDateFocus=!0,this.timeAutoFocus=!0,this.toCityFocus=!0,this.timeWheelOptions=[],this.timeWheelHours=[],this.timeWheelMinutes=[],this.timeWheelMeridiems=[],this.selectedTimeHour="",this.selectedTimeMinute="",this.selectedTimeMeridiem="",this.defaultPickupTime="",this.isDateTimeSheetOpen=!1,this.datePickerMode="start",this.dateWheelOptions=[],this.wheelScrollTimers={},this.ignoreWheelScroll=!1,this.filteredFromCityList=E=>E.pipe((0,X.b)(200),(0,le.x)(),(0,_e.w)(function(){var A=(0,r.Z)(function*(B){if
1(!B)return w.tempSourceCityListOfDestination=[],w.cities=[],w.targetArray=[],w.popularToCities=[],[];let Y={page_url:"",user_input:"",trip_subtype:w.bookingService.getSubTripType(),error:""};Y.page_url=window.location.pathname;const W=(yield w.bookingService.getSourceCities()).slice(0).filter(Pe=>{try{return new RegExp("^"+B.trim(),"gi").test(Pe.cityName.toLowerCase())}catch(ne){return[]}}).slice(0,10);return w.isTypedCity=!0,W&&W.length>0?(w.notValidSource=!1,w.notValidSourceErrorMessage="",W):(0==w.notValidSource&&window.dataLayer.push({event:"invalid-city-entry","city-name":B,"city-type":"source"}),w.notValidSourceErrorMessage="Please enter valid city.",w.notValidSource=!0,Y.user_input=B,Y.error=w.notValidSourceErrorMessage,w.localStorage.save_CT_data("from_city_error",Y),w.localStorage.save_analytics_data("from-city-error",Y),[])});return function(B){return A.apply(this,arguments)}}())),this.formatter=E=>E.cityName,this.cities=[],this.sortedData=[],this.targetArray=[],this.filteredToCityList=E=>E.pipe((0,X.b)(200),(0,le.x)(),(0,_e.w)(function(){var A=(0,r.Z)(function*(B){if(!B)return[];if(null==w.fromCitySelected)return[];let oe,Y={page_url:"",user_input:"",trip_subtype:w.bookingService.getSubTripType(),error:""};if(Y.page_url=window.location.pathname,w.tempSourceCityListOfDestination=[],w.cities=[],w.targetArray=[],w.targetArray&&0==w.targetArray.length&&(null==w.localStorage.getCacheItem("outstationroundTrip")&&(w.destinationCitiesLoading=!0),w.targetArray=yield w.bookingService.getDestinationCities(),"oneWay"==w.subTripType&&(w.targetArray=w.localStorage.getCacheItem("outstationroundTrip")),w.cities=w.targetArray.slice(0),w.destinationCitiesLoading=!1),w.fromCitySelected.cityName){let W=w.fromCitySelected.cityName.split(","),Pe=W.length>=2?W[1].trim():W[0];w.sortedData=w.sort_by_state([...w.cities],Pe),oe=w.sortedData.slice(0).filter(ne=>{try{return new RegExp("^"+B.trim(),"gi").test(ne.cityName.toLowerCase())}catch(z){return!1}}).slice(0,10)}else oe=w.cities.slice(0).filter(W=>{try{return new RegExp("^"+B.trim(),"gi").test(W.cityName.toLowerCase())}catch(Pe){return!1}}).slice(0,10);return w.isTypedCity=!0,console.log(oe),oe&&0==oe.length?(w.notValidDestinationErrorMessage="Please select valid Destination city from list",Y.user_input=B,Y.error=w.notValidDestinationErrorMessage,w.localStorage.save_CT_data("to_city_error",Y),w.localStorage.save_analytics_data("to-city-error",Y),[]):(w.notValidDestinationErrorMessage="",oe)});return function(B){return A.apply(this,arguments)}}())),this.addressAutocompleteSettings={showSearchButton:!1,showRecentSearch:!1,geoCountryRestriction:["in"],showCurrentLocation:!1,inputPlaceholderText:"Enter Pickup Location"},this.addressAutocompleteToSettingsList={},this.subscription=this.message.getMessage().subscribe(E=>{E&&E.res&&"modifyCancel"==E.res&&(this.checkModifySearch=E.res)})}get stopsEnabled(){return"roundTrip"===this.subTripType||"oneWay"===this.subTripType&&this.useOWStops}get useTimeWheelPicker(){return this.mobileMode&&this.useNewDesign}get returnDateRequired(){return"roundTrip"===this.subTripType||"oneWay"===this.subTripType&&this.useOWStops&&this.toCityControlsList.length>1}set selectedFromCity(i){var l,c;let _=this.bookingService.getSelectedSourceCity();if(_&&_.cityId&&!i&&(i=this.bookingService.getSelectedSourceCity()),this.fromCitySelected=i,this.bookingService.setSelectedSourceCity(i),i&&i.cityId&&(this.computePickUpTimeOptions(new Date(this.fromDate)),"oneWay"==this.bookingService.getSubTripType()&&(this.targetArray=[],this.tempSourceCityListOfDestination=[],this.cities=[])),null===(l=this.fromCitySelected)||void 0===l?void 0:l.top_dest_ids){const y=localStorage.getItem("CacheServiceoutstationoneWay");if(null!==y){const C=JSON.parse(y);this.popCity=C.value}this.popularToCities=this.getCitiesFromIds(this.popCity,this.fromCitySelected.top_dest_ids),localStorage.setItem("popularToCities",JSON.stringify(this.popularToCities)),console.log(this.popularToCities)}else{const y=null===(c=this.fromCitySelected)||void 0===c?void 0:c.cityId;if(y){const C=localStorage.getItem("CacheServicesourceCityCache");if(C){const O=JSON.parse(C).value.find(v=>v.cityId.toString()===y.toString());if(null==O?void 0:O.top_dest_ids){const v=localStorage.getItem("CacheServiceoutstationoneWay");
1if(null!==v){const w=JSON.parse(v);this.popCity=w.value}this.popularToCities=this.getCitiesFromIds(this.popCity,O.top_dest_ids),localStorage.setItem("popularToCities",JSON.stringify(this.popularToCities))}else this.popularToCities=[],localStorage.removeItem("popularToCities")}}}}get selectedFromCity(){return this.fromCitySelected}getCitiesFromIds(i,l){const c=l.split(",").map(y=>parseInt(y)),_=[];for(const y of c){const C=i.find(D=>D.cityId===y);C&&_.push(C)}return _}sort_by_state(i,l){return[...i.filter(y=>y.stateOnly===l),...i.filter(y=>y.stateOnly!==l)]}ngAfterViewInit(){setTimeout(()=>{this.onCalendarClose()},500),setTimeout(()=>{this.fromCityComponent&&this.fromCityComponent.focusInput()},100),setTimeout(()=>{this.preFillPickupLocality(),this.preFillDropLocality()},100),this.validateValidSource(),this.validateValidDestination()}validateValidDestination(i,l){const _="roundTrip"===this.bookingService.getSubTripType()||this.useOWStops,y=_?null:JSON.parse(this.localStorage.getItem("custDropLocalityDetails")||"[]"),C=Array.isArray(y)?y:y?[y]:[],D=this.bookingService.getSelectedDestinationCity();i?(l||this.notValidDestination.clear(),this.toCityControlsList.forEach((O,v)=>{var w,E,A,B,Y;if(l&&O.key!==l)return;const oe=null===(E=null===(w=this.outstationForm)||void 0===w?void 0:w.controls)||void 0===E?void 0:E[O.key];if(!oe)return;const W=_?!!(null===(A=this.navigationStateService.getDropLocality(v))||void 0===A?void 0:A.custShortAddress):!!(null===(B=C[v])||void 0===B?void 0:B.custShortAddress),Pe=!!(D.length>0&&(null===(Y=null==D?void 0:D[v])||void 0===Y?void 0:Y.cityId));(!W||!Pe)&&(this.notValidDestination.add(O.key),this.notValidDestinationErrorMessage="Please select from Dropdown",oe.setErrors({required:!0}),oe.markAsTouched())})):this.notValidDestinationSub=this.bookingService.notValidDestination$.subscribe(O=>{this.toCityControlsList.forEach((v,w)=>{var E,A,B,Y,oe;const W=null===(A=null===(E=this.outstationForm)||void 0===E?void 0:E.controls)||void 0===A?void 0:A[v.key];if(W)if(O){const Pe=_?!!(null===(B=this.navigationStateService.getDropLocality(w))||void 0===B?void 0:B.custShortAddress):!!(null===(Y=C[w])||void 0===Y?void 0:Y.custShortAddress),ne=!!(D.length>0&&(null===(oe=null==D?void 0:D[w])||void 0===oe?void 0:oe.cityId));
1(!Pe||!ne)&&(this.notValidDestination.add(v.key),this.notValidDestinationErrorMessage="Please enter a valid Drop location",W.setErrors({required:!0}),W.markAsTouched())}else this.notValidDestination.clear(),this.notValidDestinationErrorMessage="",W.setErrors(null)})})}validateValidSource(i){var l=this;return(0,r.Z)(function*(){var c,_;const y=JSON.parse(l.localStorage.getItem("custLocalityDetails")||"{}"),C=yield l.bookingService.getSelectedSourceCity();if(i){const D=null===(_=null===(c=l.outstationForm)||void 0===c?void 0:c.controls)||void 0===_?void 0:_.fromCityControl,v=!(!C||!(null==C?void 0:C.cityId));if(!D)return;(!y||!(null==y?void 0:y.custShortAddress)||!v)&&(l.notValidSource=!0,l.notValidSourceErrorMessage="Please select from Dropdown",D.setErrors({required:!0}),D.markAsTouched())}else l.notValidSourceSub=l.bookingService.notValidSource$.subscribe(D=>{var O,v;const w=null===(v=null===(O=l.outstationForm)||void 0===O?void 0:O.controls)||void 0===v?void 0:v.fromCityControl;if(w)if(D){const A=!(!C||!(null==C?void 0:C.cityId));(!y||!(null==y?void 0:y.custShortAddress)||!A)&&(l.notValidSource=!0,l.notValidSourceErrorMessage="Please enter a valid Pickup location",w.setErrors({required:!0}),w.markAsTouched())}else l.notValidSource=!1,l.notValidSourceErrorMessage="",w.setErrors(null)})})()}preFillPickupLocality(){var i=this;return(0,r.Z)(function*(){const l=JSON.parse(i.localStorage.getItem("custLocalityDetails")||"{}"),c=JSON.parse(i.localStorage.getItem("custPopularLocalityDetails")||"{}"),_=JSON.parse(i.localStorage.getItem("cachedSourceCity")||"{}"),y=yield i.bookingService.getSelectedSourceCity();(null==l?void 0:l.custShortAddress)&&(null==_?void 0:_.cityId)?(i.customerLocalityDetails=l,i.selectedCustomerAddress=i.customerLocalityDetails.custShortAddress,i.bookingService.setCustomerLocalityDetails(i.customerLocalityDetails),i.fromCitySelected=_,i.bookingService.setSelectedSourceCity(_),i.addressAutocompleteSettings.inputString=i.selectedCustomerAddress,i.addressAutocompleteSettings=Object.assign({},i.addressAutocompleteSettings)):y&&y.cityId&&!(null==l?void 0:l.custShortAddress)?(i.selectedCustomerAddress=y.cityName,i.selectedFromCity=y,i.addressAutocompleteSettings.inputString=i.selectedCustomerAddress,i.addressAutocompleteSettings=Object.assign({},i.addressAutocompleteSettings)):c&&(null==c?void 0:c.cityId)&&!y&&!(null==l?void 0:l.custShortAddress)?(i.selectedCustomerAddress=c.cityName,i.selectedFromCity=c,i.addressAutocompleteSettings.inputString=i.selectedCustomerAddress,i.addressAutocompleteSettings=Object.assign({},i.addressAutocompleteSettings)):(i.customerLocalityDetails=null,i.selectedCustomerAddress="",i.addressAutocompleteSettings.inputString=i.selectedCustomerAddress,i.addressAutocompleteSettings=Object.assign({},i.addressAutocompleteSettings))})()}ngOnInit(){var i=this;return(0,r.Z)(function*(){var l,c,_,y;i.bookingService.setInvalidSourceFlag(!1),i.bookingService.setInvalidSourceFlag(!1),yield i.getTopSourceCity(),i.localStorage.checkPlatform()&&window.innerWidth<=710&&(i.mobileMode=!0),"1"==i.localStorage.getItem("ixigoFlag")&&(i.ixigoFlag=!0,i.ixigoColor=i.localStorage.getItem("ixigoColor")),"1"==i.localStorage.getItem("mahindraFlag")&&(i.mahindraFlag=!0);const C=i.route.snapshot.queryParams.variant;if(window.location.pathname.includes("landing")&&("2"===C?(i.variant2Flag=!0,i.variant1Flag=!1):(i.variant1Flag=!0,i.variant2Flag=!1)),i.localStorage.removeItem("selectedSourceCity"),i.localStorage.removeItem("selectedDestinationCity"),i.current_date_time=U.E.UNIXDateTime(U.E.convertToIST()),i.fromDate=U.E.convertToIST(),i.minFromDate=U.E.convertToIST(),i.maxFromDate=new Date(U.E.convertToIST().setFullYear(i.minFromDate.getFullYear()+1)),i.phonePeFlag=i.localStorage.getItem("InAppSource"),i.paytmFlag=i.localStorage.getItem("InAppSourcePaytm"),i.localStorage.removeItem("URGENTBOOKING"),i.localStorage.removeItem("NIGHTBOOKING"),i.localStorage.removeItem("URGENTBOOKINGSET"),i.localStorage.isLocalStorageAvailable()||(i.disableInCognitoWindow=!0),i.localStorage.checkPlatform()&&(i.windowWidth=window.innerWidth),i.windowWidth<=500){const ne=document.getElementById("fromCityList");null==ne||ne.addEventListener("focus",()=>{i.windowWidth<=500&&ne.blur()})}i.bookingService.setTripTypeId(3);const O=i.bookingService.getPreviousSubTripType(),v=null===(l=i.route.parent)||void 0===l?void 0:l.snapshot.url;if(v&&v.length>0&&v.length<=2){const ne=k.eP.getSEOPageDetails(v);if(O?i.bookingService.setSubTripType(O):24!=ne.seoType&&10!=ne.seoType&&29!=ne.seoType&&1!=ne.seoType&&2!=ne.seoType&&58!=ne.seoType?i.bookingService.setSubTripType("oneWay"):(24==ne.seoType||10==ne.seoType||29==ne.seoType||1==ne.seoType||2==ne.seoType||58==ne.seoType)&&i.bookingService.setSubTripType("roundTrip"),58==ne.seoType&&i.route.snapshot.queryParams.city){i.localStorage.setItem("charDhamFlag","1");
1const z=(i.route.snapshot.queryParams.city||"").toLowerCase().trim();if(z){const fe=(yield i.bookingService.getSourceCities()).find(me=>me.cityName.toLowerCase().split(/[\s,]+/).includes(z));if(fe){i.fromCitySelected=fe,i.bookingService.setSelectedSourceCity(fe);const Me=(yield i.bookingService.getDestinationCities()).find(Ae=>Ae.cityName.toLowerCase().split(/[\s,]+/).includes("kedarnath"));if(Me){i.toCityControlsList=[],i.bookingService.setSelectedDestinationCity([Me]);const Ae=i.bookingService.getSelectedDestinationCity();console.log(Ae),i.addToCityFromSeoContent(Ae[0]),i.charDhamPopup()}}}}else i.charDhamFlag=!1,i.localStorage.setItem("charDhamFlag",0)}i.subTripType=i.bookingService.getSubTripType();const w=i.bookingService.getSelectedSourceCity();w&&w.cityId?i.fromCitySelected=w:(i.fromCitySelected="",i.cd.destroyed||i.cd.detectChanges()),i.toCityControlsList=[];const E=i.bookingService.getSelectedDestinationCity(),A=i.bookingService.getSelectedLastDestinationCity(),B=i.bookingService.getLastSelecteCityAppended();if(A&&0==B&&(E.push(A),i.bookingService.setLastSelecteCityAppended(!0)),0===E.length)i.addToCityField();else{if("oneWay"==i.subTripType&&i.useOWStops)for(const z of E)i.addToCityFieldForCity(z);else if("oneWay"==i.subTripType)i.subTripTypeChange(),i.toCityControlsList=[],i.addToCityFieldForCity(E[0]);else for(const z of E)i.addToCityFieldForCity(z);const ne=(i.bookingService.getSelectedDestinationCity()||[]).filter(z=>null==z?void 0:z.cityId);if(i.bookingService.setSelectedDestinationCity(ne),i.useOWStops&&"oneWay"===i.subTripType)for(let z=0;z<i.toCityControlsList.length-1;z++)i.toCityControlsList[z].isStop=!0}i.configureToCityAddAndDeleteButtonVisibility(),i.bookingService.saveParamsToLocalStorage();let Y=U.E.convertToIST1();const oe=900*Math.ceil(U.E.UNIXDateTime(Y)/900),W=new Date(Y);if(W.setHours(23,59,59,999),U.E.UNIXDateTime(W)-oe<60*H.$x.lessThanTimeSlab*60){const ne=new Date(Y.getTime()+864e5);ne.setHours(0,0,0,0),Y=ne,i.mid_night_flag=!0,i.rem_hour=900*Math.ceil(U.E.UNIXDateTime(Y)/900)-900*Math.ceil(U.E.UNIXDateTime(U.E.convertToIST1())/900),i.computePickUpTimeOptions(Y)}else{i.computePickUpTimeOptions(Y);let ne=900*Math.ceil(U.E.UNIXDateTime(Y)/900);ne+=60*H.$x.lessThanTimeSlab*60;const z=U.E.DateTimeTZFormat(ne);i.pickupTime=z}if(i.bookingService.getFromDate()?(i.fromDate=i.bookingService.getFromDate(),setTimeout(()=>{i.computePickUpTimeOptions(i.fromDate)},30)):i.fromDate=Y,i.toDate=i.bookingService.getToDate()?i.bookingService.getToDate():i.fromDate,i.bookingService.getPickupTime()&&i.bookingService.getPickUpTimeOptions()&&(i.pickupTime=i.bookingService.getPickupTime(),i.pickUpTimeOptions=i.bookingService.getPickUpTimeOptions()),i.refreshTimeWheelOptions(),yield i.bookingService.getSourceCities(),yield i.bookingService.preFetchDestinationCities("377"),1==i.localStorage.getItem("charDhamFlag")){i.localStorage.removeItem("cachedDestinationCity"),i.localStorage.removeItem("custDropLocalityDetails"),i.localStorage.removeItem("custDropLocalityDetailsMap"),i.navigationStateService.clearAllDropLocalities();const z=[145,73,348,5,404,266,32,23],ue=null===(_=null===(c=i.toCityControlsList[0])||void 0===c?void 0:c.toCitySelected)||void 0===_?void 0:_.cityId,fe=null===(y=i.fromCitySelected)||void 0===y?void 0:y.cityId;if([3988,4294,3975,4610].includes(ue)&&z.includes(fe)&&"roundTrip"===i.subTripType)if("1"==i.localStorage.getItem("charDhamReturnFlow")){if(i.localStorage.removeItem("charDhamReturnFlow"),i.toCityControlsList.length>1){const Me=i.toCityControlsList[0];i.toCityControlsList=[Me],i.bookingService.setSelectedDestinationCity([Me.toCitySelected])}setTimeout(()=>{i.charDhamPopup()},300)}else"1"==i.localStorage.getItem("charDhamPopulateReturnFlow")&&(i.localStorage.removeItem("charDhamPopulateReturnFlow"),setTimeout(()=>{i.charDhamPopup()},300));else i.charDhamFlag=!1,i.localStorage.setItem("charDhamFlag",0),i.localStorage.removeItem("charDhamReturnFlow"),i.localStorage.removeItem("charDhamPopulateReturnFlow")}i.bookingService.getonewayexistance("377","")})()}preFillDropLocality(){var i;
1const c="roundTrip"===this.bookingService.getSubTripType(),_=JSON.parse(this.localStorage.getItem("custDropLocalityDetails")||"[]"),y=JSON.parse(this.localStorage.getItem("popularDropLocalityDetails")||"{}"),C=JSON.parse(this.localStorage.getItem("cachedDestinationCity")||"{}"),D=this.bookingService.getSelectedDestinationCity()||[];if(this.toCityControlsList.forEach((O,v)=>{var w,E;this.addressAutocompleteToSettingsList[O.key]||(this.addressAutocompleteToSettingsList[O.key]={showSearchButton:!1,showRecentSearch:!1,geoCountryRestriction:["in"],showCurrentLocation:!1,inputPlaceholderText:"Enter Drop Location",inputString:""});let A="";const B=c||this.useOWStops,Y=B?this.navigationStateService.getDropLocality(v):null,oe=(null==Y?void 0:Y.custShortAddress)?Y:_[v];if(null==oe?void 0:oe.custShortAddress){if(A=oe.custShortAddress,B&&!(null==Y?void 0:Y.custShortAddress)&&this.navigationStateService.setDropLocality(v,oe),D.length<1){const W="popular"===oe.source&&(null===(w=oe.place)||void 0===w?void 0:w.cityId)?oe.place:C;(null==W?void 0:W.cityId)&&(O.toCitySelected=W,this.bookingService.setSelectedDestinationCity([W]))}}else if(D.length>v&&(null===(E=D[v])||void 0===E?void 0:E.cityId))A=D[v].cityName;else if(!O.toCitySelected&&(null==y?void 0:y.cityId)){A=y.cityName,O.toCitySelected=y,this.bookingService.setSelectedDestinationCity([O.toCitySelected]);const W={custShortAddress:y.cityName||"",custFullAddress:y.formattedAddress||y.cityName||"",custLocality:y.cityName||"",custLatLong:y.ll||"",place_id:y.cityId?String(y.cityId):"",place:y,fullDropAddress:y.formattedAddress||y.cityName||"",source:"popular"};this.localStorage.setItem("custDropLocalityDetails",JSON.stringify([W])),this.navigationStateService.setDropLocality(v,W),this.bookingService.setCustomerDropLocalityDetails(W)}this.addressAutocompleteToSettingsList[O.key].inputString=A,this.addressAutocompleteToSettingsList=Object.assign({},this.addressAutocompleteToSettingsList)}),this.stopsEnabled){const O=this.navigationStateService.getNavigationContext();if((null==O?void 0:O.existingCity)&&"oneWay"===this.subTripType&&this.useOWStops){const v=O.rtIndex;if(v>=0&&v<this.toCityControlsList.length-1){const E=null===(i=this.toCityControlsList[v])||void 0===i?void 0:i.toCitySelected,A=O.existingCity.cityName||O.existingCity.cityOnly||"",B=(null==E?void 0:E.cityName)||(null==E?void 0:E.cityOnly)||"";A&&B&&A!==B&&this.localStorage.save_analytics_data("stop_edited",{stop_number:v+1,previous_city:A,new_city:B})}}this.navigationStateService.clearNavigationContext()}}selectTopDestCity(i){console.log("Selected top destination city:",i);let l={city_name:i,select_type:"Click"};setTimeout(()=>{this.localStorage.save_CT_data("select_to_city",l)},2e3)}selectTopSourceCity(i){var l,c;console.log("Selected top Source city:",i);let _={city_name:i,select_type:"Click"};setTimeout(()=>{this.localStorage.setItem("selectedSourceCity",JSON.stringify(this.fromCitySelected)),this.localStorage.save_CT_data("select_from_city",_)},2e3);const C=[3988,4294,3975,4610];[145,73,348,5,404,266,32,23].includes(null===(l=this.fromCitySelected)||void 0===l?void 0:l.cityId)&&(null===(c=this.toCityControlsList)||void 0===c?void 0:c.some(D=>{var O;return C.includes(null===(O=null==D?void 0:D.toCitySelected)||void 0===O?void 0:O.cityId)}))&&"roundTrip"===this.subTripType?(this.charDhamFlag=!0,this.localStorage.setItem("charDhamFlag",1)):(this.charDhamFlag=!1,this.localStorage.setItem("charDhamFlag",0))}handleFromCityChange(i){var l,c;if((null==i?void 0:i.cityId)&&this.isTypedCity){console.log("User typed city:",i.cityName);let C={city_name:i.cityName,select_type:"Type"};setTimeout(()=>{this.localStorage.setItem("selectedSourceCity",JSON.stringify(this.fromCitySelected)),this.localStorage.save_CT_data("select_from_city",C)},2e3)}const y=[3988,4294,3975,4610];[145,73,348,5,404,266,32,23].includes(null===(l=this.fromCitySelected)||void 0===l?void 0:l.cityId)&&(null===(c=this.toCityControlsList)||void 0===c?void 0:c.some(C=>{var D;return y.includes(null===(D=null==C?void 0:C.toCitySelected)||void 0===D?void 0:D.cityId)}))&&"roundTrip"===this.subTripType?(this.charDhamFlag=!0,this.localStorage.setItem("charDhamFlag",1)):(this.charDhamFlag=!1,this.localStorage.setItem("charDhamFlag",0))}handleToCityChange(i){var l,c;if((null==i?void 0:i.cityId)&&this.isTypedCity){console.log("User typed city:",i.cityName);let C={city_name:i.cityName,select_type:"Type"};setTimeout(()=>{this.localStorage.save_CT_data("select_to_city",C)},2e3)}const y=[3988,4294,3975,4610];[145,73,348,5,404,266,32,23].includes(null===(l=this.fromCitySelected)||void 0===l?void 0:l.cityId)&&
1(null===(c=this.toCityControlsList)||void 0===c?void 0:c.some(C=>{var D;return y.includes(null===(D=null==C?void 0:C.toCitySelected)||void 0===D?void 0:D.cityId)}))&&"roundTrip"===this.subTripType?(this.charDhamFlag=!0,this.localStorage.setItem("charDhamFlag",1)):(this.charDhamFlag=!1,this.localStorage.setItem("charDhamFlag",0))}ngAfterViewChecked(){this.cd.detectChanges()}ngOnDestroy(){var i,l;this.subscription.unsubscribe(),null===(i=this.notValidSourceSub)||void 0===i||i.unsubscribe(),null===(l=this.notValidDestinationSub)||void 0===l||l.unsubscribe(),this.toggleBodyScroll(!1),this.tempToCityControlsList&&this.tempToCityControlsList.length>0&&this.tempToCityControlsList[0].toCitySelected&&(this.toCityControlsList=this.tempToCityControlsList);const c=[];for(const _ of this.toCityControlsList)null!=_.toCitySelected&&c.push("string"==typeof _.toCitySelected?{cityName:_.toCitySelected,cityId:""}:_.toCitySelected);this.cd.detach()}onToCityInputClick(){this.showInput=!0,setTimeout(()=>{this.onToCityInputFocus()},0)}onToCityInputFocus(){const i=document.getElementById("toCityInput");i&&i.focus()}onInputClick(){this.isFieldReadOnly=!0,setTimeout(()=>{this.onInputFocus()},0)}onInputFocus(){const i=document.getElementById("fromCityList");i&&i.focus()}deleteToCityField(i){if(this.toCityControlsList.length>1){this.duplicateDestinationSelected=!1;const l=this.toCityControlsList.findIndex(c=>c.key===i);if(-1!==l){this.toCityControlsList.splice(l,1),this.useOWStops&&"oneWay"===this.subTripType&&this.localStorage.save_analytics_data("stop_removed",{stop_number:l+1,remaining_stops:this.toCityControlsList.length-2}),this.configureToCityAddAndDeleteButtonVisibility();const c=this.toCityControlsList.filter(y=>null!=y.toCitySelected).map(y=>"string"==typeof y.toCitySelected?{cityName:y.toCitySelected,cityId:""}:y.toCitySelected);if(this.bookingService.setSelectedDestinationCity(c),this.bookingService.saveParamsToLocalStorage(),this.bookingService.setCustomerDropLocalityDetails(""),this.toCityControlsList.forEach(y=>{var C;this.addressAutocompleteToSettingsList[y.key]&&!this.addressAutocompleteToSettingsList[y.key].inputString&&(null===(C=y.toCitySelected)||void 0===C?void 0:C.cityName)&&(this.addressAutocompleteToSettingsList[y.key]=Object.assign(Object.assign({},this.addressAutocompleteToSettingsList[y.key]),{inputString:y.toCitySelected.cityName}))}),this.addressAutocompleteToSettingsList=Object.assign({},this.addressAutocompleteToSettingsList),c.length>0?this.localStorage.setItem("cachedDestinationCity",JSON.stringify(c[0])):this.localStorage.removeItem("cachedDestinationCity"),"roundTrip"===this.bookingService.getSubTripType()||this.useOWStops){this.navigationStateService.clearDropLocality(l);const y=this.navigationStateService.getAllDropLocalities();this.navigationStateService.clearAllDropLocalities();const C=[];Object.keys(y).forEach(D=>{const O=Number(D),v=y[O];O<l?(this.navigationStateService.setDropLocality(O,v),C[O]=v):O>l&&(this.navigationStateService.setDropLocality(O-1,v),C[O-1]=v)}),this.localStorage.setItem("custDropLocalityDetails",JSON.stringify(C))}else{try{const C=this.localStorage.getItem("custDropLocalityDetailsMap")||"{}",D=JSON.parse(C)||{};delete D[i],this.localStorage.setItem("custDropLocalityDetailsMap",JSON.stringify(D))}catch(C){}let y=JSON.parse(this.localStorage.getItem("custDropLocalityDetails")||"[]");Array.isArray(y)&&(y=y.filter(C=>c.some(D=>{var O;return(C.fullDropAddress||C.cityName||"").toLowerCase().includes(null===(O=D.cityName)||void 0===O?void 0:O.toLowerCase())}))),this.localStorage.setItem("custDropLocalityDetails",JSON.stringify(y))}"oneWay"===this.subTripType&&this.useOWStops&&this.toCityControlsList.length<=1&&(this.toDate=this.fromDate)}}}configureToCityAddAndDeleteButtonVisibility(){for(const i of this.toCityControlsList)if(this.stopsEnabled){const l=this.toCityControlsList.indexOf(i);1===this.toCityControlsList.length&&0===l?(i.isAdditionAllowed=!0,i.isDeletionAllowed=!1):5===this.toCityControlsList.length&&4===l?(i.isAdditionAllowed=!1,i.isDeletionAllowed=!0):(i.isAdditionAllowed=!0,i.isDeletionAllowed=!0)}else i.isAdditionAllowed=!1,i.isDeletionAllowed=!1}clearFromCitySelection(){this.selectedFromCity&&this.clearInputSource()}clearInputSource(){this.bookingService.setSelectedSourceCity(""),this.addressAutocompleteSettings.inputString="",this.addressAutocompleteSettings=Object.assign({},this.addressAutocompleteSettings),this.fromCitySelected="",this.notValidSourceErrorMessage="",this.notValidSource=!1,this.localStorage.removeItem("custLocalityDetails"),this.outstationForm.controls.fromCityControl.setErrors({required:!0}),this.outstationForm.controls.fromCityControl.markAsTouched(),this.selectedFromCity=""}clearInputDest(){var i,l,c,_,y;this.bookingService.setSelectedDestinationCity([]),this.bookingService.setCustomerDropLocalityDetails(""),this.localStorage.removeItem("cachedDestinationCity"),this.toCityControl
1sList.length>0&&(this.toCityControlsList[0].toCitySelected="",this.addressAutocompleteToSettingsList[null===(i=this.toCityControlsList[0])||void 0===i?void 0:i.key]||(this.addressAutocompleteToSettingsList[null===(l=this.toCityControlsList[0])||void 0===l?void 0:l.key]={showSearchButton:!1,showRecentSearch:!1,geoCountryRestriction:["in"],showCurrentLocation:!1,inputPlaceholderText:"Enter Drop Location",inputString:""}),this.addressAutocompleteToSettingsList[null===(c=this.toCityControlsList[0])||void 0===c?void 0:c.key].inputString="",this.addressAutocompleteToSettingsList[null===(_=this.toCityControlsList[0])||void 0===_?void 0:_.key]=Object.assign({},this.addressAutocompleteToSettingsList[null===(y=this.toCityControlsList[0])||void 0===y?void 0:y.key])),this.localStorage.removeItem("custDropLocalityDetails"),this.localStorage.removeItem("custDropLocalityDetailsMap"),this.navigationStateService.clearAllDropLocalities()}addToCityFieldForCity(i){if((null==i?void 0:i.cityId)&&this.toCityControlsList.length<5){const l=new Ee;l.key=Math.random().toString(),l.control=new t.NI(null,t.kI.required),l.toCitySelected=i,this.outstationForm.addControl(l.key,l.control),this.toCityControlsList.push(l)}}hasDuplicateDestinations(){if(0==this.toCityControlsList.length)return this.duplicateDestinationSelected=!1,!1;let i=Array();for(let l of this.toCityControlsList)l.toCitySelected&&l.toCitySelected.cityId&&i.push(l.toCitySelected.cityId);return Te.f.hasOrderedDuplicates(i)}findStopMatchingFromOrTo(){var l,c;if("oneWay"!==this.subTripType||!this.useOWStops||this.toCityControlsList.length<=1)return null;const y=this.toCityControlsList[this.toCityControlsList.length-1],C=null===(l=null==y?void 0:y.toCitySelected)||void 0===l?void 0:l.cityId;for(let D=0;D<this.toCityControlsList.length-1;D++){const O=this.toCityControlsList[D],v=null===(c=null==O?void 0:O.toCitySelected)||void 0===c?void 0:c.cityId;if(v&&C&&v==C)return O}return null}addToCityField(i=null){var l,c,_,y;this.duplicateDestinationSelected=!1,this.circularRouteDetected=!1;for(const v of this.toCityControlsList)v.hasStopConflict=!1,this.outstationForm.controls[v.key].setErrors(null),this.outstationForm.controls[v.key].markAsUntouched();let C=!1;for(const v of this.toCityControlsList)if(!v.toCitySelected){this.outstationForm.controls[v.key].setErrors({required:!0}),this.outstationForm.controls[v.key].markAsTouched();const w=(this.useOWStops&&"oneWay"===this.subTripType||"roundTrip"===this.subTripType)&&this.toCityControlsList.indexOf(v)<this.toCityControlsList.length-1;return v.errorMessage=w?"Please select Stop city":"Please select the drop city",void(C=!0)}const D=this.findStopMatchingFromOrTo();if(D)return D.hasStopConflict=!0,D.errorMessage="You have already selected this city.",this.outstationForm.controls[D.key].setErrors({required:!0}),void this.outstationForm.controls[D.key].markAsTouched();if(this.hasDuplicateDestinations()){let v=this.toCityControlsList[this.toCityControlsList.length-1];for(let w=1;w<this.toCityControlsList.length;w++){const E=this.toCityControlsList[w-1],A=this.toCityControlsList[w];if((null===(l=E.toCitySelected)||void 0===l?void 0:l.cityId)&&(null===(c=A.toCitySelected)||void 0===c?void 0:c.cityId)&&E.toCitySelected.cityId===A.toCitySelected.cityId){v=A;break}}return this.outstationForm.controls[v.key].setErrors({required:!0}),this.outstationForm.controls[v.key].markAsTouched(),this.duplicateDestinationSelected=!0,void(v.errorMessage="You have already selected this city")}const O=this.toCityControlsList.findIndex(v=>v.key===i);if(-1!==O){const v=this.toCityControlsList[O];if(!v.toCitySelected)return this.outstationForm.controls[v.key].setErrors({required:!0}),this.outstationForm.controls[v.key].markAsTouched(),void(v.errorMessage=(this.useOWStops&&"oneWay"===this.subTripType||"roundTrip"===this.subTripType)&&O<this.toCityControlsList.length-1?"Please select Stop city":"Please select the drop city");if(this.hasDuplicateDestinations())return this.outstationForm.controls[v.key].setErrors({required:!0}),this.outstationForm.controls[v.key].markAsTouched(),this.duplicateDestinationSelected=!0,void(v.errorMessage="You have already selected this city")}
1if(this.toCityControlsList.length<5&&!C){const v=new Ee;if(v.key=Math.random().toString(),v.control=new t.NI(null,t.kI.required),this.outstationForm.addControl(v.key,v.control),this.useNewDesign&&this.toCityControlsList.length>0){v.errorMessage="Please select Stop city",v.isStop=!0;const w=this.toCityControlsList.length-1,E=this.toCityControlsList[w],A=null==E?void 0:E.key,B=A?this.addressAutocompleteToSettingsList[A]:null,Y=(null==B?void 0:B.inputString)||(null===(_=null==E?void 0:E.toCitySelected)||void 0===_?void 0:_.cityName)||"";this.toCityControlsList.splice(w,0,v),this.addressAutocompleteToSettingsList[v.key]={showSearchButton:!1,showRecentSearch:!1,geoCountryRestriction:["in"],showCurrentLocation:!1,inputPlaceholderText:"Enter Stop Location",inputString:""},A&&(this.addressAutocompleteToSettingsList[A]=Object.assign(Object.assign({},B||{showSearchButton:!1,showRecentSearch:!1,geoCountryRestriction:["in"],showCurrentLocation:!1,inputPlaceholderText:"Enter Drop Location"}),{inputString:Y}),this.addressAutocompleteToSettingsList=Object.assign({},this.addressAutocompleteToSettingsList));let oe=this.bookingService.getSelectedDestinationCity()||[];oe.length>w?oe.splice(w,0,null):oe.push(null),this.bookingService.setSelectedDestinationCity(oe);let W=JSON.parse(this.localStorage.getItem("custDropLocalityDetails")||"[]");Array.isArray(W)&&(W.length>w?W.splice(w,0,null):W.push(null),this.localStorage.setItem("custDropLocalityDetails",JSON.stringify(W))),this.navigationStateService.insertDropLocality(w)}else v.errorMessage="Please select the drop city",v.isStop=!1,this.toCityControlsList.push(v);if(this.configureToCityAddAndDeleteButtonVisibility(),this.useOWStops&&"oneWay"===this.subTripType&&this.toCityControlsList.length>1){const w=this.toCityControlsList.length-1,E=w-1,A=[(null===(y=this.fromCitySelected)||void 0===y?void 0:y.cityName)||"",...this.toCityControlsList.map(B=>{var Y;return(null===(Y=B.toCitySelected)||void 0===Y?void 0:Y.cityName)||""}).filter(Boolean)].join(" , ");this.localStorage.save_analytics_data("add_stop_clicked",{stop_number:w,existing_stop_count:E,route:A}),w>=2&&this.localStorage.save_analytics_data("add_multiple_stops_clicked",{stop_number:w})}}}autoCompleteCallback(i){var l=this;return(0,r.Z)(function*(){var c,_,y,C,D,O,v;const w=A=>{const B=(A||"").split(",").map(Y=>Y.trim()).filter(Boolean);return{cityOnly:B[0]||"",stateOnly:B[1]||""}},E=function(){var A=(0,r.Z)(function*(){const B=null==i?void 0:i._cityMap;if(!B)return null;const Y=yield l.bookingService.getSourceCities(),oe=(B.is_city||w(B.city_name).cityOnly||"").toString().trim(),W=(B.State||w(B.city_name).stateOnly||"").toString().trim();if(!oe||!W)return null;const Pe=Y.find(ne=>(ne.cityOnly||"").toLowerCase()===oe.toLowerCase()&&(ne.stateOnly||"").toLowerCase()===W.toLowerCase());if(!Pe&&B.city_id){const ne=Y.find(z=>Number(z.cityId)===Number(B.city_id));if(ne)return ne}return Pe||null});return function(){return A.apply(this,arguments)}}();if(i.address_components){console.log(i.address_components),l.notValidSource=!1;let A="";const B=Array("sublocality_level_3","sublocality_level_2","sublocality_level_1");for(let Ne=0;Ne<B.length;Ne++)for(let Ve=0;Ve<i.address_components.length;Ve++)if(i.address_components[Ve].types.indexOf(B[Ne])>-1){if(A&&"sublocality_level_2"==B[Ne])continue;A&&"sublocality_level_2"!=B[Ne]&&(A+="-"),A+=i.address_components[Ve].short_name}const Y=A.split("-")[0],oe=i.name,Pe=i.formatted_address.split(Y)[0].replace(/,\s*$/,""),ue=`${null===(_=null===(c=i.geometry)||void 0===c?void 0:c.location)||void 0===_?void 0:_.lat},${null===(C=null===(y=i.geometry)||void 0===y?void 0:y.location)||void 0===C?void 0:C.lng}`,fe=i.place_id;let me=yield E();if(!me){let Ne="",Ve="";for(const it of i.address_components)it.types.includes("locality")&&(Ne=it.long_name),it.types.includes("administrative_area_level_1")&&(Ve=it.long_name);const rt=yield l.bookingService.getSourceCities();Ne&&Ve&&(me=rt.find(it=>it.cityOnly.toLowerCase()===Ne.toLowerCase()&&it.stateOnly.toLowerCase()===Ve.toLowerCase()))}me&&(l.selectedFromCity=me,l.minDistance=0),setTimeout(()=>{l.toCityComponent&&l.toCityFocus&&l.toCityComponent.focusInput()},100),l.localStorage.setItem("cachedSourceCity",JSON.stringify(l.selectedFromCity));const Me={city_name:null===(D=l.selectedFromCity)||void 0===D?void 0:D.cityName,select_type:"Type"};setTimeout(()=>{l.localStorage.save_CT_data("select_from_city",Me)},2e3);const Ae={custShortAddress:oe,custFullAddress:(oe+", "+Pe).replace(/,\s*$/,""),custLocality:A,custLatLong:ue,isLocalityAirport:0,place_id:fe,place:i,fullPickupAddress:i.name+", "+i.formatted_address};l.customerLocalityDetails=Ae,l.selectedCustomerAddress=oe,l.localStorage.setItem("custLocalityDetails",JSON.stringify(Ae)),l.bookingService.setCustomerLocalityDetails(Ae),l.addressAutocompleteSettings.inputString=l.selectedCustomerAddress,l.addressAutocompleteSettings=Object.assign({},l.addressAutocompleteSettings),console.log(typeof l.selectedFromCity),"object"==typeof l.selectedFromCity&&(null===(O=l.selectedFromCity)||void 0===O?void 0:O.cityId)>0&&l.outstationForm.controls.fromCityControl.markAsUntouched()}else l.selectedFromCity=i,console.log(typeof l.selectedFromCity),"object"==typeof l.selectedFromCity&&(null===(v=l.selectedFromCity)||void 0===v?void 0:v.cityId)>0&&l.outstationForm.controls.fromCityControl.markAsUntouched(),i&&setTimeout(()=>{l.toCityComponent&&l.toCityFocus&&l.toCityComponent.focusInput()},100)})()}autoDropCompleteCallback(i,l){var c=this;return(0,r.Z)(function*(){var _,y,C,D,O,v,w,E,A,B;c.duplicateDestinationSelected=!1,c.notValidDestination.clear();const Y=z=>{const ue=(z||"").split(",").map(fe=>
1fe.trim()).filter(Boolean);return{cityOnly:ue[0]||"",stateOnly:ue[1]||""}},oe=()=>c.toCityControlsList.find(z=>z.key===l),W=function(){var z=(0,r.Z)(function*(){const ue=null==i?void 0:i._cityMap;if(!ue)return null;const fe=yield c.bookingService.getDestinationCities(),me=(ue.is_city||Y(ue.city_name).cityOnly||"").toString().trim(),Me=(ue.State||Y(ue.city_name).stateOnly||"").toString().trim();if(me&&Me){const Ae=fe.find(Ne=>(Ne.cityOnly||"").toLowerCase()===me.toLowerCase()&&(Ne.stateOnly||"").toLowerCase()===Me.toLowerCase());if(Ae)return Ae}if(ue.city_id){const Ae=fe.find(Ne=>Number(Ne.cityId)===Number(ue.city_id));if(Ae)return Ae}return null});return function(){return z.apply(this,arguments)}}();if(i.address_components){let z="";const ue=["sublocality_level_3","sublocality_level_2","sublocality_level_1"];for(let ot=0;ot<ue.length;ot++)for(let ze=0;ze<i.address_components.length;ze++)if(i.address_components[ze].types.indexOf(ue[ot])>-1){if(z&&"sublocality_level_2"===ue[ot])continue;z&&"sublocality_level_2"!==ue[ot]&&(z+="-"),z+=i.address_components[ze].short_name}const fe=z.split("-")[0],me=i.name?i.name.toString():"",Ae=i.formatted_address.split(fe)[0].replace(/,\s*$/,""),rt=`${null===(y=null===(_=i.geometry)||void 0===_?void 0:_.location)||void 0===y?void 0:y.lat},${null===(D=null===(C=i.geometry)||void 0===C?void 0:C.location)||void 0===D?void 0:D.lng}`,it=i.place_id,Et=oe();if(Et){let ot=yield W();if(!ot){let ze="",dt="";for(const $e of i.address_components)$e.types.includes("locality")&&(ze=$e.long_name),$e.types.includes("administrative_area_level_1")&&(dt=$e.long_name);const pt=yield c.bookingService.getDestinationCities();ze&&dt&&(ot=pt.find($e=>$e.cityOnly.toLowerCase()===ze.toLowerCase()&&$e.stateOnly.toLowerCase()===dt.toLowerCase()))}ot&&((z,ue)=>{var fe,me,Me;const Ae=(null===(fe=z.toCitySelected)||void 0===fe?void 0:fe.cityName)||(null===(me=z.toCitySelected)||void 0===me?void 0:me.cityOnly),Ne=c.toCityControlsList.findIndex(Et=>Et.key===l);Ae&&Ne>=0&&Ne<c.toCityControlsList.length-1&&"oneWay"===c.subTripType&&c.useOWStops&&c.localStorage.save_analytics_data("stop_edited",{stop_number:Ne+1,previous_city:Ae,new_city:ue.cityName||ue.cityOnly||""}),z.toCitySelected=Object.assign({},ue);const rt=c.bookingService.getSelectedDestinationCity()||[];if(-1!==Ne){for(;rt.length<=Ne;)rt.push(null);rt[Ne]=z.toCitySelected}else rt.push(z.toCitySelected);c.bookingService.setSelectedDestinationCity(rt),c.bookingService.saveParamsToLocalStorage(),c.handleToCityChange(z.toCitySelected),c.minDistance=0,c.fromCalendarRef&&c.fromDateFocus&&c.fromCalendarRef.nativeElement.querySelector("input").click(),c.toCityFocus=!1,Ne<=0&&c.localStorage.setItem("cachedDestinationCity",JSON.stringify(z.toCitySelected));const it={city_name:null===(Me=z.toCitySelected)||void 0===Me?void 0:Me.cityName,select_type:"Type"};setTimeout(()=>{c.localStorage.save_CT_data("select_to_city",it)},2e3)})(Et,ot)}const Tt={custShortAddress:me,custFullAddress:(me+", "+Ae).replace(/,\s*$/,""),custLocality:z,custLatLong:rt,isLocalityAirport:0,place:i,place_id:it,fullDropAddress:i.name+", "+i.formatted_address};c.customerDropLocalityDetails=Tt,c.selectedDropAddress=me,c.addressAutocompleteToSettingsList[l]={showSearchButton:!1,showRecentSearch:!1,geoCountryRestriction:["in"],showCurrentLocation:!1,inputPlaceholderText:"Enter Drop Location",inputString:c.selectedDropAddress};const Nt=c.toCityControlsList.findIndex(ot=>ot.key===l),Oi="roundTrip"===c.bookingService.getSubTripType(),wi=-1!==Nt?Nt:0;let kt=JSON.parse(c.localStorage.getItem("custDropLocalityDetails")||"[]");Array.isArray(kt)||(kt=[]),-1!==Nt?kt[Nt]=Tt:kt.push(Tt),c.localStorage.setItem("custDropLocalityDetails",JSON.stringify(kt)),(Oi||c.useOWStops)&&c.navigationStateService.setDropLocality(wi,Tt),console.log("%cUpdated Drop Locality:","color: green; font-weight: bold;",Tt),c.bookingService.setCustomerDropLocalityDetails(Tt)}else{const z=oe();if(z){const ue=c.toCityControlsList.findIndex(Me=>Me.key===l),fe=ue>=0&&ue<c.toCityControlsList.length-1,me=(null===(O=z.toCitySelected)||void 0===O?void 0:O.cityName)||(null===(v=z.toCitySelected)||void 0===v?void 0:v.cityOnly);if(me&&fe&&"oneWay"===c.subTripType&&c.useOWStops&&c.localStorage.save_analytics_data("stop_edited",{stop_number:ue+1,previous_city:me,new_city:i.cityName||i.cityOnly||""}),z.toCitySelected=i,c.handleToCityChange(z.toCitySelected),(null==i?void 0:i.cityName)||(null==i?void 0:i.cityOnly)){const Me=i.cityName||i.cityOnly||"";c.addressAutocompleteToSettingsList[l]&&(c.addressAutocompleteToSettingsList[l]=Object.assign(Object.assign({},c.addressAutocompleteToSettingsList[l]),{inputString:Me}))}if(null==i?void 0:i.cityId){const Me=c.bookingService.getSelectedDestinationCity()||[],Ae=-1!==ue?ue:0;for(;Me.length<=Ae;)Me.push(null);Me[Ae]=z.toCitySelected,c.bookingService.setSelectedDestinationCity(Me),c.bookingService.saveParamsToLocalStorage(),Ae<=0&&c.localStorage.setItem("cachedDestinationCity",JSON.stringify(z.toCitySelected))}i&&c.fromCalendarRef&&c.fromDateFocus&&c.fromCalendarRef.nativeElement.querySelector("input").click(),c.toCityFocus=!1}}c.outstationForm.controls[l]&&c.outstationForm.controls[l].setErrors(null);const ne=c.findStopMatchingFromOrTo();if(ne)c.duplicateDestinationSelected=!1,ne.hasStopConflict=!0,ne.errorMessage="You have already selected this city.",c.outstationForm.controls[ne.key].setErrors({required:!0}),c.outstationForm.controls[ne.key].markAsTouched(),c.trackValidationError("duplicate",(null===(w=ne.toCitySelected)||void 0===w?void 0:w.cityName)||"");
1else{for(const z of c.toCityControlsList)z.hasStopConflict=!1;if(c.hasDuplicateDestinations()){c.duplicateDestinationSelected=!0;for(let z=1;z<c.toCityControlsList.length;z++){const ue=c.toCityControlsList[z-1],fe=c.toCityControlsList[z];if((null===(E=ue.toCitySelected)||void 0===E?void 0:E.cityId)&&(null===(A=fe.toCitySelected)||void 0===A?void 0:A.cityId)&&ue.toCitySelected.cityId===fe.toCitySelected.cityId){c.outstationForm.controls[fe.key].setErrors({required:!0}),c.outstationForm.controls[fe.key].markAsTouched(),fe.errorMessage="You have already selected this city",c.trackValidationError("duplicate",(null===(B=fe.toCitySelected)||void 0===B?void 0:B.cityName)||"");break}}}}})()}computePickUpTimeOptions(i){var l=this;return(0,r.Z)(function*(){var c;const y=Number(null===(c=l.fromCitySelected)||void 0===c?void 0:c.cityId);l.oneHourSlotFlag=[377,145,223,114,261,81,244,36,73,320,422,330,203,48,41,126,154,84,288,171,128,219,297,218,441,8,5,2097,266,241,32,176,163,220,404,1263,329,160,104,72,178,180,212,40,2,339,63,191,384,1983,35,294,747,348,425,401,3074,53,67,412,269,90,289,405,231,111,380,354,169,141,25,4,695,248,286,80,165,18,371,345,312,157].includes(y),console.log(l.oneHourSlotFlag);let C=l.oneHourSlotFlag?3600:7200,D=new Date(l.bookingService.getFromDate());if(console.log(i),console.log(D),isNaN(D.getTime())){let w=U.E.convertToIST1();const E=U.E.convertToIST(),A=new Date(w);let B;l.today_date_flag=!1,A.setHours(0,0,0,0)===E.setHours(0,0,0,0)&&(w=U.E.convertToIST(),l.today_date_flag=!0),l.pickUpTimeOptions=[],l.today_date_flag?"PhonePe"==l.phonePeFlag||"Paytm"==l.paytmFlag?(l.timeAutoFocus=!0,B=900*Math.ceil(U.E.UNIXDateTime(w)/900)+14400):(l.timeAutoFocus=!1,B=900*Math.ceil(U.E.UNIXDateTime(w)/900)+C):(B=900*Math.ceil(U.E.UNIXDateTime(w)/900),l.timeAutoFocus=!0);const Y=new Date(w);Y.setHours(23,59,59,999);const oe=U.E.UNIXDateTime(Y);for(;B<oe;)l.pickUpTimeOptions.push(U.E.DateTimeTZFormat(B)),B+=900}else{const w=U.E.convertToIST(),E=new Date(D);let A;l.today_date_flag=!1,E.setHours(0,0,0,0)===w.setHours(0,0,0,0)&&(D=U.E.convertToIST(),l.today_date_flag=!0),l.pickUpTimeOptions=[],l.today_date_flag?"PhonePe"==l.phonePeFlag||"Paytm"==l.paytmFlag?A=900*Math.ceil(U.E.UNIXDateTime(D)/900)+14400:(l.timeAutoFocus=!1,A=900*Math.ceil(U.E.UNIXDateTime(D)/900)+C):(A=900*Math.ceil(U.E.UNIXDateTime(D)/900),l.timeAutoFocus=!0);const B=new Date(D);B.setHours(23,59,59,999);const Y=U.E.UNIXDateTime(B);for(;A<Y;)l.pickUpTimeOptions.push(U.E.DateTimeTZFormat(A)),A+=900}const O=new Date(l.pickupTime);D.setHours(O.getHours(),O.getMinutes(),0,0),console.log(D);const v=l.pickUpTimeOptions.findIndex(w=>new Date(w).getTime()===D.getTime());if(l.pickupTime=-1!==v?l.pickUpTimeOptions[v]:l.pickUpTimeOptions[0],l.today_date_flag&&!l.mid_night_flag)l.pickupTime=l.bookingService.getPickupTime()&&l.pickupTime===l.pickUpTimeOptions[0]?l.pickUpTimeOptions[0]:l.pickUpTimeOptions[v];else if(l.mid_night_flag){let w=new Date(i);w.setHours(0,0,0,0);let E=900*Math.ceil(U.E.UNIXDateTime(w)/900);E+=60*H.$x.lessThanTimeSlab*60-l.rem_hour;const A=U.E.DateTimeTZFormat(E);l.pickupTime=l.bookingService.getPickupTime()?l.pickUpTimeOptions[v]:A}else{let w=U.E.convertToIST1(),E=900*Math.ceil(U.E.UNIXDateTime(w)/900);E+=60*H.$x.lessThanTimeSlab*60;const A=U.E.DateTimeTZFormat(E);l.bookingService.getPickupTime()===l.pickUpTimeOptions[0]?l.pickupTime=A:l.bookingService.getPickupTime()?(l.pickupTime=l.pickUpTimeOptions[v],console.log(l.pickupTime)):l.pickupTime=A}l.defaultPickupTime=l.pickupTime,l.refreshTimeWheelOptions()})()}buildTimeWheelOptions(){this.timeWheelOptions=(this.pickUpTimeOptions||[]).map(i=>{const l=new Date(i);if(isNaN(l.getTime()))return null;const c=l.getHours(),_=c>=12?"PM":"AM";return{value:i,hour:String(c%12||12),minute:String(l.getMinutes()).padStart(2,"0"),meridiem:_}}).filter(Boolean)}refreshTimeWheelOptions(){var i,l;this.buildTimeWheelOptions(),this.timeWheelMeridiems=[];for(const c of this.timeWheelOptions)this.timeWheelMeridiems.includes(c.meridiem)||this.timeWheelMeridiems.push(c.meridiem);this.timeWheelMeridiems.includes(this.selectedTimeMeridiem)||(this.selectedTimeMeridiem=this.timeWheelMeridiems[0]||"AM"),this.updateTimeWheelHoursAndMinutes(),(!this.selectedTimeHour||!this.selectedTimeMinute||this.pickupTime===this.selectedTimePlaceHolder)&&this.syncTimeWheelSelectionFromPickupTime(),(null===(l=null===(i=this.outstationForm)||void 0===i?void 0:i.controls)||void 0===l?void 0:l.pickUpTimeControl)&&this.pickupTime&&this.outstationForm.controls.pickUpTimeControl.setValue(this.pickupTime)}updateTimeWheelHoursAndMinutes(){const i=[];for(const c of this.timeWheelOptions)c.meridiem===this.selectedTimeMeridiem&&(i.includes(c.hour)||i.push(c.hour));this.timeWheelHours=i,this.timeWheelHours.includes(this.selectedTimeHour)||(this.selectedTimeHour=this.timeWheelHours[0]||"");const l=[];for(const c of this.timeWheelOptions)c.meridiem===this.selectedTimeMeridiem&&c.hour===this.selectedTimeHour&&(l.includes(c.minute)||l.push(c.minute));this.timeWheelMinutes=l,this.timeWheelMinutes.includes(this.selectedTimeMinute)||(this.selectedTimeMinute=this.timeWheelMinutes[0]||"")}syncTimeWheelSelectionFromPickupTime(){const i=[this.pickupTime,this.defaultPickupTime];for(const c of i){if(!c)continue;const _=new Date(c);if(!isNaN(_.getTime())){const y=_.getHours();return this.selectedTimeMeridiem=y>=12?"PM":"AM",this.selectedTimeHour=String(y%12||12),this.selectedTimeMinute=String(_.getMinutes()).padStart(2,"0"),void this.updateTimeWheelHoursAndMinutes()}}const l=this.timeWheelOptions[0];l&&(this.selectedTimeMeridiem=l.meridiem,this.selectedTimeHour=l.hour,this.selectedTimeMinute=l.minute,this.updateTimeWheelHoursAndMinutes())}applyTimeWheelSelection(){var i,l;if(!this.timeWheelOptions.length)return;const c=this.timeWheelOptions.find(C=>C.meridiem===this.selectedTimeMeridiem&&C.hour===this.selectedTimeHour&&C.minute===this.selectedTimeMinute),_=this.timeWheelOptions.find(C=>C.meridiem===this.selectedTimeMeridiem&&C.hour===this.selectedTimeHour);this.pickupTime=(c||_||this.timeWheelOptions[0]).value,(null===(l=null===(i=this.outstationForm)||void 0===i?void 0:i.controls)||void 0===l?void 0:l.pickUpTimeControl)&&this.outstationForm.controls.pickUpTimeControl.setValue(this.pickupTime),this.didSelectPickUpTime()}onTimeWheelMeridiemChange(){this.updateTimeWheelHoursAndMinutes(),this.applyTimeWheelSelection()}onTimeWheelHourChange(){this.updateTimeWheelHoursAndMinutes(),this.applyTimeWheelSelection()}onTimeWheelMinuteChange(){this.applyTimeWheelSelection()}openDateTimeSheet(i){this.datePickerMode=i,this.isDateTimeSheetOpen=!0,this.toggleBodyScroll(!0),this.buildDateWheelOptions(),this.refreshTimeWheelOptions(),this.bookingService.setPreventClose(!0),setTimeout(()=>{this.scrollWheelsToSelection()},0)}closeDateTimeSheet(){this.isDateTimeSheetOpen=!1,this.toggleBodyScroll(!1),this.bookingService.setPreventClose(!1)}setDatePickerMode(i){this.datePickerMode=i,this.buildDateWheelOptions(),setTimeout(()=>{this.scrollWheelsToSelection()},0)}buildDateWheelOptions(){const i="end"===this.datePickerMode&&this.fromDate?new Date(this.fromDate):new Date(this.minFromDate),l=new Date(this.minFromDate);l.setFullYear(l.getFullYear()+1);const c=this.maxFromDate&&this.maxFromDate<l?new Date(this.maxFromDate):l,_=[],y=new Date(i);y.setHours(0,0,0,0);const C=new Date(c);for(C.setHours(0,0,0,0);y<=C;){const D=new Date(y);_.push({date:D,display:this.getDateWheelDisplay(D)}),y.setDate(y.getDate()+1)}this.dateWheelOptions=_}getDateWheelDisplay(i){return U.E.convertToIST().setHours(0,0,0,0)===new Date(i).setHours(0,0,0,0)?"Today":i.toLocaleDateString("en-US",{weekday:"short",day:"2-digit",month:"short"})}isDateWheelSelected(i){const l="end"===this.datePickerMode?this.toDate:this.fromDate;return!!l&&new Date(l).toDateString()===new Date(i).toDateString()}onDateWheelSelect(i){this.setDateWheelValue(i,!1)}setDateWheelValue(i,l){var c,_,y,C;if("end"===this.datePickerMode){const D=new Date(i);return this.toDate=this.fromDate&&D<new Date(this.fromDate)?new Date(this.fromDate):D,this.bookingService.setToDate(this.toDate),(null===(_=null===(c=this.outstationForm)||void 0===c?void 0:c.controls)||void 0===_?void 0:_.returnDateControl)&&this.outstationForm.controls.returnDateControl.setValue(this.toDate),void(l||setTimeout(()=>{this.scrollWheelsToSelection()},0))}this.fromDate=new Date(i),this.bookingService.setFromDate(this.fromDate),(null===(C=null===(y=this.outstationForm)||void 0===y?void 0:y.controls)||void 0===C?void 0:C.departureDateControl)&&this.outstationForm.controls.departureDateControl.setValue(this.fromDate),this.onFromDateChanged(),l||setTimeout(()=>{this.scrollWheelsToSelection()},0)}proceedDateTimeSheet(){"start"===this.datePickerMode&&this.returnDateRequired?this.setDatePickerMode("end"):this.closeDateTimeSheet()}get dateTimeSheetTitle(){return"end"===this.datePickerMode?"Select Trip End Date":"Select Trip Start Date & Time"}toggleBodyScroll(i){i?(document.body.style.overflow="hidden",document.body.style.touchAction="none"):(document.body.style.overflow="",document.body.style.touchAction="")}scrollWheelsToSelection(){this.scrollWheelToActive(this.dateWheelScrollRef),"end"!==this.datePickerMode&&(this.scrollWheelToActive(this.hourWheelScrollRef),this.scrollWheelToActive(this.minuteWheelScrollRef),this.scrollWheelToActive(this.meridiemWheelScrollRef))}onTimeWheelItemClick(){setTimeout(()=>{this.scrollWheelsToSelection()},0)}scrollWheelToActive(i){if(!(null==i?void 0:i.nativeElement))return;const l=i.nativeElement.querySelector(".wheel-item-active");l&&"function"==typeof l.scrollIntoView&&l.scrollIntoView({block:"center"})}onWheelScroll(i){this.ignoreWheelScroll||(this.wheelScrollTimers[i]&&clearTimeout(this.wheelScrollTimers[i]),this.wheelScrollTimers[i]=setTimeout(()=>{this.applyCenteredWheelSelection(i)},120))}applyCenteredWheelSelection(i){if(this.ignoreWheelScroll)return;const l="date"===i?this.dateWheelScrollRef:"hour"===i?this.hourWheelScrollRef:"minute"===i?this.minuteWheelScrollRef:this.meridiemWheelScrollRef,c=null==l?void 0:l.nativeElement;if(!c)return;const _=Array.from(c.querySelectorAll(".wheel-item"));if(!_.length)return;const y=c.scrollTop+c.clientHeight/2;let C=0,D=Number.POSITIVE_INFINITY;for(let v=0;v<_.length;v++){const w=_[v],A=Math.abs(w.offsetTop+w.offsetHeight/2-y);A<D&&(D=A,C=v)}this.ignoreWheelScroll=!0;const O=_[C];if(null==O||O.scrollIntoView({block:"center"}),"date"===i){const v=this.dateWheelOptions[C];(null==v?void 0:v.date)&&this.setDateWheelValue(v.date,!0)}else if("hour"===i){const v=this.timeWheelHours[C];v!==this.selectedTimeHour&&(this.selectedTimeHour=v,this.onTimeWheelHourChange())}else if("minute"===i){const v=this.timeWheelMinutes[C];v!==this.selectedTimeMinute&&(this.selectedTimeMinute=v,this.onTimeWheelMinuteChange())}else{const v=this.timeWheelMeridiems[C];v!==this.selectedTimeMeridiem&&(this.selectedTimeMeridiem=v,this.onTimeWheelMeridiemChange())}setTimeout(()=>{this.ignoreWheelScroll=!1},120)}exploreButtonClick(i){var l,c;const y=[3988,4294,3975,4610],C=null===(l=this.fromCitySelected)||void 0===l?void 0:l.cityId,D="roundTrip"===this.subTripType;
1if(!D&&this.useOWStops&&this.toCityControlsList.length>1&&this.toCityControlsList.some(A=>{var B;return y.includes(null===(B=A.toCitySelected)||void 0===B?void 0:B.cityId)}))return this.charDhamOWMCRestriction=!0,void(this.showCityWarningPopup=!0);const v=[145,73,348,5,404,266,32,23].includes(C),w=null===(c=this.toCityControlsList)||void 0===c?void 0:c.some(E=>{var A;return y.includes(null===(A=null==E?void 0:E.toCitySelected)||void 0===A?void 0:A.cityId)});v&&w&&D?(this.charDhamFlag=!0,this.localStorage.setItem("charDhamFlag",1),this.charDhamPopup()):!v&&w&&D?this.showCityWarningPopup=!0:1414!=C&&1446!=C&&1411!=C||!D?(this.charDhamFlag=!1,this.localStorage.setItem("charDhamFlag",0),this.gotoCarSelectScreen(i)):alert("The Char Dham packages are not supported from source. Please select as destination.")}charDhamExploreButtonClick(i,l,c){var _,y,C,D;this.tripDetails=i,this.charDhamFlag=!1,this.fromDate=new Date(this.tripDetails.pickUpDate),this.toDate=new Date(this.tripDetails.returnDate),this.pickupTime=this.tripDetails.pickUpTime,this.fromCitySelected=this.tripDetails.fromCity;const O=localStorage.getItem("CacheServiceoutstationoneWay");null!==O&&(this.cacheServiceoutstationoneWay=JSON.parse(O).value,console.log(this.cacheServiceoutstationoneWay));const v=this.cacheServiceoutstationoneWay.filter(w=>c.includes(w.cityName.split(",")[0]));console.log(v),this.toCityControlsList=[];for(const w of v)this.addToCityFieldForCity(w);if(2==v.length&&(4294==(null===(y=null===(_=this.toCityControlsList[0])||void 0===_?void 0:_.toCitySelected)||void 0===y?void 0:y.cityId)||4610==(null===(D=null===(C=this.toCityControlsList[0])||void 0===C?void 0:C.toCitySelected)||void 0===D?void 0:D.cityId))&&this.toCityControlsList.reverse(),4==v.length){const w=[3988,4294,3975,4610];w.every((A,B)=>{var Y,oe;return(null===(oe=null===(Y=this.toCityControlsList[B])||void 0===Y?void 0:Y.toCitySelected)||void 0===oe?void 0:oe.cityId)===A})||this.toCityControlsList.sort((A,B)=>w.indexOf(A.toCitySelected.cityId)-w.indexOf(B.toCitySelected.cityId))}this.bookingService.setTripType("outstation"),this.bookingService.setSubTripType("roundTrip"),this.subTripType=this.bookingService.getSubTripType(),this.localStorage.setItem("charDhamFlag",1),this.gotoCarSelectScreen(l)}charDhamPopup(){var i,l;this.mobileMode&&(document.body.style.overflow="hidden"),window.scrollTo({top:0,behavior:"smooth"}),this.dialog.open(be,{disableClose:!0,height:"auto",width:"40rem",panelClass:"popup-style",backdropClass:"chardham-blurred-backdrop",position:{top:"100px"},data:{sourceCity:this.fromCitySelected,destinationCity:null===(l=null!==(i=this.toCityControlsList.find(_=>{var y;return[3988,4294,3975,4610].includes(null===(y=null==_?void 0:_.toCitySelected)||void 0===y?void 0:y.cityId)}))&&void 0!==i?i:this.toCityControlsList[0])||void 0===l?void 0:l.toCitySelected}}).afterClosed().subscribe(_=>{var y,C,D,O;if(document.body.style.overflow="",console.log(_),_){this.tripDetails=_.tripDetails,this.charDhamFlag=!1,this.fromDate=new Date(this.tripDetails.pickUpDate),this.toDate=new Date(this.tripDetails.returnDate),this.pickupTime=this.tripDetails.pickUpTime,this.tripDetails.fromCity&&(this.fromCitySelected=this.tripDetails.fromCity,this.bookingService.setSelectedSourceCity(this.fromCitySelected),this.localStorage.setItem("cachedSourceCity",JSON.stringify(this.fromCitySelected)),this.localStorage.removeItem("custLocalityDetails"),this.bookingService.setCustomerLocalityDetails(null),this.customerLocalityDetails=null,this.selectedCustomerAddress=this.fromCitySelected.cityName,this.addressAutocompleteSettings.inputString=this.selectedCustomerAddress,this.addressAutocompleteSettings=Object.assign({},this.addressAutocompleteSettings));const v=localStorage.getItem("CacheServiceoutstationoneWay");null!==v&&(this.cacheServiceoutstationoneWay=JSON.parse(v).value,console.log(this.cacheServiceoutstationoneWay));const w=this.cacheServiceoutstationoneWay.filter(A=>_.itinerary.includes(A.cityName.split(",")[0]));console.log(w),this.toCityControlsList=[];for(const A of w)this.addToCityFieldForCity(A);
1if(2==w.length&&(4294==(null===(C=null===(y=this.toCityControlsList[0])||void 0===y?void 0:y.toCitySelected)||void 0===C?void 0:C.cityId)||4610==(null===(O=null===(D=this.toCityControlsList[0])||void 0===D?void 0:D.toCitySelected)||void 0===O?void 0:O.cityId))&&this.toCityControlsList.reverse(),4==w.length){const A=[3988,4294,3975,4610];A.every((Y,oe)=>{var W,Pe;return(null===(Pe=null===(W=this.toCityControlsList[oe])||void 0===W?void 0:W.toCitySelected)||void 0===Pe?void 0:Pe.cityId)===Y})||this.toCityControlsList.sort((Y,oe)=>A.indexOf(Y.toCitySelected.cityId)-A.indexOf(oe.toCitySelected.cityId))}const E=this.toCityControlsList.filter(A=>{var B;return null===(B=A.toCitySelected)||void 0===B?void 0:B.cityId}).map(A=>A.toCitySelected);this.bookingService.setSelectedDestinationCity(E),this.bookingService.saveParamsToLocalStorage(),E.length>0&&this.localStorage.setItem("cachedDestinationCity",JSON.stringify(E[0])),this.localStorage.setItem("charDhamReturnFlow","1"),this.gotoCarSelectScreen(_.event)}else"1"!==this.localStorage.getItem("charDhamPopulateReturnFlow")&&(this.charDhamFlag=!1,this.localStorage.setItem("charDhamFlag",0))})}gotoCarSelectScreen(i){var l,c,_,y,C,D,O,v,w;this.ct_errorMessage=[];let E=!0;this.noDestinationMatch=!1,this.notValidSource=!1,this.sameCityChangetoLocal=!1,this.circularRouteDetected=!1;for(const W of this.toCityControlsList)W.hasStopConflict=!1;(this.fromCitySelected&&!this.fromCitySelected.cityId||!this.fromCitySelected)&&(this.outstationForm.controls.fromCityControl.setErrors({required:!0}),this.outstationForm.controls.fromCityControl.markAsTouched(),E=!1,this.ct_errorMessage.push("Please select the pickup city"));const A=this.findStopMatchingFromOrTo();if(A)E=!1,A.hasStopConflict=!0,A.errorMessage="You have already selected this city.",this.outstationForm.controls[A.key].setErrors({required:!0}),this.outstationForm.controls[A.key].markAsTouched(),this.ct_errorMessage.push("You have already selected this city."),this.trackValidationError("duplicate",(null===(l=A.toCitySelected)||void 0===l?void 0:l.cityName)||"");else if(this.hasDuplicateDestinations()){E=!1,this.duplicateDestinationSelected=!0;const W=this.toCityControlsList[this.toCityControlsList.length-1];W.errorMessage="You have selected duplicate destinations",this.outstationForm.controls[W.key].setErrors({required:!0}),this.outstationForm.controls[W.key].markAsTouched(),this.ct_errorMessage.push("You have selected duplicate destinations"),this.trackValidationError("duplicate",(null===(c=W.toCitySelected)||void 0===c?void 0:c.cityName)||"")}else for(const W of this.toCityControlsList)if(!W.toCitySelected||W.toCitySelected&&!W.toCitySelected.cityId){this.notValidDestination.clear(),this.outstationForm.controls[W.key].setErrors({required:!0}),this.outstationForm.controls[W.key].markAsTouched(),E=!1;const Pe=(this.useOWStops&&"oneWay"===this.subTripType||"roundTrip"===this.subTripType)&&this.toCityControlsList.indexOf(W)<this.toCityControlsList.length-1;W.errorMessage=Pe?"Please select Stop city":"Please select the drop city",this.ct_errorMessage.push(Pe?"Please select Stop city":"Please select the drop city")}if(this.fromDate||(this.outstationForm.controls.departureDateControl.markAsTouched(),E=!1),("roundTrip"===this.subTripType||"oneWay"===this.subTripType&&this.useOWStops&&this.toCityControlsList.length>1)&&!this.toDate&&(this.outstationForm.controls.returnDateControl.markAsTouched(),E=!1),"Select Time"==this.pickupTime&&this.didSelectPickUpTime()===H.k2.Invalid&&(this.pickupTimeErrorMessage="Please select the pick up time.",this.outstationForm.controls.pickUpTimeControl.setErrors({required:!0}),this.outstationForm.controls.pickUpTimeControl.markAsTouched(),E=!1,this.ct_errorMessage.push("Please select the pick up time")),!0===E){this.useOWStops&&"oneWay"===this.subTripType&&this.toCityControlsList.length>1&&this.localStorage.save_analytics_data("search_cars_with_stops",{total_stops:this.toCityControlsList.length-1,route_type:"OW_MC"}),this.localStorage.removeItem("switchToOneWayTrip"),this.localStorage.removeItem("switchToOneWayTripMode"),this.dialog.closeAll(),this.populateService.setModifyCalendarPopOpen(!1);const W=[];
1for(const he of this.toCityControlsList)null!=he.toCitySelected&&W.push("string"==typeof he.toCitySelected?{cityName:he.toCitySelected,cityId:""}:he.toCitySelected);if(W.length>0){const he=W.every(xt=>parseInt(xt.Source_city_id)===this.fromCitySelected.cityId),st=Math.abs(U.E.UNIXDateTime(this.toDate)-U.E.UNIXDateTime(this.fromDate)),at=Math.ceil(st/86400)+1;if(console.log(at),"oneWay"===this.subTripType&&this.useOWStops&&W.length>0){if(parseInt(W[W.length-1].Source_city_id)===this.fromCitySelected.cityId)if(W.length>1){this.circularRouteDetected=!0;const ht=this.toCityControlsList[this.toCityControlsList.length-1];ht.errorMessage="To City can not be same as From City.",this.outstationForm.controls[ht.key].setErrors({required:!0}),this.outstationForm.controls[ht.key].markAsTouched(),this.ct_errorMessage.push("To City can not be same as From City."),this.trackValidationError("circular_route",(null===(_=ht.toCitySelected)||void 0===_?void 0:_.cityName)||"")}else this.sameCityChangetoLocal=!0}else(he&&"oneWay"==this.subTripType||he&&"roundTrip"==this.subTripType&&at<2)&&(this.sameCityChangetoLocal=!0)}let Pe="",ne="";var Y=[],oe=[];for(let he=0;he<W.length;he++)Y.push(W[he].cityId),oe.push(W[he].cityName.split(",")[0]);Pe=Y.join(","),ne=oe.join(","),this.bookingService.setSelectedDestinationCity(W);const z=JSON.stringify(W),ue=btoa(z);this.localStorage.setItem("selectedOutStationRoute",ue);const fe=U.E.DateFormatDDMMYY(U.E.UNIXDateTime(this.fromDate));let me,Me=0;const Ae="oneWay"===this.subTripType&&this.useOWStops&&this.toCityControlsList.length>1;"oneWay"!==this.subTripType||Ae?(me=U.E.DateFormatDDMMYY(U.E.UNIXDateTime(this.toDate)),Me=0):(me="",Me=1);const Ne=U.E.TimeFormatHHmm(new Date(this.pickupTime).getTime()/1e3);this.bookingService.setFromDate(this.fromDate),this.bookingService.setToDate(this.toDate),this.bookingService.setPickupTime(this.pickupTime),this.bookingService.setPickupTimeOptions(this.pickUpTimeOptions),this.bookingService.saveParamsToLocalStorage();try{const he=Math.abs(U.E.UNIXDateTime(this.toDate)-U.E.UNIXDateTime(this.fromDate));if(this.numberOfDaysToBook=Math.ceil(he/86400)+1,this.localStorage.setItem("numberOfTripDays",this.numberOfDaysToBook),("roundTrip"===this.subTripType||Ae)&&this.numberOfDaysToBook>30)return void alert("Looks like you are going on a long trip, For trips longer than 30 days, please call us on 90 4545 0000 and we will help you with the most optimum rates.")}catch(he){}const Ve=this.fromCitySelected.cityName.split(",");this.itenlist=Ve[0];for(let he=0;he<this.toCityControlsList.length;he++)this.city_state="",this.city_state=this.toCityControlsList[he].toCitySelected.cityName.split(","),this.itenlist=this.itenlist+"-"+this.city_state[0];this.localStorage.setItem("cleverTap_data",JSON.stringify({"source-city":Ve[0],"source-state":Ve[1],"trip-type":"outstation -"+this.subTripType,itinerary:this.itenlist,duration:this.numberOfDaysToBook,"start-date":fe,"end-date":me,"start-time":this.pickupTime})),/select_cars/i.test(this.router.url)||(this.all_info=this.itenlist+"*"+(1==Me?Me:this.numberOfDaysToBook)+"*outstation*"+this.subTripType);const rt=900*Math.ceil(U.E.UNIXDateTime(U.E.convertToIST())/900),it=[377,145,223,114,261,81,244,36,73,320,422,330,203,48,41,126,154,84,288,171,128,219,297,218,441,8,5,2097,266,241,32,176,163,220,404,1263,329,160,104,72,178,180,212,40,2,339,63,191,384,1983,35,294,747,348,425,401,3074,53,67,412,269,90,289,405,231,111,380,354,169,141,25,4,695,248,286,80,165,18,371,345,312,157],Et=Number(null===(y=this.fromCitySelected)||void 0===y?void 0:y.cityId);this.oneHourSlotFlag=it.includes(Et),console.log(this.oneHourSlotFlag);const Nt=rt+(this.oneHourSlotFlag?3600:5400),Oi=rt+14400,wi=new Date(this.pickupTime).getTime()/1e3;wi>=Nt&&wi<Oi&&this.checkpickuptime()&&(this.localStorage.setItem("URGENTBOOKING","1"),this.localStorage.setItem("URGENTBOOKINGSET","1"));const kt=new Date(this.pickupTime),ot=U.E.UNIXDateTime(kt);this.localStorage.setItem("selectedDestinationCity",JSON.stringify(W)),this.localStorage.setItem("selectedSubTripType",this.subTripType),this.localStorage.setItem("selectedSourceCity",JSON.stringify(this.fromCitySelected));let ze="",dt="",pt="",$e="",St="";
1if(this.toCityControlsList){for(const he of this.toCityControlsList)pt+=he.toCitySelected.cityName.split(",")[0]+"|",dt+=he.toCitySelected.cityId+"|",$e+=void 0!==he.toCitySelected.org?he.toCitySelected.org+"|":"",St+=void 0!==he.toCitySelected.org?he.toCitySelected.cityName.split(",")[0]+"|":"";pt=""!=pt?pt.substring(0,pt.length-1):"",dt=""!=dt?dt.substring(0,dt.length-1):"",$e=""!=$e?$e.substring(0,$e.length-1):"",St=""!=St?St.substring(0,St.length-1):""}else dt=this.fromCitySelected.cityId,pt=Ve[0];let Si="",ki="";switch(this.fromCitySelected&&void 0!==this.fromCitySelected.org&&(Si=this.fromCitySelected.org,ki=this.fromCitySelected.cityName.split(",")[0]),this.subTripType){case"880":ze="3";break;case"440":ze="4";break;case"12120":ze="12";break;case"pick_airport":ze="1";break;case"drop_airport":ze="2";break;case"roundTrip":ze="8";break;case"oneWay":ze="7";break;default:ze=""}if(window.dataLayer.push({event:"select-trip",triptype:"outstation",triptypeid:3,tripsubtype:this.subTripType,tripsubtypeid:ze,pickupcity:""!=Si?Si:Ve[0],pickupcityid:this.fromCitySelected.cityId,dropcity:""!=$e?$e:pt,dropcityid:dt,pickupdate:fe.split("-")[2]+"-"+fe.split("-")[1]+"-"+fe.split("-")[0],dropdate:""===me||null==me?fe.split("-")[2]+"-"+fe.split("-")[1]+"-"+fe.split("-")[0]:me.split("-")[2]+"-"+me.split("-")[1]+"-"+me.split("-")[0],pickuptime:U.E.TimeFormatHHmm(new Date(this.pickupTime).getTime()/1e3),hourstotrip:Math.round((ot-U.E.UNIXDateTime(new Date))/3600),locality:"",itinerary:(""!=Si?Si:Ve[0])+"-"+(""!=$e?$e.replace("|","-"):pt.replace("|","-")),"alias-itinerary":""!=ki||""!=St?(""!=ki?ki:Ve[0])+"-"+(""!=St?St.replace("|","-"):pt.replace("|","-")):""}),""!=this.localStorage.getItem("cityDomainName")&&null!=this.localStorage.getItem("cityDomainName")){let he=H.$x.savaariDomainUrl+"/select_cars?from_city_name="+this.fromCitySelected.cityName+"&from_city_id="+this.fromCitySelected.cityId+"&trip_sub_type="+this.subTripType+"&trip_type=outstation&pickup_date="+fe+"&pickup_time="+Ne+"&drop_date="+me+"&destCityId="+Pe+"&destCityName="+ne;return this.localStorage.removeItem("cityDomainName"),document.location.href=he,i.preventDefault(),!1}let ut={},Mi=[];const Ii=this.bookingService.getSelectedDestinationCity(),xi=this.bookingService.getSelectedSourceCity();console.log(Ii),console.log(xi);try{const he=JSON.parse(this.localStorage.getItem("custLocalityDetails")||"{}");ut=Array.isArray(he)?he[0]:he}catch(he){console.warn("Failed to parse fromLocalityData:",he)}let Ni=[];const Ct=[],Zi=this.bookingService.getSubTripType();try{const he=JSON.parse(this.localStorage.getItem("custDropLocalityDetails")||"[]");if(Mi=Array.isArray(he)?he:[],"roundTrip"===Zi||"oneWay"===Zi&&this.useOWStops&&this.toCityControlsList.length>1){const st=this.navigationStateService.getAllDropLocalities();Ii.forEach((at,xt)=>{var ht,Di,Li,Pi;const bi=st[xt],Dt=(null==bi?void 0:bi.place)&&bi.custLatLong?bi:Mi[xt];if((null===(ht=null==Dt?void 0:Dt.place)||void 0===ht?void 0:ht.address_components)&&Ti(Dt.place)&&Dt.custLatLong){const Ai=null===(Di=Dt.place.address_components)||void 0===Di?void 0:Di.find(Ui=>Ui.types.includes("locality")||Ui.types.includes("administrative_area_level_2")),Fi=(null==Ai?void 0:Ai.long_name)||"",Ei=(null==at?void 0:at.cityOnly)||(null===(Pi=null===(Li=null==at?void 0:at.cityName)||void 0===Li?void 0:Li.split(","))||void 0===Pi?void 0:Pi[0])||"";!Ei||!Fi||Fi.toLowerCase().includes(Ei.toLowerCase())||Ei.toLowerCase().includes(Fi.toLowerCase())?Ct.push(Dt):Ct.push(at)}else Ct.push(at)})}else Array.isArray(Mi)&&(Mi.forEach(st=>{(null==st?void 0:st.place)&&st.custLatLong&&Ti(st.place)&&Ni.push(st)}),Ii.forEach(st=>{const at=Ni.find(xt=>{var ht;return(xt.fullDropAddress||"").toLowerCase().includes((null===(ht=st.cityOnly)||void 0===ht?void 0:ht.toLowerCase())||"")});Ct.push(at||st)}));console.log(Ct)}catch(he){console.warn("Failed to parse dropLocalityData:",he)}let Zt=null;(null==ut?void 0:ut.place)&&Ti(ut.place)&&ut.custLatLong&&(Zt=ut.custLatLong);let Mt=[];Array.isArray(Ct)&&Ct.forEach(he=>{(null==he?void 0:he.place)&&he.custLatLong?Mt.push(he.custLatLong):("roundTrip"==this.bookingService.getSubTripType()||Ae||(null==ut?void 0:ut.place)&&Ti(ut.place)&&ut.custLatLong)&&Mt.push(he.ll)}),!Zt&&(null==xi?void 0:xi.ll)&&("roundTrip"==this.bookingService.getSubTripType()||Ae||(null===(C=Ct[0])||void 0===C?void 0:C.place)&&Ti(Ct[0].place)&&Ct[0].custLatLong)&&(Zt=xi.ll);const Vi=null==Mt?void 0:Mt.join("|");this.localStorage.setItem("toCityCoords",JSON.stringify(Mt[0])),this.localStorage.setItem("fromCityCoords",Zt);try{return this.circularRouteDetected?void 0:this.sameCityChangetoLocal?(this.localStorage.setItem("selectedDestinationCity",""),this.bookingService.setTripType("local"),this.router.navigate(["select_cars"],{queryParams:{from_city_name:(null===(D=this.fromCitySelected)||void 0===D?void 0:D.cityName)||"",from_city_id:(null===(O=this.fromCitySelected)||void 0===O?void 0:O.cityId)||"",trip_sub_type:"",trip_type:"local",pickup_date:fe,pickup_time:Ne,from_city_cords:Zt||""}})):this.router.navigate(["select_cars"],{queryParams:{multicity_oneway_flag:"oneWay"===this.subTripType&&!Ae||"roundTrip"===this.subTripType?0:1,from_city_name:(null===(v=this.fromCitySelected)||void 0===v?void 0:v.cityName)||"",from_city_id:(null===(w=this.fromCitySelected)||void 0===w?void 0:w.cityId)||"",trip_sub_type:this.subTripType,trip_type:"outstation",pickup_date:fe,pickup_time:Ne,drop_date:me,destCityId:Pe,destCityName:ne,from_city_cords:Zt||"",to_city_cords:"oneWay"!==this.subTripType||Ae?Vi:Mt[0]||""}})}catch(he){console.error("Error during navigation:",he)}}else{let W={error:this.ct_errorMessage.join(", "),page_url:"",trip_type:this.bookingService.getTr
1ipType(),trip_subtype:this.bookingService.getSubTripType()};W.page_url=window.location.pathname,this.localStorage.save_CT_data("explore_button_error",W),this.localStorage.save_analytics_data("explore-button-error",W)}}onFromDateChanged(){const i=new Date(this.fromDate),l=this.toDate,c=new Date(this.pickupTime);i.setHours(c.getHours(),c.getMinutes(),0,0),i>l&&(this.toDate=new Date(this.fromDate)),console.log(this.fromDate);let _={user_input:new Date(this.fromDate),page_url:"",trip_type:this.bookingService.getTripType(),trip_subtype:this.bookingService.getSubTripType()};_.page_url=window.location.pathname,this.fromDateFocus=!1,this.localStorage.save_CT_data("pickup_date_fill",_),this.localStorage.save_analytics_data("pickup-date-fill",_),this.bookingService.setFromDate(this.fromDate),this.bookingService.setToDate(this.toDate),this.mid_night_flag=!1,this.bookingService.setPickupTime(this.pickupTime),this.computePickUpTimeOptions(i),this.toCalendarRef&&this.toDateFocus?this.toCalendarRef.nativeElement.querySelector("input").click():this.pickupSelect&&this.timeAutoFocus&&this.pickupSelect.open()}onDateSelected(){this.pickupSelect&&this.timeAutoFocus&&this.pickupSelect.open(),this.toDateFocus=!1}didSelectPickUpTime(){if(this.pickupTime===this.selectedTimePlaceHolder){let l={user_input:this.selectedTimePlaceHolder,page_url:"",trip_type:this.bookingService.getTripType(),trip_subtype:this.bookingService.getSubTripType()};return l.page_url=window.location.pathname,this.localStorage.save_CT_data("pickup_time_fill",l),this.localStorage.save_analytics_data("pickup-time-fill",l),H.k2.Invalid}this.bookingService.setPickupTime(this.pickupTime);let i={user_input:this.pickupTime,page_url:"",trip_type:this.bookingService.getTripType(),trip_subtype:this.bookingService.getSubTripType()};return i.page_url=window.location.pathname,this.localStorage.save_CT_data("pickup_time_fill",i),this.localStorage.save_analytics_data("pickup-time-fill",i),this.timeAutoFocus=!1,H.k2.Valid}checkpickuptime(){var i;const l=900*Math.ceil(U.E.UNIXDateTime(U.E.convertToIST())/900),_=Number(null===(i=this.fromCitySelected)||void 0===i?void 0:i.cityId);this.oneHourSlotFlag=[377,145,223,114,261,81,244,36,73,320,422,330,203,48,41,126,154,84,288,171,128,219,297,218,441,8,5,2097,266,241,32,176,163,220,404,1263,329,160,104,72,178,180,212,40,2,339,63,191,384,1983,35,294,747,348,425,401,3074,53,67,412,269,90,289,405,231,111,380,354,169,141,25,4,695,248,286,80,165,18,371,345,312,157].includes(_),console.log(this.oneHourSlotFlag);let y=this.oneHourSlotFlag?3600:5400;if("Select Time"==this.pickupTime)return!1;{const C=new Date(this.pickupTime).getTime()/1e3;if(C-l>=y&&C-l<14400)return!0;if(C-l>=y&&C-l<14400)return!0}}checkmetro(i){return i==H.iz.city1||i==H.iz.city2||i==H.iz.city3||i==H.iz.city4||i==H.iz.city5||i==H.iz.city6||i==H.iz.city7}onFieldClicked(){setTimeout(()=>{this.preFillDropLocality()},100)}subTripTypeChange(){var i=this;return(0,r.Z)(function*(){var l,c;if(setTimeout(()=>{i.fromCityComponent&&i.fromCityComponent.focusInput()},100),i.toCityFocus=!0,i.fromDateFocus=!0,i.toDateFocus=!0,i.timeAutoFocus=!0,i.notValidSource=!1,i.notValidSourceErrorMessage="",i.cities=[],i.targetArray=[],i.bookingService.setSubTripType(i.subTripType),i.subTripType&&"oneWay"==i.subTripType)if(i.tempSourceCityListOfDestination=[],i.bookingService.setPreviousSubTripType("oneWay"),i.tempToCityControlsList=i.toCityControlsList,i.toCityControlsList=[],i.addToCityField(),i.configureToCityAddAndDeleteButtonVisibility(),i.useOWStops&&i.tempToCityControlsList&&i.tempToCityControlsList.length>0&&i.tempToCityControlsList[0].toCitySelected){for(const y of i.tempToCityControlsList)!(null===(l=y.toCitySelected)||void 0===l?void 0:l.cityId)&&i.outstationForm.controls[y.key]&&i.outstationForm.removeControl(y.key);const _=i.tempToCityControlsList.filter(y=>{var C;return null===(C=y.toCitySelected)||void 0===C?void 0:C.cityId});i.toCityControlsList=_.length>0?_:[],0===i.toCityControlsList.length&&i.addToCityField(),i.configureToCityAddAndDeleteButtonVisibility()}
1else if(i.tempToCityControlsList&&i.tempToCityControlsList.length>0&&i.tempToCityControlsList[0].toCitySelected){let _=[];try{let y=!1;if(_=yield i.bookingService.getDestinationCities(),i.toCityControlsList=[],!(_&&_.length>0))throw new Error;if(_.map(C=>{C.cityId==i.tempToCityControlsList[0].toCitySelected.cityId&&C.cityName==i.tempToCityControlsList[0].toCitySelected.cityId&&(i.addToCityFieldForCity(i.tempToCityControlsList[0].toCitySelected),i.configureToCityAddAndDeleteButtonVisibility(),y=!0)}),0==y&&(i.addToCityFieldForCity(i.tempToCityControlsList[0].toCitySelected),i.configureToCityAddAndDeleteButtonVisibility(),y=!0),!y)throw new Error}catch(y){i.toCityControlsList=[],i.localStorage.removeItem("custDropLocalityDetails"),i.localStorage.removeItem("custDropLocalityDetailsMap"),i.navigationStateService.clearAllDropLocalities(),i.addToCityField(),i.configureToCityAddAndDeleteButtonVisibility(),i.noDestinationMatch=!0,i.noDestinationMatchErrorMessage=_&&_.length>0?'No one way service available to "'+i.tempToCityControlsList[0].toCitySelected.cityName+'"':'No one way service available from "'+i.fromCitySelected.cityName+'"'}}else i.toCityControlsList=[],i.addToCityField(),i.configureToCityAddAndDeleteButtonVisibility();else{i.noDestinationMatch=!1,i.noDestinationMatchErrorMessage="",i.bookingService.setPreviousSubTripType("roundTrip"),i.tempToCityControlsList=i.toCityControlsList;const _="";if(_.length>0){i.toCityControlsList=[];for(const y of _)i.addToCityFieldForCity(y);i.configureToCityAddAndDeleteButtonVisibility(),i.tempToCityControlsList=i.toCityControlsList}if(i.tempToCityControlsList&&i.tempToCityControlsList.length>0){for(const C of i.tempToCityControlsList)!(null===(c=C.toCitySelected)||void 0===c?void 0:c.cityId)&&i.outstationForm.controls[C.key]&&i.outstationForm.removeControl(C.key);const y=i.tempToCityControlsList.filter(C=>{var D;return null===(D=C.toCitySelected)||void 0===D?void 0:D.cityId});y.length>0?(i.toCityControlsList=y,i.configureToCityAddAndDeleteButtonVisibility()):(i.toCityControlsList=[],i.addToCityField(),i.configureToCityAddAndDeleteButtonVisibility())}else i.bookingService.setSelectedDestinationCity(null),i.tempToCityControlsList=[],i.toCityControlsList=[],i.localStorage.removeItem("custDropLocalityDetails"),i.localStorage.removeItem("custDropLocalityDetailsMap"),i.navigationStateService.clearAllDropLocalities(),i.addToCityField(),i.configureToCityAddAndDeleteButtonVisibility()}if("roundTrip"===i.subTripType){i.navigationStateService.clearAllDropLocalities();const _=JSON.parse(i.localStorage.getItem("custDropLocalityDetails")||"[]");Array.isArray(_)&&_.forEach((y,C)=>{(null==y?void 0:y.custShortAddress)&&i.navigationStateService.setDropLocality(C,y)})}else if(i.useOWStops){const _=i.navigationStateService.getAllDropLocalities(),y=i.toCityControlsList.length,C=[];Object.keys(_).sort((D,O)=>Number(D)-Number(O)).forEach(D=>{const O=Number(D);O<y&&(C[O]=_[O])}),C.length>0&&i.localStorage.setItem("custDropLocalityDetails",JSON.stringify(C))}else{const _=i.navigationStateService.getDropLocality(0);(null==_?void 0:_.custShortAddress)&&i.localStorage.setItem("custDropLocalityDetails",JSON.stringify([_]))}i.outstationForm.controls.fromCityControl.markAsUntouched();for(const _ of i.toCityControlsList)i.outstationForm.controls[_.key].markAsUntouched();i.computePickUpTimeOptions(new Date(i.fromDate)),setTimeout(()=>{i.preFillDropLocality()},100)})()}onFocusToCityList(i,l){var c,_,y;if(this.shouldShowTopDestCityList=!0,l&&this.notValidDestination.delete(l),"string"==typeof this.fromCitySelected){const O=this.bookingService.getPotentialSourceCity(this.fromCitySelected);null!=O&&(this.fromCitySelected=O,this.bookingService.setSelectedSourceCity(O))}if(0==this.popularToCities.length)if(null===(c=this.fromCitySelected)||void 0===c?void 0:c.top_dest_ids){const O=localStorage.getItem("CacheServiceoutstationoneWay");if(null!==O){const v=JSON.parse(O);this.popCity=v.value}this.popularToCities=this.getCitiesFromIds(this.popCity,this.fromCitySelected.top_dest_ids),localStorage.setItem("popularToCities",JSON.stringify(this.popularToCities)),console.log(this.popularToCities)}else{const O=null===(_=this.fromCitySelected)||void 0===_?void 0:_.cityId;if(O){const v=localStorage.getItem("CacheServicesourceCityCache");if(v){const E=JSON.parse(v).value.find(A=>A.cityId.toString()===O.toString());if(null==E?void 0:E.top_dest_ids){const A=localStorage.getItem("CacheServiceoutstationoneWay");
1if(null!==A){const B=JSON.parse(A);this.popCity=B.value}this.popularToCities=this.getCitiesFromIds(this.popCity,E.top_dest_ids),localStorage.setItem("popularToCities",JSON.stringify(this.popularToCities))}else localStorage.removeItem("popularToCities"),this.popularToCities=[]}}}this.noDestinationMatch=!1,this.duplicateDestinationSelected=!1,this.populateService.setFocusedToCityKey&&this.populateService.setFocusedToCityKey(l);const C=this.toCityControlsList.find(O=>O.key===l);this.populateService.setToCityFocusedValue((null==C?void 0:C.toCitySelected)?C.toCitySelected:null);const D=this.bookingService.getSubTripType();if("roundTrip"===D||"oneWay"===D&&this.useOWStops){const O=this.toCityControlsList.findIndex(w=>w.key===l),v=this.toCityControlsList.find(w=>w.key===l);this.navigationStateService.setNavigationContext({rtIndex:O>=0?O:0,rtKey:l,currentValue:(null===(y=null==v?void 0:v.toCitySelected)||void 0===y?void 0:y.cityName)||"",entryPoint:"tocity",subTripType:D,existingCity:(null==v?void 0:v.toCitySelected)||null,timestamp:Date.now()})}if(this.useNewDesign&&this.stopsEnabled&&this.toCityControlsList.length>1){const O=this.toCityControlsList.findIndex(v=>v.key===l);if(O>=0&&O<this.toCityControlsList.length-1){const v=O+1;return"oneWay"===this.subTripType&&this.useOWStops&&this.localStorage.save_analytics_data("stop_location_page_opened",{stop_number:v,navigation_source:"click"}),void this.populateField("stopcity")}}this.populateField("tocity")}hideModify(){const i=JSON.parse(this.localStorage.getItem("selectedSourceCity"));this.bookingService.setSelectedSourceCity(i);const l=JSON.parse(this.localStorage.getItem("selectedDestinationCity"));this.bookingService.setSelectedDestinationCity(l);const c=this.localStorage.getItem("selectedSubTripType");this.bookingService.setPreviousSubTripType(c),this.message.sendMessage("modifyCancel")}addToCityFromSeoContent(i){i&&(this.toCityControlsList=[],this.localStorage.removeItem("custDropLocalityDetails"),this.localStorage.removeItem("custDropLocalityDetailsMap"),this.navigationStateService.clearAllDropLocalities(),this.addToCityFieldForCity(i),this.localStorage.setItem("cachedDestinationCity",JSON.stringify(i)))}ngDoCheck(){var i,l,c;this.localStorage.checkPlatform()&&(this.windowWidth=window.innerWidth),(null===(c=null===(l=null===(i=this.toCityControlsList)||void 0===i?void 0:i[0])||void 0===l?void 0:l.toCitySelected)||void 0===c?void 0:c.length)<1&&(this.notValidDestinationErrorMessage="")}trackValidationError(i,l){!this.useOWStops||"oneWay"!==this.subTripType||this.localStorage.save_analytics_data("validation_error_shown",{ud_id:this.localStorage.getItem("SavaariUserDeviceID")||"",error_type:i,city_entered:l})}populateField(i){if(this.localStorage.checkPlatform()&&(this.windowWidth=window.innerWidth),this.windowWidth<=800){this.windowWidth=499,this.dialog.closeAll();const l=this.bookingService.getSubTripType();this.bookingService.setPreviousSubTripType(l),this.populateService.setEntryPoint(i),this.router.navigate(["populate"])}else{this.windowWidth=710;const l=document.getElementById("fromCityList");null==l||l.addEventListener("focus",function(){})}}clearonewaydest(){"oneWay"==this.bookingService.getSubTripType()&&(this.toCityControlsList=[],this.localStorage.removeItem("custDropLocalityDetails"),this.localStorage.removeItem("custDropLocalityDetailsMap"),this.navigationStateService.clearAllDropLocalities(),this.addToCityField())}onCalendarOpen(){this.calendarRef&&!this.hasInitializedCalendar&&(this.calendarRef.overlayVisible=!1,this.hasInitializedCalendar=!0),setTimeout(()=>{this.isCalendarOpen=!0,this.bookingService.setPreventClose(!0),console.log("Calendar opened")},100)}onDocumentClick(i){!i.target.closest(".ui-calendar")&&this.isCalendarOpen&&(this.isCalendarOpen=!1,this.onCalendarClose())}onCalendarClose(){this.bookingService.setPreventClose(!1),console.log("Calendar closed")}getTopSourceCity(){var i=this;return(0,r.Z)(function*(){try{const l=yield i.bookingService.getTopSourceCities();i.topSourceCitiesList=l}catch(l){i.topSourceCitiesList=[]}})()}toggleSelectedCity(){var i=this;return(0,r.Z)(function*(){var l,c,_,y;
1if(!(null===(l=i.toCityControlsList[0])||void 0===l?void 0:l.toCitySelected))return;let C="",D="",O="",v="";const w=i.bookingService.getSelectedSourceCity();w&&w.cityId>0&&(C=w.cityId,D=w.cityName);const E=i.toCityControlsList[0].toCitySelected;if(E&&(O=E.cityName,v=E.Source_city_id?E.Source_city_id:E.cityId),C&&v&&C!==v){const z=yield i.bookingService.getSourceCities(),ue=i.localStorage.getCacheItem("outstationroundTrip");z.forEach(me=>{if(me.cityId&&(me.cityId==v||me.cityName==O)){const Me={cityId:v,cityName:O};i.bookingService.setSelectedSourceCity(Me),i.localStorage.setItem("cachedSourceCity",JSON.stringify(Me)),i.fromCitySelected=Me}});const fe=[];ue.forEach(me=>{(me.Source_city_id&&me.Source_city_id==C||me.cityId&&me.cityId==C)&&me.cityName===D&&fe.push(me)}),i.bookingService.setSelectedDestinationCity(fe),i.localStorage.setItem("cachedDestinationCity",JSON.stringify(fe[0]||{})),fe.length>0&&(i.toCityControlsList[0].toCitySelected=fe[0]),window.dataLayer.push({event:"swap-itinerary",itinerary:D.split(",")[0]+"-"+O.split(",")[0],"swap-itinerary":i.bookingService.getSelectedSourceCity().cityName.split(",")[0]+"-"+i.toCityControlsList[0].toCitySelected.cityName.split(",")[0]})}let A={pickup_city:i.fromCitySelected.cityName,drop_city:i.toCityControlsList[0].toCitySelected.cityName};setTimeout(()=>{let z=i.localStorage.getItem("all-info");z&&(A=Object.assign(JSON.parse(z),A)),i.localStorage.save_CT_data("switch_icon_clicks",A)},2e3);let B=i.localStorage.getItem("custLocalityDetails"),Y={};if(B)try{const z=JSON.parse(B);Y=Array.isArray(z)?z[0]:z}catch(z){console.warn("Error parsing fromLocality:",z)}const oe="roundTrip"===i.bookingService.getSubTripType();let W={};if(oe)W=i.navigationStateService.getDropLocality(0)||{};else{const z=i.localStorage.getItem("custDropLocalityDetails");if(z)try{const ue=JSON.parse(z);W=Array.isArray(ue)?ue[0]:ue}catch(ue){console.warn("Error parsing dropLocality:",ue)}}const Pe=Y;if(Y=W,W=Pe,i.localStorage.setItem("custLocalityDetails",JSON.stringify(Y)),oe){i.navigationStateService.setDropLocality(0,W);const z=JSON.parse(i.localStorage.getItem("custDropLocalityDetails")||"[]");Array.isArray(z)?(z[0]=W,i.localStorage.setItem("custDropLocalityDetails",JSON.stringify(z))):i.localStorage.setItem("custDropLocalityDetails",JSON.stringify([W]))}else i.localStorage.setItem("custDropLocalityDetails",JSON.stringify([W]));if(i.addressAutocompleteSettings){const z=(null===(c=i.fromCitySelected)||void 0===c?void 0:c.cityName)||"",ue=(null==Y?void 0:Y.custShortAddress)?Y.custShortAddress:z;i.addressAutocompleteSettings=Object.assign(Object.assign({},i.addressAutocompleteSettings),{inputString:ue})}const ne=null===(_=i.toCityControlsList[0])||void 0===_?void 0:_.key;if(ne){const z=(null===(y=i.toCityControlsList[0].toCitySelected)||void 0===y?void 0:y.cityName)||"",ue=(null==W?void 0:W.custShortAddress)?W.custShortAddress:z;i.addressAutocompleteToSettingsList[ne]=Object.assign(Object.assign({},i.addressAutocompleteToSettingsList[ne]),{inputString:ue}),i.addressAutocompleteToSettingsList=Object.assign({},i.addressAutocompleteToSettingsList)}i.cd.detectChanges(),i.computePickUpTimeOptions(new Date(i.fromDate))})()}}return g.\u0275fac=function(i){return new(i||g)(e.Y36(Je.L),e.Y36(q.F0),e.Y36(q.gz),e.Y36(xe.uw),e.Y36(M.V),e.Y36(Be.e),e.Y36(te.T),e.Y36(e.sBO),e.Y36(Re.f))},g.\u0275cmp=e.Xpm({type:g,selectors:[["app-outstation"]],viewQuery:function(i,l){if(1&i&&(e.Gf(Ge,5),e.Gf(mt,5),e.Gf(je.j,5),e.Gf(Ye.r,5),e.Gf(Ut,5,e.SBq),e.Gf(Wt,5,e.SBq),e.Gf(Ht,5),e.Gf(Rt,5,e.SBq),e.Gf(Ot,5,e.SBq),e.Gf(It,5,e.SBq),e.Gf(qt,5,e.SBq),e.Gf(Jt,5)),2&i){let c;e.iGM(c=e.CRH())&&(l.toCityInput=c.first),e.iGM(c=e.CRH())&&(l.fromCityList=c.first),e.iGM(c=e.CRH())&&(l.fromCityComponent=c.first),e.iGM(c=e.CRH())&&(l.toCityComponent=c.first),e.iGM(c=e.CRH())&&(l.fromCalendarRef=c.first),e.iGM(c=e.CRH())&&(l.toCalendarRef=c.first),e.iGM(c=e.CRH())&&(l.pickupSelect=c.first),e.iGM(c=e.CRH())&&(l.dateWheelScrollRef=c.first),e.iGM(c=e.CRH())&&(l.hourWheelScrollRef=c.first),e.iGM(c=e.CRH())&&(l.minuteWheelScrollRef=c.first),e.iGM(c=e.CRH())&&(l.meridiemWheelScrollRef=c.first),e.iGM(c=e.CRH())&&(l.calendarRef=c.first)}},hostBindings:function(i,l){1&i&&e.NdJ("click",function(_){return l.onDocumentClick(_)},!1,e.evT)},inputs:{outstationCloseIcon:"outstationCloseIcon"},decls:3,vars:3,consts:[["class","outstationBlock",4,"ngIf"],[4,"ngIf"],["class","cd-warning-overlay",3,"click",4,"ngIf"],[1,"outstationBlock"],["class","closeIcon",3,"click",4,"ngIf"],["class","experience-heading d-md-none",3,"ngStyle",4,"ngIf"],["role","toolbar",1,"btn-toolbar","justify-content-center"],["role","group",1,"btn-group","mb-2"],["type","radio","name","btnradio","id","onewayradio","value","oneWay",1,"btn-check",3,"ngModel","ngModelChange","change"],["for","onewayradio",1,"btn","inactive-trip-button","round-trip-radius","mb-0",3,"ngStyle","click"],["class","trip-btn-subtext",4,"ngIf"],["type","radio","name","btnradio","id","roundtripradio","value","roundTrip",1,"btn-check",3,"ngModel","ngModelChange","change"],["for","roundtripradio",1,"btn","inactive-trip-button","mb-0",3,"ngStyle","click"],[1,"outstation-form",3,"formGroup"],["class","row mx-0",4,"ngIf"],["class","row form-group",4,"ngIf"],[2,"margin-top","30px"],["type","button",1,"book-button","btn",3,"disabled","ngStyle","click"],["class","text-danger",4,"ngIf"],["class","date-time-sheet",4,"ngIf"],[1,"closeIcon",3,"click"],["aria-hidden","true"],[1,"experience-heading","d-md-none",3,"ngStyle"],[1,"text-uppercase"],[1,"trip-btn-subtext"],[1,"ow-new-form"],["class","ow-swap-btn","type","button",3,"click",4,"ngIf"],[1,"ow-row"],[1,"ow-card","ow-from-card"],[1,"ow-card-body"],["width","14","height","18","viewBox","0 0 14 18","fill","none",1,"ow-card-icon"],["d","M7 0C3.41 0 .5 2.91.5 6.5 .5 11.09 7 18 7 18s6.5-6.91 6.5-11.5C13.5 2.91 10.59 0 7 0zm0 8.75a2.25 2.25 0 1 1 0-4.5 2.25 2.25 0 0 1 0 4.5z","fill","#90a4ae"],[1,"ow-card-content"],[1,"ow-card-label"],["id","fromCityList","formControlName","fromCityControl",1,"ow-ac-inline",3,"userSettings","hideDropdown","componentCallback","click"],["class","ow-inline-error",4,"ngIf"],[4,"ngFor","ngForOf"],["class","ow-add-stops-btn","type","button",3,"click",4,"ngIf"],["type","button",1,"ow-swap-btn",3,"click"],[2,"color","#20a8d9","font-size","14px","transform","rotate(90deg)","display","block",3,"icon"],[1,"ow-inline-error"],["class","ow-row",4,"ngIf"],[1,"ow-card-col"],[1,"ow-card","ow-stop-card"],[1,"ow-stop-number"],[1,"ow-ac-inline",3,"rtIndex","rtKey","formControlName","userSettings","hideDropdown","componentCallback","click"],["class","ow-inline-error","style","color:#6c757d;",4,"ngIf"],[1,"ow-stop-actions"],["type","button",1,"ow-remove-btn",3,"click"],["width","8","height","12","viewBox","0 0 14 14","fill","none"],["d","M1 1l12 12M13 1L1 13","stroke","#888","stroke-width","2","stroke-linecap","round"],[1,"ow-inline-error",2,"color","#6c757d"],[1,"ow-card","ow-to-card"],["type","button",1,"ow-add-stops-btn",3,"click"],[1,"form-group","row","mt-3"],[1,"col-3","col-form-label","mb-0"],[1,"col-9","pl-1","position-relative"],["id","fromCityList","formControlName","fromCityControl",2,"width","100%",3,"userSettings","click","componentCallback","contextmenu","ngModelChange","focus","blur"],["class","mobile-swap-button",3,"click",4,"ngIf"],["class","row form-group mt-3",4,"ngFor","ngForOf"],[1,"mobile-swap-button",3,"click"],[2,"color","#20a8d9","font-size","16px",3,"icon"],[1,"text-danger"],[1,"row","form-group","mt-3"],[1,"col-9","position-relative","pl-1"],["
1id","toCityInput",2,"width","100%",3,"rtIndex","rtKey","formControlName","userSettings","contextmenu","click","componentCallback","ngModelChange","focus"],[1,"toCityAdditionDeletionIcon"],[3,"click",4,"ngIf"],["class","mt-3 mx-auto",4,"ngIf"],[3,"click"],["alt","closeIcon","src","assets/closeicon.png","width","16","height","16"],[1,"mt-3","mx-auto"],["class","add-another-city-btn",3,"click",4,"ngIf"],[1,"add-another-city-btn",3,"click"],[1,"row","mx-0"],[1,"col-12","px-0"],[1,"trip-date-card-group"],[1,"trip-date-card",3,"click"],[1,"trip-date-card-body"],["width","18","height","18","viewBox","0 0 24 24","fill","none",1,"ow-card-icon"],["x","3","y","4","width","18","height","17","rx","2","stroke","#20a8d9","stroke-width","2"],["d","M16 2v4M8 2v4M3 10h18","stroke","#20a8d9","stroke-width","2","stroke-linecap","round"],[1,"trip-date-card-label"],[1,"trip-date-card-date"],[1,"trip-date-card-time"],["class","trip-date-card",3,"click",4,"ngIf"],["type","hidden","formControlName","pickUpTimeControl"],[1,"row","form-group"],[1,"col-form-label","mb-0","pr-0"],[1,"position-relative","pl-1"],["placeholder","dd-mm-yyyy","inputStyleClass","form-control single-border-input","formControlName","departureDateControl","dateFormat","dd-mm-yy",1,"inputCalendar","mobiCalendar",3,"readonlyInput","touchUI","minDate","maxDate","selectOtherMonths","ngModel","onSelect","ngModelChange","onShow"],["calendar",""],[1,"position-absolute",2,"top","4px","right","14px","pointer-events","none"],[1,"pi","pi-chevron-down",2,"color","#20a8d9","font-size","15px"],["class","col-6 pl-2 pr-0",4,"ngIf"],[1,"col-6","pl-2","pr-0"],[1,"col-5","col-form-label","mb-0"],[1,"col-7","position-relative","pl-1"],["placeholder","dd-mm-yyyy","inputStyleClass","form-control single-border-input","formControlName","returnDateControl","dateFormat","dd-mm-yy",1,"pCalendar",3,"readonlyInput","minDate","selectOtherMonths","maxDate","ngModel","ngModelChange"],["placeholder","dd-mm-yyyy","inputStyleClass","form-control single-border-input","formControlName","returnDateControl","dateFormat","dd-mm-yy",1,"inputCalendar","mobiCalendar",3,"readonlyInput","touchUI","minDate","maxDate","ngModel","selectOtherMonths","ngModelChange"],[1,"col-3","col-form-label","mb-0","pr-1"],["formControlName","pickUpTimeControl","id","pickUpTime",1,"single-border-input","form-control",2,"font-weight","500","color","#000",3,"ngModel","change","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"date-time-sheet"],[1,"date-time-sheet-backdrop",3,"click"],[1,"date-time-sheet-panel"],[1,"date-time-sheet-header"],[1,"date-time-sheet-title"],["type","button",1,"date-time-sheet-close",3,"click"],[1,"date-time-sheet-body"],[1,"wheel-row"],[1,"wheel-column","wheel-date"],[1,"wheel-scroll",3,"scroll"],["dateWheelScroll",""],["type","button","class","wheel-item",3,"wheel-item-active","click",4,"ngFor","ngForOf"],[1,"wheel-center-highlight"],[1,"date-time-sheet-footer"],[1,"date-time-sheet-footer-cards"],["type","button",1,"trip-date-card",3,"click"],["type","button","class","trip-date-card",3,"trip-date-card-active","click",4,"ngIf"],["type","button",1,"date-time-sheet-cta",3,"click"],["type","button",1,"wheel-item",3,"click"],[1,"wheel-column","wheel-hour"],["hourWheelScroll",""],[1,"wheel-separator"],[1,"wheel-column","wheel-minute"],["minuteWheelScroll",""],[1,"wheel-column","wheel-meridiem"],["meridiemWheelScroll",""],[3,"formGroup"],[1,"row","mx-0","align-items-center"],[1,"col-3",3,"ngStyle"],[1,"form-group"],["for","fromCityList",1,"mb-0"],[1,"position-relative"],["id","fromCityList","formControlName","fromCityControl",2,"width","100%",3,"userSettings","click","componentCallback","ngModelChange","focus"],["class","top-source-cities-holder",4,"ngIf"],["class","swap-button",3,"click",4,"ngIf"],["class","col-3",3,"ngStyle",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"mb-0"],["id","fromCalendar","placeholder","dd-mm-yyyy","inputStyleClass","form-control single-border-input","formControlName","departureDateControl","dateFormat","dd-mm-yy",1,"pCalendar","pointer-cursor",3,"readonlyInput","selectOtherMonths","minDate","maxDate","ngModel","onSelect","ngModelChange"],["fromCalendar",""],["class","col-2",4,"ngIf"],[1,"position-relative","mt-1"],[1,"mb-0","pb-0"],["formControlName","pickUpTimeControl",1,"w-100","pickup-time-field","form-control","mb-1",3,"value","valueChange","selectionChange"],["pickupSelect",""],[1,"position-absolute",2,"top","31px","right","14px","pointer-events","none"],[1,"explore-cabs-btn"],["type","button",1,"book-button","btn",2,"font-size","21p
1x",3,"disabled","ngStyle","click"],[1,"top-source-cities-holder"],[1,"top-city-list-title"],[1,"dropdown-item",3,"mousedown","click"],[1,"swap-button",3,"click"],[2,"color","#20a8d9","font-size","18px",3,"icon"],["id","toCityList",2,"width","100%",3,"formControlName","rtIndex","rtKey","userSettings","componentCallback","ngModelChange","click","blur"],["toCityInput",""],["class","position-absolute","style","top: 3px; right: 20px;background-color: white;",3,"click",4,"ngIf"],["class","position-absolute","style","top: 3px; right: 0px;background-color: white;",3,"click",4,"ngIf"],[1,"position-absolute",2,"top","3px","right","20px","background-color","white",3,"click"],["alt","minus","src","assets/img/minus.svg","width","15","height","15"],[1,"position-absolute",2,"top","3px","right","0px","background-color","white",3,"click"],["alt","plus","src","assets/img/plus.svg","width","15","height","15"],[1,"col-2"],["id","toCalendar","placeholder","dd-mm-yyyy","inputStyleClass","form-control single-border-input","formControlName","returnDateControl","dateFormat","dd-mm-yy",1,"pCalendar",3,"readonlyInput","minDate","maxDate","selectOtherMonths","ngModel","ngModelChange","onSelect"],["toCalendar",""],[1,"cd-warning-overlay",3,"click"],[1,"cd-warning-modal",3,"click"],[1,"cd-warning-icon"],["width","40","height","40","viewBox","0 0 40 40","fill","none"],["cx","20","cy","20","r","20","fill","#fff3cd"],["d","M20 10l1.5 13h-3L20 10zm0 16a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3z","fill","#e6a817"],[1,"cd-warning-title"],[1,"cd-warning-message"],[4,"ngIf","ngIfElse"],["defaultWarningMsg",""],["class","cd-warning-cities",4,"ngIf"],[1,"cd-warning-btn",3,"click"],[1,"cd-warning-cities"]],template:function(i,l){1&i&&(e.YNc(0,lt,25,32,"div",0),e.YNc(1,Hi,39,30,"div",1),e.YNc(2,Yi,15,3,"div",2)),2&i&&(e.Q6J("ngIf",l.mobileMode),e.xp6(1),e.Q6J("ngIf",!l.mobileMode),e.xp6(1),e.Q6J("ngIf",l.showCityWarningPopup))},styles:[".outstation-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .outstation-form[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{height:44px;line-height:30px;box-sizing:border-box}.outstation-form[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;min-height:16px}.toCityAdditionDeletionIcon[_ngcontent-%COMP%]{position:absolute}.form-group[_ngcontent-%COMP%] .col-form-label[_ngcontent-%COMP%], .form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700;text-transform:uppercase}.form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:18px!important}.form-group[_ngcontent-%COMP%] label.col-form-label[_ngcontent-%COMP%]{font-size:13px!important}.add-stops-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;background:transparent;border:none;padding:10px 0;cursor:pointer;color:#20a8d9;font-family:inherit}.add-stops-btn[_ngcontent-%COMP%]:hover{text-decoration:underline}.add-icon[_ngcontent-%COMP%]{width:20px;height:20px;border-radius:50%;border:2px solid #20a8d9;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:600;line-height:1}.add-text[_ngcontent-%COMP%]{display:flex;text-align:left}.add-text-title[_ngcontent-%COMP%]{font-size:12px;font-weight:600}.add-text-subtitle[_ngcontent-%COMP%]{font-size:10px;color:#6c757d}.rt-stops-container[_ngcontent-%COMP%]{margin-top:12px}.rt-stop-row[_ngcontent-%COMP%]{display:flex;position:relative;margin-bottom:12px}.rt-stop-indicator[_ngcontent-%COMP%]{width:38px;display:flex;flex-direction:column;align-items:center;margin-right:8px}.rt-stop-indicator[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{width:10px;height:10px;background:#20a8d9;border-radius:50%;margin-top:12px}.rt-stop-indicator[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{flex:1;width:2px;background:#cfe2ff;margin-top:4px;transform-origin:top;animation:growLine .3s ease-out}@keyframes growLine{0%{transform:scaleY(0)}to{transform:scaleY(1)}}.rt-timeline[_ngcontent-%COMP%]{width:20px;display:flex;flex-direction:column;align-items:center;margin-right:6px;position:relative}.rt-dot[_ngcontent-%COMP%]{width:10px;height:10px;background-color:#1e88e5;border-radius:50%;margin-top:10px}.rt-line[_ngcontent-%COMP%]{flex:1;width:2px;background-color:#cfe3fb;margin-top:4px}.rt-stop-content[_ngcontent-%COMP%]{flex:1}.rt-stop-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:2px}.rt-stop-label[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#393939;letter-spacing:.5px}.rt-remove-btn[_ngcontent-%COMP%]{background:none;border:none;font-size:16px;color:#6c757d;cursor:pointer}.rt-remove-btn[_ngcontent-%COMP%]:hover{color:#dc3545}.pickup-time-field[_ngcontent-%COMP%]{border-top:transparent;border-left:transparent;border-right:transparent;border-radius:0;margin-top:-5px;padding:9px 0!important} .pickup-time-field .mat-select-arrow{display:none!important} .pickup-time-field .mat-select-value-text{font-weight:500!important;color:#000;font-size:14px!important} .pickup-time-field .mat-form-field-underline{background-color:#ced4da!important;height:1px} .pickup-time-field.mat-focused .mat-form-field-underline{background-color:#20a8d9!important}.top-source-cities-holder[_ngcontent-%COMP%]{position:absolute;z-index:1001;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;background-color:#fff;border:1px solid rgba(0,0,0,.15);border-radius:.25rem;width:100%}#pickUpTime[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none}.inactive-trip-button[_ngcontent-%COMP%]{text-transform:uppercase;font-size:12px;font-weight:700;color:#000;border:1px solid #919191;padding:6px;width:120px;box-shadow:none!important;line-height:1.3}.trip-btn-subtext[_ngcontent-%COMP%]{font-size:8px;font-weight:500;text-transform:none;opacity:.75;margin-top:2px;white-space:nowrap}.active-trip-button[_ngcontent-%COMP%]{color:#fff;background-color:#20a8d9;border-color:transparent}.pointer-cursor[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{cursor:pointer!important}.btn-check[_ngcontent-%COMP%]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.book-button[_ngcontent-%COMP%]:hover{background-color:#d45a19!important}.round-trip-radius[_ngcontent-%COMP%]{border-top-left-radius:4px!important;border-bottom-left-radius:4px!important}.swap-button[_ngcontent-%COMP%]{width:35px;height:35px;background-color:#f5f5f5;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer;margin-top:1%}.mobile-swap-button[_ngcontent-%COMP%]{width:30px;height:30px;background-color:#f5f5f5;border-radius:25%;display:flex;justify-content:center;align-items:center;transform:rotate(90deg);position:absolute;right:11px;margin-top:-5%;z-index:1}.swap-button[_ngcontent-%COMP%]:hover{background-color:#d5d5d5}.experience-heading[_ngcontent-%COMP%]{text-align:center;border-top:2px solid #20a8d9;border-bottom:2px solid #20a8d9;padding:2px;width:auto;margin:0 auto 16px}.experience-heading[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:16px;font-weight:700}.explore-cabs-btn[_ngcontent-%COMP%]{position:absolute;
1left:50%;top:100%;transform:translate(-50%,-50%);width:269px}.explore-cabs-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background-color:#000;color:#fff}.add-another-city-btn[_ngcontent-%COMP%]{background:#f36d25;border-radius:4px;padding:4px 8px;color:#fff;border:none;font-size:11px;font-weight:600}.time-wheel-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;height:44px;padding:0 6px;border:1px solid #ced4da;border-radius:4px;background:#fff}.time-wheel-column[_ngcontent-%COMP%]{display:flex;align-items:center}.time-wheel-select[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;font-weight:600;font-size:16px;padding:0 6px;height:40px;text-align:center;color:#000}.time-wheel-select[_ngcontent-%COMP%]:focus{outline:none}.time-wheel-separator[_ngcontent-%COMP%]{font-weight:600;font-size:16px;color:#000;padding:0 2px}.trip-date-card-group[_ngcontent-%COMP%]{display:flex;gap:10px}.trip-date-card[_ngcontent-%COMP%]{flex:1;border-radius:8px;padding:8px 10px;text-align:left;background:#F4FBFF;border:1.5px solid #c8e6f5;align-items:center}.trip-date-card-secondary[_ngcontent-%COMP%]{border-style:dashed}.trip-date-card-active[_ngcontent-%COMP%]{border-color:#20a8d9;box-shadow:0 0 0 1px #20a8d9 inset}.trip-date-card-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;color:#20a8d9;text-transform:uppercase}.trip-date-card-date[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#000}.trip-date-card-time[_ngcontent-%COMP%]{font-size:12px;color:#5f6b7a}.date-time-sheet[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:1200}.date-time-sheet-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;background:rgba(0,0,0,.4)}.date-time-sheet-panel[_ngcontent-%COMP%]{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:16px 16px 0 0;max-height:90vh;display:flex;flex-direction:column}.date-time-sheet-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #e9ecef}.date-time-sheet-title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#1d1d1d}.date-time-sheet-close[_ngcontent-%COMP%]{border:none;background:#f1f3f5;border-radius:50%;width:32px;height:32px;font-size:20px;line-height:30px;color:#1d1d1d}.date-time-sheet-body[_ngcontent-%COMP%]{padding:16px}.wheel-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:10px;padding:8px 0 16px}.wheel-column[_ngcontent-%COMP%]{position:relative;border-radius:12px;background:#fff}.wheel-date[_ngcontent-%COMP%]{width:44%}.wheel-hour[_ngcontent-%COMP%], .wheel-minute[_ngcontent-%COMP%]{width:14%}.wheel-meridiem[_ngcontent-%COMP%]{width:18%}.wheel-scroll[_ngcontent-%COMP%]{height:210px;overflow-y:auto;padding:80px 6px;scroll-snap-type:y mandatory;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none}.wheel-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:0;height:0}.wheel-item[_ngcontent-%COMP%]{width:100%;border:none;background:transparent;padding:10px 6px;font-size:16px;font-weight:600;color:#9aa0a6;scroll-snap-align:center}.wheel-item-active[_ngcontent-%COMP%]{color:#1d1d1d}.wheel-center-highlight[_ngcontent-%COMP%]{pointer-events:none;position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);height:44px;border-radius:10px;background:rgba(32,168,217,.08)}
1.wheel-separator[_ngcontent-%COMP%]{font-size:22px;font-weight:700;color:#6c757d;margin:0 -2px}.date-time-sheet-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;color:#6c757d;font-size:11px;padding:6px 0 0}.date-time-sheet-info-icon[_ngcontent-%COMP%]{width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid #cbd5e1;font-size:11px;color:#6c757d}.date-time-sheet-cards[_ngcontent-%COMP%]{display:flex;gap:10px;margin-bottom:12px}.date-time-sheet-content[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;grid-gap:16px;gap:16px}.date-wheel-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;max-height:240px;overflow:auto;padding-right:6px}.date-wheel-item[_ngcontent-%COMP%]{border:1px solid #e9ecef;border-radius:10px;padding:10px 12px;text-align:left;background:#fff}.date-wheel-item-active[_ngcontent-%COMP%]{border-color:#20a8d9;background:#f2fbff}.date-wheel-label[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#1d1d1d}.date-wheel-sublabel[_ngcontent-%COMP%]{font-size:12px;color:#6c757d}.date-time-sheet-time[_ngcontent-%COMP%] .time-wheel-wrapper[_ngcontent-%COMP%]{justify-content:center}.date-time-sheet-footer[_ngcontent-%COMP%]{padding:12px 16px 20px;border-top:1px solid #e9ecef}.date-time-sheet-footer-cards[_ngcontent-%COMP%]{display:flex;gap:10px;margin-bottom:12px}.date-time-sheet-cta[_ngcontent-%COMP%]{width:100%;border:none;border-radius:10px;background:#20a8d9;color:#fff;font-weight:700;font-size:16px;padding:12px}@media only screen and (max-width: 330px){.experience-heading[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px}}@media only screen and (max-width: 600px){.toCityAdditionDeletionIcon[_ngcontent-%COMP%]{top:4px;right:14px;background-color:#fff}.toCityAdditionDeletionIcon[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:none;border:none;padding:0}.closeIcon[_ngcontent-%COMP%]{right:35px!important;top:144px!important}.inactive-trip-button[_ngcontent-%COMP%]{font-size:11px;width:110px;padding:6px 4px}}.ow-new-form[_ngcontent-%COMP%]{position:relative;padding-top:8px;margin-bottom:10px}.ow-swap-btn[_ngcontent-%COMP%]{position:absolute;top:44px;right:10px;width:34px;height:34px;border-radius:50%;background:white;border:1.5px solid #c8e6f5;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:2;box-shadow:0 1px 4px #00000014}.ow-row[_ngcontent-%COMP%]{display:flex;align-items:stretch;margin-bottom:8px}.ow-left-col[_ngcontent-%COMP%]{width:32px;display:flex;flex-direction:column;align-items:center;flex-shrink:0;padding-top:14px}.ow-pin-circle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-shrink:0}.ow-stop-number[_ngcontent-%COMP%]{width:20px;height:20px;border-radius:50%;background:white;border:1.5px solid #20a8d9;color:#20a8d9;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}.ow-connector-line[_ngcontent-%COMP%]{flex:1;width:2px;background:#c8e6f5;margin-top:6px;min-height:12px}.ow-card[_ngcontent-%COMP%]{flex:1;border-radius:10px;padding:4px 12px;cursor:pointer;min-height:50px;display:flex;flex-direction:column;justify-content:center}.ow-from-card[_ngcontent-%COMP%], .ow-to-card[_ngcontent-%COMP%]{background:#F4FBFF;border:1.5px solid #c8e6f5}.ow-stop-card[_ngcontent-%COMP%]{background:white;border:1.5px solid #e0e0e0;padding:4px 7px;min-height:50px}.ow-card-label[_ngcontent-%COMP%]{font-size:10px;font-weight:700;color:#20a8d9;letter-spacing:.8px;text-transform:uppercase}.ow-stop-card[_ngcontent-%COMP%] .ow-card-label[_ngcontent-%COMP%]{color:#888}.ow-card-value[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:#1d1d1d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ow-value-placeholder[_ngcontent-%COMP%]{color:#aaa;font-weight:400}.ow-stop-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-left:8px;flex-shrink:0}.ow-drag-handle[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:grab;padding:4px}.ow-remove-btn[_ngcontent-%COMP%]{background:none;border:none;padding:12px 4px;display:flex;align-items:center;cursor:pointer}.ow-add-stops-btn[_ngcontent-%COMP%]{margin:5px 0 10px;background:white;border:1.5px solid #20a8d9;border-radius:6px;color:#20a8d9;font-size:11px;font-weight:600;padding:7px 11px;cursor:pointer}.ow-hidden-controls[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0;pointer-events:none;clip:rect(0,0,0,0)}.ow-card-col[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column}.ow-card-body[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.ow-card-content[_ngcontent-%COMP%]{flex:1;min-width:0}.ow-card-icon[_ngcontent-%COMP%]{flex-shrink:0;display:block;align-self:center;margin-top:auto;margin-bottom:auto}.trip-date-card-body[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-height:42px}.ow-card-invalid[_ngcontent-%COMP%]{border-color:#dc3545!important}.ow-inline-error[_ngcontent-%COMP%]{font-size:12px;color:#dc3545;margin-top:4px;padding-left:2px}.ow-stop-actions[_ngcontent-%COMP%]{align-self:center} .ow-ac-inline{display:block} .ow-ac-inline .input-group-prepend{display:none!important} .ow-ac-inline .icon{display:none!important} .ow-ac-inline .input-group{background:transparent!important;border:none!important;height:auto!important;min-height:0!important;padding:0!important} .ow-ac-inline .form-control{border:none!important;background:transparent!important;padding:0!important;height:22px!important;min-height:0!important;line-height:normal!important;font-size:15px!important;font-weight:600!important;color:#1d1d1d!important;box-shadow:none!important} .ow-ac-inline .form-control::placeholder{color:#aaa!important;font-weight:400!important;font-size:15px!important} .ow-ac-inline .borderless-input>input{padding:0!important}.cd-warning-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(0,0,0,.55);
1display:flex;align-items:center;justify-content:center;z-index:9999}.cd-warning-modal[_ngcontent-%COMP%]{background:#fff;border-radius:12px;padding:32px 28px 24px;max-width:380px;width:90%;text-align:center;box-shadow:0 8px 32px #0000002e;animation:cd-popup-in .2s ease}@keyframes cd-popup-in{0%{transform:scale(.88);opacity:0}to{transform:scale(1);opacity:1}}.cd-warning-icon[_ngcontent-%COMP%]{margin-bottom:12px}.cd-warning-title[_ngcontent-%COMP%]{font-size:17px;font-weight:700;color:#333;margin:0 0 10px}.cd-warning-message[_ngcontent-%COMP%]{font-size:14px;color:#555;margin:0 0 10px}.cd-warning-cities[_ngcontent-%COMP%]{font-size:13px;color:#444;background:#f5f5f5;border-radius:8px;padding:10px 14px;margin-bottom:20px;line-height:1.7}.cd-warning-btn[_ngcontent-%COMP%]{background:#20a8d9;color:#fff;border:none;border-radius:6px;padding:10px 32px;font-size:15px;font-weight:600;cursor:pointer;transition:background .15s}.cd-warning-btn[_ngcontent-%COMP%]:hover{background:#1791bf}"]}),g})();function Ti(g){if(!(null==g?void 0:g.address_components))return!1;for(const P of g.address_components)if(P.types.some(i=>i.includes("sublocality")||"postal_code"===i||"route"===i))return!0;return!1}},2801:(_t,We,F)=>{F.d(We,{f:()=>j,_8:()=>a});var r=F(5e3),t=F(1777),e=F(9808);let k=(()=>{class s{static addClass(o,n){o.classList?o.classList.add(n):o.className+=" "+n}static addMultipleClasses(o,n){if(o.classList){let d=n.trim().split(" ");for(let h=0;h<d.length;h++)o.classList.add(d[h])}else{let d=n.split(" ");for(let h=0;h<d.length;h++)o.className+=" "+d[h]}}static removeClass(o,n){o.classList?o.classList.remove(n):o.className=o.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," ")}static hasClass(o,n){return o.classList?o.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(o.className)}static siblings(o){return Array.prototype.filter.call(o.parentNode.children,function(n){return n!==o})}static find(o,n){return Array.from(o.querySelectorAll(n))}static findSingle(o,n){return o?o.querySelector(n):null}static index(o){let n=o.parentNode.childNodes,d=0;for(var h=0;h<n.length;h++){if(n[h]==o)return d;1==n[h].nodeType&&d++}return-1}static indexWithinGroup(o,n){let d=o.parentNode?o.parentNode.childNodes:[],h=0;for(var x=0;x<d.length;x++){if(d[x]==o)return h;d[x].attributes&&d[x].attributes[n]&&1==d[x].nodeType&&h++}return-1}static relativePosition(o,n){let d=o.offsetParent?{width:o.offsetWidth,height:o.offsetHeight}:this.getHiddenElementDimensions(o);const h=n.offsetHeight,x=n.getBoundingClientRect(),T=this.getViewport();let L,R;x.top+h+d.height>T.height?(L=-1*d.height,o.style.transformOrigin="bottom",x.top+L<0&&(L=-1*x.top)):(L=h,o.style.transformOrigin="top"),R=d.width>T.width?-1*x.left:x.left+d.width>T.width?-1*(x.left+d.width-T.width):0,o.style.top=L+"px",o.style.left=R+"px"}static absolutePosition(o,n){let de,we,d=o.offsetParent?{width:o.offsetWidth,height:o.offsetHeight}:this.getHiddenElementDimensions(o),h=d.height,x=d.width,T=n.offsetHeight,L=n.offsetWidth,R=n.getBoundingClientRect(),Q=this.getWindowScrollTop(),N=this.getWindowScrollLeft(),ae=this.getViewport();R.top+T+h>ae.height?(de=R.top+Q-h,o.style.transformOrigin="bottom",de<0&&(de=Q)):(de=T+R.top+Q,o.style.transformOrigin="top"),we=R.left+x>ae.width?Math.max(0,R.left+N+L-x):R.left+N,o.style.top=de+"px",o.style.left=we+"px"}static getParents(o,n=[]){return null===o.parentNode?n:this.getParents(o.parentNode,n.concat([o.parentNode]))}static getScrollableParents(o){let n=[];if(o){let d=this.getParents(o);const h=/(auto|scroll)/,x=T=>{let L=window.getComputedStyle(T,null);return h.test(L.getPropertyValue("overflow"))||h.test(L.getPropertyValue("overflowX"))||h.test(L.getPropertyValue("overflowY"))};for(let T of d){let L=1===T.nodeType&&T.dataset.scrollselectors;if(L){let R=L.split(",");for(let Q of R){let N=this.findSingle(T,Q);N&&x(N)&&n.push(N)}}9!==T.nodeType&&x(T)&&n.push(T)}}return n}static getHiddenElementOuterHeight(o){o.style.visibility="hidden",o.style.display="block";let n=o.offsetHeight;return o.style.display="none",o.style.visibility="visible",n}static getHiddenElementOuterWidth(o){o.style.visibility="hidden",o.style.display="block";let n=o.offsetWidth;return o.style.display="none",o.style.visibility="visible",n}static getHiddenElementDimensions(o){let n={};return o.style.visibility="hidden",o.style.display="block",n.width=o.offsetWidth,n.height=o.offsetHeight,o.style.display="none",o.style.visibility="visible",n}static scrollInView(o,n){let d=getComputedStyle(o).getPropertyValue("borderTopWidth"),h=d?parseFloat(d):0,x=getComputedStyle(o).getPropertyValue("paddingTop"),T=x?parseFloat(x):0,L=o.getBoundingClientRect(),Q=n.getBoundingClientRect().top+document.body.scrollTop-(L.top+document.body.scrollTop)-h-T,N=o.scrollTop,ae=o.clientHeight,de=this.getOuterHeight(n);Q<0?o.scrollTop=N+Q:Q+de>ae&&(o.scrollTop=N+Q-ae+de)}static fadeIn(o,n){o.style.opacity=0;let d=+new Date,h=0,x=function(){h=+o.style.opacity.replace(",",".")+((new Date).getTime()-d)/n,o.style.opacity=h,d=+new Date,+h<1&&(window.requestAnimationFrame&&requestAnimationFrame(x)||setTimeout(x,16))};x()}static fadeOut(o,n){var d=1,T=50/n;let L=setInterval(()=>{(d-=T)<=0&&(d=0,clearInterval(L)),o.style.opacity=d},50)}
1static getWindowScrollTop(){let o=document.documentElement;return(window.pageYOffset||o.scrollTop)-(o.clientTop||0)}static getWindowScrollLeft(){let o=document.documentElement;return(window.pageXOffset||o.scrollLeft)-(o.clientLeft||0)}static matches(o,n){var d=Element.prototype;return(d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.msMatchesSelector||function(x){return-1!==[].indexOf.call(document.querySelectorAll(x),this)}).call(o,n)}static getOuterWidth(o,n){let d=o.offsetWidth;if(n){let h=getComputedStyle(o);d+=parseFloat(h.marginLeft)+parseFloat(h.marginRight)}return d}static getHorizontalPadding(o){let n=getComputedStyle(o);return parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}static getHorizontalMargin(o){let n=getComputedStyle(o);return parseFloat(n.marginLeft)+parseFloat(n.marginRight)}static innerWidth(o){let n=o.offsetWidth,d=getComputedStyle(o);return n+=parseFloat(d.paddingLeft)+parseFloat(d.paddingRight),n}static width(o){let n=o.offsetWidth,d=getComputedStyle(o);return n-=parseFloat(d.paddingLeft)+parseFloat(d.paddingRight),n}static getInnerHeight(o){let n=o.offsetHeight,d=getComputedStyle(o);return n+=parseFloat(d.paddingTop)+parseFloat(d.paddingBottom),n}static getOuterHeight(o,n){let d=o.offsetHeight;if(n){let h=getComputedStyle(o);d+=parseFloat(h.marginTop)+parseFloat(h.marginBottom)}return d}static getHeight(o){let n=o.offsetHeight,d=getComputedStyle(o);return n-=parseFloat(d.paddingTop)+parseFloat(d.paddingBottom)+parseFloat(d.borderTopWidth)+parseFloat(d.borderBottomWidth),n}
1static getWidth(o){let n=o.offsetWidth,d=getComputedStyle(o);return n-=parseFloat(d.paddingLeft)+parseFloat(d.paddingRight)+parseFloat(d.borderLeftWidth)+parseFloat(d.borderRightWidth),n}static getViewport(){let o=window,n=document,d=n.documentElement,h=n.getElementsByTagName("body")[0];return{width:o.innerWidth||d.clientWidth||h.clientWidth,height:o.innerHeight||d.clientHeight||h.clientHeight}}static getOffset(o){var n=o.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(o,n){let d=o.parentNode;if(!d)throw"Can't replace element";return d.replaceChild(n,o)}static getUserAgent(){return navigator.userAgent}static isIE(){var o=window.navigator.userAgent;return o.indexOf("MSIE ")>0||(o.indexOf("Trident/")>0?(o.indexOf("rv:"),!0):o.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(o,n){if(this.isElement(n))n.appendChild(o);else{if(!n.el||!n.el.nativeElement)throw"Cannot append "+n+" to "+o;n.el.nativeElement.appendChild(o)}}static removeChild(o,n){if(this.isElement(n))n.removeChild(o);else{if(!n.el||!n.el.nativeElement)throw"Cannot remove "+o+" from "+n;n.el.nativeElement.removeChild(o)}}static removeElement(o){"remove"in Element.prototype?o.remove():o.parentNode.removeChild(o)}static isElement(o){return"object"==typeof HTMLElement?o instanceof HTMLElement:o&&"object"==typeof o&&null!==o&&1===o.nodeType&&"string"==typeof o.nodeName}static calculateScrollbarWidth(o){if(o){let n=getComputedStyle(o);return o.offsetWidth-o.clientWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);let d=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=d,d}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let o=document.createElement("div");o.className="p-scrollbar-measure",document.body.appendChild(o);let n=o.offsetHeight-o.clientHeight;return document.body.removeChild(o),this.calculatedScrollbarWidth=n,n}static invokeElementMethod(o,n,d){o[n].apply(o,d)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(o){}}static getBrowser(){if(!this.browser){let o=this.resolveUserAgent();this.browser={},o.browser&&(this.browser[o.browser]=!0,this.browser.version=o.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let o=navigator.userAgent.toLowerCase(),n=/(chrome)[ \/]([\w.]+)/.exec(o)||/(webkit)[ \/]([\w.]+)/.exec(o)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(o)||/(msie) ([\w.]+)/.exec(o)||o.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(o)||[];return{browser:n[1]||"",version:n[2]||"0"}}static isInteger(o){return Number.isInteger?Number.isInteger(o):"number"==typeof o&&isFinite(o)&&Math.floor(o)===o}static isHidden(o){return null===o.offsetParent}static getFocusableElements(o){let n=s.find(o,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not
1([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),d=[];for(let h of n)"none"!=getComputedStyle(h).display&&"hidden"!=getComputedStyle(h).visibility&&d.push(h);return d}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}}return s.zindex=1e3,s.calculatedScrollbarWidth=null,s.calculatedScrollbarHeight=null,s})();class X{constructor(u,o=(()=>{})){this.element=u,this.listener=o}bindScrollListener(){this.scrollableParents=k.getScrollableParents(this.element);for(let u=0;u<this.scrollableParents.length;u++)this.scrollableParents[u].addEventListener("scroll",this.listener)}unbindScrollListener(){if(this.scrollableParents)for(let u=0;u<this.scrollableParents.length;u++)this.scrollableParents[u].removeEventListener("scroll",this.listener)}destroy(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}var le=F(5529);let Te=(()=>{class s{}return s.STARTS_WITH="startsWith",s.CONTAINS="contains",s.NOT_CONTAINS="notContains",s.ENDS_WITH="endsWith",s.EQUALS="equals",s.NOT_EQUALS="notEquals",s.IN="in",s.LESS_THAN="lt",s.LESS_THAN_OR_EQUAL_TO="lte",s.GREATER_THAN="gt",s.GREATER_THAN_OR_EQUAL_TO="gte",s.BETWEEN="between",s.IS="is",s.IS_NOT="isNot",s.BEFORE="before",s.AFTER="after",s.DATE_IS="dateIs",s.DATE_IS_NOT="dateIsNot",s.DATE_BEFORE="dateBefore",s.DATE_AFTER="dateAfter",s})(),U=(()=>{class s{constructor(){this.ripple=!1,this.filterMatchModeOptions={text:[Te.STARTS_WITH,Te.CONTAINS,Te.NOT_CONTAINS,Te.ENDS_WITH,Te.EQUALS,Te.NOT_EQUALS],numeric:[Te.EQUALS,Te.NOT_EQUALS,Te.LESS_THAN,Te.LESS_THAN_OR_EQUAL_TO,Te.GREATER_THAN,Te.GREATER_THAN_OR_EQUAL_TO],date:[Te.DATE_IS,Te.DATE_IS_NOT,Te.DATE_BEFORE,Te.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new le.xQ,this.translationObserver=this.translationSource.asObservable()}getTranslation(o){return this.translation[o]}setTranslation(o){this.translation=Object.assign(Object.assign({},this.translation),o),this.translationSource.next(this.translation)}}return s.\u0275fac=function(o){return new(o||s)},s.\u0275prov=r.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})(),H=(()=>{class s{}return s.STARTS_WITH="startsWith",s.CONTAINS="contains",s.NOT_CONTAINS="notContains",s.ENDS_WITH="endsWith",s.EQUALS="equals",s.NOT_EQUALS="notEquals",s.NO_FILTER="noFilter",s.LT="lt",s.LTE="lte",s.GT="gt",s.GTE="gte",s.IS="is",s.IS_NOT="isNot",s.BEFORE="before",s.AFTER="after",s.CLEAR="clear",s.APPLY="apply",s.MATCH_ALL="matchAll",s.MATCH_ANY="matchAny",s.ADD_RULE="addRule",s.REMOVE_RULE="removeRule",s.ACCEPT="accept",s.REJECT="reject",s.CHOOSE="choose",s.UPLOAD="upload",s.CANCEL="cancel",s.DAY_NAMES="dayNames",s.DAY_NAMES_SHORT="dayNamesShort",s.DAY_NAMES_MIN="dayNamesMin",s.MONTH_NAMES="monthNames",s.MONTH_NAMES_SHORT="monthNamesShort",s.FIRST_DAY_OF_WEEK="firstDayOfWeek",s.TODAY="today",s.WEEK_HEADER="weekHeader",s.WEAK="weak",s.MEDIUM="medium",s.STRONG="strong",s.PASSWORD_PROMPT="passwordPrompt",s.EMPTY_MESSAGE="emptyMessage",s.EMPTY_FILTER_MESSAGE="emptyFilterMessage",s})(),te=(()=>{class s{constructor(){this.clickSource=new le.xQ,this.clickObservable=this.clickSource.asObservable()}add(o){o&&this.clickSource.next(o)}}return s.\u0275fac=function(o){return new(o||s)},s.\u0275prov=r.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})(),Fe=(()=>{class s{constructor(o){this.template=o}getType(){return this.name}}return s.\u0275fac=function(o){return new(o||s)(r.Y36(r.Rgc))},s.\u0275dir=r.lG2({type:s,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),s})(),ie=(()=>{class s{}return s.\u0275fac=function(o){return new(o||s)},s.\u0275mod=r.oAB({type:s}),s.\u0275inj=r.cJS({imports:[[e.ez]]}),s})(),ve=(()=>{class s{constructor(o,n,d){this.el=o,this.zone=n,this.config=d}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(o){let n=this.getInk();if(!n||"none"===getComputedStyle(n,null).display)return;if(k.removeClass(n,"p-ink-active"),!k.getHeight(n)&&!k.getWidth(n)){let T=Math.max(k.getOuterWidth(this.el.nativeElement),k.getOuterHeight(this.el.nativeElement));n.style.height=T+"px",n.style.width=T+"px"}let d=k.getOffset(this.el.nativeElement),h=o.pageX-d.left+document.body.scrollTop-k.getWidth(n)/2,x=o.pageY-d.top+document.body.scrollLeft-k.getHeight(n)/2;n.style.top=x+"px",n.style.left=h+"px",k.addClass(n,"p-ink-active")}getInk(){for(let o=0;o<this.el.nativeElement.children.length;o++)if(-1!==this.el.nativeElement.children[o].className.indexOf("p-ink"))return this.el.nativeElement.children[o];return null}resetInk(){let o=this.getInk();o&&k.removeClass(o,"p-ink-active")}onAnimationEnd(o){k.removeClass(o.currentTarget,"p-ink-active")}create(){let o=document.createElement("span");o.className="p-ink",this.el.nativeElement.appendChild(o),this.animationListener=this.onAnimationEnd.bind(this),o.addEventListener("animationend",this.animationListener)}remove(){let o=this.getInk();o&&(this.el.nativeElement.removeEventListener("mousedown",this.mouseDownListener),o.removeEventListener("animationend",this.animationListener),k.removeElement(o))}ngOnDestroy(){this.config&&this.config.ripple&&this.remove()}}return s.\u0275fac=function(o){return new(o||s)(r.Y36(r.SBq),r.Y36(r.R0b),r.Y36(U,8))},s.\u0275dir=r.lG2({type:s,selectors:[["","pRipple",""]],hostAttrs:[1,"p-ripple","p-element"]}),s})(),Se=(()=>{class s{}return s.\u0275fac=function(o){return new(o||s)},s.\u0275mod=r.oAB({type:s}),s.\u0275inj=r.cJS({imports:[[e.ez]]}),s})(),p=(()=>{class s{constructor(o){this.el=o,this.iconPos="left",this.loadingIcon="pi pi-spinner pi-spin",this._loading=!1}ngAfterViewInit(){this._initialStyleClass=this.el.nativeElement.className,k.addMultipleClasses(this.el.nativeElement,this.get
1StyleClass()),(this.icon||this.loading)&&this.createIconEl();let o=document.createElement("span");this.icon&&!this.label&&o.setAttribute("aria-hidden","true"),o.className="p-button-label",this.label?o.appendChild(document.createTextNode(this.label)):o.innerHTML=" ",this.el.nativeElement.appendChild(o),this.initialized=!0}getStyleClass(){let o="p-button p-component";return this.icon&&!this.label&&(o+=" p-button-icon-only"),this.loading&&(o+=" p-disabled p-button-loading",!this.icon&&this.label&&(o+=" p-button-loading-label-only")),o}setStyleClass(){let o=this.getStyleClass();this.el.nativeElement.className=o+" "+this._initialStyleClass}createIconEl(){let o=document.createElement("span");o.className="p-button-icon",o.setAttribute("aria-hidden","true");let n=this.label?"p-button-icon-"+this.iconPos:null;n&&k.addClass(o,n);let d=this.getIconClass();d&&k.addMultipleClasses(o,d);let h=k.findSingle(this.el.nativeElement,".p-button-label");h?this.el.nativeElement.insertBefore(o,h):this.el.nativeElement.appendChild(o)}getIconClass(){return this.loading?"p-button-loading-icon "+this.loadingIcon:this._icon}setIconClass(){let o=k.findSingle(this.el.nativeElement,".p-button-icon");
1o?o.className=this.iconPos?"p-button-icon p-button-icon-"+this.iconPos+" "+this.getIconClass():"p-button-icon "+this.getIconClass():this.createIconEl()}removeIconElement(){let o=k.findSingle(this.el.nativeElement,".p-button-icon");this.el.nativeElement.removeChild(o)}get label(){return this._label}set label(o){this._label=o,this.initialized&&(k.findSingle(this.el.nativeElement,".p-button-label").textContent=this._label||" ",(this.loading||this.icon)&&this.setIconClass(),this.setStyleClass())}get icon(){return this._icon}set icon(o){this._icon=o,this.initialized&&(this.setIconClass(),this.setStyleClass())}get loading(){return this._loading}set loading(o){this._loading=o,this.initialized&&(this.loading||this.icon?this.setIconClass():this.removeIconElement(),this.setStyleClass())}ngOnDestroy(){this.initialized=!1}}return s.\u0275fac=function(o){return new(o||s)(r.Y36(r.SBq))},s.\u0275dir=r.lG2({type:s,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}}),s})(),b=(()=>{class s{}return s.\u0275fac=function(o){return new(o||s)},s.\u0275mod=r.oAB({type:s}),s.\u0275inj=r.cJS({imports:[[e.ez,Se]]}),s})();var I=F(4182),V=0,ce=function K(){let s=[];const d=h=>h&&parseInt(h.style.zIndex,10)||0;return{get:d,set:(h,x,T)=>{x&&(x.style.zIndex=String(((h,x)=>{let T=s.length>0?s[s.length-1]:{key:h,value:x},L=T.value+(T.key===h?0:x)+1;return s.push({key:h,value:L}),L})(h,T)))},clear:h=>{h&&((h=>{s=s.filter(x=>x.value!==h)})(d(h)),h.style.zIndex="")},getCurrent:()=>s.length>0?s[s.length-1].value:0}}();const pe=["container"],be=["inputfield"],Ye=["contentWrapper"];function je(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"i",8),r.NdJ("click",function(){return r.CHM(o),r.oxw(2).clear()}),r.qZA()}}function Be(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"button",9),r.NdJ("click",function(d){r.CHM(o),r.oxw();const h=r.MAs(1);return r.oxw().onButtonClick(d,h)}),r.qZA()}if(2&s){const o=r.oxw(2);r.Q6J("icon",o.icon)("disabled",o.disabled),r.uIk("aria-label",o.iconAriaLabel)}}function Re(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"input",4,5),r.NdJ("focus",function(d){return r.CHM(o),r.oxw().onInputFocus(d)})("keydown",function(d){return r.CHM(o),r.oxw().onInputKeydown(d)})("click",function(){return r.CHM(o),r.oxw().onInputClick()})("blur",function(d){return r.CHM(o),r.oxw().onInputBlur(d)})("input",function(d){return r.CHM(o),r.oxw().onUserInput(d)}),r.qZA(),r.YNc(2,je,1,0,"i",6),r.YNc(3,Be,1,3,"button",7)}if(2&s){const o=r.oxw();r.Tol(o.inputStyleClass),r.Q6J("value",o.inputFieldValue)("readonly",o.readonlyInput)("ngStyle",o.inputStyle)("placeholder",o.placeholder||"")("disabled",o.disabled)("ngClass","p-inputtext p-component"),r.uIk("id",o.inputId)("name",o.name)("required",o.required)("aria-required",o.required)("tabindex",o.tabindex)("inputmode",o.touchUI?"off":null)("aria-labelledby",o.ariaLabelledBy),r.xp6(2),r.Q6J("ngIf",o.showClear&&!o.disabled&&null!=o.value),r.xp6(1),r.Q6J("ngIf",o.showIcon)}}function Ge(s,u){1&s&&r.GkF(0)}function mt(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"button",30),r.NdJ("keydown",function(d){return r.CHM(o),r.oxw(4).onContainerButtonKeydown(d)})("click",function(d){return r.CHM(o),r.oxw(4).onPrevButtonClick(d)}),r._UZ(1,"span",31),r.qZA()}}function Ut(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"button",32),r.NdJ("click",function(d){return r.CHM(o),r.oxw(4).switchToMonthView(d)})("keydown",function(d){return r.CHM(o),r.oxw(4).onContainerButtonKeydown(d)}),r._uU(1),r.qZA()}if(2&s){const o=r.oxw().$implicit,n=r.oxw(3);r.Q6J("disabled",n.switchViewButtonDisabled()),r.xp6(1),r.hij(" ",n.getMonthName(o.month)," ")}}function Wt(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"button",33),r.NdJ("click",function(d){return r.CHM(o),r.oxw(4).switchToYearView(d)})("keydown",function(d){return r.CHM(o),r.oxw(4).onContainerButtonKeydown(d)}),r._uU(1),r.qZA()}if(2&s){const o=r.oxw().$implicit,n=r.oxw(3);r.Q6J("disabled",n.switchViewButtonDisabled()),r.xp6(1),r.hij(" ",n.getYear(o)," ")}}function Ht(s,u){if(1&s&&(r.ynx(0),r._uU(1),r.BQk()),2&s){const o=r.oxw(5);r.xp6(1),r.AsE("",o.yearPickerValues()[0]," - ",o.yearPickerValues()[o.yearPickerValues().length-1],"")}}function Rt(s,u){1&s&&r.GkF(0)}const Ot=function(s){return{$implicit:s}};function It(s,u){if(1&s&&(r.TgZ(0,"span",34),r.YNc(1,Ht,2,2,"ng-container",13),r.YNc(2,Rt,1,0,"ng-container",35),r.qZA()),2&s){const o=r.oxw(4);r.xp6(1),r.Q6J("ngIf",!o.decadeTemplate),r.xp6(1),r.Q6J("ngTemplateOutlet",o.decadeTemplate)("ngTemplateOutletContext",r.VKq(3,Ot,o.yearPickerValues))}}function qt(s,u){if(1&s&&(r.TgZ(0,"th",41)(1,"span"),r._uU(2),r.qZA()()),2&s){const o=r.oxw(5);r.xp6(2),r.Oqu(o.getTranslation("weekHeader"))}}function Jt(s,u){if(1&s&&(r.TgZ(0,"th",42)(1,"span"),r._uU(2),r.qZA()()),2&s){const o=u.$implicit;r.xp6(2),r.Oqu(o)}}function Yt(s,u){if(1&s&&(r.TgZ(0,"td",45)(1,"span",46),r._uU(2),r.qZA()()),2&s){const o=r.oxw().index,n=r.oxw(2).$implicit;r.xp6(2),r.hij(" ",n.weekNumbers[o]," ")}}function Bt(s,u){if(1&s&&(r.ynx(0),r._uU(1),r.BQk()),2&s){const o=r.oxw(2).$implicit;r.xp6(1),r.Oqu(o.day)}}function Vt(s,u){1&s&&r.GkF(0)}const Qt=function(s,u){return{"p-highlight":s,"p-disabled":u}};function zt(s,u){if(1&s){const o=r.EpF();r.ynx(0),r.TgZ(1,"span",48),r.NdJ("click",function(d){r.CHM(o);const h=r.oxw().$implicit;return r.oxw(6).onDateSelect(d,h)})("keydown",function(d){r.CHM(o);const h=r.oxw().$implicit,x=r.oxw(3).index;return r.oxw(3).onDateCellKeydown(d,h,x)}),r.YNc(2,Bt,2,1,"ng-container",13),r.YNc(3,Vt,1,0,"ng-container",35),r.qZA(),r.BQk()}if(2&s){const o=r.oxw().$implicit,n=r.oxw(6);r.xp6(1),r.Q6J("ngClass",r.WLB(4,Qt,n.isSelected(o),!o.selectable)),r.xp6(1),r.Q6J("ngIf",!n.dateTemplate),r.xp6(1),r.Q6J("ngTemplateOutlet",n.dateTemplate)("ngTemplateOutletContext",r.VKq(7,Ot,o))}}const bt=function(s,u){return{"p-datepicker-other-month":s,"p-datepicker-today":u}};
1function jt(s,u){if(1&s&&(r.TgZ(0,"td",47),r.YNc(1,zt,4,9,"ng-container",13),r.qZA()),2&s){const o=u.$implicit,n=r.oxw(6);r.Q6J("ngClass",r.WLB(2,bt,o.otherMonth,o.today)),r.xp6(1),r.Q6J("ngIf",!o.otherMonth||n.showOtherMonths)}}function Gt(s,u){if(1&s&&(r.TgZ(0,"tr"),r.YNc(1,Yt,3,1,"td",43),r.YNc(2,jt,2,5,"td",44),r.qZA()),2&s){const o=u.$implicit,n=r.oxw(5);r.xp6(1),r.Q6J("ngIf",n.showWeek),r.xp6(1),r.Q6J("ngForOf",o)}}function Kt(s,u){if(1&s&&(r.TgZ(0,"div",36)(1,"table",37)(2,"thead")(3,"tr"),r.YNc(4,qt,3,1,"th",38),r.YNc(5,Jt,3,1,"th",39),r.qZA()(),r.TgZ(6,"tbody"),r.YNc(7,Gt,3,2,"tr",40),r.qZA()()()),2&s){const o=r.oxw().$implicit,n=r.oxw(3);r.xp6(4),r.Q6J("ngIf",n.showWeek),r.xp6(1),r.Q6J("ngForOf",n.weekDays),r.xp6(2),r.Q6J("ngForOf",o.dates)}}function $t(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"div",20)(1,"div",21),r.YNc(2,mt,2,0,"button",22),r.TgZ(3,"div",23),r.YNc(4,Ut,2,2,"button",24),r.YNc(5,Wt,2,2,"button",25),r.YNc(6,It,3,5,"span",26),r.qZA(),r.TgZ(7,"button",27),r.NdJ("keydown",function(d){return r.CHM(o),r.oxw(3).onContainerButtonKeydown(d)})("click",function(d){return r.CHM(o),r.oxw(3).onNextButtonClick(d)}),r._UZ(8,"span",28),r.qZA()(),r.YNc(9,Kt,8,3,"div",29),r.qZA()}if(2&s){const o=u.index,n=r.oxw(3);r.xp6(2),r.Q6J("ngIf",0===o),r.xp6(2),r.Q6J("ngIf","date"===n.currentView),r.xp6(1),r.Q6J("ngIf","year"!==n.currentView),r.xp6(1),r.Q6J("ngIf","year"===n.currentView),r.xp6(1),r.Udp("display",1===n.numberOfMonths||o===n.numberOfMonths-1?"inline-flex":"none"),r.xp6(2),r.Q6J("ngIf","date"===n.currentView)}}const Lt=function(s){return{"p-highlight":s}};function Xt(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"span",51),r.NdJ("click",function(d){const x=r.CHM(o).index;return r.oxw(4).onMonthSelect(d,x)})("keydown",function(d){const x=r.CHM(o).index;return r.oxw(4).onMonthCellKeydown(d,x)}),r._uU(1),r.qZA()}if(2&s){const o=u.$implicit,n=u.index,d=r.oxw(4);r.Q6J("ngClass",r.VKq(2,Lt,d.isMonthSelected(n))),r.xp6(1),r.hij(" ",o," ")}}function ei(s,u){if(1&s&&(r.TgZ(0,"div",49),r.YNc(1,Xt,2,4,"span",50),r.qZA()),2&s){const o=r.oxw(3);r.xp6(1),r.Q6J("ngForOf",o.monthPickerValues())}}function ti(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"span",54),r.NdJ("click",function(d){const x=r.CHM(o).$implicit;return r.oxw(4).onYearSelect(d,x)})("keydown",function(d){const x=r.CHM(o).$implicit;return r.oxw(4).onYearCellKeydown(d,x)}),r._uU(1),r.qZA()}if(2&s){const o=u.$implicit,n=r.oxw(4);r.Q6J("ngClass",r.VKq(2,Lt,n.isYearSelected(o))),r.xp6(1),r.hij(" ",o," ")}}function ii(s,u){if(1&s&&(r.TgZ(0,"div",52),r.YNc(1,ti,2,4,"span",53),r.qZA()),2&s){const o=r.oxw(3);r.xp6(1),r.Q6J("ngForOf",o.yearPickerValues())}}function oi(s,u){if(1&s&&(r.ynx(0),r.TgZ(1,"div",16),r.YNc(2,$t,10,7,"div",17),r.qZA(),r.YNc(3,ei,2,1,"div",18),r.YNc(4,ii,2,1,"div",19),r.BQk()),2&s){const o=r.oxw(2);r.xp6(2),r.Q6J("ngForOf",o.months),r.xp6(1),r.Q6J("ngIf","month"===o.currentView),r.xp6(1),r.Q6J("ngIf","year"===o.currentView)}}function ni(s,u){1&s&&(r.ynx(0),r._uU(1,"0"),r.BQk())}function ri(s,u){1&s&&(r.ynx(0),r._uU(1,"0"),r.BQk())}function si(s,u){if(1&s&&(r.TgZ(0,"div",60)(1,"span"),r._uU(2),r.qZA()()),2&s){const o=r.oxw(3);r.xp6(2),r.Oqu(o.timeSeparator)}}function ai(s,u){1&s&&(r.ynx(0),r._uU(1,"0"),r.BQk())}function li(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"div",65)(1,"button",57),r.NdJ("keydown",function(d){return r.CHM(o),r.oxw(3).onContainerButtonKeydown(d)})("keydown.enter",function(d){return r.CHM(o),r.oxw(3).incrementSecond(d)})("keydown.space",function(d){return r.CHM(o),r.oxw(3).incrementSecond(d)})("mousedown",function(d){return r.CHM(o),r.oxw(3).onTimePickerElementMouseDown(d,2,1)})("mouseup",function(d){return r.CHM(o),r.oxw(3).onTimePickerElementMouseUp(d)})("keyup.enter",function(d){return r.CHM(o),r.oxw(3).onTimePickerElementMouseUp(d)})("keyup.space",function(d){return r.CHM(o),r.oxw(3).onTimePickerElementMouseUp(d)})("mouseleave",function(){return r.CHM(o),r.oxw(3).onTimePickerElementMouseLeave()}),r._UZ(2,"span",58),r.qZA(),r.TgZ(3,"span"),r.YNc(4,ai,2,0,"ng-container",13),r._uU(5),r.qZA(),r.TgZ(6,"button",57),r.NdJ("keydown",function(d){return r.CHM(o),r.oxw(3).onContainerButtonKeydown(d)})("keydown.enter",function(d){return r.CHM(o),r.oxw(3).decrementSecond(d)})("keydown.space",function(d){return r.CHM(o),r.oxw(3).decrementSecond(d)})("mousedown",function(d){return r.CHM(o),r.oxw(3).onTimePickerElementMouseDown(d,2,-1)})("mouseup",function(d){return r.CHM(o),r.oxw(3).onTimePickerElementMouseUp(d)})("keyup.enter",function(d){return r.CHM(o),r.oxw(3).onTimePickerElementMouseUp(d)})("keyup.space",function(d){return r.CHM(o),r.oxw(3).onTimePickerElementMouseUp(d)})("mouseleave",function(){return r.CHM(o),r.oxw(3).onTimePickerElementMouseLeave()}),r._UZ(7,"span",59),r.qZA()()}if(2&s){const o=r.oxw(3);r.xp6(4),r.Q6J("ngIf",o.currentSecond<10),r.xp6(1),r.Oqu(o.currentSecond)}}function ci(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"div",66)(1,"button",67),r.NdJ("keydown",function(d){return r.CHM(o),r.oxw(3).onContainerButtonKeydown(d)})("click",function(d){return r.CHM(o),r.oxw(3).toggleAMPM(d)})("keydown.enter",function(d){return r.CHM(o),r.oxw(3).toggleAMPM(d)}
1),r._UZ(2,"span",58),r.qZA(),r.TgZ(3,"span"),r._uU(4),r.qZA(),r.TgZ(5,"button",67),r.NdJ("keydown",function(d){return r.CHM(o),r.oxw(3).onContainerButtonKeydown(d)})("click",function(d){return r.CHM(o),r.oxw(3).toggleAMPM(d)})("keydown.enter",function(d){return r.CHM(o),r.oxw(3).toggleAMPM(d)}),r._UZ(6,"span",59),r.qZA()()}if(2&s){const o=r.oxw(3);r.xp6(4),r.Oqu(o.pm?"PM":"AM")}}function di(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"div",55)(1,"div",56)(2,"button",57),r.NdJ("keydown",function(d){return r.CHM(o),r.oxw(2).onContainerButtonKeydown(d)})("keydown.enter",function(d){return r.CHM(o),r.oxw(2).incrementHour(d)})("keydown.space",function(d){return r.CHM(o),r.oxw(2).incrementHour(d)})("mousedown",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseDown(d,0,1)})("mouseup",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseUp(d)})("keyup.enter",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseUp(d)})("keyup.space",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseUp(d)})("mouseleave",function(){return r.CHM(o),r.oxw(2).onTimePickerElementMouseLeave()}),r._UZ(3,"span",58),r.qZA(),r.TgZ(4,"span"),r.YNc(5,ni,2,0,"ng-container",13),r._uU(6),r.qZA(),r.TgZ(7,"button",57),r.NdJ("keydown",function(d){return r.CHM(o),r.oxw(2).onContainerButtonKeydown(d)})("keydown.enter",function(d){return r.CHM(o),r.oxw(2).decrementHour(d)})("keydown.space",function(d){return r.CHM(o),r.oxw(2).decrementHour(d)})("mousedown",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseDown(d,0,-1)})("mouseup",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseUp(d)})("keyup.enter",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseUp(d)})("keyup.space",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseUp(d)})("mouseleave",function(){return r.CHM(o),r.oxw(2).onTimePickerElementMouseLeave()}),r._UZ(8,"span",59),r.qZA()(),r.TgZ(9,"div",60)(10,"span"),r._uU(11),r.qZA()(),r.TgZ(12,"div",61)(13,"button",57),r.NdJ("keydown",function(d){return r.CHM(o),r.oxw(2).onContainerButtonKeydown(d)})("keydown.enter",function(d){return r.CHM(o),r.oxw(2).incrementMinute(d)})("keydown.space",function(d){return r.CHM(o),r.oxw(2).incrementMinute(d)})("mousedown",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseDown(d,1,1)})("mouseup",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseUp(d)})("keyup.enter",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseUp(d)})("keyup.space",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseUp(d)})("mouseleave",function(){return r.CHM(o),r.oxw(2).onTimePickerElementMouseLeave()}),r._UZ(14,"span",58),r.qZA(),r.TgZ(15,"span"),r.YNc(16,ri,2,0,"ng-container",13),r._uU(17),r.qZA(),r.TgZ(18,"button",57),r.NdJ("keydown",function(d){return r.CHM(o),r.oxw(2).onContainerButtonKeydown(d)})("keydown.enter",function(d){return r.CHM(o),r.oxw(2).decrementMinute(d)})("keydown.space",function(d){return r.CHM(o),r.oxw(2).decrementMinute(d)})("mousedown",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseDown(d,1,-1)})("mouseup",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseUp(d)})("keyup.enter",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseUp(d)})("keyup.space",function(d){return r.CHM(o),r.oxw(2).onTimePickerElementMouseUp(d)})("mouseleave",function(){return r.CHM(o),r.oxw(2).onTimePickerElementMouseLeave()}),r._UZ(19,"span",59),r.qZA()(),r.YNc(20,si,3,1,"div",62),r.YNc(21,li,8,2,"div",63),r.YNc(22,ci,7,1,"div",64),r.qZA()}if(2&s){const o=r.oxw(2);r.xp6(5),r.Q6J("ngIf",o.currentHour<10),r.xp6(1),r.Oqu(o.currentHour),r.xp6(5),r.Oqu(o.timeSeparator),r.xp6(5),r.Q6J("ngIf",o.currentMinute<10),r.xp6(1),r.Oqu(o.currentMinute),r.xp6(3),r.Q6J("ngIf",o.showSeconds),r.xp6(1),r.Q6J("ngIf",o.showSeconds),r.xp6(1),r.Q6J("ngIf","12"==o.hourFormat)}}const Pt=function(s){return[s]};function pi(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"div",68)(1,"button",69),r.NdJ("keydown",function(d){return r.CHM(o),r.oxw(2).onContainerButtonKeydown(d)})("click",function(d){return r.CHM(o),r.oxw(2).onTodayButtonClick(d)}),r.qZA(),r.TgZ(2,"button",69),r.NdJ("keydown",function(d){return r.CHM(o),r.oxw(2).onContainerButtonKeydown(d)})("click",function(d){return r.CHM(o),r.oxw(2).onClearButtonClick(d)}),r.qZA()()}if(2&s){const o=r.oxw(2);r.xp6(1),r.Q6J("label",o.getTranslation("today"))("ngClass",r.VKq(4,Pt,o.todayButtonStyleClass)),r.xp6(1),r.Q6J("label",o.getTranslation("clear"))("ngClass",r.VKq(6,Pt,o.clearButtonStyleClass))}}function ui(s,u){1&s&&r.GkF(0)}const hi=function(s,u,o,n,d,h){return{"p-datepicker p-component":!0,"p-datepicker-inline":s,"p-disabled":u,"p-datepicker-timeonly":o,"p-datepicker-multiple-month":n,"p-datepicker-monthpicker":d,"p-datepicker-touch-ui":h}},At=function(s,u){return{showTransitionParams:s,hideTransitionParams:u}},_i=function(s){return{value:"visibleTouchUI",params:s}},mi=function(s){return{value:"visible",params:s}};function gi(s,u){if(1&s){const o=r.EpF();r.TgZ(0,"div",10,11),r.NdJ("@overlayAnimation.start",function(d){return r.CHM(o),r.oxw().onOverlayAnimationStart(d)})("@overlayAnimation.done",function(d){return r.CHM(o),r.oxw().onOverlayAnimationDone(d)})("click",function(d){return r.CHM(o),r.oxw().onOverlayClick(d)}),r.Hsn(2),r.YNc(3,Ge,1,0,"ng-container",12),r.YNc(4,oi,5,3,"ng-container",13),r.YNc(5,di,23,8,"div",14),r.YNc(6,pi,3,8,"div",15),r.Hsn(7,1),r.YNc(8,ui,1,0,"ng-container",12),r.qZA()}if(2&s){const o=r.oxw();r.Tol(o.panelStyleClass),r.Q6J("ngStyle",o.panelStyle)("ngClass",r.HTZ(11,hi,o.inline,o.disabled,o.timeOnly,o.numberOfMonths>1,"month"===o.view,o.touchUI))("@overlayAnimation",o.touchUI?r.VKq(21,_i,r.WLB(18,At,o.showTransitionOptions,o.hideTransitionOptions)):r.VKq(26,mi,r.WLB(23,At,o.showTransitionOptions,o.hideTransitionOptions)))("@.disabled",!0===o.inline),r.xp6(3),r.Q6J("ngTemplateOutlet",o.headerTemplate),r.xp6(1),r.Q6J("ngIf",!o.timeOnly),r.xp6(1),r.Q6J("ngIf",(o.showTime||o.timeOnly)&&"date"===o.currentView),r.xp6(1),r.Q6J("ngIf",o.showButtonBar),r.xp6(2),r.Q6J("ngTemplateOutlet",o.footerTemplate)}}
1const fi=[[["p-header"]],[["p-footer"]]],yi=function(s,u,o,n){return{"p-calendar":!0,"p-calendar-w-btn":s,"p-calendar-timeonly":u,"p-calendar-disabled":o,"p-focus":n}},Ci=["p-header","p-footer"],S={provide:I.JU,useExisting:(0,r.Gpc)(()=>j),multi:!0};let j=(()=>{class s{constructor(o,n,d,h,x,T){this.el=o,this.renderer=n,this.cd=d,this.zone=h,this.config=x,this.overlayService=T,this.multipleSeparator=",",this.rangeSeparator="-",this.inline=!1,this.showOtherMonths=!0,this.icon="pi pi-calendar",this.shortYearCutoff="+10",this.hourFormat="24",this.stepHour=1,this.stepMinute=1,this.stepSecond=1,this.showSeconds=!1,this.showOnFocus=!0,this.showWeek=!1,this.showClear=!1,this.dataType="date",this.selectionMode="single",this.todayButtonStyleClass="p-button-text",this.clearButtonStyleClass="p-button-text",this.autoZIndex=!0,this.baseZIndex=0,this.keepInvalid=!1,this.hideOnDateTimeSelect=!0,this.timeSeparator=":",this.focusTrap=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onFocus=new r.vpe,this.onBlur=new r.vpe,this.onClose=new r.vpe,this.onSelect=new r.vpe,this.onClear=new r.vpe,this.onInput=new r.vpe,this.onTodayClick=new r.vpe,this.onClearClick=new r.vpe,this.onMonthChange=new r.vpe,this.onYearChange=new r.vpe,this.onClickOutside=new r.vpe,this.onShow=new r.vpe,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.inputFieldValue=null,this.navigationState=null,this._numberOfMonths=1,this._view="date",this.convertTo24Hour=function(L,R){return"12"==this.hourFormat?12===L?R?12:0:R?L+12:L:L}}set content(o){this.contentViewChild=o,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):this.focus||this.initFocusableCell())}get view(){return this._view}set view(o){this._view=o,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(o){if(this._defaultDate=o,this.initialized){const n=o||new Date;this.currentMonth=n.getMonth(),this.currentYear=n.getFullYear(),this.initTime(n),this.createMonths(this.currentMonth,this.currentYear)}}get minDate(){return this._minDate}set minDate(o){this._minDate=o,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(o){this._maxDate=o,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(o){this._disabledDates=o,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(o){this._disabledDays=o,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get yearRange(){return this._yearRange}set yearRange(o){if(this._yearRange=o,o){const n=o.split(":"),d=parseInt(n[0]),h=parseInt(n[1]);this.populateYearOptions(d,h)}}get showTime(){return this._showTime}set showTime(o){this._showTime=o,void 0===this.currentHour&&this.initTime(this.value||new Date),this.updateInputfield()}get locale(){return this._locale}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(o){this._responsiveOptions=o,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(o){this._numberOfMonths=o,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(o){this._firstDayOfWeek=o,this.createWeekDays()}set locale(o){console.warn("Locale property has no effect, use new i18n API instead.")}ngOnInit(){this.attributeSelector=function Z(){return"pr_id_"+ ++V}();const o=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=o.getMonth(),this.currentYear=o.getFullYear(),this.currentView=this.view,"date"===this.view&&(this.createWeekDays(),this.initTime(o),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays()}),this.initialized=!0}
1ngAfterContentInit(){this.templates.forEach(o=>{switch(o.getType()){case"date":default:this.dateTemplate=o.template;break;case"decade":this.decadeTemplate=o.template;break;case"disabledDate":this.disabledDateTemplate=o.template;break;case"header":this.headerTemplate=o.template;break;case"footer":this.footerTemplate=o.template}})}ngAfterViewInit(){this.inline&&(this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""),this.disabled||(this.initFocusableCell(),1===this.numberOfMonths&&(this.contentViewChild.nativeElement.style.width=k.getOuterWidth(this.containerViewChild.nativeElement)+"px")))}getTranslation(o){return this.config.getTranslation(o)}populateYearOptions(o,n){this.yearOptions=[];for(let d=o;d<=n;d++)this.yearOptions.push(d)}createWeekDays(){this.weekDays=[];let o=this.getFirstDateOfWeek(),n=this.getTranslation(H.DAY_NAMES_MIN);for(let d=0;d<7;d++)this.weekDays.push(n[o]),o=6==o?0:++o}monthPickerValues(){let o=[];for(let n=0;n<=11;n++)o.push(this.config.getTranslation("monthNamesShort")[n]);return o}yearPickerValues(){let o=[],n=this.currentYear-this.currentYear%10;for(let d=0;d<10;d++)o.push(n+d);return o}createMonths(o,n){this.months=this.months=[];for(let d=0;d<this.numberOfMonths;d++){let h=o+d,x=n;h>11&&(h=h%11-1,x=n+1),this.months.push(this.createMonth(h,x))}}getWeekNumber(o){let n=new Date(o.getTime());n.setDate(n.getDate()+4-(n.getDay()||7));let d=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((d-n.getTime())/864e5)/7)+1}createMonth(o,n){let d=[],h=this.getFirstDayOfMonthIndex(o,n),x=this.getDaysCountInMonth(o,n),T=this.getDaysCountInPrevMonth(o,n),L=1,R=new Date,Q=[],N=Math.ceil((x+h)/7);for(let ae=0;ae<N;ae++){let de=[];if(0==ae){for(let ke=T-h+1;ke<=T;ke++){let Le=this.getPreviousMonthAndYear(o,n);de.push({day:ke,month:Le.month,year:Le.year,otherMonth:!0,today:this.isToday(R,ke,Le.month,Le.year),selectable:this.isSelectable(ke,Le.month,Le.year,!0)})}let we=7-de.length;for(let ke=0;ke<we;ke++)de.push({day:L,month:o,year:n,today:this.isToday(R,L,o,n),selectable:this.isSelectable(L,o,n,!1)}),L++}else for(let we=0;we<7;we++){if(L>x){let ke=this.getNextMonthAndYear(o,n);de.push({day:L-x,month:ke.month,year:ke.year,otherMonth:!0,today:this.isToday(R,L-x,
1ke.month,ke.year),selectable:this.isSelectable(L-x,ke.month,ke.year,!0)})}else de.push({day:L,month:o,year:n,today:this.isToday(R,L,o,n),selectable:this.isSelectable(L,o,n,!1)});L++}this.showWeek&&Q.push(this.getWeekNumber(new Date(de[0].year,de[0].month,de[0].day))),d.push(de)}return{month:o,year:n,dates:d,weekNumbers:Q}}initTime(o){this.pm=o.getHours()>11,this.showTime?(this.currentMinute=o.getMinutes(),this.currentSecond=o.getSeconds(),this.setCurrentHourPM(o.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(o){this.disabled?o.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(0===this.currentMonth?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}navForward(o){this.disabled?o.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(11===this.currentMonth?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}decrementYear(){if(this.currentYear--,this.yearNavigator&&this.currentYear<this.yearOptions[0]){let o=this.yearOptions[this.yearOptions.length-1]-this.yearOptions[0];this.populateYearOptions(this.yearOptions[0]-o,this.yearOptions[this.yearOptions.length-1]-o)}}decrementDecade(){this.currentYear=this.currentYear-10}incrementDecade(){this.currentYear=this.currentYear+10}incrementYear(){if(this.currentYear++,this.yearNavigator&&this.currentYear>this.yearOptions[this.yearOptions.length-1]){let o=this.yearOptions[this.yearOptions.length-1]-this.yearOptions[0];this.populateYearOptions(this.yearOptions[0]+o,this.yearOptions[this.yearOptions.length-1]+o)}}switchToMonthView(o){this.setCurrentView("month"),o.preventDefault()}switchToYearView(o){this.setCurrentView("year"),o.preventDefault()}onDateSelect(o,n){!this.disabled&&n.selectable?(this.isMultipleSelection()&&this.isSelected(n)?(this.value=this.value.filter((d,h)=>!this.isDateEquals(d,n)),0===this.value.length&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(n)&&this.selectDate(n),this.isSingleSelection()&&this.hideOnDateTimeSelect&&setTimeout(()=>{o.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),o.preventDefault()):o.preventDefault()}shouldSelectDate(o){return!this.isMultipleSelection()||null==this.maxDateCount||this.maxDateCount>(this.value?this.value.length:0)}onMonthSelect(o,n){"month"===this.view?this.onDateSelect(o,{year:this.currentYear,month:n,day:1,selectable:!0}):(this.currentMonth=n,this.createMonths(this.currentMonth,this.currentYear),this.setCurrentView("date"),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(o,n){"year"===this.view?this.onDateSelect(o,{year:n,month:0,day:1,selectable:!0}):(this.currentYear=n,this.setCurrentView("month"),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let o="";if(this.value)if(this.isSingleSelection())o=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let n=0;n<this.value.length;n++)o+=this.formatDateTime(this.value[n]),n!==this.value.length-1&&(o+=this.multipleSeparator+" ");else if(this.isRangeSelection()&&this.value&&this.value.length){let d=this.value[1];o=this.formatDateTime(this.value[0]),d&&(o+=" "+this.rangeSeparator+" "+this.formatDateTime(d))}this.inputFieldValue=o,this.updateFilledState(),this.inputfieldViewChild&&this.inputfieldViewChild.nativeElement&&(this.inputfieldViewChild.nativeElement.value=this.inputFieldValue)}formatDateTime(o){let n=this.keepInvalid?o:null;return this.isValidDate(o)&&(this.timeOnly?n=this.formatTime(o):(n=this.formatDate(o,this.getDateFormat()),this.showTime&&(n+=" "+this.formatTime(o)))),n}setCurrentHourPM(o){"12"==this.hourFormat?(this.pm=o>11,this.currentHour=o>=12?12==o?12:o-12:0==o?12:o):this.currentHour=o}setCurrentView(o){this.currentView=o,this.cd.detectChanges(),this.alignOverlay()}selectDate(o){let n=new Date(o.year,o.month,o.day);if(this.showTime&&(n.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),n.setMinutes(this.currentMinute),n.setSeconds(this.currentSecond)),this.minDate&&this.minDate>n&&(n=this.minDate,this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.maxDate&&this.maxDate<n&&(n=this.maxDate,this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.isSingleSelection())this.updateModel(n);else if(this.isMultipleSelection())this.updateModel(this.value?[...this.value,
1n]:[n]);else if(this.isRangeSelection())if(this.value&&this.value.length){let d=this.value[0],h=this.value[1];!h&&n.getTime()>=d.getTime()?h=n:(d=n,h=null),this.updateModel([d,h])}else this.updateModel([n,null]);this.onSelect.emit(n)}updateModel(o){if(this.value=o,"date"==this.dataType)this.onModelChange(this.value);else if("string"==this.dataType)if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let n=null;this.value&&(n=this.value.map(d=>this.formatDateTime(d))),this.onModelChange(n)}}getFirstDayOfMonthIndex(o,n){let d=new Date;d.setDate(1),d.setMonth(o),d.setFullYear(n);let h=d.getDay()+this.getSundayIndex();return h>=7?h-7:h}getDaysCountInMonth(o,n){return 32-this.daylightSavingAdjust(new Date(n,o,32)).getDate()}getDaysCountInPrevMonth(o,n){let d=this.getPreviousMonthAndYear(o,n);return this.getDaysCountInMonth(d.month,d.year)}getPreviousMonthAndYear(o,n){let d,h;return 0===o?(d=11,h=n-1):(d=o-1,h=n),{month:d,year:h}}getNextMonthAndYear(o,n){let d,h;return 11===o?(d=0,h=n+1):(d=o+1,h=n),{month:d,year:h}}getSundayIndex(){let o=this.getFirstDateOfWeek();return o>0?7-o:0}isSelected(o){if(!this.value)return!1;if(this.isSingleSelection())return this.isDateEquals(this.value,o);if(this.isMultipleSelection()){let n=!1;for(let d of this.value)if(n=this.isDateEquals(d,o),n)break;return n}return this.isRangeSelection()?this.value[1]?this.isDateEquals(this.value[0],o)||this.isDateEquals(this.value[1],o)||this.isDateBetween(this.value[0],this.value[1],o):this.isDateEquals(this.value[0],o):void 0}isComparable(){return null!=this.value&&"string"!=typeof this.value}isMonthSelected(o){if(this.isComparable()){let n=this.isRangeSelection()?this.value[0]:this.value;return!this.isMultipleSelection()&&n.getMonth()===o&&n.getFullYear()===this.currentYear}return!1}isYearSelected(o){if(this.isComparable()){let n=this.isRangeSelection()?this.value[0]:this.value;return!this.isMultipleSelection()&&n.getFullYear()===o}return!1}isDateEquals(o,n){return!!(o&&o instanceof Date)&&o.getDate()===n.day&&o.getMonth()===n.month&&o.getFullYear()===n.year}isDateBetween(o,n,d){if(o&&n){let x=new Date(d.year,d.month,d.day);return o.getTime()<=x.getTime()&&n.getTime()>=x.getTime()}return!1}isSingleSelection(){return"single"===this.selectionMode}isRangeSelection(){return"range"===this.selectionMode}isMultipleSelection(){return"multiple"===this.selectionMode}isToday(o,n,d,h){return o.getDate()===n&&o.getMonth()===d&&o.getFullYear()===h}isSelectable(o,n,d,h){let x=!0,T=!0,L=!0,R=!0;return!(h&&!this.selectOtherMonths)&&(this.minDate&&(this.minDate.getFullYear()>d||this.minDate.getFullYear()===d&&(this.minDate.getMonth()>n||this.minDate.getMonth()===n&&this.minDate.getDate()>o))&&(x=!1),this.maxDate&&(this.maxDate.getFullYear()<d||this.maxDate.getFullYear()===d&&(this.maxDate.getMonth()<n||this.maxDate.getMonth()===n&&this.maxDate.getDate()<o))&&(T=!1),this.disabledDates&&(L=!this.isDateDisabled(o,n,d)),this.disabledDays&&(R=!this.isDayDisabled(o,n,d)),x&&T&&L&&R)}isDateDisabled(o,n,d){if(this.disabledDates)for(let h of this.disabledDates)if(h.getFullYear()===d&&h.getMonth()===n&&h.getDate()===o)return!0;return!1}isDayDisabled(o,n,d){if(this.disabledDays){let x=new Date(d,n,o).getDay();return-1!==this.disabledDays.indexOf(x)}return!1}onInputFocus(o){this.focus=!0,this.showOnFocus&&this.showOverlay(),this.onFocus.emit(o)}onInputClick(){this.showOnFocus&&!this.overlayVisible&&this.showOverlay()}onInputBlur(o){this.focus=!1,this.onBlur.emit(o),this.keepInvalid||this.updateInputfield(),this.onModelTouched()}onButtonClick(o,n){this.overlayVisible?this.hideOverlay():(n.focus(),this.showOverlay())}clear(){this.inputFieldValue=null,this.value=null,this.onModelChange(this.value),this.onClear.emit()}onOverlayClick(o){this.overlayService.add({originalEvent:o,target:this.el.nativeElement})}getMonthName(o){return this.config.getTranslation("monthNames")[o]}getYear(o){return"month"===this.currentView?this.currentYear:o.year}switchViewButtonDisabled(){return this.numberOfMonths>1||this.disabled}onPrevButtonClick(o){this.navigationState={backward:!0,button:!0},this.navBackward(o)}onNextButtonClick(o){this.navigationState={backward:!1,button:!0},this.navForward(o)}
1onContainerButtonKeydown(o){switch(o.which){case 9:this.inline||this.trapFocus(o);break;case 27:this.overlayVisible=!1,o.preventDefault()}}onInputKeydown(o){this.isKeydown=!0,40===o.keyCode&&this.contentViewChild?this.trapFocus(o):27===o.keyCode||13===o.keyCode?this.overlayVisible&&(this.overlayVisible=!1,o.preventDefault()):9===o.keyCode&&this.contentViewChild&&(k.getFocusableElements(this.contentViewChild.nativeElement).forEach(n=>n.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(o,n,d){const h=o.currentTarget,x=h.parentElement;switch(o.which){case 40:{h.tabIndex="-1";let T=k.index(x),L=x.parentElement.nextElementSibling;L?k.hasClass(L.children[T].children[0],"p-disabled")?(this.navigationState={backward:!1},this.navForward(o)):(L.children[T].children[0].tabIndex="0",L.children[T].children[0].focus()):(this.navigationState={backward:!1},this.navForward(o)),o.preventDefault();break}case 38:{h.tabIndex="-1";let T=k.index(x),L=x.parentElement.previousElementSibling;if(L){let R=L.children[T].children[0];k.hasClass(R,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(o)):(R.tabIndex="0",R.focus())}else this.navigationState={backward:!0},this.navBackward(o);o.preventDefault();break}case 37:{h.tabIndex="-1";let T=x.previousElementSibling;if(T){let L=T.children[0];k.hasClass(L,"p-disabled")||k.hasClass(L.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,d):(L.tabIndex="0",L.focus())}else this.navigateToMonth(!0,d);o.preventDefault();break}case 39:{h.tabIndex="-1";let T=x.nextElementSibling;if(T){let L=T.children[0];k.hasClass(L,"p-disabled")?this.navigateToMonth(!1,d):(L.tabIndex="0",L.focus())}else this.navigateToMonth(!1,d);o.preventDefault();break}case 13:case 32:this.onDateSelect(o,n),o.preventDefault();break;case 27:this.overlayVisible=!1,o.preventDefault();break;case 9:this.inline||this.trapFocus(o)}}onMonthCellKeydown(o,n){const d=o.currentTarget;switch(o.which){case 38:case 40:{d.tabIndex="-1";var h=d.parentElement.children,x=k.index(d);let T=h[40===o.which?x+3:x-3];T&&(T.tabIndex="0",T.focus()),o.preventDefault();break}case 37:{d.tabIndex="-1";let T=d.previousElementSibling;T?(T.tabIndex="0",T.focus()):(this.navigationState={backward:!0},this.navBackward(o)),o.preventDefault();break}case 39:{d.tabIndex="-1";let T=d.nextElementSibling;T?(T.tabIndex="0",T.focus()):(this.navigationState={backward:!1},this.navForward(o)),o.preventDefault();break}case 13:this.onMonthSelect(o,n),o.preventDefault();break;case 13:case 32:case 27:this.overlayVisible=!1,o.preventDefault();break;case 9:this.inline||this.trapFocus(o)}}onYearCellKeydown(o,n){const d=o.currentTarget;switch(o.which){case 38:case 40:{d.tabIndex="-1";var h=d.parentElement.children,x=k.index(d);let T=h[40===o.which?x+2:x-2];T&&(T.tabIndex="0",T.focus()),o.preventDefault();break}case 37:{d.tabIndex="-1";let T=d.previousElementSibling;T?(T.tabIndex="0",T.focus()):(this.navigationState={backward:!0},this.navBackward(o)),o.preventDefault();break}case 39:{d.tabIndex="-1";let T=d.nextElementSibling;T?(T.tabIndex="0",T.focus()):(this.navigationState={backward:!1},this.navForward(o)),o.preventDefault();break}case 13:case 32:this.onYearSelect(o,n),o.preventDefault();break;case 27:this.overlayVisible=!1,o.preventDefault();break;case 9:this.trapFocus(o)}}navigateToMonth(o,n){if(o)if(1===this.numberOfMonths||0===n)this.navigationState={backward:!0},this.navBackward(event);else{let h=k.find(this.contentViewChild.nativeElement.children[n-1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),x=h[h.length-1];x.tabIndex="0",x.focus()}else if(1===this.numberOfMonths||n===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(event);else{let h=k.findSingle(this.contentViewChild.nativeElement.children[n+1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");h.tabIndex="0",h.focus()}}updateFocus(){let o;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?k.findSingle(this.contentViewChild.nativeElement,".p-datepicker-prev").focus():k.findSingle(this.contentViewChild.nativeElement,".p-datepicker-next").focus();else{if(this.navigationState.backward){let n;n=k.find(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),n&&n.length>0&&(o=n[n.length-1])}else o=k.findSingle(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");o&&(o.tabIndex="0",o.focus())}this.navigationState=null}else this.initFocusableCell()}initFocusableCell(){let o;if("month"===this.currentView){let n=k.find(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"),d=k.findSingle(this.contentViewChild.nativeElement,".p-monthpicker .p-monthpicker-month.p-highlight");
1n.forEach(h=>h.tabIndex=-1),o=d||n[0],0===n.length&&k.find(this.contentViewChild.nativeElement,'.p-monthpicker .p-monthpicker-month.p-disabled[tabindex = "0"]').forEach(x=>x.tabIndex=-1)}else if("year"===this.currentView){let n=k.find(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"),d=k.findSingle(this.contentViewChild.nativeElement,".p-yearpicker .p-yearpicker-year.p-highlight");n.forEach(h=>h.tabIndex=-1),o=d||n[0],0===n.length&&k.find(this.contentViewChild.nativeElement,'.p-yearpicker .p-yearpicker-year.p-disabled[tabindex = "0"]').forEach(x=>x.tabIndex=-1)}else if(o=k.findSingle(this.contentViewChild.nativeElement,"span.p-highlight"),!o){let n=k.findSingle(this.contentViewChild.nativeElement,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");o=n||k.findSingle(this.contentViewChild.nativeElement,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}o&&(o.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{o.focus()},1),this.preventFocus=!1)}trapFocus(o){let n=k.getFocusableElements(this.contentViewChild.nativeElement);if(n&&n.length>0)if(n[0].ownerDocument.activeElement){let d=n.indexOf(n[0].ownerDocument.activeElement);if(o.shiftKey)if(-1==d||0===d)if(this.focusTrap)n[n.length-1].focus();else{if(-1===d)return this.hideOverlay();if(0===d)return}else n[d-1].focus();else if(-1==d||d===n.length-1){if(!this.focusTrap&&-1!=d)return this.hideOverlay();n[0].focus()}else n[d+1].focus()}else n[0].focus();o.preventDefault()}onMonthDropdownChange(o){this.currentMonth=parseInt(o),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}onYearDropdownChange(o){this.currentYear=parseInt(o),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}validateTime(o,n,d,h){let x=this.value;const T=this.convertTo24Hour(o,h);this.isRangeSelection()&&(x=this.value[1]||this.value[0]),this.isMultipleSelection()&&(x=this.value[this.value.length-1]);const L=x?x.toDateString():null;return!(this.minDate&&L&&this.minDate.toDateString()===L&&(this.minDate.getHours()>T||this.minDate.getHours()===T&&(this.minDate.getMinutes()>n||this.minDate.getMinutes()===n&&this.minDate.getSeconds()>d))||this.maxDate&&L&&this.maxDate.toDateString()===L&&(this.maxDate.getHours()<T||this.maxDate.getHours()===T&&(this.maxDate.getMinutes()<n||this.maxDate.getMinutes()===n&&this.maxDate.getSeconds()<d)))}incrementHour(o){let d=this.currentHour+this.stepHour,h=this.pm;"24"==this.hourFormat?d=d>=24?d-24:d:"12"==this.hourFormat&&(this.currentHour<12&&d>11&&(h=!this.pm),d=d>=13?d-12:d),this.validateTime(d,this.currentMinute,this.currentSecond,h)&&(this.currentHour=d,this.pm=h),o.preventDefault()}onTimePickerElementMouseDown(o,n,d){this.disabled||(this.repeat(o,null,n,d),o.preventDefault())}onTimePickerElementMouseUp(o){this.disabled||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.disabled&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(o,n,d,h){let x=n||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(o,100,d,h),this.cd.markForCheck()},x),d){case 0:1===h?this.incrementHour(o):this.decrementHour(o);break;case 1:1===h?this.incrementMinute(o):this.decrementMinute(o);break;case 2:1===h?this.incrementSecond(o):this.decrementSecond(o)}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(o){let n=this.currentHour-this.stepHour,d=this.pm;"24"==this.hourFormat?n=n<0?24+n:n:"12"==this.hourFormat&&(12===this.currentHour&&(d=!this.pm),n=n<=0?12+n:n),this.validateTime(n,this.currentMinute,this.currentSecond,d)&&(this.currentHour=n,this.pm=d),o.preventDefault()}incrementMinute(o){let n=this.currentMinute+this.stepMinute;n=n>59?n-60:n,this.validateTime(this.currentHour,n,this.currentSecond,this.pm)&&(this.currentMinute=n),o.preventDefault()}decrementMinute(o){let n=this.currentMinute-this.stepMinute;n=n<0?60+n:n,this.validateTime(this.currentHour,n,this.currentSecond,this.pm)&&(this.currentMinute=n),o.preventDefault()}incrementSecond(o){let n=this.currentSecond+this.stepSecond;n=n>59?n-60:n,this.validateTime(this.currentHour,this.currentMinute,n,this.pm)&&(this.currentSecond=n),o.preventDefault()}decrementSecond(o){let n=this.currentSecond-this.stepSecond;n=n<0?60+n:n,this.validateTime(this.currentHour,this.currentMinute,n,this.pm)&&(this.currentSecond=n),o.preventDefault()}updateTime(){let o=this.value;this.isRangeSelection()&&(o=this.value[1]||this.value[0]),this.isMultipleSelection()&&(o=this.value[this.value.length-1]),o=o?new Date(o.getTime()):new Date,o.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),o.setMinutes(this.currentMinute),o.setSeconds(this.currentSecond),this.isRangeSelection()&&(o=this.value[1]?[this.value[0],o]:[o,null]),this.isMultipleSelection()&&(o=[...this.value.slice(0,-1),o]),this.updateModel(o),this.onSelect.emit(o),this.updateInputfield()}toggleAMPM(o){const n=!this.pm;this.validateTime(this.currentHour,this.currentMinute,this.currentSecond,n)&&(this.pm=n,this.updateTime()),o.preventDefault()}onUserInput(o){if(!this.isKeydown)return;this.isKeydown=!1;let n=o.target.value;try{let d=this.parseValueFromString(n);this.isValidSelection(d)&&(this.updateModel(d),this.updateUI())}catch(d){this.updateModel(this.keepInvalid?n:null)}this.filled=null!=n&&n.length,this.onInput.emit(o)}isValidSelection(o){let n=!0;
1return this.isSingleSelection()?this.isSelectable(o.getDate(),o.getMonth(),o.getFullYear(),!1)||(n=!1):o.every(d=>this.isSelectable(d.getDate(),d.getMonth(),d.getFullYear(),!1))&&this.isRangeSelection()&&(n=o.length>1&&o[1]>o[0]),n}parseValueFromString(o){if(!o||0===o.trim().length)return null;let n;if(this.isSingleSelection())n=this.parseDateTime(o);else if(this.isMultipleSelection()){let d=o.split(this.multipleSeparator);n=[];for(let h of d)n.push(this.parseDateTime(h.trim()))}else if(this.isRangeSelection()){let d=o.split(" "+this.rangeSeparator+" ");n=[];for(let h=0;h<d.length;h++)n[h]=this.parseDateTime(d[h].trim())}return n}parseDateTime(o){let n,d=o.split(" ");if(this.timeOnly)n=new Date,this.populateTime(n,d[0],d[1]);else{const h=this.getDateFormat();if(this.showTime){let x="12"==this.hourFormat?d.pop():null,T=d.pop();n=this.parseDate(d.join(" "),h),this.populateTime(n,T,x)}else n=this.parseDate(o,h)}return n}populateTime(o,n,d){if("12"==this.hourFormat&&!d)throw"Invalid Time";this.pm="PM"===d||"pm"===d;let h=this.parseTime(n);o.setHours(h.hour),o.setMinutes(h.minute),o.setSeconds(h.second)}isValidDate(o){return o instanceof Date&&class J{static equals(u,o,n){return n?this.resolveFieldData(u,n)===this.resolveFieldData(o,n):this.equalsByValue(u,o)}static equalsByValue(u,o){if(u===o)return!0;if(u&&o&&"object"==typeof u&&"object"==typeof o){var h,x,T,n=Array.isArray(u),d=Array.isArray(o);if(n&&d){if((x=u.length)!=o.length)return!1;for(h=x;0!=h--;)if(!this.equalsByValue(u[h],o[h]))return!1;return!0}if(n!=d)return!1;var L=u instanceof Date,R=o instanceof Date;if(L!=R)return!1;if(L&&R)return u.getTime()==o.getTime();var Q=u instanceof RegExp,N=o instanceof RegExp;if(Q!=N)return!1;if(Q&&N)return u.toString()==o.toString();var ae=Object.keys(u);if((x=ae.length)!==Object.keys(o).length)return!1;for(h=x;0!=h--;)if(!Object.prototype.hasOwnProperty.call(o,ae[h]))return!1;for(h=x;0!=h--;)if(!this.equalsByValue(u[T=ae[h]],o[T]))return!1;return!0}return u!=u&&o!=o}static resolveFieldData(u,o){if(u&&o){if(this.isFunction(o))return o(u);if(-1==o.indexOf("."))return u[o];{let n=o.split("."),d=u;for(let h=0,x=n.length;h<x;++h){if(null==d)return null;d=d[n[h]]}return d}}return null}static isFunction(u){return!!(u&&u.constructor&&u.call&&u.apply)}static reorderArray(u,o,n){u&&o!==n&&(n>=u.length&&(n%=u.length,o%=u.length),u.splice(n,0,u.splice(o,1)[0]))}static insertIntoOrderedArray(u,o,n,d){if(n.length>0){let h=!1;for(let x=0;x<n.length;x++)if(this.findIndexInList(n[x],d)>o){n.splice(x,0,u),h=!0;break}h||n.push(u)}else n.push(u)}static findIndexInList(u,o){let n=-1;if(o)for(let d=0;d<o.length;d++)if(o[d]==u){n=d;break}return n}static contains(u,o){if(null!=u&&o&&o.length)for(let n of o)if(this.equals(u,n))return!0;return!1}static removeAccents(u){return u&&u.search(/[\xC0-\xFF]/g)>-1&&(u=u.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),u}static isEmpty(u){return null==u||""===u||Array.isArray(u)&&0===u.length||!(u instanceof Date)&&"object"==typeof u&&0===Object.keys(u).length}static isNotEmpty(u){return!this.isEmpty(u)}}.isNotEmpty(o)}updateUI(){let o=this.value;Array.isArray(o)&&(o=o[0]);let n=this.defaultDate&&this.isValidDate(this.defaultDate)&&!this.value?this.defaultDate:o&&this.isValidDate(o)?o:new Date;this.currentMonth=n.getMonth(),this.currentYear=n.getFullYear(),this.createMonths(this.currentMonth,this.currentYear),(this.showTime||this.timeOnly)&&(this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds())}showOverlay(){this.overlayVisible||(this.updateUI(),this.touchUI||(this.preventFocus=!0),this.overlayVisible=!0)}hideOverlay(){this.overlayVisible=!1,this.clearTimePickerTimer(),this.touchUI&&this.disableModality(),this.cd.markForCheck()}toggle(){this.inline||(this.overlayVisible?this.hideOverlay():(this.showOverlay(),this.inputfieldViewChild.nativeElement.focus()))}onOverlayAnimationStart(o){switch(o.toState){case"visible":case"visibleTouchUI":this.inl
1ine||(this.overlay=o.element,this.overlay.setAttribute(this.attributeSelector,""),this.appendOverlay(),this.updateFocus(),this.autoZIndex&&(this.touchUI?ce.set("modal",this.overlay,this.baseZIndex||this.config.zIndex.modal):ce.set("overlay",this.overlay,this.baseZIndex||this.config.zIndex.overlay)),this.alignOverlay(),this.onShow.emit(o));break;case"void":this.onOverlayHide(),this.onClose.emit(o)}}onOverlayAnimationDone(o){switch(o.toState){case"visible":case"visibleTouchUI":this.inline||(this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener());break;case"void":this.autoZIndex&&ce.clear(o.element)}}appendOverlay(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.overlay):k.appendChild(this.overlay,this.appendTo))}restoreOverlayAppend(){this.overlay&&this.appendTo&&this.el.nativeElement.appendChild(this.overlay)}alignOverlay(){this.touchUI?this.enableModality(this.overlay):this.overlay&&(this.appendTo?("date"===this.view?(this.overlay.style.width=k.getOuterWidth(this.overlay)+"px",this.overlay.style.minWidth=k.getOuterWidth(this.inputfieldViewChild.nativeElement)+"px"):this.overlay.style.width=k.getOuterWidth(this.inputfieldViewChild.nativeElement)+"px",k.absolutePosition(this.overlay,this.inputfieldViewChild.nativeElement)):k.relativePosition(this.overlay,this.inputfieldViewChild.nativeElement))}enableModality(o){this.mask||(this.mask=document.createElement("div"),this.mask.style.zIndex=String(parseInt(o.style.zIndex)-1),k.addMultipleClasses(this.mask,"p-component-overlay p-datepicker-mask p-datepicker-mask-scrollblocker p-component-overlay p-component-overlay-enter"),this.maskClickListener=this.renderer.listen(this.mask,"click",d=>{this.disableModality()}),document.body.appendChild(this.mask),k.addClass(document.body,"p-overflow-hidden"))}disableModality(){this.mask&&(k.addClass(this.mask,"p-component-overlay-leave"),this.animationEndListener=this.destroyMask.bind(this),this.mask.addEventListener("animationend",this.animationEndListener))}destroyMask(){document.body.removeChild(this.mask);let n,o=document.body.children;for(let d=0;d<o.length;d++)if(k.hasClass(o[d],"p-datepicker-mask-scrollblocker")){n=!0;break}n||k.removeClass(document.body,"p-overflow-hidden"),this.unbindAnimationEndListener(),this.unbindMaskClickListener(),this.mask=null}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}unbindAnimationEndListener(){this.animationEndListener&&this.mask&&(this.mask.removeEventListener("animationend",this.animationEndListener),this.animationEndListener=null)}writeValue(o){if(this.value=o,this.value&&"string"==typeof this.value)try{this.value=this.parseValueFromString(this.value)}catch(n){this.keepInvalid&&(this.value=o)}this.updateInputfield(),this.updateUI(),this.cd.markForCheck()}registerOnChange(o){this.onModelChange=o}registerOnTouched(o){this.onModelTouched=o}setDisabledState(o){this.disabled=o,this.cd.markForCheck()}getDateFormat(){return this.dateFormat||this.getTranslation("dateFormat")}getFirstDateOfWeek(){return this._firstDayOfWeek||this.getTranslation(H.FIRST_DAY_OF_WEEK)}formatDate(o,n){if(!o)return"";let d;const h=Q=>{const N=d+1<n.length&&n.charAt(d+1)===Q;return N&&d++,N},x=(Q,N,ae)=>{let de=""+N;if(h(Q))for(;de.length<ae;)de="0"+de;return de},T=(Q,N,ae,de)=>h(Q)?de[N]:ae[N];let L="",R=!1;if(o)for(d=0;d<n.length;d++)if(R)"'"!==n.charAt(d)||h("'")?L+=n.charAt(d):R=!1;else switch(n.charAt(d)){case"d":L+=x("d",o.getDate(),2);break;case"D":L+=T("D",o.getDay(),this.getTranslation(H.DAY_NAMES_SHORT),this.getTranslation(H.DAY_NAMES));break;case"o":L+=x("o",Math.round((new Date(o.getFullYear(),o.getMonth(),o.getDate()).getTime()-new Date(o.getFullYear(),0,0).getTime())/864e5),3);break;case"m":L+=x("m",o.getMonth()+1,2);break;case"M":L+=T("M",o.getMonth(),this.getTranslation(H.MONTH_NAMES_SHORT),this.getTranslation(H.MONTH_NAMES));break;case"y":L+=h("y")?o.getFullYear():(o.getFullYear()%100<10?"0":"")+o.getFullYear()%100;break;case"@":L+=o.getTime();break;case"!":L+=1e4*o.getTime()+this.ticksTo1970;break;case"'":h("'")?L+="'":R=!0;break;default:L+=n.charAt(d)}return L}formatTime(o){if(!o)return"";let n="",d=o.getHours(),h=o.getMinutes(),x=o.getSeconds();return"12"==this.hourFormat&&d>11&&12!=d&&(d-=12),n+="12"==this.hourFormat&&0===d?12:d<10?"0"+d:d,n+=":",n+=h<10?"0"+h:h,this.showSeconds&&(n+=":",n+=x<10?"0"+x:x),"12"==this.hourFormat&&(n+=o.getHours()>11?" PM":" AM"),n}parseTime(o){let n=o.split(":");if(n.length!==(this.showSeconds?3:2))throw"Invalid time";let h=parseInt(n[0]),x=parseInt(n[1]),T=this.showSeconds?parseInt(n[2]):null;if(isNaN(h)||isNaN(x)||h>23||x>59||"12"==this.hourFormat&&h>12||this.showSeconds&&(isNaN(T)||T>59))throw"Invalid time";return"12"==this.hourFormat&&(12!==h&&this.pm?h+=12:!this.pm&&12===h&&(h-=12)),{hour:h,minute:x,second:T}}parseDate(o,n){if(null==n||null==o)throw"Invalid arguments";if(""===(o="object"==typeof o?o.toString():o+""))return null;let d,h,x,we,T=0,L="string"!=typeof this.shortYearCutoff?this.shortYearCutoff:(new Date).getFullYear()%100+parseInt(this.shortYearCutoff,10),R=-1,Q=-1,N=-1,ae=-1,de=!1,ke=Ke=>{let et=d+1<n.length&&n.charAt(d+1)===Ke;return et&&d++,et},Le=Ke=>{let et=ke(Ke),He="@"===Ke?14:"!"===Ke?20:"y"===Ke&&et?4:"o"===Ke?3:2,tt=new RegExp("^\\d{"+("y"===Ke?He:1)+","+He+"}"),Qe=o.substring(T).match(tt);if(!Qe)throw"Missing number at position "+T;
1return T+=Qe[0].length,parseInt(Qe[0],10)},yt=(Ke,et,He)=>{let Ue=-1,tt=ke(Ke)?He:et,Qe=[];for(let qe=0;qe<tt.length;qe++)Qe.push([qe,tt[qe]]);Qe.sort((qe,Ze)=>-(qe[1].length-Ze[1].length));for(let qe=0;qe<Qe.length;qe++){let Ze=Qe[qe][1];if(o.substr(T,Ze.length).toLowerCase()===Ze.toLowerCase()){Ue=Qe[qe][0],T+=Ze.length;break}}if(-1!==Ue)return Ue+1;throw"Unknown name at position "+T},lt=()=>{if(o.charAt(T)!==n.charAt(d))throw"Unexpected literal at position "+T;T++};for("month"===this.view&&(N=1),d=0;d<n.length;d++)if(de)"'"!==n.charAt(d)||ke("'")?lt():de=!1;else switch(n.charAt(d)){case"d":N=Le("d");break;case"D":yt("D",this.getTranslation(H.DAY_NAMES_SHORT),this.getTranslation(H.DAY_NAMES));break;case"o":ae=Le("o");break;case"m":Q=Le("m");break;case"M":Q=yt("M",this.getTranslation(H.MONTH_NAMES_SHORT),this.getTranslation(H.MONTH_NAMES));break;case"y":R=Le("y");break;case"@":we=new Date(Le("@")),R=we.getFullYear(),Q=we.getMonth()+1,N=we.getDate();break;case"!":we=new Date((Le("!")-this.ticksTo1970)/1e4),R=we.getFullYear(),Q=we.getMonth()+1,N=we.getDate();break;case"'":ke("'")?lt():de=!0;break;default:lt()}if(T<o.length&&(x=o.substr(T),!/^\s+/.test(x)))throw"Extra/unparsed characters found in date: "+x;if(-1===R?R=(new Date).getFullYear():R<100&&(R+=(new Date).getFullYear()-(new Date).getFullYear()%100+(R<=L?0:-100)),ae>-1)for(Q=1,N=ae;h=this.getDaysCountInMonth(R,Q-1),!(N<=h);)Q++,N-=h;if(we=this.daylightSavingAdjust(new Date(R,Q-1,N)),we.getFullYear()!==R||we.getMonth()+1!==Q||we.getDate()!==N)throw"Invalid date";return we}daylightSavingAdjust(o){return o?(o.setHours(o.getHours()>12?o.getHours()+2:0),o):null}updateFilledState(){this.filled=this.inputFieldValue&&""!=this.inputFieldValue}onTodayButtonClick(o){let n=new Date,d={day:n.getDate(),month:n.getMonth(),year:n.getFullYear(),otherMonth:n.getMonth()!==this.currentMonth||n.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.onDateSelect(o,d),this.onTodayClick.emit(o)}onClearButtonClick(o){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(o)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=document.createElement("style"),this.responsiveStyleElement.type="text/css",document.body.appendChild(this.responsiveStyleElement));let o="";if(this.responsiveOptions){let n=[...this.responsiveOptions].filter(d=>!(!d.breakpoint||!d.numMonths)).sort((d,h)=>-1*d.breakpoint.localeCompare(h.breakpoint,void 0,{numeric:!0}));for(let d=0;d<n.length;d++){let{breakpoint:h,numMonths:x}=n[d],T=`\n .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${x}) .p-datepicker-next {\n display: inline-flex !important;\n }\n `;for(let L=x;L<this.numberOfMonths;L++)T+=`\n .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${L+1}) {\n display: none !important;\n }\n `;o+=`\n @media screen and (max-width: ${h}) {\n ${T}\n }\n `}}this.responsiveStyleElement.innerHTML=o}}destroyResponsiveStyleElement(){this.responsiveStyleElement&&(this.responsiveStyleElement.remove(),this.responsiveStyleElement=null)}bindDocumentClickListener(){this.documentClickListener||this.zone.runOutsideAngular(()=>{this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","mousedown",n=>{this.isOutsideClicked(n)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(n),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener))}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new X(this.containerViewChild.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(o){return!(this.el.nativeElement.isSameNode(o.target)||this.isNavIconClicked(o)||this.el.nativeElement.contains(o.target)||this.overlay&&this.overlay.contains(o.target))}isNavIconClicked(o){return k.hasClass(o.target,"p-datepicker-prev")||k.hasClass(o.target,"p-datepicker-prev-icon")||k.hasClass(o.target,"p-datepicker-next")||k.hasClass(o.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!k.isAndroid()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&&ce.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}}return s.\u0275fac=function(o){return new(o||s)(r.Y36(r.SBq),r.Y36(r.Qsj),r.Y36(r.sBO),r.Y36(r.R0b),r.Y36(U),r.Y36(te))}
1,s.\u0275cmp=r.Xpm({type:s,selectors:[["p-calendar"]],contentQueries:function(o,n,d){if(1&o&&r.Suo(d,Fe,4),2&o){let h;r.iGM(h=r.CRH())&&(n.templates=h)}},viewQuery:function(o,n){if(1&o&&(r.Gf(pe,5),r.Gf(be,5),r.Gf(Ye,5)),2&o){let d;r.iGM(d=r.CRH())&&(n.containerViewChild=d.first),r.iGM(d=r.CRH())&&(n.inputfieldViewChild=d.first),r.iGM(d=r.CRH())&&(n.content=d.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(o,n){2&o&&r.ekj("p-inputwrapper-filled",n.filled)("p-inputwrapper-focus",n.focus)("p-calendar-clearable",n.showClear&&!n.disabled)},inputs:{style:"style",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",name:"name",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",iconAriaLabel:"iconAriaLabel",disabled:"disabled",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:"inline",showOtherMonths:"showOtherMonths",selectOtherMonths:"selectOtherMonths",showIcon:"showIcon",icon:"icon",appendTo:"appendTo",readonlyInput:"readonlyInput",shortYearCutoff:"shortYearCutoff",monthNavigator:"monthNavigator",yearNavigator:"yearNavigator",hourFormat:"hourFormat",timeOnly:"timeOnly",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",showSeconds:"showSeconds",required:"required",showOnFocus:"showOnFocus",showWeek:"showWeek",showClear:"showClear",dataType:"dataType",selectionMode:"selectionMode",maxDateCount:"maxDateCount",showButtonBar:"showButtonBar",todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:"keepInvalid",hideOnDateTimeSelect:"hideOnDateTimeSelect",touchUI:"touchUI",timeSeparator:"timeSeparator",focusTrap:"focusTrap",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:"tabindex",view:"view",defaultDate:"defaultDate",minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",yearRange:"yearRange",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",locale:"locale"},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onClear:"onClear",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[r._Bn([S])],ngContentSelectors:Ci,decls:4,vars:11,consts:[[3,"ngClass","ngStyle"],["container",""],[3,"ngIf"],[3,"class","ngStyle","ngClass","click",4,"ngIf"],["type","text","autocomplete","off",3,"value","readonly","ngStyle","placeholder","disabled","ngClass","focus","keydown","click","blur","input"],["inputfield",""],["class","p-calendar-clear-icon pi pi-times",3,"click",4,"ngIf"],["type","button","pButton","","pRipple","","class","p-datepicker-trigger","tabindex","0",3,"icon","disabled","click",4,"ngIf"],[1,"p-calendar-clear-icon","pi","pi-times",3,"click"],["type","button","pButton","","pRipple","","tabindex","0",1,"p-datepicker-trigger",3,"icon","disabled","click"],[3,"ngStyle","ngClass","click"],["contentWrapper",""],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-timepicker",4,"ngIf"],["class","p-datepicker-buttonbar",4,"ngIf"],[1,"p-datepicker-group-container"],["class","p-datepicker-group",4,"ngFor","ngForOf"],["class","p-monthpicker",4,"ngIf"],["class","p-yearpicker",4,"ngIf"],[1,"p-datepicker-group"],[1,"p-datepicker-header"],["class","p-datepicker-prev p-link","type","button","pRipple","",3,"keydown","click",4,"ngIf"],[1,"p-datepicker-title"],["type","button","class","p-datepicker-month p-link",3,"disabled","click","keydown",4,"ngIf"],["type","button","class","p-datepicker-year p-link",3,"disabled","click","keydown",4,"ngIf"],["class","p-datepicker-decade",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-next","p-link",3,"keydown","click"],[1,"p-datepicker-next-icon","pi","pi-chevron-right"],["class","p-datepicker-calendar-container",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-prev","p-link",3,"keydown","click"],[1,"p-datepicker-prev-icon","pi","pi-chevron-left"],["type","button",1,"p-datepicker-month","p-link",3,"disabled","click","keydown"],["type","button",1,"p-datepicker-year","p-link",3,"disabled","click","keydown"],[1,"p-datepicker-decade"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-datepicker-calendar-container"],[1,"p-datepicker-calendar"],["class","p-datepicker-weekheader p-disabled",4,"ngIf"],["scope","col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"p-datepicker-weekheader","p-disabled"],["scope","col"],["class","p-datepicker-weeknumber",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"p-datepicker-weeknumber"],[1,"p-disabled"],[3,"ngClass"],["draggable","false","pRipple","",3,"ngClass","click","keydown"],[1,"p-monthpicker"],["class","p-monthpicker-month","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-monthpicker-month",3,"ngClass","click","keydown"],[1,"p-yearpicker"],["class","p-yearpicker-year","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-yearpicker-year",3,"ngClass","click","keydown"],[1,"p-timepicker"],[1,"p-hour-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave"],[1,"pi","pi-chevron-up"],[1,"pi","pi-chevron-down"],[1,"p-separator"],[1,"p-minute-picker"],["class","p-separator",4,"ngIf"],["class","p-second-picker",4,"ngIf"],["class","p-ampm-picker",4,"ngIf"],[1,"p-second-picker"],[1,"p-ampm-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","click","keydown.enter"],[1,"p-datepicker-buttonbar"],["type","button","pButton","","pRipple","",3,"label","ngClass","keydown","click"]],template:function(o,n){1&o&&(r.F$t(fi),r.TgZ(0,"span",0,1),r.YNc(2,Re,4,17,"ng-template",2),r.YNc(3,gi,9,28,"div",3),r.qZA()),2&o&&(r.Tol(n.styleClass),r.Q6J("ngClass",r.l5B(6,yi,n.showIcon,n.timeOnly,n.disabled,n.focus))("ngStyle",n.style),r.xp6(2),r.Q6J("ngIf",!n.inline),r.xp6(1),r.Q6J("ngIf",n.inline||n.overlayVisible))},directives:[e.mk,e.PC,e.O5,p,ve,e.tP,e.sg],styles:[".p-calendar{position:relative;display:inline-flex;max-width:100%}.p-calendar .p-inputtext{flex:1 1 auto;width:1%}.p-calendar-w-btn .p-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}.p-calendar-w-btn .p-datepicker-trigger{border-top-left-radius:0;border-bottom-left-radius:0}.p-fluid .p-calendar{display:flex}.p-fluid .p-calendar .p-inputtext{width:1%}.p-calendar .p-datepicker{min-width:100%}.p-datepicker{width:auto;position:absolute;top:0;left:0}.p-datepicker-inline{display:inline-block;position:static;overflow-x:auto}.p-datepicker-header{display:flex;align-items:center;justify-content:space-between}.p-datepicker-header .p-datepicker-title{margin:0 auto}.p-datepicker-prev,.p-datepicker-next{cursor:pointer;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group{flex:1 1 auto}.p-datepicker-multiple-month .p-datepicker-group-container{display:flex}.p-datepicker table{width:100%;border-collapse:collapse}.p-datepicker td>span{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:0 auto;overflow:hidden;position:relative}.p-monthpicker-month{width:33.3%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-datepicker-buttonbar{display:flex;justify-content:space-between;align-items:center}.p-timepicker{display:flex;justify-content:center;align-items:center}.p-timepicker button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-timepicker>div{display:flex;align-items:center;flex-direction:column}.p-datepicker-touch-ui,.p-calendar .p-datepicker-touch-ui{position:fixed;top:50%;left:50%;min-width:80vw;transform:translate(-50%,-50%)}.p-yearpicker-year{width:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-calendar-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-calendar-clearable{position:relative}\n"],encapsulation:2,data:{animation:[(0,t.X$)("overlayAnimation",[(0,t.SB)("visibleTouchUI",(0,t.oB)({transform:"translate(-50%,-50%)",opacity:1})),(0,t.eR)("void => visible",[(0,t.oB)({opacity:0,transform:"scaleY(0.8)"}),(0,t.jt)("{{showTransitionParams}}",(0,t.oB)({opacity:1,transform:"*"}))]),(0,t.eR)("visible => void",[(0,t.jt)("{{hideTransitionParams}}",(0,t.oB)({opacity:0}
1))]),(0,t.eR)("void => visibleTouchUI",[(0,t.oB)({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),(0,t.jt)("{{showTransitionParams}}")]),(0,t.eR)("visibleTouchUI => void",[(0,t.jt)("{{hideTransitionParams}}",(0,t.oB)({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0}),s})(),a=(()=>{class s{}return s.\u0275fac=function(o){return new(o||s)},s.\u0275mod=r.oAB({type:s}),s.\u0275inj=r.cJS({imports:[[e.ez,b,ie,Se],b,ie]}),s})()}}]);
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.