1import{a as B}from"./chunk-TACYX6XL.js";import{a as H}from"./chunk-SALTVC4S.js";import{a as F}from"./chunk-2MA4PKRS.js";import"./chunk-MQENSMVN.js";import"./chunk-LW6UBSXN.js";import"./chunk-2ITU7562.js";import"./chunk-TQNSHKDH.js";import{e as U}from"./chunk-7R6CGIMZ.js";import"./chunk-Z3HRNYT2.js";import"./chunk-BJ6I4SQM.js";import"./chunk-Q6Z5PMGJ.js";import"./chunk-Y4UEUGBK.js";import"./chunk-UJYMJQZB.js";import"./chunk-IWAWM5X7.js";import"./chunk-YDXYDHVT.js";import{c as N}from"./chunk-57BBKKDM.js";import{S as W,c as E}from"./chunk-BDBNNF5F.js";import"./chunk-BMNDREH6.js";import{c as z}from"./chunk-IQLQCF3X.js";import"./chunk-HU7SHZ2P.js";import"./chunk-WKTS323O.js";import"./chunk-G5C4E5SZ.js";import"./chunk-JFOVODTQ.js";import{d as M}from"./chunk-HHMUAAKH.js";import"./chunk-KX3MZ4HX.js";import"./chunk-CPVTU5XS.js";import"./chunk-EUZLHDMR.js";import{c as w,d as D,e as I}from"./chunk-LSHSIR26.js";import{a as L}from"./chunk-BTO3RYRP.js";import"./chunk-OYMZJ57R.js";import"./chunk-3W7VWIDZ.js";import{Fa as a}from"./chunk-OOUYCANI.js";import{Ca as b,Kb as m,Lb as l,Qb as r,Qc as O,Rb as u,Rc as S,Sb as v,Tb as s,Ua as g,Y as d,Za as c,_ as o,_c as P,fc as p,ja as f,nb as _,ra as h,rd as T,tc as x,vc as y}from"./chunk-WXYLEQT5.js";import"./chunk-C6Q5SG76.js";var C=new d("Window",{factory:()=>{let{defaultView:n}=o(f);if(!n)throw new Error("Window is not available");return n}}),R=new d("Location",{factory:()=>o(C).location});function A(n,e){n&1&&s(0,"imobzi-search-not-found",0),n&2&&r("redirectToSearch",!0)}function j(n,e){if(n&1&&s(0,"div",1),n&2){let t=p(2);r("innerHtml",t.safePageBody(),g)}}function V(n,e){if(n&1&&(s(0,"imobzi-breadcrumb",4),u(1,"h1",5),x(2),O(3,"translate"),v()),n&2){let t=p(3);r("pageTitle",t.content().title),c(2),y(" ",S(3,2,t.content().title)," ")}}function q(n,e){if(n&1&&(u(0,"section",2),m(1,V,4,4),s(2,"div",3),v()),n&2){let t=p(2);c(),l(t.content().title?1:-1),c(),r("innerHtml",t.safePageBody(),g)}}function $(n,e){if(n&1&&m(0,j,1,1,"div",1)(1,q,3,2,"section",2),n&2){let t=p();l(t.content()&&t.content().landing_page?0:t.content()?1:-1)}}var k=class n{platformId=o(b);contentService=o(F);title=o(D);meta=o(w);activeRoute=o(M);sanitizer=o(I);appInit=o(L);responseInit=o(T,{optional:!0});window=o(C,{optional:!0});location=o(R,{optional:!0});dialog=o(E);parametersService=o(N);content=h(null);isError=h(!1);safePageBody=P(()=>{let e=this.content()?.page_body||this.content()?.content;return this.sanitizer.bypassSecurityTrustHtml(e)}
1);key;originalUrl=this.appInit.getPathUrl();navigateToNotFound(){this.responseInit&&(this.responseInit.status=404),this.isError.set(!0)}isUrlValid(e){let t=e.split("/").filter(Boolean),i=/(?:www\..*){2,}/.test(e);return t.length<=10&&!i}ngOnInit(){this.handleScroll(),this.addEventListenerForContact(),this.addEventListenerForSimulator(),this.addEventListenerForWhatsapp(),this.key=this.activeRoute.snapshot.paramMap.get("id"),this.key?this.loadPreviewContent(this.key):this.loadStandardContent()}ngOnDestroy(){a(this.platformId)&&(document.removeEventListener("open-contact",this.onOpenContact),document.removeEventListener("open-simulator",this.onOpenSimulator),document.removeEventListener("open-whatsapp",this.onOpenWhatsapp))}handleScroll(){a(this.platformId)&&this.window?.scroll(0,1)}loadPreviewContent(e){this.contentService.getSitePreviewData(e).subscribe({next:t=>{this.content.set(t),this.handleContact()},error:()=>this.navigateToNotFound()})}loadStandardContent(){let e=this.getLocationUrl(),t=this.extractContentPath(e);if(!this.isUrlValid(t)){this.navigateToNotFound();return}this.fetchContent(t)}getLocationUrl(){return a(this.platformId)&&this.location?this.location.pathname:this.originalUrl}extractContentPath(e){let t=/^\/a\/[^/]+(\/preview)?/,i=e.replace(t,"");return i.startsWith("/")?i.slice(1):i}fetchContent(e){this.contentService.getContent(e).subscribe({next:t=>{this.content.set(t),this.updateMetaTags(t),this.handleContact()},error:()=>this.navigateToNotFound()})}updateMetaTags(e){this.title.setTitle(e.title+" | "+this.title.getTitle()),this.meta.updateTag({name:"description",content:e.meta_description})}get getContentOrigem(){return`P\xE1gina de conte\xFAdo - ${this.content()?.title}`}openContactDialog(){this.dialog.open(U,{panelClass:"custom-dialog-container",data:{origem:this.getContentOrigem}})}handleContact(){this.activeRoute.snapshot.queryParamMap.get("openContact")==="true"&&this.openContactDialog()}onOpenContact=()=>this.openContactDialog();onOpenSimulator=()=>this.openSimulatorDialog();onOpenWhatsapp=()=>this.openWhatsappDialog();addEventListenerForContact(){a(this.platformId)&&document.addEventListener("open-contact",this.onOpenContact)}addEventListenerForSimulator(){a(this.platformId)&&document.addEventListener("open-simulator",this.onOpenSimulator)}addEventListenerForWhatsapp(){a(this.platformId)&&document.addEventListener("open-whatsapp",this.onOpenWhatsapp)}async openSimulatorDialog(){let{FinancingSimulatorDialogComponent:e}=await import("./chunk-HG5JP4UW.js");this.dialog.open(e,{panelClass:"custom-dialog-container",data:{parameters:this.parametersService.getParameters()}})}openWhatsappDialog(){let e=this.parametersService.getParameters()(),t=e?.phone?.find(i=>i.type?.toLowerCase()==="whatsapp");t&&W(t,this.dialog,e)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=_({type:n,selectors:[["imobzi-content"]],decls:2,vars:1,consts:[[3,"redirectToSearch"],["data-translatable","",1,"content-text",3,"innerHtml"],["id","content",1,"site-content","container"],["data-translatable","",1,"content-text","margin-top-50","margin-bottom-50",3,"innerHtml"],[1,"imobzi-breadcrumb",3,"pageTitle"],[1,"title","display-h1","color-title","margin-bottom-10"]],template:function(t,i){t&1&&m(0,A,1,1,"imobzi-search-not-found",0)(1,$,2,1),t&2&&l(i.isError()?0:1)},dependencies:[H,B,z],styles:[".imobzi-breadcrumb[_ngcontent-%COMP%] #breadcrumbs{margin:38px 0}.imobzi-breadcrumb[_ngcontent-%COMP%] #breadcrumbs p.h4, .imobzi-breadcrumb[_ngcontent-%COMP%] #breadcrumbs .mat-icon{color:var(--subtitle)}.title[_ngcontent-%COMP%]{font-size:38px!important;line-height:64px}.content-text[_ngcontent-%COMP%] p, .content-text[_ngcontent-%COMP%] li{font-size:14px;line-height:22px;margin:0 0 .9375em;color:var(--subtitle)}.content-text[_ngcontent-%COMP%] .bancos{text-align:center}.margin-bottom-10[_ngcontent-%COMP%]{margin-bottom:10px}.margin-top-50[_ngcontent-%COMP%]{margin-top:50px}.margin-bottom-50[_ngcontent-%COMP%]{margin-bottom:50px}"]})};export{k as ContentComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.