1 line
237 KiB
JavaScript
1 line
237 KiB
JavaScript
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[492],{39866:(Ye,Pe,p)=>{p.d(Pe,{Uw:()=>j,fo:()=>ve});var e=p(15861);typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"&&global;var pe=(()=>{return(y=pe||(pe={})).Unimplemented="UNIMPLEMENTED",y.Unavailable="UNAVAILABLE",pe;var y})();class oe extends Error{constructor(u,S,D){super(u),this.message=u,this.code=S,this.data=D}}const Se=y=>{var u,S,D,B,R;const Y=y.CapacitorCustomPlatform||null,G=y.Capacitor||{},te=G.Plugins=G.Plugins||{},X=y.CapacitorPlatforms,Ee=(null===(u=X?.currentPlatform)||void 0===u?void 0:u.getPlatform)||(()=>null!==Y?Y.name:(y=>{var u,S;return y?.androidBridge?"android":null!==(S=null===(u=y?.webkit)||void 0===u?void 0:u.messageHandlers)&&void 0!==S&&S.bridge?"ios":"web"})(y)),je=(null===(S=X?.currentPlatform)||void 0===S?void 0:S.isNativePlatform)||(()=>"web"!==Ee()),_=(null===(D=X?.currentPlatform)||void 0===D?void 0:D.isPluginAvailable)||(k=>!(!J.get(k)?.platforms.has(Ee())&&!l(k))),l=(null===(B=X?.currentPlatform)||void 0===B?void 0:B.getPluginHeader)||(k=>{var O;return null===(O=G.PluginHeaders)||void 0===O?void 0:O.find(F=>F.name===k)}),J=new Map,re=(null===(R=X?.currentPlatform)||void 0===R?void 0:R.registerPlugin)||((k,O={})=>{const F=J.get(k);if(F)return console.warn(`Capacitor plugin "${k}" already registered. Cannot register plugins twice.`),F.proxy;const T=Ee(),ae=l(k);let Ce;const ot=function(){var ce=(0,e.Z)(function*(){return!Ce&&T in O?Ce=Ce="function"==typeof O[T]?yield O[T]():O[T]:null!==Y&&!Ce&&"web"in O&&(Ce=Ce="function"==typeof O.web?yield O.web():O.web),Ce});return function(){return ce.apply(this,arguments)}}(),ze=ce=>{let _e;const g=(...N)=>{const i=ot().then(r=>{const d=((ce,_e)=>{var g,N;if(!ae){if(ce)return null===(N=ce[_e])||void 0===N?void 0:N.bind(ce);throw new oe(`"${k}" plugin is not implemented on ${T}`,pe.Unimplemented)}{const i=ae?.methods.find(r=>_e===r.name);if(i)return"promise"===i.rtype?r=>G.nativePromise(k,_e.toString(),r):(r,d)=>G.nativeCallback(k,_e.toString(),r,d);if(ce)return null===(g=ce[_e])||void 0===g?void 0:g.bind(ce)}})(r,ce);if(d){const E=d(...N);return _e=E?.remove,E}throw new oe(`"${k}.${ce}()" is not implemented on ${T}`,pe.Unimplemented)});return"addListener"===ce&&(i.remove=(0,e.Z)(function*(){return _e()})),i};return g.toString=()=>`${ce.toString()}() { [capacitor code] }`,Object.defineProperty(g,"name",{value:ce,writable:!1,configurable:!1}),g},Xe=ze("addListener"),Je=ze("removeListener"),qe=(ce,_e)=>{const g=Xe({eventName:ce},_e),N=function(){var r=(0,e.Z)(function*(){const d=yield g;Je({eventName:ce,callbackId:d},_e)});return function(){return r.apply(this,arguments)}}(),i=new Promise(r=>g.then(()=>r({remove:N})));return i.remove=(0,e.Z)(function*(){console.warn("Using addListener() without 'await' is deprecated."),yield N()}),i},Ze=new Proxy({},{get(ce,_e){switch(_e){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return ae?qe:Xe;case"removeListener":return Je;default:return ze(_e)}}});return te[k]=Ze,J.set(k,{name:k,proxy:Ze,platforms:new Set([...Object.keys(O),...ae?[T]:[]])}),Ze});return G.convertFileSrc||(G.convertFileSrc=k=>k),G.getPlatform=Ee,G.handleError=k=>y.console.error(k),G.isNativePlatform=je,G.isPluginAvailable=_,G.pluginMethodNoop=(k,O,F)=>Promise.reject(`${F} does not have an implementation of "${O}".`),G.registerPlugin=re,G.Exception=oe,G.DEBUG=!!G.DEBUG,G.isLoggingEnabled=!!G.isLoggingEnabled,G.platform=G.getPlatform(),G.isNative=G.isNativePlatform(),G},he=(y=>y.Capacitor=Se(y))(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),ve=he.registerPlugin;class j{constructor(u){this.listeners={},this.windowListeners={},u&&(console.warn(`Capacitor WebPlugin "${u.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=u)}addListener(u,S){var D=this;this.listeners[u]||(this.listeners[u]=[]),this.listeners[u].push(S);const R=this.windowListeners[u];R&&!R.registered&&this.addWindowListener(R);const Y=function(){var te=(0,e.Z)(function*(){return D.removeListener(u,S)});return function(){return te.apply(this,arguments)}}(),G=Promise.resolve({remove:Y});return Object.defineProperty(G,"remove",{value:(te=(0,e.Z)(function*(){console.warn("Using addListener() without 'await' is deprecated."),yield Y()}),function(){return te.apply(this,arguments)})}),G;var te}removeAllListeners(){var u=this;return(0,e.Z)(function*(){u.listeners={};for(const S in u.windowListeners)u.removeWindowListener(u.windowListeners[S]);u.windowListeners={}})()}notifyListeners(u,S){const D=this.listeners[u];D&&D.forEach(B=>B(S))}hasListeners(u){return!!this.listeners[u].length}registerWindowListener(u,S){this.windowListeners[S]={registered:!1,windowEventName:u,pluginEventName:S,handler:D=>{this.notifyListeners(S,D)}}}unimplemented(u="not implemented"){return new he.Exception(u,pe.Unimplemented)}unavailable(u="not available"){return new he.Exception(u,pe.Unavailable)}removeListener(u,S){var D=this;return(0,e.Z)(function*(){const B=D.listeners[u];if(!B)return;const R=B.indexOf(S);D.listeners[u].splice(R,1),D.listeners[u].length||D.removeWindowListener(D.windowListeners[u])})()}addWindowListener(u){window.addEventListener(u.windowEventName,u.handler),u.registered=!0}removeWindowListener(u){!u||(window.removeEventListener(u.windowEventName,u.handler),u.registered=!1)}}const H=y=>encodeURIComponent(y).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),ie=y=>y.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class ue extends j{getCookies(){return(0,e.Z)(function*(){const u=document.cookie,S={};return u.split(";").forEach(D=>{if(D.length<=0)return;let[B,R]=D.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");B=ie(B).trim(),R=ie(R).trim(),S[B]=R}),S})()}setCookie(u){return(0,e.Z)(function*(){try{const S=H(u.key),D=H(u.value),B=`; expires=${(u.expires||"").replace("expires=","")}`,R=(u.path||"/").replace("path=",""),Y=null!=u.url&&u.url.length>0?`domain=${u.url}`:"";document.cookie=`${S}=${D||""}${B}; path=${R}; ${Y};`}catch(S){return Promise.reject(S)}})()}deleteCookie(u){return(0,e.Z)(function*(){try{document.cookie=`${u.key}=; Max-Age=0`}catch(S){return Promise.reject(S)}})()}clearCookies(){return(0,e.Z)(function*(){try{const u=document.cookie.split(";")||[];for(const S of u)document.cookie=S.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)}catch(u){return Promise.reject(u)}})()}clearAllCookies(){var u=this;return(0,e.Z)(function*(){try{yield u.clearCookies()}catch(S){return Promise.reject(S)}})()}}ve("CapacitorCookies",{web:()=>new ue});const le=function(){var y=(0,e.Z)(function*(u){return new Promise((S,D)=>{const B=new FileReader;B.onload=()=>{const R=B.result;S(R.indexOf(",")>=0?R.split(",")[1]:R)},B.onerror=R=>D(R),B.readAsDataURL(u)})});return function(S){return y.apply(this,arguments)}}();class Ge extends j{request(u){return(0,e.Z)(function*(){const S=((y,u={})=>{const S=Object.assign({method:y.method||"GET",headers:y.headers},u),B=((y={})=>{const u=Object.keys(y);return Object.keys(y).map(B=>B.toLocaleLowerCase()).reduce((B,R,Y)=>(B[R]=y[u[Y]],B),{})})(y.headers)["content-type"]||"";if("string"==typeof y.data)S.body=y.data;else if(B.includes("application/x-www-form-urlencoded")){const R=new URLSearchParams;for(const[Y,G]of Object.entries(y.data||{}))R.set(Y,G);S.body=R.toString()}else if(B.includes("multipart/form-data")||y.data instanceof FormData){const R=new FormData;if(y.data instanceof FormData)y.data.forEach((G,te)=>{R.append(te,G)});else for(const G of Object.keys(y.data))R.append(G,y.data[G]);S.body=R;const Y=new Headers(S.headers);Y.delete("content-type"),S.headers=Y}else(B.includes("application/json")||"object"==typeof y.data)&&(S.body=JSON.stringify(y.data));return S})(u,u.webFetchExtra),D=((y,u=!0)=>y?Object.entries(y).reduce((D,B)=>{const[R,Y]=B;let G,te;return Array.isArray(Y)?(te="",Y.forEach(X=>{G=u?encodeURIComponent(X):X,te+=`${R}=${G}&`}),te.slice(0,-1)):(G=u?encodeURIComponent(Y):Y,te=`${R}=${G}`),`${D}&${te}`},"").substr(1):null)(u.params,u.shouldEncodeUrlParams),B=D?`${u.url}?${D}`:u.url,R=yield fetch(B,S),Y=R.headers.get("content-type")||"";let te,X,{responseType:G="text"}=R.ok?u:{};switch(Y.includes("application/json")&&(G="json"),G){case"arraybuffer":case"blob":X=yield R.blob(),te=yield le(X);break;case"json":te=yield R.json();break;default:te=yield R.text()}const be={};return R.headers.forEach((Ee,Fe)=>{be[Fe]=Ee}),{data:te,headers:be,status:R.status,url:R.url}})()}get(u){var S=this;return(0,e.Z)(function*(){return S.request(Object.assign(Object.assign({},u),{method:"GET"}))})()}post(u){var S=this;return(0,e.Z)(function*(){return S.request(Object.assign(Object.assign({},u),{method:"POST"}))})()}put(u){var S=this;return(0,e.Z)(function*(){return S.request(Object.assign(Object.assign({},u),{method:"PUT"}))})()}patch(u){var S=this;return(0,e.Z)(function*(){return S.request(Object.assign(Object.assign({},u),{method:"PATCH"}))})()}delete(u){var S=this;return(0,e.Z)(function*(){return S.request(Object.assign(Object.assign({},u),{method:"DELETE"}))})()}}ve("CapacitorHttp",{web:()=>new Ge})},60492:(Ye,Pe,p)=>{p.r(Pe),p.d(Pe,{AccountPageModule:()=>_e});var e=p(61380),z=p(64921),K=p(69270),v=p(15861),Te=p(53695),Me=p(35548),ge=p(47423),pe=p(89191),oe=p(82687),Ie=p(24889),Se=p(70079),fe=p(8929),he=p(7625),ve=p(82021),P=p(24006),o=p(45449),j=p(69107),M=p(47898),H=p(90603),ie=p(90944),ue=p(99826);const n=["pinDeleteAccount"];function le(g,N){1&g&&o.\u0275\u0275element(0,"ion-icon",17)}function Z(g,N){1&g&&o.\u0275\u0275element(0,"ion-icon",18)}function De(g,N){1&g&&(o.\u0275\u0275elementStart(0,"ion-label"),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementEnd()),2&g&&(o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(2,1,"PG_IDENTITY_CHECK_TEXT_FINGER_BIOMETRIC")," "))}function ke(g,N){1&g&&(o.\u0275\u0275elementStart(0,"ion-label"),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementEnd()),2&g&&(o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(2,1,"PG_IDENTITY_CHECK_TEXT_FINGER_FACIAL")," "))}function Ge(g,N){if(1&g){const i=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",12)(1,"ion-button",13),o.\u0275\u0275listener("click",function(d){o.\u0275\u0275restoreView(i);const E=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(E.showFingerPrint(d))}),o.\u0275\u0275template(2,le,1,0,"ion-icon",14),o.\u0275\u0275template(3,Z,1,0,"ion-icon",15),o.\u0275\u0275template(4,De,3,3,"ion-label",16),o.\u0275\u0275template(5,ke,3,3,"ion-label",16),o.\u0275\u0275elementEnd()()}if(2&g){const i=o.\u0275\u0275nextContext();o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf","finger"===i.typeFinger||"biometric"===i.typeFinger),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf","face"===i.typeFinger),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf","face"!==i.typeFinger),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf","face"===i.typeFinger)}}let Qe=(()=>{class g{constructor(i,r,d,E,w,U,W,se,ee,Ae,Oe,xe,we){var q=this;this.logService=i,this.modalCtrl=r,this.lockService=d,this.formBuilder=E,this.keyboardService=w,this.platform=U,this.loaderService=W,this.authService=se,this.notificatorService=ee,this.translateConfigService=Ae,this.domCtrl=Oe,this.renderer=xe,this.overlayService=we,this.isFingerAvaliable=!1,this.subscription$=[],this.didItComeFromSideMenu=!1,this.actionType="verify_email",this.actionData=null,this.onSuccessCallback=null,this.setFocus=()=>{this.platform.is("android")?setTimeout(()=>{this.focusInput(),this.keyboardService.show()},1e3):this.focusInput()},this.focusInput=()=>{this.pinInputElementConfirmEmail.nativeElement.focus()},this.onPinChange=Re=>{const Ne=this.pinForm.controls.pin.value;if(4===Ne.length){console.log(Ne);const Ve=setTimeout(()=>{this.onSubmit(),clearTimeout(Ve)},250)}else this.lockService.unlock("updating-pin-value")},this.resetPin=()=>{this.pinForm.controls.pin.setValue("")},this.onSubmit=()=>{this.loaderService.show(this.translateConfigService.translate("LOADING_CHECKING_DATA"));let Re=null;const Ne=this.pinInputElementConfirmEmail.nativeElement,Ve=function(){var rt=(0,v.Z)(function*(){Re&&Re.unsubscribe();const et=q.pinForm.controls.pin.value;try{if(yield q.authService.validatePassword(et))q.loaderService.hide(),q.addClassSuccess(),yield q.executeAction();else{q.loaderService.hide(),q.addRemoveClass(Ne,"content_modal__shake-horizontal_error",!0),setTimeout(()=>{q.addRemoveClass(Ne,"content_modal__shake-horizontal_error",!1)},2e3),q.resetPin(),q.lockService.unlock("updating-pin-value");const We=q.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_INVALID_PIN_TITLE"),Ke=q.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_INVALID_PIN_MESSAGE");q.toast(We,Ke),q.logService.logEvent("insert-pin","The user entered an incorrect PIN")}}catch(tt){q.loaderService.hide(),q.resetPin(),q.lockService.unlock("updating-pin-value");const We=q.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_ERROR_TITLE"),Ke=q.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_ERROR_MESSAGE");q.notificatorService.notify({title:We,message:Ke,type:"error"}),q.logService.logEvent("pin::storage","An error occurred while retrieving the PIN from storage",tt)}finally{q.loaderService.hide()}});return function(){return rt.apply(this,arguments)}}();Re=this.keyboardService.onHideObservable?.subscribe(Ve),this.keyboardService.isVisible()?this.keyboardService.hide():Ve()}}ngOnInit(){var i=this;return(0,v.Z)(function*(){i.pinForm=i.formBuilder.group({pin:[""]});const r=yield i.modalCtrl.getTop();if(r&&r.componentProps&&(i.actionType=r.componentProps.actionType||"verify_email",i.actionData=r.componentProps.actionData||null,i.onSuccessCallback=r.componentProps.onSuccessCallback||null),"web"!==ge.dV.getPlatform()){const d=yield j.Gw.checkBiometry();i.isFingerAvaliable=d.isAvailable,d.isAvailable&&i.isAvaliableFinger(d.biometryType)}else i.isFingerAvaliable=!1})()}close(){this.modalCtrl.dismiss()}ngOnDestroy(){this.subscription$.forEach(i=>i.unsubscribe)}showFingerPrint(i){var r=this;this.platform.ready().then((0,v.Z)(function*(){const d=yield j.Gw.checkBiometry();if(r.isFingerAvaliable=d.isAvailable,d.isAvailable){r.isAvaliableFinger(d.biometryType);const E=setTimeout(()=>{r.didItComeFromSideMenu&&r.platform.is("ios")&&"face"===r.typeFinger&&!i||(r.showFingerprintAuthentication(),clearTimeout(E))},100)}}))}showFingerprintAuthentication(){var i=this;return(0,v.Z)(function*(){const r=i.translateConfigService.translate("PG_IDENTITY_CHECK_FINGER_CANCELTITLE"),d=i.translateConfigService.translate("PG_IDENTITY_CHECK_FINGER_DESCRIPTION"),E=i.translateConfigService.translate("PG_IDENTITY_CHECK_FINGER_TITLE"),U={reason:d,androidSubtitle:i.translateConfigService.translate("PG_IDENTITY_CHECK_FINGER_SUBTITLE"),androidTitle:E,cancelTitle:r,allowDeviceCredential:!0,androidBiometryStrength:j.bO.weak,androidConfirmationRequired:!0};try{const W=yield j.Gw.authenticate(U);console.log(W),i.onSubmitFingerPrint(!0)}catch(W){throw console.log("Error authent",W),i.logService.logError("plugin_biometric::modal_delete_account","error authenticating biometric|facial",W),new Error(W)}})()}onSubmitFingerPrint(i){var r=this;return(0,v.Z)(function*(){try{if(r.loaderService.show(r.translateConfigService.translate("LOADING_CHECKING_DATA")),yield r.authService.validatePassword(null,i))r.loaderService.hide(),yield r.executeAction();else{r.loaderService.hide(),r.lockService.unlock("updating-pin-value");const E=r.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_INVALID_PIN_TITLE"),w=r.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_INVALID_PIN_MESSAGE");r.toast(E,w),r.logService.logEvent("invalid:biometria_or_facial","Invalid biometrics or facial recognition when attempting to delete the account.")}}catch(d){r.loaderService.hide(),r.lockService.unlock("updating-pin-value");const E=r.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_ERROR_TITLE"),w=r.translateConfigService.translate("PG_IDENTITY_CHECK_TOAST_ERROR_MESSAGE");r.toast(E,w),r.logService.logEvent("pin::storage","An error occurred while retrieving the PIN from storage",d)}finally{r.loaderService.hide()}})()}isAvaliableFinger(i){switch(i){case j.dz.faceAuthentication||j.dz.faceId:this.typeFinger="face";break;case j.dz.fingerprintAuthentication:this.typeFinger="biometric";break;case j.dz.touchId:this.typeFinger="finger";break;case j.dz.irisAuthentication:this.typeFinger="iris"}}addClassSuccess(){this.domCtrl.write(()=>{this.renderer.removeClass(this.pinInputElementConfirmEmail.nativeElement,"content_modal__shake-horizontal_error"),this.renderer.addClass(this.pinInputElementConfirmEmail.nativeElement,"content_modal__shake-success")})}addRemoveClass(i,r,d){this.domCtrl.write(()=>{d?this.renderer.addClass(i,r):this.renderer.removeClass(i,r)})}executeAction(){var i=this;return(0,v.Z)(function*(){try{"verify_email"===i.actionType?(i.onSuccessCallback&&(yield i.onSuccessCallback()),i.modalCtrl.dismiss({success:!0},"confirm")):(console.warn("Tipo de a\xe7\xe3o n\xe3o reconhecido:",i.actionType),i.close())}catch(r){i.logService.logError("modal-pin-facial","Erro ao executar a\xe7\xe3o",r),i.close()}})()}toast(i,r){var d=this;return(0,v.Z)(function*(E,w,U="danger"){yield d.overlayService.toast({header:E,message:w,mode:"ios",duration:5e3,color:U}).finally(()=>{})}).apply(this,arguments)}}return g.\u0275fac=function(i){return new(i||g)(o.\u0275\u0275directiveInject(M.$V),o.\u0275\u0275directiveInject(H.ModalController),o.\u0275\u0275directiveInject(M.We),o.\u0275\u0275directiveInject(P.UntypedFormBuilder),o.\u0275\u0275directiveInject(M.i8),o.\u0275\u0275directiveInject(H.Platform),o.\u0275\u0275directiveInject(M.D1),o.\u0275\u0275directiveInject(M.e8),o.\u0275\u0275directiveInject(M.V6),o.\u0275\u0275directiveInject(M.wK),o.\u0275\u0275directiveInject(H.DomController),o.\u0275\u0275directiveInject(o.Renderer2),o.\u0275\u0275directiveInject(M.F0))},g.\u0275cmp=o.\u0275\u0275defineComponent({type:g,selectors:[["app-modal-confirm-pin-facial-email"]],viewQuery:function(i,r){if(1&i&&o.\u0275\u0275viewQuery(n,5,o.ElementRef),2&i){let d;o.\u0275\u0275queryRefresh(d=o.\u0275\u0275loadQuery())&&(r.pinInputElementConfirmEmail=d.first)}},decls:17,vars:12,consts:[[1,"content_modal"],["tabindex","5",1,"content_modal__btn_close_icon",3,"click"],["slot","icon-only","name","close"],["tabindex","1",1,"content_modal__title"],[3,"innerHTML"],[1,"content_modal__input"],[3,"formGroup","ngSubmit"],["tabindex","2","id","pinDeleteAccount","type","password","formControlName","pin","maxlength","4","pattern","[0-9]*","inputmode","numeric",3,"autofocus","placeholder","input"],["pinDeleteAccount",""],["class","content_modal__fingeer_btn",4,"ngIf"],[1,"content_modal__btn_close",3,"click"],["mode","ios","color","primary","shape","round","tabindex","4"],[1,"content_modal__fingeer_btn"],["mode","ios","fill","clear","tabindex","3",3,"click"],["style","padding-right: 0.2em;","aria-hidden","true","name","finger-print",4,"ngIf"],["src","../../assets/icon/faceid.svg",4,"ngIf"],[4,"ngIf"],["aria-hidden","true","name","finger-print",2,"padding-right","0.2em"],["src","../../assets/icon/faceid.svg"]],template:function(i,r){1&i&&(o.\u0275\u0275elementStart(0,"div",0)(1,"div",1),o.\u0275\u0275listener("click",function(){return r.close()}),o.\u0275\u0275element(2,"ion-icon",2),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(3,"div",3)(4,"ion-text"),o.\u0275\u0275element(5,"span",4),o.\u0275\u0275pipe(6,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(7,"div",5)(8,"form",6),o.\u0275\u0275listener("ngSubmit",function(){return r.onSubmit()}),o.\u0275\u0275elementStart(9,"input",7,8),o.\u0275\u0275listener("input",function(E){return r.onPinChange(E)}),o.\u0275\u0275pipe(11,"translate"),o.\u0275\u0275elementEnd()()(),o.\u0275\u0275template(12,Ge,6,4,"div",9),o.\u0275\u0275elementStart(13,"div",10),o.\u0275\u0275listener("click",function(){return r.close()}),o.\u0275\u0275elementStart(14,"ion-button",11),o.\u0275\u0275text(15),o.\u0275\u0275pipe(16,"translate"),o.\u0275\u0275elementEnd()()()),2&i&&(o.\u0275\u0275advance(5),o.\u0275\u0275property("innerHTML",o.\u0275\u0275pipeBind1(6,6,"MD_CONFIRM_PIN.TITLE"),o.\u0275\u0275sanitizeHtml),o.\u0275\u0275advance(3),o.\u0275\u0275property("formGroup",r.pinForm),o.\u0275\u0275advance(1),o.\u0275\u0275property("autofocus",!0)("placeholder",o.\u0275\u0275pipeBind1(11,8,"MD_CONFIRM_PIN.PLACEHOLDER")),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngIf",r.isFingerAvaliable),o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(16,10,"BTN_CLOSE")," "))},dependencies:[ie.NgIf,H.IonButton,H.IonIcon,H.IonLabel,H.IonText,P.\u0275NgNoValidate,P.DefaultValueAccessor,P.NgControlStatus,P.NgControlStatusGroup,P.MaxLengthValidator,P.PatternValidator,P.FormGroupDirective,P.FormControlName,ue.X$],styles:[".content_modal[_ngcontent-%COMP%]{background:#fff;display:flex;flex-direction:column;justify-content:space-evenly;height:100%;position:relative;align-items:center;padding:1em}.content_modal__title[_ngcontent-%COMP%]{color:#383a3e;text-align:center;font-size:18px;font-family:Nunito;font-style:normal;font-weight:400;line-height:120%}.content_modal__input[_ngcontent-%COMP%]{height:50px;width:308px;text-align:center;padding:1em 0;display:flex;align-items:center;margin-top:1em;justify-content:center}.content_modal__input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:308px;height:45px;text-align:center;background:rgba(227,226,226,.04);border:1px solid #e3e2e2;border-radius:36px}.content_modal__input[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]:focus{border-color:var(--ion-color-medium);caret-color:var(--ion-color-primary);border-width:1px;outline:none}.content_modal__input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:var(--ion-color-medium);opacity:.5}.content_modal__input[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]:focus::-webkit-input-placeholder{color:var(--ion-color-dark);opacity:.5}.content_modal__fingeer_btn[_ngcontent-%COMP%]{height:2.65em;display:flex;align-items:center}.content_modal__btn_close_icon[_ngcontent-%COMP%]{position:absolute;top:1em;right:1em}.content_modal__btn_close_icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:1.53em;color:#c5c5c5}.content_modal__btn_close[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{width:118px;height:40px}.content_modal__shake-horizontal_error[_ngcontent-%COMP%]{border:1px solid var(--ion-color-danger)!important;box-shadow:0 0 .5em red;animation:shake .2s ease-in-out 0s 2;-webkit-animation:shake .2s ease-in-out 0s 2}.content_modal__shake-success[_ngcontent-%COMP%]{border:1px solid var(--ion-color-primary)!important}.content_modal__remove_error[_ngcontent-%COMP%], .content_modal__remove_success[_ngcontent-%COMP%]{border:1px solid #e3e2e2}@keyframes shake{0%{margin-left:0rem}25%{margin-left:.5rem}75%{margin-left:-.5rem}to{margin-left:0rem}}"]}),g})();var y=p(591);let u=(()=>{class g{constructor(){this.stateSubject=new y.X({step:"initial",isUpdating:!1}),this.state$=this.stateSubject.asObservable()}getCurrentState(){return this.stateSubject.value}updateState(i){const r=this.getCurrentState();this.stateSubject.next({...r,...i})}startEmailUpdate(i,r){this.updateState({newEmail:i,dataAccount:r,isUpdating:!0,step:"initial"})}setCodeVerificationStep(){this.updateState({step:"code_verification"})}setPinVerificationStep(){this.updateState({step:"pin_verification"})}completeEmailUpdate(i){this.updateState({dataAccount:i,step:"completed",isUpdating:!1})}reset(){this.stateSubject.next({step:"initial",isUpdating:!1})}}return g.\u0275fac=function(i){return new(i||g)},g.\u0275prov=o.\u0275\u0275defineInjectable({token:g,factory:g.\u0275fac,providedIn:"root"}),g})();const S=function(g){return{seconds:g}};function D(g,N){if(1&g&&(o.\u0275\u0275elementStart(0,"ion-text",14)(1,"p"),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd()()),2&g){const i=o.\u0275\u0275nextContext();o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind2(3,1,"MD_CONFIRM_CHANGE_EMAIL.COUNTDOWN",o.\u0275\u0275pureFunction1(4,S,i.secondsRemaining)))}}function B(g,N){if(1&g){const i=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",15)(1,"ion-button",16),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(i);const d=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(d.resendCode())}),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd()()}if(2&g){const i=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("disabled",!i.canResend()),o.\u0275\u0275attribute("aria-disabled",!i.canResend()),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(3,3,"MD_CONFIRM_CHANGE_EMAIL.RESEND_CODE")," ")}}let R=(()=>{class g{constructor(i,r,d,E,w,U,W,se,ee){this.modalCtrl=i,this.formBuilder=r,this.translateConfigService=d,this.loadingService=E,this.notificatorService=w,this.apiService=U,this.logService=W,this.commonService=se,this.emailUpdateService=ee,this.countdownSeconds=60,this.secondsRemaining=0,this.countdownActive=!1,this.showResendButton=!1}ngOnInit(){var i=this;return(0,v.Z)(function*(){i.codeForm=i.formBuilder.group({code:["",[P.Validators.required,P.Validators.minLength(7),P.Validators.maxLength(7)]]}),i.startCountdown()})()}ngOnDestroy(){this.clearCountdown()}closeModal(){var i=this;return(0,v.Z)(function*(){const r=yield i.modalCtrl.getTop();r&&r.dismiss({close:!0},"cancel")})()}verifyCode(){var i=this;return(0,v.Z)(function*(){if(!i.validateForm())return;const r=i.codeForm.value?.code;!i.dataAccount.refId||!i.dataAccount.email||!r||(yield i.openPinFacialModal(r))})()}openPinFacialModal(i){var r=this;return(0,v.Z)(function*(){const d=yield r.modalCtrl.create({component:Qe,componentProps:{actionType:"verify_email",actionData:{email:r.dataAccount.email,refId:r.dataAccount.refId,verificationCode:i}},backdropDismiss:!1,cssClass:"modal-confirm-pin-facial-email"});yield d.present();const{data:E}=yield d.onDidDismiss();E&&E.success&&(yield r.executeEmailVerification(i),r.modalCtrl.dismiss({success:!0,closeAllModals:!0,dataAccount:r.dataAccount},"confirm"))})()}executeEmailVerification(i){var r=this;return(0,v.Z)(function*(){const d=r.translateConfigService.translate("MD_CONFIRM_CODE_CHANGE_EMAIL.VERIFYING"),E=r.translateConfigService.translate("MD_CONFIRM_CODE_CHANGE_EMAIL.SUCCESS_TITLE"),w=r.translateConfigService.translate("MD_CONFIRM_CODE_CHANGE_EMAIL.SUCCESS_MESSAGE");let U=r.translateConfigService.translate("MD_CONFIRM_CODE_CHANGE_EMAIL.ERROR_TITLE"),W=r.translateConfigService.translate("MD_CONFIRM_CODE_CHANGE_EMAIL.ERROR_MESSAGE");r.loadingService.show(d||"Verificando...","confirm-email"),i=i.toUpperCase();const se={email:r.dataAccount.email,refId:r.dataAccount.refId,verificationCode:i};return new Promise((ee,Ae)=>{var Oe;r.apiService.updateEmailFinish(se).subscribe({next:(Oe=(0,v.Z)(function*(xe){r.dataAccount={...r.dataAccount,email:r.dataAccount.email,login:r.dataAccount.email,emailVerified:!0};const we={title:E||"E-mail verificado!",message:w||"Seu email foi verificado com sucesso!",type:"success",timeout:3e3,cssCustom:"toast-change-email"};r.loadingService.hide(null,"confirm-email").then(()=>{r.notificatorService.notify(we),r.emailUpdateService.completeEmailUpdate(r.dataAccount),r.closeModal(),ee()})}),function(we){return Oe.apply(this,arguments)}),error:Oe=>{const xe=r.translateConfigService.translate("MD_CONFIRM_CODE_CHANGE_EMAIL.ERROR_EMAIL_USED"),we=r.translateConfigService.translate("MD_CONFIRM_CODE_CHANGE_EMAIL.ERROR_SAME_EMAIL_FOR_THIS_REFID");if(400===Oe?.status){U="";const Re=Oe?.error?.errorKey;W={email_used:xe,same_email_for_this_refid:we}[Re]??W}const q={title:U,message:W||"C\xf3digo inv\xe1lido ou expirado. Tente novamente.",type:"error",timeout:8e3,cssCustom:"toast-change-email"};r.loadingService.hide(null,"confirm-email").then(()=>{r.notificatorService.notify(q)}),r.logService.logError("http","Erro ao verificar c\xf3digo de email",{email:r.dataAccount.email,refId:r.dataAccount.refId,error:Oe}),r.showResendButton=!0,r.clearCountdown(),r.secondsRemaining=0,Ae(Oe)}})})})()}validateForm(){const i=this.commonService.clearString(this.codeForm.controls.code.value);if(this.codeForm.get("code")?.errors||!i){const d=this.translateConfigService.translate("PG_IDENTIFY_VALIDATOR_CODE_TOAST_INVALID_CODE_TITLE")||"C\xf3digo inv\xe1lido",E=this.translateConfigService.translate("PG_IDENTIFY_VALIDATOR_CODE_TOAST_INVALID_CODE_MESSAGE")||"Por favor, insira um c\xf3digo v\xe1lido";return this.notificatorService.notify({title:d,message:E,type:"error",cssCustom:"toast-change-email",timeout:8e3}),!1}return!0}startCountdown(){this.clearCountdown(),this.secondsRemaining=this.countdownSeconds,this.countdownActive=!0,this.showResendButton=!1,this.countdownIntervalId=setInterval(()=>{this.secondsRemaining=Math.max(0,this.secondsRemaining-1),0===this.secondsRemaining&&(this.clearCountdown(),this.showResendButton=!0)},1e3)}clearCountdown(){this.countdownIntervalId&&(clearInterval(this.countdownIntervalId),this.countdownIntervalId=null),this.countdownActive=!1}canResend(){return!this.countdownActive&&0===this.secondsRemaining}resendCode(){if(!this.canResend())return;const i=this.translateConfigService.translate("MD_CHANGE_EMAIL.TOAST_UPDATING_TITLE")||"Atualizando...",r=this.translateConfigService.translate("MD_CHANGE_EMAIL.TOAST_CODE_SENT_TITLE_SUCCESS")||"C\xf3digo enviado",d=this.translateConfigService.translate("MD_CHANGE_EMAIL.TOAST_NEW_CODE_SENT_MESSAGE_SUCCESS")||"Um novo c\xf3digo foi enviado para seu e-mail.";let E=this.translateConfigService.translate("MD_CHANGE_EMAIL.TOAST_CODE_SENT_TITLE_ERROR")||"Ops!",w=this.translateConfigService.translate("MD_CHANGE_EMAIL.TOAST_CODE_SENT_MESSAGE_ERROR")||"Erro ao enviar c\xf3digo de verifica\xe7\xe3o";this.loadingService.show(i,"confirm-email"),this.apiService.updateEmail(this.dataAccount.email,this.dataAccount.refId).subscribe({next:()=>{this.loadingService.hide(null,"confirm-email"),this.notificatorService.notify({title:r,message:d,type:"success",timeout:8e3,cssCustom:"toast-change-email"}),this.startCountdown()},error:U=>{console.table(U),this.loadingService.hide(null,"confirm-email"),this.notificatorService.notify({title:E,message:w,type:"error",timeout:8e3,cssCustom:"toast-change-email"}),this.logService.logError("http","Erro ao reenviar c\xf3digo de email",{email:this.dataAccount.email,refId:this.dataAccount.refId,error:U})}})}}return g.\u0275fac=function(i){return new(i||g)(o.\u0275\u0275directiveInject(H.ModalController),o.\u0275\u0275directiveInject(P.FormBuilder),o.\u0275\u0275directiveInject(M.wK),o.\u0275\u0275directiveInject(M.bz),o.\u0275\u0275directiveInject(M.V6),o.\u0275\u0275directiveInject(M.sM),o.\u0275\u0275directiveInject(M.$V),o.\u0275\u0275directiveInject(M.v_),o.\u0275\u0275directiveInject(u))},g.\u0275cmp=o.\u0275\u0275defineComponent({type:g,selectors:[["app-modal-confirm-code-change-email"]],inputs:{dataAccount:"dataAccount"},decls:27,vars:20,consts:[[1,"content_modal_changel_email_confirm"],["tabindex","1",1,"content_modal_changel_email_confirm__title"],[1,"content_modal_changel_email_confirm__subtitle"],[1,"content_modal_changel_email_confirm__input"],[3,"formGroup"],["tabindex","2","maxlength","7","type","text","inputmode","text","formControlName","code",3,"placeholder","autofocus"],[1,"content_modal_changel_email_confirm__actions"],["class","content_modal_changel_email_confirm__actions_countdown","aria-live","polite","role","status",4,"ngIf"],["class","content_modal_changel_email_confirm__actions_resend",4,"ngIf"],[1,"content_modal_changel_email_confirm__btns"],[1,"content_modal_changel_email_confirm__btns_cancel"],["mode","ios","fill","clear","tabindex","4",3,"click"],[1,"content_modal_changel_email_confirm__btns_update"],["mode","ios","color","primary","shape","round","tabindex","5",3,"disabled","click"],["aria-live","polite","role","status",1,"content_modal_changel_email_confirm__actions_countdown"],[1,"content_modal_changel_email_confirm__actions_resend"],["mode","ios","fill","clear","tabindex","3",1,"resend-link",3,"disabled","click"]],template:function(i,r){1&i&&(o.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"ion-text")(3,"h6"),o.\u0275\u0275text(4),o.\u0275\u0275pipe(5,"translate"),o.\u0275\u0275elementEnd()()(),o.\u0275\u0275elementStart(6,"div",2)(7,"ion-text")(8,"p"),o.\u0275\u0275text(9),o.\u0275\u0275pipe(10,"translate"),o.\u0275\u0275elementEnd()()(),o.\u0275\u0275elementStart(11,"div",3)(12,"form",4),o.\u0275\u0275element(13,"input",5),o.\u0275\u0275pipe(14,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(15,"div",6),o.\u0275\u0275template(16,D,4,6,"ion-text",7),o.\u0275\u0275template(17,B,4,5,"div",8),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(18,"div",9)(19,"div",10)(20,"ion-button",11),o.\u0275\u0275listener("click",function(){return r.closeModal()}),o.\u0275\u0275text(21),o.\u0275\u0275pipe(22,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(23,"div",12)(24,"ion-button",13),o.\u0275\u0275listener("click",function(){return r.verifyCode()}),o.\u0275\u0275text(25),o.\u0275\u0275pipe(26,"translate"),o.\u0275\u0275elementEnd()()()()),2&i&&(o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(5,10,"MD_CONFIRM_CHANGE_EMAIL.TITLE")),o.\u0275\u0275advance(5),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(10,12,"MD_CONFIRM_CHANGE_EMAIL.SUBTITLE")),o.\u0275\u0275advance(3),o.\u0275\u0275property("formGroup",r.codeForm),o.\u0275\u0275advance(1),o.\u0275\u0275propertyInterpolate("placeholder",o.\u0275\u0275pipeBind1(14,14,"MD_CONFIRM_CHANGE_EMAIL.PLACEHOLDER")),o.\u0275\u0275property("autofocus",!0),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngIf",r.secondsRemaining>0&&!r.showResendButton),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",r.showResendButton),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(22,16,"MD_CONFIRM_CHANGE_EMAIL.BTN_CANCEL")," "),o.\u0275\u0275advance(3),o.\u0275\u0275property("disabled",!r.codeForm.valid),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(26,18,"MD_CONFIRM_CHANGE_EMAIL.BTN_VERIFY")," "))},dependencies:[ie.NgIf,H.IonButton,H.IonText,P.\u0275NgNoValidate,P.DefaultValueAccessor,P.NgControlStatus,P.NgControlStatusGroup,P.MaxLengthValidator,P.FormGroupDirective,P.FormControlName,ue.X$],styles:['@charset "UTF-8";.content_modal_changel_email_confirm[_ngcontent-%COMP%]{background:#fff;display:flex;flex-direction:column;justify-content:space-around;height:100%;position:relative;align-items:center;padding:1em}.content_modal_changel_email_confirm__title[_ngcontent-%COMP%] ion-text[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{color:#383a3e;text-align:center;font-size:18px;font-family:Nunito;font-style:normal;font-weight:600;position:relative;top:.5em;line-height:120%}.content_modal_changel_email_confirm__subtitle[_ngcontent-%COMP%] ion-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#383a3e;text-align:center;font-size:16px;font-family:Nunito;font-style:normal;font-weight:400;line-height:120%}.content_modal_changel_email_confirm__input[_ngcontent-%COMP%]{text-align:center;width:100%}.content_modal_changel_email_confirm__input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{text-transform:uppercase;width:100%;height:48px;text-align:center;background:rgba(227,226,226,.04);border:1px solid #e3e2e2;border-radius:36px}.content_modal_changel_email_confirm__input[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]:focus{border-color:var(--ion-color-medium);caret-color:var(--ion-color-primary);border-width:1px;outline:none}.content_modal_changel_email_confirm__input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:var(--ion-color-medium);opacity:.5;text-transform:lowercase}.content_modal_changel_email_confirm__input[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]:focus::-webkit-input-placeholder{color:var(--ion-color-dark);opacity:.5;text-transform:lowercase}.content_modal_changel_email_confirm__actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin:.5rem 0 2em}.content_modal_changel_email_confirm__actions_countdown[_ngcontent-%COMP%] ion-text[_ngcontent-%COMP%], .content_modal_changel_email_confirm__actions_countdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#6cb52d;font-size:.9rem;line-height:120%;margin:0 0 .5em;font-weight:500}.content_modal_changel_email_confirm__actions_resend[_ngcontent-%COMP%] .resend-link[_ngcontent-%COMP%]{--color: var(--ion-color-primary);font-size:16px;text-decoration:none;font-weight:800;margin:0;padding:0;max-height:23px}.content_modal_changel_email_confirm__actions_resend[_ngcontent-%COMP%] .resend-link[disabled][_ngcontent-%COMP%]{--color: var(--ion-color-medium);opacity:.6}.content_modal_changel_email_confirm__btns[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between}.content_modal_changel_email_confirm__btns[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{width:118px;height:40px;border-radius:32px}.content_modal_changel_email_confirm__btns_cancel[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{background:rgba(153,153,153,.13);--color: #757575;text-align:center;font-size:16px;font-family:Nunito;font-style:normal;font-weight:400;line-height:normal}']}),g})();function Y(g,N){1&g&&(o.\u0275\u0275elementStart(0,"ion-text",13)(1,"p"),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd()()),2&g&&(o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(3,1,"MD_CHANGE_EMAIL.ERROR_INVALID_EMAIL")))}let G=(()=>{class g{constructor(i,r,d,E,w,U,W,se,ee,Ae){this.modalCtrl=i,this.formBuilder=r,this.commonService=d,this.utilsService=E,this.notificatorService=w,this.translateConfigService=U,this.loaderService=W,this.apiService=se,this.logService=ee,this.emailUpdateService=Ae,this.validateForm=Oe=>{const xe=this.commonService.clearString(Oe.controls.email.value);return this.utilsService.validateEmail(xe)}}ngOnInit(){this.emailForm=this.formBuilder.group({email:["",[P.Validators.required,P.Validators.email]]})}submit(){var i=this;return(0,v.Z)(function*(){const r=i.validateForm(i.emailForm);let d=i.translateConfigService.translate("TOAST_INVALID_DATA_TITLE"),E=i.translateConfigService.translate("TOAST_INVALID_DATA_MESSAGE");return r?(i.updateEmail(),!0):(i.notificatorService.notify({title:d,message:E,type:"error",cssCustom:"toast-change-email"}),!1)})()}updateEmail(){var i=this;const r=this.emailForm.value?.email;if(!this.dataAccount.refId)return;const d=this.translateConfigService.translate("MD_CHANGE_EMAIL.TOAST_UPDATING_TITLE"),E=this.translateConfigService.translate("MD_CHANGE_EMAIL.TOAST_CODE_SENT_TITLE_SUCCESS"),w=this.translateConfigService.translate("MD_CHANGE_EMAIL.TOAST_CODE_SENT_MESSAGE_SUCCESS"),U=this.translateConfigService.translate("MD_CHANGE_EMAIL.TOAST_CODE_SENT_TITLE_ERROR"),W=this.translateConfigService.translate("MD_CHANGE_EMAIL.TOAST_CODE_SENT_MESSAGE_ERROR");var se;this.loaderService.show(d),this.apiService.updateEmail(r,this.dataAccount.refId).subscribe({next:(se=(0,v.Z)(function*(ee){i.dataAccount.email=r,i.loaderService.hide(),i.toast(E,w,"success"),i.emailUpdateService.startEmailUpdate(r,i.dataAccount),i.closeModal(),yield i.openConfirmCodeModal(r)}),function(Ae){return se.apply(this,arguments)}),error:se=>{this.loaderService.hide(),this.toast(U,W,"error",1e4),this.logService.logError("http","error ao atualizar o e-mail",{email:r,error:se})}})}openConfirmCodeModal(i){var r=this;return(0,v.Z)(function*(){r.emailUpdateService.setCodeVerificationStep(),yield(yield r.modalCtrl.create({component:R,componentProps:{dataAccount:{...r.dataAccount,email:i}},backdropDismiss:!1,cssClass:"modal-confirm-code-change-email"})).present()})()}closeModal(i){console.log("closeModal",i),this.modalCtrl.dismiss({value:i,close:!0},"cancel")}toast(i,r,d){var E=this;return(0,v.Z)(function*(w,U,W,se=5e3){E.notificatorService.notify({title:w,message:U,type:W,timeout:se,cssCustom:"toast-change-email"})}).apply(this,arguments)}}return g.\u0275fac=function(i){return new(i||g)(o.\u0275\u0275directiveInject(H.ModalController),o.\u0275\u0275directiveInject(P.FormBuilder),o.\u0275\u0275directiveInject(M.v_),o.\u0275\u0275directiveInject(M.FW),o.\u0275\u0275directiveInject(M.V6),o.\u0275\u0275directiveInject(M.wK),o.\u0275\u0275directiveInject(M.D1),o.\u0275\u0275directiveInject(M.sM),o.\u0275\u0275directiveInject(M.$V),o.\u0275\u0275directiveInject(u))},g.\u0275cmp=o.\u0275\u0275defineComponent({type:g,selectors:[["app-modal-change-email"]],inputs:{dataAccount:"dataAccount"},decls:24,vars:19,consts:[[1,"content_modal_changel_email"],["tabindex","1",1,"content_modal_changel_email__title"],[1,"content_modal_changel_email__input"],[3,"formGroup"],[1,"content_modal_changel_email__input__subtitle"],["tabindex","2","inputmode","email","type","email","formControlName","email",3,"autofocus","placeholder"],[1,"error-message"],["color","danger",4,"ngIf"],[1,"content_modal_changel_email__btns"],[1,"content_modal_changel_email__btns_cancel"],["mode","ios","fill","clear","tabindex","3",3,"click"],[1,"content_modal_changel_email__btns_update"],["mode","ios","color","primary","shape","round","tabindex","4",3,"disabled","click"],["color","danger"]],template:function(i,r){1&i&&(o.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"ion-text")(3,"h6"),o.\u0275\u0275text(4),o.\u0275\u0275pipe(5,"translate"),o.\u0275\u0275elementEnd()()(),o.\u0275\u0275elementStart(6,"div",2)(7,"form",3)(8,"ion-label",4),o.\u0275\u0275text(9),o.\u0275\u0275pipe(10,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275element(11,"input",5),o.\u0275\u0275pipe(12,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(13,"div",6),o.\u0275\u0275template(14,Y,4,3,"ion-text",7),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(15,"div",8)(16,"div",9)(17,"ion-button",10),o.\u0275\u0275listener("click",function(){return r.closeModal()}),o.\u0275\u0275text(18),o.\u0275\u0275pipe(19,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(20,"div",11)(21,"ion-button",12),o.\u0275\u0275listener("click",function(){return r.submit()}),o.\u0275\u0275text(22),o.\u0275\u0275pipe(23,"translate"),o.\u0275\u0275elementEnd()()()()),2&i&&(o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(5,9,"MD_CHANGE_EMAIL.TITLE")),o.\u0275\u0275advance(3),o.\u0275\u0275property("formGroup",r.emailForm),o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(10,11,"MD_CHANGE_EMAIL.SUBTITLE")," "),o.\u0275\u0275advance(2),o.\u0275\u0275property("autofocus",!0)("placeholder",o.\u0275\u0275pipeBind1(12,13,"MD_CHANGE_EMAIL.PLACEHOLDER")+" : "+(null==r.dataAccount?null:r.dataAccount.email)),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngIf",r.emailForm.controls.email.invalid&&r.emailForm.controls.email.touched),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(19,15,"MD_CHANGE_EMAIL.BTN_CANCEL")," "),o.\u0275\u0275advance(3),o.\u0275\u0275property("disabled",!r.emailForm.valid),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(23,17,"MD_CHANGE_EMAIL.BTN_UPDATE")," "))},dependencies:[ie.NgIf,H.IonButton,H.IonLabel,H.IonText,P.\u0275NgNoValidate,P.DefaultValueAccessor,P.NgControlStatus,P.NgControlStatusGroup,P.FormGroupDirective,P.FormControlName,ue.X$],styles:[".content_modal_changel_email[_ngcontent-%COMP%]{display:flex;position:relative;flex-direction:column;justify-content:space-around;align-items:center;background:#fff;padding:1em;height:100%}.content_modal_changel_email__title[_ngcontent-%COMP%]{color:#383a3e;text-align:center;font-size:18px;font-family:Nunito;font-style:normal;font-weight:600;line-height:120%}.content_modal_changel_email__input[_ngcontent-%COMP%]{width:100%;text-align:center;display:flex;align-items:center;justify-content:center;flex-direction:column}.content_modal_changel_email__input__subtitle[_ngcontent-%COMP%]{color:#999;text-align:center;font-size:14px;font-family:Nunito;font-style:normal;font-weight:400;line-height:120%;padding-bottom:10px}.content_modal_changel_email__input[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{width:100%}.content_modal_changel_email__input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-top:.5em;height:48px;width:100%;text-align:center;background:rgba(227,226,226,.04);border:1px solid #e3e2e2;border-radius:36px}.content_modal_changel_email__input[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]:focus{border-color:var(--ion-color-medium);caret-color:var(--ion-color-primary);border-width:1px;outline:none}.content_modal_changel_email__input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:var(--ion-color-medium);opacity:.5}.content_modal_changel_email__input[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]:focus::-webkit-input-placeholder{color:var(--ion-color-dark);opacity:.5}.content_modal_changel_email__btns[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between}.content_modal_changel_email__btns[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{width:118px;height:40px;border-radius:32px}.content_modal_changel_email__btns_cancel[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{background:rgba(153,153,153,.13);--color: #757575;text-align:center;font-size:16px;font-family:Nunito;font-style:normal;font-weight:400;line-height:normal}"]}),g})();var te=p(92340),X=p(21284),be=p(97880),Ee=p(37763),Fe=p(92216),je=p(36290),He=p(17029);function _(g,N){if(1&g){const i=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"ion-img",25),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(i);const d=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(d.showPhoto({photo:d.photoStorage}))}),o.\u0275\u0275pipe(1,"translate"),o.\u0275\u0275elementEnd()}if(2&g){const i=o.\u0275\u0275nextContext();o.\u0275\u0275property("alt",o.\u0275\u0275pipeBind1(1,2,"ACCESSIBILITY.ARIA_LABELS.PHOTO_PROFILE"))("src","data:image/png;base64,"+i.photoStorage)}}function b(g,N){if(1&g&&(o.\u0275\u0275element(0,"ion-img",26),o.\u0275\u0275pipe(1,"translate")),2&g){const i=o.\u0275\u0275nextContext();o.\u0275\u0275property("alt",o.\u0275\u0275pipeBind1(1,2,"ACCESSIBILITY.ARIA_LABELS.NOT_PHOTO_PROFILE"))("src",i.nophoto)}}function l(g,N){1&g&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275elementStart(1,"div",27),o.\u0275\u0275element(2,"ion-skeleton-text",28),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(3,"div",29),o.\u0275\u0275element(4,"ion-skeleton-text",30),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(5,"div",31),o.\u0275\u0275element(6,"ion-skeleton-text",32)(7,"ion-skeleton-text",33),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementContainerEnd())}function h(g,N){if(1&g&&(o.\u0275\u0275elementStart(0,"div",37),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&g){const i=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",i.fullName," ")}}function I(g,N){if(1&g&&(o.\u0275\u0275elementStart(0,"div",38),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&g){const i=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",i.document," ")}}function J(g,N){if(1&g){const i=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",39),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(i);const d=o.\u0275\u0275nextContext(2);return o.\u0275\u0275resetView(d.openChangeEmail())}),o.\u0275\u0275elementStart(1,"label",40),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(4,"div",41)(5,"span"),o.\u0275\u0275text(6),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(7,"span"),o.\u0275\u0275element(8,"fa-icon",42),o.\u0275\u0275elementEnd()()()}if(2&g){const i=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(3,3,"PG_ACCOUNT_ACCESS_MAIL")," "),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",i.login,""),o.\u0275\u0275advance(2),o.\u0275\u0275property("icon",i.faEditIcon)}}function $(g,N){if(1&g&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,h,2,1,"div",34),o.\u0275\u0275template(2,I,2,1,"div",35),o.\u0275\u0275template(3,J,9,5,"div",36),o.\u0275\u0275elementContainerEnd()),2&g){const i=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",i.fullName),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",i.document),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",i.login)}}function re(g,N){if(1&g&&(o.\u0275\u0275elementStart(0,"span",54)(1,"strong"),o.\u0275\u0275text(2),o.\u0275\u0275elementEnd()()),2&g){const i=o.\u0275\u0275nextContext(2).$implicit;o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate1(" ",null==i||null==i.accessProfilesDesc?null:i.accessProfilesDesc.join(" + ")," ")}}function k(g,N){1&g&&(o.\u0275\u0275elementStart(0,"span",54)(1,"strong"),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd()()),2&g&&(o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(3,1,"ROLE_NOT_FOUND")," "))}function O(g,N){if(1&g&&(o.\u0275\u0275elementStart(0,"div",52),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275template(3,re,3,1,"span",53),o.\u0275\u0275template(4,k,4,3,"span",53),o.\u0275\u0275elementEnd()),2&g){const i=o.\u0275\u0275nextContext().$implicit;let r;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(2,3,"PG_ACCOUNT_ACCESS_PROFILE")," "),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",(null!==(r=null==i||null==i.authorities?null:i.authorities.length)&&void 0!==r?r:0)>0),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",0===(null==i||null==i.authorities?null:i.authorities.length))}}function F(g,N){if(1&g){const i=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"ion-row",44)(1,"ion-col",45)(2,"div",46),o.\u0275\u0275text(3),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(4,"div",47),o.\u0275\u0275text(5),o.\u0275\u0275elementEnd(),o.\u0275\u0275template(6,O,5,5,"div",48),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(7,"ion-col",49)(8,"div",50),o.\u0275\u0275listener("click",function(){const E=o.\u0275\u0275restoreView(i).$implicit,w=o.\u0275\u0275nextContext(2);return o.\u0275\u0275resetView(w.goRemoveCompanyAssociationModal(E))}),o.\u0275\u0275element(9,"ion-icon",51),o.\u0275\u0275elementEnd()()()}if(2&g){const i=N.$implicit,r=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate1(" ",null==i||null==i.company?null:i.company.name," "),o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate1(" ",null==i||null==i.company?null:i.company.address," "),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!r.skeltonProfileDescription)}}function T(g,N){if(1&g&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,F,10,3,"ion-row",43),o.\u0275\u0275elementContainerEnd()),2&g){const i=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",i.goodprofilesAvaliables)}}function ae(g,N){1&g&&(o.\u0275\u0275elementStart(0,"span",56),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementEnd()),2&g&&(o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(2,1,"PG_ACCOUNT_NOT_ACCESS_PROFILE")," "))}function Ce(g,N){if(1&g&&o.\u0275\u0275template(0,ae,3,3,"span",55),2&g){const i=o.\u0275\u0275nextContext();o.\u0275\u0275property("ngIf",i.profilesLoaded&&0===(null==i.goodprofilesAvaliables?null:i.goodprofilesAvaliables.length))}}function ot(g,N){1&g&&(o.\u0275\u0275elementStart(0,"ion-row",44)(1,"ion-col",57)(2,"div",58),o.\u0275\u0275element(3,"ion-skeleton-text",59),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(4,"div",60),o.\u0275\u0275element(5,"ion-skeleton-text",61),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(6,"div",62),o.\u0275\u0275element(7,"ion-skeleton-text",63)(8,"ion-skeleton-text",64),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(9,"ion-col",65)(10,"div",66),o.\u0275\u0275element(11,"ion-skeleton-text",67),o.\u0275\u0275elementEnd()()())}const it=function(){return[0,1,2,3]};function ze(g,N){1&g&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,ot,12,0,"ion-row",43),o.\u0275\u0275elementContainerEnd()),2&g&&(o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",o.\u0275\u0275pureFunction0(1,it)))}const Xe=function(g){return{"opacity-0":g}},Je=function(){return["/delete-account"]};let qe=(()=>{class g{constructor(i,r,d,E,w,U,W,se,ee,Ae,Oe,xe,we,q,Re,Ne,Ve,rt,et,tt,We,Ke,at,st,lt,dt,mt,c,x){var t=this;this.apiService=i,this.authService=r,this.logService=d,this.storageService=E,this.notificatorService=w,this.loadingService=U,this.navigationService=W,this.resumeToPinService=se,this.resumeToGenerateQRCode=ee,this.modalController=Ae,this.profileManagerService=Oe,this.portalLoginManagerService=xe,this.translateConfigService=we,this.createEventService=q,this.resumeCreateEventInterruptedService=Re,this.stateService=Ne,this.photoService=Ve,this.cameraService=rt,this.brMask=et,this.utilsService=tt,this.modalHelpService=We,this.focusService=Ke,this.home=at,this.loaderService=st,this.activatedRoute=lt,this.router=dt,this.ngZone=mt,this.managerTokenUaamobileService=c,this.emailUpdateService=x,this.voProfiles=[],this.fullName="",this.document="",this.login="",this.foreigner=!1,this.existPendings=!1,this.nophoto="./assets/img/no-photo.png",this.faEditIcon=oe.IwR,this.goodprofilesAvaliables=[],this.skeletonProfiles=!0,this.skeletonAccountData=!0,this.profilesLoaded=!1,this.userCurrentLang="en",this.photoStorage="",this.skeltonProfileDescription=!1,this.email="",this.isDevEnvironment=!te.N.production,this.currentEnvironmentType=te.N.type,this.isOffline=!1,this.destroy$=new fe.xQ,this.token="",this.navigateToPendingLiberations=()=>{this.navigationService.forward(["/push-notifications"])},this.getAccount=(0,v.Z)(function*(){try{t.loadingService.show(t.translateConfigService.translate("LOADING_DATA"),"loading-account-details");const a=yield t.managerTokenUaamobileService.getNewToken();t.token=a;const s=yield t.authService.getAccount();s?.fullName?yield t.handleGetAccountSuccessResponse(s):t.apiService.account(a).subscribe(t.handleGetAccountSuccessResponse,t.handleGetAccountErrorResponse)}catch(a){t.skeletonProfiles=!1,t.skeletonAccountData=!1,t.loadingService.hide(0,"loading-account-details");const s=t.translateConfigService.translate("TOAST_TITLE_ERROR"),m=t.translateConfigService.translate("PG_ACCOUNT_TOAST_ERROR_LOAD_DATA_ACCOUNT");t.notificatorService.notify({title:s,message:m,type:"error"});const C=yield t.authService.getAccount();C?.fullName&&(yield t.handleGetAccountSuccessResponse(C)),t.logService.logError("getAccount::error","",a)}finally{t.loadingService.hide(0,"loading-account-details"),t.focusService.applyFocusQuerySelector("page_account-details",1e3),t.skeletonProfiles=!1,t.skeletonAccountData=!1,t.skeltonProfileDescription=!1,console.log("finish")}}),this.handleGetAccountSuccessResponse=function(){var a=(0,v.Z)(function*(s){s?.fullName&&s?.email&&s?.document&&s?.refId?(t.authService.setAccount(s),t.fullName=s?.fullName,t.login=s?.login,t.email=s?.email,t.document=s?.document,t.refId=s?.refId,t.document=t.cpfMask(s?.document),yield t.getPhoto(s?.refId),t.skeletonAccountData=!1,t.getProfiles(),t.dataAccount={fullName:t.fullName,login:t.login,email:t.email,document:t.document,refId:t.refId,emailVerified:!1}):t.logService.logError("handleGetAccountSuccessResponse::missingData","Dados faltando na resposta da conta",s)});return function(s){return a.apply(this,arguments)}}(),this.handleGetAccountErrorResponse=a=>{console.log("handleGetAccountErrorResponse:",a);const s=this.translateConfigService.translate("TOAST_TITLE_ERROR"),m=this.translateConfigService.translate("PG_ACCOUNT_TOAST_ERROR_LOAD_DATA_ACCOUNT");this.loadingService.hide(0,"loading-account-details"),this.notificatorService.notify({title:s,message:m,type:"error"}),this.logService.logError("handleGetAccountErrorResponse::error","",a)},this.navigateToQRCode=()=>{this.navigationService.forward(["/home"])},this.logout=(0,v.Z)(function*(){t.logService.logEvent("user::menuLogoutStart");const a=yield t.modalController.create({component:Ie.qk,componentProps:{}});a.onDidDismiss().then(s=>{s?.data?(t.logService.logEvent("user::menuLogoutConfirmed"),t.doLogout()):t.logService.logEvent("user::menuLogoutRejected")}),yield a.present()}),this.doLogout=()=>{this.loadingService.show(this.translateConfigService.translate("PG_ACCOUNT_LOADING_UNRESGISTER"),"menu-unregister"),this.logService.logEvent("user::menuDoLogout"),this.resumeToPinService.stop(),this.resumeToGenerateQRCode.stop(),this.authService.getToken().then(a=>{this.apiService.accountDelete(a).subscribe(()=>{this.logService.logEvent("http::accountDeleteSuccess"),this.authService.unregister().then(()=>this.loadingService.hide(0,"menu-unregister")).then(()=>{this.clearProfileStorage(),this.navigationService.root(["start"])})},s=>{this.logService.logError("http::accountDelete","",s),this.authService.unregister().then(()=>this.loadingService.hide(0,"menu-unregister")).then(()=>{Me.g.removeAllListeners().then(()=>{}).finally(()=>{this.clearProfileStorage(),this.navigationService.root(["start"]),this.home.stopAllIntervals("AccountPage::menu::doLogout")})})})})},this.clearStorageAndLogout=(0,v.Z)(function*(){t.logService.logEvent("dev::clearStorageAndLogout"),t.loadingService.show("Limpando storage...","dev-clear-storage");try{yield t.storageService.startStorage(),yield t.storageService.clear(),t.clearProfileStorage(),yield Me.g.removeAllListeners(),t.home.stopAllIntervals("AccountPage::dev::clearStorageAndLogout"),t.loadingService.hide(0,"dev-clear-storage"),t.navigationService.root(["start"]),t.notificatorService.notify({title:"Storage Limpo",message:"Todos os dados foram removidos",type:"success",timeout:3e3})}catch(a){t.loadingService.hide(0,"dev-clear-storage"),t.logService.logError("dev::clearStorageAndLogout","",a),t.notificatorService.notify({title:"Erro",message:"Erro ao limpar storage",type:"error",timeout:3e3})}}),this.handleFaceCaptureResult=function(){var a=(0,v.Z)(function*(s){const m={colaborator:!0,refId:t.refId,faceImageContentType:"png",faceImage:s.base64,validationType:s.validationType};t.photoStorage=m?.faceImage??t.photoStorage,t.userThumbnailPhoto=m,t.setPhotoStorage({faceImage:m.faceImage??t.photoStorage,synchronized:!0,validated:m.validated??!1,hasPhoto:null!==m.faceImageThumbnail}),yield t.updatePhoto(m,!0)});return function(s){return a.apply(this,arguments)}}(),this.goRemoveCompanyAssociationModal=function(){var a=(0,v.Z)(function*(s){s?.company?.instanceName&&t.navigationService.forward(["/remove-company-association"],{state:{companyInstanceName:s?.company?.instanceName,companyName:s?.company?.name,company:s?.company}})});return function(s){return a.apply(this,arguments)}}(),this.handleTakePhotoSuccessResponse=function(){var a=(0,v.Z)(function*(s){const m=s?.base64String,C={colaborator:!0,refId:t.refId,faceImageContentType:s?.format?s?.format:"png",faceImage:m};t.photoStorage=C.faceImage,t.userThumbnailPhoto=C,t.setPhotoStorage({faceImage:C.faceImage,synchronized:!0,validated:C.validated??!1,hasPhoto:null!==C.faceImageThumbnail}),yield t.updatePhoto(C,!0)});return function(s){return a.apply(this,arguments)}}(),this.handleTakePhotoErrorResponse=a=>{this.logService.logError("error:takePhotoPlugin","Erro take photo plugin",a)},this.getProfiles=()=>{let a="";this.authService.getToken().then(s=>new Promise((m,C)=>{a=s,this.apiService.getUserProfiles("VO,LG,GF",a).subscribe(m,C)})).then(s=>this.processGetVOAndLGUserProfilesSuccessResponse(s,a)).catch(s=>{this.loadingService.hide(0,"loading-account-details");const m=this.translateConfigService.translate("PG_ACCOUNT_TOAST_ERROR_REQUEST_TITLE"),C=this.translateConfigService.translate("PG_ACCOUNT_TOAST_MESSAGE_ERROR_REQUEST");this.logService.logError("getProfiles::http","Method getProfiles account",s),this.notificatorService.notify({title:m,message:C,type:"error"})}).finally(()=>{this.skeletonProfiles=!1,this.skeltonProfileDescription=!1,this.profilesLoaded=!0,this.loadingService.hide(0,"loading-account-details")})},this.processGetVOAndLGUserProfilesSuccessResponse=function(){var a=(0,v.Z)(function*(s,m){t.loadingService.hide(0,"loading-account-details"),t.voProfiles=s&&s?.length>0?s?.filter(C=>"VO"===C.portal&&null!==C.company):[],t.lgProfiles=s&&s?.length>0?s?.filter(C=>"LG"===C.portal&&null!==C.company):[],t.goodprofilesAvaliables=t.goodProfiles(s),t.profileManagerService.setProfileList(t.voProfiles),t.profileManagerService.setProfileLogisticList(t.lgProfiles),t.getAuthoritiesDescriptions(m)});return function(s,m){return a.apply(this,arguments)}}(),this.filterGoodProfiles=a=>{const s=[];return a.forEach(m=>{m.authorities&&0!==m.authorities.length?s.push(m):0===m.authorities.length&&(m.authorities=[],s.push(m))}),s},this.activatedRoute.queryParams.subscribe(a=>{"true"===a?.reload&&(this.ngOnInit(),this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{},replaceUrl:!0}))})}ionViewWillEnter(){var i=this;return(0,v.Z)(function*(){i.userCurrentLang=i.translateConfigService.getCurrentLang(),"pt"===i.userCurrentLang&&(i.userCurrentLang="pt-BR")})()}ngOnInit(){var i=this;return(0,v.Z)(function*(){i.start(),i.statusConnectionAndRestartStart(),i.emailUpdateService.state$.pipe((0,he.R)(i.destroy$)).subscribe(r=>{console.log("EmailUpdateService state changed:",r),"completed"===r.step&&r.dataAccount&&(console.log("Email update completed, updating account page data:",r.dataAccount),i.ngZone.run((0,v.Z)(function*(){i.email=r.dataAccount.email,i.login=r.dataAccount.login,i.dataAccount.email=r.dataAccount.email,i.dataAccount.login=r.dataAccount.login,i.dataAccount.emailVerified=r.dataAccount.emailVerified;const E={...yield i.authService.getAccount(),email:r.dataAccount.email,login:r.dataAccount.login,emailVerified:r.dataAccount.emailVerified};i.authService.setAccount(E),console.log("Account page data updated successfully"),i.emailUpdateService.reset()})))})})()}start(){var i=this;return(0,v.Z)(function*(){const r=yield i.authService.getPhoto();i.photoStorage=i.hasFaceImageAndSynchronizedProperties(r)?r?.faceImage:r,i.getAccount()})()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.unsubscribe()}takePhoto(){var i=this;return(0,v.Z)(function*(){const r=ge.dV.isNativePlatform();r&&(yield Te.J.disable());try{yield i.openFaceCapture()}catch(d){i.handleTakePhotoErrorResponse(d)}finally{r&&(yield Te.J.enable())}})()}openFaceCapture(){var i=this;return(0,v.Z)(function*(){const r=yield i.modalController.create({component:Ie.X4,cssClass:"face-capture-modal"});yield r.present();const{data:d}=yield r.onDidDismiss();if(d?.base64)yield i.handleFaceCaptureResult(d);else if(null===d){const E=yield i.cameraService.takePicture(pe.oK.Camera);i.handleTakePhotoSuccessResponse(E)}})()}doRefresh(i){this.skeletonProfiles=!0,this.skeletonAccountData=!0,console.log(this.isOffline),this.isOffline||(this.authService.clearAccount(),this.authService.clearPhoto()),setTimeout(()=>{this.start(),i.target.complete(),this.skeletonProfiles=!1,this.skeletonAccountData=!1},2e3)}showPhoto(i){var r=this;return(0,v.Z)(function*({photo:d}){if(!d)return;const E=r.fullName,U="data:image/png;base64,"+d,W=r.modalHelpService.getCssClass("modal-generic-component-showphoto-profile",""),se={type:"image",typename:"image",title:"",description:E,img:U,actionsButton:[{label:r.translateConfigService.translate("BTN_CLOSE"),enabled:!0,action:()=>r.modalController.dismiss()}]};yield(yield r.modalController.create({component:Ie.rD,componentProps:{props:se},cssClass:W.cssClass})).present()}).apply(this,arguments)}openChangeEmail(){var i=this;return(0,v.Z)(function*(){yield(yield i.modalController.create({component:G,cssClass:"modal-change-email",componentProps:{dataAccount:i.dataAccount}})).present()})()}setLanguageSelect(i){this.userCurrentLang="pt"==i?.lang?"pt-BR":i?.lang,this.skeletonProfiles=!0,this.skeltonProfileDescription=!0,this.profilesLoaded=!1,this.getProfiles()}clearProfileStorage(){this.profileManagerService.clearProfile(),this.profileManagerService.clearProfileList(),this.profileManagerService.clearProfileListVOandLG(),this.portalLoginManagerService.clearPortalProfiles(),this.profileManagerService.clearProfileLogisticList(),this.profileManagerService.clearProfileLogistic(),this.createEventService.clearCreateEventData(),this.resumeCreateEventInterruptedService.clearAll(),this.authService.clearAccount(),this.authService.clearPhoto(),localStorage.removeItem("store_current_config"),localStorage.removeItem("firstRequestGetProfile"),localStorage.removeItem("basePlatformUrl"),localStorage.removeItem("ka_fcmMobileToken")}getToken(i,r){var d=this;return(0,v.Z)(function*(){const E=!!(yield d.authService.getForeigner());let w="";try{const U=yield d.authService.needsToRenewToken();w=yield d.authService.getToken();const W=yield d.authService.isExpiredToken(),se=yield d.authService.getPasswordHash();if(d.isOffline&&!W||!W&&!U)return w;if(W&&!d.isOffline){const ee=yield d.apiService.getToken(i,r,se,E).toPromise();if(ee&&ee.refId)return yield d.authService.updateTokenGeneratedAt(),d.authService.setRefId(ee.refId),ee.access_token}else if(U){const ee=yield d.apiService.getToken(i,r,se,E).toPromise();if(ee&&ee.refId)return yield d.authService.updateTokenGeneratedAt(),d.authService.setRefId(ee.refId),ee.access_token;if(!W)return w}return w}catch(U){const W={...U,uuid:i,document:r,foreigner:E};throw new Error(JSON.stringify(W))}})()}statusConnectionAndRestartStart(){this.stateService.getState().pipe((0,he.R)(this.destroy$)).subscribe(i=>{if("Offline"===i.status)this.isOffline=!0;else if(this.isOffline){this.isOffline=!1;const r=setTimeout(()=>{clearTimeout(r)},1e3)}})}getPhoto(i){var r=this;return(0,v.Z)(function*(){const d=yield r.authService.getPhoto(),E=yield r.getToken(r.uuid,r.documentStorage);let w;if(!r.hasValidPhotoInStorage(d))try{w=yield r.photoService.getPhoto(E,i).toPromise(),w&&w?.faceImageThumbnail?r.handleSyncSuccess(w):r.handleSyncFailure()}catch(U){404!==U.status&&r.logService.logError("handleErrorGetPhoto","Erro get photo http",U)}r.updateUserPhoto(d)})()}updatePhoto(i){var r=this;return(0,v.Z)(function*(d,E=!1){E&&r.loaderService.show("",1500);try{const w=yield r.getToken(r.uuid,r.documentStorage),U=yield r.photoService.updatePhoto(w,d).toPromise();r.handleUpdatePhotoNotification(U),U&&r.setPhotoStorage({synchronized:!0,faceImage:d?.faceImage,validated:U?.validated??!1,hasPhoto:null!==U?.faceImageThumbnail})}catch(w){r.loaderService.hide(),r.handleErrorUpdatePhotoNotification(w)}finally{r.loaderService.hide()}}).apply(this,arguments)}handleUpdatePhotoNotification(i){const d={title:this.translateConfigService.translate("PG_ACCOUNT_TOAST_SUCCESS_UPDATE_PHOTO_TITLE"),message:"",type:"success",timeout:5e3};this.notificatorService.notify(d)}handleErrorUpdatePhotoNotification(i){this.logService.logError("httpPost:photo","Erro http update photo",i);const d={title:this.translateConfigService.translate("PG_ACCOUNT_TOAST_ERROR_UPDATE_PHOTO_TITLE"),message:"",type:"error",timeout:5e3};this.notificatorService.notify(d)}cpfMask(i){if(this.utilsService.isValidCPF(i)){const r=new Se.CR;return r.person=!0,this.brMask.writeCreateValue(i,r)}return i}setPhotoStorage(i){var r=this;return(0,v.Z)(function*(){r.authService.clearPhoto(),r.authService.setPhoto({faceImage:i.faceImage??"",synchronized:i.synchronized,validated:i.validated??!1,hasPhoto:i.hasPhoto??!1})})()}goodProfiles(i){let r=this.filterGoodProfiles(i);return this.filterGoodProfiles(this.lgProfiles).forEach(d=>{r.push(d)}),r=r.filter((d,E,w)=>E===w.findIndex(U=>U.company.instanceName===d.company.instanceName)),r}getAuthoritiesDescriptions(i){var r=this;return(0,v.Z)(function*(){try{const d=r.goodprofilesAvaliables.map(({company:w,authorities:U})=>({instanceName:w.instanceName,authorities:U})),E=yield r.getApiTranslateAuthorities(d,i);r.handleSuccessGetTranslateRoles(E)}catch(d){r.handleErrorGetTranslateRoles(d)}finally{r.skeltonProfileDescription=!1}})()}handleErrorGetTranslateRoles(i){this.logService.logError("getTranslateRolesAuthorities::http","Erro request get authorities",i)}handleSuccessGetTranslateRoles(i){this.goodprofilesAvaliables.forEach(r=>{const d=i.find(E=>E.instanceName===r.company.instanceName);if(d){const E=d.translations.find(w=>w.lang===this.userCurrentLang);E&&(r.accessProfilesDesc=E.descriptions)}})}getApiTranslateAuthorities(i,r){return this.apiService.getTranslateRolesProfile(i,r).toPromise()}hasValidPhotoInStorage(i){return this.hasFaceImageAndSynchronizedProperties(i)?i&&i?.faceImage:!!i}handleSyncSuccess(i){this.setPhotoStorage({faceImage:i?.faceImageThumbnail,synchronized:!0,validated:i?.validated??!1,hasPhoto:null!==i?.faceImageThumbnail}),this.photoStorage=i?.faceImageThumbnail??""}handleSyncFailure(){this.setPhotoStorage({faceImage:null,synchronized:!1,validated:!1,hasPhoto:!1})}updateUserPhoto(i){var r=this;return(0,v.Z)(function*(){const d={colaborator:!0,refId:r.refId,faceImageContentType:"png",faceImage:""};r.hasFaceImageAndSynchronizedProperties(i)?!i?.synchronized&&i?.faceImage?(d.faceImage=i.faceImage,yield r.updatePhoto(d)):(d.faceImage=i.faceImage,console.log("\u{1f680} ~ synchronized::file: account.page.ts:769 ~ AccountPage ~ updateUserPhoto ~ data:",d)):i&&(d.faceImage=i,yield r.updatePhoto(d))})()}hasFaceImageAndSynchronizedProperties(i){return!(!i?.hasOwnProperty("faceImage")||!i?.hasOwnProperty("synchronized"))}}return g.\u0275fac=function(i){return new(i||g)(o.\u0275\u0275directiveInject(M.sM),o.\u0275\u0275directiveInject(M.e8),o.\u0275\u0275directiveInject(M.$V),o.\u0275\u0275directiveInject(M.V1),o.\u0275\u0275directiveInject(M.V6),o.\u0275\u0275directiveInject(M.bz),o.\u0275\u0275directiveInject(M.f5),o.\u0275\u0275directiveInject(M.np),o.\u0275\u0275directiveInject(M.nu),o.\u0275\u0275directiveInject(H.ModalController),o.\u0275\u0275directiveInject(M.v4),o.\u0275\u0275directiveInject(M.dj),o.\u0275\u0275directiveInject(M.wK),o.\u0275\u0275directiveInject(M.jc),o.\u0275\u0275directiveInject(M.NL),o.\u0275\u0275directiveInject(X.b),o.\u0275\u0275directiveInject(be.T),o.\u0275\u0275directiveInject(M.yr),o.\u0275\u0275directiveInject(Se.bS),o.\u0275\u0275directiveInject(M.FW),o.\u0275\u0275directiveInject(M.dr),o.\u0275\u0275directiveInject(Ee.i),o.\u0275\u0275directiveInject(ve.U),o.\u0275\u0275directiveInject(M.D1),o.\u0275\u0275directiveInject(e.ActivatedRoute),o.\u0275\u0275directiveInject(e.Router),o.\u0275\u0275directiveInject(M.zf),o.\u0275\u0275directiveInject(M.FB),o.\u0275\u0275directiveInject(u))},g.\u0275cmp=o.\u0275\u0275defineComponent({type:g,selectors:[["app-account"]],features:[o.\u0275\u0275ProvidersFeature([Se.bS,ve.U])],decls:44,vars:29,consts:[[3,"title","showBadge","refresh"],[1,"account-page"],["slot","fixed","pullFactor","0.9","pullMin","60","pullMax","120",2,"background-color","transparent",3,"ionRefresh"],[1,"content-account",3,"ngClass"],[1,"account-details"],[1,""],["id","page_account-details","tabindex","1",1,"title"],["tabindex","2",1,"btn-translate"],[3,"languageSelectOnClose"],[1,"ion-margin-vertical"],["size","12"],[1,"account-card-photo"],["tabindex","3",1,"account-card-photo__img"],["tabindex","4","role","img",3,"alt","src","click",4,"ngIf"],["tabindex","4","role","img",3,"alt","src",4,"ngIf"],["tabindex","5",1,"account-card-photo__img__eclipse-camera",3,"click"],["aria-hidden","true","slot","icon-only","name","camera-outline"],[1,"account-card-photo__infos"],[4,"ngIf"],["tabindex","10",1,"account-details"],["tabindex","11",1,"title"],[4,"ngIf","ngIfElse"],["noProfile",""],[1,"button-holder"],["tabindex","15","mode","ios","color","danger","routerLinkActive","router-link-active","fill","clear","shape","round",3,"routerLink"],["tabindex","4","role","img",3,"alt","src","click"],["tabindex","4","role","img",3,"alt","src"],[1,"account-card-photo__infos__fullname","ion-text-wrap"],["animated","",2,"width","70%","height","20px","margin-bottom","8px"],[1,"account-card-photo__infos__document"],["animated","",2,"width","50%","height","16px","margin-bottom","8px"],[1,"account-card-photo__infos__email","ion-text-wrap"],["animated","",2,"width","30%","height","14px","margin-bottom","4px"],["animated","",2,"width","60%","height","16px"],["class","account-card-photo__infos__fullname ion-text-wrap","tabindex","6",4,"ngIf"],["class","account-card-photo__infos__document","tabindex","7",4,"ngIf"],["class","account-card-photo__infos__email ion-text-wrap",3,"click",4,"ngIf"],["tabindex","6",1,"account-card-photo__infos__fullname","ion-text-wrap"],["tabindex","7",1,"account-card-photo__infos__document"],[1,"account-card-photo__infos__email","ion-text-wrap",3,"click"],["tabindex","8","for","email"],["tabindex","9",1,"email"],[1,"fa-edit",3,"icon"],["class","item-card-company",4,"ngFor","ngForOf"],[1,"item-card-company"],["size","10","tabindex","11"],["tabindex","12",1,"item-card-company__companyName"],["tabindex","13",1,"item-card-company__address"],["class","item-card-company__profile_access",4,"ngIf"],["size","2","tabindex","16"],[1,"item-card-company__remove_access_button_company",3,"click"],["tabindex","15","name","trash-outline","slot","icon-only"],[1,"item-card-company__profile_access"],["class","profile-access","tabindex","14",4,"ngIf"],["tabindex","14",1,"profile-access"],["class","no-profile","tabindex","11",4,"ngIf"],["tabindex","11",1,"no-profile"],["size","10"],[1,"item-card-company__companyName"],["animated","",2,"width","85%","height","16px","margin-bottom","8px"],[1,"item-card-company__address"],["animated","",2,"width","100%","height","12px","margin-bottom","4px"],[1,"item-card-company__profile_access",2,"display","flex","gap","0.2em"],["animated","",2,"width","40%","height","11px","margin-bottom","4px"],["animated","",2,"width","75%","height","13px"],["size","2"],[1,"item-card-company__remove_access_button_company"],["animated","",2,"width","24px","height","24px","border-radius","50%"]],template:function(i,r){if(1&i&&(o.\u0275\u0275element(0,"app-header",0),o.\u0275\u0275pipe(1,"translate"),o.\u0275\u0275elementStart(2,"ion-content",1)(3,"ion-refresher",2),o.\u0275\u0275listener("ionRefresh",function(E){return r.doRefresh(E)}),o.\u0275\u0275element(4,"ion-refresher-content"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(5,"div",3)(6,"ion-grid")(7,"ion-row")(8,"ion-col")(9,"ion-row")(10,"ion-col")(11,"div",4)(12,"div",5)(13,"div",6),o.\u0275\u0275text(14),o.\u0275\u0275pipe(15,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(16,"div",7)(17,"app-translate-btn",8),o.\u0275\u0275listener("languageSelectOnClose",function(E){return r.setLanguageSelect(E)}),o.\u0275\u0275elementEnd()()()()()(),o.\u0275\u0275elementStart(18,"ion-row",9)(19,"ion-col",10)(20,"div",11)(21,"div",12),o.\u0275\u0275template(22,_,2,4,"ion-img",13),o.\u0275\u0275template(23,b,2,4,"ion-img",14),o.\u0275\u0275elementStart(24,"div",15),o.\u0275\u0275listener("click",function(){return r.takePhoto()}),o.\u0275\u0275pipe(25,"translate"),o.\u0275\u0275element(26,"ion-icon",16),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(27,"div",17),o.\u0275\u0275template(28,l,8,0,"ng-container",18),o.\u0275\u0275template(29,$,4,3,"ng-container",18),o.\u0275\u0275elementEnd()()()(),o.\u0275\u0275elementStart(30,"ion-row")(31,"ion-col")(32,"div",19)(33,"div",20),o.\u0275\u0275text(34),o.\u0275\u0275pipe(35,"translate"),o.\u0275\u0275elementEnd()()()(),o.\u0275\u0275template(36,T,2,1,"ng-container",21),o.\u0275\u0275template(37,Ce,1,1,"ng-template",null,22,o.\u0275\u0275templateRefExtractor),o.\u0275\u0275template(39,ze,2,2,"ng-container",18),o.\u0275\u0275elementEnd()()(),o.\u0275\u0275elementStart(40,"div",23)(41,"ion-button",24),o.\u0275\u0275text(42),o.\u0275\u0275pipe(43,"translate"),o.\u0275\u0275elementEnd()()()()),2&i){const d=o.\u0275\u0275reference(38);let E;o.\u0275\u0275property("title",o.\u0275\u0275pipeBind1(1,16,"PG_ACCOUNT_HEADER_TITLE"))("showBadge",!0)("refresh",!1),o.\u0275\u0275advance(5),o.\u0275\u0275property("ngClass",o.\u0275\u0275pureFunction1(26,Xe,r.skeletonAccountData)),o.\u0275\u0275advance(9),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(15,18,"PG_ACCOUNT_ACCOUNT_DETAILS")," "),o.\u0275\u0275advance(8),o.\u0275\u0275property("ngIf",r.photoStorage),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!r.photoStorage),o.\u0275\u0275advance(1),o.\u0275\u0275attribute("aria-label",o.\u0275\u0275pipeBind1(25,20,"ACCESSIBILITY.ARIA_LABELS.TAKE_PHOTO_PROFILE")),o.\u0275\u0275advance(4),o.\u0275\u0275property("ngIf",r.skeletonAccountData),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!r.skeletonAccountData),o.\u0275\u0275advance(5),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(35,22,"PG_ACCOUNT_ACCESS_PROFILES")),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",(null!==(E=null==r.goodprofilesAvaliables?null:r.goodprofilesAvaliables.length)&&void 0!==E?E:0)>0)("ngIfElse",d),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngIf",r.skeletonProfiles&&0===(null==r.goodprofilesAvaliables?null:r.goodprofilesAvaliables.length)),o.\u0275\u0275advance(2),o.\u0275\u0275property("routerLink",o.\u0275\u0275pureFunction0(28,Je)),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(43,24,"BNT_DELETE_ACCOUNT")," ")}},dependencies:[ie.NgClass,ie.NgForOf,ie.NgIf,H.IonButton,H.IonCol,H.IonContent,H.IonGrid,H.IonIcon,H.IonImg,H.IonRefresher,H.IonRefresherContent,H.IonRow,H.IonSkeletonText,H.RouterLinkDelegate,Fe.BN,je.G,He.c,e.RouterLink,e.RouterLinkActive,ue.X$],styles:["ion-content[_ngcontent-%COMP%]{--background: #f1f1f1}ion-content[_ngcontent-%COMP%] .btn-translate[_ngcontent-%COMP%]{position:absolute;right:-.5em;top:-.8em}.content-account[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;flex-direction:column;justify-content:space-evenly}.content-account[_ngcontent-%COMP%] ion-grid[_ngcontent-%COMP%]{margin:0 auto;width:100%}ion-toolbar[_ngcontent-%COMP%]{font-family:Nunito,sans-serif}ion-toolbar[_ngcontent-%COMP%] ion-img[_ngcontent-%COMP%]{height:25px;width:25px}ion-toolbar[_ngcontent-%COMP%] ion-title[_ngcontent-%COMP%]{letter-spacing:1px}ion-toolbar[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:24px;padding:0;width:24px;margin:0;font-size:19px;color:#656768}ion-toolbar[_ngcontent-%COMP%] ion-button.hover[_ngcontent-%COMP%]{background:#fff}.account-details[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;position:relative;font-weight:700}ion-row.item-card-company[_ngcontent-%COMP%] ion-col[_ngcontent-%COMP%]{padding:0}.item-card-company[_ngcontent-%COMP%]{background:#fff;border-radius:8px;padding:.43rem .8rem;margin:.8em .5em;font-weight:300;font-size:.7rem;line-height:1.6em}.item-card-company__companyName[_ngcontent-%COMP%]{font-weight:700;display:flex;font-size:.85rem;line-height:1.8em;align-items:center;color:var(--ion-color-primary)}.item-card-company__address[_ngcontent-%COMP%], .item-card-company__profile_access[_ngcontent-%COMP%]{display:flex;align-items:center;color:#757575}.item-card-company__profile_access[_ngcontent-%COMP%] > .profile-access[_ngcontent-%COMP%]{font-weight:800;-webkit-padding-start:.3em;padding-inline-start:.3em}.item-card-company__remove_access_button_company[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;height:100%}.item-card-company__remove_access_button_company[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{color:#a6a6a6;font-size:2.3em}.button-holder[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin:2em auto;font-weight:600}.no-profile[_ngcontent-%COMP%]{-webkit-padding-start:.3em;padding-inline-start:.3em}.account-card-photo[_ngcontent-%COMP%]{background:#fff;border-radius:8px;display:flex;width:100%;position:relative;min-height:124px;padding:12px 8px;border:solid 1px rgba(204,204,204,.3098039216);align-items:center}.account-card-photo__img[_ngcontent-%COMP%]{position:relative}.account-card-photo__img[_ngcontent-%COMP%] ion-img[_ngcontent-%COMP%]{max-height:97px;min-height:97px;width:97px;background-color:#f1f1f1;overflow:hidden;border:solid 3px var(--ion-color-primary);position:relative;border-radius:50%}.account-card-photo__img[_ngcontent-%COMP%] ion-img[_ngcontent-%COMP%]::part(image){object-fit:cover!important;position:absolute!important}.account-card-photo__img__eclipse-camera[_ngcontent-%COMP%]{position:absolute;bottom:0;right:0;background:var(--ion-color-primary);width:30px;height:30px;display:flex;justify-content:center;align-items:center;border-radius:50%}.account-card-photo__img__eclipse-camera[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:1.1em;color:#fff}.account-card-photo__infos[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-evenly;-webkit-padding-start:.9em;padding-inline-start:.9em;width:100%}.account-card-photo__infos__fullname[_ngcontent-%COMP%]{font-style:normal;font-weight:800;font-size:1em;line-height:22px;display:flex;align-items:center;color:var(--ion-color-primary)}.account-card-photo__infos__document[_ngcontent-%COMP%]{font-style:normal;font-weight:700;font-size:.9em;line-height:120%;display:flex;align-items:center;color:#383a3e;padding-top:3px}.account-card-photo__infos__email[_ngcontent-%COMP%]{padding-top:9px}.account-card-photo__infos__email[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:300;font-size:.8em;line-height:120%;display:flex;align-items:center;color:#999}.account-card-photo__infos__email[_ngcontent-%COMP%] > .email[_ngcontent-%COMP%]{font-weight:700;font-size:.8em;line-height:120%;display:flex;align-items:center;color:#383a3e;overflow-wrap:anywhere;position:relative;justify-content:flex-start}.account-card-photo__infos__email[_ngcontent-%COMP%] > .email[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:0 .3em 0 0;display:flex}.account-card-photo__infos__email[_ngcontent-%COMP%] > .email[_ngcontent-%COMP%] span[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:1em;padding:0;width:1em;margin:0;font-size:1em;color:#6cb52d}@keyframes fadeIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.relative_bottom_btn_delete_account__bottom_btn_delete_account[_ngcontent-%COMP%]{position:absolute;bottom:0}.ion-activatable[_ngcontent-%COMP%]{position:relative}"]}),g})();var Ze=p(15626);const ce=[{path:"",component:qe}];let _e=(()=>{class g{}return g.\u0275fac=function(i){return new(i||g)},g.\u0275mod=o.\u0275\u0275defineNgModule({type:g}),g.\u0275inj=o.\u0275\u0275defineInjector({imports:[K.I,Ze.K,z.D,e.RouterModule.forChild(ce)]}),g})()},82021:(Ye,Pe,p)=>{p.d(Pe,{U:()=>mt});var e=p(15861),z=p(59584),K=p(24889),v=p(5254),Te=p(21086),Me=p(40537),ge=p(72986),pe=p(87545),oe=p(22868),Ie=p(27221),Se=p(35548),fe=p(47423),he=p(64633),ve=p(72877),P=(()=>{return(c=P||(P={})).Accessibility="accessibility",c.Account="account",c.AirplaneMode="airplane_mode",c.Apn="apn",c.ApplicationDetails="application_details",c.ApplicationDevelopment="application_development",c.Application="application",c.AppNotification="app_notification",c.BatteryOptimization="battery_optimization",c.Bluetooth="bluetooth",c.Captioning="captioning",c.Cast="cast",c.DataRoaming="data_roaming",c.Date="date",c.Display="display",c.Dream="dream",c.Home="home",c.Keyboard="keyboard",c.KeyboardSubType="keyboard_subtype",c.Locale="locale",c.Location="location",c.ManageApplications="manage_applications",c.ManageAllApplications="manage_all_applications",c.MemoryCard="memory_card",c.Network="network",c.NfcSharing="nfcsharing",c.NfcPayment="nfc_payment",c.NfcSettings="nfc_settings",c.Print="print",c.Privacy="privacy",c.QuickLaunch="quick_launch",c.Search="search",c.Security="security",c.Settings="settings",c.ShowRegulatoryInfo="show_regulatory_info",c.Sound="sound",c.Storage="storage",c.Sync="sync",c.TextToSpeech="text_to_speech",c.Usage="usage",c.UserDictionary="user_dictionary",c.VoiceInput="voice_input",c.VPN="vpn",c.Wifi="wifi",c.WifiIp="wifi_ip",c.Wireless="wireless",c.ZenMode="zen_mode",c.ZenModePriority="zen_mode_priority",c.ZenModeBlockedEffects="zen_mode_blocked_effects",P;var c})(),o=(()=>{return(c=o||(o={})).About="about",c.App="app",c.AppNotification="appNotification",c.AutoLock="autoLock",c.Bluetooth="bluetooth",c.DateTime="dateTime",c.FaceTime="facetime",c.General="general",c.Keyboard="keyboard",c.ICloud="iCloud",c.ICloudStorageBackup="iCloudStorageBackup",c.International="international",c.LocationServices="locationServices",c.Music="music",c.Notes="notes",c.Notifications="notifications",c.Phone="phone",c.Photos="photos",c.ManagedConfigurationList="managedConfigurationList",c.Reset="reset",c.Ringtone="ringtone",c.Sounds="sounds",c.SoftwareUpdate="softwareUpdate",c.Store="store",c.Tracking="tracking",c.VPN="vpn",c.Wallpaper="wallpaper",c.WiFi="wifi",c.Tethering="tethering",c.DoNotDisturb="doNotDisturb",c.TouchIdPasscode="touchIdPasscode",c.ScreenTime="screenTime",c.Accessibility="accessibility",o;var c})();const j=(0,fe.fo)("NativeSettings",{web:()=>p.e(612).then(p.bind(p,50612)).then(c=>new c.NativeSettingsWeb)});var M=p(8782),H=p(71994);const ie=(0,fe.fo)("NotifyPersistent");var ue=p(53509),n=p(45449),le=p(90603),Z=p(47898),De=p(14453),ke=p(80698),Ge=p(61380),Qe=p(37763);const u=(0,p(39866).fo)("CheckInvertColor",{web:()=>p.e(3621).then(p.bind(p,43621)).then(c=>new c.CheckInvertColorWeb)});let S=(()=>{class c{constructor(){}isEnabled(){return(0,e.Z)(function*(){let t=!1;try{const{invertedColorsEnabled:a}=yield u.checkInversionStatus();t=a}catch{return void(t=!1)}return t})()}}return c.\u0275fac=function(t){return new(t||c)},c.\u0275prov=n.\u0275\u0275defineInjectable({token:c,factory:c.\u0275fac,providedIn:"root"}),c})(),D=(()=>{class c{constructor(t){this.platform=t}openSetting(t,a){this.platform.ready().then(()=>{j.open({optionAndroid:t,optionIOS:a})})}}return c.\u0275fac=function(t){return new(t||c)(n.\u0275\u0275inject(le.Platform))},c.\u0275prov=n.\u0275\u0275defineInjectable({token:c,factory:c.\u0275fac,providedIn:"root"}),c})();var B=p(10629),R=p(84432),Y=p(1303),G=p(76733);let te=(()=>{class c{constructor(t,a,s,m,C){this.auth=t,this.fcmFirebase=a,this.platform=s,this.storageService=m,this.logService=C}sendDiagnosticLogTron(){var t=this;return(0,e.Z)(function*(){const a=yield t.statusCheck(),s=fe.dV.getPlatform(),m={...a,buildVesion:a.appInfo.build,appVersion:a.appInfo.version,platFormOs:s};t.logService.logEvent("event::diagnostic","Help Diagnostic app",JSON.stringify(m))})()}statusCheck(){var t=this;return(0,e.Z)(function*(){return new Promise((a,s)=>{t.platform.ready().then((0,e.Z)(function*(){t.storageService.startStorage().then((0,e.Z)(function*(){try{const m=yield Promise.all([t.auth.getLogOff(),t.auth.getToken(),t.auth.isExpiredToken(),t.auth.needsToRenewToken(),t.auth.getSabugoGeneratedAt(),t.auth.needsToRenewSabugo(),t.auth.isExpiredSabugo(),t.fcmFirebase.getTokenFcm(),{getTokenFcmStorage:t.fcmFirebase.getTokenStorage()},yield Se.g.getInfo(),yield t.auth.getRefId()]);return a({logOff:m[0],token:m[1],isExpiredToken:m[2],needsToRenewToken:m[3],getSabugoGeneratedAt:m[4],needsToRenewSabugo:m[5],isExpiredSabugo:m[6],getTokenFcm:m[7],getTokenFcmStorage:m[8].getTokenFcmStorage,appInfo:m[9],refId:m[10]})}catch(m){return s(m)}}))}))})})()}}return c.\u0275fac=function(t){return new(t||c)(n.\u0275\u0275inject(B.e),n.\u0275\u0275inject(R.Ei),n.\u0275\u0275inject(le.Platform),n.\u0275\u0275inject(Y.V),n.\u0275\u0275inject(G.$))},c.\u0275prov=n.\u0275\u0275defineInjectable({token:c,factory:c.\u0275fac,providedIn:"root"}),c})();var X=p(21284),be=p(11481),Ee=p(90944),Fe=p(36290),je=p(81838),He=p(98246),_=p(69977),b=p(99826);function l(c,x){if(1&c){const t=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"div",11),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(t);const s=n.\u0275\u0275nextContext(3);return n.\u0275\u0275resetView(s.openSettingTime())}),n.\u0275\u0275elementStart(1,"div",12)(2,"div",13),n.\u0275\u0275element(3,"ion-icon",14),n.\u0275\u0275elementEnd(),n.\u0275\u0275element(4,"div",15),n.\u0275\u0275pipe(5,"translate"),n.\u0275\u0275elementEnd()()}if(2&c){const t=n.\u0275\u0275nextContext(3);n.\u0275\u0275advance(1),n.\u0275\u0275property("className","home-snackbar__automatic-time__message "+(t.isSmallScreen||t.isMediumSmallScreen?"home-snackbar__automatic-time__message--small-screen":"")),n.\u0275\u0275advance(3),n.\u0275\u0275property("innerHTML",n.\u0275\u0275pipeBind1(5,2,"PG_HOME_BTN_NOT_AUTOMATIC_TIME"),n.\u0275\u0275sanitizeHtml)}}function h(c,x){if(1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275template(1,l,6,4,"div",10),n.\u0275\u0275elementContainerEnd()),2&c){const t=n.\u0275\u0275nextContext(2);n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!t.startError)}}function I(c,x){if(1&c){const t=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275elementStart(1,"div",16)(2,"app-offline",17),n.\u0275\u0275listener("onReload",function(){n.\u0275\u0275restoreView(t);const s=n.\u0275\u0275nextContext(2);return n.\u0275\u0275resetView(s.onRestart())}),n.\u0275\u0275elementEnd()(),n.\u0275\u0275elementContainerEnd()}2&c&&(n.\u0275\u0275advance(2),n.\u0275\u0275property("smallMessage",!0)("isHome",!0)("showOffline",!0))}function J(c,x){if(1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275elementStart(1,"div",8)(2,"div",9),n.\u0275\u0275template(3,h,2,1,"ng-container",2),n.\u0275\u0275template(4,I,3,3,"ng-container",2),n.\u0275\u0275elementEnd()(),n.\u0275\u0275elementContainerEnd()),2&c){const t=n.\u0275\u0275nextContext();n.\u0275\u0275advance(3),n.\u0275\u0275property("ngIf",!t.isAutomaticTimeEnabled),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",t.isOffline)}}const $=function(c){return{height:c}},re=function(c){return{border:"none","min-height":c}};function k(c,x){if(1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275elementStart(1,"div",18),n.\u0275\u0275element(2,"iframe",19),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementContainerEnd()),2&c){const t=n.\u0275\u0275nextContext();n.\u0275\u0275advance(1),n.\u0275\u0275property("ngStyle",n.\u0275\u0275pureFunction1(3,$,t.hasBannerLogLoad?t.iframeHeight:"0px")),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngStyle",n.\u0275\u0275pureFunction1(5,re,t.iframeHeight))("src",t.safeUrlIFrame,n.\u0275\u0275sanitizeResourceUrl)}}function O(c,x){1&c&&(n.\u0275\u0275elementStart(0,"div",29),n.\u0275\u0275element(1,"ion-skeleton-text",30),n.\u0275\u0275elementEnd())}function F(c,x){if(1&c&&(n.\u0275\u0275elementStart(0,"div",24)(1,"div",25),n.\u0275\u0275element(2,"ion-skeleton-text",26)(3,"ion-skeleton-text",27),n.\u0275\u0275elementEnd(),n.\u0275\u0275template(4,O,2,0,"div",28),n.\u0275\u0275elementEnd()),2&c){const t=n.\u0275\u0275nextContext(3);n.\u0275\u0275advance(4),n.\u0275\u0275property("ngIf",!t.isSmallScreen)}}function T(c,x){if(1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275elementStart(1,"div",12),n.\u0275\u0275template(2,F,5,1,"div",23),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementContainerEnd()),2&c){const t=n.\u0275\u0275nextContext(2);n.\u0275\u0275advance(1),n.\u0275\u0275property("className","hint "+(!t.isSmallScreen||t.thereAreProfiles||t.isUltraSmallScreen?"":"small_screen")),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!(t.startError||t.isOffline||t.finishrequestStartVOProfiles||t.isExpiredSabugo))}}const ae=function(c){return{"small-screen":c}};function Ce(c,x){if(1&c){const t=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"ion-button",38),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(t);const s=n.\u0275\u0275nextContext(4);return n.\u0275\u0275resetView(s.onGoToCreateEvent())}),n.\u0275\u0275text(1),n.\u0275\u0275pipe(2,"translate"),n.\u0275\u0275elementEnd()}if(2&c){const t=n.\u0275\u0275nextContext(4);n.\u0275\u0275property("ngClass",n.\u0275\u0275pureFunction1(4,ae,t.isSmallScreen||t.isMediumSmallScreen||t.isUltraSmallScreen&&t.hasBannerLogLoad)),n.\u0275\u0275advance(1),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(2,2,"PG_HOME_BTN_INVITE")," ")}}function ot(c,x){if(1&c){const t=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"ion-button",39),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(t);const s=n.\u0275\u0275nextContext(4);return n.\u0275\u0275resetView(s.onGoToCreateEvent())}),n.\u0275\u0275text(1),n.\u0275\u0275pipe(2,"translate"),n.\u0275\u0275elementEnd()}if(2&c){const t=n.\u0275\u0275nextContext(4);n.\u0275\u0275property("ngClass",n.\u0275\u0275pureFunction1(5,ae,t.isSmallScreen||t.isMediumSmallScreen||t.isUltraSmallScreen&&t.hasBannerLogLoad))("disabled",!0),n.\u0275\u0275advance(1),n.\u0275\u0275textInterpolate1("",n.\u0275\u0275pipeBind1(2,3,"PG_HOME_BTN_LOADING")," ")}}function it(c,x){1&c&&(n.\u0275\u0275elementStart(0,"div",40)(1,"span"),n.\u0275\u0275text(2),n.\u0275\u0275pipe(3,"translate"),n.\u0275\u0275elementEnd()()),2&c&&(n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(3,1,"PG_HOME_TEXT_WAIT_INTERNET")," "))}function ze(c,x){if(1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275elementStart(1,"div",34),n.\u0275\u0275template(2,Ce,3,6,"ion-button",35),n.\u0275\u0275template(3,ot,3,7,"ion-button",36),n.\u0275\u0275template(4,it,4,3,"div",37),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementContainerEnd()),2&c){const t=n.\u0275\u0275nextContext(3);n.\u0275\u0275advance(2),n.\u0275\u0275property("ngIf",!t.inviteButtonDisable),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",t.inviteButtonDisable),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",t.inviteButtonDisable)}}function Xe(c,x){if(1&c){const t=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"div",42)(1,"span"),n.\u0275\u0275text(2),n.\u0275\u0275pipe(3,"translate"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(4,"button",43),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(t);const s=n.\u0275\u0275nextContext(4);return n.\u0275\u0275resetView(s.onGoToInsertCompanyInviteCode())}),n.\u0275\u0275text(5),n.\u0275\u0275pipe(6,"translate"),n.\u0275\u0275elementEnd()()}2&c&&(n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(3,2,"PG_HOME_TEXT_IS_NOT_ASSOCIATED_COMPANY")," "),n.\u0275\u0275advance(3),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(6,4,"PG_HOME_BTN_ASSOCIATE_COMPANY")," "))}function Je(c,x){if(1&c&&n.\u0275\u0275template(0,Xe,7,6,"div",41),2&c){const t=n.\u0275\u0275nextContext(3);n.\u0275\u0275property("ngIf",!t.isOffline&&t.finishrequestStartVOProfiles)}}const qe=function(c,x){return{toast_show_fcm:c,toast_show_fcm_small:x}};function Ze(c,x){if(1&c&&(n.\u0275\u0275elementStart(0,"div",31),n.\u0275\u0275template(1,ze,5,3,"ng-container",32),n.\u0275\u0275template(2,Je,1,1,"ng-template",null,33,n.\u0275\u0275templateRefExtractor),n.\u0275\u0275elementEnd()),2&c){const t=n.\u0275\u0275reference(3),a=n.\u0275\u0275nextContext(2);n.\u0275\u0275property("className","hint "+(a.isSmallScreen||a.isMediumSmallScreen&&!a.thereAreProfiles&&!a.isUltraSmallScreen?"small_screen":""))("ngClass",n.\u0275\u0275pureFunction2(4,qe,a.toastShowFcm&&!a.isSmallScreen&&!a.hasBannerLogLoad,a.toastShowFcm&&(a.isSmallScreen||a.isMediumSmallScreen||a.isUltraSmallScreen)&&!a.hasBannerLogLoad)),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",a.finishrequestStartVOProfiles&&a.thereAreProfiles)("ngIfElse",t)}}function ce(c,x){if(1&c&&(n.\u0275\u0275elementStart(0,"div",44),n.\u0275\u0275element(1,"app-countdown",45),n.\u0275\u0275elementEnd()),2&c){const t=n.\u0275\u0275nextContext(2);n.\u0275\u0275advance(1),n.\u0275\u0275property("qrCodeValidityCountDown",t.qrCodeValidityCountDown)("duration",t.qrCodeValidityIntervalInSeconds)("paused",t.pausedCountdown)("hasBanner",t.hasBannerLogLoad)("displayCircularCountdown",t.displayCircularCountdown)}}function _e(c,x){if(1&c&&(n.\u0275\u0275elementStart(0,"div",20)(1,"div",21),n.\u0275\u0275template(2,T,3,2,"ng-container",2),n.\u0275\u0275template(3,Ze,4,7,"div",22),n.\u0275\u0275elementEnd(),n.\u0275\u0275template(4,ce,2,5,"div",5),n.\u0275\u0275elementEnd()),2&c){const t=n.\u0275\u0275nextContext();n.\u0275\u0275advance(2),n.\u0275\u0275property("ngIf",!(t.hasBannerLogLoad||null!=t.httpErrorResonse&&t.httpErrorResonse.error||t.finishrequestStartVOProfiles)),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!t.isOffline&&!(null!=t.httpErrorResonse&&t.httpErrorResonse.error)&&t.finishrequestStartVOProfiles),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",t.qrCode&&!t.isExpiredSabugo)}}function g(c,x){1&c&&(n.\u0275\u0275elementStart(0,"div",29),n.\u0275\u0275element(1,"ion-skeleton-text",30),n.\u0275\u0275elementEnd())}function N(c,x){if(1&c&&(n.\u0275\u0275elementStart(0,"div",24)(1,"div",25),n.\u0275\u0275element(2,"ion-skeleton-text",26)(3,"ion-skeleton-text",27),n.\u0275\u0275elementEnd(),n.\u0275\u0275template(4,g,2,0,"div",28),n.\u0275\u0275elementEnd()),2&c){const t=n.\u0275\u0275nextContext(4);n.\u0275\u0275advance(4),n.\u0275\u0275property("ngIf",!t.isSmallScreen)}}function i(c,x){if(1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275elementStart(1,"div",12),n.\u0275\u0275template(2,N,5,1,"div",23),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementContainerEnd()),2&c){const t=n.\u0275\u0275nextContext(3);n.\u0275\u0275advance(1),n.\u0275\u0275property("className","hint "+(!t.isSmallScreen||t.thereAreProfiles||t.isUltraSmallScreen?"":"small_screen")),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!(t.startError||t.isOffline||t.finishrequestStartVOProfiles||t.isExpiredSabugo))}}function r(c,x){if(1&c){const t=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"ion-button",49),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(t);const s=n.\u0275\u0275nextContext(5);return n.\u0275\u0275resetView(s.onGoToCreateEvent())}),n.\u0275\u0275text(1),n.\u0275\u0275pipe(2,"translate"),n.\u0275\u0275elementEnd()}2&c&&(n.\u0275\u0275advance(1),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(2,1,"PG_HOME_BTN_INVITE")," "))}function d(c,x){if(1&c){const t=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"ion-button",39),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(t);const s=n.\u0275\u0275nextContext(5);return n.\u0275\u0275resetView(s.onGoToCreateEvent())}),n.\u0275\u0275text(1),n.\u0275\u0275pipe(2,"translate"),n.\u0275\u0275elementEnd()}if(2&c){const t=n.\u0275\u0275nextContext(5);n.\u0275\u0275property("ngClass",n.\u0275\u0275pureFunction1(5,ae,t.isSmallScreen||t.isMediumSmallScreen||t.isUltraSmallScreen&&t.hasBannerLogLoad))("disabled",!0),n.\u0275\u0275advance(1),n.\u0275\u0275textInterpolate1("",n.\u0275\u0275pipeBind1(2,3,"PG_HOME_BTN_LOADING")," ")}}function E(c,x){1&c&&(n.\u0275\u0275elementStart(0,"div",40)(1,"span"),n.\u0275\u0275text(2),n.\u0275\u0275pipe(3,"translate"),n.\u0275\u0275elementEnd()()),2&c&&(n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(3,1,"PG_HOME_TEXT_WAIT_INTERNET")," "))}function w(c,x){if(1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275elementStart(1,"div",34),n.\u0275\u0275template(2,r,3,3,"ion-button",48),n.\u0275\u0275template(3,d,3,7,"ion-button",36),n.\u0275\u0275template(4,E,4,3,"div",37),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementContainerEnd()),2&c){const t=n.\u0275\u0275nextContext(4);n.\u0275\u0275advance(2),n.\u0275\u0275property("ngIf",!t.inviteButtonDisable),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",t.inviteButtonDisable),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",t.inviteButtonDisable)}}function U(c,x){if(1&c){const t=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"div",42)(1,"span"),n.\u0275\u0275text(2),n.\u0275\u0275pipe(3,"translate"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(4,"button",43),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(t);const s=n.\u0275\u0275nextContext(5);return n.\u0275\u0275resetView(s.onGoToInsertCompanyInviteCode())}),n.\u0275\u0275text(5),n.\u0275\u0275pipe(6,"translate"),n.\u0275\u0275elementEnd()()}2&c&&(n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(3,2,"PG_HOME_TEXT_IS_NOT_ASSOCIATED_COMPANY")," "),n.\u0275\u0275advance(3),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(6,4,"PG_HOME_BTN_ASSOCIATE_COMPANY")," "))}function W(c,x){if(1&c&&n.\u0275\u0275template(0,U,7,6,"div",41),2&c){const t=n.\u0275\u0275nextContext(4);n.\u0275\u0275property("ngIf",!t.isOffline&&t.finishrequestStartVOProfiles)}}function se(c,x){if(1&c&&(n.\u0275\u0275elementStart(0,"div",31),n.\u0275\u0275template(1,w,5,3,"ng-container",32),n.\u0275\u0275template(2,W,1,1,"ng-template",null,33,n.\u0275\u0275templateRefExtractor),n.\u0275\u0275elementEnd()),2&c){const t=n.\u0275\u0275reference(3),a=n.\u0275\u0275nextContext(3);n.\u0275\u0275property("className","hint "+(a.isSmallScreen||a.isMediumSmallScreen&&!a.thereAreProfiles&&!a.isUltraSmallScreen?"small_screen":""))("ngClass",n.\u0275\u0275pureFunction2(4,qe,a.toastShowFcm&&!a.isSmallScreen&&!a.hasBannerLogLoad,a.toastShowFcm&&(a.isSmallScreen||a.isMediumSmallScreen||a.isUltraSmallScreen)&&!a.hasBannerLogLoad)),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",a.finishrequestStartVOProfiles&&a.thereAreProfiles)("ngIfElse",t)}}const ee=function(c,x){return{hasBanner:c,noBanner:x}};function Ae(c,x){if(1&c&&(n.\u0275\u0275elementStart(0,"div",47),n.\u0275\u0275template(1,i,3,2,"ng-container",2),n.\u0275\u0275template(2,se,4,7,"div",22),n.\u0275\u0275elementEnd()),2&c){const t=n.\u0275\u0275nextContext(2);n.\u0275\u0275property("ngClass",n.\u0275\u0275pureFunction2(3,ee,t.hasBannerLogLoad,!t.hasBannerLogLoad)),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!(t.hasBannerLogLoad||null!=t.httpErrorResonse&&t.httpErrorResonse.error||t.finishrequestStartVOProfiles)),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!t.isOffline&&!(null!=t.httpErrorResonse&&t.httpErrorResonse.error)&&t.finishrequestStartVOProfiles)}}function Oe(c,x){if(1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275template(1,Ae,3,6,"div",46),n.\u0275\u0275elementContainerEnd()),2&c){const t=n.\u0275\u0275nextContext();n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!t.isOffline)}}function xe(c,x){if(1&c){const t=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"div",62)(1,"button",63),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(t);const s=n.\u0275\u0275nextContext(3);return n.\u0275\u0275resetView(s.onRestart())}),n.\u0275\u0275text(2),n.\u0275\u0275pipe(3,"translate"),n.\u0275\u0275elementEnd()()}2&c&&(n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(3,1,"PG_HOME_BTN_RETRY_AGAIN")," "))}function we(c,x){if(1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275elementStart(1,"div",50)(2,"div",51)(3,"div",52)(4,"div",53)(5,"strong"),n.\u0275\u0275text(6),n.\u0275\u0275pipe(7,"translate"),n.\u0275\u0275elementEnd()(),n.\u0275\u0275elementStart(8,"div",54)(9,"ion-text",55)(10,"p",56),n.\u0275\u0275element(11,"span",57),n.\u0275\u0275pipe(12,"translate"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(13,"p",58),n.\u0275\u0275element(14,"span",57),n.\u0275\u0275pipe(15,"translate"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(16,"p",59),n.\u0275\u0275element(17,"span",57),n.\u0275\u0275pipe(18,"translate"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(19,"p",60),n.\u0275\u0275element(20,"span",57),n.\u0275\u0275pipe(21,"translate"),n.\u0275\u0275elementEnd()()()(),n.\u0275\u0275template(22,xe,4,3,"div",61),n.\u0275\u0275elementEnd()(),n.\u0275\u0275elementContainerEnd()),2&c){const t=n.\u0275\u0275nextContext(2);n.\u0275\u0275advance(6),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(7,6,"PG_HOME_TEXT_TOKEN_INVALID_TITLE")," "),n.\u0275\u0275advance(5),n.\u0275\u0275property("innerHTML",n.\u0275\u0275pipeBind1(12,8,"PG_HOME_TEXT_TOKEN_INVALID_TEXT_P1"),n.\u0275\u0275sanitizeHtml),n.\u0275\u0275advance(3),n.\u0275\u0275property("innerHTML",n.\u0275\u0275pipeBind1(15,10,"PG_HOME_TEXT_TOKEN_INVALID_TEXT_P2"),n.\u0275\u0275sanitizeHtml),n.\u0275\u0275advance(3),n.\u0275\u0275property("innerHTML",n.\u0275\u0275pipeBind1(18,12,"PG_HOME_TEXT_TOKEN_INVALID_TEXT_P3"),n.\u0275\u0275sanitizeHtml),n.\u0275\u0275advance(3),n.\u0275\u0275property("innerHTML",n.\u0275\u0275pipeBind1(21,14,"PG_HOME_TEXT_TOKEN_INVALID_TEXT_P4"),n.\u0275\u0275sanitizeHtml),n.\u0275\u0275advance(2),n.\u0275\u0275property("ngIf",!t.isOffline)}}function q(c,x){if(1&c&&(n.\u0275\u0275elementStart(0,"span"),n.\u0275\u0275text(1),n.\u0275\u0275elementEnd()),2&c){const t=n.\u0275\u0275nextContext(4);n.\u0275\u0275advance(1),n.\u0275\u0275textInterpolate1(" (cod. ",null==t.httpErrorResonse?null:t.httpErrorResonse.status,") ")}}function Re(c,x){if(1&c){const t=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275elementStart(1,"ion-text",64)(2,"p"),n.\u0275\u0275text(3),n.\u0275\u0275pipe(4,"translate"),n.\u0275\u0275template(5,q,2,1,"span",2),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(6,"p"),n.\u0275\u0275text(7),n.\u0275\u0275pipe(8,"translate"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(9,"span")(10,"a",65),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(t);const s=n.\u0275\u0275nextContext(3);return n.\u0275\u0275resetView(s.showToastModalErroCodeZero.openModalCodeZero())}),n.\u0275\u0275text(11),n.\u0275\u0275pipe(12,"translate"),n.\u0275\u0275elementEnd(),n.\u0275\u0275text(13),n.\u0275\u0275pipe(14,"translate"),n.\u0275\u0275elementEnd()(),n.\u0275\u0275elementContainerEnd()}if(2&c){const t=n.\u0275\u0275nextContext(3);n.\u0275\u0275advance(3),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(4,5,"TOAST_MESSAGE_CODE_ZERO_TITLE")," "),n.\u0275\u0275advance(2),n.\u0275\u0275property("ngIf",0===(null==t.httpErrorResonse?null:t.httpErrorResonse.status)),n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate(n.\u0275\u0275pipeBind1(8,7,"TOAST_MESSAGE_CODE_ZERO")),n.\u0275\u0275advance(4),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(12,9,"TOAST_MESSAGE_CODE_ZERO_ACTION")," "),n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(14,11,"TOAST_MESSAGE_CODE_ZERO_MESSAGE"),". ")}}function Ne(c,x){if(1&c&&(n.\u0275\u0275elementStart(0,"span"),n.\u0275\u0275text(1),n.\u0275\u0275elementEnd()),2&c){const t=n.\u0275\u0275nextContext(4);let a;n.\u0275\u0275advance(1),n.\u0275\u0275textInterpolate1(" (cod. ",(null==t.httpErrorResonse?null:t.httpErrorResonse.status)||(null==(a=t.httpErrorResonse)?null:a.codeError),") ")}}function Ve(c,x){if(1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275text(1),n.\u0275\u0275pipe(2,"translate"),n.\u0275\u0275template(3,Ne,2,1,"span",2),n.\u0275\u0275elementContainerEnd()),2&c){const t=n.\u0275\u0275nextContext(3);let a;n.\u0275\u0275advance(1),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(2,2,"TOAST_SERVICE_TEMPORARILY_UNAVAILABLE_MESSAGE")," "),n.\u0275\u0275advance(2),n.\u0275\u0275property("ngIf",(null==t.httpErrorResonse?null:t.httpErrorResonse.status)||(null==(a=t.httpErrorResonse)?null:a.codeError))}}function rt(c,x){if(1&c){const t=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"div",62)(1,"button",63),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(t);const s=n.\u0275\u0275nextContext(3);return n.\u0275\u0275resetView(s.onRestart(!1))}),n.\u0275\u0275text(2),n.\u0275\u0275pipe(3,"translate"),n.\u0275\u0275elementEnd()()}2&c&&(n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate1(" ",n.\u0275\u0275pipeBind1(3,1,"PG_HOME_BTN_RETRY_AGAIN")," "))}function et(c,x){1&c&&(n.\u0275\u0275elementStart(0,"div",62)(1,"p"),n.\u0275\u0275text(2),n.\u0275\u0275pipe(3,"translate"),n.\u0275\u0275elementEnd()()),2&c&&(n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate(n.\u0275\u0275pipeBind1(3,1,"COMPONENT_OFFLINE_TEXT_NO_INTERNT_CONNECTION_SIMPLE")))}function tt(c,x){if(1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275elementStart(1,"div",50)(2,"div",51)(3,"div",52),n.\u0275\u0275template(4,Re,15,13,"ng-container",2),n.\u0275\u0275template(5,Ve,4,4,"ng-container",2),n.\u0275\u0275elementEnd(),n.\u0275\u0275template(6,rt,4,3,"div",61),n.\u0275\u0275template(7,et,4,3,"div",61),n.\u0275\u0275elementEnd()(),n.\u0275\u0275elementContainerEnd()),2&c){const t=n.\u0275\u0275nextContext(2);n.\u0275\u0275advance(4),n.\u0275\u0275property("ngIf",t.httpErrorResonse&&0===(null==t.httpErrorResonse?null:t.httpErrorResonse.status)),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",t.httpErrorResonse&&0!==(null==t.httpErrorResonse?null:t.httpErrorResonse.status)),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!t.isOffline),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",t.isOffline)}}function We(c,x){if(1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275template(1,we,23,16,"ng-container",2),n.\u0275\u0275template(2,tt,8,4,"ng-container",2),n.\u0275\u0275elementContainerEnd()),2&c){const t=n.\u0275\u0275nextContext();let a;n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",t.isExpiredSabugo&&t.isOffline),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!t.isOffline&&t.startError&&((null==t.httpErrorResonse?null:t.httpErrorResonse.error)||(null==(a=t.httpErrorResonse)?null:a.codeError)))}}function Ke(c,x){if(1&c&&(n.\u0275\u0275elementStart(0,"div",44),n.\u0275\u0275element(1,"app-countdown",45),n.\u0275\u0275elementEnd()),2&c){const t=n.\u0275\u0275nextContext();n.\u0275\u0275advance(1),n.\u0275\u0275property("qrCodeValidityCountDown",t.qrCodeValidityCountDown)("duration",t.qrCodeValidityIntervalInSeconds)("paused",t.pausedCountdown)("hasBanner",t.hasBannerLogLoad)("displayCircularCountdown",t.displayCircularCountdown)}}function at(c,x){if(1&c&&(n.\u0275\u0275elementStart(0,"div",66),n.\u0275\u0275element(1,"ngx-qrcode",67),n.\u0275\u0275elementEnd()),2&c){const t=n.\u0275\u0275nextContext();n.\u0275\u0275advance(1),n.\u0275\u0275property("margin",1)("value",t.qrCode)}}function st(c,x){1&c&&(n.\u0275\u0275elementContainerStart(0),n.\u0275\u0275elementStart(1,"div",66)(2,"div",68),n.\u0275\u0275element(3,"ion-skeleton-text",69),n.\u0275\u0275elementEnd()(),n.\u0275\u0275elementContainerEnd())}const lt=function(c,x){return{filter:c,height:x}},dt=function(c){return{"small-qr":c}};let mt=(()=>{class c{constructor(t,a,s,m,C,L,Q,ye,de,Be,$e,nt,_t,gt,pt,ft,ht,vt,Ct,Pt,St,Et,Ot,yt,It,Mt,Tt,xt,bt,At,wt,Rt,Nt,Lt,Dt,kt,Ft,Gt,Vt,Bt,Ut,jt,Ht){var f=this;this.menuController=t,this.insomniaService=a,this.storageService=s,this.screenBrightnessService=m,this.authService=C,this.apiService=L,this.qrCodeService=Q,this.ngZoneService=ye,this.loadingService=de,this.navController=Be,this.notificatorService=$e,this.deviceInfo=nt,this.navigationService=_t,this.platform=gt,this.resumeToPinService=pt,this.resumeToGenerateQRCode=ft,this.profileManagerService=ht,this.modalController=vt,this.logService=Ct,this.toastController=Pt,this.geolocationService=St,this.modalPermissionsService=Et,this.badgeStoreService=Ot,this.networkService=yt,this.loaderService=It,this.timeSettingsService=Mt,this.resumeCreateEventInterruptedService=Tt,this.translateConfigService=xt,this.eventInstantService=bt,this.createEventService=At,this.fcmService=wt,this.sessionAddFlowService=Rt,this.activatedRoute=Nt,this.focusService=Lt,this.checkInverColorService=Dt,this.managerTokenUaamobile=kt,this.managerSabugo=Ft,this.nativeSettings=Gt,this.helpDevDiagnosticService=Vt,this.showToastModalErroCodeZero=Bt,this.router=Ut,this.stateService=jt,this.domSanitizer=Ht,this.displayCircularCountdown=!0,this.isOffline=!1,this.startError=null,this.isExpiredSabugo=!1,this.finishrequestStartVOProfiles=!1,this.voProfiles=[],this.lgProfiles=[],this.inviteButtonDisable=!1,this.isAutomaticTimeEnabled=!0,this.hasBannerLogLoad=!1,this.urlIFrame="",this.safeUrlIFrame=this.domSanitizer.bypassSecurityTrustResourceUrl(""),this.subscriptions=[],this.portais=M.n.portalParams.portais,this.creatinigEvent=!1,this.timeoutNotification=5e3,this.stopTimeout=!0,this.durationLong=15e3,this.resizeListener=null,this.CONFIG_KEY="notificationConfigApplied",this.retryTimeoutId=null,this.retryCount=0,this.MAX_RETRIES=8,this.onGoToCreateEvent=(0,e.Z)(function*(){if(f.sessionAddFlowService.clearSessionId(),f.creatinigEvent=!0,f.resumeCreateEvent())return;f.loadingService.show(f.translateConfigService.translate("LOADING_CHECKING_DATA"),"on-create-event"),f.inviteButtonDisable=!0;const A=yield f.authService.getToken();if(A){const me=f.apiService.getUserProfiles(f.portais,A).pipe((0,Me.x)(()=>{f.loadingService.hide(0,"on-create-event")})).subscribe(f.processGetVOAndLGUserProfilesSuccessResponse,ne=>(f.inviteButtonDisable=!1,f.processGetVOAndLGUserProfilesErrorResponse(ne)));f.subscriptions.push(me)}else f.handleErroTokenOnCrateEventAction()}),this.onGoToInsertCompanyInviteCode=()=>{this.navigationService.forward(["/insert-company-invite-code"],{})},this.startQRCodeGenerateResumeService=()=>{this.resumeToGenerateQRCode.start(this.viewGuardCallback)},this.startViewGuardService=()=>{this.resumeToPinService.start()},this.viewGuardCallback=()=>{this.platform.ready().then(()=>{this.setBrightnessToMax(),this.dontFallAsleep(),this.restartEncryptionService()}).catch(()=>{}).finally(()=>{const V=this.profileManagerService.getProfileList();!this.isOffline&&!V?.length&&this.getVoAndLgProfiles()})},this.verifyIfSignUpProcedureRemainsCompanyInvitationData=(0,e.Z)(function*(){f.storageService.get("company-invitation-data").then(V=>{V&&V?.locator&&V?.invitationKey&&(f.goToAcceptCompanyInvitePage(V.locator,V.invitationKey),f.storageService.remove("company-invitation-data"))})}),this.goToAcceptCompanyInvitePage=(V,A)=>{this.navigationService.forward(["/deep"],{queryParams:{l:V,k:A,origin:"SIGNUP"}})},this.processGetVOUserProfilesSuccessResponse=V=>{this.voProfiles=V&&V?.length>0?V.filter(A=>"VO"===A?.portal):[],this.lgProfiles=V&&V?.length>0?V.filter(A=>"LG"===A?.portal):[],localStorage.setItem("firstRequestGetProfile",JSON.stringify(!0)),this.profileManagerService.setProfileList(this.voProfiles),this.profileManagerService.setProfileLogisticList(this.lgProfiles)},this.unregisterDevice=()=>{this.logService.logEvent("unregisterDevice::function"),this.authService.unregister().then(()=>this.navController.navigateRoot(["start"])).then(()=>{this.hideLoadingAll("Home::unregisterDevice"),this.logService.logEvent("unregisterDevice::goneToStartPage");const V=this.translateConfigService.translate("PG_HOME_TOAST_DEVICE_UNREGISTERED_TITLE"),A=this.translateConfigService.translate("PG_HOME_TOAST_DEVICE_UNREGISTERED_MESSAGE");this.showNotification(V,A,"error",1e4)}).catch(V=>{this.logService.logError("unregisterDevice::error","",V)}).finally(()=>{this.stopAllIntervals("Home::unregisterDevice"),localStorage.removeItem("store_current_config"),localStorage.removeItem("firstRequestGetProfile"),localStorage.removeItem("basePlatformUrl"),this.fcmService.deleteTokenFcm(),Se.g.removeAllListeners().then(()=>{})})},this.onStartError=function(){var V=(0,e.Z)(function*(A){f.loadingService.hide(0,"start"),f.finishrequestStartVOProfiles=!0;const me=yield f.authService.isExpiredSabugo(),ne=yield f.authService.isExpiredToken(),Ue=A?.codeError??null,Le={...A,isExpiredSabugo:me,tokenIsExpired:ne,timeOutRequest:Ue};me&&(f.isExpiredSabugo=me,f.setStartError(!0),f.stopCountdown(),f.clearQRCodeData(),f.stopAllIntervals("Home::onStartError"),f.authService.clearSabugo()),A&&A?.status&&401===A?.status&&(f.logService.logEvent("onStartError::status_code_401",A.message?A.message:"",Le),("error.account.not-found"===A?.error?.message||"error.account.not-activated"===A?.error?.message)&&(f.logService.logEvent("onStartError::unregisterDevice()",A.error.message?A.error.message:"",Le),f.unregisterDevice())),f.isOffline||(A instanceof z.HttpErrorResponse||Le)&&(f.stopCountdown(),f.clearQRCodeData(),f.ngZoneService.run(()=>{f.httpErrorResonse=A??Le,f.isExpiredSabugo=me,f.setStartError(!0)})),f.logService.logError("onStartError::error","",Le),f.stopServices()});return function(A){return V.apply(this,arguments)}}(),this.setStartError=V=>{this.ngZoneService.run(()=>{this.startError=V})},this.getSabugoError=function(){var V=(0,e.Z)(function*(A){f.logService.logError("getSabugoError::error","",A),A&&A instanceof z.HttpErrorResponse&&401===A?.status?f.managerTokenUaamobile.getNewToken().then(()=>f.start()):f.onStartError(A)});return function(A){return V.apply(this,arguments)}}(),this.setBrightnessToMax=()=>{this.screenBrightnessService.setMax()},this.restoreBrightness=()=>{this.screenBrightnessService.restoreBrightness()},this.dontFallAsleep=()=>{this.insomniaService.keepAwake().then(this.dontFallAsleepSuccessResponse).catch(this.dontFallAsleepErrorResponse)},this.allowItToRest=()=>{this.insomniaService.allowSleepAgain().then(this.allowItToRestSuccessResponse).catch(this.allowItToRestErrorResponse)},this.allowItToRestSuccessResponse=()=>{},this.allowItToRestErrorResponse=()=>{},this.dontFallAsleepSuccessResponse=()=>{},this.dontFallAsleepErrorResponse=V=>{this.logService.logError("insomnia::dontFallAsleepErrorResponse","",V)},this.restartEncryptionService=()=>{this.restartCountdown(),this.startEncryptionService()},this.startEncryptionService=(0,e.Z)(function*(){f.loadingService.hide(0,"start");try{const V=yield f.encrypt();if(V&&V?.success)return f.startCountdown()}catch(V){f.handleEncryptError(V)}}),this.stopCountdown=()=>{this.pauseCountdown(),this.countdownSetIntervalId&&(clearInterval(this.countdownSetIntervalId),this.countdownSetIntervalId=0)},this.handleEncryptError=V=>{this.logService.logError("handleEncryptError","Erro encrypt QR",{response:V}),this.stopCountdown(),this.clearQRCodeData()},this.restartCountdown=()=>{this.stopCountdown(),this.qrCodeValidityCountDown=this.qrCodeValidityIntervalInSeconds},this.stopSabugoWatcher=()=>{this.sabugoWatcherIntervalId&&(clearInterval(this.sabugoWatcherIntervalId),this.sabugoWatcherIntervalId=null)},this.clearQRCodeData=()=>{this.ngZoneService.run(()=>{this.qrCode=null})},this.unPauseCountdown=()=>{this.ngZoneService.run(()=>{this.pausedCountdown=!1})},this.pauseCountdown=()=>{this.ngZoneService.run(()=>{this.pausedCountdown=!0})},this.processGetVOAndLGUserProfilesSuccessResponse=function(){var V=(0,e.Z)(function*(A){f.profileManagerService.setProfileList(A),f.updateRequestProfileAtTimestamp(),f.loadingService.hide(0,"on-create-event"),f.voProfiles=A&&A?.length>0?A.filter(ne=>"VO"===ne?.portal):[],f.lgProfiles=A&&A?.length>0?A.filter(ne=>"LG"===ne?.portal):[],f.profileManagerService.setProfileList(f.voProfiles),f.profileManagerService.setProfileLogisticList(f.lgProfiles);const me=f.resumeCreateEventInterruptedService.getResumeCreationInterrupted();me?.logistic?.eventType||me?.vo?f.inviteButtonDisable=!1:f.OpenModaltoselectGoodProfiles()});return function(A){return V.apply(this,arguments)}}(),this.selectProfileModalVOOnProfileSelectCreateEventCallback=function(){var V=(0,e.Z)(function*(A){if(f.inviteButtonDisable=!0,f.setProfileCurrentCorrect(A),f.profileManagerService.setProfile(A),f.profileManagerService.isExpeditionProfile(A)){const ne=["ENTRY","CLONE_EXIT","EXIT","CLONE_ENTRY"];(f.profileManagerService.isCollaboratorProfile(A)||f.profileManagerService.isLimited2Profile(A))&&ne.push("CONVENTIONAL");const Ue=yield f.modalController.create({component:H.Ut,componentProps:{availableTypes:ne},backdropDismiss:!1});Ue.onDidDismiss().then(Le=>{f.inviteButtonDisable=!1,Le.data&&("CONVENTIONAL"!==Le.data.type&&f.openPermissionModal(A,Le),"CONVENTIONAL"===Le.data.type&&(f.resumeCreateEventInterruptedService.setProfileVoCreationInterrupte(A),f.showModalSelectEventInstantOrDefault().then(ct=>{if(!ct.close||ct.typeEvent){if(ct&&"instant"===ct.typeEvent)return void f.eventInstantService.createEventVO().then(ut=>ut).catch().finally(()=>{f.sessionAddFlowService.clearSessionId(),f.inviteButtonDisable=!1});f.navigationService.forward(["/create-event-event-name-step"],{state:{event:null,action:"create"}})}}),f.inviteButtonDisable=!1,f.creatinigEvent=!1))}),yield Ue.present()}else f.profileManagerService.setProfile(A),f.resumeCreateEventInterruptedService.setProfileVoCreationInterrupte(A),f.loadingService.hide(0,"on-create-event"),f.creatinigEvent=!1,f.showModalSelectEventInstantOrDefault().then(ne=>{if(f.inviteButtonDisable=!1,!ne.close||ne.typeEvent){if(ne&&"instant"===ne.typeEvent)return void f.eventInstantService.createEventVO().then(Ue=>Ue).catch().finally(()=>{f.sessionAddFlowService.clearSessionId(),f.inviteButtonDisable=!1});f.navigationService.forward(["/create-event-event-name-step"],{state:{event:null,action:"create"}}),f.creatinigEvent=!1}}).catch(()=>{f.inviteButtonDisable=!1,f.navigationService.forward(["/create-event-event-name-step"],{state:{event:null,action:"create"}}),f.creatinigEvent=!1}).finally(()=>f.inviteButtonDisable=!1)});return function(A){return V.apply(this,arguments)}}(),this.selectProfileModalVOOnBackCreateEventCallback=()=>{},this.handleVerifyCoordinatesSuccessResponse=function(){var V=(0,e.Z)(function*(A,me){if(f.profileManagerService.getProfile(),A.authorized)"NEW_ENTRY"===me.data.type?f.navigationService.forward(["/logistic-events/create/event-name"],{state:{action:"create",eventType:"ENTRY",event:null}}):"CLONE_EXIT"===me.data.type?f.navigationService.forward(["/logistic-events/entrance"]):"NEW_EXIT"===me.data.type?f.navigationService.forward(["/logistic-events/create/event-name"],{state:{action:"create",eventType:"EXIT",event:null}}):"CLONE_ENTRY"===me.data.type&&f.navigationService.forward(["/logistic-events/exit"]),f.inviteButtonDisable=!1,f.creatinigEvent=!1;else{f.inviteButtonDisable=!1,f.creatinigEvent=!1;const ne=yield f.modalController.create({component:K.NO});ne.onDidDismiss().then(()=>{}),yield ne.present()}});return function(A,me){return V.apply(this,arguments)}}(),this.handleVerifyCoordinatesErrorResponse=V=>{this.logService.logError("http::handleVerifyCoordinatesErrorResponse","",V);const A=this.translateConfigService.translate("PG_HOME_TOAST_ERROR_CHECKING_LOCATION_TITLE"),me=this.translateConfigService.translate("PG_HOME_TOAST_MESSAGE_ERROR_CHECKING_LOCATION");this.showNotification(A,me,"error",this.timeoutNotification)},this.updateRequestProfileAtTimestamp=()=>this.storageService.set("requestProfileListMenu",Date.now()),this.isAndroid="android"===fe.dV.getPlatform(),this.qrCodeValidityIntervalInSeconds=40,this.qrCodeValidityCountDown=this.qrCodeValidityIntervalInSeconds,this.ngZoneService.run(()=>{this.pausedCountdown=!0}),this.isSmallScreen=this.deviceInfo.isSmallScreen(),this.isUltraSmallScreen=this.deviceInfo.isUltraSmallScreen(),this.isMediumSmallScreen=this.deviceInfo.isMediumSmallScreen(),this.updateCountdownDisplayMode(),this.key=new Uint8Array([247,52,131,225,116,25,132,135,230,221,27,98,127,174,130,2]),this.setStartError(null),this.onResumeActiveApp(),this.checkAutomaticTimeZone()}get deviceHeight(){return window?.innerHeight?`${window?.innerHeight}px`:"100vh"}clearTempStorage(){this.storageService.remove("checkinDataApp"),localStorage.removeItem("checkinData"),this.storageService.remove("wallet_qrcodes")}ionViewWillEnter(){var t=this;return(0,e.Z)(function*(){try{yield t.managerTokenUaamobile.initStartGetTokenUaaMobile()}catch(a){return void t.onStartError(a)}finally{t.start().then((0,e.Z)(function*(){yield t.authService.updateLastAccessAt(),t.startViewGuardService(),t.startQRCodeGenerateResumeService()})).finally((0,e.Z)(function*(){t.loaderService.hide(),t.platform.ready().then(()=>{setTimeout((0,e.Z)(function*(){t.setBrightnessToMax(),t.dontFallAsleep(),t.platformIsResume&&(t.start(),t.platformIsResume=!1),yield t.checkInvertedColor()}),500)})}))}})()}ionViewDidEnter(){var t=this;return(0,e.Z)(function*(){t.focusService.applyFocusQuerySelector("btnInviteHome",2e3),t.getDateParams()})()}ionViewWillLeave(){this.platformIsResume=!1,this.loaderService.hide(),this.stopCountdown(),this.cancelRetry(),this.allowItToRest(),this.restoreBrightness(),this.hideLoadingAll("ionViewWillLeave"),this.subscriptions.forEach(t=>t?.unsubscribe),this.toastController.getTop().then(t=>{t&&(t.dismiss(),this.toastShowFcm=!1)})}ngOnInit(){var t=this;return(0,e.Z)(function*(){t.menuController.enable(!0),"android"===fe.dV.getPlatform()&&ue.M.setBackgroundColor({color:"#6CB52D"}),t.iframeHeight=t.deviceInfo.getIframeHeightStyle(),console.log("iframeHeight",t.iframeHeight),t.updateCountdownDisplayMode(),t.addResizeListener();const a=t.translateConfigService.translate("PG_HOME_LOADING_GENERATINGQRCODE");t.loaderService.show(a);const s=t.stateService.getState().subscribe(function(){var m=(0,e.Z)(function*(C){t.ngZoneService.run(()=>{if(C.status===ve.Q.Online){if(t.loaderService.hide(),t.isOffline){t.isOffline=!1,t.onRestart(),t.loaderService.hide();const L=t.logService.sendLogs().pipe((0,ge.q)(1)).subscribe();t.subscriptions.push(L)}}else C.status===ve.Q.Offline&&(t.loaderService.hide(),t.isOffline=!0)}),t.hasBannerLog()});return function(C){return m.apply(this,arguments)}}());t.subscriptions.push(s)})()}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.stopAllIntervals("Home::OnDestroy"),this.cancelRetry(),this.subscribeToPauseEventAndHandleActivityIOs(),this.removeResizeListener()}stopAllIntervals(t){this.stopCountdown(),this.stopSabugoWatcher(),this.managerTokenUaamobile.stopTokenWatcher(),console.log("stopAllIntervals",t)}get thereAreProfiles(){return this.voProfiles.length>0||this.lgProfiles.length>0}openSettingTime(){this.platform.is("cordova")?this.timeSettingsService.open().then(t=>t).catch(t=>t):console.warn("Por favor, rode no emulador.")}onRestart(){var t=this;return(0,e.Z)(function*(a=!0){if(t.stopTimeout=!1,!(yield t.isAuthenticated()))return void t.stopServices();const m=t.translateConfigService.translate("PG_HOME_LOADING_UPDATING_DATA"),C=t.translateConfigService.translate("PG_HOME_LOADING_CHECKING_NEW_CONNECTION");t.loaderService.show(a?C:m,2e3);let L=yield t.authService.isExpiredSabugo();L&&(t.managerTokenUaamobile.stopTokenWatcher(),t.stopSabugoWatcher(),t.pauseCountdown(),t.stopCountdown(),t.restartCountdown(),t.clearQRCodeData()),t.loadingService.hide(0,"onrestart"),t.hideLoadingAll("wait-newtork"),t.ngZoneService.run((0,e.Z)(function*(){try{const Q=yield t.managerTokenUaamobile.restartGetToken();Q&&!Q?.error&&(yield t.managerSabugo.getSabugo(),L=yield t.authService.isExpiredSabugo()),t.isExpiredSabugo=L,(t.httpErrorResonse?.error||t.httpErrorResonse?.codeError)&&t.start().then(()=>{t.httpErrorResonse=null,t.isExpiredSabugo=L,t.setStartError(null),t.stopCountdown(),t.qrCodeValidityCountDown=40,t.startCountdown(),t.hideLoadingAll("wait-newtork"),t.loadingService.hide(0,"onrestart")}).finally(()=>{t.loadingService.hide(0,"onrestart"),t.hideLoadingAll("wait-newtork"),t.loaderService.hide()})}catch(Q){t.loadingService.hide(0,"onrestart"),t.loaderService.hide(),t.setStartError(!0),(Q instanceof z.HttpErrorResponse||Q.codeError)&&(t.ngZoneService.run(()=>{t.httpErrorResonse=Q,t.isExpiredSabugo=L}),t.pooling(!0,1e4),t.loaderService.hide())}})).catch(()=>{t.loaderService.hide(),t.loadingService.hide(0,"onrestart"),t.hideLoadingAll("wait-newtork")}).finally(()=>{t.loaderService.hide(),t.hideLoadingAll("wait-newtork"),t.loadingService.hide(0,"onrestart")}),t.loadingService.hide(0,"onrestart"),t.loaderService.hide()}).apply(this,arguments)}start(){var t=this;return(0,e.Z)(function*(){if(yield t.authService.isAuthenticated()){t.qrCodeService.init(t.key);try{if(!(yield t.storageService.startStorage()))throw"storage not avaliable";return t.starInitSabugo()}catch(s){return void(t.isOffline||t.onStartError(s))}finally{t.loaderService.hide(),t.loadingService.hide(0,"start"),t.verifyIfSignUpProcedureRemainsCompanyInvitationData();const s=setTimeout(()=>{t.isOffline||fe.dV.isNativePlatform()&&(t.getUserNotificationPermission(),clearTimeout(s)),t.firstRequestGetProfiles(),t.pendingsReleasesExists(),t.loadConfigNotificationDefault()},1200)}}})()}starInitSabugo(){var t=this;return(0,e.Z)(function*(){if(yield t.authService.isExpiredToken())try{if(!t.isOffline){const m=yield t.managerTokenUaamobile.initStartGetTokenUaaMobile();if(m?.codeError||m instanceof z.HttpErrorResponse)throw m}const s=yield t.managerSabugo.getSabugo();return t.sabugo=s,t.watchSabugo(),t.managerTokenUaamobile.watchToken(),s&&t.startEncryptionService(),s}catch(s){t.isOffline||t.onStartError(s)}else try{const s=yield t.managerSabugo.getSabugo();return t.sabugo=s,t.watchSabugo(),t.managerTokenUaamobile.watchToken(),s&&t.startEncryptionService(),s}catch(s){t.isOffline||t.onStartError(s)}})()}getVoAndLgProfiles(){var t=this;return(0,e.Z)(function*(){try{const a=yield t.apiService.getUserProfiles(t.portais,t.tokenLogin).toPromise();return t.processGetVOUserProfilesSuccessResponse(a)}catch(a){return t.processGetVOUserProfilesErrorResponse(a)}finally{t.finishrequestStartVOProfiles=!0,t.loaderService.hide(),t.loadingService.hide(0,"wait-newtork")}})()}processGetVOUserProfilesErrorResponse(t){return this.logService.logError("processGetVOUserProfilesErrorResponse","",{error:t}),t}getProfilesAbleToCreateEvent(t){return this.profileManagerService.getProfilesAbleToCreateEvent(t,!0)}startCountdown(){var t=this;this.restartCountdown(),this.countdownSetIntervalId=Number(setInterval(()=>{this.ngZoneService.run((0,e.Z)(function*(){if(t.qrCodeValidityCountDown--,!t.qrCodeValidityCountDown){t.stopCountdown();try{const s=yield t.encrypt();if(s&&s?.success)return t.startCountdown()}catch(s){return t.handleEncryptError(s)}}}))},1e3)),this.unPauseCountdown()}encrypt(){var t=this;return(0,e.Z)(function*(){const a={data:{message:"Encryption failed: QR code is null or undefined",error:!0}};try{const s=yield t.qrCodeService.encrypt(t.sabugo,t.qrCodeValidityIntervalInSeconds,t.authService.getPlatformAndAppTimeDifference());return t.ngZoneService.run(()=>{t.qrCode=btoa(String.fromCharCode.apply(null,s))}),t.qrCode?{error:null,success:!0}:{error:a,success:!1}}catch(s){return t.logService.logError("encrypt::error",`${a.data.message}`,{error:s}),{error:a,success:!1}}})()}watchSabugo(){var t=this;return(0,e.Z)(function*(){const a=yield t.isAuthenticated();if(!a)return void(t.sabugoWatcherIntervalId&&clearInterval(t.sabugoWatcherIntervalId));const m=1e3*(yield t.authService.getSabugoValitTimeInSeconds());return t.sabugoWatcherIntervalId=setInterval(()=>{t.stopSabugoWatcher(),t.stopCountdown(),t.restartCountdown(),t.clearQRCodeData(),a?t.updateSabugo().then(()=>{t.loadingService.hide(0,"watch-sabugo-update-sabugo"),t.startEncryptionService(),t.watchSabugo()}).catch(C=>{t.loadingService.hide(0,"watch-sabugo-update-sabugo"),t.managerTokenUaamobile.stopTokenWatcher(),t.getSabugoError(C)}):t.sabugoWatcherIntervalId&&clearInterval(t.sabugoWatcherIntervalId)},m),t.sabugoWatcherIntervalId})()}updateSabugo(){const t=this.translateConfigService.translate("PG_HOME_LOADING_UPDATING_DATA");return this.loaderService.show(t),this.managerSabugo.getSabugo().then(a=>(this.sabugo=a,this.authService.setSabugo(a))).finally(()=>{this.loaderService.hide()})}processGetVOAndLGUserProfilesErrorResponse(t){this.logService.logError("http::getVOAndLGUserProfiles","",t),this.inviteButtonDisable=!1,this.loadingService.hide(0,"on-create-event");const a=this.translateConfigService.translate("PG_HOME_TOAST_ERROR_REQUEST_TITLE"),s=this.translateConfigService.translate("PG_HOME_TOAST_MESSAGE_ERROR_REQUEST");this.showNotification(a,s,"error",this.timeoutNotification)}getCompanyInstanceRelatedAccessToken(t,a="VO"){return new Promise((s,m)=>{this.authService.getToken().then(C=>{const L=this.apiService.getUserProfiles(a,C).subscribe(Q=>{const de=Q.find(Be=>Be?.company?.instanceName===t);if(de&&de?.login&&de?.portal){const Be=this.apiService.getUserProfileLogin(de.login,de.portal,C).subscribe($e=>{const nt=$e?.access_token;nt?(this.inviteButtonDisable=!1,s(nt)):(m("Does not have desired profile"),this.logService.logError("getUserProfileLogin","Does not have desired profile",{accessToken:null}))},$e=>{m($e)});this.subscriptions.push(Be)}else m("Does not have desired profile"),this.logService.logError("getUserProfileLogin","Does not have desired profile",{foundProfile:null})},Q=>{this.logService.logError("http::processGetCompanyInstanceRelatedLoginErrorResponse","",Q),m(Q)});this.subscriptions.push(L)})})}pendingsReleasesExists(){this.badgeStoreService.initialize()}OpenModaltoselectGoodProfiles(){var t=this;return(0,e.Z)(function*(){const a=[...t.voProfiles,...t.lgProfiles];let{limitedProfile:s,profiles:m}=t.getProfilesAbleToCreateEvent(a);if(m=m.filter((C,L,Q)=>L===Q.findIndex(ye=>ye?.company?.instanceName===C?.company?.instanceName)),s||(t.voProfiles.length>=1||t.lgProfiles.length>=1)&&0===m.length)t.loadingService.hide(0,"on-create-event").then(()=>{t.inviteButtonDisable=!1,t.cantCreateEvent()});else if(m&&m.length>1){const C=yield t.modalController.create({component:K.w9,backdropDismiss:!1,componentProps:{profiles:m}});C.onDidDismiss().then(L=>{t.inviteButtonDisable=!1,L.data?t.selectProfileModalVOOnProfileSelectCreateEventCallback(L.data):t.selectProfileModalVOOnBackCreateEventCallback()}),yield C.present()}else if(m[0])t.selectProfileModalVOOnProfileSelectCreateEventCallback(m[0]);else{t.loadingService.hide(0,"on-create-event"),t.inviteButtonDisable=!1;const C=t.translateConfigService.translate("PG_HOME_TOAST_NO_ACCESS_PROFILE_TITLE"),L=t.translateConfigService.translate("PG_HOME_TOAST_NO_ACCESS_PROFILE_MESSAGE");t.showNotification(C,L,"error",t.timeoutNotification)}})()}handleErroTokenOnCrateEventAction(){this.logService.logError("handleErroTokenOnCrateEventAction","erro get token profile")}firstRequestGetProfiles(){var t=this;return(0,e.Z)(function*(){t.tokenLogin=yield t.managerTokenUaamobile.initStartGetTokenUaaMobile();const s=localStorage.getItem("firstRequestGetProfile")||null,m=t.profileManagerService.getProfileList();t.setProfileOnlyOne(),!s||m.length<=0?(yield t.getVoAndLgProfiles(),t.inviteButtonDisable=!1):(t.voProfiles=m,t.finishrequestStartVOProfiles=!0)})()}onResumeActiveApp(){var t=this;return(0,e.Z)(function*(){!(yield t.authService.isAuthenticated())||Se.g.addListener("appStateChange",s=>{s.isActive?t.ngZoneService.run(()=>{t.handleResumeState(s)}):t.creatinigEvent||t.ngZoneService.run(()=>{t.handlePauseActivity()})})})()}checkAutomaticTimeZone(){this.platform.is("cordova")||this.platform.is("capacitor")?this.platform.ready().then(()=>{this.isAndroid?this.timeSettingsService.checkAutomaticTime().then(t=>{this.isAutomaticTimeEnabled="true"==t}).catch(t=>{t&&console.warn("Erro plugin checkAutomaticTime ",t)}):this.isAutomaticTimeEnabled=!0}):console.log("Run in browser")}resumeCreateEvent(t){let a=!1;const{logistic:s,vo:m,action:C,event:L}=this.resumeCreateEventInterruptedService.getResumeCreationInterrupted();let Q=null;return""!==s.eventType||s.eventType.length>1?Q="LOGISTIC":(""===s.eventType||!s.eventType)&&(Q="VO"),this.resumeCreateEventInterruptedService.showModalResumeCreateEventInterrupted({target:Q,eventType:t||"",canCreateEvent:!0,action:C,event:{id:L?.id?L.id:"",instanceName:L?.instanceName?L?.instanceName:""}}),this.inviteButtonDisable=!1,(""!==s.eventType||s.eventType.length>1||m)&&(a=!0),a}setProfileCurrentCorrect(t){t?.authorities.includes("ROLE_LOGI_EXP")?(this.profileManagerService.setProfileLogistic(t),this.profileManagerService.setProfile(t),this.resumeCreateEventInterruptedService.setProfileLogisticCreationInterrupte(t)):(this.profileManagerService.setProfile(t),this.resumeCreateEventInterruptedService.setProfileVoCreationInterrupte(t))}setProfileOnlyOne(){const t=this.profileManagerService.getProfileList();t&&t.length>0&&1===t.length&&this.setProfileCurrentCorrect(t[0])}showModalSelectEventInstantOrDefault(){var t=this;return(0,e.Z)(function*(){const a=yield t.modalController.create({component:he.US,cssClass:"event-instant-",componentProps:{}});yield a.present();try{const{data:s}=yield a.onDidDismiss();if(!s)return{close:!0,typeEvent:null};if(s&&s&&s.typeEvent)return"instant"===s.typeEvent&&{...s,close:!0}}catch{return!1}})()}showNotification(t,a,s,m=5e3){this.notificatorService.notify({title:t,message:a,type:s,timeout:m})}getGeoCoordinatesDevice(t,a){var s=this;return(0,e.Z)(function*(){const{lat:m,lng:C}=yield s.geoCoordinates(t,a);return{lat:m,lng:C}})()}geoCoordinates(t,a){var s=this;return(0,e.Z)(function*(){try{const m=yield s.geolocationService.getCurrentPositionAndRequestPermission();return{lat:m&&m.coords&&m.coords.latitude?m.coords.latitude:null,lng:m&&m.coords&&m.coords.longitude?m.coords.longitude:null}}catch(m){s.inviteButtonDisable=!1,s.loadingService.hide(0,a);const C=s.translateConfigService.translate("PG_HOME_TOAST_ERROR_GETTING_LOCATION_TITLE"),L=s.translateConfigService.translate("PG_HOME_TOAST_MESSAGE_ERROR_GETTING_LOCATION");return s.showNotification(C,L,"error",s.timeoutNotification),s.logService.logError(t,"",m),m}})()}openPermissionModal(t,a){var s=this;return(0,e.Z)(function*(){const m=t.company.instanceName;try{const C=yield s.getAccessToken(m,t);try{const{authorized:L}=yield s.checkSoftLock(m,C);try{if(L||(yield s.modalPermissionsService.openModal({permission:"GPS"})))return s.inviteButtonDisable=!1,void(yield s.handlePermissionGranted(t,L,C,a));s.handlePermissionRejected()}catch{s.inviteButtonDisable=!1,s.handlePermissionRejected()}}catch(L){return s.logService.logError("http:error","checkSoftLock",{data:L}),s.handleVerifyCoordinatesErrorResponse(L)}}catch(C){s.handleAccessTokenError(C)}})()}handlePermissionGranted(t,a,s,m){var C=this;return(0,e.Z)(function*(){if(a)C.handleVerifyCoordinatesSuccessResponse({authorized:a},m);else try{yield C.geolocationService.getCurrentPositionAndRequestPermission();const{lat:L,lng:Q}=yield C.getDeviceCoordinates();try{if(L&&Q){C.createEventService.setGeoCoordinates({lat:L,lng:Q,authorized:!1});const de=yield C.apiService.verifyCoordinates(t.company.instanceName,L,Q,s).toPromise();de&&de.authorized&&C.createEventService.setGeoCoordinates(de),C.handleVerifyCoordinatesSuccessResponse(de,m)}}catch(ye){return C.inviteButtonDisable=!1,C.creatinigEvent=!1,C.handleVerifyCoordinatesErrorResponse(ye)}}catch(L){C.handleGeolocationError(L),C.inviteButtonDisable=!1,C.creatinigEvent=!1}})()}getAccessToken(t,a){var s=this;return(0,e.Z)(function*(){try{return yield s.getCompanyInstanceRelatedAccessToken(t,a.portal)}catch(m){s.logService.logError("http::getCompanyInstanceRelatedAccessToken","",m);const C=s.translateConfigService.translate("PG_HOME_TOAST_ERROR_GET_TOKEN_TITLE"),L=s.translateConfigService.translate("PG_HOME_TOAST_MESSAGE_ERROR_GET_TOKEN");throw s.showNotification(C,L,"error",s.timeoutNotification),m}})()}getDeviceCoordinates(){var t=this;return(0,e.Z)(function*(){try{const{lat:a,lng:s}=yield t.getGeoCoordinatesDevice("geolocation::afterProfileSelection","on-create-event");return{lat:a,lng:s}}catch(a){throw a}})()}checkSoftLock(t,a){var s=this;return(0,e.Z)(function*(){try{const{authorized:m}=yield s.apiService.checkSoftLock(t,null,null,a).toPromise();return{authorized:m}}catch(m){throw m instanceof z.HttpErrorResponse&&s.logService.logError("http::error","check Soft Lock Error Http",m),m}})()}handleGeolocationError(t){this.loadingService.hide(0,""),this.inviteButtonDisable=!1;let a="",s="";const m="denied"===t.coarseLocation||"denied"===t.location||"Location permission was denied"===t.message;m?(a=this.translateConfigService.translate("TOAST_LOCATION_PERMISSION_DENIED_TITLE"),s=this.translateConfigService.translate("TOAST_LOCATION_PERMISSION_DENIED_MESSAGE")):(a=this.translateConfigService.translate("PG_HOME_TOAST_ERROR_GETTING_LOCATION_TITLE"),s=this.translateConfigService.translate("PG_HOME_TOAST_MESSAGE_ERROR_GETTING_LOCATION")),this.showNotification(a,s,"error",m?1e4:this.timeoutNotification),this.logService.logError("device:getCurrentPositionAndRequestPermission",t)}handleAccessTokenError(t){this.logService.logError("http::getCompanyInstanceRelatedAccessToken","",t);const a=this.translateConfigService.translate("PG_HOME_TOAST_ERROR_GET_TOKEN_TITLE"),s=this.translateConfigService.translate("PG_HOME_TOAST_MESSAGE_ERROR_GET_TOKEN");this.showNotification(a,s,"error",this.timeoutNotification)}handlePermissionRejected(){this.inviteButtonDisable=!1,this.logService.logError("permissionModal::afterProfileSelectionPageHome","",{data:"modal-permission-rejected"})}getDateParams(){const t=this.activatedRoute?.queryParams.subscribe(a=>{a?.notResetSession||this.sessionAddFlowService.clearAndGenerateSessionId()});this.subscriptions.push(t)}cantCreateEvent(){var t=this;return(0,e.Z)(function*(){yield(yield t.modalController.create({component:he.AL,componentProps:{},cssClass:"can-create-modal"})).present()})()}checkInvertedColor(){var t=this;return(0,e.Z)(function*(){if(t.isAndroid)try{const a=yield t.checkInverColorService.isEnabled();t.invertColorIsEnabled=!!a}catch(a){t.invertColorIsEnabled=!1,t.logService.logError("error:invertColor","Erro in check device Is Colors Invert is Enable",a)}else t.invertColorIsEnabled=!1})()}isAuthenticated(){var t=this;return(0,e.Z)(function*(){const a=yield t.authService.getRefId();return(yield t.authService.isAuthenticated())&&a})()}stopServices(){var t=this;return(0,e.Z)(function*(){clearInterval(t.sabugoWatcherIntervalId),t.resumeToPinService.stop(),t.resumeToGenerateQRCode.stop(),t.managerTokenUaamobile.stopTokenWatcher(),t.stopSabugoWatcher(),t.stopTimeout=!1,t.pooling(!0,15e3),yield t.helpDevDiagnosticService.sendDiagnosticLogTron()})()}getUserNotificationPermission(){var t=this;return(0,e.Z)(function*(){const a=yield t.fcmService.checkPermissionsAndRequestPermission(),s="denied"===a?"userDenied":a;if("granted"!==s&&"prompt"!==s&&"prompt-with-rationale"!==s)return t.showToasNotificanPlugin(!0,s),t.fcmService.removeTokenStorage(),void t.logService.logError("checkPermissionsAndRequestPermission::error",`FCM status Permission ${s}`,"");"granted"===a&&(yield t.fcmService.getTokenFcm(),yield t.enabledPlugin())})()}showToasNotificanPlugin(t,a){var s=this;return(0,e.Z)(function*(){if(s.toastShowFcm)return;s.toastController.getTop().then(de=>{de&&de.dismiss()});let m="Permiss\xe3o necess\xe1ria!. Para remover as notifica\xe7\xf5es persistentes, \xe9 preciso liberar o acesso nas configura\xe7\xf5es.",C="Permitir";s.toastShowFcm=!0,t&&(s.fcmService.removeTokenStorage(),C=s.translateConfigService.translate("PG_HOME_TOAST_USER_DENIED_BTN_ADJUST"),"userDenied"===a?(m=s.translateConfigService.translate("PG_HOME_TOAST_USER_DENIED_MESSAGE"),s.logService.logEvent("grantPermission::permissionDenied")):m=s.translateConfigService.translate("PG_HOME_TOAST_ERROR_ENABLING_NOTIFICATIONS"));const L=yield s.toastController.create({header:"",message:m,position:"top",cssClass:"custom_toast_error_notification",color:"danger",duration:15e3,mode:"ios",buttons:[{text:C,handler:(de=(0,e.Z)(function*(){s.toastShowFcm=!1,t?(s.fcmService.deleteTokenFcm(),s.nativeSettings.openSetting(P.AppNotification,o.Notifications)):yield s.requestPermissionActionNotificationListener()}),function(){return de.apply(this,arguments)})},{icon:"close-circle-sharp",role:"cancel",handler:()=>{L.dismiss(),s.toastShowFcm=!1}}]});var de;L.addEventListener("ionToastWillPresent",()=>s.applyStyles(L)),yield L.present();const{data:Q,role:ye}=yield L.onDidDismiss();(Q||ye)&&(s.toastShowFcm=!1)})()}applyStyles(t){const a=t?.shadowRoot?.querySelector(".toast-content");a&&(this.toastShowFcm=!0,a.style.padding="0.4em 1em")}pooling(t=!0,a=this.durationLong){this.stopTimeout||!this.httpErrorResonse||(clearTimeout(this.setTimeOut),t&&!this.stopTimeout&&(this.setTimeOut=setTimeout(()=>{this.onRestart(!1)},a)))}hideLoadingAll(t){this.loadingService.hide(0,"wait-newtork"),this.loadingService.hide(0,"onrestart"),this.loadingService.hide(0,"on-create-event"),this.loadingService.hide(0,"start"),this.loadingService.hide(0,"watch-sabugo-update-sabugo"),this.loadingService.hide(0,"watch-token-update-token")}subscribeToPauseEventAndHandleActivityIOs(){"ios"===fe.dV.getPlatform()&&this.platform.pause.subscribe(()=>{this.ngZoneService.run(()=>{this.handlePauseActivity()})})}handleResumeState(t){var a=this;this.httpErrorResonse=null,this.isExpiredSabugo=!1,this.qrCodeValidityCountDown=40,this.setStartError(null),this.stopCountdown(),this.startCountdown();const s=this.translateConfigService.translate("PG_HOME_LOADING_GENERATINGQRCODE");this.router.url.includes("/home")&&(this.viewGuardCallback(),this.loaderService.show(s)),this.setStartError(null),this.platformIsResume&&!this.creatinigEvent&&(this.platformIsResume=!1,this.start().then(C=>C).catch().finally((0,e.Z)(function*(){a.loaderService.hide(),a.isExpiredSabugo=yield a.authService.isExpiredSabugo(),setTimeout((0,e.Z)(function*(){a.networkService.initializeNetworkEvents(),a.loadingService.hide(0,"onrestart"),a.checkAutomaticTimeZone(),yield a.checkInvertedColor()}),900)})))}handlePauseActivity(){this.platformIsResume=!0,this.httpErrorResonse=null,this.setStartError(null),this.stopAllIntervals("Home::handlePauseActivity"),this.restartCountdown(),this.clearQRCodeData(),this.restoreBrightness(),this.allowItToRest(),this.isOffline||this.managerTokenUaamobile.initStartGetTokenUaaMobile().then(()=>{this.managerSabugo.getSabugo().then()})}enabledPlugin(){var t=this;return(0,e.Z)(function*(){try{yield ie.enablePlugin(),t.logService.logError("notification-plugin","Plugin habilitado com sucesso")}catch(a){t.logService.logError("notification-plugin","Falha ao habilitar o plugin de notifica\xe7\xf5es persistentes",a),t.showToasNotificanPlugin(!1,a)}finally{if("android"===fe.dV.getPlatform())try{if("granted"===(yield t.verfyPermissionListenerNotification())){t.logService.logEvent("notification-permission","Permiss\xe3o de notifica\xe7\xe3o persistente concedida");try{const s=yield ie.canUseFullScreenIntent();!s.canUse&&s.requiresPermission?t.logService.logWarning("full-screen-intent-permission","Permiss\xe3o de Full Screen Intent n\xe3o concedida (Android 12+)"):s.canUse&&t.logService.logEvent("full-screen-intent-permission","Permiss\xe3o de Full Screen Intent concedida")}catch(s){t.logService.logError("full-screen-intent-permission","Erro ao verificar permiss\xe3o de Full Screen Intent",s)}return}t.logService.logError("notification-permission","Permiss\xe3o de notifica\xe7\xe3o persistente negada"),t.showToasNotificanPlugin(!1,"denied")}catch(a){t.logService.logError("notification-permission","Erro ao verificar permiss\xe3o de notifica\xe7\xe3o persistente",a),t.showToasNotificanPlugin(!1,a)}}})()}verfyPermissionListenerNotification(){return(0,e.Z)(function*(){try{const{receive:t}=yield ie.checkPermissionActionNotificationListener();return t}catch(t){return console.log("error",t),t}})()}requestPermissionActionNotificationListener(){return(0,e.Z)(function*(){const{receive:t}=yield ie.requestPermissionActionNotificationListener();return t})()}loadConfigNotificationDefault(){var t=this;return(0,e.Z)(function*(){if("true"!==localStorage.getItem(t.CONFIG_KEY))try{const a=yield t.apiService.getNotificationsConfiguration().toPromise();if(!a?.defaultValue)return;t.trySetConfigNotificationDefault(a)}catch(a){t.logService.logError("http","get notification configuration home::"+a.message,a),t.retryUntilSuccess(5e3)}})()}trySetConfigNotificationDefault(t){t.activated=!0,t.persistent=!0,t.defaultValue=!1,this.apiService.updateNotificationsConfiguration(t).subscribe({next:a=>{console.log("\u2705 Configura\xe7\xe3o aplicada com sucesso:",a),localStorage.setItem(this.CONFIG_KEY,"true"),this.logService.logEvent("notification-configuration","Tentativa de aplicar configura\xe7\xe3o"),this.enabledPlugin()},error:a=>{this.logService.logError("http","update notification configuration home:: "+a.message,a),this.retryUntilSuccess(5e3)}})}cancelRetry(){null!==this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=null),this.retryCount=0}retryUntilSuccess(t){var a=this;this.retryTimeoutId=setTimeout((0,e.Z)(function*(){if(a.retryTimeoutId=null,"true"===localStorage.getItem(a.CONFIG_KEY))return;if(a.retryCount>=a.MAX_RETRIES)return void(a.retryCount=0);try{const C=yield a.apiService.getNotificationsConfiguration().toPromise();return C?.defaultValue?(a.trySetConfigNotificationDefault(C),void(a.retryCount=0)):void(a.retryCount=0)}catch(C){console.warn(`Tentativa falhou, tentando novamente em ${t/1e3}s...`,C)}a.retryCount++;const m=Math.min(2*t,3e5);a.retryUntilSuccess(m)}),t)}hasBannerLog(){(0,v.D)(this.authService.getRefId()).pipe((0,pe.w)(t=>this.apiService.hasBannnerLog(t).pipe((0,oe.b)(a=>{"LOG"===a.hasBanner&&a.bannerUrl&&this.ngZoneService.run(()=>{try{this.hasBannerLogLoad=!0,this.safeUrlIFrame=this.domSanitizer.bypassSecurityTrustResourceUrl(a.bannerUrl),this.updateCountdownDisplayMode()}catch(s){console.error("Erro ao sanitizar URL do iframe:",s),this.hasBannerLogLoad=!1}})}))),(0,ge.q)(1),(0,Ie.K)(t=>(0,Te.of)(a=>{console.log("err",a)}))).subscribe()}updateIframeHeight(){this.iframeHeight=this.deviceInfo.getIframeHeightStyle(),this.updateCountdownDisplayMode()}updateCountdownDisplayMode(){if(this.isSmallScreen||this.isUltraSmallScreen)return void(this.displayCircularCountdown=!1);const s=this.deviceInfo.getAvailableHeight()+this.deviceInfo.getHeightToolbar();console.log("realAvailableHeight",s),this.displayCircularCountdown=this.hasBannerLogLoad?s>880:s>=700}addResizeListener(){this.resizeListener=()=>this.onWindowResize(),window.addEventListener("resize",this.resizeListener)}removeResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}onWindowResize(){this.deviceInfo.updateDeviceHeightFromWindow(),this.isSmallScreen=this.deviceInfo.isSmallScreen(),this.isUltraSmallScreen=this.deviceInfo.isUltraSmallScreen(),this.isMediumSmallScreen=this.deviceInfo.isMediumSmallScreen(),this.updateIframeHeight()}}return c.\u0275fac=function(t){return new(t||c)(n.\u0275\u0275directiveInject(le.MenuController),n.\u0275\u0275directiveInject(Z.gc),n.\u0275\u0275directiveInject(Z.V1),n.\u0275\u0275directiveInject(Z.ZP),n.\u0275\u0275directiveInject(Z.e8),n.\u0275\u0275directiveInject(Z.sM),n.\u0275\u0275directiveInject(Z.gA),n.\u0275\u0275directiveInject(Z.zf),n.\u0275\u0275directiveInject(Z.bz),n.\u0275\u0275directiveInject(le.NavController),n.\u0275\u0275directiveInject(Z.V6),n.\u0275\u0275directiveInject(Z.Hc),n.\u0275\u0275directiveInject(Z.f5),n.\u0275\u0275directiveInject(le.Platform),n.\u0275\u0275directiveInject(Z.np),n.\u0275\u0275directiveInject(Z.nu),n.\u0275\u0275directiveInject(Z.v4),n.\u0275\u0275directiveInject(le.ModalController),n.\u0275\u0275directiveInject(Z.$V),n.\u0275\u0275directiveInject(le.ToastController),n.\u0275\u0275directiveInject(Z._1),n.\u0275\u0275directiveInject(Z.JQ),n.\u0275\u0275directiveInject(Z.h2),n.\u0275\u0275directiveInject(Z.SL),n.\u0275\u0275directiveInject(Z.D1),n.\u0275\u0275directiveInject(Z.PV),n.\u0275\u0275directiveInject(Z.NL),n.\u0275\u0275directiveInject(Z.wK),n.\u0275\u0275directiveInject(Z.xK),n.\u0275\u0275directiveInject(Z.jc),n.\u0275\u0275directiveInject(De.E),n.\u0275\u0275directiveInject(ke.t),n.\u0275\u0275directiveInject(Ge.ActivatedRoute),n.\u0275\u0275directiveInject(Qe.i),n.\u0275\u0275directiveInject(S),n.\u0275\u0275directiveInject(Z.FB),n.\u0275\u0275directiveInject(Z._x),n.\u0275\u0275directiveInject(D),n.\u0275\u0275directiveInject(te),n.\u0275\u0275directiveInject(Z.ME),n.\u0275\u0275directiveInject(Ge.Router),n.\u0275\u0275directiveInject(X.b),n.\u0275\u0275directiveInject(be.H7))},c.\u0275cmp=n.\u0275\u0275defineComponent({type:c,selectors:[["app-home"]],decls:12,vars:17,consts:[[3,"isHome","showBadge"],["forceOverscroll","false",3,"ngStyle"],[4,"ngIf"],[1,"home_content"],["class","home_content__invite_and_countdown",4,"ngIf"],["class","home_content__countdown",4,"ngIf"],[1,"home_content__qrcode",3,"ngClass"],["class","home_content__boxqr",4,"ngIf"],[1,"home-snackbar"],[1,"home-snackbar__container"],["class","home-snackbar__automatic-time",3,"click",4,"ngIf"],[1,"home-snackbar__automatic-time",3,"click"],[3,"className"],[1,"home-snackbar__automatic-time__message__icon"],["mode","ios","name","alert"],[1,"home-snackbar__automatic-time__message__text",3,"innerHTML"],[1,"home-snackbar__offline"],[3,"smallMessage","isHome","showOffline","onReload"],[1,"home_content__banner",3,"ngStyle"],["title","Banner Publicit\xe1rio","sandbox","allow-scripts allow-same-origin allow-popups allow-top-navigation-by-user-activation","loading","lazy","width","100%","frameborder","0",3,"ngStyle","src"],[1,"home_content__invite_and_countdown"],[1,"home_content__invite_section"],["id","btnInviteHome",3,"className","ngClass",4,"ngIf"],["class","home_content__invite_section__skeleton",4,"ngIf"],[1,"home_content__invite_section__skeleton"],[1,"home_content__invite_section__skeleton__texts"],["animated","",2,"width","100%"],["animated","",2,"width","70%"],["class","home_content__invite_section__skeleton__button",4,"ngIf"],[1,"home_content__invite_section__skeleton__button"],["animated",""],["id","btnInviteHome",3,"className","ngClass"],[4,"ngIf","ngIfElse"],["associateCompany",""],[1,"home_content__invite_section__button_holder"],["mode","ios","class","home_content__invite_section__button_holder__invite ","shape","round",3,"ngClass","disabled","click",4,"ngIf"],["class","home_content__invite_section__button_holder__invite","shape","round",3,"ngClass","disabled","click",4,"ngIf"],["class","home_content__invite_section__button_holder__message",4,"ngIf"],["mode","ios","shape","round",1,"home_content__invite_section__button_holder__invite",3,"ngClass","disabled","click"],["shape","round",1,"home_content__invite_section__button_holder__invite",3,"ngClass","disabled","click"],[1,"home_content__invite_section__button_holder__message"],["style","margin: 0","class","home_content__invite_section__associate_company",4,"ngIf"],[1,"home_content__invite_section__associate_company",2,"margin","0"],[3,"click"],[1,"home_content__countdown"],[3,"qrCodeValidityCountDown","duration","paused","hasBanner","displayCircularCountdown"],["class","home_content__invite_section",3,"ngClass",4,"ngIf"],[1,"home_content__invite_section",3,"ngClass"],["mode","ios","class","home_content__invite_section__button_holder__invite","shape","round",3,"disabled","click",4,"ngIf"],["mode","ios","shape","round",1,"home_content__invite_section__button_holder__invite",3,"disabled","click"],[1,"home_content__error"],[1,"home_content__error__container"],[1,"home_content__error__container__message"],[1,"home_content__error__container__message__title","ion-text-center"],[1,"home_content__error__container__message__description"],["color","medium"],[1,"ion-text-justify","P1"],[3,"innerHTML"],[1,"P2"],[1,"P3"],[1,"ion-text-justify","P4"],["class","home_content__error__container__restart_button",4,"ngIf"],[1,"home_content__error__container__restart_button"],["type","button",3,"click"],["color","danger"],[2,"text-decoration","none",3,"click"],[1,"home_content__boxqr"],["alt","QrCode",1,"home_content__qr-code-holder",3,"margin","value"],[1,"home_content__code_holder"],["animated","",2,"width","300px","height","300px"]],template:function(t,a){1&t&&(n.\u0275\u0275element(0,"app-header",0),n.\u0275\u0275elementStart(1,"ion-content",1),n.\u0275\u0275template(2,J,5,2,"ng-container",2),n.\u0275\u0275elementStart(3,"div",3),n.\u0275\u0275template(4,k,3,7,"ng-container",2),n.\u0275\u0275template(5,_e,5,3,"div",4),n.\u0275\u0275template(6,Oe,2,1,"ng-container",2),n.\u0275\u0275template(7,We,3,2,"ng-container",2),n.\u0275\u0275template(8,Ke,2,5,"div",5),n.\u0275\u0275elementStart(9,"div",6),n.\u0275\u0275template(10,at,2,2,"div",7),n.\u0275\u0275template(11,st,4,0,"ng-container",2),n.\u0275\u0275elementEnd()()()),2&t&&(n.\u0275\u0275property("isHome",!0)("showBadge",!0),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngStyle",n.\u0275\u0275pureFunction2(12,lt,a.invertColorIsEnabled?"invert(1)":"",a.availableHeight+"px")),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!a.isAutomaticTimeEnabled||a.isOffline),n.\u0275\u0275advance(2),n.\u0275\u0275property("ngIf",a.hasBannerLogLoad&&!a.isOffline&&a.safeUrlIFrame),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!a.hasBannerLogLoad&&!a.isOffline),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",a.hasBannerLogLoad),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",a.isExpiredSabugo||a.isOffline),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",a.qrCode&&!a.isExpiredSabugo&&a.hasBannerLogLoad&&!a.isMediumSmallScreen),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngClass",n.\u0275\u0275pureFunction1(15,dt,a.hasBannerLogLoad&&(a.isSmallScreen||a.isMediumSmallScreen))),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",a.qrCode&&!a.isExpiredSabugo),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!(a.qrCode||a.isOffline||a.isExpiredSabugo||null!=a.httpErrorResonse&&a.httpErrorResonse.error)))},dependencies:[Ee.NgClass,Ee.NgIf,Ee.NgStyle,le.IonButton,le.IonContent,le.IonIcon,le.IonSkeletonText,le.IonText,Fe.G,je.c,He.zF,_.M,b.X$],styles:["ion-content[_ngcontent-%COMP%]{--overflow: hidden !important;overflow:hidden!important}ion-content[_ngcontent-%COMP%] .home-snackbar[_ngcontent-%COMP%]{position:relative;top:0;left:0;right:0;width:100%;z-index:10}ion-content[_ngcontent-%COMP%] .home-snackbar__container[_ngcontent-%COMP%]{position:relative;width:100%;max-height:64px;z-index:10}ion-content[_ngcontent-%COMP%] .home-snackbar__automatic-time[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;background:#f2f2f2;position:relative;z-index:10}ion-content[_ngcontent-%COMP%] .home-snackbar__automatic-time__message[_ngcontent-%COMP%]{color:#595959;font-size:.8rem;padding:.4em 8px .4em 0;text-align:justify;display:flex;align-items:center}ion-content[_ngcontent-%COMP%] .home-snackbar__automatic-time__message--small-screen[_ngcontent-%COMP%]{font-size:11.8px;padding:2px 5px}ion-content[_ngcontent-%COMP%] .home-snackbar__automatic-time__message__icon[_ngcontent-%COMP%]{font-size:2em;padding-left:.6em;padding-right:.4em}ion-content[_ngcontent-%COMP%] .home-snackbar__offline[_ngcontent-%COMP%]{position:relative;width:100%;z-index:10}ion-content[_ngcontent-%COMP%] .home_content[_ngcontent-%COMP%]{background:#fff;display:flex;flex-direction:column;position:relative;overflow:hidden;justify-content:space-evenly;padding-bottom:1.5rem;height:100%;flex:1 1 auto}ion-content[_ngcontent-%COMP%] .home_content__banner[_ngcontent-%COMP%]{width:100%;z-index:8;display:flex;align-items:center;justify-content:center;flex-direction:column;animation:fadeIn .5s ease-in-out;padding:0!important}ion-content[_ngcontent-%COMP%] .home_content__banner[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{width:100%;height:100%;border:none;display:block}ion-content[_ngcontent-%COMP%] .home_content__invite_and_countdown[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;width:100%;z-index:5;flex-direction:column;box-sizing:border-box;flex:auto;height:100%}ion-content[_ngcontent-%COMP%] .home_content__invite_section[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:5;min-width:0;min-height:0;padding:.5rem 0}ion-content[_ngcontent-%COMP%] .home_content__invite_section.hasBanner[_ngcontent-%COMP%]{min-height:0}ion-content[_ngcontent-%COMP%] .home_content__invite_section.noBanner[_ngcontent-%COMP%]{flex:none!important;margin:5rem 0}ion-content[_ngcontent-%COMP%] .home_content__invite_section[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{margin:0;display:flex;justify-content:center;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__error[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center;z-index:6;min-height:0;padding:0 1rem}ion-content[_ngcontent-%COMP%] .home_content__error[_ngcontent-%COMP%]:not(:empty){flex:1 1 auto}ion-content[_ngcontent-%COMP%] .home_content__countdown[_ngcontent-%COMP%]{position:relative;z-index:9;max-height:-webkit-max-content;max-height:-moz-max-content;max-height:max-content;width:100%;justify-content:center;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__qrcode[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__boxqr[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__qr-code-holder[_ngcontent-%COMP%]{width:min(80vw,40vh,308px);display:flex;justify-content:center;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__invite_section__button_holder[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%}ion-content[_ngcontent-%COMP%] .home_content__invite_section__button_holder__invite[_ngcontent-%COMP%]{align-self:center}ion-content[_ngcontent-%COMP%] .home_content__invite_section__button_holder__message[_ngcontent-%COMP%]{width:100%;text-align:center;padding:.5rem 1em}ion-content[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{text-align:center;font-size:.85em;display:flex;justify-content:center;align-items:center;width:100%}ion-content[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{transition:background-color .1s ease-out,transform .1s ease;--box-shadow: 0;text-transform:none;height:clamp(40px,8vh,2em);min-height:40px;font-size:clamp(.7rem,3vw,1.1rem);font-size:1em;min-width:18vw;max-width:30vw}ion-content[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]:active{transform:scale(.97)}ion-content[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] ion-button.small-screen[_ngcontent-%COMP%]{height:clamp(30px,8vh,2em);min-height:30px;font-size:clamp(.7rem,3vw,1.1rem);--padding-start: clamp(1em, 3vw, 1.25em);--padding-end: clamp(1em, 3vw, 1.25em);font-size:.9em;min-width:16vw;max-width:19vw}ion-content[_ngcontent-%COMP%] .hint--small-screen[_ngcontent-%COMP%]{font-size:.7em;padding:.6rem}ion-content[_ngcontent-%COMP%] .hint--small_screen[_ngcontent-%COMP%], ion-content[_ngcontent-%COMP%] .hint--small-screen[_ngcontent-%COMP%], ion-content[_ngcontent-%COMP%] .hint.small_screen[_ngcontent-%COMP%]{padding-top:1em}ion-content[_ngcontent-%COMP%] .hint--toast_show_fcm[_ngcontent-%COMP%], ion-content[_ngcontent-%COMP%] .hint.toast_show_fcm[_ngcontent-%COMP%]{padding-top:2rem}ion-content[_ngcontent-%COMP%] .hint--toast_show_fcm_small[_ngcontent-%COMP%], ion-content[_ngcontent-%COMP%] .hint.toast_show_fcm_small[_ngcontent-%COMP%]{padding-top:2.5rem}ion-content[_ngcontent-%COMP%] .hint__associate_company[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column}ion-content[_ngcontent-%COMP%] .hint__associate_company[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:16px;font-size:clamp(.7rem,3vw,1.1rem);color:#fff;background-color:#0ec254;padding:clamp(.5em,2vw,.75em) clamp(1em,4vw,1.25em);border-radius:32px;transition:background-color .1s ease-out,transform .1s ease;height:clamp(30px,8vh,50px)}ion-content[_ngcontent-%COMP%] .hint__associate_company[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{transform:scale(.97)}ion-content[_ngcontent-%COMP%] .hint__button_holder[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%}ion-content[_ngcontent-%COMP%] .hint__button_holder[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{height:clamp(30px,8vh,50px);margin-top:0;font-size:clamp(.7rem,3vw,1.1rem);--color: #fff;--background: #0ec254;--padding-start: clamp(1em, 3vw, 1.25em);--padding-end: clamp(1em, 3vw, 1.25em);--border-radius: 32px;transition:background-color .1s ease-out,transform .1s ease;align-self:center}ion-content[_ngcontent-%COMP%] .hint__button_holder[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]:active{transform:scale(.97)}ion-content[_ngcontent-%COMP%] .hint__button_holder__invite[_ngcontent-%COMP%]{align-self:center}ion-content[_ngcontent-%COMP%] .hint__button_holder__message[_ngcontent-%COMP%]{width:100%;text-align:center}ion-content[_ngcontent-%COMP%] .home_content__invite_section__skeleton[_ngcontent-%COMP%]{display:flex;position:relative;flex-direction:column;align-content:center;width:100%;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__invite_section__skeleton__texts[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__invite_section__skeleton__texts[_ngcontent-%COMP%] > ion-skeleton-text[_ngcontent-%COMP%]{border-radius:8px}ion-content[_ngcontent-%COMP%] .home_content__invite_section__skeleton__button[_ngcontent-%COMP%]{width:8em;height:36px;border-radius:30px}ion-content[_ngcontent-%COMP%] .home_content__error__container[_ngcontent-%COMP%]{position:relative;display:flex;-webkit-box-pack:center;align-items:center;flex-direction:column;height:calc(100% - 3em);padding:0 2em;color:#656768;justify-content:center}ion-content[_ngcontent-%COMP%] .home_content__error__container__message__title[_ngcontent-%COMP%], ion-content[_ngcontent-%COMP%] .home_content__error__container__message__description[_ngcontent-%COMP%]{margin:4px 0}ion-content[_ngcontent-%COMP%] .home_content__error__container__restart_button[_ngcontent-%COMP%]{margin-top:1em;font-size:1em;color:#fff;background-color:#0ec254;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out}ion-content[_ngcontent-%COMP%] .home_content__error__container__restart_button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:transparent;color:#fff}ion-content[_ngcontent-%COMP%] .home_content__invite_section__associate_company[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column}ion-content[_ngcontent-%COMP%] .home_content__invite_section__associate_company[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:16px;font-size:clamp(.7rem,3vw,1.1rem);color:#fff;background-color:#0ec254;padding:clamp(.5em,2vw,.75em) clamp(1em,4vw,1.25em);border-radius:32px;transition:background-color .1s ease-out,transform .1s ease;height:clamp(30px,8vh,50px)}ion-content[_ngcontent-%COMP%] .home_content__invite_section__associate_company[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{transform:scale(.97)}@media (inverted-colors: inverted){.isInvertColorIsEnableRevert[_ngcontent-%COMP%]{filter:invert(1)}}"]}),c})()},71994:(Ye,Pe,p)=>{p.d(Pe,{sZ:()=>ve,ue:()=>H,AQ:()=>Z,Ut:()=>Qe,oY:()=>Y,YH:()=>Ee,i9:()=>He});var e=p(45449),z=p(47898),K=p(90944),v=p(90603),Te=p(87871);function Me(_,b){if(1&_&&(e.\u0275\u0275elementStart(0,"div",7),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&_){const l=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",l.foundUser.document," ")}}function ge(_,b){if(1&_&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,Me,2,1,"div",6),e.\u0275\u0275elementContainerEnd()),2&_){const l=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null==l.foundUser?null:l.foundUser.document)}}function pe(_,b){if(1&_&&(e.\u0275\u0275elementStart(0,"div",7),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&_){const l=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",l.foundUser.company," ")}}function oe(_,b){if(1&_&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,pe,2,1,"div",6),e.\u0275\u0275elementContainerEnd()),2&_){const l=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null==l.foundUser?null:l.foundUser.company)}}function Ie(_,b){if(1&_){const l=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",1),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(l);const I=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(I.userSelect.emit(I.foundUser))}),e.\u0275\u0275element(2,"app-avatar",2),e.\u0275\u0275elementStart(3,"div",3)(4,"div",4),e.\u0275\u0275text(5),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(6,ge,2,1,"ng-container",0),e.\u0275\u0275template(7,oe,2,1,"ng-container",0),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(8,"ion-ripple-effect",5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()}if(2&_){const l=e.\u0275\u0275nextContext();let h;e.\u0275\u0275advance(2),e.\u0275\u0275property("firstName",l.foundUser.firstName)("lastName",l.foundUser.lastName)("thumbnailImage",null!==(h=null!==(h=null==l.foundUser?null:l.foundUser.image)&&void 0!==h?h:null==l.foundUser?null:l.foundUser.thumbnailImage)&&void 0!==h?h:null)("size","md"),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",l.helperService.normalizeName(l.foundUser.firstName,l.foundUser.lastName)," "),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","driver"===l.typeofuser),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","assistant"===l.typeofuser)}}function Se(_,b){1&_&&(e.\u0275\u0275elementStart(0,"div",14),e.\u0275\u0275element(1,"ion-skeleton-text",15),e.\u0275\u0275elementStart(2,"div",3)(3,"div",4),e.\u0275\u0275element(4,"ion-skeleton-text",16),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",7),e.\u0275\u0275element(6,"ion-skeleton-text",17),e.\u0275\u0275elementEnd()()())}const fe=function(){return[1,2,3,4,5,6,7,8,9,10]};function he(_,b){1&_&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",8)(2,"div",9)(3,"div",10),e.\u0275\u0275element(4,"ion-skeleton-text",11)(5,"ion-skeleton-text",12),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(6,Se,7,0,"div",13),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()),2&_&&(e.\u0275\u0275advance(6),e.\u0275\u0275property("ngForOf",e.\u0275\u0275pureFunction0(1,fe)))}let ve=(()=>{class _{constructor(l){this.helperService=l,this.skeleton=!1,this.userSelect=new e.EventEmitter}ngOnInit(){}}return _.\u0275fac=function(l){return new(l||_)(e.\u0275\u0275directiveInject(z.W_))},_.\u0275cmp=e.\u0275\u0275defineComponent({type:_,selectors:[["app-card-founduser-lg"]],inputs:{foundUser:"foundUser",skeleton:"skeleton",typeofuser:"typeofuser"},outputs:{userSelect:"userSelect"},decls:2,vars:2,consts:[[4,"ngIf"],[1,"result","ion-activatable",3,"click"],[3,"firstName","lastName","thumbnailImage","size"],[1,"user-info"],[1,"full-name"],["type","bounded"],["class","company",4,"ngIf"],[1,"company"],[1,"results"],[1,"sub-title"],[1,"ion-text-center",2,"display","flex","flex-direction","column","align-items","center"],["animated","",2,"width","100%"],["animated","",2,"width","60%"],["class","result",4,"ngFor","ngForOf"],[1,"result"],["animated","",1,"avatar-skeleton"],["animated","",2,"width","85%"],["animated","",2,"width","50%"]],template:function(l,h){1&l&&(e.\u0275\u0275template(0,Ie,9,7,"ng-container",0),e.\u0275\u0275template(1,he,7,2,"ng-container",0)),2&l&&(e.\u0275\u0275property("ngIf",h.foundUser&&!h.skeleton),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",h.skeleton))},dependencies:[K.NgForOf,K.NgIf,v.IonRippleEffect,v.IonSkeletonText,Te.A],styles:[".avatar-skeleton[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;flex-shrink:0}.result[_ngcontent-%COMP%]{position:relative;margin:10px 0;border:1px solid #eee;border-radius:4px;padding:6px 10px;display:flex;align-items:center;gap:10px}.result[_ngcontent-%COMP%] app-avatar[_ngcontent-%COMP%]{flex-shrink:0}.result[_ngcontent-%COMP%] .user-info[_ngcontent-%COMP%]{flex:1;min-width:0}.result[_ngcontent-%COMP%] .company[_ngcontent-%COMP%]{color:#aaa;font-size:.8em}.results[_ngcontent-%COMP%]{padding:1em;overflow:scroll;height:100%}.results[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:left}.results[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{margin:10px 0;font-size:.9em;background-color:#eee;border:1px solid #ccc;padding:8px;border-radius:2px;text-align:center}"]}),_})();var P=p(24006),o=p(99826);function j(_,b){if(1&_&&(e.\u0275\u0275elementStart(0,"div",16),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&_){const l=b.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",l.message," ")}}function M(_,b){if(1&_&&(e.\u0275\u0275elementStart(0,"div",14),e.\u0275\u0275template(1,j,2,1,"div",15),e.\u0275\u0275elementEnd()),2&_){const l=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",l.getFieldInputValidationErrors("reason"))}}let H=(()=>{class _{constructor(l,h,I,J,$,re){this.ngZoneService=l,this.createLogisticEventService=h,this.formBuilder=I,this.modalController=J,this.notificatorService=$,this.translateConfigService=re,this.reasonFormErrors=[],this.onClose=()=>{this.modalController.dismiss({reason:null})},this.onSubmit=()=>{const k=this.reasonForm.controls.reason.value,F=this.validateInput({reason:k});if(F.length){this.setValidationErrors(F);const T={title:this.translateConfigService.translate("TOAST_INVALID_DATA_TITLE"),message:this.translateConfigService.translate("TOAST_INVALID_DATA_NESSAGE"),type:"error"};this.notificatorService.notify(T)}else this.modalController.dismiss({reason:k})},this.validateInput=k=>{const O=[],F=this.validateReasonInput(k);return F&&O.push(F),O},this.validateReasonInput=k=>!k.reason||k.reason.length<1?{message:this.translateConfigService.translate("MD_JUSTIFY_INVITE_WITOUT_LOCATOR_JUSTIFICATION_PROVIDED"),field:"reason"}:null,this.setValidationErrors=k=>{this.reasonFormErrors=k},this.thereIsFieldInputValidationErrors=k=>this.reasonFormErrors.find(O=>O.field===k),this.getFieldInputValidationErrors=k=>this.reasonFormErrors.filter(O=>O.field===k)}ngOnInit(){this.reasonForm=this.formBuilder.group({reason:[""]})}}return _.\u0275fac=function(l){return new(l||_)(e.\u0275\u0275directiveInject(z.zf),e.\u0275\u0275directiveInject(z.V),e.\u0275\u0275directiveInject(P.UntypedFormBuilder),e.\u0275\u0275directiveInject(v.ModalController),e.\u0275\u0275directiveInject(z.V6),e.\u0275\u0275directiveInject(z.wK))},_.\u0275cmp=e.\u0275\u0275defineComponent({type:_,selectors:[["app-justify-self-invite-without-locator"]],decls:25,vars:15,consts:[[3,"ngClass"],[1,"content"],[1,"modal-container"],[1,"modal-title"],[1,"button-holder"],[1,"back",3,"click"],[1,"title"],[1,"modal-body"],[3,"formGroup","ngSubmit"],[1,"input-holder"],["maxlength","55","id","reason","formControlName","reason",3,"placeholder"],["class","errors",4,"ngIf"],[1,"modal-footer"],["type","submit",3,"click"],[1,"errors"],["class","error",4,"ngFor","ngForOf"],[1,"error"]],template:function(l,h){1&l&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"button",5),e.\u0275\u0275listener("click",function(){return h.onClose()}),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",6),e.\u0275\u0275text(9),e.\u0275\u0275pipe(10,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",7)(12,"ion-row")(13,"ion-col")(14,"form",8),e.\u0275\u0275listener("ngSubmit",function(){return h.onSubmit()}),e.\u0275\u0275elementStart(15,"div",9)(16,"textarea",10),e.\u0275\u0275pipe(17,"translate"),e.\u0275\u0275text(18," "),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(19,M,2,1,"div",11),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(20,"div",12)(21,"div",4)(22,"button",13),e.\u0275\u0275listener("click",function(){return h.onSubmit()}),e.\u0275\u0275text(23),e.\u0275\u0275pipe(24,"translate"),e.\u0275\u0275elementEnd()()()()()()),2&l&&(e.\u0275\u0275property("ngClass","selector"),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(7,7,"BTN_BACK")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(10,9,"MD_JUSTIFY_INVITE_WITOUT_LOCATOR_TITLE")),e.\u0275\u0275advance(5),e.\u0275\u0275property("formGroup",h.reasonForm),e.\u0275\u0275advance(2),e.\u0275\u0275property("placeholder",e.\u0275\u0275pipeBind1(17,11,"MD_JUSTIFY_INVITE_WITOUT_LOCATOR_INPUT")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",h.thereIsFieldInputValidationErrors("reason")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(24,13,"MD_JUSTIFY_INVITE_WITOUT_LOCATOR_BTN_CONFIRM_REFUSAL")," "))},dependencies:[K.NgClass,K.NgForOf,K.NgIf,v.IonCol,v.IonRow,P.\u0275NgNoValidate,P.DefaultValueAccessor,P.NgControlStatus,P.NgControlStatusGroup,P.MaxLengthValidator,P.FormGroupDirective,P.FormControlName,o.X$],styles:[".selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:100%;overflow:scroll}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:1em;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:center;margin:32px 32px 8px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px;display:flex;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid #eee;border-radius:8px;color:#656768;width:100%;padding:8px;margin-top:18px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus{border:1px solid #656768;outline:none}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}"]}),_})();function ie(_,b){if(1&_&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",16)(2,"div",17),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",18)(6,"div",19),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementContainerEnd()),2&_){const l=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(4,3,"MD_JUSTIFY_LG_INVITE_WITOUT_LOCATOR_DESTINATION")," "),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate2("",null==l.data?null:l.data.firstName," ",null==l.data?null:l.data.lastName,"")}}function ue(_,b){if(1&_&&(e.\u0275\u0275elementStart(0,"div",22),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&_){const l=b.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",l.message," ")}}function n(_,b){if(1&_&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275template(1,ue,2,1,"div",21),e.\u0275\u0275elementEnd()),2&_){const l=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",l.getFieldInputValidationErrors("reason"))}}const le=function(_){return{"no-margim":_}};let Z=(()=>{class _{constructor(l,h,I,J){this.formBuilder=l,this.modalController=h,this.notificatorService=I,this.translateConfigService=J,this.data=null,this.reasonFormErrors=[],this.onClose=()=>{this.modalController.dismiss({reason:null})},this.onSubmit=()=>{const $=this.reasonForm.controls.reason.value,k=this.validateInput({reason:$});if(k.length){this.setValidationErrors(k);const O={title:this.translateConfigService.translate("TOAST_INVALID_DATA_TITLE"),message:this.translateConfigService.translate("TOAST_INVALID_DATA_NESSAGE"),type:"error"};this.notificatorService.notify(O)}else this.modalController.dismiss({reason:$})},this.validateInput=$=>{const re=[],k=this.validateReasonInput($);return k&&re.push(k),re},this.validateReasonInput=$=>!$.reason||$.reason.length<1?{message:this.translateConfigService.translate("MD_JUSTIFY_LG_INVITE_WITOUT_LOCATOR_JUSTIFICATION_PROVIDED"),field:"reason"}:null,this.setValidationErrors=$=>{this.reasonFormErrors=$},this.thereIsFieldInputValidationErrors=$=>this.reasonFormErrors.find(re=>re.field===$),this.getFieldInputValidationErrors=$=>this.reasonFormErrors.filter(re=>re.field===$)}ngOnInit(){this.reasonForm=this.formBuilder.group({reason:[""]})}}return _.\u0275fac=function(l){return new(l||_)(e.\u0275\u0275directiveInject(P.UntypedFormBuilder),e.\u0275\u0275directiveInject(v.ModalController),e.\u0275\u0275directiveInject(z.V6),e.\u0275\u0275directiveInject(z.wK))},_.\u0275cmp=e.\u0275\u0275defineComponent({type:_,selectors:[["app-logistic-justify-self-invite-with-locator"]],inputs:{data:"data"},decls:28,vars:23,consts:[[3,"ngClass"],[1,"content"],[1,"modal-container"],[1,"modal-title"],[1,"button-holder"],[1,"back",3,"click"],[1,"title"],[1,"modal-body"],[4,"ngIf"],[3,"formGroup","ngSubmit"],[1,"input-holder",3,"ngClass"],["maxlength","55","id","reason","formControlName","reason",3,"ngClass","placeholder"],[1,"count"],["class","errors",4,"ngIf"],[1,"modal-footer"],["type","submit",3,"click"],[1,"destination-holder",2,"margin-top","0","padding","0 2.5em"],[1,"destination-label"],[1,"destination-box"],[1,"name"],[1,"errors"],["class","error",4,"ngFor","ngForOf"],[1,"error"]],template:function(l,h){if(1&l&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"button",5),e.\u0275\u0275listener("click",function(){return h.onClose()}),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",6),e.\u0275\u0275text(9),e.\u0275\u0275pipe(10,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",7),e.\u0275\u0275template(12,ie,8,5,"ng-container",8),e.\u0275\u0275elementStart(13,"ion-row")(14,"ion-col")(15,"form",9),e.\u0275\u0275listener("ngSubmit",function(){return h.onSubmit()}),e.\u0275\u0275elementStart(16,"div",10)(17,"textarea",11),e.\u0275\u0275pipe(18,"translate"),e.\u0275\u0275text(19," "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(20,"div",12),e.\u0275\u0275text(21),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(22,n,2,1,"div",13),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(23,"div",14)(24,"div",4)(25,"button",15),e.\u0275\u0275listener("click",function(){return h.onSubmit()}),e.\u0275\u0275text(26),e.\u0275\u0275pipe(27,"translate"),e.\u0275\u0275elementEnd()()()()()()),2&l){let I;e.\u0275\u0275property("ngClass","selector"),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(7,11,"BTN_BACK")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(10,13,"MD_JUSTIFY_LG_INVITE_WITOUT_LOCATOR_TITLE")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",null==h.data?null:h.data.event),e.\u0275\u0275advance(3),e.\u0275\u0275property("formGroup",h.reasonForm),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(19,le,null!=h.data&&h.data.event?"no-margim":"")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(21,le,null!=h.data&&h.data.event?"no-margim":""))("placeholder",e.\u0275\u0275pipeBind1(18,15,"MD_JUSTIFY_LG_INVITE_WITOUT_LOCATOR_INPUT")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("",(null==h.reasonForm||null==(I=h.reasonForm.get("reason"))||null==I.value?null:I.value.length)||0,"/55"),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",h.thereIsFieldInputValidationErrors("reason")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(27,17,"MD_JUSTIFY_LG_INVITE_WITOUT_LOCATOR_BTN_CONFIRM_REFUSAL")," ")}},dependencies:[K.NgClass,K.NgForOf,K.NgIf,v.IonCol,v.IonRow,P.\u0275NgNoValidate,P.DefaultValueAccessor,P.NgControlStatus,P.NgControlStatusGroup,P.MaxLengthValidator,P.FormGroupDirective,P.FormControlName,o.X$],styles:["ion-content.selector.ios[_ngcontent-%COMP%]{--offset-top: 0px !important}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:auto;max-height:100%}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:auto;max-height:100%;overflow-y:auto}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:1em;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:center;margin:32px 32px 8px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px;display:flex;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-label[_ngcontent-%COMP%]{font-weight:500;font-size:14px;color:#333;width:100%;text-align:left;margin-bottom:6px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%]{background:#f5f5f5;border:1px solid #e0e0e0;border-radius:4px;padding:8px;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .photo[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:auto}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .photo[_ngcontent-%COMP%] ion-avatar[_ngcontent-%COMP%]{width:48px;height:48px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .photo[_ngcontent-%COMP%] .initials.escort[_ngcontent-%COMP%]{width:48px!important;height:48px!important;min-width:48px!important;border-radius:50%;display:flex;justify-content:center;align-items:center;background-color:#eee}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{text-align:left;font-size:12px;color:#666;width:auto}@media (max-width: 480px){.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%]{padding:6px;gap:6px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-label[_ngcontent-%COMP%]{font-size:13px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .photo[_ngcontent-%COMP%] ion-avatar[_ngcontent-%COMP%], .selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .photo[_ngcontent-%COMP%] .initials.escort[_ngcontent-%COMP%]{width:44px;height:44px;min-width:44px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:12px}}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{align-self:flex-start;font-size:11px;color:#bbb;margin-top:2px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] textarea.no-margim[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid #eee;border-radius:8px;color:#656768;width:100%;padding:8px;margin-top:18px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus{border:1px solid #656768;outline:none}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{margin-bottom:1em;display:flex;justify-content:center;padding:1em}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{text-align:center;margin:auto;width:100%;display:flex;justify-content:center}"]}),_})();function De(_,b){if(1&_){const l=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ion-card",12),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(l);const I=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(I.createNewConventional())}),e.\u0275\u0275elementStart(1,"ion-label")(2,"h6",13),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"p",14),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()()()}2&_&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"MD_EVENT_TYPE_VISITOR")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(7,4,"MD_EVENT_TYPE_VISITOR_NEW_EVENT")," "))}function ke(_,b){if(1&_){const l=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ion-card",12),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(l);const I=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(I.createNewEntry())}),e.\u0275\u0275elementStart(1,"ion-label")(2,"h6",13),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"p",14),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()()()}2&_&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(4,2,"MD_EVENT_TYPE_CARGO_ARRIVAL")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(7,4,"MD_EVENT_TYPE_CARGO_ARRIVAL_NEW")," "))}function Ge(_,b){if(1&_){const l=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ion-card",12),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(l);const I=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(I.createNewExit())}),e.\u0275\u0275elementStart(1,"ion-label")(2,"h6",13),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"p",14),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()()()}2&_&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"MD_EVENT_TYPE_CARGO_DEPARTURE")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(7,4,"MD_EVENT_TYPE_CARGO_DEPARTURE_NEW")," "))}let Qe=(()=>{class _{constructor(l){this.modalController=l,this.availableTypes=[],this.createNewConventional=()=>{this.modalController.dismiss({type:"CONVENTIONAL"})},this.createNewEntry=()=>{this.modalController.dismiss({type:"NEW_ENTRY"})},this.createEntryFromExit=()=>{this.modalController.dismiss({type:"CLONE_EXIT"})},this.createNewExit=()=>{this.modalController.dismiss({type:"NEW_EXIT"})},this.createExitFromEntry=()=>{this.modalController.dismiss({type:"CLONE_ENTRY"})},this.back=()=>{this.modalController.dismiss(null)}}}return _.\u0275fac=function(l){return new(l||_)(e.\u0275\u0275directiveInject(v.ModalController))},_.\u0275cmp=e.\u0275\u0275defineComponent({type:_,selectors:[["app-select-logistic-event-type-modal"]],inputs:{availableTypes:"availableTypes"},decls:18,vars:10,consts:[[3,"ngClass"],[1,"content"],[1,"background"],[1,"modal-container"],[1,"modal-title"],["tabindex","1"],[1,"modal-body"],[1,"types"],["lines","none",2,"padding","0 2px"],["button","","class","type ion-no-padding",3,"click",4,"ngIf"],[1,"modal-footer"],["mode","ios","fill","clear",1,"reject",3,"click"],["button","",1,"type","ion-no-padding",3,"click"],[1,"name"],[1,"description","ion-text-wrap"]],template:function(l,h){1&l&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1),e.\u0275\u0275element(2,"div",2),e.\u0275\u0275elementStart(3,"div",3)(4,"div",4)(5,"h6",5),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",6)(9,"div",7)(10,"ion-list",8),e.\u0275\u0275template(11,De,8,6,"ion-card",9),e.\u0275\u0275template(12,ke,8,6,"ion-card",9),e.\u0275\u0275template(13,Ge,8,6,"ion-card",9),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(14,"div",10)(15,"ion-button",11),e.\u0275\u0275listener("click",function(){return h.back()}),e.\u0275\u0275text(16),e.\u0275\u0275pipe(17,"translate"),e.\u0275\u0275elementEnd()()()()()),2&l&&(e.\u0275\u0275property("ngClass","select-logistic-event-type-modal"),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(7,6,"MD_EVENT_TYPE_TITLE")),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",h.availableTypes.includes("CONVENTIONAL")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",h.availableTypes.includes("ENTRY")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",h.availableTypes.includes("EXIT")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(17,8,"BTN_BACK")," "))},dependencies:[K.NgClass,K.NgIf,v.IonButton,v.IonCard,v.IonLabel,v.IonList,o.X$],styles:[".select-logistic-event-type-modal[_ngcontent-%COMP%]{width:100vw;transition:height .5s ease-in-out;overflow:hidden;z-index:1000;height:100vh}.select-logistic-event-type-modal[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .select-logistic-event-type-modal[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .select-logistic-event-type-modal[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .select-logistic-event-type-modal[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .select-logistic-event-type-modal[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .select-logistic-event-type-modal[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{all:unset!important}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh;position:absolute;width:100vw;top:0;color:#383a3e}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{position:absolute;height:100vh;width:100vw;background-color:#333;opacity:.3;top:0;transition:opacity .5s ease-out}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{height:60vh;background-color:#fff;width:86vw;margin:auto;border-radius:8px;padding:24px;box-shadow:2px 2px rgba(0,0,0,.1);position:relative;margin-top:20vh;transition:margin-top 1s ease}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{text-align:center;font-weight:500;position:absolute;top:0;height:3.5em;line-height:3.5em;width:calc(100% - 48px);background-color:#fff}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 7em);width:calc(100% - 48px);top:3.5em;overflow-y:scroll;text-align:justify;font-size:.9em;background-color:#fff}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] ion-card[_ngcontent-%COMP%]{margin:0;box-shadow:none}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{padding:8px 12px;border:1px solid #eee;border-radius:4px;margin-bottom:8px}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .type[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:700}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .type[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:#656768}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{position:absolute;bottom:0;height:3.5em;width:calc(100% - 48px);line-height:3.5em;display:flex;justify-content:center;align-items:center;overflow:hidden;background-color:#fff}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{font-size:1em;background-color:#fff;color:#656768;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out;height:36px}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]:active{background-color:#eee;color:#656768;transition:background-color .1s ease-out}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] ion-button.accept[_ngcontent-%COMP%]{color:#0ec254}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] ion-button.accept[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}"]}),_})();var y=p(15861),u=p(24889);function S(_,b){if(1&_){const l=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"app-card-founduser-lg",23),e.\u0275\u0275listener("userSelect",function(){const J=e.\u0275\u0275restoreView(l).$implicit,$=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView($.onUserSelect(J))}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()}if(2&_){const l=b.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("foundUser",l)}}function D(_,b){if(1&_&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,S,2,1,"ng-container",22),e.\u0275\u0275elementContainerEnd()),2&_){const l=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",l.foundUsers)}}function B(_,b){if(1&_&&(e.\u0275\u0275elementStart(0,"div",20)(1,"div",7),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",21),e.\u0275\u0275text(5),e.\u0275\u0275pipe(6,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(7,D,2,1,"ng-container",16),e.\u0275\u0275elementEnd()),2&_){const l=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,3,"MD_ASSISTANT_USERS_FOUND")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(6,5,"MD_ASSISTANT_TAP_ITEM")," "),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",l.isLoading)}}function R(_,b){1&_&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275element(1,"app-card-founduser-lg",24),e.\u0275\u0275elementContainerEnd()),2&_&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("skeleton",!0))}let Y=(()=>{class _{constructor(l,h,I,J,$,re,k,O){var F=this;this.ngZoneService=l,this.createLogisticEventService=h,this.formBuilder=I,this.modalController=J,this.changeDetectorRef=$,this.helperService=re,this.logService=k,this.userPhotoService=O,this.page=0,this.size=15,this.onClose=T=>{this.modalController.dismiss(T)},this.onUserSelect=T=>{T.fullName=this.helperService.normalizeName(T.firstName,T.lastName),setTimeout(()=>{this.onClose(T)},750)},this.onCreateGuest=(0,y.Z)(function*(){const T=yield F.modalController.create({component:u._y});T.onDidDismiss().then(F.onModalDismissCallback),yield T.present()}),this.onModalDismissCallback=T=>{T&&T.data&&this.onUserSelect(T.data)},this.onUpdateContactInfoSuccessResponse=T=>{console.log("onUpdateContactInfoSuccessResponse"),console.log("contact:",T)},this.onUpdateContactInfoErrorResponse=T=>{console.log("onUpdateContactInfoErrorResponse"),console.log("error:",T)},this.onInputChange=T=>{const{value:ae}=T.target;this.infiniteScroll.disabled=!1,this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{ae.length>1&&(this.foundUsers=[],this.page=0),this.doSearch(ae)},750)},this.doSearch=T=>{const ae={searchTerm:T=T.trim()};this.dataTerms=ae,this.createLogisticEventService.getCompanyAssistants(ae,this.page,this.size).then(this.handleGetGuestsSuccessResponse).catch(this.handleGetGuestsErrorResponse).finally(()=>this.isLoading=!0)},this.handleGetGuestsSuccessResponse=T=>{console.log("handleGetGuestsSuccessResponse"),console.log("response:",T),this.setFoundUsers(T),this.userPhotoService.enrichUsersWithPhotos(T)},this.handleGetGuestsErrorResponse=T=>{this.logService.logError("http::handleGetGuestsErrorResponse","",T),console.log("handleGetGuestsErrorResponse"),console.log("error:",T)},this.setFoundUsers=T=>{this.foundUsers=T,this.changeDetectorRef.detectChanges(),scrollBy(0,1)}}ngOnInit(){this.foundUsers=[],this.searchTimeout=null,this.userForm=this.formBuilder.group({searchTerm:[""]})}ionViewWillEnter(){this.onInputChange({target:{value:""}})}loadData(l){this.page+=1,this.loadMore(this.page,l)}loadMore(l,h){this.createLogisticEventService.getCompanyDrivers(this.dataTerms,l,this.size,!!h).then(I=>{this.isLoading=!0,I.length>0?(this.handleGetGuestsSuccessResponse(this.foundUsers.concat(I)),this.size>0&&h.target.complete()):h.target.disabled=!0}).catch(I=>{this.handleGetGuestsErrorResponse(I),h.target.complete(),h.target.disabled=!0})}}return _.\u0275fac=function(l){return new(l||_)(e.\u0275\u0275directiveInject(z.zf),e.\u0275\u0275directiveInject(z.V),e.\u0275\u0275directiveInject(P.UntypedFormBuilder),e.\u0275\u0275directiveInject(v.ModalController),e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(z.W_),e.\u0275\u0275directiveInject(z.$V),e.\u0275\u0275directiveInject(z.IR))},_.\u0275cmp=e.\u0275\u0275defineComponent({type:_,selectors:[["app-selector-for-assistants-to-add-to-event"]],viewQuery:function(l,h){if(1&l&&e.\u0275\u0275viewQuery(v.IonInfiniteScroll,5),2&l){let I;e.\u0275\u0275queryRefresh(I=e.\u0275\u0275loadQuery())&&(h.infiniteScroll=I.first)}},decls:35,vars:16,consts:[[1,"fix-header-modal-ios","ion-no-border"],[3,"ngClass"],[1,"content"],[1,"modal-container"],[1,"modal-title"],[1,"button-holder"],[1,"back",3,"click"],[1,"title"],[1,"modal-body"],[3,"formGroup"],[1,"input-holder"],[1,"upper-options"],["id","name","type","text","formControlName","searchTerm",3,"placeholder","keyup"],[1,"new-holder"],["type","button",3,"click"],["class","results",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["threshold","15%","position","bottom",3,"ionInfinite"],["IonInfiniteScroll",""],[1,"results"],[1,"sub-title"],[4,"ngFor","ngForOf"],["typeofuser","assistant",3,"foundUser","userSelect"],[3,"skeleton"]],template:function(l,h){1&l&&(e.\u0275\u0275elementStart(0,"ion-header",0)(1,"ion-toolbar"),e.\u0275\u0275element(2,"ion-title"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(3,"ion-content",1)(4,"div",2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"button",6),e.\u0275\u0275listener("click",function(){return h.onClose()}),e.\u0275\u0275text(9),e.\u0275\u0275pipe(10,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",7),e.\u0275\u0275text(12),e.\u0275\u0275pipe(13,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"div",8)(15,"ion-row")(16,"ion-col")(17,"form",9)(18,"div",10)(19,"div",11)(20,"input",12),e.\u0275\u0275listener("keyup",function(J){return h.onInputChange(J)}),e.\u0275\u0275pipe(21,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(22,"div",13)(23,"div",5)(24,"button",14),e.\u0275\u0275listener("click",function(){return h.onCreateGuest()}),e.\u0275\u0275text(25),e.\u0275\u0275pipe(26,"translate"),e.\u0275\u0275elementEnd()()()()()()()(),e.\u0275\u0275elementStart(27,"ion-row")(28,"ion-col"),e.\u0275\u0275template(29,B,8,7,"div",15),e.\u0275\u0275template(30,R,2,1,"ng-container",16),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275element(31,"div",17),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(32,"ion-infinite-scroll",18,19),e.\u0275\u0275listener("ionInfinite",function(J){return h.loadData(J)}),e.\u0275\u0275element(34,"ion-infinite-scroll-content"),e.\u0275\u0275elementEnd()()),2&l&&(e.\u0275\u0275advance(3),e.\u0275\u0275property("ngClass","selector"),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(10,8,"MD_ASSISTANT_BTN_CLOSE")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(13,10,"MD_ASSISTANT_TITLE")),e.\u0275\u0275advance(5),e.\u0275\u0275property("formGroup",h.userForm),e.\u0275\u0275advance(3),e.\u0275\u0275property("placeholder",e.\u0275\u0275pipeBind1(21,12,"MD_ASSISTANT_INPUT")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(26,14,"MD_ASSISTANT_BTN_NEW")," "),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",!!h.foundUsers.length),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!h.isLoading))},dependencies:[K.NgClass,K.NgForOf,K.NgIf,v.IonCol,v.IonContent,v.IonHeader,v.IonInfiniteScroll,v.IonInfiniteScrollContent,v.IonRow,v.IonTitle,v.IonToolbar,P.\u0275NgNoValidate,P.DefaultValueAccessor,P.NgControlStatus,P.NgControlStatusGroup,P.FormGroupDirective,P.FormControlName,ve,o.X$],styles:["ion-content.selector.ios[_ngcontent-%COMP%]{--offset-top: 0px !important}ion-content.selector.ios[_ngcontent-%COMP%] ion-fab.fab[_ngcontent-%COMP%]{position:fixed;margin-top:10px}ion-header.fix-header-modal-ios[_ngcontent-%COMP%] ion-toolbar[_ngcontent-%COMP%]{height:0px!important;--background: #fff}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:100%;overflow:scroll}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:1.5em;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:center;margin:32px 32px 8px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px;display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0;width:100%}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%]{overflow:scroll;height:100%;padding:1em}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;width:80%;margin:0 10% 2px;font-weight:700;text-align:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{margin:10px 0;font-size:.9em;background-color:#eee;border:1px solid #ccc;padding:8px;border-radius:2px;text-align:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%]{width:95%;margin:10px;border:1px solid #eee;border-radius:4px;padding:10px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%] .company[_ngcontent-%COMP%]{color:#aaa}"]}),_})();function G(_,b){if(1&_){const l=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"app-card-founduser-lg",24),e.\u0275\u0275listener("userSelect",function(){const J=e.\u0275\u0275restoreView(l).$implicit,$=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView($.onUserSelect(J))}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()}if(2&_){const l=b.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("foundUser",l)}}function te(_,b){if(1&_&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,G,2,1,"ng-container",23),e.\u0275\u0275elementContainerEnd()),2&_){const l=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",l.foundUsers)}}function X(_,b){if(1&_&&(e.\u0275\u0275elementStart(0,"div",21)(1,"div",22),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(4,te,2,1,"ng-container",17),e.\u0275\u0275elementEnd()),2&_){const l=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,2,"MD_DRIVER_SUBTITLE")),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",l.isLoading)}}function be(_,b){1&_&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275element(1,"app-card-founduser-lg",25),e.\u0275\u0275elementContainerEnd()),2&_&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("skeleton",!0))}let Ee=(()=>{class _{constructor(l,h,I,J,$,re,k){var O=this;this.createLogisticEventService=l,this.formBuilder=h,this.modalController=I,this.changeDetectorRef=J,this.helperService=$,this.logService=re,this.userPhotoService=k,this.isLoading=!1,this.page=0,this.size=15,this.onClose=F=>{this.modalController.dismiss(F)},this.onUserSelect=F=>{F.fullName=this.helperService.normalizeName(F.firstName,F.lastName),setTimeout(()=>{this.onClose(F)},750)},this.onCreateDriver=(0,y.Z)(function*(){const F=yield O.modalController.create({component:u.v_});F.onDidDismiss().then(T=>{O.onModalDismissCallback(T)}),yield F.present()}),this.onInputChange=F=>{const{value:T}=F.target;this.infiniteScroll.disabled=!1,this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{T.length>1&&(this.foundUsers=[],this.page=0),this.doSearch(T)},750)},this.doSearch=F=>{const T={searchTerm:F=F.trim()};this.dataTerms=T,this.createLogisticEventService.getCompanyDrivers(T,this.page,this.size).then(this.handleGetCompanyDriversSuccessResponse).catch(this.handleGetgetCompanyDriversErrorResponse).finally(()=>this.isLoading=!0)},this.handleGetCompanyDriversSuccessResponse=F=>{console.log("handleGetCompanyDriversSuccessResponse"),console.log("response:",F),this.setFoundUsers(F),this.userPhotoService.enrichUsersWithPhotos(F)},this.handleGetgetCompanyDriversErrorResponse=F=>{console.log("handleGetgetCompanyDriversErrorResponse"),this.logService.logError("http::handleGetgetCompanyDriversErrorResponse","",F),console.log("error:",F)},this.setFoundUsers=F=>{this.foundUsers=F,console.log("foundUsers",F),this.changeDetectorRef.detectChanges(),scrollBy(0,1)}}ngOnInit(){this.foundUsers=[],this.searchTimeout=null,this.userForm=this.formBuilder.group({searchTerm:[""]})}ionViewWillEnter(){this.onInputChange({target:{value:""}})}onModalDismissCallback(l){l&&l.data&&this.onUserSelect(l.data)}loadData(l){this.page+=1,this.loadMore(this.page,l)}loadMore(l,h){this.createLogisticEventService.getCompanyDrivers(this.dataTerms,l,this.size,!!h).then(I=>{this.isLoading=!0,I.length>0?(this.handleGetCompanyDriversSuccessResponse(this.foundUsers.concat(I)),this.size>0&&h.target.complete()):h.target.disabled=!0}).catch(I=>{this.handleGetCompanyDriversSuccessResponse(I),h.target.complete(),h.target.disabled=!0})}}return _.\u0275fac=function(l){return new(l||_)(e.\u0275\u0275directiveInject(z.V),e.\u0275\u0275directiveInject(P.UntypedFormBuilder),e.\u0275\u0275directiveInject(v.ModalController),e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(z.W_),e.\u0275\u0275directiveInject(z.$V),e.\u0275\u0275directiveInject(z.IR))},_.\u0275cmp=e.\u0275\u0275defineComponent({type:_,selectors:[["app-selector-for-driver-to-add-to-event"]],viewQuery:function(l,h){if(1&l&&e.\u0275\u0275viewQuery(v.IonInfiniteScroll,5),2&l){let I;e.\u0275\u0275queryRefresh(I=e.\u0275\u0275loadQuery())&&(h.infiniteScroll=I.first)}},decls:32,vars:10,consts:[[1,"fix-header-modal-ios","ion-no-border"],[3,"ngClass"],["horizontal","center","slot","fixed",1,"fab",3,"click"],["color","medium"],["name","close"],[1,"content"],[1,"modal-container"],[1,"modal-title"],[1,"button-holder"],[1,"modal-body"],[3,"formGroup"],[1,"input-holder"],[1,"upper-options"],["id","name","type","text","formControlName","searchTerm",2,"height","47px",3,"placeholder","keyup"],[1,"new-holder"],["type","button",3,"click"],["class","results",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["threshold","15%","position","bottom",3,"ionInfinite"],["IonInfiniteScroll",""],[1,"results"],[1,"sub-title"],[4,"ngFor","ngForOf"],["typeofuser","driver",3,"foundUser","userSelect"],[3,"skeleton"]],template:function(l,h){1&l&&(e.\u0275\u0275elementStart(0,"ion-header",0)(1,"ion-toolbar"),e.\u0275\u0275element(2,"ion-title"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(3,"ion-content",1)(4,"ion-fab",2),e.\u0275\u0275listener("click",function(){return h.onClose()}),e.\u0275\u0275elementStart(5,"ion-fab-button",3),e.\u0275\u0275element(6,"ion-icon",4),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"div",5)(8,"div",6)(9,"div",7),e.\u0275\u0275element(10,"div",8),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"div",9)(12,"ion-row")(13,"ion-col")(14,"form",10)(15,"div",11)(16,"div",12)(17,"input",13),e.\u0275\u0275listener("keyup",function(J){return h.onInputChange(J)}),e.\u0275\u0275pipe(18,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(19,"div",14)(20,"div",8)(21,"button",15),e.\u0275\u0275listener("click",function(){return h.onCreateDriver()}),e.\u0275\u0275text(22),e.\u0275\u0275pipe(23,"translate"),e.\u0275\u0275elementEnd()()()()()()()(),e.\u0275\u0275elementStart(24,"ion-row")(25,"ion-col"),e.\u0275\u0275template(26,X,5,4,"div",16),e.\u0275\u0275template(27,be,2,1,"ng-container",17),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275element(28,"div",18),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(29,"ion-infinite-scroll",19,20),e.\u0275\u0275listener("ionInfinite",function(J){return h.loadData(J)}),e.\u0275\u0275element(31,"ion-infinite-scroll-content"),e.\u0275\u0275elementEnd()()),2&l&&(e.\u0275\u0275advance(3),e.\u0275\u0275property("ngClass","selector"),e.\u0275\u0275advance(11),e.\u0275\u0275property("formGroup",h.userForm),e.\u0275\u0275advance(3),e.\u0275\u0275property("placeholder",e.\u0275\u0275pipeBind1(18,6,"MD_DRIVER_INPUT")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(23,8,"MD_DRIVER_BTN_NEW")," "),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",!!h.foundUsers.length),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!h.isLoading))},dependencies:[K.NgClass,K.NgForOf,K.NgIf,v.IonCol,v.IonContent,v.IonFab,v.IonFabButton,v.IonHeader,v.IonIcon,v.IonInfiniteScroll,v.IonInfiniteScrollContent,v.IonRow,v.IonTitle,v.IonToolbar,P.\u0275NgNoValidate,P.DefaultValueAccessor,P.NgControlStatus,P.NgControlStatusGroup,P.FormGroupDirective,P.FormControlName,ve,o.X$],styles:["ion-content.selector[_ngcontent-%COMP%]{--offset-top: 0px !important}ion-content.selector[_ngcontent-%COMP%] ion-fab.fab[_ngcontent-%COMP%]{position:fixed;margin-top:10px}ion-header.fix-header-modal-ios[_ngcontent-%COMP%] ion-toolbar[_ngcontent-%COMP%]{height:0px!important;--background: #fff}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:100%;overflow:scroll}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:3.5em;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:center;margin:32px 32px 8px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px;display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0;width:100%}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%]{overflow:scroll;height:100%;padding:1em}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;width:80%;margin:0 10% 2px;font-weight:700;text-align:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{margin:10px 0;font-size:.9em;background-color:#eee;border:1px solid #ccc;padding:8px;border-radius:2px;text-align:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%]{width:95%;margin:10px;border:1px solid #eee;border-radius:4px;padding:10px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%] .company[_ngcontent-%COMP%]{color:#aaa}"]}),_})();function Fe(_,b){1&_&&(e.\u0275\u0275elementStart(0,"div",10),e.\u0275\u0275element(1,"ion-spinner",11),e.\u0275\u0275elementEnd())}function je(_,b){if(1&_){const l=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",12)(1,"ion-row")(2,"ion-col")(3,"div",13)(4,"div",14)(5,"button",15),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(l);const I=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(I.deny())}),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(8,"button",15),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(l);const I=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(I.authorize())}),e.\u0275\u0275text(9),e.\u0275\u0275pipe(10,"translate"),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(11,"ion-row")(12,"ion-col")(13,"div",16)(14,"div",17)(15,"div",18),e.\u0275\u0275text(16),e.\u0275\u0275pipe(17,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(18,"div",19),e.\u0275\u0275element(19,"div",20),e.\u0275\u0275elementStart(20,"div",21),e.\u0275\u0275text(21),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(22,"div",22)(23,"div",18),e.\u0275\u0275text(24),e.\u0275\u0275pipe(25,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(26,"div",19),e.\u0275\u0275text(27),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(28,"div",23)(29,"div",18),e.\u0275\u0275text(30),e.\u0275\u0275pipe(31,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(32,"div",19),e.\u0275\u0275text(33),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(34,"div",24)(35,"div",18),e.\u0275\u0275text(36),e.\u0275\u0275pipe(37,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(38,"div",19),e.\u0275\u0275text(39),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(40,"div",25)(41,"div",18),e.\u0275\u0275text(42),e.\u0275\u0275pipe(43,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(44,"div",19),e.\u0275\u0275text(45),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(46,"ion-row")(47,"ion-col")(48,"div",16)(49,"div",17)(50,"div",18),e.\u0275\u0275text(51),e.\u0275\u0275pipe(52,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(53,"div",19),e.\u0275\u0275element(54,"div",20),e.\u0275\u0275elementStart(55,"div",21),e.\u0275\u0275text(56),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(57,"div",22)(58,"div",18),e.\u0275\u0275text(59),e.\u0275\u0275pipe(60,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(61,"div",19),e.\u0275\u0275text(62),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(63,"div",23)(64,"div",18),e.\u0275\u0275text(65),e.\u0275\u0275pipe(66,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(67,"div",19),e.\u0275\u0275text(68),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(69,"div",24)(70,"div",18),e.\u0275\u0275text(71),e.\u0275\u0275pipe(72,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(73,"div",19),e.\u0275\u0275text(74),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(75,"div",25)(76,"div",18),e.\u0275\u0275text(77),e.\u0275\u0275pipe(78,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(79,"div",19),e.\u0275\u0275text(80),e.\u0275\u0275elementEnd()()()()()()}if(2&_){const l=e.\u0275\u0275nextContext();e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(7,22,"MD_DRIVER_CONFLICT_BTN_CONFIRM_REFUSAL")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(10,24,"MD_DRIVER_CONFLICT_BTN_ALLOW")," "),e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(17,26,"MD_DRIVER_CONFLICT_REGISTERED_DRIVER")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",l.registeredDriverInvite.driver.fullName," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(25,28,"MD_DRIVER_CONFLICT_LICENSEPLATONE")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",l.getLicensePlateOneToBeRendered(l.registeredDriverInvite)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(31,30,"MD_DRIVER_CONFLICT_LICENSEPLATTWO")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",l.getLicensePlateTwoToBeRendered(l.registeredDriverInvite)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(37,32,"MD_DRIVER_CONFLICT_ON_FOOT")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",l.getOnFootToBeRendered(l.registeredDriverInvite)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(43,34,"MD_DRIVER_CONFLICT_VEHICLE_HAS_TRAILER")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",l.getOnFootToBeRendered(l.getHasCartToBeRendered)," "),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(52,36,"MD_DRIVER_CONFLICT_DRIVER_CHECKIN")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",l.candidateDriverInvite.driver.fullName," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(60,38,"MD_DRIVER_CONFLICT_LICENSEPLATONE")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",l.getLicensePlateOneToBeRendered(l.candidateDriverInvite)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(66,40,"MD_DRIVER_CONFLICT_LICENSEPLATTWO")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",l.getLicensePlateTwoToBeRendered(l.candidateDriverInvite)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(72,42,"MD_DRIVER_CONFLICT_ON_FOOT")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",l.getOnFootToBeRendered(l.candidateDriverInvite)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(78,44,"MD_DRIVER_CONFLICT_VEHICLE_HAS_TRAILER")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",l.getOnFootToBeRendered(l.getHasCartToBeRendered)," ")}}let He=(()=>{class _{constructor(l,h,I,J,$,re,k){this.modalController=l,this.portalLoginManagerService=h,this.profileManagerService=I,this.logisticEventApiService=J,this.authService=$,this.loadingService=re,this.translateConfigService=k,this.loaded=!1,this.comparePendingApprovals=()=>{const O=this.profileManagerService.getProfileLogistic();return new Promise((F,T)=>{this.authService.getToken().then(ae=>this.portalLoginManagerService.getAccessToken(O.login,O.portal,ae)).then(ae=>this.logisticEventApiService.comparePendingApprovals(this.instanceName,this.inviteId,ae.access_token).subscribe(F,T)).catch(T)}).finally(()=>this.loaded=!0)},this.handleComparePendingApprovalsSuccessResponse=O=>{console.log("handleComparePendingApprovalsSuccessResponse:",O),this.loadingService.hide(null,"loading-drivers-data");const F=O.current;this.registeredDriverInvite=O.previous,this.candidateDriverInvite=F},this.handleComparePendingApprovalsErrorResponse=O=>{this.loadingService.hide(null,"loading-drivers-data"),console.log("handleComparePendingApprovalsErrorResponse:",O)},this.getLicensePlateOneToBeRendered=O=>{if(O&&O.driver&&O.driver.licensePlateOne)return O.driver.licensePlateOne},this.getLicensePlateTwoToBeRendered=O=>{if(O&&O.driver&&O.driver.licensePlateTwo)return O.driver.licensePlateTwo},this.getOnFootToBeRendered=O=>{if(O&&O.driver)return this.translateConfigService.translate(O.driver.onFoot?"TEXT_YES":"TEXT_NOT")},this.getHasCartToBeRendered=O=>{if(O&&O.driver)return this.translateConfigService.translate(O.driver.hasCart?"TEXT_YES":"TEXT_NOT")},this.deny=()=>{const O={action:"deny",invite:{companyInstance:this.candidateDriverInvite.company.instanceName,inviteId:this.candidateDriverInvite.driver.inviteId,eventId:this.candidateDriverInvite.driver.eventId,event:{eventId:this.candidateDriverInvite.driver.eventId,target:this.candidateDriverInvite.target},...this.candidateDriverInvite}};this.modalController.dismiss(O)},this.authorize=()=>{const O={action:"authorize",invite:{eventId:this.candidateDriverInvite.driver.eventId,companyInstance:this.candidateDriverInvite.company.instanceName,inviteId:this.candidateDriverInvite.driver.inviteId,event:{eventId:this.candidateDriverInvite.driver.eventId,target:this.candidateDriverInvite.target},...this.candidateDriverInvite}};this.modalController.dismiss(O)},this.onClose=()=>{this.modalController.dismiss()}}ngOnInit(){this.loadingService.show(this.translateConfigService.translate("LOADING_DATA"),"loading-drivers-data"),this.comparePendingApprovals().then(this.handleComparePendingApprovalsSuccessResponse).catch(this.handleComparePendingApprovalsErrorResponse)}}return _.\u0275fac=function(l){return new(l||_)(e.\u0275\u0275directiveInject(v.ModalController),e.\u0275\u0275directiveInject(z.dj),e.\u0275\u0275directiveInject(z.v4),e.\u0275\u0275directiveInject(z.cv),e.\u0275\u0275directiveInject(z.e8),e.\u0275\u0275directiveInject(z.bz),e.\u0275\u0275directiveInject(z.wK))},_.\u0275cmp=e.\u0275\u0275defineComponent({type:_,selectors:[["app-solve-driver-checkin-conflict"]],inputs:{inviteId:"inviteId",instanceName:"instanceName"},decls:14,vars:9,consts:[[3,"ngClass"],[1,"content"],[1,"modal-container"],[1,"modal-title"],[1,"button-holder"],[1,"back",3,"click"],[1,"title"],["class","spinner",4,"ngIf"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],[1,"spinner"],["mode","ios","name","crescent"],[1,"modal-body"],[1,"section","bottom"],[1,"actions","two-or-more"],["type","button",3,"click"],[1,"driver-holder"],[1,"item","driver-details"],[1,"label"],[1,"value"],[1,"photo"],[1,"name"],[1,"item","license-plate-one-details"],[1,"item","license-plate-two-details"],[1,"item","entrance-type-details"],[1,"item","has-cart-details"]],template:function(l,h){1&l&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"button",5),e.\u0275\u0275listener("click",function(){return h.onClose()}),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",6),e.\u0275\u0275text(9),e.\u0275\u0275pipe(10,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(11,Fe,2,0,"div",7),e.\u0275\u0275template(12,je,81,46,"div",8),e.\u0275\u0275element(13,"div",9),e.\u0275\u0275elementEnd()()()),2&l&&(e.\u0275\u0275property("ngClass","selector"),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(7,5,"BTN_BACK")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(10,7,"MD_DRIVER_CONFLICT_TITLE")," "),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!h.loaded),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",h.registeredDriverInvite&&h.candidateDriverInvite&&h.loaded))},dependencies:[K.NgClass,K.NgIf,v.IonCol,v.IonRow,v.IonSpinner,o.X$],styles:["ion-content.selector.ios[_ngcontent-%COMP%]{--offset-top: 0px !important}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:100%;overflow:scroll}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:1em;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:center;margin:32px;margin-bottom:24px 32px 8px 32px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px;display:flex;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0;width:100%}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;margin:8px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .actions.two-or-more[_ngcontent-%COMP%]{justify-content:space-around}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .actions.only-one[_ngcontent-%COMP%]{justify-content:center}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1em;color:#0ec254;background-color:#fff;padding:.5em 1.25em;border-radius:32px;border:1px solid #0ec254;transition:background-color .1s ease-out}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .driver-holder[_ngcontent-%COMP%]{padding:16px;border:1px solid #eee;border-radius:8px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .driver-holder[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{margin-bottom:12px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .driver-holder[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:700}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .driver-holder[_ngcontent-%COMP%] .driver-details[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#0ec254}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:50vh}"]}),_})()},37763:(Ye,Pe,p)=>{p.d(Pe,{i:()=>Me});var e=p(61380),K=p(92198),v=p(45449);let Me=(()=>{class ge{constructor(oe){this.router=oe}focusInRouterNavigate(){this.router.events.pipe((0,K.h)(oe=>oe instanceof e.NavigationEnd)).subscribe(()=>{const oe=document.querySelector("#focusHeader");oe&&oe?.focus()})}applyFocusQuerySelector(oe,Ie){setTimeout(()=>{document.querySelector(`#${oe}`)?.focus()},Ie)}}return ge.\u0275fac=function(oe){return new(oe||ge)(v.\u0275\u0275inject(e.Router))},ge.\u0275prov=v.\u0275\u0275defineInjectable({token:ge,factory:ge.\u0275fac,providedIn:"root"}),ge})()},97880:(Ye,Pe,p)=>{p.d(Pe,{T:()=>ve});var e=p(8929),z=p(56498),K=p(20353),v=p(84241),Te=p(72866);function Me(P=0,o,j){let M=-1;return(0,v.k)(o)?M=Number(o)<1?1:Number(o):(0,Te.K)(o)&&(j=o),(0,Te.K)(j)||(j=K.P),new z.y(H=>{const ie=(0,v.k)(P)?P:+P-j.now();return j.schedule(ge,ie,{index:0,period:M,subscriber:H})})}function ge(P){const{index:o,period:j,subscriber:M}=P;if(M.next(o),!M.closed){if(-1===j)return M.complete();P.index=o+1,this.schedule(P,j)}}var pe=p(26582),oe=p(87545),Ie=p(7625),Se=p(40537),fe=p(45449),he=p(71403);let ve=(()=>{class P{constructor(j){this.apiService=j,this.destroy$=new e.xQ}getPhoto(j,M){return this.apiService.getUserThumbnailPhoto(j,M)}updatePhoto(j,M){let H;return new z.y(ie=>{H=this.retryUpdatePhoto(j,M).subscribe(ue=>{ie.next(ue),ie.complete()},ue=>ie.error(ue))})}retryUpdatePhoto(j,M){return this.updatePhotoSendAPI(j,M).pipe((0,pe.a)(H=>H.pipe((0,oe.w)((ie,ue)=>{if(console.log("Erro, Tentativa:",ue),ue<2)return Me(0);{const n=Math.floor(10*Math.random()*60)+60,le=n>=60?Math.floor(n/60):n,Z=1e3*n,ke=Z;return console.log(`Aguardando ${le} ${n>=60?"minuto(s)":"segundo(s)"} (${Z} milissegundos) antes de tentar novamente...`),Me(ke).pipe((0,oe.w)(()=>(console.log("Tentando novamente ap\xf3s atraso..."),this.retryUpdatePhoto(j,M))))}}),(0,Ie.R)(this.destroy$))),(0,Se.x)(()=>{this.unsubscribe()}))}updatePhotoSendAPI(j,M){return this.apiService.updatePhoto(j,M)}unsubscribe(){this.destroy$.next(),this.destroy$.complete()}}return P.\u0275fac=function(j){return new(j||P)(fe.\u0275\u0275inject(he.s))},P.\u0275prov=fe.\u0275\u0275defineInjectable({token:P,factory:P.\u0275fac,providedIn:"root"}),P})()},84241:(Ye,Pe,p)=>{p.d(Pe,{k:()=>z});var e=p(66688);function z(K){return!(0,e.k)(K)&&K-parseFloat(K)+1>=0}}}]); |