1"use strict";(self.webpackChunkigreja24h=self.webpackChunkigreja24h||[]).push([[2509],{22509:(le,g,o)=>{o.r(g),o.d(g,{LibraryModule:()=>ie});var p=o(60177),I=o(80194),h=o(46097),T=o(72510),f=o(70792),e=o(54438),d=o(89417);const R=["*"];let b=(()=>{class s{config;afterChange=new e.bkB;beforeChange=new e.bkB;breakpoint=new e.bkB;destroy=new e.bkB;init=new e.bkB;$instance;currentIndex=0;slides=[];initialized=!1;_removedSlides=[];_addedSlides=[];el=(0,e.WQX)(e.aKT);zone=(0,e.WQX)(e.SKi);isServer=(0,p.Vy)((0,e.WQX)(e.Agw));ngOnDestroy(){this.unslick()}ngAfterViewInit(){this.ngAfterViewChecked()}ngAfterViewChecked(){if(!this.isServer&&(this._addedSlides.length>0||this._removedSlides.length>0)){const t=this.slides.length-this._removedSlides.length+this._addedSlides.length;this.initialized?0===t?this.unslick():(this._addedSlides.forEach(n=>{this.slides.push(n),this.zone.runOutsideAngular(()=>{this.$instance.slick("slickAdd",n.el.nativeElement)})}),this._addedSlides=[],this._removedSlides.forEach(n=>{const i=this.slides.indexOf(n);this.slides=this.slides.filter(r=>r!==n),this.zone.runOutsideAngular(()=>{this.$instance.slick("slickRemove",i)})}),this._removedSlides=[]):t>0&&this.initSlick()}}initSlick(){this.slides=this._addedSlides,this._addedSlides=[],this._removedSlides=[],this.zone.runOutsideAngular(()=>{this.$instance=jQuery(this.el.nativeElement),this.$instance.on("init",(t,n)=>{this.zone.run(()=>{this.init.emit({event:t,slick:n})})}),this.$instance.slick(this.config),this.zone.run(()=>{this.initialized=!0,this.currentIndex=this.config?.initialSlide||0}),this.$instance.on("afterChange",(t,n,i)=>{this.zone.run(()=>{this.afterChange.emit({event:t,slick:n,currentSlide:i,first:0===i,last:n.$slides.length===i+n.options.slidesToScroll}),this.currentIndex=i})}),this.$instance.on("beforeChange",(t,n,i,r)=>{this.zone.run(()=>{this.beforeChange.emit({event:t,slick:n,currentSlide:i,nextSlide:r}),this.currentIndex=r})}),this.$instance.on("breakpoint",(t,n,i)=>{this.zone.run(()=>{this.breakpoint.emit({event:t,slick:n,breakpoint:i})})}),this.$instance.on("destroy",(t,n)=>{this.zone.run(()=>{this.destroy.emit({event:t,slick:n}),this.initialized=!1})})})}addSlide(t){this._addedSlides.push(t)}removeSlide(t){this._removedSlides.push(t)}slickGoTo(t){this.zone.runOutsideAngular(()=>{this.$instance.slick("slickGoTo",t)})}slickNext(){this.zone.runOutsideAngular(()=>{this.$instance.slick("slickNext")})}slickPrev(){this.zone.runOutsideAngular(()=>{this.$instance.slick("slickPrev")})}slickPause(){this.zone.runOutsideAngular(()=>{this.$instance.slick("slickPause")})}slickPlay(){this.zone.runOutsideAngular(()=>{this.$instance.slick("slickPlay")})}unslick(){this.$instance&&(this.zone.runOutsideAngular(()=>{this.$instance.slick("unslick")}),this.$instance=void 0),this.initialized=!1}ngOnChanges(t){if(this.initialized){const n=t.config;if(n.previousValue!==n.currentValue&&void 0!==n.currentValue){const i=n.currentValue.refresh,r=Object.assign({},n.currentValue);delete r.refresh,this.zone.runOutsideAngular(()=>{this.$instance.slick("slickSetOption",r,i)})}}}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=e.VBU({type:s,selectors:[["ngx-slick-carousel"]],inputs:{config:"config"},outputs:{afterChange:"afterChange",beforeChange:"beforeChange",breakpoint:"breakpoint",destroy:"destroy",init:"init"},exportAs:["slick-carousel"],features:[e.Jv_([{provide:d.kq,useExisting:(0,e.Rfq)(()=>s),multi:!0}]),e.OA$],ngContentSelectors:R,decls:1,vars:0,template:function(n,i){1&n&&(e.NAR(),e.SdG(0))},encapsulation:2})}return s})(),C=(()=>{class s{carousel=(0,e.WQX)(b,{host:!0});renderer=(0,e.WQX)(e.sFG);el=(0,e.WQX)(e.aKT);isServer=(0,p.Vy)((0,e.WQX)(e.Agw));ngOnInit(){this.carousel.addSlide(this),this.isServer&&this.carousel.slides.length>0&&this.renderer.setStyle(this.el,"display","none")}ngOnDestroy(){this.carousel.removeSlide(this)}static \u0275fac=function(n){return new(n||s)};static \u0275dir=e.FsC({type:s,selectors:[["","ngxSlickItem",""]]})}return s})(),F=(()=>{class s{static \u0275fac=function(n){return new(n||s)};static \u0275mod=e.$C({type:s});static \u0275inj=e.G2t({imports:[p.MD]})}return s})();var L=o(93887),j=o(88141),S=o(17236);let u=(()=>{class s{static{this.PUBLISHED=1}static{this.NOT_PUBLISHED=0}constructor(t,n,i,r,l,c,ne,se,re,y,oe){this.id=t,this.title=n,this.date=i,this.uri=r,this.status=l,this.downloads=c,this.pages=ne,this.uploader=se,this.church=re,this.tags=y,this.facebookIntegration=oe,null==y&&(this.tags=[])}}return s})();const $=()=>[];function E(s,a){if(1&s&&(e.j41(0,"div",9),e.nrm(1,"img",10),e.k0s()),2&s){const t=a.index,n=e.XpG(2);e.R7$(),e.Y8G("src",n.file.uri+"?page="+(t+1),e.B4B)}}function B(s,a){if(1&s&&(e.j41(0,"div",6)(1,"ngx-slick-carousel",7,0),e.DNE(3,E,2,1,"div",8),e.k0s()()),2&s){const t=e.XpG();e.R7$(),e.Y8G("config",t.Navigation),e.R7$(2),e.Y8G("ngForOf",e.lJ4(2,$).constructor(t.file.pages))}}let G=(()=>{class s{constructor(t){this.activeModal=t,this.file=new u,this.Navigation={infinite:!1,slidesToShow:1,slidesToScroll:1,autoplay:!0,arrows:!0}}close(){this.activeModal.dismiss()}static{this.\u0275fac=function(n){return new(n||s)(e.rXU(h.Lw))}}static{this.\u0275cmp=e.VBU({type:s,selectors:[["app-library-file-preview"]],decls:5,vars:1,consts:[["slickModal",""],[1,"modal-header"],["type","button","data-bs-dismiss","modal","aria-label","Close","id","btn-close",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[1,"card-body"],["class","swiper navigation-swiper rounded","dir","ltr",4,"ngIf"],["dir","ltr",1,"swiper","navigation-swiper","rounded"],[1,"carousel",3,"config"],["class","swiper-slide","ngxSlickItem","",4,"ngFor","ngForOf"],["ngxSlickItem","",1,"swiper-slide"],["alt","",1,"img-fluid",3,"src"]],template:function(n,i){1&n&&(e.j41(0,"div",1)(1,"button",2),e.bIt("click",function(){return i.close()}),e.k0s()(),e.j41(2,"div",3)(3,"div",4),e.DNE(4,B,4,3,"div",5),e.k0s()()),2&n&&(e.R7$(4),e.Y8G("ngIf",i.file.uri))},dependencies:[p.Sq,p.bT,b,C],encapsulation:2})}}return s})();var M=o(24424),m=o(45312),O=o(11327),A=o(21626);let _=(()=>{class s{constructor(t){this.http=t,this.resourceUrl=m.c.adminApiUrl+"bulletins",this.churchResourceUrl=m.c.adminApiUrl+"churches"}create(t,n,i){let r=i?this.resourceUrl+"?tempId="+i:this.resourceUrl;return r+="&sendNotification="+n,this.http.post(r,t)}update(t,n){return this.http.put(n?this.resourceUrl+"?tempId="+n:this.resourceUrl,t)}query(t,n){const i=(0,O.$)(n);return this.http.get(this.churchResourceUrl+"/"+t+"/bulletins",{params:i,observe:"response"})}delete(t){const n=this.resourceUrl+"/"+t.join();return this.http.delete(n)}clone(t){let n={...t};return n.tags=[...t.tags],n}static{this.\u0275fac=function(n){return new(n||s)(e.KVO(A.Qq))}}static{this.\u0275prov=e.jDH({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var N=o(35945),w=o(84699),v=o(73955);const V=s=>
1({"is-invalid":s});function x(s,a){if(1&s&&e.nrm(0,"img",43),2&s){const t=e.XpG();e.Y8G("src",t.imagePreview,e.B4B)}}function Y(s,a){1&s&&(e.j41(0,"div",44)(1,"span",45),e.EFF(2,"Loading..."),e.k0s()())}function D(s,a){1&s&&(e.j41(0,"div")(1,"small",46),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&s&&(e.R7$(2),e.JRh(e.bMT(3,1,"ERROR.MANDATORYFIELD")))}function z(s,a){if(1&s&&(e.j41(0,"div"),e.DNE(1,D,4,3,"div",30),e.k0s()),2&s){e.XpG();const t=e.sdS(40);e.R7$(),e.Y8G("ngIf",null==t.errors?null:t.errors.required)}}function U(s,a){1&s&&e.nrm(0,"span",47)}let X=(()=>{class s extends M.J{constructor(t,n){super(),this.libraryService=t,this.mainService=n,this.file=new u,this.tags=[],this.uploading=!1,this.sendNotification=!1}enableNotification(t){this.sendNotification=t.target.checked}ngOnInit(){this.file.id?this.file&&this.file.uri&&(this.imagePreview=this.file.uri+"?thumbnail=true"):(this.file.status=u.NOT_PUBLISHED,this.file.date=new Date,this.file.facebookIntegration=!1)}save(){return this.file.id?this.libraryService.update(this.file,this.tempId):(this.file.church=this.mainService.activeChurch,this.libraryService.create(this.file,this.sendNotification,this.tempId))}onFileSelected(t){const n=t.target.files[0];n&&(this.uploading=!0,this.uploader.uploadTempFile(n,m.c.adminApiUrl+"bulletins/upload/").subscribe({next:r=>{this.tempId=r.id,r.body&&r.body.pages&&(this.file.pages=r.body.pages)},complete:()=>{this.imagePreview=this.uploader.tempBulletinPreviewUrl(this.tempId),this.uploading=!1},error:r=>{console.error("view error: ",r),this.uploading=!1}}))}selectedTagsChanged(t){this.file.tags=t}static{this.\u0275fac=function(n){return new(n||s)(e.rXU(_),e.rXU(N.t))}}static{this.\u0275cmp=e.VBU({type:s,selectors:[["app-library-form"]],features:[e.Vt3],decls:60,vars:39,consts:[["editForm","ngForm"],["fileUpload",""],["name","ngModel"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body"],["name","editForm","novalidate",""],[1,"row","gx-4","gy-3"],[1,"col-md-3"],[1,"text-center"],["type","file","accept",".pdf",1,"file-input","d-none",3,"change"],[1,"d-flex","flex-column","align-items-center"],[1,"d-flex","align-items-center","border","justify-content-center","bg-light",2,"height","200px","width","100%"],["class","mh-100 mw-100","alt","library file preview","onerror","this.src='assets/images/placeholders/
1default-500x400.png';",3,"src",4,"ngIf"],["class","spinner-border text-primary","role","status",4,"ngIf"],[1,"btn","btn-outline-primary","align-self-stretch","mt-2",3,"click","disabled"],[1,"col-md-9"],[1,"row","g-3"],[1,"col-md-6"],[1,"form-label"],[1,"input-group"],["id","date","name","date","type","text","mwlFlatpickr","","altFormat","d/m/Y","required","",1,"form-control","flatpickr-input",3,"ngModelChange","ngModel","altInput","convertModelValue"],[1,"input-group-text"],[1,"ri-calendar-event-line"],["for","tagKeySelect",1,"form-label"],["entityType","library",3,"selectedTagsChanged","selectedTags"],[1,"col-md-12","mt-3"],["for","titleInput",1,"form-label"],["id","titleInput","name","title","type","text","maxlength","70","required","",1,"form-control",3,"ngModelChange","ngModel","ngClass"],[4,"ngIf"],[1,"col-md-12"],[1,"form-check","mt-3"],["type","checkbox","id","notifyCheckBox",1,"form-check-input",3,"change","disabled"],["for","notifyCheckBox",1,"form-check-label"],[1,"modal-footer"],[1,"col-lg-12"],[1,"hstack","gap-2","justify-content-end"],["type","button",1,"btn","btn-light",3,"click"],["id","saveBt","type","submit",1,"btn","btn-primary",3,"click","disabled"],[1,"d-flex","align-items-center"],["class","spinner-border spinner-border-sm flex-shrink-1 me-2","role","status",4,"ngIf"],[1,"flex-grow-1"],["alt","library file preview","onerror","this.src='assets/images/placeholders/
1default-500x400.png';",1,"mh-100","mw-100",3,"src"],["role","status",1,"spinner-border","text-primary"],[1,"sr-only"],[1,"invalid-feedback","d-block"],["role","status",1,"spinner-border","spinner-border-sm","flex-shrink-1","me-2"]],template:function(n,i){if(1&n){const r=e.RV6();e.j41(0,"div",3)(1,"h5",4),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"button",5),e.bIt("click",function(){return e.eBV(r),e.Njj(i.close())}),e.k0s()(),e.j41(5,"div",6)(6,"form",7,0)(8,"div",8)(9,"div",9)(10,"div",10)(11,"input",11,1),e.bIt("change",function(c){return e.eBV(r),e.Njj(i.onFileSelected(c))}),e.k0s(),e.j41(13,"div",12)(14,"div",13),e.DNE(15,x,1,1,"img",14)(16,Y,3,0,"div",15),e.k0s(),e.j41(17,"button",16),e.bIt("click",function(){e.eBV(r);const c=e.sdS(12);return e.Njj(c.click())}),e.EFF(18),e.nI1(19,"translate"),e.k0s()()()(),e.j41(20,"div",17)(21,"div",18)(22,"div",19)(23,"label",20),e.EFF(24),e.nI1(25,"translate"),e.k0s(),e.j41(26,"div",21)(27,"input",22),e.mxI("ngModelChange",function(c){return e.eBV(r),e.DH7(i.file.date,c)||(i.file.date=c),e.Njj(c)}),e.k0s(),e.j41(28,"span",23),e.nrm(29,"i",24),e.k0s()()(),e.j41(30,"div",19)(31,"label",25),e.EFF(32),e.nI1(33,"translate"),e.k0s(),e.j41(34,"app-tags-selector",26),e.bIt("selectedTagsChanged",function(c){return e.eBV(r),e.Njj(i.selectedTagsChanged(c))}),e.k0s()(),e.j41(35,"div",27)(36,"label",28),e.EFF(37),e.nI1(38,"translate"),e.k0s(),e.j41(39,"input",29,2),e.mxI("ngModelChange",function(c){return e.eBV(r),e.DH7(i.file.title,c)||(i.file.title=c),e.Njj(c)}),e.k0s(),e.DNE(41,z,2,1,"div",30),e.k0s(),e.j41(42,"div",31)(43,"div",32)(44,"input",33),e.bIt("change",function(c){return e.eBV(r),e.Njj(i.enableNotification(c))}),e.k0s(),e.j41(45,"label",34),e.EFF(46),e.nI1(47,"translate"),e.k0s()()()()()()()(),e.j41(48,"div",35)(49,"div",36)(50,"div",37)(51,"button",38),e.bIt("click",function(){return e.eBV(r),e.Njj(i.close())}),e.EFF(52),e.nI1(53,"translate"),e.k0s(),e.j41(54,"button",39),e.bIt("click",function(){return e.eBV(r),e.Njj(i.submit())}),e.j41(55,"span",40),e.DNE(56,U,1,0,"span",41),e.j41(57,"span",42),e.EFF(58),e.nI1(59,"translate"),e.k0s()()()()()()}if(2&n){const r=e.sdS(7),l=e.sdS(40);e.R7$(2),e.SpI(" ",e.bMT(3,21,i.file.id?"LIBRARY.EDIT":"LIBRARY.NEW"),""),e.R7$(13),e.Y8G("ngIf",!i.uploading&&i.imagePreview),e.R7$(),e.Y8G("ngIf",i.uploading),e.R7$(),e.Y8G("disabled",i.uploading),e.R7$(),e.SpI(" ",e.bMT(19,23,"LIBRARY.SELECTFILE")," "),e.R7$(6),e.JRh(e.bMT(25,25,"LIBRARY.DATE")),e.R7$(3),e.R50("ngModel",i.file.date),e.Y8G("altInput",!0)("convertModelValue",!0),e.R7$(5),e.JRh(e.bMT(33,27,"LIBRARY.TAG")),e.R7$(2),e.Y8G("selectedTags",i.file.tags),e.R7$(3),e.SpI("",e.bMT(38,29,"LIBRARY.TITLE"),"*"),e.R7$(2),e.R50("ngModel",i.file.title),e.Y8G("ngClass",e.eq3(37,V,l.invalid&&(l.dirty||l.touched)&&l.errors)),e.R7$(2),e.Y8G("ngIf",l.invalid&&(l.dirty||l.touched)),e.R7$(3),e.Y8G("disabled",1==i.file.status),e.R7$(2),e.JRh(e.bMT(47,31,"LIBRARY.NOTIFY")),e.R7$(6),e.JRh(e.bMT(53,33,"GLOBAL.CANCEL")),e.R7$(2),e.Y8G("disabled",r.form.invalid||i.isSaving||i.uploading||!i.tempId&&!i.file.uri),e.R7$(2),e.Y8G("ngIf",i.isSaving),e.R7$(2),e.JRh(e.bMT(59,35,"GLOBAL.SAVE"))}},dependencies:[p.YU,p.bT,d.qT,d.me,d.BC,d.cb,d.YS,d.tU,d.vS,d.cV,w.y,f.kL,v.D9],encapsulation:2})}}return s})();var P=o(50035),k=o(83801),J=o(26364);function Q(s,a){if(1&s&&(e.j41(0,"option",26),e.EFF(1),e.k0s()),2&s){const t=a.$implicit;e.Y8G("ngValue",t.id),e.R7$(),e.JRh(t.name)}}function W(s,a){if(1&s){const t=e.RV6();e.j41(0,"div",22)(1,"select",23),e.mxI("ngModelChange",function(i){e.eBV(t);const r=e.XpG();return e.DH7(r.filter,i)||(r.filter=i),e.Njj(i)}),e.bIt("ngModelChange",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.loadAll(!0))}),e.j41(2,"option",24),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.DNE(5,Q,2,2,"option",25),e.k0s()()}if(2&s){const t=e.XpG();e.R7$(),e.R50("ngModel",t.filter),e.R7$(),e.Y8G("ngValue",null),e.R7$(),e.JRh(e.bMT(4,4,"LIBRARY.CATEGORIES")),e.R7$(2),e.Y8G("ngForOf",t.tags)}}function H(s,a){if(1&s){const t=e.RV6();e.j41(0,"div",46)(1,"span",47),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,r=e.XpG();return e.Njj(r.edit(i))}),e.EFF(2),e.k0s()()}if(2&s){const t=a.$implicit;e.R7$(2),e.SpI(" ",t.name," ")}}function K(s,a){if(1&s){const t=e.RV6();e.j41(0,"tr",27)(1,"th",28)(2,"div",13)(3,"input",29),e.bIt("click",function(){const i=e.eBV(t).$implicit,r=e.XpG();return e.Njj(r.selectionList.toggle(i.id))}),e.k0s()()(),e.j41(4,"td")(5,"div",30),e.bIt("click",function(){const i=e.eBV(t).$implicit,r=e.XpG();return e.Njj(r.edit(i))}),e.j41(6,"div",31),e.nrm(7,"img",32),e.k0s(),e.j41(8,"div",33),e.EFF(9),e.k0s()()(),e.j41(10,"td",34)(11,"span",35),e.bIt("click",function(){const i=e.eBV(t).$implicit,r=e.XpG();return e.Njj(r.edit(i))}),e.EFF(12),e.nI1(13,"date"),e.k0s()(),e.j41(14,"td",34)(15,"span",36),e.bIt("click",function(){const i=e.eBV(t).$implicit,r=e.XpG();return e.Njj(r.edit(i))}),e.EFF(16),e.k0s()(),e.j41(17,"td",34)(18,"span",36),e.bIt("click",function(){const i=e.eBV(t).$implicit,r=e.XpG();return e.Njj(r.edit(i))}),e.EFF(19),e.k0s()(),e.j41(20,"td")(21,"div",37),e.DNE(22,H,3,1,"div",38),e.k0s()(),e.j41(23,"td",39)(24,"a",40),e.nI1(25,"translate"),e.nrm(26,"i",41),e.k0s(),e.j41(27,"a",42),e.nI1(28,"translate"),e.bIt("click",function(){const i=e.eBV(t).$implicit,r=e.XpG();return e.Njj(r.openFilePreview(i))}),e.nrm(29,"i",43),e.k0s(),e.j41(30,"a",44),e.nI1(31,"translate"),e.bIt("click",function(){const i=e.eBV(t).$implicit,r=e.XpG();
1return e.Njj(r.copyUrlToClipboard(i.uri))}),e.nrm(32,"i",45),e.k0s()()()}if(2&s){const t=a.$implicit,n=a.index,i=e.XpG();e.Mz_("id","s_",t.id,""),e.R7$(3),e.Mz_("id","checkSingleOneCheckBox_",n,""),e.Y8G("checked",i.selectionList.isChecked(t.id)),e.R7$(4),e.FS9("src",t.uri?t.uri+"?thumbnail=true":"assets/images/placeholders/default-500x400.png",e.B4B),e.R7$(2),e.JRh(t.title),e.R7$(2),e.Mz_("id","date_",n,""),e.R7$(),e.JRh(e.i5U(13,17,t.date,"shortDate")),e.R7$(4),e.JRh(t.downloads||0),e.R7$(3),e.JRh(t.pages),e.R7$(3),e.Y8G("ngForOf",t.tags),e.R7$(2),e.FS9("ngbTooltip",e.bMT(25,20,"TOOLTIP.DOWNLOAD")),e.Y8G("href",t.uri,e.B4B),e.R7$(3),e.FS9("ngbTooltip",e.bMT(28,22,"TOOLTIP.SEE_FILE")),e.R7$(3),e.FS9("ngbTooltip",e.bMT(31,24,"TOOLTIP.COPY_LINK"))}}function Z(s,a){if(1&s){const t=e.RV6();e.j41(0,"div",48)(1,"div",49)(2,"div",50)(3,"div",51)(4,"ngb-pagination",52),e.mxI("pageChange",function(i){e.eBV(t);const r=e.XpG();return e.DH7(r.page,i)||(r.page=i),e.Njj(i)}),e.bIt("pageChange",function(i){e.eBV(t);const r=e.XpG();return e.Njj(r.loadPage(i))}),e.k0s()()()()()}if(2&s){const t=e.XpG();e.R7$(4),e.Y8G("collectionSize",t.totalItems),e.R50("page",t.page),e.Y8G("pageSize",t.itemsPerPage)("maxSize",3)}}let q=(()=>{class s extends S.p{constructor(t,n,i,r){super(),this.modalService=t,this.libraryService=n,this.tagService=i,this.clipboard=r,this.tags=[],this.sortCol="date",this.sortOrder="desc"}ngOnInit(){this.breadCrumbItems=[{label:"MENUITEMS.CONTENT.TEXT"},{label:"MENUITEMS.CONTENT.LIST.LIBRARY",active:!0}],this.loadAll()}delete(){return this.libraryService.delete(this.selectionList.list)}load(){return this.libraryService.query(this.mainService.activeChurch.id,{page:this.page-1,size:this.itemsPerPage,tagId:this.filter,sort:[this.sortCol+","+this.sortOrder]}).pipe((0,j.M)(t=>{this.loadTags()}))}openEditDialog(t){const n=this.modalService.open(X,{size:"lg",centered:!0,backdrop:"static",keyboard:!1}),i=t?this.libraryService.clone(t):new u;return n.componentInstance.file=i,n}loadTags(){this.tagService.query(this.mainService.activeChurch.id,{entity:"library"}).subscribe({next:t=>{this.tags=t},error:t=>{this.dialog.openGenericErrorDialog(t)}})}openFilePreview(t){const n=this.modalService.open(G,{size:"md",centered:!0});n.componentInstance.file=t,n.result.then(()=>{}).catch(()=>{})}copyUrlToClipboard(t){t&&this.clipboard.copy(t)}static{this.\u0275fac=function(n){return new(n||s)(e.rXU(h.Bq),e.rXU(_),e.rXU(P.w),e.rXU(k.B0))}}static{this.\u0275cmp=e.VBU({type:s,selectors:[["app-library"]],features:[e.Vt3],decls:39,vars:29,consts:[[3,"breadcrumbItems","loading"],["id","filesList",1,"card"],[1,"card-header"],[1,"row","g-3"],["class","col-md-auto",4,"ngIf"],[1,"col-md-auto","ms-auto"],["id","addBt","type","button","data-bs-toggle","modal",1,"btn","btn-outline-primary","ms-2",3,"click"],["id","removeBt","type","button",1,"btn","btn-outline-danger","ms-2",3,"click","disabled"],[1,"card-body"],[1,"table-responsive","table-card","mb-0"],[1,"table"],[1,"bg-light"],["scope","col",2,"width","50px"],[1,"form-check"],["type","checkbox","id","checkAllCheckBox","value","option",1,"form-check-input",3,"change","disabled","checked"],["data-sort","title","scope","col",1,"sort",3,"click"],["data-sort","date","scope","col",1,"sort",3,"click"],["data-sort","downloads","scope","col",1,"sort",3,"click"],["data-sort","pages","scope","col",1,"sort",3,"click"],["data-sort","tags","scope","col",1,"sort",3,"click"],["class","align-middle",3,"id",4,"ngFor","ngForOf"],["class","px-3",4,"ngIf"],[1,"col-md-auto"],["data-choices","","data-choices-search-false","","name","choices-single-default","id","categoryKeySelect",1,"form-control","form-select",3,"ngModelChange","ngModel"],["selected","",3,"ngValue"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],[1,"align-middle",3,"id"],["scope","row"],["type","checkbox","name","checkAll",1,"form-check-input",3,"click","id","checked"],[1,"d-flex","align-items-center","cursor-pointer",3,"click"],[1,"flex-shrink-0"],["onerror","this.src='assets/images/placeholders/
1default-500x400.png';","alt","File Image",1,"image-fluid",2,"width","3rem",3,"src"],[1,"flex-grow-1","ms-3"],[1,"text-center"],[1,"cursor-pointer",3,"click","id"],[1,"cursor-pointer",3,"click"],[1,"d-flex","flex-row"],["class","me-1",4,"ngFor","ngForOf"],[1,"text-center",2,"font-size","20px"],["placement","top","download","",1,"cursor-pointer",3,"href","ngbTooltip"],[1,"ri-file-download-line"],["placement","top",1,"cursor-pointer","ms-1",3,"click","ngbTooltip"],[1,"ri-eye-line","ms-1"],["placement","top",1,"button","cursor-pointer","ms-1",3,"click","ngbTooltip"],[1,"ri-link","ms-1"],[1,"me-1"],[1,"cursor-pointer","bg-primary","badge","text-lowercase",3,"click"],[1,"px-3"],[1,"row","justify-partner-md-between","align-items-md-center","g-0","pagination"],[1,"col-sm-12","col-md-12"],[1,"text-md-right","float-md-end","pagination-rounded","gridjs-pagination","mb-3","ms-auto"],[3,"pageChange","collectionSize","page","pageSize","maxSize"]],template:function(n,i){1&n&&(e.nrm(0,"app-breadcrumbs",0),e.j41(1,"div",1)(2,"div",2)(3,"div",3),e.DNE(4,W,6,6,"div",4),e.j41(5,"div",5)(6,"button",6),e.bIt("click",function(){return i.add()}),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"button",7),e.bIt("click",function(){return i.showDeleteConfirmation("LIBRARY.REMOVE")}),e.EFF(10),e.nI1(11,"translate"),e.k0s()()()(),e.j41(12,"div",8)(13,"div",9)(14,"table",10)(15,"thead")(16,"tr",11)(17,"th",12)(18,"div",13)(19,"input",14),e.bIt("change",function(){return i.selectionList.toggleAll(i.data)}),e.k0s()()(),e.j41(20,"th",15),e.bIt("click",function(){return i.sort("title")}),e.EFF(21),e.nI1(22,"translate"),e.k0s(),e.j41(23,"th",16),e.bIt("click",function(){return i.sort("date")}),e.EFF(24),e.nI1(25,"translate"),e.k0s(),e.j41(26,"th",17),e.bIt("click",function(){return i.sort("downloads")}),e.EFF(27),e.nI1(28,"translate"),e.k0s(),e.j41(29,"th",18),e.bIt("click",function(){return i.sort("pages")}),e.EFF(30),e.nI1(31,"translate"),e.k0s(),e.j41(32,"th",19),e.bIt("click",function(){return i.sort("tags[0].id")}),e.EFF(33),e.nI1(34,"translate"),e.k0s(),e.nrm(35,"th"),e.k0s()(),e.j41(36,"tbody"),e.DNE(37,K,33,26,"tr",20),e.k0s()()(),e.DNE(38,Z,5,4,"div",21),e.k0s()()),2&n&&(e.Y8G("breadcrumbItems",i.breadCrumbItems)("loading",i.isLoading),e.R7$(4),e.Y8G("ngIf",i.tags.length>0),e.R7$(3),e.SpI(" ",e.bMT(8,15,"GLOBAL.ADD")," "),e.R7$(2),e.Y8G("disabled",0==i.selectionList.length),e.R7$(),e.JRh(e.bMT(11,17,"GLOBAL.REMOVE")),e.R7$(9),e.Y8G("disabled",0==i.data.length)("checked",i.selectionList.length>0&&i.selectionList.length===i.data.length),e.R7$(2),e.JRh(e.bMT(22,19,"LIBRARY.TITLE")),e.R7$(3),e.JRh(e.bMT(25,21,"GLOBAL.DATE")),e.R7$(3),e.JRh(e.bMT(28,23,"LIBRARY.DOWNLOADS")),e.R7$(3),e.JRh(e.bMT(31,25,"LIBRARY.PAGES")),e.R7$(3),e.JRh(e.bMT(34,27,"LIBRARY.CATEGORIES")),e.R7$(4),e.Y8G("ngForOf",i.data),e.R7$(),e.Y8G("ngIf",i.totalItems>i.itemsPerPage))},dependencies:[p.Sq,p.bT,d.xH,d.y7,d.wz,d.BC,d.vS,J.m,h.s5,h.md,p.vh,v.D9],encapsulation:2})}}return s})();var ee=o(64249);const te=[{path:"",component:q}];let ie=(()=>{class s{static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275mod=e.$C({type:s})}static{this.\u0275inj=e.G2t({imports:[p.MD,L.G,ee.Q,h.c9,T.MQ,F,h.n8,k.FQ,f.ND.forRoot(),I.iI.forChild(te)]})}}return 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.