"use strict";(self.webpackChunkdemo1=self.webpackChunkdemo1||[]).push([["src_app_pages_ess-iframe_ess-iframe_module_ts"],{84959:(M,d,o)=>{o.r(d),o.d(d,{EssIframeModule:()=>v});var l=o(36895),a=o(8988),e=o(94650),c=o(71935),f=o(53326),g=o(11481);function h(n,r){1&n&&(e.\u0275\u0275elementStart(0,"div",3),e.\u0275\u0275element(1,"i",4),e.\u0275\u0275elementEnd())}function p(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"iframe",5),e.\u0275\u0275listener("load",function(){e.\u0275\u0275restoreView(t);const s=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(s.iframeLoaded())}),e.\u0275\u0275elementEnd()}if(2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("src",t.safeUrl,e.\u0275\u0275sanitizeResourceUrl)}}const u=[{path:"dashboard",component:(()=>{class n{constructor(t,i,s,m,y){this.route=t,this.cdRef=i,this.genService=s,this.urlService=m,this.sanitizer=y,this.iframeLoading=!1,this.LoggedInMedium=this.genService.GetLoggedInMedium(),this.iframeLoading=!0}ngOnInit(){this.route.params.subscribe(t=>{this.path=t.param;const i=this.urlService.getCompanyUrlByParam(this.path);this.updateCompanyUrl(i)}),this.screenWidth=window.innerWidth,this.screenHeight=window.innerHeight}updateCompanyUrl(t){const i=sessionStorage.getItem("id_token");this.iframeLoading=!0,t&&(console.log("Iframe loaded updateCompanyUrl.",this.iframeLoading),this.CompanyUrl=t+="&id_token="+encodeURIComponent(i),this.safeUrl=this.sanitizer.bypassSecurityTrustResourceUrl(this.CompanyUrl),console.log("URL for Iframe:",this.safeUrl))}onOrientationChange(t){this.screenWidth=window.screen.width,this.screenHeight=window.screen.height,this.cdRef.detectChanges()}iframeLoaded(){this.iframeLoading=!1,console.log("Iframe loaded iframeLoaded.",this.iframeLoading)}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(a.gz),e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(c.m),e.\u0275\u0275directiveInject(f.X),e.\u0275\u0275directiveInject(g.H7))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["app-ess-iframe"]],hostBindings:function(t,i){1&t&&e.\u0275\u0275listener("orientationchange",function(m){return i.onOrientationChange(m)},!1,e.\u0275\u0275resolveWindow)},decls:3,vars:2,consts:[[1,"full-height-container"],["class","mask",4,"ngIf"],["width","100%","height","100%","frameborder","0","scrolling","auto",3,"src","load",4,"ngIf"],[1,"mask"],[1,"pei","pei-spinner"],["width","100%","height","100%","frameborder","0","scrolling","auto",3,"src","load"]],template:function(t,i){1&t&&(e.\u0275\u0275elementStart(0,"div",0),e.\u0275\u0275template(1,h,2,0,"div",1),e.\u0275\u0275template(2,p,1,1,"iframe",2),e.\u0275\u0275elementEnd()),2&t&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",i.iframeLoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",i.safeUrl))},dependencies:[l.NgIf],styles:['.full-height-container[_ngcontent-%COMP%]{width:100%;height:75vh;position:relative;display:flex;justify-content:center;align-items:center}nav[_ngcontent-%COMP%]{font-size:1.5rem;height:3rem;line-height:3rem;background-color:#eee;padding:0 1rem}a[_ngcontent-%COMP%]{padding:0 2rem}.mask[_ngcontent-%COMP%]{position:absolute;width:100%;height:calc(100% - 3.25rem);top:3rem;background-color:#ffffff80;display:flex;justify-content:center;align-items:center}.mask[_ngcontent-%COMP%] > .pei-spinner[_ngcontent-%COMP%]:before{font-size:8rem}iframe[_ngcontent-%COMP%]{width:100%;height:calc(100% - 3.25rem);border:0}.pei[_ngcontent-%COMP%]{display:inline-block;position:relative;font-style:normal;font-family:Arial}.pei-spinner[_ngcontent-%COMP%]:before{content:"";vertical-align:text-bottom;display:inline-block;box-sizing:border-box;width:1em;height:1em;border:.1em solid rgba(33,150,243,.8);border-right-color:transparent;border-radius:.625em;animation:_ngcontent-%COMP%_pei-infinite-spinning .75s linear infinite}@keyframes _ngcontent-%COMP%_pei-infinite-spinning{0%{transform:rotate(0)}to{transform:rotate(360deg)}}']}),n})()}];let C=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.\u0275\u0275defineNgModule({type:n}),n.\u0275inj=e.\u0275\u0275defineInjector({imports:[a.Bz.forChild(u),a.Bz]}),n})();var I=o(51572);let v=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.\u0275\u0275defineNgModule({type:n}),n.\u0275inj=e.\u0275\u0275defineInjector({imports:[l.CommonModule,C,I.Cq]}),n})()}}]);