PageSourceSearch

https://www.lenus.ie/1542.51d09aef97f0fc4d.js

js lenus.ie collected 2026-10-02 04:10:32 UTC 47,334 bytes, 1 lines download raw bytes

1(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[1542],{71542:(A,E,i)=>{"use strict";i.r(E),i.d(E,{EditCollectionPageModule:()=>ft});var l=i(35103),b=i(78181),c=i(67522),_=i(80180),R=i(5378),y=i(95445),H=i(84803),z=i(53426),X=i(13005),p=i(10572),h=i(21160),u=i(48358),B=i(65384),$=i(6952),K=i(42620),d=i(45608),e=i(98678),C=i(96342),U=i(41966),Y=i(60819);function J(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",7),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(a.addItemTemplate())}),e.\u0275\u0275element(1,"i",8),e.\u0275\u0275elementStart(2,"span",9),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()()}2&n&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(4,1,"collection.edit.template.add-button"),""))}function W(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",10),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(a.deleteItemTemplate())}),e.\u0275\u0275element(1,"i",11),e.\u0275\u0275elementStart(2,"span",9),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()()}2&n&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(4,1,"collection.edit.template.delete-button"),""))}function Z(n,r){if(1&n&&(e.\u0275\u0275elementStart(0,"button",12),e.\u0275\u0275pipe(1,"async"),e.\u0275\u0275element(2,"i",13),e.\u0275\u0275elementStart(3,"span",9),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd()()),2&n){const t=e.\u0275\u0275nextContext(2);let o;e.\u0275\u0275property("routerLink","/collections/"+(null==(o=e.\u0275\u0275pipeBind1(1,2,t.dsoRD$))?null:o.payload.uuid)+"/itemtemplate"),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(5,4,"collection.edit.template.edit-button"),"")}}function Q(n,r){if(1&n&&(e.\u0275\u0275elementStart(0,"div",2)(1,"label"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",3),e.\u0275\u0275template(5,J,5,3,"button",4),e.\u0275\u0275template(6,W,5,3,"button",5),e.\u0275\u0275template(7,Z,6,6,"button",6),e.\u0275\u0275elementEnd()()),2&n){const t=r.ngVar;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,4,"collection.edit.template.label")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",!(null!=t&&t.payload)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null==t?null:t.payload),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null==t?null:t.payload)}}let q=(()=>{class n extends _.Z{constructor(t,o,a,s,m,S,I,x){super(t,a,s,m,S),this.collectionDataService=t,this.itemTemplateService=o,this.router=a,this.route=s,this.notificationsService=m,this.translate=S,this.requestService=I,this.chd=x,this.frontendURL="/collections/",this.type=R.F.type}ngOnInit(){this.router.events.subscribe(t=>{(t instanceof c.m2||t instanceof c.Xs&&t.routerEvent instanceof c.m2)&&(super.ngOnInit(),this.initTemplateItem(),this.chd.detectChanges())})}initTemplateItem(){this.itemTemplateRD$=this.dsoRD$.pipe((0,p.Gp)(),(0,h.w)(t=>this.itemTemplateService.findByCollectionID(t.uuid)))}addItemTemplate(){const t=this.dsoRD$.pipe((0,p.Gp)()),o=t.pipe((0,h.w)(s=>this.itemTemplateService.createByCollectionID(new X.c,s.uuid).pipe((0,p.Gp)()))),a=t.pipe((0,h.w)(s=>this.itemTemplateService.getCollectionEndpoint(s.id)));(0,z.a)(t,o,a).subscribe(([s,m,S])=>{this.requestService.setStaleByHrefSubstring(S),this.router.navigate([(0,K.$X)(s.uuid)])})}deleteItemTemplate(){this.dsoRD$.pipe((0,p.Gp)(),(0,h.w)(t=>this.itemTemplateService.findByCollectionID(t.uuid)),(0,p.Gp)(),(0,h.w)(t=>this.itemTemplateService.delete(t.uuid)),(0,p.hC)(),(0,u.U)(t=>(0,d.Uh)(t)&&t.hasSucceeded)).subscribe(t=>{t?this.notificationsService.success(null,this.translate.get("collection.edit.template.notifications.delete.success")):this.notificationsService.error(null,this.translate.get("collection.edit.template.notifications.delete.error")),this.initTemplateItem()})}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(y.W),e.\u0275\u0275directiveInject(H.w),e.\u0275\u0275directiveInject(c.F0),e.\u0275\u0275directiveInject(c.gz),e.\u0275\u0275directiveInject(B.T),e.\u0275\u0275directiveInject(C.sK),e.\u0275\u0275directiveInject($.s),e.\u0275\u0275directiveInject(e.ChangeDetectorRef))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["ds-collection-metadata"]],features:[e.\u0275\u0275InheritDefinitionFeature],decls:4,vars:6,consts:[["class","container-fluid mb-2",4,"ngVar"],[3,"dso","submitForm","back","finish"],[1,"container-fluid","mb
1-2"],[1,"button-row","space-children-mr"],["class","btn btn-success",3,"click",4,"ngIf"],["class","btn btn-danger",3,"click",4,"ngIf"],["class","btn btn-primary",3,"routerLink",4,"ngIf"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-plus"],[1,"d-none","d-sm-inline"],[1,"btn","btn-danger",3,"click"],[1,"fas","fa-trash-alt"],[1,"btn","btn-primary",3,"routerLink"],[1,"fas","fa-edit"]],template:function(t,o){if(1&t&&(e.\u0275\u0275template(0,Q,8,6,"div",0),e.\u0275\u0275pipe(1,"async"),e.\u0275\u0275elementStart(2,"ds-themed-collection-form",1),e.\u0275\u0275listener("submitForm",function(s){return o.onSubmit(s)})("back",function(){return o.navigateToHomePage()})("finish",function(){return o.navigateToHomePage()}),e.\u0275\u0275pipe(3,"async"),e.\u0275\u0275elementEnd()),2&t){let a;e.\u0275\u0275property("ngVar",e.\u0275\u0275pipeBind1(1,2,o.itemTemplateRD$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("dso",null==(a=e.\u0275\u0275pipeBind1(3,4,o.dsoRD$))?null:a.payload)}},dependencies:[l.O5,c.rH,U.g,Y.K,l.Ov,C.X$],encapsulation:2}),n})();var F=i(76215),ee=i(31258);function te(n,r){if(1&n&&(e.\u0275\u0275element(0,"ds-comcol-role",1),e.\u0275\u0275pipe(1,"async")),2&n){const t=r.$implicit,o=e.\u0275\u0275nextContext();e.\u0275\u0275property("dso",e.\u0275\u0275pipeBind1(1,2,o.collection$))("comcolRole",t)}}let ne=(()=>{class n{constructor(t){this.route=t}ngOnInit(){this.dsoRD$=this.route.parent.data.pipe((0,F.P)(),(0,u.U)(t=>t.dso)),this.collection$=this.dsoRD$.pipe((0,p.xw)(),(0,p.xe)()),this.comcolRoles$=this.collection$.pipe((0,u.U)(t=>{let o=(0,d.Uh)(t._links.workflowGroups)?t._links.workflowGroups:[];return Array.isArray(o)||(o=[o]),[{name:"collection-admin",href:t._links.adminGroup.href},{name:"submitters",href:t._links.submittersGroup.href},{name:"item_read",href:t._links.itemReadGroup.href},{name:"bitstream_read",href:t._links.bitstreamReadGroup.href},...o]}))}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(c.gz))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["ds-collection-roles"]],decls:2,vars:3,consts:[[3,"dso","comcolRole",4,"ngFor","ngForOf"],[3,"dso","comcolRole"]],template:function(t,o){1&t&&(e.\u0275\u0275template(0,te,2,4,"ds-comcol-role",0),e.\u0275\u0275pipe(1,"async")),2&t&&e.\u0275\u0275property("ngForOf",e.\u0275\u0275pipeBind1(1,1,o.comcolRoles$))},dependencies:[l.sg,ee.b,l.Ov],encapsulation:2}),n})();var oe=i(90321),v=i(5737),ie=i(5453),g=i(89290),D=i(77176),ae=i(62574),M=i.n(ae),re=i(76774),w=i(5476),se=i(87657),le=i(82485),ce=i(75286),pe=i(97920),V=i(27303),T=i(77007),f=i(58371),j=i(35841),de=i(39034),ue=i(97785),me=i(78964);function he(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",8),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext(2).ngVar,s=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(s.testConfiguration(a))}),e.\u0275\u0275elementStart(1,"span"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd()()}if(2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275property("disabled",!t.isEnabled),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,2,"collection.source.controls.test.submit"))}}function fe(n,r){1&n&&(e.\u0275\u0275elementStart(0,"button",9),e.\u0275\u0275element(1,"span",10),e.\u0275\u0275elementStart(2,"span"),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()()),2&n&&(e.\u0275\u0275property("disabled",!0),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"collection.source.controls.test.running")))}function ve(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",11),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(a.importNow())}),e.\u0275\u0275elementStart(1,"span",12),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd()()}if(2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275property("disabled",!t.isEnabled),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,2,"collection.source.controls.import.submit"))}}function Ce(n,r){1&n&&(e.\u0275\u0275elementStart(0,"button",13),e.\u0275\u0275element(1,"span",10),e.\u0275\u0275elementStart(2,"span",12),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()()),2&n&&(e.\u0275\u0275property("disabled",!0),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"collection.source.controls.import.running")))}function ge(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",11),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext(3);
1return e.\u0275\u0275resetView(a.resetAndReimport())}),e.\u0275\u0275elementStart(1,"span",12),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd()()}if(2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275property("disabled",!t.isEnabled),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(3,2,"collection.source.controls.reset.submit"),"")}}function Se(n,r){1&n&&(e.\u0275\u0275elementStart(0,"button",13),e.\u0275\u0275element(1,"span",10),e.\u0275\u0275elementStart(2,"span",12),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()()),2&n&&(e.\u0275\u0275property("disabled",!0),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(4,2,"collection.source.controls.reset.running"),""))}function ye(n,r){if(1&n&&(e.\u0275\u0275elementStart(0,"div",2)(1,"h4"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div")(5,"span",3),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(8,"span"),e.\u0275\u0275text(9),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"div")(11,"span",3),e.\u0275\u0275text(12),e.\u0275\u0275pipe(13,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(14,"span"),e.\u0275\u0275text(15),e.\u0275\u0275pipe(16,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(17,"div")(18,"span",3),e.\u0275\u0275text(19),e.\u0275\u0275pipe(20,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(21,"span"),e.\u0275\u0275text(22),e.\u0275\u0275pipe(23,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(24,"div")(25,"span",3),e.\u0275\u0275text(26),e.\u0275\u0275pipe(27,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(28,"span"),e.\u0275\u0275text(29),e.\u0275\u0275pipe(30,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(31,he,4,4,"button",4),e.\u0275\u0275pipe(32,"async"),e.\u0275\u0275template(33,fe,5,4,"button",5),e.\u0275\u0275pipe(34,"async"),e.\u0275\u0275template(35,ve,4,4,"button",6),e.\u0275\u0275pipe(36,"async"),e.\u0275\u0275template(37,Ce,5,4,"button",7),e.\u0275\u0275pipe(38,"async"),e.\u0275\u0275template(39,ge,4,4,"button",6),e.\u0275\u0275pipe(40,"async"),e.\u0275\u0275template(41,Se,5,4,"button",7),e.\u0275\u0275pipe(42,"async"),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext().ngVar,o=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,15,"collection.source.controls.head")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(7,17,"collection.source.controls.harvest.status")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(null==t?null:t.harvestStatus),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(13,19,"collection.source.controls.harvest.start")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(null!=t&&t.harvestStartTime?null==t?null:t.harvestStartTime:e.\u0275\u0275pipeBind1(16,21,"collection.source.controls.harvest.no-information")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(20,23,"collection.source.controls.harvest.last")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(null!=t&&t.lastHarvested?null==t?null:t.lastHarvested:e.\u0275\u0275pipeBind1(23,25,"collection.source.controls.harvest.no-information")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(27,27,"collection.source.controls.harvest.message")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(null!=t&&t.message?null==t?null:t.message:e.\u0275\u0275pipeBind1(30,29,"collection.source.controls.harvest.no-information")),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!e.\u0275\u0275pipeBind1(32,31,o.testConfigRunning$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind1(34,33,o.testConfigRunning$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!e.\u0275\u0275pipeBind1(36,35,o.importRunning$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind1(38,37,o.importRunning$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!e.\u0275\u0275pipeBind1(40,39,o.reImportRunning$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind1(42,41,o.reImportRunning$))}}function be(n,r){if(1&n&&(e.\u0275\u0275elementStart(0,"div"),e.\u0275\u0275template(1,ye,43,43,"div",1),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.shouldShow)}}let Ie=(()=>{class n{constructor(t,o,a,s,m,S,I,x){this.scriptDataService=t,this.processDataService=o,this.requestService=a,this.notificationsService=s,this.collectionService=m,this.translateService=S,this.httpClient=I,this.bitstreamService=x,this.subs=[],this.autoRefreshIDs=[],this.testConfigRunning$=new j.X(!1),this.importRunning$=new j.X(!1),this.reImportRunning$=new j.X(!1)}ngOnInit(){this.contentSource$=this.collectionService.findByHref(this.collection._links.self.href,!1).pipe((0,p.mc)(),(0,h.w)(t=>this.collectionService.getContentSource(t.uuid,!1)),(0,p.mc)())}testConfiguration(t){this.testConfigRunning$.next(!0),this.subs.push(this.scriptDataService.invoke("harvest",[{name:"-g",value:null},{name:"-a",value:t.oaiSource},{name:"-i",value:(new ue.q).Serialize(t.oaiSetId)}],[]).pipe((0,p.hC)(),(0,V.b)(o=>{o.hasFailed&&(this.notificationsService.error(this.translateService.get("
1collection.source.controls.test.submit.error")),this.testConfigRunning$.next(!1))}),(0,T.h)(o=>o.hasSucceeded&&(0,d.Uh)(o.payload)),(0,h.w)(o=>(this.autoRefreshIDs.push(o.payload.processId),this.processDataService.autoRefreshUntilCompletion(o.payload.processId))),(0,u.U)(o=>o.payload)).subscribe(o=>{o.processStatus.toString()===f.N[f.N.FAILED].toString()&&(this.notificationsService.error(this.translateService.get("collection.source.controls.test.failed")),this.testConfigRunning$.next(!1)),o.processStatus.toString()===f.N[f.N.COMPLETED].toString()&&(this.bitstreamService.findByHref(o._links.output.href).pipe((0,p.Gp)()).subscribe(a=>{this.httpClient.get(a._links.content.href,{responseType:"text"}).subscribe(s=>{const m=s.replaceAll(new RegExp(".*\\@(.*)","g"),"$1").replaceAll("The script has started","").replaceAll("The script has completed","");this.notificationsService.info(this.translateService.get("collection.source.controls.test.completed"),m)})}),this.testConfigRunning$.next(!1))}))}importNow(){this.importRunning$.next(!0),this.subs.push(this.scriptDataService.invoke("harvest",[{name:"-r",value:null},{name:"-c",value:this.collection.uuid}],[]).pipe((0,p.hC)(),(0,V.b)(t=>{t.hasFailed?(this.notificationsService.error(this.translateService.get("collection.source.controls.import.submit.error")),this.importRunning$.next(!1)):this.notificationsService.success(this.translateService.get("collection.source.controls.import.submit.success"))}),(0,T.h)(t=>t.hasSucceeded&&(0,d.Uh)(t.payload)),(0,h.w)(t=>(this.autoRefreshIDs.push(t.payload.processId),this.processDataService.autoRefreshUntilCompletion(t.payload.processId))),(0,u.U)(t=>t.payload)).subscribe(t=>{t.processStatus.toString()===f.N[f.N.FAILED].toString()&&(this.notificationsService.error(this.translateService.get("collection.source.controls.import.failed")),this.importRunning$.next(!1)),t.processStatus.toString()===f.N[f.N.COMPLETED].toString()&&(this.notificationsService.success(this.translateService.get("collection.source.controls.import.completed")),this.requestService.setStaleByHrefSubstring(this.collection._links.self.href),this.importRunning$.next(!1))}))}resetAndReimport(){this.reImportRunning$.next(!0),this.subs.push(this.scriptDataService.invoke("harvest",[{name:"-o",value:null},{name:"-c",value:this.collection.uuid}],[]).pipe((0,p.hC)(),(0,V.b)(t=>{t.hasFailed?(this.notificationsService.error(this.translateService.get("collection.source.controls.reset.submit.error")),this.reImportRunning$.next(!1)):this.notificationsService.success(this.translateService.get("collection.source.controls.reset.submit.success"))}),(0,T.h)(t=>t.hasSucceeded&&(0,d.Uh)(t.payload)),(0,h.w)(t=>(this.autoRefreshIDs.push(t.payload.processId),this.processDataService.autoRefreshUntilCompletion(t.payload.processId))),(0,u.U)(t=>t.payload)).subscribe(t=>{t.processStatus.toString()===f.N[f.N.FAILED].toString()&&(this.notificationsService.error(this.translateService.get("collection.source.controls.reset.failed")),this.reImportRunning$.next(!1)),t.processStatus.toString()===f.N[f.N.COMPLETED].toString()&&(this.notificationsService.success(this.translateService.get("collection.source.controls.reset.completed")),this.requestService.setStaleByHrefSubstring(this.collection._links.self.href),this.reImportRunning$.next(!1))}))}ngOnDestroy(){this.subs.forEach(t=>{(0,d.Uh)(t)&&t.unsubscribe()}),this.autoRefreshIDs.forEach(t=>{this.processDataService.stopAutoRefreshing(t)})}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(ce.UY),e.\u0275\u0275directiveInject(pe.n),e.\u0275\u0275directiveInject($.s),e.\u0275\u0275directiveInject(B.T),e.\u0275\u0275directiveInject(y.W),e.\u0275\u0275directiveInject(C.sK),e.\u0275\u0275directiveInject(me.eN),e.\u0275\u0275directiveInject(de.J))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["ds-collection-source-controls"]],inputs:{isEnabled:"isEnabled",collection:"collection",shouldShow:"shouldShow"},decls:2,vars:3,consts:[[4,"ngVar"],["class","container-fluid space-children-mr",4,"ngIf"],[1,"container-fluid","space-children-mr"],[1,"font-weight-bold"],["class","btn btn-secondary",3,"disabled","click",4,"ngIf"],["class","btn btn-secondary",3,"disabled",4,"ngIf"],["class","btn btn-primary",3,"disabled","click",4,"ngIf"],["class","btn btn-primary",3,"disabled",4,"ngIf"],[1,"btn","btn-secondary",3,"disabled","click"],[1,"btn","btn-secondary",3,"disabled"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm","spinner-button"],[1,"btn","btn-primary",3,"disabled","click"],[1,"d-none","d-sm-inline"],[1,"btn","btn-primary",3,"disabled"]],template:function(t,o){1&t&&(e.\u0275\u0275template(0,be,2,1,"div",0),e.\u0275\u0275pipe(1,"async")),2&t&&e.\u0275\u0275property("ngVar",e.\u0275\u0275pipeBind1(1,1,o.contentSource$))},dependencies:[l.O5,U.g,l.Ov,C.X$],styles:[".spinner-button[_ngcontent-%COMP%]{margin-bottom:calc((var(--bs-line-height-base) * 1rem - var(--bs-font-size-base)) / 2)}"]}),n})();function xe(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",14),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext();
1return e.\u0275\u0275resetView(a.discard())}),e.\u0275\u0275pipe(1,"async"),e.\u0275\u0275element(2,"i",15),e.\u0275\u0275elementStart(3,"span",6),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd()()}if(2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("disabled",!0!==e.\u0275\u0275pipeBind1(1,2,t.hasChanges$)),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(5,4,"item.edit.metadata.discard-button"),"")}}function _e(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",16),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(a.reinstate())}),e.\u0275\u0275element(1,"i",17),e.\u0275\u0275elementStart(2,"span",6),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()()}2&n&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(4,1,"item.edit.metadata.reinstate-button"),""))}function Te(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",18)(1,"input",19),e.\u0275\u0275listener("change",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(a.changeExternalSource())}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(2,"label",20),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()()}if(2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("checked",(null==t.contentSource?null:t.contentSource.harvestType)!==t.harvestTypeNone),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"collection.edit.tabs.source.external"))}}function Ee(n,r){1&n&&(e.\u0275\u0275element(0,"ds-themed-loading",21),e.\u0275\u0275pipe(1,"translate")),2&n&&e.\u0275\u0275property("message",e.\u0275\u0275pipeBind1(1,1,"loading.content-source"))}function Re(n,r){1&n&&(e.\u0275\u0275elementStart(0,"h4"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(2,1,"collection.edit.tabs.source.form.head")))}function Be(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ds-form",22),e.\u0275\u0275listener("dfChange",function(a){e.\u0275\u0275restoreView(t);const s=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(s.onChange(a))})("submitForm",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(a.onSubmit())})("cancel",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(a.onCancel())}),e.\u0275\u0275elementEnd()}if(2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("formId","collection-source-form-id")("formGroup",t.formGroup)("formModel",t.formModel)("formLayout",t.formLayout)("displaySubmit",!1)("displayCancel",!1)}}function $e(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",14),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(a.discard())}),e.\u0275\u0275pipe(1,"async"),e.\u0275\u0275element(2,"i",15),e.\u0275\u0275elementStart(3,"span",6),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd()()}if(2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("disabled",!0!==e.\u0275\u0275pipeBind1(1,2,t.hasChanges$)),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(5,4,"item.edit.metadata.discard-button"),"")}}function Fe(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",16),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(a.reinstate())}),e.\u0275\u0275element(1,"i",17),e.\u0275\u0275elementStart(2,"span",6),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()()}2&n&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(4,1,"item.edit.metadata.reinstate-button"),""))}function De(n,r){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",23)(1,"div",10)(2,"div",24)(3,"div",25),e.\u0275\u0275template(4,$e,6,6,"button",2),e.\u0275\u0275pipe(5,"async"),e.\u0275\u0275template(6,Fe,5,3,"button",3),e.\u0275\u0275pipe(7,"async"),e.\u0275\u0275elementStart(8,"button",4),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext();
1return e.\u0275\u0275resetView(a.onSubmit())}),e.\u0275\u0275pipe(9,"async"),e.\u0275\u0275element(10,"i",5),e.\u0275\u0275elementStart(11,"span",6),e.\u0275\u0275text(12),e.\u0275\u0275pipe(13,"translate"),e.\u0275\u0275elementEnd()()()()()()}if(2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",!0!==e.\u0275\u0275pipeBind1(5,4,t.isReinstatable$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind1(7,6,t.isReinstatable$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("disabled",!0!==e.\u0275\u0275pipeBind1(9,8,t.hasChanges$)||!t.isValid()||t.initialHarvestType===t.harvestTypeNone&&t.contentSource.harvestType===t.initialHarvestType),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(13,10,"item.edit.metadata.save-button"),"")}}let Me=(()=>{class n extends oe._{constructor(t,o,a,s,m,S,I,x,vt){super(t,o,a,s),this.objectUpdatesService=t,this.notificationsService=o,this.translateService=a,this.router=s,this.location=m,this.formService=S,this.route=I,this.collectionService=x,this.requestService=vt,this.LABEL_KEY_PREFIX="collection.edit.tabs.source.form.",this.ERROR_KEY_PREFIX="collection.edit.tabs.source.form.errors.",this.OPTIONS_KEY_PREFIX="collection.edit.tabs.source.form.options.",this.oaiSourceModel=new v.b1u({id:"oaiSource",name:"oaiSource",required:!0,validators:{required:null},errorMessages:{required:"You must provide a set id of the target collection."}}),this.oaiSetIdModel=new v.b1u({id:"oaiSetId",name:"oaiSetId"}),this.metadataConfigIdModel=new v.nMt({id:"metadataConfigId",name:"metadataConfigId"}),this.harvestTypeModel=new v.TJt({id:"harvestType",name:"harvestType",options:[{value:g.V.Metadata},{value:g.V.MetadataAndRef},{value:g.V.MetadataAndBitstreams}]}),this.inputModels=[this.oaiSourceModel,this.oaiSetIdModel,this.metadataConfigIdModel,this.harvestTypeModel],this.formModel=[new v.S_O({id:"oaiSourceContainer",group:[this.oaiSourceModel]}),new v.S_O({id:"oaiSetContainer",group:[this.oaiSetIdModel,this.metadataConfigIdModel]}),new v.S_O({id:"harvestTypeContainer",group:[this.harvestTypeModel]})],this.formLayout={oaiSource:{grid:{host:"col-12 d-inline-block"}},oaiSetId:{grid:{host:"col col-sm-6 d-inline-block"}},metadataConfigId:{grid:{host:"col col-sm-6 d-inline-block"}},harvestType:{grid:{host:"col-12",option:"btn-outline-secondary"}},oaiSetContainer:{grid:{host:"row"}},oaiSourceContainer:{grid:{host:"row"}},harvestTypeContainer:{grid:{host:"row"}}},this.harvestTypeNone=g.V.None,this.previouslySelectedHarvestType=g.V.Metadata,this.displayedNotifications=[],this.subs=[]}ngOnInit(){super.ngOnInit(),this.notificationsPrefix="collection.edit.tabs.source.notifications.",this.discardTimeOut=re.N.collection.edit.undoTimeout,this.formGroup=this.formService.createFormGroup(this.formModel),this.collectionRD$=this.route.parent.data.pipe((0,F.P)(),(0,u.U)(t=>t.dso)),this.collectionRD$.pipe((0,p.xw)(),(0,u.U)(t=>t.payload.uuid),(0,h.w)(t=>this.collectionService.getContentSource(t)),(0,p.hC)()).subscribe(t=>{this.initializeOriginalContentSource(t.payload)}),this.updateFieldTranslations(),this.subs.push(this.translateService.onLangChange.subscribe(()=>{this.updateFieldTranslations()}))}initializeOriginalContentSource(t){this.contentSource=t,this.initialHarvestType=t.harvestType,this.initializeMetadataConfigs();const o=M()(this.contentSource);this.objectUpdatesService.initialize(this.url,[o],new Date),this.update$=this.objectUpdatesService.getFieldUpdates(this.url,[o]).pipe((0,u.U)(a=>a[o.uuid])),this.subs.push(this.update$.subscribe(a=>{if(a){const s=a.field;let m;(0,d.Uh)(this.contentSource)&&(0,d.UE)(this.contentSource.metadataConfigs)&&(m=this.contentSource.metadataConfigs[0].id),(0,d.Uh)(s)&&(0,d.Uh)(s.metadataConfigId)&&(m=s.metadataConfigId),(0,d.Uh)(s)&&(this.formGroup.patchValue({oaiSourceContainer:{oaiSource:s.oaiSource},oaiSetContainer:{oaiSetId:s.oaiSetId,metadataConfigId:m},harvestTypeContainer:{harvestType:s.harvestType}}),this.contentSource=M()(s)),this.contentSource.metadataConfigId=m}}))}initializeMetadataConfigs(){this.metadataConfigIdModel.options=this.contentSource.metadataConfigs.map(t=>Object.assign({value:t.id,label:t.label})),this.metadataConfigIdModel.options.length>0&&this.formGroup.patchValue({oaiSetContainer:{metadataConfigId:this.metadataConfigIdModel.options[0].value}})}
1updateFieldTranslations(){this.inputModels.forEach(t=>{this.updateFieldTranslation(t)})}updateFieldTranslation(t){t.label=this.translateService.instant(this.LABEL_KEY_PREFIX+t.id),(0,d.UE)(t.validators)&&(t.errorMessages={},Object.keys(t.validators).forEach(o=>{t.errorMessages[o]=this.translateService.instant(this.ERROR_KEY_PREFIX+t.id+"."+o)})),t instanceof v.WS&&(0,d.UE)(t.options)&&t.options.forEach(o=>{(0,d.xI)(o.label)&&(o.label=this.translateService.instant(this.OPTIONS_KEY_PREFIX+t.id+"."+o.value))})}onChange(t){this.updateContentSourceField(t.model,!0),this.saveFieldUpdate()}onSubmit(){this.collectionRD$.pipe((0,p.xw)(),(0,u.U)(t=>t.payload.uuid),(0,h.w)(t=>this.collectionService.getHarvesterEndpoint(t)),(0,D.q)(1)).subscribe(t=>this.requestService.removeByHrefSubstring(t)),this.requestService.setStaleByHrefSubstring(this.contentSource._links.self.href),this.collectionRD$.pipe((0,p.xw)(),(0,u.U)(t=>t.payload.uuid),(0,h.w)(t=>this.collectionService.updateContentSource(t,this.contentSource)),(0,D.q)(1)).subscribe(t=>{(0,d.Uh)(t.harvestType)?(this.clearNotifications(),this.initializeOriginalContentSource(t),this.displayedNotifications.push(this.notificationsService.success(this.getNotificationTitle("saved"),this.getNotificationContent("saved")))):this.displayedNotifications.push(t)})}onCancel(){this.location.back()}isValid(){return this.contentSource.harvestType===g.V.None||this.formGroup.valid}changeExternalSource(){this.contentSource.harvestType===g.V.None?this.contentSource.harvestType=this.previouslySelectedHarvestType:(this.previouslySelectedHarvestType=this.contentSource.harvestType,this.contentSource.harvestType=g.V.None),this.updateContentSource(!1)}updateContentSource(t){this.inputModels.forEach(o=>{this.updateContentSourceField(o,t)}),this.saveFieldUpdate()}updateContentSourceField(t,o){(0,d.Uh)(t.value)&&(t.id!==this.harvestTypeModel.id||o)&&(this.contentSource[t.id]=t.value)}saveFieldUpdate(){this.objectUpdatesService.saveAddFieldUpdate(this.url,M()(this.contentSource))}clearNotifications(){this.displayedNotifications.forEach(t=>{this.notificationsService.remove(t)}),this.displayedNotifications=[]}ngOnDestroy(){this.subs.forEach(t=>t.unsubscribe())}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(ie.d),e.\u0275\u0275directiveInject(B.T),e.\u0275\u0275directiveInject(C.sK),e.\u0275\u0275directiveInject(c.F0),e.\u0275\u0275directiveInject(l.Ye),e.\u0275\u0275directiveInject(v.w1X),e.\u0275\u0275directiveInject(c.gz),e.\u0275\u0275directiveInject(y.W),e.\u0275\u0275directiveInject($.s))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["ds-collection-source"]],features:[e.\u0275\u0275InheritDefinitionFeature],decls:24,vars:27,consts:[[1,"container-fluid"],[1,"d-inline-block","float-right","space-children-mr"],["class"," btn btn-danger",3,"disabled","click",4,"ngIf"],["class","btn btn-warning",3,"click",4,"ngIf"],[1,"btn","btn-primary",3,"disabled","click"],[1,"fas","fa-save"],[1,"d-none","d-sm-inline"],["class","form-check mb-4",4,"ngIf"],[3,"message",4,"ngIf"],[4,"ngIf"],[1,"row"],[3,"formId","formGroup","formModel","formLayout","displaySubmit","displayCancel","dfChange","submitForm","cancel",4,"ngIf"],["class","container mt-2",4,"ngIf"],[3,"isEnabled","shouldShow","collection"],[1,"btn","btn-danger",3,"disabled","click"],[1,"fas","fa-times"],[1,"btn","btn-warning",3,"click"],[1,"fas","fa-undo-alt"],[1,"form-check","mb-4"],["type","checkbox","id","externalSourceCheck",1,"form-check-input",3,"checked","change"],["for","externalSourceCheck",1,"form-check-label"],[3,"message"],[3,"formId","formGroup","formModel","formLayout","displaySubmit","displayCancel","dfChange","submitForm","cancel"],[1,"container","mt-2"],[1,"col-12"],[1,"d-inline-block","float-right","ml-1","space-children-mr"]],template:function(t,o){if(1&t&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1),e.\u0275\u0275template(2,xe,6,6,"button",2),e.\u0275\u0275pipe(3,"async"),e.\u0275\u0275template(4,_e,5,3,"button",3),e.\u0275\u0275pipe(5,"async"),e.\u0275\u0275elementStart(6,"button",4),e.\u0275\u0275listener("click",function(){return o.onSubmit()}),e.\u0275\u0275pipe(7,"async"),e.\u0275\u0275element(8,"i",5),e.\u0275\u0275elementStart(9,"span",6),e.\u0275\u0275text(10),e.\u0275\u0275pipe(11,"translate"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(12,"h4"),e.\u0275\u0275text(13),e.\u0275\u0275pipe(14,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(15,Te,5,4,"div",7),e.\u0275\u0275template(16,Ee,2,3,"ds-themed-loading",8),e.\u0275\u0275template(17,Re,3,3,"h4",9),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(18,"div",10),e.\u0275\u0275template(19,Be,1,6,"ds-form",11),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(20,De,14,12,"div",12),e.\u0275\u0275element(21,"ds-collection-source-control
1s",13),e.\u0275\u0275pipe(22,"async"),e.\u0275\u0275pipe(23,"async")),2&t){let a;e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!0!==e.\u0275\u0275pipeBind1(3,13,o.isReinstatable$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind1(5,15,o.isReinstatable$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("disabled",!0!==e.\u0275\u0275pipeBind1(7,17,o.hasChanges$)||!o.isValid()||o.initialHarvestType===o.harvestTypeNone&&o.contentSource.harvestType===o.initialHarvestType),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("\xa0",e.\u0275\u0275pipeBind1(11,19,"item.edit.metadata.save-button"),""),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(14,21,"collection.edit.tabs.source.head")),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",o.contentSource),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!o.contentSource),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",o.contentSource&&(null==o.contentSource?null:o.contentSource.harvestType)!==o.harvestTypeNone),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",o.formGroup&&o.contentSource&&(null==o.contentSource?null:o.contentSource.harvestType)!==o.harvestTypeNone),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",(null==o.contentSource?null:o.contentSource.harvestType)!==o.harvestTypeNone),e.\u0275\u0275advance(1),e.\u0275\u0275property("isEnabled",!0!==e.\u0275\u0275pipeBind1(22,23,o.hasChanges$))("shouldShow",(null==o.contentSource?null:o.contentSource.harvestType)!==o.harvestTypeNone)("collection",null==(a=e.\u0275\u0275pipeBind1(23,25,o.collectionRD$))?null:a.payload)}},dependencies:[l.O5,w.JL,w.sg,se.Z,le.U,Ie,l.Ov,C.X$],encapsulation:2}),n})();var Ve=i(8842),je=i(62583);const Ae=function(n){return{collection:n}};let Ue=(()=>{class n{constructor(t,o){this.route=t,this.dsoNameService=o}ngOnInit(){this.dsoRD$=this.route.parent.data.pipe((0,D.q)(1),(0,u.U)(t=>t.dso)),this.collectionName$=this.dsoRD$.pipe((0,T.h)(t=>(0,d.Uh)(t)),(0,u.U)(t=>this.dsoNameService.getName(t.payload)))}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(c.gz),e.\u0275\u0275directiveInject(Ve._))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["ds-collection-curate"]],decls:7,vars:11,consts:[[1,"container"],[3,"dsoHandle"]],template:function(t,o){if(1&t&&(e.\u0275\u0275elementStart(0,"div",0)(1,"h3"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275pipe(4,"async"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(5,"ds-curation-form",1),e.\u0275\u0275pipe(6,"async"),e.\u0275\u0275elementEnd()),2&t){let a;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind2(3,2,"collection.curate.header",e.\u0275\u0275pureFunction1(9,Ae,e.\u0275\u0275pipeBind1(4,5,o.collectionName$)))),e.\u0275\u0275advance(3),e.\u0275\u0275property("dsoHandle",null==(a=e.\u0275\u0275pipeBind1(6,7,o.dsoRD$))?null:a.payload.handle)}},dependencies:[je._,l.Ov,C.X$],encapsulation:2}),n})();var we=i(53482);let Oe=(()=>{class n{constructor(t){this.route=t}ngOnInit(){this.dsoRD$=this.route.parent.parent.data.pipe((0,F.P)(),(0,u.U)(t=>t.dso))}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(c.gz))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["ds-collection-authorizations"]],decls:3,vars:4,consts:[[1,"container"],[3,"resourceType","resourceUUID"]],template:function(t,o){if(1&t&&(e.\u0275\u0275elementStart(0,"div",0),e.\u0275\u0275element(1,"ds-resource-policies",1),e.\u0275\u0275pipe(2,"async"),e.\u0275\u0275elementEnd()),2&t){let a;e.\u0275\u0275advance(1),e.\u0275\u0275property("resourceType","collection")("resourceUUID",null==(a=e.\u0275\u0275pipeBind1(2,2,o.dsoRD$))||null==a.payload?null:a.payload.id)}},dependencies:[we.F,l.Ov],encapsulation:2}),n})();var Ne=i(76457),O=i(84535),Pe=i(60740),N=i(37161),Le=i(50269),Ge=i(24049),P=i(35794),L=i(38123),G=i(9237),k=i(80978);let ke=(()=>{class n extends Ge.C{constructor(t,o,a){super(t,o,a),this.authorizationService=t,this.router=o,this.authService=a}getFeatureID(t,o){return(0,G.of)(k.i.IsCollectionAdmin)}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275inject(P._),e.\u0275\u0275inject(c.F0),e.\u0275\u0275inject(L.e8))},n.\u0275prov=e.\u0275\u0275defineInjectable({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var He=i(62467);function ze(n,r){1&n&&e.\u0275\u0275element(0,"ds-access-control-form-container",1),2&n&&e.\u0275\u0275property("dsoRD",r.ngIf)("showLimitToSpecificBitstreams",!1)}let Xe=(()=>{class n{constructor(t){this.route=t}ngOnInit(){this.collectionRD$=this.route.parent.parent.data.pipe((0,u.U)(t=>t.dso)).pipe((0,p.xw)())}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(c.gz))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["ds-collection-access-control"]],decls:2,vars:3,consts:[["titleMessage","collection-access-control-title",3,"dsoRD","showLimitToSpecificBitstreams",4,"ngIf"],["titleMessage","collection-access-control-title",3,"dsoRD","showLimitToSpecificBitstreams"]],template:function(t,o){1&t&&(e.\u0275\u0275template(0,ze,1,2,"ds-access-control-form-container",0),e.\u0275\u0275pipe(1,"async")),2&t&&e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind1(1,1,o.collectionRD$))},dependencies:[l.O5,He.x,l.Ov]}),n})();var Ke=i(66377),Ye=i(34343);let Je=(()=>{class n extends Ke.h{constructor(t,o,a,s){super(t,o,a,s),this.resolver=t,this.authorizationService=o,this.router=a,this.authService=s}getFeatureID(t,o){return(0,G.of)(k.i.CanUseBulkAccessControl)}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275inject(Ye.l),e.\u0275\u0275inject(P._),e.\u0275\u0275inject(c.F0),e.\u0275\u0275inject(L.e8))},n.\u0275prov=e.\u0275\u0275defineInjectable({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var We=i(4682);function Ze(n,r){}const Qe=["*"];let qe=(()=>{class n extends We.F{getComponentName(){return"CollectionItemMapperComponent"}importThemedComponent(t){return i(79934)(`./${t}
1/app/collection-page/collection-item-mapper/collection-item-mapper.component`)}importUnthemedComponent(){return i.e(8592).then(i.bind(i,34268))}}return n.\u0275fac=function(){let r;return function(o){return(r||(r=e.\u0275\u0275getInheritedFactory(n)))(o||n)}}(),n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["ds-themed-collection-item-mapper"]],features:[e.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:Qe,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(t,o){1&t&&(e.\u0275\u0275projectionDef(),e.\u0275\u0275template(0,Ze,0,0,"ng-template",null,0,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275elementStart(2,"div",null,1),e.\u0275\u0275projection(4),e.\u0275\u0275elementEnd())},encapsulation:2}),n})();var et=i(87854);const tt=function(n){return{active:n}},nt=function(n){return[n]};function ot(n,r){if(1&n&&(e.\u0275\u0275elementStart(0,"a",15),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext().$implicit,o=e.\u0275\u0275nextContext();e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(5,tt,t.page===o.currentPage))("routerLink",e.\u0275\u0275pureFunction1(7,nt,"./"+t.page)),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(2,3,o.type+".edit.tabs."+t.page+".head")," ")}}function it(n,r){if(1&n&&(e.\u0275\u0275elementStart(0,"li",13),e.\u0275\u0275template(1,ot,3,9,"a",14),e.\u0275\u0275pipe(2,"async"),e.\u0275\u0275elementEnd()),2&n){const t=r.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind1(2,1,t.enabled))}}function at(n,r){if(1&n&&(e.\u0275\u0275elementStart(0,"a",16),e.\u0275\u0275pipe(1,"async"),e.\u0275\u0275element(2,"i",17),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext();let o;e.\u0275\u0275property("routerLink",t.getPageUrl(null==(o=e.\u0275\u0275pipeBind1(1,2,t.dsoRD$))?null:o.payload)),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(4,4,t.type+".edit.return")," ")}}let rt=(()=>{class n extends et.K{constructor(){super(...arguments),this.type="collection"}}return n.\u0275fac=function(){let r;return function(o){return(r||(r=e.\u0275\u0275getInheritedFactory(n)))(o||n)}}(),n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["ds-atmire-edit-collection-page"]],features:[e.\u0275\u0275InheritDefinitionFeature],decls:21,vars:11,consts:[[1,"container"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-between","border-bottom"],[1,"btn","btn-danger",3,"routerLink"],[1,"fas","fa-trash"],[1,"pt-2"],[1,"nav","nav-tabs","justify-content-start","mb-2"],["class","nav-item",4,"ngFor","ngForOf"],[1,"tab-pane","active"],[1,"mb-4"],[1,"col-12","text-right"],["class","btn btn-outline-secondary",3,"routerLink",4,"ngIf"],[1,"nav-item"],["class","nav-link",3,"ngClass","routerLink",4,"ngIf"],[1,"nav-link",3,"ngClass","routerLink"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"fas","fa-arrow-left"]],template:function(t,o){if(1&t&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h2"),e.\u0275\u0275text(5),e.\u0275\u0275pipe(6,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"div")(8,"a",4),e.\u0275\u0275pipe(9,"async"),e.\u0275\u0275element(10,"i",5),e.\u0275\u0275text(11),e.\u0275\u0275pipe(12,"translate"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(13,"div",6)(14,"ul",7),e.\u0275\u0275template(15,it,3,3,"li",8),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(16,"div",9)(17,"div",10),e.\u0275\u0275element(18,"router-outlet"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(19,"div",11),e.\u0275\u0275template(20,at,5,6,"a",12),e.\u0275\u0275elementEnd()()()()()()),2&t){let a;e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(6,5,o.type+".edit.head")),e.\u0275\u0275advance(3),e.\u0275\u0275property("routerLink",("community"===o.type?"/communities/":"/collections/")+(null==(a=e.\u0275\u0275pipeBind1(9,7,o.dsoRD$))?null:a.payload.uuid)+"/delete"),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(12,9,o.type+".edit.delete"),""),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngForOf",o.pages),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",!o.hideReturnButton)}},dependencies:[l.mk,l.sg,l.O5,c.lC,c.rH,l.Ov,C.X$]}),n})();var st=i(62292);let lt=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.\u0275\u0275defineNgModule({type:n}),n.\u0275inj=e.\u0275\u0275defineInjector({providers:[N.b,O.a],imports:[c.Bz.forChild([{path:"",resolve:{breadcrumb:Ne.t}
1,data:{breadcrumbKey:"collection.edit"},component:rt,canActivate:[ke],children:[{path:"",redirectTo:"metadata",pathMatch:"full"},{path:"metadata",component:q,data:{title:"collection.edit.tabs.metadata.title",hideReturnButton:!0,showBreadcrumbs:!0}},{path:"roles",component:ne,data:{title:"collection.edit.tabs.roles.title",showBreadcrumbs:!0}},{path:"source",component:Me,data:{title:"collection.edit.tabs.source.title",showBreadcrumbs:!0}},{path:"curate",component:Ue,data:{title:"collection.edit.tabs.curate.title",showBreadcrumbs:!0}},{path:"access-control",component:Xe,canActivate:[Je],data:{title:"collection.edit.tabs.access-control.title",showBreadcrumbs:!0}},{path:"authorizations",data:{showBreadcrumbs:!0},children:[{path:"create",resolve:{resourcePolicyTarget:O.a},component:Pe.v,data:{title:"resource-policies.create.page.title"}},{path:"edit",resolve:{resourcePolicy:N.b},component:Le.x,data:{title:"resource-policies.edit.page.title"}},{path:"",component:Oe,data:{title:"collection.edit.tabs.authorizations.title",showBreadcrumbs:!0}}]},{path:"mapper",component:qe,data:{title:"collection.edit.tabs.item-mapper.title",hideReturnButton:!0,showBreadcrumbs:!0}},...st.HZ]}])]}),n})();var ct=i(95418),pt=i(54131),dt=i(50867),ut=i(47413),mt=i(93682),ht=i(94099);let ft=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.\u0275\u0275defineNgModule({type:n}),n.\u0275inj=e.\u0275\u0275defineInjector({imports:[l.ez,b.m,lt,ct.s,pt.q,dt.e,ut.H,mt.J,ht.G]}),n})()},79934:(A,E,i)=>{var l={"./atmire/app/collection-page/collection-item-mapper/collection-item-mapper.component":[77686,8592,7686],"./custom/app/collection-page/collection-item-mapper/collection-item-mapper.component":[66764,8592,6764]};function b(c){if(!i.o(l,c))return Promise.resolve().then(()=>{var y=new Error("Cannot find module '"+c+"'");throw y.code="MODULE_NOT_FOUND",y});var _=l[c],R=_[0];return Promise.all(_.slice(1).map(i.e)).then(()=>i(R))}b.keys=()=>Object.keys(l),b.id=79934,A.exports=b}}]);

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.