1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b61f2fb9-458e-5a90-b925-971fc0395e1b")}catch(e){}}(); 3import{a as x}from"./chunk-WLSET76Z.js";import{a as K,b as V}from"./chunk-ONPLBNVN.js";import{a as U,b as G}from"./chunk-SZEWURSV.js";import{a as H}from"./chunk-5FRT5L2O.js";import"./chunk-PBZLJUYY.js";import{a as O}from"./chunk-YFOJOKVW.js";import"./chunk-2VI4ORRQ.js";import"./chunk-Y4ADNP33.js";import{e as A}from"./chunk-6XCOANVA.js";import{a as w}from"./chunk-YEB2XRSI.js";import"./chunk-BMMBUQKX.js";import"./chunk-5MFKTJ6A.js";import"./chunk-KXY2OAT2.js";import"./chunk-C6NFY5F6.js";import"./chunk-SNEEGIQC.js";import"./chunk-XER5LAMD.js";import"./chunk-KCPU2OZ4.js";import{$ as j,K as P,Q as R,V as b,X as $,Y as B,_ as M,k as N}from"./chunk-BBWENV76.js";import{$b as C,Dc as W,Ec as m,Fc as f,Gc as T,Ma as L,Rb as c,Rc as y,Tb as d,Tc as z,Ub as E,Wb as I,Xb as S,Yb as _,Zb as l,Zc as F,_b as r,_c as k,cb as v,ib as a,pc as s,rb as u,xb as D}from"./chunk-VH27E7FA.js";import"./chunk-CS7K6LXP.js";var q=e=>({active:e}),J=(e,n)=>n.slug;function Q(e,n){if(e&1&&(l(0,"p",7),m(1),r()),e&2){let t=s(3);a(),f(t.tagIntro)}}function Y(e,n){if(e&1&&(l(0,"span",9),m(1),r()),e&2){let t=s(4);a(),f(t.tagCtaText)}}function Z(e,n){if(e&1&&(l(0,"a",10),m(1),r()),e&2){let t=s(4);_("routerLink",t.getSlug(t.tagCtaLink)),a(),f(t.tagCtaButton)}}function tt(e,n){if(e&1&&(l(0,"div",8),c(1,Y,2,1,"span",9),c(2,Z,2,2,"a",10),r()),e&2){let t=s(3);a(),d(t.tagCtaText?1:-1),a(),d(t.tagCtaButton&&t.tagCtaLink?2:-1)}}function et(e,n){if(e&1&&(l(0,"div",3)(1,"h1",6),m(2),r(),c(3,Q,2,1,"p",7),c(4,tt,3,2,"div",8),r()),e&2){let t=s(2);a(2),f(t.tagTitle),a(),d(t.tagIntro?3:-1),a(),d(t.tagCtaText||t.tagCtaButton&&t.tagCtaLink?4:-1)}}function it(e,n){if(e&1&&C(0,"iizi-img",12),e&2){let t=s().$implicit;_("alt",t.featured_image.alt)("classes","image--full")("src",t.featured_image.src)("extension",t.featured_image.file_extension)("aspectRatio","5x3")("additionalParameters","-c-rw-v1")}}function at(e,n){if(e&1&&C(0,"iizi-img",13),e&2){let t=s().$implicit,i=s(2);_("alt",t.featured_image.alt)("classes","image--full")("src",i.defaultNewsImgUrl)("aspectRatio","5x3")("additionalParameters","-c-rw-v1")}}function nt(e,n){if(e&1&&(l(0,"span",16),m(1),r()),e&2){let t=s().$implicit;a(),f(t.date)}}function ot(e,n){if(e&1&&C(0,"span",17),e&2){let t=s().$implicit;_("innerHtml",t.estimated_reading_time,v)}}function rt(e,n){if(e&1&&(l(0,"a",4)(1,"div",11),c(2,it,1,6,"iizi-img",12)(3,at,1,5,"iizi-img",13),r(),l(4,"div",14)(5,"div",15),c(6,nt,2,1,"span",16),c(7,ot,1,1,"span",17),r(),C(8,"h2",18),l(9,"span",19)(10,"strong"),m(11),F(12,"translate"),r()()()()),e&2){let t=n.$implicit,i=s(2);_("routerLink",i.getSlug("uudised/"+t.slug)),a(2),d(t.featured_image&&t.featured_image.src!==""?2:t.featured_image&&t.featured_image.src===""?3:-1),a(4),d(t.date?6:-1),a(),d(t.estimated_reading_time?7:-1),a(),_("innerHTML",t.title.rendered,v),a(3),T(" ",k(12,6,"Loe edasi")," ")}}function st(e,n){if(e&1&&(l(0,"a",22),m(1),r()),e&2){let t=s().$implicit,i=s(3);W(z(4,q,t===i.page)),_("routerLink",i.tag?i.getSlug("uudised/teemad/"+i.tag+"/"+t):i.getSlug("uudised/"+t)),a(),T(" ",t," ")}}function lt(e,n){e&1&&(l(0,"span",21),m(1),r()),e&2&&(a(),T(" ","..."," "))}function pt(e,n){if(e&1&&c(0,st,2,6,"a",20)(1,lt,2,1,"span",21),e&2){let t=n.$implicit;d(t!==-1?0:1)}}function ct(e,n){if(e&1&&(l(0,"div",5),I(1,pt,2,1,null,null,E),r()),e&2){let t=s(2);a(),S(t.pagination)}}function dt(e,n){if(e&1&&(l(0,"iizi-section",2)(1,"iizi-container"),c(2,et,5,3,"div",3),I(3,rt,13,8,"a",4,J),c(5,ct,3,0,"div",5),r()()),e&2){let t=s();_("topGutter","header")("bottomGutter","none"),a(2),d(t.isFirstPage&&t.tagTitle?2:-1),a(),S(t.newsData),a(2),d(t.pagination.length>0?5:-1)}}function gt(e,n){e&1&&C(0,"iizi-error")}var Pt=(()=>{class e{localize;route;translate;wpNewsService;seo;platformId;slug="";notFound=!1;tag="";paginationData;currentLang="";modules=[];newsData=[];date="";lead="";pagination=[];page=1;seoTitle="";seoDescription="";headerImage="";defaultNewsImgUrl="";tagTitle="";tagIntro="";tagCtaText="";tagCtaButton="";tagCtaLink="";get isFirstPage(){return this.page===1}constructor(t,i,o,p,g,h){this.localize=t,this.route=i,this.translate=o,this.wpNewsService=p,this.seo=g,this.platformId=h,this.getTagData(!0),N(this.platformId)&&this.getTagData(),this.localize.parser.currentLang!=="et"?this.currentLang=this.localize.parser.currentLang:this.currentLang="",w.defaultNewsImageUrl&&(this.defaultNewsImgUrl=w.defaultNewsImageUrl)}getSlug(t){return j.getSlug(t,this.localize)}generatePagination(){let t=[],i=0,o=0;if(this.paginationData.page<=3||this.paginationData.total_pages<=5)i=1,o=this.paginationData.total_pages<=5?this.paginationData.total_pages:5;else{let p=this.paginationData.page+1;o=p<=this.paginationData.total_pages?p:this.paginationData.total_pages,i=o-2}i>1&&(t.push(1),i>2&&t.push(-1));for(let p=i;p<=o;p++)t.push(p);return o+1<=this.paginationData.total_pages&&(o+2<=this.paginationData.total_pages&&t.push(-1),t.push(this.paginationData.total_pages)),t}getTagTranslation(t){if(!this.tag)return"";let i=`NEWS.TAG.${this.tag.toUpperCase()}.${t}`,o=this.translate.instant(i);return!o||o.includes("NEWS.TAG.")?"":o}updateTagContent(){this.tagTitle=this.getTagTranslation("TITLE"),this.tagIntro=this.getTagTranslation("INTRO"),this.tagCtaText=this.getTagTranslation("CTA_TEXT"),this.tagCtaButton=this.getTagTranslation("CTA_BUTTON"),this.tagCtaLink=this.getTagTranslation("CTA_LINK"),this.tagTitle&&this.seo.updateMetaTags(this.tagTitle,this.tagIntro||this.tagTitle,K.Page)}getTagData(t=!1){this.route.params.subscribe(i=>{this.tag="",i.tag&&(this.tag=i.tag),i.page&&(this.page=parseInt(i.page)),this.updateTagContent(),this.wpNewsService.getTagData(this.tag,10,this.page,t).subscribe(o=>{if(o&&o.data.length>0?(this.notFound=!1,this.newsData=o.data,this.paginationData=(({page:p,per_page:g,total:h,total_pages:X})=>({page:p,per_page:g,total:h,total_pages:X}))(o),this.pagination=this.generatePagination()):this.notFound=!0,this.newsData){let p={year:"numeric",month:"long",day:"numeric"};this.newsData.forEach(g=>{g.date.includes("-")&&(this.currentLang!==""?g.date=new Date(g.date).toLocaleStr
3ing(this.currentLang,p):g.date=new Date(g.date).toLocaleString("et-EE",p))})}})},()=>{this.modules=[]})}static \u0275fac=function(i){return new(i||e)(u(A),u(P),u($),u(x),u(V),u(L))};static \u0275cmp=D({type:e,selectors:[["iizi-wp-tags"]],features:[y([x])],decls:4,vars:1,consts:[[1,"page-layout"],[1,"page-layout__body","page-layout__body--news"],[1,"news-list",3,"topGutter","bottomGutter"],[1,"news-list__tag-header"],[1,"news-list__item",3,"routerLink"],[1,"news-list__pagination"],[1,"tag-header__title"],[1,"tag-header__intro"],[1,"tag-header__cta"],[1,"tag-cta__text"],[1,"tag-cta__button",3,"routerLink"],[1,"item__image"],[3,"alt","classes","src","extension","aspectRatio","additionalParameters"],[3,"alt","classes","src","aspectRatio","additionalParameters"],[1,"item__text"],[1,"text__meta"],[1,"meta__date"],[3,"innerHtml"],[3,"innerHTML"],[1,"text__read-more"],[1,"pagination__item",3,"class","routerLink"],[1,"pagination__item","disabled"],[1,"pagination__item",3,"routerLink"]],template:function(i,o){i&1&&(l(0,"div",0)(1,"div",1),c(2,dt,6,4,"iizi-section",2)(3,gt,1,0,"iizi-error"),r()()),i&2&&(a(2),d(o.notFound?3:2))},dependencies:[U,O,H,b,R,G,M,B],encapsulation:2})}return e})();export{Pt as WpTagsComponent}; 4 5//# debugId=b61f2fb9-458e-5a90-b925-971fc0395e1b
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.