PageSourceSearch

https://www.yelowtaxi.com/699-es5.b8039d982ad479d96e07.js

js yelowtaxi.com collected 2026-10-02 00:35:53 UTC 111,910 bytes, 1 lines download raw bytes

1!function(){"use strict";function e(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return t};var t={},i=Object.prototype,o=i.hasOwnProperty,n=Object.defineProperty||function(e,t,i){e[t]=i.value},a="function"==typeof Symbol?Symbol:{},r=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(w){c=function(e,t,i){return e[t]=i}}function s(e,t,i,o){var a=t&&t.prototype instanceof h?t:h,r=Object.create(a.prototype),l=new D(o||[]);return n(r,"_invoke",{value:F(e,i,l)}),r}function p(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(w){return{type:"throw",arg:w}}}t.wrap=s;var d={};function h(){}function f(){}function g(){}var v={};c(v,r,function(){return this});var m=Object.getPrototypeOf,_=m&&m(m(A([])));_&&_!==i&&o.call(_,r)&&(v=_);var y=g.prototype=h.prototype=Object.create(v);function k(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e)})})}function b(e,t){function i(n,a,r,l){var u=p(e[n],e,a);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==typeof s&&o.call(s,"__await")?t.resolve(s.__await).then(function(e){i("next",e,r,l)},function(e){i("throw",e,r,l)}):t.resolve(s).then(function(e){c.value=e,r(c)},function(e){return i("throw",e,r,l)})}l(u.arg)}var a;n(this,"_invoke",{value:function(e,o){function n(){return new t(function(t,n){i(e,o,t,n)})}return a=a?a.then(n,n):n()}})}function F(e,t,i){var o="suspendedStart";return function(n,a){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===n)throw a;return q()}for(i.method=n,i.arg=a;;){var r=i.delegate;if(r){var l=x(r,i);if(l){if(l===d)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===o)throw o="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o="executing";var u=p(e,t,i);if("normal"===u.type){if(o=i.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(o="completed",i.method="throw",i.arg=u.arg)}}}function x(e,t){var i=e.iterator[t.method];if(void 0===i){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=p(i,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var n=o.arg;return n?n.done?(t[e.resultName]=n.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):n:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function Z(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Z,this),this.reset(!0)}function A(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,n=function t(){for(;++i<e.length;)if(o.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:q}}function q(){return{value:void 0,done:!0}}return f.prototype=g,n(y,"constructor",{value:g,configurable:!0}),n(g,"constructor",{value:f,configurable:!0}),f.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,u,"GeneratorFunction")),e.prototype=Object.create(y),e},t.awrap=function(e){return{__await:e}},k(b.prototype),c(b.prototype,l,function(){return this}),t.AsyncIterator=b,t.async=function(e,i,o,n,a){void 0===a&&(a=Promise);var r=new b(s(e,i,o,n),a);return t.isGeneratorFunction(i)?r:r.next().then(function(e){return e.done?e.value:r.next()})},k(y),c(y,u,"Generator"),c(y,r,function(){return this}),c(y,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),i=[];for(var o in t)i.push(o);return i.reverse(),function e(){for(;i.length;){var o=i.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=A,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
1h(T),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(i,o){return r.type="throw",r.arg=e,t.next=i,o&&(t.method="next",t.arg=void 0),!!o}for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var r=a?a.completion:{};return r.type=e,r.arg=t,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(r)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),T(i),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var o=i.completion;if("throw"===o.type){var n=o.arg;T(i)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:A(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),d}},t}function t(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=o(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,u=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return l=e.done,e},e:function(e){u=!0,r=e},f:function(){try{l||null==i.return||i.return()}finally{if(u)throw r}}}}function i(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,o=new Array(t);i<t;i++)o[i]=e[i];return o}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}(self.webpackChunkweb_booking=self.webpackChunkweb_booking||[]).push([[699],{77699:function(o,n,r){r.r(n),r.d(n,{AddBookingModule:function(){return et}});var u=r(16274),c=r(29535),s=r(41205),p=r(42741),d=r(93324),h=r(54972),f=r(18110),g=r(64268),v=r(21499);function m(e,t){1&e&&p._UZ(0,"span",15)}function _(e,t){1&e&&(p.ynx(0),p._UZ(1,"input",16),p.BQk())}function y(e,t){if(1&e&&(p.ynx(0),p.TgZ(1,"div",17),p._UZ(2,"ng2-flatpickr",18),p.TgZ(3,"span",19),p._UZ(4,"i",20),p.qZA(),p.qZA(),p.BQk()),2&e){var i=p.oxw(2);p.xp6(2),p.Q6J("config",i.dateFormatConfig)}}function k(e,t){if(1&e&&(p.ynx(0),p._UZ(1,"ng-select",21),p.BQk()),2&e){var i=p.oxw().$implicit;p.xp6(1),p.Q6J("items",i.value.options)("multiple",!0)}}function b(e,t){if(1&e&&(p.ynx(0),p._UZ(1,"ng-select",22),p.BQk()),2&e){var i=p.oxw().$implicit;p.xp6(1),p.Q6J("items",i.value.options)}}function F(e,t){if(1&e&&(p.ynx(0,9),p.TgZ(1,"div",10),p.TgZ(2,"label",11),p._uU(3),p.YNc(4,m,1,0,"span",12),p.qZA(),p.TgZ(5,"p",13),p._uU(6),p.qZA(),p.YNc(7,_,2,0,"ng-container",14),p.YNc(8,y,5,1,"ng-container",14),p.YNc(9,k,2,2,"ng-container",14),p.YNc(10,b,2,1,"ng-container",14),p.qZA(),p.BQk()),2&e){var i=t.$
1implicit,o=t.index,n=p.oxw();p.Q6J("formGroupName",o),p.xp6(3),p.hij("",i.value.label," "),p.xp6(1),p.Q6J("ngIf",i.value.is_mandatory),p.xp6(2),p.Oqu(i.value.field_description),p.xp6(1),p.Q6J("ngIf",i.value.field_type==n.TEXT_BOX_FIELD),p.xp6(1),p.Q6J("ngIf",i.value.field_type==n.DATE_FIELD),p.xp6(1),p.Q6J("ngIf",i.value.field_type==n.MULTI_SELECT_FIELD),p.xp6(1),p.Q6J("ngIf",i.value.field_type==n.DROPDOWN_FIELD)}}var x,Z=(x=function(){function e(t,i,o){a(this,e),this.fb=t,this.authService=i,this.taxiBookingService=o,this.submitPropertiesForm=new p.vpe,this.goBackEvent=new p.vpe,this.goNextPage=new p.vpe,this.TEXT_BOX_FIELD=1,this.DATE_FIELD=2,this.MULTI_SELECT_FIELD=3,this.DROPDOWN_FIELD=4,this.dateFormatConfig={dateFormat:"d/m/Y",time_24hr:!1,enableTime:!1},this.currentCompanyDetail=null,this.zoneData={from_obj:null,to_obj:null}}return l(e,[{key:"ngOnInit",value:function(){this.propertiesForm=this.fb.group({properties:this.fb.array([])}),this.getCompanyData()}},{key:"ngAfterViewInit",value:function(){}},{key:"ngOnChanges",value:function(e){try{this.propertiesForm.get("properties").reset(),this.propertiesForm.reset()}catch(t){}}},{key:"getCompanyData",value:function(){var e=this;this.authService.currentCompany.subscribe(function(t){Object.keys(t).length>0&&(e.currentCompanyDetail=t,"HH:mm:ss"==e.currentCompanyDetail.company_time_format&&(e.dateFormatConfig.dateFormat="d/m/Y H:i",e.dateFormatConfig.time_24hr=!0))})}},{key:"goBack",value:function(e){this.goBackEvent.emit(e)}},{key:"submitFirstForm",value:function(){this.propertiesForm.valid&&this.submitPropertiesForm.emit(this.propertiesForm)}},{key:"getproperties",value:function(e){var t,o,n,a,r,l,u,c,s,p,d,h=this;if(this.zoneData.from_obj=e.controls.pickup_zone_obj.value,this.zoneData.to_obj=e.controls.drop_off_zone_obj.value,(null===(t=null==this?void 0:this.zoneData)||void 0===t?void 0:t.from_obj)&&this.zoneData.from_obj.property_list||(null===(o=this.zoneData)||void 0===o?void 0:o.to_obj)&&this.zoneData.to_obj.property_list){var f=[],g=[];(null===(a=null===(n=this.zoneData)||void 0===n?void 0:n.from_obj)||void 0===a?void 0:a.property_list)&&(g=g.concat(this.zoneData.from_obj.property_list.split(","))),(null===(l=null===(r=this.zoneData)||void 0===r?void 0:r.to_obj)||void 0===l?void 0:l.property_list)&&this.zoneData.to_obj.property_list.split(",").forEach(function(e){var t,i;(null===(t=h.zoneData)||void 0===t?void 0:t.from)==(null===(i=h.zoneData)||void 0===i?void 0:i.to)?g.push(e):g.includes(e)?f.push(e):g.push(e)});for(var v=this.propertiesForm.get("properties"),m=v.length,_=0;_<m;_++)v.removeAt(0);if(g.length>0){g=2!=(null===(u=this.zoneData.from_obj)||void 0===u?void 0:u.zone_type)&&1!=(null===(c=this.zoneData.to_obj)||void 0===c?void 0:c.zone_type)?[].concat(i(g),i(this.extraFeildIds)):this.extraFeildIds;var y={company_id:null===(s=this.currentCompanyDetail)||void 0===s?void 0:s.company_id};g.length&&g&&(y.property_type_list=g.join(",")),g.length?this.taxiBookingService.getExtraFields(y).subscribe(function(e){e.status&&(e.data.sort(function(e,t){return t.is_mandatory-e.is_mandatory}),e.data.forEach(function(e){v.push(h.propertyRow(e))}))}):this.submitFirstForm()}if(f.length>0){this.extraFeildIds&&f.concat(this.extraFeildIds),f=[].concat(i(f),i(this.extraFeildIds));var k={company_id:null===(p=this.currentCompanyDetail)||void 0===p?void 0:p.company_id,property_type_list:f.join(",")};this.taxiBookingService.getExtraFields(k).subscribe(function(e){e.status&&e.data.forEach(function(e){v.push(h.propertyRow(e))})})}}else if(this.extraFeildIds.length){for(var b=this.propertiesForm.get("properties"),F=b.length,x=0;x<F;x++)b.removeAt(0);var Z={company_id:null===(d=this.currentCompanyDetail)||void 0===d?void 0:d.company_id,property_type_list:this.extraFeildIds.toString()};this.taxiBookingService.getExtraFields(Z).subscribe(function(e){e.status&&e.data.forEach(function(e){b.push(h.propertyRow(e))})})}else this.submitFirstForm()}},{key:"propertyRow",value:function(e){var t=[];return(null==e?void 0:e.config_json.length)>0&&(null==e||e.config_json.forEach(function(e){t.push({label:e.title,value:e.title})})),new d.cw({label:new d.NI(e.field_title),value:new d.NI(null,d.kI.compose(e.is_mandatory?[d.kI.required]:[])),is_mandatory:new d.NI(e.is_mandatory),field_type:new d.NI(e.field_type),options:new d.NI(t),field_description:new d.NI(e.field_description)})}}]),e}(),x.\u0275fac=function(e){return new(e||x)(p.Y36(d.qu),p.Y36(h.e),p.Y36(f.d))},x.\u0275cmp=p.Xpm({type:x,selectors:[["app-add-properties-form"]],inputs:{extraFeildIds:"extraFeildIds",pickupDropOffForm:"pickupDropOffForm"},outputs:{submitPropertiesForm:"submitPropertiesForm",goBackEvent:"goBackEvent",goNextPage:"goNextPage"},features:[p.TTD],decls:12,vars:3,consts:[["autocomplete","off","role","form",3,"formGroup"],[1,"booking-form-header","border-bottom"],[1,"heading","h3","font-weight-700","text-dark","mb-3"],[3,"click"],[1,"fa","fa-angle-left"],["formArrayName","properties",1,"booking-form-body"],[3,"formGroupName",4,"ngFor","ngForOf"],[1,"booking-form-action"],["type","button","color","primary",1,"btn","btn-primary","btn-block","btn-lg","text-uppercase",3,"disabled","click"],[3,"formGroupName"],[1,"form-group"],[1,"control-label","mb-0"],["class","astrsk",4,"ngIf"],[1,"form-text","text-muted","mb-2"],[4,"ngIf"],[1,"astr
1sk"],["type","text","placeholder","Enter value","formControlName","value",1,"form-control"],[1,"input-group"],["placeholder","select date","formControlName","value",1,"form-control",2,"padding","0px",3,"config"],[1,"input-group-addon"],[1,"fa","fa-calendar"],["bindLabel","label","placeholder","Please Select","bindValue","value","formControlName","value",1,"ngselect2-modal","form-control0","select-single-with-search",3,"items","multiple"],["bindLabel","label","placeholder","Please Select","bindValue","value","formControlName","value",1,"ngselect2-modal","form-control0","select-single-with-search",3,"items"]],template:function(e,t){1&e&&(p.TgZ(0,"form",0),p.TgZ(1,"div",1),p.TgZ(2,"h1",2),p.TgZ(3,"a",3),p.NdJ("click",function(){return t.goBack(1)}),p.TgZ(4,"i",4),p._uU(5,"\xa0"),p.qZA(),p.qZA(),p._uU(6," Options "),p.qZA(),p.qZA(),p.TgZ(7,"div",5),p.YNc(8,F,11,8,"ng-container",6),p.qZA(),p.TgZ(9,"div",7),p.TgZ(10,"button",8),p.NdJ("click",function(){return t.submitFirstForm()}),p._uU(11," Next "),p.qZA(),p.qZA(),p.qZA()),2&e&&(p.Q6J("formGroup",t.propertiesForm),p.xp6(8),p.Q6J("ngForOf",t.propertiesForm.controls.properties.controls),p.xp6(2),p.Q6J("disabled",t.propertiesForm.controls.properties.invalid))},directives:[d._Y,d.JL,d.sg,d.CE,u.sg,d.x0,u.O5,d.Fj,d.JJ,d.u,g.DJ,v.w9],styles:[""]}),x),T=r(55167),D=r(8432),A=r(29343),q=r(91454),w=r(1573),C=r(49299);function O(e,t){if(1&e&&p._UZ(0,"span",16),2&e){var i=p.oxw();p.Q6J("innerHTML",i.formErrors.pickup_location,p.oJD)}}function P(e,t){if(1&e&&(p.TgZ(0,"span",17),p._uU(1),p.qZA()),2&e){var i=p.oxw();p.xp6(1),p.hij(" ",null==i.currentLanguage?null:i.currentLanguage.service_not_available," ")}}function S(e,t){if(1&e&&(p.TgZ(0,"span",25),p._uU(1),p.qZA()),2&e){var i=p.oxw(2);p.xp6(1),p.hij(" ",null==i.currentLanguage?null:i.currentLanguage.service_not_available," ")}}var U=function(e){return[e]};function L(e,t){if(1&e){var i=p.EpF();p.ynx(0,18),p.TgZ(1,"div",12),p.TgZ(2,"div",19),p.TgZ(3,"app-search-box-google",20),p.NdJ("search",function(e){return p.CHM(i),p.oxw().searchLocations(e,3)})("searchEvent",function(e){var t=p.CHM(i).index;return p.oxw().searchEventCheckpoint(e,t)}),p.qZA(),p._UZ(4,"i",21),p.YNc(5,S,2,1,"span",22),p.TgZ(6,"a",23),p.NdJ("click",function(){var e=p.CHM(i).index;return p.oxw().removeRow(e)}),p._UZ(7,"i",24),p.qZA(),p.qZA(),p.qZA(),p.BQk()}if(2&e){var o=t.$implicit,n=t.index,a=p.oxw();p.Q6J("formGroupName",n),p.xp6(3),p.Q6J("placeholder",null==a.currentLanguage?null:a.currentLanguage.add_checkpoint)("no_data_found",null==a.currentLanguage?null:a.currentLanguage.no_data_found)("responseData",a.responseDatacheckPoint)("isBooing",!0)("searchText",o.value.value),p.xp6(2),p.Q6J("ngIf","INVALID"==o.status&&o.value.value),p.xp6(2),p.Q6J("ngClass",p.VKq(8,U,o.untouched?"text-secondary":o.invalid?"text-danger":"text-secondary"))}}function V(e,t){if(1&e&&p._UZ(0,"span",16),2&e){var i=p.oxw();p.Q6J("innerHTML",i.formErrors.destination_location,p.oJD)}}function I(e,t){if(1&e&&(p.TgZ(0,"span",26),p._uU(1),p.qZA()),2&e){var i=p.oxw();p.xp6(1),p.hij(" ",null==i.currentLanguage?null:i.currentLanguage.service_not_available," ")}}var N=function(e){return{"has-error":e}},j=function(){var e=function(){function e(t,i,o,n,r,l,u){a(this,e),this.fb=t,this.taxiBookingService=i,this.authService=o,this.toasterService=n,this.router=r,this.cd=l,this.TaxiBookingService=u,this.setUpMap=new p.vpe,this.fixDestinationModel=new p.vpe,this.openQuePickupStand=new p.vpe,this.onFormChangesEvent=new p.vpe,this.currentCompanyDetail=null,this.submitAttempt=!1,this.searchTextPickup=null,this.responseDataPickup=[],this.searchTextDestination=null,this.responseDataDestination=[],this.responseDatacheckPoint=[],this.fixZoneDisableDropoff=!1,this.queuePikupList=[],this.zoneDataArray=[],this.queuePikupStandList=[],this.fixZonePricingArray=[],this.origin=D.jQ,this.checkRegion="Y",this.checkOnlyPickupConfig="N",this.comapnyRegionArray=[],this.selectedPickupRegionData=null,this.selectedDropRegionData=null,this.selectedCheckpointsArray=[],this.queuePikupData=null,this.formErrors={pickup_location:"",destination_location:""},this.validationMessages={pickup_location:{required:"Please enter pickup location",whiteSpace:"* Space not allowed"},destination_location:{required:"Please enter destination",whiteSpace:"* Space not allowed"}}}return l(e,[{key:"ngOnInit",value:function(){var e=this;this.createForm(),this.getCompanyData(),this.taxiBookingService.getCompanyRegionList(1).subscribe(function(t){var i;t&&(e.comapnyRegionArray=(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.list)||[])}),this.authService.langaugeSubjectData.subscribe(function(t){e.currentLanguage=null==t?void 0:t.labels})}},{key:"ngAfterViewInit",value:function(){}},{key:"getCompanyData",value:function(){var e=this;this.authService.currentCompany.subscribe(function(t){Object.keys(t).length>
10&&(e.currentCompanyDetail=t,e.getCheckRegionData(),e.getZoneArray(),e.getQueArray(),e.getSkipDestinationConfige())})}},{key:"getZoneArray",value:function(){var e=this;this.taxiBookingService.getZoneList().subscribe(function(t){t&&(e.zoneDataArray=t.data.list)})}},{key:"getQueArray",value:function(){var e=this;this.taxiBookingService.getPikupPoints(this.currentCompanyDetail.company_id).subscribe(function(t){var i;e.queuePikupList=1===t.status?null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.list:[]})}},{key:"getCheckRegionData",value:function(){var e=this;this.taxiBookingService.conFigDetails({company_id:this.currentCompanyDetail.company_id,config_type:2,key:"csc_041"}).subscribe(function(t){(null==t?void 0:t.status)&&(e.checkRegion=null==t?void 0:t.data.s_key_value,"N"==(null==t?void 0:t.data.s_key_value)&&e.pickupDropOffForm.patchValue({pickup_valid:!0,destination_valid:!0}))})}},{key:"getSkipDestinationConfige",value:function(){var e=this;this.taxiBookingService.conFigDetails({company_id:this.currentCompanyDetail.company_id,config_type:2,key:"tsc_004"}).subscribe(function(t){var i;(null==t?void 0:t.status)&&"Y"==(null===(i=t.data)||void 0===i?void 0:i.s_key_value)&&(e.pickupDropOffForm.patchValue({skip_destination:!0}),e.pickupDropOffForm.get("destination_location").clearValidators(),e.pickupDropOffForm.get("destination_latitude").clearValidators(),e.pickupDropOffForm.get("destination_longitude").clearValidators(),e.pickupDropOffForm.get("destination_location").updateValueAndValidity(),e.pickupDropOffForm.get("destination_latitude").updateValueAndValidity(),e.pickupDropOffForm.get("destination_longitude").updateValueAndValidity())})}},{key:"createForm",value:function(){this.pickupDropOffForm=this.fb.group({pickup_location:[null,d.kI.compose([d.kI.required])],pickup_latitude:[null,d.kI.compose([d.kI.required])],pickup_longitude:[null,d.kI.compose([d.kI.required])],pickup_valid:[!0,d.kI.compose([d.kI.required])],destination_location:[null,d.kI.compose([d.kI.required])],destination_latitude:[null,d.kI.compose([d.kI.required])],destination_longitude:[null,d.kI.compose([d.kI.required])],destination_valid:[!0,d.kI.compose([d.kI.required])],pickup_region_obj:[null],drop_off_region_obj:[null],pickup_zone_obj:[null],drop_off_zone_obj:[null],checkpoints:this.fb.array([]),skip_destination:[!1],getWayPoint:[null],fix_destination:[!1]})}},{key:"generateErrors",value:function(){T.op._generateErrors(this.pickupDropOffForm,this.formErrors,this.validationMessages,this.submitAttempt)}},{key:"searchLocations",value:function(e,t){var i=this;""!==e.trim()&&this.TaxiBookingService.getPlaces(this.currentCompanyDetail.company_id,e).subscribe(function(e){var o,n,a;1==t?i.responseDataPickup=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.places:2==t?i.responseDataDestination=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.places:i.responseDatacheckPoint=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.places})}},{key:"selectPickUpLocation",value:function(e){var t=this;e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.pickupDropOffForm.patchValue({pickup_location:e.full_text,pickup_latitude:e.latitude,pickup_longitude:e.longitude}),this.UpdateAndCheckPickUpLocation(),this.bindMarkerPoints()):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(function(i){i.status&&(t.pickupDropOffForm.patchValue({pickup_location:e.full_text,pickup_latitude:i.data.latitude,pickup_longitude:i.data.longitude}),t.UpdateAndCheckPickUpLocation(),t.bindMarkerPoints())})}},{key:"UpdateAndCheckPickUpLocation",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.pickupDropOffForm.patchValue({fix_destination:!1});var i=!1;if(this.fixZonePricingArray=[],"Y"==this.checkRegion){var o,n=t(this.comapnyRegionArray);try{for(n.s();!(o=n.n()).done;){var a=o.value;i||(i=(0,T.eD)(this.pickupDropOffForm.value.pickup_latitude,this.pickupDropOffForm.value.pickup_longitude,(0,A.U)(a.geofence)),this.selectedPickupRegionData=a)}}catch(f){n.e(f)}finally{n.f()}!0===i?(this.pickupDropOffForm.patchValue({pickup_valid:!0}),this.checkDropUpLocation(this.origin.is_pickUp)):this.pickupDropOffForm.patchValue({pickup_valid:!1})}else i=!0;this.updateRegionPointValiation();var r=!1;if(this.fixZoneDisableDropoff=!1,this.pickupDropOffForm.patchValue({pickup_zone_obj:null}),i){var l,u=t(this.zoneDataArray);try{for(u.s();!(l=u.n()).done;){var c=l.value;r||(r=(0,T.eD)(this.pickupDropOffForm.value.pickup_latitude,this.pickupDropOffForm.value.pickup_longitude,(0,A.U)(c.geofence)),i&&r&&(this.pickupDropOffForm.patchValue({pickup_zone_obj:c}),this.getZonePrice()))}}catch(f){u.e(f)}finally{u.f()}var s=!1;if(this.queuePikupList.length>0){var p,d=t(this.queuePikupList);try{for(d.s();!(p=d.n()).done;){var h=p.value;s=(0,T.eD)(this.pickupDropOffForm.value.pickup_latitude,this.pickupDropOffForm.value.pickup_longitude,(0,A.U)(h.geofence)),this.queuePikupData=s?h:null}}catch(f){d.e(f)}finally{d.f()}}this.queuePikupData?this.getQueuePickupLatLong(this.queuePikupData.pickup_stand_id):this.queuePikupStandList=[]}e&&this.mapChanges(),this.onFormchanges()}},{key:"getZonePrice",value:function(){var e,t,i=this,o={from_zone_id:null===(t=null===(e=this.pickupDropOffForm.value)||void 0===e?void 0:e.pickup_zone_obj)||void 0===t?void 0:t.zone_id,dropoff_type:2,is_active:1};this.taxiBookingService.getZoneprice(o).subscribe(function(e){e.status&&(i.fixZonePricingArray=e.data.list,i.fixZonePricingArray.length>0&&(i.openFixDestination(),i.pickupDropOffForm.patchValue({fix_destination:!0}
1)))})}},{key:"mapChanges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.setUpMap.emit({pickup_latitude:this.pickupDropOffForm.value.pickup_latitude,pickup_longitude:this.pickupDropOffForm.value.pickup_longitude,destination_latitude:this.pickupDropOffForm.value.destination_latitude,destination_longitude:this.pickupDropOffForm.value.destination_longitude,checkpoints:this.selectedCheckpointsArray,isFixdestination:e,generateNewMap:t})}},{key:"selectDestinationLocation",value:function(e){var t=this;e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?(this.pickupDropOffForm.patchValue({destination_location:e.full_text,destination_latitude:e.latitude,destination_longitude:e.longitude}),this.UpdateDestinationLocation(),this.bindMarkerPoints()):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(function(i){i.status&&(t.pickupDropOffForm.patchValue({destination_location:e.full_text,destination_latitude:i.data.latitude,destination_longitude:i.data.longitude}),t.UpdateDestinationLocation(),t.bindMarkerPoints())})}},{key:"UpdateDestinationLocation",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=!1;if("Y"==this.checkRegion){var o,n=t(this.comapnyRegionArray);try{for(n.s();!(o=n.n()).done;){var a=o.value;i||(i=(0,T.eD)(this.pickupDropOffForm.value.destination_latitude.toFixed(5),this.pickupDropOffForm.value.destination_longitude.toFixed(5),(0,A.U)(a.geofence)),this.selectedDropRegionData=a)}}catch(s){n.e(s)}finally{n.f()}!0===i?(this.pickupDropOffForm.patchValue({destination_valid:!0}),this.checkDropUpLocation(this.origin.is_drop)):this.pickupDropOffForm.patchValue("N"==this.checkOnlyPickupConfig?{destination_valid:!1}:{destination_valid:!0});var r=!1;if(this.updateRegionPointValiation(),this.pickupDropOffForm.patchValue({drop_off_zone_obj:null}),i){var l,u=t(this.zoneDataArray);try{for(u.s();!(l=u.n()).done;){var c=l.value;r||(r=(0,T.eD)(this.pickupDropOffForm.value.destination_latitude,this.pickupDropOffForm.value.destination_longitude,(0,A.U)(c.geofence)))&&r&&this.pickupDropOffForm.patchValue({drop_off_zone_obj:c})}}catch(s){u.e(s)}finally{u.f()}}}e&&this.mapChanges(),this.onFormchanges()}},{key:"addNewRow",value:function(){var e=this.pickupDropOffForm.get("checkpoints");"Y"==this.checkRegion&&"N"==this.checkOnlyPickupConfig?this.selectedPickupRegionData?this.validateCheckPoint(e):this.toasterService.error("Please enter pickup location"):this.validateCheckPoint(e)}},{key:"validateCheckPoint",value:function(e){e.valid&&this.pickupDropOffForm.value.pickup_valid?e.controls.length<=2?e.controls.length>0&&!e.at(e.controls.length-1).valid?this.toasterService.error("Your Previous checkpoints is invali
1d!"):(e.push(this.initRows()),this.cd.detectChanges(),this.selectedCheckpointsArray.push({id:e.controls.length,latitude:null,longitude:null})):this.toasterService.error("You can only add maximum three checkpoints!"):this.toasterService.error("Please enter valid pickup location")}},{key:"initRows",value:function(){return new d.cw({value:new d.NI(null,d.kI.compose([d.kI.required])),lat:new d.NI(null),lng:new d.NI(null),pickupLacation:new d.NI(this.selectedPickupRegionData),dropofupLacation:new d.NI(this.selectedDropRegionData),zone_array:new d.NI(this.comapnyRegionArray),checkRegion:new d.NI("N"!=this.checkRegion),checkOnlyPickup:new d.NI(this.checkOnlyPickupConfig),checkPointValid:new d.NI(!0)},{validators:A.v.is_point})}},{key:"searchEventCheckpoint",value:function(e,t){var i=this;e.latitude&&e.longitude&&0!=e.latitude&&0!=e.longitude?this.updateCheckPoints(e.full_text,e.latitude,e.longitude,t):this.taxiBookingService.getGeoCodePlaces(this.currentCompanyDetail.company_id,e.full_text,e.place_id).subscribe(function(o){o.status&&i.updateCheckPoints(e.full_text,o.data.latitude,o.data.longitude,t)})}},{key:"updateCheckPoints",value:function(e,t,i,o){for(var n=this.pickupDropOffForm.get("checkpoints"),a=0;a<n.length;a++)a==o&&n.at(a).patchValue({value:e,lat:t,lng:i,checkPointValid:n.valid});this.bindMarkerPoints(),this.onFormchanges()}},{key:"bindMarkerPoints",value:function(){var e=this,t=[{lat:this.pickupDropOffForm.value.pickup_latitude,lng:this.pickupDropOffForm.value.pickup_longitude},{lat:this.pickupDropOffForm.value.destination_latitude,lng:this.pickupDropOffForm.value.destination_longitude}],i=this.pickupDropOffForm.get("checkpoints"),o=[];this.selectedCheckpointsArray=[],i.value.map(function(n){o.push({latitude:n.lat,longitude:n.lng}),t.push({lat:n.lat,lng:n.lng}),e.selectedCheckpointsArray.push({id:i.value.length,latitude:n.lat,longitude:n.lng})}),this.pickupDropOffForm.patchValue({getWayPoint:o}),this.mapChanges()}},{key:"removeRow",value:function(e){var t=this.pickupDropOffForm.get("checkpoints");this.selectedCheckpointsArray.pop({id:t.controls.length,latitude:null,longitude:null}),t.removeAt(e),this.cd.detectChanges(),this.bindMarkerPoints(),this.onFormchanges()}},{key:"checkDropUpLocation",value:function(e){this.selectedPickupRegionData&&this.selectedDropRegionData&&(this.selectedDropRegionData.company_region_id==this.selectedPickupRegionData.company_region_id?this.pickupDropOffForm.patchValue({destination_valid:!0,pickup_valid:!0}):this.selectedDropRegionData.company_region_id!=this.selectedPickupRegionData.company_region_id?(e===this.origin.is_drop&&this.pickupDropOffForm.patchValue({destination_valid:!1}),e===this.origin.is_pickUp&&this.pickupDropOffForm.patchValue({pickup_valid:!1})):(e==this.origin.is_drop&&this.pickupDropOffForm.patchValue({destination_valid:!0}),e==this.origin.is_pickUp&&this.pickupDropOffForm.patchValue({pickup_valid:!0})))}},{key:"updateRegionPointValiation",value:function(){var e=this.pickupDropOffForm.get("checkpoints");if(e.controls.length>0){var i,o=t(e.controls);try{for(o.s();!(i=o.n()).done;){var n=i.value;"Y"==this.checkRegion&&"N"==this.checkOnlyPickupConfig?(n.patchValue({pickupLacation:this.selectedPickupRegionData,dropofupLacation:this.selectedDropRegionData}),n.clearValidators(),n.setValidators(A.v.is_point)):(n.clearValidators(),n.setValidators(null)),n.updateValueAndValidity()}}catch(a){o.e(a)}finally{o.f()}}}},{key:"getQueuePickupLatLong",value:function(e){var t=this;this.queuePikupStandList=[],this.taxiBookingService.getPikupPointsById(e).subscribe(function(e){var i,o;e.status&&(t.queuePikupStandList=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.pickup_point,(null===(o=t.queuePikupStandList)||void 0===o?void 0:o.length)>0&&t.openQuePickupModel())})}},{key:"openFixDestination",value:function(){this.fixDestinationModel.emit(this.fixZonePricingArray)}},{key:"openQuePickupModel",value:function(){this.openQuePickupStand.emit(this.queuePikupStandList)}},{key:"updateDestination",value:function(e){this.pickupDropOffForm.patchValue({destination_location:null==e?void 0:e.dropoff_location,destination_latitude:e.dropoff_latitude,destination_longitude:e.dropoff_longitude}),this.searchTextDestination=null==e?void 0:e.dropoff_location,this.UpdateDestinationLocation()}},{key:"updatePickUpLocation",value:function(e){this.pickupDropOffForm.patchValue({pickup_location:e.pickup_location,pickup_latitude:e.pickup_latitude,pickup_longitude:e.pickup_longitude}),this.searchTextPickup=null==e?void 0:e.pickup_location,this.UpdateAndCheckPickUpLocation()}},{key:"submitPickUpDropOffForm",value:function(){return this.submitAttempt=!0,this.generateErrors(),this.pickupDropOffForm}},{key:"onFormchanges",value:function(){this.onFormChangesEvent.emit(this.pickupDropOffForm)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(p.Y36(d.qu),p.Y36(f.d),p.Y36(h.e),p.Y36(q._W),p.Y36(c.F0),p.Y36(p.sBO),p.Y36(w.F))},e.\u0275cmp=p.Xpm({type:e,selectors:[["app-pikup-dropoff"]],outputs:{setUpMap:"setUpMap",fixDestinationModel:"fixDestinationModel",openQuePickupStand:"openQuePickupStand",onFormChangesEvent:"onFormChangesEvent"},decls:21,vars:24,consts:[["autocomplete","off","role","form",3,"formGroup"],[1,"get-location"],[1,"form-group","mb-3",3,"ngClass"],[1,"has-feedback"],[3,"placeholder","no_data_found","isBooing","responseData","searchText","search","searchEvent"],[1,"form-control-feedback","fa","fa-map-marker","text-primary-pin"],["class","help-block text-center",3,"innerHTML",4,"ngIf"],["class","form-text text-danger text-center",4,"ngIf"],["formArrayName","checkpoints",1,"form-group","mb-3"],[3,"formGroupName",4,"ngFor","ngForOf"],["href","javascript:;",1,"add-checkpoint",3,"click"],[1,"fa","fa-plus-circle"],[1,"form-group","mb-3"],[3,"is_disable","no_data_found","placeholder","responseData","isBooing","searchText","search","searchEvent"],[1,"form-control-feedback","fa","fa-square-o","text-accent-pin"],["class","help-block text-danger text-center",4,"ngIf"],[1,"help-block","text-center",3,"innerHTML"],[1,"form-text","text-danger","text-center"],[3,"formGroupName"],[1,"has-feedback","p-r-40"],[3,"placeholder","no_data_found","responseData","isBooing","searchText","search","searchEvent"],[1,"form-control-feedback","fa","fa-circle-o"],["class","form-text mt-2 text-danger pl-5 text-center",4,"ngIf"],["href","javascript:;",1,"remove-checkpoint","text-secondary",3,"click"],[1,"fa","fa-tras
1h","fa-fw",3,"ngClass"],[1,"form-text","mt-2","text-danger","pl-5","text-center"],[1,"help-block","text-danger","text-center"]],template:function(e,t){1&e&&(p.TgZ(0,"form",0),p.TgZ(1,"div",1),p.TgZ(2,"div",2),p.TgZ(3,"div",3),p.TgZ(4,"app-search-box-google",4),p.NdJ("search",function(e){return t.searchLocations(e,1)})("searchEvent",function(e){return t.selectPickUpLocation(e)}),p.qZA(),p._UZ(5,"i",5),p.YNc(6,O,1,1,"span",6),p.YNc(7,P,2,1,"span",7),p.qZA(),p.qZA(),p.TgZ(8,"div",8),p.YNc(9,L,8,10,"ng-container",9),p.TgZ(10,"div"),p.TgZ(11,"a",10),p.NdJ("click",function(){return t.addNewRow()}),p._UZ(12,"i",11),p._uU(13),p.qZA(),p.qZA(),p.qZA(),p.TgZ(14,"div",2),p.TgZ(15,"div",12),p.TgZ(16,"div",3),p.TgZ(17,"app-search-box-google",13),p.NdJ("search",function(e){return t.searchLocations(e,2)})("searchEvent",function(e){return t.selectDestinationLocation(e)}),p.qZA(),p._UZ(18,"i",14),p.YNc(19,V,1,1,"span",6),p.YNc(20,I,2,1,"span",15),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA()),2&e&&(p.Q6J("formGroup",t.pickupDropOffForm),p.xp6(2),p.Q6J("ngClass",p.VKq(20,N,t.formErrors.pickup_location)),p.xp6(2),p.Q6J("placeholder",null==t.currentLanguage?null:t.currentLanguage.pickup_location)("no_data_found",null==t.currentLanguage?null:t.currentLanguage.no_data_found)("isBooing",!0)("responseData",t.responseDataPickup)("searchText",t.searchTextPickup),p.xp6(2),p.Q6J("ngIf",t.formErrors.pickup_location),p.xp6(1),p.Q6J("ngIf",!t.pickupDropOffForm.controls.pickup_valid.value),p.xp6(2),p.Q6J("ngForOf",t.pickupDropOffForm.controls.checkpoints.controls),p.xp6(4),p.hij(" ",null==t.currentLanguage?null:t.currentLanguage.add_stop," "),p.xp6(1),p.Q6J("ngClass",p.VKq(22,N,t.formErrors.destination_location)),p.xp6(3),p.Q6J("is_disable",(null==t.fixZonePricingArray?null:t.fixZonePricingArray.length)>0)("no_data_found",null==t.currentLanguage?null:t.currentLanguage.no_data_found)("placeholder",null==t.currentLanguage?null:t.currentLanguage.dropoff_location)("responseData",t.responseDataDestination)("isBooing",!0)("searchText",t.searchTextDestination),p.xp6(2),p.Q6J("ngIf",t.formErrors.destination_location),p.xp6(1),p.Q6J("ngIf",!t.pickupDropOffForm.controls.destination_valid.value))},directives:[d._Y,d.JL,d.sg,u.mk,C.n,u.O5,d.CE,u.sg,d.x0],styles:[""]}),e}();function E(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"label",11),p.TgZ(1,"input",12),p.NdJ("click",function(){return p.CHM(i),p.oxw().changeSelectedTab()}),p.qZA(),p._uU(2),p._UZ(3,"div",13),p.qZA()}if(2&e){var o=t.$implicit,n=p.oxw();p.xp6(1),p.Q6J("value",null==o?null:o.type_id)("formControl",n.rideTypeForm.controls.ride_type)("checked",n.rideTypeForm.controls.ride_type.value==(null==o?null:o.type_id)),p.xp6(1),p.hij(" ",null==o?null:o.type_name," ")}}function J(e,t){if(1&e&&(p.TgZ(0,"div",16),p._UZ(1,"ng2-flatpickr",17),p.TgZ(2,"span",18),p._UZ(3,"i",19),p.qZA(),p.qZA()),2&e){var i=p.oxw(2);p.xp6(1),p.Q6J("config",i.timeFormatConfig2)("formControl",i.rideTypeForm.controls.request_time)("setDate",null==i.timeFormatConfig2?null:i.timeFormatConfig2.minDate)}}function M(e,t){if(1&e&&(p.TgZ(0,"div",14),p.TgZ(1,"div",9),p.TgZ(2,"label"),p._uU(3,"Request Time"),p.qZA(),p.YNc(4,J,4,3,"div",15),p.qZA(),p.qZA()),2&e){var i=p.oxw();p.xp6(4),p.Q6J("ngIf",i.is_date)}}function B(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"label",11),p.TgZ(1,"input",21),p.NdJ("click",function(){return p.CHM(i),p.oxw(2).changeGender()}),p.qZA(),p._uU(2),p._UZ(3,"div",13),p.qZA()}if(2&e){var o=t.$implicit,n=p.oxw(2);p.xp6(1),p.Q6J("value",null==o?null:o.value)("formControl",n.rideTypeForm.controls.gender)("checked",n.rideTypeForm.controls.gender.value==(null==o?null:o.value)),p.xp6(1),p.hij(" ",null==o?null:o.label," ")}}function R(e,t){if(1&e&&(p.TgZ(0,"div",20),p.TgZ(1,"h5",2),p._uU(2,"Gender"),p.qZA(),p.TgZ(3,"div",3),p.TgZ(4,"div",4),p.YNc(5,B,4,4,"label",5),p.qZA(),p.qZA(),p.qZA()),2&e){var i=p.oxw();p.xp6(5),p.Q6J("ngForOf",i.genderArray)}}var Q=function(){var e=function(){function e(t,i,o,n){a(this,e),this.fb=t,this.taxiBookingService=i,this.authService=o,this.toasterService=n,this.currentCompanyDetail=null,this.currentUserDetail=null,this.tripType=D.c2,this.rideType=D.xk,this.genderArray=D.y7,this.driverType=D.$f,this.driverArray=[],this.submitAttempt=!1,this.corporate_id=null,this.formErrors={pickup_location:"",destination:"",request_time:"",start_date:"",end_date:"",paymentMode:"",paymentStatus:"",driver:"",apierror:"",corporate_id:"",inActive:"Corporate is InActive please Activate it",recurring_time:"",recurring_on:""},this.validationMessages={ride_type:{required:"Please enter ride type"},request_time:{required:"Please enter request time "},recurring:{required:"Extra charge per "},start_date:{required:"Extra charge start date"},end_date:{required:"Please select the end date"},days:{required:"Extra charge per luggage"},driver:{required:"Please select the driver"},notes:{required:"Please enter driver notes"},corporate_id:{required:"Please enter Corporate"},recurring_time:{required:"Please select the time"},recurring_on:{required:"Please select the days"}},this.requestMode="3",this.timeFormatConfig2={enableTime:!0,time_24hr:!1,dateFormat:"d/m/Y h:i K",minDate:"today"},this.is_date=!1,this.schedule_trip=!1,this.corporateArray=[]}return l(e,[{key:"ngOnInit",value:function(){var e=this;this.authService.currentUser.subscribe(function(t){e.currentUserDetail=t,e.corporate_id=t.corporate_id}),this.createForm(),this.getCompanyData()}},{key:"getCompanyData",value:function(){var e=this;this.authService.currentCompany.subscribe(function(t){Object.keys(t).length>
10&&(e.currentCompanyDetail=t,"HH:mm:ss"==e.currentCompanyDetail.company_time_format&&(e.timeFormatConfig2.dateFormat="d/m/Y H:i",e.timeFormatConfig2.time_24hr=!0),e.getRideTypeCOnfig(),e.getGenderConfige(),e.getAllowcationConfige())})}},{key:"createForm",value:function(){this.rideTypeForm=this.fb.group({ride_type:[1,d.kI.compose([d.kI.required])],request_time:[null],trip_type:[1],corporate_id:[this.corporate_id],checkActiveCorporate:[null],gender:["M"],gender_required:[!1],notes:[null],autoDispatch:[!0],driver:[null],allocation_type:[null],booking_confirmation:["N"],reason_required_for_booking:["N"],driver_type:[1]})}},{key:"generateErrors",value:function(){T.op._generateErrors(this.rideTypeForm,this.formErrors,this.validationMessages,this.submitAttempt)}},{key:"getRideTypeCOnfig",value:function(){var e=this;this.taxiBookingService.conFigDetails({company_id:this.currentCompanyDetail.company_id,config_type:2,key:"tsc_043"}).subscribe(function(t){(null==t?void 0:t.status)&&(e.requestMode=null==t?void 0:t.data.s_key_value,"3"==(null==t?void 0:t.data.s_key_value)||"2"==(null==t?void 0:t.data.s_key_value)?e.getSeduleConfige():e.setUpRideType())})}},{key:"getGenderConfige",value:function(){var e=this;this.taxiBookingService.conFigDetails({company_id:this.currentCompanyDetail.company_id,config_type:2,key:"tsc_011"}).subscribe(function(t){t.status&&"Y"==(null==t?void 0:t.data.s_key_value)&&(e.rideTypeForm.patchValue({gender_required:!0}),e.rideTypeForm.get("gender").setValidators([d.kI.required]),e.rideTypeForm.get("gender").updateValueAndValidity())})}},{key:"getSeduleConfige",value:function(){var e=this;this.taxiBookingService.scheduleconFig({company_id:this.currentCompanyDetail.company_id}).subscribe(function(i){if(i.success||i.status){var o=i.data;if(o.length>0){e.schedule_trip=!0;var n,a=t(o);try{for(a.s();!(n=a.n()).done;){var r=n.value;"tmc_005_003"===r.config_key?e.addMinutes(Number(r.config_value),null):"tmc_005_004"==r.config_key&&e.addMinutes(null,Number(r.config_value))}}catch(l){a.e(l)}finally{a.f()}}e.setUpRideType()}})}},{key:"getAllowcationConfige",value:function(){var e,t=this,i={key:"tsc_026",config_type:"2",company_id:null===(e=this.currentCompanyDetail)||void 0===e?void 0:e.company_id};this.taxiBookingService.conFigDetails(i).subscribe(function(e){var i,o;e.status&&(t.rideTypeForm.patchValue({allocation_type:null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.s_key_value}),3==(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.s_key_value)&&t.setAutoDispatch(!1,2))})}},{key:"addMinutes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e&&(this.timeFormatConfig2.minDate=new Date((new Date).getTime()+6e4*e)),t&&(this.timeFormatConfig2.maxDate=new Date((new Date).getTime()+6e4*t))}},{key:"setUpRideType",value:function(){var e,t;"3"==this.requestMode&&this.schedule_trip?(this.rideType=[{type_id:1,type_name:"Now"},{type_id:2,type_name:"Later"}],this.rideTypeForm.patchValue({request_time:null===(e=this.timeFormatConfig2)||void 0===e?void 0:e.minDate})):"2"==this.requestMode&&this.schedule_trip?(this.rideType=[{type_id:2,type_name:"Later"}],this.rideTypeForm.patchValue({request_time:null===(t=this.timeFormatConfig2)||void 0===t?void 0:t.minDate})):"1"==this.requestMode&&(this.rideType=[{type_id:1,type_name:"Now"}]),this.rideTypeForm.patchValue({ride_type:this.rideType[0].type_id}),this.changeSelectedTab(),this.is_date=!0}},{key:"changeSelectedTab",value:function(){this.rideTypeForm.patchValue(2==this.rideTypeForm.value.ride_type?{request_time:this.timeFormatConfig2.minDate}:{request_time:null})}},{key:"changeSelectedTripTab",value:function(e){this.rideTypeForm.patchValue({trip_type:null==e?void 0:e.trip_type,booking_confirmation:"N",corporate_id:null,reason_required_for_booking:"N"}),this.rideTypeForm.get("notes").setValidators([]),this.rideTypeForm.get("notes").updateValueAndValidity(),3==(null==e?void 0:e.trip_type)?this.rideTypeForm.get("corporate_id").setValidators([d.kI.required]):(this.rideTypeForm.get("corporate_id").setValidators([]),this.setUpRideType()),this.rideTypeForm.get("corporate_id").updateV
1alueAndValidity()}},{key:"getUserDetail",value:function(e){var t=this;if((null==e?void 0:e.length)>0){var i=null==e?void 0:e.join(",");this.taxiBookingService.getUserDetails(i).subscribe(function(e){if(e.status){var i=null==e?void 0:e.data;t.corporateArray=t.corporateArray.map(function(e){if(null==i?void 0:i.some(function(t){return t.id==(null==e?void 0:e.user_id)})){var t=null==i?void 0:i.find(function(t){return t.id==(null==e?void 0:e.user_id)});return e.user=Object.assign(Object.assign({},t),{full_name:(null==t?void 0:t.first_name)+" "+(null==t?void 0:t.last_name)}),e.full_name=(null==t?void 0:t.first_name)+" "+(null==t?void 0:t.last_name)+" "+(null==t?void 0:t.dial_code)+" "+(null==t?void 0:t.phone_number),Object.assign({},e)}})}})}}},{key:"selectedCorporate",value:function(e){null!=e&&Object.keys(e).length>0&&this.getCorporateData(e)}},{key:"getCorporateData",value:function(e){var t=this;this.taxiBookingService.getCorporateById(e).subscribe(function(e){var i,o,n=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.corporate_config,a=n.find(function(e){return"booking_confirmation"==e.corporate_configuration_key_code}),r=n.find(function(e){return"reason_required_for_booking"==e.corporate_configuration_key_code});t.rideTypeForm.patchValue({booking_confirmation:null==a?void 0:a.corporate_configuration_value,reason_required_for_booking:null==r?void 0:r.corporate_configuration_value}),"Y"==(null==r?void 0:r.corporate_configuration_value)&&(t.rideTypeForm.get("notes").setValidators([d.kI.required]),t.rideTypeForm.get("notes").updateValueAndValidity()),"Y"==(null==a?void 0:a.corporate_configuration_value)?(t.rideType=[{type_id:2,type_name:"Later"}],t.rideTypeForm.controls.ride_type.setValue(2),t.rideTypeForm.controls.ride_type.updateValueAndValidity(),t.changeSelectedTab()):t.setUpRideType(),t.rideTypeForm.patchValue({checkActiveCorporate:null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.is_active})})}},{key:"changeGender",value:function(){this.rideTypeForm.controls.autoDispatch.value||this.setAutoDispatch(!1,this.rideTypeForm.controls.driver_type.value)}},{key:"setAutoDispatch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.rideTypeForm.patchValue({autoDispatch:e}),e?this.rideTypeForm.get("driver").setValidators([]):(this.rideTypeForm.patchValue({driver_type:t}),1==t?this.getOnlineDriver():this.getDriverList(null),this.rideTypeForm.get("driver").setValidators([d.kI.required])),this.rideTypeForm.get("driver").updateValueAndValidity()}},{key:"getOnlineDriver",value:function(){var e,t,i,o,n=this;if(this.driverArray=[],(null===(e=this.locationData)||void 0===e?void 0:e.pickup_latitude)&&(null===(t=this.locationData)||void 0===t?void 0:t.pickup_longitude)){var a={company_id:this.currentCompanyDetail.company_id,latitude:null===(i=this.locationData)||void 0===i?void 0:i.pickup_latitude,longitude:null===(o=this.locationData)||void 0===o?void 0:o.pickup_longitude};
1this.rideTypeForm.controls.gender_required.value&&(a.gender=this.rideTypeForm.controls.gender.value),this.taxiBookingService.getNearByOnlineDriverList(a).subscribe(function(e){if(e.success||e.status){var t=[],i=[];e.data.forEach(function(e){(null==e?void 0:e.driver_id)&&t.push(null==e?void 0:e.driver_id),(null==e?void 0:e.distance)&&(i[null==e?void 0:e.driver_id]=1===n.currentCompanyDetail.distanceUnit_s_key_value?(null==e?void 0:e.distance).toFixed(2):(.621371192*(null==e?void 0:e.distance)).toFixed(2))}),n.getUserDetails(t,i)}else n.driverArray=[]})}else this.toasterService.error("Please enter pickup location")}},{key:"getUserDetails",value:function(e,t){var i=this;if((null==e?void 0:e.length)>0){var o=null==e?void 0:e.join(",");this.taxiBookingService.getUserDetails(o).subscribe(function(e){e.status&&(i.driverArray=null==e?void 0:e.data.map(function(e){return e.label="".concat(null==e?void 0:e.first_name," ").concat(null==e?void 0:e.last_name," (").concat(null==e?void 0:e.dial_code," ").concat(null==e?void 0:e.phone_number," ) ").concat(t[e.id]," ").concat(i.currentCompanyDetail.distance_unit),e}))})}}},{key:"setDriverType",value:function(e){this.rideTypeForm.patchValue({driver_type:e,driver:null}),1==e?this.getOnlineDriver():this.getDriverList(null)}},{key:"getDriverList",value:function(e){var t=this;if(2==this.rideTypeForm.controls.driver_type.value){var i={company_id:this.currentCompanyDetail.company_id,is_active:1};e&&e.term?i.search=e.term:this.driverArray=[],this.rideTypeForm.controls.gender_required.value&&(i.gender=this.rideTypeForm.controls.gender.value),this.taxiBookingService.getDriversList(i).subscribe(function(e){var i;e.success||e.status?(t.driverArray=null===(i=e.data)||void 0===i?void 0:i.list,t.driverArray.forEach(function(e){e.label="".concat(null==e?void 0:e.first_name," ").concat(null==e?void 0:e.last_name," (").concat(null==e?void 0:e.dial_code," ").concat(null==e?void 0:e.phone_number,")")})):t.driverArray=[]})}}},{key:"submitRideTypeForm",value:function(){return this.submitAttempt=!0,this.generateErrors(),this.rideTypeForm}}]),e}();return e.\u0275fac=function(t){return new(t||e)(p.Y36(d.qu),p.Y36(f.d),p.Y36(h.e),p.Y36(q._W))},e.\u0275cmp=p.Xpm({type:e,selectors:[["app-ride-types"]],inputs:{locationData:"locationData"},decls:15,vars:5,consts:[["autocomplete","off","role","form",3,"formGroup"],[1,"ride-type"],[1,"mb-3","mt-2","font-weight-600"],[1,"form-group","mb-1"],[1,"radioStyle1","small-height","d-flex","justify-content-between"],["class","control control-outline control-primary control--radio pr-2 flex-fill",4,"ngFor","ngForOf"],["class","later",4,"ngIf"],["class","trip-type",4,"ngIf"],[1,"notes"],[1,"form-group"],["placeholder","Notes","rows","3",1,"form-control",3,"formControl"],[1,"control","control-outline","control-primary","control--radio","pr-2","flex-fill"],["name","SdbType","type","radio",1,"custom-control-input",3,"value","formControl","checked","click"],[1,"control__indicator"],[1,"later"],["class","input-group",4,"ngIf"],[1,"input-group"],["placeholder","Select Request Time",1,"form-control","p-0",3,"config","formControl","setDate"],[1,"input-group-addon"],[1,"fa","fa-calendar"],[1,"trip-type"],["name","GENDER","type","radio",1,"custom-control-input",3,"value","formControl","checked","click"]],template:function(e,t){1&e&&(p.TgZ(0,"form",0),p.TgZ(1,"div",1),p.ynx(2),p.TgZ(3,"h5",2),p._uU(4,"Ride Type "),p.qZA(),p.TgZ(5,"div",3),p.TgZ(6,"div",4),p.YNc(7,E,4,4,"label",5),p.qZA(),p.qZA(),p.BQk(),p.YNc(8,M,5,1,"div",6),p.qZA(),p.YNc(9,R,6,1,"div",7),p.TgZ(10,"div",8),p.TgZ(11,"h5",2),p._uU(12,"Notes"),p.qZA(),p.TgZ(13,"div",9),p._UZ(14,"textarea",10),p.qZA(),p.qZA(),p.qZA()),2&e&&(p.Q6J("formGroup",t.rideTypeForm),p.xp6(7),p.Q6J("ngForOf",t.rideType),p.xp6(1),p.Q6J("ngIf",2==t.rideTypeForm.value.ride_type),p.xp6(1),p.Q6J("ngIf",t.rideTypeForm.controls.gender_required.value),p.xp6(5),p.Q6J("formControl",t.rideTypeForm.controls.notes))},directives:[d._Y,d.JL,d.sg,u.sg,u.O5,d.Fj,d.JJ,d.oH,d._,g.DJ],styles:[""]}),e}(),Y=r(61921),z=r(89124),H=r(67461),G=r(81820),W=r(70527);function X(e,t){if(1&e&&(p.TgZ(0,"p",12),p.TgZ(1,"small"),p._UZ(2,"i",34),p.qZA(),p._uU(3),p.qZA()),2&e){var i=t.$
1implicit;p.xp6(3),p.hij(" ",i.value.value," ")}}function K(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"div",18),p.TgZ(1,"ng-select",35),p.NdJ("change",function(){return p.CHM(i),p.oxw(2).extraPassengerLuggagFilter()}),p.qZA(),p.qZA()}if(2&e){var o=p.oxw(2);p.xp6(1),p.Q6J("items",o.paymentModeArray)("formControl",o.vehicleTypeForm.controls.payment_mode)}}function ee(e,t){1&e&&(p.TgZ(0,"span",54),p._uU(1,"Starting From"),p.qZA())}function te(e,t){if(1&e&&(p.TgZ(0,"span",55),p._uU(1),p.ALo(2,"roundFraction"),p.qZA()),2&e){var i=p.oxw().$implicit,o=p.oxw(2);p.xp6(1),p.AsE("",null==o.currentCompanyDetail?null:o.currentCompanyDetail.currency_symbol," ",p.lcZ(2,2,(null==i?null:i.final_fare.amount)+(null==i?null:i.final_fare.tax_amount)),"")}}function ie(e,t){1&e&&(p.TgZ(0,"span",55),p._uU(1,"Taxi Meter"),p.qZA())}function oe(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"label",36),p.TgZ(1,"input",37),p.NdJ("click",function(){var e=p.CHM(i).$implicit;return p.oxw(2).selectVehicleObject(e)}),p.qZA(),p.TgZ(2,"div",38),p.TgZ(3,"div",39),p.TgZ(4,"div",40),p._UZ(5,"img",41),p.qZA(),p.TgZ(6,"div",42),p.TgZ(7,"h5",43),p._uU(8),p.qZA(),p.TgZ(9,"div",44),p.TgZ(10,"ul",45),p.TgZ(11,"li",46),p._UZ(12,"i",47),p.TgZ(13,"strong"),p._uU(14),p.qZA(),p._uU(15," - "),p.TgZ(16,"strong"),p._uU(17),p.qZA(),p.qZA(),p.TgZ(18,"li",48),p._UZ(19,"i",49),p.TgZ(20,"strong"),p._uU(21),p.qZA(),p._uU(22," - "),p.TgZ(23,"strong"),p._uU(24),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.TgZ(25,"div",50),p.TgZ(26,"div",51),p.YNc(27,ee,2,0,"span",52),p.YNc(28,te,3,4,"span",53),p.YNc(29,
1ie,2,0,"span",53),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA()}if(2&e){var o=t.$implicit,n=t.first;p.xp6(1),p.Q6J("checked",n)("value",o),p.xp6(4),p.Q6J("src",null!=o&&o.vehicle_image?null==o?null:o.vehicle_image:"assets/img/car_image.png",p.LSH),p.xp6(3),p.hij(" ",o.title,""),p.xp6(6),p.Oqu(o.capacity),p.xp6(3),p.Oqu(o.max_capacity),p.xp6(4),p.Oqu(o.vehicle_luggage_capacity),p.xp6(3),p.Oqu(o.max_luggage_capacity),p.xp6(3),p.Q6J("ngIf","Y"==(null==o||null==o.pricing?null:o.pricing.zone_price_applied)?2==(null==o||null==o.pricing||null==o.pricing.zone_price_model?null:o.pricing.zone_price_model.calculation_type):2===(null==o.pricing?null:o.pricing.calculation_type)),p.xp6(1),p.Q6J("ngIf",3!==(null==o.pricing?null:o.pricing.calculation_method)),p.xp6(1),p.Q6J("ngIf",3===(null==o.pricing?null:o.pricing.calculation_method))}}function ne(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"span",60),p.NdJ("click",function(){return p.CHM(i),p.oxw(3).openAddPriceCalculationDialog()}),p._UZ(1,"i",61),p.qZA()}}function ae(e,t){1&e&&(p.TgZ(0,"span",62),p._uU(1,"Starting From"),p.qZA())}function re(e,t){if(1&e&&(p.TgZ(0,"h3",56),p._uU(1," Fare "),p.TgZ(2,"span",57),p._uU(3),p.ALo(4,"roundFraction"),p.qZA(),p.YNc(5,ne,2,0,"span",58),p.YNc(6,ae,2,0,"span",59),p.qZA()),2&e){var i=p.oxw(2);p.xp6(3),p.AsE("",null==i.currentCompanyDetail?null:i.currentCompanyDetail.currency_symbol," ",p.lcZ(4,4,i.vehicleTypeForm.value.total_amount),""),p.xp6(2),p.Q6J("ngIf",!(null!=i.vehicleTypeForm&&null!=i.vehicleTypeForm.value&&i.vehicleTypeForm.value.startingFrom)),p.xp6(1),p.Q6J("ngIf",null==i.vehicleTypeForm||null==i.vehicleTypeForm.value?null:i.vehicleTypeForm.value.startingFrom)}}function le(e,t){1&e&&(p.TgZ(0,"h3",63),p._uU(1,"Taxi Meter"),p.qZA())}var ue=function(e,t){return{background:e,color:t}};function ce(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"button",64),p.NdJ("click",function(){return p.CHM(i),p.oxw(2).showLoginSingUpPage({button_id:1,button_name:"Book Ride"})}),p._uU(1,"Book Ride"),p.qZA()}if(2&e){var o=p.oxw(2);p.Akn(p.WLB(2,ue,(null==o.themeCodeData?null:o.themeCodeData.user_primary_color)+"!important",null==o.themeCodeData?null:o.themeCodeData.user_secondary_color))}}function se(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"button",64),p.NdJ("click",function(){return p.CHM(i),p.oxw(2).bookRide()}),p._uU(1,"Book Ride "),p.qZA()}if(2&e){var o=p.oxw(2);p.Akn(p.WLB(2,ue,(null==o.themeCodeData?null:o.themeCodeData.user_primary_color)+"!important",null==o.themeCodeData?null:o.themeCodeData.user_secondary_color))}}function pe(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"button",64),p.NdJ("click",function(){return p.CHM(i),p.oxw(2).openPaymentGateway(!0)}),p._uU(1,"Book Ride "),p.qZA()}if(2&e){var o=p.oxw(2);p.Akn(p.WLB(2,ue,(null==o.themeCodeData?null:o.themeCodeData.user_primary_color)+"!important",null==o.themeCodeData?null:o.themeCodeData.user_secondary_color))}}function de(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"form",4),p.TgZ(1,"div",5),p.TgZ(2,"h1",6),p.TgZ(3,"a",7),p.NdJ("click",function(){return p.CHM(i),p.oxw().goBack(1)}),p.TgZ(4,"i",8),p._uU(5,"\xa0"),p.qZA(),p.qZA(),p._uU(6," Select Vehicle Type "),p.qZA(),p.TgZ(7,"div",9),p.TgZ(8,"div",10),p.TgZ(9,"div",11),p.TgZ(10,"p",12),p.TgZ(11,"small"),p._UZ(12,"i",13),p.qZA(),p._uU(13),p.qZA(),p.YNc(14,X,4,1,"p",14),p.TgZ(15,"p",15),p.TgZ(16,"small"),p._UZ(17,"i",16),p.qZA(),p._uU(18),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.TgZ(19,"div",17),p.TgZ(20,"div",18),p.TgZ(21,"div",19),p.TgZ(22,"span",20),p._UZ(23,"i",21),p.qZA(),p._UZ(24,"ng-select",22),p.qZA(),p.qZA(),p.TgZ(25,"div",18),p.TgZ(26,"div",19),p.TgZ(27,"span",20),p._UZ(28,"i",23),p.qZA(),p.TgZ(29,"ng-select",24),p.NdJ("change",function(){return p.CHM(i),p.oxw().extraPasse
1ngerLuggagFilter()}),p.qZA(),p.qZA(),p.qZA(),p.YNc(30,K,2,2,"div",25),p.qZA(),p.qZA(),p.TgZ(31,"div",26),p.TgZ(32,"div",27),p.YNc(33,oe,30,11,"label",28),p.qZA(),p.qZA(),p.TgZ(34,"div",29),p.TgZ(35,"div",30),p.YNc(36,re,7,6,"h3",31),p.YNc(37,le,2,0,"h3",32),p.YNc(38,ce,2,5,"button",33),p.YNc(39,se,2,5,"button",33),p.YNc(40,pe,2,5,"button",33),p.qZA(),p.qZA(),p.qZA()}if(2&e){var o=p.oxw();p.Q6J("formGroup",o.vehicleTypeForm),p.xp6(13),p.hij(" ",null==o.pickupDropOffForm||null==o.pickupDropOffForm.value?null:o.pickupDropOffForm.value.pickup_location," "),p.xp6(1),p.Q6J("ngForOf",null==o.pickupDropOffForm||null==o.pickupDropOffForm.controls?null:o.pickupDropOffForm.controls.checkpoints.controls),p.xp6(4),p.hij(" ",null==o.pickupDropOffForm||null==o.pickupDropOffForm.value?null:o.pickupDropOffForm.value.destination_location," "),p.xp6(6),p.Q6J("items",o.passengerFilter)("formControl",o.vehicleTypeForm.controls.no_of_passenger),p.xp6(5),p.Q6J("items",o.luggageArray)("formControl",o.vehicleTypeForm.controls.trip_luggage),p.xp6(1),p.Q6J("ngIf",11!=(null==o.currentUserDetail?null:o.currentUserDetail.user_type)&&o.paymentModeArray.length>1),p.xp6(3),p.Q6J("ngForOf",o.filterVehicleArray),p.xp6(3),p.Q6J("ngIf",3!==(null==o.selectedVehicleObj||null==o.selectedVehicleObj.pricing?null:o.selectedVehicleObj.pricing.calculation_method)),p.xp6(1),p.Q6J("ngIf",3===(null==o.selectedVehicleObj||null==o.selectedVehicleObj.pricing?null:o.selectedVehicleObj.pricing.calculation_method)),p.xp6(1),p.Q6J("ngIf",!o.currentUserDetail),p.xp6(1),p.Q6J("ngIf",o.currentUserDetail&&1==o.vehicleTypeForm.controls.payment_mode.value),p.xp6(1),p.Q6J("ngIf",o.currentUserDetail&&2==o.vehicleTypeForm.controls.payment_mode.value)}}function he(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"app-ride-sing-up",65),p.NdJ("showLogin",function(e){return p.CHM(i),p.oxw().showLoginSingUpPage(e)}),p.qZA()}if(2&e){var o=p.oxw();p.Q6J("signUpObject",o.selectedButtonSingAUpLogin)}}function fe(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"app-ride-login",66),p.NdJ("callBackObject",function(e){return p.CHM(i),p.oxw().showLoginSingUpPage(e)}),p.qZA()}}function ge(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"app-payment-gatway-list",67),p.NdJ("paymentSucsessBook",function(e){return p.CHM(i),p.oxw().afterPaymentSucsess(e)})("closePaymentMethod",function(e){return p.CHM(i),p.oxw().openPaymentGateway(e)}),p.qZA()}if(2&e){var o=p.oxw();p.Q6J("FinalFare",(null==o.selectedVehicleObj?null:o.selectedVehicleObj.final_fare.amount)+(null==o.selectedVehicleObj?null:o.selectedVehicleObj.final_fare.tax_amount))}}var ve=function(){var t=function(){function t(e,i,o){a(this,t),this.fb=e,this.authService=i,this.taxiBookingService=o,this.goBackEvent=new p.vpe,this.openFareBreackDwon=new p.vpe,this.goNextPage=new p.vpe,this.submitVehicleTypeForm=new p.vpe,this.callBookRide=new p.vpe,this.currentCompanyDetail=null,this.currentUserDetail=null,this.luggageArray=[],this.passengerFilter=[],this.filterVehicleArray=[],this.paymentModeArray=D._5,this.vehicleTypeArray=[],this.selectedVehicleObj=null,this.copyOfvehicleArray=[],this.themeCodeData=null,this.showPaymetScreen=null,this.selectedButtonSingAUpLogin=null}return l(t,[{key:"ngOnInit",value:function(){var e=this;this.authService.themeCode.subscribe(function(t){e.themeCodeData=t}),this.createForm(),this.getCurrentCompanyDetail()}},{key:"ngOnChanges",value:function(e){this.getCurrentUseDetail()}},{key:"getCurrentUseDetail",value:function(){var e=this;this.authService.currentUser.subscribe(function(t){e.currentUserDetail=t})}},{key:"getCurrentCompanyDetail",value:function(){var e=this;this.authService.currentCompany.subscribe(function(t){e.currentCompanyDetail=t,e.getVehicleType()})}},{key:"goBack",value:function(e){this.goBackEvent.emit(e),this.goBackEvent.emit(e)}},{key:"createForm",value:function(){this.vehicleTypeForm=this.fb.group({additional_discount:[null,d.kI.compose([d.kI.max(100),d.kI.min(0)])],extra_charge:[null,d.kI.min(0)],no_of_passenger:[1],trip_luggage:[0],payment_mode:[1,d.kI.compose([d.kI.required])],payment_type:[2,d.kI.compose([d.kI.required])],autoFixEnable:[!1],zone_price_applied:["N"],zone_price_id:[null],startingFrom:[!1],total_amount:[0],total_tax_amount:[0],selectedVehicleObj:[null],otherDetails:[null]})}},{key:"getVehicleType",value:function(){var e,t=this;this.taxiBookingService.getVehicleType(null===(e=this.currentCompanyDetail)||void 0===e?void 0:e.company_id).subscribe(function(e){var i;t.vehicleTypeArray=e.status?null===(i=e.data)||void 0===i?void 0:i.list:[]})}},{key:"getPaymentModeConfig",value:function(){var e,t=this;this.taxiBookingService.conFigDetails({key:"tsc_041",company_id:null===(e=this.currentCompanyDetail)||void 0===e?void 0:e.company_id,config_type:2}).subscribe(function(e){if(e.data){var i=e.data.s_key_value.split(",");t.setpaymentMode(i)}})}},{key:"setpaymentMode",value:function(e){var t=this;this.paymentModeArray=[],e.forEach(function(i){1==i?t.paymentModeArray.push(D.p$):2==i&&t.paymentModeArray.push(D.I0),1==t.paymentModeArray.length&&t.vehicleTypeForm.controls.payment_mode.setValue(parseInt(e[0])),t.vehicleTypeForm.controls.payment_mode.updateValueAndValidity()})}},{key:"getVehicleTypeList",value:function(){var e,t,i,o,n,a,r,l,u,c,s,p,d,h,f,g=this,v=this.getDriverVehicleTypeIds(),m=this.getWayPoints(),_={user_id:null===(e=this.currentUserDetail)||void 0===e?void 0:e.id,pickup_location:this.pickupDropOffForm.get("pickup_location").value,dropoff_location:this.pickupDropOffForm.get("destination_location").value,dropoff_latitude:null===(t=this.pickupDropOffForm.get("destination_latitude").value)||void 0===t?void 0:t.toFixed(6),dropoff_longitude:null===(i=this.pickupDropOffForm.get("destination_longitude").value)||void 0===i?void 0:i.toFixed(6),corporate_id:null===(n=null===(o=this.rideTypeForm)||void 0===o?void 0:o.value)||void 0===n?void 0:n.corporate_id,no_of_passenger:1,trip_luggage:0,from_zone_id:null===(r=null===(a=this.pickupDropOffForm.value)||void 0===a?void 0:a.pickup_zone_obj)||void 0===r?void 0:r.zone_id,to_zone_id:null===(u=null===(l=this.pickupDropOffForm.value)||void 0===l?void 0:l.drop_off_zone_obj)||void 0===u?void 0:u.zone_id,vehicle_type_ids:v};2==(null===(s=null===(c=this.rideTypeForm)||void 0===c?void 0:c.value)||void 0===s?void 0:s.ride_type)&&(_.request_time=new Date(null===(d=null===(p=this.rideTypeForm)||void 0===p?void 0:p.value)||void 0===d?void 0:d.request_time).getTime());try{_.pickup_latitude=null===(h=this.pickupDropOffForm.get("pickup_latitude").value)||void 0===h?void 0:h.toFixed(6)}catch(y){_.pickup_latitude=this.pickupDropOffForm.get("pickup_latitude").value}try{_.pickup_longitude=null===(f=this.pickupDropOffForm.get("pickup_longitude").value)||void 0===f?void 0:f.toFixed(6)}catch(y){_.pickup_longitude=this.pickupDropOffForm.get("pickup_longitude").value}m.length>0&&(_.way_points=JSON.stringify(m)),this.pickupDropOffForm.get("fix_destination").value&&(_.to_zone_id=-1),this.taxiBookingService.getVehicleList(_).subscribe(function(e){var t,i;if(null==e?void 0:e.status){var o=[],n=0,a=0;(null===(t=e.data)||void 0===t?void 0:t.cab_type_list.length)>0?(o=null===(i=e.data)||void 0===i?void 0:i.cab_type_list.filter(function(e){return e.hasOwnProperty("pricing")}),g.vehicleTypeForm.patchValue({otherDetails:{surge_price:e.data.surge_price,ride_time:e.data.ride_time,ride_distance:e.data.ride_distance,tax_list:e.data.tax_list}}),g.vehicleTypeArray.length>0&&((o=o.map(function(e){a<e.max_capacity&&(a=e.max_capacity),n<e.max_luggage_c
1apacity&&(n=e.max_luggage_capacity);var t=g.vehicleTypeArray.find(function(t){return t.vehicle_type_id==e.id});if(t)return Object.assign(Object.assign({},e),{title:t.vehicle_type_title,vehicle_image:t.vehicle_type_image,max_luggage_capacity:t.max_luggage_capacity,vehicle_type_priority:t.vehicle_type_priority})})).sort(function(e,t){return parseInt(e.vehicle_type_priority)-parseInt(t.vehicle_type_priority)}),g.selectVehicleObject(o[0]))):o=[],g.copyOfvehicleArray=o,g.filterVehicleArray=o,g.getMaxLuggagePassengerCapacity(n,a)}})}},{key:"extraPassengerLuggagFilter",value:function(){var e=this;this.filterVehicleArray=this.copyOfvehicleArray.filter(function(t){return t.capacity>=e.vehicleTypeForm.value.no_of_passenger&&t.max_luggage_capacity>=e.vehicleTypeForm.value.trip_luggage}),this.selectedVehicleObj=this.filterVehicleArray[0],this.selectVehicleObject(this.selectedVehicleObj)}},{key:"selectVehicleObject",value:function(e){var t,i,o,n,a,r,l,u,c,s,p,d,h,f,g,v;e&&(this.selectedVehicleObj=e,("Y"==(null===(i=null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.pricing)||void 0===i?void 0:i.zone_price_applied)?2==(null===(a=null===(n=null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing)||void 0===n?void 0:n.zone_price_model)||void 0===a?void 0:a.calculation_type):2===(null===(r=this.selectedVehicleObj.pricing)||void 0===r?void 0:r.calculation_type))?this.vehicleTypeForm.patchValue({startingFrom:!0}):this.vehicleTypeForm.patchValue({startingFrom:!1}),this.vehicleTypeForm.patchValue({zone_price_id:null===(c=null===(u=null===(l=this.selectedVehicleObj)||void 0===l?void 0:l.pricing)||void 0===u?void 0:u.zone_price_model)||void 0===c?void 0:c.zone_price_id,zone_price_applied:null===(p=null===(s=this.selectedVehicleObj)||void 0===s?void 0:s.pricing)||void 0===p?void 0:p.zone_price_applied,total_amount:(null===(d=this.selectedVehicleObj)||void 0===d?void 0:d.final_fare.amount)+(null===(h=this.selectedVehicleObj)||void 0===h?void 0:h.final_fare.tax_amount),total_tax_amount:null===(f=this.selectedVehicleObj)||void 0===f?void 0:f.final_fare.tax_amount,selectedVehicleObj:e}),3!==(null===(v=null===(g=this.selectedVehicleObj)||void 0===g?void 0:g.pricing)||void 0===v?void 0:v.calculation_method)&&(this.getExtraPassengerCharge(),this.getExtraLuggageCharge()))}},{key:"getWayPoints",value:function(){for(var e,t,i=[],o=this.pickupDropOffForm.get("checkpoints").controls,n=0;n<o.length;n++)o[n].get("value"),i.push({address:o[n].get("value").value,latitude:null===(e=o[n].get("lat").value)||void 0===e?void 0:e.toFixed(6),longitude:null===(t=o[n].get("lng").value)||void 0===t?void 0:t.toFixed(6)});return i}},{key:"getMaxLuggagePassengerCapacity",value:function(e,t){if(e>0){this.luggageArray=[];for(var i=0;i<=e;i++)this.luggageArray.push({id:i,name:"".concat(i)})}if(t>1){this.passengerFilter=[];for(var o=1;o<=t;o++)this.passengerFilter.push({id:o,name:"".concat(o)})}}},{key:"autoFix",value:function(e){this.vehicleTypeForm.patchValue({autoFixEnable:e})}},{key:"getExtraPassengerCharge",value:function(){var e,t,i,o,n,a,r;if(this.vehicleTypeForm.patchValue({total_amount:(null===(e=this.selectedVehicleObj)||void 0===e?void 0:e.final_fare.amount)+(null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare.tax_amount)}),(null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.capacity)<this.vehicleTypeForm.value.no_of_passenger){var l=(null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing.extra_charge_per_passenger)*(this.vehicleTypeForm.value.no_of_passenger-(null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.capacity));this.vehicleTypeForm.patchValue({total_amount:(null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.final_fare.amount)+(null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.final_fare.tax_amount)+l})}}},{key:"getExtraLuggageCharge",value:function(){var e,t,i,o,n,a,r;if(this.vehicleTypeForm.patchValue({total_amount:(null===(e=this.selectedVehicleObj)||void 0===e?void 0:e.final_fare.amount)+(null===(t=this.selectedVehicleObj)||void 0===t?void 0:t.final_fare.tax_amount)}),(null===(i=this.selectedVehicleObj)||void 0===i?void 0:i.vehicle_luggage_c
1apacity)<this.vehicleTypeForm.value.trip_luggage){var l=(null===(o=this.selectedVehicleObj)||void 0===o?void 0:o.pricing.extra_charge_per_luggage)*(this.vehicleTypeForm.value.trip_luggage-(null===(n=this.selectedVehicleObj)||void 0===n?void 0:n.vehicle_luggage_capacity));this.vehicleTypeForm.patchValue({total_amount:(null===(a=this.selectedVehicleObj)||void 0===a?void 0:a.final_fare.amount)+(null===(r=this.selectedVehicleObj)||void 0===r?void 0:r.final_fare.tax_amount)+l})}}},{key:"secondStepSubmitForm",value:function(){this.vehicleTypeForm.valid&&(this.goNextPage.emit(!0),this.submitVehicleTypeForm.emit(this.vehicleTypeForm))}},{key:"bookRide",value:function(){this.vehicleTypeForm.valid&&(this.submitVehicleTypeForm.emit(this.vehicleTypeForm),this.callBookRide.emit(!0))}},{key:"openAddPriceCalculationDialog",value:function(){this.openFareBreackDwon.emit(this.vehicleTypeForm)}},{key:"getDriverVehicleTypeIds",value:function(){var t,i,o,n,a,r,l;if((null===(i=null===(t=this.rideTypeForm)||void 0===t?void 0:t.value)||void 0===i?void 0:i.autoDispatch)||!(null===(n=null===(o=this.rideTypeForm)||void 0===o?void 0:o.value)||void 0===n?void 0:n.driver))return null;this.taxiBookingService.getDriverserviceType(null===(r=null===(a=this.rideTypeForm)||void 0===a?void 0:a.value)||void 0===r?void 0:r.driver).subscribe((l=(0,Y.Z)(e().mark(function t(i){var o;return e().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!i.success&&!i.status){e.next=3;break}return o="",e.abrupt("return",(i.data.forEach(function(e){(null==e?void 0:e.vehicle_type_ids)&&(o+="".concat(null==e?void 0:e.vehicle_type_ids))}),o));case 3:case"end":return e.stop()}},t)})),function(e){return l.apply(this,arguments)}))}},{key:"openPaymentGateway",value:function(e){this.showPaymetScreen=e}},{key:"afterPaymentSucsess",value:function(e){e&&(this.vehicleTypeForm.patchValue({payment_type:1}),this.bookRide())}},{key:"showLoginSingUpPage",value:function(e){this.selectedButtonSingAUpLogin=e,(null==e?void 0:e.bookRide)&&1==this.vehicleTypeForm.controls.payment_mode.value&&this.bookRide()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(p.Y36(d.qu),p.Y36(h.e),p.Y36(f.d))},t.\u0275cmp=p.Xpm({type:t,selectors:[["app-select-vehicle-type"]],inputs:{pickupDropOffForm:"pickupDropOffForm",rideTypeForm:"rideTypeForm"},outputs:{goBackEvent:"goBackEvent",openFareBreackDwon:"openFareBreackDwon",goNextPage:"goNextPage",submitVehicleTypeForm:"submitVehicleTypeForm",callBookRide:"callBookRide"},features:[p.TTD],decls:4,vars:4,consts:[["autocomplete","off","role","form",3,"formGroup",4,"ngIf"],[3,"signUpObject","showLogin",4,"ngIf"],[3,"callBackObject",4,"ngIf"],[3,"FinalFare","paymentSucsessBook","closePaymentMethod",4,"ngIf"],["autocomplete","off","role","form",3,"formGroup"],[1,"booking-form-header","border-bottom"],[1,"heading","h3","font-weight-700","text-dark","mb-3"],["routerLinkActive","router-link-active",3,"click"],[1,"fa","fa-angle-left"],[1,"table"],[1,"ridebox"],[1,"pickdrop"],[1,"address","mb-2"],[1,"fa","fa-map-marker","text-white","fa-fw","fa-lg","pickup"],["class","address mb-2",4,"ngFor","ngForOf"],[1,"address"],[1,"fa","fa-map-marker","text-white","fa-fw","fa-lg","dropoff"],[1,"form-row"],[1,"form-group","col"],[1,"input-group"],[1,"input-group-addon"],[1,"fa","fa-user"],["placeholder","--","bindLabel","name","bindValue","id",1,"flex-fill",3,"items","formControl"],[1,"fa","fa-suitcase"],["placeholder","--","bindLabel","name","bindValue","id",1,"flex-fill",3,"items","formControl","change"],["class","form-group col",4,"ngIf"],[1,"booking-form-body"],[1,"vehicle-type-list"],["class","card control control-outline control-primary control--radio routebox border service-type",4,"ngFor","ngForOf"],[1,"booking-form-action"],[1,"d-flex","align-items-center"],["class","font-weight-500 m-0 flex",4,"ngIf"],["class","font-medium m-0 flex",4,"ngIf"],["type","button","class","btn btn-primary ml-2 text-uppercase",3,"style","click",4,"ngIf"],[1,"fa","fa-map-marker","text-white","fa-fw","fa-lg","checkpoint"],["placeholder","Payment Mode","bindLabel","name","bindValue","id",3,"items","formControl","change"],[1,"card","control","control-outline","control-primary","control--radio","routebox","border","service-type"],["type","radio","name","vehicle-type",3,"checked","value","click"],[1,"card-content"],[1,"card-body","d-flex","align-items-center"],[1,"images","mr-4"],["alt","vehicle","width","60px","height","60px",3,"src"],[1,"description","ms-3","flex-fill"],[1,"heading","font-weight-600"],[1,"features"],[1,"list-unstyled","mb-0","d-flex"],[1,"sx-icon-checkmark","sx-res-offerlist-included","mt-1","mr-3"],[1,"mr-2","fa","fa-user","fa-fw"],[1,"sx-icon-checkmark","sx-res-offerlist-included","mt-1"],[1,"mr-2","fa","fa-suitcase","fa-fw"],[1,"price-section"],[1,"price-section__left","text-right"],["class","text-muted font-size-12",4,"ngIf"],["class","price-section-dayprice",4,"ngIf"],[1,"text-muted","font-size-12"],[1,"price-section-dayprice"],[1,"font-weight-500","m-0","flex"],["id","fare",1,"text-primary","font-weight-600"],["data-toggle","modal","title","Price Calculation","class","ml-2","style","cursor: pointer;",3,"click",4,"ngIf"],["class","d-block font-size-12 text-muted",4,"ngIf"],["data-toggle","modal","title","Price Calculation",1,"ml-2",2,"cursor","pointer",3,"click"],[1,"fa","fa-info-circle"],[1,"d-block","font-size-12","text-muted"],[1,"font-medium","m-0","flex"],["type","button",1,"btn","btn-primary","ml-2","text-uppercase",3,"click"],[3,"signUpObject","showLogin"],[3,"callBackObject"],[3,"FinalFare","paymentSucsessBook","closePaymentMethod"]
1],template:function(e,t){1&e&&(p.YNc(0,de,41,15,"form",0),p.YNc(1,he,1,1,"app-ride-sing-up",1),p.YNc(2,fe,1,0,"app-ride-login",2),p.YNc(3,ge,1,1,"app-payment-gatway-list",3)),2&e&&(p.Q6J("ngIf",!(null!=t.selectedButtonSingAUpLogin&&t.selectedButtonSingAUpLogin.button_id||t.showPaymetScreen)),p.xp6(1),p.Q6J("ngIf",2===(null==t.selectedButtonSingAUpLogin?null:t.selectedButtonSingAUpLogin.button_id)),p.xp6(1),p.Q6J("ngIf",1===(null==t.selectedButtonSingAUpLogin?null:t.selectedButtonSingAUpLogin.button_id)),p.xp6(1),p.Q6J("ngIf",t.showPaymetScreen))},directives:[u.O5,d._Y,d.JL,d.sg,c.Od,u.sg,v.w9,d.JJ,d.oH,z.g,H.c,G.X],pipes:[W.SC],styles:[""]}),t}(),me=r(87387),_e=r(29481),ye=r(26433),ke=r(77390),be=r(24766),Fe=function(){var e=function(){function e(t,i){var o=this;a(this,e),this.auth=t,this.taxiBookingService=i,this.content="Successfully Booked",this.ViewChange=new p.vpe,this.epicScriptLoad=!1,this.trip_id=null,this.auth.langaugeSubject.subscribe(function(e){e&&(o.currentLanguage=e[0].labels)})}return l(e,[{key:"ngOnDestroy",value:function(){this.epicScriptLoad&&this.auth.removeEpicScript()}},{key:"ngOnInit",value:function(){var e=this;this.BOOKING_SERVICE_OBSERVABLE=this.taxiBookingService.tripNo.subscribe(function(t){e.trip_id=t.trip_number,e.content=t.content;var i=window.location.hostname;be.N.production&&i.includes("goepic")&&!e.epicScriptLoad&&e.trip_id&&(e.epicScriptLoad=!0,e.auth.addEpicScript(e.trip_id,"MXN"))})}},{key:"back",value:function(){this.ViewChange.emit(!0)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(p.Y36(h.e),p.Y36(f.d))},e.\u0275cmp=p.Xpm({type:e,selectors:[["app-taxi-booking-thankyou"]],inputs:{addedRideResponse:"addedRideResponse"},outputs:{ViewChange:"ViewChange"},decls:11,vars:4,consts:[[1,"booking-form-center","d-flex","align-items-center"],[1,"booking-form-inner",2,"height","auto"],[1,"booking-form-body","text-center","py-5"],[1,"icon","mb-4"],[1,"la","la-check-circle","la-5x","text-success"],[1,"heading","h3","font-weight-700","text-dark"],[1,"font-size-18"],["type","button",1,"btn","btn-primary","btn-block","btn-lg","mt-3",3,"click"]],template:function(e,t){1&e&&(p.TgZ(0,"div",0),p.TgZ(1,"div",1),p.TgZ(2,"div",2),p.TgZ(3,"div",3),p._UZ(4,"i",4),p.qZA(),p.TgZ(5,"h1",5),p._uU(6),p.qZA(),p.TgZ(7,"p",6),p._uU(8),p.qZA(),p.TgZ(9,"button",7),p.NdJ("click",function(){return t.back()}),p._uU(10),p.qZA(),p.qZA(),p.qZA(),p.qZA()),2&e&&(p.xp6(6),p.Oqu(t.content),p.xp6(2),p.AsE("",null==t.currentLanguage?null:t.currentLanguage.trip_id," is #",null==t.addedRideResponse?null:t.addedRideResponse.trip_number,""),p.xp6(2),p.hij(" ",null==t.currentLanguage?null:t.currentLanguage.book_another_ride," "))},styles:[""]}),e}();function xe(e,t){if(1&e&&(p.TgZ(0,"tr"),p.TgZ(1,"td"),p._uU(2,"Out Of Service Area Charge"),p.qZA(),p.TgZ(3,"td",14),p._uU(4),p.ALo(5,"roundFraction"),p.qZA(),p.qZA()),2&e){var i=p.oxw();p.xp6(4),p.AsE(" ",null==i.currentCompanyDetail?null:i.currentCompanyDetail.company_currency," ",p.lcZ(5,2,null==i.dialog_data?null:i.dialog_data.final_fare.out_of_service_area_charges)," ")}}function Ze(e,t){if(1&e&&(p.ynx(0),p.TgZ(1,"tr"),p.TgZ(2,"td",19),p._uU(3),p.qZA(),p.TgZ(4,"td",14),p._uU(5),p.ALo(6,"roundFraction"),p.qZA(),p.qZA(),p.BQk()),2&e){var i=t.$implicit,o=p.oxw();p.xp6(3),p.hij(" ",null==i?null:i.tax_name," "),p.xp6(2),p.AsE(" ",null==o.currentCompanyDetail?null:o.currentCompanyDetail.company_currency,"",p.lcZ(6,3,null==i?null:i.value)," ")}}var Te=function(){var e=function(){function e(t){a(this,e),this.authService=t,this.otherDetails=null,this.dialog_data=null,this.currentCompanyDetail=null}return l(e,[{key:"ngOnInit",value:function(){this.getCurrentCompanyDetail()}},{key:"ngOnChanges",value:function(e){this.openFixDestination(),this.getPricingData()}},{key:"getPricingData",value:function(){var e,t,i;this.otherDetails=null===(t=null===(e=this.vehicleTypeForm)||void 0===e?void 0:e.value)||void 0===t?void 0:t.otherDetails,this.dialog_data=null===(i=this.vehicleTypeForm)||void 0===i?void 0:i.value.selectedVehicleObj}},{key:"getCurrentCompanyDetail",value:function(){var e=this;this.authService.currentCompany.subscribe(function(t){e.currentCompanyDetail
1=t})}},{key:"openFixDestination",value:function(){$("#priceCalculation").modal("show")}}]),e}();return e.\u0275fac=function(t){return new(t||e)(p.Y36(h.e))},e.\u0275cmp=p.Xpm({type:e,selectors:[["app-fare-breack-dwon"]],inputs:{vehicleTypeForm:"vehicleTypeForm"},features:[p.TTD],decls:79,vars:35,consts:[["id","priceCalculation","role","dialog","aria-labelledby","priceCalculationLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog"],["novalidate","","autocomplete","off",1,"ng-untouched","ng-pristine","ng-valid"],[1,"modal-content"],[1,"modal-header"],["id","priceCalculationLabel",1,"modal-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close"],["aria-hidden","true"],[1,"modal-body","flex"],[1,"table","remove-padding"],["colspan","2",1,"no-border"],[1,"font-weight-normal"],["colspan","3"],[1,"mt-2","font-weight-600","mb-0"],["colspan","2",1,"text-right","font-weight-normal"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"m-0"],["colspan","2",1,"text-right"],[1,"text-left","font-weight-normal"]],template:function(e,t){1&e&&(p.TgZ(0,"div",0),p.TgZ(1,"div",1),p.TgZ(2,"form",2),p.TgZ(3,"div",3),p.TgZ(4,"div",4),p.TgZ(5,"h4",5),p._uU(6,"Price Calculation "),p.qZA(),p.TgZ(7,"button",6),p.TgZ(8,"span",7),p._uU(9,"\xd7"),p.qZA(),p.qZA(),p.qZA(),p.TgZ(10,"div",8),p.TgZ(11,"table",9),p.TgZ(12,"thead"),p.TgZ(13,"tr"),p.TgZ(14,"td",10),p._uU(15," Distance : "),p.TgZ(16,"span",11),p._uU(17),p.ALo(18,"number"),p.qZA(),p.qZA(),p.TgZ(19,"td",10),p._uU(20," Time : "),p.TgZ(21,"span",11),p._uU(22),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.TgZ(23,"tbody"),p.TgZ(24,"tr"),p.TgZ(25,"td",12),p.TgZ(26,"h5",13),p._uU(27,"Receipt"),p.qZA(),p.qZA(),p.qZA(),p.TgZ(28,"tr"),p.TgZ(29,"td"),p._uU(30,"Minimum fare "),p.qZA(),p.TgZ(31,"td",14),p._uU(32),p.ALo(33,"roundFraction"),p.qZA(),p.qZA(),p.TgZ(34,"tr"),p.TgZ(35,"td"),p._uU(36,"Base fare "),p.qZA(),p.TgZ(37,"td",14),p._uU(38),p.ALo(39,"roundFraction"),p.qZA(),p.qZA(),p.TgZ(40,"tr"),p.TgZ(41,"td"),p._uU(42,"Distance fare"),p.qZA(),p.TgZ(43,"td",14),p._uU(44),p.ALo(45,"roundFraction"),p.qZA(),p.qZA(),p.TgZ(46,"tr"),p.TgZ(47,"td"),p._uU(48,"Time fare"),p.qZA(),p.TgZ(49,"td",14),p._uU(50),p.ALo(51,"roundFraction"),p.qZA(),p.qZA(),p.YNc(52,xe,6,4,"tr",15),p.TgZ(53,"tr"),p.TgZ(54,"td"),p.TgZ(55,"strong"),p._uU(56,"Trip Fare "),p.qZA(),p.qZA(),p.TgZ(57,"td",14),p.TgZ(58,"b"),p._uU(59),p.ALo(60,"roundFraction"),p.qZA(),p.qZA(),p.qZA(),p.TgZ(61,"tr"),p.TgZ(62,"td"),p._uU(63,"+ Tax"),p.qZA(),p.TgZ(64,"td",14),p._uU(65),p.ALo(66,"roundFraction"),p.qZA(),p.qZA(),p.YNc(67,Ze,7,5,"ng-container",16),p.qZA(),p.TgZ(68,"tfoot"),p.TgZ(69,"tr"),p.TgZ(70,"td"),p.TgZ(71,"h4",17),p.TgZ(72,"strong"),p._uU(73,"Final fare"),p.qZA(),p.qZA(),p.qZA(),p.TgZ(74,"td",18),p.TgZ(75,"h4",17),p.TgZ(76,"strong"),p._uU(77),p.ALo(78,"roundFraction"),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA()),2&e&&(p.xp6(17),p.hij(" ",p.xi3(18,18,t.otherDetails.ride_distance,"1.1-1")," KM"),p.xp6(5),p.hij(" ",t.otherDetails.ride_time," Min"),p.xp6(10),p.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.company_currency," ",p.lcZ(33,21,null==t.dialog_data||null==t.dialog_data.pricing?null:t.dialog_data.pricing.minimum_fare)," "),p.xp6(6),p.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.company_currency," ",p.lcZ(39,23,null==t.dialog_data||null==t.dialog_data.pricing?null:t.dialog_data.pricing.base_fare)," "),p.xp6(6),p.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.company_currency," ",p.lcZ(45,25,null==t.dialog_data?null:t.dialog_data.final_fare.distance_fare)," "),p.xp6(6),p.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.company_currency," ",p.lcZ(51,27,null==t.dialog_data?null:t.dialog_data.final_fare.time_fare)," "),p.xp6(2),p.Q6J("ngIf",null==t.dialog_data?null:t.dialog_data.final_fare.out_of_service_area_charges),p.xp6(7),p.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.company_currency," ",p.lcZ(60,29,null==t.dialog_data||null==t.dialog_data.final_fare?null:t.dialog_data.final_fare.amount)," "),p.xp6(6),p.AsE(" ",null==t.currentCompanyDetail?null:t.currentCompanyDetail.company_currency," ",p.lcZ(66,31,t.dialog_data.final_fare.tax_amount)," "),p.xp6(2),p.Q6J("ngForOf",null==t.dialog_data?null:t.dialog_data.tax_list),p.xp6(10),p.AsE("",null==t.currentCompanyDetail?null:t.currentCompanyDetail.company_currency," ",p.lcZ(78,33,null==t.vehicleTypeForm?null:t.vehicleTypeForm.value.total_amount)," "))},directives:[d._Y,d.JL,d.F,u.O5,u.sg],pipes:[u.JJ,W.SC],styles:[""]}),e}();function De(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"label",13),p.TgZ(1,"input",14),p.NdJ("click",function(){var e=p.CHM(i).$implicit;return p.oxw(2).fixZone(e)}),p.qZA(),p.TgZ(2,"div",15),p.TgZ(3,"div",16),p.TgZ(4,"div",17),p.TgZ(5,"h4",18),p._uU(6),p.qZA(),p.TgZ(7,"div",19),p.TgZ(8,"div",20),p.TgZ(9,"span",21),p._uU(10),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA()}if(2&e){var o=t.$implicit,n=t.first;p.xp6(1),p.Q6J("checked",n)("value",o),p.xp6(5),p.Oqu(o.from_zone_title),p.xp6(4),p.Oqu(o.dropoff_location)}}function Ae(e,t){if(1&e&&(p.TgZ(0,"div",11),p.YNc(1,De,11,4,"label",12),p.qZA()),2&e){var i=p.oxw();p.xp6(1),p.Q6J("ngForOf",i.zonePriceData)}}var qe=function(){var e=function(){function e(){a(this,e),this.submitFixDestination=new p.vpe,this.selectedFixDestinationObj=null}return l(e,[{key:"ngOnInit",value:function(){}},{key:"ngAfterViewInit",value:function(){}},{key:"ngOnChanges",value:function(e){this.openFixDestination()}},{key:"submitFixDestinationObj",value:function(){this.submitFixDestination.emit(this.selectedFixDestinationObj),$("#fixdestination").modal("hide")}},{key:"closeFixDestinationPopup",value:function(){}},{key:"fixZone",value:function(e){this.selectedFixDestinationObj=e}},{key:"openFixDestination",value:function(){this.selectedFixDestinationObj=this.zonePriceData[0],$("#fixdestination").modal("show")}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=p.Xpm({type:e,selectors:[["app-fix-destination"]],inputs:{zonePriceData:"zonePriceData"},outputs:{submitFixDestination:"submitFixDestination"},features:[p.TTD],decls:14,vars:1,consts:[["id","fixdestination","role","dialog","aria-labelledby","priceCalculationLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog"],["novalidate","","autocomplete","off",1,"ng-untouched","ng-pristine","ng-valid"],[1,"modal-content"],[1,"modal-header"],["id","priceCalculationLabel",1,"modal-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],["class","modal-body flex",4,"ngIf"],[1,"modal-footer","bg-light"],["type","submit",1,"btn","btn-primary",3,"click"],[1,"modal-body","flex"],["class","card control control-outline control-primary control--radio routebox border service-type",4,"ngFor","ngForOf"],[1,"card","control","control-outline","control-primary","control--radio","routebox","border","service-type"],["type","radio","name","vehicle-type",3,"checked","value","click"],[1,"card-content"],[1,"card-body","d-flex","align-items-center"],[1,"description","ms-3","flex-fill"],[1,"heading","font-weight-600"],[1,"price-section","align-self-start"],[1,"price-section__left"],[1,"price-section-dayprice"]],template:function(e,t){1&e&&(p.TgZ(0,"div",0),p.TgZ(1,"div",1),p.TgZ(2,"form",2),p.TgZ(3,"div",3),p.TgZ(4,"div",4),p.TgZ(5,"h4",5),p._uU(6,"Select Destination"),p.qZA(),p.TgZ(7,"button",6),p.NdJ("click",function(){return t.closeFixDestinationPopup()}),p.TgZ(8,"span",7),p._uU(9,"\xd7"),p.qZA(),p.qZA(),p.qZA(),p.YNc(10,Ae,2,1,"div",8),p.TgZ(11,"div",9),p.TgZ(12,"button",10),p.NdJ("click",function(){return t.submitFixDestinationObj()}),p._uU(13," Submit "),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA()),2&e&&(p.xp6(10),p.Q6J("ngIf",t.zonePriceData.length>0))},directives:[d._Y,d.JL,d.F,u.O5,u.sg],styles:[""]}),e}();function we(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"label",13),p.TgZ(1,"input",14),p.NdJ("click",function(){var e=p.CHM(i).$implicit;return p.oxw(2).changeQueuePickup(e)}),p.qZA(),p.TgZ(2,"div",15),p.TgZ(3,"div",16),p.TgZ(4,"div",17),p.TgZ(5,"h4",18),p._uU(6),p.qZA(),p.TgZ(7,"div",19),p.TgZ(8,"div",20),p.TgZ(9,"span",21),p._uU(10),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA()}if(2&e){var o=t.$implicit,n=t.first;p.xp6(1),p.Q6J("checked",n)("value",o),p.xp6(5),p.Oqu(o.title),p.xp6(4),p.Oqu(o.address)}}function Ce(e,t){if(1&e&&(p.TgZ(0,"div",11),p.YNc(1,we,11,4,"label",12),p.qZA()),2&e){var i=p.oxw();p.xp6(1),p.Q6J("ngForOf",i.queuePikupStandList)}}var Oe=function(){var e=function(){function e(){a(this,e),this.submitPickUpstand=new p.vpe,this.selectedPickupStand=null}return l(e,[{key:"ngOnInit",value:function(){}},{key:"ngAfterViewInit",value:function(){}},{key:"ngOnChanges",value:function(e){this.openPickUpStandModel()}},{key:"openPickUpStandModel",value:function(){this.selectedPickupStand=this.queuePikupStandList[0],$("#QueuePikupstand").modal("show")}},{key:"changeQueuePickup",value:function(e){this.selectedPickupStand=e}},{key:"pickUpStandFormSubmit",value:function(){var e,t,i,o={pickup_location:null===(e=this.selectedPickupStand)||void 0===e?void 0:e.address,pickup_latitude:null===(t=this.selectedPickupStand)||void 0===t?void 0:t.latitude,pickup_longitude:null===(i=this.selectedPickupStand)||void 0===i?void 0:i.longitude};this.submitPickUpstand.emit(o),$("#QueuePikupstand").modal("hide")}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=p.Xpm({type:e,selectors:[["app-que-and-pickup-stand"]],inputs:{queuePikupStandList:"queuePikupStandList"},outputs:{submitPickUpstand:"submitPickUpstand"},features:[p.TTD],decls:14,vars:2,consts:[["id","QueuePikupstand","role","dialog","aria-labelledby","priceCalculationLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog"],["novalidate","","autocomplete","off",1,"ng-untouched","ng-pristine","ng-valid"],[1,"modal-content"],[1,"modal-header"],["id","priceCalculationLabel",1,"modal-title"],["type","button","data-dismiss","modal","aria-label","Close",1,"close"],["aria-hidden","true"],["class","modal-body flex",4,"ngIf"],[1,"modal-footer","bg-light"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"modal-body","flex"],["class","card control control-outline control-primary control--radio routebox border service-type",4,"ngFor","ngForOf"],[1,"card","control","control-outline","control-primary","control--radio","routebox","border","service-type"],["type","radio","name","vehicle-type",3,"checked","value","click"],[1,"card-content"],[1,"card-body","d-flex","align-items-center"],[1,"description","ms-3","flex-fill"],[1,"heading","font-weight-600"],[1,"price-section","align-self-start"],[1,"price-section__left"],[1,"price-section-dayprice"]],template:function(e,t){1&e&&(p.TgZ(0,"div",0),p.TgZ(1,"div",1),p.TgZ(2,"form",2),p.TgZ(3,"div",3),p.TgZ(4,"div",4),p.TgZ(5,"h4",5),p._uU(6,"Select Pickup Stand"),p.qZA(),p.TgZ(7,"button",6),p.TgZ(8,"span",7),p._uU(9,"\xd7"),p.qZA(),p.qZA(),p.qZA(),p.YNc(10,Ce,2,1,"div",8),p.TgZ(11,"div",9),p.TgZ(12,"button",10),p.NdJ("click",function(){return t.pickUpStandFormSubmit()}),p._uU(13," Submit "),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA()),2&e&&(p.xp6(10),p.Q6J("ngIf",t.queuePikupStandList.length>0),p.xp6(2),p.Q6J("disabled",!t.selectedPickupStand))},directives:[d._Y,d.JL,d.F,u.O5,u.sg],styles:[""]}),e}(),Pe=["gmap"],Se=["stepper"];function Ue(e,t){1&e&&(p.TgZ(0,"div",25),p._UZ(1,"div",26),p.qZA())}var Le=function(e){return{active:e}};function Ve(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"li",29),p.TgZ(1,"a",30),p.NdJ("click",function(){var e=p.CHM(i).$implicit;return p.oxw(3).changeService(e.id)}),p._uU(2),p.qZA(),p.qZA()}if(2&e){var o=t.$implicit,n=p.oxw(3);p.xp6(1),p.Q6J("ngClass",p.VKq(2,Le,n.selectedService==o.id)),p.xp6(1),p.hij(" ",o.service," ")}}function Ie(e,t){if(1&e&&(p.TgZ(0,"ul",27),p.YNc(1,Ve,3,4,"li",28),p.qZA()),2&e){var i=p.oxw(2);p.xp6(1),p.Q6J("ngForOf",i.routing)}}function Ne(e,t){1&e&&p._UZ(0,"i",31)}function je(e,t){if(1&e){var i=p.EpF();p.ynx(0),p.TgZ(1,"div",10),p.TgZ(2,"div",11),p.YNc(3,Ue,2,0,"div",12),p.TgZ(4,"mat-horizontal-stepper",null,13),p.TgZ(6,"mat-step"),p.YNc(7,Ie,2,1,"ul",14),p.TgZ(8,"div",15),p.TgZ(9,"h1",16),p._uU(10,"Where can we pick you up? "),p.qZA(),p.qZA(),p.TgZ(11,"div",17),p.TgZ(12,"app-pikup-dropoff",18),p.NdJ("fixDestinationModel",function(e){return p.CHM(i),p.oxw().openFixDestination(e)})("openQuePickupStand",function(e){return p.CHM(i),p.oxw().openPickUpStandModel(e)})("setUpMap",function(e){return p.CHM(i),p.oxw().setUpMap(e)})("onFormChangesEvent",function(e){return p.CHM(i),p.oxw().getPickUpDropOffForm(e)}),p.qZA(),p._UZ(13,"app-ride-types",19),p.qZA(),p.TgZ(14,"div",20),p.TgZ(15,"button",21),p.NdJ("click",function(){return p.CHM(i),p.oxw().submitfirstPart()}),p.YNc(16,Ne,1,0,"i",22),p._uU(17," Next "),p.qZA(),p.qZA(),p.qZA(),p.TgZ(18,"mat-step"),p.TgZ(19,"app-add-properties-form",23),p.NdJ("submitPropertiesForm",function(e){return p.CHM(i),p.oxw().submitPropertiesForm(e)})("goBackEvent",function(){return p.CHM(i),p.oxw().goBack()})("goNextPage",function(){return p.CHM(i),p.oxw().goForward()}),p.qZA(),p.qZA(),p.TgZ(20,"mat-step"),p.TgZ(21,"app-select-vehicle-type",24),p.NdJ("goBackEvent",function(){return p.CHM(i),p.oxw().goBack()})("goNextPage",function(){return p.CHM(i),p.oxw().goForward()})("openFareBreackDwon",function(e){return p.CHM(i),p.oxw().setFareModel(e)})("submitVehicleTypeForm",function(e){return p.CHM(i),p.oxw().submitVehicleTypeForm(e)})("callBookRide",function(){return p.CHM(i),p.oxw().bookRide()}),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.BQk()}if(2&e){var o=p.oxw();p.xp6(3),p.Q6J("ngIf",o.loadingState),p.xp6(4),p.Q6J("ngIf",o.routing.length>1),p.xp6(6),p.Q6J("locationData",o.locationData),p.xp6(2),p.Q6J("disabled",!o.showNextButton),p.xp6(1),p.Q6J("ngIf",!1),p.xp6(3),p.Q6J("extraFeildIds",o.extraFeildIds)("pickupDropOffForm",o.pickupDropOffForm),p.xp6(2),p.Q6J("pickupDropOffForm",o.pickupDropOffForm)("rideTypeForm",o.rideTypeForm)}}function Ee(e,t){if(1&e){var i=p.EpF();p.ynx(0),p.TgZ(1,"app-taxi-booking-thankyou",32),p.NdJ("ViewChange",function(e){return p.CHM(i),p.oxw().ViewChange(e)}
1),p.qZA(),p.BQk()}if(2&e){var o=p.oxw();p.xp6(1),p.Q6J("addedRideResponse",o.addedRideResponse)}}function Je(e,t){if(1&e&&p._UZ(0,"app-fare-breack-dwon",33),2&e){var i=p.oxw();p.Q6J("vehicleTypeForm",i.vehicleTypeForm)}}function Me(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"app-fix-destination",34),p.NdJ("submitFixDestination",function(e){return p.CHM(i),p.oxw().selectFixDestination(e)}),p.qZA()}if(2&e){var o=p.oxw();p.Q6J("zonePriceData",o.fixZonePricingArray)}}function Be(e,t){if(1&e){var i=p.EpF();p.TgZ(0,"app-que-and-pickup-stand",35),p.NdJ("submitPickUpstand",function(e){return p.CHM(i),p.oxw().submitPickUpstand(e)}),p.qZA()}if(2&e){var o=p.oxw();p.Q6J("queuePikupStandList",o.queuePikupStandList)}}var Re=[{path:"ride/add",component:function(){var e=function(){function e(t,i,o,n,r,l,u,c,s,p,d){a(this,e),this.jwtService=t,this.authService=i,this.googleService=o,this.route=n,this.fb=r,this.cd=l,this.taxiBookingService=u,this.toasterService=c,this.tosterService=s,this.router=p,this.cdRef=d,this.showAddRideForm=!0,this.currentCompanyDetail=null,this.pre_payment=!1,this.showPickStandPopup=!1,this.lat=null,this.lng=null,this.zoom=12,this.marker=[],this.loadingState=!1,this.locationData=null,this.fixZonePricingArray=[],this.queuePikupStandList=[],this.showNextButton=!1,this.extraFeildIds=[],this.propertiesForm=null,this.customerDetailForm=null,this.opneFareModel=!1,this.addedRideResponse=null,this.selectedService="1",this.routing=[]}return l(e,[{key:"ngOnDestroy",value:function(){this.selectedServiceSubject&&this.selectedServiceSubject.unsubscribe()}},{key:"ngOnInit",value:function(){this.getCompanyData()}},{key:"ngAfterViewInit",value:function(){var e=this;this.authService.mapScriptLoad.subscribe(function(t){(null==t?void 0:t.is_load)&&(e.lat=null==t?void 0:t.latitude,e.lng=null==t?void 0:t.longitude,e.initMap())})}},{key:"getCompanyData",value:function(){var e=this;this.authService.currentCompany.subscribe(function(t){Object.keys(t).length>0&&(e.currentCompanyDetail=t,e.selectedServiceSubject=e.authService.currentService.subscribe(function(t){t&&(e.selectedService=null==t?void 0:t.service_type_id,e.getAllTripProperties())}))})}},{key:"getAllTripProperties",value:function(){var e,t=this,i={company_id:null===(e=this.currentCompanyDetail)||void 0===e?void 0:e.company_id,property_type:1,type:4,is_active:1,service_type:this.selectedService};this.taxiBookingService.getExtraFields(i).subscribe(function(e){e.status&&e.data.map(function(e){t.extraFeildIds.push(e.company_extra_field_id)})})}},{key:"initMap",value:function(){this.map=google.maps.Map,this.generateMap(),this.googleService.mapCenter(this.map,{lat:this.lat,lng:this.lng})}},{key:"generateMap",value:function(){this.map=google.maps.Map,this.mapProp={zoom:this.zoom,mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:!0,streetViewControl:!1,fullscreenControl:!0,disableDefaultUI:!0,center:new google.maps.LatLng(this.lat,this.lng),minZoom:4,styles:T.VW},this.map=new google.maps.Map(this.gmapElement.nativeElement,this.mapProp)}},{key:"setUpMap",value:function(e){if(this.locationData=e,this.generateNewMap=e.generateNewMap,0==e.checkpoints.length)this.addMarker(null==e.destination_latitude?[{lat:e.pickup_latitude,lng:e.pickup_longitude}]:[{lat:e.pickup_latitude,lng:e.pickup_longitude},{lat:e.destination_latitude,lng:e.destination_longitude}]);else if(null!=e.pickup_latitude&&null!=e.pickup_longitude){var i,o=[{lat:e.pickup_latitude,lng:e.pickup_longitude},{lat:e.destination_latitude,lng:e.destination_longitude}],n=t(e.checkpoints);try{for(n.s();!(i=n.n()).done;){var a=i.value;null!=a.latitude&&null!=a.longitude&&o.push({lat:a.latitude,lng:a.longitude})}}catch(r){n.e(r)}finally{n.f()}this.addMarker(o)}}},{key:"addMarker",value:function(e){var t=this;this.generateNewMap&&this.generateMap(),this.marker.forEach(function(e){e.setMap(null)}),this.marker=[];var i=new google.maps.LatLngBounds;e.forEach(function(e,o){var n=0==o?T.GB:1==o?T.kJ:T.yF;if((null==e?void 0:e.lat)&&(null==e?void 0:e.lng)){var a={lat:Number(e.lat),lng:Number(e.lng)};t.marker.push(new google.maps.Marker({draggable:!1,position:a,map:t.map,icon:n,animation:google.maps.Animation.DROP})),i.extend(a)}}),this.marker.forEach(function(e,i){e.addListener("dragend",function(e){var o=e.latLng,
1n=o.lat(),a=o.lng();t.googleService.getAddressFromLatLng(n,a).then(function(e){e&&t.updateMarker({updateIndex:i,address:e.results[0].formatted_address,lat:n,lng:a})})})}),e.length>=2?this.map.fitBounds(i,{top:100,bottom:50,right:400,left:50}):this.googleService.mapCenter(this.map,e),this.map.getZoom()>15&&this.map.setZoom(19)}},{key:"updateMarker",value:function(e){0==e.updateIndex?this.pikupDropoffComponent.updateDestination({pickup_location:e.address,pickup_latitude:e.lat,pickup_longitude:e.lng}):1==e.updateIndex&&this.pikupDropoffComponent.updateDestination({dropoff_location:e.address,dropoff_latitude:e.lat,dropoff_longitude:e.lng})}},{key:"drawRoute",value:function(){var e,t=this,i={pickup_latitude:this.pickupDropOffForm.value.pickup_latitude,pickup_longitude:this.pickupDropOffForm.value.pickup_longitude,dropoff_latitude:this.pickupDropOffForm.value.destination_latitude,dropoff_longitude:this.pickupDropOffForm.value.destination_longitude,company_id:null===(e=this.currentCompanyDetail)||void 0===e?void 0:e.company_id,waypoints:JSON.stringify(this.pickupDropOffForm.value.getWayPoint)};i.dropoff_latitude&&i.dropoff_longitude&&i.pickup_latitude&&i.pickup_longitude&&this.taxiBookingService.getDirectionRouteV2(i).subscribe(function(e){e.status&&t.addPolyline(e.data.path)},function(e){})}},{key:"addPolyline",value:function(e){var t=this,i=e.map(function(e){return{lat:e.latitude,lng:e.longitude}});this.polyline&&this.polyline.setMap(null),this.polyline=new google.maps.Polyline({path:i,geodesic:!0,strokeColor:"#FF0000",strokeOpacity:1,strokeWeight:3}),this.polyline.setMap(this.map);var o=new google.maps.LatLngBounds;[{lat:this.pickupDropOffForm.value.pickup_latitude,lng:this.pickupDropOffForm.value.pickup_longitude},{lat:this.pickupDropOffForm.value.destination_latitude,lng:this.pickupDropOffForm.value.destination_longitude}].forEach(function(e,i){var n=0==i?T.GB:1==i?T.kJ:T.yF,a={lat:Number(e.lat),lng:Number(e.lng)};t.marker.push(new google.maps.Marker({draggable:!1,position:a,map:t.map,icon:n})),o.extend(a)})}},{key:"openFixDestination",value:function(e){this.fixZonePricingArray=e}},{key:"openPickUpStandModel",value:function(e){this.queuePikupStandList=e}},{key:"selectFixDestination",value:function(e){this.pikupDropoffComponent.updateDestination(e)}},{key:"submitPickUpstand",value:function(e){this.pikupDropoffComponent.updatePickUpLocation(e),this.queuePikupStandList=[],this.showPickStandPopup=!1,this.submitfirstPart()}},{key:"submitfirstPart",value:function(){var e;this.pickupDropOffForm=this.pikupDropoffComponent.submitPickUpDropOffForm(),this.rideTypeForm=this.rideTypesComponent.submitRideTypeForm(),this.pickupDropOffForm.valid&&this.rideTypeForm.valid&&((null===(e=this.queuePikupStandList)||void 0===e?void 0:e.length)>0?this.showPickStandPopup=!0:(this.drawRoute(),this.checkProperties(),this.goForward()))}},{key:"getPickUpDropOffForm",value:function(e){var t;this.showNextButton=!!(e.valid&&e.value.pickup_valid&&(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.destination_valid)),this.pickupDropOffForm=e}},{key:"checkProperties",value:function(){this.addPropertiesFormComponent.getproperties(this.pickupDropOffForm)}},{key:"submitPropertiesForm",value:function(e){this.propertiesForm=e,this.selectVehicleTypeComponent.getVehicleTypeList(),this.goForward()}},{key:"goForward",value:function(){this.myStepper.next()}},{key:"goBack",value:function(){this.myStepper.previous()}},{key:"setFareModel",value:function(e){this.opneFareModel=!0,this.vehicleTypeForm=e}},{key:"submitVehicleTypeForm",value:function(e){this.vehicleTypeForm=e}},{key:"submitCustomerDetailForm",value:function(e){this.customerDetailForm=e,this.bookRide()}},{key:"bookRide",value:function(){var e,t,i,o,n,a,r,l,u,c,s,p,d,h,f,g,v,m,_,y,k,b,F,x,Z,T,D,A,q,w,C,O,P,S,U,L,V,I,N,j,E,J,M,B,R,Q,Y,z,H,G,$,W,X,K,ee,te,ie,oe,ne,ae,re,le,ue,ce,se,pe,de,he,fe,ge,ve,me,_e=this.selectVehicleTypeComponent.getWayPoints(),ye={pickup_location:this.pickupDropOffForm.get("pickup_location").value,dropoff_latitude:null===(e=this.pickupDropOffForm.get("destination_latitude").value)||void 0===e?void 0:e.toFixed(6),dropoff_longitude:null===(t=this.pickupDropOffForm.get("destination_longitude").value)||void 0===t?void 0:t.toFixed(6),way_points:_e,notes:this.rideTypeForm.get("notes").value,is_scheduled:2==(null===(o=null===(i=this.rideTypeForm)||void 0===i?void 0:i.value)||void 0===o?void 0:o.ride_type)?"Y":"N",transaction_detail
1:void 0,vehicle_type_id:null===(a=null===(n=this.vehicleTypeForm)||void 0===n?void 0:n.value)||void 0===a?void 0:a.selectedVehicleObj.id,payment_mode:null===(l=null===(r=this.vehicleTypeForm)||void 0===r?void 0:r.value)||void 0===l?void 0:l.payment_mode,payment_type:null===(c=null===(u=this.vehicleTypeForm)||void 0===u?void 0:u.value)||void 0===c?void 0:c.payment_type,no_of_passenger:null===(p=null===(s=this.vehicleTypeForm)||void 0===s?void 0:s.value)||void 0===p?void 0:p.no_of_passenger,trip_luggage:null===(h=null===(d=this.vehicleTypeForm)||void 0===d?void 0:d.value)||void 0===h?void 0:h.trip_luggage,est_distance:null===(g=null===(f=this.vehicleTypeForm)||void 0===f?void 0:f.value)||void 0===g?void 0:g.otherDetails.ride_distance,est_time:null===(m=null===(v=this.vehicleTypeForm)||void 0===v?void 0:v.value)||void 0===m?void 0:m.otherDetails.ride_time,price_type:null===(k=null===(y=null===(_=this.vehicleTypeForm)||void 0===_?void 0:_.value)||void 0===y?void 0:y.selectedVehicleObj)||void 0===k?void 0:k.pricing.calculation_method,fare_details:null===(F=null===(b=this.vehicleTypeForm)||void 0===b?void 0:b.value)||void 0===F?void 0:F.selectedVehicleObj.pricing,est_fare:null===(Z=null===(x=this.vehicleTypeForm)||void 0===x?void 0:x.value)||void 0===Z?void 0:Z.total_amount};try{ye.pickup_latitude=null===(T=this.pickupDropOffForm.get("pickup_latitude").value)||void 0===T?void 0:T.toFixed(6)}catch(ke){ye.pickup_latitude=this.pickupDropOffForm.get("pickup_latitude").value}try{ye.pickup_longitude=null===(D=this.pickupDropOffForm.get("pickup_longitude").value)||void 0===D?void 0:D.toFixed(6)}catch(ke){ye.pickup_longitude=this.pickupDropOffForm.get("pickup_longitude").value}if(!this.rideTypeForm.get("autoDispatch").value&&this.rideTypeForm.get("driver").value&&(ye.driver_id=this.rideTypeForm.get("driver").value),this.pickupDropOffForm.get("destination_location").value&&(ye.dropoff_location=this.pickupDropOffForm.get("destination_location").value),ye.properties=JSON.stringify(this.propertiesForm.value.properties.map(function(e){return{label:e.label,value:e.value,field_type:e.field_type}})),(null===(A=this.rideTypeForm.value)||void 0===A?void 0:A.gender_required)&&(ye.gender=null===(q=this.rideTypeForm.value)||void 0===q?void 0:q.gender),this.vehicleTypeForm.get("extra_charge").value&&(ye.extra_charge_value=this.vehicleTypeForm.get("extra_charge").value),this.vehicleTypeForm.get("additional_discount").value&&(ye.additional_discount_value=this.vehicleTypeForm.get("additional_discount").value,ye.additional_discount_type=1),(null===(C=null===(w=this.vehicleTypeForm)||void 0===w?void 0:w.value)||void 0===C?void 0:C.selectedVehicleObj.surge_price.surgeApplied)&&(ye.surge_multiplier=null===(P=null===(O=this.vehicleTypeForm)||void 0===O?void 0:O.value)||void 0===P?void 0:P.selectedVehicleObj.surge_price.multiplier,ye.surge_flat=null===(U=null===(S=this.vehicleTypeForm)||void 0===S?void 0:S.value)||void 0===U?void 0:U.selectedVehicleObj.surge_price.flat_price),2==(null===(I=null===(V=null===(L=this.vehicleTypeForm)||void 0===L?void 0:L.value)||void 0===V?void 0:V.selectedVehicleObj)||void 0===I?void 0:I.pricing.calculation_method)&&(ye.final_fare=null===(j=null===(N=this.vehicleTypeForm)||void 0===N?void 0:N.value)||void 0===j?void 0:j.selectedVehicleObj.final_fare),(null===(J=null===(E=this.pickupDropOffForm.value)||void 0===E?void 0:E.pickup_zone_obj)||void 0===J?void 0:J.zone_id)&&(ye.pickup_zone_id=null===(B=null===(M=this.pickupDropOffForm.value)||void 0===M?void 0:M.pickup_zone_obj)||void 0===B?void 0:B.zone_id),(null===(Q=null===(R=this.pickupDropOffForm.value)||void 0===R?void 0:R.drop_off_zone_obj)||void 0===Q?void 0:Q.zone_id)&&(ye.dropoff_zone_id=(null===(z=null===(Y=this.pickupDropOffForm.value)||void 0===Y?void 0:Y.drop_off_zone_obj)||void 0===z?void 0:z.zone_id).toString()),"Y"==ye.is_scheduled&&(ye.request_time=new Date(this.rideTypeForm.value.request_time).getTime()/1e3,ye.is_scheduled="Y"),(null===(H=this.pickupDropOffForm.value)||void 0===H?void 0:H.fix_destination)||2===ye.price_type||(null===(K=null===(X=null===(W=null===($=null===(G=this.vehicleTypeForm)||void 0===G?void 0:G.value)||void 0===$?void 0:$.selectedVehicleObj)||void 0===W?void 0:W.pricing)||void 0===X?void 0:X.zone_price_model)||void 0===K?void 0:K.amount))ye.is_fixed_price=1;else if(null===(te=null===(ee=this.vehicleTypeForm)||void 0===ee?void 0:ee.value)||void 0===te?void 0:te.autoFixEnable){var ke=null===(oe=null===(ie=this.vehicleTypeForm)||void 0===ie?void 0:ie.value)||void 0===oe?void 0:oe.selectedVehicleObj.final_fare;ye.final_fare=ke,ye.is_fixed_price=1}else ye.is_fixed_price=0;3==this.rideTypeForm.value.trip_type&&(ye.corporate_id=this.rideTypeForm.get("corporate_id").value,ye.employee_id=this.customerDetailForm.get("customer_id").value),(null===(ne=this.customerDetailForm)||void 0===ne?void 0:ne.valid)&&((null===(re=null===(ae=this.customerDetailForm)||void 0===ae?void 0:ae.value)||void 0===re?void 0:re.customer_id)&&3!=this.rideTypeForm.value.trip_type?ye.user_id=null===(ue=null===(le=this.customerDetailForm)||void 0===le?void 0:le.value)||void 0===ue?void 0:ue.customer_id:(ye.additional_first_name=this.customerDetailForm.get("first_name").value?this.customerDetailForm.get("first_name").value:"",ye.additional_first_name+=(this.customerDetailForm.get("last_name"),this.customerDetailForm.get("last_name").value),ye.additional_phone_no=this.customerDetailForm.get("phone_no").value?this.customerDetailForm.get("phone_no").value.toString():"",ye.additional_dial_co
1de=this.customerDetailForm.get("dial_code").value?this.customerDetailForm.get("dial_code").value:"",this.customerDetailForm.get("email").value&&(ye.additional_email=this.customerDetailForm.get("email").value))),2!==(null===(se=null===(ce=this.rideTypeForm)||void 0===ce?void 0:ce.value)||void 0===se?void 0:se.ride_type)||2===(null===(de=null===(pe=this.rideTypeForm)||void 0===pe?void 0:pe.value)||void 0===de?void 0:de.ride_type)&&new Date(null===(he=this.rideTypeForm.value)||void 0===he?void 0:he.request_time).getTime()>(new Date).getTime()?3!==(null===(ge=null===(fe=this.rideTypeForm)||void 0===fe?void 0:fe.value)||void 0===ge?void 0:ge.ride_type)?"N"===(null===(me=null===(ve=this.rideTypeForm)||void 0===ve?void 0:ve.value)||void 0===me?void 0:me.booking_confirmation)&&2!=(null==ye?void 0:ye.payment_mode)?this.bookRideFinalAPI(ye):2!=(null==ye?void 0:ye.payment_mode)||this.pre_payment?this.bookBookingConfirmationRide(ye):this.bookRideFinalAPI(ye):2==(null==ye?void 0:ye.payment_mode)&&this.bookBookingConfirmationRide(ye):(this.loadingState=!1,this.toasterService.error("Please select valid scheduled time"))}},{key:"bookRideFinalAPI",value:function(e){var t=this;this.taxiBookingService.bookRide(e).subscribe(function(e){t.loadingState=!1,e.success||e.status?(t.addedRideResponse=e.data,t.showAddRideForm=!1,t.generateMap()):t.toasterService.error(null==e?void 0:e.message)},function(e){t.loadingState=!1})}},{key:"bookBookingConfirmationRide",value:function(e){var t=this;this.pre_payment&&(e.pre_payment="Y"),this.taxiBookingService.bookBookingConfirmationRide(e).subscribe(function(e){t.loadingState=!1,e.success||e.status?(t.addedRideResponse=e.data,t.showAddRideForm=!1,t.generateMap()):t.toasterService.error(null==e?void 0:e.message)},function(e){t.loadingState=!1})}},{key:"ViewChange",value:function(e){this.showAddRideForm=e}},{key:"changeService",value:function(e){this.cd.detectChanges(),this.selectedService=e,this.router.navigate("1"==e?["/ride/add"]:["/rental/add"])}}]),e}();return e.\u0275fac=function(t){return new(t||e)(p.Y36(me.T),p.Y36(h.e),p.Y36(_e.C),p.Y36(c.gz),p.Y36(d.qu),p.Y36(p.sBO),p.Y36(f.d),p.Y36(q._W),p.Y36(ye.F),p.Y36(c.F0),p.Y36(p.sBO))},e.\u0275cmp=p.Xpm({type:e,selectors:[["app-add-booking"]],viewQuery:function(e,t){var i;(1&e&&(p.Gf(Pe,5),p.Gf(Se,5),p.Gf(j,5),p.Gf(Q,5),p.Gf(Z,5),p.Gf(ve,5)),2&e)&&(p.iGM(i=p.CRH())&&(t.gmapElement=i.first),p.iGM(i=p.CRH())&&(t.myStepper=i.first),p.iGM(i=p.CRH())&&(t.pikupDropoffComponent=i.first),p.iGM(i=p.CRH())&&(t.rideTypesComponent=i.first),p.iGM(i=p.CRH())&&(t.addPropertiesFormComponent=i.first),p.iGM(i=p.CRH())&&(t.selectVehicleTypeComponent=i.first))},decls:11,vars:5,consts:[[1,"map-container","py-sm-4"],[1,"booking-form","clearfix"],[4,"ngIf"],[1,"booking-map"],[1,"g-map",2,"height","100%"],["id","gmap",2,"height","100%"],["gmap",""],[3,"vehicleTypeForm",4,"ngIf"],[3,"zonePriceData","submitFixDestination",4,"ngIf"],[3,"queuePikupStandList","submitPickUpstand",4,"ngIf"],[1,"booking-form-center"],[1,"booking-form-inner"],["class","lorder-wrap",4,"ngIf"],["stepper",""],["class","nav nav-tabs primary-tabs",4,"ngIf"],[1,"booking-form-header"],[1,"heading","h3","font-weight-700","text-dark"],[1,"booking-form-body"],[3,"fixDestinationModel","openQuePickupStand","setUpMap","onFormChangesEvent"],[3,"locationData"],[1,"booking-form-action"],["type","button","color","primary",1,"btn","btn-primary","btn-block","btn-lg","text-uppercase",3,"disabled","click"],["class","fa fa-spinner fa-spin",4,"ngIf"],[3,"extraFeildIds","pickupDropOffForm","submitPropertiesForm","goBackEvent","goNextPage"],[3,"pickupDropOffForm","rideTypeForm","goBackEvent","goNextPage","openFareBreackDwon","submitVehicleTypeForm","callBookRide"],[1,"lorder-wrap"],[1,"loader"],[1,"nav","nav-tabs","primary-tabs"],["class","nav-item",4,"ngFor","ngForOf"],[1,"nav-item"],[1,"nav-link",3,"ngClass","click"],[1,"fa","fa-spinner","fa-spin"],[3,"addedRideResponse","ViewChange"],[3,"vehicleTypeForm"],[3,"zonePriceData","submitFixDestination"],[3,"queuePikupStandList","submitPickUpstand"]],template:function(e,t){1&e&&(p.TgZ(0,"div",0),p.TgZ(1,"div",1),p.YNc(2,je,22,9,"ng-container",2),p.YNc(3,Ee,2,1,"ng-container",2),p.qZA(),p.TgZ(4,"div",3),p.TgZ(5,"div",4),p._UZ(6,"div",5,6),p.qZA(),p.qZA(),p.qZA(),p.YNc(8,Je,1,1,"app-fare-breack-dwon",7),p.YNc(9,Me,1,1,"app-fix-destination",8),p.YNc(10,Be,1,1,"app-que-and-pickup-stand",9)),2&e&&(p.xp6(2),p.Q6J("ngIf",t.showAddRideForm),p.xp6(1),p.Q6J("ngIf",!t.showAddRideForm),p.xp6(5),p.Q6J("ngIf",t.opneFareModel),p.xp6(1),p.Q6J("ngIf",(null==t.fixZonePricingArray?null:t.fixZonePricingArray.length)>0),p.xp6(1),p.Q6J("ngIf",t.showPickStandPopup))},directives:[u.O5,ke.Vq,ke.C0,j,Q,Z,ve,u.sg,u.mk,Fe,Te,qe,Oe],styles:[""]}),e}(),canActivate:[s.a]}],Qe=function(){var e=l(function e(){a(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=p.oAB({type:e}),e.\u0275inj=p.cJS({imports:[[c.Bz.forChild(Re)],c.Bz]}),e}(),Ye=r(79730),ze=r(87135),He=r(44454),Ge=r(43239),$e=r(48135),We=r(75349),Xe=r(47461),Ke=r(40454),et=function(){var e=l(function e(){a(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=p.oAB({type:e}),e.\u0275inj=p.cJS({imports:[[u.ez,Qe,v.A0,g.Me,d.u5,d.UX,We.m,Ye.U5,ke.T5,ze.Is,He.zk,$e.t,Ge.p,Xe.C,Ke.A]
1]}),e}()}}])}();

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.