(function () {
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

  function _nonIterableSpread() { 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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }

  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

  (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["sign-in-sign-in-module"], {
    /***/
    "FuQ6":
    /*!*******************************************!*\
      !*** ./src/app/sign-in/sign-in.module.ts ***!
      \*******************************************/

    /*! exports provided: SignInPageModule */

    /***/
    function FuQ6(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SignInPageModule", function () {
        return SignInPageModule;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");
      /* harmony import */


      var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @angular/forms */
      "3Pt+");
      /* harmony import */


      var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! @ngx-translate/core */
      "sYmb");
      /* harmony import */


      var _ionic_angular__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! @ionic/angular */
      "TEn/");
      /* harmony import */


      var _sign_in_routing_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./sign-in-routing.module */
      "j1PK");
      /* harmony import */


      var _sign_in_page__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ./sign-in.page */
      "WawN");

      var SignInPageModule = function SignInPageModule() {
        _classCallCheck(this, SignInPageModule);
      };

      SignInPageModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormsModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_3__["ReactiveFormsModule"], _ionic_angular__WEBPACK_IMPORTED_MODULE_5__["IonicModule"], _ngx_translate_core__WEBPACK_IMPORTED_MODULE_4__["TranslateModule"], _sign_in_routing_module__WEBPACK_IMPORTED_MODULE_6__["SignInPageRoutingModule"]],
        declarations: [_sign_in_page__WEBPACK_IMPORTED_MODULE_7__["SignInPage"]]
      })], SignInPageModule);
      /***/
    },

    /***/
    "P3na":
    /*!*********************************************************************************!*\
      !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/sign-in/sign-in.page.html ***!
      \*********************************************************************************/

    /*! exports provided: default */

    /***/
    function P3na(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony default export */


      __webpack_exports__["default"] = "<ion-content fullscreen>\r\n\t<div id=\"sign-in-button\"></div>\r\n\t<div class=\"applogo\">\r\n\t\t<div class=\"img\">\r\n\t\t\t<img src=\"./assets/imgs/applogo.png\" (click)=\"iosLogin()\">\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"slogan\">\r\n\t\t<strong>Optimize Your </strong><br>\r\n\t\t<strong>Business With 1PAY</strong>\r\n\t</div>\r\n\t<div class=\"form\">\r\n\t\t<form [formGroup]=\"loginForm\" (ngSubmit)=\"onSubmit()\">\r\n\t\t\t<ion-list lines=\"none\">\r\n\t\t\t\t<div class=\"label\">\r\n\t\t\t\t\t<ion-label position=\"stacked\">{{'enter_registered_mobile_number' | translate}}</ion-label>\r\n\t\t\t\t</div>\r\n\t\t\t\t<ion-item lines=\"none\">\r\n\t\t\t\t\t<ion-input type=\"text\" maxlength=\"10\" formControlName=\"mobileNumber\"\r\n\t\t\t\t\t\t(input)='onMobNoChange($event.target.value)'\r\n\t\t\t\t\t\tplaceholder=\"{{'enter_registered_mobile_number' | translate}}\" [(ngModel)]=\"mobileNumber\"\r\n\t\t\t\t\t\trequired>\r\n\t\t\t\t\t</ion-input>\r\n\t\t\t\t</ion-item>\r\n\t\t\t\t<!-- <ion-button type=\"submit\" size=\"large\" [disabled]=\"mobileNumber?.length !== 10\" shape=\"block\"\r\n\t\t\t\t\tclass=\"btn\">\r\n\t\t\t\t\t{{'generate_otp' | translate}}</ion-button> -->\r\n\t\t\t\t<ion-button *ngIf=\"platform =='android' || platform =='web'\" size=\"large\" [disabled]=\"mobileNumber?.length !== 10\"\r\n\t\t\t\t\t(click)=\"signinWithPhoneNumber(mobileNumber)\" shape=\"block\" class=\"btn\">\r\n\t\t\t\t\t{{'generate_otp' | translate}}</ion-button>\r\n\t\t\t\t\t<ion-button *ngIf=\"platform =='ios'\" size=\"large\" [disabled]=\"mobileNumber?.length !== 10\"\r\n\t\t\t\t\t(click)=\"iosLogin()\" shape=\"block\" class=\"btn\">\r\n\t\t\t\t\tiOS Login</ion-button>\t\t\t\t\t\r\n\t\t\t</ion-list>\r\n\t\t\t<ion-grid>\r\n\t\t\t</ion-grid>\r\n\t\t</form>\r\n\t</div>\r\n</ion-content>";
      /***/
    },

    /***/
    "WawN":
    /*!*****************************************!*\
      !*** ./src/app/sign-in/sign-in.page.ts ***!
      \*****************************************/

    /*! exports provided: SignInPage */

    /***/
    function WawN(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SignInPage", function () {
        return SignInPage;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _raw_loader_sign_in_page_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! raw-loader!./sign-in.page.html */
      "P3na");
      /* harmony import */


      var _sign_in_page_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./sign-in.page.scss */
      "i5US");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! @angular/router */
      "tyNb");
      /* harmony import */


      var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! @angular/forms */
      "3Pt+");
      /* harmony import */


      var src_services_myevent_services__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! src/services/myevent.services */
      "ThQF");
      /* harmony import */


      var src_services_common_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! src/services/common.service */
      "FBGF");
      /* harmony import */


      var _ionic_angular__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! @ionic/angular */
      "TEn/");
      /* harmony import */


      var src_services_auth_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
      /*! src/services/auth.service */
      "LLt/");
      /* harmony import */


      var firebase_app__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
      /*! firebase/app */
      "Jgta");
      /* harmony import */


      var src_services_firestore_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
      /*! src/services/firestore.service */
      "ETdK");
      /* harmony import */


      var js_sha256__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
      /*! js-sha256 */
      "bCcq");
      /* harmony import */


      var js_sha256__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(js_sha256__WEBPACK_IMPORTED_MODULE_12__);
      /* harmony import */


      var src_services_profile_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
      /*! src/services/profile.service */
      "2l2O");
      /* harmony import */


      var src_services_service_request_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(
      /*! src/services/service-request.service */
      "YPdO");
      /* harmony import */


      var src_services_vehicle_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(
      /*! src/services/vehicle.service */
      "lMcH");
      /* harmony import */


      var src_services_fcm_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(
      /*! src/services/fcm.service */
      "KqhZ");
      /* harmony import */


      var _capacitor_core__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(
      /*! @capacitor/core */
      "FUe0");
      /* harmony import */


      var _capacitor_device__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(
      /*! @capacitor/device */
      "rvvs");

      var SignInPage = /*#__PURE__*/function () {
        //------------------------------------------------------------
        function SignInPage(route, fb, fcmService, commonService, dataService, alertController, authService, navCtrl, profileService, serviceRequest, vehicleService, firestoreService) {
          _classCallCheck(this, SignInPage);

          this.route = route;
          this.fb = fb;
          this.fcmService = fcmService;
          this.commonService = commonService;
          this.dataService = dataService;
          this.alertController = alertController;
          this.authService = authService;
          this.navCtrl = navCtrl;
          this.profileService = profileService;
          this.serviceRequest = serviceRequest;
          this.vehicleService = vehicleService;
          this.firestoreService = firestoreService;
          this.mobileNumber = ""; //password: string = "";

          this.isEmail = true;
          this.fileName = 'sign-in.page.ts';
          this.isUserFound = false; //----------------------------------------------------------

          this.OTP = '';
          this.CountryCode = '+91';
          this.showOTPInput = false;
          this.OTPmessage = 'An OTP is sent to your number. You should receive it in 15 s';
        }

        _createClass(SignInPage, [{
          key: "ngOnInit",
          value: function ngOnInit() {
            var devDetail = this.commonService.getLocalgetDeviceInfo();
            this.platform = devDetail.platform;

            try {
              this.loginForm = this.fb.group({
                mobileNumber: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required]
              });
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'ngOnInit()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "custId",
          get: function get() {
            try {
              return this.loginForm.get('mobileNumber');
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'custId()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "onMobNoChange",
          value: function onMobNoChange(val) {
            try {
              this.mobileNumber = val;
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'onMobNoChange(val)',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "onSubmit",
          value: function onSubmit() {
            try {
              this.dataService.sharedData = this.mobileNumber;
              this.route.navigate(['./verification']);
              this.mobileNumber = "";
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'onSubmit()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "ionViewDidEnter",
          value: function ionViewDidEnter() {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
              return regeneratorRuntime.wrap(function _callee$(_context) {
                while (1) {
                  switch (_context.prev = _context.next) {
                    case 0:
                      this.recaptchaVerifier = new firebase_app__WEBPACK_IMPORTED_MODULE_10__["default"].auth.RecaptchaVerifier('sign-in-button', {
                        size: 'invisible',
                        callback: function callback(response) {},
                        'expired-callback': function expiredCallback() {}
                      });

                    case 1:
                    case "end":
                      return _context.stop();
                  }
                }
              }, _callee, this);
            }));
          }
        }, {
          key: "ionViewDidLoad",
          value: function ionViewDidLoad() {
            this.recaptchaVerifier = new firebase_app__WEBPACK_IMPORTED_MODULE_10__["default"].auth.RecaptchaVerifier('sign-in-button', {
              size: 'invisible',
              callback: function callback(response) {},
              'expired-callback': function expiredCallback() {}
            });
          }
        }, {
          key: "signinWithPhoneNumber",
          value: function signinWithPhoneNumber(val) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
              var _this = this;

              var phoneNumber, obj;
              return regeneratorRuntime.wrap(function _callee4$(_context4) {
                while (1) {
                  switch (_context4.prev = _context4.next) {
                    case 0:
                      _context4.prev = 0;
                      phoneNumber = "+91" + val;
                      console.log('Entered phone number: ', phoneNumber); //--------------Fetching data from Firestore---------------------------
                      // this.firestoreService.getUserList().subscribe(data => {
                      //   console.log("Fetching data from Firestore: ", data);
                      // });
                      //---------------------------------------------------------------------
                      // Verifying user from Firestore database

                      _context4.next = 5;
                      return this.commonService.showLoader();

                    case 5:
                      _context4.next = 7;
                      return this.firestoreService.verifyUser(phoneNumber).then(function (ref) {
                        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
                          var results;
                          return regeneratorRuntime.wrap(function _callee2$(_context2) {
                            while (1) {
                              switch (_context2.prev = _context2.next) {
                                case 0:
                                  results = ref.docs.map(function (doc) {
                                    return doc.data();
                                  });

                                  if (!(results.length > 0)) {
                                    _context2.next = 8;
                                    break;
                                  }

                                  console.log("User is found: ", results);
                                  this.isUserFound = true;
                                  _context2.next = 6;
                                  return this.commonService.hideLoader();

                                case 6:
                                  _context2.next = 12;
                                  break;

                                case 8:
                                  console.log("User not found");
                                  this.isUserFound = false;
                                  _context2.next = 12;
                                  return this.commonService.hideLoader();

                                case 12:
                                case "end":
                                  return _context2.stop();
                              }
                            }
                          }, _callee2, this);
                        }));
                      })["catch"](function (error) {
                        _this.commonService.errorToast(error.code);

                        var obj = {
                          fileName: _this.fileName,
                          functionName: 'signinWithPhoneNumber(val)',
                          error: error
                        };

                        _this.commonService.systemException(obj);
                      });

                    case 7:
                      if (!this.isUserFound) {
                        _context4.next = 13;
                        break;
                      }

                      _context4.next = 10;
                      return this.commonService.showLoader();

                    case 10:
                      this.firestoreService.signInWithPhoneNumber(this.recaptchaVerifier, phoneNumber).then(function (success) {
                        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
                          return regeneratorRuntime.wrap(function _callee3$(_context3) {
                            while (1) {
                              switch (_context3.prev = _context3.next) {
                                case 0:
                                  //this.OtpVerification();
                                  this.dataService.sharedData = this.mobileNumber;
                                  this.route.navigate(['./verification']);
                                  this.mobileNumber = "";
                                  _context3.next = 5;
                                  return this.commonService.hideLoader();

                                case 5:
                                case "end":
                                  return _context3.stop();
                              }
                            }
                          }, _callee3, this);
                        }));
                      });
                      _context4.next = 14;
                      break;

                    case 13:
                      this.commonService.errorToast("Please enter registered mobile number");

                    case 14:
                      _context4.next = 21;
                      break;

                    case 16:
                      _context4.prev = 16;
                      _context4.t0 = _context4["catch"](0);
                      this.commonService.errorToast(_context4.t0.code);
                      obj = {
                        fileName: this.fileName,
                        functionName: 'signinWithPhoneNumber()',
                        error: _context4.t0
                      };
                      this.commonService.systemException(obj);

                    case 21:
                    case "end":
                      return _context4.stop();
                  }
                }
              }, _callee4, this, [[0, 16]]);
            }));
          }
          /*
            async OtpVerification() {
              const alert = await this.alertController.create({
                header: 'Enter OTP',
                backdropDismiss: false,
                inputs: [
                  {
                    name: 'otp',
                    type: 'text',
                    placeholder: 'Please enter OTP',
                  }
                ],
                buttons: [{
                  text: 'Submit',
                  handler: (res) => {
                    this.firestoreService.enterVerificationCode(res.otp).then(
                      userData => {
                        this.commonService.simpleAlert("Success", "You are successfully authenticated!");
                        localStorage.setItem("authToken", userData.refreshToken);
                      },
                      (error) => {
                        this.loginError = error;
                        this.commonService.errorToast(this.loginError);
                      }
                    );
                  }
                }
                ]
              });
              await alert.present();
            }
            */

        }, {
          key: "iosLogin",
          value: function iosLogin() {
            var _a;

            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
              var _this2 = this;

              var encryptedPass, obj, _obj;

              return regeneratorRuntime.wrap(function _callee12$(_context12) {
                while (1) {
                  switch (_context12.prev = _context12.next) {
                    case 0:
                      _context12.prev = 0;
                      _context12.next = 3;
                      return this.commonService.showLoader();

                    case 3:
                      if (this.mobileNumber && ((_a = this.mobileNumber) === null || _a === void 0 ? void 0 : _a.length) === 10) {
                        encryptedPass = Object(js_sha256__WEBPACK_IMPORTED_MODULE_12__["sha256"])("SlowGaadi");
                        obj = {
                          "password": encryptedPass,
                          "userId": this.mobileNumber,
                          "login_type": "mobile"
                        };
                        this.authService.login(obj).subscribe(function (resp) {
                          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this2, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
                            var _this3 = this;

                            var data, subCat, resData, categories;
                            return regeneratorRuntime.wrap(function _callee10$(_context10) {
                              while (1) {
                                switch (_context10.prev = _context10.next) {
                                  case 0:
                                    localStorage.setItem("authToken", resp.auth_token);
                                    console.log({
                                      Login: resp
                                    });

                                    if (!resp.status) {
                                      _context10.next = 19;
                                      break;
                                    }

                                    localStorage.setItem("userId", resp.userId); // Fetch Profile data

                                    this.profileService.getProfile().subscribe(function (event) {
                                      console.log({
                                        Profile: event
                                      });

                                      if (event.status) {
                                        localStorage.setItem("profileData", JSON.stringify(event.data));
                                      }
                                    });
                                    subCat = [];
                                    resData = [];
                                    categories = []; // Fetch Topics data

                                    this.serviceRequest.getAllServiceRequestCategories(data).subscribe(function (res) {
                                      return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this3, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
                                        var _b, _c, catBasedID, _iterator, _step, cat, i, temp, tmp, _iterator2, _step2, sep;

                                        return regeneratorRuntime.wrap(function _callee5$(_context5) {
                                          while (1) {
                                            switch (_context5.prev = _context5.next) {
                                              case 0:
                                                console.log({
                                                  Topics: res
                                                });

                                                if (res.status === true) {
                                                  resData = res.data;
                                                  catBasedID = {};
                                                  _iterator = _createForOfIteratorHelper(resData);

                                                  try {
                                                    for (_iterator.s(); !(_step = _iterator.n()).done;) {
                                                      cat = _step.value;
                                                      categories.push(cat.category);
                                                      catBasedID[cat.topicId] = cat;
                                                    }
                                                  } catch (err) {
                                                    _iterator.e(err);
                                                  } finally {
                                                    _iterator.f();
                                                  }

                                                  localStorage.setItem("IdBasedCat", JSON.stringify(catBasedID)); //localStorage.setItem("userId", Enums.CONSTANTS.userId);

                                                  categories = _toConsumableArray(new Set(categories));

                                                  for (i = 0; i < categories.length; i++) {
                                                    temp = [];
                                                    _iterator2 = _createForOfIteratorHelper(resData);

                                                    try {
                                                      for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
                                                        sep = _step2.value;

                                                        if (sep.category === categories[i]) {
                                                          temp.push({
                                                            category_desc: sep === null || sep === void 0 ? void 0 : sep.categoryDesc,
                                                            category_id: sep === null || sep === void 0 ? void 0 : sep.topicId,
                                                            category_type: sep === null || sep === void 0 ? void 0 : sep.category,
                                                            id: sep === null || sep === void 0 ? void 0 : sep.id,
                                                            favourite: (_b = sep === null || sep === void 0 ? void 0 : sep.properties) === null || _b === void 0 ? void 0 : _b.favourite,
                                                            tags: (_c = sep === null || sep === void 0 ? void 0 : sep.properties) === null || _c === void 0 ? void 0 : _c.tags,
                                                            help_text: sep === null || sep === void 0 ? void 0 : sep.help_text
                                                          });
                                                          tmp = sep.category;
                                                        }
                                                      }
                                                    } catch (err) {
                                                      _iterator2.e(err);
                                                    } finally {
                                                      _iterator2.f();
                                                    }

                                                    subCat.push({
                                                      "category_desc": tmp,
                                                      "subCate": temp
                                                    });
                                                    localStorage.setItem("subCat", JSON.stringify(subCat));
                                                  }

                                                  this.navCtrl.navigateRoot(['./tab/my-dashboard']);
                                                  this.mobileNumber = ""; //this.password = "";
                                                }

                                              case 2:
                                              case "end":
                                                return _context5.stop();
                                            }
                                          }
                                        }, _callee5, this);
                                      }));
                                    }); // Fetch ticket Document type list

                                    this.serviceRequest.getDocList().subscribe(function (res) {
                                      return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this3, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
                                        return regeneratorRuntime.wrap(function _callee6$(_context6) {
                                          while (1) {
                                            switch (_context6.prev = _context6.next) {
                                              case 0:
                                                if (res.status === true) {
                                                  localStorage.setItem("ticketDocTypeList", JSON.stringify(res === null || res === void 0 ? void 0 : res.data));
                                                  console.log("ticketDocTypeList: ", res.data);
                                                }

                                              case 1:
                                              case "end":
                                                return _context6.stop();
                                            }
                                          }
                                        }, _callee6);
                                      }));
                                    }); // Fetch vehicle Document type list

                                    this.vehicleService.getVehicleDocList().subscribe(function (res) {
                                      return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this3, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
                                        return regeneratorRuntime.wrap(function _callee7$(_context7) {
                                          while (1) {
                                            switch (_context7.prev = _context7.next) {
                                              case 0:
                                                if (res.status === true) {
                                                  localStorage.setItem("vehicleDocTypeList", JSON.stringify(res === null || res === void 0 ? void 0 : res.data));
                                                  console.log("vehicleDocTypeList: ", res.data);
                                                }

                                              case 1:
                                              case "end":
                                                return _context7.stop();
                                            }
                                          }
                                        }, _callee7);
                                      }));
                                    }); // Fetch vechile data

                                    this.vehicleService.getAllVehicle(0).subscribe(function (res) {
                                      console.log({
                                        Vehicle: res
                                      });

                                      if (res.status === true) {
                                        var col = res.columns;
                                        var _data = res.data;

                                        _this3.vehicleService.log({
                                          Columns: col,
                                          Data: _data
                                        });

                                        var vehicleList = _this3.vehicleService.mapColData(col, _data);

                                        var vehicleNumberList = {};

                                        var _iterator3 = _createForOfIteratorHelper(vehicleList),
                                            _step3;

                                        try {
                                          for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
                                            var vnum = _step3.value;
                                            vehicleNumberList[vnum.vrn] = vnum;
                                          }
                                        } catch (err) {
                                          _iterator3.e(err);
                                        } finally {
                                          _iterator3.f();
                                        }

                                        localStorage.setItem("vehicleList", JSON.stringify(vehicleNumberList));
                                      }
                                    });
                                    _context10.next = 14;
                                    return this.fcmService.initPush();

                                  case 14:
                                    this.fcmService.localInit.subscribe(function (data) {
                                      return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this3, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
                                        var _this4 = this;

                                        var info;
                                        return regeneratorRuntime.wrap(function _callee9$(_context9) {
                                          while (1) {
                                            switch (_context9.prev = _context9.next) {
                                              case 0:
                                                //this.isLoggedIn = (data.state === 'login') ? true : false;
                                                this.fcmService.log({
                                                  localInitData: data
                                                });

                                                if (!(_capacitor_core__WEBPACK_IMPORTED_MODULE_17__["Capacitor"].getPlatform() != 'web')) {
                                                  _context9.next = 8;
                                                  break;
                                                }

                                                _context9.next = 4;
                                                return _capacitor_device__WEBPACK_IMPORTED_MODULE_18__["Device"].getId();

                                              case 4:
                                                info = _context9.sent;
                                                this.deviceId = info.uuid;
                                                _context9.next = 8;
                                                return this.authService.localAPI(this.deviceId).subscribe(function (resp1) {
                                                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this4, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
                                                    return regeneratorRuntime.wrap(function _callee8$(_context8) {
                                                      while (1) {
                                                        switch (_context8.prev = _context8.next) {
                                                          case 0:
                                                            console.log({
                                                              localAPI: resp1
                                                            });

                                                            if (resp1.status) {
                                                              localStorage.setItem("localInitTimeStamp", new Date().toISOString());
                                                            }

                                                          case 2:
                                                          case "end":
                                                            return _context8.stop();
                                                        }
                                                      }
                                                    }, _callee8);
                                                  }));
                                                });

                                              case 8:
                                              case "end":
                                                return _context9.stop();
                                            }
                                          }
                                        }, _callee9, this);
                                      }));
                                    });
                                    _context10.next = 17;
                                    return this.commonService.hideLoader();

                                  case 17:
                                    _context10.next = 23;
                                    break;

                                  case 19:
                                    this.loginError = resp.message;
                                    _context10.next = 22;
                                    return this.commonService.hideLoader();

                                  case 22:
                                    this.commonService.errorToast(this.loginError);

                                  case 23:
                                  case "end":
                                    return _context10.stop();
                                }
                              }
                            }, _callee10, this);
                          }));
                        }, function (error) {
                          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this2, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
                            return regeneratorRuntime.wrap(function _callee11$(_context11) {
                              while (1) {
                                switch (_context11.prev = _context11.next) {
                                  case 0:
                                    this.loginError = error.message;
                                    _context11.next = 3;
                                    return this.commonService.hideLoader();

                                  case 3:
                                    this.commonService.errorToast(this.loginError);

                                  case 4:
                                  case "end":
                                    return _context11.stop();
                                }
                              }
                            }, _callee11, this);
                          }));
                        });
                      } else {
                        this.commonService.errorToast("Please enter registered mobile number");
                      }

                      _context12.next = 10;
                      break;

                    case 6:
                      _context12.prev = 6;
                      _context12.t0 = _context12["catch"](0);
                      _obj = {
                        fileName: this.fileName,
                        functionName: 'sign_up()',
                        error: _context12.t0
                      };
                      this.commonService.systemException(_obj);

                    case 10:
                    case "end":
                      return _context12.stop();
                  }
                }
              }, _callee12, this, [[0, 6]]);
            }));
          }
        }]);

        return SignInPage;
      }();

      SignInPage.ctorParameters = function () {
        return [{
          type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]
        }, {
          type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"]
        }, {
          type: src_services_fcm_service__WEBPACK_IMPORTED_MODULE_16__["FcmService"]
        }, {
          type: src_services_common_service__WEBPACK_IMPORTED_MODULE_7__["CommonService"]
        }, {
          type: src_services_myevent_services__WEBPACK_IMPORTED_MODULE_6__["MyEvent"]
        }, {
          type: _ionic_angular__WEBPACK_IMPORTED_MODULE_8__["AlertController"]
        }, {
          type: src_services_auth_service__WEBPACK_IMPORTED_MODULE_9__["AuthService"]
        }, {
          type: _ionic_angular__WEBPACK_IMPORTED_MODULE_8__["NavController"]
        }, {
          type: src_services_profile_service__WEBPACK_IMPORTED_MODULE_13__["ProfileService"]
        }, {
          type: src_services_service_request_service__WEBPACK_IMPORTED_MODULE_14__["ServiceRequestService"]
        }, {
          type: src_services_vehicle_service__WEBPACK_IMPORTED_MODULE_15__["VehicleService"]
        }, {
          type: src_services_firestore_service__WEBPACK_IMPORTED_MODULE_11__["FirestoreService"]
        }];
      };

      SignInPage = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-sign-in',
        template: _raw_loader_sign_in_page_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_sign_in_page_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
      }), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"], _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormBuilder"], src_services_fcm_service__WEBPACK_IMPORTED_MODULE_16__["FcmService"], src_services_common_service__WEBPACK_IMPORTED_MODULE_7__["CommonService"], src_services_myevent_services__WEBPACK_IMPORTED_MODULE_6__["MyEvent"], _ionic_angular__WEBPACK_IMPORTED_MODULE_8__["AlertController"], src_services_auth_service__WEBPACK_IMPORTED_MODULE_9__["AuthService"], _ionic_angular__WEBPACK_IMPORTED_MODULE_8__["NavController"], src_services_profile_service__WEBPACK_IMPORTED_MODULE_13__["ProfileService"], src_services_service_request_service__WEBPACK_IMPORTED_MODULE_14__["ServiceRequestService"], src_services_vehicle_service__WEBPACK_IMPORTED_MODULE_15__["VehicleService"], src_services_firestore_service__WEBPACK_IMPORTED_MODULE_11__["FirestoreService"]])], SignInPage);
      /***/
    },

    /***/
    "i5US":
    /*!*******************************************!*\
      !*** ./src/app/sign-in/sign-in.page.scss ***!
      \*******************************************/

    /*! exports provided: default */

    /***/
    function i5US(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony default export */


      __webpack_exports__["default"] = ".applogo {\n  padding-top: 20%;\n}\n\n.img {\n  height: 200px;\n  width: 80px;\n  margin: auto;\n  padding-top: 25px;\n}\n\nion-header ion-toolbar {\n  --background:white;\n}\n\n.logo {\n  width: 100%;\n  display: flex;\n  height: 320px;\n  overflow: hidden;\n}\n\n.logo h2 {\n  color: var(--white);\n  font-weight: 400;\n  margin: 0;\n  font-size: 2.1rem;\n  margin: auto;\n  position: relative;\n  z-index: 99;\n}\n\n.logo h2 span {\n  font-weight: 700;\n}\n\n.slogan {\n  padding-top: 5px;\n  color: var(--secondary);\n  margin: auto;\n  text-align: center;\n  font-size: var(--title_font_size);\n}\n\n.form {\n  margin: 10% auto;\n  color: var(--primary);\n  background-color: white;\n  position: relative;\n  z-index: 99;\n}\n\n.form ion-item {\n  padding-top: 13px;\n  padding-bottom: 13px;\n  padding-left: 5px;\n  border-radius: 5px;\n  border-color: var(--secondary);\n  border-width: 1px;\n  border-style: solid;\n}\n\n.form h2 {\n  font-size: 1.2rem;\n  margin: 0;\n  margin-bottom: 35px;\n  position: relative;\n}\n\n.form h2::after, .form h2::before {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  margin: auto 0;\n  width: 55px;\n  height: 3px;\n  background: var(--primary);\n  border-radius: 50px;\n}\n\n.form h2::after {\n  left: unset;\n  right: 0;\n}\n\n.form h3 {\n  font-size: 1rem;\n  margin: 0;\n  font-weight: 400;\n}\n\n.form ion-list {\n  margin-top: 20px;\n}\n\n.form ion-list .button.btn {\n  height: 43px;\n}\n\n.form ion-list ion-input {\n  color: var(--text-dark);\n  font-weight: 700 !important;\n  font-size: var(--text_font_size) !important;\n  padding-bottom: 50px;\n}\n\n.form ion-list .label {\n  color: var(--text-light) !important;\n  width: 100% !important;\n  padding-bottom: 8px;\n  font-weight: 500 !important;\n  font-size: var(--sub_title_font_size) !important;\n}\n\n.form ion-list ion-button {\n  font-size: var(--title_font_size);\n  margin-bottom: 10px;\n}\n\n.form p {\n  margin: auto;\n}\n\nion-tab-button {\n  background: white;\n  font-weight: bold;\n}\n\nd-flex {\n  align-items: center;\n}\n/*# sourceMappingURL=data:application/json;base64,  */";
      /***/
    },

    /***/
    "j1PK":
    /*!***************************************************!*\
      !*** ./src/app/sign-in/sign-in-routing.module.ts ***!
      \***************************************************/

    /*! exports provided: SignInPageRoutingModule */

    /***/
    function j1PK(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "SignInPageRoutingModule", function () {
        return SignInPageRoutingModule;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @angular/router */
      "tyNb");
      /* harmony import */


      var _sign_in_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./sign-in.page */
      "WawN");

      var routes = [{
        path: '',
        component: _sign_in_page__WEBPACK_IMPORTED_MODULE_3__["SignInPage"]
      }]; // const routes: Routes = [
      //   {
      //     path: '',
      //     component: SignInPage,
      //     children: [
      //       {
      //         path: 'sign-in-otp',
      //         children: [
      //           {
      //             path: '',
      //             loadChildren: () => import('../sign-in-otp/sign-in-otp.module').then(m => m.SignInOtpPageModule)
      //           }
      //         ]
      //       },
      //       {
      //         path: 'sign-in-userid',
      //         children: [
      //           {
      //             path: '',
      //             loadChildren: () => import('../sign-in-userid/sign-in-userid.module').then(m => m.SignInUseridPageModule)
      //           }
      //         ]
      //       },
      //       {
      //         path: '',
      //         redirectTo: 'sign-in-otp',
      //         pathMatch: 'full'
      //       }
      //     ]
      //   },
      //   {
      //     path: '',
      //     redirectTo: 'sign-in-otp',
      //     pathMatch: 'full'
      //   }
      // ];

      var SignInPageRoutingModule = function SignInPageRoutingModule() {
        _classCallCheck(this, SignInPageRoutingModule);
      };

      SignInPageRoutingModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        imports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"].forChild(routes)],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"]]
      })], SignInPageRoutingModule);
      /***/
    }
  }]);
})();
//# sourceMappingURL=sign-in-sign-in-module-es5.js.map