(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[3997],{

/***/ 28375:
/*!************************************************************************************************************************!*\
  !*** ./src/app/register/has-company/identity-validator-code-company/identity-validator-code-company-routing.module.ts ***!
  \************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "IdentityValidatorCodeCompanyPageRoutingModule": () => (/* binding */ IdentityValidatorCodeCompanyPageRoutingModule)
/* harmony export */ });
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/router */ 61380);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _identity_validator_code_company_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity-validator-code-company.page */ 63087);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_2__);




const routes = [
    {
        path: '',
        component: _identity_validator_code_company_page__WEBPACK_IMPORTED_MODULE_1__.IdentityValidatorCodeCompanyPage
    }
];
class IdentityValidatorCodeCompanyPageRoutingModule {
}
IdentityValidatorCodeCompanyPageRoutingModule.ɵfac = function IdentityValidatorCodeCompanyPageRoutingModule_Factory(t) { return new (t || IdentityValidatorCodeCompanyPageRoutingModule)(); };
IdentityValidatorCodeCompanyPageRoutingModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineNgModule"]({ type: IdentityValidatorCodeCompanyPageRoutingModule });
IdentityValidatorCodeCompanyPageRoutingModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineInjector"]({ imports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule.forChild(routes), _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵsetNgModuleScope"](IdentityValidatorCodeCompanyPageRoutingModule, { imports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule], exports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] }); })();


/***/ }),

/***/ 63997:
/*!****************************************************************************************************************!*\
  !*** ./src/app/register/has-company/identity-validator-code-company/identity-validator-code-company.module.ts ***!
  \****************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "IdentityValidatorCodeCompanyPageModule": () => (/* binding */ IdentityValidatorCodeCompanyPageModule)
/* harmony export */ });
/* harmony import */ var _identity_validator_code_company_routing_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity-validator-code-company-routing.module */ 28375);
/* harmony import */ var _shared_components_components_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @shared/components/components.module */ 15626);
/* harmony import */ var src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/shared-module/shared-module.module */ 69270);
/* harmony import */ var _identity_validator_code_company_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./identity-validator-code-company.page */ 63087);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_4__);





class IdentityValidatorCodeCompanyPageModule {
}
IdentityValidatorCodeCompanyPageModule.ɵfac = function IdentityValidatorCodeCompanyPageModule_Factory(t) { return new (t || IdentityValidatorCodeCompanyPageModule)(); };
IdentityValidatorCodeCompanyPageModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineNgModule"]({ type: IdentityValidatorCodeCompanyPageModule });
IdentityValidatorCodeCompanyPageModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjector"]({ imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__.SharedModuleModule, _shared_components_components_module__WEBPACK_IMPORTED_MODULE_1__.ComponentsModule, _identity_validator_code_company_routing_module__WEBPACK_IMPORTED_MODULE_0__.IdentityValidatorCodeCompanyPageRoutingModule] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵsetNgModuleScope"](IdentityValidatorCodeCompanyPageModule, { declarations: [_identity_validator_code_company_page__WEBPACK_IMPORTED_MODULE_3__.IdentityValidatorCodeCompanyPage], imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__.SharedModuleModule, _shared_components_components_module__WEBPACK_IMPORTED_MODULE_1__.ComponentsModule, _identity_validator_code_company_routing_module__WEBPACK_IMPORTED_MODULE_0__.IdentityValidatorCodeCompanyPageRoutingModule] }); })();


/***/ }),

/***/ 63087:
/*!**************************************************************************************************************!*\
  !*** ./src/app/register/has-company/identity-validator-code-company/identity-validator-code-company.page.ts ***!
  \**************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "IdentityValidatorCodeCompanyPage": () => (/* binding */ IdentityValidatorCodeCompanyPage)
/* harmony export */ });
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ 59584);
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_common_http__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/forms */ 2508);
/* harmony import */ var _shared_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @shared/components */ 7667);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/router */ 61380);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _shared_services__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @shared/services */ 17253);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @ionic/angular */ 93819);
/* harmony import */ var _shared_services_focus_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @shared/services/focus.service */ 37763);
/* harmony import */ var _shared_services_init_register_has_company_storage_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @shared/services/init.register.has-company.storage.service */ 91056);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ 90944);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _shared_components_full_logo_full_logo_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../shared/components/full-logo/full-logo.component */ 33159);
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @ngx-translate/core */ 38699);















const _c0 = function (a0) {
  return {
    "min-height": a0,
    "position": "relative"
  };
};

class IdentityValidatorCodeCompanyPage {
  constructor(formBuilder, activatedRoute, navigationService, loadingService, deviceInfoService, ngZoneService, api, notificatorService, warnConflictModalService, sendVerificationEmailModalService, logService, commonService, storageService, keyboardService, translateConfigService, modalCtrl, focusService, authService, showToastModalErroCodeZero, initRegisterHasCompanyStorageService) {
    var _this = this;

    this.formBuilder = formBuilder;
    this.activatedRoute = activatedRoute;
    this.navigationService = navigationService;
    this.loadingService = loadingService;
    this.deviceInfoService = deviceInfoService;
    this.ngZoneService = ngZoneService;
    this.api = api;
    this.notificatorService = notificatorService;
    this.warnConflictModalService = warnConflictModalService;
    this.sendVerificationEmailModalService = sendVerificationEmailModalService;
    this.logService = logService;
    this.commonService = commonService;
    this.storageService = storageService;
    this.keyboardService = keyboardService;
    this.translateConfigService = translateConfigService;
    this.modalCtrl = modalCtrl;
    this.focusService = focusService;
    this.authService = authService;
    this.showToastModalErroCodeZero = showToastModalErroCodeZero;
    this.initRegisterHasCompanyStorageService = initRegisterHasCompanyStorageService;
    this.timeoutDefatultToastnotification = 5000;

    this.onSendVerificationEmailModalStateChange = /*#__PURE__*/function () {
      var _ref = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (state) {
        yield _this.ngZoneService.run(() => {
          _this.showSendVerificationEmailModal = state.show;
          _this.emailSendVerificationEmailModal = state.email;
        });
      });

      return function (_x) {
        return _ref.apply(this, arguments);
      };
    }();

    this.onWarnConflictModalStateChange = /*#__PURE__*/function () {
      var _ref2 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (state) {
        yield _this.ngZoneService.run(() => {
          _this.showWarnConflictModal = state.show;
          _this.emailWarnConflictModal = state.email;
        });
      });

      return function (_x2) {
        return _ref2.apply(this, arguments);
      };
    }();

    this.onSubmit = () => {
      const errors = this.companyCodeForm.get('code').errors;
      const title = this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_INVALID_CODE_TITLE');
      const message = this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_INVALID_CODE_MESSAGE');

      if (errors) {
        const notification = {
          title,
          message,
          type: 'error'
        };
        this.notificatorService.notify(notification);
      } else {
        this.submitted = true;
        let onHideSubscription = null;

        const onKeyboardHideCallback = () => {
          if (onHideSubscription) {
            onHideSubscription.unsubscribe();
          }

          this.loadingService.show(this.translateConfigService.translate('LOADING_PROCESSING_DATA'), 'identity-validator-company-code');
          const code = this.commonService.clearString(this.companyCodeForm.controls.code.value);
          const uuid = this.uuid;
          const document = this.document;
          const firstName = this.firstName;
          const lastName = this.lastName;
          const activated = this.activated;
          const foreigner = this.foreign;

          if (this.conflict && this.conflict === 'found') {
            this.handleFoundConflictType(code, uuid, document, foreigner);
          } else if (this.conflict && this.conflict === 'notFound') {
            this.handleNotFoundConflictType(code, uuid, document, firstName, lastName, foreigner);
          } else if (activated) {
            this.handleResetFinish(code, uuid, document, foreigner);
          } else if (!activated) {
            this.handleRegister(code, uuid, document, firstName, lastName, foreigner);
          } else {
            this.handleRegister(code, uuid, document, firstName, lastName, foreigner);
          }
        };

        onHideSubscription = this.keyboardService.onHideObservable?.subscribe(onKeyboardHideCallback);

        if (!this.keyboardService.isVisible()) {
          onKeyboardHideCallback();
        } else {
          this.keyboardService.hide();
        }
      }
    };

    this.handleFoundConflictType = (code, uuid, document, foreigner = false) => {
      this.handleResetFinish(code, uuid, document, foreigner);
    };

    this.handleNotFoundConflictType = (code, uuid, document, firstName, lastName, foreigner = false) => {
      this.handleRegister(code, uuid, document, firstName, lastName, foreigner);
    };

    this.handleRegister = (code, uuid, document, firstName, lastName, foreigner = false) => {
      let lang = this.translateConfigService.getCurrentLang() ? this.translateConfigService.getCurrentLang() : 'en';

      if (lang === 'pt') {
        lang = 'pt-br';
      }

      this.api.accountRegister(uuid, document, firstName, lastName, null, lang, code, foreigner).subscribe(response => this.onAccountRegisterSuccessResponse(response, code, uuid, document, foreigner), this.onAccountRegisterErrorResponse);
    };

    this.onAccountRegisterSuccessResponse = (response, code, uuid, document, foreigner = false) => {
      this.api.accountActivate(code, uuid, document, foreigner).subscribe(this.accountActivateSuccessResponse, this.accountActivateErrorResponse);
    };

    this.onAccountRegisterErrorResponse = response => {
      console.log('onSubmitErrorResponse');
      console.log(response);
      this.submitted = false;
      this.logService.logError('http::onAccountRegisterErrorResponse', '', response);
      this.loadingService.hide(null, 'identity-validator-company-code').then();

      if (response) {
        if (response.status === 400 && response.error.errorKey === 'nomatch') {
          const titleNomatch = this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_NOMATCH_TITTLE');
          const messageNomatch = this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_NOMATCH_MESSAGE');
          const notification = {
            title: titleNomatch,
            message: messageNomatch,
            type: 'error',
            timeout: 10000,
            action: {
              label: this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_NOMATCH_MESSAGE_ACTION_LABEL'),
              customAction: this.openModalNoMatchName.bind(this)
            }
          };
          return this.notificatorService.notify(notification);
        } else if (response.status === 400) {
          const title = this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_USED_OR_INVALID_CODE_TITLE');
          const message = this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_USED_OR_INVALID_CODE_MESSAGE');
          this.toastNotificationError(title, message, this.timeoutDefatultToastnotification);
        } else if (response.status) {
          const {
            title,
            message
          } = this.getTitleAndMessage(response);
          return this.toastNotificationError(title, message, 10000);
        }
      } else {
        const title = this.translateConfigService.translate('TOAST_TITLE_ERROR');
        const message = `${this.translateConfigService.translate('TOAST_SERVICE_TEMPORARILY_UNAVAILABLE_MESSAGE')} (cod.  NoCoDeTyPe)`;
        this.toastNotificationError(title, message, 10000);
      }
    };

    this.handleResetFinish = (code, uuid, document, foreigner = false) => {
      this.api.accountDeviceMailessResetInit(uuid, document, foreigner).subscribe(() => {
        this.api.accountDeviceResetFinish(code, uuid, document, foreigner).subscribe(this.accountActivateSuccessResponse, this.accountActivateErrorResponse);
      }, () => {
        this.submitted = false;
        this.loadingService.hide(null, 'identity-validator-company-code');
      });
    };

    this.accountActivateSuccessResponse = /*#__PURE__*/function () {
      var _ref3 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (response) {
        _this.submitted = false;
        yield _this.loadingService.hide(null, 'identity-validator-company-code');

        if (response) {
          if (response.codeType === 'email-validation') {
            _this.goToEmailValidationNextStep();
          } else if (response.codeType === 'company-invite') {
            _this.storageService.set('company-invitation-data', {
              locator: response.locator,
              invitationKey: response.invitationKey
            });

            _this.goToEmailValidationNextStep();
          } else {
            const {
              title,
              message
            } = _this.getTitleAndMessage(response);

            _this.toastNotificationError(title, message, 10000);
          }
        } else {
          const {
            title,
            message
          } = _this.getTitleAndMessage(response);

          _this.toastNotificationError(title, message, 10000);
        }
      });

      return function (_x3) {
        return _ref3.apply(this, arguments);
      };
    }();

    this.accountActivateErrorResponse = /*#__PURE__*/function () {
      var _ref4 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (response) {
        console.log('accountActivateErrorResponse');
        console.log(response);
        _this.submitted = false;
        yield _this.loadingService.hide(null, 'identity-validator-company-code');

        if (response?.status === 0) {
          _this.showToastModalErroCodeZero.showToast();

          _this.logService.logError('http::accountActivateErrorResponse', 'Unknown error', response);

          return;
        }

        if (response && response.error && response.error.status === 400) {
          let notification;

          if (response.error.message === 'error.nomatch') {
            _this.logService.logError('http::accountActivateErrorResponseNoMatch', '', response);

            const titleNomatch = _this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_NOMATCH_TITTLE');

            const messageNomatch = _this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_NOMATCH_MESSAGE');

            notification = {
              title: titleNomatch,
              message: messageNomatch,
              type: 'error',
              timeout: 10000,
              action: {
                label: _this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_NOMATCH_MESSAGE_ACTION_LABEL'),
                customAction: _this.openModalNoMatchName.bind(_this)
              }
            };
          } else if (response.error.message === 'error.nomatchforeignflag') {
            const translateKey = _this.foreign ? 'PG_IDENTIFY_COMPANY_CODE_TOAST_NOT_ENABLED_FOREINGFLAG_MESSAGE' : 'PG_IDENTIFY_COMPANY_CODE_TOAST_NOMATCHFOREINGFLAG_MESSAGE';

            _this.logService.logError('http::accountActivateErrorResponseNoMatch', '', response);

            const titleNomatchForeignflag = _this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_NOMATCHFOREINGFLAG_TITLE');

            const messageNomatchForeignflag = _this.translateConfigService.translate(translateKey);

            notification = {
              title: titleNomatchForeignflag,
              message: messageNomatchForeignflag,
              type: 'error',
              timeout: 10000
            };
          } else {
            _this.logService.logError('http::accountActivateErrorResponseOther', '', response);

            const titleInvalidData = _this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_INVALID_DATA_TITLE');

            const messageIvalidData = _this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_TOAST_INVALID_DATA_MESSAGE');

            notification = {
              title: titleInvalidData,
              message: messageIvalidData,
              type: 'error',
              timeout: 5000
            };
          }

          _this.notificatorService.notify(notification);
        } else {
          _this.logService.logError('http::accountActivateErrorResponse', '', response);

          if (response instanceof _angular_common_http__WEBPACK_IMPORTED_MODULE_1__.HttpErrorResponse) {
            const {
              title,
              message
            } = _this.getTitleAndMessage(response);

            _this.toastNotificationError(title, message, 10000);
          }
        }
      });

      return function (_x4) {
        return _ref4.apply(this, arguments);
      };
    }();

    this.goToEmailValidationNextStep = () => {
      const uuid = this.uuid;
      const document = this.document;
      const foreign = this.foreign;
      const navigationOptions = {
        queryParams: {
          uuid,
          document,
          foreign
        }
      };
      this.navigationService.forward(['/identity-insert-password'], navigationOptions);
    };

    this.stepBack = () => {
      const document = this.document;
      const firstName = this.firstName;
      const lastName = this.lastName;
      const uuid = this.uuid;
      const email = this.email;
      const foreign = this.foreign;
      const navigationOptions = {
        queryParams: {
          document,
          uuid,
          firstName,
          lastName,
          email,
          foreign
        }
      };
      console.log(navigationOptions);
      this.navigationService.back(['/identity-validator-full-name'], navigationOptions);
    };

    this.dontHaveCode = () => {
      if (this.conflict && this.conflict === 'found') {
        this.warnConflictModalService.showModal(this.email);
      } else if (this.conflict && this.conflict === 'notFound') {
        this.goToEmailInsertEmailStep();
      } else if (this.activated) {
        this.sendVerificationEmailModalService.showModal(this.email);
      } else if (!this.activated) {
        this.goToEmailInsertEmailStep();
      } else {
        this.goToEmailInsertEmailStep();
      }
    };

    this.goToEmailInsertEmailStep = () => {
      const uuid = this.uuid;
      const document = this.document;
      const firstName = this.firstName;
      const lastName = this.lastName;
      const foreign = this.foreign;
      const navigationOptions = {
        queryParams: {
          uuid,
          document,
          firstName,
          lastName,
          foreign
        }
      };
      this.navigationService.forward(['/identity-validator-email'], navigationOptions);
    };

    this.onSendVerificationEmail = () => {
      const uuid = this.uuid;
      const document = this.document;
      const foreign = this.foreign;
      this.loadingService.show(this.translateConfigService.translate('PG_IDENTIFY_COMPANY_CODE_LOADING_SEND_MAIL'), 'send-email-verification');
      this.api.accountDeviceResetInit(uuid, document, foreign, null).subscribe(this.accountDeviceResetInitSuccessResponse, this.accountDeviceResetInitErrorResponse);
    };

    this.onSendVerificationEmailModalBack = () => {
      this.sendVerificationEmailModalService.hideModal();
    };

    this.accountDeviceResetInitSuccessResponse = /*#__PURE__*/(0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      yield _this.loadingService.hide(null, 'send-email-verification');
      const uuid = _this.uuid;
      const document = _this.document;
      const firstName = _this.firstName;
      const lastName = _this.lastName;
      const email = _this.email;
      const foreign = _this.foreign;
      const navigationOptions = {
        queryParams: {
          uuid,
          document,
          firstName,
          lastName,
          email,
          foreign,
          context: 'change-device-identifier'
        }
      };

      _this.sendVerificationEmailModalService.hideModal();

      _this.navigationService.forward(['/identity-validator-code'], navigationOptions);
    });

    this.accountDeviceResetInitErrorResponse = /*#__PURE__*/function () {
      var _ref6 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (response) {
        console.log('accountCheckErrorResponse');
        console.log('response:', response);

        _this.logService.logError('http::account-device-reset-init', '', response);

        yield _this.loadingService.hide(null, 'send-email-verification');

        if (response?.status === 0) {
          _this.showToastModalErroCodeZero.showToast();

          _this.logService.logError('http::account-device-reset-init', 'Unknown error', response);

          return;
        }

        const {
          title,
          message
        } = _this.getTitleAndMessage(response);

        _this.toastNotificationError(title, message, 10000);
      });

      return function (_x5) {
        return _ref6.apply(this, arguments);
      };
    }();

    this.onWarnConflictModalBack = () => {
      this.warnConflictModalService.hideModal();
    };

    this.onWarnConflictModalAccept = () => {
      const email = this.email;
      this.warnConflictModalService.hideModal();
      this.sendVerificationEmailModalService.showModal(email);
    };

    this.activatedRoute.queryParams.subscribe( /*#__PURE__*/function () {
      var _ref7 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (params) {
        console.log(params);
        let uuidStorage = null;
        const storageIsReady = yield _this.storageService.ready();

        if (storageIsReady) {
          uuidStorage = yield _this.authService.getUUID();
        }

        _this.uuid = uuidStorage ? uuidStorage : params.uuid ? params.uuid : ''; // this.document = params.document ? params.document : '';
        // this.firstName = params.firstName ? params.firstName : '';
        // this.lastName = params.lastName ? params.lastName : '';
        // this.email = params.email ? params.email : '';
        // this.conflict = params.conflict ? params.conflict : '';

        _this.activated = params.activated === 'true'; // this.foreign = params.foreign === 'true';
      });

      return function (_x6) {
        return _ref7.apply(this, arguments);
      };
    }());
    this.submitted = false;
  }

  ionViewWillEnter() {
    this.focusService.applyFocusQuerySelector('companyCodeLabel', 100);
    const data = this.initRegisterHasCompanyStorageService.get();

    if (data) {
      this.document = data?.document ?? '';
      this.activated = data?.activated === 'true'; // this.context = data?.context ?? '';
      // this.obfuscatedEmail = data?.obfuscatedEmail ?? '';

      this.foreign = data?.foreign === 'true' || data?.foreign === true;
      this.uuid = data?.uuid ?? null;
      this.firstName = data?.firstName ?? '';
      this.lastName = data?.lastName ?? '';
      this.email = data?.email ?? '';
      this.conflict = data?.conflict ?? '';
      console.log('onViewWillEnter app-identity-validator-code-company hascompany', data);
    }
  }

  ngOnInit() {
    this.companyCodeForm = this.formBuilder.group({
      code: ['', [_angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.minLength(6), _angular_forms__WEBPACK_IMPORTED_MODULE_10__.Validators.maxLength(6)]]
    });
    this.sendVerificationEmailModalService.observable.subscribe(this.onSendVerificationEmailModalStateChange);
    this.warnConflictModalService.observable.subscribe(this.onWarnConflictModalStateChange);
  }

  openModalNoMatchName() {
    var _this2 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const translateKey = _this2.foreign ? 'PG_IDENTIFY_COMPANY_CODE_NOMATCH_MESSAGE_FOREING' : 'PG_IDENTIFY_COMPANY_CODE_NOMATCH_MESSAGE';

      const isSmallDevice = _this2.deviceInfoService.isSmallScreen();

      const isMediumDevice = _this2.deviceInfoService.isMediumSmallScreen();

      const height = _this2.deviceInfoService.getDeviceHeight();

      const defaultDevice = 'modal-generic-component-invalidName class-default';
      const calcHeigth = `calc(100% - 32%)`;
      const cssClass = isSmallDevice ? 'modal-generic-component-invalidName -small' : isMediumDevice ? 'modal-generic-component-invalidName -medium' : defaultDevice;
      const props = {
        title: null,
        description: `${_this2.translateConfigService.translate(translateKey)}`,
        type: 'error',
        typename: _shared_components__WEBPACK_IMPORTED_MODULE_2__.TypenameComponet.nomatchInvalidName,
        img: null,
        actionsButton: [{
          label: _this2.translateConfigService.translate('BTN_CLOSE'),
          enabled: true,
          action: () => _this2.modalCtrl.dismiss()
        }]
      };
      const modal = yield _this2.modalCtrl.create({
        component: _shared_components__WEBPACK_IMPORTED_MODULE_2__.GenericModalComponent,
        cssClass,
        componentProps: {
          props
        }
      });
      modal.style.setProperty('--height', `${calcHeigth}`);
      yield modal.present();
    })();
  }

  back() {
    const document = this.document;
    const firstName = this.firstName;
    const lastName = this.lastName;
    const uuid = this.uuid;
    const email = this.email;
    const foreign = this.foreign;
    const navigationOptions = {
      queryParams: {
        document,
        uuid,
        firstName,
        lastName,
        email,
        foreign
      }
    };
    this.navigationService.back(['has-company/identity-email-confirmation'], navigationOptions);
  }

  getTitleAndMessage(response) {
    let title = '';
    let message = '';
    const codStatus = response?.status ? `(cod. ${response.status})` : '';
    const status = response?.status;
    title = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_SERVICE_ERROR_TITLE');
    message = `${this.translateConfigService.translate('TOAST_SERVICE_TEMPORARILY_UNAVAILABLE_MESSAGE')}  ${codStatus}`;
    return {
      title,
      message
    };
  }

  toastNotificationError(title, message, timeout) {
    const notification = {
      title,
      message,
      type: 'error',
      timeout
    };
    this.notificatorService.notify(notification);
  }

}

IdentityValidatorCodeCompanyPage.ɵfac = function IdentityValidatorCodeCompanyPage_Factory(t) {
  return new (t || IdentityValidatorCodeCompanyPage)(_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_10__.UntypedFormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_4__.ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.NavigationService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.LoadingService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.DeviceInfoService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.NgZoneService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.ApiService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.NotificatorService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.WarnConflictModalService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.SendVerificationEmailModalService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.LogService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.CommonService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.StorageService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.KeyboardService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.TranslateConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_ionic_angular__WEBPACK_IMPORTED_MODULE_11__.ModalController), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services_focus_service__WEBPACK_IMPORTED_MODULE_6__.FocusService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_5__.ShowToastAndModalErroCodeZeroService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](_shared_services_init_register_has_company_storage_service__WEBPACK_IMPORTED_MODULE_7__.InitRegisterHasCompanyStorageService));
};

IdentityValidatorCodeCompanyPage.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineComponent"]({
  type: IdentityValidatorCodeCompanyPage,
  selectors: [["app-identity-validator-code-company"]],
  decls: 29,
  vars: 20,
  consts: [[1, "ion-no-border", 2, "height", "0"], [3, "ngStyle"], [1, "ion-margin-vertical"], ["id", "companyCodeLabel"], [1, "flex-auto"], [3, "formGroup", "ngSubmit"], ["for", "companyCode", 1, "companyCode"], ["tabindex", "1"], [1, "input-holder"], ["tabindex", "2", "id", "companyCode", "type", "code", "formControlName", "code", 3, "placeholder"], [1, "textsub"], [1, "button-holder"], ["type", "button", 1, "back", 3, "click"], ["tabindex", "5"], ["type", "submit", 3, "disabled"], ["tabindex", "3"]],
  template: function IdentityValidatorCodeCompanyPage_Template(rf, ctx) {
    if (rf & 1) {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](0, "ion-header", 0);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](1, "ion-content")(2, "ion-grid", 1)(3, "ion-row")(4, "ion-col", 2);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](5, "app-full-logo", 3);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()();
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](6, "ion-row", 4)(7, "ion-col", 2)(8, "form", 5);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("ngSubmit", function IdentityValidatorCodeCompanyPage_Template_form_ngSubmit_8_listener() {
        return ctx.onSubmit();
      });
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](9, "div", 6)(10, "p", 7);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](11);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](12, "translate");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()();
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](13, "div", 8);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](14, "input", 9);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](15, "translate");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](16, "div", 10)(17, "p");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](18);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](19, "translate");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()();
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](20, "div", 11)(21, "button", 12);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("click", function IdentityValidatorCodeCompanyPage_Template_button_click_21_listener() {
        return ctx.back();
      });
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](22, "span", 13);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](23);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](24, "translate");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()();
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](25, "button", 14)(26, "span", 15);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](27);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](28, "translate");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()()()()()()()();
    }

    if (rf & 2) {
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngStyle", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpureFunction1"](18, _c0, ctx.deviceInfoService.getDeviceHeight() + "px"));
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](6);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("formGroup", ctx.companyCodeForm);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](3);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](12, 8, "HAS_COMPANY_REGISTER.CODE_COMPANY_PAGE.VERIFY_YOUR_REGISTERED_EMAIL"), " ");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](3);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("placeholder", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](15, 10, "HAS_COMPANY_REGISTER.CODE_COMPANY_PAGE.PLACEHOLDER"));
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](4);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](19, 12, "HAS_COMPANY_REGISTER.CODE_COMPANY_PAGE.IF_YOU_DONT_FIND"));
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](5);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](24, 14, "BTN_BACK"), "");
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("disabled", ctx.submitted);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](2);
      _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](28, 16, "BTN_NEXT"));
    }
  },
  dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_8__.NgStyle, _ionic_angular__WEBPACK_IMPORTED_MODULE_11__.IonCol, _ionic_angular__WEBPACK_IMPORTED_MODULE_11__.IonContent, _ionic_angular__WEBPACK_IMPORTED_MODULE_11__.IonGrid, _ionic_angular__WEBPACK_IMPORTED_MODULE_11__.IonHeader, _ionic_angular__WEBPACK_IMPORTED_MODULE_11__.IonRow, _angular_forms__WEBPACK_IMPORTED_MODULE_10__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_10__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.FormControlName, _shared_components_full_logo_full_logo_component__WEBPACK_IMPORTED_MODULE_9__.FullLogoComponent, _ngx_translate_core__WEBPACK_IMPORTED_MODULE_12__.TranslatePipe],
  styles: [".button-holder.center[_ngcontent-%COMP%] {\n  position: absolute;\n  bottom: 24px;\n  text-align: center;\n  width: 100vw;\n  left: 0;\n  font-size: 0.9em;\n  color: #656768;\n  padding: 1em 0;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\ninput[_ngcontent-%COMP%] {\n  text-align: center;\n}\n\n.dontHaveCode[_ngcontent-%COMP%] {\n  bottom: calc(20px + env(safe-area-inset-bottom)) !important;\n}\n\nion-label[_ngcontent-%COMP%] {\n  color: #656768;\n  font-weight: 500;\n}\n\n.companyCode[_ngcontent-%COMP%] {\n  margin: 1em 2em 2em;\n  font-size: 1em;\n  color: #656768;\n  display: flex;\n  text-align: justify;\n}\n\n.textsub[_ngcontent-%COMP%] {\n  margin: 2em;\n  font-size: 1em;\n  color: #656768;\n  display: flex;\n  text-align: justify;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlkZW50aXR5LXZhbGlkYXRvci1jb2RlLWNvbXBhbnkucGFnZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0Usa0JBQUE7RUFDQSxZQUFBO0VBQ0Esa0JBQUE7RUFDQSxZQUFBO0VBQ0EsT0FBQTtFQUNBLGdCQUFBO0VBQ0EsY0FBQTtFQUNBLGNBQUE7RUFDQSxhQUFBO0VBQ0EsbUJBQUE7RUFDQSx1QkFBQTtBQUNGOztBQUVBO0VBQ0Usa0JBQUE7QUFDRjs7QUFFQTtFQUNFLDJEQUFBO0FBQ0Y7O0FBRUE7RUFDRSxjQUFBO0VBQ0EsZ0JBQUE7QUFDRjs7QUFFQTtFQUNFLG1CQUFBO0VBQ0EsY0FBQTtFQUNBLGNBQUE7RUFDQSxhQUFBO0VBQ0EsbUJBQUE7QUFDRjs7QUFFQTtFQUNFLFdBQUE7RUFDQSxjQUFBO0VBQ0EsY0FBQTtFQUNBLGFBQUE7RUFDQSxtQkFBQTtBQUNGIiwiZmlsZSI6ImlkZW50aXR5LXZhbGlkYXRvci1jb2RlLWNvbXBhbnkucGFnZS5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmJ1dHRvbi1ob2xkZXIuY2VudGVyIHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICBib3R0b206IDI0cHg7XG4gIHRleHQtYWxpZ246IGNlbnRlcjtcbiAgd2lkdGg6IDEwMHZ3O1xuICBsZWZ0OiAwO1xuICBmb250LXNpemU6IDAuOWVtO1xuICBjb2xvcjogIzY1Njc2ODtcbiAgcGFkZGluZzogMWVtIDA7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xufVxuXG5pbnB1dCB7XG4gIHRleHQtYWxpZ246IGNlbnRlcjtcbn1cblxuLmRvbnRIYXZlQ29kZSB7XG4gIGJvdHRvbTogY2FsYygyMHB4ICsgZW52KHNhZmUtYXJlYS1pbnNldC1ib3R0b20pKSAhaW1wb3J0YW50O1xufVxuXG5pb24tbGFiZWwge1xuICBjb2xvcjogIzY1Njc2ODtcbiAgZm9udC13ZWlnaHQ6IDUwMDtcbn1cblxuLmNvbXBhbnlDb2RlIHtcbiAgbWFyZ2luOiAxZW0gMmVtIDJlbTtcbiAgZm9udC1zaXplOiAxZW07XG4gIGNvbG9yOiAjNjU2NzY4O1xuICBkaXNwbGF5OiBmbGV4O1xuICB0ZXh0LWFsaWduOiBqdXN0aWZ5O1xufVxuXG4udGV4dHN1YiB7XG4gIG1hcmdpbjogMmVtO1xuICBmb250LXNpemU6IDFlbTtcbiAgY29sb3I6ICM2NTY3Njg7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIHRleHQtYWxpZ246IGp1c3RpZnk7XG59XG4iXX0= */"]
});

/***/ }),

/***/ 37763:
/*!**************************************************!*\
  !*** ./src/app/shared/services/focus.service.ts ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FocusService": () => (/* binding */ FocusService)
/* harmony export */ });
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/router */ 61380);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ 59151);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_1__);




class FocusService {
    constructor(router) {
        this.router = router;
    }
    focusInRouterNavigate() {
        this.router.events.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.filter)(event => event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_0__.NavigationEnd)).subscribe(() => {
            const mainHeader = document.querySelector('#focusHeader');
            if (mainHeader) {
                mainHeader?.focus();
            }
        });
    }
    /**
     *
     * @param selector ID preference selector exemple: this.applyFocusQuerySelector('myselectorid', 300)
     * not necessary # .
     * @param time
     */
    applyFocusQuerySelector(selector, time) {
        setTimeout(() => {
            const nextTag = document.querySelector(`#${selector}`);
            nextTag?.focus();
        }, time);
    }
}
FocusService.ɵfac = function FocusService_Factory(t) { return new (t || FocusService)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_router__WEBPACK_IMPORTED_MODULE_0__.Router)); };
FocusService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: FocusService, factory: FocusService.ɵfac, providedIn: 'root' });


/***/ }),

/***/ 91056:
/*!******************************************************************************!*\
  !*** ./src/app/shared/services/init.register.has-company.storage.service.ts ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "InitRegisterHasCompanyStorageService": () => (/* binding */ InitRegisterHasCompanyStorageService)
/* harmony export */ });
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _simple_storage_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./simple.storage.service */ 19725);



class InitRegisterHasCompanyStorageService {
  constructor(simpleStorageService) {
    this.simpleStorageService = simpleStorageService;
    this.KEY = 'REGISTER_HAS_COMPANY';
    this.cache = null; // Cache em memória opcional
  }

  set(data) {
    this.simpleStorageService.set(this.KEY, data);
    this.cache = data; // Atualiza o cache
  }

  get() {
    const data = this.simpleStorageService.get(this.KEY);
    this.cache = data; // Atualiza o cache

    return data;
  }

  remove() {
    var _this = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      _this.simpleStorageService.remove(_this.KEY);

      _this.cache = null; // Limpa o cache
    })();
  }

}

InitRegisterHasCompanyStorageService.ɵfac = function InitRegisterHasCompanyStorageService_Factory(t) {
  return new (t || InitRegisterHasCompanyStorageService)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_simple_storage_service__WEBPACK_IMPORTED_MODULE_2__.SimpleStorageService));
};

InitRegisterHasCompanyStorageService.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
  token: InitRegisterHasCompanyStorageService,
  factory: InitRegisterHasCompanyStorageService.ɵfac,
  providedIn: 'root'
});

/***/ }),

/***/ 19725:
/*!***********************************************************!*\
  !*** ./src/app/shared/services/simple.storage.service.ts ***!
  \***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SimpleStorageService": () => (/* binding */ SimpleStorageService)
/* harmony export */ });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);

class SimpleStorageService {
    constructor() { }
    set(key, value) {
        localStorage.setItem(key, JSON.stringify(value));
    }
    get(key) {
        const item = JSON.parse(localStorage.getItem(key));
        return item ?? null;
    }
    remove(key) {
        localStorage.removeItem(key);
    }
    clear() {
        localStorage.clear();
    }
}
SimpleStorageService.ɵfac = function SimpleStorageService_Factory(t) { return new (t || SimpleStorageService)(); };
SimpleStorageService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: SimpleStorageService, factory: SimpleStorageService.ɵfac, providedIn: 'root' });


/***/ })

}])
//# sourceMappingURL=3997.js.map