1import{A as xe,H as Ae,O as Se,b as ue,c as _e,d as he,e as y,f as Ce,g as ge,i as fe,n as ve,v as be,w as Pe}from"./chunk-WBPUSNWV.js";import{$ as r,$c as me,A as E,B as U,Ca as b,Cc as ce,E as S,Ea as Y,H as L,I as V,Ib as ae,Jc as se,Mb as re,Nb as le,Oc as de,Pa as P,Qa as $,S as d,Sa as w,Ta as z,U as g,V as q,Wa as Z,Wc as pe,Z as G,_a as ee,a as T,b as M,ba as l,bb as te,ca as J,cb as ie,d as R,da as N,e as F,ea as W,fa as p,g as x,ga as _,h as D,ha as f,i as m,ia as u,l as j,ma as H,na as Q,oa as O,pa as K,r as A,ra as X,ta as s,ub as ne,v as B,wb as oe,z as v,za as I}from"./chunk-LOCQNF6U.js";var k=()=>({margin:"var(--ad-margin)"}),ye=t=>({article:t});function $e(t,n){t&1&&u(0,"kesma-advertisement-adocean",8),t&2&&(b(P(3,k)),p("ad",n))}function we(t,n){if(t&1&&u(0,"app-breadcrumb",3),t&2){let e=s(2);p("items",e.breadcrumbItems)}}function ze(t,n){t&1&&(_(0,"div",4),u(1,"szegedma-author-info",9),f()),t&2&&(d(),p("data",n)("headingLevel",1))}function Re(t,n){if(t&1&&(H(0,2),O(1,10),Q()),t&2){s(2);let e=I(2);d(),p("ngTemplateOutletContext",$(2,ye,n))("ngTemplateOutlet",e)}}function Fe(t,n){t&1&&u(0,"szegedma-co-workers-box",6),t&2&&p("data",n)}function De(t,n){if(t&1&&(_(0,"div"),O(1,10),f()),t&2){let e=s().$implicit;s(3);let i=I(2);d(),p("ngTemplateOutletContext",$(2,ye,e))("ngTemplateOutlet",i)}}function je(t,n){t&1&&u(0,"kesma-advertisement-adocean",8),t&2&&(b(P(3,k)),p("ad",n))}function Be(t,n){if(t&1&&r(0,je,1,4,"kesma-advertisement-adocean",1),t&2){let e,i=s(4);l((e=i.adverts==null||i.adverts.mobile==null?null:i.adverts.mobile.mobilrectangle_2)?0:-1,e)}}function Ee(t,n){t&1&&u(0,"kesma-advertisement-adocean",8),t&2&&(b(P(3,k)),p("ad",n))}function Ue(t,n){if(t&1&&r(0,Ee,1,4,"kesma-advertisement-adocean",1),t&2){let e,i=s(4);l((e=i.adverts==null||i.adverts.desktop==null?null:i.adverts.desktop.roadblock_1)?0:-1,e)}}function Le(t,n){if(t&1&&(r(0,De,2,4,"div"),r(1,Be,1,1),r(2,Ue,1,1)),t&2){let e=n.$index,i=n.$count,a=s(3);l(e!==0?0:-1),d(),l(e===5?1:-1),d(),l(e===2||a.articles.length<3&&e===i-1?2:-1)}}function Ve(t,n){if(t&1&&N(0,Le,3,3,null,null,J),t&2){let e=s(2);W(e.articles)}}function qe(t,n){if(t&1){let e=K();_(0,"span",11),X("click",function(){L(e);let a=s(3);return V(a.loadMoreResults())}),Y(1," Tov\xE1bbi h\xEDrek "),u(2,"i",12)(3,"i",13),f()}}function Ge(t,n){if(t&1&&(_(0,"div",7),r(1,qe,4,0,"span"),f()),t&2){let e=s(2);d(),l(e.isLoadingMore?-1:1)}}function Je(t,n){t&1&&u(0,"kesma-advertisement-adocean",8),t&2&&(b(P(3,k)),p("ad",n))}function Ne(t,n){if(t&1&&(_(0,"section"),r(1,$e,1,4,"kesma-advertisement-adocean",1),_(2,"div",2),r(3,we,1,1,"app-breadcrumb",3),r(4,ze,2,2,"div",4),w(5,"async"),r(6,Re,2,4,"ng-container",2),f(),_(7,"div",5),r(8,Fe,1,1,"szegedma-co-workers-box",6),w(9,"async"),r(10,Ve,2,0),r(11,Ge,2,1,"div",7),r(12,Je,1,4,"kesma-advertisement-adocean",1),f()()),t&2){let e,i,a,o,h,c=s();d(),l((e=c.adverts==null||c.adverts.mobile==null?null:c.adverts.mobile.mobilrectangle_1)?1:-1,e),d(2),l(c.breadcrumbItems?3:-1),d(),l((i=z(5,8,c.author$))?4:-1,i),d(2),l((a=c.articles[0])?6:-1,a),d(2),l((o=z(9,10,c.publicAuthors$))?8:-1,o),d(2),l(c.articles?10:-1),d(),l(c.articles.length&&c.pageIndex<c.maxPageIndex?11:-1),d(),l((h=c.adverts==null||c.adverts.mobile==null?null:c.adverts.mobile.mobilrectangle_3)?12:-1,h)}}function We(t,n){if(t&1&&u(0,"szegedma-opinion-card",6),t&2){let e=s(2).article;p("data",e)}}function He(t,n){if(t&1&&u(0,"szegedma-article-card",14),t&2){let e=s(2).article,i=s();p("data",e)("styleID",i.articleCardType.LargeRightImgCard)}}function Qe(t,n){if(t&1&&r(0,We,1,1,"szegedma-opinion-card",6)(1,He,1,2,"szegedma-article-card",14),t&2){let e,i=s().article;l((e=i==null?null:i.contentType)==="opinion"?0:1)}}function Ke(t,n){if(t&1&&r(0,Qe,2,1),t&2){let e=n.article;l(e?0:-1)}}var ke=(()=>{class t{constructor(e,i,a,o,h,c){this.route=e,this.apiService=i,this.seo=a,this.schemaService=o,this.adStoreAdo=h,this.cdr=c,this.opinionCardType=_e,this.articleCardType=ue,this.articles=[],this.excludeArticleId$=new F([]),this.isLoadingMore=!1,this.pageIndex=0,this.maxPageIndex=1,this.backendAuthor$=this.route.data.pipe(m(C=>C.data[1])),this.author$=this.route.data.pipe(m(C=>this.mapPublicAuthorDataToArticleAuthor(C.data[1]))),this.publicAuthors$=this.route.data.pipe(m(C=>this.mapPublicAuthors(C.data[2]))),this.destroy$=new R,this.articlesResponse$=this.route.data.pipe(m(C=>C.data[0])),this.environment=ae()}ngOnInit(){this.initAds(),this.route.data.pipe(m(e=>e.data[3]),v(this.destroy$)).subscribe(e=>this.authorSlug=e),this.handleArticleResponse(this.articlesResponse$),this.backendAuthor$.pipe(v(this.destroy$)).subscribe(e=>{let i=M(T({},e),{slug:e?.public_author_name});this.schemaService.removeStructuredData(),this.schemaService.insertSchema(de(i,this.environment?.siteUrl??""))}),this.#e()}ngOnDestroy(){this.destroy$.next(!0)}mapPublicAuthorDataToArticleAuthor(e){return e?.public_author_name?{name:e.public_author_name,description:e.public_author_description,facebook:e.facebook,instagram:e.instagram,tiktok:e.tiktok,avatarUrl:e.avatar.fullSizeUrl,rank:e.rank}:null}mapPublicAuthors(e){return{title:"Munkat\xE1rsaink",coWorkers:e?.map(i=>({name:i.public_author_name??"",isOpinionAuthor:!1,title:i.title??"",avatarUrl:i.avatar?.fullSizeUrl??""}))??[]}}loadMoreResults(){if(this.isLoadingMore||!this.authorSlug)return;this.isLoadingMore=!0;let e=this.apiService.articlesByAuthor(this.authorSlug,this.pageIndex+1).pipe(B(()=>this.isLoadingMore=!1));this.handleArticleResponse(e)}handleArticleResponse(e){e.pipe(E(i=>{this.pageIndex=i?.meta?.limitable?.pageCurrent||0,this.maxPageIndex=i?.meta?.limitable?.pageMax||0}),m(i=>i.data.map(se)),v(this.destroy$)).subscribe(i=>{this.pageIndex===0&&(this.articles=[]),this.articles.push(...i);let a=this.articles.map(o=>o.id).filter(o=>!!o);this.excludeArticleId$.next(a||[])})}initAds(){this.adStoreAdo.advertisemenets$.pipe(v(this.destroy$)).subscribe(e=>{this.adverts=this.adStoreAdo.separateAdsByMedium(e),this.cdr.detectChanges()})}setBreadcrumb(e){this.breadcrumbItems=[{label:"Szerz\u0151ink"},{label:e}];let i=Ce(this.breadcrumbItems,this.environment);this.schemaService.insertSchema(i)}#e(){this.author$.pipe(v(this.destroy$)).subscribe(e=>{this.setBreadcrumb(e?.name);let i=fe(e?.name?`${e.name}
1 cikkei`:"Szerz\u0151 oldal"),a=M(T({},ge),{title:i,ogTitle:i});this.seo.setMetaData(a);let o=pe("szerzo/"+e?.name||"");o&&this.seo.updateCanonicalUrl(o)})}static{this.\u0275fac=function(i){return new(i||t)(g(ne),g(y),g(le),g(re),g(ce),g(ee))}}static{this.\u0275cmp=q({type:t,selectors:[["app-szegedma-public-author-page"]],decls:3,vars:1,consts:[["articleContent",""],[3,"ad","style"],[1,"wrapper"],[3,"items"],[1,"info-wrapper"],[1,"wrapper","wrapper-content"],[3,"data"],[1,"load-more"],[3,"ad"],[3,"data","headingLevel"],[3,"ngTemplateOutletContext","ngTemplateOutlet"],[3,"click"],[1,"icon","icon-arrow-right-orange-600"],[1,"icon","icon-arrow-right-orange-500"],[3,"data","styleID"]],template:function(i,a){i&1&&(r(0,Ne,13,12,"section"),G(1,Ke,1,1,"ng-template",null,0,Z)),i&2&&l(a.articles?0:-1)},dependencies:[me,be,Ae,te,Pe,xe,he,ie],styles:[".info-wrapper[_ngcontent-%COMP%]{margin-bottom:30px}.wrapper-content[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-bottom:16px}.load-more[_ngcontent-%COMP%]{text-align:center;margin-top:20px}.load-more[_ngcontent-%COMP%]:hover .icon-arrow-right-orange-600[_ngcontent-%COMP%]{display:none}.load-more[_ngcontent-%COMP%]:hover .icon-arrow-right-orange-500[_ngcontent-%COMP%]{display:inline-block}.load-more[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{color:var(--kui-orange-500)}.load-more[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--kui-orange-600);font-size:14px;font-weight:500;line-height:normal}.load-more[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .load-more[_ngcontent-%COMP%] .icon-arrow-right-orange-600[_ngcontent-%COMP%], .load-more[_ngcontent-%COMP%] .icon-arrow-right-orange-500[_ngcontent-%COMP%]{transition:.3s all ease-in-out}.load-more[_ngcontent-%COMP%] .icon-arrow-right-orange-500[_ngcontent-%COMP%]{display:none}.load-more[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:18px;height:16px;margin-left:4px;vertical-align:middle}.load-more[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{cursor:pointer}"]})}}return t})();var Te=(()=>{class t{constructor(e,i,a){this.apiService=e,this.router=i,this.redirectService=a}resolve(e){let i=e.params.authorSlug,a=e.queryParams.page?e.queryParams.page-1:0;return j([this.apiService.articlesByAuthor(i,a).pipe(m(o=>(a>0&&o.data.length===0&&this.redirectService.redirectOldUrl(`szerzo/${i}`),o)),A(o=>(this.router.navigate(["/","404"],{state:{errorResponse:JSON.stringify(o)},skipLocationChange:!0}),D(o)))),this.apiService.getPublicAuthors(i).pipe(m(o=>{let h=o.data?.[0];return h||this.router.navigate(["/","404"],{skipLocationChange:!0}),h}),A(()=>x(null))),this.apiService.getInnerAuthors().pipe(m(o=>o.data),A(()=>x(null))),x(i)])}static{this.\u0275fac=function(i){return new(i||t)(S(y),S(oe),S(ve))}}static{this.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _t=[{path:":authorSlug",runGuardsAndResolvers:"paramsOrQueryParamsChange",component:ke,canActivate:[Se],resolve:{data:Te}},{path:"**",redirectTo:"/404"}];
1export{_t as PUBLIC_AUTHOR_ROUTES};
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.