PageSourceSearch

https://members.pipacampaign.org/3355.7a22ddfd0aa3ef07.js

js pipacampaign.org collected 2026-10-02 17:40:44 UTC 133,404 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkVeryConnect=self.webpackChunkVeryConnect||[]).push([[3355],{1730:(mt,$,o)=>{o.d($,{$:()=>U});var n=o(92194),p=o(5296),i=o(9803),c=o(6281),Z=o(89969),L=o(70840),w=o(14026),C=o(52805);const b=Symbol("NgControl");let U=(()=>{class A{constructor(x){this.autofix=!0,this.out$=new i.X(0),this._maxLength=new i.X(null),this[b]=x}set maxlength(x){if(isNaN(x))null!==this._maxLength.value&&this._maxLength.next(null);else{const B=parseInt(x);B!==this._maxLength.value&&this._maxLength.next(B)}}ngOnDestroy(){this.out$.complete(),this._maxLength.complete(),this._valueSub?.unsubscribe(),this._maxLengthSub?.unsubscribe()}ngOnInit(){const x=this[b].control;x&&(this._valueSub=(0,L.observeControlValue)(x).subscribe(B=>{this.out$.next(B&&"number"==typeof B.length?B.length:0)}),this._maxLengthSub=(0,c.a)([this.out$,this._maxLength]).pipe((0,Z.b)(([B,R])=>{if(this.autofix&&null!==R&&B>R){const W=x.value;"string"==typeof W?x.setValue(W.slice(0,Math.max(0,R))):Array.isArray(W)&&x.setValue(W.slice(0,R))}}),(0,p.H)("[CharCountDirective.maxLengthSub]")).subscribe(n.V))}}return A.\u0275fac=function(x){return new(x||A)(w.Y36(C.a5))},A.\u0275dir=w.lG2({type:A,selectors:[["","tgCharCount","","formControl",""],["","tgCharCount","","formControlName",""],["","tgCharCount","","ngModel",""]],inputs:{autofix:["charCountAutofix","autofix"],maxlength:"maxlength"},outputs:{out$:"tgCharCount"},exportAs:["char-count"]}),A})()},75776:(mt,$,o)=>{o.d($,{F:()=>A});var n=o(52805),p=o(15859),i=o(59535),Z=(o(1730),o(14026));let w=(()=>{class I{}return I.\u0275fac=function(B){return new(B||I)},I.\u0275mod=Z.oAB({type:I}),I.\u0275inj=Z.cJS({}),I})();var C=o(31914);o(71839);let A=(()=>{class I{}return I.\u0275fac=function(B){return new(B||I)},I.\u0275mod=Z.oAB({type:I}),I.\u0275inj=Z.cJS({imports:[p.GlobalModule,n.u5,C.a,w,i.W]}),I})()},71839:(mt,$,o)=>{o.d($,{Q:()=>yt});var n=o(14026),p=o(52805),i=o(54756),c=o(97482),Z=o(92362),L=o(43112),w=o(64177),C=o(61225),b=o(85868),U=o(3279),A=o(1730),I=o(662),x=o(5296),B=o(88886),R=o(6281),W=o(25336),O=o(10067),P=o(3811),v=o(70840),F=o(8194),N=o(75143),et=o(16354);function H(X,st){if(1&X){const y=n.EpF();n.TgZ(0,"button",2),n.NdJ("click",function(){const G=n.CHM(y).$implicit,rt=n.oxw(2);return n.KtG(rt.onSelect.next(G))}),n._UZ(1,"tg-user-name",3),n.qZA()}if(2&X){const y=st.$implicit;n.xp6(1),n.Q6J("user",y)}}function ct(X,st){if(1&X&&(n.ynx(0),n.YNc(1,H,2,1,"button",1),n.BQk()),2&X){const y=n.oxw();n.xp6(1),n.Q6J("ngForOf",y.users)}}let dt=(()=>{class X{constructor(y,J){this.cdr=y,this.userSvc=J,this.onSelect=new F.x}get users(){return this._users}set users(y){this._users=y,this.cdr.markForCheck()}ngOnDestroy(){this.onSelect.complete()}}return X.\u0275fac=function(y){return new(y||X)(n.Y36(n.sBO),n.Y36(N.KD))},X.\u0275cmp=n.Xpm({type:X,selectors:[["tg-mentions-select"]],hostVars:2,hostBindings:function(y,J){2&y&&n.ekj("list-group",!0)},decls:1,vars:1,consts:[[4,"ngIf"],["class","list-group-item","type","button",3,"click",4,"ngFor","ngForOf"],["type","button",1,"list-group-item",3,"click"],[3,"user"]],template:function(y,J){1&y&&n.YNc(0,ct,2,1,"ng-container",0),2&y&&n.Q6J("ngIf",null==J.users?null:J.users.length)},dependencies:[w.sg,w.O5,et.j],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),X})();var z=o(47528),lt=o(33043);const Q=/@(\w+)$/;let nt=(()=>{class X{constructor(y,J,Y,G,rt){this.$ctrl=y,this.newsCfg=J,this.userRes=Y,this.dom=G,this.el=rt.nativeElement}set parseMentions(y){this.appendTo=function ft(X){return Boolean(X?.appendChild)}(y)?y:y.nativeElement}get parseMentions(){return this.appendTo}set users(y){this.selectRef.instance.users=y}ngOnDestroy(){this._mentionSub&&(this._mentionSub.unsubscribe(),this._selectSub.unsubscribe(),this.selectRef.destroy())}ngOnInit(){if(!this.appendTo)throw new Error("Output container not given for MentionsDirective");if(!this.$ctrl.control)throw new Error("Unable to resolve form control");this.ctrl=this.$ctrl.control,this.initMentionsOutlet(),this.initMentionsSub()}initMentionsOutlet(){this.selectRef=this.dom.appendComponent(dt,this.appendTo),this._selectSub=this.selectRef.instance.onSelect.subscribe(y=>{this.selectMentionedUser(y),this.users=null})}initMentionsSub(){this._mentionSub=(0,R.a)([(0,v.observeControlValue)(this.ctrl),this.newsCfg.latest("mentions")]).pipe((0,O.b)(250),(0,P.w)(([y,J])=>{if(y&&J){const Y=this.el.selectionStart;if(null!==Y&&(this.mentionMatch=y.slice(0,Math.max(0,Y)).match(Q),this.mentionMatch))return this.userRes.query({cache:B.h4.preferred(),params:{limit:20,name:this.mentionMatch[1]}})}return(0,W.of)([])}),(0,x.H)("[MentionsDirective.initMentionsSub]")).subscribe((0,I.e)(y=>{this.users=y}))}selectMentionedUser(y){const J=this.mentionMatch.input;if(J){const Y=J.lastIndexOf(this.mentionMatch[0]),G=J.slice(0,Math.max(0,Y)),rt=`@${y.blog_name}`,u=(this.ctrl.value||"").slice(J.length);
1this.ctrl.setValue(`${G}${rt}${u}`);const f=`${G}${rt}`.length;this.el.focus(),this.el.setSelectionRange(f,f)}}}return X.\u0275fac=function(y){return new(y||X)(n.Y36(p.a5),n.Y36(L.t),n.Y36(z.q),n.Y36(lt.v),n.Y36(n.SBq))},X.\u0275dir=n.lG2({type:X,selectors:[["","ngModel","","parseMentions",""],["","formControl","","parseMentions",""],["","formControlName","","parseMentions",""]],inputs:{parseMentions:"parseMentions"}}),X})();var Tt=o(37666),vt=o(39805),t=o(64683);const Ot=["textarea"],Mt=["*"];let yt=(()=>{class X extends Z.k{constructor(y){super(),this.newsCfg=y,this.buttonLabel="",this.charCount=0,this.charCountClass="base",this.maxLength=250,this.mentionsEnabled=!1,this.onSubmit=new n.vpe}get charsRemaining(){return Math.max(0,this.maxLength-this.charCount)}blur(){this.textarea.nativeElement.blur()}ngOnChanges(y){y.userMaxLength&&("number"!=typeof this.userMaxLength&&(console.warn("Expected maxlength to be a number @ TgTextareaComponent, received",this.userMaxLength),this.userMaxLength=void 0),this.refreshMaxLength())}ngOnDestroy(){this.onSubmit.complete()}ngOnInit(){this.newsCfg.latest().subscribe(y=>{this.cfgMaxLength=y.inputMaxLength,this.mentionsEnabled=y.mentions,this.refreshMaxLength(),this.cdr.markForCheck()})}onCharCountChange(y){this.charCount=y,this.refreshCharCountClass()}toCharCountPlaceholder(y){return{n:y}}refreshCharCountClass(){const y=this.charCount/this.maxLength;this.charCountClass=y>=.75?"text-danger":y>=.5?"text-warning":"base"}refreshMaxLength(){this.maxLength=this.userMaxLength??this.cfgMaxLength??250,this.refreshCharCountClass()}}return X.\u0275fac=function(y){return new(y||X)(n.Y36(L.t))},X.\u0275cmp=n.Xpm({type:X,selectors:[["tg-textarea"]],contentQueries:function(y,J,Y){if(1&y&&n.Suo(Y,i.A,5),2&y){let G;n.iGM(G=n.CRH())&&(J.hasExtraButtons=G.first)}},viewQuery:function(y,J){if(1&y&&n.Gf(Ot,5),2&y){let Y;n.iGM(Y=n.CRH())&&(J.textarea=Y.first)}},inputs:{buttonLabel:"buttonLabel",placeholder:"placeholder",userMaxLength:["maxlength","userMaxLength"]},outputs:{onSubmit:"submit"},exportAs:["tgTextarea"],features:[n._Bn([{provide:c.z,useValue:"tgTextarea"},{multi:!0,provide:p.JU,useExisting:(0,n.Gpc)(()=>X)}]),n.qOj,n.TTD],ngContentSelectors:Mt,decls:19,vars:26,consts:[[1,"form-control",3,"ngModel","ngModelOptions","disabled","maxlength","tgConsumeControlId","required","tg-textarea-autogrow","placeholder","parseMentions","ngModelChange","blur.passive","tgCharCount"],["mod","ngModel","textarea",""],["mentionsContainer",""],[1,"underbox","mt"],[1,"charcount",3,"ngClass"],["type","button",1,"tg-feedinput-btn","btn","btn-sm","btn-primary",3,"disabled","click"],[1,"fa","fa-commenting-o"]],template:function(y,J){if(1&y&&(n.F$t(),n.TgZ(0,"textarea",0,1),n.NdJ("ngModelChange",function(G){return J.onChange(G)})("blur.passive",function(){return J.onTouch()})("tgCharCount",function(G){return J.onCharCountChange(G)}),n.ALo(3,"tr"),n.qZA(),n._UZ(4,"div",null,2),n.TgZ(6,"div",3)(7,"small",4),n._uU(8),n.ALo(9,"applyTrPlaceholders"),n.ALo(10,"translateCount"),n.ALo(11,"tr"),n.qZA(),n.TgZ(12,"div"),n.Hsn(13),n.TgZ(14,"button",5),n.NdJ("click",function(G){return J.onSubmit.emit(G)}),n.TgZ(15,"span"),n._uU(16),n.ALo(17,"tr"),n.qZA(),n._UZ(18,"i",6),n.qZA()()()),2&y){const Y=n.MAs(1),G=n.MAs(5);n.Q6J("ngModel",J.value)("ngModelOptions",J.MODEL_OPTS)("disabled",J.disabled)("maxlength",J.maxLength)("tgConsumeControlId","id")("required",!0)("placeholder",J.placeholder||n.lcZ(3,14,"placeholder"))("parseMentions",G),n.xp6(4),n.ekj("mt",J.mentionsEnabled),n.xp6(3),n.Q6J("ngClass",J.charCountClass),n.xp6(1),n.Oqu(n.xi3(9,16,n.xi3(10,19,n.lcZ(11,22,"charsLeft"),J.charsRemaining),J.toCharCountPlaceholder(J.charsRemaining))),n.xp6(6),n.Q6J("disabled",Y.control.invalid),n.xp6(2),n.Oqu(J.buttonLabel||n.lcZ(17,24,"share"))}},dependencies:[w.mk,C.c,b.G,p.Fj,p.JJ,p.Q7,p.nD,p.On,U.R,A.$,nt,Tt.d,vt.v,t.H],styles:['.underbox[_ngcontent-%COMP%], [_nghost-%COMP%]{display:flex;flex:1 0 auto}[_nghost-%COMP%]{flex-direction:column}.mt[_ngcontent-%COMP%]{margin-top:4px}.underbox[_ngcontent-%COMP%]{align-items:center;flex-direction:row;flex-wrap:wrap;justify-content:space-between}
1.charcount.base[_ngcontent-%COMP%]{color:#777}.tg-feedinput-btn[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:after{content:" "}textarea.form-control.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#ccc!important}'],changeDetection:0}),X})()},7311:(mt,$,o)=>{o.d($,{s:()=>L});var n=o(15859),p=o(25275),c=(o(79838),o(14026));let L=(()=>{class w{}return w.\u0275fac=function(b){return new(b||w)},w.\u0275mod=c.oAB({type:w}),w.\u0275inj=c.cJS({imports:[p.FallbackImageModule,n.GlobalModule]}),w})()},79838:(mt,$,o)=>{o.d($,{g:()=>O});var n=o(14026),p=o(9803);const i=o.p+"images/black_background_640x360.13f434160cbbd55f.png",c=o.p+"images/video_default_thumbnail_640x360.1f3b621b2fb90620.png";var Z=o(97482),L=o(83375),w=o(3973),C=o(25282),b=o(94953),U=o(64177),A=o(85868),I=o(64683);function x(P,v){if(1&P&&n._UZ(0,"iframe",5),2&P){const F=n.oxw();n.Q6J("src",F.embedUrl,n.uOi)}}function B(P,v){1&P&&(n.TgZ(0,"div",6),n.ALo(1,"tr"),n._UZ(2,"i",7),n.qZA()),2&P&&n.uIk("aria-label",n.lcZ(1,1,"play"))}const R=Symbol("sub"),W=[c];let O=(()=>{class P{constructor(F,N,et){this.cdr=F,this.san=N,this.videoSvc=et,this.onClick=new n.vpe,this.preferredUrls=[i],this.showImageChange=new n.vpe,this.overrideClick=!1,this.url$=new p.X(void 0)}get url(){return this.url$.value}set url(F){F!==this.url$.value&&(this.url$.next(F),this.setVideoData())}ngOnDestroy(){(0,L.completeAll)(this.onClick,this.showImageChange,this.url$),this[R]?.unsubscribe()}ngOnInit(){void 0!==this.showImage?this.overrideClick=!0:this.showImage=!0}changeToVideo(F){this.overrideClick||(this.showImage=!1,this.showImageChange.emit(!1)),this.onClick.emit(F)}setVideoData(){this.embedUrl=this.san.bypassSecurityTrustResourceUrl(this.videoSvc.getAutoplayUrl(this.url));const F=this.videoSvc.getSnapshot(this.url);F?this[R]=F.subscribe(N=>{this.preferredUrls=N.length?N:W,this.cdr.markForCheck()}):(this.preferredUrls=W,this.cdr.markForCheck())}}return P.\u0275fac=function(F){return new(F||P)(n.Y36(n.sBO),n.Y36(w.H7),n.Y36(C.k))},P.\u0275cmp=n.Xpm({type:P,selectors:[["tg-video-display"]],inputs:{showImage:"showImage",url:"url"},outputs:{onClick:"onClick",showImageChange:"showImageChange"},features:[n._Bn([{provide:Z.z,useValue:"videoDisplay"}])],decls:5,vars:3,consts:[[1,"video-container",3,"click"],["loading","lazy",1,"img-responsive","video-image",3,"tgFallbackImage"],["img",""],["class","embed-responsive","allowFullscreen","",3,"src",4,"ngIf"],["class","video-button","role","button",4,"ngIf"],["allowFullscreen","",1,"embed-responsive",3,"src"],["role","button",1,"video-button"],[1,"fa","fa-youtube-play","fa-4x"]],template:function(F,N){1&F&&(n.TgZ(0,"div",0),n.NdJ("click",function(H){return N.changeToVideo(H)}),n._UZ(1,"img",1,2),n.YNc(3,x,1,1,"iframe",3),n.YNc(4,B,3,3,"div",4),n.qZA()),2&F&&(n.xp6(1),n.Q6J("tgFallbackImage",N.preferredUrls),n.xp6(2),n.Q6J("ngIf",!N.showImage&&N.embedUrl),n.xp6(1),n.Q6J("ngIf",N.showImage))},dependencies:[b.Q,U.O5,A.G,I.H],styles:["[_nghost-%COMP%]{display:block}.video-container[_ngcontent-%COMP%]{cursor:pointer;display:block;position:relative}.video-container[_ngcontent-%COMP%]:hover   .video-button[_ngcontent-%COMP%]{color:#337ab7}.video-button[_ngcontent-%COMP%]{color:#fff;left:50%;margin-left:-2em;margin-top:-2em;position:absolute;top:50%}.video-image[_ngcontent-%COMP%]{width:100%}.embed-responsive[_ngcontent-%COMP%]{border:0;bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.embed-responsive.embed-responsive-16by9[_ngcontent-%COMP%]{padding-bottom:0}"],changeDetection:0}),P})()},59535:(mt,$,o)=>{o.d($,{W:()=>c});var n=o(15859),p=o(86458),i=o(14026);let c=(()=>{class Z{}return Z.\u0275fac=function(w){return new(w||Z)},Z.\u0275mod=i.oAB({type:Z}),Z.\u0275inj=i.cJS({imports:[n.GlobalModule,p.z]}),Z})()},54646:(mt,$,o)=>{o.d($,{U:()=>i});var n=o(14026),p=o(60611);let i=(()=>{class c{constructor(L){this.routing=L}transform(L,w){let C=L;if(C&&Array.isArray(w)&&w.length)for(const b of w)C=C.replace(new RegExp(`@${b.blog_name}`,"g"),`<a href="${this.href(b)}">@${b.firstname||""} ${b.lastname||""}</a>`);return C}href(L){return this.routing.href("addressbook.profile",{userId:L.id})}}return c.\u0275fac=function(L){return new(L||c)(n.Y36(p.Z,16))}
1,c.\u0275pipe=n.Yjl({name:"tgUserMentions",type:c,pure:!0}),c})()},25817:(mt,$,o)=>{o.d($,{Z:()=>A});var n=o(16733),p=o(5296),i=o(25336),c=o(3811),Z=o(56625),L=o(42809),w=o(12500),C=o(14026),b=o(13913),U=o(88886);let A=(()=>{class I{constructor(B,R){this.http=B,this.cache=R}hasUrl(B){return!(!B||"string"!=typeof B)&&w.URL_REGEX.test(B)}resolve(B){if(!B)return(0,i.of)(null);const R=B.match(w.URL_REGEX);if(!R?.length)return(0,i.of)(null);const W="MetaInfoService",O=(new TextEncoder).encode(R[0]).buffer;return this.cache.get(W,O).pipe((0,c.w)(P=>P?(0,i.of)(P):this.http.get("/api/v1/metainfo",{params:{url:R[0]}}).pipe((0,Z.Z)(),(0,n.d)(v=>this.cache.set(W,O,v)))),(0,p.H)(`[MetaInfoSvc.resolve(${B})]`),(0,L.d)(1))}}return I.\u0275fac=function(B){return new(B||I)(C.LFG(b.eN),C.LFG(U.OU))},I.\u0275prov=C.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"}),I})()},34270:(mt,$,o)=>{o.d($,{M:()=>G});var n=o(64762),p=o(662),i=o(5296),c=o(14026),Z=o(40921),L=o(23055),w=o(8194),C=o(9803),b=o(6281),U=o(56625),A=o(85597),I=o(42809),x=o(75372),B=o(10067),R=o(3811),W=o(50725),O=o(87563),P=o(71963),v=o(21250),F=o(83375),N=o(70840),et=o(51248),H=o(52805),ct=o(19807),dt=o(43112),z=o(25817),lt=o(40128),Q=o(71839),nt=o(95612),ft=o(46477),Tt=o(99492),vt=o(64177),t=o(72064),Ot=o(47302),Mt=o(64683);const yt=["attachBtn"];function X(u,f){if(1&u){const m=c.EpF();c.ynx(0),c.TgZ(1,"tg-feedentities",9),c.NdJ("entityRemoved",function(at){c.CHM(m);const pt=c.oxw(3);return c.KtG(pt.entityRemoved(at))}),c.qZA(),c.BQk()}if(2&u){const m=c.oxw().ngIf;c.xp6(1),c.Q6J("editable",!0)("entities",m)}}function st(u,f){if(1&u&&(c.ynx(0),c.YNc(1,X,2,2,"ng-container",7),c.BQk()),2&u){const m=f.ngIf;c.xp6(1),c.Q6J("ngIf",m.length)}}function y(u,f){if(1&u){const m=c.EpF();c.TgZ(0,"tg-upload-outlet",1,2)(2,"tg-upload-drop-outlet")(3,"tg-textarea",3,4),c.NdJ("submit",function(){c.CHM(m);const at=c.oxw();return c.KtG(at.postComment())})("keydown.enter",function(){c.CHM(m);const at=c.MAs(4),pt=c.oxw();return c.KtG(pt.dispatchEnter.next(at))}),c.ALo(5,"tr"),c.ALo(6,"tr"),c.Hsn(7),c._UZ(8,"tg-feedinput-attach-btn",5,6),c.qZA(),c.YNc(10,st,2,1,"ng-container",7),c.ALo(11,"async"),c._UZ(12,"tg-upload-progress",8),c.qZA()()}if(2&u){const m=c.oxw();c.Q6J("formGroup",m.commentForm),c.xp6(2),c.Q6J("@fadeInOnEntry",void 0)("@fadeOutOnExit",void 0),c.xp6(1),c.Q6J("maxlength",m.maxlength)("placeholder",c.xi3(5,10,"comment",m.ns))("required",!0)("buttonLabel",c.xi3(6,13,m.comment?"save":"comment",m.ns)),c.xp6(5),c.Q6J("formControlName","entities"),c.xp6(2),c.Q6J("ngIf",c.lcZ(11,16,m.entities$)),c.xp6(2),c.Q6J("autoClear",!0)}}const J=[[["","tgFeedInputButton",""]]];class G{constructor(f,m,E,at,pt,At){this.fb=f,this.alertSvc=m,this.cdr=E,this.newsCfg=at,this.metaInfoSvc=pt,this.newsRes=At,this.dispatchEnter=new w.x,this.ns="newsfeed",this.subscriptions=[],this._subjs=[this.editEnd$=new c.vpe(!0),this.comment$=new C.X(null)],this._destroyed$=this.comment$.pipe((0,U.Z)())}get comment(){return this.comment$.value}set comment(f){this.comment$.next(f)}
1get commentForm(){let f;return f=this.comment?{entities:this.fb.control(this.comment.entities),message:this.comment.message}:{entities:this.fb.control([]),message:""},this.fb.group(f)}get entities$(){return(0,N.observeControlValue)(this.commentForm.controls.entities).pipe((0,A.R)(this._destroyed$),(0,I.d)(1))}get formattedPayload(){const f={id:this.postId,...this.commentForm.value};return this.comment&&(f.comment_id=this.comment.id),f}entityRemoved(f){const m=this.commentForm.controls.entities,E=[...m.value],at=E.splice(f,1)[0];m.setValue(E),Promise.resolve().then(()=>{this.attachBtn.removeFile(at)})}ngOnDestroy(){(0,et.unsubscribeFromAll)(this.subscriptions),(0,F.completeAll)(...this._subjs)}ngOnInit(){this.subscriptions.push((0,b.a)([this.dispatchEnter,this.newsCfg.latest("submitOnEnter")]).pipe((0,x.h)(([,f])=>f),(0,i.H)("[FeedCommentInput.postCommentSource]")).subscribe((0,p.e)(([f])=>{this.postComment(),f.blur()})),this.initUrlObservable().subscribe((0,p.e)(f=>{this.commentForm.patchValue({entities:f})})),this.newsCfg.latest("inputMaxLength").subscribe(f=>{this.maxlength=f,this.cdr.markForCheck()}))}postComment(){this.newsRes.comment((0,L.Z)(this.formattedPayload)).subscribe({error:()=>{this.alertSvc.alertError({key:this.comment?"commentEditFail":"commentPostFail",ns:"newsfeed"})},next:()=>{this.alertSvc.alertSuccess({key:this.comment?"commentEdited":"commentPosted",ns:"newsfeed"});const f=this.commentForm.controls;f.message.reset(""),f.entities.reset([]),this.attachBtn.reset(),this.comment&&this.editEnd$.emit(1),f.message.markAsPristine(),f.message.markAsUntouched(),f.message.updateValueAndValidity(),this.cdr.markForCheck()}})}initUrlObservable(){return this.commentForm.controls.message.valueChanges.pipe((0,B.b)(250),(0,x.h)(f=>this.metaInfoSvc.hasUrl(f)),(0,R.w)(f=>this.metaInfoSvc.resolve(f)),(0,W.U)(f=>{const m=(this.commentForm.value.entities||[]).filter(rt);if(f){const E={description:f.description,domain:f.domain,image:f.image,name:f.name,type:"url",url:f.url};return[...m,E]}return m}),(0,O.K)((f,m)=>((0,i.Ed)(f)||console.error("[FeedCommentInput.url]",f),m)))}}function rt(u){return"url"!==u.type}G.\u0275fac=function(f){return new(f||G)(c.Y36(H.QS),c.Y36(ct.c),c.Y36(c.sBO),c.Y36(dt.t),c.Y36(z.Z),c.Y36(lt.r))},G.\u0275cmp=c.Xpm({type:G,selectors:[["tg-feed-comment-input"]],viewQuery:function(f,m){if(1&f&&c.Gf(yt,5),2&f){let E;c.iGM(E=c.CRH())&&(m.attachBtn=E.first)}},inputs:{postId:"postId",comment:"comment"},outputs:{editEnd$:"editEnd"},ngContentSelectors:["[tgFeedInputButton]"],decls:1,vars:1,consts:[[3,"formGroup",4,"ngIf"],[3,"formGroup"],["up","tg-upload-outlet"],["formControlName","message",3,"maxlength","placeholder","required","buttonLabel","submit","keydown.enter"],["tgTextarea","tgTextarea"],[1,"tg-feedinput-btn",3,"formControlName"],["attachBtn","feedinput-attach-btn"],[4,"ngIf"],[3,"autoClear"],[3,"editable","entities","entityRemoved"]],template:function(f,m){1&f&&(c.F$t(J),c.YNc(0,y,13,18,"tg-upload-outlet",0)),2&f&&c.Q6J("ngIf",m.maxlength)},dependencies:[Q.Q,nt.O,ft.u,Tt.U,vt.O5,H.JJ,H.JL,H.Q7,H.nD,H.sg,H.u,t.V,Ot.u,vt.Ov,Mt.H],encapsulation:2,data:{animation:[P.A,v.g]},changeDetection:0}),(0,n.gn)([(0,Z.a)()],G.prototype,"commentForm",null),(0,n.gn)([(0,Z.a)()],G.prototype,"entities$",null)},72064:(mt,$,o)=>{o.d($,{V:()=>rt});var n=o(14026),p=o(71963),i=o(21250),c=o(97482),Z=o(8592),w=o(74831),C=o(64177),b=o(85868),U=o(5830),A=o(50339),I=o(85579),x=o(75427);function B(u,f){if(1&u){const m=n.EpF();n.TgZ(0,"img",1),n.NdJ("click",function(){n.CHM(m);const at=n.oxw();return n.KtG(at.openLightbox())}),n.qZA()}if(2&u){const m=n.oxw();n.Q6J("src",m.entity.image,n.LSH)}}let R=(()=>{class u extends I.d{constructor(m){super(),this.lightbox=m}openLightbox(){this.lightbox.open(this.entity,this.neighbourEntities)}}return u.\u0275fac=function(m){return new(m||u)(n.Y36(x.y))},u.\u0275cmp=n.Xpm({type:u,selectors:[["tg-feedentity-image"]],features:[n.qOj],decls:1,vars:1,consts:[["class","center-block","loading","lazy",3,"src","click",4,"ngIf"],["loading","lazy",1,"center-block",3,"src","click"]],template:function(m,E){1&m&&n.YNc(0,B,1,1,"img",0),2&m&&n.Q6J("ngIf",null==E.entity?null:E.entity.image)},dependencies:[C.O5],styles:["img[_ngcontent-%COMP%]{cursor:pointer;display:block;max-width:100%}"],changeDetection:0}),u})();var W=o(44922),O=o(83732);function P(u,f){if(1&u){const m=n.EpF();n.TgZ(0,"img",8,9),n.NdJ("load",function(){n.CHM(m);const at=n.MAs(1),pt=n.oxw(2);return n.KtG(pt.onImgLoaded(at))}),n.qZA()}if(2&u){const m=n.oxw(2);n.Q6J("src",m.entity.image,n.LSH)}}function v(u,f){if(1&u&&n._UZ(0,"img",10),2&u){const m=n.oxw(2);n.Q6J("src",m.entity.image,n.LSH)}}function F(u,f){if(1&u&&(n.TgZ(0,"p"),n._uU(1),n.qZA()),2&u){const m=n.oxw(2);n.xp6(1),n.Oqu(m.entity.description)}}function N(u,f){1&u&&(n.TgZ(0,"span"),n._uU(1,"\xa0-\xa0"),n.qZA())}function et(u,f){if(1&u&&(n.TgZ(0,"div",1),n.YNc(1,P,2,1,"img",2),n.TgZ(2,"div",3)(3,"a",4),n.YNc(4,v,1,1,"img",5),n.qZA()(),n.TgZ(5,"div",3)(6,"strong"),n._uU(7),n.qZA(),n.YNc(8,F,2,1,"p",6),n.YNc(9,N,2,0,"ng-template",null,7,n.W1O),n.TgZ(11,"a",4),n._uU(12),n.qZA()()()),2&u){const m=n.MAs(10),E=n.oxw();n.xp6(1),n.Q6J("ngIf",E.entity.image&&!E.imgLoaded),n.xp6(1),n.Q6J("ngClass",E.classTop),n.xp6(1),n.Q6J("href",E.entity.url,n.LSH),n.xp6(1),n.Q6J("ngIf",E.imgLoaded),n.xp6(1),n.Q6J("ngClass",E.classBottom),n.xp6(2),n.Oqu(E.entity.name),n.xp6(1),n.Q6J("ngIf",E.entity.description)("ngIfElse",m),n.xp6(3),n.Q6J("href",E.entity.url,n.LSH),n.xp6(1),n.Oqu(E.entity.domain)}}let H=(()=>{class u extends O.x{constructor(){super(),this.imgLoaded=!1,this.isSmall=!1,this.refreshClasses()}ngOnChanges(m){m.entity&&(this.imgLoaded=this.isSmall=!1,this.refreshClasses())}
1onImgLoaded(m){this.isSmall=m.naturalWidth<600||m.naturalHeight<315,this.imgLoaded=!0}refreshClasses(){this.isSmall?(this.classBottom="col-xs-8",this.classTop="col-xs-4"):this.classBottom=this.classTop="col-xs-12"}}return u.\u0275fac=function(m){return new(m||u)},u.\u0275cmp=n.Xpm({type:u,selectors:[["tg-feedentity-url"]],features:[n.qOj,n.TTD],decls:1,vars:1,consts:[["class","row",4,"ngIf"],[1,"row"],["class","loading-img","loading","lazy",3,"src","load",4,"ngIf"],[3,"ngClass"],["rel","noopener","target","_blank",3,"href"],["class","newsfeed-img","loading","lazy",3,"src",4,"ngIf"],[4,"ngIf","ngIfElse"],["noDesc",""],["loading","lazy",1,"loading-img",3,"src","load"],["loadingImg",""],["loading","lazy",1,"newsfeed-img",3,"src"]],template:function(m,E){1&m&&n.YNc(0,et,13,10,"div",0),2&m&&n.Q6J("ngIf",E.entity)},dependencies:[C.mk,C.O5,A.k],styles:[".newsfeed-img[_ngcontent-%COMP%]{display:block;max-width:100%}.loading-img[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),u})();var ct=o(56721),dt=o(52946),z=o(8103);const lt=function(u,f){return[u,f]};function Q(u,f){if(1&u&&(n.TgZ(0,"div",1)(1,"div",2),n._UZ(2,"div",3),n.TgZ(3,"a",4),n._uU(4),n.qZA()()()),2&u){const m=n.oxw();n.xp6(2),n.Q6J("ngClass",n.WLB(3,lt,m.icon,m.fallbackIcon)),n.xp6(1),n.Q6J("href",m.entity.file,n.LSH),n.xp6(1),n.Oqu(m.entity.filename)}}const nt=Symbol("destroyed");let ft=(()=>{class u extends O.x{constructor(m,E){super(),this.fileIcons=m,this.cdr=E,this.fallbackIconForEacher=this.fallbackIconForEacher.bind(this)}ngOnChanges(m){m.entity&&this.initialised&&this.refresh()}ngOnDestroy(){this[nt]=!0}ngOnInit(){this.bootstrapped?(this.initialised=!0,this.refresh()):this.fileIcons.latest().subscribe(m=>{this.confSnapshot=m,this.bootstrapped=!0,this.fallbackIcon=m.default;const E=Object.getPrototypeOf(this);E.confSnapshot=m,E.initialised=!0,E.fallbackIcon=m.default,this[nt]||(this.initialised=!0,this.refresh(),this.cdr.markForCheck())})}fallbackIconForEacher(m,E){E.split(",").includes(this.ext)&&(this.fallbackIcon=m)}refresh(){this.setIcon(),this.setFallbackIcon()}setFallbackIcon(){const m=this.entity.filename;m&&(this.ext=(0,ct.Z)(m.split(".")),(0,dt.Z)(this.confSnapshot.extensions,this.fallbackIconForEacher))}setIcon(){const m=this.entity.filetype.replace(/[\/+-]/g,"_");this.icon=`bg-${m}`}}return u.\u0275fac=function(m){return new(m||u)(n.Y36(z.o),n.Y36(n.sBO))},u.\u0275cmp=n.Xpm({type:u,selectors:[["tg-feedentity-file"]],features:[n.qOj,n.TTD],decls:1,vars:1,consts:[["class","row",4,"ngIf"],[1,"row"],[1,"col-xs-12"],["role","img","aria-hidden","true","aria-label","Icon",1,"mimetypes",3,"ngClass"],["target","_blank","rel","noopener",3,"href"]],template:function(m,E){1&m&&n.YNc(0,Q,5,6,"div",0),2&m&&n.Q6J("ngIf",E.bootstrapped&&E.initialised)},dependencies:[C.mk,C.O5,A.k],styles:['a[_ngcontent-%COMP%]{font-weight:700}a[_ngcontent-%COMP%]:before{content:" "}.mimetypes[_ngcontent-%COMP%]{display:inline-block}'],changeDetection:0}),u})();function Tt(u,f){if(1&u&&n._UZ(0,"tg-feedentity-image",3),2&u){const m=n.oxw();n.Q6J("entity",m.entity)("neighbourEntities",m.neighbourEntities)}}function vt(u,f){if(1&u&&n._UZ(0,"tg-feedentity-video",3),2&u){const m=n.oxw();n.Q6J("entity",m.entity)("neighbourEntities",m.neighbourEntities)}}function t(u,f){if(1&u&&n._UZ(0,"tg-feedentity-url",4),2&u){const m=n.oxw();n.Q6J("entity",m.entity)}}function Ot(u,f){if(1&u&&n._UZ(0,"tg-feedentity-file",4),2&u){const m=n.oxw();n.Q6J("entity",m.entity)}}let Mt=(()=>{class u extends I.d{}return u.\u0275fac=function(){let f;return function(E){return(f||(f=n.n5z(u)))(E||u)}}(),u.\u0275cmp=n.Xpm({type:u,selectors:[["tg-feedentity"]],features:[n.qOj],decls:5,vars:5,consts:[[3,"ngSwitch"],[3,"entity","neighbourEntities",4,"ngSwitchCase"],[3,"entity",4,"ngSwitchCase"],[3,"entity","neighbourEntities"],[3,"entity"]],template:function(m,E){1&m&&(n.ynx(0,0),n.YNc(1,Tt,1,2,"tg-feedentity-image",1),n.YNc(2,vt,1,2,"tg-feedentity-video",1),n.YNc(3,t,1,1,"tg-feedentity-url",2),n.YNc(4,Ot,1,1,"tg-feedentity-file",2),n.BQk()),2&m&&(n.Q6J("ngSwitch",E.entity.type),n.xp6(1),n.Q6J("ngSwitchCase","image"),n.xp6(1),n.Q6J("ngSwitchCase","video"),n.xp6(1),n.Q6J("ngSwitchCase","url"),n.xp6(1),n.Q6J("ngSwitchCase","file"))},dependencies:[C.RF,C.n9,R,W.p,H,ft],encapsulation:2,changeDetection:0}),u})();var yt=o(64683);function X(u,f){1&u&&n._UZ(0,"hr")}function st(u,f){if(1&u){const m=n.EpF();
1n.TgZ(0,"a",7),n.NdJ("click",function(){n.CHM(m);const at=n.oxw().index,pt=n.oxw(3);return n.KtG(pt.entityRemoved.emit(at))}),n._UZ(1,"i",8),n.qZA()}if(2&u){const m=n.oxw(2).ngIf;n.Q6J("tooltip",m)}}function y(u,f){if(1&u&&(n.TgZ(0,"div",4),n._UZ(1,"tg-feedentity",5),n.YNc(2,st,2,1,"a",6),n.qZA()),2&u){const m=f.$implicit,E=n.oxw(3);n.Q6J("ngClass",E.entityClass)("@fadeInOnEntry",void 0)("@fadeOutOnExit",void 0),n.xp6(1),n.Q6J("entity",m)("neighbourEntities",E.entities),n.xp6(1),n.Q6J("ngIf",E.editable)}}function J(u,f){if(1&u&&(n.TgZ(0,"div",2),n.YNc(1,y,3,6,"div",3),n.qZA()),2&u){const m=n.oxw(2);n.xp6(1),n.Q6J("ngForOf",m.entities)}}function Y(u,f){1&u&&n._UZ(0,"hr")}function G(u,f){if(1&u&&(n.ynx(0),n.YNc(1,X,1,0,"hr",0),n.YNc(2,J,2,1,"div",1),n.ALo(3,"tr"),n.YNc(4,Y,1,0,"hr",0),n.BQk()),2&u){const m=n.oxw();n.xp6(1),n.Q6J("ngIf","top"===m.hrPosition),n.xp6(1),n.Q6J("ngIf",n.lcZ(3,3,"rm")),n.xp6(2),n.Q6J("ngIf","bottom"===m.hrPosition)}}(0,Z.applyGlobalStyle)("event-feedentities",".event-feed-item tg-feedentity tg-feedentity-image img,.event-feed-item tg-feedentity tg-feedentity-video,.event-feed-item tg-feedentity tg-feedentity-video embed,.event-feed-item tg-feedentity tg-feedentity-video iframe{height:auto!important;max-width:100px!important}");let rt=(()=>{class u{constructor(){this.editable=!1,this.entityClass="col-md-4 col-xs-12",this.entityRemoved=new n.vpe,this.hrPosition="top",this._entities=[]}get entities(){return this._entities}set entities(m){const E=Array.isArray(m)?m:[];switch(this._entities=E,E.length){case 1:this.entityClass="col-xs-12";break;case 2:this.entityClass="col-md-6 col-xs-12";break;default:this.entityClass="col-md-4 col-xs-12"}}ngOnDestroy(){this.entityRemoved.complete()}}return u.\u0275fac=function(m){return new(m||u)},u.\u0275cmp=n.Xpm({type:u,selectors:[["tg-feedentities"]],inputs:{editable:"editable",hrPosition:"hrPosition",entities:"entities"},outputs:{entityRemoved:"entityRemoved"},features:[n._Bn([{provide:c.z,useValue:"newsfeed"}])],decls:1,vars:1,consts:[[4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],["class","entity",3,"ngClass",4,"ngFor","ngForOf"],[1,"entity",3,"ngClass"],[3,"entity","neighbourEntities"],["class","action-btn","href","#",3,"tooltip","click",4,"ngIf"],["href","#",1,"action-btn",3,"tooltip","click"],[1,"fa","fa-times"]],template:function(m,E){1&m&&n.YNc(0,G,5,5,"ng-container",0),2&m&&n.Q6J("ngIf",null==E.entities?null:E.entities.length)},dependencies:[w.i9,C.mk,C.sg,C.O5,b.G,U.K,A.k,Mt,yt.H],styles:["[_nghost-%COMP%]{display:block}.entity[_ngcontent-%COMP%]{margin-top:1em;position:relative}.action-btn[_ngcontent-%COMP%]{background-color:#000c;border-radius:50%;display:inline-block;height:20px;line-height:20px;position:absolute;right:1.5em;text-align:center;top:.1em;width:20px}.fa[_ngcontent-%COMP%]{color:#fff}hr[_ngcontent-%COMP%]{margin-bottom:0}"],data:{animation:[p.A,i.g]},changeDetection:0}),u})()},83732:(mt,$,o)=>{o.d($,{x:()=>p});var n=o(14026);let p=(()=>{class i{}return i.\u0275fac=function(Z){return new(Z||i)},i.\u0275dir=n.lG2({type:i,inputs:{entity:"entity"}}),i})()},85579:(mt,$,o)=>{o.d($,{d:()=>i});var n=o(83732),p=o(14026);let i=(()=>{class c extends n.x{constructor(){super(...arguments),this.neighbourEntities=[]}}return c.\u0275fac=function(){let Z;return function(w){return(Z||(Z=p.n5z(c)))(w||c)}}(),c.\u0275dir=p.lG2({type:c,inputs:{neighbourEntities:"neighbourEntities"},features:[p.qOj]}),c})()},44922:(mt,$,o)=>{o.d($,{p:()=>Z});var n=o(85579),p=o(14026),i=o(75427),c=o(79838);let Z=(()=>{class L extends n.d{constructor(C,b){super(),this.cdr=C,this.lightbox=b,this.dimensions={height:null,width:null}}ngOnChanges(C){this.initialised&&(C.neighbourEntities||C.entity)&&this.doInit()}changeToVideo(){this.neighbourEntities.length>1?this.lightbox.open(this.entity,this.neighbourEntities):this.showImage&&(this.showImage=!1,this.cdr.markForCheck())}ngOnInit(){this.doInit(),this.initialised=!0}doInit(){this.showImage=!0,this.neighbourEntities||(this.neighbourEntities=[])}}return L.\u0275fac=function(C){return new(C||L)(p.Y36(p.sBO),p.Y36(i.y))},L.\u0275cmp=p.Xpm({type:L,selectors:[["tg-feedentity-video"]],features:[p.qOj,p.TTD],decls:1,vars:2,consts:[[3,"url","showImage","onClick","showImageChange"]],template:function(C,b){1&C&&(p.TgZ(0,"tg-video-display",0),p.NdJ("onClick",function(){return b.changeToVideo()})("showImageChange",function(A){return b.showImage=A}),p.qZA()),2&C&&p.Q6J("url",b.entity.video)("showImage",b.showImage)},dependencies:[c.g],styles:["tg-video-display[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),L})()},507:(mt,$,o)=>{o.d($,{p:()=>B});var n=o(92194),p=o(32031),i=o(14026),c=o(52805),Z=o(9803),L=o(56625),w=o(85597),C=o(19807),b=o(63362),U=o(74174),A=o(72782),I=o(40128);const x="newsfeed";let B=(()=>{class R{constructor(){this.commentsEnabled=!1,this.contentChange=new i.vpe,this.isBlog=!1,this.isComment=!1,this.isNewsfeed=!1,this.newsRes=(0,i.f3M)(I.r),this.blogRes=(0,i.f3M)(b.i),this.userContentSvc=(0,i.f3M)(A.s),this.alertSvc=(0,i.f3M)(C.c),this.cdr=(0,i.f3M)(i.sBO),this.loggedInUser=(0,i.f3M)(U.Ej),this.blogCfg=(0,i.f3M)(U.Vz),this.discCfg=(0,i.f3M)(U.J0),this.newsCfg=(0,i.f3M)(U.xc);const O=(0,i.f3M)(c.QS);this.commentForm=O.group({entities:O.control([]),message:""}),this.showComments$=new Z.X(!0),this._destroyed$=this.showComments$.pipe((0,L.Z)(null,null))}likeUnlike(O){this.doLikeUnlike(O).pipe((0,w.R)(this._destroyed$)).subscribe(n.V)}
1ngOnChanges(O){if(O.type){const P=this.type,v="newsfeed"===P;v!==this.showComments$.value&&this.showComments$.next(v),this.isBlog="blog"===P,this.isComment="comment"===P,this.isNewsfeed="newsfeed"===P}if(O.type||O.content){const{role:P,source:v,state:F}=this.content;this.commentsEnabled=this.userContentSvc.canViewComments({role:P,source:v,state:F,type:this.type},this.loggedInUser?.roles,this.blogCfg,this.discCfg,this.newsCfg)}}ngOnDestroy(){this.showComments$.complete()}postComment(){const O={id:this.content.id,...this.commentForm.value};this.comment?.id&&(O.comment_id=this.comment.id),this.newsRes.comment(O).subscribe({error:()=>{this.alertSvc.serverError({key:"commentPostFail",ns:x})},next:()=>{this.alertSvc.alertSuccess({key:"commentPosted",ns:x})}})}doLikeUnlike(O){let P;const v={id:this.content.id};switch(this.type){case"blog":P=O?this.blogRes.like(v):this.blogRes.unlike(v);break;case"comment":P=O?this.newsRes.likeComment(v):this.newsRes.unlikeComment(v);break;case"newsfeed":P=O?this.newsRes.like(v):this.newsRes.unlike(v);break;default:throw new Error(`Invalid content type: ${this.type}`)}return P.pipe((0,p.s)(()=>{this.alertSvc.alertError({key:`${O?"like":"unlike"}${"comment"===this.type?"Comment":"Post"}Fail`,ns:x})}))}}return R.\u0275fac=function(O){return new(O||R)},R.\u0275dir=i.lG2({type:R,inputs:{comment:"comment",content:"content",type:"type"},outputs:{contentChange:"contentChange",showComments$:"showComments"},features:[i.TTD]}),R})()},95529:(mt,$,o)=>{o.d($,{P:()=>dt});var n=o(14026),p=o(71050),i=o(88269),c=o(74174),Z=o(8592),L=o(9803),w=o(6281),C=o(25336),b=o(75372),U=o(3811),A=o(42809),I=o(83375),x=o(49037),B=o(40128),R=o(63362),W=o(64177),O=o(90237),P=o(87579),v=o(64683);function F(z,lt){1&z&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"tr"),n.qZA()),2&z&&(n.xp6(1),n.Oqu(n.xi3(2,1,"noLikes","newsfeed")))}function N(z,lt){if(1&z&&n._UZ(0,"tg-user-profile-list",6),2&z){const Q=n.oxw().ngIf;n.Q6J("users",Q)}}function et(z,lt){if(1&z&&(n.ynx(0),n.YNc(1,F,3,4,"span",1),n.YNc(2,N,1,1,"ng-template",null,5,n.W1O),n.BQk()),2&z){const Q=lt.ngIf,nt=n.MAs(3);n.xp6(1),n.Q6J("ngIf",!Q.length)("ngIfElse",nt)}}function H(z,lt){if(1&z&&(n.TgZ(0,"div",7),n._UZ(1,"tg-loader-spinner",8),n.qZA()),2&z){const Q=n.oxw();n.xp6(1),n.Q6J("ngStyle",Q.spinnerSize)}}let ct=(()=>{class z{constructor(Q,nt,ft){this.ref=Q,this.newsRes=nt,this.blogRes=ft,this.spinnerSize=Object.freeze({width:"5em",height:"5em"}),this.subjects=[this.content$=new L.X(null),this.type$=new L.X(null)]}set content(Q){this.content$.next(Q)}set type(Q){this.type$.next(Q)}ngOnDestroy(){(0,I.completeAll)(...this.subjects)}ngOnInit(){this.likes$=(0,w.a)([this.type$.pipe((0,b.h)(Boolean)),this.content$.pipe((0,b.h)(Boolean))]).pipe((0,U.w)(([Q,{id:nt}])=>{switch(Q){case"newsfeed":return this.newsRes.getLikes({id:nt});case"comment":return this.newsRes.getCommentLikes({commentId:nt});case"blog":return this.blogRes.getLikes({id:nt});default:return(0,C.of)([])}}),(0,A.d)(1))}}return z.\u0275fac=function(Q){return new(Q||z)(n.Y36(x.UZ),n.Y36(B.r),n.Y36(R.i))},z.\u0275cmp=n.Xpm({type:z,selectors:[["tg-likes-modal"]],decls:9,vars:8,consts:[[1,"modal-body"],[4,"ngIf","ngIfElse"],["loading",""],[1,"modal-footer"],["type","button",1,"btn","btn-default",3,"click"],["isLiked",""],[3,"users"],[1,"spinner-container"],[3,"ngStyle"]],template:function(Q,nt){if(1&Q&&(n.TgZ(0,"div",0),n.YNc(1,et,4,2,"ng-container",1),n.ALo(2,"async"),n.YNc(3,H,2,1,"ng-template",null,2,n.W1O),n.qZA(),n.TgZ(5,"footer",3)(6,"button",4),n.NdJ("click",function(){return nt.ref.hide()}),n._uU(7),n.ALo(8,"tr"),n.qZA()()),2&Q){const ft=n.MAs(4);n.xp6(1),n.Q6J("ngIf",n.lcZ(2,3,nt.likes$))("ngIfElse",ft),n.xp6(6),n.Oqu(n.xi3(8,5,"close","newsfeed"))}},dependencies:[W.O5,W.PC,O.I,P.A,W.Ov,v.H],styles:[".spinner-container[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center}"],changeDetection:0}),z})();(0,Z.applyGlobalStyle)("get-likes-component",".tg-get-likes-component{cursor:pointer}");let dt=(()=>{class z{constructor(Q,nt){if(this.modal=Q,nt)this.onClick=()=>this.doShow(nt);else{const ft=(0,n.f3M)(i.A,{optional:!0});this.onClick=ft?()=>{ft.latest().subscribe(Tt=>this.doShow(Tt))}:p.Z}}doShow(Q){this.modal.show(ct,{animated:!0,class:"modal-lg",initialState:{content:this.content,type:this.t
1ype},providers:[{provide:c.K7,useValue:Q}]})}}return z.\u0275fac=function(Q){return new(Q||z)(n.Y36(x.tT),n.Y36(c.K7,8))},z.\u0275dir=n.lG2({type:z,selectors:[["","tgGetLikes","","content","","type",""]],hostVars:2,hostBindings:function(Q,nt){1&Q&&n.NdJ("click.passive",function(){return nt.onClick()}),2&Q&&n.ekj("tg-get-likes-component",!0)},inputs:{content:"content",type:"type"}}),z})()},56439:(mt,$,o)=>{o.d($,{w:()=>b});var n=o(88886),p=o(14026),i=o(64177),c=o(62899);function Z(U,A){if(1&U&&p._UZ(0,"img",4),2&U){const I=p.oxw();p.Q6J("tg-profile-picture",I.user)}}function L(U,A){if(1&U){const I=p.EpF();p.TgZ(0,"img",6),p.NdJ("error",function(){p.CHM(I);const B=p.oxw(2);return p.KtG(B.contentLogoImgErrored=!0)}),p.qZA()}if(2&U){const I=p.oxw(2);p.Q6J("src",I.content.logo,p.LSH)}}function w(U,A){if(1&U&&p.YNc(0,L,1,1,"img",5),2&U){const I=p.oxw();p.Q6J("ngIf",I.content.logo&&!I.contentLogoImgErrored)}}function C(U,A){if(1&U&&p._UZ(0,"span",7),2&U){const I=p.oxw();p.Q6J("ngClass",I.content.source)}}let b=(()=>{class U{constructor(){this.small=!1}ngOnChanges(I){I.content&&(this.user=n.SP.extractEntity(this.content.user),this.contentLogoImgErrored=!1)}}return U.\u0275fac=function(I){return new(I||U)},U.\u0275cmp=p.Xpm({type:U,selectors:[["tg-feeditem-logos"]],inputs:{content:"content",small:"small"},features:[p.TTD],decls:5,vars:5,consts:[[1,"feeditem-logos"],["class","feeditem-logo",3,"tg-profile-picture",4,"ngIf","ngIfElse"],["feeditemContentLogo",""],["class","feeditem-logo",3,"ngClass",4,"ngIf"],[1,"feeditem-logo",3,"tg-profile-picture"],["class","feeditem-logo","loading","lazy",3,"src","error",4,"ngIf"],["loading","lazy",1,"feeditem-logo",3,"src","error"],[1,"feeditem-logo",3,"ngClass"]],template:function(I,x){if(1&I&&(p.TgZ(0,"div",0),p.YNc(1,Z,1,1,"img",1),p.YNc(2,w,1,1,"ng-template",null,2,p.W1O),p.YNc(4,C,1,1,"span",3),p.qZA()),2&I){const B=p.MAs(3);p.ekj("sm",x.small),p.xp6(1),p.Q6J("ngIf",x.user)("ngIfElse",B),p.xp6(3),p.Q6J("ngIf",x.content.source)}},dependencies:[i.mk,i.O5,c.Y],styles:['.feeditem-logos[_ngcontent-%COMP%]{float:left;width:32px}.feeditem-logos[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{display:block}.feeditem-logo[_ngcontent-%COMP%]{color:#fff;font-size:24px;height:32px;line-height:32px;text-align:center;width:32px}.feeditem-logo.twitter[_ngcontent-%COMP%]{background-color:#000}.feeditem-logo.twitter[_ngcontent-%COMP%]:before{background-color:#fff;background-size:1em}.feeditem-logo[_ngcontent-%COMP%]   .fa.fa-twitter[_ngcontent-%COMP%]:before, .feeditem-logo.twitter[_ngcontent-%COMP%]:before{background-position:50%;content:"";display:inline-block;height:1em;-webkit-mask:url(\'data:image/svg+xml;utf8,<svg viewBox="0 -8 26 30" xmlns="http://www.w3.org/2000/svg"><g><path fill="white" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></g></svg>\') no-repeat center;mask:url(\'data:image/svg+xml;utf8,<svg viewBox="0 -8 26 30" xmlns="http://www.w3.org/2000/svg"><g><path fill="white" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></g></svg>\') no-repeat center;width:1em}.feeditem-logo[_ngcontent-%COMP%]   .fa.fa-twitter[_ngcontent-%COMP%]:before{background-color:currentColor}.feeditem-logo.facebook[_ngcontent-%COMP%]{background-color:#3b5998}.feeditem-logo.facebook[_ngcontent-%COMP%]:after{content:"\\f09a";
1font-family:FontAwesome}.feeditem-logo.blog[_ngcontent-%COMP%]{background-color:#2f2963}.feeditem-logo.blog[_ngcontent-%COMP%]:after{content:"\\f040";font-family:FontAwesome}.feeditem-logo.article[_ngcontent-%COMP%]{background-color:#2f2963}.feeditem-logo.article[_ngcontent-%COMP%]:after{content:"\\f1ea";font-family:FontAwesome}@media (min-width:768px){.feeditem-logos[_ngcontent-%COMP%]{width:128px}.feeditem-logos.sm[_ngcontent-%COMP%]{width:64px}.feeditem-logos[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{float:right;height:64px;width:64px}.feeditem-logo[_ngcontent-%COMP%]{font-size:36px;height:64px;line-height:64px;width:64px}}'],changeDetection:0}),U})()},47302:(mt,$,o)=>{o.d($,{u:()=>Xt});var n=o(662),p=o(5296),i=o(14026),c=o(52805),Z=o(71050),L=o(43383),w=o(41803);const b=function C(_,q){return q="function"==typeof q?q:void 0,_&&_.length?(0,w.Z)(_,void 0,q):[]};var U=o(69962),A=o(81818),I=o(33524),x=o(554),B=o(32045),W=Array.prototype.splice;const F=function v(_,q){var T=[];if(!_||!_.length)return T;var k=-1,j=[],Ct=_.length;for(q=(0,I.Z)(q,3);++k<Ct;){var St=_[k];q(St,k,_)&&(T.push(St),j.push(k))}return function O(_,q){for(var T=_?q.length:0,k=T-1;T--;){var j=q[T];if(T==k||j!==Ct){var Ct=j;(0,B.Z)(j)?W.call(_,j,1):(0,x.Z)(_,j)}}}(_,j),T};var N=o(9803),et=o(6281),H=o(50725),ct=o(48921),dt=o(97482),z=o(83375),lt=o(91696),Q=o(51248),nt=o(49037),ft=o(25282),Tt=o(19807),vt=o(64177),t=o(85868),Ot=o(10218),Mt=o(61958),yt=o(27527),X=o(54211),st=o(64683);function y(_,q){if(1&_&&(i.TgZ(0,"div",11),i._UZ(1,"iframe",12),i.ALo(2,"bypassResourceUrlSanitisation"),i.qZA()),2&_){const T=i.oxw();i.xp6(1),i.Q6J("src",i.lcZ(2,1,T.embedUrl),i.uOi)}}let J=(()=>{class _{constructor(T,k,j,Ct,St){this.ref=T,this.videoSvc=j,this.cdr=Ct,this.$alert=St,this.id=(0,L.Z)("tg-video-attach-link-"),this.ns="newsfeed",this._subs=[],this.control=k.control("")}add(){if(this.embedUrl)try{this.subject.next([...this.subject.value||[],{type:"video",video:this.embedUrl}]),this.$alert.alertSuccess({key:"videoAttached",ns:this.ns}),this.ref.hide()}catch(T){console.error(T),this.$alert.alertError({key:"videoFail",ns:this.ns})}}ngOnDestroy(){(0,Q.unsubscribeFromAll)(this._subs)}ngOnInit(){this._subs.push(this.control.valueChanges.pipe((0,H.U)(T=>this.videoSvc.getEmbedUrl(T)||null),(0,ct.O)(null),(0,lt.x)(),(0,p.H)("[VideoAttachModal.init]")).subscribe((0,n.e)(T=>{this.embedUrl=T,this.cdr.markForCheck()})))}}return _.\u0275fac=function(T){return new(T||_)(i.Y36(nt.UZ),i.Y36(c.QS),i.Y36(ft.k),i.Y36(i.sBO),i.Y36(Tt.c))},_.\u0275cmp=i.Xpm({type:_,selectors:[["tg-video-attach-modal"]],decls:15,vars:17,consts:[[3,"hide"],[1,"modal-body"],["translate","addVideoLabel",3,"for","tr-namespace"],[1,"input-group"],[1,"input-group-addon",3,"for"],[1,"fa","fa-youtube-play",2,"font-weight","normal"],["type","url","required","",1,"form-control",3,"formControl","placeholder","id"],["class","embed-responsive embed-responsive-16by9",4,"ngIf"],[1,"modal-footer"],["type","button","translate","add",1,"btn","btn-primary",3,"disabled","tr-namespace","click"],["type","button","translate","close",1,"btn","btn-default",3,"tr-namespace","click"],[1,"embed-responsive","embed-responsive-16by9"],[1,"embed-responsive-item",3,"src"]],template:function(T,k){1&T&&(i.TgZ(0,"tg-modal-header",0),i.NdJ("hide",function(){return k.ref.hide()}),i._uU(1),i.ALo(2,"tr"),i.qZA(),i.TgZ(3,"div",1)(4,"h4"),i._UZ(5,"label",2),i.qZA(),i.TgZ(6,"div",3)(7,"label",4),i._UZ(8,"i",5),i.qZA(),i._UZ(9,"input",6),i.ALo(10,"tr"),i.qZA(),i.YNc(11,y,3,3,"div",7),i.qZA(),i.TgZ(12,"footer",8)(13,"button",9),i.NdJ("click",function(){return k.add()}),i.qZA(),i.TgZ(14,"button",10),i.NdJ("click",function(){return k.ref.hide()}),i.qZA()()),2&T&&(i.xp6(1),i.Oqu(i.xi3(2,11,"addVideoHead",k.ns)),i.xp6(4),i.Q6J("for",k.id)("tr-namespace",k.ns),i.xp6(2),i.Q6J("for",k.id),i.xp6(2),i.Q6J("formControl",k.control)("placeholder",i.xi3(10,14,"addVideoPH",k.ns))("id",k.id),i.xp6(2),i.Q6J("ngIf",k.embedUrl),i.xp6(2),i.Q6J("disabled",!k.embedUrl)("tr-namespace",k.ns),i.xp6(1),i.Q6J("tr-namespace",k.ns))},dependencies:[vt.O5,t.G,Ot.P,Mt.y,yt.R,c.Fj,c.JJ,c.Q7,c.oH,X.W,st.H],styles:["label[_ngcontent-%COMP%]{font-weight:400}.embed-responsive[_ngcontent-%COMP%]{margin-top:2em}"],changeDetection:0}),_})();var Y=o(95612),G=o(64852),rt=o(41157),u=o(61322),f=o(78611),m=o(50339);function E(_,q){if(1&_&&(i._UZ(0,"i",15),i.TgZ(1,"span"),i._uU(2),i.ALo(3,"tr"),i.qZA()),2&_){const T=i.oxw(2);i.ekj("text-muted",T.disabled),i.xp6(1),i.ekj("text-muted",T.disabled),i.xp6(1),i.Oqu(i.lcZ(3,5,"img"))}}function at(_,q){1&_&&i.GkF(0)}function pt(_,q){if(1&_){const T=i.EpF();
1i.TgZ(0,"a",11),i.NdJ("click",function(j){i.CHM(T);const Ct=i.oxw(2);return i.KtG(Ct.preventDefault(j))}),i.YNc(1,at,1,0,"ng-container",16),i.qZA()}if(2&_){i.oxw();const T=i.MAs(3);i.xp6(1),i.Q6J("ngTemplateOutlet",T)}}function At(_,q){1&_&&i.GkF(0)}function Yt(_,q){if(1&_&&(i.TgZ(0,"a",17),i.YNc(1,At,1,0,"ng-container",16),i.qZA()),2&_){i.oxw();const T=i.MAs(3);i.Q6J("controlsUploadInput","img"),i.xp6(1),i.Q6J("ngTemplateOutlet",T)}}function Zt(_,q){if(1&_&&(i._UZ(0,"i",18),i.TgZ(1,"span"),i._uU(2),i.ALo(3,"tr"),i.qZA()),2&_){const T=i.oxw(2);i.ekj("text-muted",T.disabled),i.xp6(1),i.ekj("text-muted",T.disabled),i.xp6(1),i.Oqu(i.lcZ(3,5,"doc"))}}function kt(_,q){1&_&&i.GkF(0)}function Pt(_,q){if(1&_){const T=i.EpF();i.TgZ(0,"a",11),i.NdJ("click",function(j){i.CHM(T);const Ct=i.oxw(2);return i.KtG(Ct.preventDefault(j))}),i.YNc(1,kt,1,0,"ng-container",16),i.qZA()}if(2&_){i.oxw();const T=i.MAs(15);i.xp6(1),i.Q6J("ngTemplateOutlet",T)}}function Ft(_,q){1&_&&i.GkF(0)}function se(_,q){if(1&_&&(i.TgZ(0,"a",17),i.YNc(1,Ft,1,0,"ng-container",16),i.qZA()),2&_){i.oxw();const T=i.MAs(15);i.Q6J("controlsUploadInput","doc"),i.xp6(1),i.Q6J("ngTemplateOutlet",T)}}function re(_,q){if(1&_){const T=i.EpF();i.TgZ(0,"ul",6)(1,"li",7),i.YNc(2,E,4,7,"ng-template",null,8,i.W1O),i.YNc(4,pt,2,1,"a",9),i.YNc(5,Yt,2,2,"ng-template",null,10,i.W1O),i.qZA(),i.TgZ(7,"li",7)(8,"a",11),i.NdJ("click",function(j){i.CHM(T);const Ct=i.oxw();return i.KtG(Ct.openVideoModal(j))}),i._UZ(9,"i",12),i.TgZ(10,"span"),i._uU(11),i.ALo(12,"tr"),i.qZA()()(),i.TgZ(13,"li",7),i.YNc(14,Zt,4,7,"ng-template",null,13,i.W1O),i.YNc(16,Pt,2,1,"a",9),i.YNc(17,se,2,2,"ng-template",null,14,i.W1O),i.qZA()()}if(2&_){const T=i.MAs(6),k=i.MAs(18),j=i.oxw();i.Q6J("id",j.dropdownId),i.uIk("aria-labelledby",j.btnId),i.xp6(4),i.Q6J("ngIf",j.disabled)("ngIfElse",T),i.xp6(5),i.ekj("text-muted",j.disabled),i.xp6(1),i.ekj("text-muted",j.disabled),i.xp6(1),i.Oqu(i.lcZ(12,11,"vid")),i.xp6(5),i.Q6J("ngIf",j.disabled)("ngIfElse",k)}}function de(_){return function ae(_){return _&&"string"==typeof _.image&&"image"===_.type}(_)||function le(_){return _&&"string"==typeof _.video&&"video"===_.type}(_)||function ce(_){return _&&"string"==typeof _.filename&&"string"==typeof _.filetype&&"file"===_.type}(_)||function zt(_){if(_&&"string"==typeof _.url&&"url"===_.type){for(const q of["description","domain","image","name"])if(q in _&&null!=_[q]&&"string"!=typeof _[q])return!1;return!0}return!1}(_)?_:_.type.startsWith("image/")?{image:_.url,type:"image"}:"url"===_.type?_:{file:_.url,filename:_.filename,filetype:_.type,type:"file"}}function ge(_){return _.map(de)}let Xt=(()=>{class _{constructor(T,k){this.modal=T,this.up=k,this.disabled=!1,this.onBlur=Z.Z,this.onChange=Z.Z,this._sbjs=[this.removed$=new N.X([]),this.videos$=new N.X([])]}ngOnDestroy(){this._sub?.unsubscribe(),(0,z.completeAll)(...this._sbjs)}preventDefault(T){T.preventDefault()}ngOnInit(){this.btnId=(0,L.Z)("feedinput-attach-btn-btn-"),this.dropdownId=(0,L.Z)("feedinput-attach-btn-dropdown-");const T=this.up.getStore().pipe((0,H.U)(j=>j.completedFiles),(0,H.U)(ge),(0,ct.O)([])),k=(0,et.a)([T,this.videos$]).pipe((0,H.U)(([j,Ct])=>b([...j,...Ct],U.Z)));this._sub=(0,et.a)([k,this.removed$]).pipe((0,H.U)(([j,Ct])=>Ct.length?j.filter(St=>!(0,A.Z)(Ct,St)):j),(0,p.H)("[FeedinputAttachBtn.value]")).subscribe((0,n.e)(j=>{this.onChange(j)}))}openVideoModal(T){T.preventDefault(),this.disabled||this.modal.show(J,{animated:!0,initialState:{subject:this.videos$}})}registerOnChange(T){this.onChange=T}registerOnTouched(T){this.onBlur=T}removeFile(T){T&&("video"===T.type?F(this.videos$.value,T)&&this.videos$.next(this.videos$.value):this.removed$.next(b([...this.removed$.value,T],U.Z)))}reset(){this.up.clear(),this.videos$.next([]),this.removed$.next([])}setDisabledState(T){this.disabled=T}writeValue(T){this.up.patchCompletedFiles(T)}}return _.\u0275fac=function(T){return new(T||_)(i.Y36(nt.tT),i.Y36(Y.O))},_.\u0275cmp=i.Xpm({type:_,selectors:[["tg-feedinput-attach-btn"]],hostBindings:function(T,k){1&T&&i.NdJ("blur",function(){return k.onBlur()})},exportAs:["feedinput-attach-btn"],features:[i._Bn([{provide:dt.z,useValue:"newsfeed"},{multi:!0,provide:c.JU,useExisting:(0,i.Gpc)(()=>_)}])],decls:9,vars:11,consts:[["ngFileSelect","","type","file","accept","image/*","multiple","",3,"options","uploadInputName"],["ngFileSelect","","type","file","multiple","",3,"options","uploadInputName"],["dropdown","",3,"container"],["type","button","dropdownToggle","",1,"btn","btn-sm","btn-default","dropdown-toggle",3,"id","disabled"],[1,"fa","fa-paperclip"],["class","dropdown-menu","role","menu",3,"id",4,"dropdownMenu"],["role","menu",1,"dropdown-menu",3,"id"],["role","menuitem"],["imgContent",""],["class","dropdown-item","href","#",3,"click",4,"ngIf","ngIfElse"],["imgNotDisabled",""],["href","#",1,"dropdown-item",3,"click"],[1,"fa","fa-fw","fa-youtube-play"],["docContent",""],["docNotDisabled",""],[1,"fa","fa-fw","fa-picture-o"],[4,"ngTemplateOutlet"],["href","#",1,"dropdown-item",3,"controlsUploadInput"],[1,"fa","fa-fw","fa-file"]],template:function(T,k){1&T&&(i._UZ(0,"input",0)(1,"input",1),i.TgZ(2,"div",2)(3,"button",3)(4,"span"),i._uU(5),i.ALo(6,"tr"),i.qZA(),i._UZ(7,"i",4),i.qZA(),i.YNc(8,re,19,13,"ul",5),i.qZA()),2&T&&(i.Q6J("options",k.up.stdUploadOptions)("uploadInputName","img"),i.xp6(1),i.Q6J("options",k.up.stdUploadOptions)("uploadInputName","doc"),i.xp6(1),i.Q6J("container","body"),i.xp6(1),i.Q6J("id",k.btnId)("disabled",k.disabled),i.uIk("aria-controls",k.dropdownId),i.xp6(2),i.hij("",i.lcZ(6,9,"attach"),"\xa0"))},dependencies:[G.Hz,G.Mq,G.TO,rt.i,u.U,f.qx,vt.O5,vt.tP,t.G,m.k,st.H],styles:["div[_ngcontent-%COMP%]{display:inline-block}label[_ngcontent-%COMP%]{font-weight:400}.dropdown-item[_ngcontent-%COMP%]   .text-muted[_ngcontent-%COMP%]{cursor:not-allowed}"],changeDetection:0}),_})()},54756:(mt,$,o)=>{o.d($,{A:()=>i});var n=o(8592),p=o(14026);(0,n.applyGlobalStyle)("feedinput-btn",".tg-feedinput-btn{display:inline-block}.tg-feedinput-btn+.tg-feedinput-btn{margin-left:3px}");let i=(()=>{class c{}return c.\u0275fac=function(L){return new(L||c)},c.\u0275dir=p.lG2({type:c,selectors:[["","tgFeedInputButton",""]],hostVars:2,hostBindings:function(L,w){2&L&&p.ekj("tg-feedinput-btn",!0)}}),c})()},75427:(mt,$,o)=>{o.d($,{y:()=>I});var n=o(14026),p=o(3895),i=o(71963),c=o(21250),Z=o(97482),L=o(85868),w=o(3069),C=o(64683);class b{constructor(B){Object.assign(this,B)}close(){this.destroyFn()}}b.INPUT=new n.OlP("LightboxModalInput"),b.\u0275fac=function(B){return new(B||b)(n.Y36(b.INPUT))},b.\u0275cmp=n.Xpm({type:b,selectors:[["tg-lightbox-modal"]],features:[n._Bn([{provide:Z.z,useValue:"newsfeed"}])],decls:5,vars:7,consts:[[1,"lb-modal-container"],["role","button",1,"close-btn",3,"click"],[1,"fa","fa-2x","fa-times"],[3,"entities","startIndex"]],template:function(B,R){1&B&&(n.TgZ(0,"div",0)(1,"div",1),n.NdJ("
1click",function(){return R.close()}),n.ALo(2,"tr"),n._UZ(3,"i",2),n.qZA(),n._UZ(4,"tg-image-slide",3),n.qZA()),2&B&&(n.Q6J("@fadeInOnEntry",void 0)("@fadeOutOnExit",void 0),n.xp6(1),n.uIk("label",n.lcZ(2,5,"close")),n.xp6(3),n.Q6J("entities",R.neighbours)("startIndex",R.startIndex))},dependencies:[L.G,w.C,C.H],styles:[".lb-modal-container[_ngcontent-%COMP%]{background-color:#0009;height:100%;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:10000}.close-btn[_ngcontent-%COMP%]{color:#fff;cursor:pointer;opacity:.9;position:absolute;right:20px;top:10px;z-index:1000}.close-btn[_ngcontent-%COMP%]:hover{opacity:1}"],data:{animation:[i.A,c.g]},changeDetection:0});var U=o(33043);function A(x){return"image"===x.type||"video"===x.type}let I=(()=>{class x{constructor(R,W){this.dom=R,this.injector=W}open(R,W){const O=(0,p.Z)(W).filter(A),P={entity:R,neighbours:O,startIndex:O.indexOf(R)},F=n.zs3.create({parent:this.injector,providers:[{deps:[],provide:b.INPUT,useValue:P}]}),N=this.dom.appendComponent(b,document.body,F);let et;const H=dt=>{!et&&(27===dt.which||27===dt.keyCode||"Escape"===dt.key)&&(et=!0,N.destroy())};window.addEventListener("keydown",H),window.addEventListener("keypress",H),N.onDestroy(()=>{window.removeEventListener("keydown",H),window.removeEventListener("keypress",H)}),N.instance.destroyFn=()=>{N.destroy()}}}return x.\u0275fac=function(R){return new(R||x)(n.LFG(U.v),n.LFG(n.zs3))},x.\u0275prov=n.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})()},61775:(mt,$,o)=>{o.d($,{O:()=>J});var n=o(52805),p=o(64852),i=o(74831),c=o(75827),Z=o(15859),L=o(84416),w=o(3053),C=o(25275),b=o(98992),U=o(3999),A=o(2297),I=o(64177),x=o(14026);let B=(()=>{class Y{}return Y.\u0275fac=function(rt){return new(rt||Y)},Y.\u0275mod=x.oAB({type:Y}),Y.\u0275inj=x.cJS({imports:[I.ez]}),Y})();var R=o(70460),W=o(75776),O=o(7311),P=o(59535),v=o(56788),F=o(86458),N=o(44922),et=o(3069),H=o(10174),ct=o(5296),dt=o(16435),z=o(95517),lt=o(45877),Q=o(50725),nt=o(58012),ft=o(56625),Tt=o(55238),vt=o(85597),t=o(91696),Ot=o(83375);let Mt=(()=>{class Y{constructor(rt,u){this.elRef=rt,this.r2=u,this.swipeX=new x.vpe,this.swipeXY=new x.vpe,this.swipeY=new x.vpe}ngOnDestroy(){(0,Ot.completeAll)(this.swipeX,this.swipeY,this.swipeXY)}ngOnInit(){const rt=this.swipeY.pipe((0,ft.Z)(null,null)),u=this.elRef.nativeElement;this.r2.setStyle(u,"touch-action","none");const f={passive:!0},m=(0,dt.R)(u,"pointermove",f).pipe((0,Tt.B)()),E=(0,z.T)(rt,(0,dt.R)(u,"pointerup",f)).pipe((0,Tt.B)()),at=(0,dt.R)(u,"pointerdown",f).pipe((0,lt.z)(pt=>m.pipe((0,Q.U)(yt),(0,nt.R)((At,[Yt,Zt])=>({...At,current:[Yt-At.origin[0],Zt-At.origin[1]]}),{current:yt(pt),origin:yt(pt)}),(0,vt.R)(E))),(0,Q.U)(pt=>pt.current),(0,H.p)(),(0,vt.R)(rt),(0,ct.H)("[TgSwipe.events]"),(0,Tt.B)());at.subscribe(this.swipeXY),at.pipe((0,Q.U)(pt=>pt[0]),(0,t.x)()).subscribe(this.swipeX),at.pipe((0,Q.U)(pt=>pt[1]),(0,t.x)()).subscribe(this.swipeY)}}return Y.\u0275fac=function(rt){return new(rt||Y)(x.Y36(x.SBq),x.Y36(x.Qsj))},Y.\u0275dir=x.lG2({type:Y,selectors:[["","tgSwipeX",""],["","tgSwipeY",""],["","tgSwipeXY",""]],outputs:{swipeX:"tgSwipeX",swipeXY:"tgSwipeXY",swipeY:"tgSwipeY"}}),Y})();function yt({pageX:Y,pageY:G}){return[Y,G]}var X=o(85868),st=o(5830),y=o(64683);let J=(()=>{class Y{}return Y.\u0275fac=function(rt){return new(rt||Y)},Y.\u0275mod=x.oAB({type:Y}),Y.\u0275inj=x.cJS({imports:[c.X,R.TgInfiniteScrollModule,A.W,P.W,U.b,W.F,i.z8,p.mr,w.CopyButtonModule,C.FallbackImageModule,B,v.c,Z.GlobalModule,b.b,n.u5,n.UX,F.z,L.K,O.s]}),Y})();x.B6R(et.C,[i.i9,Mt,I.sg,I.O5,I.RF,I.n9,X.G,st.K,N.p],[y.H])},48112:(mt,$,o)=>{o.d($,{Z:()=>jt});var n=o(64762),p=o(92194),i=o(662),c=o(65224),Z=o(7647),L=o(10174),w=o(5296),C=o(64177),b=o(88886),U=o(40921),A=o(71050),I=o(80600),x=o(3895),B=o(69962),R=o(9803),W=o(25336),O=o(6281),P=o(3811),v=o(10067),F=o(50725),N=o(42809),et=o(89969),H=o(85597),ct=o(74174),dt=o(17639),z=o(43632),lt=o(97482),Q=o(83375),nt=o(49389),ft=o(85960),Tt=o(82916),vt=o(56625),t=o(14026);const Ot=Symbol("Subjects");let Mt=(()=>{class s{constructor(){this[Ot]=[this.articleID$=new R.X(null),this.eventID$=new R.X(null),this.groupID$=new R.X(null),this.inputMaxLength$=new R.X(-1),this.role$=new R.X(null)],this._destroyed$=this.role$.pipe((0,vt.Z)())}get articleID(){return this.articleID$.value}set articleID(e){this.articleID$.next(e)}get eventID(){return this.eventID$.value}set eventID(e){e!==this.eventID&&this.eventID$.next(e)}get groupID(){return this.groupID$.value}set groupID(e){e!==this.groupID&&this.groupID$.next(e)}get inputMaxLength(){return this.inputMaxLength$.value}set inputMaxLength(e){let r;const l=typeof e;null==e?r=-1:"number"!==l?(console.warn(Object.getPrototypeOf(this).constructor.name,"re
1ceived",l,"maxlength input:",e),r=-1):r=e<1?-1:e,r!==this.inputMaxLength&&this.inputMaxLength$.next(r)}get role(){return this.role$.value}set role(e){e!==this.role&&this.role$.next(e)}ngOnDestroy(){(0,Q.completeAll)(...this[Ot])}}return s.\u0275fac=function(e){return new(e||s)},s.\u0275dir=t.lG2({type:s,inputs:{articleID:["article","articleID"],eventID:["event","eventID"],groupID:["group","groupID"],inputMaxLength:["maxLength","inputMaxLength"],role:"role"}}),s})();var yt=o(60611),X=o(76888),st=o(19807),y=o(40128),J=o(91793),Y=o(65624),G=o(74647),rt=o(10218),u=o(4678),f=o(22009),m=o(81818),E=o(75372),at=o(60407),pt=o(41290),At=o(43112),Yt=o(74831),Zt=o(85868),kt=o(5830),Pt=o(50339),Ft=o(64683);function se(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"li",2),t.NdJ("click",function(){const M=t.CHM(e).$implicit,ot=t.oxw();return ot.selectedTab=M.name,t.KtG(ot.change$.emit(M))}),t.ALo(1,"tr"),t.TgZ(2,"a",3),t._UZ(3,"i",4),t.qZA()()}if(2&s){const e=a.$implicit,r=t.oxw();t.ekj("active",e.name===r.selectedTab),t.Q6J("tooltip",t.xi3(1,4,e.name,"feedselector")),t.xp6(3),t.Q6J("ngClass",e.class)}}const re=[{class:"fa-commenting-o",name:"messages",source:"message"},{class:"fa-newspaper-o",name:"articles",source:"article"},{class:"fa-pencil",name:"blogs",source:"blog"},{class:"fa-exchange",name:"marketspace",source:"marketspace"},{class:"fa-lightbulb-o",name:"opportunities",source:"opportunity"},{class:"fa-facebook",name:"facebook",source:"facebook"},{class:"fa-twitter",name:"twitter",source:"twitter"}].map(Object.freeze);let ae=(()=>{class s{constructor(e,r){this.cdr=e,this.newsCfg=r,this._subjects=[this.change$=new t.vpe(!0),this.globeSources$=new R.X([]),this.availableNetworks$=new R.X([])],this.networks$=(0,O.a)([this.availableNetworks$,this.globeSources$]).pipe((0,F.U)(s.networks$mapper),(0,w.H)("[FeedSelector.networks$]"),(0,N.d)(1))}set availableNetworks(e){this.availableNetworks$.next(e?(0,x.Z)(e):[])}set globeSources(e){this.globeSources$.next(e?(0,x.Z)(e):[])}static networks$mapper(e){const r=re.filter(l=>e[0].includes(l.name));return e[0].includes("globe")&&r.unshift({class:"fa-globe",name:"globe",source:e[1]}),r}ngOnDestroy(){this.destroyed=!0,(0,Q.completeAll)(...this._subjects)}ngOnInit(){this.inSelectedTab?(this.selectedTab=this.inSelectedTab,this.emitTab(this.selectedTab)):this.newsCfg.latest("defaultTab").subscribe(e=>{!this.destroyed&&!this.selectedTab&&(this.selectedTab=e,this.cdr.markForCheck(),this.emitTab(e))})}emitTab(e){this.networks$.pipe((0,E.h)(pt.isNotEmpty),(0,at.q)(1),(0,et.b)(r=>{if(!this.destroyed){const l=(0,m.Z)(r,{name:e});l&&this.change$.emit(l)}}),(0,w.H)(`[FeedSelector.emitTab(${e})]`)).subscribe(p.V)}}return s.\u0275fac=function(e){return new(e||s)(t.Y36(t.sBO),t.Y36(At.t))},s.\u0275cmp=t.Xpm({type:s,selectors:[["tg-feed-selector"]],inputs:{inSelectedTab:["selectedTab","inSelectedTab"],availableNetworks:"availableNetworks",globeSources:"globeSources"},outputs:{change$:"change"},decls:3,vars:3,consts:[[1,"nav","nav-tabs","feeditem-content"],["role","presentation",3,"active","tooltip","click",4,"ngFor","ngForOf"],["role","presentation",3,"tooltip","click"],["href","#"],[1,"fa",3,"ngClass"]],template:function(e,r){1&e&&(t.TgZ(0,"ul",0),t.YNc(1,se,4,7,"li",1),t.ALo(2,"async"),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngForOf",t.lcZ(2,1,r.networks$)))},dependencies:[Yt.i9,C.mk,C.sg,Zt.G,kt.K,Pt.k,C.Ov,Ft.H],styles:["[_nghost-%COMP%]{display:block}.nav-tabs[_ngcontent-%COMP%]{border-bottom:none}a[_ngcontent-%COMP%]{background-color:#fff}",".feeditem-content[_ngcontent-%COMP%]{margin-left:36px;overflow:hidden}.feeditem-content[_ngcontent-%COMP%]   .share-button[_ngcontent-%COMP%]{margin-top:4px}.feeditem-content[_ngcontent-%COMP%]:hover   .action-button[_ngcontent-%COMP%]{visibility:visible}.feeditem-content[_ngcontent-%COMP%] > .panel-body[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{overflow-wrap:break-word}@media (min-width:768px){.feeditem-content[_ngcontent-%COMP%]{margin-left:132px}.feeditem-content.sm[_ngcontent-%COMP%]{margin-left:68px}}"],changeDetection:0}),s})();var le=o(8194),zt=o(15449),ce=o(30288),de=o(11022),ge=o(6903),Xt=o(54332),_=o(1728),q=o(90370),k=o(91696),j=o(71963),Ct=o(21250),St=o(70840),Ie=o(51248),ke=o(95031),We=o(75143),Dt=o(52805),Ge=o(25817),Ke=o(71839),me=o(95612),je=o(46477),Ve=o(99492),Oe=o(62899),pe=o(72064),Me=o(47302);const we=["attachBtn"];function ze(s,a){if(1&s&&t._UZ(0,"img",14),2&s){const e=t.oxw(3);t.Q6J("tg-profile-picture",e.user)}}function be(s,a){if(1&s&&t._UZ(0,"img",14),2&s){const e=t.oxw(3);t.Q6J("tg-profile-picture",e.user)}}function Xe(s,a){if(1&s&&(t.TgZ(0,"div",12),t.YNc(1,ze,1,1,"img",13),t.qZA(),t.TgZ(2,"div",12),t.YNc(3,be,1,1,"img",13),t.qZA()),2&s){const e=t.oxw(2);t.ekj("sm",e.eventID),t.xp6(1),t.Q6J("ngIf",e.eventID),t.xp6(1),t.ekj("sm",e.groupID),t.xp6(1),t.Q6J("ngIf",e.groupID)}}function ue(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"tg-feedentities",15),t.NdJ("entityRemoved",function(l){t.CH
1M(e);const M=t.oxw(3);return t.KtG(M.entityRemoved(l))}),t.qZA()}if(2&s){const e=t.oxw().ngIf;t.Q6J("editable",!0)("entities",e)}}function qe(s,a){if(1&s&&(t.ynx(0),t.YNc(1,ue,1,2,"ng-template",4),t.BQk()),2&s){const e=a.ngIf;t.xp6(1),t.Q6J("ngIf",e.length)}}function tn(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"tg-upload-outlet",2,3),t.YNc(2,Xe,4,6,"ng-template",4),t.TgZ(3,"div",5)(4,"tg-upload-drop-outlet")(5,"tg-textarea",6,7),t.NdJ("submit",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.post())})("keydown.enter",function(){t.CHM(e);const l=t.MAs(6),M=t.oxw();return t.KtG(M.dispatchEnter.next(l))}),t.ALo(7,"async"),t.Hsn(8),t._UZ(9,"tg-feedinput-attach-btn",8,9),t.qZA(),t.YNc(11,qe,2,1,"ng-container",10),t.ALo(12,"async"),t._UZ(13,"tg-upload-progress",11),t.qZA()()()}if(2&s){const e=t.oxw();t.ekj("feeditem",e.showLogos),t.Q6J("formGroup",e.form),t.xp6(2),t.Q6J("ngIf",e.showLogos),t.xp6(1),t.Q6J("ngClass",e.contentClass),t.xp6(1),t.Udp("margin-top",e.showLogos?"":"1em"),t.ekj("panel-body",e.showLogos),t.xp6(1),t.Q6J("placeholder",e.placeholder)("maxlength",t.lcZ(7,17,e.maxLength$))("formControlName","content")("required",!0)("buttonLabel",e.buttonLabel),t.xp6(4),t.Q6J("formControlName","entities"),t.xp6(2),t.Q6J("ngIf",t.lcZ(12,19,e.entities$)),t.xp6(2),t.Q6J("autoClear",!0)}}function en(s,a){1&s&&(t.TgZ(0,"div",17),t._uU(1),t.ALo(2,"tr"),t.qZA()),2&s&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"cantPost")))}function nn(s,a){if(1&s&&(t.YNc(0,en,3,3,"div",16),t.ALo(1,"async")),2&s){const e=t.oxw();t.Q6J("ngIf",!t.lcZ(1,1,e.hideFeedInputIfCantPost$))}}const Ee=[[["","tgFeedInputButton",""]]];function Wt(s){return"url"!==s.type}const fe={provide:lt.z,useValue:"newsfeed"};class Lt extends Mt{constructor(a,e,r,l,M,ot,_t,Ut){super(),this.discGroupCfg=a,this.newsfeedCfg=e,this.userSvc=r,this.fb=l,this.cdr=M,this.newsRes=ot,this.metaInfoSvc=_t,this.alertSvc=Ut,this.dispatchEnter=new le.x,this.posted=new t.vpe,this.showLogos=!0,this.onEnter=this.newsfeedCfg.latest("submitOnEnter").pipe((0,E.h)(Boolean),(0,P.w)(()=>this.dispatchEnter),(0,F.U)(Et=>{this.post(),Et.blur()}),(0,H.R)(this._destroyed$),(0,N.d)(1))}get canPost$(){const a=({isLoggedIn:e,isAdmin:r,user:l})=>e?r?(0,W.of)(!0):this.rolesAllowedToPost$.pipe((0,F.U)(M=>!Array.isArray(M)||l.hasRolesSome(...M))):(0,W.of)(!1);return(0,O.a)([this.articleID$,this.eventID$,this.groupID$]).pipe((0,P.w)(([e,r,l])=>e||r||l?(0,W.of)(!0):this.userSvc.resourcefulStore.pipe((0,P.w)(a))),(0,H.R)(this._destroyed$),(0,k.x)(),(0,N.d)(1))}get contentClass(){if(!this.showLogos)return"";const a=["panel","panel-default","feeditem-content"];return(this.groupID||this.eventID)&&a.push("sm"),a.join(" ")}get form(){let a;return a=this.feedentry?{content:this.feedentry.content||"",entities:this.fb.control(this.feedentry.entities)}:this.initialState,this.fb.group(a)}get formattedPayload(){const a={...this.feedentry||{},...this.form.value};return this.articleID&&(a.article=this.articleID),this.eventID&&(a.event=this.eventID),this.groupID&&(a.group=this.groupID),this.role&&(Array.isArray(this.role)?this.role.length&&(a.role=this.role[0]):a.role=this.role),a}get initialState(){return{content:"",entities:this.fb.control([])}}get rolesAllowedToPost$(){const a=this.newsfeedCfg.latest("postRestriction").pipe((0,F.U)(e=>e??!0));return this.discGroupCfg.latest("postRestriction").pipe((0,P.w)(e=>this.role$.pipe((0,P.w)(r=>{if(!r)return a;
1if(Array.isArray(r)){let l;for(const M of r)if(null!=(l=e[M]))return(0,W.of)(l);return(0,W.of)(!0)}return(0,W.of)(e[r]??!0)}))),(0,H.R)(this._destroyed$),(0,L.p)(),(0,N.d)(1))}entityRemoved(a){const e=this.form.controls.entities,r=[...e.value],l=r.splice(a,1)[0];e.setValue(r),(0,zt.H)(0).pipe((0,H.R)(this._destroyed$)).subscribe(()=>{this.attachBtn.removeFile(l)})}ngOnDestroy(){try{super.ngOnDestroy()}finally{this.posted.complete(),(0,Ie.unsubscribeFromAll)(this._subs)}}ngOnInit(){this.entities$=(0,St.observeControlValue)(this.form.controls.entities).pipe((0,H.R)(this._destroyed$),(0,N.d)(1)),this.roleBasedConfig$=this.role$.pipe((0,F.U)(Boolean),(0,k.x)(),(0,P.w)(a=>a?this.discGroupCfg.latest():this.newsfeedCfg.latest()),(0,H.R)(this._destroyed$),(0,N.d)(1)),this.maxLength$=this.inputMaxLength$.pipe((0,P.w)(a=>a>0?(0,W.of)(a):this.roleBasedConfig$.pipe((0,F.U)(e=>e.inputMaxLength))),(0,k.x)(),(0,H.R)(this._destroyed$),(0,w.H)("[FeedInput.maxLength$]"),(0,N.d)(1)),this.hideFeedInputIfCantPost$=this.roleBasedConfig$.pipe((0,F.U)(a=>a.hideFeedInputIfCantPost),(0,k.x)(),(0,H.R)(this._destroyed$),(0,N.d)(1)),this._subs=[this.initUrlObservable().subscribe((0,i.e)(a=>{this.form.controls.entities.setValue(a)})),this.onEnter.subscribe(p.V),this.userSvc.resourcefulStore.pipe((0,at.q)(1)).subscribe(a=>{this.user=a.user,this.cdr.markForCheck()})]}post(){this.form.valid&&(0,ce.x)(this.newsRes.message(this.formattedPayload).pipe((0,et.b)({error:()=>{this.alertSvc.alertError({key:"unableToPost",ns:fe.useValue})},next:()=>{this.alertSvc.alertSuccess({key:"msgAdded",ns:fe.useValue}),this.posted.emit(1)}})),de.z).pipe((0,H.R)(this._destroyed$),(0,et.b)(()=>{this.resetForm(),this.cdr.markForCheck()}),(0,w.H)("[FeedInput.post]")).subscribe(p.V)}initUrlObservable(){return this.form.controls.content.valueChanges.pipe((0,v.b)(250),(0,E.h)(a=>this.metaInfoSvc.hasUrl(a)),(0,P.w)(a=>this.metaInfoSvc.resolve(a)),(0,F.U)(a=>{const e=(this.form.value.entities||[]).filter(Wt);return a&&e.push({description:a.description||"",domain:a.domain,image:a.image,name:a.name,type:"url",url:a.url||a.video||""}),e}),(0,w.H)("[FeedInput.initUrlObservable]"),function T(){var s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0,e=s&&"object"==typeof s?s:{count:s},r=e.count,l=void 0===r?1/0:r,M=e.delay,ot=e.resetOnSuccess,_t=void 0!==ot&&ot;return l<=0?_.y:(0,ge.e)(function(Ut,Et){var Qt,Vt=0;!function yn(){var In=!1;Qt=Ut.subscribe((0,Xt.x)(Et,function(He){_t&&(Vt=0),Et.next(He)},void 0,function(He){if(Vt++<l){var On=function(){Qt?(Qt.unsubscribe(),Qt=null,yn()):In=!0};if(null!=M){var so="number"==typeof M?(0,zt.H)(M):(0,q.Xf)(M(He,Vt)),Mn=(0,Xt.x)(Et,function(){Mn.unsubscribe(),On()},function(){Et.complete()});so.subscribe(Mn)}else On()}else Et.error(He)})),In&&(Qt.unsubscribe(),Qt=null,yn())}()})}({delay:1e3}))}resetForm(){const a=this.initialState,e=this.form.controls;e.content.reset(a.content),e.entities.reset(a.entities.value),this.attachBtn.reset(),e.content.markAsPristine(),e.content.markAsUntouched(),e.content.updateValueAndValidity()}}Lt.\u0275fac=function(a){return new(a||Lt)(t.Y36(ke.Z),t.Y36(At.t),t.Y36(We.KD),t.Y36(Dt.QS),t.Y36(t.sBO),t.Y36(y.r),t.Y36(Ge.Z),t.Y36(st.c))},Lt.\u0275cmp=t.Xpm({type:Lt,selectors:[["tg-feedinput"]],viewQuery:function(a,e){if(1&a&&t.Gf(we,5),2&a){let r;t.iGM(r=t.CRH())&&(e.attachBtn=r.first)}},inputs:{buttonLabel:"buttonLabel",feedentry:"feedentry",placeholder:"placeholder",showLogos:"showLogos"},outputs:{posted:"posted"},features:[t._Bn([fe]),t.qOj],ngContentSelectors:["[tgFeedInputButton]"],decls:4,vars:4,consts:[[3,"feeditem","formGroup",4,"ngIf","ngIfElse"],["cantPost",""],[3,"formGroup"],["up","tg-upload-outlet"],[3,"ngIf"],[3,"ngClass"],[3,"placeholder","maxlength","formControlName","required","buttonLabel","submit","keydown.enter"],["tgTextarea","tgTextarea"],[1,"tg-feedinput-btn",3,"formControlName"],["attachBtn","feedinput-attach-btn"],[4,"ngIf"],[3,"autoClear"],[1,"feeditem-logos"],["class","feeditem-logo",3,"tg-profile-picture",4,"ngIf"],[1,"feeditem-logo",3,"tg-profile-picture"],[3,"editable","entities","entityRemoved"],["class","alert alert-info",4,"ngIf"],[1,"alert","alert-info"]],template:function(a,e){if(1&a&&(t.F$t(Ee),t.YNc(0,tn,14,21,"tg-upload-outlet",0),t.ALo(1,"async"),t.YNc(2,nn,2,3,"ng-template",null,1,t.W1O)),2&a){const r=t.MAs(3);t.Q6J("ngIf",t.lcZ(1,2,e.canPost$))("ngIfElse",r)}}
1,dependencies:[Ke.Q,me.O,je.u,Ve.U,C.mk,C.O5,f.a,Dt.JJ,Dt.JL,Dt.Q7,Dt.nD,Dt.sg,Dt.u,Oe.Y,pe.V,Me.u,C.Ov,Ft.H],styles:['.feeditem-logos[_ngcontent-%COMP%]{float:left;width:32px}.feeditem-logos[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{display:block}.feeditem-logo[_ngcontent-%COMP%]{color:#fff;font-size:24px;height:32px;line-height:32px;text-align:center;width:32px}.feeditem-logo.twitter[_ngcontent-%COMP%]{background-color:#000}.feeditem-logo.twitter[_ngcontent-%COMP%]:before{background-color:#fff;background-size:1em}.feeditem-logo[_ngcontent-%COMP%]   .fa.fa-twitter[_ngcontent-%COMP%]:before, .feeditem-logo.twitter[_ngcontent-%COMP%]:before{background-position:50%;content:"";display:inline-block;height:1em;-webkit-mask:url(\'data:image/svg+xml;utf8,<svg viewBox="0 -8 26 30" xmlns="http://www.w3.org/2000/svg"><g><path fill="white" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></g></svg>\') no-repeat center;mask:url(\'data:image/svg+xml;utf8,<svg viewBox="0 -8 26 30" xmlns="http://www.w3.org/2000/svg"><g><path fill="white" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></g></svg>\') no-repeat center;width:1em}.feeditem-logo[_ngcontent-%COMP%]   .fa.fa-twitter[_ngcontent-%COMP%]:before{background-color:currentColor}.feeditem-logo.facebook[_ngcontent-%COMP%]{background-color:#3b5998}.feeditem-logo.facebook[_ngcontent-%COMP%]:after{content:"\\f09a";
1font-family:FontAwesome}.feeditem-logo.blog[_ngcontent-%COMP%]{background-color:#2f2963}.feeditem-logo.blog[_ngcontent-%COMP%]:after{content:"\\f040";font-family:FontAwesome}.feeditem-logo.article[_ngcontent-%COMP%]{background-color:#2f2963}.feeditem-logo.article[_ngcontent-%COMP%]:after{content:"\\f1ea";font-family:FontAwesome}@media (min-width:768px){.feeditem-logos[_ngcontent-%COMP%]{width:128px}.feeditem-logos.sm[_ngcontent-%COMP%]{width:64px}.feeditem-logos[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{float:right;height:64px;width:64px}.feeditem-logo[_ngcontent-%COMP%]{font-size:36px;height:64px;line-height:64px;width:64px}}',".feeditem-content[_ngcontent-%COMP%]{margin-left:36px;overflow:hidden}.feeditem-content[_ngcontent-%COMP%]   .share-button[_ngcontent-%COMP%]{margin-top:4px}.feeditem-content[_ngcontent-%COMP%]:hover   .action-button[_ngcontent-%COMP%]{visibility:visible}.feeditem-content[_ngcontent-%COMP%] > .panel-body[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{overflow-wrap:break-word}@media (min-width:768px){.feeditem-content[_ngcontent-%COMP%]{margin-left:132px}.feeditem-content.sm[_ngcontent-%COMP%]{margin-left:68px}}"],data:{animation:[j.A,Ct.g]},changeDetection:0}),(0,n.gn)([(0,U.a)()],Lt.prototype,"canPost$",null),(0,n.gn)([(0,U.a)()],Lt.prototype,"form",null),(0,n.gn)([(0,U.a)()],Lt.prototype,"rolesAllowedToPost$",null);var sn=o(19259),qt=o(87563),Ae=o(43383),Pe=o(45877),Fe=o(43061),te=o(64852),rn=o(84416);function an(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"li",10),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(4);return t.KtG(l.banUnban(!0))}),t.TgZ(1,"a",11),t._UZ(2,"i",12),t.TgZ(3,"span"),t._uU(4),t.ALo(5,"tr"),t.qZA()()()}if(2&s){const e=t.oxw(4);t.xp6(4),t.hij("\xa0",t.xi3(5,1,"ban",e.ns),"")}}function ln(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"li",10),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(5);return t.KtG(l.banUnban(!1))}),t.TgZ(1,"a",11),t._UZ(2,"i",12),t.TgZ(3,"span"),t._uU(4),t.ALo(5,"tr"),t.qZA()()()}if(2&s){const e=t.oxw(5);t.xp6(4),t.hij("\xa0",t.xi3(5,1,"unban",e.ns),"")}}function cn(s,a){if(1&s&&t.YNc(0,ln,6,4,"li",6),2&s){const e=t.oxw(4);t.Q6J("ngIf",e.shouldShowUnban)}}function dn(s,a){if(1&s&&(t.YNc(0,an,6,4,"li",8),t.YNc(1,cn,1,1,"ng-template",null,9,t.W1O)),2&s){const e=t.MAs(2),r=t.oxw(3);t.Q6J("ngIf",r.shouldShowBan)("ngIfElse",e)}}function De(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"li",10),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(3);return t.KtG(l.output.emit(l.event.EDIT_BEGIN))}),t.TgZ(1,"a",11),t._UZ(2,"i",13),t.TgZ(3,"span"),t._uU(4),t.ALo(5,"tr"),t.qZA()()()}if(2&s){const e=t.oxw(3);t.xp6(4),t.hij("\xa0",t.xi3(5,1,"edit",e.ns),"")}}function he(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"li",10),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(4);return t.KtG(l.pinUnpin(!0))}),t.TgZ(1,"a",11),t._UZ(2,"i",15),t.TgZ(3,"span"),t._uU(4),t.ALo(5,"tr"),t.qZA()()()}if(2&s){const e=t.oxw(4);t.xp6(4),t.hij("\xa0",t.xi3(5,1,"pin",e.ns),"")}}function gn(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"li",10),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(5);return t.KtG(l.pinUnpin(!1))}),t.TgZ(1,"a",11),t._UZ(2,"i",15),t.TgZ(3,"span"),t._uU(4),t.ALo(5,"tr"),t.qZA()()()}if(2&s){const e=t.oxw(5);t.xp6(4),t.hij("\xa0",t.xi3(5,1,"unpin",e.ns),"")}}function mn(s,a){if(1&s&&t.YNc(0,gn,6,4,"li",6),2&s){const e=t.oxw(4);t.Q6J("ngIf",e.shouldShowUnpin)}}function Le(s,a){if(1&s&&(t.ynx(0),t.YNc(1,he,6,4,"li",8),t.YNc(2,mn,1,1,"ng-template",null,14,t.W1O),t.BQk()),2&s){const e=t.MAs(3),r=t.oxw(3);t.xp6(1),t.Q6J("ngIf",r.shouldShowPin)("ngIfElse",e)}}function Gt(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"li",10),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(3);return t.KtG(l.deleteConfirm())}),t.TgZ(1,"a",11),t._UZ(2,"i",16),t.TgZ(3,"span"),t._uU(4),t.ALo(5,"tr"),t.qZA()()()}if(2&s){const e=t.oxw(3);t.xp6(4),t.hij("\xa0",t.xi3(5,1,"delete",e.ns),"")}}function Ue(s,a){if(1&s&&(t.TgZ(0,"ul",5),t.YNc(1,dn,3,2,"ng-template",0),t.YNc(2,De,6,4,"li",6),t.YNc(3,Le,4,2,"ng-container",7),t.YNc(4,Gt,6,4,"li",6),t.qZA()),2&s){const e=t.oxw(2);t.Q6J("id",e.dropdownId),t.uIk("aria-labelledby",e.btnId),t.xp6(1),t.Q6J("ngIf",e.shouldShowBanUnban),t.xp6(1),t.Q6J("ngIf",e.shouldShowEdit),t.xp6(1),t.Q6J("ngIf",e.shouldShowPinUnpin),t.xp6(1),t.Q6J("ngIf",e.shouldShowDelete)}}function pn(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"div",1),t.NdJ("onShown",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.isOpen=!0)})("onHidden",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.isOpen=!1)}),t.TgZ(1,"button",2),t._UZ(2,"tg-caret",3),t.qZA(),t.YNc(3,Ue,5,6,"ul",4),t.qZA()}if(2&s){const e=t.oxw();t.Q6J("placement","bottom")("container","body"),t.xp6(1),t.Q6J("id",e.btnId),t.uIk("aria-controls",e.dropdownId),t.xp6(1),t.Q6J("direction",e.isOpen?"up":"down")}}var $t=(()=>{return(s=$t||($t={}))[s.EDIT_BEGIN=0]="EDIT_BEGIN",$t;var s})();let Ze=(()=>{class s{constructor(e,r,l,M,ot){this.tgModal=e,this.cdr=r,this.alertSvc=l,this.newsRes=ot,this.event=$t,this.isOpen=!1,this.ns="newsfeed",this.output=new t.vpe(!0),M?(this.isAdmin=M.isSiteAdmin,this.userID=M.id):this.isAdmin=!1,this.itemChange=new t.vpe,this._destroyed$=this.itemChange.pipe((0,vt.Z)(null,null))}banUnban(e){const r=this.comment?.user||this.item.user,l=`${r.firstname} ${r.lastname}`,ot={userId:this.writerID};this.tgModal.confirmTranslated(e?"confirmBan":"confirmUnban",this.ns,{member:l}).pipe((0,Pe.z)(()=>e?this.newsRes.ban(ot):this.newsRes.unban(ot)),(0,F.U)(_t=>this.item.$clone({user:_t})),(0,H.R)(this._destroyed$),(0,w.H)(`[FeedItemDropdown.${e?"ban":"unban"}]`)).subscribe({error:()=>
1{this.alertSvc.alertError({key:e?"memberBanFail":"memberUnbanFail",ns:this.ns,placeholders:{member:l}})},next:_t=>{this.item=_t,this.itemChange.emit(_t),this.cdr.markForCheck(),this.alertSvc.alertSuccess({key:e?"memberBanned":"memberUnbanned",ns:this.ns,placeholders:{member:l}})}})}deleteConfirm(){const e=this.comment;this.tgModal.confirmTranslated(e?"confirmDeleteComment":"confirmDelete",this.ns).pipe((0,P.w)(()=>e?this.newsRes.deleteComment({id:e.newsfeed,commentId:e.id}):this.newsRes.delete(this.item.id))).subscribe({error:()=>{this.alertSvc.alertError({key:e?"commentDeleteFail":"msgDeleteFail",ns:this.ns})},next:()=>{this.alertSvc.alertSuccess({key:e?"commentDeleted":"msgDeleted",ns:this.ns})}})}ngOnChanges({item:e,comment:r}){const l=this.item,M=this.comment,ot="twitter"===l?.source;if(e||r){this.writerID=(M||l)?.user?.id,this.isOwnPost=Boolean(this.writerID&&this.userID)&&this.writerID===this.userID;const _t="message"===l?.source,Ut=this.isAdmin&&!this.isOwnPost,Et=this.isAdmin||this.isOwnPost;this.shouldShowBanUnban=(_t||Boolean(M))&&Ut,this.shouldShowPinUnpin=_t&&this.isAdmin,this.shouldShowEdit=Et&&!ot,this.shouldShowDelete=Et}if(e&&!ot){const _t=this.item.user?.roles;Array.isArray(_t)?(this.shouldShowUnban=_t.includes("newsfeed:banned"),this.shouldShowBan=!this.shouldShowUnban):this.shouldShowUnban=this.shouldShowBan=!1,l&&(this.shouldShowPin=!l.pinned,this.shouldShowUnpin=!this.shouldShowPin)}}ngOnDestroy(){(0,Q.completeAll)(this.output,this.itemChange)}ngOnInit(){this.btnId=(0,Ae.Z)("feeditem-dropdown-btn-"),this.dropdownId=(0,Ae.Z)("feeditem-dropdown-")}pinUnpin(e){const l={id:this.item.id};this.tgModal.confirmTranslated(e?"confirmPin":"confirmUnpin",this.ns).pipe((0,Pe.z)(()=>e?this.newsRes.pin(l):this.newsRes.unpin(l)),(0,F.U)(({pinned:M})=>this.item.$clone({pinned:M})),(0,w.H)(`[FeedItem.${e?"pin":"unpin"}]`)).subscribe({error:()=>{this.alertSvc.alertError({key:e?"pinFail":"unpinFail",ns:this.ns})},next:M=>{this.item=M,this.itemChange.emit(M),this.cdr.markForCheck(),this.alertSvc.alertSuccess({key:e?"pinSuccess":"unpinSuccess",ns:this.ns})}})}}return s.\u0275fac=function(e){return new(e||s)(t.Y36(Fe.U),t.Y36(t.sBO),t.Y36(st.c),t.Y36(ct.Ej),t.Y36(y.r))},s.\u0275cmp=t.Xpm({type:s,selectors:[["tg-feeditem-dropdown"]],inputs:{comment:"comment",item:"item"},outputs:{itemChange:"itemChange",output:"feedItemEvent"},features:[t.TTD],decls:1,vars:1,consts:[[3,"ngIf"],["dropdown","",1,"dropdown",3,"placement","container","onShown","onHidden"],["dropdownToggle","","type","button",1,"btn","btn-xs","btn-default","feeditem-action-btn","dropdown-toggle",3,"id"],[3,"direction"],["class","dropdown-menu dropdown-menu-right","role","menu",3,"id",4,"dropdownMenu"],["role","menu",1,"dropdown-menu","dropdown-menu-right",3,"id"],["role","menuitem",3,"click",4,"ngIf"],[4,"ngIf"],["role","menuitem",3,"click",4,"ngIf","ngIfElse"],["unbanLi",""],["role","menuitem",3,"click"],["href","#",1,"dropdown-item"],[1,"fa","fa-fw","fa-ban"],[1,"fa","fa-fw","fa-pencil"],["unpinLi",""],[1,"fa","fa-fw","fa-thumb-tack"],[1,"fa","fa-fw","fa-tras
1h"]],template:function(e,r){1&e&&t.YNc(0,pn,4,5,"ng-template",0),2&e&&t.Q6J("ngIf",r.userID)},dependencies:[te.Hz,te.Mq,te.TO,C.O5,Zt.G,Pt.k,rn.K,Ft.H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),s})();var Se=o(72782),un=o(90237);let _e=(()=>{class s{constructor(){this.contentChange=new t.vpe,this.isOwnPost=!1,this.user=(0,t.f3M)(ct.Ej),this.cdr=(0,t.f3M)(t.sBO),this.isAdmin=this.canEdit=Boolean(this.user?.isSiteAdmin)}ngOnChanges(e){e.content&&(this.contentUser=this.content.user,this.isOwnPost=Boolean(this.contentUser&&this.user)&&this.contentUser.id===this.user.id,this.canEdit=this.isAdmin||this.isOwnPost)}ngOnDestroy(){this.contentChange.complete()}onContentChanged(e){this.content=e,this.contentChange.emit(e),this.cdr.markForCheck()}}return s.\u0275fac=function(e){return new(e||s)},s.\u0275dir=t.lG2({type:s,inputs:{content:"content"},outputs:{contentChange:"contentChange"},features:[t.TTD]}),s})();var Be=o(17789),Kt=o(62174),Bt=o(72922),ee=o(54756);let Ce=(()=>{class s{ngOnChanges(){const e=this.user;this.params={userId:e.id},this.text=`${e.firstname} ${e.lastname}`}}return s.\u0275fac=function(e){return new(e||s)},s.\u0275cmp=t.Xpm({type:s,selectors:[["tg-feeditem-userlink"]],inputs:{user:"user"},features:[t.TTD],decls:2,vars:2,consts:[["uiSref","addressbook.profile",3,"uiParams"]],template:function(e,r){1&e&&(t.TgZ(0,"a",0),t._uU(1),t.qZA()),2&e&&(t.Q6J("uiParams",r.params),t.xp6(1),t.Oqu(r.text))},dependencies:[Pt.k,Bt.UISref,Bt.AnchorUISref],encapsulation:2,changeDetection:0}),s})();var ne,Re=o(507),Ne=o(34270),fn=o(95529),hn=o(20683);function oe(s,a){if(1&s){const e=t.EpF();
1t._UZ(0,"dot-separator"),t.TgZ(1,"a",3),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(2);return t.KtG(l.showComments$.next(!l.showComments$.value))}),t.qZA()}}function wt(s,a){if(1&s&&(t.TgZ(0,"div",4),t.ALo(1,"tr"),t._UZ(2,"dot-separator")(3,"i",5),t.TgZ(4,"span"),t._uU(5),t.ALo(6,"toLocaleString"),t.qZA()()),2&s){const e=t.oxw(2);t.Q6J("content",e.content)("type",e.type)("tooltip",t.lcZ(1,4,e.isComment?"likesTooltipComment":"likesTooltip")),t.xp6(5),t.hij("\xa0",t.lcZ(6,6,e.content.likes||0),"")}}function ve(s,a){if(1&s&&(t._UZ(0,"i",10),t.TgZ(1,"span"),t._uU(2),t.ALo(3,"toLocaleString"),t.qZA()),2&s){const e=t.oxw(4);t.xp6(2),t.hij("\xa0",t.lcZ(3,1,e.content.comments_count||0),"")}}const Je=function(s){return{postId:s}};function Qe(s,a){if(1&s&&(t.TgZ(0,"a",11),t.GkF(1,12),t.qZA()),2&s){t.oxw();const e=t.MAs(2),r=t.oxw(3);t.Q6J("uiParams",t.VKq(2,Je,r.content.slug||r.content.id)),t.xp6(1),t.Q6J("ngTemplateOutlet",e)}}function _n(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"div",13),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(4);return t.KtG(l.showComments$.next(!l.showComments$.value))}),t.GkF(1,12),t.qZA()}if(2&s){t.oxw();const e=t.MAs(2);t.xp6(1),t.Q6J("ngTemplateOutlet",e)}}function Cn(s,a){if(1&s&&(t._UZ(0,"dot-separator"),t.YNc(1,ve,4,3,"ng-template",null,7,t.W1O),t.YNc(3,Qe,2,4,"a",8),t.YNc(4,_n,2,1,"ng-template",null,9,t.W1O)),2&s){const e=t.MAs(5),r=t.oxw(3);t.xp6(3),t.Q6J("ngIf",r.isBlog)("ngIfElse",e)}}function d(s,a){if(1&s&&(t.TgZ(0,"tg-upload-outlet",14),t._UZ(1,"tg-feed-comment-input",15),t.qZA()),2&s){const e=t.oxw(3);t.Q6J("formGroup",e.commentForm),t.xp6(1),t.Q6J("postId",e.content.id)}}function g(s,a){if(1&s&&(t.YNc(0,Cn,6,2,"ng-template",0),t.YNc(1,d,2,2,"tg-upload-outlet",6),t.ALo(2,"async")),2&s){const e=t.oxw(2);t.Q6J("ngIf",!e.isComment&&(e.content.comments_count||e.isBlog)),t.xp6(1),t.Q6J("ngIf",t.lcZ(2,2,e.showComments$))}}function D(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"a",1),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.likeUnlike(!l.content.wasLiked))}),t.qZA(),t.YNc(1,oe,2,0,"ng-template",0),t.YNc(2,wt,7,8,"div",2),t.YNc(3,g,3,4,"ng-template",0)}if(2&s){const e=t.oxw();t.Q6J("translate",e.content.wasLiked?"unlike":"like"),t.xp6(1),t.Q6J("ngIf",e.isNewsfeed&&e.commentsEnabled),t.xp6(1),t.Q6J("ngIf",e.content.likes),t.xp6(1),t.Q6J("ngIf",e.commentsEnabled)}}const h=Symbol("Subscriptions");class S extends Re.p{constructor(a){super(),this.sock=a,this[ne]=[]}ngOnDestroy(){try{super.ngOnDestroy()}finally{(0,Ie.unsubscribeFromAll)(this[h])}}ngOnInit(){this[h].push(this.sock.onMultiple("newsfeed:newsitem:like","newsfeed:comment:like").pipe((0,E.h)(a=>this.isLikeOfCurrent(a)),(0,F.U)(a=>this.likeIsOwn(a)),(0,w.H)("[FeedControls.onLike]")).subscribe((0,i.e)(this.applyLike.bind(this,1))),this.sock.onMultiple("newsfeed:newsitem:unlike","newsfeed:comment:unlike").pipe((0,E.h)(a=>this.isLikeOfCurrent(a)),(0,F.U)(a=>this.likeIsOwn(a)),(0,w.H)("[FeedControls.onUnlike]")).subscribe((0,i.e)(this.applyLike.bind(this,-1))))}applyLike(a,e){const r={likes:(this.content.likes||0)+a};e.isOwn&&(r.wasLiked=1===a),this.content=this.content.$clone(r),this.contentChange.emit(this.content),this.cdr.markForCheck()}isLikeOfCurrent(a){if(this.content){if(this.isComment&&a.comment)return b.SP.extractId(a.comment)===this.content.id;if(this.isBlog&&a.post)return b.SP.extractId(a.post)===this.content.id;if(this.isNewsfeed&&a.newsfeed&&!a.comment)return b.SP.extractId(a.newsfeed)===this.content.id}return!1}likeIsOwn(a){return{isOwn:Boolean(this.loggedInUser)&&this.loggedInUser.id===b.SP.extractId(a.user),like:a}}}ne=h,S.\u0275fac=function(a){return new(a||S)(t.Y36(J.o))},S.\u0275cmp=t.Xpm({type:S,selectors:[["tg-feed-controls"]],features:[t._Bn([{provide:lt.z,useValue:"newsfeed"}]),t.qOj],decls:1,vars:1,consts:[[3,"ngIf"],["href","#",3,"translate","click"],["class","txt-control","tgGetLikes","",3,"content","type","tooltip",4,"ngIf"],["href","#","translate","comment",3,"click"],["tgGetLikes","",1,"txt-control",3,"content","type","tooltip"],[1,"fa","fa-thumbs-o-up"],[3,"formGroup",4,"ngIf"],["commentIconInner",""],["class","txt-control","uiSref","blog.view",3,"uiParams",4,"ngIf","ngIfElse"],["notABlog",""],[1,"fa","fa-commenting-o"],["uiSref","blog.view",1,"txt-control",3,"uiParams"],[3,"ngTemplateOutlet"],[1,"txt-control",3,"click"],[3,"formGroup"],[3,"postId"]],template:function(a,e){1&a&&t.YNc(0,D,4,4,"ng-template",0),2&a&&t.Q6J("ngIf",e.content)},dependencies:[Yt.i9,me.O,C.O5,C.tP,Zt.G,rt.P,kt.K,Kt.j,Pt.k,Bt.UISref,Bt.AnchorUISref,Dt.JL,Dt.sg,Ne.M,fn.P,C.Ov,Ft.H,hn.U],styles:["[_nghost-%COMP%]{display:block;margin-top:10px}.txt-control[_ngcontent-%COMP%]{cursor:pointer;display:inline}a.txt-control[_ngcontent-%COMP%]{color:#333!important;text-decoration:none!important}"],data:{animation:[j.A,Ct.g]},changeDetection:0});var K=o(2297),tt=o(54646);function V(s,a){if(1&s&&t._UZ(0,"tg-feeditem-userlink",12),2&s){const e=t.oxw();t.Q6J("user",e.contentUser)}}function it(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"tg-feeditem-dropdown",13),t.NdJ("itemChange",function(l){t.CH
1M(e);const M=t.oxw();return t.KtG(M.onContentChanged(l))})("feedItemEvent",function(l){t.CHM(e);const M=t.oxw();return t.KtG(M.onFeedEvent(l))}),t.qZA()}if(2&s){const e=t.oxw();t.Q6J("item",e.content)("comment",e.content)}}function ut(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"tg-feed-comment-input",14),t.NdJ("editEnd",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.editing=!1)}),t.TgZ(1,"button",15),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.editing=!1)}),t._uU(2),t.ALo(3,"tr"),t.qZA()()}if(2&s){const e=t.oxw();t.Q6J("postId",e.postID)("comment",e.content),t.xp6(2),t.Oqu(t.xi3(3,3,"cancel","newsfeed"))}}function gt(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"tg-feed-controls",18),t.NdJ("contentChange",function(l){t.CHM(e);const M=t.oxw(2);return t.KtG(M.onContentChanged(l))}),t.qZA()}if(2&s){const e=t.oxw(2);t.Q6J("content",e.content)("type",e.contentType)}}function xt(s,a){if(1&s&&(t._UZ(0,"p",16),t.ALo(1,"tgUserMentions"),t.ALo(2,"parseLinks"),t.YNc(3,gt,1,2,"tg-feed-controls",17)),2&s){const e=t.oxw();t.Q6J("innerHTML",t.xi3(1,2,t.lcZ(2,5,e.content.message),e.userMentions),t.oJD),t.xp6(3),t.Q6J("ngIf",e.showControls)}}function bt(s,a){if(1&s&&t._UZ(0,"tg-feedentities",19),2&s){const e=t.oxw();t.Q6J("hrPosition","bottom")("entities",e.content.entities)}}let ht=(()=>{class s extends _e{constructor(e){super(),this.sock=e,this.contentType="comment",this._inputMaxLength=-1}get inputMaxLength(){return this._inputMaxLength}set inputMaxLength(e){let r;const l=typeof e;null==e?r=-1:"number"!==l?(console.log(Object.getPrototypeOf(this).constructor.name,"received",l,"maxlength input:",e),r=-1):r=e<1?-1:e,this._inputMaxLength=r}ngOnChanges(e){if(super.ngOnChanges(e),e.content){const r=this.content;r.newsfeed?this.postID=b.SP.extractId(r.newsfeed):r.post&&(this.postID=b.SP.extractId(r.post)),this.userLinkParams={userId:b.SP.extractId(r.user)},this.userMentions=r.user_mentions}}ngOnInit(){const e=this.contentChange.pipe((0,vt.Z)(null,null));this.sock.on("newsfeed:comment:update").pipe((0,E.h)(r=>r.id===this.content.id),(0,F.U)(r=>this.content.$clone(r)),(0,w.H)("[TgFeedComment.onCommentUpdate]"),(0,qt.K)((r,l)=>l),(0,H.R)(e)).subscribe((0,i.e)(r=>{this.content=r,this.contentChange.emit(r),this.cdr.markForCheck()}))}onFeedEvent(e){e===$t.EDIT_BEGIN&&!this.editing&&(this.editing=!0,this.cdr.markForCheck())}}return s.\u0275fac=function(e){return new(e||s)(t.Y36(J.o))},s.\u0275cmp=t.Xpm({type:s,selectors:[["tg-feed-comment"]],inputs:{eventID:["event","eventID"],groupID:["group","groupID"],role:"role",showControls:"showControls",inputMaxLength:["maxLength","inputMaxLength"]},features:[t.qOj,t.TTD],decls:15,vars:8,consts:[[1,"f","r","sb"],[1,"userpic"],["uiSref","addressbook.profile",3,"uiParams"],[1,"feeditem-logo",3,"tg-profile-picture"],[1,"f","c"],[1,"f","r","sb","rel"],["class","heading headlink",3,"user",4,"ngIf"],[3,"date"],[3,"item","comment","itemChange","feedItemEvent",4,"ngIf"],[3,"postId","comment","editEnd",4,"ngIf","ngIfElse"],["notEditing",""],[3,"hrPosition","entities",4,"ngIf"],[1,"heading","headlink",3,"user"],[3,"item","comment","itemChange","feedItemEvent"],[3,"postId","comment","editEnd"],["tgFeedInputButton","","type","button",1,"btn","btn-sm","btn-danger",3,"click"],[1,"show-new-line",3,"innerHTML"],["class","nmt",3,"content","type","contentChange",4,"ngIf"],[1,"nmt",3,"content","type","contentChange"],[3,"hrPosition","entities"]],template:function(e,r){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"a",2),t._UZ(3,"img",3),t.qZA()(),t.TgZ(4,"div",4)(5,"div",5)(6,"div"),t.YNc(7,V,1,1,"tg-feeditem-userlink",6),t._UZ(8,"dot-separator")(9,"tg-moment-ago",7),t.qZA(),t.YNc(10,it,1,2,"tg-feeditem-dropdown",8),t.qZA(),t.YNc(11,ut,4,6,"tg-feed-comment-input",9),t.YNc(12,xt,4,7,"ng-template",null,10,t.W1O),t.qZA()(),t.YNc(14,bt,1,2,"tg-feedentities",11)),2&e){const l=t.MAs(13);t.xp6(2),t.Q6J("uiParams",r.userLinkParams),t.xp6(1),t.Q6J("tg-profile-picture",r.contentUser),t.xp6(4),t.Q6J("ngIf",r.content.user),t.xp6(2),t.Q6J("date",r.content.createdAt),t.xp6(1),t.Q6J("ngIf",r.canEdit&&!r.editing),t.xp6(1),t.Q6J("ngIf",r.editing)("ngIfElse",l),t.xp6(3),t.Q6J("ngIf",!r.editing&&(null==r.content.entities?null:r.content.entities.length))}},dependencies:[Be.U,C.O5,Kt.j,Pt.k,Bt.UISref,Bt.AnchorUISref,Oe.Y,pe.V,ee.A,Ce,S,Ze,Ne.M,K.J,tt.U,Ft.H],styles:['.feeditem-logos[_ngcontent-%COMP%]{float:left;width:32px}.feeditem-logos[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{display:block}.feeditem-logo[_ngcontent-%COMP%]{color:#fff;font-size:24px;height:32px;line-height:32px;text-align:center;width:32px}.feeditem-logo.twitter[_ngcontent-%COMP%]{background-color:#000}.feeditem-logo.twitter[_ngcontent-%COMP%]:before{background-color:#fff;background-size:1em}.feeditem-logo[_ngcontent-%COMP%]   .fa.fa-twitter[_ngcontent-%COMP%]:before, .feeditem-logo.twitter[_ngcontent-%COMP%]:before{background-position:50%;content:"";display:inline-block;height:1em;-webkit-mask:url(\'data:image/svg+xml;utf8,<svg viewBox="0 -8 26 30" xmlns="http://www.w3.org/2000/svg"><g><path fill="white" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></g></svg>\') no-repeat center;mask:url(\'data:image/svg+xml;utf8,<svg viewBox="0 -8 26 30" xmlns="http://www.w3.org/2000/svg"><g><path fill="white" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></g></svg>\') no-repeat center;width:1em}.feeditem-logo[_ngcontent-%COMP%]   .fa.fa-twitter[_ngcontent-%COMP%]:before{background-color:currentColor}.feeditem-logo.facebook[_ngcontent-%COMP%]{background-color:#3b5998}.feeditem-logo.facebook[_ngcontent-%COMP%]:after{content:"\\f09a";
1font-family:FontAwesome}.feeditem-logo.blog[_ngcontent-%COMP%]{background-color:#2f2963}.feeditem-logo.blog[_ngcontent-%COMP%]:after{content:"\\f040";font-family:FontAwesome}.feeditem-logo.article[_ngcontent-%COMP%]{background-color:#2f2963}.feeditem-logo.article[_ngcontent-%COMP%]:after{content:"\\f1ea";font-family:FontAwesome}@media (min-width:768px){.feeditem-logos[_ngcontent-%COMP%]{width:128px}.feeditem-logos.sm[_ngcontent-%COMP%]{width:64px}.feeditem-logos[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{float:right;height:64px;width:64px}.feeditem-logo[_ngcontent-%COMP%]{font-size:36px;height:64px;line-height:64px;width:64px}}',".headlink[_ngcontent-%COMP%]{font-weight:700;overflow-wrap:anywhere;word-break:normal}.lastclear[_ngcontent-%COMP%]{clear:both}.show-new-line[_ngcontent-%COMP%]{white-space:pre-wrap}","[_nghost-%COMP%]{display:flex;flex-direction:column;margin-top:.5em}.userpic[_ngcontent-%COMP%]{flex-shrink:0}.w100[_ngcontent-%COMP%]{width:100%}.rel[_ngcontent-%COMP%]{position:relative}.nmt[_ngcontent-%COMP%]{margin-top:0}.f[_ngcontent-%COMP%]{display:flex;flex:1 1 auto}.f[_ngcontent-%COMP%]   .sb[_ngcontent-%COMP%]{justify-content:space-between}.f.r[_ngcontent-%COMP%]{flex-direction:row}.f.c[_ngcontent-%COMP%]{flex-direction:column;overflow:hidden;padding-left:12px}"],changeDetection:0}),s})();var Rt=o(56439),Ht=o(28905),Nt=o(62441);function Jt(s,a){1&s&&t._UZ(0,"i",10)}function It(s,a){if(1&s&&(t.TgZ(0,"a",11),t._uU(1),t.qZA()),2&s){const e=t.oxw();t.Q6J("href",e.content.heading_url,t.LSH),t.xp6(1),t.Oqu(e.content.heading)}}function xe(s,a){if(1&s&&t._UZ(0,"tg-feeditem-userlink",13),2&s){const e=t.oxw(2);t.Q6J("user",e.contentUser)}}function Ye(s,a){if(1&s&&t.YNc(0,xe,1,1,"tg-feeditem-userlink",12),2&s){const e=t.oxw();t.Q6J("ngIf",e.content.user)}}function vn(s,a){1&s&&t._UZ(0,"dot-separator")}function xn(s,a){if(1&s&&(t.TgZ(0,"a",14),t._uU(1),t.qZA()),2&s){const e=t.oxw();t.Q6J("href",e.content.subheading_url,t.LSH),t.xp6(1),t.Oqu(e.content.subheading)}}function $e(s,a){if(1&s&&t._UZ(0,"tg-feeditem-userlink",16),2&s){const e=t.oxw(2);t.Q6J("user",e.contentUser)}}function Te(s,a){if(1&s&&t.YNc(0,$e,1,1,"tg-feeditem-userlink",15),2&s){const e=t.oxw();t.Q6J("ngIf",e.content.heading&&e.content.user)}}function wn(s,a){1&s&&t._UZ(0,"dot-separator")}function bn(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"div")(1,"button",17),t.NdJ("cbOnSuccess",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.linkCopied(!0))})("cbOnError",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.linkCopied(!1))}),t.ALo(2,"tr"),t._UZ(3,"i",18),t.qZA()()}if(2&s){const e=t.oxw();
1t.xp6(1),t.Q6J("tooltip",t.xi3(2,2,"directLink","newsfeed"))("cbContent",e.directLink)}}function En(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"tg-feeditem-dropdown",19),t.NdJ("itemChange",function(l){t.CHM(e);const M=t.oxw();return t.KtG(M.onContentChanged(l))})("feedItemEvent",function(l){t.CHM(e);const M=t.oxw();return t.KtG(M.propagator.emit(l))}),t.qZA()}if(2&s){const e=t.oxw();t.Q6J("item",e.content)}}let An=(()=>{class s extends _e{constructor(e,r){super(),this.alertSvc=e,this.routing=r,this.propagator=new t.vpe(!0)}linkCopied(e){const r="newsfeed";e?this.alertSvc.alertSuccess({key:"linkCopySuccess",ns:r}):this.alertSvc.alertError({key:"linkCopyFail",ns:r})}ngOnChanges(e){if(super.ngOnChanges(e),e.content){this.canEdit=this.canEdit&&["message","twitter"].includes(this.content.source);const r={...this.routing.cleanParams,item:this.content.id};this.directLink=this.routing.href(this.routing.current.name,r,{absolute:!0})}}ngOnDestroy(){this.propagator.complete(),super.ngOnDestroy()}}return s.\u0275fac=function(e){return new(e||s)(t.Y36(st.c),t.Y36(yt.Z))},s.\u0275cmp=t.Xpm({type:s,selectors:[["tg-feeditem-heading"]],inputs:{hideDirectLink:"hideDirectLink",hideDropdown:"hideDropdown"},outputs:{propagator:"feedItemEvent"},features:[t.qOj,t.TTD],decls:14,vars:10,consts:[[1,"heading"],["class","fa fa-fw fa-thumb-tack",4,"ngIf"],["class","heading headlink","target","_blank","rel","noopener",3,"href",4,"ngIf","ngIfElse"],["tryUserHeading",""],[4,"ngIf"],["class","subheading","target","_blank","rel","noopener",3,"href",4,"ngIf","ngIfElse"],["noSubheading",""],[3,"date"],[1,"menu-controls"],[3,"item","itemChange","feedItemEvent",4,"ngIf"],[1,"fa","fa-fw","fa-thumb-tack"],["target","_blank","rel","noopener",1,"heading","headlink",3,"href"],["class","heading headlink",3,"user",4,"ngIf"],[1,"heading","headlink",3,"user"],["target","_blank","rel","noopener",1,"subheading",3,"href"],["class","subheading",3,"user",4,"ngIf"],[1,"subheading",3,"user"],["ngxClipboard","",1,"feeditem-action-btn","btn-default","btn","btn-xs",3,"tooltip","cbContent","cbOnSuccess","cbOnError"],[1,"fa","fa-link"],[3,"item","itemChange","feedItemEvent"]],template:function(e,r){if(1&e&&(t.TgZ(0,"div",0),t.YNc(1,Jt,1,0,"i",1),t.YNc(2,It,2,2,"a",2),t.YNc(3,Ye,1,1,"ng-template",null,3,t.W1O),t.YNc(5,vn,1,0,"dot-separator",4),t.YNc(6,xn,2,2,"a",5),t.YNc(7,Te,1,1,"ng-template",null,6,t.W1O),t.YNc(9,wn,1,0,"dot-separator",4),t._UZ(10,"tg-moment-ago",7),t.qZA(),t.TgZ(11,"div",8),t.YNc(12,bn,4,5,"div",4),t.YNc(13,En,1,1,"tg-feeditem-dropdown",9),t.qZA()),2&e){const l=t.MAs(4),M=t.MAs(8);t.xp6(1),t.Q6J("ngIf",r.content.pinned),t.xp6(1),t.Q6J("ngIf",r.content.heading)("ngIfElse",l),t.xp6(3),t.Q6J("ngIf",r.content.heading||r.content.user),t.xp6(1),t.Q6J("ngIf",r.content.subheading)("ngIfElse",M),t.xp6(3),t.Q6J("ngIf",r.content.subheading||r.content.heading&&r.content.user),t.xp6(1),t.Q6J("date",r.content.timestamp),t.xp6(2),t.Q6J("ngIf",!r.hideDirectLink),t.xp6(1),t.Q6J("ngIf",!r.hideDropdown&&r.canEdit)}},dependencies:[Be.U,Yt.i9,Ht.ClipboardDirective,C.O5,Zt.G,kt.K,Nt.h,Kt.j,Pt.k,Ce,Ze,Ft.H],styles:[".headlink[_ngcontent-%COMP%]{font-weight:700;overflow-wrap:anywhere;word-break:normal}.lastclear[_ngcontent-%COMP%]{clear:both}.show-new-line[_ngcontent-%COMP%]{white-space:pre-wrap}","[_nghost-%COMP%]{display:flex;justify-content:space-between}[_nghost-%COMP%]   .menu-controls[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%]   .menu-controls[_ngcontent-%COMP%]   div[_ngcontent-%COMP%] + tg-feeditem-dropdown[_ngcontent-%COMP%]{margin-left:3px}"],changeDetection:0}),s})();function Pn(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"div",7)(1,"tg-feedinput",8),t.NdJ("posted",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.editing=!1)}),t.ALo(2,"tr"),t.ALo(3,"tr"),t.TgZ(4,"button",9),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.editing=!1)}),t.qZA()()()}if(2&s){const e=t.oxw();t.Q6J("@fadeOutOnExit",void 0)("@fadeInOnEntry",void 0),t.xp6(1),t.Q6J("showLogos",!1)("buttonLabel",t.lcZ(2,9,"save"))("feedentry",e.content)("role",e.role)("placeholder",t.lcZ(3,11,"postEditPH"))("event",e.eventID)("maxLength",e.inputMa
1xLength)}}function Fn(s,a){if(1&s&&t._UZ(0,"p",15),2&s){const e=t.oxw(2);t.Q6J("innerHTML",e.content.content,t.oJD)("@fadeOutOnExit",void 0)("@fadeInOnEntry",void 0)}}function Dn(s,a){if(1&s&&t._UZ(0,"a",19),2&s){const e=t.oxw(3);t.Q6J("href",e.content.heading_url,t.LSH)("translate","read")}}function Ln(s,a){if(1&s&&(t.TgZ(0,"p",16),t._UZ(1,"span",17),t.ALo(2,"tgUserMentions"),t.ALo(3,"parseLinks"),t.TgZ(4,"span"),t._uU(5),t.YNc(6,Dn,1,2,"a",18),t.qZA()()),2&s){const e=t.oxw(2);t.xp6(1),t.Q6J("innerHTML",t.xi3(2,5,t.lcZ(3,8,e.content.content),e.userMentions),t.oJD)("@fadeOutOnExit",void 0)("@fadeInOnEntry",void 0),t.xp6(4),t.Oqu(" "),t.xp6(1),t.Q6J("ngIf",e.content.read_more)}}function Un(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"tg-feed-controls",20),t.NdJ("contentChange",function(l){t.CHM(e);const M=t.oxw(2);return t.KtG(M.onContentChange(l))})("showComments",function(l){t.CHM(e);const M=t.oxw(2);return t.KtG(M.showComments=l)}),t.qZA()}if(2&s){const e=t.oxw(2);t.Q6J("content",e.content)("type",e.feedItemType)("@fadeOutOnExit",void 0)("@fadeInOnEntry",void 0)}}function Zn(s,a){if(1&s&&t.GkF(0,23),2&s){t.oxw(3);const e=t.MAs(9);t.Q6J("ngTemplateOutlet",e)}}function Sn(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"tg-feed-comment",24),t.NdJ("contentChange",function(l){t.CHM(e);const M=t.oxw(3);return t.KtG(M.onCommentChanged(l))}),t.qZA()}if(2&s){const e=a.$implicit,r=t.oxw(3);t.Q6J("showControls",r.showControls)("event",r.eventID)("role",r.role)("content",e)("@fadeOutOnExit",void 0)("@fadeInOnEntry",void 0)}}function Bn(s,a){if(1&s&&t.GkF(0,23),2&s){t.oxw(3);const e=t.MAs(9);t.Q6J("ngTemplateOutlet",e)}}function Rn(s,a){if(1&s&&(t.YNc(0,Zn,1,1,"ng-container",21),t.YNc(1,Sn,1,6,"tg-feed-comment",22),t.YNc(2,Bn,1,1,"ng-container",21)),2&s){const e=t.oxw(2);t.Q6J("ngIf","asc"===e.commentOrder&&e.comments.length!==e.content.comments_count),t.xp6(1),t.Q6J("ngForOf",e.comments)("ngForTrackBy",e.COMMENT_TRACK_BY),t.xp6(1),t.Q6J("ngIf","desc"===e.commentOrder&&e.comments.length!==e.content.comments_count)}}function Nn(s,a){if(1&s&&(t.YNc(0,Fn,1,3,"p",10),t.YNc(1,Ln,7,10,"ng-template",null,11,t.W1O),t._UZ(3,"tg-feedentities",12),t.YNc(4,Un,1,4,"tg-feed-controls",13),t.YNc(5,Rn,3,4,"ng-template",14)),2&s){const e=t.MAs(2),r=t.oxw();t.Q6J("ngIf","twitter"===r.content.source)("ngIfElse",e),t.xp6(3),t.Q6J("entities",r.content.entities)("@fadeOutOnExit",void 0)("@fadeInOnEntry",void 0),t.xp6(1),t.Q6J("ngIf",r.showControls),t.xp6(1),t.Q6J("ngIf",r.showComments&&r.commentsEnabled&&r.content.comments.length)}}function Jn(s,a){1&s&&t._UZ(0,"tg-loader-spinner")(1,"span",27),2&s&&(t.xp6(1),t.Q6J("translate","viewMore"))}function Qn(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"a",28),t.NdJ("click",function(l){t.CHM(e);const M=t.oxw(3);return t.KtG(M.loadComments(l))}),t.qZA()}2&s&&t.Q6J("translate","viewMore")}function Yn(s,a){if(1&s&&(t._UZ(0,"hr"),t.YNc(1,Jn,2,1,"ng-template",null,25,t.W1O),t.YNc(3,Qn,1,1,"a",26)),2&s){const e=t.MAs(2),r=t.oxw(2);t.xp6(3),t.Q6J("ngIf",!r.loadingComments)("ngIfElse",e)}}function $n(s,a){if(1&s&&t.YNc(0,Yn,4,2,"ng-template",14),2&s){const e=t.oxw();t.Q6J("ngIf",e.commentsEnabled)}}let Hn=(()=>{class s extends Mt{constructor(e,r,l,M,ot,_t,Ut,Et,Vt,Qt){super(),this.userContentSvc=e,this.cdr=r,this.alertSvc=l,this.notification=M,this.sock=ot,this.newsRes=_t,this.newsCfg=Ut,this.blogCfg=Et,this.discCfg=Vt,this.user=Qt,this.COMMENT_TRACK_BY=ft.trackById,this.contentChange=new t.vpe,this.editing=!1,this.feedItemType="newsfeed"}get comments(){return this.content.comments}loadComments(e){e.preventDefault();const r=this.content;this.loadingComments||r.comments.length===r.comments_count||(this.loadingComments=!0,this.newsRes.getAllComments({id:r.id},{params:{commentOrder:this.commentOrder}}).pipe((0,et.b)(l=>{this.content=r.$clone({comments:l}),this.contentChange.emit(this.content)}),(0,w.H)("[FeedItem.allComments]"),(0,sn.x)(()=>{this.loadingComments=!1,this.cdr.markForCheck()})).subscribe({error:()=>{this.alertSvc.alertError({key:"commentLoadFail",ns:"newsfeed"})}}))}ngOnChanges(e){if(e.content){const r=this.content;this.showControls=Boolean(r&&this.user)&&"twitter"!==r.source&&"facebook"!==r.source,this.userMentions=r.user_mentions,this.refreshCommentsEnabled()}}ngOnDestroy(){this.contentChange.complete(),super.ngOnDestroy()}ngOnInit(){const e=r=>r.newsfeed===this.content.id;this.sock.on("newsfeed:comment:create").pipe((0,E.h)(e),(0,F.U)(r=>this.onCommentCreateMapper(r)),(0,w.H)("[FeedItem.onCommentCreate]"),(0,qt.K)((r,l)=>l),(0,H.R)(this._destroyed$)).subscribe((0,i.e)(r=>{this.content=r,this.contentChange.emit(r),this.cdr.markForCheck()})),this.sock.on("newsfeed:newsitem:update").pipe((0,E.h)(r=>r.id===this.content.id),(0,F.U)(r=>(delete r.comments,this.content.$clone(r))),(0,w.H)("[FeedItem.onUpdate]"),(0,qt.K)((r,l)=>l),(0,H.R)(this._destroyed$)).subscribe((0,i.e)(r=>{this.content=r,this.refreshCommentsEnabled(),this.contentChange.emit(r),this.cdr.markForCheck()})),this.sock.on("newsfeed:comment:destroy").pipe((0,E.h)(e),(0,et.b)(r=>{const l=this.content,M=l.comments,ot=M.findIndex(Ut=>Ut.id===r.id);if(-1===ot)return;const _t=[...M];_t.splice(ot,1),this.content=l.$clone({comments:_t,comments_count:(l.comments_count||1)-1}),this.contentChange.emit(this.content),this.cdr.markForCheck()}),(0,w.H)("[FeedItem.onDestroy]"),(0,qt.K)((r,l)=>l),(0,H.R)(this._destroyed$)).subscribe(p.V)}onCommentChanged(e){const r=this.comments.findIndex(M=>M.id===e.id);if(-1===r)return;const l=[...this.comments];l[r]=e,this.content=this.content.$clone({comments:l}),this.contentChange.emit(this.content),this.cdr.markForCheck()}onContentChange(e){this.content=e,this.contentChange.emit(e),this.cdr.markForCheck()}onFeedEvent(e){e===$t.EDIT_BEGIN&&!this.editing&&(this.editing=!0,this.cdr.markForCheck())}onCommentCreateMapper(e){const r=this.content,l=r.comments,M=this.commentOrder;let ot;e.createdAt||(e.createdAt=new Date),ot=l.length?"desc"===M?[e,...l]:[...l,e]:[e];const _t=r.$clone({comments:ot,comments_count:(r.comments_count||0)+1});return this.user?.id!==b.SP.extractId(e.user)&&this.notification.newCommentNotification(e).catch(console.error),_t}refreshCommentsEnabled(){this.commentsEnabled=this.userContentSvc.canViewComments(this.content,this.user?.roles,this.blogCfg,this.discCfg,this.newsCfg)}}return s.\u0275fac=function(e){return new(e||s)(t.Y36(Se.s),t.Y36(t.sBO),t.Y36(st.c),t.Y36(X.NotificationService),t.Y36(J.o),t.Y36(y.r),t.Y36(ct.xc),t.Y36(ct.Vz),t.Y36(ct.J0),t.Y36(ct.Ej))},s.\u0275cmp=t.Xpm({type:s,selectors:[["tg-feeditem"]],hostVars:4,hostBindings:function(e,r){2&e&&t.ekj("event-feed-item",r.eventID)("group-feed-item",r.groupID)},inputs:{commentOrder:"commentOrder",content:"content"},outputs:{contentChange:"contentChange"},features:[t._Bn([{provide:lt.z,useValue:"newsfeed"}]),t.qOj,t.TTD],decls:11,vars:9,consts:[[1,"feeditem"],[3,"content","small"],[1,"feeditem-content"],[3,"hideDropdown","hideDirectLink","content","contentChange","feedItemEvent"],["class","lastclear",4,"ngIf","ngIfElse"],["notEditing",""],["loadCommentsTemplate",""],[1,"lastclear"],[3,"showLogos","buttonLabel","feedentry","role","placeholder","event","maxLength","posted"],["tgFeedInputButton","","type","button","translate","cancel",1,"btn","btn-sm","btn-danger",3,"click"],["class","show-new-line",3,"innerHTML",4,"ngIf","ngIfElse"],["notTwitter",""],[3,"entities"],[3,"content","type","contentChange","showComments",4,"ngIf"],[3,"ngIf"],[1,"show-new-line",3,"innerHTML"],[1,"show-new-line"],[3,"innerHTML"],["target","_blank","rel","noopener",3,"href","translate",4,"ngIf"],["target","_blank","rel","noopener",3,"href","translate"],[3,"content","type","contentChange","showComments"],[3,"ngTemplateOutlet",4,"ngIf"],[3,"showControls","event","role","content","contentChange",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngTemplateOutlet"],[3,"showControls","event","role","content","contentChange"],["tplLoadingComments",""],["href","#",3,"translate","click",4,"ngIf","ngIfElse"],[1,"vmore","text-muted",3,"translate"],["href","#",3,"translate","click"]],template:function(e,r){if(1&e&&(t.TgZ(0,"div",0),t._UZ(1,"tg-feeditem-logos",1),t.TgZ(2,"tg-panel",2)(3,"tg-panel-body")(4,"tg-feeditem-heading",3),t.NdJ("contentChange",function(M){return r.onContentChange(M)})("feedItemEvent",function(M){return r.onFeedEvent(M)}),t.qZA(),t.YNc(5,Pn,5,13,"div",4),t.YNc(6,Nn,6,7,"ng-template",null,5,t.W1O),t.qZA()(),t.YNc(8,$n,1,1,"ng-template",null,6,t.W1O),t.qZA(),t._UZ(10,"div",7)),2&e){const l=t.MAs(7);t.xp6(1),t.Q6J("content",r.content)("small",!!r.eventID),t.xp6(1),t.ekj("sm",r.eventID),t.xp6(2),t.Q6J("hideDropdown",r.editing)("hideDirectLink",r.editing||!!r.eventID||!!r.articleID)("content",r.content),t.xp6(1),t.Q6J("ngIf",r.editing)("ngIfElse",l)}},dependencies:[C.sg,C.O5,C.tP,rt.P,un.I,u.jl,u.Av,Pt.k,pe.V,Lt,ht,ee.A,Rt.w,An,S,K.J,tt.U,Ft.H],styles:[".feeditem-content[_ngcontent-%COMP%]{margin-left:36px;overflow:hidden}.feeditem-content[_ngcontent-%COMP%]   .share-button[_ngcontent-%COMP%]{margin-top:4px}.feeditem-content[_ngcontent-%COMP%]:hover   .action-button[_ngcontent-%COMP%]{visibility:visible}.feeditem-content[_ngcontent-%COMP%] > .panel-body[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{overflow-wrap:break-word}@media (min-width:768px){.feeditem-content[_ngcontent-%COMP%]{margin-left:132px}.feeditem-content.sm[_ngcontent-%COMP%]{margin-left:68px}}",".vmore[_ngcontent-%COMP%]{cursor:pointer}.vmore[_ngcontent-%COMP%]:hover{text-decoration:underline}",".headlink[_ngcontent-%COMP%]{font-weight:700;overflow-wrap:anywhere;word-break:normal}.lastclear[_ngcontent-%COMP%]{clear:both}.show-new-line[_ngcontent-%COMP%]{white-space:pre-wrap}"],data:{animation:[j.A,Ct.g]},changeDetection:0}),s})();function kn(s,a){if(1&s&&(t.TgZ(0,"div",3),t._UZ(1,"p",4),t.qZA()),2&s){const e=t.oxw(2);t.xp6(1),t.Q6J("translate","youreBanned")("tr-placeholders",e.orgEmailPH)}}function Wn(s,a){if(1&s){const e=t.EpF();
1t.TgZ(0,"div",10)(1,"div",11),t._UZ(2,"span",12),t.TgZ(3,"button",13),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(3);return t.KtG(l.clearSelected())}),t.qZA()()()}}function Gn(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"tg-feed-selector",14),t.NdJ("change",function(l){t.CHM(e);const M=t.oxw(3);return t.KtG(M.filterFeed(l))}),t.qZA()}if(2&s){const e=t.oxw(3);t.Q6J("selectedTab",e.selectedTab)("globeSources",e.computedGlobeSources)("availableNetworks",e.computedAvailableNetworks)}}function Kn(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"tg-feeditem",19),t.NdJ("contentChange",function(l){t.CHM(e);const M=t.oxw(5);return t.KtG(M.onFeeditemChanged(l))}),t.qZA()}if(2&s){const e=a.$implicit,r=t.oxw(5);t.Q6J("content",e)("role",r.role)("group",r.groupID)("event",r.eventID)("article",r.articleID)("maxLength",r.computedMaxLength)("commentOrder",r.commentOrder)}}function jn(s,a){if(1&s){const e=t.EpF();t.TgZ(0,"div",17),t.NdJ("scrolled",function(){t.CHM(e);const l=t.oxw(4);return t.KtG(l.scroller.scrolled())}),t.YNc(1,Kn,1,7,"tg-feeditem",18),t.qZA()}if(2&s){const e=t.oxw().ngIf,r=t.oxw(3);t.Q6J("scrollWindow",!0)("immediateCheck",!0)("infiniteScrollDisabled",r.busy||r.done),t.xp6(1),t.Q6J("ngForOf",e)("ngForTrackBy",r.TRACK_BY_ID)}}function Vn(s,a){if(1&s&&t.GkF(0,21),2&s){t.oxw(3);const e=t.MAs(5);t.Q6J("ngTemplateOutlet",e)}}function zn(s,a){if(1&s&&t.YNc(0,Vn,1,1,"ng-container",20),2&s){const e=t.oxw(4);t.Q6J("ngIf",e.done)}}function Xn(s,a){if(1&s&&(t.ynx(0),t.YNc(1,jn,2,5,"div",15),t.YNc(2,zn,1,1,"ng-template",null,16,t.W1O),t.BQk()),2&s){const e=a.ngIf,r=t.MAs(3);t.xp6(1),t.Q6J("ngIf",e.length)("ngIfElse",r)}}function qn(s,a){1&s&&(t.TgZ(0,"div",22)(1,"tg-panel",23)(2,"tg-panel-body"),t._UZ(3,"div",24),t.qZA()()()),2&s&&(t.xp6(3),t.Q6J("translate","newsfeedEmpty"))}function to(s,a){if(1&s&&(t._UZ(0,"tg-feedinput",5),t.YNc(1,Wn,4,0,"div",6),t.YNc(2,Gn,1,3,"tg-feed-selector",7),t.YNc(3,Xn,4,2,"ng-container",8),t.YNc(4,qn,4,1,"ng-template",null,9,t.W1O)),2&s){const e=t.MAs(5),r=t.oxw(2);t.Q6J("role",r.role)("group",r.groupID)("event",r.eventID)("article",r.articleID)("maxLength",r.computedMaxLength),t.xp6(1),t.Q6J("ngIf",r.selectedItem),t.xp6(1),t.Q6J("ngIf",r.showSelector),t.xp6(1),t.Q6J("ngIf",r.nfData)("ngIfElse",e)}}function eo(s,a){if(1&s&&(t.YNc(0,kn,2,2,"ng-template",0),t.YNc(1,to,6,9,"ng-template",null,2,t.W1O)),2&s){const e=t.MAs(2),r=t.oxw();t.Q6J("ngIf",r.isBanned)("ngIfElse",e)}}function no(s,a){1&s&&(t.TgZ(0,"div",3),t._UZ(1,"p",25),t.qZA())}o(47528);const ie=Symbol("sourceFilter"),ye=Symbol("commentOrder"),Tn={provide:lt.z,useValue:"newsfeed"};class jt extends Mt{constructor(a,e,r,l,M,ot,_t,Ut,Et,Vt,Qt){super(),this.routing=a,this.user=r,this.cdr=l,this.newsCfg=M,this.notifications=ot,this.alertSvc=_t,this.doc=Ut,this.newsRes=Et,this.scroller=Vt,this.sock=Qt,this.TRACK_BY_ID=ft.trackById,this.busy=!1,this.done=!1,this.nfData=[],this.showSelector=!1,this[ie]=new R.X(null),this[ye]=new R.X("desc"),this.orgEmailPH={email:e.email},this.computedAvailableNetworks=M.networks,this.computedDefaultTab=M.defaultTab,this.computedGlobeSources=M.globeSources,this.computedMaxLength=M.inputMaxLength,this.refreshCanView(),this.isBanned=Boolean(r?.hasRoles("newsfeed:banned"))}get commentOrder(){return this[ye].value}set commentOrder(a){a!==this.commentOrder&&this[ye].next(a)}get nfData$(){this.scroller.useCursor(!1).setCallable(l=>this.newsRes.query({params:l}).pipe((0,c.V)(oo)));const a=this.selectedItem,e=this.showSelector?this[ie].pipe((0,Z.v)(1)):(0,W.of)(null),r=(0,O.a)([this[ie],this[ye]]);return e.pipe((0,P.w)(()=>r),(0,v.b)(0),(0,F.U)(([l,M])=>{const ot={commentOrder:M};return a&&(ot.id=a),l&&(ot.source=l.source),this.role?ot.role=this.role:this.articleID?ot.article=this.articleID:this.eventID?ot.event=this.eventID:this.groupID&&(ot.group=this.groupID),ot}),(0,L.p)(),(0,P.w)(l=>this.scroller.setParams(l).getData(10)),(0,w.H)("[Newsfeed.nfData$]"),(0,N.d)(1))}clearSelected(){const a=this.routing.cleanParams;delete a.item,this.routing.go(this.routing.current.name,a,{inherit:!1}).catch(console.error)}filterFeed(a){a!==this[ie].value&&this[ie].next(a)}ngOnChanges(a){a.userAvailableNetworks&&this.onChangeArrayField(this.userAvailableNetworks,this.newsCfg.networks,"computedAvailableNetworks"),a.userDefaultTab&&(this.computedDefaultTab=this.userDefaultTab||this.newsCfg.defaultTab),a.userGlobeSources&&this.onChangeArrayField(this.userGlobeSources,this.newsCfg.globeSources,"computedGlobeSources"),a.inputMaxLength&&(this.computedMaxLength=this.inputMaxLength||this.newsCfg.inputMa
1xLength),a.role&&this.refreshCanView()}ngOnDestroy(){try{super.ngOnDestroy()}finally{const a=new Tt.UrlBuilder("/api/v1/newsfeed/leave");this.articleID?a.param("article",this.articleID):this.eventID?a.param("event",this.eventID):this.groupID?a.param("group",this.groupID):this.role&&a.param("role",this.role),this.sock.get(a.build()).subscribe(p.V),(0,Q.completeAll)(this[ie],this[ye])}}ngOnInit(){this.notifications.requestPermission().catch(A.Z),this.selectedTab=this.computedDefaultTab,this.canView&&!this.isBanned&&(this.initData(),this.initSocket())}onFeeditemChanged(a){const e=this.nfData.findIndex(r=>r.id===a.id);-1!==e&&(this.nfData[e]=a,this.nfData=[...this.nfData],this.cdr.markForCheck())}initData(){this.scroller.mirrorDoneBusy(this.cdr,this,"busy","done"),this.scroller.errors$.subscribe(()=>{this.alertSvc.alertError({key:"retrieveFail",ns:Tn.useValue})}),this.nfData$.subscribe((0,i.e)(a=>{this.nfData=a,this.cdr.markForCheck()}))}initSocket(){this.sock.on("newsfeed:newsitem:create").pipe((0,F.U)(this.newsRes.instantiate),(0,et.b)(a=>{let e;a.pinned||-1===(e=(0,I.Z)(this.nfData,{pinned:!0}))?this.nfData.unshift(a):this.nfData.splice(e+1,0,a),this.cdr.markForCheck(),this.doc.hidden&&this.user.id!==b.SP.extractId(a.user)&&this.notifications.newMessageNotification(a).catch(console.error)}),(0,H.R)(this._destroyed$),(0,w.H)("[Newsfeed.onItemCreate]")).subscribe(p.V),this.sock.on("newsfeed:newsitem:destroy").pipe((0,et.b)(a=>{const e=(0,I.Z)(this.nfData,{id:a});-1!==e&&(this.nfData.splice(e,1),this.cdr.markForCheck())}),(0,H.R)(this._destroyed$),(0,w.H)("[Newsfeed.onDestroy]")).subscribe(p.V)}onChangeArrayField(a,e,r){const l=a?(0,x.Z)(a):e;(0,B.Z)(l,this[r])||(this[r]=l)}refreshCanView(){const a=this.role?(0,x.Z)(this.role):[],e=this.user;e?this.canView=!a.length||e.isSiteAdmin||e.hasRoles(...a):a.length?(this.canView=!1,this.routing.goToLogin().catch(A.Z)):this.canView=!0}}function oo(s){return Array.isArray(s.comments)?s:s.$clone({comments:[]})}jt.RESOLVABLES=[dt.resolveNewsfeedConfig,dt.resolveArticleConfig,dt.resolveBlogConfig,dt.resolveDiscussionGroupsConfig,z.w,dt.resolveOrganisationConfig],jt.\u0275fac=function(a){return new(a||jt)(t.Y36(yt.Z),t.Y36(ct.$z),t.Y36(ct.Ej),t.Y36(t.sBO),t.Y36(ct.xc),t.Y36(X.NotificationService),t.Y36(st.c),t.Y36(C.K0),t.Y36(y.r),t.Y36(nt.TgInfiniteScroller),t.Y36(J.o))},jt.\u0275cmp=t.Xpm({type:jt,selectors:[["tg-newsfeed"]],inputs:{selectedItem:"selectedItem",showSelector:"showSelector",userAvailableNetworks:["availableNetworks","userAvailableNetworks"],userDefaultTab:["defaultTab","userDefaultTab"],userGlobeSources:["globeSources","userGlobeSources"],commentOrder:"commentOrder"},features:[t._Bn([Tn,nt.TgInfiniteScroller]),t.qOj,t.TTD],decls:3,vars:2,consts:[[3,"ngIf","ngIfElse"],["cantView",""],["notBanned",""],[1,"jumbotron"],[3,"translate","tr-placeholders"],[3,"role","group","event","article","maxLength"],["class","feeditem-content",4,"ngIf"],[3,"selectedTab","globeSources","availableNetworks","change",4,"ngIf"],[4,"ngIf","ngIfElse"],["noItems",""],[1,"feeditem-content"],[1,"alert","alert-info"],["translate","viewingSingleItem"],["type","button","translate","showAll",1,"btn","btn-xs","btn-primary",3,"click"],[3,"selectedTab","globeSources","availableNetworks","change"],["infiniteScroll","",3,"scrollWindow","immediateCheck","infiniteScrollDisabled","scrolled",4,"ngIf","ngIfElse"],["newsfeedNoLength",""],["infiniteScroll","",3,"scrollWindow","immediateCheck","infiniteScrollDisabled","scrolled"],[3,"content","role","group","event","article","maxLength","commentOrder","contentChange",4,"ngFor","ngForOf","ngForTrackBy"],[3,"content","role","group","event","article","maxLength","commentOrder","contentChange"],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"],[1,"feeditem"],[1,"feeditem-content","no-items"],[1,"well",3,"translate"],["translate","notAllowedToView"]],template:function(a,e){if(1&a&&(t.YNc(0,eo,3,2,"ng-template",0),t.YNc(1,no,2,0,"ng-template",null,1,t.W1O)),2&a){const r=t.MAs(2);t.Q6J("ngIf",e.canView)("ngIfElse",r)}},dependencies:[Y.N,G.Ry,C.sg,C.O5,C.tP,rt.P,u.jl,u.Av,f.a,ae,Lt,Hn],styles:[".feeditem-content[_ngcontent-%COMP%]{margin-left:36px;overflow:hidden}.feeditem-content[_ngcontent-%COMP%]   .share-button[_ngcontent-%COMP%]{margin-top:4px}.feeditem-content[_ngcontent-%COMP%]:hover   .action-button[_ngcontent-%COMP%]{visibility:visible}.feeditem-content[_ngcontent-%COMP%] > .panel-body[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{overflow-wrap:break-word}@media (min-width:768px){.feeditem-content[_ngcontent-%COMP%]{margin-left:132px}.feeditem-content.sm[_ngcontent-%COMP%]{margin-left:68px}}","[_nghost-%COMP%]{display:block}.embedded-newsfeed[_nghost-%COMP%]   .feeditem-content.no-items[_ngcontent-%COMP%]{margin-left:0}.no-items[_ngcontent-%COMP%]   .well[_ngcontent-%COMP%]{margin-bottom:0}"],changeDetection:0}),(0,n.gn)([(0,U.a)()],jt.prototype,"nfData$",null)},3069:(mt,$,o)=>{o.d($,{C:()=>W});var n=o(54427),p=o(97482),i=o(14026);function c(O,P){if(1&O&&i._UZ(0,"img",10),2&O){const v=i.oxw(2),F=v.$implicit,N=v.index,et=i.oxw();i.Q6J("src",F.image,i.LSH)("alt",N)("@slideInOut",et.animationType)}}function Z(O,P){if(1&O&&i._UZ(0,"tg-feedentity-video",11),2&O){const v=i.oxw(2).$implicit,F=i.oxw();i.Q6J("entity",v)("@slideInOut",F.animationType)}}function L(O,P){if(1&O){const v=i.EpF();i.TgZ(0,"div",6),i.NdJ("tgSwipeX",function(N){i.CHM(v);const et=i.oxw(2);return i.KtG(et.swiped(N))}),i.ynx(1,7),i.YNc(2,c,1,3,"img",8),i.YNc(3,Z,1,2,"tg-feedentity-video",9),i.BQk(),i.qZA()}if(2&O){const v=i.oxw().$implicit;i.xp6(1),i.Q6J("ngSwitch",v.type),i.xp6(1),i.Q6J("ngSwitchCase","image"),i.xp6(1),i.Q6J("ngSwitchCase","video")}}function w(O,P){if(1&O&&(i.ynx(0),i.YNc(1,L,4,3,"div",5),i.BQk()),2&O){const v=P.index,F=i.oxw();i.xp6(1),i.Q6J("ngIf",F.currentIndex===v)}}function C(O,P){if(1&O){const v=i.EpF();
1i.ynx(0),i.TgZ(1,"div",12),i.NdJ("click",function(){i.CHM(v);const N=i.oxw();return i.KtG(N.prev())}),i._UZ(2,"i",13),i.qZA(),i.BQk()}if(2&O){const v=P.ngIf;i.xp6(1),i.Q6J("tooltip",v),i.uIk("label",v)}}function b(O,P){if(1&O){const v=i.EpF();i.ynx(0),i.TgZ(1,"div",14),i.NdJ("click",function(){i.CHM(v);const N=i.oxw();return i.KtG(N.next())}),i._UZ(2,"i",15),i.qZA(),i.BQk()}if(2&O){const v=P.ngIf;i.xp6(1),i.Q6J("tooltip",v),i.uIk("label",v)}}function U(O,P){if(1&O){const v=i.EpF();i.ynx(0),i.TgZ(1,"li",16),i.NdJ("click",function(){i.CHM(v);const N=i.oxw().index,et=i.oxw();return i.KtG(et.currentIndex=N)}),i.qZA(),i.BQk()}if(2&O){const v=P.ngIf,F=i.oxw().index,N=i.oxw();i.xp6(1),i.ekj("active",F===N.currentIndex),i.Q6J("tooltip",v),i.uIk("label",v)}}const A=function(O){return{n:O}};function I(O,P){if(1&O&&(i.ynx(0),i.YNc(1,U,2,4,"ng-container",3),i.ALo(2,"tr"),i.BQk()),2&O){const v=P.index;i.xp6(1),i.Q6J("ngIf",i.xi3(2,1,"slideN",i.VKq(4,A,v)))}}const x="200ms linear",B="-500px";let W=(()=>{class O{constructor(v){this.cdr=v,this.animationType=null,this.startIndex=0,this._entities=[],this.lastIndex=0}get entities(){return this._entities}set entities(v){this._entities=Array.isArray(v)?v:[],this.lastIndex=this._entities.length-1}get selectedItem(){return this.entities[this.currentIndex]}next(v=!1){v||(this.animationType="rtl"),this.lastIndex===this.currentIndex?this.currentIndex=0:this.currentIndex++,this.cdr.markForCheck()}ngOnInit(){this.currentIndex=this.startIndex}prev(v=!1){v||(this.animationType="ltr"),0===this.currentIndex?this.currentIndex=this.lastIndex:this.currentIndex--,this.cdr.markForCheck()}swiped(v){Math.abs(v)>=200&&(v>0?(this.animationType="ltr",this.prev(!0)):(this.animationType="rtl",this.next(!0)))}}return O.\u0275fac=function(v){return new(v||O)(i.Y36(i.sBO))},O.\u0275cmp=i.Xpm({type:O,selectors:[["tg-image-slide"]],inputs:{startIndex:"startIndex",entities:"entities"},features:[i._Bn([{provide:p.z,useValue:"tgImageSlide"}])],decls:9,vars:8,consts:[[1,"carousel-container"],[1,"tg-carousel-items"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"tg-carousel-indicators"],["class","item active",3,"tgSwipeX",4,"ngIf"],[1,"item","active",3,"tgSwipeX"],[3,"ngSwitch"],[3,"src","alt",4,"ngSwitchCase"],[3,"entity",4,"ngSwitchCase"],[3,"src","alt"],[3,"entity"],["role","button",1,"tg-carousel-control","left",3,"tooltip","click"],[1,"fa","fa-3x","fa-angle-left"],["role","button",1,"tg-carousel-control","right",3,"tooltip","click"],[1,"fa","fa-3x","fa-angle-right"],["role","button",3,"tooltip","click"]],template:function(v,F){1&v&&(i.TgZ(0,"div",0)(1,"div",1),i.YNc(2,w,2,1,"ng-container",2),i.qZA(),i.YNc(3,C,3,2,"ng-container",3),i.ALo(4,"tr"),i.YNc(5,b,3,2,"ng-container",3),i.ALo(6,"tr"),i.TgZ(7,"ol",4),i.YNc(8,I,3,6,"ng-container",2),i.qZA()()),2&v&&(i.xp6(2),i.Q6J("ngForOf",F.entities),i.xp6(1),i.Q6J("ngIf",i.lcZ(4,4,"prev")),i.xp6(2),i.Q6J("ngIf",i.lcZ(6,6,"next")),i.xp6(3),i.Q6J("ngForOf",F.entities))},styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.carousel-container[_ngcontent-%COMP%]{height:100%;position:relative}.tg-carousel-items[_ngcontent-%COMP%]{bottom:30px;left:50px;position:absolute;right:50px;top:0}.tg-carousel-control[_ngcontent-%COMP%]{align-items:center;bottom:0;color:#fff;cursor:pointer;display:flex;justify-content:center;opacity:.3;position:absolute;top:0;width:50px}.tg-carousel-control[_ngcontent-%COMP%]:hover{opacity:.6}.tg-carousel-control.left[_ngcontent-%COMP%]{left:0}.tg-carousel-control.right[_ngcontent-%COMP%]{right:0}.tg-carousel-indicators[_ngcontent-%COMP%]{bottom:0;height:30px;left:0;list-style:none;margin:0;padding:0;position:absolute;right:0;text-align:center}.tg-carousel-indicators[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{background-color:transparent;border:1px solid #fff;border-radius:10px;cursor:pointer;display:inline-block;height:10px;margin:1px;width:10px}.tg-carousel-indicators[_ngcontent-%COMP%] > li.active[_ngcontent-%COMP%]{background-color:#fff}.item[_ngcontent-%COMP%]{display:none}.item[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{flex:0 0 auto;height:auto;max-height:100%;max-width:100%;-o-object-fit:scale-down;object-fit:scale-down;width:auto}.item.active[_ngcontent-%COMP%], .newsfeed-video-image-container[_ngcontent-%COMP%], tg-feedentity-video[_ngcontent-%COMP%]{align-items:center;display:flex;height:100%;justify-content:center;width:100%}"],data:{animation:[(0,n.X$)("slideInOut",[(0,n.eR)("void=>rtl",[(0,n.oB)({right:B}),(0,n.jt)(x,(0,n.oB)({right:"*"}))]),(0,n.eR)("rtl=>void",[(0,n.oB)({left:"*"}),(0,n.jt)(x,(0,n.oB)({left:B}))]),(0,n.eR)("void=>ltr",[(0,n.oB)({left:B}),(0,n.jt)(x,(0,n.oB)({left:"*"}))]),(0,n.eR)("ltr=>void",[(0,n.oB)({right:"*"}),(0,n.jt)(x,(0,n.oB)({right:B}))])])]},changeDetection:0}),O})()},25282:(mt,$,o)=>{o.d($,{k:()=>Cn});var n=o(97401),p=o(25989),i=o(41899);const Z=i.Z&&new i.Z,w=Z?function(d,g){return Z.set(d,g),d}:p.Z;
1var C=o(27877),b=o(35509);const A=function U(d){return function(){var g=arguments;switch(g.length){case 0:return new d;case 1:return new d(g[0]);case 2:return new d(g[0],g[1]);case 3:return new d(g[0],g[1],g[2]);case 4:return new d(g[0],g[1],g[2],g[3]);case 5:return new d(g[0],g[1],g[2],g[3],g[4]);case 6:return new d(g[0],g[1],g[2],g[3],g[4],g[5]);case 7:return new d(g[0],g[1],g[2],g[3],g[4],g[5],g[6])}var D=(0,C.Z)(d.prototype),h=d.apply(D,g);return(0,b.Z)(h)?h:D}};var I=o(226);var W=o(58945),O=Math.max;const v=function P(d,g,D,h){for(var S=-1,K=d.length,tt=D.length,V=-1,it=g.length,ut=O(K-tt,0),gt=Array(it+ut),xt=!h;++V<it;)gt[V]=g[V];for(;++S<tt;)(xt||S<K)&&(gt[D[S]]=d[S]);for(;ut--;)gt[V++]=d[S++];return gt};var F=Math.max;const et=function N(d,g,D,h){for(var S=-1,K=d.length,tt=-1,V=D.length,it=-1,ut=g.length,gt=F(K-V,0),xt=Array(gt+ut),bt=!h;++S<gt;)xt[S]=d[S];for(var ht=S;++it<ut;)xt[ht+it]=g[it];for(;++tt<V;)(bt||S<K)&&(xt[ht+D[tt]]=d[S++]);return xt},ct=function H(d,g){for(var D=d.length,h=0;D--;)d[D]===g&&++h;return h},z=function dt(){};function Q(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}(Q.prototype=(0,C.Z)(z.prototype)).constructor=Q;const nt=Q;var ft=o(71050);const vt=Z?function(d){return Z.get(d)}:ft.Z,Ot={};var yt=Object.prototype.hasOwnProperty;function y(d,g){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!g,this.__index__=0,this.__values__=void 0}(y.prototype=(0,C.Z)(z.prototype)).constructor=y;const J=y;var Y=o(48440),G=o(18103),rt=o(83780);var E=Object.prototype.hasOwnProperty;function at(d){if((0,G.Z)(d)&&!(0,Y.Z)(d)&&!(d instanceof nt)){if(d instanceof J)return d;if(E.call(d,"__wrapped__"))return function u(d){if(d instanceof nt)return d.clone();var g=new J(d.__wrapped__,d.__chain__);return g.__actions__=(0,rt.Z)(d.__actions__),g.__index__=d.__index__,g.__values__=d.__values__,g}(d)}return new J(d)}(at.prototype=z.prototype).constructor=at;const pt=at,Yt=function At(d){var g=function X(d){for(var g=d.name+"",D=Ot[g],h=yt.call(Ot,g)?D.length:0;h--;){var S=D[h],K=S.func;if(null==K||K==d)return S.name}return g}(d),D=pt[g];if("function"!=typeof D||!(g in nt.prototype))return!1;if(d===D)return!0;var h=vt(D);return!!h&&d===h[0]},Pt=(0,o(30620).Z)(w);var Ft=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /;var le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;var de=o(25722),ge=o(23834),Xt=o(61133),We=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];const me=function Ke(d,g,D){var h=g+"";return(0,de.Z)(d,function zt(d,g){var D=g.length;if(!D)return d;var h=D-1;return g[h]=(D>1?"& ":"")+g[h],g=g.join(D>2?", ":" "),d.replace(le,"{\n/* [wrapped with "+g+"] */\n")}(h,function Dt(d,g){return(0,ge.Z)(We,function(D){var h="_."+D[0];g&D[1]&&!(0,Xt.Z)(d,h)&&d.push(h)}),d.sort()}(function re(d){var g=d.match(Ft);return g?g[1].split(se):[]}(h),D)))},be=function ze(d,g,D,h,S,K,tt,V,it,ut){var gt=8&g;g|=gt?32:64,4&(g&=~(gt?64:32))||(g&=-4);var Ht=[d,g,S,gt?K:void 0,gt?tt:void 0,gt?void 0:K,gt?void 0:tt,V,it,ut],Nt=D.apply(void 0,Ht);return Yt(d)&&Pt(Nt,Ht),Nt.placeholder=h,me(Nt,d,g)},ue=function Xe(d){return d.placeholder};var qe=o(32045),tn=Math.min;const nn=function en(d,g){for(var D=d.length,h=tn(g.length,D),S=(0,rt.Z)(d);h--;){var K=g[h];d[h]=(0,qe.Z)(K,D)?S[K]:void 0}return d};var Ee="__lodash_placeholder__";const Wt=function on(d,g){for(var D=-1,h=d.length,S=0,K=[];++D<h;){var tt=d[D];(tt===g||tt===Ee)&&(d[D]=Ee,K[S++]=D)}return K},te=function Fe(d,g,D,h,S,K,tt,V,it,ut){var gt=128&g,xt=1&g,bt=2&g,ht=24&g,Rt=512&g,Ht=bt?void 0:A(d);return function Nt(){for(var Jt=arguments.length,It=Array(Jt),xe=Jt;xe--;)It[xe]=arguments[xe];if(ht)var Ye=ue(Nt),vn=ct(It,Ye);if(h&&(It=v(It,h,S,ht)),K&&(It=et(It,K,tt,ht)),Jt-=vn,ht&&Jt<ut){var xn=Wt(It,Ye);return be(d,g,Fe,Nt.placeholder,D,It,xn,V,it,ut-Jt)}var $e=xt?D:this,Te=bt?$e[d]:d;return Jt=It.length,V?It=nn(It,V):Rt&&Jt>1&&It.reverse(),gt&&it<Jt&&(It.length=it),this&&this!==I.Z&&this instanceof Nt&&(Te=Ht||A(Te)),Te.apply($e,It)}};var De="__lodash_placeholder__",pn=Math.min;var Se=o(36167),Re=Math.max;const fn=function Ne(d,g,D,h,S,K,tt,V){var it=2&g;if(!it&&"function"!=typeof d)throw new TypeError("Expected a function");var ut=h?h.length:0;if(ut||(g&=-97,h=S=void 0),tt=void 0===tt?tt:Re((0,Se.Z)(tt),0),V=void 0===V?V:(0,Se.Z)(V),ut-=S?S.length:0,64&g){var gt=h,xt=S;h=S=void 0}var bt=it?void 0:vt(d),ht=[d,g,D,h,S,gt,xt,K,tt,V];if(bt&&function $t(d,g){var D=d[1],h=g[1],S=D|h;if(!(S<131||128==h&&8==D||128==h&&256==D&&d[7].length<=g[8]||384==h&&g[7].length<=g[8]&&8==D))return d;
11&h&&(d[2]=g[2],S|=1&D?0:4);var V=g[3];if(V){var it=d[3];d[3]=it?v(it,V,g[4]):V,d[4]=it?Wt(d[3],De):g[4]}(V=g[5])&&(d[5]=(it=d[5])?et(it,V,g[6]):V,d[6]=it?Wt(d[5],De):g[6]),(V=g[7])&&(d[7]=V),128&h&&(d[8]=null==d[8]?g[8]:pn(d[8],g[8])),null==d[9]&&(d[9]=g[9]),d[0]=g[0],d[1]=S}(ht,bt),d=ht[0],g=ht[1],D=ht[2],h=ht[3],S=ht[4],!(V=ht[9]=void 0===ht[9]?it?0:d.length:Re(ht[9]-ut,0))&&24&g&&(g&=-25),g&&1!=g)Rt=8==g||16==g?function rn(d,g,D){var h=A(d);return function S(){for(var K=arguments.length,tt=Array(K),V=K,it=ue(S);V--;)tt[V]=arguments[V];var ut=K<3&&tt[0]!==it&&tt[K-1]!==it?[]:Wt(tt,it);return(K-=ut.length)<D?be(d,g,te,S.placeholder,void 0,tt,ut,void 0,void 0,D-K):(0,W.Z)(this&&this!==I.Z&&this instanceof S?h:d,this,tt)}}(d,g,V):32!=g&&33!=g||S.length?te.apply(void 0,ht):function cn(d,g,D,h){var S=1&g,K=A(d);return function tt(){for(var V=-1,it=arguments.length,ut=-1,gt=h.length,xt=Array(gt+it),bt=this&&this!==I.Z&&this instanceof tt?K:d;++ut<gt;)xt[ut]=h[ut];for(;it--;)xt[ut++]=arguments[++V];return(0,W.Z)(bt,S?D:this,xt)}}(d,g,D,h);else var Rt=function B(d,g,D){var h=1&g,S=A(d);return function K(){return(this&&this!==I.Z&&this instanceof K?S:d).apply(h?D:this,arguments)}}(d,g,D);return me((bt?w:Pt)(Rt,ht),d,g)};var ne=(0,n.Z)(function(d,g){var D=Wt(g,ue(ne));return fn(d,32,void 0,g,D)});ne.placeholder={};const oe=ne;var wt=o(25336),ve=o(87563),Je=o(50725),Qe=o(14026),_n=o(13913);let Cn=(()=>{class d{constructor(D){this.http=D,this.providers=[{getAutoplayUrl:h=>`https://www.youtube.com/embed/${h?h[2]:""}?autoplay=1`,getEmbedUrl(h){if(11===h?.[2]?.length)return`https://www.youtube.com/embed/${h[2]}`},getOembed:h=>11===h?.[2]?.length?this.http.get(`https://www.youtube.com/oembed?url=https://youtu.be/${h[2]}&format=json`).pipe((0,ve.K)(()=>(0,wt.of)(null))):(0,wt.of)(null),getSnapshot:h=>(0,wt.of)(11===h?.[2]?.length?[`https://img.youtube.com/vi/${h[2]}/maxresdefault.jpg`,`https://img.youtube.com/vi/${h[2]}/mqdefault.jpg`]:[]),name:"youtube",regex:/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/},{getAutoplayUrl:h=>`https://player.vimeo.com/video/${h?h[4]:""}?title=0&portrait=0&autoplay=1`,getEmbedUrl(h){if(h?.[4])return`https://player.vimeo.com/video/${h[4]}?title=0&portrait=0`},getOembed:h=>h?.[4]?this.http.get(`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${h[4]}`).pipe((0,Je.U)(S=>S.domain_status_code&&403===S.domain_status_code?null:S),(0,ve.K)(()=>(0,wt.of)(null))):(0,wt.of)(null),getSnapshot:h=>h?.[4]?this.http.get(`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${h[4]}&width=1280&height=720`).pipe((0,Je.U)(S=>[S.thumbnail_url])):(0,wt.of)([]),name:"vimeo",regex:/^(http|https)?:\/\/(www|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos|video\/|)(\d+)(?:|\/\?)/},{getAutoplayUrl:h=>`https://www.facebook.com/video/embed?video_id=${h?h[4]:""}`,getEmbedUrl:h=>`https://www.facebook.com/video/embed?video_id=${h?h[4]:""}`,getOembed:h=>h?.[4]?this.http.get(`https://www.facebook.com/video/embed?video_id=${h[4]}`).pipe((0,ve.K)(()=>(0,wt.of)(null))):(0,wt.of)(null),getSnapshot:(h,S)=>(0,wt.of)(S?.image?[S.image]:h?.[4]?[`https://graph.facebook.com/${h[4]}/picture`]:[]),name:"facebook",regex:/^(http|https)?:\/\/(www\.)?facebook.com\/([\w\.]+)\/videos\/(\d+)/}],this.exec=this.exec.bind(this),this.getAutoplayUrl=oe(this.exec,"getAutoplayUrl"),this.getEmbedUrl=oe(this.exec,"getEmbedUrl"),this.getOembed=oe(this.exec,"getOembed"),this.getSnapshot=oe(this.exec,"getSnapshot")}exec(D,h,S){if(h)for(const K of this.providers){const tt=h.match(K.regex);if(tt)return K[D](tt,S)}}}return d.\u0275fac=function(D){return new(D||d)(Qe.LFG(_n.eN))},d.\u0275prov=Qe.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"}),d})()},72782:(mt,$,o)=>{o.d($,{s:()=>i});var n=o(69260),p=o(14026);let i=(()=>{class c{canViewComments(L,w,C,b,U){let A;switch(L.source){case"article":case"marketspace":case"opportunity":return!1;case"blog":A=C;break;case"message":A=L.role?b:U;break;case"facebook":case"twitter":return!0;default:if(!L.state){if("comment"===L.type)return!0;throw new Error(`Invalid canViewComments source: ${L.source}`)}A=C}const I=A.comments;
1return!0===I||!(!I||!w?.length)&&Boolean((0,n.Z)(w,I).length)}}return c.\u0275fac=function(L){return new(L||c)},c.\u0275prov=p.Yz7({token:c,factory:c.\u0275fac,providedIn:"root"}),c})()},87579:(mt,$,o)=>{o.d($,{A:()=>w});var n=o(90720),p=o(14026),i=o(64177),c=o(47740);function Z(C,b){if(1&C&&p._UZ(0,"tg-user-profile",3),2&C){const U=b.$implicit,A=p.oxw(2);p.Q6J("ngClass",A.classDelegate)("user",U)("spec",A.spec)}}function L(C,b){if(1&C&&(p.TgZ(0,"div",1),p.YNc(1,Z,1,3,"tg-user-profile",2),p.qZA()),2&C){const U=p.oxw();p.xp6(1),p.Q6J("ngForOf",U.users)}}let w=(()=>{class C extends n.s{constructor(){super(...arguments),this.classDelegate="col-lg-6 col-xs-12"}}return C.\u0275fac=function(){let b;return function(A){return(b||(b=p.n5z(C)))(A||C)}}(),C.\u0275cmp=p.Xpm({type:C,selectors:[["tg-user-profile-list"]],inputs:{classDelegate:"classDelegate",users:"users"},features:[p.qOj],decls:1,vars:1,consts:[["class","row",4,"ngIf"],[1,"row"],[3,"ngClass","user","spec",4,"ngFor","ngForOf"],[3,"ngClass","user","spec"]],template:function(U,A){1&U&&p.YNc(0,L,2,1,"div",0),2&U&&p.Q6J("ngIf",(!(null!=A.msgSub&&A.msgSub.exists)||(null==A.msgSub?null:A.msgSub.ready))&&(!(null!=A.tagSub&&A.tagSub.exists)||(null==A.tagSub?null:A.tagSub.ready))&&(null==A.users?null:A.users.length))},dependencies:[i.mk,i.sg,i.O5,c.B],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),C})()}}]);

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.