1"use strict";(self.webpackChunkVeryConnect=self.webpackChunkVeryConnect||[]).push([[7130],{97130:(B,r,n)=>{n.r(r),n.d(r,{PageModule:()=>S});var a=n(52805),v=n(72922),f=n(15859),m=n(60611),u=n(80733),d=n(4962),h=n(50245),C=n(25111),y=n(43632),T=n(87638),M=n(45302),t=n(14026),x=n(35134),w=n(89969),E=n(55066),P=n(19807),c=n(74174),A=n(97482),g=n(51708),V=n(64177),I=n(85868),Z=n(62441),U=n(92341),J=n(36635);function b(s,i){if(1&s){const e=t.EpF();t.TgZ(0,"button",5),t.NdJ("click.passive",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.startEditing())}),t._UZ(1,"i",6),t.qZA()}}function H(s,i){if(1&s&&(t.TgZ(0,"div",2),t.YNc(1,b,2,0,"button",3),t.qZA(),t._UZ(2,"tg-wysiwyg-viewer",4)),2&s){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.canEdit),t.xp6(1),t.Q6J("content",e.page.content)("navToHash",e.navToHash)("sanitise",e.sanitiseCfg)}}function N(s,i){if(1&s){const e=t.EpF();t._UZ(0,"tg-wysiwyg-editor",7),t.TgZ(1,"div",8)(2,"button",9),t.NdJ("click.passive",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.save())}),t._uU(3,"Save"),t.qZA(),t.TgZ(4,"button",10),t.NdJ("click.passive",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.stopEditing())}),t._uU(5,"Cancel"),t.qZA()()}if(2&s){const e=t.oxw();t.Q6J("formControl",e.ctrl)("cfg",e.froalaConfig),t.xp6(2),t.Q6J("disabled",e.saving)}}const p="page",O=[{abstract:!0,component:T.qU,name:"page",url:"/page"},{component:(()=>{class s{constructor(){this.canEdit=(0,t.f3M)(c.PQ),this.editing=!1,this.navToHash=!0,this.page=(0,t.f3M)(c.wp),this.saving=!1,this.alert=(0,t.f3M)(P.c),this.cdr=(0,t.f3M)(t.sBO),this.formBuilder=(0,t.f3M)(a.qu),this.pageResource=(0,t.f3M)(g.I),this.win=(0,t.f3M)(x.WINDOW)}ngAfterViewInit(){this.navToHash=!1}ngOnInit(){this.ctrl=this.formBuilder.control(this.page.content,{nonNullable:!0});const e=[...E.f.allowedAttributes["*"],"onclick"];this.froalaConfig={htmlAllowedAttrs:e},this.sanitiseCfg={allowedAttributes:{"*":e}}}save(){this.saving||(this.saving=!0,this.pageResource.update({content:this.ctrl.value.trim(),slug:this.page.slug}).pipe((0,w.b)(e=>{this.page=e,this.alert.alertSuccess({key:"update_ok",ns:p}),this.stopEditing(),this.cdr.markForCheck()}),this.alert.alertHttpError()).subscribe((0,M.d)(()=>{this.saving=!1,this.cdr.markForCheck()})))}startEditing(){this.editing=!0}stopEditing(){this.editing=!1,location.hash?location.hash="":this.win.scrollTo(this.win.scrollX,0)}}return s.\u0275fac=function(e){return new(e||s)},s.\u0275cmp=t.Xpm({type:s,selectors:[["tg-page-view"]],features:[t._Bn([],[{provide:A.z,useValue:p}])],decls:3,vars:2,consts:[[3,"ngIf","ngIfElse"],["tplEditing",""],[1,"text-right"],["class","btn btn-primary",3,"click.passive",4,"ngIf"],[3,"content","navToHash","sanitise"],[1,"btn","btn-primary",3,"click.passive"],[1,"fa","fa-pencil"],[3,"formControl","cfg"],[1,"text-right","mt-1"],[1,"btn","btn-primary",3,"disabled","click.passive"],[1,"btn","btn-default",3,"click.passive"]],template:function(e,l){if(1&e&&(t.YNc(0,H,3,4,"ng-template",0),t.YNc(1,N,6,3,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",!l.editing)("ngIfElse",o)}},dependencies:[V.O5,I.G,Z.h,a.JJ,a.oH,U.Z,J.n],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),s})(),name:"page.view",resolve:[y.p,(0,C.b)([d.Transition,g.I],(s,i)=>(0,h.n)(i.get(s.params().slug)))],url:"/:slug"}];let S=(()=>{class s{}return s.\u0275fac=function(e){return new(e||s)},s.\u0275mod=t.oAB({type:s}),s.\u0275inj=t.cJS({imports:[f.GlobalModule,v.UIRouterModule.forChild({config:m.Z.config(O)}),a.UX,u.x]}),s})()}}]);
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.