1(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[1169,7454],{37454:(Se,Y,s)=>{"use strict";s.r(Y),s.d(Y,{AtmireRequestCopyModule:()=>q});var p=s(35103),I=s(78181),f=s(67522),o=s(8896),y=s(58360),O=s(96560),d=s(8848),R=s(5605),k=s(98678);let G=(()=>{class m{}return m.\u0275fac=function(S){return new(S||m)},m.\u0275mod=k.\u0275\u0275defineNgModule({type:m}),m.\u0275inj=k.\u0275\u0275defineInjector({providers:[d.w],imports:[f.Bz.forChild([{path:":token",resolve:{request:d.w},children:[{path:"",component:o.e},{path:y.MW,component:R.S},{path:y.uo,component:O.r}]}])]}),m})();var ae=s(17232),j=s(86049);s(63766);const D=[],z=[];let le=(()=>{class m{}return m.\u0275fac=function(S){return new(S||m)},m.\u0275mod=k.\u0275\u0275defineNgModule({type:m}),m.\u0275inj=k.\u0275\u0275defineInjector({providers:[...z,...D.map(T=>({provide:T}))],imports:[p.ez,I.m,ae.B]}),m})(),q=(()=>{class m{}return m.\u0275fac=function(S){return new(S||m)},m.\u0275mod=k.\u0275\u0275defineNgModule({type:m}),m.\u0275inj=k.\u0275\u0275defineInjector({providers:[j.O],imports:[p.ez,I.m,ae.B,le,G]}),m})()},86049:(Se,Y,s)=>{"use strict";s.d(Y,{O:()=>D});var p=s(45608),I=s(4915),f=s(38025),o=s(62574),y=s.n(o),O=s(65384),d=s(27173),R=s(42821);const k=Object.assign({},R.Qb,{label:"submission.sections.upload.form.rac-from-label"}),G=Object.assign({},R.f9,{label:"submission.sections.upload.form.rac-until-label"});var ae=s(25336),j=s.n(ae),N=s(98678),C=s(96342);let D=(()=>{class z{constructor(q,m,T,S){this.formBuilderService=q,this.translateService=m,this.notificationsService=T,this.accessConditionsFormService=S,S.addConfigOverrides({startDateConfig:k,endDateConfig:G})}appendFormWithAccessConditionForm(q,m,T){this.appendFormWithAccessConditionGroupIfAllowed(q,f.T3.Always,m,T),this.appendFormWithAccessConditionGroupIfAllowed(q,f.T3.Request,m,T),this.appendFormWithAccessConditionGroupIfAllowed(q,f.T3.Fallback,m,T)}appendFormWithAccessConditionGroupIfAllowed(q,m,T,S){const M=this.buildAccessConditionGroup(m,T),K=(0,p.xI)(S)||(0,f.gI)(m,S);(0,p.Uh)(M)&&K&&q.push(M)}buildAccessConditionGroup(q,m){const T=q,S=m[(0,f.zw)(q)];if((0,p.xb)(S))return null;const M=1===S.length,K={preSelectFirstValue:M,disableSelectorOnPreselection:M};return this.accessConditionsFormService.buildAccessConditionGroup(T,S,this.getTranslationConfig(m,q,m.thresholdBytes),K)}getValidatedAccessConditionObject(q,m,T){const S=T[(0,f.zw)(q)];return this.accessConditionsFormService.getValidatedAccessConditionObject(q,m,S)}getPatchRequestPath(q){return["requestAccessOption",(0,f.cw)(q)]}fillFormModel(q,m){(0,p.xI)(m)||(this.fillFormModelSection(f.T3.Always,q,m),this.fillFormModelSection(f.T3.Request,q,m),this.fillFormModelSection(f.T3.Fallback,q,m))}fillFormModelSection(q,m,T){const S=T[(0,f.b_)(q)];
1this.accessConditionsFormService.fillAccessConditionFormGroup(q,m,S,this.getTranslationConfig(T,q))}updateAppliedRAOFromFormGroup(q,m,T){const S=y()(q);return S.alwaysDownloadAccessCondition=this.getValidatedAccessConditionObject(f.T3.Always,m,T),S.requestAccessCondition=this.getValidatedAccessConditionObject(f.T3.Request,m,T),S.fallbackDownloadAccessCondition=this.getValidatedAccessConditionObject(f.T3.Fallback,m,T),S}showDateValidationError(q){const m=this.translateService.instant(`submission.sections.upload.form.access-condition-label.requestaccess.${q.groupName}`);this.notificationsService.warning(this.translateService.get("submission.sections.upload.form.date-error.title"),this.translateService.get(`submission.sections.upload.form.date-error.rac.${q.dateType}`,{section:m,name:q.accessConditionName,maxDate:q.maxDate,date:q.selectedDate}))}hasUnsavedOrMismatchedSingularACs(q,m){return this.hasUnsavedSingularACs(q,m)||this.hasMismatchedSingularAC(q,m)}hasUnsavedSingularACs(q,m){return(0,p.xI)(q)?(console.error("Can't check for unsaved singular access conditions when no access condition options are provided"),!1):(0,p.xI)(m)?(console.error("Can't check for unsaved singular access conditions when no applied access conditions are provided"),!1):this.hasUnsavedSingularACForCategory(q,m,f.T3.Always)||this.hasUnsavedSingularACForCategory(q,m,f.T3.Request)||this.hasUnsavedSingularACForCategory(q,m,f.T3.Fallback)}hasUnsavedSingularACForCategory(q,m,T){return(0,f.gI)(T,m)&&1===q[(0,f.zw)(T)].length&&(0,p.xI)(m[(0,f.b_)(T)])}hasMismatchedSingularAC(q,m){return(0,p.xI)(q)?(console.error("Can't check for mismatched singular access conditions when no access condition options are provided"),!1):(0,p.xI)(m)?(console.error("Can't check for mismatched singular access conditions when no applied access conditions are provided"),!1):this.hasMismatchedSingularACForCategory(q,m,f.T3.Always)||this.hasMismatchedSingularACForCategory(q,m,f.T3.Request)||this.hasMismatchedSingularACForCategory(q,m,f.T3.Fallback)}hasMismatchedSingularACForCategory(q,m,T){const S=m[(0,f.b_)(T)];return!(!(0,f.gI)(T,m)||1!==q[(0,f.zw)(T)].length||(0,p.xI)(S))&&q[(0,f.zw)(T)][0].name!==S.name}getTranslationConfig(q,m,T){const S=q?.requestAccessType;let M=`submission.sections.upload.form.access-condition-hint.${S}.${m}`;if((0,p.Uh)(T)){const K=j()(T);M=this.translateService.instant(M,{threshold:K})}return{selectorLabel:`submission.sections.upload.form.access-condition-label.${S}.${m}`,optionLabelPrefix:`submission.sections.upload.form.access-condition-label.${S}`,selectorHint:M,preselectionHint:"submission.sections.upload.form.access-condition-hint.disabled"}}}return z.\u0275fac=function(q){return new(q||z)(N.\u0275\u0275inject(I.c),N.\u0275\u0275inject(C.sK),N.\u0275\u0275inject(O.T),N.\u0275\u0275inject(d._))},z.\u0275prov=N.\u0275\u0275defineInjectable({token:z,factory:z.\u0275fac}),z})()},11169:(Se,Y,s)=>{"use strict";s.d(Y,{f:()=>ge});var p=s(70655),I=s(76297),f=s(96289),o=s(50123),y=s(98678),O=s(89360),d=s(35103),R=s(87586),k=s(4682);function j(pe,Ce){}s(36424),s(71262);const N=["*"];let C=(()=>{class pe extends k.F{constructor(){super(...arguments),this.inAndOutputNames=["availableAccessConditionOptions","collectionId","collectionPolicyType","configMetadataForm","fileId","fileIndex","fileName","sectionId","submissionId","requestAccessOption"]}getComponentName(){return"SubmissionSectionUploadRequestCopyFileComponent"}importThemedComponent(Me){return s(13970)(`./${Me}/app/submission/sections/upload/file/submission-section-upload-request-copy-file.component`)}importUnthemedComponent(){return Promise.resolve().then(s.bind(s,29611))}}return pe.\u0275fac=function(){let Ce;return function(Pe){return(Ce||(Ce=y.\u0275\u0275getInheritedFactory(pe)))(Pe||pe)}}(),pe.\u0275cmp=y.\u0275\u0275defineComponent({type:pe,selectors:[["ds-themed-submission-section-upload-request-copy-file"]],inputs:{availableAccessConditionOptions:"availableAccessConditionOptions",collectionId:"collectionId",collectionPolicyType:"collectionPolicyType",configMetadataForm:"configMetadataForm",fileId:"fileId",fileIndex:"fileIndex",fileName:"fileName",sectionId:"sectionId",submissionId:"submissionId",requestAccessOption:"requestAccessOption"},features:[y.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:N,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(Me,Pe){1&Me&&(y.\u0275\u0275projectionDef(),y.\u0275\u0275template(0,j,0,0,"ng-template",null,0,y.\u0275\u0275templateRefExtractor),y.\u0275\u0275elementStart(2,"div",null,1),y.\u0275\u0275projection(4),y.\u0275\u0275elementEnd())},encapsulation:2}),pe})();var z,D=s(96342);function le(pe,Ce){1&pe&&(y.\u0275\u0275elementContainerStart(0),y.\u0275\u0275elementStart(1,"div",2)(2,"div",3)(3,"h3",4)(4,"span",5),y.\u0275\u0275text(5),y.\u0275\u0275pipe(6,"translate"),y.\u0275\u0275elementEnd()()()(),y.\u0275\u0275elementContainerEnd()),2&pe&&(y.\u0275\u0275advance(5),y.\u0275\u0275textInterpolate(y.\u0275\u0275pipeBind1(6,1,"submission.sections.upload.no-file-uploaded")))}const q=function(pe){return{collectionName:pe}};function m(pe,Ce){if(1&pe&&(y.\u0275\u0275elementContainerStart(0),y.\u0275\u0275text(1),y.\u0275\u0275pipe(2,"translate"),y.\u0275\u0275elementContainerEnd()),2&pe){const Me=y.\u0275\u0275nextContext(3);y.\u0275\u0275advance(1),y.\u0275\u0275textInterpolate1(" ",y.\u0275\u0275pipeBind2(2,1,"submission.sections.upload.header.policy.default.nolist",y.\u0275\u0275pureFunction1(4,q,Me.collectionName))," ")}}function T(pe,Ce){if(1&pe&&(y.\u0275\u0275elementContainerStart(0),y.\u0275\u0275text(1),y.\u0275\u0275pipe(2,"translate"),y.\u0275\u0275elementContainerEnd()),2&pe){const Me=y.\u0275\u0275nextContext(3);y.\u0275\u0275advance(1),y.\u0275\u0275textInterpolate1(" ",y.\u0275\u0275pipeBind2(2,1,"submission.sections.upload.header.policy.default.withlist",y.\u0275\u0275pureFunction1(4,q,Me.collectionName))," ")}}function S(pe,Ce){if(1&pe&&(y.\u0275\u0275elementStart(0,"div",2)(1,"div",8)(2,"ds-alert",9),y.\u0275\u0275template(3,m,3,6,"ng-container",1),y.\u0275\u0275template(4,T,3,6,"ng-container",1),y.\u0275\u0275element(5,"span",10)(6,"ds-submission-section-upload-access-conditions",11),y.\u0275\u0275elementEnd()()()),2&pe){const Me=y.\u0275\u0275nextContext(2);y.\u0275\u0275advance(2),y.\u0275\u0275property("type",Me.AlertTypeEnum.Warning),y.\u0275\u0275advance(1),y.\u0275\u0275property("ngIf",1===Me.collectionPolicyType),y.\u0275\u0275advance(1),y.\u0275\u0275property("ngIf",2===Me.collectionPolicyType),y.\u0275\u0275advance(2),y.\u0275\u0275property("accessConditions",Me.collectionDefaultAccessConditions)}}function M(pe,Ce){if(1&pe&&(y.\u0275\u0275elementContainerStart(0),y.\u0275\u0275element(1,"ds-themed-submission-section-upload-request-copy-file",12),y.\u0275\u0275pipe(2,"async"),y.\u0275\u0275elementStart(3,"div",2)(4,"div",3),y.\u0275\u0275element(5,"hr"),y.\u0275\u0275elementEnd()(),y.\u0275\u0275elementContainerEnd()),2&pe){const Me=Ce.$implicit,Pe=y.\u0275\u0275nextContext(2);y.\u0275\u0275advance(1),y.\u0275\u0275property("availableAccessConditionOptions",Pe.availableAccessConditionOptions)("collectionId",Pe.collectionId)("collectionPolicyType",Pe.collectionPolicyType)("configMetadataForm",y.\u0275\u0275pipeBind1(2,10,Pe.configMetadataForm$))("fileId",Pe.fileIndexes[Pe.fileList.indexOf(Me)])("fileIndex",Pe.fileList.indexOf(Me))("fileName",Pe.fileNames[Pe.fileList.indexOf(Me)])("sectionId",Pe.sectionData.id)("submissionId",Pe.submissionId)("requestAccessOption",Pe.requestAccessOption)}}function K(pe,Ce){if(1&pe&&(y.\u0275\u0275elementContainerStart(0),y.\u0275\u0275template(1,S,7,4,"div",6),y.\u0275\u0275template(2,M,6,12,"ng-container",7),y.\u0275\u0275elementContainerEnd()),2&pe){const Me=y.\u0275\u0275nextContext();y.\u0275\u0275advance(1),y.\u0275\u0275property("ngIf",Me.collectionDefaultAccessConditions.length>0),y.\u0275\u0275advance(1),y.\u0275\u0275property("ngForOf",Me.fileList)}}let te=((z=class extends o.vk{}).\u0275fac=function(){let pe;
1return function(Me){return(pe||(pe=y.\u0275\u0275getInheritedFactory(z)))(Me||z)}}(),z.\u0275cmp=y.\u0275\u0275defineComponent({type:z,selectors:[["ds-submission-section-upload-request-copy"]],features:[y.\u0275\u0275InheritDefinitionFeature],decls:3,vars:5,consts:[[3,"content","dismissible","type"],[4,"ngIf"],[1,"row"],[1,"col-md-12"],[1,"text-center"],[1,"text-muted"],["class","row",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"col-sm-12"],[3,"type"],[1,"clearfix"],[3,"accessConditions"],[3,"availableAccessConditionOptions","collectionId","collectionPolicyType","configMetadataForm","fileId","fileIndex","fileName","sectionId","submissionId","requestAccessOption"]],template:function(Ce,Me){1&Ce&&(y.\u0275\u0275element(0,"ds-alert",0),y.\u0275\u0275template(1,le,7,3,"ng-container",1),y.\u0275\u0275template(2,K,3,2,"ng-container",1)),2&Ce&&(y.\u0275\u0275property("content","submission.sections.upload.info")("dismissible",!0)("type",Me.AlertTypeEnum.Info),y.\u0275\u0275advance(1),y.\u0275\u0275property("ngIf",0==Me.fileList.length),y.\u0275\u0275advance(1),y.\u0275\u0275property("ngIf",Me.fileList.length>0))},dependencies:[O.O,d.sg,d.O5,R.w,C,d.Ov,D.X$]}),z);te=(0,p.__decorate)([(0,I.E)(f.i.UploadRequestCopy)],te);var ie,J=s(72577),ne=s(78181),H=(s(29611),s(46623),s(58068),s(80599),s(37454)),Q=(s(85186),s(63551));function se(pe,Ce){if(1&pe){const Me=y.\u0275\u0275getCurrentView();y.\u0275\u0275elementStart(0,"button",3),y.\u0275\u0275listener("click",function(){y.\u0275\u0275restoreView(Me);
1const Ze=y.\u0275\u0275nextContext();return y.\u0275\u0275resetView(Ze.initialiseUppyDashboard())}),y.\u0275\u0275text(1,"Show dashboard\n"),y.\u0275\u0275elementEnd()}}let X=((ie=class extends Q.w{}).\u0275fac=function(){let pe;return function(Me){return(pe||(pe=y.\u0275\u0275getInheritedFactory(ie)))(Me||ie)}}(),ie.\u0275cmp=y.\u0275\u0275defineComponent({type:ie,selectors:[["ds-uppy-tus-upload-request-copy-file"]],features:[y.\u0275\u0275InheritDefinitionFeature],decls:4,vars:1,consts:[["id","dashboard",1,"mb-3"],["dashboard",""],["class","btn btn-secondary",3,"click",4,"ngIf"],[1,"btn","btn-secondary",3,"click"]],template:function(Ce,Me){if(1&Ce&&(y.\u0275\u0275element(0,"div",0,1),y.\u0275\u0275template(2,se,2,0,"button",2),y.\u0275\u0275element(3,"ds-submission-section-upload-request-copy")),2&Ce){const Pe=y.\u0275\u0275reference(1);y.\u0275\u0275advance(2),y.\u0275\u0275property("ngIf",0===Pe.textContent.length)}},dependencies:[d.O5,te],styles:['@charset "UTF-8";.uppy-Root{position:relative;box-sizing:border-box;color:#333;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,"Segoe UI Emoji","Apple Color Emoji",Roboto,Helvetica,Arial,sans-serif;line-height:1;text-align:left;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[dir=rtl] .uppy-Root,.uppy-Root[dir=rtl]{text-align:right}.uppy-Root *,.uppy-Root *:before,.uppy-Root *:after{box-sizing:inherit}.uppy-Root [hidden]{display:none}.uppy-u-reset{all:initial;box-sizing:border-box;-webkit-appearance:none;appearance:none;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,"Segoe UI Emoji","Apple Color Emoji",Roboto,Helvetica,Arial,sans-serif;line-height:1}[dir=rtl] .uppy-u-reset{text-align:right}.uppy-c-textInput{font-family:inherit;font-size:14px;line-height:1.5;padding:6px 8px;background-color:#fff;border:1px solid #ddd;border-radius:4px}.uppy-size--md .uppy-c-textInput{padding:8px 10px}.uppy-c-textInput:focus{border-color:#1269cf99;outline:none;box-shadow:0 0 0 3px #1269cf26}[data-uppy-theme=dark] .uppy-c-textInput{color:#eaeaea;background-color:#333;border-color:#333}[data-uppy-theme=dark] .uppy-c-textInput:focus{border-color:#525252;box-shadow:none}.uppy-c-icon{display:inline-block;max-width:100%;max-height:100%;overflow:hidden;fill:currentColor}.uppy-c-btn{display:inline-flex;justify-content:center;align-items:center;font-weight:500;font-size:inherit;font-family:inherit;color:inherit;line-height:1;white-space:nowrap;text-align:center;transition-duration:.3s;transition-property:background-color,color;-webkit-user-select:none;user-select:none}[dir=rtl] .uppy-c-btn{text-align:center}.uppy-c-btn:not(:disabled):not(.disabled){cursor:pointer}.uppy-c-btn::-moz-focus-inner{border:0}.uppy-c-btn-primary{padding:10px 18px;color:#fff;font-size:14px;background-color:#1269cf;border-radius:4px}.uppy-c-btn-primary:hover{background-color:#0e51a0}.uppy-c-btn-primary:focus{outline:none;box-shadow:0 0 0 3px #1269cf66}.uppy-size--md .uppy-c-btn-primary{padding:13px 22px}[data-uppy-theme=dark] .uppy-c-btn-primary{color:#eaeaea}[data-uppy-theme=dark] .uppy-c-btn-primary:focus{outline:none}[data-uppy-theme=dark] .uppy-c-btn-primary::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-c-btn-primary:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-c-btn-link{padding:10px 15px;color:#525252;font-size:14px;line-height:1;background-color:transparent;border-radius:4px}.uppy-c-btn-link:hover{color:#333}.uppy-c-btn-link:focus{outline:none;box-shadow:0 0 0 3px #1269cf40}.uppy-size--md .uppy-c-btn-link{padding:13px 18px}[data-uppy-theme=dark] .uppy-c-btn-link{color:#eaeaea}[data-uppy-theme=dark] .uppy-c-btn-link:focus{outline:none}[data-uppy-theme=dark] .uppy-c-btn-link::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-c-btn-link:focus{box-shadow:0 0 0 2px #aae1ffd9}[data-uppy-theme=dark] .uppy-c-btn-link:hover{color:#939393}.uppy-Informer{position:absolute;right:0;bottom:60px;left:0;z-index:1005;text-align:center}.uppy-Informer span>div{margin-bottom:6px}.uppy-Informer-animated{z-index:-1000;transform:translateY(350%);opacity:0;transition:all .3s ease-in}.uppy-Informer p{display:inline-block;max-width:90%;margin:0;padding:6px 15px;color:#fff;font-weight:400;font-size:12px;line-height:1.4;background-color:#757575;border-radius:18px}.uppy-size--md .uppy-Informer p{max-width:500px;padding:10px 20px;font-size:14px;line-height:1.3}[data-uppy-theme=dark] .uppy-Informer p{background-color:#333}[dir=ltr] .uppy-Informer p span{left:3px}[dir=rtl] .uppy-Informer p span{right:3px}[dir=ltr] .uppy-Informer p span{margin-left:-1px}[dir=rtl] .uppy-Informer p span{margin-right:-1px}.uppy-Informer p span{position:relative;top:-1px;display:inline-block;width:13px;height:13px;color:#525252;font-size:10px;line-height:12px;vertical-align:middle;background-color:#fff;border-radius:50%}.uppy-Informer p span:hover{cursor:help}.uppy-Informer p span:after{line-height:1.3;word-wrap:break-word}.uppy-Root [aria-label][role~=tooltip]{position:relative}
1.uppy-Root [aria-label][role~=tooltip]:before,.uppy-Root [aria-label][role~=tooltip]:after{position:absolute;z-index:10;box-sizing:border-box;transform:translateZ(0);transform-origin:top;-webkit-backface-visibility:hidden;backface-visibility:hidden;opacity:0;transition:all var(--microtip-transition-duration, .18s) var(--microtip-transition-easing, ease-in-out) var(--microtip-transition-delay, 0s);pointer-events:none;will-change:transform}.uppy-Root [aria-label][role~=tooltip]:before{background-size:100% auto!important}.uppy-Root [aria-label][role~=tooltip]:before{content:""}.uppy-Root [aria-label][role~=tooltip]:after{box-sizing:content-box;padding:.5em 1em;color:#fff;font-weight:var(--microtip-font-weight, normal);font-size:var(--microtip-font-size, 13px);white-space:nowrap;text-transform:var(--microtip-text-transform, none);background:rgba(17,17,17,.9);border-radius:4px;content:attr(aria-label)}.uppy-Root [aria-label][role~=tooltip]:hover:before,.uppy-Root [aria-label][role~=tooltip]:hover:after,.uppy-Root [aria-label][role~=tooltip]:focus:before,.uppy-Root [aria-label][role~=tooltip]:focus:after{opacity:1;pointer-events:auto}.uppy-Root [role~=tooltip][data-microtip-position|=top]:before{bottom:100%;left:50%;width:18px;height:6px;margin-bottom:5px;background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position|=top]:after{bottom:100%;left:50%;margin-bottom:11px;transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position|=top]:hover:before{transform:translate3d(-50%,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top]:hover:after{transform:translate3d(-50%,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:after{bottom:100%;transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:hover:after{transform:translate3d(calc(-100% + 16px),-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:after{bottom:100%;transform:translate3d(calc(0% - 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:hover:after{transform:translate3d(calc(0% - 16px),-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:before{top:100%;bottom:auto;left:50%;width:18px;height:6px;margin-top:5px;margin-bottom:0;background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;transform:translate3d(-50%,-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:after{top:100%;left:50%;margin-top:11px;transform:translate3d(-50%,-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:hover:before{transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom]:hover:after{transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:after{top:100%;transform:translate3d(calc(-100% + 16px),-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:hover:after{transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:after{top:100%;transform:translate3d(calc(0% - 16px),-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:hover:after{transform:translate3d(calc(0% - 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:before,.uppy-Root [role~=tooltip][data-microtip-position=left]:after{inset:50% 100% auto auto;transform:translate3d(10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:before{width:6px;height:18px;margin-right:5px;margin-bottom:0;background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat}.uppy-Root [role~=tooltip][data-microtip-position=left]:after{margin-right:11px}.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:before,.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:after{transform:translate3d(0,-50%,
10)}.uppy-Root [role~=tooltip][data-microtip-position=right]:before,.uppy-Root [role~=tooltip][data-microtip-position=right]:after{top:50%;bottom:auto;left:100%;transform:translate3d(-10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=right]:before{width:6px;height:18px;margin-bottom:0;margin-left:5px;background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat}.uppy-Root [role~=tooltip][data-microtip-position=right]:after{margin-left:11px}.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:before,.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:after{transform:translate3d(0,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-size=small]:after{width:80px;white-space:initial}.uppy-Root [role~=tooltip][data-microtip-size=medium]:after{width:150px;white-space:initial}.uppy-Root [role~=tooltip][data-microtip-size=large]:after{width:260px;white-space:initial}.uppy-StatusBar{position:relative;z-index:1001;display:flex;height:46px;color:#fff;font-weight:400;font-size:12px;line-height:40px;background-color:#fff;transition:height .2s}[data-uppy-theme=dark] .uppy-StatusBar{background-color:#1f1f1f}.uppy-StatusBar:before{position:absolute;inset:0;width:100%;height:2px;background-color:#eaeaea;content:""}[data-uppy-theme=dark] .uppy-StatusBar:before{background-color:#757575}.uppy-StatusBar[aria-hidden=true]{height:0;overflow-y:hidden}.uppy-StatusBar.is-complete .uppy-StatusBar-progress{background-color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-progress{background-color:#e32437}.uppy-StatusBar.is-complete .uppy-StatusBar-statusIndicator{color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-statusIndicator{color:#e32437}.uppy-StatusBar:not([aria-hidden=true]).is-waiting{height:65px;background-color:#fff;border-top:1px solid #eaeaea}[data-uppy-theme=dark] .uppy-StatusBar:not([aria-hidden=true]).is-waiting{background-color:#1f1f1f;border-top:1px solid #333}.uppy-StatusBar-progress{position:absolute;z-index:1001;height:2px;background-color:#1269cf;transition:background-color,width .3s ease-out}.uppy-StatusBar-progress.is-indeterminate{background-image:linear-gradient(45deg,rgba(0,0,0,.3) 25%,transparent 25%,transparent 50%,rgba(0,0,0,.3) 50%,rgba(0,0,0,.3) 75%,transparent 75%,transparent);background-size:64px 64px;animation:uppy-StatusBar-ProgressStripes 1s linear infinite}@keyframes uppy-StatusBar-ProgressStripes{0%{background-position:0 0}to{background-position:64px 0}}.uppy-StatusBar.is-preprocessing .uppy-StatusBar-progress,.uppy-StatusBar.is-postprocessing .uppy-StatusBar-progress{background-color:#f6a623}.uppy-StatusBar.is-waiting .uppy-StatusBar-progress{display:none}[dir=ltr] .uppy-StatusBar-content{padding-left:10px}[dir=rtl] .uppy-StatusBar-content{padding-right:10px}.uppy-StatusBar-content{position:relative;z-index:1002;display:flex;align-items:center;height:100%;color:#333;white-space:nowrap;text-overflow:ellipsis}[dir=ltr] .uppy-size--md .uppy-StatusBar-content{padding-left:15px}[dir=rtl] .uppy-size--md .uppy-StatusBar-content{padding-right:15px}[data-uppy-theme=dark] .uppy-StatusBar-content{color:#eaeaea}[dir=ltr] .uppy-StatusBar-status{padding-right:.3em}[dir=rtl] .uppy-StatusBar-status{padding-left:.3em}.uppy-StatusBar-status{display:flex;flex-direction:column;justify-content:center;font-weight:400;line-height:1.4}.uppy-StatusBar-statusPrimary{font-weight:500;line-height:1;display:flex}.uppy-StatusBar-statusPrimary button.uppy-StatusBar-details{margin-left:5px}[data-uppy-theme=dark] .uppy-StatusBar-statusPrimary{color:#eaeaea}.uppy-StatusBar-statusSecondary{display:inline-block;margin-top:1px;color:#757575;font-size:11px;line-height:1.2;white-space:nowrap}[data-uppy-theme=dark] .uppy-StatusBar-statusSecondary{color:#bbb}[dir=ltr] .uppy-StatusBar-statusSecondaryHint{margin-right:5px}[dir=rtl] .uppy-StatusBar-statusSecondaryHint{margin-left:5px}.uppy-StatusBar-statusSecondaryHint{display:inline-block;line-height:1;vertical-align:middle}[dir=ltr] .uppy-size--md .uppy-StatusBar-statusSecondaryHint{margin-right:8px}[dir=rtl] .uppy-size--md .uppy-StatusBar-statusSecondaryHint{margin-left:8px}[dir=ltr] .uppy-StatusBar-statusIndicator{margin-right:7px}[dir=rtl] .uppy-StatusBar-statusIndicator{margin-left:7px}.uppy-StatusBar-statusIndicator{position:relative;top:1px;color:#525252}.uppy-StatusBar-statusIndicator svg{vertical-align:text-bottom}[dir=ltr] .uppy-StatusBar-actions{right:10px}[dir=rtl] .uppy-StatusBar-actions{left:10px}.uppy-StatusBar-actions{position:absolute;top:0;bottom:0;z-index:1004;display:flex;align-items:center}.uppy-StatusBar.is-waiting .uppy-StatusBar-actions{position:static;width:100%;height:100%;padding:0 15px;background-color:#fafafa}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actions{background-color:#1f1f1f}.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts{flex-direction:column;height:90px}.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts{flex-direction:row;height:65px}.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions{flex-direction:column;justify-content:center}.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions{flex-direction:row;justify-content:initial}.uppy-StatusBar-actionCircleBtn{margin:3px;line-height:1;cursor:pointer;opacity:.9}.uppy-StatusBar-actionCircleBtn:focus{outline:none}.uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}.uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar-actionCircleBtn:hover{opacity:1}.uppy-StatusBar-actionCircleBtn:focus{border-radius:50%}.uppy-StatusBar-actionCircleBtn svg{vertical-align:bottom}.uppy-StatusBar-actionBtn{display:inline-block;color:#1269cf;font-size:10px;line-height:inherit;vertical-align:middle}.uppy-size--md .uppy-StatusBar-actionBtn{font-size:11px}.uppy-StatusBar-actionBtn--disabled{opacity:.4}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--disabled{opacity:.7}[dir=ltr] .uppy-StatusBar-actionBtn--retry{margin-right:6px}[dir=rtl] .uppy-StatusBar-actionBtn--retry{margin-left:6px}.uppy-StatusBar-actionBtn--retry{position:relative;height:16px;padding:1px 6px 3px 18px;color:#fff;line-height:1;background-color:#ff4b23;border-radius:8px}.uppy-StatusBar-actionBtn--retry:focus{outline:none}.uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar-actionBtn--retry:hover{background-color:#f92d00}[dir=ltr] .uppy-StatusBar-actionBtn--retry svg{left:6px}[dir=rtl] .uppy-StatusBar-actionBtn--retry svg{right:6px}.uppy-StatusBar-actionBtn--retry svg{position:absolute;top:3px}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{width:100%;padding:15px 10px;color:#fff;font-size:14px;line-height:1;background-color:#1bb240}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#189c38}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{background-color:#1c8b37}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#18762f}.uppy-size--md .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{width:auto;padding:13px 22px}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover{background-color:#1bb240;cursor:not-allowed}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover{background-color:#1c8b37}.uppy-StatusBar:not(.is-waiting) .uppy-StatusBar-actionBtn--upload{color:#1269cf;background-color:transparent}[dir=ltr] .uppy-StatusBar-actionBtn--uploadNewlyAdded{padding-right:3px}[dir=rtl] .uppy-StatusBar-actionBtn--uploadNewlyAdded,[dir=ltr] .uppy-StatusBar-actionBtn--uploadNewlyAdded{padding-left:3px}[dir=rtl] .uppy-StatusBar-actionBtn--uploadNewlyAdded{padding-right:3px}.uppy-StatusBar-actionBtn--uploadNewlyAdded{padding-bottom:1px;border-radius:3px}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}.uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar.is-preprocessing .uppy-StatusBar-actionBtn--uploadNewlyAdded,.uppy-StatusBar.is-postprocessing .uppy-StatusBar-actionBtn--uploadNewlyAdded{display:none}.uppy-StatusBar-actionBtn--done{padding:7px 8px;line-height:1;border-radius:3px}.uppy-StatusBar-actionBtn--done:focus{outline:none}.uppy-StatusBar-actionBtn--done::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--done:hover{color:#0e51a0}.uppy-StatusBar-actionBtn--done:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done:focus{background-color:#333}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done{color:#02baf2}.uppy-size--md .uppy-StatusBar-actionBtn--done{font-size:14px}.uppy-StatusBar-serviceMsg{padding-left:10px;color:#000;font-size:11px;line-height:1.1}.uppy-size--md .uppy-StatusBar-serviceMsg{padding-left:15px;font-size:14px}[data-uppy-theme=dark] .uppy-StatusBar-serviceMsg{color:#eaeaea}.uppy-StatusBar-serviceMsg-ghostsIcon{position:relative;top:2px;left:6px;width:10px;vertical-align:text-bottom;opacity:.5}.uppy-size--md .uppy-StatusBar-serviceMsg-ghostsIcon{top:1px;left:10px;width:15px}[dir=ltr] .uppy-StatusBar-details{left:2px}[dir=rtl] .uppy-StatusBar-details{right:2px}.uppy-StatusBar-details{position:relative;top:0;display:inline-block;width:13px;height:13px;color:#fff;font-weight:600;font-size:10px;line-height:12px;text-align:center;vertical-align:middle;background-color:#939393;border-radius:50%;cursor:help;-webkit-appearance:none;appearance:none}.uppy-StatusBar-details:after{line-height:1.3;word-wrap:break-word}[dir=ltr] .uppy-StatusBar-spinner{margin-right:10px}[dir=rtl] .uppy-StatusBar-spinner{margin-left:10px}.uppy-StatusBar-spinner{animation-name:uppy-StatusBar-spinnerAnimation;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;fill:#1269cf}
1.uppy-StatusBar.is-preprocessing .uppy-StatusBar-spinner,.uppy-StatusBar.is-postprocessing .uppy-StatusBar-spinner{fill:#f6a623}@keyframes uppy-StatusBar-spinnerAnimation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list,.uppy-ProviderBrowser-viewType--unsplash ul.uppy-ProviderBrowser-list{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;padding:6px}.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list:after,.uppy-ProviderBrowser-viewType--unsplash ul.uppy-ProviderBrowser-list:after{flex:auto;content:""}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{position:relative;width:50%;margin:0}.uppy-size--md .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-size--md .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{width:33.3333%}.uppy-size--lg .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-size--lg .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{width:25%}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem:before,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem:before{display:block;padding-top:100%;content:""}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected svg,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--selected svg{opacity:.85}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--disabled,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--disabled{opacity:.5}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:#93939333}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:#eaeaea33}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview svg{width:30%;height:30%;fill:#000000b3}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview svg{fill:#fffc}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner{position:absolute;inset:7px;width:calc(100% - 14px);height:calc(100% - 14px);overflow:hidden;text-align:center;border-radius:4px}@media (hover: none){.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner .uppy-ProviderBrowserItem-author{display:block}}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner{box-shadow:0 0 0 3px #aae1ffb3}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner img,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner img{width:100%;height:100%;object-fit:cover;border-radius:4px}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-author{position:absolute;display:none;bottom:0;left:0;width:100%;background:rgba(0,0,0,.3);color:#fff;font-weight:500;font-size:12px;margin:0;padding:5px;text-decoration:none}
1.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-author:hover,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-author:hover{background:rgba(0,0,0,.4);text-decoration:underline}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox{position:absolute;top:16px;right:16px;z-index:1002;width:26px;height:26px;background-color:#1269cf;border-radius:50%;opacity:0}[dir=ltr] .uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox:after,[dir=ltr] .uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox:after{left:7px}[dir=rtl] .uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox:after,[dir=rtl] .uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox:after{right:7px}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox:after,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox:after{top:8px;width:12px;height:7px}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--is-checked,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--is-checked{opacity:1}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:hover+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:hover+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label .uppy-ProviderBrowserItem-author{display:block}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label{box-shadow:0 0 0 3px #1269cf80}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label:focus,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label:focus{outline:none}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label::-moz-focus-inner,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label::-moz-focus-inner{border:0}.uppy-ProviderBrowser-viewType--list{background-color:#fff}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list{background-color:#1f1f1f}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{display:flex;align-items:center;margin:0;padding:7px 15px}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{color:#eaeaea}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem--disabled{opacity:.6}[dir=ltr] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox{margin-right:15px}[dir=rtl] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox{margin-left:15px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox{width:17px;height:17px;background-color:#fff;border:1px solid #cfcfcf;border-radius:3px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:focus{border:1px solid #1269cf;outline:none;box-shadow:0 0 0 3px #1269cf40}[dir=ltr] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:after{left:3px}[dir=rtl] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:after{right:3px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:after{top:4px;width:9px;height:5px;opacity:0}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:focus{border-color:#02baf2b3;box-shadow:0 0 0 3px #02baf233}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox--is-checked{background-color:#1269cf;border-color:#1269cf}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox--is-checked:after{opacity:1}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner{display:flex;align-items:center;color:inherit;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,"Segoe UI Emoji","Apple Color Emoji",Roboto,Helvetica,Arial,sans-serif;padding:2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner:focus{text-decoration:underline;outline:none}[dir=ltr] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner img,[dir=ltr] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner svg{margin-right:8px}[dir=rtl] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner img,[dir=rtl] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner svg{margin-left:8px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner span{overflow:hidden;line-height:1.2;white-space:nowrap;text-overflow:ellipsis}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--disabled .uppy-ProviderBrowserItem-inner{cursor:default}[dir=ltr] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap{margin-right:7px}[dir=rtl] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap{margin-left:7px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap{width:20px}.uppy-ProviderBrowserItem-checkbox{position:relative;flex-shrink:0;cursor:pointer}.uppy-ProviderBrowserItem-checkbox:disabled{cursor:default}.uppy-ProviderBrowserItem-checkbox:after{position:absolute;border-bottom:2px solid #eaeaea;border-left:2px solid #eaeaea;transform:rotate(-45deg);cursor:pointer;content:""}.uppy-ProviderBrowserItem-checkbox:disabled:after{cursor:default}[data-uppy-theme=dark] .uppy-ProviderBrowserItem-checkbox{background-color:#1f1f1f;border-color:#939393}[data-uppy-theme=dark] .uppy-ProviderBrowserItem-checkbox--is-checked{background-color:#333}.uppy-SearchProvider{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%}[data-uppy-theme=dark] .uppy-SearchProvider{background-color:#1f1f1f}.uppy-SearchProvider-input{width:90%;max-width:650px;margin-bottom:15px}.uppy-size--md .uppy-SearchProvider-input{margin-bottom:20px}.uppy-SearchProvider-input::-webkit-search-cancel-button{display:none}.uppy-SearchProvider-searchButton{padding:13px 25px}.uppy-size--md .uppy-SearchProvider-searchButton{padding:13px 30px}.uppy-DashboardContent-panelBody{display:flex;flex:1;align-items:center;justify-content:center}[data-uppy-theme=dark] .uppy-DashboardContent-panelBody{background-color:#1f1f1f}.uppy-Provider-auth,.uppy-Provider-error,.uppy-Provider-loading,.uppy-Provider-empty{display:flex;flex:1;flex-flow:column wrap;align-items:center;justify-content:center;color:#939393}.uppy-Provider-empty{color:#939393}.uppy-Provider-authIcon svg{width:100px;height:75px}.uppy-Provider-authTitle{max-width:500px;margin-bottom:30px;padding:0 15px;color:#757575;font-weight:400;font-size:17px;line-height:1.4;text-align:center}.uppy-size--md .uppy-Provider-authTitle{font-size:20px}[data-uppy-theme=dark] .uppy-Provider-authTitle{color:#cfcfcf}.uppy-Provider-btn-google{padding:8px 12px!important}.uppy-Provider-btn-google{display:flex;align-items:center;background:#4285f4}.uppy-Provider-btn-google:hover{background-color:#1266f1}.uppy-Provider-btn-google:focus{outline:none;box-shadow:0 0 0 3px #4285f466}.uppy-Provider-btn-google svg{margin-right:8px}[dir=ltr] .uppy-Provider-breadcrumbs{text-align:left}[dir=rtl] .uppy-Provider-breadcrumbs{text-align:right}.uppy-Provider-breadcrumbs{flex:1;margin-bottom:10px;color:#525252;font-size:12px}.uppy-size--md .uppy-Provider-breadcrumbs{margin-bottom:0}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs{color:#eaeaea}[dir=ltr] .uppy-Provider-breadcrumbsIcon{margin-right:4px}[dir=rtl] .uppy-Provider-breadcrumbsIcon{margin-left:4px}.uppy-Provider-breadcrumbsIcon{display:inline-block;color:#525252;line-height:1;vertical-align:middle}.uppy-Provider-breadcrumbsIcon svg{width:13px;height:13px;fill:#525252}.uppy-Provider-breadcrumbs button{display:inline-block;padding:4px;line-height:inherit;border-radius:3px}.uppy-Provider-breadcrumbs button:focus{outline:none}.uppy-Provider-breadcrumbs button::-moz-focus-inner{border:0}.uppy-Provider-breadcrumbs button:hover{color:#0e51a0}.uppy-Provider-breadcrumbs button:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button:focus{background-color:#333}.uppy-Provider-breadcrumbs button:not(:last-of-type){text-decoration:underline}.uppy-Provider-breadcrumbs button:last-of-type{color:#333;font-weight:500;cursor:normal;pointer-events:none}.uppy-Provider-breadcrumbs button:hover{cursor:pointer}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button{color:#eaeaea}.uppy-ProviderBrowser{display:flex;flex:1;flex-direction:column;height:100%;font-weight:400;font-size:14px}.uppy-ProviderBrowser-user{margin:0 8px 0 0;color:#333;font-weight:500}[data-uppy-theme=dark] .uppy-ProviderBrowser-user{color:#eaeaea}[dir=ltr] .uppy-ProviderBrowser-user:after{left:4px}[dir=rtl] .uppy-ProviderBrowser-user:after{right:4px}.uppy-ProviderBrowser-user:after{position:relative;color:#939393;font-weight:400;content:"\\b7"}.uppy-ProviderBrowser-header{position:relative;z-index:1001;border-bottom:1px solid #eaeaea}[data-uppy-theme=dark] .uppy-ProviderBrowser-header{border-bottom:1px solid #333}.uppy-ProviderBrowser-headerBar{z-index:1001;padding:7px 15px;color:#757575;font-size:12px;line-height:1.4;background-color:#fafafa}.uppy-size--md .uppy-ProviderBrowser-headerBar{display:flex;align-items:center}[data-uppy-theme=dark] .uppy-ProviderBrowser-headerBar{background-color:#1f1f1f}.uppy-ProviderBrowser-headerBar--simple{display:block;justify-content:center;text-align:center}.uppy-ProviderBrowser-headerBar--simple .uppy-Provider-breadcrumbsWrap{display:inline-block;flex:none;vertical-align:middle}.uppy-ProviderBrowser-searchFilter{position:relative;display:flex;align-items:center;width:100%;height:30px;padding-left:8px;padding-right:8px;margin-top:15px;margin-bottom:15px}[dir=ltr] .uppy-ProviderBrowser-searchFilterInput{padding-left:30px}[dir=rtl] .uppy-ProviderBrowser-searchFilterInput,[dir=ltr] .uppy-ProviderBrowser-searchFilterInput{padding-right:30px}[dir=rtl] .uppy-ProviderBrowser-searchFilterInput{padding-left:30px}.uppy-ProviderBrowser-searchFilterInput{z-index:1001;width:100%;height:30px;font-size:13px;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,"Segoe UI Emoji","Apple Color Emoji",Roboto,Helvetica,Arial,sans-serif;line-height:1.4;background-color:#eaeaea;border:0;border-radius:4px;outline:0;color:#333}.uppy-ProviderBrowser-searchFilterInput::-webkit-search-cancel-button{display:none}[data-uppy-theme=dark] .uppy-ProviderBrowser-searchFilterInput{color:#eaeaea;background-color:#1f1f1f}.uppy-ProviderBrowser-searchFilterInput:focus{background-color:#cfcfcf;border:0}[data-uppy-theme=dark] .uppy-ProviderBrowser-searchFilterInput:focus{background-color:#333}[dir=ltr] .uppy-ProviderBrowser-searchFilterIcon{left:16px}[dir=rtl] .uppy-ProviderBrowser-searchFilterIcon{right:16px}.uppy-ProviderBrowser-searchFilterIcon{position:absolute;z-index:1002;width:12px;height:12px;color:#757575}.uppy-ProviderBrowser-searchFilterInput::placeholder{color:#939393;opacity:1}[dir=ltr] .uppy-ProviderBrowser-searchFilterReset{right:16px}[dir=rtl] .uppy-ProviderBrowser-searchFilterReset{left:16px}.uppy-ProviderBrowser-searchFilterReset{border-radius:3px;position:absolute;z-index:1002;width:22px;height:22px;padding:6px;color:#939393;cursor:pointer}.uppy-ProviderBrowser-searchFilterReset:focus{outline:none}.uppy-ProviderBrowser-searchFilterReset::-moz-focus-inner{border:0}.uppy-ProviderBrowser-searchFilterReset:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-ProviderBrowser-searchFilterReset:hover{color:#757575}.uppy-ProviderBrowser-searchFilterReset svg{vertical-align:text-top}
1.uppy-ProviderBrowser-userLogout{padding:4px;color:#1269cf;line-height:inherit;border-radius:3px;cursor:pointer}.uppy-ProviderBrowser-userLogout:focus{outline:none}.uppy-ProviderBrowser-userLogout::-moz-focus-inner{border:0}.uppy-ProviderBrowser-userLogout:hover{color:#0e51a0}.uppy-ProviderBrowser-userLogout:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout:focus{background-color:#333}.uppy-ProviderBrowser-userLogout:hover{text-decoration:underline}[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout{color:#eaeaea}.uppy-ProviderBrowser-body{position:relative;flex:1}.uppy-ProviderBrowser-list{position:absolute;inset:0;display:block;flex:1;width:100%;height:100%;margin:0;padding:0;overflow-x:hidden;overflow-y:auto;list-style:none;background-color:#fff;border-spacing:0;-webkit-overflow-scrolling:touch}[data-uppy-theme=dark] .uppy-ProviderBrowser-list{background-color:#1f1f1f}.uppy-ProviderBrowser-list:focus{outline:none}.uppy-ProviderBrowserItem-inner{font-weight:500;font-size:13px;cursor:pointer}.uppy-ProviderBrowser-footer{display:flex;align-items:center;height:65px;padding:0 15px;background-color:#fff;border-top:1px solid #eaeaea}[dir=ltr] .uppy-ProviderBrowser-footer button{margin-right:8px}[dir=rtl] .uppy-ProviderBrowser-footer button{margin-left:8px}[data-uppy-theme=dark] .uppy-ProviderBrowser-footer{background-color:#1f1f1f;border-top:1px solid #333}.uppy-Dashboard-Item-previewInnerWrap{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;border-radius:3px;box-shadow:0 0 2px #0006}.uppy-size--md .uppy-Dashboard-Item-previewInnerWrap{box-shadow:0 1px 2px #00000026}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewInnerWrap{box-shadow:none}.uppy-Dashboard-Item-previewInnerWrap:after{position:absolute;inset:0;z-index:1001;display:none;background-color:#000000a6;content:""}.uppy-Dashboard-Item-previewLink{position:absolute;inset:0;z-index:1002}.uppy-Dashboard-Item-previewLink:focus{box-shadow:inset 0 0 0 3px #579df0}[data-uppy-theme=dark] .uppy-Dashboard-Item-previewLink:focus{box-shadow:inset 0 0 0 3px #016c8d}.uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg{width:100%;height:100%;object-fit:cover;border-radius:3px;transform:translateZ(0)}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg{object-fit:contain;width:auto;height:auto;max-width:100%;max-height:100%;padding:10px}.uppy-Dashboard-Item-progress{position:absolute;top:50%;left:50%;z-index:1002;width:120px;color:#fff;text-align:center;transform:translate(-50%,-50%);transition:all .35 ease}.uppy-Dashboard-Item-progressIndicator{display:inline-block;width:38px;height:38px;opacity:.9;color:#fff}.uppy-size--md .uppy-Dashboard-Item-progressIndicator{width:55px;height:55px}button.uppy-Dashboard-Item-progressIndicator{cursor:pointer}button.uppy-Dashboard-Item-progressIndicator:focus{outline:none}button.uppy-Dashboard-Item-progressIndicator::-moz-focus-inner{border:0}button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--bg,button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--retry{fill:#579df0}.uppy-Dashboard-Item-progressIcon--circle{width:100%;height:100%}.uppy-Dashboard-Item-progressIcon--bg{stroke:#fff6}.uppy-Dashboard-Item-progressIcon--progress{transition:stroke-dashoffset .5s ease-out;stroke:#fff}.uppy-Dashboard-Item-progressIcon--play{transition:all .2s;fill:#fff;stroke:#fff}.uppy-Dashboard-Item-progressIcon--cancel{transition:all .2s;fill:#fff}.uppy-Dashboard-Item-progressIcon--pause{transition:all .2s;fill:#fff;stroke:#fff}.uppy-Dashboard-Item-progressIcon--check{transition:all .2s;fill:#fff}.uppy-Dashboard-Item-progressIcon--retry{fill:#fff}[dir=ltr] .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{right:-8px}[dir=rtl] .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{left:-8px}[dir=ltr] .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{left:initial}[dir=rtl] .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{right:initial}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{top:-9px;width:auto;transform:initial}.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator{width:18px;height:18px}.uppy-size--md .uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator{width:28px;height:28px}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator{width:18px;height:18px;opacity:1}.uppy-size--md .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator{width:22px;height:22px}.uppy-Dashboard-Item.is-processing .uppy-Dashboard-Item-progress{opacity:0}
1[dir=ltr] .uppy-Dashboard-Item-fileInfo{padding-right:5px}[dir=rtl] .uppy-Dashboard-Item-fileInfo{padding-left:5px}[dir=ltr] .uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-right:10px}[dir=rtl] .uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-left:10px}[dir=ltr] .uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-right:15px}[dir=rtl] .uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-left:15px}.uppy-Dashboard-Item-name{margin-bottom:5px;font-weight:500;font-size:12px;line-height:1.3;word-wrap:anywhere;word-break:break-all}[data-uppy-theme=dark] .uppy-Dashboard-Item-name{color:#eaeaea}.uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-name{font-size:14px;line-height:1.4}.uppy-Dashboard-Item-fileName{display:flex;align-items:baseline}.uppy-Dashboard-Item-fileName button{margin-left:5px}.uppy-Dashboard-Item-author{color:#757575;vertical-align:bottom;font-size:11px;font-weight:400;display:inline-block;line-height:1;margin-bottom:5px}.uppy-Dashboard-Item-author a{color:#757575}.uppy-Dashboard-Item-status{color:#757575;font-weight:400;font-size:11px;line-height:1}[data-uppy-theme=dark] .uppy-Dashboard-Item-status{color:#bbb}.uppy-Dashboard-Item-statusSize{display:inline-block;text-transform:uppercase;vertical-align:bottom;margin-bottom:5px}.uppy-Dashboard-Item-reSelect{color:#1269cf;font-weight:600;font-size:inherit;font-family:inherit}.uppy-Dashboard-Item-errorMessage{font-size:11px;font-weight:500;line-height:1.3;color:#a51523;background-color:#fdeff1;padding:5px 6px}.uppy-Dashboard-Item-errorMessageBtn{font-size:11px;text-decoration:underline;color:#a51523;cursor:pointer;font-weight:500}.uppy-Dashboard-Item-preview .uppy-Dashboard-Item-errorMessage{display:none}.uppy-size--md .uppy-Dashboard-Item-preview .uppy-Dashboard-Item-errorMessage{display:block;border-top:1px solid #f7c2c8;padding:6px 8px;line-height:1.4;position:absolute;bottom:0;left:0;right:0;border-bottom-left-radius:3px;border-bottom-right-radius:3px}.uppy-Dashboard-Item-fileInfo .uppy-Dashboard-Item-errorMessage{display:inline-block;position:static;border:1px solid #f7c2c8;border-radius:3px}.uppy-size--md .uppy-Dashboard-Item-fileInfo .uppy-Dashboard-Item-errorMessage{display:none}.uppy-Dashboard-Item-action{color:#939393;cursor:pointer}.uppy-Dashboard-Item-action:focus{outline:none}.uppy-Dashboard-Item-action::-moz-focus-inner{border:0}.uppy-Dashboard-Item-action:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Dashboard-Item-action:hover{color:#1f1f1f;opacity:1}[data-uppy-theme=dark] .uppy-Dashboard-Item-action{color:#cfcfcf}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus{outline:none}[data-uppy-theme=dark] .uppy-Dashboard-Item-action::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus{box-shadow:0 0 0 2px #aae1ffd9}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:hover{color:#eaeaea}.uppy-Dashboard-Item-action--remove{color:#1f1f1f;opacity:.95}.uppy-Dashboard-Item-action--remove:hover{color:#000;opacity:1}[dir=ltr] .uppy-size--md .uppy-Dashboard-Item-action--remove{right:-8px}[dir=rtl] .uppy-size--md .uppy-Dashboard-Item-action--remove{left:-8px}.uppy-size--md .uppy-Dashboard-Item-action--remove{position:absolute;top:-8px;z-index:1002;width:18px;height:18px;padding:0}.uppy-size--md .uppy-Dashboard-Item-action--remove:focus{border-radius:50%}[dir=ltr] .uppy-Dashboard--singleFile.uppy-size--height-md .uppy-Dashboard-Item-action--remove{right:8px}[dir=rtl] .uppy-Dashboard--singleFile.uppy-size--height-md .uppy-Dashboard-Item-action--remove{left:8px}.uppy-Dashboard--singleFile.uppy-size--height-md .uppy-Dashboard-Item-action--remove{position:absolute;top:8px}[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove{color:#525252}[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove:hover{color:#333}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-actionWrapper{display:flex;align-items:center}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-action{width:22px;height:22px;margin-left:3px;padding:3px}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-action:focus{border-radius:3px}.uppy-size--md .uppy-Dashboard-Item-action--copyLink,.uppy-size--md .uppy-Dashboard-Item-action--edit{width:16px;height:16px;padding:0}.uppy-size--md .uppy-Dashboard-Item-action--copyLink:focus,.uppy-size--md .uppy-Dashboard-Item-action--edit:focus{border-radius:3px}.uppy-Dashboard-Item{display:flex;align-items:center;padding:10px;border-bottom:1px solid #eaeaea}[dir=ltr] .uppy-Dashboard:not(.uppy-Dashboard--singleFile) .uppy-Dashboard-Item{padding-right:0}[dir=rtl] .uppy-Dashboard:not(.uppy-Dashboard--singleFile) .uppy-Dashboard-Item{padding-left:0}[data-uppy-theme=dark] .uppy-Dashboard-Item{border-bottom:1px solid #333}[dir=ltr] .uppy-size--md .uppy-Dashboard-Item{float:left}[dir=rtl] .uppy-size--md .uppy-Dashboard-Item{float:right}.uppy-size--md .uppy-Dashboard-Item{position:relative;display:block;width:calc(33.333% - 30px);height:215px;margin:5px 15px;padding:0;border-bottom:0}.uppy-size--lg .uppy-Dashboard-Item{width:calc(25% - 30px);height:190px;margin:5px 15px;padding:0}.uppy-size--xl .uppy-Dashboard-Item{width:calc(20% - 30px);height:210px;padding:0}.uppy-Dashboard--singleFile .uppy-Dashboard-Item{display:flex;flex-direction:column;width:100%;max-width:400px;height:100%;border-bottom:0;position:relative;padding:15px}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-previewInnerWrap{opacity:.2}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-name{opacity:.7}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{position:absolute;inset:0;z-index:1005;background-image:url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'35\' height=\'39\' viewBox=\'0 0 35 39\'%3E%3Cpath d=\'M1.708 38.66c1.709 0 3.417-3.417 6.834-3.417 3.416 0 5.125 3.417 8.61 3.417 3.348 0 5.056-3.417 8.473-3.417 4.305 0 5.125 3.417 6.833 3.417.889 0 1.709-.889 1.709-1.709v-19.68C34.167-
15.757 0-5.757 0 17.271v19.68c0 .82.888 1.709 1.708 1.709zm8.542-17.084a3.383 3.383 0 01-3.417-3.416 3.383 3.383 0 013.417-3.417 3.383 3.383 0 013.417 3.417 3.383 3.383 0 01-3.417 3.416zm13.667 0A3.383 3.383 0 0120.5 18.16a3.383 3.383 0 013.417-3.417 3.383 3.383 0 013.416 3.417 3.383 3.383 0 01-3.416 3.416z\' fill=\'%2523000\' fill-rule=\'nonzero\'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50% 10px;background-size:25px;opacity:.5;content:""}.uppy-size--md .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-position:50% 50%;background-size:40px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-position:50% 50%;background-size:30%}.uppy-Dashboard-Item-preview{position:relative;flex-grow:0;flex-shrink:0;width:50px;height:50px}.uppy-size--md .uppy-Dashboard-Item-preview{width:100%;height:140px}.uppy-size--lg .uppy-Dashboard-Item-preview{height:120px}.uppy-size--xl .uppy-Dashboard-Item-preview{height:140px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-preview{width:100%;max-height:75%;flex-grow:1}.uppy-Dashboard--singleFile.uppy-size--md .uppy-Dashboard-Item-preview{max-height:100%}[dir=ltr] .uppy-Dashboard-Item-fileInfoAndButtons{padding-right:8px}[dir=rtl] .uppy-Dashboard-Item-fileInfoAndButtons{padding-left:8px}[dir=ltr] .uppy-Dashboard-Item-fileInfoAndButtons{padding-left:12px}[dir=rtl] .uppy-Dashboard-Item-fileInfoAndButtons{padding-right:12px}.uppy-Dashboard-Item-fileInfoAndButtons{display:flex;flex-grow:1;align-items:center;justify-content:space-between}.uppy-size--md .uppy-Dashboard-Item-fileInfoAndButtons,.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfoAndButtons{align-items:flex-start;padding:9px 0 0}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfoAndButtons{width:100%;flex-grow:0}.uppy-Dashboard-Item-fileInfo{flex-grow:1;flex-shrink:1}.uppy-Dashboard-Item-actionWrapper{flex-grow:0;flex-shrink:0}.uppy-Dashboard-Item.is-inprogress .uppy-Dashboard-Item-previewInnerWrap:after,.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-previewInnerWrap:after{display:block}[dir=ltr] .uppy-Dashboard-Item-errorDetails{left:2px}[dir=rtl] .uppy-Dashboard-Item-errorDetails{right:2px}.uppy-Dashboard-Item-errorDetails{position:relative;top:0;flex-shrink:0;width:13px;height:13px;color:#fff;font-weight:600;font-size:10px;line-height:12px;text-align:center;background-color:#939393;border-radius:50%;border:none;cursor:help;-webkit-appearance:none;appearance:none}.uppy-Dashboard-Item-errorDetails:after{line-height:1.3;word-wrap:break-word}.uppy-Dashboard-FileCard{position:absolute;inset:0;z-index:1005;display:flex;flex-direction:column;width:100%;height:100%;background-color:#fff;border-radius:5px;box-shadow:0 0 10px 4px #0000001a}.uppy-Dashboard-FileCard .uppy-DashboardContent-bar{border-top-left-radius:5px;border-top-right-radius:5px}.uppy-Dashboard-FileCard .uppy-Dashboard-FileCard-actions{border-bottom-right-radius:5px;border-bottom-left-radius:5px}.uppy-Dashboard-FileCard-inner{display:flex;flex-direction:column;flex-grow:1;flex-shrink:1;height:100%;min-height:0}.uppy-Dashboard-FileCard-preview{position:relative;display:flex;flex-grow:0;flex-shrink:1;align-items:center;justify-content:center;height:60%;min-height:0;border-bottom:1px solid #eaeaea}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-preview{background-color:#333;border-bottom:0}.uppy-Dashboard-FileCard-preview img.uppy-Dashboard-Item-previewImg{flex:0 0 auto;max-width:90%;max-height:90%;object-fit:cover;border-radius:3px;box-shadow:0 3px 20px #00000026}[dir=ltr] .uppy-Dashboard-FileCard-edit{right:10px}[dir=rtl] .uppy-Dashboard-FileCard-edit{left:10px}.uppy-Dashboard-FileCard-edit{position:absolute;top:10px;padding:7px 15px;color:#fff;font-size:13px;background-color:#00000080;border-radius:50px}.uppy-Dashboard-FileCard-edit:focus{outline:none}.uppy-Dashboard-FileCard-edit::-moz-focus-inner{border:0}.uppy-Dashboard-FileCard-edit:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Dashboard-FileCard-edit:hover{background-color:#000c}.uppy-Dashboard-FileCard-info{flex-grow:0;flex-shrink:0;height:40%;padding:30px 20px 20px;overflow-y:auto;-webkit-overflow-scrolling:touch}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-info{background-color:#1f1f1f}.uppy-Dashboard-FileCard-fieldset{max-width:640px;margin:auto auto 12px;padding:0;font-size:0;border:0}.uppy-Dashboard-FileCard-label{display:inline-block;width:22%;color:#525252;font-size:12px;vertical-align:middle}.uppy-size--md .uppy-Dashboard-FileCard-label{font-size:14px}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-label{color:#eaeaea}.uppy-Dashboard-FileCard-input{display:inline-block;width:78%;vertical-align:middle}.uppy-Dashboard-FileCard-actions{display:flex;flex-grow:0;flex-shrink:0;align-items:center;height:55px;padding:0 15px;background-color:#fafafa;border-top:1px solid #eaeaea}.uppy-size--md .uppy-Dashboard-FileCard-actions{height:65px}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-actions{background-color:#1f1f1f;border-top:1px solid #333}[dir=ltr] .uppy-Dashboard-FileCard-actionsBtn{margin-right:10px}[dir=rtl] .uppy-Dashboard-FileCard-actionsBtn{margin-left:10px}
1.uppy-transition-slideDownUp-enter{transform:translate3d(0,-105%,0);opacity:.01;transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-enter.uppy-transition-slideDownUp-enter-active{transform:translateZ(0);opacity:1}.uppy-transition-slideDownUp-leave{transform:translateZ(0);opacity:1;transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-leave.uppy-transition-slideDownUp-leave-active{transform:translate3d(0,-105%,0);opacity:.01}@keyframes uppy-Dashboard-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes uppy-Dashboard-fadeOut{0%{opacity:1}to{opacity:0}}@keyframes uppy-Dashboard-slideDownAndFadeIn{0%{transform:translate3d(-50%,-70%,0);opacity:0}to{transform:translate3d(-50%,-50%,0);opacity:1}}@keyframes uppy-Dashboard-slideDownAndFadeIn--small{0%{transform:translate3d(0,-20%,0);opacity:0}to{transform:translateZ(0);opacity:1}}@keyframes uppy-Dashboard-slideUpFadeOut{0%{transform:translate3d(-50%,-50%,0);opacity:1}to{transform:translate3d(-50%,-70%,0);opacity:0}}@keyframes uppy-Dashboard-slideUpFadeOut--small{0%{transform:translateZ(0);opacity:1}to{transform:translate3d(0,-20%,0);opacity:0}}.uppy-Dashboard--modal{z-index:1001}.uppy-Dashboard--modal[aria-hidden=true]{display:none}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width: 820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeIn .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width: 820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeOut .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard-isFixed{height:100vh;overflow:hidden}.uppy-Dashboard--modal .uppy-Dashboard-overlay{position:fixed;inset:0;z-index:1001;background-color:#00000080}.uppy-Dashboard-inner{position:relative;max-width:100%;max-height:100%;background-color:#f4f4f4;border:1px solid #eaeaea;border-radius:5px;outline:none}.uppy-size--md .uppy-Dashboard-inner{min-height:auto}@media only screen and (min-width: 820px){.uppy-Dashboard-inner{width:650px;height:500px}}.uppy-Dashboard--modal .uppy-Dashboard-inner{z-index:1002}[data-uppy-theme=dark] .uppy-Dashboard-inner{background-color:#1f1f1f}.uppy-Dashboard--isDisabled .uppy-Dashboard-inner{cursor:not-allowed}.uppy-Dashboard-innerWrap{position:relative;display:flex;flex-direction:column;height:100%;overflow:hidden;border-radius:5px;opacity:0}.uppy-Dashboard--isInnerWrapVisible .uppy-Dashboard-innerWrap{opacity:1}.uppy-Dashboard--isDisabled .uppy-Dashboard-innerWrap{opacity:.6;filter:grayscale(100%);-webkit-user-select:none;user-select:none;cursor:not-allowed}.uppy-Dashboard--isDisabled .uppy-ProviderIconBg{fill:#9f9f9f}.uppy-Dashboard--isDisabled [disabled],.uppy-Dashboard--isDisabled [aria-disabled]{pointer-events:none;cursor:not-allowed}.uppy-Dashboard--modal .uppy-Dashboard-inner{position:fixed;inset:35px 15px 15px;border:none}@media only screen and (min-width: 820px){.uppy-Dashboard--modal .uppy-Dashboard-inner{top:50%;right:auto;left:50%;box-shadow:0 5px 15px 4px #00000026;transform:translate(-50%,-50%)}}[dir=ltr] .uppy-Dashboard-close{right:-2px}[dir=rtl] .uppy-Dashboard-close{left:-2px}.uppy-Dashboard-close{position:absolute;top:-33px;z-index:1005;display:block;color:#ffffffe6;font-size:27px;cursor:pointer}.uppy-Dashboard-close:focus{outline:none}.uppy-Dashboard-close::-moz-focus-inner{border:0}.uppy-Dashboard-close:focus{color:#6eabf2}@media only screen and (min-width: 820px){[dir=ltr] .uppy-Dashboard-close{right:-35px}[dir=rtl] .uppy-Dashboard-close{left:-35px}.uppy-Dashboard-close{top:-10px;font-size:35px}}.uppy-Dashboard-serviceMsg{position:relative;top:-1px;z-index:1004;padding:12px 0;font-weight:500;font-size:12px;line-height:1.3;background-color:#fffbf7;border-top:1px solid #edd4b9;border-bottom:1px solid #edd4b9}.uppy-size--md .uppy-Dashboard-serviceMsg{font-size:14px;line-height:1.4}[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg{color:#eaeaea;background-color:#1f1f1f;border-top:1px solid #333;border-bottom:1px solid #333}.uppy-Dashboard-serviceMsg-title{display:block;margin-bottom:4px;padding-left:42px;line-height:1}.uppy-Dashboard-serviceMsg-text{padding:0 15px}.uppy-Dashboard-serviceMsg-actionBtn{color:#1269cf;font-weight:inherit;font-size:inherit;vertical-align:initial}[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg-actionBtn{color:#02baf2e6}.uppy-Dashboard-serviceMsg-icon{position:absolute;top:10px;left:15px}.uppy-Dashboard-AddFiles{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-align:center}[data-uppy-drag-drop-supported=true] .uppy-Dashboard-AddFiles{height:calc(100% - 14px);margin:7px;border:1px dashed #dfdfdf;border-radius:3px}.uppy-Dashboard-AddFilesPanel .uppy-Dashboard-AddFiles{height:calc(100% - 54px);border:none}.uppy-Dashboard--modal .uppy-Dashboard-AddFiles{border-color:#cfcfcf}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles{border-color:#757575}.uppy-Dashboard-AddFiles-info{display:none;margin-top:auto;padding-top:15px;padding-bottom:15px}.uppy-size--height-md .uppy-Dashboard-AddFiles-info{display:block}.uppy-size--md .uppy-Dashboard-AddFiles-info{position:absolute;right:0;bottom:25px;left:0;padding-top:30px;padding-bottom:0}[data-uppy-num-acquirers="0"] .uppy-Dashboard-AddFiles-info{margin-top:0}.uppy-Dashboard-browse{color:#1269cf;cursor:pointer}.uppy-Dashboard-browse:focus{outline:none}.uppy-Dashboard-browse::-moz-focus-inner{border:0}.uppy-Dashboard-browse:hover,.uppy-Dashboard-browse:focus{border-bottom:1px solid #1269cf}[data-uppy-theme=dark] .uppy-Dashboard-browse{color:#02baf2e6}[data-uppy-theme=dark] .uppy-Dashboard-browse:hover,[data-uppy-theme=dark] .uppy-Dashboard-browse:focus{border-bottom:1px solid #02baf2}.uppy-Dashboard-browseBtn{display:block;width:100%;margin-top:8px;margin-bottom:5px;font-weight:500;font-size:14px}.uppy-size--md .uppy-Dashboard-browseBtn{width:auto;margin:15px auto;padding:13px 44px;font-size:15px}.uppy-Dashboard-AddFiles-list{display:flex;flex:1;flex-direction:column;width:100%;margin-top:2px;padding:2px 0;overflow-y:auto;-webkit-overflow-scrolling:touch}.uppy-size--md .uppy-Dashboard-AddFiles-list{flex:none;flex-direction:row;flex-wrap:wrap;justify-content:center;max-width:600px;margin-top:15px;padding-top:0;overflow-y:visible}.uppy-DashboardTab{width:100%;text-align:center;border-bottom:1px solid #eaeaea}[data-uppy-theme=dark] .uppy-DashboardTab{border-bottom:1px solid #333}.uppy-size--md .uppy-DashboardTab{display:inline-block;width:initial;margin-bottom:10px;border-bottom:none}.uppy-DashboardTab-btn{flex-direction:row;align-items:center;justify-content:left;width:100%;height:100%;padding:12px 15px;color:#525252;background-color:transparent;cursor:pointer;-webkit-appearance:none;appearance:none}.uppy-DashboardTab-btn:focus{outline:none}[dir=ltr] .uppy-size--md .uppy-DashboardTab-btn{margin-right:1px}[dir=rtl] .uppy-size--md .uppy-DashboardTab-btn{margin-left:1px}.uppy-size--md .uppy-DashboardTab-btn{flex-direction:column;width:86px;padding:10px 3px;border-radius:5px}[data-uppy-theme=dark] .uppy-DashboardTab-btn{color:#eaeaea}.uppy-DashboardTab-btn::-moz-focus-inner{border:0}.uppy-DashboardTab-btn:hover{background-color:#e9ecef}[data-uppy-theme=dark] .uppy-DashboardTab-btn:hover{background-color:#333}.uppy-DashboardTab-btn:active,.uppy-DashboardTab-btn:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardTab-btn:active,[data-uppy-theme=dark] .uppy-DashboardTab-btn:focus{background-color:#525252}.uppy-DashboardTab-btn svg{display:inline-block;max-width:100%;max-height:100%;overflow:hidden;vertical-align:text-top;transition:transform ease-in-out .15s}[dir=ltr] .uppy-DashboardTab-inner{margin-right:10px}[dir=rtl] .uppy-DashboardTab-inner{margin-left:10px}.uppy-DashboardTab-inner{display:flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:8px;background-color:#fff;box-shadow:0 1px 1px #0000001a,0 1px 2px #0000001a,0 2px 3px #00000005}[dir=ltr] .uppy-size--md .uppy-DashboardTab-inner{margin-right:0}[dir=rtl] .uppy-size--md .uppy-DashboardTab-inner{margin-left:0}[data-uppy-theme=dark] .uppy-DashboardTab-inner{background-color:#323232;box-shadow:0 1px 1px #0003,0 1px 2px #0003,0 2px 3px #00000014}.uppy-DashboardTab-name{font-weight:400;font-size:14px}.uppy-size--md .uppy-DashboardTab-name{margin-top:8px;margin-bottom:0;font-size:12px;line-height:15px}.uppy-DashboardTab-iconMyDevice{color:#1269cf}[data-uppy-theme=dark] .uppy-DashboardTab-iconMyDevice{color:#02baf2}.uppy-DashboardTab-iconBox{color:#0061d5}[data-uppy-theme=dark] .uppy-DashboardTab-iconBox{color:#eaeaea}.uppy-DashboardTab-iconDropbox{color:#0061fe}[data-uppy-theme=dark] .uppy-DashboardTab-iconDropbox{color:#eaeaea}
1.uppy-DashboardTab-iconUnsplash{color:#111}[data-uppy-theme=dark] .uppy-DashboardTab-iconUnsplash{color:#eaeaea}.uppy-DashboardTab-iconScreenRec{color:#2c3e50}[data-uppy-theme=dark] .uppy-DashboardTab-iconScreenRec{color:#eaeaea}.uppy-DashboardTab-iconAudio{color:#8030a3}[data-uppy-theme=dark] .uppy-DashboardTab-iconAudio{color:#bf6ee3}.uppy-Dashboard-input{position:absolute;z-index:-1;width:.1px;height:.1px;overflow:hidden;opacity:0}.uppy-DashboardContent-bar{position:relative;z-index:1004;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;width:100%;height:40px;padding:0 10px;background-color:#fafafa;border-bottom:1px solid #eaeaea}.uppy-size--md .uppy-DashboardContent-bar{height:50px;padding:0 15px}[data-uppy-theme=dark] .uppy-DashboardContent-bar{background-color:#1f1f1f;border-bottom:1px solid #333}.uppy-DashboardContent-title{position:absolute;top:0;right:0;left:0;width:100%;max-width:170px;margin:auto;overflow-x:hidden;font-weight:500;font-size:12px;line-height:40px;white-space:nowrap;text-align:center;text-overflow:ellipsis}.uppy-size--md .uppy-DashboardContent-title{max-width:300px;font-size:14px;line-height:50px}[data-uppy-theme=dark] .uppy-DashboardContent-title{color:#eaeaea}[dir=ltr] .uppy-DashboardContent-back,[dir=ltr] .uppy-DashboardContent-save{margin-left:-6px}[dir=rtl] .uppy-DashboardContent-back,[dir=rtl] .uppy-DashboardContent-save{margin-right:-6px}.uppy-DashboardContent-back,.uppy-DashboardContent-save{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:1;background:none;border:0;-webkit-appearance:none;padding:7px 6px;color:#1269cf;font-weight:400;font-size:12px;border-radius:3px;cursor:pointer}.uppy-DashboardContent-back:focus,.uppy-DashboardContent-save:focus{outline:none}.uppy-DashboardContent-back::-moz-focus-inner,.uppy-DashboardContent-save::-moz-focus-inner{border:0}.uppy-DashboardContent-back:hover,.uppy-DashboardContent-save:hover{color:#0e51a0}.uppy-DashboardContent-back:focus,.uppy-DashboardContent-save:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardContent-back:focus,[data-uppy-theme=dark] .uppy-DashboardContent-save:focus{background-color:#333}.uppy-size--md .uppy-DashboardContent-back,.uppy-size--md .uppy-DashboardContent-save{font-size:14px}[data-uppy-theme=dark] .uppy-DashboardContent-back,[data-uppy-theme=dark] .uppy-DashboardContent-save{color:#02baf2}[dir=ltr] .uppy-DashboardContent-addMore{margin-right:-5px}[dir=rtl] .uppy-DashboardContent-addMore{margin-left:-5px}.uppy-DashboardContent-addMore{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:1;background:none;border:0;-webkit-appearance:none;width:29px;height:29px;padding:7px 8px;color:#1269cf;font-weight:500;border-radius:3px;cursor:pointer}.uppy-DashboardContent-addMore:focus{outline:none}.uppy-DashboardContent-addMore::-moz-focus-inner{border:0}.uppy-DashboardContent-addMore:hover{color:#0e51a0}.uppy-DashboardContent-addMore:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardContent-addMore:focus{background-color:#333}[dir=ltr] .uppy-size--md .uppy-DashboardContent-addMore{margin-right:-8px}[dir=rtl] .uppy-size--md .uppy-DashboardContent-addMore{margin-left:-8px}.uppy-size--md .uppy-DashboardContent-addMore{width:auto;height:auto;font-size:14px}[data-uppy-theme=dark] .uppy-DashboardContent-addMore{color:#02baf2}[dir=ltr] .uppy-DashboardContent-addMore svg{margin-right:4px}[dir=rtl] .uppy-DashboardContent-addMore svg{margin-left:4px}.uppy-DashboardContent-addMore svg{vertical-align:baseline}.uppy-size--md .uppy-DashboardContent-addMore svg{width:11px;height:11px}.uppy-DashboardContent-addMoreCaption{display:none}.uppy-size--md .uppy-DashboardContent-addMoreCaption{display:inline}.uppy-DashboardContent-panel{position:absolute;inset:0;z-index:1005;display:flex;flex:1;flex-direction:column;overflow:hidden;background-color:#f5f5f5;border-radius:5px}.uppy-Dashboard-AddFilesPanel{position:absolute;inset:0;z-index:1005;display:flex;flex-direction:column;overflow:hidden;background:#fafafa;background:linear-gradient(0deg,#fafafa 35%,rgba(250,250,250,.85) 100%);border-radius:5px;box-shadow:0 0 10px 5px #00000026}[data-uppy-theme=dark] .uppy-Dashboard-AddFilesPanel{background-color:#333;background-image:linear-gradient(0deg,#1f1f1f 35%,rgba(31,31,31,.85) 100%)}.uppy-Dashboard--isAddFilesPanelVisible .uppy-Dashboard-files{filter:blur(2px)}.uppy-Dashboard-progress{position:absolute;bottom:0;left:0;width:100%;height:12%}.uppy-Dashboard-progressBarContainer.is-active{position:absolute;top:0;left:0;z-index:1004;width:100%;height:100%}.uppy-Dashboard-filesContainer{position:relative;flex:1;margin:0;overflow-y:hidden}.uppy-Dashboard-filesContainer:after{display:table;clear:both;content:""}.uppy-Dashboard-files{flex:1;margin:0;padding:0 0 10px;overflow-y:auto;-webkit-overflow-scrolling:touch}.uppy-size--md .uppy-Dashboard-files{padding-top:10px}.uppy-Dashboard--singleFile .uppy-Dashboard-filesInner{display:flex;justify-content:center;align-items:center;height:100%}.uppy-Dashboard-dropFilesHereHint{position:absolute;inset:7px;z-index:2000;display:flex;align-items:center;justify-content:center;padding-top:90px;color:#757575;font-size:16px;text-align:center;background-image:url("data:image/svg+xml,%3Csvg width=\'48\' height=\'48\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2V1zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0v1zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a.999.999 0 0 1 1.414 0l7 7z\' fill=\'%231269CF\' fill-rule=\'nonzero\'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50% 50%;border:1px dashed #1269cf;border-radius:3px;visibility:hidden}[data-uppy-theme=dark] .uppy-Dashboard-dropFilesHereHint{color:#bbb;background-image:url("data:image/svg+xml,%3Csvg width=\'48\' height=\'48\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2V1zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0v1zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a.999.999 0 0 1 1.414 0l7 7z\' fill=\'%2302BAF2\' fill-rule=\'nonzero\'/%3E%3C/svg%3E");border-color:#02baf2}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-dropFilesHereHint{visibility:visible}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-DashboardContent-bar,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-files,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-progressindicators,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-serviceMsg{opacity:.15}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-AddFiles{opacity:.03}.uppy-Dashboard-AddFiles-title{width:100%;margin-top:15px;margin-bottom:5px;padding:0 15px;color:#000;font-weight:500;font-size:17px;line-height:1.35;text-align:inline-start}.uppy-size--md .uppy-Dashboard-AddFiles-title{max-width:480px;padding:0 35px;margin-top:5px;font-weight:400;font-size:21px;text-align:center}[data-uppy-num-acquirers="0"] .uppy-Dashboard-AddFiles-title{text-align:center}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles-title{color:#eaeaea}.uppy-Dashboard-AddFiles-title button{font-weight:500}.uppy-size--md .uppy-Dashboard-AddFiles-title button{font-weight:400}.uppy-Dashboard-note{max-width:350px;margin:auto;padding:0 15px;color:#757575;font-size:14px;line-height:1.25;text-align:center}.uppy-size--md .uppy-Dashboard-note{max-width:600px;line-height:1.35}[data-uppy-theme=dark] .uppy-Dashboard-note{color:#cfcfcf}a.uppy-Dashboard-poweredBy{display:inline-block;margin-top:8px;color:#939393;font-size:11px;text-align:center;text-decoration:none}.uppy-Dashboard-poweredByIcon{position:relative;top:1px;margin-right:1px;margin-left:1px;vertical-align:text-top;opacity:.9;fill:none;stroke:#939393}.uppy-Dashboard-Item-previewIcon{position:absolute;top:50%;left:50%;z-index:100;width:25px;height:25px;transform:translate(-50%,-50%)}.uppy-size--md .uppy-Dashboard-Item-previewIcon{width:38px;height:38px}.uppy-Dashboard-Item-previewIcon svg{width:100%;height:100%}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewIcon{width:100%;height:100%;max-width:60%;max-height:60%}.uppy-Dashboard-Item-previewIconWrap{position:relative;height:76px;max-height:75%}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewIconWrap{width:100%;height:100%}.uppy-Dashboard-Item-previewIconBg{width:100%;height:100%;filter:drop-shadow(rgba(0,0,0,.1) 0 1px 1px)}.uppy-Dashboard-upload{position:relative;width:50px;height:50px}.uppy-size--md .uppy-Dashboard-upload{width:60px;height:60px}.uppy-Dashboard-upload .uppy-c-icon{position:relative;top:1px;width:50%}[dir=ltr] .uppy-Dashboard-uploadCount{right:-12px}[dir=rtl] .uppy-Dashboard-uploadCount{left:-12px}.uppy-Dashboard-uploadCount{position:absolute;top:-12px;width:16px;height:16px;color:#fff;font-size:8px;line-height:16px;background-color:#1bb240;border-radius:50%}.uppy-size--md .uppy-Dashboard-uploadCount{width:18px;height:18px;font-size:9px;line-height:18px}.response-list-header{margin-bottom:0!important}.uppy-Dashboard-inner{z-index:0}\n'],encapsulation:2}),ie);X=(0,p.__decorate)([(0,I.E)(f.i.TusUploadRequestCopy)],X);const xe=[te,X];let ge=(()=>{class pe{static withEntryComponents(){return{ngModule:pe,providers:xe.map(Me=>({provide:Me}))}}}return pe.\u0275fac=function(Me){return new(Me||pe)},pe.\u0275mod=y.\u0275\u0275defineNgModule({type:pe}),pe.\u0275inj=y.\u0275\u0275defineInjector({imports:[J.o,d.ez,ne.m,D.aw,H.AtmireRequestCopyModule]}),pe})()},58068:(Se,Y,s)=>{"use strict";s.d(Y,{J:()=>d});var p=s(45608),I=s(38025),f=s(98678),o=s(96342),y=s(35103);function O(R,k){if(1&R&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275elementStart(1,"span"),f.\u0275\u0275text(2),f.\u0275\u0275elementEnd(),f.\u0275\u0275element(3,"br"),f.\u0275\u0275elementContainerEnd()),2&R){const G=f.\u0275\u0275nextContext();f.\u0275\u0275advance(1),f.\u0275\u0275classMapInterpolate1("badge mr-2 ",G.getBadgeClass(),""),f.\u0275\u0275advance(1),f.\u0275\u0275textInterpolate(G.getBadgeText())}}let d=(()=>{class R{constructor(G){this.translateService=G}shouldDisplayBadge(){if((0,p.xI)(this.requestCopyOption))return!1;const G=this.requestCopyOption[(0,I.b_)(this.accessConditionCategory)];return(0,p.Uh)(G)}getBadgeClass(){switch(this.accessConditionCategory){case I.T3.Always:return"badge-dark";case I.T3.Request:return"badge-info";case I.T3.Fallback:return"badge-light"}}getBadgeText(){let G=this.getBadgePrefix();return G+=": ",G+=this.getBadgeContent(),G}getBadgePrefix(){return this.translateService.instant(`submission.sections.upload.form.access-condition-badge.${this.requestCopyOption.requestAccessType}.${this.accessConditionCategory}`)}getBadgeContent(){const G=this.requestCopyOption[(0,I.b_)(this.accessConditionCategory)],ae=this.requestCopyOption.requestAccessType;if((0,p.xI)(G))return"";const j=G.name;let N={};return(0,p.Uh)(G.startDate)&&(N.startDate=G.startDate),(0,p.Uh)(G.endDate)&&(N.endDate=G.endD
1ate),this.translateService.instant(`submission.sections.upload.form.access-condition-label.${ae}.specific.${j}`,N)}}return R.\u0275fac=function(G){return new(G||R)(f.\u0275\u0275directiveInject(o.sK))},R.\u0275cmp=f.\u0275\u0275defineComponent({type:R,selectors:[["ds-submission-section-upload-request-copy-access-condition-badge"]],inputs:{accessConditionCategory:"accessConditionCategory",requestCopyOption:"requestCopyOption"},decls:1,vars:1,consts:[[4,"ngIf"]],template:function(G,ae){1&G&&f.\u0275\u0275template(0,O,4,4,"ng-container",0),2&G&&f.\u0275\u0275property("ngIf",ae.shouldDisplayBadge())},dependencies:[y.O5],encapsulation:2}),R})()},85186:(Se,Y,s)=>{"use strict";s.d(Y,{V:()=>ne});var p=s(90532),I=s(4915),f=s(4786),o=s(1579),y=s(78187),O=s(11915),d=s(53113),R=s(65384),k=s(27173),G=s(5737),ae=s(38935),j=s(45608),N=s(77176),C=s(77007),D=s(69637),z=s(9249),le=s(67079),q=s(27164),m=s(98678),T=s(65706),S=s(96342),M=s(82485),K=s(35103);function te(B,$){if(1&B){const F=m.\u0275\u0275getCurrentView();m.\u0275\u0275elementStart(0,"ds-form",6,7),m.\u0275\u0275listener("submitForm",function(){m.\u0275\u0275restoreView(F);const H=m.\u0275\u0275nextContext();return m.\u0275\u0275resetView(H.onSubmit())})("cancel",function(){m.\u0275\u0275restoreView(F);const H=m.\u0275\u0275nextContext();return m.\u0275\u0275resetView(H.onModalClose())})("dfChange",function(H){m.\u0275\u0275restoreView(F);const oe=m.\u0275\u0275nextContext();return m.\u0275\u0275resetView(oe.onChange(H))}),m.\u0275\u0275elementEnd()}if(2&B){const F=m.\u0275\u0275nextContext();m.\u0275\u0275property("formId",F.formId)("formModel",F.formModel)("displaySubmit",!F.isSaving)("displayCancel",!F.isSaving)}}const J="custom_permissions";let ne=(()=>{class B extends p.e{constructor(F,P,H,oe,Q,ie,se,X,xe,De,ge){super(F,P,H,oe,Q,ie,se,X),this.accessConditionsFormService=xe,this.notificationService=De,this.translateService=ge}buildFileEditForm(){const F=[];F.push(this.buildMetadataGroup());const P=this.accessConditionsFormService.buildAccessConditionGroup(J,this.availableAccessConditionOptions);return F.push(P),this.initModelData(F),F}buildMetadataGroup(){const F=this.configMetadataForm.rows[0].fields[0],P=Object.assign({},F);P.repeatable=!1;const H=Object.assign({},this.configMetadataForm,{fields:Object.assign([],F,[F,P])}),oe=Object.assign({},ae.Wm);return oe.group=this.formBuilderService.modelFromConfiguration(this.submissionId,H,this.collectionId,this.fileData.metadata,this.submissionService.getSubmissionScope()),new G.S_O(oe,ae.Oy)}initModelData(F){const P=this.fileData?.accessConditions;(0,j.xI)(P)||0===P.length||(P.length>1&&console.warn("Found more than one access condition on the bitstream. The custom-permissions feature can only deal with one"),this.accessConditionsFormService.fillAcce
1ssConditionFormGroup(J,F,P[0]))}saveBitstreamData(){this.formService.validateAllFormFields(this.formRef.formGroup);const F=this.formService.isValid(this.formId).pipe((0,N.q)(1),(0,C.h)(P=>P),(0,D.z)(()=>this.formService.getFormData(this.formId)),(0,N.q)(1),(0,D.z)(P=>{let H;Object.keys(P.metadata).filter(Q=>(0,j.UE)(P.metadata[Q])).forEach(Q=>{const se=`metadata/${Q.replace(/_/g,".")}`;this.operationsBuilder.add(this.pathCombiner.getPath(se),P.metadata[Q],!0)}),Object.keys(this.fileData.metadata).filter(Q=>(0,j.UE)(this.fileData.metadata[Q])).filter(Q=>(0,j.xI)(P.metadata[Q])).filter(Q=>this.formMetadata.includes(Q)).forEach(Q=>{const se=`metadata/${Q.replace(/_/g,".")}`;this.operationsBuilder.remove(this.pathCombiner.getPath(se))});const oe=this.formRef.formGroup;try{H=this.accessConditionsFormService.getValidatedAccessConditionObject(J,oe,this.availableAccessConditionOptions)}catch(Q){return Q instanceof le.G?this.accessConditionsFormService.showDateValidationError(Q):console.error("Unexpected error:",Q),this.isSaving=!1,q.E}return(0,j.Uh)(H)&&this.operationsBuilder.add(this.pathCombiner.getPath("accessConditions"),[H]),this.operationsService.jsonPatchByResourceID(this.submissionService.getSubmissionObjectLinkName(),this.submissionId,this.pathCombiner.rootElement,this.pathCombiner.subRootElement).pipe((0,z.K)(Q=>(console.error(Q),this.notificationService.error(this.translateService.get("submission.sections.upload.form.patch-error")),this.isSaving=!1,[])))})).subscribe(P=>{if((0,j.Uh)(P)&&(0,j.Uh)(P[0]?.sections[this.sectionId])){const H=P[0].sections[this.sectionId],oe=Object.keys(H.files).find(Q=>H.files[Q].uuid===this.fileId);(0,j.Uh)(oe)&&this.uploadService.updateFileData(this.submissionId,this.sectionId,this.fileId,H.files[oe])}this.activeModal.close(),this.isSaving=!1});this.subscriptions.push(F)}}return B.\u0275fac=function(F){return new(F||B)(m.\u0275\u0275directiveInject(T.Kz),m.\u0275\u0275directiveInject(m.ChangeDetectorRef),m.\u0275\u0275directiveInject(I.c),m.\u0275\u0275directiveInject(f.o),m.\u0275\u0275directiveInject(o.b),m.\u0275\u0275directiveInject(y.w),m.\u0275\u0275directiveInject(O.E),m.\u0275\u0275directiveInject(d.K),m.\u0275\u0275directiveInject(k._),m.\u0275\u0275directiveInject(R.T),m.\u0275\u0275directiveInject(S.sK))},B.\u0275cmp=m.\u0275\u0275defineComponent({type:B,selectors:[["ds-atmire-submission-section-upload-file-edit"]],features:[m.\u0275\u0275InheritDefinitionFeature],decls:10,vars:5,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"disabled","click"],["aria-hidden","true"],[1,"modal-body"],[3,"formId","formModel","displaySubmit","displayCancel","submitForm","cancel","dfChange",4,"ngIf"],[3,"formId","formModel","displaySubmit","displayCancel","submitForm","cancel","dfChange"],["formRef","formComponent"]],template:function(F,P){1&F&&(m.\u0275\u0275elementStart(0,"div")(1,"div",0)(2,"h4",1),m.\u0275\u0275text(3),m.\u0275\u0275pipe(4,"translate"),m.\u0275\u0275elementEnd(),m.\u0275\u0275elementStart(5,"button",2),m.\u0275\u0275listener("click",function(){return P.onModalClose()}),m.\u0275\u0275elementStart(6,"span",3),m.\u0275\u0275text(7,"\xd7"),m.\u0275\u0275elementEnd()()(),m.\u0275\u0275elementStart(8,"div",4),m.\u0275\u0275template(9,te,2,4,"ds-form",5),m.\u0275\u0275elementEnd()()),2&F&&(m.\u0275\u0275advance(3),m.\u0275\u0275textInterpolate(m.\u0275\u0275pipeBind1(4,3,"submission.sections.upload.edit.title")),m.\u0275\u0275advance(2),m.\u0275\u0275property("disabled",P.isSaving),m.\u0275\u0275advance(4),m.\u0275\u0275property("ngIf",P.formModel))},dependencies:[M.U,K.O5,S.X$]}),B})()},46623:(Se,Y,s)=>{"use strict";s.d(Y,{E:()=>B});var p=s(45608),I=s(4915),f=s(4786),o=s(1579),y=s(78187),O=s(11915),d=s(53113),R=s(86049),k=s(77176),G=s(77007),ae=s(69637),j=s(9249),N=s(67079),C=s(65384),D=s(38025),z=s(85186),le=s(27173),q=s(65244),m=s(98678),T=s(65706),S=s(96342),M=s(82485),K=s(35103),te=s(87586);function J($,F){if(1&$){const P=m.\u0275\u0275getCurrentView();m.\u0275\u0275elementStart(0,"ds-form",7,8),m.\u0275\u0275listener("submitForm",function(){m.\u0275\u0275restoreView(P);const oe=m.\u0275\u0275nextContext();
1return m.\u0275\u0275resetView(oe.onSubmit())})("cancel",function(){m.\u0275\u0275restoreView(P);const oe=m.\u0275\u0275nextContext();return m.\u0275\u0275resetView(oe.onModalClose())})("dfChange",function(oe){m.\u0275\u0275restoreView(P);const Q=m.\u0275\u0275nextContext();return m.\u0275\u0275resetView(Q.onChange(oe))}),m.\u0275\u0275elementEnd()}if(2&$){const P=m.\u0275\u0275nextContext();m.\u0275\u0275property("formId",P.formId)("formModel",P.formModel)("displaySubmit",!P.isSaving)("displayCancel",!P.isSaving)}}function ne($,F){if(1&$&&m.\u0275\u0275element(0,"ds-alert",9),2&$){const P=m.\u0275\u0275nextContext();m.\u0275\u0275property("content","error.validation.requestcopy.unsaved-singular-access-condition")("type",P.AlertType.Info)}}let B=(()=>{class $ extends z.V{constructor(P,H,oe,Q,ie,se,X,xe,De,ge,pe,Ce){super(P,H,oe,Q,ie,se,X,xe,De,ge,pe),this.requestACopyService=Ce,this.AlertType=q.N,this.showUnsavedACAlert=!1}ngOnInit(){super.ngOnInit(),this.showUnsavedACAlert=this.requestACopyService.hasUnsavedOrMismatchedSingularACs(this.requestAccessOption,this.fileData.requestCopyOption)}buildFileEditForm(){return(0,p.xI)(this.requestAccessOption)?(console.warn("No value for requestAccessOption"),super.buildFileEditForm()):this.buildRequestCopyEditForm()}buildRequestCopyEditForm(){const P=[];P.push(this.buildMetadataGroup());const H=this.fileData?.requestCopyOption;return(0,p.xI)(H)&&console.warn("Could not get the requestCopyOption from the file data. Disallowed sections will not be hidden"),this.requestACopyService.appendFormWithAccessConditionForm(P,this.requestAccessOption,H),this.initModelData(P),P}onChange(P){P.model.id.startsWith("name")&&this.clearDateModel(P)}clearDateModel(P){const H=P.model.id,oe=P.control,Q=H.split("_",2),ie=(0,D.Rv)(Q[1]);if((0,p.xI)(ie))return void console.error(`Could not retrieve category from form change event id: ${H},\n form will not clear the selected dates`);const se=this.requestAccessOption[(0,D.zw)(ie)];if((0,p.xb)(se))return void console.error(`Could not retrieve accessConditionOptions for category ${ie}`);const X=oe.value,xe=se.filter(pe=>pe.name===X);if(1!==xe.length)return console.error(`Expected to find exactly one access condition option with name ${X},\n but found ${xe.length}:`,xe),void(0===xe.length?console.error("Found no access condition options.This should never occur as a form without options should never be created in the first place"):console.error("Found multiple access condition optionsDoes the access condition configuration contain multiple access conditions with the same name?"));const De=oe.parent.get("startDate"),ge=oe.parent.get("endDate");De?.markAsUntouched(),ge?.markAsUntouched(),De?.setValue(null),ge?.setValue(null),oe.parent.markAsDirty()}initModelData(P){const H=this.fileData?.requestCopyOption;(0,p.xI)(H)?console.warn("Could not get the requestCopyOption from the file data. Form will not be prefilled"):this.requestACopyService.fillFormModel(P,H)}saveBitstreamData(){this.formService.validateAllFormFields(this.formRef.formGroup);const P=this.formService.isValid(this.formId).pipe((0,k.q)(1),(0,G.h)(H=>H),(0,ae.z)(()=>this.formService.getFormData(this.formId)),(0,k.q)(1),(0,ae.z)(H=>{let oe,Q,ie;Object.keys(H.metadata).filter(X=>(0,p.UE)(H.metadata[X])).forEach(X=>{const De=`metadata/${X.replace(/_/g,".")}`;this.operationsBuilder.add(this.pathCombiner.getPath(De),H.metadata[X],!0)}),Object.keys(this.fileData.metadata).filter(X=>(0,p.UE)(this.fileData.metadata[X])).filter(X=>(0,p.xI)(H.metadata[X])).filter(X=>this.formMetadata.includes(X)).forEach(X=>{const De=`metadata/${X.replace(/_/g,".")}`;this.operationsBuilder.remove(this.pathCombiner.getPath(De))});const se=this.formRef.formGroup;try{oe=this.requestACopyService.getValidatedAccessConditionObject(D.T3.Always,se,this.requestAccessOption),Q=this.requestACopyService.getValidatedAccessConditionObject(D.T3.Request,se,this.requestAccessOption),ie=this.requestACopyService.getValidatedAccessConditionObject(D.T3.Fallback,se,this.requestAccessOption)}catch(X){return X instanceof N.G?this.requestACopyService.showDateV
1alidationError(X):console.error("Unexpected error:",X),this.isSaving=!1,[]}return this.operationsBuilder.remove(this.pathCombiner.getPath("accessConditions")),(0,p.Uh)(oe)&&this.operationsBuilder.add(this.pathCombiner.getPath(this.requestACopyService.getPatchRequestPath(D.T3.Always)),oe),(0,p.Uh)(Q)&&this.operationsBuilder.add(this.pathCombiner.getPath(this.requestACopyService.getPatchRequestPath(D.T3.Request)),Q),(0,p.Uh)(ie)&&this.operationsBuilder.add(this.pathCombiner.getPath(this.requestACopyService.getPatchRequestPath(D.T3.Fallback)),ie),this.operationsService.jsonPatchByResourceID(this.submissionService.getSubmissionObjectLinkName(),this.submissionId,this.pathCombiner.rootElement,this.pathCombiner.subRootElement).pipe((0,j.K)(X=>(console.error(X),this.notificationService.error(this.translateService.get("submission.sections.upload.form.patch-error")),this.isSaving=!1,[])))})).subscribe(H=>{if((0,p.Uh)(H)&&(0,p.Uh)(H[0]?.sections[this.sectionId])){const oe=H[0].sections[this.sectionId],Q=Object.keys(oe.files).find(ie=>oe.files[ie].uuid===this.fileId);(0,p.Uh)(Q)&&this.uploadService.updateFileData(this.submissionId,this.sectionId,this.fileId,oe.files[Q])}this.activeModal.close(),this.isSaving=!1});this.subscriptions.push(P)}}return $.\u0275fac=function(P){return new(P||$)(m.\u0275\u0275directiveInject(T.Kz),m.\u0275\u0275directiveInject(m.ChangeDetectorRef),m.\u0275\u0275directiveInject(I.c),m.\u0275\u0275directiveInject(f.o),m.\u0275\u0275directiveInject(o.b),m.\u0275\u0275directiveInject(y.w),m.\u0275\u0275directiveInject(O.E),m.\u0275\u0275directiveInject(d.K),m.\u0275\u0275directiveInject(le._),m.\u0275\u0275directiveInject(C.T),m.\u0275\u0275directiveInject(S.sK),m.\u0275\u0275directiveInject(R.O))},$.\u0275cmp=m.\u0275\u0275defineComponent({type:$,selectors:[["ds-submission-section-upload-request-copy-file-edit"]],features:[m.\u0275\u0275InheritDefinitionFeature],decls:11,vars:6,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"disabled","click"],["aria-hidden","true"],[1,"modal-body"],[3,"formId","formModel","displaySubmit","displayCancel","submitForm","cancel","dfChange",4,"ngIf"],[3,"content","type",4,"ngIf"],[3,"formId","formModel","displaySubmit","displayCancel","submitForm","cancel","dfChange"],["formRef","formComponent"],[3,"content","type"]],template:function(P,H){1&P&&(m.\u0275\u0275elementStart(0,"div")(1,"div",0)(2,"h4",1),m.\u0275\u0275text(3),m.\u0275\u0275pipe(4,"translate"),m.\u0275\u0275elementEnd(),m.\u0275\u0275elementStart(5,"button",2),m.\u0275\u0275listener("click",function(){return H.onModalClose()}),m.\u0275\u0275elementStart(6,"span",3),m.\u0275\u0275text(7,"\xd7"),m.\u0275\u0275elementEnd()()(),m.\u0275\u0275elementStart(8,"div",4),m.\u0275\u0275template(9,J,2,4,"ds-form",5),m.\u0275\u0275template(10,ne,1,2,"ds-alert",6),m.\u0275\u0275elementEnd()()),2&P&&(m.\u0275\u0275advance(3),m.\u0275\u0275textInterpolate(m.\u0275\u0275pipeBind1(4,4,"submission.sections.upload.edit.title")),m.\u0275\u0275advance(2),m.\u0275\u0275property("disabled",H.isSaving),m.\u0275\u0275advance(4),m.\u0275\u0275property("ngIf",H.formModel),m.\u0275\u0275advance(1),m.\u0275\u0275property("ngIf",H.showUnsavedACAlert))},dependencies:[M.U,K.O5,te.w,S.X$]}),$})()},29611:(Se,Y,s)=>{"use strict";s.r(Y),s.d(Y,{SubmissionSectionUploadRequestCopyFileComponent:()=>F});var p=s(80434),I=s(46623),o=(s(71262),s(65244)),y=s(4786),O=s(18005),d=s(78187),R=s(11915),k=s(1579),G=s(53113),ae=s(73797),j=s(35841),N=s(49887),C=s(45608),D=s(98678),z=s(65706),le=s(35103),q=s(87586),m=s(18639),T=s(50122),S=s(80599),M=s(69721),K=s(96342);function te(P,H){if(1&P&&D.\u0275\u0275element(0,"ds-alert",19),2&P){const oe=H.ngIf,Q=D.\u0275\u0275nextContext(2);D.\u0275\u0275property("content",oe)("type",Q.AlertType.Error)}}function J(P,H){1&P&&D.\u0275\u0275element(0,"i",20)}function ne(P,H){1&P&&D.\u0275\u0275element(0,"i",21)}function B(P,H){if(1&P){const oe=D.\u0275\u0275getCurrentView();D.\u0275\u0275elementContainerStart(0),D.\u0275\u0275template(1,te,1,2,"ds-alert",2),D.\u0275\u0275pipe(2,"async"),D.\u0275\u0275elementStart(3,"div",3)(4,"div",4),D.\u0275\u0275element(5,"ds-themed-thumbnail",5),D.\u0275\u0275elementEnd(),D.\u0275\u0275elementStart(6,"div",6)(7,"div",7)(8,"h3"),D.\u0275\u0275text(9),D.\u0275\u0275elementStart(10,"span",8),D.\u
10275\u0275text(11),D.\u0275\u0275pipe(12,"dsFileSize"),D.\u0275\u0275elementEnd()()(),D.\u0275\u0275elementStart(13,"div",9),D.\u0275\u0275elementContainerStart(14),D.\u0275\u0275elementStart(15,"ds-themed-file-download-link",10),D.\u0275\u0275element(16,"i",11),D.\u0275\u0275elementEnd(),D.\u0275\u0275elementStart(17,"button",12),D.\u0275\u0275listener("click",function(ie){D.\u0275\u0275restoreView(oe);const se=D.\u0275\u0275nextContext();return ie.preventDefault(),D.\u0275\u0275resetView(se.editBitstreamData())}),D.\u0275\u0275pipe(18,"translate"),D.\u0275\u0275pipe(19,"translate"),D.\u0275\u0275element(20,"i",13),D.\u0275\u0275elementEnd(),D.\u0275\u0275elementStart(21,"button",14),D.\u0275\u0275listener("click",function(ie){D.\u0275\u0275restoreView(oe);const se=D.\u0275\u0275nextContext(),X=D.\u0275\u0275reference(2);return ie.preventDefault(),D.\u0275\u0275resetView(se.confirmDelete(X))}),D.\u0275\u0275pipe(22,"translate"),D.\u0275\u0275pipe(23,"translate"),D.\u0275\u0275pipe(24,"async"),D.\u0275\u0275template(25,J,1,0,"i",15),D.\u0275\u0275pipe(26,"async"),D.\u0275\u0275template(27,ne,1,0,"i",16),D.\u0275\u0275pipe(28,"async"),D.\u0275\u0275elementEnd(),D.\u0275\u0275elementContainerEnd(),D.\u0275\u0275elementEnd(),D.\u0275\u0275element(29,"div",17)(30,"ds-submission-section-upload-request-copy-file-view",18),D.\u0275\u0275elementEnd()(),D.\u0275\u0275elementContainerEnd()}if(2&P){const oe=D.\u0275\u0275nextContext();D.\u0275\u0275advance(1),D.\u0275\u0275property("ngIf",D.\u0275\u0275pipeBind1(2,16,oe.errorMessage$)),D.\u0275\u0275advance(4),D.\u0275\u0275property("thumbnail",null==oe.fileData?null:oe.fileData.thumbnail),D.\u0275\u0275advance(4),D.\u0275\u0275textInterpolate1("",oe.fileName," "),D.\u0275\u0275advance(2),D.\u0275\u0275textInterpolate1("(",D.\u0275\u0275pipeBind1(12,18,null==oe.fileData?null:oe.fileData.sizeBytes),")"),D.\u0275\u0275advance(4),D.\u0275\u0275property("cssClasses","btn btn-link-focus")("isBlank",!0)("bitstream",oe.getBitstream())("enableRequestACopy",!1),D.\u0275\u0275advance(2),D.\u0275\u0275propertyInterpolate("title",D.\u0275\u0275pipeBind1(19,22,"submission.sections.upload.edit.title")),D.\u0275\u0275attribute("aria-label",D.\u0275\u0275pipeBind1(18,20,"submission.sections.upload.edit.title")),D.\u0275\u0275advance(4),D.\u0275\u0275propertyInterpolate("title",D.\u0275\u0275pipeBind1(23,26,"submission.sections.upload.delete.confirm.title")),D.\u0275\u0275property("disabled",D.\u0275\u0275pipeBind1(24,28,oe.processingDelete$)),D.\u0275\u0275attribute("aria-label",D.\u0275\u0275pipeBind1(22,24,"submission.sections.upload.delete.confirm.title")),D.\u0275\u0275advance(4),D.\u0275\u0275property("ngIf",D.\u0275\u0275pipeBind1(26,30,oe.processingDelete$)),D.\u0275\u0275advance(2),D.\u0275\u0275property("ngIf",!D.\u0275\u0275pipeBind1(28,32,oe.processingDelete$)),D.\u0275\u0275advance(3),D.\u0275\u0275property("fileData",oe.fileData)}}function $(P,H){if(1&P){const oe=D.\u0275\u0275getCurrentView();D.\u0275\u0275elementStart(0,"div",22)(1,"h4",23),D.\u0275\u0275text(2),D.\u0275\u0275pipe(3,"translate"),D.\u0275\u0275elementEnd(),D.\u0275\u0275elementStart(4,"button",24),D.\u0275\u0275listener("click",function(){const se=D.\u0275\u0275restoreView(oe).dismiss;return D.\u0275\u0275resetView(se("cancel"))}),D.\u0275\u0275elementStart(5,"span",25),D.\u0275\u0275text(6,"\xd7"),D.\u0275\u0275elementEnd()()(),D.\u0275\u0275elementStart(7,"div",26)(8,"p"),D.\u0275\u0275text(9),D.\u0275\u0275pipe(10,"translate"),D.\u0275\u0275elementEnd()(),D.\u0275\u0275elementStart(11,"div",27)(12,"button",28),D.\u0275\u0275listener("click",function(){const se=D.\u0275\u0275restoreView(oe).close;return D.\u0275\u0275resetView(se("cancel"))}),D.\u0275\u0275text(13),D.\u0275\u0275pipe(14,"translate"),D.\u0275\u0275elementEnd(),D.\u0275\u0275elementStart(15,"button",29),D.\u0275\u0275listener("click",function(){const se=D.\u0275\u0275restoreView(oe).close;return D.\u0275\u0275resetView(se("ok"))}),D.\u0275\u0275text(16),D.\u0275\u0275pipe(17,"translate"),D.\u0275\u0275elementEnd()()}
12&P&&(D.\u0275\u0275advance(2),D.\u0275\u0275textInterpolate(D.\u0275\u0275pipeBind1(3,4,"submission.sections.upload.delete.confirm.title")),D.\u0275\u0275advance(7),D.\u0275\u0275textInterpolate(D.\u0275\u0275pipeBind1(10,6,"submission.sections.upload.delete.confirm.info")),D.\u0275\u0275advance(4),D.\u0275\u0275textInterpolate(D.\u0275\u0275pipeBind1(14,8,"submission.sections.upload.delete.confirm.cancel")),D.\u0275\u0275advance(3),D.\u0275\u0275textInterpolate(D.\u0275\u0275pipeBind1(17,10,"submission.sections.upload.delete.confirm.submit")))}let F=(()=>{class P extends p.SubmissionSectionUploadFileComponent{constructor(oe,Q,ie,se,X,xe,De,ge,pe){super(oe,Q,ie,se,X,xe,De,ge),this.sectionsService=pe,this.AlertType=o.N,this.errorMessage$=new j.X(void 0)}ngOnInit(){super.ngOnInit(),this.subscriptions.push(this.sectionsService.getSectionErrors(this.submissionId,this.sectionId).pipe((0,N.x)()).subscribe(oe=>{(0,C.Uh)(oe)&&this.setErrorMessage(oe)}))}setErrorMessage(oe){const Q=this.fileData.uuid;for(const ie of oe){const se=ie.path.split("/");if(Q===se[se.length-1])return void this.errorMessage$.next(ie.message)}this.errorMessage$.next(void 0)}editBitstreamData(){const Q=this.modalService.open(I.E,{size:"xl",backdrop:"static"});Q.componentInstance.availableAccessConditionOptions=this.availableAccessConditionOptions,Q.componentInstance.collectionId=this.collectionId,Q.componentInstance.collectionPolicyType=this.collectionPolicyType,Q.componentInstance.configMetadataForm=this.configMetadataForm,Q.componentInstance.fileData=this.fileData,Q.componentInstance.fileId=this.fileId,Q.componentInstance.fileIndex=this.fileIndex,Q.componentInstance.formId=this.formId,Q.componentInstance.sectionId=this.sectionId,Q.componentInstance.formMetadata=this.formMetadata,Q.componentInstance.pathCombiner=this.pathCombiner,Q.componentInstance.submissionId=this.submissionId,Q.componentInstance.requestAccessOption=this.requestAccessOption}}return P.\u0275fac=function(oe){return new(oe||P)(D.\u0275\u0275directiveInject(D.ChangeDetectorRef),D.\u0275\u0275directiveInject(y.o),D.\u0275\u0275directiveInject(O.q),D.\u0275\u0275directiveInject(z.FF),D.\u0275\u0275directiveInject(d.w),D.\u0275\u0275directiveInject(R.E),D.\u0275\u0275directiveInject(k.b),D.\u0275\u0275directiveInject(G.K),D.\u0275\u0275directiveInject(ae.J))},P.\u0275cmp=D.\u0275\u0275defineComponent({type:P,selectors:[["ds-submission-section-upload-request-copy-file"]],inputs:{requestAccessOption:"requestAccessOption"},features:[D.\u0275\u0275InheritDefinitionFeature],decls:3,vars:1,consts:[[4,"ngIf"],["content",""],[3,"content","type",4,"ngIf"],[1,"row"],[1,"col-md-2"],[3,"thumbnail"],[1,"col-md-10"],[1,"float-left","w-75"],[1,"text-muted"],[1,"float-right","w-15"],[3,"cssClasses","isBlank","bitstream","enableRequestACopy"],["aria-hidden","true",1,"fa","fa-download","fa-2x","text-normal"],[1,"btn","btn-link-focus",3,"title","click"],[1,"fa","fa-edit","fa-2x","text-normal"],[1,"btn","btn-link-focus",3,"title","disabled","click"],["class","fas fa-circle-notch fa-spin fa-2x text-danger",4,"ngIf"],["class","fa fa-trash fa-2x text-danger",4,"ngIf"],[1,"clearfix"],[3,"fileData"],[3,"content","type"],[1,"fas","fa-circle-notch","fa-spin","fa-2x","text-danger"],[1,"fa","fa-trash","fa-2x","text-danger"],[1,"modal-header"],[1,"modal-title","text-danger"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["type","button",1,"btn","btn-secondary",3,"click"],["type","button",1,"btn","btn-danger",3,"click"]],template:function(oe,Q){1&oe&&(D.\u0275\u0275template(0,B,31,34,"ng-container",0),D.\u0275\u0275template(1,$,18,12,"ng-template",null,1,D.\u0275\u0275templateRefExtractor)),2&oe&&D.\u0275\u0275property("ngIf",Q.fileData)},dependencies:[le.O5,q.w,m.z,T.t,S.o,le.Ov,M.p,K.X$]}),P})()},80599:(Se,Y,s)=>{"use strict";s.d(Y,{o:()=>q});var p=s(64744),I=s(38025),f=s(98678),o=s(35103),y=s(58068),O=s(21322),d=s(96342);function R(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275elementStart(1,"h5"),f.\u0275\u0275text(2),f.\u0275\u0275elementEnd(),f.\u0275\u0275elementContainerEnd()),2&m){const S=f.\u0275\u0275nextContext().$implicit;f.\u0275\u0275advance(2),f.\u0275\u0275textInterpolate1(" ",S.value," ")}}function k(m,T){if(1&m&&(f.\u0275\u0275elementStart(0,"h5")(1,"span",4),f.\u0275\u0275text(2),f.\u0275\u0275pipe(3,"translate"),f.\u0275\u0275elementEnd()()),2&m){const S=f.\u0275\u0275nextContext(4);f.\u0275\u0275advance(2),f.\u0275\u0275textInterpolate2("",f.\u0275\u0275pipeBind1(3,2,"submission.sections.upload.no-entry")," ",S.fileTitleKey,"")}}function G(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275template(1,k,4,4,"h5",0),f.\u0275\u0275elementContainerEnd()),2&m){const S=f.\u0275\u0275nextContext().$implicit,M=f.\u0275\u0275nextContext(2);f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",0===M.metadata[M.fileTitleKey].indexOf(S))}}function ae(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275template(1,R,3,1,"ng-container",0),f.\u0275\u0275template(2,G,2,1,"ng-container",0),f.\u0275\u0275element(3,"span",1),f.\u0275\u0275elementContainerEnd()),2&m){const S=T.$implicit;f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",""!==S.value),f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",""===S.value)}}const j=function(){return["150"]};function N(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275text(1),f.\u0275\u0275pipe(2,"dsTruncate"),f.\u0275\u0275elementContainerEnd()),2&m){const S=f.\u0275\u0275nextContext().$implicit;f.\u0275\u0275advance(1),f.\u0275\u0275textInterpolate1(" ",f.\u0275\u0275pipeBind2(2,1,S.value,f.\u0275\u0275pureFunction0(4,j))," ")}}function C(m,T){if(1&m&&(f.\u0275\u0275elementStart(0,"span",4),f.\u0275\u0275text(1),f.\u0275\u0275pipe(2,"translate"),f.\u0275\u0275elementEnd()),2&m){const S=f.\u0275\u0275nextContext(4);f.\u0275\u0275advance(1),f.\u0275\u0275textInterpolate2("",f.\u0275\u0275pipeBind1(2,2,"submission.sections.upload.no-entry")," ",S.fileDescrKey,"")}}function D(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275template(1,C,3,4,"span",5),f.\u0275\u0275elementContainerEnd()),2&m){const S=f.\u0275\u0275nextContext().$implicit,M=f.\u0275\u0275nextContext(2);f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",0===M.metadata[M.fileDescrKey].indexOf(S))}}function z(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275template(1,N,3,5,"ng-container",0),f.\u0275\u0275template(2,D,2,1,"ng-container",0),f.\u0275\u0275element(3,"span",1),f.\u0275\u0275elementContainerEnd()),2&m){const S=T.$implicit;f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",""!==S.value),f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",""===S.value)}}function le(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275template(1,ae,4,2,"ng-container",3),f.\u0275\u0275template(2,z,4,2,"ng-container",3),f.\u0275\u0275elementContainerEnd()),2&m){const S=f.\u0275\u0275nextContext();f.\u0275\u0275advance(1),f.\u0275\u0275property("ngForOf",S.getAllMetadataValue(S.fileTitleKey)),f.\u0275\u0275advance(1),f.\u0275\u0275property("ngForOf",S.getAllMetadataValue(S.fileDescrKey))}}let q=(()=>{class m extends p.m{constructor(){super(...arguments),this.RequestAccessCategory=I.T3}}return m.\u0275fac=function(){let T;
1return function(M){return(T||(T=f.\u0275\u0275getInheritedFactory(m)))(M||m)}}(),m.\u0275cmp=f.\u0275\u0275defineComponent({type:m,selectors:[["ds-submission-section-upload-request-copy-file-view"]],features:[f.\u0275\u0275InheritDefinitionFeature],decls:6,vars:7,consts:[[4,"ngIf"],[1,"clearfix"],[3,"accessConditionCategory","requestCopyOption"],[4,"ngFor","ngForOf"],[1,"text-muted"],["class","text-muted",4,"ngIf"]],template:function(S,M){1&S&&(f.\u0275\u0275elementStart(0,"div"),f.\u0275\u0275template(1,le,3,2,"ng-container",0),f.\u0275\u0275element(2,"span",1)(3,"ds-submission-section-upload-request-copy-access-condition-badge",2)(4,"ds-submission-section-upload-request-copy-access-condition-badge",2)(5,"ds-submission-section-upload-request-copy-access-condition-badge",2),f.\u0275\u0275elementEnd()),2&S&&(f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",M.metadata),f.\u0275\u0275advance(2),f.\u0275\u0275property("accessConditionCategory",M.RequestAccessCategory.Always)("requestCopyOption",M.fileData.requestCopyOption),f.\u0275\u0275advance(1),f.\u0275\u0275property("accessConditionCategory",M.RequestAccessCategory.Request)("requestCopyOption",M.fileData.requestCopyOption),f.\u0275\u0275advance(1),f.\u0275\u0275property("accessConditionCategory",M.RequestAccessCategory.Fallback)("requestCopyOption",M.fileData.requestCopyOption))},dependencies:[o.sg,o.O5,y.J,O.W,d.X$],encapsulation:2}),m})()},63551:(Se,Y,s)=>{"use strict";s.d(Y,{w:()=>ap});var p={};s.r(p),s.d(p,{getItem:()=>ny,removeItem:()=>oy,setItem:()=>iy});var I=s(70655),f=s(98678),o=s(76297),y=s(96289),O=s(50123),d=s(44423);function R(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var k=0;function G(i){return"__private_"+k+++"_"+i}function ae(i,e,t){const n=[];return i.forEach(r=>"string"!=typeof r?n.push(r):e[Symbol.split](r).forEach((a,l,c)=>{""!==a&&n.push(a),l<c.length-1&&n.push(t)})),n}function j(i,e){const t=/\$/g;let r=[i];if(null==e)return r;for(const a of Object.keys(e))if("_"!==a){let l=e[a];"string"==typeof l&&(l=t[Symbol.replace](l,"$$$$")),r=ae(r,new RegExp(`%\\{${a}\\}`,"g"),l)}return r}const N=i=>{throw new Error(`missing string: ${i}`)};var C=G("onMissingKey"),D=G("apply");class z{constructor(e,t){let{onMissingKey:n=N}=void 0===t?{}:t;Object.defineProperty(this,D,{value:le}),Object.defineProperty(this,C,{writable:!0,value:void 0}),this.locale={strings:{},pluralize:r=>1===r?0:1},Array.isArray(e)?e.forEach(R(this,D)[D],this):R(this,D)[D](e),R(this,C)[C]=n}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){let n=this.locale.strings[e];if(null==n&&(R(this,C)[C](e),n=e),"object"==typeof n){if(t&&typeof t.smart_count<"u")return j(n[this.locale.pluralize(t.smart_count)],t);throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if("string"!=typeof n)throw new Error("string was not a string");return j(n,t)}}function le(i){if(null==i||!i.strings)return;const e=this.locale;Object.assign(this.locale,{strings:{...e.strings,...i.strings},pluralize:i.pluralize||e.pluralize})}var q=s(8767);let S=(i=21)=>{let e="",t=i;for(;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e};var M=s(68430);function K(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var te=0;function J(i){return"__private_"+te+++"_"+i}var B=J("callbacks"),$=J("publish");class F{constructor(){Object.defineProperty(this,$,{value:P}),this.state={},Object.defineProperty(this,B,{writable:!0,value:new Set})}getState(){return this.state}setState(e){const t={...this.state},n={...this.state,...e};this.state=n,K(this,$)[$](t,n,e)}subscribe(e){return K(this,B)[B].add(e),()=>{K(this,B)[B].delete(e)}}}function P(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];K(this,B)[B].forEach(n=>{n(...e)})}F.VERSION="3.2.2";const H=F;function oe(i){const e=i.lastIndexOf(".");return-1===e||e===i.length-1?{name:i,extension:void 0}:{name:i.slice(0,e),extension:i.slice(e+1)}}const Q={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function ie(i){var e;if(i.type)return i.type;const t=i.name?null==(e=oe(i.name).extension)?void 0:e.toLowerCase():null;return t&&t in Q?Q[t]:"application/octet-stream"}function X(i){let e="";return i.replace(/[^A-Z0-9]/gi,t=>
1(e+=`-${function se(i){return i.charCodeAt(0).toString(32)}(t)}`,"/"))+e}function ge(i,e){if(function De(i){return!(!i.isRemote||!i.remote)&&new Set(["box","dropbox","drive","facebook","unsplash"]).has(i.remote.provider)}(i))return i.id;const t=ie(i);return function xe(i,e){let t=e||"uppy";return"string"==typeof i.name&&(t+=`-${X(i.name.toLowerCase())}`),void 0!==i.type&&(t+=`-${i.type}`),i.meta&&"string"==typeof i.meta.relativePath&&(t+=`-${X(i.meta.relativePath.toLowerCase())}`),void 0!==i.data.size&&(t+=`-${i.data.size}`),void 0!==i.data.lastModified&&(t+=`-${i.data.lastModified}`),t}({...i,type:t},e)}function pe(i){if(null==i&&typeof navigator<"u"&&(i=navigator.userAgent),!i)return!0;const e=/Edge\/(\d+\.\d+)/.exec(i);if(!e)return!0;const n=e[1].split(".",2),r=parseInt(n[0],10),a=parseInt(n[1],10);return r<15||15===r&&a<15063||r>18||18===r&&a>=18218}function Me(i){return i<10?`0${i}`:i.toString()}function Pe(){const i=new Date;return`${Me(i.getHours())}:${Me(i.getMinutes())}:${Me(i.getSeconds())}`}const Ze={debug:()=>{},warn:()=>{},error:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.error(`[Uppy] [${Pe()}]`,...e)}},Ee={debug:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.debug(`[Uppy] [${Pe()}]`,...e)},warn:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.warn(`[Uppy] [${Pe()}]`,...e)},error:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.error(`[Uppy] [${Pe()}]`,...e)}};var Ne=s(27777),ht=s(46271);const Rt={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class Et extends Error{constructor(e,t){var n;
1super(e),this.isRestriction=!0,this.isUserFacing=null==(n=t?.isUserFacing)||n,null!=t&&t.file&&(this.file=t.file)}}class Qo{constructor(e,t){this.getI18n=t,this.getOpts=()=>{var n;const r=e();if(null!=(null==(n=r.restrictions)?void 0:n.allowedFileTypes)&&!Array.isArray(r.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return r}}validateAggregateRestrictions(e,t){const{maxTotalFileSize:n,maxNumberOfFiles:r}=this.getOpts().restrictions;if(r&&e.filter(l=>!l.isGhost).length+t.length>r)throw new Et(`${this.getI18n()("youCanOnlyUploadX",{smart_count:r})}`);if(n){const a=[...e,...t].reduce((l,c)=>{var b;return l+(null!=(b=c.size)?b:0)},0);if(a>n)throw new Et(this.getI18n()("aggregateExceedsSize",{sizeAllowed:Ne(n),size:Ne(a)}))}}validateSingleFile(e){const{maxFileSize:t,minFileSize:n,allowedFileTypes:r}=this.getOpts().restrictions;if(r&&!r.some(l=>l.includes("/")?!!e.type&&ht(e.type.replace(/;.*?$/,""),l):!("."!==l[0]||!e.extension)&&e.extension.toLowerCase()===l.slice(1).toLowerCase())){const l=r.join(", ");throw new Et(this.getI18n()("youCanOnlyUploadFileTypes",{types:l}),{file:e})}if(t&&null!=e.size&&e.size>t)throw new Et(this.getI18n()("exceedsSize",{size:Ne(t),file:e.name}),{file:e});if(n&&null!=e.size&&e.size<n)throw new Et(this.getI18n()("inferiorSize",{size:Ne(n)}),{file:e})}validate(e,t){t.forEach(n=>{this.validateSingleFile(n)}),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length<t)throw new Et(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new Et(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:n}=this.getOpts().restrictions,r=[];for(const a of n)(!Object.hasOwn(e.meta,a)||""===e.meta[a])&&r.push(a);return{missingFields:r,error:t}}}const vs={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed"}};let Je,Hn;function Ie(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var _s=0;function ot(i){return"__private_"+_s+++"_"+i}const ki={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null};var gt=ot("plugins"),Pt=ot("restricter"),Ji=ot("storeUnsubscribe"),qt=ot("emitter"),fi=ot("preProcessors"),yi=ot("uploaders"),jt=ot("postProcessors"),Ae=ot("informAndEmit"),qi=ot("checkRequiredMetaFieldsOnFile"),Gn=ot("checkRequiredMetaFields"),en=ot("assertNewUploadAllowed"),Zn=ot("transformFile"),tn=ot("startIfAutoProceed"),gi=ot("checkAndUpdateFileState"),Dt=ot("addListeners"),dt=ot("updateOnlineStatus"),Zt=ot("requestClientById"),Ot=ot("createUpload"),nn=ot("getUpload"),bi=ot("removeUpload"),Le=ot("runUpload");Je=Symbol.for("uppy test: getPlugins"),Hn=Symbol.for("uppy test: createUpload");class Pn{constructor(e){Object.defineProperty(this,Le,{value:Bs}),Object.defineProperty(this,bi,{value:Os}),Object.defineProperty(this,nn,{value:Jo}),Object.defineProperty(this,Ot,{value:Yo}),Object.defineProperty(this,Dt,{value:Ps}),Object.defineProperty(this,gi,{value:Ds}),Object.defineProperty(this,tn,{value:Xo}),Object.defineProperty(this,Zn,{value:Es}
1),Object.defineProperty(this,en,{value:Is}),Object.defineProperty(this,Gn,{value:ws}),Object.defineProperty(this,qi,{value:Cs}),Object.defineProperty(this,Ae,{value:Ss}),Object.defineProperty(this,gt,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,Pt,{writable:!0,value:void 0}),Object.defineProperty(this,Ji,{writable:!0,value:void 0}),Object.defineProperty(this,qt,{writable:!0,value:q()}),Object.defineProperty(this,fi,{writable:!0,value:new Set}),Object.defineProperty(this,yi,{writable:!0,value:new Set}),Object.defineProperty(this,jt,{writable:!0,value:new Set}),this.scheduledAutoProceed=null,this.wasOffline=!1,this.calculateProgress=M((r,a)=>{const l=this.getFile(r?.id);if(null==r||!l)return void this.log(`Not setting progress for a file that has been removed: ${r?.id}`);if(100===l.progress.percentage)return void this.log(`Not setting progress for a file that has been already uploaded: ${r.id}`);const c=Number.isFinite(a.bytesTotal)&&a.bytesTotal>0;this.setFileState(r.id,{progress:{...l.progress,bytesUploaded:a.bytesUploaded,bytesTotal:a.bytesTotal,percentage:c?Math.round(a.bytesUploaded/a.bytesTotal*100):0}}),this.calculateTotalProgress()},500,{leading:!0,trailing:!0}),Object.defineProperty(this,dt,{writable:!0,value:this.updateOnlineStatus.bind(this)}),Object.defineProperty(this,Zt,{writable:!0,value:new Map}),this.defaultLocale=vs;const t={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:Rt,meta:{},onBeforeFileAdded:(r,a)=>!Object.hasOwn(a,r.id),onBeforeUpload:r=>r,store:new H,logger:Ze,infoTimeout:5e3},n={...t,...e};this.opts={...n,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=Ee),this.log(`Using Core v${Pn.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...ki,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:pe(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),Ie(this,Pt)[Pt]=new Qo(()=>this.opts,()=>this.i18n),Ie(this,Ji)[Ji]=this.store.subscribe((r,a,l)=>{this.emit("state-update",r,a,l),this.updateAll(a)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),Ie(this,Dt)[Dt]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Ie(this,qt)[qt].emit(e,...n)}on(e,t){return Ie(this,qt)[qt].on(e,t),this}once(e,t){return Ie(this,qt)[qt].once(e,t),this}off(e,t){return Ie(this,qt)[qt].off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){const t=this.getState().files;this.setState({files:{...t,...Object.fromEntries(Object.entries(e).map(n=>{let[r,a]=n;return[r,{...t[r],...a}]}))}})}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can\u2019t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){const t=new z([this.defaultLocale,this.opts.locale],{onMissingKey:n=>this.log(`Missing i18n string: ${n}`,"error")});this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e?.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(t=>{t.setOptions(e)}),this.setState(void 0)}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach(r=>{n[r]={...t[r],progress:{...t[r].progress,...e}}}),this.setState({files:n,...ki}),this.emit("reset-progress")}clearUploadedFiles(){const{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState({...ki,files:{}})}addPreProcessor(e){Ie(this,fi)[fi].add(e)}removePreProcessor(e){return Ie(this,fi)[fi].delete(e)}addPostProcessor(e){Ie(this,jt)[jt].add(e)}removePostProcessor(e){return Ie(this,jt)[jt].delete(e)}addUploader(e){Ie(this,yi)[yi].add(e)}removeUploader(e){return Ie(this,yi)[yi].delete(e)}
1setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach(r=>{n[r]={...n[r],meta:{...n[r].meta,...e}}}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map(t=>this.getFile(t))}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),a=[],l=[],c=[],b=[],h=[],x=[],v=[],U=[],W=[];for(const re of r){const{progress:me}=re;!me.uploadComplete&&me.uploadStarted&&(a.push(re),re.isPaused||U.push(re)),me.uploadStarted||l.push(re),(me.uploadStarted||me.preprocess||me.postprocess)&&c.push(re),me.uploadStarted&&b.push(re),re.isPaused&&h.push(re),me.uploadComplete&&x.push(re),re.error&&v.push(re),(me.preprocess||me.postprocess)&&W.push(re)}return{newFiles:l,startedFiles:c,uploadStartedFiles:b,pausedFiles:h,completeFiles:x,erroredFiles:v,inProgressFiles:a,inProgressNotPausedFiles:U,processingFiles:W,isUploadStarted:b.length>0,isAllComplete:100===t&&x.length===r.length&&0===W.length,isAllErrored:!!n&&v.length===r.length,isAllPaused:0!==a.length&&h.length===a.length,isUploadInProgress:a.length>0,isSomeGhost:r.some(re=>re.isGhost)}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{Ie(this,Pt)[Pt].validate(t,[e])}catch(n){return n}return null}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){Ie(this,en)[en](e);const{nextFilesState:t,validFilesToAdd:n,errors:r}=Ie(this,gi)[gi]([e]),a=r.filter(c=>c.isRestriction);if(Ie(this,Ae)[Ae](a),r.length>0)throw r[0];this.setState({files:t});const[l]=n;return this.emit("file-added",l),this.emit("files-added",n),this.log(`Added file: ${l.name}, ${l.id}, mime type: ${l.type}`),Ie(this,tn)[tn](),l.id}addFiles(e){Ie(this,en)[en]();const{nextFilesState:t,validFilesToAdd:n,errors:r}=Ie(this,gi)[gi](e),a=r.filter(c=>c.isRestriction);Ie(this,Ae)[Ae](a);const l=r.filter(c=>!c.isRestriction);if(l.length>0){let c="Multiple errors occurred while adding files:\n";if(l.forEach(b=>{c+=`\n * ${b.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:l.length}),details:c},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(l,c);{const b=new Error(c);throw b.errors=l,b}}this.setState({files:t}
1),n.forEach(c=>{this.emit("file-added",c)}),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.values(n).forEach(c=>{this.log(`Added file: ${c.name}\n id: ${c.id}\n type: ${c.type}`)}),n.length>0&&Ie(this,tn)[tn]()}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),a={...n},l={...r},c=Object.create(null);function b(v){return void 0===c[v]}e.forEach(v=>{n[v]&&(c[v]=n[v],delete a[v])}),Object.keys(l).forEach(v=>{const U=r[v].fileIDs.filter(b);if(0===U.length)return void delete l[v];const{capabilities:W}=this.getState();if(U.length!==r[v].fileIDs.length&&!W.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");l[v]={...r[v],fileIDs:U}});const h={currentUploads:l,files:a};0===Object.keys(a).length&&(h.allowNewUpload=!0,h.error=null,h.recoveredState=null),this.setState(h),this.calculateTotalProgress();const x=Object.keys(c);x.forEach(v=>{this.emit("file-removed",c[v],t)}),this.log(x.length>5?`Removed ${x.length} files`:`Removed files: ${x.join(", ")}`)}removeFile(e,t){this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).progress.uploadComplete)return;const n=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:n}),this.emit("upload-pause",e,n),n}pauseAll(){const e={...this.getState().files};Object.keys(e).filter(n=>!e[n].progress.uploadComplete&&e[n].progress.uploadStarted).forEach(n=>{const r={...e[n],isPaused:!0};e[n]=r}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter(n=>!e[n].progress.uploadComplete&&e[n].progress.uploadStarted).forEach(n=>{const r={...e[n],isPaused:!1,error:null};e[n]=r}),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter(r=>e[r].error);if(t.forEach(r=>{const a={...e[r],isPaused:!1,error:null};e[r]=a}),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=Ie(this,Ot)[Ot](t,{forceAllowNewUpload:!0});return Ie(this,Le)[Le](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:n}=this.getState(),r=Object.keys(n);r.length&&this.removeFiles(r,"cancel-all"),this.setState(ki)}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=Ie(this,Ot)[Ot]([e],{forceAllowNewUpload:!0});return Ie(this,Le)[Le](t)}logout(){this.iteratePlugins(e=>{var t;null==(t=e.provider)||null==t.logout||t.logout()})}calculateTotalProgress(){const t=this.getFiles().filter(h=>h.progress.uploadStarted||h.progress.preprocess||h.progress.postprocess);if(0===t.length)return this.emit("progress",0),void this.setState({totalProgress:0});const n=t.filter(h=>null!=h.progress.bytesTotal),r=t.filter(h=>null==h.progress.bytesTotal);if(0===n.length){const h=100*t.length,x=r.reduce((U,W)=>U+W.progress.percentage,0),v=Math.round(x/h*100);return void this.setState({totalProgress:v})}let a=n.reduce((h,x)=>{var v;return h+(null!=(v=x.progress.bytesTotal)?v:0)},0);const l=a/n.length;a+=l*r.length;let c=0;n.forEach(h=>{c+=h.progress.bytesUploaded}),r.forEach(h=>{c+=l*(h.progress.percentage||0)/100});let b=0===a?0:Math.round(c/a*100);b>100&&(b=100),this.setState({totalProgress:b}),this.emit("progress",b)}updateOnlineStatus(){var e;
1null==(e=window.navigator.onLine)||e?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e)throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`);const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const a=this.getPlugin(r);if(a)throw new Error(`Already found a plugin named '${a.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`);return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in Ie(this,gt)[gt]?Ie(this,gt)[gt][n.type].push(n):Ie(this,gt)[gt][n.type]=[n],n.install(),this.emit("plugin-added",n),this}getPlugin(e){for(const t of Object.values(Ie(this,gt)[gt])){const n=t.find(r=>r.id===e);if(null!=n)return n}}[Je](e){return Ie(this,gt)[gt][e]}iteratePlugins(e){Object.values(Ie(this,gt)[gt]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=Ie(this,gt)[gt][e.type],n=t.findIndex(l=>l.id===e.id);-1!==n&&t.splice(n,1);const a={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(a)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),Ie(this,Ji)[Ji](),this.iteratePlugins(n=>{this.removePlugin(n)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",Ie(this,dt)[dt]),window.removeEventListener("offline",Ie(this,dt)[dt]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}registerRequestClient(e,t){Ie(this,Zt)[Zt].set(e,t)}
1getRequestClientForFile(e){if(!e.remote)throw new Error(`Tried to get RequestClient for a non-remote file ${e.id}`);const t=Ie(this,Zt)[Zt].get(e.remote.requestClientId);if(null==t)throw new Error(`requestClientId "${e.remote.requestClientId}" not registered for file "${e.id}"`);return t}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?Ie(this,Le)[Le](e):(Ie(this,bi)[bi](e),Promise.reject(new Error("Nonexistent upload")))}[Hn](){return Ie(this,Ot)[Ot](...arguments)}addResultData(e,t){if(!Ie(this,nn)[nn](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;null!=(e=Ie(this,gt)[gt].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const n=this.opts.onBeforeUpload(t);return!1===n?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&"object"==typeof n&&(t=n,this.setState({files:t})),Promise.resolve().then(()=>Ie(this,Pt)[Pt].validateMinNumberOfFiles(t)).catch(r=>{throw Ie(this,Ae)[Ae]([r]),r}).then(()=>{if(!Ie(this,Gn)[Gn](t))throw new Et(this.i18n("missingRequiredMetaField"))}).catch(r=>{throw r}).then(()=>{const{currentUploads:r}=this.getState(),a=Object.values(r).flatMap(b=>b.fileIDs),l=[];Object.keys(t).forEach(b=>{const h=this.getFile(b);!h.progress.uploadStarted&&-1===a.indexOf(b)&&l.push(h.id)});const c=Ie(this,Ot)[Ot](l);return Ie(this,Le)[Le](c)}).catch(r=>{throw this.emit("error",r),this.log(r,"error"),r}))}}function Ss(i){for(const a of i)a.isRestriction?this.emit("restriction-failed",a.file,a):this.emit("error",a,a.file),this.log(a,"warning");const e=i.filter(a=>a.isUserFacing),n=e.slice(0,4),r=e.slice(4);n.forEach(a=>{let{message:l,details:c=""}=a;this.info({message:l,details:c},"error",this.opts.infoTimeout)}),r.length>0&&this.info({message:this.i18n("additionalRestrictionsFailed",{count:r.length})})}function Cs(i){const{missingFields:e,error:t}=Ie(this,Pt)[Pt].getMissingRequiredMetaFields(i);return!(e.length>0&&(this.setFileState(i.id,{missingRequiredMetaFields:e}),this.log(t.message),this.emit("restriction-failed",i,t),1))}function ws(i){let e=!0;for(const t of Object.values(i))Ie(this,qi)[qi](t)||(e=!1);return e}function Is(i){const{allowNewUpload:e}=this.getState();if(!1===e){const t=new Et(this.i18n("noMoreFilesAllowed"),{file:i});throw Ie(this,Ae)[Ae]([t]),t}}function Es(i){const e=i instanceof File?{name:i.name,type:i.type,size:i.size,data:i}:i,t=ie(e),n=function Ce(i,e){return e.name?e.name:"image"===i.split("/")[0]?`${i.split("/")[0]}.${i.split("/")[1]}`:"noname"}(t,e),r=oe(n).extension,a=ge(e,this.getID()),l=e.meta||{};l.name=n,l.type=t;const c=Number.isFinite(e.data.size)?e.data.size:null;return{source:e.source||"",id:a,name:n,extension:r||"",meta:{...this.getState().meta,...l},type:t,data:e.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isGhost:!1,isRemote:e.isRemote||!1,remote:e.remote||"",preview:e.preview}}function Xo(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(i=>{i.isRestriction||this.log(i.stack||i.message||i)})},4))}function Ds(i){const{files:e}=this.getState(),t={...e},n=[],r=[];for(const l of i)try{var a;let c=Ie(this,Zn)[Zn](l);const b=null==(a=e[c.id])?void 0:a.isGhost;b&&(c={...e[c.id],isGhost:!1,data:l.data},this.log(`Replaced the blob in the restored ghost file: ${c.name}, ${c.id}`));const h=this.opts.onBeforeFileAdded(c,t);if(!h&&this.checkIfFileAlreadyExists(c.id))throw new Et(this.i18n("noDuplicates",{fileName:c.name}),{file:l});if(!1===h&&!b)throw new Et("Cannot add the file because onBeforeFileAdded returned false.",{isUserFacing:!1,file:l});"object"==typeof h&&null!==h&&(c=h),Ie(this,Pt)[Pt].validateSingleFile(c),t[c.id]=c,n.push(c)}catch(c){r.push(c)}try{Ie(this,Pt)[Pt].validateAggregateRestrictions(Object.values(e),n)}catch(l){return r.push(l),{nextFilesState:e,validFilesToAdd:[],errors:r}}return{nextFilesState:t,validFilesToAdd:n,errors:r}}function Ps(){const i=(n,r,a)=>{let l=n.message||"Unknown error";n.details&&(l+=` ${n.details}`),this.setState({error:l}
1),null!=r&&r.id in this.getState().files&&this.setFileState(r.id,{error:l,response:a})};this.on("error",i),this.on("upload-error",(n,r,a)=>{if(i(r,n,a),"object"==typeof r&&r.message){var l;this.log(r.message,"error");const c=new Error(this.i18n("failedToUpload",{file:null!=(l=n?.name)?l:""}));c.isUserFacing=!0,c.details=r.message,r.details&&(c.details+=` ${r.details}`),Ie(this,Ae)[Ae]([c])}else Ie(this,Ae)[Ae]([r])});let e=null;this.on("upload-stalled",(n,r)=>{const{message:a}=n,l=r.map(c=>c.meta.name).join(", ");e||(this.info({message:a,details:l},"warning",this.opts.infoTimeout),e=setTimeout(()=>{e=null},this.opts.infoTimeout)),this.log(`${a} ${l}`.trim(),"warning")}),this.on("upload",()=>{this.setState({error:null})});const t=n=>{const r=n.filter(l=>{const c=null!=l&&this.getFile(l.id);return c||this.log(`Not setting progress for a file that has been removed: ${l?.id}`),c}),a=Object.fromEntries(r.map(l=>[l.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:l.size}}]));this.patchFilesState(a)};this.on("upload-start",n=>{n.forEach(r=>{this.emit("upload-started",r)}),t(n)}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(n,r)=>{if(null==n||!this.getFile(n.id))return void this.log(`Not setting progress for a file that has been removed: ${n?.id}`);const a=this.getFile(n.id).progress;this.setFileState(n.id,{progress:{...a,postprocess:Ie(this,jt)[jt].size>0?{mode:"indeterminate"}:void 0,uploadComplete:!0,percentage:100,bytesUploaded:a.bytesTotal},response:r,uploadURL:r.uploadURL,isPaused:!1}),null==n.size&&this.setFileState(n.id,{size:r.bytesUploaded||a.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(n,r)=>{null!=n&&this.getFile(n.id)?this.setFileState(n.id,{progress:{...this.getFile(n.id).progress,preprocess:r}}):this.log(`Not setting progress for a file that has been removed: ${n?.id}`)}),this.on("preprocess-complete",n=>{if(null==n||!this.getFile(n.id))return void this.log(`Not setting progress for a file that has been removed: ${n?.id}`);const r={...this.getState().files};r[n.id]={...r[n.id],progress:{...r[n.id].progress}},delete r[n.id].progress.preprocess,this.setState({files:r})}),this.on("postprocess-progress",(n,r)=>{null!=n&&this.getFile(n.id)?this.setFileState(n.id,{progress:{...this.getState().files[n.id].progress,postprocess:r}}):this.log(`Not setting progress for a file that has been removed: ${n?.id}`)}),this.on("postprocess-complete",n=>{if(null==n||!this.getFile(n.id))return void this.log(`Not setting progress for a file that has been removed: ${n?.id}`);const r={...this.getState().files};r[n.id]={...r[n.id],progress:{...r[n.id].progress}},delete r[n.id].progress.postprocess,this.setState({files:r})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",n=>{n&&Ie(this,qi)[qi](n)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",Ie(this,dt)[dt]),window.addEventListener("offline",Ie(this,dt)[dt]),setTimeout(Ie(this,dt)[dt],3e3))}function Yo(i,e){void 0===e&&(e={});const{forceAllowNewUpload:t=!1}=e,{allowNewUpload:n,currentUploads:r}=this.getState();if(!n&&!t)throw new Error("Cannot create a new upload: already uploading.");const a=S();return this.emit("upload",{id:a,fileIDs:i}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...r,[a]:{fileIDs:i,step:0,result:{}}}}),a}function Jo(i){const{currentUploads:e}=this.getState();return e[i]}function Os(i){const e={...this.getState().currentUploads};delete e[i],this.setState({currentUploads:e})}function Bs(i){return di.apply(this,arguments)}function di(){return(di=(0,d.Z)(function*(i){const e=()=>{const{currentUploads:a}=this.getState();return a[i]};let t=e();const n=[...Ie(this,fi)[fi],...Ie(this,yi)[yi],...Ie(this,jt)[jt]];try{for(let a=t.step||0;a<n.length&&t;a++){const l=n[a];this.setState({currentUploads:{...this.getState().currentUploads,[i]:{...t,step:a}}});const{fileIDs:c}=t;yield l(c,i),t=e()}}catch(a){throw Ie(this,bi)[bi](i),a}if(t){t.fileIDs.forEach(b=>{const h=this.getFile(b);
1h&&h.progress.postprocess&&this.emit("postprocess-complete",h)});const a=t.fileIDs.map(b=>this.getFile(b)),l=a.filter(b=>!b.error),c=a.filter(b=>b.error);this.addResultData(i,{successful:l,failed:c,uploadID:i}),t=e()}let r;return t&&(r=t.result,this.emit("complete",r),Ie(this,bi)[bi](i)),null==r&&this.log(`Not setting result for an upload that has been removed: ${i}`),r})).apply(this,arguments)}Pn.VERSION="3.13.0";const Ts=Pn;class qo{constructor(e,t){this.uppy=e,this.opts=t??{}}getPluginState(){const{plugins:e}=this.uppy.getState();return e?.[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(void 0),this.i18nInit()}i18nInit(){const e=new z([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState(void 0)}addTarget(e){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}update(e){}afterUpdate(){}}const Li="function"==typeof Buffer,er="function"==typeof TextDecoder?new TextDecoder:void 0,tr="function"==typeof TextEncoder?new TextEncoder:void 0,ji=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Bn=(i=>{let e={};return i.forEach((t,n)=>e[t]=n),e})(ji),Ms=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,bt=String.fromCharCode.bind(String),ir="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):i=>new Uint8Array(Array.prototype.slice.call(i,0)),nr=i=>i.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),or=i=>i.replace(/[^A-Za-z0-9\+\/]/g,""),Qn=i=>{let e,t,n,r,a="";const l=i.length%3;for(let c=0;c<i.length;){if((t=i.charCodeAt(c++))>255||(n=i.charCodeAt(c++))>255||(r=i.charCodeAt(c++))>255)throw new TypeError("invalid character found");e=t<<16|n<<8|r,a+=ji[e>>18&63]+ji[e>>12&63]+ji[e>>6&63]+ji[63&e]}return l?a.slice(0,l-3)+"===".substring(l):a},ei="function"==typeof btoa?i=>btoa(i):Li?i=>Buffer.from(i,"binary").toString("base64"):Qn,Tn=Li?i=>Buffer.from(i).toString("base64"):i=>{let t=[];for(let n=0,r=i.length;n<r;n+=4096)t.push(bt.apply(null,i.subarray(n,n+4096)));return ei(t.join(""))},on=(i,e=!1)=>e?nr(Tn(i)):Tn(i),As=i=>{if(i.length<2)return(e=i.charCodeAt(0))<128?i:e<2048?bt(192|e>>>6)+bt(128|63&e):bt(224|e>>>12&15)+bt(128|e>>>6&63)+bt(128|63&e);var e=65536+1024*(i.charCodeAt(0)-55296)+(i.charCodeAt(1)-56320);return bt(240|e>>>18&7)+bt(128|e>>>12&63)+bt(128|e>>>6&63)+bt(128|63&e)},rr=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,vi=i=>i.replace(rr,As),sr=Li?i=>Buffer.from(i,"utf8").toString("base64"):tr?i=>Tn(tr.encode(i)):i=>ei(vi(i)),zi=(i,e=!1)=>e?nr(sr(i)):sr(i),ar=i=>zi(i,!0),Rs=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ks=i=>{switch(i.length){case 4:var t=((7&i.charCodeAt(0))<<18|(63&i.charCodeAt(1))<<12|(63&i.charCodeAt(2))<<6|63&i.charCodeAt(3))-65536;return bt(55296+(t>>>10))+bt(56320+(1023&t));case 3:return bt((15&i.charCodeAt(0))<<12|(63&i.charCodeAt(1))<<6|63&i.charCodeAt(2));default:return bt((31&i.charCodeAt(0))<<6|63&i.charCodeAt(1))}},lr=i=>i.replace(Rs,ks),pr=i=>{if(i=i.replace(/\s+/g,""),!Ms.test(i))throw new TypeError("malformed base64.");i+="==".slice(2-(3&i.length));let e,n,r,t="";for(let a=0;a<i.length;)e=Bn[i.charAt(a++)]<<18|Bn[i.charAt(a++)]<<12|(n=Bn[i.charAt(a++)])<<6|(r=Bn[i.charAt(a++)]),t+=64===n?bt(e>>16&255):64===r?bt(e>>16&255,e>>8&255):bt(e>>16&255,e>>8&255,255&e);return t},Xn="function"==typeof atob?i=>atob(or(i)):Li?i=>Buffer.from(i,"base64").toString("binary"):pr,dr=Li?i=>ir(Buffer.from(i,"base64")):i=>ir(Xn(i).split("").map(e=>e.charCodeAt(0))),cr=i=>dr(ur(i)),Ls=Li?i=>Buffer.from(i,"base64").toString("utf8"):er?i=>er.decode(dr(i)):i=>lr(Xn(i)),ur=i=>or(i.replace(/[-_]/g,e=>"-"==e?"+":"/")),Yn=i=>Ls(ur(i)),hr=i=>({value:i,enumerable:!1,writable:!0,configurable:!0}),mr=function(){const i=(e,t)=>Object.defineProperty(String.prototype,e,hr(t));i("fromBase64",function(){return Yn(this)}),i("toBase64",function(e){return zi(this,e)}),i("toBase64URI",function(){return zi(this,!0)}),i("toBase64URL",function(){return zi(this,!0)}),i("toUint8Array",function(){return cr(this)})},fr=function(){const i=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,hr(t));i("toBase64",function(e){return on(this,e)}),i("toBase64URI",function(){return on(this,!0)}),i("toBase64URL",function(){return on(this,!0)})},zs={version:"3.7.7",VERSION:"3.7.7",atob:Xn,atobPolyfill:pr,btoa:ei,btoaPolyfill:Qn,fromBase64:Yn,toBase64:zi,encode:zi,encodeURI:ar,encodeURL:ar,utob:vi,btou:lr,decode:Yn,isValid:i=>{if("string"!=typeof i)return!1;const e=i.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:on,toUint8Array:cr,extendString:mr,extendUint8Array:fr,extendBuiltins:()=>{mr(),fr()}};var Ns=s(47799),Ws=s.n(Ns);function ci(i){return(ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function yr(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,$s(n.key),n)}}function $s(i){var e=function Vs(i,e){if("object"!==ci(i)||null===i)return i;var t=i[Symbol.toPrimitive];if(void 0!==t){var n=t.call(i,e||"default");if("object"!==ci(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(i)}(i,"string");return"symbol"===ci(e)?e:String(e)}function Fn(i){var e="function"==typeof Map?new Map:void 0;return Fn=function(n){if(null===n||!function Jn(i){try{return-1!==Function.toString.call(i).indexOf("[native code]")}catch{return"function"==typeof i}}(n))return n;if("function"!=typeof n)throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,r)}function r(){return rn(n,arguments,an(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),sn(r,n)},Fn(i)}function rn(i,e,t){return(rn=gr()?Reflect.construct.bind():function(r,a,l){var c=[null];c.push.apply(c,a);var h=new(Function.bind.apply(r,c));return l&&sn(h,l.prototype),h}).apply(null,arguments)}function gr(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}
1function sn(i,e){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(i,e)}function an(i){return(an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(i)}const Un=function(i){!function pp(i,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),e&&sn(i,e)}(t,i);var e=function Gs(i){var e=gr();return function(){var r,n=an(i);if(e){var a=an(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function Zs(i,e){if(e&&("object"===ci(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function Qs(i){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(i)}(this,r)}}(t);function t(n){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(function Hs(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(r=e.call(this,n)).originalRequest=l,r.originalResponse=c,r.causingError=a,null!=a&&(n+=", caused by ".concat(a.toString())),null!=l){var b=l.getHeader("X-Request-ID")||"n/a",h=l.getMethod(),x=l.getURL(),v=c?c.getStatus():"n/a",U=c?c.getBody()||"":"n/a";n+=", originated from request (method: ".concat(h,", url: ").concat(x,", response code: ").concat(v,", response text: ").concat(U,", request id: ").concat(b,")")}return r.message=n,r}return function Ks(i,e,t){return e&&yr(i.prototype,e),t&&yr(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}(t)}(Fn(Error));var br=!1;function ui(i){br&&console.log(i)}function qn(){qn=function(){return e};var i,e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(Z,A,V){Z[A]=V.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",b=a.toStringTag||"@@toStringTag";function h(Z,A,V){return Object.defineProperty(Z,A,{value:V,enumerable:!0,configurable:!0,writable:!0}),Z[A]}try{h({},"")}catch{h=function(V,ce,_e){return V[ce]=_e}}function x(Z,A,V,ce){var fe=Object.create((A&&A.prototype instanceof ve?A:ve).prototype),Ue=new ft(ce||[]);return r(fe,"_invoke",{value:it(Z,V,Ue)}),fe}function v(Z,A,V){try{return{type:"normal",arg:Z.call(A,V)}}catch(ce){return{type:"throw",arg:ce}}}e.wrap=x;var U="suspendedStart",W="suspendedYield",re="executing",me="completed",ue={};function ve(){}function he(){}function we(){}var Te={};h(Te,l,function(){return this});var We=Object.getPrototypeOf,He=We&&We(We(wt([])));He&&He!==t&&n.call(He,l)&&(Te=He);var je=we.prototype=ve.prototype=Object.create(Te);function ke(Z){["next","throw","return"].forEach(function(A){h(Z,A,function(V){return this._invoke(A,V)})})}function Fe(Z,A){function V(_e,fe,Ue,$e){var Ye=v(Z[_e],Z,fe);if("throw"!==Ye.type){var It=Ye.arg,_t=It.value;return _t&&"object"==Bt(_t)&&n.call(_t,"__await")?A.resolve(_t.__await).then(function(yt){V("next",yt,Ue,$e)},function(yt){V("throw",yt,Ue,$e)}):A.resolve(_t).then(function(yt){It.value=yt,Ue(It)},function(yt){return V("throw",yt,Ue,$e)})}$e(Ye.arg)}var ce;r(this,"_invoke",{value:function(fe,Ue){function $e(){return new A(function(Ye,It){V(fe,Ue,Ye,It)})}return ce=ce?ce.then($e,$e):$e()}})}function it(Z,A,V){var ce=U;return function(_e,fe){if(ce===re)throw new Error("Generator is already running");if(ce===me){if("throw"===_e)throw fe;return{value:i,done:!0}}for(V.method=_e,V.arg=fe;;){var Ue=V.delegate;if(Ue){var $e=St(Ue,V);if($e){if($e===ue)continue;return $e}}if("next"===V.method)V.sent=V._sent=V.arg;else if("throw"===V.method){if(ce===U)throw ce=me,V.arg;V.dispatchException(V.arg)}else"return"===V.method&&V.abrupt("return",V.arg);ce=re;var Ye=v(Z,A,V);if("normal"===Ye.type){if(ce=V.done?me:W,Ye.arg===ue)continue;return{value:Ye.arg,done:V.done}}"throw"===Ye.type&&(ce=me,V.method="throw",V.arg=Ye.arg)}}}function St(Z,A){var V=A.method,ce=Z.iterator[V];if(ce===i)return A.delegate=null,"throw"===V&&Z.iterator.return&&
vendor: 4,502 bytes, line 1
1(A.method="return",A.arg=i,St(Z,A),"throw"===A.method)||"return"!==V&&(A.method="throw",A.arg=new TypeError("The iterator does not provide a '"+V+"' method")),ue;var _e=v(ce,Z.iterator,A.arg);if("throw"===_e.type)return A.method="throw",A.arg=_e.arg,A.delegate=null,ue;var fe=_e.arg;return fe?fe.done?(A[Z.resultName]=fe.value,A.next=Z.nextLoc,"return"!==A.method&&(A.method="next",A.arg=i),A.delegate=null,ue):fe:(A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,ue)}function ut(Z){var A={tryLoc:Z[0]};1 in Z&&(A.catchLoc=Z[1]),2 in Z&&(A.finallyLoc=Z[2],A.afterLoc=Z[3]),this.tryEntries.push(A)}function Ct(Z){var A=Z.completion||{};A.type="normal",delete A.arg,Z.completion=A}function ft(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(ut,this),this.reset(!0)}function wt(Z){if(Z||""===Z){var A=Z[l];if(A)return A.call(Z);if("function"==typeof Z.next)return Z;if(!isNaN(Z.length)){var V=-1,ce=function _e(){for(;++V<Z.length;)if(n.call(Z,V))return _e.value=Z[V],_e.done=!1,_e;return _e.value=i,_e.done=!0,_e};return ce.next=ce}}throw new TypeError(Bt(Z)+" is not iterable")}return he.prototype=we,r(je,"constructor",{value:we,configurable:!0}),r(we,"constructor",{value:he,configurable:!0}),he.displayName=h(we,b,"GeneratorFunction"),e.isGeneratorFunction=function(Z){var A="function"==typeof Z&&Z.constructor;return!!A&&(A===he||"GeneratorFunction"===(A.displayName||A.name))},e.mark=function(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,we):(Z.__proto__=we,h(Z,b,"GeneratorFunction")),Z.prototype=Object.create(je),Z},e.awrap=function(Z){return{__await:Z}},ke(Fe.prototype),h(Fe.prototype,c,function(){return this}),e.AsyncIterator=Fe,e.async=function(Z,A,V,ce,_e){void 0===_e&&(_e=Promise);var fe=new Fe(x(Z,A,V,ce),_e);return e.isGeneratorFunction(A)?fe:fe.next().then(function(Ue){return Ue.done?Ue.value:fe.next()})},ke(je),h(je,b,"Generator"),h(je,l,function(){return this}),h(je,"toString",function(){return"[object Generator]"}),e.keys=function(Z){var A=Object(Z),V=[];for(var ce in A)V.push(ce);return V.reverse(),function _e(){for(;V.length;){var fe=V.pop();if(fe in A)return _e.value=fe,_e.done=!1,_e}return _e.done=!0,_e}},e.values=wt,ft.prototype={constructor:ft,reset:function(A){if(this.prev=0,this.next=0,this.sent=this._sent=i,this.done=!1,this.delegate=null,this.method="next",this.arg=i,this.tryEntries.forEach(Ct),!A)for(var V in this)"t"===V.charAt(0)&&n.call(this,V)&&!isNaN(+V.slice(1))&&(this[V]=i)},stop:function(){this.done=!0;var A=this.tryEntries[0].completion;if("throw"===A.type)throw A.arg;return this.rval},dispatchException:function(A){if(this.done)throw A;var V=this;function ce(It,_t){return Ue.type="throw",Ue.arg=A,V.next=It,_t&&(V.method="next",V.arg=i),!!_t}for(var _e=this.tryEntries.length-1;_e>=0;--_e){var fe=this.tryEntries[_e],Ue=fe.completion;if("root"===fe.tryLoc)return ce("end");if(fe.tryLoc<=this.prev){var $e=n.call(fe,"catchLoc"),Ye=n.call(fe,"finallyLoc");if($e&&Ye){if(this.prev<fe.catchLoc)return ce(fe.catchLoc,!0);if(this.prev<fe.finallyLoc)return ce(fe.finallyLoc)}else if($e){if(this.prev<fe.catchLoc)return ce(fe.catchLoc,!0)}else{if(!Ye)throw new Error("try statement without catch or finally");if(this.prev<fe.finallyLoc)return ce(fe.finallyLoc)}}}},abrupt:function(A,V){for(var ce=this.tryEntries.length-1;ce>=0;--ce){var _e=this.tryEntries[ce];if(_e.tryLoc<=this.prev&&n.call(_e,"finallyLoc")&&this.prev<_e.finallyLoc){var fe=_e;break}}fe&&("break"===A||"continue"===A)&&fe.tryLoc<=V&&V<=fe.finallyLoc&&(fe=null);var Ue=fe?fe.completion:{};return Ue.type=A,Ue.arg=V,fe?(this.method="next",this.next=fe.finallyLoc,ue):this.complete(Ue)},complete:function(A,V){if("throw"===A.type)throw A.arg;return"break"===A.type||"continue"===A.type?this.next=A.arg:"return"===A.type?(this.rval=this.arg=A.arg,this.method="return",this.next="end"):"normal"===A.type&&V&&(this.next=V),ue},finish:function(A){for(var V=this.tryEntries.length-1;V>=0;--V){var ce=this.tryEntries[V];if(ce.finallyLoc===A)return this.complete(ce.completion,ce.afterLoc),Ct(ce),ue}},catch:function(A){for(var V=this.tryEntries.length-1;V>=0;--V){var ce=this.tryEntries[V];if(ce.tryLoc===A){var _e=ce.completion;if("throw"===_e.type){var fe=_e.arg;Ct(ce)}return fe}}throw new Error("illegal catch attempt")},delegateYield:function(A,V,ce){return this.delegate={iterator:wt(A),resultName:V,nextLoc:ce},"next"===this.method&&(this.arg=i),ue}},e}function vr(i,e,t,n,r,a,l){try{var c=i[a](l),b=c.value}catch(h){return void t(h)}
1c.done?e(b):Promise.resolve(b).then(n,r)}function _r(i,e){return function ea(i){if(Array.isArray(i))return i}(i)||function Cr(i,e){var t=null==i?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(null!=t){var n,r,a,l,c=[],b=!0,h=!1;try{if(a=(t=t.call(i)).next,0===e){if(Object(t)!==t)return;b=!1}else for(;!(b=(n=a.call(t)).done)&&(c.push(n.value),c.length!==e);b=!0);}catch(x){h=!0,r=x}finally{try{if(!b&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(h)throw r}}return c}}(i,e)||function xr(i,e){if(i){if("string"==typeof i)return Sr(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if("Object"===t&&i.constructor&&(t=i.constructor.name),"Map"===t||"Set"===t)return Array.from(i);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Sr(i,e)}}(i,e)||function qs(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sr(i,e){(null==e||e>i.length)&&(e=i.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=i[t];return n}function Bt(i){return(Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function Ni(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function zt(i){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?Ni(Object(t),!0).forEach(function(n){ta(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):Ni(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}function ta(i,e,t){return(e=Ir(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function Mn(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,Ir(n.key),n)}}function Ir(i){var e=function Er(i,e){if("object"!==Bt(i)||null===i)return i;var t=i[Symbol.toPrimitive];if(void 0!==t){var n=t.call(i,e||"default");if("object"!==Bt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(i)}(i,"string");return"symbol"===Bt(e)?e:String(e)}var na={endpoint:null,uploadUrl:null,metadata:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:Fr,chunkSize:1/0,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null},Dr=function(){function i(e,t){(function ia(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")})(this,i),"resume"in t&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=t,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=e,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return function wr(i,e,t){e&&Mn(i.prototype,e),t&&Mn(i,t),Object.defineProperty(i,"prototype",{writable:!1})}(i,[{key:"findPreviousUploads",value:function(){var t=this;return this.options.fingerprint(this.file,this.options).then(function(n){return t._urlStorage.findUploadsByFingerprint(n)})}},{key:"resumeFromPreviousUpload",value:function(t){this.url=t.uploadUrl||null,this._parallelUploadUrls=t.parallelUploadUrls||null,this._urlStorageKey=t.urlStorageKey}},{key:"start",value:function(){var t=this,n=this.file;if(n)if(this.options.endpoint||this.options.uploadUrl||this.url){var r=this.options.retryDelays;if(null==r||"[object Array]"===Object.prototype.toString.call(r)){if(this.options.parallelUploads>1)for(var a=0,l=["uploadUrl","uploadSize","uploadLengthDeferred"];a<l.length;a++){var c=l[a];if(this.options[c])return void this._emitError(new Error("tus: cannot use the ".concat(c," option when parallelUploads is enabled")))}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1)return void this._emitError(new Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length)return void this._emitError(new Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"))}this.options.fingerprint(n,this.options).then(function(b){return ui(null==b?"No fingerprint was calculated meaning that the upload cannot be stored in the URL storage.":"Calculated fingerprint: ".concat(b)),t._fingerprint=b,t._source?t._source:t.options.fileReader.openFile(n,t.options.chunkSize)}).then(function(b){if(t._source=b,t.options.uploadLengthDeferred)t._size=null;else if(null!=t.options.uploadSize){if(t._size=Number(t.options.uploadSize),Number.isNaN(t._size))return void t._emitError(new Error("tus: cannot convert `uploadSize` option into a number"))}else if(t._size=t._source.size,null==t._size)return void t._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));t.options.parallelUploads>1||null!=t._parallelUploadUrls?t._startParallelUpload():t._startSingleUpload()}).catch(function(b){t._emitError(b)})}else this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"))}else this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));else this._emitError(new Error("tus: no file or stream to upload provided"))}},{key:"_startParallelUpload",value:function(){var t,n=this,r=this._size,a=0;this._parallelUploads=[];var c=null!==(t=this.options.parallelUploadBoundaries)&&void 0!==t?t:function ra(i,e){for(var t=Math.floor(i/e),n=[],r=0;r<e;r++)n.push({start:t*r,end:t*(r+1)});return n[e-1].end=i,n}(this._source.size,null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads);
1this._parallelUploadUrls&&c.forEach(function(x,v){x.uploadUrl=n._parallelUploadUrls[v]||null}),this._parallelUploadUrls=new Array(c.length);var h,b=c.map(function(x,v){var U=0;return n._source.slice(x.start,x.end).then(function(W){var re=W.value;return new Promise(function(me,ue){var ve=zt(zt({},n.options),{},{uploadUrl:x.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:{},headers:zt(zt({},n.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:me,onError:ue,onProgress:function(Te){a=a-U+Te,U=Te,n._emitProgress(a,r)},onUploadUrlAvailable:function(){n._parallelUploadUrls[v]=he.url,n._parallelUploadUrls.filter(function(Te){return Boolean(Te)}).length===c.length&&n._saveUploadInUrlStorage()}}),he=new i(re,ve);he.start(),n._parallelUploads.push(he)})})});Promise.all(b).then(function(){(h=n._openRequest("POST",n.options.endpoint)).setHeader("Upload-Concat","final;".concat(n._parallelUploadUrls.join(" ")));var x=Pr(n.options.metadata);return""!==x&&h.setHeader("Upload-Metadata",x),n._sendRequest(h,null)}).then(function(x){if(Wi(x.getStatus(),200)){var v=x.getHeader("Location");null!=v?(n.url=Ur(n.options.endpoint,v),ui("Created upload at ".concat(n.url)),n._emitSuccess()):n._emitHttpError(h,x,"tus: invalid or missing Location header")}else n._emitHttpError(h,x,"tus: unexpected response while creating upload")}).catch(function(x){n._emitError(x)})}},{key:"_startSingleUpload",value:function(){return this._aborted=!1,null!=this.url?(ui("Resuming upload from previous URL: ".concat(this.url)),void this._resumeUpload()):null!=this.options.uploadUrl?(ui("Resuming upload from provided URL: ".concat(this.options.uploadUrl)),this.url=this.options.uploadUrl,void this._resumeUpload()):(ui("Creating a new upload"),void this._createUpload())}},{key:"abort",value:function(t){var n=this;return null!=this._parallelUploads&&this._parallelUploads.forEach(function(r){r.abort(t)}),null!==this._req&&this._req.abort(),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),t&&null!=this.url?i.terminate(this.url,this.options).then(function(){return n._removeFromUrlStorage()}):Promise.resolve()}},{key:"_emitHttpError",value:function(t,n,r,a){this._emitError(new Un(r,a,t,n))}},{key:"_emitError",value:function(t){var n=this;if(!this._aborted){if(null!=this.options.retryDelays&&(null!=this._offset&&this._offset>this._offsetBeforeRetry&&(this._retryAttempt=0),Tr(t,this._retryAttempt,this.options))){var a=this.options.retryDelays[this._retryAttempt++];return this._offsetBeforeRetry=this._offset,void(this._retryTimeout=setTimeout(function(){n.start()},a))}if("function"!=typeof this.options.onError)throw t;this.options.onError(t)}}},{key:"_emitSuccess",value:function(){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),"function"==typeof this.options.onSuccess&&this.options.onSuccess()}},{key:"_emitProgress",value:function(t,n){"function"==typeof this.options.onProgress&&this.options.onProgress(t,n)}},{key:"_emitChunkComplete",value:function(t,n,r){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(t,n,r)}},{key:"_createUpload",value:function(){var t=this;if(this.options.endpoint){var n=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?n.setHeader("Upload-Defer-Length",1):n.setHeader("Upload-Length",this._size);var a,r=Pr(this.options.metadata);""!==r&&n.setHeader("Upload-Metadata",r),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,a=this._addChunkToRequest(n)):a=this._sendRequest(n,null),a.then(function(l){if(Wi(l.getStatus(),200)){var c=l.getHeader("Location");if(null!=c)return t.url=Ur(t.options.endpoint,c),ui("Created upload at ".concat(t.url)),"function"==typeof t.options.onUploadUrlAvailable&&t.options.onUploadUrlAvailable(),0===t._size?(t._emitSuccess(),void t._source.close()):void t._saveUploadInUrlStorage().then(function(){t.options.uploadDataDuringCreation?t._handleUploadResponse(n,l):(t._offset=0,t._performUpload())});
1t._emitHttpError(n,l,"tus: invalid or missing Location header")}else t._emitHttpError(n,l,"tus: unexpected response while creating upload")}).catch(function(l){t._emitHttpError(n,null,"tus: failed to create upload",l)})}else this._emitError(new Error("tus: unable to create upload because no endpoint is provided"))}},{key:"_resumeUpload",value:function(){var t=this,n=this._openRequest("HEAD",this.url);this._sendRequest(n,null).then(function(a){var l=a.getStatus();if(!Wi(l,200))return 423===l?void t._emitHttpError(n,a,"tus: upload is currently locked; retry later"):(Wi(l,400)&&t._removeFromUrlStorage(),t.options.endpoint?(t.url=null,void t._createUpload()):void t._emitHttpError(n,a,"tus: unable to resume upload (new upload cannot be created without an endpoint)"));var c=parseInt(a.getHeader("Upload-Offset"),10);if(Number.isNaN(c))t._emitHttpError(n,a,"tus: invalid or missing offset value");else{var b=parseInt(a.getHeader("Upload-Length"),10);!Number.isNaN(b)||t.options.uploadLengthDeferred?("function"==typeof t.options.onUploadUrlAvailable&&t.options.onUploadUrlAvailable(),t._saveUploadInUrlStorage().then(function(){if(c===b)return t._emitProgress(b,b),void t._emitSuccess();t._offset=c,t._performUpload()})):t._emitHttpError(n,a,"tus: invalid or missing length value")}}).catch(function(a){t._emitHttpError(n,null,"tus: failed to resume upload",a)})}},{key:"_performUpload",value:function(){var n,t=this;this._aborted||(this.options.overridePatchMethod?(n=this._openRequest("POST",this.url)).setHeader("X-HTTP-Method-Override","PATCH"):n=this._openRequest("PATCH",this.url),n.setHeader("Upload-Offset",this._offset),this._addChunkToRequest(n).then(function(a){Wi(a.getStatus(),200)?t._handleUploadResponse(n,a):t._emitHttpError(n,a,"tus: unexpected response while uploading chunk")}).catch(function(a){t._aborted||t._emitHttpError(n,null,"tus: failed to upload chunk at offset ".concat(t._offset),a)}))}},{key:"_addChunkToRequest",value:function(t){var n=this,r=this._offset,a=this._offset+this.options.chunkSize;return t.setProgressHandler(function(l){n._emitProgress(r+l,n._size)}),t.setHeader("Content-Type","application/offset+octet-stream"),(a===1/0||a>this._size)&&!this.options.uploadLengthDeferred&&(a=this._size),this._source.slice(r,a).then(function(l){var c=l.value,b=l.done,h=c&&c.size?c.size:0;n.options.uploadLengthDeferred&&b&&(n._size=n._offset+h,t.setHeader("Upload-Length",n._size));var x=n._offset+h;return!n.options.uploadLengthDeferred&&b&&x!==n._size?Promise.reject(new Error("upload was configured with a size of ".concat(n._size," bytes, but the source is done after ").concat(x," bytes"))):null===c?n._sendRequest(t):(n._emitProgress(n._offset,n._size),n._sendRequest(t,c))})}},{key:"_handleUploadResponse",value:function(t,n){var r=parseInt(n.getHeader("Upload-Offset"),10);if(!Number.isNaN(r))return this._emitProgress(r,this._size),this._emitChunkComplete(r-this._offset,r,this._size),this._offset=r,r===this._size?(this._emitSuccess(),void this._source.close()):void this._performUpload();this._emitHttpError(t,n,"tus: invalid or missing offset value")}},{key:"_openRequest",value:function(t,n){var r=Or(t,n,this.options);return this._req=r,r}},{key:"_removeFromUrlStorage",value:function(){var t=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(n){t._emitError(n)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var t=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||null!==this._urlStorageKey)return Promise.resolve();var n={size:this._size,metadata:this.options.metadata,creationTime:(new Date).toString()};return this._parallelUploads?n.parallelUploadUrls=this._parallelUploadUrls:n.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,n).then(function(r){t._urlStorageKey=r})}},{key:"_sendRequest",value:function(t){return Br(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,this.options)}}],[{key:"terminate",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Or("DELETE",t,n);
1return Br(r,null,n).then(function(a){if(204!==a.getStatus())throw new Un("tus: unexpected response while terminating upload",null,r,a)}).catch(function(a){if(a instanceof Un||(a=new Un("tus: failed to terminate upload",a,r,null)),!Tr(a,0,n))throw a;var l=n.retryDelays[0],c=n.retryDelays.slice(1),b=zt(zt({},n),{},{retryDelays:c});return new Promise(function(h){return setTimeout(h,l)}).then(function(){return i.terminate(t,b)})})}}]),i}();function Pr(i){return Object.entries(i).map(function(e){var t=_r(e,2),r=t[1];return"".concat(t[0]," ").concat(zs.encode(String(r)))}).join(",")}function Wi(i,e){return i>=e&&i<e+100}function Or(i,e,t){var n=t.httpStack.createRequest(i,e);if(n.setHeader("Tus-Resumable","1.0.0"),Object.entries(t.headers||{}).forEach(function(l){var c=_r(l,2);n.setHeader(c[0],c[1])}),t.addRequestId){var a=function Ys(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var e=16*Math.random()|0;return("x"===i?e:3&e|8).toString(16)})}();n.setHeader("X-Request-ID",a)}return n}function Br(i,e,t){return eo.apply(this,arguments)}function eo(){return eo=function Js(i){return function(){var e=this,t=arguments;return new Promise(function(n,r){var a=i.apply(e,t);function l(b){vr(a,n,r,l,c,"next",b)}function c(b){vr(a,n,r,l,c,"throw",b)}l(void 0)})}}(qn().mark(function i(e,t,n){var r;return qn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if("function"!=typeof n.onBeforeRequest){l.next=3;break}return l.next=3,n.onBeforeRequest(e);case 3:return l.next=5,e.send(t);case 5:if(r=l.sent,"function"!=typeof n.onAfterResponse){l.next=9;break}return l.next=9,n.onAfterResponse(e,r);case 9:return l.abrupt("return",r);case 10:case"end":return l.stop()}},i)})),eo.apply(this,arguments)}function Tr(i,e,t){return!(null==t.retryDelays||e>=t.retryDelays.length||null==i.originalRequest)&&(t&&"function"==typeof t.onShouldRetry?t.onShouldRetry(i,e,t):Fr(i))}function Fr(i){var e=i.originalResponse?i.originalResponse.getStatus():0;return(!Wi(e,400)||409===e||423===e)&&function oa(){var i=!0;return typeof window<"u"&&"navigator"in window&&!1===window.navigator.onLine&&(i=!1),i}()}function Ur(i,e){return new(Ws())(e,i).toString()}Dr.defaultOptions=na;const to=Dr;function ln(i){return(ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function Mr(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,la(n.key),n)}}function la(i){var e=function pa(i,e){if("object"!==ln(i)||null===i)return i;var t=i[Symbol.toPrimitive];if(void 0!==t){var n=t.call(i,e||"default");if("object"!==ln(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(i)}(i,"string");return"symbol"===ln(e)?e:String(e)}var Ar=function(){function i(){!function sa(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i)}return function aa(i,e,t){e&&Mr(i.prototype,e),t&&Mr(i,t),Object.defineProperty(i,"prototype",{writable:!1})}(i,[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(t){return Promise.resolve([])}},{key:"removeUpload",value:function(t){return Promise.resolve()}},{key:"addUpload",value:function(t,n){return Promise.resolve(null)}}]),i}();function pn(i){return(pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function Rr(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,ca(n.key),n)}}function ca(i){var e=function ua(i,e){if("object"!==pn(i)||null===i)return i;var t=i[Symbol.toPrimitive];if(void 0!==t){var n=t.call(i,e||"default");if("object"!==pn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(i)}(i,"string");return"symbol"===pn(e)?e:String(e)}var io=!1;try{io="localStorage"in window;var no="tusSupport",Lr=localStorage.getItem(no);localStorage.setItem(no,Lr),null===Lr&&localStorage.removeItem(no)}catch(i){if(i.code!==i.SECURITY_ERR&&i.code!==i.QUOTA_EXCEEDED_ERR)throw i;io=!1}var ha=io,ma=function(){function i(){!function da(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i)}return function kr(i,e,t){e&&Rr(i.prototype,e),t&&Rr(i,t),Object.defineProperty(i,"prototype",{writable:!1})}(i,[{key:"findAllUploads",value:function(){var t=this._findEntries("tus::");return Promise.resolve(t)}},{key:"findUploadsByFingerprint",value:function(t){var n=this._findEntries("tus::".concat(t,"::"));return Promise.resolve(n)}},{key:"removeUpload",value:function(t){return localStorage.removeItem(t),Promise.resolve()}},{key:"addUpload",value:function(t,n){var r=Math.round(1e12*Math.random()),a="tus::".concat(t,"::").concat(r);return localStorage.setItem(a,JSON.stringify(n)),Promise.resolve(a)}},{key:"_findEntries",value:function(t){for(var n=[],r=0;r<localStorage.length;r++){var a=localStorage.key(r);if(0===a.indexOf(t))try{var l=JSON.parse(localStorage.getItem(a));l.urlStorageKey=a,n.push(l)}catch{}}return n}}]),i}();function dn(i){return(dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function oo(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function ro(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,fa(n.key),n)}}function so(i,e,t){return e&&ro(i.prototype,e),t&&ro(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}function fa(i){var e=function ya(i,e){if("object"!==dn(i)||null===i)return i;var t=i[Symbol.toPrimitive];if(void 0!==t){var n=t.call(i,e||"default");if("object"!==dn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(i)}(i,"string");return"symbol"===dn(e)?e:String(e)}var ga=function(){function i(){oo(this,i)}return so(i,[{key:"createRequest",value:function(t,n){return new jr(t,n)}},{key:"getName",value:function(){return"XHRHttpStack"}}]),i}(),jr=function(){function i(e,t){oo(this,i),this._xhr=new XMLHttpRequest,this._xhr.open(e,t,!0),this._method=e,this._url=t,this._headers={}}return so(i,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(t,n){this._xhr.setRequestHeader(t,n),this._headers[t]=n}},{key:"getHeader",value:function(t){return this._headers[t]}},{key:"setProgressHandler",value:function(t){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(n){n.lengthComputable&&t(n.loaded)})}},{key:"send",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise(function(r,a){t._xhr.onload=function(){r(new Ki(t._xhr))},t._xhr.onerror=function(l){a(l)},t._xhr.send(n)})}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),i}(),Ki=function(){function i(e){oo(this,i),this._xhr=e}return so(i,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(t){return this._xhr.getResponseHeader(t)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),i}();const zr=function(){return typeof navigator<"u"&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()};function va(i){return new Promise(function(e,t){var n=new XMLHttpRequest;n.responseType="blob",n.onload=function(){e(n.response)},n.onerror=function(r){t(r)},n.open("GET",i),n.send()})}function cn(i){return(cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function Nr(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,Ia(n.key),n)}}function Ia(i){var e=function Ea(i,e){if("object"!==cn(i)||null===i)return i;var t=i[Symbol.toPrimitive];if(void 0!==t){var n=t.call(i,e||"default");if("object"!==cn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(i)}(i,"string");return"symbol"===cn(e)?e:String(e)}var Wr=function(){function i(e){(function Ca(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")})(this,i),this._file=e,this.size=e.size}return function wa(i,e,t){e&&Nr(i.prototype,e),t&&Nr(i,t),Object.defineProperty(i,"prototype",{writable:!1})}(i,[{key:"slice",value:function(t,n){if(typeof window<"u"&&(typeof window.PhoneGap<"u"||typeof window.Cordova<"u"||typeof window.cordova<"u"))return function Sa(i){return new Promise(function(e,t){var n=new FileReader;
1n.onload=function(){var r=new Uint8Array(n.result);e({value:r})},n.onerror=function(r){t(r)},n.readAsArrayBuffer(i)})}(this._file.slice(t,n));var r=this._file.slice(t,n);return Promise.resolve({value:r,done:n>=this.size})}},{key:"close",value:function(){}}]),i}();function _i(i){return(_i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function xi(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,Oa(n.key),n)}}function Oa(i){var e=function Ba(i,e){if("object"!==_i(i)||null===i)return i;var t=i[Symbol.toPrimitive];if(void 0!==t){var n=t.call(i,e||"default");if("object"!==_i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(i)}(i,"string");return"symbol"===_i(e)?e:String(e)}function Kr(i){return void 0===i?0:void 0!==i.size?i.size:i.length}var Ta=function(){function i(e){(function Da(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")})(this,i),this._buffer=void 0,this._bufferOffset=0,this._reader=e,this._done=!1}return function Pa(i,e,t){e&&xi(i.prototype,e),t&&xi(i,t),Object.defineProperty(i,"prototype",{writable:!1})}(i,[{key:"slice",value:function(t,n){return t<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(t,n)}},{key:"_readUntilEnoughDataOrDone",value:function(t,n){var r=this,a=n<=this._bufferOffset+Kr(this._buffer);if(this._done||a){var l=this._getDataFromBuffer(t,n);return Promise.resolve({value:l,done:null==l&&this._done})}return this._reader.read().then(function(b){var h=b.value;return b.done?r._done=!0:r._buffer=void 0===r._buffer?h:function ao(i,e){if(i.concat)return i.concat(e);if(i instanceof Blob)return new Blob([i,e],{type:i.type});if(i.set){var t=new i.constructor(i.length+e.length);return t.set(i),t.set(e,i.length),t}throw new Error("Unknown data type")}(r._buffer,h),r._readUntilEnoughDataOrDone(t,n)})}},{key:"_getDataFromBuffer",value:function(t,n){t>this._bufferOffset&&(this._buffer=this._buffer.slice(t-this._bufferOffset),this._bufferOffset=t);var r=0===Kr(this._buffer);return this._done&&r?null:this._buffer.slice(0,n-t)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}]),i}();function Si(i){return(Si="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function lo(){lo=function(){return e};var i,e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(Z,A,V){Z[A]=V.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",b=a.toStringTag||"@@toStringTag";function h(Z,A,V){return Object.defineProperty(Z,A,{value:V,enumerable:!0,configurable:!0,writable:!0}),Z[A]}try{h({},"")}catch{h=function(V,ce,_e){return V[ce]=_e}}function x(Z,A,V,ce){var fe=Object.create((A&&A.prototype instanceof ve?A:ve).prototype),Ue=new ft(ce||[]);return r(fe,"_invoke",{value:it(Z,V,Ue)}),fe}function v(Z,A,V){try{return{type:"normal",arg:Z.call(A,V)}}catch(ce){return{type:"throw",arg:ce}}}e.wrap=x;var U="suspendedStart",W="suspendedYield",re="executing",me="completed",ue={};function ve(){}function he(){}function we(){}var Te={};h(Te,l,function(){return this});var We=Object.getPrototypeOf,He=We&&We(We(wt([])));He&&He!==t&&n.call(He,l)&&(Te=He);var je=we.prototype=ve.prototype=Object.create(Te);function ke(Z){["next","throw","return"].forEach(function(A){h(Z,A,function(V){return this._invoke(A,V)})})}function Fe(Z,A){function V(_e,fe,Ue,$e){var Ye=v(Z[_e],Z,fe);if("throw"!==Ye.type){var It=Ye.arg,_t=It.value;return _t&&"object"==Si(_t)&&n.call(_t,"__await")?A.resolve(_t.__await).then(function(yt){V("next",yt,Ue,$e)},function(yt){V("throw",yt,Ue,$e)}):A.resolve(_t).then(function(yt){It.value=yt,Ue(It)},function(yt){return V("throw",yt,Ue,$e)})}$e(Ye.arg)}var ce;r(this,"_invoke",{value:function(fe,Ue){function $e(){return new A(function(Ye,It){V(fe,Ue,Ye,It)})}return ce=ce?ce.then($e,$e):$e()}})}function it(Z,A,V){var ce=U;return function(_e,fe){if(ce===re)throw new Error("Generator is already running");if(ce===me){if("throw"===_e)throw fe;return{value:i,done:!0}}for(V.method=_e,V.arg=fe;;){var Ue=V.delegate;if(Ue){var $e=St(Ue,V);if($e){if($e===ue)continue;return $e}}if("next"===V.method)V.sent=V._sent=V.arg;else if("throw"===V.method){if(ce===U)throw ce=me,V.arg;V.dispatchException(V.arg)}else"return"===V.method&&V.abrupt("return",V.arg);ce=re;var Ye=v(Z,A,V);if("normal"===Ye.type){if(ce=V.done?me:W,Ye.arg===ue)continue;return{value:Ye.arg,done:V.done}}"throw"===Ye.type&&(ce=me,V.method="throw",V.arg=Ye.arg)}}}function St(Z,A){var V=A.method,ce=Z.iterator[V];if(ce===i)return A.delegate=null,"throw"===V&&Z.iterator.return&&
vendor: 4,502 bytes, line 1
1(A.method="return",A.arg=i,St(Z,A),"throw"===A.method)||"return"!==V&&(A.method="throw",A.arg=new TypeError("The iterator does not provide a '"+V+"' method")),ue;var _e=v(ce,Z.iterator,A.arg);if("throw"===_e.type)return A.method="throw",A.arg=_e.arg,A.delegate=null,ue;var fe=_e.arg;return fe?fe.done?(A[Z.resultName]=fe.value,A.next=Z.nextLoc,"return"!==A.method&&(A.method="next",A.arg=i),A.delegate=null,ue):fe:(A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,ue)}function ut(Z){var A={tryLoc:Z[0]};1 in Z&&(A.catchLoc=Z[1]),2 in Z&&(A.finallyLoc=Z[2],A.afterLoc=Z[3]),this.tryEntries.push(A)}function Ct(Z){var A=Z.completion||{};A.type="normal",delete A.arg,Z.completion=A}function ft(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(ut,this),this.reset(!0)}function wt(Z){if(Z||""===Z){var A=Z[l];if(A)return A.call(Z);if("function"==typeof Z.next)return Z;if(!isNaN(Z.length)){var V=-1,ce=function _e(){for(;++V<Z.length;)if(n.call(Z,V))return _e.value=Z[V],_e.done=!1,_e;return _e.value=i,_e.done=!0,_e};return ce.next=ce}}throw new TypeError(Si(Z)+" is not iterable")}return he.prototype=we,r(je,"constructor",{value:we,configurable:!0}),r(we,"constructor",{value:he,configurable:!0}),he.displayName=h(we,b,"GeneratorFunction"),e.isGeneratorFunction=function(Z){var A="function"==typeof Z&&Z.constructor;return!!A&&(A===he||"GeneratorFunction"===(A.displayName||A.name))},e.mark=function(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,we):(Z.__proto__=we,h(Z,b,"GeneratorFunction")),Z.prototype=Object.create(je),Z},e.awrap=function(Z){return{__await:Z}},ke(Fe.prototype),h(Fe.prototype,c,function(){return this}),e.AsyncIterator=Fe,e.async=function(Z,A,V,ce,_e){void 0===_e&&(_e=Promise);var fe=new Fe(x(Z,A,V,ce),_e);return e.isGeneratorFunction(A)?fe:fe.next().then(function(Ue){return Ue.done?Ue.value:fe.next()})},ke(je),h(je,b,"Generator"),h(je,l,function(){return this}),h(je,"toString",function(){return"[object Generator]"}),e.keys=function(Z){var A=Object(Z),V=[];for(var ce in A)V.push(ce);return V.reverse(),function _e(){for(;V.length;){var fe=V.pop();if(fe in A)return _e.value=fe,_e.done=!1,_e}return _e.done=!0,_e}},e.values=wt,ft.prototype={constructor:ft,reset:function(A){if(this.prev=0,this.next=0,this.sent=this._sent=i,this.done=!1,this.delegate=null,this.method="next",this.arg=i,this.tryEntries.forEach(Ct),!A)for(var V in this)"t"===V.charAt(0)&&n.call(this,V)&&!isNaN(+V.slice(1))&&(this[V]=i)},stop:function(){this.done=!0;var A=this.tryEntries[0].completion;if("throw"===A.type)throw A.arg;return this.rval},dispatchException:function(A){if(this.done)throw A;var V=this;function ce(It,_t){return Ue.type="throw",Ue.arg=A,V.next=It,_t&&(V.method="next",V.arg=i),!!_t}for(var _e=this.tryEntries.length-1;_e>=0;--_e){var fe=this.tryEntries[_e],Ue=fe.completion;if("root"===fe.tryLoc)return ce("end");if(fe.tryLoc<=this.prev){var $e=n.call(fe,"catchLoc"),Ye=n.call(fe,"finallyLoc");if($e&&Ye){if(this.prev<fe.catchLoc)return ce(fe.catchLoc,!0);if(this.prev<fe.finallyLoc)return ce(fe.finallyLoc)}else if($e){if(this.prev<fe.catchLoc)return ce(fe.catchLoc,!0)}else{if(!Ye)throw new Error("try statement without catch or finally");if(this.prev<fe.finallyLoc)return ce(fe.finallyLoc)}}}},abrupt:function(A,V){for(var ce=this.tryEntries.length-1;ce>=0;--ce){var _e=this.tryEntries[ce];if(_e.tryLoc<=this.prev&&n.call(_e,"finallyLoc")&&this.prev<_e.finallyLoc){var fe=_e;break}}fe&&("break"===A||"continue"===A)&&fe.tryLoc<=V&&V<=fe.finallyLoc&&(fe=null);var Ue=fe?fe.completion:{};return Ue.type=A,Ue.arg=V,fe?(this.method="next",this.next=fe.finallyLoc,ue):this.complete(Ue)},complete:function(A,V){if("throw"===A.type)throw A.arg;return"break"===A.type||"continue"===A.type?this.next=A.arg:"return"===A.type?(this.rval=this.arg=A.arg,this.method="return",this.next="end"):"normal"===A.type&&V&&(this.next=V),ue},finish:function(A){for(var V=this.tryEntries.length-1;V>=0;--V){var ce=this.tryEntries[V];if(ce.finallyLoc===A)return this.complete(ce.completion,ce.afterLoc),Ct(ce),ue}},catch:function(A){for(var V=this.tryEntries.length-1;V>=0;--V){var ce=this.tryEntries[V];if(ce.tryLoc===A){var _e=ce.completion;if("throw"===_e.type){var fe=_e.arg;Ct(ce)}return fe}}throw new Error("illegal catch attempt")},delegateYield:function(A,V,ce){return this.delegate={iterator:wt(A),resultName:V,nextLoc:ce},"next"===this.method&&(this.arg=i),ue}},e}function po(i,e,t,n,r,a,l){try{var c=i[a](l),b=c.value}catch(h){return void t(h)}
1c.done?e(b):Promise.resolve(b).then(n,r)}function w(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,u(n.key),n)}}function u(i){var e=function E(i,e){if("object"!==Si(i)||null===i)return i;var t=i[Symbol.toPrimitive];if(void 0!==t){var n=t.call(i,e||"default");if("object"!==Si(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(i)}(i,"string");return"symbol"===Si(e)?e:String(e)}var L=function(){function i(){!function Fa(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i)}return function _(i,e,t){e&&w(i.prototype,e),t&&w(i,t),Object.defineProperty(i,"prototype",{writable:!1})}(i,[{key:"openFile",value:(e=function cp(i){return function(){var e=this,t=arguments;return new Promise(function(n,r){var a=i.apply(e,t);function l(b){po(a,n,r,l,c,"next",b)}function c(b){po(a,n,r,l,c,"throw",b)}l(void 0)})}}(lo().mark(function n(r,a){return lo().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(!(zr()&&r&&typeof r.uri<"u")){b.next=11;break}return b.prev=1,b.next=4,va(r.uri);case 4:return b.abrupt("return",new Wr(b.sent));case 8:throw b.prev=8,b.t0=b.catch(1),new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(b.t0));case 11:if(!("function"==typeof r.slice&&typeof r.size<"u")){b.next=13;break}return b.abrupt("return",Promise.resolve(new Wr(r)));case 13:if("function"!=typeof r.read){b.next=18;break}if(a=Number(a),Number.isFinite(a)){b.next=17;break}return b.abrupt("return",Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option")));case 17:return b.abrupt("return",Promise.resolve(new Ta(r,a)));case 18:return b.abrupt("return",Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment")));case 19:case"end":return b.stop()}},n,null,[[1,8]])})),function t(n,r){return e.apply(this,arguments)})}]),i;var e}();function ze(i){return(ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function tt(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,up(n.key),n)}}function Qe(i,e){return(Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(i,e)}function Nt(i){return(Nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(i)}function Vi(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Hi(i){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?Vi(Object(t),!0).forEach(function(n){Mc(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):Vi(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}function Mc(i,e,t){return(e=up(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function up(i){var e=function Ac(i,e){if("object"!==ze(i)||null===i)return i;var t=i[Symbol.toPrimitive];if(void 0!==t){var n=t.call(i,e||"default");if("object"!==ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(i)}(i,"string");return"symbol"===ze(e)?e:String(e)}var Ua=Hi(Hi({},to.defaultOptions),{},{httpStack:new ga,fileReader:new L,urlStorage:ha?new ma:new Ar,fingerprint:function de(i,e){return zr()?Promise.resolve(function be(i,e){var t=i.exif?function Oe(i){var e=0;if(0===i.length)return e;for(var t=0;t<i.length;t++)e=(e<<5)-e+i.charCodeAt(t),e&=e;return e}(JSON.stringify(i.exif)):"noexif";return["tus-rn",i.name||"noname",i.size||"nosize",t,e.endpoint].join("/")}(i,e)):Promise.resolve(["tus-br",i.name,i.type,i.size,i.lastModified,e.endpoint].join("-"))}}),Rc=function(i){!function Ve(i,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),e&&Qe(i,e)}(t,i);
1var e=function Ke(i){var e=function $i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,n=Nt(i);if(e){var a=Nt(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function Xe(i,e){if(e&&("object"===ze(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function Qt(i){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(i)}(this,r)}}(t);function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function Ge(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r=Hi(Hi({},Ua),r),e.call(this,n,r)}return function ye(i,e,t){e&&tt(i.prototype,e),t&&tt(i,t),Object.defineProperty(i,"prototype",{writable:!1})}(t,null,[{key:"terminate",value:function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a=Hi(Hi({},Ua),a),to.terminate(r,a)}}]),t}(to);function Ci(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}window;var Lc=0;function fp(i){return"__private_"+Lc+++"_"+i}var Tt=fp("uppy"),co=fp("events");class jc{constructor(e){Object.defineProperty(this,Tt,{writable:!0,value:void 0}),Object.defineProperty(this,co,{writable:!0,value:[]}),Ci(this,Tt)[Tt]=e}on(e,t){return Ci(this,co)[co].push([e,t]),Ci(this,Tt)[Tt].on(e,t)}remove(){for(const[e,t]of Ci(this,co)[co].splice(0))Ci(this,Tt)[Tt].off(e,t)}onFilePause(e,t){this.on("upload-pause",(n,r)=>{e===n&&t(r)})}onFileRemove(e,t){this.on("file-removed",n=>{e===n.id&&t(n.id)})}onPause(e,t){this.on("upload-pause",(n,r)=>{e===n&&t(r)})}onRetry(e,t){this.on("upload-retry",n=>{e===n&&t()})}onRetryAll(e,t){this.on("retry-all",()=>{Ci(this,Tt)[Tt].getFile(e)&&t()})}onPauseAll(e,t){this.on("pause-all",()=>{Ci(this,Tt)[Tt].getFile(e)&&t()})}onCancelAll(e,t){var n=this;this.on("cancel-all",function(){Ci(n,Tt)[Tt].getFile(e)&&t(...arguments)})}onResumeAll(e,t){this.on("resume-all",()=>{Ci(this,Tt)[Tt].getFile(e)&&t()})}}class zc extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}const yp=zc,Wc=function Nc(i){return!!i&&(0!==i.readyState&&4!==i.readyState||0===i.status)};function Re(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var Kc=0;function kt(i){return"__private_"+Kc+++"_"+i}function gp(i){if(null!=i){var e;const t=()=>this.abort(i.reason);i.addEventListener("abort",t,{once:!0});const n=()=>{i.removeEventListener("abort",t)};null==(e=this.then)||e.call(this,n,n)}return this}var Wt=kt("activeRequests"),Ft=kt("queuedHandlers"),Kt=kt("paused"),un=kt("pauseTimer"),Ut=kt("downLimit"),hn=kt("upperLimit"),wi=kt("rateLimitingTimer"),uo=kt("call"),Ii=kt("queueNext"),Ma=kt("next"),Aa=kt("queue"),Ra=kt("dequeue"),ka=kt("resume"),mn=kt("increaseLimit");class Vc{constructor(e){Object.defineProperty(this,Ra,{value:Xc}),Object.defineProperty(this,Aa,{value:Qc}),Object.defineProperty(this,Ma,{value:Zc}),Object.defineProperty(this,Ii,{value:Gc}),Object.defineProperty(this,uo,{value:Hc}),Object.defineProperty(this,Wt,{writable:!0,value:0}),Object.defineProperty(this,Ft,{writable:!0,value:[]}),Object.defineProperty(this,Kt,{writable:!0,value:!1}),Object.defineProperty(this,un,{writable:!0,value:void 0}),Object.defineProperty(this,Ut,{writable:!0,value:1}),Object.defineProperty(this,hn,{writable:!0,value:void 0}),Object.defineProperty(this,wi,{writable:!0,value:void 0}),Object.defineProperty(this,ka,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,mn,{writable:!0,value:()=>{if(Re(this,Kt)[Kt])Re(this,wi)[wi]=setTimeout(Re(this,mn)[mn],0);else{Re(this,Ut)[Ut]=this.limit,this.limit=Math.ceil((Re(this,hn)[hn]+Re(this,Ut)[Ut])/2);for(let t=Re(this,Ut)[Ut];t<=this.limit;t++)Re(this,Ii)[Ii]();Re(this,hn)[hn]-Re(this,Ut)[Ut]>3?Re(this,wi)[wi]=setTimeout(Re(this,mn)[mn],2e3):Re(this,Ut)[Ut]=Math.floor(Re(this,Ut)[Ut]/2)}}}),this.limit="number"!=typeof e||0===e?1/0:e}run(e,t){return!Re(this,Kt)[Kt]&&Re(this,Wt)[Wt]<this.limit?Re(this,uo)[uo](e):Re(this,Aa)[Aa](e,t)}wrapSyncFunction(e,t){var n=this;return function(){for(var r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];const c=n.run(()=>(e(...a),queueMicrotask(()=>c.done()),()=>{}),t);return{abortOn:gp,abort(){c.abort()}}}}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];let c;const b=new Promise((h,x)=>{c=n.run(()=>{let v,U;try{U=Promise.resolve(e(...a))}catch(W){U=Promise.reject(W)}return U.then(W=>{v?x(v):(c.done(),h(W))},W=>{v?x(v):(c.done(),x(W))}),W=>{v=function $c(i){return new Error("Cancelled",{cause:i})}(W)}},t)});return b.abort=h=>{c.abort(h)},b.abortOn=gp,b}}resume(){Re(this,Kt)[Kt]=!1,clearTimeout(Re(this,un)[un]);for(let e=0;e<this.limit;e++)Re(this,Ii)[Ii]()}pause(e){void 0===e&&(e=null),Re(this,Kt)[Kt]=!0,clearTimeout(Re(this,un)[un]),null!=e&&(Re(this,un)[un]=setTimeout(Re(this,ka)[ka],e))}rateLimit(e){clearTimeout(Re(this,wi)[wi]),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(Re(this,hn)[hn]=this.limit-1,this.limit=Re(this,Ut)[Ut],Re(this,wi)[wi]=setTimeout(Re(this,mn)[mn],e))}get isPaused(){return Re(this,Kt)[Kt]}}function Hc(i){Re(this,Wt)[Wt]+=1;let t,e=!1;try{t=i()}catch(n){throw Re(this,Wt)[Wt]-=1,n}return{abort:n=>{e||(e=!0,Re(this,Wt)[Wt]-=1,t?.(n),Re(this,Ii)[Ii]())},done:()=>{e||(e=!0,Re(this,Wt)[Wt]-=1,Re(this,Ii)[Ii]())}}}function Gc(){queueMicrotask(()=>Re(this,Ma)[Ma]())}function Zc(){if(Re(this,Kt)[Kt]||Re(this,Wt)[Wt]>=this.limit||0===Re(this,Ft)[Ft].length)return;const i=Re(this,Ft)[Ft].shift();if(null==i)throw new Error("Invariant violation: next is null");
1const e=Re(this,uo)[uo](i.fn);i.abort=e.abort,i.done=e.done}function Qc(i,e){const t={fn:i,priority:e?.priority||0,abort:()=>{Re(this,Ra)[Ra](t)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},n=Re(this,Ft)[Ft].findIndex(r=>t.priority>r.priority);return-1===n?Re(this,Ft)[Ft].push(t):Re(this,Ft)[Ft].splice(n,0,t),t}function Xc(i){const e=Re(this,Ft)[Ft].indexOf(i);-1!==e&&Re(this,Ft)[Ft].splice(e,1)}function $r(i,e){return Object.prototype.hasOwnProperty.call(i,e)}function fn(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}Symbol("__queue");var iu=0;function ho(i){return"__private_"+iu+++"_"+i}const bp={endpoint:"",uploadUrl:null,metadata:{},uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,overridePatchMethod:!1,headers:{},addRequestId:!1,chunkSize:1/0,retryDelays:[100,1e3,3e3,5e3],parallelUploads:1,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1},ou={limit:20,retryDelays:bp.retryDelays,withCredentials:!1};var mo=ho("retryDelayIterator"),La=ho("uploadLocalFile"),ja=ho("getCompanionClientArgs"),za=ho("uploadFiles"),fo=ho("handleUpload");class Na extends qo{constructor(e,t){var n,r,a,l;if(super(e,{...ou,...t}),n=this,Object.defineProperty(this,za,{value:au}),Object.defineProperty(this,ja,{value:su}),Object.defineProperty(this,La,{value:ru}),Object.defineProperty(this,mo,{writable:!0,value:void 0}),Object.defineProperty(this,fo,{writable:!0,value:(l=(0,d.Z)(function*(c){if(0===c.length)return void n.uppy.log("[Tus] No files to upload");0===n.opts.limit&&n.uppy.log("[Tus] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/tus/#limit-0","warning"),n.uppy.log("[Tus] Uploading...");const b=n.uppy.getFilesByIds(c);yield fn(n,za)[za](b)}),function(b){return l.apply(this,arguments)})}),this.type="uploader",this.id=this.opts.id||"Tus",void 0===t?.allowedMetaFields&&"metaFields"in this.opts)throw new Error("The `metaFields` option has been renamed to `allowedMetaFields`.");if("autoRetry"in t)throw new Error("The `autoRetry` option was deprecated and has been removed.");this.requests=null!=(r=this.opts.rateLimitedQueue)?r:new Vc(this.opts.limit),fn(this,mo)[mo]=null==(a=this.opts.retryDelays)?void 0:a.values(),this.uploaders=Object.create(null),this.uploaderEvents=Object.create(null),this.handleResetProgress=this.handleResetProgress.bind(this)}
1handleResetProgress(){const e={...this.uppy.getState().files};Object.keys(e).forEach(t=>{var n;if(null!=(n=e[t])&&null!=(n=n.tus)&&n.uploadUrl){const r={...e[t].tus};delete r.uploadUrl,e[t]={...e[t],tus:r}}}),this.uppy.setState({files:e})}resetUploaderReferences(e,t){const n=this.uploaders[e];n&&(n.abort(),null!=t&&t.abort&&n.abort(!0),this.uploaders[e]=null),this.uploaderEvents[e]&&(this.uploaderEvents[e].remove(),this.uploaderEvents[e]=null)}onReceiveUploadUrl(e,t){const n=this.uppy.getFile(e.id);n&&(!n.tus||n.tus.uploadUrl!==t)&&(this.uppy.log("[Tus] Storing upload url"),this.uppy.setFileState(n.id,{tus:{...n.tus,uploadUrl:t}}))}install(){this.uppy.setState({capabilities:{...this.uppy.getState().capabilities,resumableUploads:!0}}),this.uppy.addUploader(fn(this,fo)[fo]),this.uppy.on("reset-progress",this.handleResetProgress)}uninstall(){this.uppy.setState({capabilities:{...this.uppy.getState().capabilities,resumableUploads:!1}}),this.uppy.removeUploader(fn(this,fo)[fo])}}function ru(i){var e=this,t=this;return this.resetUploaderReferences(i.id),new Promise((n,r)=>{let a,l,c;const b={...this.opts,...i.tus||{}};"function"==typeof b.headers&&(b.headers=b.headers(i));const{onShouldRetry:h,onBeforeRequest:x,...v}=b,U={...bp,...v};U.fingerprint=function tu(i){return(e,t)=>{if(function qc(){return typeof window<"u"&&(typeof window.PhoneGap<"u"||typeof window.Cordova<"u"||typeof window.cordova<"u")}()||function eu(){return typeof navigator<"u"&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()}())return Ua.fingerprint(e,t);const n=["tus",i.id,t.endpoint].join("-");return Promise.resolve(n)}}(i),U.onBeforeRequest=function(){var he=(0,d.Z)(function*(we){let We;if(we.getUnderlyingObject().withCredentials=!!b.withCredentials,"function"==typeof x&&(We=x(we,i)),$r(a,"shouldBeRequeued")){if(!a.shouldBeRequeued)return Promise.reject();let He;const je=new Promise(ke=>{He=ke});return a=e.requests.run(()=>(i.isPaused&&a.abort(),He(),()=>{})),void(yield Promise.all([je,We]))}return We});return function(we){return he.apply(this,arguments)}}(),U.onError=he=>{var we;this.uppy.log(he);const Te=null!=he.originalRequest?he.originalRequest.getUnderlyingObject():null;Wc(Te)&&(he=new yp(he,Te)),this.resetUploaderReferences(i.id),null==(we=a)||we.abort(),this.uppy.emit("upload-error",i,he),"function"==typeof b.onError&&b.onError(he),r(he)},U.onProgress=(he,we)=>{this.onReceiveUploadUrl(i,c.url),"function"==typeof b.onProgress&&b.onProgress(he,we),this.uppy.emit("upload-progress",this.uppy.getFile(i.id),{uploader:this,bytesUploaded:he,bytesTotal:we})},U.onSuccess=()=>{var he;const we={uploadURL:null!=(he=c.url)?he:void 0,status:200,body:{}};if(this.resetUploaderReferences(i.id),a.done(),this.uppy.emit("upload-success",this.uppy.getFile(i.id),we),c.url){const{name:Te}=c.file;this.uppy.log(`Download ${Te} from ${c.url}`)}"function"==typeof b.onSuccess&&b.onSuccess(),n(c)};const W=he=>{var we;const Te=null==he||null==(we=he.originalResponse)?void 0:we.getStatus();if(429===Te){if(!this.requests.isPaused){var We;const He=null==(We=fn(this,mo)[mo])?void 0:We.next();if(null==He||He.done)return!1;this.requests.rateLimit(He.value)}}else{if(null!=Te&&Te>400&&Te<500&&409!==Te&&423!==Te)return!1;typeof navigator<"u"&&!1===navigator.onLine&&(this.requests.isPaused||(this.requests.pause(),window.addEventListener("online",()=>{this.requests.resume()},{once:!0})))}return a.abort(),a={shouldBeRequeued:!0,abort(){this.shouldBeRequeued=!1},done(){throw new Error("Cannot mark a queued request as done: this indicates a bug")},fn(){throw new Error("Cannot run a queued request: this indicates a bug")}},!0};U.onShouldRetry=null!=h?(he,we)=>h(he,we,b,W):W;const re=(he,we,Te)=>{$r(he,we)&&!$r(he,Te)&&(he[Te]=he[we])},me={};(Array.isArray(b.allowedMetaFields)?b.allowedMetaFields:Object.keys(i.meta)).forEach(he=>{me[he]=String(i.meta[he])}),re(me,"type","filetype"),re(me,"name","filename"),U.metadata=me,c=new Rc(i.data,U),this.uploaders[i.id]=c;const ve=new jc(this.uppy);this.uploaderEvents[i.id]=ve,l=()=>(i.isPaused||c.start(),()=>{}),c.findPreviousUploads().then(he=>{const we=he[0];we&&(this.uppy.log(`[Tus] Resuming upload of ${i.id} started at ${we.creationTime}`),c.resumeFromPreviousUpload(we))}),a=this.requests.run(l),ve.onFileRemove(i.id,he=>{a.abort(),this.resetUploaderReferences(i.id,{abort:!!c.url}),n(`upload ${he}
1 was removed`)}),ve.onPause(i.id,he=>{a.abort(),he?c.abort():a=this.requests.run(l)}),ve.onPauseAll(i.id,()=>{a.abort(),c.abort()}),ve.onCancelAll(i.id,function(he){let{reason:we}=void 0===he?{}:he;"user"===we&&(a.abort(),t.resetUploaderReferences(i.id,{abort:!!c.url})),n(`upload ${i.id} was canceled`)}),ve.onResumeAll(i.id,()=>{a.abort(),i.error&&c.abort(),a=this.requests.run(l)})}).catch(n=>{throw this.uppy.emit("upload-error",i,n),n})}function su(i){var e;const t={...this.opts};return i.tus&&Object.assign(t,i.tus),"function"==typeof t.headers&&(t.headers=t.headers(i)),{...null==(e=i.remote)?void 0:e.body,endpoint:t.endpoint,uploadUrl:t.uploadUrl,protocol:"tus",size:i.data.size,headers:t.headers,metadata:i.meta}}function au(i){return Wa.apply(this,arguments)}function Wa(){return(Wa=(0,d.Z)(function*(i){const e=function Yc(i){return i.filter(t=>!(t=>"error"in t&&!!t.error)(t))}(i),t=function Jc(i){return i.filter(e=>{var t;return!(null!=(t=e.progress)&&t.uploadStarted&&e.isRestored)})}(e);this.uppy.emit("upload-start",t),yield Promise.allSettled(e.map(n=>{if(n.isRemote){const r=()=>this.requests,a=new AbortController,l=b=>{b.id===n.id&&a.abort()};this.uppy.on("file-removed",l);
1const c=this.uppy.getRequestClientForFile(n).uploadRemoteFile(n,fn(this,ja)[ja](n),{signal:a.signal,getQueue:r});return this.requests.wrapSyncFunction(()=>{this.uppy.off("file-removed",l)},{priority:-1})(),c}return fn(this,La)[La](n)}))})).apply(this,arguments)}Na.VERSION="3.5.5";var yo,rt,vp,yn,_p,xp,Ka,$a,Va,Ha,go={},Cp=[],pu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Vr=Array.isArray;function Ei(i,e){for(var t in e)i[t]=e[t];return i}function wp(i){var e=i.parentNode;e&&e.removeChild(i)}function g(i,e,t){var n,r,a,l={};for(a in e)"key"==a?n=e[a]:"ref"==a?r=e[a]:l[a]=e[a];if(arguments.length>2&&(l.children=arguments.length>3?yo.call(arguments,2):t),"function"==typeof i&&null!=i.defaultProps)for(a in i.defaultProps)void 0===l[a]&&(l[a]=i.defaultProps[a]);return bo(i,l,n,r,null)}function bo(i,e,t,n,r){var a={type:i,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++vp,__i:-1,__u:0};return null==r&&null!=rt.vnode&&rt.vnode(a),a}function Xt(i){return i.children}function ti(i,e){this.props=i,this.context=e}function gn(i,e){if(null==e)return i.__?gn(i.__,i.__i+1):null;for(var t;e<i.__k.length;e++)if(null!=(t=i.__k[e])&&null!=t.__e)return t.__e;return"function"==typeof i.type?gn(i):null}function Ip(i){var e,t;if(null!=(i=i.__)&&null!=i.__c){for(i.__e=i.__c.base=null,e=0;e<i.__k.length;e++)if(null!=(t=i.__k[e])&&null!=t.__e){i.__e=i.__c.base=t.__e;break}return Ip(i)}}function Ga(i){(!i.__d&&(i.__d=!0)&&yn.push(i)&&!Hr.__r++||_p!==rt.debounceRendering)&&((_p=rt.debounceRendering)||xp)(Hr)}function Hr(){var i,e,t,n,r,a,l,c;for(yn.sort(Ka);i=yn.shift();)i.__d&&(e=yn.length,n=void 0,a=(r=(t=i).__v).__e,l=[],c=[],t.__P&&((n=Ei({},r)).__v=r.__v+1,rt.vnode&&rt.vnode(n),Za(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[a]:null,l,a??gn(r),!!(32&r.__u),c),n.__v=r.__v,n.__.__k[n.__i]=n,Bp(l,n,c),n.__e!=a&&Ip(n)),yn.length>e&&yn.sort(Ka));Hr.__r=0}function Ep(i,e,t,n,r,a,l,c,b,h,x){var v,U,W,re,me,ue=n&&n.__k||Cp,ve=e.length;for(t.__d=b,function cu(i,e,t){var n,r,a,l,c,b=e.length,h=t.length,x=h,v=0;for(i.__k=[],n=0;n<b;n++)l=n+v,null!=(r=i.__k[n]=null==(r=e[n])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?bo(null,r,null,null,null):Vr(r)?bo(Xt,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?bo(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=i,r.__b=i.__b+1,c=uu(r,t,l,x),r.__i=c,a=null,-1!==c&&(x--,(a=t[c])&&(a.__u|=131072)),null==a||null===a.__v?(-1==c&&v--,"function"!=typeof r.type&&(r.__u|=65536)):c!==l&&(c===l+1?v++:c>l?x>b-l?v+=c-l:v--:c<l?c==l-1&&(v=c-l):v=0,c!==n+v&&(r.__u|=65536))):(a=t[l])&&null==a.key&&a.__e&&!(131072&a.__u)&&(a.__e==i.__d&&(i.__d=gn(a)),Xa(a,a,!1),t[l]=null,x--);if(x)for(n=0;n<h;n++)null!=(a=t[n])&&!(131072&a.__u)&&(a.__e==i.__d&&(i.__d=gn(a)),Xa(a,a))}(t,e,ue),b=t.__d,v=0;v<ve;v++)null!=(W=t.__k[v])&&"boolean"!=typeof W&&"function"!=typeof W&&(U=-1===W.__i?go:ue[W.__i]||go,W.__i=v,Za(i,W,U,r,a,l,c,b,h,x),re=W.__e,W.ref&&U.ref!=W.ref&&(U.ref&&Qa(U.ref,null,W),x.push(W.ref,W.__c||re,W)),null==me&&null!=re&&(me=re),65536&W.__u||U.__k===W.__k?(b&&!b.isConnected&&(b=gn(U)),b=Dp(W,b,i)):"function"==typeof W.type&&void 0!==W.__d?b=W.__d:re&&(b=re.nextSibling),W.__d=void 0,W.__u&=-196609);t.__d=b,t.__e=me}function Dp(i,e,t){var n,r;if("function"==typeof i.type){for(n=i.__k,r=0;n&&r<n.length;r++)n[r]&&(n[r].__=i,e=Dp(n[r],e,t));return e}i.__e!=e&&(t.insertBefore(i.__e,e||null),e=i.__e);do{e=e&&e.nextSibling}
1while(null!=e&&8===e.nodeType);return e}function Di(i,e){return e=e||[],null==i||"boolean"==typeof i||(Vr(i)?i.some(function(t){Di(t,e)}):e.push(i)),e}function uu(i,e,t,n){var r=i.key,a=i.type,l=t-1,c=t+1,b=e[t];if(null===b||b&&r==b.key&&a===b.type&&!(131072&b.__u))return t;if(n>(null==b||131072&b.__u?0:1))for(;l>=0||c<e.length;){if(l>=0){if((b=e[l])&&!(131072&b.__u)&&r==b.key&&a===b.type)return l;l--}if(c<e.length){if((b=e[c])&&!(131072&b.__u)&&r==b.key&&a===b.type)return c;c++}}return-1}function Pp(i,e,t){"-"===e[0]?i.setProperty(e,t??""):i[e]=null==t?"":"number"!=typeof t||pu.test(e)?t:t+"px"}function Gr(i,e,t,n,r){var a;e:if("style"===e)if("string"==typeof t)i.style.cssText=t;else{if("string"==typeof n&&(i.style.cssText=n=""),n)for(e in n)t&&e in t||Pp(i.style,e,"");if(t)for(e in t)n&&t[e]===n[e]||Pp(i.style,e,t[e])}else if("o"===e[0]&&"n"===e[1])a=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in i||"onFocusOut"===e||"onFocusIn"===e?e.toLowerCase().slice(2):e.slice(2),i.l||(i.l={}),i.l[e+a]=t,t?n?t.u=n.u:(t.u=$a,i.addEventListener(e,a?Ha:Va,a)):i.removeEventListener(e,a?Ha:Va,a);else{if("http://www.w3.org/2000/svg"==r)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&e in i)try{i[e]=t??"";break e}catch{}"function"==typeof t||(null==t||!1===t&&"-"!==e[4]?i.removeAttribute(e):i.setAttribute(e,t))}}function Op(i){return function(e){if(this.l){var t=this.l[e.type+i];if(null==e.t)e.t=$a++;else if(e.t<t.u)return;return t(rt.event?rt.event(e):e)}}}function Za(i,e,t,n,r,a,l,c,b,h){var x,v,U,W,re,me,ue,ve,he,we,Te,We,He,je,ke,Fe=e.type;if(void 0!==e.constructor)return null;128&t.__u&&(b=!!(32&t.__u),a=[c=e.__e=t.__e]),(x=rt.__b)&&x(e);e:if("function"==typeof Fe)try{if(ve=e.props,he=(x=Fe.contextType)&&n[x.__c],we=x?he?he.props.value:x.__:n,t.__c?ue=(v=e.__c=t.__c).__=v.__E:("prototype"in Fe&&Fe.prototype.render?e.__c=v=new Fe(ve,we):(e.__c=v=new ti(ve,we),v.constructor=Fe,v.render=mu),he&&he.sub(v),v.props=ve,v.state||(v.state={}),v.context=we,v.__n=n,U=v.__d=!0,v.__h=[],v._sb=[]),null==v.__s&&(v.__s=v.state),null!=Fe.getDerivedStateFromProps&&(v.__s==v.state&&(v.__s=Ei({},v.__s)),Ei(v.__s,Fe.getDerivedStateFromProps(ve,v.__s))),W=v.props,re=v.state,v.__v=e,U)null==Fe.getDerivedStateFromProps&&null!=v.componentWillMount&&v.componentWillMount(),null!=v.componentDidMount&&v.__h.push(v.componentDidMount);else{if(null==Fe.getDerivedStateFromProps&&ve!==W&&null!=v.componentWillReceiveProps&&v.componentWillReceiveProps(ve,we),!v.__e&&(null!=v.shouldComponentUpdate&&!1===v.shouldComponentUpdate(ve,v.__s,we)||e.__v===t.__v)){for(e.__v!==t.__v&&(v.props=ve,v.state=v.__s,v.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.forEach(function(it){it&&(it.__=e)}),Te=0;Te<v._sb.length;Te++)v.__h.push(v._sb[Te]);v._sb=[],v.__h.length&&l.push(v);break e}null!=v.componentWillUpdate&&v.componentWillUpdate(ve,v.__s,we),null!=v.componentDidUpdate&&v.__h.push(function(){v.componentDidUpdate(W,re,me)})}if(v.context=we,v.props=ve,v.__P=i,v.__e=!1,We=rt.__r,He=0,"prototype"in Fe&&Fe.prototype.render){for(v.state=v.__s,v.__d=!1,We&&We(e),x=v.render(v.props,v.state,v.context),je=0;je<v._sb.length;je++)v.__h.push(v._sb[je]);v._sb=[]}else do{v.__d=!1,We&&We(e),x=v.render(v.props,v.state,v.context),v.state=v.__s}while(v.__d&&++He<25);v.state=v.__s,null!=v.getChildContext&&(n=Ei(Ei({},n),v.getChildContext())),U||null==v.getSnapshotBeforeUpdate||(me=v.getSnapshotBeforeUpdate(W,re)),Ep(i,Vr(ke=null!=x&&x.type===Xt&&null==x.key?x.props.children:x)?ke:[ke],e,t,n,r,a,l,c,b,h),v.base=e.__e,e.__u&=-161,v.__h.length&&l.push(v),ue&&(v.__E=v.__=null)}catch(it){e.__v=null,b||null!=a?(e.__e=c,e.__u|=b?160:32,a[a.indexOf(c)]=null):(e.__e=t.__e,e.__k=t.__k),rt.__e(it,e,t)}else null==a&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=function hu(i,e,t,n,r,a,l,c,b){var h,x,v,U,W,re,me,ue=t.props,ve=e.props,he=e.type;if("svg"===he?r="http://www.w3.org/2000/svg":"math"===he?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=a)for(h=0;h<a.length;h++)if((W=a[h])&&"setAttribute"in W==!!he&&(he?W.localName===he:3===W.nodeType)){i=W,a[h]=null;break}if(null==i){if(null===he)return document.createTextNode(ve);i=document.createElementNS(r,he,ve.is&&ve),a=null,c=!1}if(null===he)ue===ve||c&&i.data===ve||(i.data=ve);else{if(a=a&&yo.call(i.childNodes),ue=t.props||go,!c&&null!=a)for(ue={},h=0;h<i.attributes.length;h++)ue[(W=i.attributes[h]).name]=W.value;for(h in ue)if(W=ue[h],"children"!=h)if("dangerouslySetInnerHTML"==h)v=W;else if("key"!==h&&!(h in ve)){if("value"==h&&"defaultValue"in ve||"checked"==h&&"defaultChecked"in ve)continue;Gr(i,h,null,W,r)}for(h in ve)W=ve[h],"children"==h?U=W:"dangerouslySetInnerHTML"==h?x=W:"value"==h?re=W:"checked"==h?me=W:"key"===h||c&&"function"!=typeof W||ue[h]===W||Gr(i,h,W,ue[h],r);if(x)c||v&&(x.__html===v.__html||x.__html===i.innerHTML)||(i.innerHTML=x.__html),e.__k=[];else if(v&&(i.innerHTML=""),Ep(i,Vr(U)?U:[U],e,t,n,"foreignObject"===he?"http://www.w3.org/1999/xhtml":r,a,l,a?a[0]:t.__k&&gn(t,0),c,b),null!=a)for(h=a.length;h--;)null!=a[h]&&wp(a[h]);c||(h="value",void 0!==re&&(re!==i[h]||"progress"===he&&!re||"option"===he&&re!==ue[h])&&Gr(i,h,re,ue[h],r),h="checked",void 0!==me&&me!==i[h]&&Gr(i,h,me,ue[h],r))}return i}(t.__e,e,t,n,r,a,l,b,h);(x=rt.diffed)&&x(e)}function Bp(i,e,t){e.__d=void 0;for(var n=0;n<t.length;n++)Qa(t[n],t[++n],t[++n]);rt.__c&&rt.__c(e,i),i.some(function(r){try{i=r.__h,r.__h=[],i.some(function(a){a.call(r)})}catch(a){rt.__e(a,r.__v)}})}function Qa(i,e,t){try{"function"==typeof i?i(e):i.current=e}catch(n){rt.__e(n,t)}}function Xa(i,e,t){var n,r;if(rt.unmount&&rt.unmount(i),(n=i.ref)&&(n.current&&n.current!==i.__e||Qa(n,null,e)),null!=(n=i.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(a){rt.__e(a,e)}n.base=n.__P=null}if(n=i.__k)for(r=0;r<n.length;r++)n[r]&&Xa(n[r],e,t||"function"!=typeof i.type);t||null==i.__e||wp(i.__e),i.__c=i.__=i.__e=i.__d=void 0}function mu(i,e,t){return this.constructor(i,t)}function Ya(i,e,t){var n,r,a,l;rt.__&&rt.__(i,e),r=(n="function"==typeof t)?null:t&&t.__k||e.__k,a=[],l=[],Za(e,i=(!n&&t||e).__k=g(Xt,null,[i]),r||go,go,e.namespaceURI,!n&&t?[t]:r?null:e.firstChild?yo.call(e.childNodes):null,a,!n&&t?t:r?r.__e:e.firstChild,n,l),Bp(a,i,l)}function Tp(i,e,t){var n,r,a,l,c=Ei({},i.props);for(a in i.type&&i.type.defaultProps&&(l=i.type.defaultProps),e)"key"==a?n=e[a]:"ref"==a?r=e[a]:c[a]=void 0===e[a]&&void 0!==l?l[a
1]:e[a];return arguments.length>2&&(c.children=arguments.length>3?yo.call(arguments,2):t),bo(i.type,c,n||i.key,r||i.ref,null)}function Fp(i){return"object"==typeof i&&null!==i&&"nodeType"in i&&i.nodeType===Node.ELEMENT_NODE}yo=Cp.slice,rt={__e:function(i,e,t,n){for(var r,a,l;e=e.__;)if((r=e.__c)&&!r.__)try{if((a=r.constructor)&&null!=a.getDerivedStateFromError&&(r.setState(a.getDerivedStateFromError(i)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(i,n||{}),l=r.__d),l)return r.__E=r}catch(c){i=c}throw i}},vp=0,ti.prototype.setState=function(i,e){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Ei({},this.state),"function"==typeof i&&(i=i(Ei({},t),this.props)),i&&Ei(t,i),null!=i&&this.__v&&(e&&this._sb.push(e),Ga(this))},ti.prototype.forceUpdate=function(i){this.__v&&(this.__e=!0,i&&this.__h.push(i),Ga(this))},ti.prototype.render=Xt,yn=[],xp="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ka=function(i,e){return i.__v.__b-e.__v.__b},Hr.__r=0,$a=0,Va=Op(!1),Ha=Op(!0);const Up=function bu(i){for(var e;i&&!i.dir;)i=i.parentNode;return null==(e=i)?void 0:e.dir};function Mp(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var vu=0;function _u(i){return"__private_"+vu+++"_"+i}var vo=_u("updateUI");class Zr extends qo{constructor(){super(...arguments),Object.defineProperty(this,vo,{writable:!0,value:void 0})}getTargetPlugin(e){let t;if("function"==typeof e?.addTarget)t=e,t instanceof Zr||console.warn(new Error("The provided plugin is not an instance of UIPlugin. This is an indication of a bug with the way Uppy is bundled.",{cause:{targetPlugin:t,UIPlugin:Zr}}));else if("function"==typeof e){const n=e;this.uppy.iteratePlugins(r=>{r instanceof n&&(t=r)})}return t}mount(e,t){const n=t.id,r=function yu(i,e){return void 0===e&&(e=document),"string"==typeof i?e.querySelector(i):Fp(i)?i:null}(e);if(r){this.isTargetDOMEl=!0;const c=document.createElement("div");return c.classList.add("uppy-Root"),Mp(this,vo)[vo]=function xu(i){let t,e=null;return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return t=r,e||(e=Promise.resolve().then(()=>(e=null,i(...t)))),e}}(b=>{this.uppy.getPlugin(this.id)&&(Ya(this.render(b),c),this.afterUpdate())}),this.uppy.log(`Installing ${n} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(r.innerHTML=""),Ya(this.render(this.uppy.getState()),c),this.el=c,r.appendChild(c),c.dir=this.opts.direction||Up(c)||"ltr",this.onMount(),this.el}const a=this.getTargetPlugin(e);
1if(a)return this.uppy.log(`Installing ${n} to ${a.id}`),this.parent=a,this.el=a.addTarget(t),this.onMount(),this.el;this.uppy.log(`Not installing ${n}`);let l=`Invalid target option given to ${n}.`;throw l+="function"==typeof e?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(l)}render(e){throw new Error("Extend the render method to add your plugin to a DOM element")}update(e){var t,n;null!=this.el&&(null==(t=(n=Mp(this,vo))[vo])||t.call(n,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove()),this.onUnmount()}onMount(){}onUnmount(){}}const An=Zr;
1function Ap(i,e,t,n){return 0===t||i===e?i:0===n?e:i+(e-i)*2**(-n/t)}const hi={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"};var Mt=s(85822);function Ja(i){const e=[];let n,t="indeterminate";for(const{progress:a}of Object.values(i)){const{preprocess:l,postprocess:c}=a;null==n&&(l||c)&&({mode:t,message:n}=l||c),"determinate"===l?.mode&&e.push(l.value),"determinate"===c?.mode&&e.push(c.value)}return{mode:t,message:n,value:e.reduce((a,l)=>a+l/e.length,0)}}function Cu(i){const e=function Su(i){return{hours:Math.floor(i/3600)%24,minutes:Math.floor(i/60)%60,seconds:Math.floor(i%60)}}(i);return`${0===e.hours?"":`${e.hours}h`}${0===e.minutes?"":`${0===e.hours?e.minutes:` ${e.minutes.toString(10).padStart(2,"0")}`}m`}${0!==e.hours?"":`${0===e.minutes?e.seconds:` ${e.seconds.toString(10).padStart(2,"0")}`}s`}`}const Rp=()=>" \xb7 ";function Iu(i){const{newFiles:e,isUploadStarted:t,recoveredState:n,i18n:r,uploadState:a,isSomeGhost:l,startUpload:c}=i,b=Mt("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":a===hi.STATE_WAITING},{"uppy-StatusBar-actionBtn--disabled":l}),h=r(e&&t&&!n?"uploadXNewFiles":"uploadXFiles",{smart_count:e});return g("button",{type:"button",className:b,"aria-label":r("uploadXFiles",{smart_count:e}),onClick:c,disabled:l,"data-uppy-super-focusable":!0},h)}function Eu(i){const{i18n:e,uppy:t}=i;return g("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":e("retryUpload"),onClick:()=>t.retryAll().catch(()=>{}),"data-uppy-super-focusable":!0,"data-cy":"retry"},g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"8",height:"10",viewBox:"0 0 8 10"},g("path",{d:"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z"})),e("retry"))}function Du(i){const{i18n:e,uppy:t}=i;return g("button",{type:"button",className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:e("cancel"),"aria-label":e("cancel"),onClick:()=>t.cancelAll(),"data-cy":"cancel","data-uppy-super-focusable":!0},g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},g("g",{fill:"none",fillRule:"evenodd"},g("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),g("path",{fill:"#FFF",d:"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z"}))))}function Pu(i){const{isAllPaused:e,i18n:t,isAllComplete:n,resumableUploads:r,uppy:a}=i,l=t(e?"resume":"pause");return g("button",{title:l,"aria-label":l,className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onClick:function c(){if(!n){if(!r)return void a.cancelAll();if(e)return void a.resumeAll();a.pauseAll()}},"data-cy":"togglePauseResume","data-uppy-super-focusable":!0},g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},g("g",{fill:"none",fillRule:"evenodd"},g("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),g("path",{fill:"#FFF",d:e?"M6 4.25L11.5 8 6 11.75z":"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z"}))))}function Ou(i){const{i18n:e,doneButtonHandler:t}=i;return g("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done",onClick:t,"data-uppy-super-focusable":!0},e("done"))}function kp(){return g("svg",{className:"uppy-StatusBar-spinner","aria-hidden":"true",focusable:"false",width:"14",height:"14"},g("path",{d:"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0",fillRule:"evenodd"}))}function Bu(i){const{progress:e}=i,{value:t,mode:n,message:r}=e;return g("div",{className:"uppy-StatusBar-content"},g(kp,null),"determinate"===n?`${Math.round(100*t)}% \xb7 `:"",r)}function Tu(i){const{numUploads:e,complete:t,totalUploadedSize:n,totalSize:r,totalETA:a,i18n:l}=i,c=e>1;return g("div",{className:"uppy-StatusBar-statusSecondary"},c&&l("filesUploadedOfTotal",{complete:t,smart_count:e}),g("span",{className:"uppy-StatusBar-additionalInfo"},c&&Rp(),l("dataUploadedOfTotal",{complete:Ne(n),total:Ne(r)}),Rp(),l("xTimeLeft",{time:Cu(a)})))}function Lp(i){const{i18n:e,complete:t,numUploads:n}=i;return g("div",{className:"uppy-StatusBar-statusSecondary"},e("filesUploadedOfTotal",{complete:t,smart_count:n}))}function Fu(i){const{i18n:e,newFiles:t,startUpload:n}=i,r=Mt("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return g("div",{className:"uppy-StatusBar-statusSecondary"},g("div",{className:"uppy-StatusBar-statusSecondaryHint"},e("xMoreFilesAdded",{smart_count:t})),g("button",{type:"button",className:r,"aria-label":e("uploadXFiles",{smart_count:t}),onClick:n},e("upload")))}function Uu(i){const{i18n:e,supportsUploadProgress:t,totalProgress:n,showProgressDetail
1s:r,isUploadStarted:a,isAllComplete:l,isAllPaused:c,newFiles:b,numUploads:h,complete:x,totalUploadedSize:v,totalSize:U,totalETA:W,startUpload:re}=i,me=b&&a;if(!a||l)return null;const ue=e(c?"paused":"uploading");return g("div",{className:"uppy-StatusBar-content","aria-label":ue,title:ue},c?null:g(kp,null),g("div",{className:"uppy-StatusBar-status"},g("div",{className:"uppy-StatusBar-statusPrimary"},t?`${ue}: ${n}%`:ue),function ve(){return c||me||!r?null:t?g(Tu,{numUploads:h,complete:x,totalUploadedSize:v,totalSize:U,totalETA:W,i18n:e}):g(Lp,{i18n:e,complete:x,numUploads:h})}(),me?g(Fu,{i18n:e,newFiles:b,startUpload:re}):null))}function Mu(i){const{i18n:e}=i;return g("div",{className:"uppy-StatusBar-content",role:"status",title:e("complete")},g("div",{className:"uppy-StatusBar-status"},g("div",{className:"uppy-StatusBar-statusPrimary"},g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"15",height:"11",viewBox:"0 0 15 11"},g("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})),e("complete"))))}function Au(i){const{error:e,i18n:t,complete:n,numUploads:r}=i;return g("div",{className:"uppy-StatusBar-content",title:t("uploadFailed")},g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11"},g("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})),g("div",{className:"uppy-StatusBar-status"},g("div",{className:"uppy-StatusBar-statusPrimary"},t("uploadFailed"),g("button",{className:"uppy-u-reset uppy-StatusBar-details","aria-label":t("showErrorDetails"),"data-microtip-position":"top-right","data-microtip-size":"medium",onClick:function a(){const l=`${t("uploadFailed")} \n\n ${e}`;alert(l)},type:"button"},"?")),g(Lp,{i18n:t,complete:n,numUploads:r})))}const{STATE_ERROR:jp,STATE_WAITING:zp,STATE_PREPROCESSING:qa,STATE_UPLOADING:Qr,STATE_POSTPROCESSING:el,STATE_COMPLETE:Xr}=hi;function Np(i){const{newFiles:e,allowNewUpload:t,isUploadInProgress:n,isAllPaused:r,resumableUploads:a,error:l,hideUploadButton:c,hidePauseResumeButton:b,hideCancelButton:h,hideRetryButton:x,recoveredState:v,uploadState:U,totalProgress:W,files:re,supportsUploadProgress:me,hideAfterFinish:ue,isSomeGhost:ve,doneButtonHandler:he,isUploadStarted:we,i18n:Te,startUpload:We,uppy:He,isAllComplete:je,showProgressDetails:ke,numUploads:Fe,complete:it,totalSize:St,totalETA:ut,totalUploadedSize:Ct}=i,A=function ft(){switch(U){case el:case qa:{const yt=Ja(re);return"determinate"===yt.mode?100*yt.value:W}case jp:return null;case Qr:return me?W:null;default:return W}}(),V=function Z(){if(v)return!1;switch(U){case zp:return c||0===e;case Xr:return ue;default:return!1}}(),ce=A??100,_e=!l&&e&&!n&&!r&&t&&!c,fe=!h&&U!==zp&&U!==Xr,Ue=a&&!b&&U===Qr,$e=l&&!je&&!x,Ye=he&&U===Xr,It=Mt("uppy-StatusBar-progress",{"is-indeterminate":function wt(){switch(U){case el:case qa:{const{mode:yt}=Ja(re);return"indeterminate"===yt}case Qr:return!me;default:return!1}}()});return g("div",{className:Mt("uppy-StatusBar",`is-${U}`,{"has-ghosts":ve}),"aria-hidden":V},g("div",{className:It,style:{width:`${ce}%`},role:"progressbar","aria-label":`${ce}%`,"aria-valuetext":`${ce}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":A}),(()=>{switch(U){case qa:case el:return g(Bu,{progress:Ja(re)});case Xr:return g(Mu,{i18n:Te});case jp:return g(Au,{error:l,i18n:Te,numUploads:Fe,complete:it});case Qr:return g(Uu,{i18n:Te,supportsUploadProgress:me,totalProgress:W,showProgressDetails:ke,isUploadStarted:we,isAllComplete:je,isAllPaused:r,newFiles:e,numUploads:Fe,complete:it,totalUploadedSize:Ct,totalSize:St,totalETA:ut,startUpload:We});default:return null}})(),g("div",{className:"uppy-StatusBar-actions"},v||_e?g(Iu,{newFiles:e,isUploadStarted:we,recoveredState:v,i18n:Te,isSomeGhost:ve,startUpload:We,uploadState:U}):null,$e?g(Eu,{i18n:Te,uppy:He}):null,Ue?g(Pu,{isAllPaused:r,i18n:Te,isAllComplete:je,resumableUploads:a,uppy:He}):null,fe?g(Du,{i18n:Te,uppy:He}):null,Ye?g(Ou,{i18n:Te,doneButtonHandler:he}):null))}Np.defaultProps={doneButtonHandler:void 0,hideAfterFinish:!1,hideCancelButton:!1,hidePauseResumeButton:!1,hideRetryButton:!1,hideUploadButton:void 0,showProgressDetail
1s:void 0};const Ru={strings:{uploading:"Uploading",complete:"Complete",uploadFailed:"Upload failed",paused:"Paused",retry:"Retry",cancel:"Cancel",pause:"Pause",resume:"Resume",done:"Done",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},dataUploadedOfTotal:"%{complete} of %{total}",xTimeLeft:"%{time} left",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},upload:"Upload",retryUpload:"Retry upload",xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"},showErrorDetails:"Show error details"}};function st(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var ku=0;function Rn(i){return"__private_"+ku+++"_"+i}const ju=2e3,zu=2e3;function Nu(i,e,t,n){if(i)return hi.STATE_ERROR;if(e)return hi.STATE_COMPLETE;if(t)return hi.STATE_WAITING;let r=hi.STATE_WAITING;const a=Object.keys(n);for(let l=0;l<a.length;l++){const{progress:c}=n[a[l]];if(c.uploadStarted&&!c.uploadComplete)return hi.STATE_UPLOADING;c.preprocess&&(r=hi.STATE_PREPROCESSING),c.postprocess&&r!==hi.STATE_PREPROCESSING&&(r=hi.STATE_POSTPROCESSING)}return r}const Wu={target:"body",hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0,doneButtonHandler:null};var Yt=Rn("lastUpdateTime"),ii=Rn("previousUploadedBytes"),Pi=Rn("previousSpeed"),$t=Rn("previousETA"),tl=Rn("computeSmoothETA"),_o=Rn("onUploadStart");class Wp extends An{constructor(e,t){super(e,{...Wu,...t}),Object.defineProperty(this,tl,{value:Ku}),Object.defineProperty(this,Yt,{writable:!0,value:void 0}),Object.defineProperty(this,ii,{writable:!0,value:void 0}),Object.defineProperty(this,Pi,{writable:!0,value:void 0}),Object.defineProperty(this,$t,{writable:!0,value:void 0}),this.startUpload=()=>this.uppy.upload().catch(()=>{}),Object.defineProperty(this,_o,{writable:!0,value:()=>{const{recoveredState:n}=this.uppy.getState();if(st(this,Pi)[Pi]=null,st(this,$t)[$t]=null,n)return st(this,ii)[ii]=Object.values(n.files).reduce((r,a)=>{let{progress:l}=a;return r+l.bytesUploaded},0),void this.uppy.emit("restore-confirmed");st(this,Yt)[Yt]=performance.now(),st(this,ii)[ii]=0}}),this.id=this.opts.id||"StatusBar",this.title="StatusBar",this.type="progressindicator",this.defaultLocale=Ru,this.i18nInit(),this.render=this.render.bind(this),this.install=this.install.bind(this)}render(e){const{capabilities:t,files:n,allowNewUpload:r,totalProgress:a,error:l,recoveredState:c}=e,{newFiles:b,startedFiles:h,completeFiles:x,isUploadStarted:v,isAllComplete:U,isAllErrored:W,isAllPaused:re,isUploadInProgress:me,isSomeGhost:ue}=this.uppy.getObjectOfFilesPerState(),ve=c?Object.values(n):b,he=!!t.resumableUploads,we=!1!==t.uploadProgress;let Te=0,We=0;h.forEach(je=>{Te+=je.progress.bytesTotal||0,We+=je.progress.bytesUploaded||0});const He=st(this,tl)[tl]({uploaded:We,total:Te,remaining:Te-We});return Np({error:l,uploadState:Nu(l,U,c,e.files||{}),allowNewUpload:r,totalProgress:a,totalSize:Te,totalUploadedSize:We,isAllComplete:!1,isAllPaused:re,isAllErrored:W,isUploadStarted:v,isUploadInProgress:me,isSomeGhost:ue,recoveredState:c,complete:x.length,newFiles:ve.length,numUploads:h.length,totalETA:He,files:n,i18n:this.i18n,uppy:this.uppy,startUpload:this.startUpload,doneButtonHandler:this.opts.doneButtonHandler,resumableUploads:he,supportsUploadProgress:we,showProgressDetails:this.opts.showProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideAfterFinish:this.opts.hideAfterFinish,isTargetDOMEl:this.isTargetDOMEl})}onMount(){const e=this.el;Up(e)||(e.dir="ltr")}install(){const{target:e}=this.opts;e&&this.mount(e,this),this.uppy.on("upload",st(this,_o)[_o]),st(this,Yt)[Yt]=performance.now(),st(this,ii)[ii]=this.uppy.getFiles().reduce((t,n)=>t+n.progress.bytesUploaded,0)}uninstall(){this.unmount(),this.uppy.off("upload",st(this,_o)[_o])}}function Ku(i){var e;if(0===i.total||0===i.remaining)return 0;null!=(e=st(this,Yt))[Yt]||(e[Yt]=performance.now());const n=performance.now()-st(this,Yt)[Yt];var r;if(0===n)return Math.round((null!=(r=st(this,$t)[$t])?r:0)/100)/10;const a=i.uploaded-st(this,ii)[ii];var l;if(st(this,ii)[ii]=i.uploaded,a<=0)return Math.round((null!=(l=st(this,$t)[$t])?l:0)/100)/10;const c=a/n,b=null==st(this,Pi)[Pi]?c:Ap(c,st(this,Pi)[Pi],ju,n);st(this,Pi)[Pi]=b;const h=i.remaining/b,x=Math.max(st(this,$t)[$t]-n,0),v=null==st(this,$t)[$t]?h:Ap(h,x,zu,n);return st(this,$t)[$t]=v,st(this,Yt)[Yt]=performance.now(),Math.round(v/100)/10}Wp.VERSION="3.3.3";class $u extends ti{constructor(){super(...arguments),this.ref={current:null}}componentWillEnter(e){this.ref.current.style.opacity="1",this.ref.current.style.transform="none",setTimeout(e,3
100)}componentWillLeave(e){this.ref.current.style.opacity="0",this.ref.current.style.transform="translateY(350%)",setTimeout(e,300)}render(){const{children:e}=this.props;return g("div",{className:"uppy-Informer-animated",ref:this.ref},e)}}function Hu(i,e){var t;return null!=(t=i?.key)?t:e}function xo(i){const e={};for(let t=0;t<i.length;t++)null!=i[t]&&(e[Hu(i[t],t.toString(36))]=i[t]);return e}function Zu(i,e){i=i||{},e=e||{};const t=l=>e.hasOwnProperty(l)?e[l]:i[l],n={};let r=[];for(const l in i)e.hasOwnProperty(l)?r.length&&(n[l]=r,r=[]):r.push(l);const a={};for(const l in e){if(n.hasOwnProperty(l))for(let c=0;c<n[l].length;c++)a[n[l][c]]=t(n[l][c]);a[l]=t(l)}for(let l=0;l<r.length;l++)a[r[l]]=t(r[l]);return a}const Qu=i=>i,Xu=(()=>{class i extends ti{constructor(t,n){super(t,n),this.refs={},this.state={children:xo(Di(Di(this.props.children))||[])},this.performAppear=this.performAppear.bind(this),this.performEnter=this.performEnter.bind(this),this.performLeave=this.performLeave.bind(this)}componentWillMount(){this.currentlyTransitioningKeys={},this.keysToAbortLeave=[],this.keysToEnter=[],this.keysToLeave=[]}componentDidMount(){const t=this.state.children;for(const n in t)t[n]&&this.performAppear(n)}componentWillReceiveProps(t){const n=xo(Di(t.children)||[]),r=this.state.children;let a;for(a in this.setState(l=>({children:Zu(l.children,n)})),n)if(n.hasOwnProperty(a)){const l=r&&r.hasOwnProperty(a);n[a]&&l&&this.currentlyTransitioningKeys[a]?(this.keysToEnter.push(a),this.keysToAbortLeave.push(a)):n[a]&&!l&&!this.currentlyTransitioningKeys[a]&&this.keysToEnter.push(a)}for(a in r)if(r.hasOwnProperty(a)){const l=n&&n.hasOwnProperty(a);r[a]&&!l&&!this.currentlyTransitioningKeys[a]&&this.keysToLeave.push(a)}}componentDidUpdate(){const{keysToEnter:t}=this;this.keysToEnter=[],t.forEach(this.performEnter);const{keysToLeave:n}=this;this.keysToLeave=[],n.forEach(this.performLeave)}_finishAbort(t){const n=this.keysToAbortLeave.indexOf(t);-1!==n&&this.keysToAbortLeave.splice(n,1)}performAppear(t){this.currentlyTransitioningKeys[t]=!0;const n=this.refs[t];null!=n&&n.componentWillAppear?n.componentWillAppear(this._handleDoneAppearing.bind(this,t)):this._handleDoneAppearing(t)}_handleDoneAppearing(t){const n=this.refs[t];null!=n&&n.componentDidAppear&&n.componentDidAppear(),delete this.currentlyTransitioningKeys[t],this._finishAbort(t);const r=xo(Di(this.props.children)||[]);(!r||!r.hasOwnProperty(t))&&this.performLeave(t)}performEnter(t){this.currentlyTransitioningKeys[t]=!0;const n=this.refs[t];null!=n&&n.componentWillEnter?n.componentWillEnter(this._handleDoneEntering.bind(this,t)):this._handleDoneEntering(t)}_handleDoneEntering(t){const n=this.refs[t];null!=n&&n.componentDidEnter&&n.componentDidEnter(),delete this.currentlyTransitioningKeys[t],this._finishAbort(t);const r=xo(Di(this.props.children)||[]);(!r||!r.hasOwnProperty(t))&&this.performLeave(t)}performLeave(t){if(-1!==this.keysToAbortLeave.indexOf(t))return;this.currentlyTransitioningKeys[t]=!0;const r=this.refs[t];null!=r&&r.componentWillLeave?r.componentWillLeave(this._handleDoneLeaving.bind(this,t)):this._handleDoneLeaving(t)}_handleDoneLeaving(t){if(-1!==this.keysToAbortLeave.indexOf(t))return;const r=this.refs[t];null!=r&&r.componentDidLeave&&r.componentDidLeave(),delete this.currentlyTransitioningKeys[t];const a=xo(Di(this.props.children)||[]);if(a&&a.hasOwnProperty(t))this.performEnter(t);else{const l=function Vu(i,e){return Object.assign(i,e)}({},this.state.children);delete l[t],this.setState({children:l})}}render(t,n){let{childFactory:r,transitionLeave:a,transitionName:l,transitionAppear:c,transitionEnter:b,transitionLeaveTimeout:h,transitionEnterTimeout:x,transitionAppearTimeout:v,component:U,...W}=t,{children:re}=n;const me=Object.entries(re).map(ue=>{let[ve,he]=ue;if(!he)return;const we=function Gu(i,e){const t=i._ptgLinkedRefs||(i._ptgLinkedRefs={});return t[e]||(t[e]=n=>{i.refs[e]=n})}(this,ve);return Tp(r(he),{ref:we,key:ve})}).filter(Boolean);return g(U,W,me)}}return i.defaultProps={component:"span",childFactory:Qu},i})();class $p extends An{constructor(e,t){super(e,t),this.render=n=>g("div",{className:"uppy uppy-Informer"},g(Xu,null,n.info.map(r=>g($u,{key:r.message},g("p",{role:"alert"},r.message," ",r.details&&g("span",{"aria-label":r.details,"data-microtip-position":"top-left","data-microtip-size":"medium",role:"tooltip",onClick:()=>alert(`${r.message} \n\n ${r.details}`)},"?")))))),this.type="progressindicator",this.id=this.opts.id||"Informer",this.title="Informer"}install(){const{target:e}=this.opts;e&&this.mount(e,this)}}$p.VERSION="3.1.0";const Ju=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;function Vp(i){return i.startsWith("blob:")}function Hp(i){return!!i&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(i)}function qe(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}var Gp=typeof self<"u"?self:global;const So=typeof navigator<"u",th=So&&typeof HTMLImageElement>"u",Zp=!(typeof global>"u"||typeof process>"u"||!process.versions||!process.versions.node),il=Gp.Buffer,nl=!!il,ih=i=>void 0!==i;function Qp(i){return void 0===i||(i instanceof Map?0===i.size:0===Object.values(i).filter(ih).length)}function xt(i){let e=new Error(i);throw delete e.stack,e}function Xp(i){let e=function(t){let n=0;return t.ifd0.enabled&&(n+=1024),t.exif.enabled&&(n+=2048),t.makerNote&&(n+=2048),t.userComment&&(n+=1024),t.gps.enabled&&(n+=512),t.interop.enabled&&(n+=100),t.ifd1.enabled&&(n+=1024),n+2048}(i);return i.jfif.enabled&&(e+=50),i.xmp.enabled&&(e+=2e4),i.iptc.enabled&&(e+=14e3),i.icc.enabled&&(e+=6e3),e}const ol=i=>String.fromCharCode.apply(null,i),Yp=typeof TextDecoder<"u"?new TextDecoder("utf-8"):void 0;
1class ni{static from(e,t){return e instanceof this&&e.le===t?e:new ni(e,void 0,void 0,t)}constructor(e,t=0,n,r){if("boolean"==typeof r&&(this.le=r),Array.isArray(e)&&(e=new Uint8Array(e)),0===e)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){void 0===n&&(n=e.byteLength-t);let a=new DataView(e,t,n);this._swapDataView(a)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof ni){void 0===n&&(n=e.byteLength-t),(t+=e.byteOffset)+n>e.byteOffset+e.byteLength&&xt("Creating view outside of available memory in ArrayBuffer");let a=new DataView(e.buffer,t,n);this._swapDataView(a)}else if("number"==typeof e){let a=new DataView(new ArrayBuffer(e));this._swapDataView(a)}else xt("Invalid input argument for BufferView: "+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t,n=ni){return e instanceof DataView||e instanceof ni?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||xt("BufferView.set(): Invalid data argument."),this.toUint8().set(e,t),new n(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new ni(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(e=0,t=this.byteLength){return r=this.getUint8Array(e,t),Yp?Yp.decode(r):nl?Buffer.from(r).toString("utf8"):decodeURIComponent(escape(ol(r)));var r}getLatin1String(e=0,t=this.byteLength){let n=this.getUint8Array(e,t);return ol(n)}getUnicodeString(e=0,t=this.byteLength){const n=[];for(let r=0;r<t&&e+r<this.byteLength;r+=2)n.push(this.getUint16(e+r));return ol(n)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e,t=this.le){return this.dataView.getInt16(e,t)}getInt32(e,t=this.le){return this.dataView.getInt32(e,t)}getUint16(e,t=this.le){return this.dataView.getUint16(e,t)}getUint32(e,t=this.le){return this.dataView.getUint32(e,t)}getFloat32(e,t=this.le){return this.dataView.getFloat32(e,t)}getFloat64(e,t=this.le){return this.dataView.getFloat64(e,t)}getFloat(e,t=this.le){return this.dataView.getFloat32(e,t)}getDouble(e,t=this.le){return this.dataView.getFloat64(e,t)}getUintBytes(e,t,n){switch(t){case 1:return this.getUint8(e,n);case 2:return this.getUint16(e,n);case 4:return this.getUint32(e,n);case 8:return this.getUint64&&this.getUint64(e,n)}}getUint(e,t,n){switch(t){case 8:return this.getUint8(e,n);case 16:return this.getUint16(e,n);case 32:return this.getUint32(e,n);case 64:return this.getUint64&&this.getUint64(e,n)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}}function rl(i,e){xt(`${i} '${e}' was not loaded, try using full build of exifr.`)}class sl extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||rl(this.kind,e),t&&(e in t||xt(`Unknown ${this.kind} '${e}'.`),t[e].enabled||rl(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var Yr=new sl("file parser"),Vt=new sl("segment parser"),Co=new sl("file reader");let nh=Gp.fetch;function Jp(i,e){return(t=i).startsWith("data:")||t.length>1e4?pl(i,e,"base64"):Zp&&i.includes("://")?al(i,e,"url",Jr):Zp?pl(i,e,"fs"):So?al(i,e,"url",Jr):void xt("Invalid input argument");var t}function al(i,e,t,n){return ll.apply(this,arguments)}function ll(){return ll=(0,d.Z)(function*(i,e,t,n){return Co.has(t)?pl(i,e,t):n?(r=(0,d.Z)(function*(a,l){let c=yield l(a);return new ni(c)}),function(a,l){return r.apply(this,arguments)})(i,n):void xt(`Parser ${t} is not loaded`);var r}),ll.apply(this,arguments)}function pl(i,e,t){return dl.apply(this,arguments)}function dl(){return(dl=(0,d.Z)(function*(i,e,t){let n=new(Co.get(t))(i,e);return yield n.read(),n})).apply(this,arguments)}const Jr=i=>nh(i).then(e=>e.arrayBuffer()),wo=i=>new Promise((e,t)=>{let n=new FileReader;n.onloadend=()=>e(n.result||new ArrayBuffer),n.onerror=t,n.readAsArrayBuffer(i)});class oh extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())
vendor: 5,130 bytes, line 1
1),this.allValues}}function qp(i,e,t){let n=new oh;for(let[r,a]of t)n.set(r,a);if(Array.isArray(e))for(let r of e)i.set(r,n);else i.set(e,n);return n}function ed(i,e,t){let n,r=i.get(e);for(n of t)r.set(n[0],n[1])}const Io=new Map,cl=new Map,ul=new Map,kn=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],qr=["jfif","xmp","icc","iptc","ihdr"],Eo=["tiff",...qr],mt=["ifd0","ifd1","exif","gps","interop"],Ln=[...Eo,...mt],jn=["makerNote","userComment"],es=["translateKeys","translateValues","reviveValues","multiSegment"],zn=[...es,"sanitize","mergeOutput","silentErrors"];class td{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class Do extends td{get needed(){return this.enabled||this.deps.size>0}constructor(e,t,n,r){if(super(),qe(this,"enabled",!1),qe(this,"skip",new Set),qe(this,"pick",new Set),qe(this,"deps",new Set),qe(this,"translateKeys",!1),qe(this,"translateValues",!1),qe(this,"reviveValues",!1),this.key=e,this.enabled=t,this.parse=this.enabled,this.applyInheritables(r),this.canBeFiltered=mt.includes(e),this.canBeFiltered&&(this.dict=Io.get(e)),void 0!==n)if(Array.isArray(n))this.parse=this.enabled=!0,this.canBeFiltered&&n.length>0&&this.translateTagSet(n,this.pick);else if("object"==typeof n){if(this.enabled=!0,this.parse=!1!==n.parse,this.canBeFiltered){let{pick:a,skip:l}=n;a&&a.length>0&&this.translateTagSet(a,this.pick),l&&l.length>0&&this.translateTagSet(l,this.skip)}this.applyInheritables(n)}else!0===n||!1===n?this.parse=this.enabled=n:xt(`Invalid options argument: ${n}`)}applyInheritables(e){let t,n;for(t of es)n=e[t],void 0!==n&&(this[t]=n)}translateTagSet(e,t){if(this.dict){let n,r,{tagKeys:a,tagValues:l}=this.dict;for(n of e)"string"==typeof n?(r=l.indexOf(n),-1===r&&(r=a.indexOf(Number(n))),-1!==r&&t.add(Number(a[r]))):t.add(n)}else for(let n of e)t.add(n)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,ts(this.pick,this.deps)):this.enabled&&this.pick.size>0&&ts(this.pick,this.deps)}}var At={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},id=new Map;class Po extends td{static useCached(e){let t=id.get(e);return void 0!==t||(t=new this(e),id.set(e,t)),t}constructor(e){super(),!0===e?this.setupFromTrue():void 0===e?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):"object"==typeof e?this.setupFromObject(e):xt(`Invalid options argument ${e}`),void 0===this.firstChunkSize&&(this.firstChunkSize=So?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of kn)this[e]=At[e];for(e of zn)this[e]=At[e];for(e of jn)this[e]=At[e];for(e of Ln)this[e]=new Do(e,At[e],void 0,this)}setupFromTrue(){let e;for(e of kn)this[e]=At[e];for(e of zn)this[e]=At[e];for(e of jn)this[e]=!0;for(e of Ln)this[e]=new Do(e,!0,void 0,this)}setupFromArray(e){let t;for(t of kn)this[t]=At[t];for(t of zn)this[t]=At[t];for(t of jn)this[t]=At[t];for(t of Ln)this[t]=new Do(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,mt)}setupFromObject(e){let t;for(t of(mt.ifd0=mt.ifd0||mt.image,mt.ifd1=mt.ifd1||mt.thumbnail,Object.assign(this,e),kn))this[t]=hl(e[t],At[t]);for(t of zn)this[t]=hl(e[t],At[t]);for(t of jn)this[t]=hl(e[t],At[t]);for(t of Eo)this[t]=new Do(t,At[t],e[t],this);for(t of mt)this[t]=new Do(t,At[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,mt,Ln),!0===e.tiff?this.batchEnableWithBool(mt,!0):!1===e.tiff?this.batchEnableWithUserValue(mt,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,mt):"object"==typeof e.tiff&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,mt)}batchEnableWithBool(e,t){for(let n of e)this[n].enabled=t}batchEnableWithUserValue(e,t){for(let n of e){let r=t[n];this[n].enabled=!1!==r&&void 0!==r}}setupGlobalFilters(e,t,n,r=n){if(e&&e.length){for(let l of r)this[l].enabled=!1;let a=nd(e,n);for(let[l,c]of a)ts(this[l].pick,c),this[l].enabled=!0}else if(t&&t.length){let a=nd(t,n);for(let[l,c]of a)ts(this[l].skip,c)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:n,iptc:r,icc:a}=this;this.makerNote?t.deps.add(37500):t.skip.add(37500),this.userComment?t.deps.add(37510):t.skip.add(37510),n.enabled||e.skip.add(700),r.enabled||e.skip.add(33723),a.enabled||e.skip.add(34675)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:n,interop:r}=this;r.needed&&(t.deps.add(40965),e.deps.add(40965)),t.needed&&e.deps.add(34665),n.needed&&e.deps.add(34853),this.tiff.enabled=mt.some(a=>!0===this[a].enabled)||this.makerNote||this.userComment;for(let a of mt)this[a].finalizeFilters()}get onlyTiff(){return!qr.map(e=>this[e].enabled).some(e=>!0===e)&&this.tiff.enabled}checkLoadedPlugins(){for(let e of Eo)this[e].enabled&&!Vt.has(e)&&rl("segment parser",e)}}
1function nd(i,e){let t,n,r,a,l=[];for(r of e){for(a of(t=Io.get(r),n=[],t))(i.includes(a[0])||i.includes(a[1]))&&n.push(a[0]);n.length&&l.push([r,n])}return l}function hl(i,e){return void 0!==i?i:void 0!==e?e:void 0}function ts(i,e){for(let t of e)i.add(t)}qe(Po,"default",At);class Nn{constructor(e){qe(this,"parsers",{}),qe(this,"output",{}),qe(this,"errors",[]),qe(this,"pushToErrors",t=>this.errors.push(t)),this.options=Po.useCached(e)}read(e){var t=this;return(0,d.Z)(function*(){var n,r;t.file=yield(n=e,r=t.options,"string"==typeof n?Jp(n,r):So&&!th&&n instanceof HTMLImageElement?Jp(n.src,r):n instanceof Uint8Array||n instanceof ArrayBuffer||n instanceof DataView?new ni(n):So&&n instanceof Blob?al(n,r,"blob",wo):void xt("Invalid input argument"))})()}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[n,r]of Yr)if(r.canHandle(e,t))return this.fileParser=new r(this.options,this.file,this.parsers),e[n]=!0;this.file.close&&this.file.close(),xt("Unknown file format")}parse(){var e=this;return(0,d.Z)(function*(){let{output:t,errors:n}=e;return e.setup(),e.options.silentErrors?(yield e.executeParsers().catch(e.pushToErrors),n.push(...e.fileParser.errors)):yield e.executeParsers(),e.file.close&&e.file.close(),e.options.silentErrors&&n.length>0&&(t.errors=n),Qp(r=t)?void 0:r;var r})()}executeParsers(){var e=this;return(0,d.Z)(function*(){let{output:t}=e;yield e.fileParser.parse();let n=Object.values(e.parsers).map(function(){var r=(0,d.Z)(function*(a){let l=yield a.parse();a.assignToOutput(t,l)});return function(a){return r.apply(this,arguments)}}());e.options.silentErrors&&(n=n.map(r=>r.catch(e.pushToErrors))),yield Promise.all(n)})()}extractThumbnail(){var e=this;return(0,d.Z)(function*(){e.setup();let{options:t,file:n}=e,r=Vt.get("tiff",t);var a;if(n.tiff?a={start:0,type:"tiff"}:n.jpeg&&(a=yield e.fileParser.getOrFindSegment("tiff")),void 0===a)return;let l=yield e.fileParser.ensureSegmentChunk(a),c=e.parsers.tiff=new r(l,t,n),b=yield c.extractThumbnail();return n.close&&n.close(),b})()}}function od(i,e){return ml.apply(this,arguments)}function ml(){return(ml=(0,d.Z)(function*(i,e){let t=new Nn(e);return yield t.read(i),t.parse()})).apply(this,arguments)}var rh=Object.freeze({__proto__:null,parse:od,Exifr:Nn,fileParsers:Yr,segmentParsers:Vt,fileReaders:Co,tagKeys:Io,tagValues:cl,tagRevivers:ul,createDictionary:qp,extendDictionary:ed,fetchUrlAsArrayBuffer:Jr,readBlobAsArrayBuffer:wo,chunkedProps:kn,otherSegments:qr,segments:Eo,tiffBlocks:mt,segmentsAndBlocks:Ln,tiffExtractables:jn,inheritables:es,allFormatters:zn,Options:Po});class Wn{static findPosition(e,t){let n=e.getUint16(t+2)+2,r="function"==typeof this.headerLength?this.headerLength(e,t,n):this.headerLength,a=t+r,l=n-r;return{offset:t,length:n,headerLength:r,start:a,size:l,end:a+l}}static parse(e,t={}){return new this(e,new Po({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof ni?e:new ni(e)}constructor(e,t={},n){qe(this,"errors",[]),qe(this,"raw",new Map),qe(this,"handleError",r=>{if(!this.options.silentErrors)throw r;this.errors.push(r.message)}),this.chunk=this.normalizeInput(e),this.file=n,this.type=this.constructor.type,this.globalOptions=this.options=t,this.localOptions=t[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let n=ul.get(t),r=cl.get(t),a=Io.get(t),l=this.options[t],c=l.reviveValues&&!!n,b=l.translateValues&&!!r,h=l.translateKeys&&!!a,x={};for(let[v,U]of e)c&&n.has(v)?U=n.get(v)(U):b&&r.has(v)&&(U=this.translateValue(U,r.get(v))),h&&a.has(v)&&(v=a.get(v)||v),x[v]=U;return x}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,n){if(this.globalOptions.mergeOutput)return Object.assign(e,n);e[t]?Object.assign(e[t],n):e[t]=n}}function sh(i){return 192===i||194===i||196===i||219===i||221===i||218===i||254===i}function lh(i,e,t){for(let[n,r]of Vt)if(r.canHandle(i,e,t))return n}qe(Wn,"headerLength",4),qe(Wn,"type",void 0),qe(Wn,"multiSegment",!1),qe(Wn,"canHandle",()=>!1);class rd extends class{constructor(e,t,n){var r=this;qe(this,"errors",[]),qe(this,"ensureSegmentChunk",function(){var a=(0,d.Z)(function*(l){let c=l.start,b=l.size||65536;if(r.file.chunked)if(r.file.available(c,b))l.chunk=r.file.subarray(c,b);else try{l.chunk=yield r.file.readChunk(c,b)}catch(h){xt(`Couldn't read segment: ${JSON.stringify(l)}. ${h.message}`)}
1else r.file.byteLength>c+b?l.chunk=r.file.subarray(c,b):void 0===l.size?l.chunk=r.file.subarray(c):xt("Segment unreachable: "+JSON.stringify(l));return l.chunk});return function(l){return a.apply(this,arguments)}}()),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=t,this.parsers=n}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let n=new(Vt.get(e))(t,this.options,this.file);return this.parsers[e]=n}createParsers(e){for(let t of e){let{type:n,chunk:r}=t,a=this.options[n];if(a&&a.enabled){let l=this.parsers[n];l&&l.append||l||this.createParser(n,r)}}}readSegments(e){var t=this;return(0,d.Z)(function*(){let n=e.map(t.ensureSegmentChunk);yield Promise.all(n)})()}}{constructor(...e){super(...e),qe(this,"appSegments",[]),qe(this,"jpegSegments",[]),qe(this,"unknownSegments",[])}static canHandle(e,t){return 65496===t}parse(){var e=this;return(0,d.Z)(function*(){yield e.findAppSegments(),yield e.readSegments(e.appSegments),e.mergeMultiSegments(),e.createParsers(e.mergedAppSegments||e.appSegments)})()}setupSegmentFinderArgs(e){!0===e?(this.findAll=!0,this.wanted=new Set(Vt.keyList())):(e=void 0===e?Vt.keyList().filter(t=>this.options[t].enabled):e.filter(t=>this.options[t].enabled&&Vt.has(t)),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}findAppSegments(e=0,t){var n=this;return(0,d.Z)(function*(){n.setupSegmentFinderArgs(t);let{file:r,findAll:a,wanted:l,remaining:c}=n;if(!a&&n.file.chunked&&(a=Array.from(l).some(b=>Vt.get(b).multiSegment&&n.options[b].multiSegment),a&&(yield n.file.readWhole())),e=n.findAppSegmentsInRange(e,r.byteLength),!n.options.onlyTiff&&r.chunked){let b=!1;for(;c.size>0&&!b&&(r.canReadNextChunk||n.unfinishedMultiSegment);){let{nextChunkOffset:h}=r,x=n.appSegments.some(v=>!n.file.available(v.offset||v.start,v.length||v.size));if(b=e>h&&!x?!(yield r.readNextChunk(e)):!(yield r.readNextChunk(h)),void 0===(e=n.findAppSegmentsInRange(e,r.byteLength)))return}}})()}findAppSegmentsInRange(e,t){t-=2;let n,r,a,l,c,b,{file:h,findAll:x,wanted:v,remaining:U,options:W}=this;for(;e<t;e++)if(255===h.getUint8(e))if(n=h.getUint8(e+1),(i=n)>=224&&i<=239){if(r=h.getUint16(e+2),a=lh(h,e,r),a&&v.has(a)&&(l=Vt.get(a),c=l.findPosition(h,e),b=W[a],c.type=a,this.appSegments.push(c),!x&&(l.multiSegment&&b.multiSegment?(this.unfinishedMultiSegment=c.chunkNumber<c.chunkCount,this.unfinishedMultiSegment||U.delete(a)):U.delete(a),0===U.size)))break;W.recordUnknownSegments&&(c=Wn.findPosition(h,e),c.marker=n,this.unknownSegments.push(c)),e+=r+1}else if(sh(n)){if(r=h.getUint16(e+2),218===n&&!1!==W.stopAfterSos)return;W.recordJpegSegments&&this.jpegSegments.push({offset:e,length:r,marker:n}),e+=r+1}var i;return e}mergeMultiSegments(){if(!this.appSegments.some(t=>t.multiSegment))return;let e=function(t,n){let r,a,l,c=new Map;for(let b=0;b<t.length;b++)r=t[b],a=r.type,c.has(a)?l=c.get(a):c.set(a,l=[]),l.push(r);return Array.from(c)}(this.appSegments);this.mergedAppSegments=e.map(([t,n])=>{let r=Vt.get(t,this.options);return r.handleMultiSegments?{type:t,chunk:r.handleMultiSegments(n)}:n[0]})}getSegment(e){return this.appSegments.find(t=>t.type===e)}getOrFindSegment(e){var t=this;return(0,d.Z)(function*(){let n=t.getSegment(e);return void 0===n&&(yield t.findAppSegments(0,[e]),n=t.getSegment(e)),n})()}}qe(rd,"type","jpeg"),Yr.set("jpeg",rd);const ph=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class dh extends Wn{parseHeader(){var e=this.chunk.getUint16();18761===e?this.le=!0:19789===e&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t,n=new Map){let{pick:r,skip:a}=this.options[t];r=new Set(r);let l=r.size>0,c=0===a.size,b=this.chunk.getUint16(e);e+=2;for(let h=0;h<b;h++){let x=this.chunk.getUint16(e);if(l){if(r.has(x)&&(n.set(x,this.parseTag(e,x,t)),r.delete(x),0===r.size))break}else!c&&a.has(x)||n.set(x,this.parseTag(e,x,t));e+=12}return n}parseTag(e,t,n){let{chunk:r}=this,a=r.getUint16(e+2),l=r.getUint32(e+4),c=ph[a];if(c*l<=4?e+=8:e=r.getUint32(e+8),(a<1||a>13)&&xt(`Invalid TIFF value type. block: ${n.toUpperCase()}, tag: ${t.toString(16)}, type: ${a}, offset ${e}`),e>r.byteLength&&xt(`Invalid TIFF value offset. block: ${n.toUpperCase()}, tag: ${t.toString(16)}, type: ${a}, offset ${e} is outside of chunk size ${r.byteLength}`),1===a)return r.getUint8Array(e,l);if(2===a)return""===(b=function(h){for(;h.endsWith("\0");)h=h.slice(0,-1);return h}(b=r.getString(e,l)).trim())?void 0:b;var b;if(7===a)return r.getUint8Array(e,l);if(1===l)return this.parseTagValue(a,e);{let h=new(function(v){switch(v){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:case 10:default:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 11:return Float32Array;case 12:return Float64Array}}
1(a))(l),x=c;for(let v=0;v<l;v++)h[v]=this.parseTagValue(a,e),e+=x;return h}}parseTagValue(e,t){let{chunk:n}=this;switch(e){case 1:return n.getUint8(t);case 3:return n.getUint16(t);case 4:case 13:return n.getUint32(t);case 5:return n.getUint32(t)/n.getUint32(t+4);case 6:return n.getInt8(t);case 8:return n.getInt16(t);case 9:return n.getInt32(t);case 10:return n.getInt32(t)/n.getInt32(t+4);case 11:return n.getFloat(t);case 12:return n.getDouble(t);default:xt(`Invalid tiff type ${e}`)}}}class fl extends dh{static canHandle(e,t){return 225===e.getUint8(t+1)&&1165519206===e.getUint32(t+4)&&0===e.getUint16(t+8)}parse(){var e=this;return(0,d.Z)(function*(){e.parseHeader();let{options:t}=e;return t.ifd0.enabled&&(yield e.parseIfd0Block()),t.exif.enabled&&(yield e.safeParse("parseExifBlock")),t.gps.enabled&&(yield e.safeParse("parseGpsBlock")),t.interop.enabled&&(yield e.safeParse("parseInteropBlock")),t.ifd1.enabled&&(yield e.safeParse("parseThumbnailBlock")),e.createOutput()})()}safeParse(e){let t=this[e]();return void 0!==t.catch&&(t=t.catch(this.handleError)),t}findIfd0Offset(){void 0===this.ifd0Offset&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(void 0===this.ifd1Offset){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset);this.ifd1Offset=this.chunk.getUint32(this.ifd0Offset+2+12*e)}}parseBlock(e,t){let n=new Map;return this[t]=n,this.parseTags(e,t,n),n}parseIfd0Block(){var e=this;return(0,d.Z)(function*(){if(e.ifd0)return;let{file:t}=e;e.findIfd0Offset(),e.ifd0Offset<8&&xt("Malformed EXIF data"),!t.chunked&&e.ifd0Offset>t.byteLength&&xt(`IFD0 offset points to outside of file.\nthis.ifd0Offset: ${e.ifd0Offset}, file.byteLength: ${t.byteLength}`),t.tiff&&(yield t.ensureChunk(e.ifd0Offset,Xp(e.options)));let n=e.parseBlock(e.ifd0Offset,"ifd0");return 0!==n.size?(e.exifOffset=n.get(34665),e.interopOffset=n.get(40965),e.gpsOffset=n.get(34853),e.xmp=n.get(700),e.iptc=n.get(33723),e.icc=n.get(34675),e.options.sanitize&&(n.delete(34665),n.delete(40965),n.delete(34853),n.delete(700),n.delete(33723),n.delete(34675)),n):void 0})()}parseExifBlock(){var e=this;return(0,d.Z)(function*(){if(e.exif||(e.ifd0||(yield e.parseIfd0Block()),void 0===e.exifOffset))return;e.file.tiff&&(yield e.file.ensureChunk(e.exifOffset,Xp(e.options)));let t=e.parseBlock(e.exifOffset,"exif");return e.interopOffset||(e.interopOffset=t.get(40965)),e.makerNote=t.get(37500),e.userComment=t.get(37510),e.options.sanitize&&(t.delete(40965),t.delete(37500),t.delete(37510)),e.unpack(t,41728),e.unpack(t,41729),t})()}unpack(e,t){let n=e.get(t);n&&1===n.length&&e.set(t,n[0])}parseGpsBlock(){var e=this;return(0,d.Z)(function*(){if(e.gps||(e.ifd0||(yield e.parseIfd0Block()),void 0===e.gpsOffset))return;let t=e.parseBlock(e.gpsOffset,"gps");return t&&t.has(2)&&t.has(4)&&(t.set("latitude",sd(...t.get(2),t.get(1))),t.set("longitude",sd(...t.get(4),t.get(3)))),t})()}parseInteropBlock(){var e=this;return(0,d.Z)(function*(){if(!e.interop&&(e.ifd0||(yield e.parseIfd0Block()),void 0!==e.interopOffset||e.exif||(yield e.parseExifBlock()),void 0!==e.interopOffset))return e.parseBlock(e.interopOffset,"interop")})()}parseThumbnailBlock(e=!1){var t=this;return(0,d.Z)(function*(){if(!t.ifd1&&!t.ifd1Parsed&&(!t.options.mergeOutput||e))return t.findIfd1Offset(),t.ifd1Offset>0&&(t.parseBlock(t.ifd1Offset,"ifd1"),t.ifd1Parsed=!0),t.ifd1})()}extractThumbnail(){var e=this;return(0,d.Z)(function*(){if(e.headerParsed||e.parseHeader(),e.ifd1Parsed||(yield e.parseThumbnailBlock(!0)),void 0===e.ifd1)return;let t=e.ifd1.get(513),n=e.ifd1.get(514);return e.chunk.getUint8Array(t,n)})()}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,n,r={};for(t of mt)if(e=this[t],!Qp(e))if(n=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if("ifd1"===t)continue;Object.assign(r,n)}else r[t]=n;return this.makerNote&&(r.makerNote=this.makerNote),this.userComment&&(r.userComment=this.userComment),r}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[n,r]of Object.entries(t))this.assignObjectToOutput(e,n,r)}}function sd(i,e,t,n){var r=i+e/60+t/3600;return"S"!==n&&"W"!==n||(r*=-1),r}qe(fl,"type","tiff"),qe(fl,"headerLength",10),Vt.set("tiff",fl),Object.freeze({__proto__:null,default:rh,Exifr
1:Nn,fileParsers:Yr,segmentParsers:Vt,fileReaders:Co,tagKeys:Io,tagValues:cl,tagRevivers:ul,createDictionary:qp,extendDictionary:ed,fetchUrlAsArrayBuffer:Jr,readBlobAsArrayBuffer:wo,chunkedProps:kn,otherSegments:qr,segments:Eo,tiffBlocks:mt,segmentsAndBlocks:Ln,tiffExtractables:jn,inheritables:es,allFormatters:zn,Options:Po,parse:od});const yl={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1};Object.assign({},yl,{firstChunkSize:4e4,gps:[1,2,3,4]}),Object.assign({},yl,{tiff:!1,ifd1:!0,mergeOutput:!1});const hh=Object.assign({},yl,{firstChunkSize:4e4,ifd0:[274]});function _l(){return(_l=(0,d.Z)(function*(i){let e=new Nn(hh);yield e.read(i);let t=yield e.parse();if(t&&t.ifd0)return t.ifd0[274]})).apply(this,arguments)}const fh=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});let Oo=!0,Bo=!0;if("object"==typeof navigator){let i=navigator.userAgent;if(i.includes("iPad")||i.includes("iPhone")){let e=i.match(/OS (\d+)_(\d+)/);if(e){let[,t,n]=e;Oo=Number(t)+.1*Number(n)<13.4,Bo=!1}}else if(i.includes("OS X 10")){let[,e]=i.match(/OS X 10[_.](\d+)/);Oo=Bo=Number(e)<15}if(i.includes("Chrome/")){let[,e]=i.match(/Chrome\/(\d+)/);Oo=Bo=Number(e)<81}else if(i.includes("Firefox/")){let[,e]=i.match(/Firefox\/(\d+)/);Oo=Bo=Number(e)<77}}function xl(){return xl=(0,d.Z)(function*(i){let e=yield function mh(i){return _l.apply(this,arguments)}(i);return Object.assign({canvas:Oo,css:Bo},fh[e])}),xl.apply(this,arguments)}class gh extends ni{constructor(...e){super(...e),qe(this,"ranges",new bh),0!==this.byteLength&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,n){if(0===e&&0===this.byteLength&&n){let r=new DataView(n.buffer||n,n.byteOffset,n.byteLength);this._swapDataView(r)}else{let r=e+t;if(r>this.byteLength){let{dataView:a}=this._extend(r);this._swapDataView(a)}}}_extend(e){let t;t=nl?il.allocUnsafe(e):new Uint8Array(e);let n=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:n}}subarray(e,t,n=!1){return t=t||this._lengthToEnd(e),n&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,n=!1){n&&this._tryExtend(t,e.byteLength,e);let r=super.set(e,t);return this.ranges.add(t,r.byteLength),r}ensureChunk(e,t){var n=this;return(0,d.Z)(function*(){n.chunked&&(n.ranges.available(e,t)||(yield n.readChunk(e,t)))})()}available(e,t){return this.ranges.available(e,t)}}class bh{constructor(){qe(this,"list",[])}get length(){return this.list.length}add(e,t,n=0){let r=e+t,a=this.list.filter(l=>ad(e,l.offset,r)||ad(e,l.end,r));if(a.length>0){e=Math.min(e,...a.map(c=>c.offset)),r=Math.max(r,...a.map(c=>c.end)),t=r-e;let l=a.shift();l.offset=e,l.length=t,l.end=r,this.list=this.list.filter(c=>!a.includes(c))}else this.list.push({offset:e,length:t,end:r})}available(e,t){let n=e+t;return this.list.some(r=>r.offset<=e&&n<=r.end)}}function ad(i,e,t){return i<=e&&e<=t}class vh extends gh{constructor(e,t){super(0),qe(this,"chunksRead",0),this.input=e,this.options=t}readWhole(){var e=this;return(0,d.Z)(function*(){e.chunked=!1,yield e.readChunk(e.nextChunkOffset)})()}readChunked(){var e=this;return(0,d.Z)(function*(){e.chunked=!0,yield e.readChunk(0,e.options.firstChunkSize)})()}readNextChunk(e=this.nextChunkOffset){var t=this;return(0,d.Z)(function*(){if(t.fullyRead)return t.chunksRead++,!1;let n=t.options.chunkSize,r=yield t.readChunk(e,n);return!!r&&r.byteLength===n})()}readChunk(e,t){var n=this;return(0,d.Z)(function*(){if(n.chunksRead++,0!==(t=n.safeWrapAddress(e,t)))return n._readChunk(e,t)})()}safeWrapAddress(e,t){return void 0!==this.size&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(0!==this.ranges.list.length)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return void 0!==this.size&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}Co.set("blob",class extends vh{readWhole(){var i=this;return(0,d.Z)(function*(){i.chunked=!1;let e=yield wo(i.input);i._swapArrayBuffer(e)})()}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}_readChunk(i,e){var t=this;
1return(0,d.Z)(function*(){let r=t.input.slice(i,e?i+e:void 0),a=yield wo(r);return t.set(a,i,!0)})()}});const _h={strings:{generatingThumbnails:"Generating thumbnails..."}},Ih={thumbnailWidth:null,thumbnailHeight:null,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,lazy:!1};class ld extends An{constructor(e,t){if(super(e,{...Ih,...t}),this.onFileAdded=n=>{!n.preview&&n.data&&Hp(n.type)&&!n.isRemote&&this.addToQueue(n.id)},this.onCancelRequest=n=>{const r=this.queue.indexOf(n.id);-1!==r&&this.queue.splice(r,1)},this.onFileRemoved=n=>{const r=this.queue.indexOf(n.id);-1!==r&&this.queue.splice(r,1),n.preview&&Vp(n.preview)&&URL.revokeObjectURL(n.preview)},this.onRestored=()=>{this.uppy.getFiles().filter(r=>r.isRestored).forEach(r=>{(!r.preview||Vp(r.preview))&&this.addToQueue(r.id)})},this.onAllFilesRemoved=()=>{this.queue=[]},this.waitUntilAllProcessed=n=>{n.forEach(a=>{const l=this.uppy.getFile(a);this.uppy.emit("preprocess-progress",l,{mode:"indeterminate",message:this.i18n("generatingThumbnails")})});const r=()=>{n.forEach(a=>{const l=this.uppy.getFile(a);
1this.uppy.emit("preprocess-complete",l)})};return new Promise(a=>{this.queueProcessing?this.uppy.once("thumbnail:all-generated",()=>{r(),a()}):(r(),a())})},this.type="modifier",this.id=this.opts.id||"ThumbnailGenerator",this.title="Thumbnail Generator",this.queue=[],this.queueProcessing=!1,this.defaultThumbnailDimension=200,this.thumbnailType=this.opts.thumbnailType,this.defaultLocale=_h,this.i18nInit(),this.opts.lazy&&this.opts.waitForThumbnailsBeforeUpload)throw new Error("ThumbnailGenerator: The `lazy` and `waitForThumbnailsBeforeUpload` options are mutually exclusive. Please ensure at most one of them is set to `true`.")}createThumbnail(e,t,n){const r=URL.createObjectURL(e.data),a=new Promise((c,b)=>{const h=new Image;h.src=r,h.addEventListener("load",()=>{URL.revokeObjectURL(r),c(h)}),h.addEventListener("error",x=>{URL.revokeObjectURL(r),b(x.error||new Error("Could not create thumbnail"))})}),l=function yh(i){return xl.apply(this,arguments)}(e.data).catch(()=>1);return Promise.all([a,l]).then(c=>{let[b,h]=c;const x=this.getProportionalDimensions(b,t,n,h.deg),v=function Ch(i,e){let t=i.width,n=i.height;(90===e.deg||270===e.deg)&&(t=i.height,n=i.width);const r=document.createElement("canvas");r.width=t,r.height=n;const a=r.getContext("2d");return a.translate(t/2,n/2),e.canvas&&(a.rotate(e.rad),a.scale(e.scaleX,e.scaleY)),a.drawImage(i,-i.width/2,-i.height/2,i.width,i.height),r}(b,h);return function Sh(i,e,t){try{i.getContext("2d").getImageData(0,0,1,1)}catch(n){if(18===n.code)return Promise.reject(new Error("cannot read image, probably an svg with external resources"))}return i.toBlob?new Promise(n=>{i.toBlob(n,e,t)}).then(n=>{if(null===n)throw new Error("cannot read image, probably an svg with external resources");return n}):Promise.resolve().then(()=>function qu(i,e,t){var n,r;const a=Ju.exec(i),l=null!=(n=null!=(r=e.mimeType)?r:a?.[1])?n:"plain/text";let c;if(null!=a?.[2]){const b=atob(decodeURIComponent(a[3])),h=new Uint8Array(b.length);for(let x=0;x<b.length;x++)h[x]=b.charCodeAt(x);c=[h]}else null!=a?.[3]&&(c=[decodeURIComponent(a[3])]);return t?new File(c,e.name||"",{type:l}):new Blob(c,{type:l})}(i.toDataURL(e,t),{})).then(n=>{if(null===n)throw new Error("could not extract blob, probably an old browser");return n})}(this.resizeImage(v,x.width,x.height),this.thumbnailType,80)}).then(c=>URL.createObjectURL(c))}getProportionalDimensions(e,t,n,r){let a=e.width/e.height;return(90===r||270===r)&&(a=e.height/e.width),null!=t?{width:t,height:Math.round(t/a)}:null!=n?{width:Math.round(n*a),height:n}:{width:this.defaultThumbnailDimension,height:Math.round(this.defaultThumbnailDimension/a)}}resizeImage(e,t,n){let r=function wh(i){const e=i.width/i.height,t=5e6,n=4096;let r=Math.floor(Math.sqrt(t*e)),a=Math.floor(t/Math.sqrt(t*e));if(r>n&&(r=n,a=Math.round(r/e)),a>n&&(a=n,r=Math.round(e*a)),i.width>r){const l=document.createElement("canvas");return l.width=r,l.height=a,l.getContext("2d").drawImage(i,0,0,r,a),l}return i}(e),a=Math.ceil(Math.log2(r.width/t));a<1&&(a=1);let l=t*2**(a-1),c=n*2**(a-1);for(;a--;){const h=document.createElement("canvas");h.width=l,h.height=c,h.getContext("2d").drawImage(r,0,0,l,c),r=h,l=Math.round(l/2),c=Math.round(c/2)}return r}setPreviewURL(e,t){this.uppy.setFileState(e,{preview:t})}addToQueue(e){this.queue.push(e),!1===this.queueProcessing&&this.processQueue()}processQueue(){if(this.queueProcessing=!0,this.queue.length>0){const e=this.uppy.getFile(this.queue.shift());return e?this.requestThumbnail(e).catch(()=>{}).then(()=>this.processQueue()):(this.uppy.log("[ThumbnailGenerator] file was removed before a thumbnail could be generated, but not removed from the queue. This is probably a bug","error"),Promise.resolve())}return this.queueProcessing=!1,this.uppy.log("[ThumbnailGenerator] Emptied thumbnail queue"),this.uppy.emit("thumbnail:all-generated"),Promise.resolve()}requestThumbnail(e){return Hp(e.type)&&!e.isRemote?this.createThumbnail(e,this.opts.thumbnailWidth,this.opts.thumbnailHeight).then(t=>{this.setPreviewURL(e.id,t),this.uppy.log(`[ThumbnailGenerator] Generated thumbnail for ${e.id}
1`),this.uppy.emit("thumbnail:generated",this.uppy.getFile(e.id),t)}).catch(t=>{this.uppy.log(`[ThumbnailGenerator] Failed thumbnail for ${e.id}:`,"warning"),this.uppy.log(t,"warning"),this.uppy.emit("thumbnail:error",this.uppy.getFile(e.id),t)}):Promise.resolve()}install(){this.uppy.on("file-removed",this.onFileRemoved),this.uppy.on("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("thumbnail:cancel",this.onCancelRequest)):(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("file-added",this.onFileAdded),this.uppy.on("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.addPreProcessor(this.waitUntilAllProcessed)}uninstall(){this.uppy.off("file-removed",this.onFileRemoved),this.uppy.off("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("thumbnail:cancel",this.onCancelRequest)):(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("file-added",this.onFileAdded),this.uppy.off("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.removePreProcessor(this.waitUntilAllProcessed)}}ld.VERSION="3.1.0";const pd=function Eh(i){if("string"==typeof i){const e=document.querySelectorAll(i);return 0===e.length?null:Array.from(e)}return"object"==typeof i&&Fp(i)?[i]:null},bn=Array.from;function To(i){var e,t,n,r=2;for(typeof Symbol<"u"&&(t=Symbol.asyncIterator,n=Symbol.iterator);r--;){if(t&&null!=(e=i[t]))return e.call(i);if(n&&null!=(e=i[n]))return new is(e.call(i));t="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function is(i){function e(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var n=t.done;return Promise.resolve(t.value).then(function(r){return{value:r,done:n}})}return(is=function(n){this.s=n,this.n=n.next}).prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(n){var r=this.s.return;return void 0===r?Promise.resolve({value:n,done:!0}):e(r.apply(this.s,arguments))},throw:function(n){var r=this.s.return;return void 0===r?Promise.reject(n):e(r.apply(this.s,arguments))}},new is(i)}function Sl(i,e){this.v=i,this.k=e}function Fo(i){var e,t;function n(a,l){try{var c=i[a](l),b=c.value,h=b instanceof Sl;Promise.resolve(h?b.v:b).then(function(x){if(h){var v="return"===a?"return":"next";if(!b.k||x.done)return n(v,x);x=i[v](x).value}r(c.done?"return":"normal",x)},function(x){n("throw",x)})}catch(x){r("throw",x)}}function r(a,l){switch(a){case"return":e.resolve({value:l,done:!0});break;case"throw":e.reject(l);break;default:e.resolve({value:l,done:!1})}(e=e.next)?n(e.key,e.arg):t=null}this._invoke=function(a,l){return new Promise(function(c,b){var h={key:a,arg:l,resolve:c,reject:b,next:null};t?t=t.next=h:(e=t=h,n(a,l))})}
1,"function"!=typeof i.return&&(this.return=void 0)}function Cl(i){return function(){return new Fo(i.apply(this,arguments))}}function Gi(i){return new Sl(i,0)}function wl(i){var e={},t=!1;function n(r,a){return t=!0,{done:!1,value:new Sl(a=new Promise(function(l){l(i[r](a))}),1)}}return e[typeof Symbol<"u"&&Symbol.iterator||"@@iterator"]=function(){return this},e.next=function(r){return t?(t=!1,r):n("next",r)},"function"==typeof i.throw&&(e.throw=function(r){if(t)throw t=!1,r;return n("throw",r)}),"function"==typeof i.return&&(e.return=function(r){return t?(t=!1,r):n("return",r)}),e}function dd(i,e,t,n){let{onSuccess:r}=n;i.readEntries(a=>{const l=[...e,...a];a.length?queueMicrotask(()=>{dd(i,l,t,{onSuccess:r})}):r(l)},a=>{t(a),r(e)})}function cd(i,e){return null==i?i:{kind:i.isFile?"file":i.isDirectory?"directory":void 0,name:i.name,getFile:()=>new Promise((t,n)=>i.file(t,n)),values:()=>Cl(function*(){const t=i.createReader(),n=yield Gi(new Promise(r=>{dd(t,[],e,{onSuccess:a=>r(a.map(l=>cd(l,e)))})}));yield*wl(To(n))})(),isSameEntry:void 0}}function ud(i,e,t){try{return void 0===t&&(t=void 0),Cl(function*(){const n=()=>`${e}/${i.name}`;if("file"===i.kind){const h=yield Gi(i.getFile());null!=h?(h.relativePath=e?n():null,yield h):null!=t&&(yield t)}else if("directory"===i.kind){var l,r=!1,a=!1;try{for(var b,c=To(i.values());r=!(b=yield Gi(c.next())).done;r=!1){const h=b.value;yield*wl(To(ud(h,e?n():i.name)))}}catch(h){a=!0,l=h}finally{try{r&&null!=c.return&&(yield Gi(c.return()))}finally{if(a)throw l}}}else null!=t&&(yield t)})()}catch(n){return Promise.reject(n)}}function Il(){return Il=Cl(function*(i,e){const t=yield Gi(Promise.all(Array.from(i.items,function(){var n=(0,d.Z)(function*(r){let l;return null!=l||(l=cd("function"==typeof r.getAsEntry?r.getAsEntry():r.webkitGetAsEntry(),e)),{fileSystemHandle:l,lastResortFile:r.getAsFile()}});return function(r){return n.apply(this,arguments)}}())));for(const{lastResortFile:n,fileSystemHandle:r}of t)if(null!=r)try{yield*wl(To(ud(r,"",n)))}catch(a){null!=n?yield n:e(a)}else null!=n&&(yield n)}),Il.apply(this,arguments)}function El(){return El=(0,d.Z)(function*(i,e){var t;const n=null!=(t=e?.logDropError)?t:Function.prototype;try{const h=[];var l,r=!1,a=!1;try{for(var b,c=To(function Dh(i,e){return Il.apply(this,arguments)}(i,n));r=!(b=yield c.next()).done;r=!1)h.push(b.value)}catch(x){a=!0,l=x}finally{try{r&&null!=c.return&&(yield c.return())}finally{if(a)throw l}}return h}catch{return function Ph(i){const e=bn(i.files);return Promise.resolve(e)}(i)}}),El.apply(this,arguments)}Fo.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Fo.prototype.next=function(i){return this._invoke("next",i)},Fo.prototype.throw=function(i){return this._invoke("throw",i)},Fo.prototype.return=function(i){return this._invoke("return",i)};var Bh=s(15730);class hd extends Error{constructor(e){super(e),this.name="TimeoutError"}}class Th extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const md=i=>void 0===globalThis.DOMException?new Th(i):new DOMException(i),fd=i=>{const e=void 0===i.reason?md("This operation was aborted."):i.reason;return e instanceof Error?e:md(e)};var Oi,vn=function(i,e,t,n){if("a"===t&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(i):n?n.value:e.get(i)};Oi=new WeakMap;const Ah=class Mh{constructor(){Oi.set(this,[])}enqueue(e,t){const n={priority:(t={priority:0,...t}).priority,run:e};if(this.size&&vn(this,Oi,"f")[this.size-1].priority>=t.priority)return void vn(this,Oi,"f").push(n);const r=function Uh(i,e,t){let n=0,r=i.length;for(;r>0;){const a=Math.trunc(r/2);let l=n+a;t(i[l],e)<=0?(n=++l,r-=a+1):r=a}return n}(vn(this,Oi,"f"),n,(a,l)=>l.priority-a.priority);vn(this,Oi,"f").splice(r,0,n)}dequeue(){return vn(this,Oi,"f").shift()?.run}filter(e){return vn(this,Oi,"f").filter(t=>t.priority===e.priority).map(t=>t.run)}get size(){return vn(this,Oi,"f").length}};var ct,Uo,Mo,Zi,ns,Ao,os,oi,Ro,Ht,rs,Gt,ko,Qi,ss,yd,gd,bd,vd,_d,as,Dl,Pl,ls,xd,ps,at=function(i,e,t,n,r){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?r.call(i,t):r?r.value=t:e.set(i,t),t},Be=function(i,e,t,n){if("a"===t&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(i):n?n.value:e.get(i)};
1class Sd extends Error{}Uo=new WeakMap,Mo=new WeakMap,Zi=new WeakMap,ns=new WeakMap,Ao=new WeakMap,os=new WeakMap,oi=new WeakMap,Ro=new WeakMap,Ht=new WeakMap,rs=new WeakMap,Gt=new WeakMap,ko=new WeakMap,Qi=new WeakMap,ss=new WeakMap,ct=new WeakSet,yd=function(){return Be(this,Mo,"f")||Be(this,Zi,"f")<Be(this,ns,"f")},gd=function(){return Be(this,Gt,"f")<Be(this,ko,"f")},bd=function(){var e;at(this,Gt,(e=Be(this,Gt,"f"),--e),"f"),Be(this,ct,"m",as).call(this),this.emit("next")},vd=function(){Be(this,ct,"m",Pl).call(this),Be(this,ct,"m",Dl).call(this),at(this,Ro,void 0,"f")},_d=function(){const e=Date.now();if(void 0===Be(this,oi,"f")){const t=Be(this,os,"f")-e;if(!(t<0))return void 0===Be(this,Ro,"f")&&at(this,Ro,setTimeout(()=>{Be(this,ct,"m",vd).call(this)},t),"f"),!0;at(this,Zi,Be(this,Uo,"f")?Be(this,Gt,"f"):0,"f")}return!1},as=function(){if(0===Be(this,Ht,"f").size)return Be(this,oi,"f")&&clearInterval(Be(this,oi,"f")),at(this,oi,void 0,"f"),this.emit("empty"),0===Be(this,Gt,"f")&&this.emit("idle"),!1;if(!Be(this,Qi,"f")){const e=!Be(this,ct,"a",_d);if(Be(this,ct,"a",yd)&&Be(this,ct,"a",gd)){const t=Be(this,Ht,"f").dequeue();
1return!!t&&(this.emit("active"),t(),e&&Be(this,ct,"m",Dl).call(this),!0)}}return!1},Dl=function(){Be(this,Mo,"f")||void 0!==Be(this,oi,"f")||(at(this,oi,setInterval(()=>{Be(this,ct,"m",Pl).call(this)},Be(this,Ao,"f")),"f"),at(this,os,Date.now()+Be(this,Ao,"f"),"f"))},Pl=function(){0===Be(this,Zi,"f")&&0===Be(this,Gt,"f")&&Be(this,oi,"f")&&(clearInterval(Be(this,oi,"f")),at(this,oi,void 0,"f")),at(this,Zi,Be(this,Uo,"f")?Be(this,Gt,"f"):0,"f"),Be(this,ct,"m",ls).call(this)},ls=function(){for(;Be(this,ct,"m",as).call(this););},xd=function(){var i=(0,d.Z)(function*(t){return new Promise((n,r)=>{t.addEventListener("abort",()=>{r(new Sd("The task was aborted."))},{once:!0})})});return function e(t){return i.apply(this,arguments)}}(),ps=function(){var i=(0,d.Z)(function*(t,n){return new Promise(r=>{const a=()=>{n&&!n()||(this.off(t,a),r())};this.on(t,a)})});return function e(t,n){return i.apply(this,arguments)}}();const kh=class Rh extends Bh{constructor(e){var t,n,r,a;if(super(),ct.add(this),Uo.set(this,void 0),Mo.set(this,void 0),Zi.set(this,0),ns.set(this,void 0),Ao.set(this,void 0),os.set(this,0),oi.set(this,void 0),Ro.set(this,void 0),Ht.set(this,void 0),rs.set(this,void 0),Gt.set(this,0),ko.set(this,void 0),Qi.set(this,void 0),ss.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:Ah,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(n=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==n?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(a=null===(r=e.interval)||void 0===r?void 0:r.toString())&&void 0!==a?a:""}\` (${typeof e.interval})`);at(this,Uo,e.carryoverConcurrencyCount,"f"),at(this,Mo,e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,"f"),at(this,ns,e.intervalCap,"f"),at(this,Ao,e.interval,"f"),at(this,Ht,new e.queueClass,"f"),at(this,rs,e.queueClass,"f"),this.concurrency=e.concurrency,this.timeout=e.timeout,at(this,ss,!0===e.throwOnTimeout,"f"),at(this,Qi,!1===e.autoStart,"f")}get concurrency(){return Be(this,ko,"f")}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);at(this,ko,e,"f"),Be(this,ct,"m",ls).call(this)}add(e,t={}){var n=this;return(0,d.Z)(function*(){return t={timeout:n.timeout,throwOnTimeout:Be(n,ss,"f"),...t},new Promise((r,a)=>{Be(n,Ht,"f").enqueue((0,d.Z)(function*(){var l,c,b;at(n,Gt,(c=Be(n,Gt,"f"),++c),"f"),at(n,Zi,(b=Be(n,Zi,"f"),++b),"f");try{if(null!==(l=t.signal)&&void 0!==l&&l.aborted)throw new Sd("The task was aborted.");let h=e({signal:t.signal});t.timeout&&(h=function Fh(i,e,t,n){let r;const a=new Promise((l,c)=>{if("number"!=typeof e||1!==Math.sign(e))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${e}\``);if(e!==Number.POSITIVE_INFINITY){if((n={customTimers:{setTimeout,clearTimeout},...n}).signal){const{signal:b}=n;b.aborted&&c(fd(b)),b.addEventListener("abort",()=>{c(fd(b))})}r=n.customTimers.setTimeout.call(void 0,()=>{if("function"==typeof t){try{l(t())}catch(x){c(x)}return}const h=t instanceof Error?t:new hd("string"==typeof t?t:`Promise timed out after ${e} milliseconds`);"function"==typeof i.cancel&&i.cancel(),c(h)},e),(0,d.Z)(function*(){try{l(yield i)}catch(b){c(b)}finally{n.customTimers.clearTimeout.call(void 0,r)}})()}else l(i)});return a.clear=()=>{clearTimeout(r),r=void 0},a}(Promise.resolve(h),t.timeout)),t.signal&&(h=Promise.race([h,Be(n,ct,"m",xd).call(n,t.signal)]));const x=yield h;r(x),n.emit("completed",x)}catch(h){if(h instanceof hd&&!t.throwOnTimeout)return void r();a(h),n.emit("error",h)}finally{Be(n,ct,"m",bd).call(n)}}),t),n.emit("add"),Be(n,ct,"m",as).call(n)})})()}addAll(e,t){var n=this;return(0,d.Z)(function*(){return Promise.all(e.map(function(){var r=(0,d.Z)(function*(a){return n.add(a,t)});return function(a){return r.apply(this,arguments)}}()))})()}start(){return Be(this,Qi,"f")?(at(this,Qi,!1,"f"),Be(this,ct,"m",ls).call(this),this):this}pause(){at(this,Qi,!0,"f")}clear(){at(this,Ht,new(Be(this,rs,"f")),"f")}onEmpty(){var e=this;return(0,d.Z)(function*(){0!==Be(e,Ht,"f").size&&(yield Be(e,ct,"m",ps).call(e,"empty"))})()}onSizeLessThan(e){var t=this;return(0,d.Z)(function*(){Be(t,Ht,"f").size<e||(yield Be(t,ct,"m",ps).call(t,"next",()=>Be(t,Ht,"f").size<e))})()}onIdle(){var e=this;return(0,d.Z)(function*(){0===Be(e,Gt,"f")&&0===Be(e,Ht,"f").size||(yield Be(e,ct,"m",ps).call(e,"idle"))})()}get size(){return Be(this,Ht,"f").size}sizeBy(e){return Be(this,Ht,"f").filter(e).length}get pending(){return Be(this,Gt,"f")}get isPaused(){return Be(this,Qi,"f")}};var Bi,et,Ol,Cd,Kn=0,wd=[],ds=[],lt=rt,Id=lt.__b,Ed=lt.__r,Dd=lt.diffed,Pd=lt.__c,Od=lt.unmount,Bd=lt.__;function _n(i,e){lt.__h&<.__h(et,i,Kn||e),Kn=0;var t=et.__H||(et.__H={__:[],__h:[]});return i>=t.__.length&&t.__.push({__V:ds}),t.__[i]}function xn(i){return Kn=1,function Lh(i,e,t){var n=_n(Bi++,2);if(n.t=i,!n.__c&&(n.__=[t?t(e):Fd(void 0,e),function(c){var b=n.__N?n.__N[0]:n.__[0],h=n.t(b,c);
1b!==h&&(n.__N=[h,n.__[1]],n.__c.setState({}))}],n.__c=et,!et.u)){var r=function(c,b,h){if(!n.__c.__H)return!0;var x=n.__c.__H.__.filter(function(U){return!!U.__c});if(x.every(function(U){return!U.__N}))return!a||a.call(this,c,b,h);var v=!1;return x.forEach(function(U){if(U.__N){var W=U.__[0];U.__=U.__N,U.__N=void 0,W!==U.__[0]&&(v=!0)}}),!(!v&&n.__c.props===c)&&(!a||a.call(this,c,b,h))};et.u=!0;var a=et.shouldComponentUpdate,l=et.componentWillUpdate;et.componentWillUpdate=function(c,b,h){if(this.__e){var x=a;a=void 0,r(c,b,h),a=x}l&&l.call(this,c,b,h)},et.shouldComponentUpdate=r}return n.__N||n.__}(Fd,i)}function cs(i,e){var t=_n(Bi++,3);!lt.__s&&Fl(t.__H,e)&&(t.__=i,t.i=e,et.__H.__h.push(t))}function Bl(i){return Kn=5,us(function(){return{current:i}},[])}function us(i,e){var t=_n(Bi++,7);return Fl(t.__H,e)?(t.__V=i(),t.i=e,t.__h=i,t.__V):t.__}function hs(i,e){return Kn=8,us(function(){return i},e)}function zh(){for(var i;i=wd.shift();)if(i.__P&&i.__H)try{i.__H.__h.forEach(ms),i.__H.__h.forEach(Tl),i.__H.__h=[]}catch(e){i.__H.__h=[],lt.__e(e,i.__v)}}lt.__b=function(i){et=null,Id&&Id(i)},lt.__=function(i,e){i&&e.__k&&e.__k.__m&&(i.__m=e.__k.__m),Bd&&Bd(i,e)},lt.__r=function(i){Ed&&Ed(i),Bi=0;var e=(et=i.__c).__H;e&&(Ol===et?(e.__h=[],et.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=ds,t.__N=t.i=void 0})):(e.__h.forEach(ms),e.__h.forEach(Tl),e.__h=[],Bi=0)),Ol=et},lt.diffed=function(i){Dd&&Dd(i);var e=i.__c;e&&e.__H&&(e.__H.__h.length&&(1!==wd.push(e)&&Cd===lt.requestAnimationFrame||((Cd=lt.requestAnimationFrame)||Nh)(zh)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==ds&&(t.__=t.__V),t.i=void 0,t.__V=ds})),Ol=et=null},lt.__c=function(i,e){e.some(function(t){try{t.__h.forEach(ms),t.__h=t.__h.filter(function(n){return!n.__||Tl(n)})}catch(n){e.some(function(r){r.__h&&(r.__h=[])}),e=[],lt.__e(n,t.__v)}}),Pd&&Pd(i,e)},lt.unmount=function(i){Od&&Od(i);var e,t=i.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{ms(n)}catch(r){e=r}}),t.__H=void 0,e&<.__e(e,t.__v))};var Td="function"==typeof requestAnimationFrame;function Nh(i){var e,t=function(){clearTimeout(n),Td&&cancelAnimationFrame(e),setTimeout(i)},n=setTimeout(t,100);Td&&(e=requestAnimationFrame(t))}function ms(i){var e=et,t=i.__c;"function"==typeof t&&(i.__c=void 0,t()),et=e}function Tl(i){var e=et;i.__c=i.__(),et=e}function Fl(i,e){return!i||i.length!==e.length||e.some(function(t,n){return t!==i[n]})}function Fd(i,e){return"function"==typeof e?e(i):e}function Wh(){return g("svg",{width:"26",height:"26",viewBox:"0 0 26 26",xmlns:"http://www.w3.org/2000/svg"},g("g",{fill:"none","fill-rule":"evenodd"},g("circle",{fill:"#FFF",cx:"13",cy:"13",r:"13"}),g("path",{d:"M21.64 13.205c0-.639-.057-1.252-.164-1.841H13v3.481h4.844a4.14 4.14 0 01-1.796 2.716v2.259h2.908c1.702-1.567 2.684-3.875 2.684-6.615z",fill:"#4285F4","fill-rule":"nonzero"}),g("path",{d:"M13 22c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H4.957v2.332A8.997 8.997 0 0013 22z",fill:"#34A853","fill-rule":"nonzero"}),g("path",{d:"M7.964 14.71A5.41 5.41 0 017.682 13c0-.593.102-1.17.282-1.71V8.958H4.957A8.996 8.996 0 004 13c0 1.452.348 2.827.957 4.042l3.007-2.332z",fill:"#FBBC05","fill-rule":"nonzero"}),g("path",{d:"M13 7.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C17.463 4.891 15.426 4 13 4a8.997 8.997 0 00-8.043 4.958l3.007 2.332C8.672 9.163 10.656 7.58 13 7.58z",fill:"#EA4335","fill-rule":"nonzero"}),g("path",{d:"M4 4h18v18H4z"})))}function Kh(i){let{pluginName:e,i18n:t,onAuth:n}=i;const r="Google Drive"===e;return g("form",{onSubmit:hs(l=>{l.preventDefault(),n()},[n])},r?g("button",{type:"submit",className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn uppy-Provider-btn-google","data-uppy-super-focusable":!0},g(Wh,null),t("signInWithGoogle")):g("button",{type:"submit",className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn","data-uppy-super-focusable":!0},t("authenticateWith",{pluginName:e})))}const $h=i=>{let{pluginName:e,i18n:t,onAuth:n}=i;return g(Kh,{pluginName:e,i18n:t,onAuth:n})};function Vh(i){const{loading:e,pluginName:t,pluginIcon:n,i18n:r,handleAuth:a,renderForm:l=$h}=i;return g("div",{className:"uppy-Provider-auth"},g("div",{className:"uppy-Provider-authIcon"},n()),g("div",{className:"uppy-Provider-authTitle"},r("authenticateWithTitle",{pluginName:t})),g("div",{className:"uppy-Provider-authForm"},l({pluginName:t,i18n:r,loading:e,onAuth:a})))}function Hh(i){let{i18n:e,logout:t,username:n}=i;return g(Xt,null,g("span",{className:"uppy-ProviderBrowser-user",key:"username"},n),g("button",{type:"button",onClick:t,className:"uppy-u-reset uppy-c-btn uppy-ProviderBrowser-userL
1ogout",key:"logout"},e("logOut")))}const Gh=i=>{const{getFolder:e,title:t,isLast:n}=i;return g(Xt,null,g("button",{type:"button",className:"uppy-u-reset uppy-c-btn",onClick:e},t),n?"":" / ")};function Zh(i){const{getFolder:e,title:t,breadcrumbsIcon:n,breadcrumbs:r}=i;return g("div",{className:"uppy-Provider-breadcrumbs"},g("div",{className:"uppy-Provider-breadcrumbsIcon"},n),r.map((a,l)=>g(Gh,{key:a.id,getFolder:()=>e(a.requestPath,a.name),title:0===l?t:a.name,isLast:l+1===r.length})))}function Qh(i){return g(Xt,null,i.showBreadcrumbs&&g(Zh,{getFolder:i.getFolder,breadcrumbs:i.breadcrumbs,breadcrumbsIcon:i.pluginIcon&&i.pluginIcon(),title:i.title}),g(Hh,{logout:i.logout,username:i.username,i18n:i.i18n}))}function Ud(i){return{...i,type:i.mimeType,extension:i.name?oe(i.name).extension:null}}function Ul(){return Ul=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},Ul.apply(this,arguments)}const Xh={position:"relative",width:"100%",minHeight:"100%"},Yh={position:"absolute",top:0,left:0,width:"100%",overflow:"visible"},Md=class Jh extends ti{constructor(e){super(e),this.handleScroll=()=>{this.setState({offset:this.base.scrollTop})},this.handleResize=()=>{this.resize()},this.focusElement=null,this.state={offset:0,height:0}}componentDidMount(){this.resize(),window.addEventListener("resize",this.handleResize)}componentWillUpdate(){this.base.contains(document.activeElement)&&(this.focusElement=document.activeElement)}componentDidUpdate(){this.focusElement&&this.focusElement.parentNode&&document.activeElement!==this.focusElement&&this.focusElement.focus(),this.focusElement=null,this.resize()}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}resize(){const{height:e}=this.state;e!==this.base.offsetHeight&&this.setState({height:this.base.offsetHeight})}render(e){let{data:t,rowHeight:n,renderRow:r,overscanCount:a=10,...l}=e;const{offset:c,height:b}=this.state;let h=Math.floor(c/n),x=Math.floor(b/n);a&&(h=Math.max(0,h-h%a),x+=a);const U=t.slice(h,h+x+4),W={...Xh,height:t.length*n},re={...Yh,top:h*n};return g("div",Ul({onScroll:this.handleScroll},l),g("div",{role:"presentation",style:W},g("div",{role:"presentation",style:re},U.map(r))))}};function Ad(i){const{search:e,searchOnInput:t,searchTerm:n,showButton:r,inputLabel:a,clearSearchLabel:l,buttonLabel:c,clearSearch:b,inputClassName:h,buttonCSSClassName:x}=i,[v,U]=xn(n??""),W=hs(ve=>{ve.preventDefault(),e(v)},[e,v]),re=hs(ve=>{const he=ve.target.value;U(he),t&&e(he)},[U,t,e]),[ue]=xn(()=>{const ve=document.createElement("form");return ve.setAttribute("tabindex","-1"),ve.id=S(),ve});return cs(()=>(document.body.appendChild(ue),ue.addEventListener("submit",W),()=>{ue.removeEventListener("submit",W),document.body.removeChild(ue)}),[ue,W]),g(Xt,null,g("input",{className:`uppy-u-reset ${h}`,type:"search","aria-label":a,placeholder:a,value:v,onInput:re,form:ue.id,"data-uppy-super-focusable":!0}),!r&&g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-ProviderBrowser-searchFilterIcon",width:"12",height:"12",viewBox:"0 0 12 12"},g("path",{d:"M8.638 7.99l3.172 3.172a.492.492 0 1 1-.697.697L7.91 8.656a4.977 4.977 0 0 1-2.983.983C2.206 9.639 0 7.481 0 4.819 0 2.158 2.206 0 4.927 0c2.721 0 4.927 2.158 4.927 4.82a4.74 4.74 0 0 1-1.216 3.17zm-3.71.685c2.176 0 3.94-1.726 3.94-3.856 0-2.129-1.764-3.855-3.94-3.855C2.75.964.984 2.69.984 4.819c0 2.13 1.765 3.856 3.942 3.856z"})),!r&&v&&g("button",{className:"uppy-u-reset uppy-ProviderBrowser-searchFilterReset",type:"button","aria-label":l,title:l,onClick:()=>{U(""),b&&b()}},g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",viewBox:"0 0 19 19"},g("path",{d:"M17.318 17.232L9.94 9.854 9.586 9.5l-.354.354-7.378 7.378h.707l-.62-.62v.706L9.318 9.94l.354-.354-.354-.354L1.94 1.854v.707l.62-.62h-.706l7.378 7.378.354.354.354-.354 7.378-7.378h-.707l.622.62v-.706L9.854 9.232l-.354.354.354.354 7.378 7.378.708-.707-7.38-7.378v.708l7.38-7.38.353-.353-.353-.353-.622-.622-.353-.353-.354.352-7.378 7.38h.708L2.56 1.23 2.208.88l-.353.353-.622.62-.353.355.352.353 7.38 7.38v-.708l-7.38 7.38-.353.353.352.353.622.622.353.353.354-.353 7.38-7.38h-.708l7.38 7.38z"}))),r&&g("button",{className:`uppy-u-reset uppy-c-btn uppy-c-btn-primary ${x}`,type:"submit",form:ue.id},c))}function qh(i){let{cancel:e,done:t,i18n:n,selected:r}=i;return g("div",{className:"uppy-ProviderBrowser-footer"},g("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary",onClick:t,type:"button"},n("selectX",{smart_count:r})),g("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link",onClick:e,type:"button"},n("cancel")))}function em(){return g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:11,height:14.5,viewBox:"0 0 44 58"},g("path",{d:"M27.437.517a1 1 0 0 0-.094.03H4.25C2.037.548.217 2.368.217 4.58v48.405c0 2.212 1.82 4.03 4.03 4.03H39.03c2.21 0 4.03-1.818 4.03-4.03V15.61a1 1 0 0 0-.03-.28 1 1 0 0 0 0-.093 1 1 0 0 0-.03-.032 1 1 0 0 0 0-.03 1 1 0 0 0-.032-.063 1 1 0 0 0-.03-.063 1 1 0 0 0-.032 0 1 1 0 0 0-.03-.063 1 1 0 0 0-.032-.03 1 1 0 0 0-.03-.063 1 1 0 0 0-.063-.062l-14.593-14a1 1 0 0 0-.062-.062A1 1 0 0 0 28 .708a1 1 0 0 0-.374-.157 1 1 0 0 0-.156 0 1 1 0 0 0-.03-.03l-.003-.003zM4.25 2.547h22.218v9.97c0 2.21 1.82 4.03 4.03 4.03h10.564v36.438a2.02 2.02 0 0 1-2.032 2.032H4.25c-1.13 0-2.032-.9-2.032-2.032V4.58c0-1.13.902-2.032 2.03-2.032zm24.218 1.345l10.375 9.937.75.718H30.5c-1.13 0-2.032-.9-2.032-2.03V3.89z"}))}function tm(){return g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",style:{minWidth:16,marginRight:3},viewBox:"0 0 276.157 276.157"}
1,g("path",{d:"M273.08 101.378c-3.3-4.65-8.86-7.32-15.254-7.32h-24.34V67.59c0-10.2-8.3-18.5-18.5-18.5h-85.322c-3.63 0-9.295-2.875-11.436-5.805l-6.386-8.735c-4.982-6.814-15.104-11.954-23.546-11.954H58.73c-9.292 0-18.638 6.608-21.737 15.372l-2.033 5.752c-.958 2.71-4.72 5.37-7.596 5.37H18.5C8.3 49.09 0 57.39 0 67.59v167.07c0 .886.16 1.73.443 2.52.152 3.306 1.18 6.424 3.053 9.064 3.3 4.652 8.86 7.32 15.255 7.32h188.487c11.395 0 23.27-8.425 27.035-19.18l40.677-116.188c2.11-6.035 1.43-12.164-1.87-16.816zM18.5 64.088h8.864c9.295 0 18.64-6.607 21.738-15.37l2.032-5.75c.96-2.712 4.722-5.373 7.597-5.373h29.565c3.63 0 9.295 2.876 11.437 5.806l6.386 8.735c4.982 6.815 15.104 11.954 23.546 11.954h85.322c1.898 0 3.5 1.602 3.5 3.5v26.47H69.34c-11.395 0-23.27 8.423-27.035 19.178L15 191.23V67.59c0-1.898 1.603-3.5 3.5-3.5zm242.29 49.15l-40.676 116.188c-1.674 4.78-7.812 9.135-12.877 9.135H18.75c-1.447 0-2.576-.372-3.02-.997-.442-.625-.422-1.814.057-3.18l40.677-116.19c1.674-4.78 7.812-9.134 12.877-9.134h188.487c1.448 0 2.577.372 3.02.997.443.625.423 1.814-.056 3.18z"}))}function im(){return g("svg",{"aria-hidden":"true",focusable:"false",style:{width:16,marginRight:4},viewBox:"0 0 58 58"},g("path",{d:"M36.537 28.156l-11-7a1.005 1.005 0 0 0-1.02-.033C24.2 21.3 24 21.635 24 22v14a1 1 0 0 0 1.537.844l11-7a1.002 1.002 0 0 0 0-1.688zM26 34.18V23.82L34.137 29 26 34.18z"}),g("path",{d:"M57 6H1a1 1 0 0 0-1 1v44a1 1 0 0 0 1 1h56a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zM10 28H2v-9h8v9zm-8 2h8v9H2v-9zm10 10V8h34v42H12V40zm44-12h-8v-9h8v9zm-8 2h8v9h-8v-9zm8-22v9h-8V8h8zM2 8h8v9H2V8zm0 42v-9h8v9H2zm54 0h-8v-9h8v9z"}))}function nm(i){const{itemIconString:e}=i;if(null===e)return null;switch(e){case"file":return g(em,null);case"folder":return g(tm,null);case"video":return g(im,null);default:{const{alt:t}=i;return g("img",{src:e,alt:t,referrerPolicy:"no-referrer",loading:"lazy",width:16,height:16})}}}const Rd=function om(i){const{className:e,isDisabled:t,restrictionError:n,isChecked:r,title:a,itemIconEl:l,showTitles:c,toggleCheckbox:b,recordShiftKeyPress:h,id:x,children:v}=i,U=Mt("uppy-u-reset","uppy-ProviderBrowserItem-checkbox","uppy-ProviderBrowserItem-checkbox--grid",{"uppy-ProviderBrowserItem-checkbox--is-checked":r});return g("li",{className:e,title:t?n?.message:void 0},g("input",{type:"checkbox",className:U,onChange:b,onKeyDown:h,onMouseDown:h,name:"listitem",id:x,checked:r,disabled:t,"data-uppy-super-focusable":!0}),g("label",{htmlFor:x,"aria-label":a,className:"uppy-u-reset uppy-ProviderBrowserItem-inner"},l,c&&a,v))};function rm(i){const{className:e,isDisabled:t,restrictionError:n,isCheckboxDisabled:r,isChecked:a,toggleCheckbox:l,recordShiftKeyPress:c,type:b,id:h,itemIconEl:x,title:v,handleFolderClick:U,showTitles:W,i18n:re}=i;return g("li",{className:e,title:t?n?.message:void 0},r?null:g("input",{type:"checkbox",className:"uppy-u-reset uppy-ProviderBrowserItem-checkbox "+(a?"uppy-ProviderBrowserItem-checkbox--is-checked":""),onChange:l,onKeyDown:c,onMouseDown:c,name:"listitem",id:h,checked:a,"aria-label":"file"===b?null:re("allFilesFromFolderNamed",{name:v}),disabled:t,"data-uppy-super-focusable":!0}),"file"===b?g("label",{htmlFor:h,className:"uppy-u-reset uppy-ProviderBrowserItem-inner"},g("div",{className:"uppy-ProviderBrowserItem-iconWrap"},x),W&&v):g("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-ProviderBrowserItem-inner",onClick:U,"aria-label":re("openFolderNamed",{name:v})},g("div",{className:"uppy-ProviderBrowserItem-iconWrap"},x),W&&v?g("span",null,v):re("unnamed")))}function Lo(){return Lo=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},Lo.apply(this,arguments)}function kd(i){const{author:e,getItemIcon:t,isChecked:n,isDisabled:r,viewType:a}=i,l=t(),c=Mt("uppy-ProviderBrowserItem",{"uppy-ProviderBrowserItem--selected":n},{"uppy-ProviderBrowserItem--disabled":r},{"uppy-ProviderBrowserItem--noPreview":"video"===l}),b=g(nm,{itemIconString:l});switch(a){case"grid":return g(Rd,Lo({},i,{className:c,itemIconEl:b}));case"list":return g(rm,Lo({},i,{className:c,itemIconEl:b}));case"unsplash":return g(Rd,Lo({},i,{className:c,itemIconEl:b}),g("a",{href:`${e.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer",className:"uppy-ProviderBrowserItem-author",tabIndex:-1},e.name));default:throw new Error(`There is no such type ${a}`)}}const sm="shared-with-me";function Ld(i){const{currentSelection:e,uppyFiles:t,viewType:n,isChecked:r,toggleCheckbox:a,recordShiftKeyPress:l,showTitles:c,i18n:b,validateRestrictions:h,getNextFolder:x,f:v}=i;
1if(v.isFolder)return kd({showTitles:c,viewType:n,i18n:b,id:v.id,title:v.name,getItemIcon:()=>v.icon,isChecked:r(v),toggleCheckbox:W=>a(W,v),recordShiftKeyPress:l,type:"folder",isDisabled:!1,isCheckboxDisabled:v.id===sm,handleFolderClick:()=>x(v)});const U=h(Ud(v),[...t,...e]);return kd({id:v.id,title:v.name,author:v.author,getItemIcon:()=>"grid"===n&&v.thumbnail?v.thumbnail:v.icon,isChecked:r(v),toggleCheckbox:W=>a(W,v),isCheckboxDisabled:!1,recordShiftKeyPress:l,showTitles:c,viewType:n,i18n:b,type:"file",isDisabled:Boolean(U)&&!r(v),restrictionError:U})}const jd=function am(i){const{currentSelection:e,folders:t,files:n,uppyFiles:r,viewType:a,headerComponent:l,showBreadcrumbs:c,isChecked:b,toggleCheckbox:h,recordShiftKeyPress:x,handleScroll:v,showTitles:U,i18n:W,validateRestrictions:re,isLoading:me,showSearchFilter:ue,search:ve,searchTerm:he,clearSearch:we,searchOnInput:Te,searchInputLabel:We,clearSearchLabel:He,getNextFolder:je,cancel:ke,done:Fe,noResultsLabel:it,virtualList:St}=i,ut=e.length,Ct=us(()=>[...t,...n],[t,n]);return g("div",{className:Mt("uppy-ProviderBrowser",`uppy-ProviderBrowser-viewType--${a}`)},l&&g("div",{className:"uppy-ProviderBrowser-header"},g("div",{className:Mt("uppy-ProviderBrowser-headerBar",!c&&"uppy-ProviderBrowser-headerBar--simple")},l)),ue&&g("div",{class:"uppy-ProviderBrowser-searchFilter"},g(Ad,{search:ve,searchTerm:he,clearSearch:we,inputLabel:We,clearSearchLabel:He,inputClassName:"uppy-ProviderBrowser-searchFilterInput",searchOnInput:Te})),me?g("div",{className:"uppy-Provider-loading"},g("span",null,"string"==typeof me?me:W("loading"))):t.length||n.length?g("div",{className:"uppy-ProviderBrowser-body"},St?g("ul",{className:"uppy-ProviderBrowser-list"},g(Md,{data:Ct,renderRow:ft=>g(Ld,{currentSelection:e,uppyFiles:r,viewType:a,isChecked:b,toggleCheckbox:h,recordShiftKeyPress:x,showTitles:U,i18n:W,validateRestrictions:re,getNextFolder:je,f:ft}),rowHeight:31})):g("ul",{className:"uppy-ProviderBrowser-list",onScroll:v,role:"listbox",tabIndex:-1},Ct.map(ft=>g(Ld,{currentSelection:e,uppyFiles:r,viewType:a,isChecked:b,toggleCheckbox:h,recordShiftKeyPress:x,showTitles:U,i18n:W,validateRestrictions:re,getNextFolder:je,f:ft})))):g("div",{className:"uppy-Provider-empty"},it),ut>0&&g(qh,{selected:ut,done:Fe,cancel:ke,i18n:W}))};class fs extends ti{componentWillUnmount(){const{onUnmount:e}=this.props;e()}render(){const{children:e}=this.props;return Di(e)[0]}}class zd{constructor(e,t){this.filterItems=n=>{const r=this.plugin.getPluginState();return r.filterInput&&""!==r.filterInput?n.filter(a=>-1!==a.name.toLowerCase().indexOf(r.filterInput.toLowerCase())):n},this.recordShiftKeyPress=n=>{this.isShiftKeyPressed=n.shiftKey},this.isChecked=n=>{const{currentSelection:r}=this.plugin.getPluginState();return r.some(a=>a.id===n.id)},this.plugin=e,this.provider=t.provider,this.opts=t,this.isHandlingScroll=!1,this.preFirstRender=this.preFirstRender.bind(this),this.handleError=this.handleError.bind(this),this.clearSelection=this.clearSelection.bind(this),this.cancelPicking=this.cancelPicking.bind(this)}preFirstRender(){this.plugin.setPluginState({didFirstRender:!0}),this.plugin.onFirstRender()}shouldHandleScroll(e){const{scrollHeight:t,scrollTop:n,offsetHeight:r}=e.target;return t-(n+r)<50&&!this.isHandlingScroll}clearSelection(){this.plugin.setPluginState({currentSelection:[],filterInput:""})}cancelPicking(){this.clearSelection();const e=this.plugin.uppy.getPlugin("Dashboard");e&&e.hideAllPanels()}handleError(e){var t;const{uppy:n}=this.plugin,r=n.i18n("companionError");n.log(e.toString()),!e.isAuthError&&"AbortError"!==(null==(t=e.cause)?void 0:t.name)&&n.info({message:r,details:e.toString()},"error",5e3)}registerRequestClient(){this.requestClientId=this.provider.provider,this.plugin.uppy.registerRequestClient(this.requestClientId,this.provider)}getTagFile(e){const t={id:e.id,source:this.plugin.id,name:e.name||e.id,type:e.mimeType,isRemote:!0,data:e,meta:{},body:{fileId:e.id},remote:{companionUrl:this.plugin.opts.companionUrl,url:`${this.provider.fileUrl(e.requestPath)}`,body:{fileId:e.id},providerName:this.provider.name,provider:this.provider.provider,requestClientId:this.requestClientId}};return e.thumbnail&&(t.preview=e.thumbnail),e.author&&(null!=e.author.name&&(t.meta.authorName=String(e.author.name)),e.author.url&&(t.meta.authorUrl=e.author.url)),null!=e.relDirPath&&(t.meta.relativePath=e.relDirPath?`${e.relDirPath}/${t.name}`:null),null!=e.absDirPath&&(t.meta.absolutePath=e.absDirPath?`/${e.absDirPath}/${t.name}`:`/${t.name}`),t}toggleCheckbox(e,t){e.stopPropagation(),e.preventDefault(),e.currentTarget.focu
1s();const{folders:n,files:r}=this.plugin.getPluginState(),a=this.filterItems(n.concat(r));if(this.lastCheckbox&&this.isShiftKeyPressed){const{currentSelection:c}=this.plugin.getPluginState(),b=a.indexOf(this.lastCheckbox),h=a.indexOf(t),x=b<h?a.slice(b,h+1):a.slice(h,b+1),v=[];for(const U of x){const{uppy:W}=this.plugin,re=W.validateRestrictions(Ud(U),[...W.getFiles(),...v]);re?W.info({message:re.message},"error",W.opts.infoTimeout):v.push(U)}return void this.plugin.setPluginState({currentSelection:[...new Set([...c,...v])]})}this.lastCheckbox=t;const{currentSelection:l}=this.plugin.getPluginState();this.isChecked(t)?this.plugin.setPluginState({currentSelection:l.filter(c=>c.id!==t.id)}):this.plugin.setPluginState({currentSelection:l.concat([t])})}setLoading(e){this.plugin.setPluginState({loading:e})}}function Lt(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var lm=0;function jo(i){return"__private_"+lm+++"_"+i}function Ml(i,e){return i?`${i}/${e}`:e}function Nd(){return g("svg",{"aria-hidden":"true",focusable:"false",width:"30",height:"30",viewBox:"0 0 30 30"},g("path",{d:"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z"}))}const cm={viewType:"list",showTitles:!0,showFilter:!0,showBreadcrumbs:!0,loadAllFiles:!1,virtualList:!1};var Sn=jo("abortController"),ri=jo("withAbort"),zo=jo("list"),No=jo("listFilesAndFolders"),Wo=jo("recursivelyListAllFiles");class Wd extends zd{constructor(e,t){super(e,{...cm,...t}),Object.defineProperty(this,Wo,{value:fm}),Object.defineProperty(this,No,{value:mm}),Object.defineProperty(this,zo,{value:hm}),Object.defineProperty(this,ri,{value:um}),Object.defineProperty(this,Sn,{writable:!0,value:void 0}),this.filterQuery=this.filterQuery.bind(this),this.clearFilter=this.clearFilter.bind(this),this.getFolder=this.getFolder.bind(this),this.getNextFolder=this.getNextFolder.bind(this),this.logout=this.logout.bind(this),this.handleAuth=this.handleAuth.bind(this),this.handleScroll=this.handleScroll.bind(this),this.donePicking=this.donePicking.bind(this),this.render=this.render.bind(this),this.plugin.setPluginState({authenticated:void 0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[]}),this.registerRequestClient()}tearDown(){}getFolder(e,t){var n=this;return(0,d.Z)(function*(){n.setLoading(!0);try{yield Lt(n,ri)[ri](function(){var r=(0,d.Z)(function*(a){n.lastCheckbox=void 0;let{breadcrumbs:l}=n.plugin.getPluginState();const c=l.findIndex(x=>e===x.requestPath);l=-1!==c?l.slice(0,c+1):[...l,{requestPath:e,name:t}],n.nextPagePath=e;let b=[],h=[];do{const{files:x,folders:v}=yield Lt(n,No)[No]({breadcrumbs:l,signal:a});b=b.concat(x),h=h.concat(v),n.setLoading(n.plugin.uppy.i18n("loadedXFiles",{numFiles:b.length+h.length}))}while(n.opts.loadAllFiles&&n.nextPagePath);n.plugin.setPluginState({folders:h,files:b,breadcrumbs:l,filterInput:""})});return function(a){return r.apply(this,arguments)}}())}catch(r){if("UserFacingApiError"===r?.name)return void n.plugin.uppy.info({message:n.plugin.uppy.i18n(r.message)},"warning",5e3);n.handleError(r)}finally{n.setLoading(!1)}})()}getNextFolder(e){this.getFolder(e.requestPath,e.name),this.lastCheckbox=void 0}logout(){var e=this;return(0,d.Z)(function*(){try{yield Lt(e,ri)[ri](function(){var t=(0,d.Z)(function*(n){const r=yield e.provider.logout({signal:n});if(r.ok){if(!r.revoked){const l=e.plugin.uppy.i18n("companionUnauthorizeHint",{provider:e.plugin.title,url:r.manual_revoke_url});e.plugin.uppy.info(l,"info",7e3)}e.plugin.setPluginState({authenticated:!1,files:[],folders:[],breadcrumbs:[],filterInput:""})}});return function(n){return t.apply(this,arguments)}}())}catch(t){e.handleError(t)}})()}filterQuery(e){this.plugin.setPluginState({filterInput:e})}clearFilter(){this.plugin.setPluginState({filterInput:""})}handleAuth(e){var t=this;return(0,d.Z)(function*(){try{yield Lt(t,ri)[ri](function(){var n=(0,d.Z)(function*(r){t.setLoading(!0),yield t.provider.login({authFormData:e,signal:r}),t.plugin.setPluginState({authenticated:!0}),t.preFirstRender()});return function(r){return n.apply(this,arguments)}}())}catch(n){if("UserFacingApiError"===n.name)return void t.plugin.uppy.info({message:t.plugin.uppy.i18n(n.message)},"warning",5e3);t.plugin.uppy.log(`login failed: ${n.message}`)}finally{t.setLoading(!1)}})()}handleScroll(e){var t=this;return(0,d.Z)(function*(){if(t.shouldHandleScroll(e)&&t.nextPagePath){t.isHandlingScroll=!0;try{yield Lt(t,ri)[ri](function(){var n=(0,d.Z)(function*(r){const{files:a,folders:l,breadcrumbs:c}=t.plugin.getPluginState(),{files:b,folders:h}=yield Lt(t,No)[No]({breadcrumbs:c,signal:r}),x=a.concat(b),v=l.concat(h);t.plugin.setPluginState({folders:v,files:x})});return function(r){return n.apply(this,arguments)}}())}catch(n){t.handleError(n)}finally{t.isHandlingScroll=!1}}})()}donePicking(){var e=this;return(0,d.Z)(function*(){e.setLoading(!0);try{yield Lt(e,ri)[ri](function(){var t=(0,d.Z)(function*(n){const{currentSelection:r}=e.plugin.getPluginState(),a=[],l=[];for(const c of r){const{requestPath:b}=c,h=x=>({...x,relDirPath:x.absDirPath.replace(c.absDirPath,"").replace(/^\//,"")});if(c.isFolder){let x=!0,v=0;const U=new kh({concurrency:6}),W=me=>{for(const ue of me){const he=ge(e.getTagFile(ue),e.plugin.uppy.getID());e.plugin.uppy.checkIfFileAlreadyExists(he)||(l.push(h(ue)),v++,e.setLoading(e.plugin.uppy.i18n("addedNumFiles",{numFiles:v}))),x=!1}};let re;yield Lt(e,Wo)[Wo]({requestPath:b,absDirPath:Ml(c.absDirPath,c.name),relDirPath:c.name,queue:U,onFiles:W,signal:n}),yield U.onIdle(),re=x?e.plugin.uppy.i18n("emptyFolderAdded"):0===v?e.plugin.uppy.i18n("folderAlreadyAdded",{folder:c.name}):e.plugin.uppy.i18n("folderAdded",{smart_count:v,folder:c.name}),a.push(re)}else l.push(h(c))}e.plugin.uppy.log("Adding files from a remote provider"),e.plugin.uppy.addFiles(l.map(c=>e.getTagFile(c,e.requestClientId))),e.plugin.setPluginState({filterInput:""}),a.forEach(c=>e.plugin.uppy.info(c)),e.clearSelection()});return function(n){return t.apply(this,arguments)}}())}catch(t){e.handleError(t)}
1finally{e.setLoading(!1)}})()}render(e,t){var n=this;void 0===t&&(t={});const{authenticated:r,didFirstRender:a}=this.plugin.getPluginState(),{i18n:l}=this.plugin.uppy;a||this.preFirstRender();const c={...this.opts,...t},{files:b,folders:h,filterInput:x,loading:v,currentSelection:U}=this.plugin.getPluginState(),{isChecked:W,recordShiftKeyPress:re,filterItems:me}=this,ue=""!==x,ve=this.plugin.icon||Nd,he={showBreadcrumbs:c.showBreadcrumbs,getFolder:this.getFolder,breadcrumbs:this.plugin.getPluginState().breadcrumbs,pluginIcon:ve,title:this.plugin.title,logout:this.logout,username:this.username,i18n:l},we={isChecked:W,toggleCheckbox:this.toggleCheckbox.bind(this),recordShiftKeyPress:re,currentSelection:U,files:ue?me(b):b,folders:ue?me(h):h,getNextFolder:this.getNextFolder,getFolder:this.getFolder,loadAllFiles:this.opts.loadAllFiles,virtualList:this.opts.virtualList,showSearchFilter:c.showFilter,search:this.filterQuery,clearSearch:this.clearFilter,searchTerm:x,searchOnInput:!0,searchInputLabel:l("filter"),clearSearchLabel:l("resetFilter"),noResultsLabel:l("noFilesFound"),logout:this.logout,handleScroll:this.handleScroll,done:this.donePicking,cancel:this.cancelPicking,headerComponent:g(Qh,he),title:this.plugin.title,viewType:c.viewType,showTitles:c.showTitles,showBreadcrumbs:c.showBreadcrumbs,pluginIcon:ve,i18n:this.plugin.uppy.i18n,uppyFiles:this.plugin.uppy.getFiles(),validateRestrictions:function(){return n.plugin.uppy.validateRestrictions(...arguments)},isLoading:v};return g(fs,{onUnmount:this.clearSelection},!1===r?g(Vh,{pluginName:this.plugin.title,pluginIcon:ve,handleAuth:this.handleAuth,i18n:this.plugin.uppy.i18nArray,renderForm:this.opts.renderAuthForm,loading:v}):g(jd,we))}}function um(i){return Al.apply(this,arguments)}function Al(){return(Al=(0,d.Z)(function*(i){var e;null==(e=Lt(this,Sn)[Sn])||e.abort();const t=new AbortController;Lt(this,Sn)[Sn]=t;const n=()=>{t.abort(),this.clearSelection()};try{this.plugin.uppy.on("dashboard:close-panel",n),this.plugin.uppy.on("cancel-all",n),yield i(t.signal)}finally{this.plugin.uppy.off("dashboard:close-panel",n),this.plugin.uppy.off("cancel-all",n),Lt(this,Sn)[Sn]=void 0}})).apply(this,arguments)}function hm(i){return Rl.apply(this,arguments)}function Rl(){return(Rl=(0,d.Z)(function*(i){let{requestPath:e,absDirPath:t,signal:n}=i;const{username:r,nextPagePath:a,items:l}=yield this.provider.list(e,{signal:n});return this.username=r||this.username,{items:l.map(c=>({...c,absDirPath:t})),nextPagePath:a}})).apply(this,arguments)}function mm(i){return kl.apply(this,arguments)}function kl(){return(kl=(0,d.Z)(function*(i){let{breadcrumbs:e,signal:t}=i;const n=function dm(i){return i.slice(1).map(e=>e.name).join("/")}(e),{items:r,nextPagePath:a}=yield Lt(this,zo)[zo]({requestPath:this.nextPagePath,absDirPath:n,signal:t});this.nextPagePath=a;const l=[],c=[];return r.forEach(b=>{b.isFolder?c.push(b):l.push(b)}),{files:l,folders:c}})).apply(this,arguments)}function fm(i){return Ll.apply(this,arguments)}function Ll(){return Ll=(0,d.Z)(function*(i){var e=this;let{requestPath:t,absDirPath:n,relDirPath:r,queue:a,onFiles:l,signal:c}=i,b=t;for(;b;){const h=yield Lt(this,zo)[zo]({requestPath:b,absDirPath:n,signal:c});b=h.nextPagePath;const x=h.items.filter(W=>!W.isFolder),v=h.items.filter(W=>W.isFolder);l(x);const U=v.map(function(){var W=(0,d.Z)(function*(re){return a.add((0,d.Z)(function*(){return Lt(e,Wo)[Wo]({requestPath:re.requestPath,absDirPath:Ml(n,re.name),relDirPath:Ml(r,re.name),queue:a,onFiles:l,signal:c})}))});return function(re){return W.apply(this,arguments)}}());yield Promise.all(U)}}),Ll.apply(this,arguments)}function Kd(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}Wd.VERSION="3.13.0";var ym=0;function gm(i){return"__private_"+ym+++"_"+i}const $d={isInputMode:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",currentSelection:[],searchTerm:null},vm={viewType:"grid",showTitles:!0,showFilter:!0,showBreadcrumbs:!0};var Ko=gm("updateFilesAndInputMode");function xm(i,e){this.nextPageQuery=i.nextPageQuery,i.items.forEac
1h(t=>{e.push(t)}),this.plugin.setPluginState({currentSelection:[],isInputMode:!1,files:e,searchTerm:i.searchedFor})}(class _m extends zd{constructor(e,t){super(e,{...vm,...t}),Object.defineProperty(this,Ko,{value:xm}),this.nextPageQuery=null,this.search=this.search.bind(this),this.clearSearch=this.clearSearch.bind(this),this.resetPluginState=this.resetPluginState.bind(this),this.handleScroll=this.handleScroll.bind(this),this.donePicking=this.donePicking.bind(this),this.render=this.render.bind(this),this.plugin.setPluginState($d),this.registerRequestClient()}tearDown(){}resetPluginState(){this.plugin.setPluginState($d)}search(e){var t=this;return(0,d.Z)(function*(){const{searchTerm:n}=t.plugin.getPluginState();if(!e||e!==n){t.setLoading(!0);try{const r=yield t.provider.search(e);Kd(t,Ko)[Ko](r,[])}catch(r){t.handleError(r)}finally{t.setLoading(!1)}}})()}clearSearch(){this.plugin.setPluginState({currentSelection:[],files:[],searchTerm:null})}handleScroll(e){var t=this;return(0,d.Z)(function*(){const n=t.nextPageQuery||null;if(t.shouldHandleScroll(e)&&n){t.isHandlingScroll=!0;try{const{files:r,searchTerm:a}=t.plugin.getPluginState(),l=yield t.provider.search(a,n);Kd(t,Ko)[Ko](l,r)}catch(r){t.handleError(r)}finally{t.isHandlingScroll=!1}}})()}donePicking(){const{currentSelection:e}=this.plugin.getPluginState();this.plugin.uppy.log("Adding remote search provider files"),this.plugin.uppy.addFiles(e.map(t=>this.getTagFile(t))),this.resetPluginState()}render(e,t){var n=this;void 0===t&&(t={});const{didFirstRender:r,isInputMode:a,searchTerm:l}=this.plugin.getPluginState(),{i18n:c}=this.plugin.uppy;r||this.preFirstRender();const b={...this.opts,...t},{files:h,folders:x,filterInput:v,loading:U,currentSelection:W}=this.plugin.getPluginState(),{isChecked:re,filterItems:me,recordShiftKeyPress:ue}=this,ve=""!==v,he={isChecked:re,toggleCheckbox:this.toggleCheckbox.bind(this),recordShiftKeyPress:ue,currentSelection:W,files:ve?me(h):h,folders:ve?me(x):x,handleScroll:this.handleScroll,done:this.donePicking,cancel:this.cancelPicking,showSearchFilter:b.showFilter,search:this.search,clearSearch:this.clearSearch,searchTerm:l,searchOnInput:!1,searchInputLabel:c("search"),clearSearchLabel:c("resetSearch"),noResultsLabel:c("noSearchResults"),title:this.plugin.title,viewType:b.viewType,showTitles:b.showTitles,showFilter:b.showFilter,isLoading:U,showBreadcrumbs:b.showBreadcrumbs,pluginIcon:this.plugin.icon,i18n:c,uppyFiles:this.plugin.uppy.getFiles(),validateRestrictions:function(){return n.plugin.uppy.validateRestrictions(...arguments)}};return g(fs,{onUnmount:this.resetPluginState},a?g("div",{className:"uppy-SearchProvider"},g(Ad,{search:this.search,inputLabel:c("enterTextToSearch"),buttonLabel:c("searchImages"),inputClassName:"uppy-c-textInput uppy-SearchProvider-input",buttonCSSClassName:"uppy-SearchProvider-searchButton",showButton:!0})):g(jd,he))}}).VERSION="3.13.0";var Vd=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Sm(i,e){return!!(i===e||Vd(i)&&Vd(e))}function Cm(i,e){if(i.length!==e.length)return!1;for(var t=0;t<i.length;t++)if(!Sm(i[t],e[t]))return!1;return!0}function Hd(i,e){void 0===e&&(e=Cm);var t=null;function n(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];if(t&&t.lastThis===this&&e(r,t.lastArgs))return t.lastResult;var l=i.apply(this,r);return t={lastResult:l,lastArgs:r,lastThis:this},l}return n.clear=function(){t=null},n}const Gd=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])'];function Zd(i,e){if(e){const t=i.querySelector(`[data-uppy-paneltype="${e}"]`);if(t)return t}return i}function Qd(i,e){const t=e[0];t&&(t.focus(),i.preventDefault())}function Xd(i,e,t){const n=Zd(t,e),r=bn(n.querySelectorAll(Gd)),a=r.indexOf(document.activeElement);!function Im(i){return i.contains(document.activeElement)}(n)?Qd(i,r):i.shiftKey&&0===a?function wm(i,e){const t=e[e.length-1];t&&(t.focus(),i.preventDefault())}(i,r):!i.shiftKey&&a===r.length-1&&Qd(i,r)}var Dm=s(87111);
1function Om(){const i=document.body;return!!("draggable"in i&&"ondragstart"in i&&"ondrop"in i&&"FormData"in window&&"FileReader"in window)}var Bm=s(1393);function jl(i){const e={color:"#838999",icon:g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},g("g",{fill:"#A7AFB7",fillRule:"nonzero"},g("path",{d:"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z"}),g("path",{d:"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z"})))};if(!i)return e;const t=i.split("/")[0],n=i.split("/")[1];return"text"===t?{color:"#5a5e69",icon:g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},g("path",{d:"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z",fill:"#5A5E69",fillRule:"nonzero"}))}:"image"===t?{color:"#686de0",icon:g("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},g("g",{fill:"#686DE0",fillRule:"evenodd"},g("path",{d:"M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",fillRule:"nonzero"}),g("path",{d:"M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z",fillRule:"nonzero"}),g("circle",{cx:"7.5",cy:"9.5",r:"1.5"})))}:"audio"===t?{color:"#068dbb",icon:g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},g("path",{d:"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z",fill:"#049BCF",fillRule:"nonzero"}))}:"video"===t?{color:"#19af67",icon:g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},g("path",{d:"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z",fill:"#19AF67",fillRule:"nonzero"}))}:"application"===t&&"pdf"===n?{color:"#e25149",icon:g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},g("path",{d:"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z",fill:"#E2514A",fillRule:"nonzero"}))}:"application"===t&&-1!==["zip","x-7z-compressed","x-zip-compressed","x-rar-compressed","x-tar","x-gzip","x-apple-diskimage"].indexOf(n)?{color:"#00C469",icon:g("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},g("path",{d:"M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z",fill:"#00C469",fillRule:"nonzero"}))}:e}function Yd(i){const{file:e}=i;if(e.preview)return g("img",{className:"uppy-Dashboard-Item-previewImg",alt:e.name,src:e.preview});const{color:t,icon:n}=jl(e.type);return g("div",{className:"uppy-Dashboard-Item-previewIconWrap"},g("span",{className:"uppy-Dashboard-Item-previewIcon",style:{color:t}},n),g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-Dashboard-Item-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76"},g("rect",{fill:"#FFF",width:"58",height:"76",rx:"3",fillRule:"evenodd"})))}const Lm=(i,e)=>("function"==typeof e?e():e).filter(r=>r.id===i)[0].name;function Jd(i){const{file:e,toggleFileCard:t,i18n:n,metaFields:r}=i,{missingRequiredMetaFields:a}=e;if(null==a||!a.length)return null;const l=a.map(c=>Lm(c,r)).join(", ");return g("div",{className:"uppy-Dashboard-Item-errorMessage"},n("missingRequiredMetaFields",{smart_count:a.length,fields:l})," ",g("button",{type:"button",class:"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn",onClick:()=>t(!0,e.id)},n("editFile")))}function jm(i){const{file:e,i18n:t,toggleFileCard:n,metaFields:r,showLinkToFileUploadResult:a}=i;return g("div",{className:"uppy-Dashboard-Item-previewInnerWrap",style:{backgroundColor:e.preview?"rgba(255, 255, 255, 0.5)":jl(e.type).color}},a&&e.uploadURL&&g("a",{className:"uppy-Dashboard-Item-previewLink",href:e.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":e.meta.name},g("span",{hidden:!0},e.meta.name)),g(Yd,{file:e}),g(Jd,{file:e,i18n:t,toggleFileCard:n,metaFields:r}))}function qd(i){return i.isUploaded?i.i18n("uploadComplete"):i.error?i.i18n("retryUpload"):i.resumableUploads?i.i18n(i.file.isPaused?"resumeUpload":"pauseUpload"):i.individualCancellation?i.i18n("cancelUpload"):""}function zl(i){return g("div",{className:"uppy-Dashboard-Item-progress"},g("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-progressIndicator",type:"button","aria-label":qd(i),title:qd(i),onClick:()=>function zm(i){if(!i.isUploaded){if(i.error&&!i.hideRetryButton)return void i.uppy.retryUpload(i.file.id);i.resumableUploads&&!i.hidePauseResumeButton?i.uppy.pauseResume(i.file.id):i.individualCancellation&&!i.hideCancelButton&&i.uppy.removeFile(i.file.id)}}(i)},i.children))}function ys(i){let{children:e}=i;return g("svg",{"aria-hidden":"true",focusable:"false",width:"70",height:"70",viewBox:"0 0 36 36",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--circle"},e)}function Nl(i){let{progress:e}=i;const t=2*Math.PI*15;return g("g",null,g("circle",{className:"uppy-Dashboard-Item-progressIcon--bg",r:"15",cx:"18",cy:"18","stroke-width":"2",fill:"none"}),g("circle",{className:"uppy-Dashboard-Item-progressIcon--progress",r:"15",cx:"18",cy:"18",transform:"rotate(-90, 18, 18)",fill:"none","stroke-width":"2","stroke-dasharray":t,"stroke-dashoffset":t-t/100*e}))}function Nm(i){return i.file.progress.uploadStarted?i.isUploaded?g("div",{className:"uppy-Dashboard-Item-progress"},g("div",{className:"uppy-Dashboard-Item-progressIndicator"},g(ys,null,g("circle",{r:"15",cx:"18",cy:"18",fill:"#1bb240"}),g("polygon",{className:"uppy-Dashboard-Item-progressIcon--check",transform:"translate(2, 3)",points:"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634"})))):i.recoveredState?void 0:i.error&&!i.hideRetryButton?g(zl,i,g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry",width:"28",height:"31",viewBox:"0 0 16 19"},g("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),g("path",{d:"M7.9 3H10v2H7.9z"}),g("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),g("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"}))):i.resumableUploads&&!i.hidePauseResumeButton?g(zl,i,g(ys,null,g(Nl,{progress:i.file.progress.percentage}),i.file.isPaused?g("polygon",{className:"uppy-Dashboard-Item-progressIcon--play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}):g("g",{className:"uppy-Dashboard-Item-progressIcon--pause",transform:"translate(14.5, 13)"},g("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),g("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})))):i.resumableUploads||!i.individualCancellation||i.hideCancelButton?g("div",{className:"uppy-Dashboard-Item-progress"},g("div",{className:"uppy-Dashboard-Item-progressIndicator"},g(ys,null,g(Nl,{progress:i.file.progress.percentage}
1)))):g(zl,i,g(ys,null,g(Nl,{progress:i.file.progress.percentage}),g("polygon",{className:"cancel",transform:"translate(2, 2)",points:"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12"}))):null}const Wl="...";function ec(i,e){if(0===e)return"";if(i.length<=e)return i;if(e<=Wl.length+1)return`${i.slice(0,e-1)}\u2026`;const t=e-Wl.length,n=Math.ceil(t/2),r=Math.floor(t/2);return i.slice(0,n)+Wl+i.slice(-r)}const Wm=i=>{const{author:e,name:t}=i.file.meta;return g("div",{className:"uppy-Dashboard-Item-name",title:t},ec(t,function n(){return i.isSingleFile&&i.containerHeight>=350?90:i.containerWidth<=352?35:i.containerWidth<=576?60:e?20:30}()))},Km=i=>{var e;const{author:t}=i.file.meta,n=null==(e=i.file.remote)?void 0:e.providerName;return t?g("div",{className:"uppy-Dashboard-Item-author"},g("a",{href:`${t.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer"},ec(t.name,13)),n?g(Xt,null," \xb7 ",n," \xb7 "):null):null},$m=i=>i.file.size&&g("div",{className:"uppy-Dashboard-Item-statusSize"},Ne(i.file.size)),Vm=i=>i.file.isGhost&&g("span",null," \u2022 ",g("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect",type:"button",onClick:i.toggleAddFilesPanel},i.i18n("reSelect"))),Hm=i=>{let{file:e,onClick:t}=i;return e.error?g("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-errorDetails","aria-label":e.error,"data-microtip-position":"bottom","data-microtip-size":"medium",onClick:t,type:"button"},"?"):null};function Gm(i){const{file:e}=i;return g("div",{className:"uppy-Dashboard-Item-fileInfo","data-uppy-file-source":e.source},g("div",{className:"uppy-Dashboard-Item-fileName"},Wm(i),g(Hm,{file:i.file,onClick:()=>alert(i.file.error)})),g("div",{className:"uppy-Dashboard-Item-status"},Km(i),$m(i),Vm(i)),g(Jd,{file:i.file,i18n:i.i18n,toggleFileCard:i.toggleFileCard,metaFields:i.metaFields}))}function Qm(i){let{file:e,uploadInProgressOrComplete:t,metaFields:n,canEditFile:r,i18n:a,onClick:l}=i;return!t&&n&&n.length>0||!t&&r(e)?g("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit",type:"button","aria-label":a("editFileWithFilename",{file:e.meta.name}),title:a("editFileWithFilename",{file:e.meta.name}),onClick:()=>l()},g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 14"},g("g",{fillRule:"evenodd"},g("path",{d:"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z",fillRule:"nonzero"}),g("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),g("path",{fillRule:"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})))):null}function Xm(i){let{i18n:e,onClick:t,file:n}=i;return g("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove",type:"button","aria-label":e("removeFile",{file:n.meta.name}),title:e("removeFile",{file:n.meta.name}),onClick:()=>t()},g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"18",height:"18",viewBox:"0 0 18 18"},g("path",{d:"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z"}),g("path",{fill:"#FFF",d:"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z"})))}const Ym=(i,e)=>{(function Zm(i,e){return void 0===e&&(e="Copy the URL below"),new Promise(t=>{const n=document.createElement("textarea");n.setAttribute("style",{position:"fixed",top:0,left:0,width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}),n.value=i,document.body.appendChild(n),n.select();const r=()=>{document.body.removeChild(n),window.prompt(e,i),t()};try{return document.execCommand("copy")?(document.body.removeChild(n),t()):r()}catch{return document.body.removeChild(n),r()}})})(e.file.uploadURL,e.i18n("copyLinkToClipboardFallback")).then(()=>{e.uppy.log("Link copied to clipboard."),e.uppy.info(e.i18n("copyLinkToClipboardSuccess"),"info",3e3)}).catch(e.uppy.log).then(()=>
1i.target.focus({preventScroll:!0}))};function Jm(i){const{i18n:e}=i;return g("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink",type:"button","aria-label":e("copyLink"),title:e("copyLink"),onClick:t=>Ym(t,i)},g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 12"},g("path",{d:"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z"})))}function qm(i){const{uppy:e,file:t,uploadInProgressOrComplete:n,canEditFile:r,metaFields:a,showLinkToFileUploadResult:l,showRemoveButton:c,i18n:b,toggleFileCard:h,openFileEditor:x}=i;return g("div",{className:"uppy-Dashboard-Item-actionWrapper"},g(Qm,{i18n:b,file:t,uploadInProgressOrComplete:n,canEditFile:r,metaFields:a,onClick:()=>{a&&a.length>0?h(!0,t.id):x(t)}}),l&&t.uploadURL?g(Jm,{file:t,uppy:e,i18n:b}):null,c?g(Xm,{i18n:b,file:t,uppy:e,onClick:()=>e.removeFile(t.id,"removed-by-user")}):null)}class ef extends ti{componentDidMount(){const{file:e}=this.props;
1e.preview||this.props.handleRequestThumbnail(e)}shouldComponentUpdate(e){return!Bm(this.props,e)}componentDidUpdate(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}componentWillUnmount(){const{file:e}=this.props;e.preview||this.props.handleCancelThumbnail(e)}render(){const{file:e}=this.props,t=e.progress.preprocess||e.progress.postprocess,n=e.progress.uploadComplete&&!t&&!e.error,r=e.progress.uploadStarted||t,a=e.progress.uploadStarted&&!e.progress.uploadComplete||t,l=e.error||!1,{isGhost:c}=e;let b=(this.props.individualCancellation||!a)&&!n;return n&&this.props.showRemoveButtonAfterComplete&&(b=!0),g("div",{className:Mt({"uppy-Dashboard-Item":!0,"is-inprogress":a&&!this.props.recoveredState,"is-processing":t,"is-complete":n,"is-error":!!l,"is-resumable":this.props.resumableUploads,"is-noIndividualCancellation":!this.props.individualCancellation,"is-ghost":c}),id:`uppy_${e.id}`,role:this.props.role},g("div",{className:"uppy-Dashboard-Item-preview"},g(jm,{file:e,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,i18n:this.props.i18n,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),g(Nm,{uppy:this.props.uppy,file:e,error:l,isUploaded:n,hideRetryButton:this.props.hideRetryButton,hideCancelButton:this.props.hideCancelButton,hidePauseResumeButton:this.props.hidePauseResumeButton,recoveredState:this.props.recoveredState,showRemoveButtonAfterComplete:this.props.showRemoveButtonAfterComplete,resumableUploads:this.props.resumableUploads,individualCancellation:this.props.individualCancellation,i18n:this.props.i18n})),g("div",{className:"uppy-Dashboard-Item-fileInfoAndButtons"},g(Gm,{file:e,id:this.props.id,acquirers:this.props.acquirers,containerWidth:this.props.containerWidth,containerHeight:this.props.containerHeight,i18n:this.props.i18n,toggleAddFilesPanel:this.props.toggleAddFilesPanel,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields,isSingleFile:this.props.isSingleFile}),g(qm,{file:e,metaFields:this.props.metaFields,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,showRemoveButton:b,canEditFile:this.props.canEditFile,uploadInProgressOrComplete:r,toggleFileCard:this.props.toggleFileCard,openFileEditor:this.props.openFileEditor,uppy:this.props.uppy,i18n:this.props.i18n})))}}function nf(i){let{id:e,error:t,i18n:n,uppy:r,files:a,acquirers:l,resumableUploads:c,hideRetryButton:b,hidePauseResumeButton:h,hideCancelButton:x,showLinkToFileUploadResult:v,showRemoveButtonAfterComplete:U,isWide:W,metaFields:re,isSingleFile:me,toggleFileCard:ue,handleRequestThumbn
1ail:ve,handleCancelThumbnail:he,recoveredState:we,individualCancellation:Te,itemsPerRow:We,openFileEditor:He,canEditFile:je,toggleAddFilesPanel:ke,containerWidth:Fe,containerHeight:it}=i;const St=1===We?71:200,ut=us(()=>{const wt=Object.keys(a);return we&&wt.sort((Z,A)=>a[A].isGhost-a[Z].isGhost),function tf(i,e){const t=[];let n=[];return i.forEach(r=>{n.length<e?n.push(r):(t.push(n),n=[r])}),n.length&&t.push(n),t}(wt,We)},[a,We,we]),Ct=ft=>g("div",{class:"uppy-Dashboard-filesInner",role:"presentation",key:ft[0]},ft.map(wt=>g(ef,{key:wt,uppy:r,id:e,error:t,i18n:n,acquirers:l,resumableUploads:c,individualCancellation:Te,hideRetryButton:b,hidePauseResumeButton:h,hideCancelButton:x,showLinkToFileUploadResult:v,showRemoveButtonAfterComplete:U,isWide:W,metaFields:re,recoveredState:we,isSingleFile:me,containerWidth:Fe,containerHeight:it,toggleFileCard:ue,handleRequestThumbnail:ve,handleCancelThumbnail:he,role:"listitem",openFileEditor:He,canEditFile:je,toggleAddFilesPanel:ke,file:a[wt]})));return me?g("div",{class:"uppy-Dashboard-files"},Ct(ut[0])):g(Md,{class:"uppy-Dashboard-files",role:"list",data:ut,renderRow:Ct,rowHeight:St})}let tc;tc=Symbol.for("uppy test: disable unused locale key warning");const ic=class of extends ti{constructor(){super(...arguments),this.triggerFileInputClick=()=>{this.fileInput.click()},this.triggerFolderInputClick=()=>{this.folderInput.click()},this.triggerVideoCameraInputClick=()=>{this.mobileVideoFileInput.click()},this.triggerPhotoCameraInputClick=()=>{this.mobilePhotoFileInput.click()},this.onFileInputChange=e=>{this.props.handleInputChange(e),e.target.value=null},this.renderHiddenInput=(e,t)=>g("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,webkitdirectory:e,type:"file",name:"files[]",multiple:1!==this.props.maxNumberOfFiles,onChange:this.onFileInputChange,accept:this.props.allowedFileTypes,ref:t}),this.renderHiddenCameraInput=(e,t,n)=>g("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,type:"file",name:`camera-${e}`,onChange:this.onFileInputChange,capture:t,accept:{photo:"image/*",video:"video/*"}[e],ref:n}),this.renderMyDeviceAcquirer=()=>g("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MyDevice"},g("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerFileInputClick},g("div",{className:"uppy-DashboardTab-inner"},g("svg",{className:"uppy-DashboardTab-iconMyDevice","aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},g("path",{d:"M8.45 22.087l-1.305-6.674h17.678l-1.572 6.674H8.45zm4.975-12.412l1.083 1.765a.823.823 0 00.715.386h7.951V13.5H8.587V9.675h4.838zM26.043 13.5h-1.195v-2.598c0-.463-.336-.75-.798-.75h-8.356l-1.082-1.766A.823.823 0 0013.897 8H7.728c-.462 0-.815.256-.815.718V13.5h-.956a.97.97 0 00-.746.37.972.972 0 00-.19.81l1.724 8.565c.095.44.484.755.933.755H24c.44 0 .824-.3.929-.727l2.043-8.568a.972.972 0 00-.176-.825.967.967 0 00-.753-.38z",fill:"currentcolor","fill-rule":"evenodd"}))),g("div",{className:"uppy-DashboardTab-name"},this.props.i18n("myDevice")))),this.renderPhotoCamera=()=>g("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MobilePhotoCamera"},g("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerPhotoCameraInputClick},g("div",{className:"uppy-DashboardTab-inner"},g("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},g("path",{d:"M23.5 9.5c1.417 0 2.5 1.083 2.5 2.5v9.167c0 1.416-1.083 2.5-2.5 2.5h-15c-1.417 0-2.5-1.084-2.5-2.5V12c0-1.417 1.083-2.5 2.5-2.5h2.917l1.416-2.167C13 7.167 13.25 7 13.5 7h5c.25 0 .5.167.667.333L20.583 9.5H23.5zM16 11.417a4.706 4.706 0 00-4.75 4.75 4.704 4.704 0 004.75 4.75 4.703 4.703 0 004.75-4.75c0-2.663-2.09-4.75-4.75-4.75zm0 7.825c-1.744 0-3.076-1.332-3.076-3.074 0-1.745 1.333-3.077 3.076-3.077 1.744 0 3.074 1.333 3.074 3.076s-1.33 3.075-3.074 3.075z",fill:"#02B383","fill-rule":"nonzero"}))),g("div",{className:"uppy-DashboardTab-name"},this.props.i18n("takePictureBtn")))),this.renderVideoCamera=()=>g("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MobileVideoCamera"},g("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerVideoCameraInputClick},g("div",{className:"uppy-DashboardTab-inner"},g("svg",{"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32"},g("path",{fill:"#FF675E",fillRule:"nonzero",d:"m21.254 14.277 2.941-2.588c.797-.313 1.243.818 1.09 1.554-.01 2.094.02 4.189-.017 6.282-.126.915-1.145 1.08-1.58.34l-2.434-2.142c-.192.287-.504 1.305-.738.468-.104-1.293-.028-2.596-.05-3.894.047-.312.381.823.426 1.069.063-.384.206-.744.362-1.09zm-12.939-3.73c3.858.013 7.717-.025 11.574.02.912.129 1.492 1.237 1.351 2.217-.019 2.412.04 4.83-.03 7.239-.17 1.025-1.166 1.59-2.029 1.429-3.705-.012-7.41.025-11.114-.019-.913-.129-1.492-1.237-1.352-2.217.018-2.404-.036-4.813.029-7.214.136-.82.83-1.473 1.571-1.454z "}))),g("div",{className:"uppy-DashboardTab-name"},this.props.i18n("recordVideoBtn")))),this.renderBrowseButton=(e,t)=>g("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-browse",onClick:t,"data-uppy-super-focusable":0===this.props.acquirers.length},e),this.renderDropPasteBrowseTagline=e=>{const t=this.renderBrowseButton(this.props.i18n("browseFiles"),this.triggerFileInputClick),n=this.renderBrowseButton(this.props.i18n("browseFolders"),this.triggerFolderInputClick),r=this.props.fileManagerSelectionType,a=r.charAt(0).toUpperCase()+r.slice(1);return g("div",{class:"uppy-Dashboard-AddFiles-title"},this.props.disableLocalFiles?this.props.i18n("importFiles"):this.props.i18nArray(e>0?`dropPasteImport${a}`:`dropPaste${a}`,{browseFiles:t,browseFolders:n,browse:t}))},this.renderAcquirer=e=>{var t;return g("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":e.id},g("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-cy":e.id,"aria-controls":`uppy-DashboardContent-panel--${e.id}`,"aria-selected":(null==(t=this.props.activePickerPanel)?void 0:t.id)===e.id,"data-uppy-super-focusable":!0,onClick:()=>this.props.showPanel(e.id)},g("div",{className:"uppy-DashboardTab-inner"},e.icon()),g("div",{className:"uppy-DashboardTab-name"},e.name)))},this.renderAcquirers=e=>{const t=[...e],n=t.splice(e.length-2,e.length);return g(Xt,null,t.map(r=>this.renderAcquirer(r)),g("span",{role:"presentation",style:{"white-space":"nowrap"}},n.map(r=>this.renderAcquirer(r))))},this.renderSourcesList=(e,t)=>
1{const{showNativePhotoCameraButton:n,showNativeVideoCameraButton:r}=this.props;let a=[];const l="myDevice";t||a.push({key:l,elements:this.renderMyDeviceAcquirer()}),n&&a.push({key:"nativePhotoCameraButton",elements:this.renderPhotoCamera()}),r&&a.push({key:"nativePhotoCameraButton",elements:this.renderVideoCamera()}),a.push(...e.map(v=>({key:v.id,elements:this.renderAcquirer(v)}))),1===a.length&&a[0].key===l&&(a=[]);const b=[...a],h=b.splice(a.length-2,a.length),x=v=>v.map(U=>{let{key:W,elements:re}=U;return g(Xt,{key:W},re)});return g(Xt,null,this.renderDropPasteBrowseTagline(a.length),g("div",{className:"uppy-Dashboard-AddFiles-list",role:"tablist"},x(b),g("span",{role:"presentation",style:{"white-space":"nowrap"}},x(h))))}}[tc](){this.props.i18nArray("dropPasteBoth"),this.props.i18nArray("dropPasteFiles"),this.props.i18nArray("dropPasteFolders"),this.props.i18nArray("dropPasteImportBoth"),this.props.i18nArray("dropPasteImportFiles"),this.props.i18nArray("dropPasteImportFolders")}renderPoweredByUppy(){const{i18nArray:e}=this.props,t=g("span",null,g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11"},g("path",{d:"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z",fillRule:"evenodd"})),g("span",{className:"uppy-Dashboard-poweredByUppy"},"Uppy"));return g("a",{tabIndex:-1,href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",className:"uppy-Dashboard-poweredBy"},e("poweredBy",{uppy:t}))}render(){const{showNativePhotoCameraButton:e,showNativeVideoCameraButton:t,nativeCameraFacingMode:n}=this.props;return g("div",{className:"uppy-Dashboard-AddFiles"},this.renderHiddenInput(!1,r=>{this.fileInput=r}),this.renderHiddenInput(!0,r=>{this.folderInput=r}),e&&this.renderHiddenCameraInput("photo",n,r=>{this.mobilePhotoFileInput=r}),t&&this.renderHiddenCameraInput("video",n,r=>{this.mobileVideoFileInput=r}),this.renderSourcesList(this.props.acquirers,this.props.disableLocalFiles),g("div",{className:"uppy-Dashboard-AddFiles-info"},this.props.note&&g("div",{className:"uppy-Dashboard-note"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy(this.props)))}},rf=i=>g("div",{className:Mt("uppy-Dashboard-AddFilesPanel",i.className),"data-uppy-panelType":"AddFiles","aria-hidden":!i.showAddFilesPanel},g("div",{className:"uppy-DashboardContent-bar"},g("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},i.i18n("addingMoreFiles")),g("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>i.toggleAddFilesPanel(!1)},i.i18n("back"))),g(ic,i)),Xi=function sf(i){const{tagName:e}=i.target;"INPUT"!==e&&"TEXTAREA"!==e?(i.preventDefault(),i.stopPropagation()):i.stopPropagation()},lf=function af(i){let{activePickerPanel:e,className:t,hideAllPanels:n,i18n:r,state:a,uppy:l}=i;return g("div",{className:Mt("uppy-DashboardContent-panel",t),role:"tabpanel","data-uppy-panelType":"PickerPanel",id:`uppy-DashboardContent-panel--${e.id}`,onDragOver:Xi,onDragLeave:Xi,onDrop:Xi,onPaste:Xi},g("div",{className:"uppy-DashboardContent-bar"},g("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},r("importFrom",{name:e.name})),g("button",{className:"uppy-DashboardContent-back",type:"button",onClick:n},r("cancel"))),g("div",{className:"uppy-DashboardContent-panelBody"},l.getPlugin(e.id).render(a)))},df=function pf(i){const e=i.files[i.fileCardFor];return g("div",{className:Mt("uppy-DashboardContent-panel",i.className),role:"tabpanel","data-uppy-panelType":"FileEditor",id:"uppy-DashboardContent-panel--editor"},g("div",{className:"uppy-DashboardContent-bar"},g("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},i.i18nArray("editing",{file:g("span",{className:"uppy-DashboardContent-titleFile"},e.meta?e.meta.name:e.name)})),g("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>{i.uppy.emit("file-editor:cancel",e),i.closeFileEditor()}},i.i18n("cancel")),g("button",{className:"uppy-DashboardContent-save",type:"button",onClick:i.saveFileEditor},i.i18n("save"))),g("div",{className:"uppy-DashboardContent-panelBody"},i.editors.map(n=>i.uppy.getPlugin(n.id).render(i.state))))},mi={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete",
1STATE_PAUSED:"paused"};function uf(i){let{files:e,i18n:t,isAllComplete:n,isAllErrored:r,isAllPaused:a,inProgressNotPausedFiles:l,newFiles:c,processingFiles:b}=i;switch(function cf(i,e,t,n){if(void 0===n&&(n={}),i)return mi.STATE_ERROR;if(e)return mi.STATE_COMPLETE;if(t)return mi.STATE_PAUSED;let r=mi.STATE_WAITING;const a=Object.keys(n);for(let l=0;l<a.length;l++){const{progress:c}=n[a[l]];if(c.uploadStarted&&!c.uploadComplete)return mi.STATE_UPLOADING;c.preprocess&&r!==mi.STATE_UPLOADING&&(r=mi.STATE_PREPROCESSING),c.postprocess&&r!==mi.STATE_UPLOADING&&r!==mi.STATE_PREPROCESSING&&(r=mi.STATE_POSTPROCESSING)}return r}(r,n,a,e)){case"uploading":return t("uploadingXFiles",{smart_count:l.length});case"preprocessing":case"postprocessing":return t("processingXFiles",{smart_count:b.length});case"paused":return t("uploadPaused");case"waiting":return t("xFilesSelected",{smart_count:c.length});case"complete":return t("uploadComplete");case"error":return t("error")}}const mf=function hf(i){const{i18n:e,isAllComplete:t,hideCancelButton:n,maxNumberOfFiles:r,toggleAddFilesPanel:a,uppy:l}=i;let{allowNewUpload:c}=i;return c&&r&&(c=i.totalFileCount<i.maxNumberOfFiles),g("div",{className:"uppy-DashboardContent-bar"},t||n?g("div",null):g("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>l.cancelAll()},e("cancel")),g("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},g(uf,i)),c?g("button",{className:"uppy-DashboardContent-addMore",type:"button","aria-label":e("addMoreFiles"),title:e("addMoreFiles"),onClick:()=>a(!0)},g("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"15",height:"15",viewBox:"0 0 15 15"},g("path",{d:"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z"})),g("span",{className:"uppy-DashboardContent-addMoreCaption"},e("addMore"))):g("div",null))};function ff(i){const{computedMetaFields:e,requiredMetaFields:t,updateMeta:n,form:r,formState:a}=i,l={text:"uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input"};return e.map(c=>{const b=`uppy-Dashboard-FileCard-input-${c.id}`,h=t.includes(c.id);return g("fieldset",{key:c.id,className:"uppy-Dashboard-FileCard-fieldset"},g("label",{className:"uppy-Dashboard-FileCard-label",htmlFor:b},c.name),void 0!==c.render?c.render({value:a[c.id],onChange:x=>n(x,c.id),fieldCSSClasses:l,required:h,form:r.id},g):g("input",{className:l.text,id:b,form:r.id,type:c.type||"text",required:h,value:a[c.id],placeholder:c.placeholder,onInput:x=>n(x.target.value,c.id),"data-uppy-super-focusable":!0}))})}function yf(i){var e;const{files:t,fileCardFor:n,toggleFileCard:r,saveFileCard:a,metaFields:l,requiredMetaFields:c,openFileEditor:b,i18n:h,i18nArray:x,className:v,canEditFile:U}=i,re=t[n],me=null!=(e="function"==typeof l?l(t[n]):l)?e:[],ue=U(re),ve={};me.forEach(ke=>{var Fe;ve[ke.id]=null!=(Fe=re.meta[ke.id])?Fe:""});const[he,we]=xn(ve),Te=hs(ke=>{ke.preventDefault(),a(he,n)},[a,he,n]),He=()=>{r(!1)},[je]=xn(()=>{const ke=document.createElement("form");return ke.setAttribute("tabindex","-1"),ke.id=S(),ke});return cs(()=>(document.body.appendChild(je),je.addEventListener("submit",Te),()=>{je.removeEventListener("submit",Te),document.body.removeChild(je)}),[je,Te]),g("div",{className:Mt("uppy-Dashboard-FileCard",v),"data-uppy-panelType":"FileCard",onDragOver:Xi,onDragLeave:Xi,onDrop:Xi,onPaste:Xi},g("div",{className:"uppy-DashboardContent-bar"},g("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},x("editing",{file:g("span",{className:"uppy-DashboardContent-titleFile"},re.meta?re.meta.name:re.name)})),g("button",{className:"uppy-DashboardContent-back",type:"button",form:je.id,title:h("finishEditingFile"),onClick:He},h("cancel"))),g("div",{className:"uppy-Dashboard-FileCard-inner"},g("div",{className:"uppy-Dashboard-FileCard-preview",style:{backgroundColor:jl(re.type).color}},g(Yd,{file:re}),ue&&g("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit",onClick:ke=>{Te(ke),b(re)}},h("editImage"))),g("div",{className:"uppy-Dashboard-FileCard-info"},g(ff,{computedMetaFields:me,requiredMetaFields:c,updateMeta:(ke,Fe)=>{we({...he,[Fe]:ke})},form:je,formState:he})),g("div",{className:"uppy-Dashboard-FileCard-actions"},g("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn",type:"submit",form:je.id},h("saveChanges")),g("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn",type:"button",onClick:He,form:je.id},h("cancel")))))}
1const $n="uppy-transition-slideDownUp",gs=function gf(i){let{children:e}=i;const[t,n]=xn(null),[r,a]=xn(""),l=Bl(),c=Bl(),b=Bl();return cs(()=>{const v=Di(e)[0];t!==v&&(v&&!t?(a(`${$n}-enter`),cancelAnimationFrame(b.current),clearTimeout(c.current),c.current=void 0,b.current=requestAnimationFrame(()=>{a(`${$n}-enter ${$n}-enter-active`),l.current=setTimeout(()=>{a("")},250)})):t&&!v&&!c.current&&(a(`${$n}-leave`),cancelAnimationFrame(b.current),clearTimeout(l.current),l.current=void 0,b.current=requestAnimationFrame(()=>{a(`${$n}-leave ${$n}-leave-active`),c.current=setTimeout(()=>{n(null),a("")},250)})),n(v))},[e,t]),cs(()=>()=>{clearTimeout(l.current),clearTimeout(c.current),cancelAnimationFrame(b.current)},[]),t?Tp(t,{className:Mt(r,t.props.className)}):null};function Cn(){return Cn=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},Cn.apply(this,arguments)}const vf={strings:{closeModal:"Close Modal",addMoreFiles:"Add more files",addingMoreFiles:"Adding more files",importFrom:"Import from %{name}",dashboardWindowTitle:"Uppy Dashboard Window (Press escape to close)",dashboardTitle:"Uppy Dashboard",copyLinkToClipboardSuccess:"Link copied to clipboard.",copyLinkToClipboardFallback:"Copy the URL below",copyLink:"Copy link",back:"Back",removeFile:"Remove file",editFile:"Edit file",editImage:"Edit image",editing:"Editing %{file}",error:"Error",finishEditingFile:"Finish editing file",saveChanges:"Save changes",myDevice:"My Device",dropHint:"Drop your files here",uploadComplete:"Upload complete",uploadPaused:"Upload paused",resumeUpload:"Resume upload",pauseUpload:"Pause upload",retryUpload:"Retry upload",cancelUpload:"Cancel upload",xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},poweredBy:"Powered by %{uppy}",addMore:"Add more",editFileWithFilename:"Edit file %{file}",save:"Save",cancel:"Cancel",dropPasteFiles:"Drop files here or %{browseFiles}",dropPasteFolders:"Drop files here or %{browseFolders}",dropPasteBoth:"Drop files here, %{browseFiles} or %{browseFolders}",dropPasteImportFiles:"Drop files here, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, %{browseFolders} or import from:",dropPasteImportBoth:"Drop files here, %{browseFiles}, %{browseFolders} or import from:",importFiles:"Import files from:",browseFiles:"browse files",browseFolders:"browse folders",recoveredXFiles:{0:"We could not fully recover 1 file. Please re-select it and resume the upload.",1:"We could not fully recover %{smart_count} files. Please re-select them and resume the upload."},recoveredAllFiles:"We restored all files. You can now resume the upload.",sessionRestored:"Session restored",reSelect:"Re-select",missingRequiredMetaFields:{0:"Missing required meta field: %{fields}.",1:"Missing required meta fields: %{fields}."},takePictureBtn:"Take Picture",recordVideoBtn:"Record Video"}};function nt(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var _f=0;function si(i){return"__private_"+_f+++"_"+i}const $l=Hd.default||Hd;function lc(){const i={};return i.promise=new Promise((e,t)=>{i.resolve=e,i.reject=t}),i}const Cf={target:"body",metaFields:[],inline:!1,width:750,height:550,thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:Nd,showLinkToFileUploadResult:!1,showProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,note:null,closeModalOnClickOutside:!1,closeAfterFinish:!1,singleFileFullScreen:!0,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,disablePageScrollWhenModalOpen:!0,animateOpenClose:!0,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,browserBackButtonClose:!1,showNativePhotoCameraButton:!1,showNativeVideoCameraButton:!1,theme:"light",autoOpen:null,autoOpenFileEditor:!1,disabled:!1,disableLocalFiles:!1,doneButtonHandler:null,onRequestCloseModal:null};
1var wn=si("disabledNodes"),Ti=si("generateLargeThumbnailIfSingleFile"),$o=si("openFileEditorWhenFilesAdded"),In=si("attachRenderFunctionToTarget"),Vl=si("isTargetSupported"),Hl=si("getAcquirers"),Gl=si("getProgressIndicators"),Fi=si("getEditors"),Zl=si("addSpecifiedPluginsFromOptions"),Ql=si("autoDiscoverPlugins"),En=si("addSupportedPluginIfNoTarget");class Xl extends An{constructor(e,t){var n,r,l;let b;b=t?void 0===t.autoOpen?t.autoOpenFileEditor?"imageEditor":null:t.autoOpen:null,super(e,{...Cf,...t,autoOpen:b}),n=this,Object.defineProperty(this,wn,{writable:!0,value:void 0}),this.modalName=`uppy-Dashboard-${S()}`,this.superFocus=function Pm(){let i=!1;return Dm((t,n)=>{const r=Zd(t,n),a=r.contains(document.activeElement);if(a&&i)return;const l=r.querySelector("[data-uppy-super-focusable]");a&&!l||(l?(l.focus({preventScroll:!0}),i=!0):(r.querySelector(Gd)?.focus({preventScroll:!0}),i=!1))},260)}(),this.ifFocusedOnUppyRecently=!1,this.removeTarget=h=>{const v=this.getPluginState().targets.filter(U=>U.id!==h.id);this.setPluginState({targets:v})},this.addTarget=h=>{const x=h.id||h.constructor.name,v=h.title||x,U=h.type;if("acquirer"!==U&&"progressindicator"!==U&&"editor"!==U)return this.up
1py.log("Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor","error"),null;const W={id:x,name:v,type:U},me=this.getPluginState().targets.slice();return me.push(W),this.setPluginState({targets:me}),this.el},this.hideAllPanels=()=>{var h;const x=this.getPluginState(),v={activePickerPanel:void 0,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1};x.activePickerPanel===v.activePickerPanel&&x.showAddFilesPanel===v.showAddFilesPanel&&x.showFileEditor===v.showFileEditor&&x.activeOverlayType===v.activeOverlayType||(this.setPluginState(v),this.uppy.emit("dashboard:close-panel",null==(h=x.activePickerPanel)?void 0:h.id))},this.showPanel=h=>{const{targets:x}=this.getPluginState(),v=x.find(U=>"acquirer"===U.type&&U.id===h);this.setPluginState({activePickerPanel:v,activeOverlayType:"PickerPanel"}),this.uppy.emit("dashboard:show-panel",h)},this.canEditFile=h=>{const{targets:x}=this.getPluginState();return nt(this,Fi)[Fi](x).some(U=>this.uppy.getPlugin(U.id).canEditFile(h))},this.openFileEditor=h=>{const{targets:x}=this.getPluginState(),v=nt(this,Fi)[Fi](x);this.setPluginState({showFileEditor:!0,fileCardFor:h.id||null,activeOverlayType:"FileEditor"}),v.forEach(U=>{this.uppy.getPlugin(U.id).selectFile(h)})},this.closeFileEditor=()=>{const{metaFields:h}=this.getPluginState();this.setPluginState(h&&h.length>0?{showFileEditor:!1,activeOverlayType:"FileCard"}:{showFileEditor:!1,fileCardFor:null,activeOverlayType:"AddFiles"})},this.saveFileEditor=()=>{const{targets:h}=this.getPluginState();nt(this,Fi)[Fi](h).forEach(v=>{this.uppy.getPlugin(v.id).save()}),this.closeFileEditor()},this.openModal=()=>{const{promise:h,resolve:x}=lc();if(this.savedScrollPosition=window.pageYOffset,this.savedActiveElement=document.activeElement,this.opts.disablePageScrollWhenModalOpen&&document.body.classList.add("uppy-Dashboard-isFixed"),this.opts.animateOpenClose&&this.getPluginState().isClosing){const v=()=>{this.setPluginState({isHidden:!1}),this.el.removeEventListener("animationend",v,!1),x()};this.el.addEventListener("animationend",v,!1)}else this.setPluginState({isHidden:!1}),x();return this.opts.browserBackButtonClose&&this.updateBrowserHistory(),document.addEventListener("keydown",this.handleKeyDownInModal),this.uppy.emit("dashboard:modal-open"),h},this.closeModal=h=>{var x;const v=null==(x=h?.manualClose)||x,{isHidden:U,isClosing:W}=this.getPluginState();if(U||W)return;const{promise:re,resolve:me}=lc();if(this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.opts.animateOpenClose){this.setPluginState({isClosing:!0});const ve=()=>{this.setPluginState({isHidden:!0,isClosing:!1}),this.superFocus.cancel(),this.savedActiveElement.focus(),this.el.removeEventListener("animationend",ve,!1),me()};this.el.addEventListener("animationend",ve,!1)}else this.setPluginState({isHidden:!0}),this.superFocus.cancel(),this.savedActiveElement.focus(),me();var ue;return document.removeEventListener("keydown",this.handleKeyDownInModal),v&&this.opts.browserBackButtonClose&&null!=(ue=history.state)&&ue[this.modalName]&&history.back(),this.uppy.emit("dashboard:modal-closed"),re},this.isModalOpen=()=>!this.getPluginState().isHidden||!1,this.requestCloseModal=()=>this.opts.onRequestCloseModal?this.opts.onRequestCloseModal():this.closeModal(),this.setDarkModeCapability=h=>{const{capabilities:x}=this.uppy.getState();this.uppy.setState({capabilities:{...x,darkMode:h}})},this.handleSystemDarkModeChange=h=>{const x=h.matches;this.uppy.log("[Dashboard] Dark mode is "+(x?"on":"off")),this.setDarkModeCapability(x)},this.toggleFileCard=(h,x)=>{const v=this.uppy.getFile(x);this.uppy.emit(h?"dashboard:file-edit-start":"dashboard:file-edit-complete",v),this.setPluginState({fileCardFor:h?x:null,activeOverlayType:h?"FileCard":null})},this.toggleAddFilesPanel=h=>{this.setPluginState({showAddFilesPanel:h,activeOverlayType:h?"AddFiles":null})},this.addFiles=h=>{const x=h.map(v=>({source:this.id,name:v.name,type:v.type,data:v,meta:{relativePath:v.relativePath||v.webkitRelativePath||null}}));
1try{this.uppy.addFiles(x)}catch(v){this.uppy.log(v)}},this.startListeningToResize=()=>{this.resizeObserver=new ResizeObserver(h=>{const x=h[0],{width:v,height:U}=x.contentRect;this.setPluginState({containerWidth:v,containerHeight:U,areInsidesReadyToBeVisible:!0})}),this.resizeObserver.observe(this.el.querySelector(".uppy-Dashboard-inner")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout(()=>{const h=this.getPluginState();!h.areInsidesReadyToBeVisible&&(this.opts.inline||!h.isHidden)&&(this.uppy.log("[Dashboard] resize event didn\u2019t fire on time: defaulted to mobile layout","warning"),this.setPluginState({areInsidesReadyToBeVisible:!0}))},1e3)},this.stopListeningToResize=()=>{this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)},this.recordIfFocusedOnUppyRecently=h=>{this.el.contains(h.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())},this.disableInteractiveElements=h=>{var x;const U=null!=(x=nt(this,wn)[wn])?x:bn(this.el.querySelectorAll(["a[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[role="button"]:not([disabled])'])).filter(W=>!W.classList.contains("uppy-Dashboard-close"));for(const W of U)"A"===W.tagName?W.setAttribute("aria-disabled",h):W.disabled=h;nt(this,wn)[wn]=h?U:null,this.dashboardIsDisabled=h},this.updateBrowserHistory=()=>{var h;null!=(h=history.state)&&h[this.modalName]||history.pushState({...history.state,[this.modalName]:!0},""),window.addEventListener("popstate",this.handlePopState,!1)},this.handlePopState=h=>{var x;this.isModalOpen()&&(!h.state||!h.state[this.modalName])&&this.closeModal({manualClose:!1}),!this.isModalOpen()&&null!=(x=h.state)&&x[this.modalName]&&history.back()},this.handleKeyDownInModal=h=>{27===h.keyCode&&this.requestCloseModal(),9===h.keyCode&&Xd(h,this.getPluginState().activeOverlayType,this.el)},this.handleClickOutside=()=>{this.opts.closeModalOnClickOutside&&this.requestCloseModal()},this.handlePaste=h=>{this.uppy.iteratePlugins(v=>{"acquirer"===v.type&&(null==v.handleRootPaste||v.handleRootPaste(h))});const x=bn(h.clipboardData.files);x.length>0&&(this.uppy.log("[Dashboard] Files pasted"),this.addFiles(x))},this.handleInputChange=h=>{h.preventDefault();const x=bn(h.target.files);x.length>0&&(this.uppy.log("[Dashboard] Files selected through input"),this.addFiles(x))},this.handleDragOver=h=>{var x,v;h.preventDefault(),h.stopPropagation();const re=(()=>{let ue=!0;
1return this.uppy.iteratePlugins(ve=>{null!=ve.canHandleRootDrop&&ve.canHandleRootDrop(h)&&(ue=!0)}),ue})(),me=(()=>{const{types:ue}=h.dataTransfer;return ue.some(ve=>"Files"===ve)})();if(!re&&!me||this.opts.disabled||this.opts.disableLocalFiles&&(me||!re)||!this.uppy.getState().allowNewUpload)return h.dataTransfer.dropEffect="none",void clearTimeout(this.removeDragOverClassTimeout);h.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0}),null==(x=(v=this.opts).onDragOver)||x.call(v,h)},this.handleDragLeave=h=>{var x,v;h.preventDefault(),h.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout(()=>{this.setPluginState({isDraggingOver:!1})},50),null==(x=(v=this.opts).onDragLeave)||x.call(v,h)},this.handleDrop=function(){var h=(0,d.Z)(function*(x){var v,U;x.preventDefault(),x.stopPropagation(),clearTimeout(n.removeDragOverClassTimeout),n.setPluginState({isDraggingOver:!1}),n.uppy.iteratePlugins(ue=>{"acquirer"===ue.type&&(null==ue.handleRootDrop||ue.handleRootDrop(x))});let W=!1;n.uppy.log("[Dashboard] Processing dropped files");const me=yield function Oh(i,e){return El.apply(this,arguments)}(x.dataTransfer,{logDropError:ue=>{n.uppy.log(ue,"error"),W||(n.uppy.info(ue.message,"error"),W=!0)}});me.length>0&&(n.uppy.log("[Dashboard] Files dropped"),n.addFiles(me)),null==(v=(U=n.opts).onDrop)||v.call(U,x)});return function(x){return h.apply(this,arguments)}}
1(),this.handleRequestThumbnail=h=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:request",h)},this.handleCancelThumbnail=h=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:cancel",h)},this.handleKeyDownInInline=h=>{9===h.keyCode&&function Em(i,e,t){null===e||Xd(i,e,t)}(h,this.getPluginState().activeOverlayType,this.el)},this.handlePasteOnBody=h=>{this.el.contains(document.activeElement)&&this.handlePaste(h)},this.handleComplete=h=>{let{failed:x}=h;this.opts.closeAfterFinish&&(null==x||!x.length)&&this.requestCloseModal()},this.handleCancelRestore=()=>{this.uppy.emit("restore-canceled")},Object.defineProperty(this,Ti,{writable:!0,value:()=>{if(this.opts.disableThumbnailGenerator)return;const x=this.uppy.getFiles();if(1===x.length){const v=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);v?.setOptions({thumbnailWidth:600});const U={...x[0],preview:void 0};v?.requestThumbnail(U).then(()=>{v?.setOptions({thumbnailWidth:this.opts.thumbnailWidth})})}}}),Object.defineProperty(this,$o,{writable:!0,value:h=>{const x=h[0],{metaFields:v}=this.getPluginState(),U=v&&v.length>0,W=this.canEditFile(x);U&&"metaEditor"===this.opts.autoOpen?this.toggleFileCard(!0,x.id):W&&"imageEditor"===this.opts.autoOpen&&this.openFileEditor(x)}}),this.initEvents=()=>{if(this.opts.trigger&&!this.opts.inline){const h=pd(this.opts.trigger);h?h.forEach(x=>x.addEventListener("click",this.openModal)):this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openM
1odal()` method yourself","warning")}this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-added",nt(this,En)[En]),this.uppy.on("plugin-remove",this.removeTarget),this.uppy.on("file-added",this.hideAllPanels),this.uppy.on("dashboard:modal-closed",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),this.uppy.on("files-added",nt(this,Ti)[Ti]),this.uppy.on("file-removed",nt(this,Ti)[Ti]),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.on("files-added",nt(this,$o)[$o])},this.removeEvents=()=>{const h=pd(this.opts.trigger);!this.opts.inline&&h&&h.forEach(x=>x.removeEventListener("click",this.openModal)),this.stopListeningToResize(),document.removeEventListener("paste",this.handlePasteOnBody),window.removeEventListener("popstate",this.handlePopState,!1),this.uppy.off("plugin-added",nt(this,En)[En]),this.uppy.off("plugin-remove",this.removeTarget),this.uppy.off("file-added",this.hideAllPanels),this.uppy.off("dashboard:modal-closed",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),this.uppy.off("files-added",nt(this,Ti)[Ti]),this.uppy.off("file-removed",nt(this,Ti)[Ti]),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.off("files-added",nt(this,$o)[$o])},this.superFocusOnEachUpdate=()=>{const h=this.el.contains(document.activeElement),x=document.activeElement===document.body||null===document.activeElement;0===this.uppy.getState().info.length&&(!this.opts.inline||h||x&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()},this.afterUpdate=()=>{!this.opts.disabled||this.dashboardIsDisabled?(!this.opts.disabled&&this.dashboardIsDisabled&&this.disableInteractiveElements(!1),this.superFocusOnEachUpdate()):this.disableInteractiveElements(!0)},this.saveFileCard=(h,x)=>{this.uppy.setFileMeta(x,h),this.toggleFileCard(!1,x)},Object.defineProperty(this,In,{writable:!0,value:h=>{const x=this.uppy.getPlugin(h.id);return{...h,icon:x.icon||this.opts.defaultPickerIcon,render:x.render}}}),Object.defineProperty(this,Vl,{writable:!0,value:h=>{const x=this.uppy.getPlugin(h.id);return"function"!=typeof x.isSupported||x.isSupported()}}),Object.defineProperty(this,Hl,{writable:!0,value:$l(h=>h.filter(x=>"acquirer"===x.type&&nt(this,Vl)[Vl](x)).map(nt(this,In)[In]))}),Object.defineProperty(this,Gl,{writable:!0,value:$l(h=>h.filter(x=>"progressindicator"===x.type).map(nt(this,In)[In]))}),Object.defineProperty(this,Fi,{writable:!0,value:$l(h=>h.filter(x=>"editor"===x.type).map(nt(this,In)[In]))}),this.render=h=>{const x=this.getPluginState(),{files:v,capabilities:U,allowNewUpload:W}=h,{newFiles:re,uploadStartedFiles:me,completeFiles:ue,erroredFiles:ve,inProgressFiles:he,inProgressNotPausedFiles:we,processingFiles:Te,isUploadStarted:We,isAllComplete:He,isAllErrored:je,isAllPaused:ke}=this.uppy.getObjectOfFilesPerState(),Fe=nt(this,Hl)[Hl](x.targets),it=nt(this,Gl)[Gl](x.targets),St=nt(this,Fi)[Fi](x.targets);let ut;return ut="auto"===this.opts.theme?U.darkMode?"dark":"light":this.opts.theme,["files","folders","both"].indexOf(this.opts.fileManagerSelectionType)<0&&(this.opts.fileManagerSelectionType="files",console.warn(`Unsupported option for "fileManagerSelectionType". Using default of "${this.opts.fileManagerSelectionType}".`)),function bf(i){const e=0===i.totalFileCount,t=1===i.totalFileCount,n=i.containerWidth>576,a=Mt({"uppy-Dashboard":!0,"uppy-Dashboard--isDisabled":i.disabled,"uppy-Dashboard--animateOpenClose":i.animateOpenClose,"uppy-Dashboard--isClosing":i.isClosing,"uppy-Dashboard--isDraggingOver":i.isDraggingOver,"uppy-Dashboard--modal":!i.inline,"uppy-size--md":i.containerWidth>576,"uppy-size--lg":i.containerWidth>700,"uppy-size--xl":i.containerWidth>900,"uppy-size--height-md":i.containerHeight>330,"uppy-Dashboard--isAddFilesPanelVisible":i.showAddFilesPanel,"uppy-Dashboard--isInnerWrapVisible":i.areInsidesReadyToBeVisible,"uppy-Dashboard--singleFile":i.singleFileFullScreen&&t&&i.containerHeight>330});let l=1;i.containerWidth>900?l=5:i.containerWidth>700?l=4:i.containerWidth>576&&(l=3);const c=i.showSelectedFiles&&!e,b=i.recoveredState?Object.keys(i.recoveredState.files).length:null,h=i.files?Object.keys(i.files).filter(U=>i.files[U].isGhost).length:null;return g("div",{className:a,"data-uppy-theme":i.theme,"data-uppy-num-acquirers":i.acquirers.length,"data-uppy-drag-drop-supported":!i.disableLocalFiles&&Om(),"aria-hidden":i.inline?"false":i.isHidden,"aria-disabled":i.disabled,"aria-label":i.i18n(i.inline?"dashboardTitle":"dashboardWindowTitle"),onPaste:i.handlePaste,onDragOver:i.handleDragOver,onDragLeave:i.handleDragLeave,onDrop:i.handleDrop},g("div",{"aria-hidden":"true",className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:i.handleClickOutside}),g("div",{className:"uppy-Dashboard-inner","aria-modal":!i.inline&&"true",role:i.inline?void 0:"dialog",style:{width:i.inline&&i.width?i.width:"",height:i.inline&&i.height?i.height:""}},i.inline?null:g("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":i.i18n("closeModal"),title:i.i18n("closeModal"),onClick:i.closeModal},g("span",{"aria-hidden":"true"},"\xd7")),g("div",{className:"uppy-Dashboard-innerWrap"},g("div",{className:"uppy-Dashboard-dropFilesHereHint"},i.i18n("dropHint")),c&&g(mf,i),b&&g("div",{className:"uppy-Dashboard-serviceMsg"},g("svg",{className:"uppy-Dashboard-serviceMsg-icon","aria-hidden":"true",focusable:"false",width:"21",height:"16",viewBox:"0 0 24 19"},g("g",{transform:"translate(0 -1)",fill:"none",fillRule:"evenodd"},g("path",{d:"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z",fill:"#FFD300"}),g("path",{fill:"#000",d:"M11 6h2l-.3 8h-1.4z"}),g("circle",{fill:"#000",cx:"12",cy:"17",r:"1"}))),g("strong",{className:"uppy-Dashboard-serviceMsg-title"},i.i18n("sessionRestored")),g("div",{className:"uppy-Dashboard-serviceMsg-text"},h>0?i.i18n("recoveredXFiles",{smart_count:h}):i.i18n("recoveredAllFiles"))),c?g(nf,{id:i.id,error:i.error,i18n:i.i18n,uppy:i.uppy,files:i.files,acquirers:i.acquirers,resumableUploads:i.resumableUploads,hideRetryButton:i.hideRetryButton,hidePauseResumeButton:i.hidePauseResumeButton,hideCancelButton:i.hideCancelButton,showLinkToFileUploadResult:i.showLinkToFileUploadResult,showRemoveButtonAfterComplete:i.showRemoveButtonAfterComplete,isWide:i.isWide,metaFields:i.metaFields,toggleFileCard:i.toggleFileCard,handleRequestThumbn
1ail:i.handleRequestThumbnail,handleCancelThumbnail:i.handleCancelThumbnail,recoveredState:i.recoveredState,individualCancellation:i.individualCancellation,openFileEditor:i.openFileEditor,canEditFile:i.canEditFile,toggleAddFilesPanel:i.toggleAddFilesPanel,isSingleFile:t,itemsPerRow:l}):g(ic,Cn({},i,{isSizeMD:n})),g(gs,null,i.showAddFilesPanel?g(rf,Cn({key:"AddFiles"},i,{isSizeMD:n})):null),g(gs,null,i.fileCardFor?g(yf,Cn({key:"FileCard"},i)):null),g(gs,null,i.activePickerPanel?g(lf,Cn({key:"Picker"},i)):null),g(gs,null,i.showFileEditor?g(df,Cn({key:"Editor"},i)):null),g("div",{className:"uppy-Dashboard-progressindicators"},i.progressindicators.map(U=>i.uppy.getPlugin(U.id).render(i.state))))))}({state:h,isHidden:x.isHidden,files:v,newFiles:re,uploadStartedFiles:me,completeFiles:ue,erroredFiles:ve,inProgressFiles:he,inProgressNotPausedFiles:we,processingFiles:Te,isUploadStarted:We,isAllComplete:He,isAllErrored:je,isAllPaused:ke,totalFileCount:Object.keys(v).length,totalProgress:h.totalProgress,allowNewUpload:W,acquirers:Fe,theme:ut,disabled:this.opts.disabled,disableLocalFiles:this.opts.disableLocalFiles,direction:this.opts.direction,activePickerPanel:x.activePickerPanel,showFileEditor:x.showFileEditor,saveFileEditor:this.saveFileEditor,closeFileEditor:this.closeFileEditor,disableInteractiveElements:this.disableInteractiveElements,animateOpenClose:this.opts.animateOpenClose,isClosing:x.isClosing,progressindicators:it,editors:St,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,i18n:this.i18n,i18nArray:this.i18nArray,uppy:this.uppy,note:this.opts.note,recoveredState:h.recoveredState,metaFields:x.metaFields,resumableUploads:U.resumableUploads||!1,individualCancellation:U.individualCancellation,isMobileDevice:U.isMobileDevice,fileCardFor:x.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:x.showAddFilesPanel,saveFileCard:this.saveFileCard,openFileEditor:this.openFileEditor,canEditFile:this.canEditFile,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,fileManagerSelectionType:this.opts.fileManagerSelectionType,proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,hideCancelButton:this.opts.hideCancelButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,showRemoveButtonAfterComplete:this.opts.showRemoveButtonAfterComplete,containerWidth:x.containerWidth,containerHeight:x.containerHeight,areInsidesReadyToBeVisible:x.areInsidesReadyToBeVisible,isTargetDOMEl:this.isTargetDOMEl,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,requiredMetaFields:this.uppy.opts.restrictions.requiredMetaFields,showSelectedFiles:this.opts.showSelectedFiles,showNativePhotoCameraButton:this.opts.showNativePhotoCameraButton,showNativeVideoCameraButton:this.opts.showNativeVideoCameraButton,nativeCameraFacingMode:this.opts.nativeCameraFacingMode,singleFileFullScreen:this.opts.singleFileFullScreen,handleCancelRestore:this.handleCancelRestore,handleRequestThumbn
1ail:this.handleRequestThumbnail,handleCancelThumbnail:this.handleCancelThumbnail,isDraggingOver:x.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop})},Object.defineProperty(this,Zl,{writable:!0,value:()=>{(this.opts.plugins||[]).forEach(x=>{const v=this.uppy.getPlugin(x);v?v.mount(this,v):this.uppy.log(`[Uppy] Dashboard could not find plugin '${x}', make sure to uppy.use() the plugins you are specifying`,"warning")})}}),Object.defineProperty(this,Ql,{writable:!0,value:()=>{this.uppy.iteratePlugins(nt(this,En)[En])}}),Object.defineProperty(this,En,{writable:!0,value:h=>{var x;h&&(null==(x=h.opts)||!x.target)&&["acquirer","editor"].includes(h.type)&&(this.getPluginState().targets.some(W=>h.id===W.id)||h.mount(this,h))}}),this.install=()=>{this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:void 0,showFileEditor:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});const{inline:h,closeAfterFinish:x}=this.opts;if(h&&x)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");const{allowMultipleUploads:v,allowMultipleUploadBatches:U}=this.uppy.opts;(v||U)&&x&&this.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");const{target:W}=this.opts;W&&this.mount(W,this),this.opts.disableStatusBar||this.uppy.use(Wp,{id:`${this.id}:StatusBar`,target:this,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,showProgressDetails:this.opts.showProgressDetails,hideAfterFinish:this.opts.hideProgressAfterFinish,locale:this.opts.locale,doneButtonHandler:this.opts.doneButtonHandler}),this.opts.disableInformer||this.uppy.use($p,{id:`${this.id}:Informer`,target:this}),this.opts.disableThumbnailGenerator||this.uppy.use(ld,{id:`${this.id}:ThumbnailGenerator`,thumbnailWidth:this.opts.thumbnailWidth,thumbnailHeight:this.opts.thumbnailHeight,thumbnailType:this.opts.thumbnailType,waitForThumbnailsBeforeUpload:this.opts.waitForThumbnailsBeforeUpload,lazy:!this.opts.waitForThumbnailsBeforeUpload}),this.darkModeMediaQuery=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;const re=!!this.darkModeMediaQuery&&this.darkModeMediaQuery.matches;var me;this.uppy.log("[Dashboard] Dark mode is "+(re?"on":"off")),this.setDarkModeCapability(re),"auto"===this.opts.theme&&(null==(me=this.darkModeMediaQuery)||me.addListener(this.handleSystemDarkModeChange)),nt(this,Zl)[Zl](),nt(this,Ql)[Ql](),this.initEvents()},this.uninstall=()=>{if(!this.opts.disableInformer){const v=this.uppy.getPlugin(`${this.id}:Informer`);v&&this.uppy.removePlugin(v)}if(!this.opts.disableStatusBar){const v=this.uppy.getPlugin(`${this.id}:StatusBar`);v&&this.uppy.removePlugin(v)}if(!this.opts.disableThumbnailGenerator){const v=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);v&&this.uppy.removePlugin(v)}var x;(this.opts.plugins||[]).forEach(v=>{const U=this.uppy.getPlugin(v);U&&U.unmount()}),"auto"===this.opts.theme&&(null==(x=this.darkModeMediaQuery)||x.removeListener(this.handleSystemDarkModeChange)),this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.unmount(),this.removeEvents()},this.id=this.opts.id||"Dashboard",this.title="Dashboard",this.type="orchestrator",this.defaultLocale=vf,null!=(r=this.opts).doneButtonHandler||(r.doneButtonHandler=()=>{this.uppy.clearUploadedFiles(),this.requestCloseModal()}),null!=(l=this.opts).onRequestCloseModal||(l.onRequestCloseModal=()=>this.closeModal()),this.i18nInit()}}Xl.VERSION="3.9.0";class wf extends Error{constructor(){super(...arguments),this.name="UserFacingApiError"}}const If=wf;var Ef=s(80695);const Df=Object.prototype.toString,Pf=i=>"[object Error]"===Df.call(i),Of=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]);
1class Yl extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,({message:e}=e)):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}}const pc=(i,e,t)=>{const n=t.retries-(e-1);return i.attemptNumber=e,i.retriesLeft=n,i};function dc(i,e){return Jl.apply(this,arguments)}function Jl(){return Jl=(0,d.Z)(function*(i,e){return new Promise((t,n)=>{e={onFailedAttempt(){},retries:10,shouldRetry:()=>!0,...e};const r=Ef.operation(e),a=()=>{r.stop(),n(e.signal?.reason)};e.signal&&!e.signal.aborted&&e.signal.addEventListener("abort",a,{once:!0});const l=()=>{e.signal?.removeEventListener("abort",a),r.stop()};r.attempt(function(){var c=(0,d.Z)(function*(b){try{const h=yield i(b);l(),t(h)}catch(h){try{if(!(h instanceof Error))throw new TypeError(`Non-error was thrown: "${h}". You should only throw errors.`);if(h instanceof Yl)throw h.originalError;if(h instanceof TypeError&&!function Bf(i){return!(!i||!Pf(i)||"TypeError"!==i.name||"string"!=typeof i.message)&&("Load failed"===i.message?void 0===i.stack:Of.has(i.message))}(h))throw h;if(pc(h,b,e),(yield e.shouldRetry(h))||(r.stop(),n(h)),yield e.onFailedAttempt(h),!r.retry(h))throw r.mainError()}catch(x){pc(x,b,e),l(),n(x)}}});return function(b){return c.apply(this,arguments)}}())})}),Jl.apply(this,arguments)}class Ff extends Error{constructor(e,t){super(e),this.cause=t?.cause,this.isNetworkError=!(!this.cause||!$r(this.cause,"isNetworkError"))&&this.cause.isNetworkError}}const Uf=Ff,Af=M(function Mf(i,e,t){const{progress:n,bytesUploaded:r,bytesTotal:a}=e;n&&(i.uppy.log(`Upload progress: ${n}`),i.uppy.emit("upload-progress",t,{uploader:i,bytesUploaded:r,bytesTotal:a}))},300,{leading:!0,trailing:!0});class kf extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}const Lf=kf;let cc;function Ui(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var jf=0;function bs(i){return"__private_"+jf+++"_"+i}const uc=10,Wf=3e5,hc=401;class Kf extends Error{constructor(e){let{statusCode:t,message:n}=e;super(n),this.name="HttpError",this.statusCode=t}}function ql(){return(ql=(0,d.Z)(function*(i){if(i.status===hc)throw new Lf;if(i.ok)return i.json();let t,e=`Failed request with status: ${i.status}. ${i.statusText}`;try{t=yield i.json(),t.message&&(e=`${e} message: ${t.message}`),t.requestId&&(e=`${e} request-Id: ${t.requestId}`)}catch(n){throw new Error(e,{cause:n})}throw i.status>=400&&i.status<=499&&t.message?new If(t.message):new Kf({statusCode:i.status,message:e})})).apply(this,arguments)}var Mi=bs("companionHeaders"),Vo=bs("getUrl"),ep=bs("requestSocketToken"),Ho=bs("awaitRemoteFileUpload");cc=Symbol.for("uppy test: getCompanionHeaders");class tp{constructor(e,t){var r,n=this;Object.defineProperty(this,Ho,{value:Hf}),Object.defineProperty(this,Vo,{value:Vf}),Object.defineProperty(this,Mi,{writable:!0,value:void 0}),Object.defineProperty(this,ep,{writable:!0,value:(r=(0,d.Z)(function*(a){var l;let{file:c,postBody:b,signal:h}=a;if(null==(null==(l=c.remote)?void 0:l.url))throw new Error("Cannot connect to an undefined URL");return(yield n.post(c.remote.url,{...c.remote.body,...b},{signal:h})).token}),function(l){return r.apply(this,arguments)})}),this.uppy=e,this.opts=t,this.onReceiveResponse=this.onReceiveResponse.bind(this),Ui(this,Mi)[Mi]=t?.companionHeaders}setCompanionHeaders(e){Ui(this,Mi)[Mi]=e}[cc](){return Ui(this,Mi)[Mi]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return function Nf(i){return i.replace(/\/$/,"")}(e&&e[t]?e[t]:t)}headers(e){var t=this;return(0,d.Z)(function*(){return void 0===e&&(e=!1),{...{Accept:"application/json",...e?void 0:{"Content-Type":"application/json"}},...Ui(t,Mi)[Mi]}})()}onReceiveResponse(e){const{headers:t}=e,r=this.uppy.getState().companion||{},a=this.opts.companionUrl;t.has("i-am")&&t.get("i-am")!==r[a]&&this.uppy.setState({companion:{...r,[a]:t.get("i-am")}})}request(e){var t=this;return(0,d.Z)(function*(){let{path:n,method:r="GET",data:a,skipPostResponse:l,signal:c}=e;try{const b=yield t.headers(!a),h=yield function Tf(){return fetch(...arguments).catch(i=>{throw"AbortError"===i.name?i:new yp(i)})}(Ui(t,Vo)[Vo](n),{method:r,signal:c,headers:b,credentials:t.opts.companionCookiesRule||"same-origin",body:a?JSON.stringify(a):null});return l||t.onReceiveResponse(h),yield function $f(i){return ql.apply(this,arguments)}(h)}catch(b){throw b.isAuthError||"UserFacingApiError"===b.name||"AbortError"===b.name?b:new Uf(`Could not ${r} ${Ui(t,Vo)[Vo](n)}`,{cause:b})}})()}get(e,t){var n=this;return(0,d.Z)(function*(){return"boolean"==typeof t&&(t={skipPostResponse:t}),n.request({...t,path:e})})()}post(e,t,n){var r=this;
1return(0,d.Z)(function*(){return"boolean"==typeof n&&(n={skipPostResponse:n}),r.request({...n,path:e,method:"POST",data:t})})()}delete(e,t,n){var r=this;return(0,d.Z)(function*(){return"boolean"==typeof n&&(n={skipPostResponse:n}),r.request({...n,path:e,method:"DELETE",data:t})})()}uploadRemoteFile(e,t,n){var r=this;return(0,d.Z)(function*(){var a=r;try{const{signal:l,getQueue:c}=n||{};return yield dc((0,d.Z)(function*(){var b;const h=null==(b=r.uppy.getFile(e.id))?void 0:b.serverToken;if(null!=h)return r.uppy.log(`Connecting to exiting websocket ${h}`),Ui(r,Ho)[Ho]({file:e,queue:c(),signal:l});const v=yield c().wrapPromiseFunction((0,d.Z)(function*(){try{return yield Ui(a,ep)[ep](...arguments)}catch(U){if(U.isAuthError)throw new Yl(U);if(null==U.cause)throw U;const W=U.cause;throw"HttpError"!==W.name||[408,409,429,418,423].includes(W.statusCode)||W.statusCode>=500&&W.statusCode<=599&&![501,505].includes(W.statusCode)?W:new Yl(W)}}),{priority:-1})({file:e,postBody:t,signal:l}).abortOn(l);return r.uppy.getFile(e.id)?(r.uppy.setFileState(e.id,{serverToken:v}),Ui(r,Ho)[Ho]({file:r.uppy.getFile(e.id),queue:c(),signal:l})):void 0}),{retries:uc,signal:l,onFailedAttempt:b=>r.uppy.log(`Retrying upload due to: ${b.message}`,"warning")})}catch(l){if("AbortError"===l.name)return;throw r.uppy.emit("upload-error",e,l),l}})()}}function Vf(i){return/^(https?:|)\/\//.test(i)?i:`${this.hostname}/${i}`}function Hf(i){return ip.apply(this,arguments)}function ip(){return ip=(0,d.Z)(function*(i){var e=this;let a,{file:t,queue:n,signal:r}=i;const{capabilities:l}=this.uppy.getState();try{return yield new Promise((c,b)=>{const h=t.serverToken,x=function Rf(i){var e;const n=null==(e=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(i))?void 0:e[1];return`${/^http:\/\//i.test(i)?"ws":"wss"}://${n}`}(t.remote.companionUrl);let v,U,W,{isPaused:re}=t;const me=(ke,Fe)=>{var it;null!=v&&v.readyState===v.OPEN?v.send(JSON.stringify({action:ke,payload:Fe??{}})):this.uppy.log(`Cannot send "${ke}" to socket ${t.id} because the socket state was ${String(null==(it=v)?void 0:it.readyState)}`,"warning")};function ue(){l.resumableUploads&&me(re?"pause":"resume")}const ve=function(){var ke=(0,d.Z)(function*(){U&&U.abort(),U=new AbortController;const Fe=St=>{var ut;e.uppy.setFileState(t.id,{serverToken:null}),null==(ut=U)||null==ut.abort||ut.abort(),b(St)};function it(){clearTimeout(W),!re&&(W=setTimeout(()=>Fe(new Error("Timeout waiting for message from Companion socket")),Wf))}try{yield n.wrapPromiseFunction((0,d.Z)(function*(){yield dc(function(){var ut=(0,d.Z)(function*(){return new Promise((Ct,ft)=>{v=new WebSocket(`${x}/api/${h}`),it(),v.addEventListener("close",()=>{v=void 0,ft(new Error("Socket closed unexpectedly"))}),v.addEventListener("error",Z=>{var A;e.uppy.log(`Companion socket error ${JSON.stringify(Z)}, closing socket`,"warning"),null==(A=v)||A.close()}),v.addEventListener("open",()=>{ue()}),v.addEventListener("message",Z=>{it();try{const{action:fe,payload:Ue}=JSON.parse(Z.data);switch(fe){case"progress":Af(e,Ue,e.uppy.getFile(t.id));break;case"success":{var A,V,ce,_e;const $e=null==(A=Ue.response)?void 0:A.responseText;e.uppy.emit("upload-success",e.uppy.getFile(t.id),{uploadURL:Ue.url,status:null!=(V=null==(ce=Ue.response)?void 0:ce.status)?V:200,body:$e?JSON.parse($e):void 0}),null==(_e=U)||null==_e.abort||_e.abort(),c();break}case"error":{const{message:$e}=Ue.error;throw Object.assign(new Error($e),{cause:Ue.error})}default:e.uppy.log(`Companion socket unknown action ${fe}`,"warning")}}catch(fe){Fe(fe)}}),U.signal.addEventListener("abort",()=>{e.uppy.log(`Closing socket ${t.id}`,"info"),clearTimeout(W),v&&v.close(),v=void 0})})});return function(){return ut.apply(this,arguments)}}(),{retries:uc,signal:U.signal,onFailedAttempt:()=>{U.signal.aborted||e.uppy.log(`Retrying websocket ${t.id}`,"info")}})}))().abortOn(U.signal)}catch(St){if(U.signal.aborted)return;Fe(St)}});return function(){return ke.apply(this,arguments)}}(),he=ke=>{if(l.resumableUploads)if(re=ke,v&&ue(),ke){var Fe;null==(Fe=U)||null==Fe.abort||Fe.abort()}else ve()},we=ke=>{var Fe;l.individualCancellation&&ke.id===t.id&&(me("cancel"),null==(Fe=U)||null==Fe.abort||Fe.abort(),this.uppy.log(`upload ${t.id}
1 was removed`,"info"),c())},Te=ke=>{var Fe;let{reason:it}=ke;"user"===it&&me("cancel"),null==(Fe=U)||null==Fe.abort||Fe.abort(),this.uppy.log(`upload ${t.id} was canceled`,"info"),c()},We=(ke,Fe)=>{ke===t.id&&he(Fe)},He=()=>he(!0),je=()=>he(!1);this.uppy.on("file-removed",we),this.uppy.on("cancel-all",Te),this.uppy.on("upload-pause",We),this.uppy.on("pause-all",He),this.uppy.on("resume-all",je),a=()=>{this.uppy.off("file-removed",we),this.uppy.off("cancel-all",Te),this.uppy.off("upload-pause",We),this.uppy.off("pause-all",He),this.uppy.off("resume-all",je)},r.addEventListener("abort",()=>{var ke;null==(ke=U)||ke.abort()}),ve()})}finally{a?.()}}),ip.apply(this,arguments)}function Jt(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}tp.VERSION="3.8.1";var Gf=0;function np(i){return"__private_"+Gf+++"_"+i}function mc(i){return"string"==typeof i?new RegExp(`^${i}$`):i instanceof RegExp?i:void 0}var ai=np("refreshingTokenPromise"),Go=np("getAuthToken"),li=np("getPlugin");class Yf extends tp{constructor(e,t){var n;super(e,t),Object.defineProperty(this,li,{value:qf}),Object.defineProperty(this,Go,{value:Jf}),Object.defineProperty(this,ai,{writable:!0,value:void 0}),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null,this.supportsRefreshToken=null==(n=t.supportsRefreshToken)||n}headers(){var e=()=>super.headers,t=this;return(0,d.Z)(function*(){const[n,r]=yield Promise.all([e().call(t),Jt(t,Go)[Go]()]),a={};return r&&(a["uppy-auth-token"]=r),t.companionKeysParams&&(a["uppy-credentials-params"]=btoa(JSON.stringify({params:t.companionKeysParams}))),{...n,...a}})()}onReceiveResponse(e){super.onReceiveResponse(e);const t=Jt(this,li)[li](),r=t.getPluginState().authenticated?e.status!==hc:e.status<400;return t.setPluginState({authenticated:r}),e}setAuthToken(e){var t=this;return(0,d.Z)(function*(){return Jt(t,li)[li]().storage.setItem(t.tokenKey,e)})()}removeAuthToken(){var e=this;return(0,d.Z)(function*(){return Jt(e,li)[li]().storage.removeItem(e.tokenKey)})()}ensurePreAuth(){var e=this;return(0,d.Z)(function*(){if(e.companionKeysParams&&!e.preAuthToken&&(yield e.fetchPreAuthToken(),!e.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")})()}authQuery(e){return{}}authUrl(e){let{authFormData:t,query:n}=e;const r=new URLSearchParams({...n,state:btoa(JSON.stringify({origin:location.origin})),...this.authQuery({authFormData:t})});return this.preAuthToken&&r.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${r}`}loginSimpleAuth(e){var t=this;return(0,d.Z)(function*(){let{uppyVersions:n,authFormData:r,signal:a}=e;const l=yield t.post(`${t.id}/simple-auth`,{form:r},{qs:{uppyVersions:n},signal:a});t.setAuthToken(l.uppyAuthToken)})()}loginOAuth(e){var t=this;return(0,d.Z)(function*(){let{uppyVersions:n,authFormData:r,signal:a}=e;return yield t.ensurePreAuth(),a.throwIfAborted(),new Promise((l,c)=>{const b=t.authUrl({query:{uppyVersions:n},authFormData:r}),h=window.open(b,"_blank");let x;const v=U=>{if(U.source!==h){let me="";try{me=JSON.stringify(U.data)}catch{}return void t.uppy.log(`ignoring event from unknown source ${me}`,"warning")}const{companionAllowedHosts:W}=Jt(t,li)[li]().opts;if(!function Xf(i,e){return(Array.isArray(e)?e.map(mc):[mc(e)]).some(n=>n?.test(i)||n?.test(`${i}/`))}(U.origin,W))return void c(new Error(`rejecting event from ${U.origin} vs allowed pattern ${W}`));const re="string"==typeof U.data?JSON.parse(U.data):U.data;if(re.error){const{uppy:me}=t,ue=me.i18n("authAborted");return me.info({message:ue},"warning",5e3),void c(new Error("auth aborted"))}re.token?(x(),l(t.setAuthToken(re.token))):c(new Error("did not receive token from auth window"))};x=()=>{h?.close(),window.removeEventListener("message",v),a.removeEventListener("abort",x)},a.addEventListener("abort",x),window.addEventListener("message",v)}
1)})()}login(e){var t=this;return(0,d.Z)(function*(){let{uppyVersions:n,authFormData:r,signal:a}=e;return t.loginOAuth({uppyVersions:n,authFormData:r,signal:a})})()}refreshTokenUrl(){return`${this.hostname}/${this.id}/refresh-token`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}request(){var e=arguments,t=()=>super.request,n=this;return(0,d.Z)(function*(){yield Jt(n,ai)[ai];try{return yield t().call(n,...e)}catch(r){if(!n.supportsRefreshToken)throw r;const a=yield Jt(n,Go)[Go]();if(!r.isAuthError||!a)throw r;return null==Jt(n,ai)[ai]&&(Jt(n,ai)[ai]=(0,d.Z)(function*(){try{n.uppy.log("[CompanionClient] Refreshing expired auth token","info");const l=yield t().call(n,{path:n.refreshTokenUrl(),method:"POST"});yield n.setAuthToken(l.uppyAuthToken)}catch(l){throw l.isAuthError&&(yield n.removeAuthToken()),r}finally{Jt(n,ai)[ai]=void 0}})()),yield Jt(n,ai)[ai],t().call(n,...e)}})()}fetchPreAuthToken(){var e=this;return(0,d.Z)(function*(){if(e.companionKeysParams)try{const t=yield e.post(`${e.id}/preauth/`,{params:e.companionKeysParams});e.preAuthToken=t.token}catch(t){e.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${t}`,"warning")}})()}list(e,t){return this.get(`${this.id}/list/${e||""}`,t)}logout(e){var t=this;return(0,d.Z)(function*(){const n=yield t.get(`${t.id}/logout`,e);return yield t.removeAuthToken(),n})()}}function Jf(){return op.apply(this,arguments)}function op(){return(op=(0,d.Z)(function*(){return Jt(this,li)[li]().storage.getItem(this.tokenKey)})).apply(this,arguments)}function qf(){const i=this.uppy.getPlugin(this.pluginId);if(null==i)throw new Error("Plugin was nullish");return i}function iy(i,e){return new Promise(t=>{localStorage.setItem(i,e),t()})}function ny(i){return Promise.resolve(localStorage.getItem(i))}function oy(i){return new Promise(e=>{localStorage.removeItem(i),e()})}let fc,yc;fc=Symbol.for("uppy test: getSocket"),yc=Symbol.for("uppy test: getQueued");class sy extends Wd{toggleCheckbox(e,t){e.stopPropagation(),e.preventDefault(),t.custom.isSharedDrive||super.toggleCheckbox(e,t)}}const ay={strings:{pluginNameGoogleDrive:"Google Drive"}};class gc extends An{constructor(e,t){super(e,t),this.type="acquirer",this.storage=this.opts.storage||p,this.files=[],this.id=this.opts.id||"GoogleDrive",this.icon=()=>g("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},g("g",{fillRule:"nonzero",fill:"none"},g("path",{d:"M6.663 22.284l.97 1.62c.202.34.492.609.832.804l3.465-5.798H5c0 .378.1.755.302 1.096l1.361 2.278z",fill:"#0066DA"}),g("path",{d:"M16 12.09l-3.465-5.798c-.34.195-.63.463-.832.804l-6.4 10.718A2.15 2.15 0 005 18.91h6.93L16 12.09z",fill:"#00AC47"}),g("path",{d:"M23.535 24.708c.34-.195.63-.463.832-.804l.403-.67 1.928-3.228c.201-.34.302-.718.302-1.096h-6.93l1.474 2.802 1.991 2.996z",fill:"#EA4335"}),g("path",{d:"M16 12.09l3.465-5.798A2.274 2.274 0 0018.331 6h-4.662c-.403 0-.794.11-1.134.292L16 12.09z",fill:"#00832D"}),g("path",{d:"M20.07 18.91h-8.14l-3.465 5.798c.34.195.73.292 1.134.292h12.802c.403 0 .794-.11 1.134-.292L20.07 18.91z",fill:"#2684FC"}),g("path",{d:"M23.497 12.455l-3.2-5.359a2.252 2.252 0 00-.832-.804L16 12.09l4.07 6.82h6.917c0-.377-.1-.755-.302-1.096l-3.188-5.359z",fill:"#FFBA00"}))),this.opts.companionAllowedHosts=function ty(i,e){if(i){if(!("string"==typeof i||Array.isArray(i)||i instanceof RegExp))throw new TypeError('The option "companionAllowedHosts" must be one of string, Array, RegExp');return i}return/^(?!https?:\/\/).*$/i.test(e)?`https://${e.replace(/^\/\//,"")}`:new URL(e).origin}(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new Yf(e,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:"drive",pluginId:this.id,supportsRefreshToken:!0}),this.defaultLocale=ay,this.i18nInit(),this.title=this.i18n("pluginNameGoogleDrive"),this.onFirstRender=this.onFirstRender.bind(this),this.render=this.render.bind(this)}install(){this.view=new sy(this,{provider:this.provider,loadAllFiles:!0,virtualList:!0});const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.view.tearDown(),this.unmount()}onFirstRender(){var e=this;return(0,d.Z)(function*(){yield Promise.all([e.provider.fetchPreAuthToken(),e.view.getFolder("root")])})()}render(e){return this.view.render(e)}}function bc(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}gc.VERSION="3.6.0";var py=0;function dy(i){return"__private_"+py+++"_"+i}var Zo=dy("handleSubmit");const uy=class cy extends ti{constructor(e){super(e),this.form=document.createElement("form"),Object.defineProperty(this,Zo,{writable:!0,value:t=>{t.preventDefault();const{addFile:n}=this.props;n(this.input.value.trim())}}),this.form.id=S()}componentDidMount(){this.input.value="",this.form.addEventListener("submit",bc(this,Zo)[Zo]),document.body.appendChild(this.form)}componentWillUnmount(){this.form.removeEventListener("submit",bc(this,Zo)[Zo]),document.body.removeChild(this.form)}render(){const{i18n:e}=this.props;return g("div",{className:"uppy-Url"},g("input",{className:"uppy-u-reset uppy-c-textInput uppy-Url-input",type:"text","aria-label":e("enterUrlToImport"),placeholder:e("enterUrlToImport"),ref:t=>{this.input=t},"data-uppy-super-focusable":!0,form:this.form.id}),g("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Url-importButton",type:"submit",form:this.form.id},e("import")))}};function vc(i,e,t){const n=bn(i.items);let r;switch(e){case"paste":if(n.some(l=>"file"===l.kind))return;r=n.filter(l=>"string"===l.kind&&"text/plain"===l.type);break;case"drop":r=n.filter(a=>
1"string"===a.kind&&"text/uri-list"===a.type);break;default:throw new Error(`isDropOrPaste must be either 'drop' or 'paste', but it's ${e}`)}r.forEach(a=>{a.getAsString(l=>t(l))})}const hy={strings:{import:"Import",enterUrlToImport:"Enter URL to import a file",failedToFetch:"Companion failed to fetch this URL, please make sure it\u2019s correct",enterCorrectUrl:"Incorrect URL: Please make sure you are entering a direct link to a file"}};var _c;function fy(){return g("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},g("path",{d:"M23.637 15.312l-2.474 2.464a3.582 3.582 0 01-.577.491c-.907.657-1.897.986-2.968.986a4.925 4.925 0 01-3.959-1.971c-.248-.329-.164-.902.165-1.149.33-.247.907-.164 1.155.164 1.072 1.478 3.133 1.724 4.618.656a.642.642 0 00.33-.328l2.473-2.463c1.238-1.313 1.238-3.366-.082-4.597a3.348 3.348 0 00-4.618 0l-1.402 1.395a.799.799 0 01-1.154 0 .79.79 0 010-1.15l1.402-1.394a4.843 4.843 0 016.843 0c2.062 1.805 2.144 5.007.248 6.896zm-8.081 5.664l-1.402 1.395a3.348 3.348 0 01-4.618 0c-1.319-1.23-1.319-3.365-.082-4.596l2.475-2.464.328-.328c.743-.492 1.567-.739 2.475-.657.906.165 1.648.574 2.143 1.314.248.329.825.411 1.155.165.33-.248.412-.822.165-1.15-.825-1.068-1.98-1.724-3.216-1.888-1.238-.247-2.556.082-3.628.902l-.495.493-2.474 2.464c-1.897 1.969-1.814 5.09.083 6.977.99.904 2.226 1.396 3.463 1.396s2.473-.492 3.463-1.395l1.402-1.396a.79.79 0 000-1.15c-.33-.328-.908-.41-1.237-.082z",fill:"#FF753E","fill-rule":"nonzero"}))}function vy(i){const{pathname:e}=new URL(i);return e.substring(e.lastIndexOf("/")+1)}class Yi extends An{constructor(e,t){var n;if(super(e,t),n=this,this.getMeta=r=>this.client.post("url/meta",{url:r}).then(a=>{if(a.error)throw this.uppy.log("[URL] Error:"),this.uppy.log(a.error),new Error("Failed to fetch the file");return a}),this.addFile=function(){var r=(0,d.Z)(function*(a,l){const c=function yy(i){return/^[a-z0-9]+:\/\//.test(i)?i:"http://"+i}(a);if(!function by(i){return i?.startsWith("http://")||i?.startsWith("https://")}(c))return n.uppy.log(`[URL] Incorrect URL entered: ${c}`),void n.uppy.info(n.i18n("enterCorrectUrl"),"error",4e3);try{const b=yield n.getMeta(c),h={meta:l,source:n.id,name:b.name||vy(c),type:b.type,data:{size:b.size},isRemote:!0,body:{url:c},remote:{companionUrl:n.opts.companionUrl,url:`${n.hostname}/url/get`,body:{fileId:c,url:c},requestClientId:Yi.requestClientId}};n.uppy.log("[Url] Adding remote file");try{return n.uppy.addFile(h)}catch(x){return x.isRestriction||n.uppy.log(x),x}}catch(b){return n.uppy.log(b),n.uppy.info({message:n.i18n("failedToFetch"),details:b},"error",4e3),b}});return function(a,l){return r.apply(this,arguments)}}(),this.handleRootDrop=r=>{vc(r.dataTransfer,"drop",a=>{this.uppy.log(`[URL] Adding file from dropped url: ${a}`),this.addFile(a)})},this.handleRootPaste=r=>{vc(r.clipboardData,"paste",a=>{this.uppy.log(`[URL] Adding file from pasted url: ${a}`),this.addFile(a)})},this.id=this.opts.id||"Url",this.title=this.opts.title||"Link",this.type="acquirer",this.icon=()=>g(fy,null),this.defaultLocale=hy,this.i18nInit(),this.hostname=this.opts.companionUrl,!this.hostname)throw new Error("Companion hostname is required, please consult https://uppy.io/docs/companion");this.client=new tp(e,{pluginId:this.id,provider:"url",companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionCookiesRule:this.opts.companionCookiesRule}),this.uppy.registerRequestClient(Yi.requestClientId,this.client)}render(){return g(uy,{i18n:this.i18n,addFile:this.addFile})}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}_c=Yi,Yi.VERSION="3.6.1",Yi.requestClientId=_c.name,Yi.prototype.canHandleRootDrop=function gy(i){return bn(i.dataTransfer.items).filter(n=>"string"===n.kind&&"text/uri-list"===n.type).length>0};var Vn,sp,xc=s(53113),Sc=s(95445),Cc=s(30303),wc=s(35071),Ic=s(73797),Ec=s(1579),Dc=s(37920),Pc=s(11051),Oc=s(38123),Bc=s(96342),Tc=s(65384),Fc=s(8842),_y=s(16441),Ri=s(45608),xy=s(77176),Sy=s(10572),Cy=s(97176),wy=s(73716),Uc=s(14677),Iy=s(35103);const Ey=["dashboard"];function Dy(i,e){if(1&i){const t=f.\u0275\u0275getCurrentView();f.\u0275\u0275elementStart(0,"button",3),f.\u0275\u0275listener("click",function(){f.\u0275\u0275restoreView(t);const r=f.\u0275\u0275nextContext();
1return f.\u0275\u0275resetView(r.initialiseUppyDashboard())}),f.\u0275\u0275text(1,"Show dashboard\n"),f.\u0275\u0275elementEnd()}}let ap=((Vn=class extends O.vk{constructor(e,t,n,r,a,l,c,b,h,x,v,U,W,re,me,ue,ve){super(e,t,n,r,a,l,c,b,h,x,v),this.bitstreamService=e,this.changeDetectorRef=t,this.collectionDataService=n,this.groupService=r,this.resourcePolicyService=a,this.sectionService=l,this.submissionService=c,this.uploadsConfigService=b,this.dsoNameService=h,this.injectedSectionData=x,this.injectedSubmissionId=v,this.workspaceitemDataService=U,this.authService=W,this.translateService=re,this.notifications=me,this.appConfig=ue,this.submissionObjectDataService=ve,this.uppy=new Ts({debug:!0,autoProceed:!0}),this.tus=Na,this.dashboard=Xl,this.subs=[],this.uploading=!1}static getFileName(e){return decodeURIComponent(e.name.split("?")[0])}ngOnInit(){this.submissionObjectEndpoint$=this.submissionObjectDataService.getHrefByID(this.submissionId),this.onSectionInit(),this.initialiseUppyDashboard()}initialiseUppyDashboard(){const e=this.appConfig.rest.baseUrl,n=e.substr(0,e.indexOf(this.appConfig.rest.nameSpace)),r=n+"/files/",a=n+"/companion";this.uppyInstance=this.uppy.use(Xl,{target:"#dashboard",inline:!0}).use(Na,{endpoint:r,headers:{Authorization:this.authService.buildAuthHeader()}}).use(gc,{target:this.dashboard,companionUrl:a,companionAllowedHosts:n}).use(Yi,{target:this.dashboard,companionUrl:a}),this.workspaceitemDataService.addUppyInstance(this.submissionId,this.uppyInstance),this.uppyInstance.on("upload",l=>{this.uploading=!0}),this.uppyInstance.on("complete",l=>{this.uploading=!1,(0,Ri.xb)(l.successful)&&this.authService.isAuthenticated().pipe((0,xy.q)(1)).subscribe(b=>{b||this.notifications.error(this.translateService.get("upload-uppy.not-authenticated"))}),this.onTusCompleteUpload(l)})}onTusCompleteUpload(e){if((0,Ri.UE)(e.successful)){const t=e.successful.map(n=>{if((0,Ri.UE)(n)&&(0,Ri.UE)(n.response.uploadURL))return{"file-url":n.response.uploadURL,name:sp.getFileName(n),"content-type":n.type}});this.subs.push(this.workspaceitemDataService.uploadFileWithURL(this.submissionObjectEndpoint$,this.submissionId,t,this.sectionData.id).subscribe(n=>{200===n.statusCode&&(this.notifications.success(this.translateService.get("upload-uppy.added-permanently")),(0,Ri.UE)(n.payloadLink)&&this.submissionObjectDataService.findById(this.submissionId).pipe((0,Sy.xw)()).subscribe(a=>{(0,Ri.pT)(a)&&this.onCompleteItem(a.payload)}))}))}}onCompleteItem(e){const{sections:t}=e,{errors:n}=e,r=(0,Cy.Z)(n);t&&(0,Ri.UE)(t)&&Object.keys(t).forEach(a=>{const l=(0,wy.Vv)(t[a]),c=r[a];y.m.includes(y.i[a])&&((0,Ri.xb)(c)?this.notifications.success(null,this.translateService.get("submission.sections.upload.upload-successful")):this.notifications.error(null,this.translateService.get("submission.sections.upload.upload-failed"))),this.sectionService.updateSectionData(this.submissionId,a,l,c)})}ngOnDestroy(){this.subs.filter(e=>(0,Ri.Uh)(e)).forEach(e=>e.unsubscribe())}}).\u0275fac=function(e){return new(e||Vn)(f.\u0275\u0275directiveInject(xc.K),f.\u0275\u0275directiveInject(f.ChangeDetectorRef),f.\u0275\u0275directiveInject(Sc.W),f.\u0275\u0275directiveInject(Cc.O),f.\u0275\u0275directiveInject(wc.I),f.\u0275\u0275directiveInject(Ic.J),f.\u0275\u0275directiveInject(Ec.b),f.\u0275\u0275directiveInject(Dc.w),f.\u0275\u0275directiveInject(Fc._),f.\u0275\u0275directiveInject("sectionDataProvider"),f.\u0275\u0275directiveInject("submissionIdProvider"),f.\u0275\u0275directiveInject(Pc.E),f.\u0275\u0275directiveInject(Oc.e8),f.\u0275\u0275directiveInject(Bc.sK),f.\u0275\u0275directiveInject(Tc.T),f.\u0275\u0275directiveInject(_y.q),f.\u0275\u0275directiveInject(Uc.O))},Vn.\u0275cmp=f.\u0275\u0275defineComponent({type:Vn,selectors:[["ds-uppy-tus-upload"]],viewQuery:function(e,t){if(1&e&&f.\u0275\u0275viewQuery(Ey,5),2&e){let n;f.\u0275\u0275queryRefresh(n=f.\u0275\u0275loadQuery())&&(t.dashboardElement=n.first)}},features:[f.\u0275\u0275InheritDefinitionFeature],decls:4,vars:1,consts:[["id","dashboard",1,"mb-3"],["dashboard",""],["class","btn btn-secondary",3,"click",4,"ngIf"],[1,"btn","btn-secondary",3,"click"]],template:function(e,t){if(1&e&&(f.\u0275\u0275element(0,"div",0,1),f.\u0275\u0275template(2,Dy,2,0,"button",2),f.\u0275\u0275element(3,"ds-submission-section-upload")),2&e){const n=f.\u0275\u0275reference(1);f.\u0275\u0275advance(2),f.\u0275\u0275property("ngIf",0===n.textContent.length)}},dependencies:[Iy.O5,O.vk],styles:['@charset "UTF-8";.uppy-Root{position:relative;box-sizing:border-box;color:#333;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,"Segoe UI Emoji","Apple Color Emoji",Roboto,Helvetica,Arial,sans-serif;line-height:1;text-align:left;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[dir=rtl] .uppy-Root,.uppy-Root[dir=rtl]{text-align:right}.uppy-Root *,.uppy-Root *:before,.uppy-Root *:after{box-sizing:inherit}
1.uppy-Root [hidden]{display:none}.uppy-u-reset{all:initial;box-sizing:border-box;-webkit-appearance:none;appearance:none;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,"Segoe UI Emoji","Apple Color Emoji",Roboto,Helvetica,Arial,sans-serif;line-height:1}[dir=rtl] .uppy-u-reset{text-align:right}.uppy-c-textInput{font-family:inherit;font-size:14px;line-height:1.5;padding:6px 8px;background-color:#fff;border:1px solid #ddd;border-radius:4px}.uppy-size--md .uppy-c-textInput{padding:8px 10px}.uppy-c-textInput:focus{border-color:#1269cf99;outline:none;box-shadow:0 0 0 3px #1269cf26}[data-uppy-theme=dark] .uppy-c-textInput{color:#eaeaea;background-color:#333;border-color:#333}[data-uppy-theme=dark] .uppy-c-textInput:focus{border-color:#525252;box-shadow:none}.uppy-c-icon{display:inline-block;max-width:100%;max-height:100%;overflow:hidden;fill:currentColor}.uppy-c-btn{display:inline-flex;justify-content:center;align-items:center;font-weight:500;font-size:inherit;font-family:inherit;color:inherit;line-height:1;white-space:nowrap;text-align:center;transition-duration:.3s;transition-property:background-color,color;-webkit-user-select:none;user-select:none}[dir=rtl] .uppy-c-btn{text-align:center}.uppy-c-btn:not(:disabled):not(.disabled){cursor:pointer}.uppy-c-btn::-moz-focus-inner{border:0}.uppy-c-btn-primary{padding:10px 18px;color:#fff;font-size:14px;background-color:#1269cf;border-radius:4px}.uppy-c-btn-primary:hover{background-color:#0e51a0}.uppy-c-btn-primary:focus{outline:none;box-shadow:0 0 0 3px #1269cf66}.uppy-size--md .uppy-c-btn-primary{padding:13px 22px}[data-uppy-theme=dark] .uppy-c-btn-primary{color:#eaeaea}[data-uppy-theme=dark] .uppy-c-btn-primary:focus{outline:none}[data-uppy-theme=dark] .uppy-c-btn-primary::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-c-btn-primary:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-c-btn-link{padding:10px 15px;color:#525252;font-size:14px;line-height:1;background-color:transparent;border-radius:4px}.uppy-c-btn-link:hover{color:#333}.uppy-c-btn-link:focus{outline:none;box-shadow:0 0 0 3px #1269cf40}.uppy-size--md .uppy-c-btn-link{padding:13px 18px}[data-uppy-theme=dark] .uppy-c-btn-link{color:#eaeaea}[data-uppy-theme=dark] .uppy-c-btn-link:focus{outline:none}[data-uppy-theme=dark] .uppy-c-btn-link::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-c-btn-link:focus{box-shadow:0 0 0 2px #aae1ffd9}[data-uppy-theme=dark] .uppy-c-btn-link:hover{color:#939393}.uppy-Informer{position:absolute;right:0;bottom:60px;left:0;z-index:1005;text-align:center}.uppy-Informer span>div{margin-bottom:6px}.uppy-Informer-animated{z-index:-1000;transform:translateY(350%);opacity:0;transition:all .3s ease-in}.uppy-Informer p{display:inline-block;max-width:90%;margin:0;padding:6px 15px;color:#fff;font-weight:400;font-size:12px;line-height:1.4;background-color:#757575;border-radius:18px}.uppy-size--md .uppy-Informer p{max-width:500px;padding:10px 20px;font-size:14px;line-height:1.3}[data-uppy-theme=dark] .uppy-Informer p{background-color:#333}[dir=ltr] .uppy-Informer p span{left:3px}[dir=rtl] .uppy-Informer p span{right:3px}[dir=ltr] .uppy-Informer p span{margin-left:-1px}[dir=rtl] .uppy-Informer p span{margin-right:-1px}.uppy-Informer p span{position:relative;top:-1px;display:inline-block;width:13px;height:13px;color:#525252;font-size:10px;line-height:12px;vertical-align:middle;background-color:#fff;border-radius:50%}.uppy-Informer p span:hover{cursor:help}.uppy-Informer p span:after{line-height:1.3;word-wrap:break-word}.uppy-Root [aria-label][role~=tooltip]{position:relative}.uppy-Root [aria-label][role~=tooltip]:before,.uppy-Root [aria-label][role~=tooltip]:after{position:absolute;z-index:10;box-sizing:border-box;transform:translateZ(0);transform-origin:top;-webkit-backface-visibility:hidden;backface-visibility:hidden;opacity:0;transition:all var(--microtip-transition-duration, .18s) var(--microtip-transition-easing, ease-in-out) var(--microtip-transition-delay, 0s);pointer-events:none;will-change:transform}.uppy-Root [aria-label][role~=tooltip]:before{background-size:100% auto!important}.uppy-Root [aria-label][role~=tooltip]:before{content:""}.uppy-Root [aria-label][role~=tooltip]:after{box-sizing:content-box;padding:.5em 1em;color:#fff;
1font-weight:var(--microtip-font-weight, normal);font-size:var(--microtip-font-size, 13px);white-space:nowrap;text-transform:var(--microtip-text-transform, none);background:rgba(17,17,17,.9);border-radius:4px;content:attr(aria-label)}.uppy-Root [aria-label][role~=tooltip]:hover:before,.uppy-Root [aria-label][role~=tooltip]:hover:after,.uppy-Root [aria-label][role~=tooltip]:focus:before,.uppy-Root [aria-label][role~=tooltip]:focus:after{opacity:1;pointer-events:auto}.uppy-Root [role~=tooltip][data-microtip-position|=top]:before{bottom:100%;left:50%;width:18px;height:6px;margin-bottom:5px;background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position|=top]:after{bottom:100%;left:50%;margin-bottom:11px;transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position|=top]:hover:before{transform:translate3d(-50%,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top]:hover:after{transform:translate3d(-50%,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:after{bottom:100%;transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:hover:after{transform:translate3d(calc(-100% + 16px),-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:after{bottom:100%;transform:translate3d(calc(0% - 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:hover:after{transform:translate3d(calc(0% - 16px),-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:before{top:100%;bottom:auto;left:50%;width:18px;height:6px;margin-top:5px;margin-bottom:0;background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat;transform:translate3d(-50%,-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:after{top:100%;left:50%;margin-top:11px;transform:translate3d(-50%,-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:hover:before{transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom]:hover:after{transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:after{top:100%;transform:translate3d(calc(-100% + 16px),-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:hover:after{transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:after{top:100%;transform:translate3d(calc(0% - 16px),-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:hover:after{transform:translate3d(calc(0% - 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:before,.uppy-Root [role~=tooltip][data-microtip-position=left]:after{inset:50% 100% auto auto;transform:translate3d(10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:before{width:6px;height:18px;margin-right:5px;margin-bottom:0;background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat}.uppy-Root [role~=tooltip][data-microtip-position=left]:after{margin-right:11px}.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:before,.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:after{transform:translate3d(0,-50%,
10)}.uppy-Root [role~=tooltip][data-microtip-position=right]:before,.uppy-Root [role~=tooltip][data-microtip-position=right]:after{top:50%;bottom:auto;left:100%;transform:translate3d(-10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=right]:before{width:6px;height:18px;margin-bottom:0;margin-left:5px;background:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E) no-repeat}.uppy-Root [role~=tooltip][data-microtip-position=right]:after{margin-left:11px}.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:before,.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:after{transform:translate3d(0,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-size=small]:after{width:80px;white-space:initial}.uppy-Root [role~=tooltip][data-microtip-size=medium]:after{width:150px;white-space:initial}.uppy-Root [role~=tooltip][data-microtip-size=large]:after{width:260px;white-space:initial}.uppy-StatusBar{position:relative;z-index:1001;display:flex;height:46px;color:#fff;font-weight:400;font-size:12px;line-height:40px;background-color:#fff;transition:height .2s}[data-uppy-theme=dark] .uppy-StatusBar{background-color:#1f1f1f}.uppy-StatusBar:before{position:absolute;inset:0;width:100%;height:2px;background-color:#eaeaea;content:""}[data-uppy-theme=dark] .uppy-StatusBar:before{background-color:#757575}.uppy-StatusBar[aria-hidden=true]{height:0;overflow-y:hidden}.uppy-StatusBar.is-complete .uppy-StatusBar-progress{background-color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-progress{background-color:#e32437}.uppy-StatusBar.is-complete .uppy-StatusBar-statusIndicator{color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-statusIndicator{color:#e32437}.uppy-StatusBar:not([aria-hidden=true]).is-waiting{height:65px;background-color:#fff;border-top:1px solid #eaeaea}[data-uppy-theme=dark] .uppy-StatusBar:not([aria-hidden=true]).is-waiting{background-color:#1f1f1f;border-top:1px solid #333}.uppy-StatusBar-progress{position:absolute;z-index:1001;height:2px;background-color:#1269cf;transition:background-color,width .3s ease-out}.uppy-StatusBar-progress.is-indeterminate{background-image:linear-gradient(45deg,rgba(0,0,0,.3) 25%,transparent 25%,transparent 50%,rgba(0,0,0,.3) 50%,rgba(0,0,0,.3) 75%,transparent 75%,transparent);background-size:64px 64px;animation:uppy-StatusBar-ProgressStripes 1s linear infinite}@keyframes uppy-StatusBar-ProgressStripes{0%{background-position:0 0}to{background-position:64px 0}}.uppy-StatusBar.is-preprocessing .uppy-StatusBar-progress,.uppy-StatusBar.is-postprocessing .uppy-StatusBar-progress{background-color:#f6a623}.uppy-StatusBar.is-waiting .uppy-StatusBar-progress{display:none}[dir=ltr] .uppy-StatusBar-content{padding-left:10px}[dir=rtl] .uppy-StatusBar-content{padding-right:10px}.uppy-StatusBar-content{position:relative;z-index:1002;display:flex;align-items:center;height:100%;color:#333;white-space:nowrap;text-overflow:ellipsis}[dir=ltr] .uppy-size--md .uppy-StatusBar-content{padding-left:15px}[dir=rtl] .uppy-size--md .uppy-StatusBar-content{padding-right:15px}[data-uppy-theme=dark] .uppy-StatusBar-content{color:#eaeaea}[dir=ltr] .uppy-StatusBar-status{padding-right:.3em}[dir=rtl] .uppy-StatusBar-status{padding-left:.3em}.uppy-StatusBar-status{display:flex;flex-direction:column;justify-content:center;font-weight:400;line-height:1.4}.uppy-StatusBar-statusPrimary{font-weight:500;line-height:1;display:flex}.uppy-StatusBar-statusPrimary button.uppy-StatusBar-details{margin-left:5px}[data-uppy-theme=dark] .uppy-StatusBar-statusPrimary{color:#eaeaea}.uppy-StatusBar-statusSecondary{display:inline-block;margin-top:1px;color:#757575;font-size:11px;line-height:1.2;white-space:nowrap}[data-uppy-theme=dark] .uppy-StatusBar-statusSecondary{color:#bbb}[dir=ltr] .uppy-StatusBar-statusSecondaryHint{margin-right:5px}[dir=rtl] .uppy-StatusBar-statusSecondaryHint{margin-left:5px}.uppy-StatusBar-statusSecondaryHint{display:inline-block;line-height:1;vertical-align:middle}[dir=ltr] .uppy-size--md .uppy-StatusBar-statusSecondaryHint{margin-right:8px}[dir=rtl] .uppy-size--md .uppy-StatusBar-statusSecondaryHint{margin-left:8px}[dir=ltr] .uppy-StatusBar-statusIndicator{margin-right:7px}[dir=rtl] .uppy-StatusBar-statusIndicator{margin-left:7px}.uppy-StatusBar-statusIndicator{position:relative;top:1px;color:#525252}.uppy-StatusBar-statusIndicator svg{vertical-align:text-bottom}[dir=ltr] .uppy-StatusBar-actions{right:10px}[dir=rtl] .uppy-StatusBar-actions{left:10px}.uppy-StatusBar-actions{position:absolute;top:0;bottom:0;z-index:1004;display:flex;align-items:center}.uppy-StatusBar.is-waiting .uppy-StatusBar-actions{position:static;width:100%;height:100%;padding:0 15px;background-color:#fafafa}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actions{background-color:#1f1f1f}.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts{flex-direction:column;height:90px}.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts{flex-direction:row;height:65px}.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions{flex-direction:column;justify-content:center}.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions{flex-direction:row;justify-content:initial}.uppy-StatusBar-actionCircleBtn{margin:3px;line-height:1;cursor:pointer;opacity:.9}.uppy-StatusBar-actionCircleBtn:focus{outline:none}.uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}.uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar-actionCircleBtn:hover{opacity:1}.uppy-StatusBar-actionCircleBtn:focus{border-radius:50%}.uppy-StatusBar-actionCircleBtn svg{vertical-align:bottom}.uppy-StatusBar-actionBtn{display:inline-block;color:#1269cf;font-size:10px;line-height:inherit;vertical-align:middle}.uppy-size--md .uppy-StatusBar-actionBtn{font-size:11px}.uppy-StatusBar-actionBtn--disabled{opacity:.4}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--disabled{opacity:.7}[dir=ltr] .uppy-StatusBar-actionBtn--retry{margin-right:6px}[dir=rtl] .uppy-StatusBar-actionBtn--retry{margin-left:6px}.uppy-StatusBar-actionBtn--retry{position:relative;height:16px;padding:1px 6px 3px 18px;color:#fff;line-height:1;background-color:#ff4b23;border-radius:8px}.uppy-StatusBar-actionBtn--retry:focus{outline:none}.uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar-actionBtn--retry:hover{background-color:#f92d00}[dir=ltr] .uppy-StatusBar-actionBtn--retry svg{left:6px}[dir=rtl] .uppy-StatusBar-actionBtn--retry svg{right:6px}.uppy-StatusBar-actionBtn--retry svg{position:absolute;top:3px}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{width:100%;padding:15px 10px;color:#fff;font-size:14px;line-height:1;background-color:#1bb240}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#189c38}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{background-color:#1c8b37}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#18762f}.uppy-size--md .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{width:auto;padding:13px 22px}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover{background-color:#1bb240;cursor:not-allowed}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover{background-color:#1c8b37}.uppy-StatusBar:not(.is-waiting) .uppy-StatusBar-actionBtn--upload{color:#1269cf;background-color:transparent}[dir=ltr] .uppy-StatusBar-actionBtn--uploadNewlyAdded{padding-right:3px}[dir=rtl] .uppy-StatusBar-actionBtn--uploadNewlyAdded,[dir=ltr] .uppy-StatusBar-actionBtn--uploadNewlyAdded{padding-left:3px}[dir=rtl] .uppy-StatusBar-actionBtn--uploadNewlyAdded{padding-right:3px}.uppy-StatusBar-actionBtn--uploadNewlyAdded{padding-bottom:1px;border-radius:3px}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}.uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar.is-preprocessing .uppy-StatusBar-actionBtn--uploadNewlyAdded,.uppy-StatusBar.is-postprocessing .uppy-StatusBar-actionBtn--uploadNewlyAdded{display:none}.uppy-StatusBar-actionBtn--done{padding:7px 8px;line-height:1;border-radius:3px}.uppy-StatusBar-actionBtn--done:focus{outline:none}.uppy-StatusBar-actionBtn--done::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--done:hover{color:#0e51a0}.uppy-StatusBar-actionBtn--done:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done:focus{background-color:#333}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done{color:#02baf2}.uppy-size--md .uppy-StatusBar-actionBtn--done{font-size:14px}.uppy-StatusBar-serviceMsg{padding-left:10px;color:#000;font-size:11px;line-height:1.1}.uppy-size--md .uppy-StatusBar-serviceMsg{padding-left:15px;font-size:14px}[data-uppy-theme=dark] .uppy-StatusBar-serviceMsg{color:#eaeaea}.uppy-StatusBar-serviceMsg-ghostsIcon{position:relative;top:2px;left:6px;width:10px;vertical-align:text-bottom;opacity:.5}.uppy-size--md .uppy-StatusBar-serviceMsg-ghostsIcon{top:1px;left:10px;width:15px}[dir=ltr] .uppy-StatusBar-details{left:2px}[dir=rtl] .uppy-StatusBar-details{right:2px}.uppy-StatusBar-details{position:relative;top:0;display:inline-block;width:13px;height:13px;color:#fff;font-weight:600;font-size:10px;line-height:12px;text-align:center;vertical-align:middle;background-color:#939393;border-radius:50%;cursor:help;-webkit-appearance:none;appearance:none}.uppy-StatusBar-details:after{line-height:1.3;word-wrap:break-word}[dir=ltr] .uppy-StatusBar-spinner{margin-right:10px}[dir=rtl] .uppy-StatusBar-spinner{margin-left:10px}.uppy-StatusBar-spinner{animation-name:uppy-StatusBar-spinnerAnimation;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;fill:#1269cf}
1.uppy-StatusBar.is-preprocessing .uppy-StatusBar-spinner,.uppy-StatusBar.is-postprocessing .uppy-StatusBar-spinner{fill:#f6a623}@keyframes uppy-StatusBar-spinnerAnimation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list,.uppy-ProviderBrowser-viewType--unsplash ul.uppy-ProviderBrowser-list{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;padding:6px}.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list:after,.uppy-ProviderBrowser-viewType--unsplash ul.uppy-ProviderBrowser-list:after{flex:auto;content:""}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{position:relative;width:50%;margin:0}.uppy-size--md .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-size--md .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{width:33.3333%}.uppy-size--lg .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-size--lg .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{width:25%}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem:before,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem:before{display:block;padding-top:100%;content:""}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected svg,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--selected svg{opacity:.85}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--disabled,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--disabled{opacity:.5}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:#93939333}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:#eaeaea33}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview svg{width:30%;height:30%;fill:#000000b3}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview svg{fill:#fffc}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner{position:absolute;inset:7px;width:calc(100% - 14px);height:calc(100% - 14px);overflow:hidden;text-align:center;border-radius:4px}@media (hover: none){.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner .uppy-ProviderBrowserItem-author{display:block}}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner{box-shadow:0 0 0 3px #aae1ffb3}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner img,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner img{width:100%;height:100%;object-fit:cover;border-radius:4px}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-author{position:absolute;display:none;bottom:0;left:0;width:100%;background:rgba(0,0,0,.3);color:#fff;font-weight:500;font-size:12px;margin:0;padding:5px;text-decoration:none}
1.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-author:hover,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-author:hover{background:rgba(0,0,0,.4);text-decoration:underline}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox{position:absolute;top:16px;right:16px;z-index:1002;width:26px;height:26px;background-color:#1269cf;border-radius:50%;opacity:0}[dir=ltr] .uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox:after,[dir=ltr] .uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox:after{left:7px}[dir=rtl] .uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox:after,[dir=rtl] .uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox:after{right:7px}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox:after,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox:after{top:8px;width:12px;height:7px}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--is-checked,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--is-checked{opacity:1}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:hover+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:hover+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label .uppy-ProviderBrowserItem-author{display:block}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label{box-shadow:0 0 0 3px #1269cf80}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label:focus,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label:focus{outline:none}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label::-moz-focus-inner,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label::-moz-focus-inner{border:0}.uppy-ProviderBrowser-viewType--list{background-color:#fff}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list{background-color:#1f1f1f}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{display:flex;align-items:center;margin:0;padding:7px 15px}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{color:#eaeaea}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem--disabled{opacity:.6}[dir=ltr] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox{margin-right:15px}[dir=rtl] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox{margin-left:15px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox{width:17px;height:17px;background-color:#fff;border:1px solid #cfcfcf;border-radius:3px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:focus{border:1px solid #1269cf;outline:none;box-shadow:0 0 0 3px #1269cf40}[dir=ltr] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:after{left:3px}[dir=rtl] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:after{right:3px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:after{top:4px;width:9px;height:5px;opacity:0}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:focus{border-color:#02baf2b3;box-shadow:0 0 0 3px #02baf233}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox--is-checked{background-color:#1269cf;border-color:#1269cf}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox--is-checked:after{opacity:1}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner{display:flex;align-items:center;color:inherit;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,"Segoe UI Emoji","Apple Color Emoji",Roboto,Helvetica,Arial,sans-serif;padding:2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner:focus{text-decoration:underline;outline:none}[dir=ltr] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner img,[dir=ltr] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner svg{margin-right:8px}[dir=rtl] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner img,[dir=rtl] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner svg{margin-left:8px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner span{overflow:hidden;line-height:1.2;white-space:nowrap;text-overflow:ellipsis}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--disabled .uppy-ProviderBrowserItem-inner{cursor:default}[dir=ltr] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap{margin-right:7px}[dir=rtl] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap{margin-left:7px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap{width:20px}.uppy-ProviderBrowserItem-checkbox{position:relative;flex-shrink:0;cursor:pointer}.uppy-ProviderBrowserItem-checkbox:disabled{cursor:default}.uppy-ProviderBrowserItem-checkbox:after{position:absolute;border-bottom:2px solid #eaeaea;border-left:2px solid #eaeaea;transform:rotate(-45deg);cursor:pointer;content:""}.uppy-ProviderBrowserItem-checkbox:disabled:after{cursor:default}[data-uppy-theme=dark] .uppy-ProviderBrowserItem-checkbox{background-color:#1f1f1f;border-color:#939393}[data-uppy-theme=dark] .uppy-ProviderBrowserItem-checkbox--is-checked{background-color:#333}.uppy-SearchProvider{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%}[data-uppy-theme=dark] .uppy-SearchProvider{background-color:#1f1f1f}.uppy-SearchProvider-input{width:90%;max-width:650px;margin-bottom:15px}.uppy-size--md .uppy-SearchProvider-input{margin-bottom:20px}.uppy-SearchProvider-input::-webkit-search-cancel-button{display:none}.uppy-SearchProvider-searchButton{padding:13px 25px}.uppy-size--md .uppy-SearchProvider-searchButton{padding:13px 30px}.uppy-DashboardContent-panelBody{display:flex;flex:1;align-items:center;justify-content:center}[data-uppy-theme=dark] .uppy-DashboardContent-panelBody{background-color:#1f1f1f}.uppy-Provider-auth,.uppy-Provider-error,.uppy-Provider-loading,.uppy-Provider-empty{display:flex;flex:1;flex-flow:column wrap;align-items:center;justify-content:center;color:#939393}.uppy-Provider-empty{color:#939393}.uppy-Provider-authIcon svg{width:100px;height:75px}.uppy-Provider-authTitle{max-width:500px;margin-bottom:30px;padding:0 15px;color:#757575;font-weight:400;font-size:17px;line-height:1.4;text-align:center}.uppy-size--md .uppy-Provider-authTitle{font-size:20px}[data-uppy-theme=dark] .uppy-Provider-authTitle{color:#cfcfcf}.uppy-Provider-btn-google{padding:8px 12px!important}.uppy-Provider-btn-google{display:flex;align-items:center;background:#4285f4}.uppy-Provider-btn-google:hover{background-color:#1266f1}.uppy-Provider-btn-google:focus{outline:none;box-shadow:0 0 0 3px #4285f466}.uppy-Provider-btn-google svg{margin-right:8px}[dir=ltr] .uppy-Provider-breadcrumbs{text-align:left}[dir=rtl] .uppy-Provider-breadcrumbs{text-align:right}.uppy-Provider-breadcrumbs{flex:1;margin-bottom:10px;color:#525252;font-size:12px}.uppy-size--md .uppy-Provider-breadcrumbs{margin-bottom:0}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs{color:#eaeaea}[dir=ltr] .uppy-Provider-breadcrumbsIcon{margin-right:4px}[dir=rtl] .uppy-Provider-breadcrumbsIcon{margin-left:4px}.uppy-Provider-breadcrumbsIcon{display:inline-block;color:#525252;line-height:1;vertical-align:middle}.uppy-Provider-breadcrumbsIcon svg{width:13px;height:13px;fill:#525252}.uppy-Provider-breadcrumbs button{display:inline-block;padding:4px;line-height:inherit;border-radius:3px}.uppy-Provider-breadcrumbs button:focus{outline:none}.uppy-Provider-breadcrumbs button::-moz-focus-inner{border:0}.uppy-Provider-breadcrumbs button:hover{color:#0e51a0}.uppy-Provider-breadcrumbs button:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button:focus{background-color:#333}.uppy-Provider-breadcrumbs button:not(:last-of-type){text-decoration:underline}.uppy-Provider-breadcrumbs button:last-of-type{color:#333;font-weight:500;cursor:normal;pointer-events:none}.uppy-Provider-breadcrumbs button:hover{cursor:pointer}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button{color:#eaeaea}.uppy-ProviderBrowser{display:flex;flex:1;flex-direction:column;height:100%;font-weight:400;font-size:14px}.uppy-ProviderBrowser-user{margin:0 8px 0 0;color:#333;font-weight:500}[data-uppy-theme=dark] .uppy-ProviderBrowser-user{color:#eaeaea}[dir=ltr] .uppy-ProviderBrowser-user:after{left:4px}[dir=rtl] .uppy-ProviderBrowser-user:after{right:4px}.uppy-ProviderBrowser-user:after{position:relative;color:#939393;font-weight:400;content:"\\b7"}.uppy-ProviderBrowser-header{position:relative;z-index:1001;border-bottom:1px solid #eaeaea}[data-uppy-theme=dark] .uppy-ProviderBrowser-header{border-bottom:1px solid #333}.uppy-ProviderBrowser-headerBar{z-index:1001;padding:7px 15px;color:#757575;font-size:12px;line-height:1.4;background-color:#fafafa}.uppy-size--md .uppy-ProviderBrowser-headerBar{display:flex;align-items:center}[data-uppy-theme=dark] .uppy-ProviderBrowser-headerBar{background-color:#1f1f1f}.uppy-ProviderBrowser-headerBar--simple{display:block;justify-content:center;text-align:center}.uppy-ProviderBrowser-headerBar--simple .uppy-Provider-breadcrumbsWrap{display:inline-block;flex:none;vertical-align:middle}.uppy-ProviderBrowser-searchFilter{position:relative;display:flex;align-items:center;width:100%;height:30px;padding-left:8px;padding-right:8px;margin-top:15px;margin-bottom:15px}[dir=ltr] .uppy-ProviderBrowser-searchFilterInput{padding-left:30px}[dir=rtl] .uppy-ProviderBrowser-searchFilterInput,[dir=ltr] .uppy-ProviderBrowser-searchFilterInput{padding-right:30px}[dir=rtl] .uppy-ProviderBrowser-searchFilterInput{padding-left:30px}.uppy-ProviderBrowser-searchFilterInput{z-index:1001;width:100%;height:30px;font-size:13px;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,"Segoe UI Emoji","Apple Color Emoji",Roboto,Helvetica,Arial,sans-serif;line-height:1.4;background-color:#eaeaea;border:0;border-radius:4px;outline:0;color:#333}.uppy-ProviderBrowser-searchFilterInput::-webkit-search-cancel-button{display:none}[data-uppy-theme=dark] .uppy-ProviderBrowser-searchFilterInput{color:#eaeaea;background-color:#1f1f1f}.uppy-ProviderBrowser-searchFilterInput:focus{background-color:#cfcfcf;border:0}[data-uppy-theme=dark] .uppy-ProviderBrowser-searchFilterInput:focus{background-color:#333}[dir=ltr] .uppy-ProviderBrowser-searchFilterIcon{left:16px}[dir=rtl] .uppy-ProviderBrowser-searchFilterIcon{right:16px}.uppy-ProviderBrowser-searchFilterIcon{position:absolute;z-index:1002;width:12px;height:12px;color:#757575}.uppy-ProviderBrowser-searchFilterInput::placeholder{color:#939393;opacity:1}[dir=ltr] .uppy-ProviderBrowser-searchFilterReset{right:16px}[dir=rtl] .uppy-ProviderBrowser-searchFilterReset{left:16px}.uppy-ProviderBrowser-searchFilterReset{border-radius:3px;position:absolute;z-index:1002;width:22px;height:22px;padding:6px;color:#939393;cursor:pointer}.uppy-ProviderBrowser-searchFilterReset:focus{outline:none}.uppy-ProviderBrowser-searchFilterReset::-moz-focus-inner{border:0}.uppy-ProviderBrowser-searchFilterReset:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-ProviderBrowser-searchFilterReset:hover{color:#757575}.uppy-ProviderBrowser-searchFilterReset svg{vertical-align:text-top}
1.uppy-ProviderBrowser-userLogout{padding:4px;color:#1269cf;line-height:inherit;border-radius:3px;cursor:pointer}.uppy-ProviderBrowser-userLogout:focus{outline:none}.uppy-ProviderBrowser-userLogout::-moz-focus-inner{border:0}.uppy-ProviderBrowser-userLogout:hover{color:#0e51a0}.uppy-ProviderBrowser-userLogout:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout:focus{background-color:#333}.uppy-ProviderBrowser-userLogout:hover{text-decoration:underline}[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout{color:#eaeaea}.uppy-ProviderBrowser-body{position:relative;flex:1}.uppy-ProviderBrowser-list{position:absolute;inset:0;display:block;flex:1;width:100%;height:100%;margin:0;padding:0;overflow-x:hidden;overflow-y:auto;list-style:none;background-color:#fff;border-spacing:0;-webkit-overflow-scrolling:touch}[data-uppy-theme=dark] .uppy-ProviderBrowser-list{background-color:#1f1f1f}.uppy-ProviderBrowser-list:focus{outline:none}.uppy-ProviderBrowserItem-inner{font-weight:500;font-size:13px;cursor:pointer}.uppy-ProviderBrowser-footer{display:flex;align-items:center;height:65px;padding:0 15px;background-color:#fff;border-top:1px solid #eaeaea}[dir=ltr] .uppy-ProviderBrowser-footer button{margin-right:8px}[dir=rtl] .uppy-ProviderBrowser-footer button{margin-left:8px}[data-uppy-theme=dark] .uppy-ProviderBrowser-footer{background-color:#1f1f1f;border-top:1px solid #333}.uppy-Dashboard-Item-previewInnerWrap{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;border-radius:3px;box-shadow:0 0 2px #0006}.uppy-size--md .uppy-Dashboard-Item-previewInnerWrap{box-shadow:0 1px 2px #00000026}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewInnerWrap{box-shadow:none}.uppy-Dashboard-Item-previewInnerWrap:after{position:absolute;inset:0;z-index:1001;display:none;background-color:#000000a6;content:""}.uppy-Dashboard-Item-previewLink{position:absolute;inset:0;z-index:1002}.uppy-Dashboard-Item-previewLink:focus{box-shadow:inset 0 0 0 3px #579df0}[data-uppy-theme=dark] .uppy-Dashboard-Item-previewLink:focus{box-shadow:inset 0 0 0 3px #016c8d}.uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg{width:100%;height:100%;object-fit:cover;border-radius:3px;transform:translateZ(0)}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg{object-fit:contain;width:auto;height:auto;max-width:100%;max-height:100%;padding:10px}.uppy-Dashboard-Item-progress{position:absolute;top:50%;left:50%;z-index:1002;width:120px;color:#fff;text-align:center;transform:translate(-50%,-50%);transition:all .35 ease}.uppy-Dashboard-Item-progressIndicator{display:inline-block;width:38px;height:38px;opacity:.9;color:#fff}.uppy-size--md .uppy-Dashboard-Item-progressIndicator{width:55px;height:55px}button.uppy-Dashboard-Item-progressIndicator{cursor:pointer}button.uppy-Dashboard-Item-progressIndicator:focus{outline:none}button.uppy-Dashboard-Item-progressIndicator::-moz-focus-inner{border:0}button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--bg,button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--retry{fill:#579df0}.uppy-Dashboard-Item-progressIcon--circle{width:100%;height:100%}.uppy-Dashboard-Item-progressIcon--bg{stroke:#fff6}.uppy-Dashboard-Item-progressIcon--progress{transition:stroke-dashoffset .5s ease-out;stroke:#fff}.uppy-Dashboard-Item-progressIcon--play{transition:all .2s;fill:#fff;stroke:#fff}.uppy-Dashboard-Item-progressIcon--cancel{transition:all .2s;fill:#fff}.uppy-Dashboard-Item-progressIcon--pause{transition:all .2s;fill:#fff;stroke:#fff}.uppy-Dashboard-Item-progressIcon--check{transition:all .2s;fill:#fff}.uppy-Dashboard-Item-progressIcon--retry{fill:#fff}[dir=ltr] .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{right:-8px}[dir=rtl] .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{left:-8px}[dir=ltr] .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{left:initial}[dir=rtl] .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{right:initial}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{top:-9px;width:auto;transform:initial}.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator{width:18px;height:18px}.uppy-size--md .uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator{width:28px;height:28px}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator{width:18px;height:18px;opacity:1}.uppy-size--md .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator{width:22px;height:22px}.uppy-Dashboard-Item.is-processing .uppy-Dashboard-Item-progress{opacity:0}
1[dir=ltr] .uppy-Dashboard-Item-fileInfo{padding-right:5px}[dir=rtl] .uppy-Dashboard-Item-fileInfo{padding-left:5px}[dir=ltr] .uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-right:10px}[dir=rtl] .uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-left:10px}[dir=ltr] .uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-right:15px}[dir=rtl] .uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-left:15px}.uppy-Dashboard-Item-name{margin-bottom:5px;font-weight:500;font-size:12px;line-height:1.3;word-wrap:anywhere;word-break:break-all}[data-uppy-theme=dark] .uppy-Dashboard-Item-name{color:#eaeaea}.uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-name{font-size:14px;line-height:1.4}.uppy-Dashboard-Item-fileName{display:flex;align-items:baseline}.uppy-Dashboard-Item-fileName button{margin-left:5px}.uppy-Dashboard-Item-author{color:#757575;vertical-align:bottom;font-size:11px;font-weight:400;display:inline-block;line-height:1;margin-bottom:5px}.uppy-Dashboard-Item-author a{color:#757575}.uppy-Dashboard-Item-status{color:#757575;font-weight:400;font-size:11px;line-height:1}[data-uppy-theme=dark] .uppy-Dashboard-Item-status{color:#bbb}.uppy-Dashboard-Item-statusSize{display:inline-block;text-transform:uppercase;vertical-align:bottom;margin-bottom:5px}.uppy-Dashboard-Item-reSelect{color:#1269cf;font-weight:600;font-size:inherit;font-family:inherit}.uppy-Dashboard-Item-errorMessage{font-size:11px;font-weight:500;line-height:1.3;color:#a51523;background-color:#fdeff1;padding:5px 6px}.uppy-Dashboard-Item-errorMessageBtn{font-size:11px;text-decoration:underline;color:#a51523;cursor:pointer;font-weight:500}.uppy-Dashboard-Item-preview .uppy-Dashboard-Item-errorMessage{display:none}.uppy-size--md .uppy-Dashboard-Item-preview .uppy-Dashboard-Item-errorMessage{display:block;border-top:1px solid #f7c2c8;padding:6px 8px;line-height:1.4;position:absolute;bottom:0;left:0;right:0;border-bottom-left-radius:3px;border-bottom-right-radius:3px}.uppy-Dashboard-Item-fileInfo .uppy-Dashboard-Item-errorMessage{display:inline-block;position:static;border:1px solid #f7c2c8;border-radius:3px}.uppy-size--md .uppy-Dashboard-Item-fileInfo .uppy-Dashboard-Item-errorMessage{display:none}.uppy-Dashboard-Item-action{color:#939393;cursor:pointer}.uppy-Dashboard-Item-action:focus{outline:none}.uppy-Dashboard-Item-action::-moz-focus-inner{border:0}.uppy-Dashboard-Item-action:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Dashboard-Item-action:hover{color:#1f1f1f;opacity:1}[data-uppy-theme=dark] .uppy-Dashboard-Item-action{color:#cfcfcf}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus{outline:none}[data-uppy-theme=dark] .uppy-Dashboard-Item-action::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus{box-shadow:0 0 0 2px #aae1ffd9}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:hover{color:#eaeaea}.uppy-Dashboard-Item-action--remove{color:#1f1f1f;opacity:.95}.uppy-Dashboard-Item-action--remove:hover{color:#000;opacity:1}[dir=ltr] .uppy-size--md .uppy-Dashboard-Item-action--remove{right:-8px}[dir=rtl] .uppy-size--md .uppy-Dashboard-Item-action--remove{left:-8px}.uppy-size--md .uppy-Dashboard-Item-action--remove{position:absolute;top:-8px;z-index:1002;width:18px;height:18px;padding:0}.uppy-size--md .uppy-Dashboard-Item-action--remove:focus{border-radius:50%}[dir=ltr] .uppy-Dashboard--singleFile.uppy-size--height-md .uppy-Dashboard-Item-action--remove{right:8px}[dir=rtl] .uppy-Dashboard--singleFile.uppy-size--height-md .uppy-Dashboard-Item-action--remove{left:8px}.uppy-Dashboard--singleFile.uppy-size--height-md .uppy-Dashboard-Item-action--remove{position:absolute;top:8px}[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove{color:#525252}[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove:hover{color:#333}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-actionWrapper{display:flex;align-items:center}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-action{width:22px;height:22px;margin-left:3px;padding:3px}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-action:focus{border-radius:3px}.uppy-size--md .uppy-Dashboard-Item-action--copyLink,.uppy-size--md .uppy-Dashboard-Item-action--edit{width:16px;height:16px;padding:0}.uppy-size--md .uppy-Dashboard-Item-action--copyLink:focus,.uppy-size--md .uppy-Dashboard-Item-action--edit:focus{border-radius:3px}.uppy-Dashboard-Item{display:flex;align-items:center;padding:10px;border-bottom:1px solid #eaeaea}[dir=ltr] .uppy-Dashboard:not(.uppy-Dashboard--singleFile) .uppy-Dashboard-Item{padding-right:0}[dir=rtl] .uppy-Dashboard:not(.uppy-Dashboard--singleFile) .uppy-Dashboard-Item{padding-left:0}[data-uppy-theme=dark] .uppy-Dashboard-Item{border-bottom:1px solid #333}[dir=ltr] .uppy-size--md .uppy-Dashboard-Item{float:left}[dir=rtl] .uppy-size--md .uppy-Dashboard-Item{float:right}.uppy-size--md .uppy-Dashboard-Item{position:relative;display:block;width:calc(33.333% - 30px);height:215px;margin:5px 15px;padding:0;border-bottom:0}.uppy-size--lg .uppy-Dashboard-Item{width:calc(25% - 30px);height:190px;margin:5px 15px;padding:0}.uppy-size--xl .uppy-Dashboard-Item{width:calc(20% - 30px);height:210px;padding:0}.uppy-Dashboard--singleFile .uppy-Dashboard-Item{display:flex;flex-direction:column;width:100%;max-width:400px;height:100%;border-bottom:0;position:relative;padding:15px}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-previewInnerWrap{opacity:.2}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-name{opacity:.7}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{position:absolute;inset:0;z-index:1005;background-image:url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'35\' height=\'39\' viewBox=\'0 0 35 39\'%3E%3Cpath d=\'M1.708 38.66c1.709 0 3.417-3.417 6.834-3.417 3.416 0 5.125 3.417 8.61 3.417 3.348 0 5.056-3.417 8.473-3.417 4.305 0 5.125 3.417 6.833 3.417.889 0 1.709-.889 1.709-1.709v-19.68C34.167-
15.757 0-5.757 0 17.271v19.68c0 .82.888 1.709 1.708 1.709zm8.542-17.084a3.383 3.383 0 01-3.417-3.416 3.383 3.383 0 013.417-3.417 3.383 3.383 0 013.417 3.417 3.383 3.383 0 01-3.417 3.416zm13.667 0A3.383 3.383 0 0120.5 18.16a3.383 3.383 0 013.417-3.417 3.383 3.383 0 013.416 3.417 3.383 3.383 0 01-3.416 3.416z\' fill=\'%2523000\' fill-rule=\'nonzero\'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50% 10px;background-size:25px;opacity:.5;content:""}.uppy-size--md .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-position:50% 50%;background-size:40px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-position:50% 50%;background-size:30%}.uppy-Dashboard-Item-preview{position:relative;flex-grow:0;flex-shrink:0;width:50px;height:50px}.uppy-size--md .uppy-Dashboard-Item-preview{width:100%;height:140px}.uppy-size--lg .uppy-Dashboard-Item-preview{height:120px}.uppy-size--xl .uppy-Dashboard-Item-preview{height:140px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-preview{width:100%;max-height:75%;flex-grow:1}.uppy-Dashboard--singleFile.uppy-size--md .uppy-Dashboard-Item-preview{max-height:100%}[dir=ltr] .uppy-Dashboard-Item-fileInfoAndButtons{padding-right:8px}[dir=rtl] .uppy-Dashboard-Item-fileInfoAndButtons{padding-left:8px}[dir=ltr] .uppy-Dashboard-Item-fileInfoAndButtons{padding-left:12px}[dir=rtl] .uppy-Dashboard-Item-fileInfoAndButtons{padding-right:12px}.uppy-Dashboard-Item-fileInfoAndButtons{display:flex;flex-grow:1;align-items:center;justify-content:space-between}.uppy-size--md .uppy-Dashboard-Item-fileInfoAndButtons,.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfoAndButtons{align-items:flex-start;padding:9px 0 0}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfoAndButtons{width:100%;flex-grow:0}.uppy-Dashboard-Item-fileInfo{flex-grow:1;flex-shrink:1}.uppy-Dashboard-Item-actionWrapper{flex-grow:0;flex-shrink:0}.uppy-Dashboard-Item.is-inprogress .uppy-Dashboard-Item-previewInnerWrap:after,.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-previewInnerWrap:after{display:block}[dir=ltr] .uppy-Dashboard-Item-errorDetails{left:2px}[dir=rtl] .uppy-Dashboard-Item-errorDetails{right:2px}.uppy-Dashboard-Item-errorDetails{position:relative;top:0;flex-shrink:0;width:13px;height:13px;color:#fff;font-weight:600;font-size:10px;line-height:12px;text-align:center;background-color:#939393;border-radius:50%;border:none;cursor:help;-webkit-appearance:none;appearance:none}.uppy-Dashboard-Item-errorDetails:after{line-height:1.3;word-wrap:break-word}.uppy-Dashboard-FileCard{position:absolute;inset:0;z-index:1005;display:flex;flex-direction:column;width:100%;height:100%;background-color:#fff;border-radius:5px;box-shadow:0 0 10px 4px #0000001a}.uppy-Dashboard-FileCard .uppy-DashboardContent-bar{border-top-left-radius:5px;border-top-right-radius:5px}.uppy-Dashboard-FileCard .uppy-Dashboard-FileCard-actions{border-bottom-right-radius:5px;border-bottom-left-radius:5px}.uppy-Dashboard-FileCard-inner{display:flex;flex-direction:column;flex-grow:1;flex-shrink:1;height:100%;min-height:0}.uppy-Dashboard-FileCard-preview{position:relative;display:flex;flex-grow:0;flex-shrink:1;align-items:center;justify-content:center;height:60%;min-height:0;border-bottom:1px solid #eaeaea}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-preview{background-color:#333;border-bottom:0}.uppy-Dashboard-FileCard-preview img.uppy-Dashboard-Item-previewImg{flex:0 0 auto;max-width:90%;max-height:90%;object-fit:cover;border-radius:3px;box-shadow:0 3px 20px #00000026}[dir=ltr] .uppy-Dashboard-FileCard-edit{right:10px}[dir=rtl] .uppy-Dashboard-FileCard-edit{left:10px}.uppy-Dashboard-FileCard-edit{position:absolute;top:10px;padding:7px 15px;color:#fff;font-size:13px;background-color:#00000080;border-radius:50px}.uppy-Dashboard-FileCard-edit:focus{outline:none}.uppy-Dashboard-FileCard-edit::-moz-focus-inner{border:0}.uppy-Dashboard-FileCard-edit:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Dashboard-FileCard-edit:hover{background-color:#000c}.uppy-Dashboard-FileCard-info{flex-grow:0;flex-shrink:0;height:40%;padding:30px 20px 20px;overflow-y:auto;-webkit-overflow-scrolling:touch}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-info{background-color:#1f1f1f}.uppy-Dashboard-FileCard-fieldset{max-width:640px;margin:auto auto 12px;padding:0;font-size:0;border:0}.uppy-Dashboard-FileCard-label{display:inline-block;width:22%;color:#525252;font-size:12px;vertical-align:middle}.uppy-size--md .uppy-Dashboard-FileCard-label{font-size:14px}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-label{color:#eaeaea}.uppy-Dashboard-FileCard-input{display:inline-block;width:78%;vertical-align:middle}.uppy-Dashboard-FileCard-actions{display:flex;flex-grow:0;flex-shrink:0;align-items:center;height:55px;padding:0 15px;background-color:#fafafa;border-top:1px solid #eaeaea}.uppy-size--md .uppy-Dashboard-FileCard-actions{height:65px}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-actions{background-color:#1f1f1f;border-top:1px solid #333}[dir=ltr] .uppy-Dashboard-FileCard-actionsBtn{margin-right:10px}[dir=rtl] .uppy-Dashboard-FileCard-actionsBtn{margin-left:10px}
1.uppy-transition-slideDownUp-enter{transform:translate3d(0,-105%,0);opacity:.01;transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-enter.uppy-transition-slideDownUp-enter-active{transform:translateZ(0);opacity:1}.uppy-transition-slideDownUp-leave{transform:translateZ(0);opacity:1;transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-leave.uppy-transition-slideDownUp-leave-active{transform:translate3d(0,-105%,0);opacity:.01}@keyframes uppy-Dashboard-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes uppy-Dashboard-fadeOut{0%{opacity:1}to{opacity:0}}@keyframes uppy-Dashboard-slideDownAndFadeIn{0%{transform:translate3d(-50%,-70%,0);opacity:0}to{transform:translate3d(-50%,-50%,0);opacity:1}}@keyframes uppy-Dashboard-slideDownAndFadeIn--small{0%{transform:translate3d(0,-20%,0);opacity:0}to{transform:translateZ(0);opacity:1}}@keyframes uppy-Dashboard-slideUpFadeOut{0%{transform:translate3d(-50%,-50%,0);opacity:1}to{transform:translate3d(-50%,-70%,0);opacity:0}}@keyframes uppy-Dashboard-slideUpFadeOut--small{0%{transform:translateZ(0);opacity:1}to{transform:translate3d(0,-20%,0);opacity:0}}.uppy-Dashboard--modal{z-index:1001}.uppy-Dashboard--modal[aria-hidden=true]{display:none}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width: 820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeIn .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width: 820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeOut .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard-isFixed{height:100vh;overflow:hidden}.uppy-Dashboard--modal .uppy-Dashboard-overlay{position:fixed;inset:0;z-index:1001;background-color:#00000080}.uppy-Dashboard-inner{position:relative;max-width:100%;max-height:100%;background-color:#f4f4f4;border:1px solid #eaeaea;border-radius:5px;outline:none}.uppy-size--md .uppy-Dashboard-inner{min-height:auto}@media only screen and (min-width: 820px){.uppy-Dashboard-inner{width:650px;height:500px}}.uppy-Dashboard--modal .uppy-Dashboard-inner{z-index:1002}[data-uppy-theme=dark] .uppy-Dashboard-inner{background-color:#1f1f1f}.uppy-Dashboard--isDisabled .uppy-Dashboard-inner{cursor:not-allowed}.uppy-Dashboard-innerWrap{position:relative;display:flex;flex-direction:column;height:100%;overflow:hidden;border-radius:5px;opacity:0}.uppy-Dashboard--isInnerWrapVisible .uppy-Dashboard-innerWrap{opacity:1}.uppy-Dashboard--isDisabled .uppy-Dashboard-innerWrap{opacity:.6;filter:grayscale(100%);-webkit-user-select:none;user-select:none;cursor:not-allowed}.uppy-Dashboard--isDisabled .uppy-ProviderIconBg{fill:#9f9f9f}.uppy-Dashboard--isDisabled [disabled],.uppy-Dashboard--isDisabled [aria-disabled]{pointer-events:none;cursor:not-allowed}.uppy-Dashboard--modal .uppy-Dashboard-inner{position:fixed;inset:35px 15px 15px;border:none}@media only screen and (min-width: 820px){.uppy-Dashboard--modal .uppy-Dashboard-inner{top:50%;right:auto;left:50%;box-shadow:0 5px 15px 4px #00000026;transform:translate(-50%,-50%)}}[dir=ltr] .uppy-Dashboard-close{right:-2px}[dir=rtl] .uppy-Dashboard-close{left:-2px}.uppy-Dashboard-close{position:absolute;top:-33px;z-index:1005;display:block;color:#ffffffe6;font-size:27px;cursor:pointer}.uppy-Dashboard-close:focus{outline:none}.uppy-Dashboard-close::-moz-focus-inner{border:0}.uppy-Dashboard-close:focus{color:#6eabf2}@media only screen and (min-width: 820px){[dir=ltr] .uppy-Dashboard-close{right:-35px}[dir=rtl] .uppy-Dashboard-close{left:-35px}.uppy-Dashboard-close{top:-10px;font-size:35px}}.uppy-Dashboard-serviceMsg{position:relative;top:-1px;z-index:1004;padding:12px 0;font-weight:500;font-size:12px;line-height:1.3;background-color:#fffbf7;border-top:1px solid #edd4b9;border-bottom:1px solid #edd4b9}.uppy-size--md .uppy-Dashboard-serviceMsg{font-size:14px;line-height:1.4}[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg{color:#eaeaea;background-color:#1f1f1f;border-top:1px solid #333;border-bottom:1px solid #333}.uppy-Dashboard-serviceMsg-title{display:block;margin-bottom:4px;padding-left:42px;line-height:1}.uppy-Dashboard-serviceMsg-text{padding:0 15px}.uppy-Dashboard-serviceMsg-actionBtn{color:#1269cf;font-weight:inherit;font-size:inherit;vertical-align:initial}[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg-actionBtn{color:#02baf2e6}.uppy-Dashboard-serviceMsg-icon{position:absolute;top:10px;left:15px}.uppy-Dashboard-AddFiles{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-align:center}[data-uppy-drag-drop-supported=true] .uppy-Dashboard-AddFiles{height:calc(100% - 14px);margin:7px;border:1px dashed #dfdfdf;border-radius:3px}.uppy-Dashboard-AddFilesPanel .uppy-Dashboard-AddFiles{height:calc(100% - 54px);border:none}.uppy-Dashboard--modal .uppy-Dashboard-AddFiles{border-color:#cfcfcf}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles{border-color:#757575}.uppy-Dashboard-AddFiles-info{display:none;margin-top:auto;padding-top:15px;padding-bottom:15px}.uppy-size--height-md .uppy-Dashboard-AddFiles-info{display:block}.uppy-size--md .uppy-Dashboard-AddFiles-info{position:absolute;right:0;bottom:25px;left:0;padding-top:30px;padding-bottom:0}[data-uppy-num-acquirers="0"] .uppy-Dashboard-AddFiles-info{margin-top:0}.uppy-Dashboard-browse{color:#1269cf;cursor:pointer}.uppy-Dashboard-browse:focus{outline:none}.uppy-Dashboard-browse::-moz-focus-inner{border:0}.uppy-Dashboard-browse:hover,.uppy-Dashboard-browse:focus{border-bottom:1px solid #1269cf}[data-uppy-theme=dark] .uppy-Dashboard-browse{color:#02baf2e6}[data-uppy-theme=dark] .uppy-Dashboard-browse:hover,[data-uppy-theme=dark] .uppy-Dashboard-browse:focus{border-bottom:1px solid #02baf2}.uppy-Dashboard-browseBtn{display:block;width:100%;margin-top:8px;margin-bottom:5px;font-weight:500;font-size:14px}.uppy-size--md .uppy-Dashboard-browseBtn{width:auto;margin:15px auto;padding:13px 44px;font-size:15px}.uppy-Dashboard-AddFiles-list{display:flex;flex:1;flex-direction:column;width:100%;margin-top:2px;padding:2px 0;overflow-y:auto;-webkit-overflow-scrolling:touch}.uppy-size--md .uppy-Dashboard-AddFiles-list{flex:none;flex-direction:row;flex-wrap:wrap;justify-content:center;max-width:600px;margin-top:15px;padding-top:0;overflow-y:visible}.uppy-DashboardTab{width:100%;text-align:center;border-bottom:1px solid #eaeaea}[data-uppy-theme=dark] .uppy-DashboardTab{border-bottom:1px solid #333}.uppy-size--md .uppy-DashboardTab{display:inline-block;width:initial;margin-bottom:10px;border-bottom:none}.uppy-DashboardTab-btn{flex-direction:row;align-items:center;justify-content:left;width:100%;height:100%;padding:12px 15px;color:#525252;background-color:transparent;cursor:pointer;-webkit-appearance:none;appearance:none}.uppy-DashboardTab-btn:focus{outline:none}[dir=ltr] .uppy-size--md .uppy-DashboardTab-btn{margin-right:1px}[dir=rtl] .uppy-size--md .uppy-DashboardTab-btn{margin-left:1px}.uppy-size--md .uppy-DashboardTab-btn{flex-direction:column;width:86px;padding:10px 3px;border-radius:5px}[data-uppy-theme=dark] .uppy-DashboardTab-btn{color:#eaeaea}.uppy-DashboardTab-btn::-moz-focus-inner{border:0}.uppy-DashboardTab-btn:hover{background-color:#e9ecef}[data-uppy-theme=dark] .uppy-DashboardTab-btn:hover{background-color:#333}.uppy-DashboardTab-btn:active,.uppy-DashboardTab-btn:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardTab-btn:active,[data-uppy-theme=dark] .uppy-DashboardTab-btn:focus{background-color:#525252}.uppy-DashboardTab-btn svg{display:inline-block;max-width:100%;max-height:100%;overflow:hidden;vertical-align:text-top;transition:transform ease-in-out .15s}[dir=ltr] .uppy-DashboardTab-inner{margin-right:10px}[dir=rtl] .uppy-DashboardTab-inner{margin-left:10px}.uppy-DashboardTab-inner{display:flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:8px;background-color:#fff;box-shadow:0 1px 1px #0000001a,0 1px 2px #0000001a,0 2px 3px #00000005}[dir=ltr] .uppy-size--md .uppy-DashboardTab-inner{margin-right:0}[dir=rtl] .uppy-size--md .uppy-DashboardTab-inner{margin-left:0}[data-uppy-theme=dark] .uppy-DashboardTab-inner{background-color:#323232;box-shadow:0 1px 1px #0003,0 1px 2px #0003,0 2px 3px #00000014}.uppy-DashboardTab-name{font-weight:400;font-size:14px}.uppy-size--md .uppy-DashboardTab-name{margin-top:8px;margin-bottom:0;font-size:12px;line-height:15px}.uppy-DashboardTab-iconMyDevice{color:#1269cf}[data-uppy-theme=dark] .uppy-DashboardTab-iconMyDevice{color:#02baf2}.uppy-DashboardTab-iconBox{color:#0061d5}[data-uppy-theme=dark] .uppy-DashboardTab-iconBox{color:#eaeaea}.uppy-DashboardTab-iconDropbox{color:#0061fe}[data-uppy-theme=dark] .uppy-DashboardTab-iconDropbox{color:#eaeaea}
1.uppy-DashboardTab-iconUnsplash{color:#111}[data-uppy-theme=dark] .uppy-DashboardTab-iconUnsplash{color:#eaeaea}.uppy-DashboardTab-iconScreenRec{color:#2c3e50}[data-uppy-theme=dark] .uppy-DashboardTab-iconScreenRec{color:#eaeaea}.uppy-DashboardTab-iconAudio{color:#8030a3}[data-uppy-theme=dark] .uppy-DashboardTab-iconAudio{color:#bf6ee3}.uppy-Dashboard-input{position:absolute;z-index:-1;width:.1px;height:.1px;overflow:hidden;opacity:0}.uppy-DashboardContent-bar{position:relative;z-index:1004;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;width:100%;height:40px;padding:0 10px;background-color:#fafafa;border-bottom:1px solid #eaeaea}.uppy-size--md .uppy-DashboardContent-bar{height:50px;padding:0 15px}[data-uppy-theme=dark] .uppy-DashboardContent-bar{background-color:#1f1f1f;border-bottom:1px solid #333}.uppy-DashboardContent-title{position:absolute;top:0;right:0;left:0;width:100%;max-width:170px;margin:auto;overflow-x:hidden;font-weight:500;font-size:12px;line-height:40px;white-space:nowrap;text-align:center;text-overflow:ellipsis}.uppy-size--md .uppy-DashboardContent-title{max-width:300px;font-size:14px;line-height:50px}[data-uppy-theme=dark] .uppy-DashboardContent-title{color:#eaeaea}[dir=ltr] .uppy-DashboardContent-back,[dir=ltr] .uppy-DashboardContent-save{margin-left:-6px}[dir=rtl] .uppy-DashboardContent-back,[dir=rtl] .uppy-DashboardContent-save{margin-right:-6px}.uppy-DashboardContent-back,.uppy-DashboardContent-save{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:1;background:none;border:0;-webkit-appearance:none;padding:7px 6px;color:#1269cf;font-weight:400;font-size:12px;border-radius:3px;cursor:pointer}.uppy-DashboardContent-back:focus,.uppy-DashboardContent-save:focus{outline:none}.uppy-DashboardContent-back::-moz-focus-inner,.uppy-DashboardContent-save::-moz-focus-inner{border:0}.uppy-DashboardContent-back:hover,.uppy-DashboardContent-save:hover{color:#0e51a0}.uppy-DashboardContent-back:focus,.uppy-DashboardContent-save:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardContent-back:focus,[data-uppy-theme=dark] .uppy-DashboardContent-save:focus{background-color:#333}.uppy-size--md .uppy-DashboardContent-back,.uppy-size--md .uppy-DashboardContent-save{font-size:14px}[data-uppy-theme=dark] .uppy-DashboardContent-back,[data-uppy-theme=dark] .uppy-DashboardContent-save{color:#02baf2}[dir=ltr] .uppy-DashboardContent-addMore{margin-right:-5px}[dir=rtl] .uppy-DashboardContent-addMore{margin-left:-5px}.uppy-DashboardContent-addMore{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:1;background:none;border:0;-webkit-appearance:none;width:29px;height:29px;padding:7px 8px;color:#1269cf;font-weight:500;border-radius:3px;cursor:pointer}.uppy-DashboardContent-addMore:focus{outline:none}.uppy-DashboardContent-addMore::-moz-focus-inner{border:0}.uppy-DashboardContent-addMore:hover{color:#0e51a0}.uppy-DashboardContent-addMore:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardContent-addMore:focus{background-color:#333}[dir=ltr] .uppy-size--md .uppy-DashboardContent-addMore{margin-right:-8px}[dir=rtl] .uppy-size--md .uppy-DashboardContent-addMore{margin-left:-8px}.uppy-size--md .uppy-DashboardContent-addMore{width:auto;height:auto;font-size:14px}[data-uppy-theme=dark] .uppy-DashboardContent-addMore{color:#02baf2}[dir=ltr] .uppy-DashboardContent-addMore svg{margin-right:4px}[dir=rtl] .uppy-DashboardContent-addMore svg{margin-left:4px}.uppy-DashboardContent-addMore svg{vertical-align:baseline}.uppy-size--md .uppy-DashboardContent-addMore svg{width:11px;height:11px}.uppy-DashboardContent-addMoreCaption{display:none}.uppy-size--md .uppy-DashboardContent-addMoreCaption{display:inline}.uppy-DashboardContent-panel{position:absolute;inset:0;z-index:1005;display:flex;flex:1;flex-direction:column;overflow:hidden;background-color:#f5f5f5;border-radius:5px}.uppy-Dashboard-AddFilesPanel{position:absolute;inset:0;z-index:1005;display:flex;flex-direction:column;overflow:hidden;background:#fafafa;background:linear-gradient(0deg,#fafafa 35%,rgba(250,250,250,.85) 100%);border-radius:5px;box-shadow:0 0 10px 5px #00000026}[data-uppy-theme=dark] .uppy-Dashboard-AddFilesPanel{background-color:#333;background-image:linear-gradient(0deg,#1f1f1f 35%,rgba(31,31,31,.85) 100%)}.uppy-Dashboard--isAddFilesPanelVisible .uppy-Dashboard-files{filter:blur(2px)}.uppy-Dashboard-progress{position:absolute;bottom:0;left:0;width:100%;height:12%}.uppy-Dashboard-progressBarContainer.is-active{position:absolute;top:0;left:0;z-index:1004;width:100%;height:100%}.uppy-Dashboard-filesContainer{position:relative;flex:1;margin:0;overflow-y:hidden}.uppy-Dashboard-filesContainer:after{display:table;clear:both;content:""}.uppy-Dashboard-files{flex:1;margin:0;padding:0 0 10px;overflow-y:auto;-webkit-overflow-scrolling:touch}.uppy-size--md .uppy-Dashboard-files{padding-top:10px}.uppy-Dashboard--singleFile .uppy-Dashboard-filesInner{display:flex;justify-content:center;align-items:center;height:100%}.uppy-Dashboard-dropFilesHereHint{position:absolute;inset:7px;z-index:2000;display:flex;align-items:center;justify-content:center;padding-top:90px;color:#757575;font-size:16px;text-align:center;background-image:url("data:image/svg+xml,%3Csvg width=\'48\' height=\'48\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2V1zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0v1zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a.999.999 0 0 1 1.414 0l7 7z\' fill=\'%231269CF\' fill-rule=\'nonzero\'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50% 50%;border:1px dashed #1269cf;border-radius:3px;visibility:hidden}[data-uppy-theme=dark] .uppy-Dashboard-dropFilesHereHint{color:#bbb;background-image:url("data:image/svg+xml,%3Csvg width=\'48\' height=\'48\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2V1zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0v1zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a.999.999 0 0 1 1.414 0l7 7z\' fill=\'%2302BAF2\' fill-rule=\'nonzero\'/%3E%3C/svg%3E");border-color:#02baf2}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-dropFilesHereHint{visibility:visible}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-DashboardContent-bar,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-files,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-progressindicators,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-serviceMsg{opacity:.15}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-AddFiles{opacity:.03}.uppy-Dashboard-AddFiles-title{width:100%;margin-top:15px;margin-bottom:5px;padding:0 15px;color:#000;font-weight:500;font-size:17px;line-height:1.35;text-align:inline-start}.uppy-size--md .uppy-Dashboard-AddFiles-title{max-width:480px;padding:0 35px;margin-top:5px;font-weight:400;font-size:21px;text-align:center}[data-uppy-num-acquirers="0"] .uppy-Dashboard-AddFiles-title{text-align:center}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles-title{color:#eaeaea}.uppy-Dashboard-AddFiles-title button{font-weight:500}.uppy-size--md .uppy-Dashboard-AddFiles-title button{font-weight:400}.uppy-Dashboard-note{max-width:350px;margin:auto;padding:0 15px;color:#757575;font-size:14px;line-height:1.25;text-align:center}.uppy-size--md .uppy-Dashboard-note{max-width:600px;line-height:1.35}[data-uppy-theme=dark] .uppy-Dashboard-note{color:#cfcfcf}a.uppy-Dashboard-poweredBy{display:inline-block;margin-top:8px;color:#939393;font-size:11px;text-align:center;text-decoration:none}.uppy-Dashboard-poweredByIcon{position:relative;top:1px;margin-right:1px;margin-left:1px;vertical-align:text-top;opacity:.9;fill:none;stroke:#939393}.uppy-Dashboard-Item-previewIcon{position:absolute;top:50%;left:50%;z-index:100;width:25px;height:25px;transform:translate(-50%,-50%)}.uppy-size--md .uppy-Dashboard-Item-previewIcon{width:38px;height:38px}.uppy-Dashboard-Item-previewIcon svg{width:100%;height:100%}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewIcon{width:100%;height:100%;max-width:60%;max-height:60%}.uppy-Dashboard-Item-previewIconWrap{position:relative;height:76px;max-height:75%}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewIconWrap{width:100%;height:100%}.uppy-Dashboard-Item-previewIconBg{width:100%;height:100%;filter:drop-shadow(rgba(0,0,0,.1) 0 1px 1px)}.uppy-Dashboard-upload{position:relative;width:50px;height:50px}.uppy-size--md .uppy-Dashboard-upload{width:60px;height:60px}.uppy-Dashboard-upload .uppy-c-icon{position:relative;top:1px;width:50%}[dir=ltr] .uppy-Dashboard-uploadCount{right:-12px}[dir=rtl] .uppy-Dashboard-uploadCount{left:-12px}.uppy-Dashboard-uploadCount{position:absolute;top:-12px;width:16px;height:16px;color:#fff;font-size:8px;line-height:16px;background-color:#1bb240;border-radius:50%}.uppy-size--md .uppy-Dashboard-uploadCount{width:18px;height:18px;font-size:9px;line-height:18px}.response-list-header{margin-bottom:0!important}.uppy-Dashboard-inner{z-index:0}\n'],encapsulation:2}),sp=Vn);ap=sp=(0,I.__decorate)([(0,o.E)(y.i.TusUpload),(0,I.__metadata)("design:paramtypes",[xc.K,f.ChangeDetectorRef,Sc.W,Cc.O,wc.I,Ic.J,Ec.b,Dc.w,Fc._,Object,String,Pc.E,Oc.e8,Bc.sK,Tc.T,Object,Uc.O])],ap)},37920:(Se,Y,s)=>{"use strict";s.d(Y,{w:()=>ae});var G,p=s(70655),I=s(10102),f=s(6952),o=s(18005),y=s(55624),O=s(13604),d=s(16066),R=s(1411),k=s(98678);let ae=((G=class extends I.o{constructor(N,C,D,z){super("submissionuploads",N,C,D,z),this.requestService=N,this.rdbService=C,this.objectCache=D,this.halService=z}findByHref(N,C=!0,D=!0,...z){return super.findByHref(N,C,D,...z)}}).\u0275fac=function(N){return new(N||G)(k.\u0275\u0275inject(f.s),k.\u0275\u0275inject(d.Q),k.\u0275\u0275inject(y.a),k.\u0275\u0275inject(o.q))},G.\u0275prov=k.\u0275\u0275defineInjectable({token:G,factory:G.\u0275fac}),G);ae=(0,p.__decorate)([(0,R.cQ)(O.fB),(0,p.__metadata)("design:paramtypes",[f.s,d.Q,y.a,o.q])],ae)},60030:(Se,Y,s)=>{"use strict";s.d(Y,{K:()=>f});var p=s(45608),I=s(65521);class f extends I.R{constructor(y,...O){super(y,...O),this._rootElement=y,this._subRootElement=O.join("/")}get rootElement(){return this._rootElement}get subRootElement(){return this._subRootElement}getPath(y){(0,p.pT)(y)&&Array.isArray(y)&&(y=y.join("/"));let O="/"+this.toString();return(0,p.pT)(y)&&(O+="/"+y),{rootElement:this._rootElement,subRootElement:this._subRootElement,path:O}}}},44918:(Se,Y,s)=>{"use strict";s.r(Y),s.d(Y,{SubmissionEditComponent:()=>z});var p=s(35841),I=s(21160),f=s(77007),o=s(3358),y=s(45608),O=s(1579),d=s(65384),R=s(10572),k=s(29442),G=s(11915),ae=s(97176),j=s(98678),N=s(67522),C=s(96342),D=s(96528);let z=(()=>{class le{constructor(m,T,S,M,K,te,J,ne){this.changeDetectorRef=m,this.notificationsService=T,this.route=S,this.router=M,this.itemDataService=K,this.submissionService=te,this.translate=J,this.submissionJsonPatchOperationsService=ne,this.collectionModifiable=null,this.subs=[],this.itemLink$=new p.X(void 0)}
1ngOnInit(){this.collectionModifiable=this.route.snapshot.data?.collectionModifiable??null,this.subs.push(this.route.paramMap.pipe((0,I.w)(m=>this.submissionService.retrieveSubmission(m.get("id"))),(0,f.h)(m=>(0,y.K0)(m))).subscribe(m=>{if(m.hasSucceeded)if((0,y.xb)(m.payload))this.notificationsService.info(null,this.translate.get("submission.general.cannot_submit")),this.router.navigate(["/mydspace"]);else{const{errors:T}=m.payload;this.submissionErrors=(0,ae.Z)(T),this.submissionId=m.payload.id.toString(),this.collectionId=m.payload.collection.id,this.selfUrl=m.payload._links.self.href,this.sections=m.payload.sections,this.itemLink$.next(m.payload._links.item.href),this.item=m.payload.item,this.submissionDefinition=m.payload.submissionDefinition}else 404===m.statusCode&&this.router.navigate(["/404"],{skipLocationChange:!0})}),this.itemLink$.pipe((0,y.iy)(),(0,I.w)(m=>this.itemDataService.findByHref(m)),(0,R.g1)(),(0,o.b)(300)).subscribe(m=>{this.item=m.payload,this.changeDetectorRef.detectChanges()}))}ngOnDestroy(){this.subs.filter(m=>(0,y.Uh)(m)).forEach(m=>m.unsubscribe()),this.submissionJsonPatchOperationsService.deletePendingJsonPatchOperations()}}return le.\u0275fac=function(m){return new(m||le)(j.\u0275\u0275directiveInject(j.ChangeDetectorRef),j.\u0275\u0275directiveInject(d.T),j.\u0275\u0275directiveInject(N.gz),j.\u0275\u0275directiveInject(N.F0),j.\u0275\u0275directiveInject(k.S),j.\u0275\u0275directiveInject(O.b),j.\u0275\u0275directiveInject(C.sK),j.\u0275\u0275directiveInject(G.E))},le.\u0275cmp=j.\u0275\u0275defineComponent({type:le,selectors:[["ds-submission-edit"]],decls:2,vars:8,consts:[[1,"submission-submit-container"],[3,"collectionId","sections","selfUrl","submissionDefinition","submissionErrors","item","collectionModifiable","submissionId"]],template:function(m,T){1&m&&(j.\u0275\u0275elementStart(0,"div",0),j.\u0275\u0275element(1,"ds-themed-submission-form",1),j.\u0275\u0275elementEnd()),2&m&&(j.\u0275\u0275advance(1),j.\u0275\u0275property("collectionId",T.collectionId)("sections",T.sections)("selfUrl",T.selfUrl)("submissionDefinition",T.submissionDefinition)("submissionErrors",T.submissionErrors)("item",T.item)("collectionModifiable",T.collectionModifiable)("submissionId",T.submissionId))},dependencies:[D.g]}),le})()},97359:(Se,Y,s)=>{"use strict";s.d(Y,{I:()=>y});var p=s(4682),I=s(98678);function f(O,d){}const o=["*"];let y=(()=>{class O extends p.F{getComponentName(){return"SubmissionEditComponent"}importThemedComponent(R){return s(8377)(`./${R}/app/submission/edit/submission-edit.component`)}importUnthemedComponent(){return Promise.resolve().then(s.bind(s,44918))}}return O.\u0275fac=function(){let d;return function(k){return(d||(d=I.\u0275\u0275getInheritedFactory(O)))(k||O)}}(),O.\u0275cmp=I.\u0275\u0275defineComponent({type:O,selectors:[["ds-themed-submission-edit"]],features:[I.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:o,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(R,k){1&R&&(I.\u0275\u0275projectionDef(),I.\u0275\u0275template(0,f,0,0,"ng-template",null,0,I.\u0275\u0275templateRefExtractor),I.\u0275\u0275elementStart(2,"div",null,1),I.\u0275\u0275projection(4),I.\u0275\u0275elementEnd())},encapsulation:2}),O})()},35273:(Se,Y,s)=>{"use strict";s.d(Y,{z:()=>ne});var p=s(98678),I=s(35841),f=s(9237),o=s(66154),y=s(48358),O=s(69637),d=s(45608),R=s(60030),k=s(78187),G=s(1579),ae=s(11915),j=s(95445),N=s(52972),C=s(73797),D=s(10572),z=s(96289),le=s(8842),q=s(35103),m=s(65706),T=s(19829),S=s(96342);function M(B,$){if(1&B&&(p.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"span",4),p.\u0275\u0275text(3),p.\u0275\u0275pipe(4,"translate"),p.\u0275\u0275elementEnd()(),p.\u0275\u0275elementStart(5,"div",5)(6,"span",4),p.\u0275\u0275text(7),p.\u0275\u0275pipe(8,"async"),p.\u0275\u0275elementEnd()()()),2&B){const F=p.\u0275\u0275nextContext();p.\u0275\u0275advance(3),p.\u0275\u0275textInterpolate(p.\u0275\u0275pipeBind1(4,2,"submission.sections.general.collection")),p.\u0275\u0275advance(4),p.\u0275\u0275textInterpolate(p.\u0275\u0275pipeBind1(8,4,F.selectedCollectionName$))}}function K(B,$){1&B&&(p.\u0275\u0275elementStart(0,"span"),p.\u0275\u0275element(1,"i",13),p.\u0275\u0275elementEnd())}function te(B,$){if(1&B&&(p.\u0275\u0275elementStart(0,"span"),p.\u0275\u0275text(1),p.\u0275\u0275pipe(2,"async"),p.\u0275\u0275elementEnd()),2&B){const F=p.\u0275\u0275nextContext(2);p.\u0275\u0275advance(1),p.\u0275\u0275textInterpolate(p.\u0275\u0275pipeBind1(2,1,F.selectedCollectionName$))}}function J(B,$){if(1&B){const F=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"div",6,7),p.\u0275\u0275listener("openChange",function(H){p.\u0275\u0275restoreView(F);const oe=p.\u0275\u0275nextContext();
1return p.\u0275\u0275resetView(oe.toggled(H))}),p.\u0275\u0275elementStart(2,"div",3)(3,"span",8),p.\u0275\u0275text(4),p.\u0275\u0275pipe(5,"translate"),p.\u0275\u0275elementEnd()(),p.\u0275\u0275elementStart(6,"button",9),p.\u0275\u0275listener("blur",function(){p.\u0275\u0275restoreView(F);const H=p.\u0275\u0275nextContext();return p.\u0275\u0275resetView(H.onClose())})("click",function(){p.\u0275\u0275restoreView(F);const H=p.\u0275\u0275nextContext();return p.\u0275\u0275resetView(H.onClose())}),p.\u0275\u0275pipe(7,"async"),p.\u0275\u0275template(8,K,2,0,"span",10),p.\u0275\u0275pipe(9,"async"),p.\u0275\u0275template(10,te,3,3,"span",10),p.\u0275\u0275pipe(11,"async"),p.\u0275\u0275elementEnd(),p.\u0275\u0275elementStart(12,"div",11)(13,"ds-themed-collection-dropdown",12),p.\u0275\u0275listener("selectionChange",function(H){p.\u0275\u0275restoreView(F);const oe=p.\u0275\u0275nextContext();return p.\u0275\u0275resetView(oe.onSelect(H))}),p.\u0275\u0275elementEnd()()()}if(2&B){const F=p.\u0275\u0275nextContext();p.\u0275\u0275advance(4),p.\u0275\u0275textInterpolate1(" ",p.\u0275\u0275pipeBind1(5,4,"submission.sections.general.collection")," "),p.\u0275\u0275advance(2),p.\u0275\u0275property("disabled",p.\u0275\u0275pipeBind1(7,6,F.processingChange$)||0==F.collectionModifiable||F.isReadonly),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngIf",p.\u0275\u0275pipeBind1(9,8,F.processingChange$)),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngIf",!p.\u0275\u0275pipeBind1(11,10,F.processingChange$))}}let ne=(()=>{class B{constructor(F,P,H,oe,Q,ie,se){this.cdr=F,this.collectionDataService=P,this.operationsBuilder=H,this.operationsService=oe,this.submissionService=Q,this.sectionsService=ie,this.dsoNameService=se,this.collectionModifiable=null,this.isReadonly=!1,this.collectionChange=new p.EventEmitter,this.processingChange$=new I.X(!1),this.subs=[]}ngOnChanges(F){(0,d.Uh)(F.currentCollectionId)&&(0,d.Uh)(F.currentCollectionId.currentValue)&&(this.selectedCollectionId=this.currentCollectionId,this.selectedCollectionName$=this.collectionDataService.findById(this.currentCollectionId).pipe((0,o.s)(P=>(0,d.UE)(P.payload)),(0,y.U)(P=>this.dsoNameService.getName(P.payload))))}ngOnInit(){this.pathCombiner=new R.K("sections","collection"),this.available$=this.sectionsService.isSectionTypeAvailable(this.submissionId,z.i.collection)}ngOnDestroy(){this.subs.filter(F=>(0,d.Uh)(F)).forEach(F=>F.unsubscribe())}onSelect(F){this.processingChange$.next(!0),this.operationsBuilder.replace(this.pathCombiner.getPath(),F.collection.id,!0),this.subs.push(this.operationsService.jsonPatchByResourceID(this.submissionService.getSubmissionObjectLinkName(),this.submissionId,"sections","collection").pipe((0,O.z)(P=>this.submissionService.retrieveSubmission(P[0].id).pipe((0,D.Gp)()))).subscribe(P=>{this.selectedCollectionId=F.collection.id,this.selectedCollectionName$=(0,f.of)(F.collection.name),this.collectionChange.emit(P),this.submissionService.changeSubmissionCollection(this.submissionId,F.collection.id),this.processingChange$.next(!1),this.cdr.detectChanges()}))}onClose(){this.collectionDropdown?.reset()}toggled(F){F||this.collectionDropdown?.reset()}}return B.\u0275fac=function(F){return new(F||B)(p.\u0275\u0275directiveInject(p.ChangeDetectorRef),p.\u0275\u0275directiveInject(j.W),p.\u0275\u0275directiveInject(k.w),p.\u0275\u0275directiveInject(ae.E),p.\u0275\u0275directiveInject(G.b),p.\u0275\u0275directiveInject(C.J),p.\u0275\u0275directiveInject(le._))},B.\u0275cmp=p.\u0275\u0275defineComponent({type:B,selectors:[["ds-submission-form-collection"]],viewQuery:function(F,P){if(1&F&&p.\u0275\u0275viewQuery(N.CollectionDropdownComponent,5),2&F){let H;p.\u0275\u0275queryRefresh(H=p.\u0275\u0275loadQuery())&&(P.collectionDropdown=H.first)}},inputs:{currentCollectionId:"currentCollectionId",currentDefinition:"currentDefinition",collectionModifiable:"collectionModifiable",submissionId:"submissionId",isReadonly:"isReadonly"},outputs:{collectionChange:"collectionChange"},features:[p.\u0275\u0275NgOnChangesFeature],decls:5,vars:6,consts:[["class","input-group mb-3",4,"ngIf"],["ngbDropdown","","class","btn-group input-group",3,"openChange",4,"ngIf"],[1,"input-group","mb-3"],[1,"input-group-prepend"],[1,"input-group-text"],[1,"input-group-append"],["ngbDropdown","",1,"btn-group","input-group",3,"openChange"],["collectionControls","ngbDropdown"],["id","collectionControlsMenuLabel",1,"input-group-text"],["aria-describedby","collectionControlsMenuLabel","id","collectionControlsMenuButton","
1ngbDropdownToggle","",1,"btn","btn-outline-primary",3,"disabled","blur","click"],[4,"ngIf"],["ngbDropdownMenu","","id","collectionControlsDropdownMenu","aria-labelledby","collectionControlsMenuButton",1,"dropdown-menu"],[3,"selectionChange"],[1,"fas","fa-circle-notch","fa-spin"]],template:function(F,P){1&F&&(p.\u0275\u0275elementStart(0,"div"),p.\u0275\u0275template(1,M,9,6,"div",0),p.\u0275\u0275pipe(2,"async"),p.\u0275\u0275template(3,J,14,12,"div",1),p.\u0275\u0275pipe(4,"async"),p.\u0275\u0275elementEnd()),2&F&&(p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf",!p.\u0275\u0275pipeBind1(2,2,P.available$)),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngIf",p.\u0275\u0275pipeBind1(4,4,P.available$)))},dependencies:[q.O5,m.jt,m.iD,m.Vi,T.t,q.Ov,S.X$],styles:[".scrollable-menu[_ngcontent-%COMP%]{height:auto;max-height:var(--ds-dropdown-menu-max-height);overflow-x:hidden}.collection-item[_ngcontent-%COMP%]{border-bottom:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color)}#collectionControlsDropdownMenu[_ngcontent-%COMP%]{left:0!important}#collectionControlsDropdownMenu[_ngcontent-%COMP%]{outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}"]}),B})()},71532:(Se,Y,s)=>{"use strict";s.d(Y,{z:()=>S});var p=s(9237),I=s(48358),f=s(53597),o=s(1579),y=s(94056),O=s(45608),d=s(98678),R=s(65706),k=s(35103),G=s(7027),ae=s(96342);function j(M,K){if(1&M){const te=d.\u0275\u0275getCurrentView();d.\u0275\u0275elementStart(0,"button",13),d.\u0275\u0275listener("click",function(ne){d.\u0275\u0275restoreView(te);const B=d.\u0275\u0275nextContext(2),$=d.\u0275\u0275reference(2);return ne.preventDefault(),d.\u0275\u0275resetView(B.confirmDiscard($))}),d.\u0275\u0275pipe(1,"dsBrowserOnly"),d.\u0275\u0275pipe(2,"async"),d.\u0275\u0275pipe(3,"async"),d.\u0275\u0275element(4,"i",14),d.\u0275\u0275text(5),d.\u0275\u0275pipe(6,"translate"),d.\u0275\u0275elementEnd()}if(2&M){const te=d.\u0275\u0275nextContext(2);d.\u0275\u0275property("disabled",d.\u0275\u0275pipeBind1(2,5,te.processingSaveStatus)||d.\u0275\u0275pipeBind1(3,7,te.processingDepositStatus)),d.\u0275\u0275attribute("data-test",d.\u0275\u0275pipeBind1(1,3,"discard")),d.\u0275\u0275advance(5),d.\u0275\u0275textInterpolate1(" ",d.\u0275\u0275pipeBind1(6,9,"submission.general.discard.submit")," ")}}function N(M,K){1&M&&(d.\u0275\u0275elementStart(0,"span"),d.\u0275\u0275element(1,"i",15),d.\u0275\u0275text(2),d.\u0275\u0275pipe(3,"translate"),d.\u0275\u0275elementEnd()),2&M&&(d.\u0275\u0275advance(2),d.\u0275\u0275textInterpolate1(" ",d.\u0275\u0275pipeBind1(3,1,"submission.general.info.saved")," "))}function C(M,K){1&M&&(d.\u0275\u0275elementStart(0,"span"),d.\u0275\u0275element(1,"i",16),d.\u0275\u0275text(2),d.\u0275\u0275pipe(3,"translate"),d.\u0275\u0275elementEnd()),2&M&&(d.\u0275\u0275advance(2),d.\u0275\u0275textInterpolate1(" ",d.\u0275\u0275pipeBind1(3,1,"submission.general.info.pending-changes")," "))}function D(M,K){1&M&&(d.\u0275\u0275elementStart(0,"div",20),d.\u0275\u0275text(1,"Saving..."),d.\u0275\u0275elementEnd()),2&M&&d.\u0275\u0275styleProp("width","100%")}function z(M,K){1&M&&(d.\u0275\u0275elementStart(0,"div",20),d.\u0275\u0275text(1,"Depositing..."),d.\u0275\u0275elementEnd()),2&M&&d.\u0275\u0275styleProp("width","100%")}function le(M,K){if(1&M&&(d.\u0275\u0275elementStart(0,"div",17)(1,"div",18),d.\u0275\u0275template(2,D,2,2,"div",19),d.\u0275\u0275pipe(3,"async"),d.\u0275\u0275template(4,z,2,2,"div",19),d.\u0275\u0275pipe(5,"async"),d.\u0275\u0275elementEnd()()),2&M){const te=d.\u0275\u0275nextContext(2);d.\u0275\u0275advance(2),d.\u0275\u0275property("ngIf",d.\u0275\u0275pipeBind1(3,2,te.processingSaveStatus)),d.\u0275\u0275advance(2),d.\u0275\u0275property("ngIf",d.\u0275\u0275pipeBind1(5,4,te.processingDepositStatus))}}function q(M,K){if(1&M){const te=d.\u0275\u0275getCurrentView();d.\u0275\u0275elementStart(0,"button",21),d.\u0275\u0275listener("click",function(ne){d.\u0275\u0275restoreView(te);const B=d.\u0275\u0275nextContext(2);return d.\u0275\u0275resetView(B.deposit(ne))}),d.\u0275\u0275pipe(1,"dsBrowserOnly"),d.\u0275\u0275pipe(2,"async"),d.\u0275\u0275pipe(3,"async"),d.\u0275\u0275elementStart(4,"span"),d.\u0275\u0275element(5,"i",22),d.\u0275\u0275text(6),d.\u0275\u0275pipe(7,"translate"),d.\u0275\u0275elementEnd()()}if(2&M){const te=d.\u0275\u0275nextContext(2);d.\u0275\u0275property("disabled",d.\u0275\u0275pipeBind1(2,5,te.processingSaveStatus)||d.\u0275\u0275pipeBind1(3,7,te.processingDepositStatus)),d.\u
10275\u0275attribute("data-test",d.\u0275\u0275pipeBind1(1,3,"deposit")),d.\u0275\u0275advance(6),d.\u0275\u0275textInterpolate1(" ",d.\u0275\u0275pipeBind1(7,9,"submission.general.deposit"),"")}}function m(M,K){if(1&M){const te=d.\u0275\u0275getCurrentView();d.\u0275\u0275elementStart(0,"div",2)(1,"div",3),d.\u0275\u0275template(2,j,7,11,"button",4),d.\u0275\u0275pipe(3,"async"),d.\u0275\u0275elementEnd(),d.\u0275\u0275elementStart(4,"div",5),d.\u0275\u0275template(5,N,4,3,"span",6),d.\u0275\u0275pipe(6,"async"),d.\u0275\u0275pipe(7,"async"),d.\u0275\u0275pipe(8,"async"),d.\u0275\u0275template(9,C,4,3,"span",6),d.\u0275\u0275pipe(10,"async"),d.\u0275\u0275pipe(11,"async"),d.\u0275\u0275pipe(12,"async"),d.\u0275\u0275template(13,le,6,6,"div",7),d.\u0275\u0275pipe(14,"async"),d.\u0275\u0275pipe(15,"async"),d.\u0275\u0275elementStart(16,"div",8)(17,"button",9),d.\u0275\u0275listener("click",function(ne){d.\u0275\u0275restoreView(te);const B=d.\u0275\u0275nextContext();return d.\u0275\u0275resetView(B.save(ne))}),d.\u0275\u0275pipe(18,"dsBrowserOnly"),d.\u0275\u0275pipe(19,"async"),d.\u0275\u0275pipe(20,"async"),d.\u0275\u0275elementStart(21,"span"),d.\u0275\u0275element(22,"i",10),d.\u0275\u0275text(23),d.\u0275\u0275pipe(24,"translate"),d.\u0275\u0275elementEnd()(),d.\u0275\u0275elementStart(25,"button",11),d.\u0275\u0275listener("click",function(ne){d.\u0275\u0275restoreView(te);const B=d.\u0275\u0275nextContext();return d.\u0275\u0275resetView(B.saveLater(ne))}),d.\u0275\u0275pipe(26,"async"),d.\u0275\u0275pipe(27,"async"),d.\u0275\u0275pipe(28,"dsBrowserOnly"),d.\u0275\u0275pipe(29,"async"),d.\u0275\u0275pipe(30,"async"),d.\u0275\u0275elementStart(31,"span"),d.\u0275\u0275element(32,"i",10),d.\u0275\u0275text(33),d.\u0275\u0275pipe(34,"translate"),d.\u0275\u0275elementEnd()(),d.\u0275\u0275template(35,q,8,11,"button",12),d.\u0275\u0275pipe(36,"async"),d.\u0275\u0275elementEnd()()()}if(2&M){const te=d.\u0275\u0275nextContext();d.\u0275\u0275advance(2),d.\u0275\u0275property("ngIf",d.\u0275\u0275pipeBind1(3,15,te.showDepositAndDiscard)),d.\u0275\u0275advance(3),d.\u0275\u0275property("ngIf",!d.\u0275\u0275pipeBind1(6,17,te.hasUnsavedModification)&&!d.\u0275\u0275pipeBind1(7,19,te.processingSaveStatus)&&!d.\u0275\u0275pipeBind1(8,21,te.processingDepositStatus)),d.\u0275\u0275advance(4),d.\u0275\u0275property("ngIf",d.\u0275\u0275pipeBind1(10,23,te.hasUnsavedModification)&&!d.\u0275\u0275pipeBind1(11,25,te.processingSaveStatus)&&!d.\u0275\u0275pipeBind1(12,27,te.processingDepositStatus)),d.\u0275\u0275advance(4),d.\u0275\u0275property("ngIf",d.\u0275\u0275pipeBind1(14,29,te.processingSaveStatus)||d.\u0275\u0275pipeBind1(15,31,te.processingDepositStatus)),d.\u0275\u0275advance(4),d.\u0275\u0275property("disabled",d.\u0275\u0275pipeBind1(19,35,te.processingSaveStatus)||!d.\u0275\u0275pipeBind1(20,37,te.hasUnsavedModification)),d.\u0275\u0275attribute("data-test",d.\u0275\u0275pipeBind1(18,33,"save")),d.\u0275\u0275advance(6),d.\u0275\u0275textInterpolate1(" ",d.\u0275\u0275pipeBind1(24,39,"submission.general.save"),""),d.\u0275\u0275advance(2),d.\u0275\u0275classProp("btn-primary",!d.\u0275\u0275pipeBind1(26,41,te.showDepositAndDiscard))("btn-secondary",d.\u0275\u0275pipeBind1(27,43,te.showDepositAndDiscard)),d.\u0275\u0275property("disabled",d.\u0275\u0275pipeBind1(29,47,te.processingSaveStatus)||d.\u0275\u0275pipeBind1(30,49,te.processingDepositStatus)),d.\u0275\u0275attribute("data-test",d.\u0275\u0275pipeBind1(28,45,"save-for-later")),d.\u0275\u0275advance(8),d.\u0275\u0275textInterpolate1(" ",d.\u0275\u0275pipeBind1(34,51,"submission.general.save-later"),""),d.\u0275\u0275advance(2),d.\u0275\u0275property("ngIf",d.\u0275\u0275pipeBind1(36,53,te.showDepositAndDiscard))}}function T(M,K){if(1&M){const te=d.\u0275\u0275getCurrentView();d.\u0275\u0275elementStart(0,"div",23)(1,"h4",24),d.\u0275\u0275text(2),d.\u0275\u0275pipe(3,"translate"),d.\u0275\u0275elementEnd(),d.\u0275\u0275elementStart(4,"button",25),d.\u0275\u0275listener("click",function(){const B=d.\u0275\u0275restoreView(te).dismiss;return d.\u0275\u0275resetView(B("cancel"))}),d.\u0275\u0275elementStart(5,"span",26),d.\u0275\u0275text(6,"\xd7"),d.\u0275\u0275elementEnd()()(),d.\u0275\u0275elementStart(7,"div",27)(8,"p"),d.\u0275\u0275text(9),d.\u0275\u0275pipe(10,"translate"),d.\u0275\u0275elementEnd()(),d.\u0275\u0275elementStart(11,"div",28)(12,"button",29),d.\u0275\u0275listener("click",function(){const B=d.\u0275\u0275restoreView(te).close;
1return d.\u0275\u0275resetView(B("cancel"))}),d.\u0275\u0275text(13),d.\u0275\u0275pipe(14,"translate"),d.\u0275\u0275elementEnd(),d.\u0275\u0275elementStart(15,"button",30),d.\u0275\u0275listener("click",function(){const B=d.\u0275\u0275restoreView(te).close;return d.\u0275\u0275resetView(B("ok"))}),d.\u0275\u0275text(16),d.\u0275\u0275pipe(17,"translate"),d.\u0275\u0275elementEnd()()}2&M&&(d.\u0275\u0275advance(2),d.\u0275\u0275textInterpolate(d.\u0275\u0275pipeBind1(3,4,"submission.general.discard.confirm.title")),d.\u0275\u0275advance(7),d.\u0275\u0275textInterpolate(d.\u0275\u0275pipeBind1(10,6,"submission.general.discard.confirm.info")),d.\u0275\u0275advance(4),d.\u0275\u0275textInterpolate(d.\u0275\u0275pipeBind1(14,8,"submission.general.discard.confirm.cancel")),d.\u0275\u0275advance(3),d.\u0275\u0275textInterpolate(d.\u0275\u0275pipeBind1(17,10,"submission.general.discard.confirm.submit")))}let S=(()=>{class M{constructor(te,J,ne){this.modalService=te,this.restService=J,this.submissionService=ne,this.submissionIsInvalid=(0,p.of)(!0)}ngOnChanges(te){(0,O.UE)(this.submissionId)&&(this.submissionIsInvalid=this.submissionService.getSubmissionStatus(this.submissionId).pipe((0,I.U)(J=>!1===J)),this.processingSaveStatus=this.submissionService.getSubmissionSaveProcessingStatus(this.submissionId),this.processingDepositStatus=this.submissionService.getSubmissionDepositProcessingStatus(this.submissionId),this.showDepositAndDiscard=(0,p.of)(this.submissionService.getSubmissionScope()===y.S.WorkspaceItem),this.hasUnsavedModification=this.submissionService.hasUnsavedModification())}save(te){this.submissionService.dispatchSave(this.submissionId,!0)}saveLater(te){this.submissionService.dispatchSaveForLater(this.submissionId)}deposit(te){this.submissionService.dispatchDeposit(this.submissionId)}confirmDiscard(te){this.modalService.open(te).result.then(J=>{"ok"===J&&this.submissionService.dispatchDiscard(this.submissionId)})}}return M.\u0275fac=function(te){return new(te||M)(d.\u0275\u0275directiveInject(R.FF),d.\u0275\u0275directiveInject(f.F),d.\u0275\u0275directiveInject(o.b))},M.\u0275cmp=d.\u0275\u0275defineComponent({type:M,selectors:[["ds-submission-form-footer"]],inputs:{submissionId:"submissionId"},features:[d.\u0275\u0275NgOnChangesFeature],decls:3,vars:1,consts:[["class","row",4,"ngIf"],["content",""],[1,"row"],[1,"col"],["type","button","id","discard","class","btn btn-danger",3,"disabled","click",4,"ngIf"],[1,"col","text-right","d-flex","justify-content-end","align-items-center"],[4,"ngIf"],["class","col d-flex justify-content-end align-items-center",4,"ngIf"],[1,"ml-2","space-children-mr"],["type","button","id","save",1,"btn","btn-secondary",3,"disabled","click"],[1,"fas","fa-save"],["type","button","id","saveForLater",1,"btn",3,"disabled","click"],["type","button","id","deposit","class","btn btn-success",3,"disabled","click",4,"ngIf"],["type","button","id","discard",1,"btn","btn-danger",3,"disabled","click"],[1,"fas","fa-trash"],[1,"fas","fa-check-circle"],[1,"fas","fa-exclamation-circle"],[1,"col","d-flex","justify-content-end","align-items-center"],[1,"progress","w-75"],["class","progress-bar progress-bar-striped progress-bar-animated bg-info","role","progressbar","aria-valuenow","100","aria-valuemin","0","aria-valuemax","100",3,"width",4,"ngIf"],["role","progressbar","aria-valuenow","100","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","progress-bar-striped","progress-bar-animated","bg-info"],["type","button","id","deposit",1,"btn","btn-success",3,"disabled","click"],[1,"fas","fa-plus"],[1,"modal-header"],[1,"modal-title","text-danger"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer","space-children-mr"],["type","button","id","discard_cancel",1,"btn","btn-secondary",3,"click"],["type","button","id","discard_submit",1,"btn","btn-danger",3,"click"]],template:function(te,J){1&te&&(d.\u0275\u0275template(0,m,37,55,"div",0),d.\u0275\u0275template(1,T,18,12,"ng-template",null,1,d.\u0275\u0275templateRefExtractor)),2&te&&d.\u0275\u0275property("ngIf",!!J.submissionId)},dependencies:[k.O5,k.Ov,G.g,ae.X$]}),M})()},51104:(Se,Y,s)=>{"use strict";s.d(Y,{i:()=>N});var p=s(48358),I=s(73797),f=s(79849),o=s(1579),y=s(98678),O=s(35103),d=s(65706),R=s(96342);const k=function(C){return{"w-100":C}};
1function G(C,D){if(1&C&&(y.\u0275\u0275elementContainerStart(0),y.\u0275\u0275elementStart(1,"button",6),y.\u0275\u0275pipe(2,"async"),y.\u0275\u0275text(3),y.\u0275\u0275pipe(4,"translate"),y.\u0275\u0275element(5,"i",7),y.\u0275\u0275elementEnd(),y.\u0275\u0275elementContainerEnd()),2&C){const z=y.\u0275\u0275nextContext();y.\u0275\u0275advance(1),y.\u0275\u0275property("ngClass",y.\u0275\u0275pureFunction1(6,k,y.\u0275\u0275pipeBind1(2,2,z.isXs$))),y.\u0275\u0275advance(2),y.\u0275\u0275textInterpolate1(" ",y.\u0275\u0275pipeBind1(4,4,"submission.sections.general.add-more")," ")}}function ae(C,D){1&C&&(y.\u0275\u0275elementStart(0,"button",8),y.\u0275\u0275text(1),y.\u0275\u0275pipe(2,"translate"),y.\u0275\u0275elementEnd()),2&C&&(y.\u0275\u0275advance(1),y.\u0275\u0275textInterpolate1(" ",y.\u0275\u0275pipeBind1(2,1,"submission.sections.general.no-sections")," "))}function j(C,D){if(1&C){const z=y.\u0275\u0275getCurrentView();y.\u0275\u0275elementStart(0,"button",9),y.\u0275\u0275listener("click",function(){const m=y.\u0275\u0275restoreView(z).$implicit,T=y.\u0275\u0275nextContext();return y.\u0275\u0275resetView(T.addSection(m.id))}),y.\u0275\u0275text(1),y.\u0275\u0275pipe(2,"translate"),y.\u0275\u0275elementEnd()}if(2&C){const z=D.$implicit;y.\u0275\u0275advance(1),y.\u0275\u0275textInterpolate1(" ",y.\u0275\u0275pipeBind1(2,1,"submission.sections."+z.header)," ")}}let N=(()=>{class C{constructor(z,le,q){this.sectionService=z,this.submissionService=le,this.windowService=q}ngOnInit(){this.sectionList$=this.submissionService.getDisabledSectionsList(this.submissionId),this.hasSections$=this.sectionList$.pipe((0,p.U)(z=>z.length>0)),this.isXs$=this.windowService.isXs()}addSection(z){this.sectionService.addSection(this.submissionId,z)}}return C.\u0275fac=function(z){return new(z||C)(y.\u0275\u0275directiveInject(I.J),y.\u0275\u0275directiveInject(o.b),y.\u0275\u0275directiveInject(f.I))},C.\u0275cmp=y.\u0275\u0275defineComponent({type:C,selectors:[["ds-submission-form-section-add"]],inputs:{collectionId:"collectionId",submissionId:"submissionId"},decls:10,vars:17,consts:[["ngbDropdown","","placement","bottom-right",1,"d-inline-block",3,"ngClass"],["sectionAdd","ngbDropdown"],[4,"ngIf"],["ngbDropdownMenu","","aria-labelledby","sectionControls",1,"sections-dropdown-menu",3,"ngClass"],["class","dropdown-item disabled",4,"ngIf"],["class","dropdown-item",3,"click",4,"ngFor","ngForOf"],["id","sectionControls","ngbDropdownToggle","",1,"btn","btn-outline-primary","dropdown-toggle",3,"ngClass"],["aria-hidden","true",1,"fa","fa-plus"],[1,"dropdown-item","disabled"],[1,"dropdown-item",3,"click"]],template:function(z,le){1&z&&(y.\u0275\u0275elementStart(0,"div",0,1),y.\u0275\u0275template(2,G,6,8,"ng-container",2),y.\u0275\u0275pipe(3,"async"),y.\u0275\u0275elementStart(4,"div",3),y.\u0275\u0275pipe(5,"async"),y.\u0275\u0275template(6,ae,3,3,"button",4),y.\u0275\u0275pipe(7,"async"),y.\u0275\u0275template(8,j,3,3,"button",5),y.\u0275\u0275pipe(9,"async"),y.\u0275\u0275elementEnd()()),2&z&&(y.\u0275\u0275property("ngClass",y.\u0275\u0275pureFunction1(13,k,le.isXs$)),y.\u0275\u0275advance(2),y.\u0275\u0275property("ngIf",y.\u0275\u0275pipeBind1(3,5,le.hasSections$)),y.\u0275\u0275advance(2),y.\u0275\u0275property("ngClass",y.\u0275\u0275pureFunction1(15,k,y.\u0275\u0275pipeBind1(5,7,le.isXs$))),y.\u0275\u0275advance(2),y.\u0275\u0275property("ngIf",!y.\u0275\u0275pipeBind1(7,9,le.hasSections$)),y.\u0275\u0275advance(2),y.\u0275\u0275property("ngForOf",y.\u0275\u0275pipeBind1(9,11,le.sectionList$)))},dependencies:[O.mk,O.sg,O.O5,d.jt,d.iD,d.Vi,O.Ov,R.X$],styles:[".dropdown-toggle[_ngcontent-%COMP%]:after{display:none}.sections-dropdown-menu[_ngcontent-%COMP%]{z-index:var(--ds-submission-header-z-index)}"]}),C})()},86183:(Se,Y,s)=>{"use strict";s.r(Y),s.d(Y,{SubmissionFormComponent:()=>Q});var p=s(9237),I=s(32210),f=s(77007),o=s(48358),y=s(49887),O=s(21160),d=s(38123),k=(s(96187),s(18005)),G=s(45608),ae=s(22170),j=s(1579),C=(s(13005),s(96289)),D=s(73797),z=s(99043),le=s(94667),q=s.n(le),m=s(98678),T=s(35103),S=s(87657),M=s(51104),K=s(35273),te=s(71532),J=s(71633),ne=s(51437);function B(ie,se){if(1&ie&&(m.\u0275\u0275elementStart(0,"div",12),m.\u0275\u0275element(1,"ds-themed-submission-upload-files",13)(2,"div",14),m.\u0275\u0275elementEnd()),2&ie){const X=m.\u0275\u0275nextContext(2);m.\u0275\u0275advance(1),m.\u0275\u0275property("submissionId",X.submissionId)("collectionId",X.collectionId)("uploadFilesOptions",X.uploadFilesOptions)}}function $(ie,se){if(1&ie){const X=m.\u0275\u0275getCurrentView();m.\u0275\u0275elementContainerStart(0),m.\u0275\u0275elementStart(1,"ds-submission-form-collection",15),m.\u0275\u0275listener("collectionChange",function(De){m.\u0275\u0275restoreView(X);const ge=m.\u0275\u0275nextContext(2);
1return m.\u0275\u0275resetView(ge.onCollectionChange(De))}),m.\u0275\u0275elementEnd(),m.\u0275\u0275elementContainerEnd()}if(2&ie){const X=m.\u0275\u0275nextContext(2);m.\u0275\u0275advance(1),m.\u0275\u0275property("currentCollectionId",X.collectionId)("currentDefinition",X.definitionId)("submissionId",X.submissionId)("collectionModifiable",X.collectionModifiable)("isReadonly",X.isSectionReadonly)}}function F(ie,se){if(1&ie&&(m.\u0275\u0275elementStart(0,"div",6),m.\u0275\u0275template(1,B,3,3,"div",7),m.\u0275\u0275pipe(2,"async"),m.\u0275\u0275elementStart(3,"div",8),m.\u0275\u0275template(4,$,2,5,"ng-container",9),m.\u0275\u0275elementEnd(),m.\u0275\u0275elementStart(5,"div",10),m.\u0275\u0275element(6,"ds-submission-form-section-add",11),m.\u0275\u0275elementEnd()()),2&ie){const X=m.\u0275\u0275nextContext();m.\u0275\u0275advance(1),m.\u0275\u0275property("ngIf",m.\u0275\u0275pipeBind1(2,4,X.uploadEnabled$)),m.\u0275\u0275advance(3),m.\u0275\u0275property("ngIf",!X.isSectionHidden),m.\u0275\u0275advance(2),m.\u0275\u0275property("collectionId",X.collectionId)("submissionId",X.submissionId)}}function P(ie,se){1&ie&&m.\u0275\u0275element(0,"ds-themed-loading",16)}function H(ie,se){if(1&ie&&(m.\u0275\u0275elementContainerStart(0),m.\u0275\u0275element(1,"ds-submission-section-container",17),m.\u0275\u0275elementContainerEnd()),2&ie){const X=se.$implicit,xe=m.\u0275\u0275nextContext();m.\u0275\u0275advance(1),m.\u0275\u0275property("collectionId",xe.collectionId)("submissionId",xe.submissionId)("sectionData",X)}}function oe(ie,se){if(1&ie&&(m.\u0275\u0275elementStart(0,"div",18),m.\u0275\u0275element(1,"ds-submission-form-footer",19),m.\u0275\u0275elementEnd()),2&ie){const X=m.\u0275\u0275nextContext();m.\u0275\u0275advance(1),m.\u0275\u0275property("submissionId",X.submissionId)}}let Q=(()=>{class ie{constructor(X,xe,De,ge,pe){this.authService=X,this.changeDetectorRef=xe,this.halService=De,this.submissionService=ge,this.sectionsService=pe,this.collectionModifiable=null,this.isLoading$=(0,p.of)(!0),this.uploadFilesOptions=new ae.n,this.subs=[],this.isActive=!0}ngOnChanges(X){X.collectionId&&this.collectionId&&X.submissionId&&this.submissionId&&(this.isActive=!0,this.submissionSections=this.submissionService.getSubmissionObject(this.submissionId).pipe((0,f.h)(()=>this.isActive),(0,o.U)(xe=>xe.isLoading),(0,o.U)(xe=>xe),(0,y.x)(),(0,O.w)(xe=>xe?(0,p.of)([]):this.getSectionsList())),this.uploadEnabled$=this.sectionsService.isSectionTypeAvailable(this.submissionId,C.i.Upload),this.isLoading$=this.submissionService.getSubmissionObject(this.submissionId).pipe((0,f.h)(()=>this.isActive),(0,o.U)(xe=>xe.isLoading),(0,y.x)(),(0,I.d)(1)),this.subs.push(this.halService.getEndpoint(this.submissionService.getSubmissionObjectLinkName()).pipe((0,f.h)(xe=>(0,G.UE)(xe)),(0,y.x)()).subscribe(xe=>{this.uploadFilesOptions.authToken=this.authService.buildAuthHeader(),this.uploadFilesOptions.url=xe.concat(`/${this.submissionId}`),this.definitionId=this.submissionDefinition.name,this.submissionService.dispatchInit(this.collectionId,this.submissionId,this.selfUrl,this.submissionDefinition,this.sections,this.item,this.submissionErrors),this.changeDetectorRef.detectChanges()})),this.submissionService.startAutoSave(this.submissionId))}getCollectionVisibility(){const X=this.submissionDefinition.sections.page.find(xe=>q()(xe.sectionType,C.i.Collection));return(0,G.pT)(X.visibility)?X.visibility:null}get isSectionHidden(){const X=this.getCollectionVisibility();return(0,G.Uh)(X)&&q()(X.main,z.x.HIDDEN)&&q()(X.other,z.x.HIDDEN)}get isSectionReadonly(){const X=this.getCollectionVisibility();return(0,G.Uh)(X)&&q()(X.main,z.x.READONLY)&&q()(X.other,z.x.READONLY)}ngOnDestroy(){this.isActive=!1,this.submissionService.stopAutoSave(),this.submissionService.resetAllSubmissionObjects(),this.subs.filter(X=>(0,G.Uh)(X)).forEach(X=>X.unsubscribe())}onCollectionChange(X){this.definitionId!==X.submissionDefinition.name?(this.sections=X.sections,this.submissionDefinition=X.submissionDefinition,this.definitionId=this.submissionDefinition.name,this.submissionService.resetSubmissionObject(X.collection.id,this.submissionId,X._links.self.href,this.submissionDefinition,this.sections,this.item)):this.changeDetectorRef.detectChanges()}getSectionsList(){return this.submissionService.getSubmissionSections(this.submissionId).pipe((0,f.h)(X=>(0,G.UE)(X)),(0,o.U)(X=>X.filter(xe=>
1!q()(xe.sectionType,C.i.Collection))))}}return ie.\u0275fac=function(X){return new(X||ie)(m.\u0275\u0275directiveInject(d.e8),m.\u0275\u0275directiveInject(m.ChangeDetectorRef),m.\u0275\u0275directiveInject(k.q),m.\u0275\u0275directiveInject(j.b),m.\u0275\u0275directiveInject(D.J))},ie.\u0275cmp=m.\u0275\u0275defineComponent({type:ie,selectors:[["ds-submission-form"]],inputs:{collectionId:"collectionId",item:"item",collectionModifiable:"collectionModifiable",sections:"sections",submissionErrors:"submissionErrors",selfUrl:"selfUrl",submissionDefinition:"submissionDefinition",submissionId:"submissionId"},features:[m.\u0275\u0275NgOnChangesFeature],decls:10,vars:12,consts:[[1,"container-fluid"],["class","submission-form-header mb-3 d-flex flex-wrap position-sticky",4,"ngIf"],[1,"submission-form-content"],["message","Loading...",4,"ngIf"],[4,"ngFor","ngForOf"],["class","submission-form-footer mt-3 mb-3 position-sticky",4,"ngIf"],[1,"submission-form-header","mb-3","d-flex","flex-wrap","position-sticky"],["class","w-100",4,"ngIf"],[1,"submission-form-header-item","mb-3","mb-sm-0","flex-sm-grow-1","flex-md-grow-0"],[4,"ngIf"],[1,"submission-form-header-item","text-right"],[3,"collectionId","submissionId"],[1,"w-100"],[3,"submissionId","collectionId","uploadFilesOptions"],[1,"clearfix"],[3,"currentCollectionId","currentDefinition","submissionId","collectionModifiable","isReadonly","collectionChange"],["message","Loading..."],[3,"collectionId","submissionId","sectionData"],[1,"submission-form-footer","mt-3","mb-3","position-sticky"],[3,"submissionId"]],template:function(X,xe){1&X&&(m.\u0275\u0275elementStart(0,"div",0),m.\u0275\u0275template(1,F,7,6,"div",1),m.\u0275\u0275pipe(2,"async"),m.\u0275\u0275elementStart(3,"div",2),m.\u0275\u0275template(4,P,1,0,"ds-themed-loading",3),m.\u0275\u0275pipe(5,"async"),m.\u0275\u0275template(6,H,2,3,"ng-container",4),m.\u0275\u0275pipe(7,"async"),m.\u0275\u0275elementEnd(),m.\u0275\u0275template(8,oe,2,1,"div",5),m.\u0275\u0275pipe(9,"async"),m.\u0275\u0275elementEnd()),2&X&&(m.\u0275\u0275advance(1),m.\u0275\u0275property("ngIf",!0!==m.\u0275\u0275pipeBind1(2,4,xe.isLoading$)),m.\u0275\u0275advance(3),m.\u0275\u0275property("ngIf",!0===m.\u0275\u0275pipeBind1(5,6,xe.isLoading$)),m.\u0275\u0275advance(2),m.\u0275\u0275property("ngForOf",m.\u0275\u0275pipeBind1(7,8,xe.submissionSections)),m.\u0275\u0275advance(2),m.\u0275\u0275property("ngIf",!0!==m.\u0275\u0275pipeBind1(9,10,xe.isLoading$)))},dependencies:[T.sg,T.O5,S.Z,M.i,K.z,te.z,J.K,ne.y,T.Ov],styles:[".submission-form-header[_ngcontent-%COMP%]{background-color:#fffffff7;padding:calc(var(--bs-spacer) / 2) 0 calc(var(--bs-spacer) / 2) 0;top:0;z-index:var(--ds-submission-header-z-index)}.submission-form-header-item[_ngcontent-%COMP%]{flex-grow:1}.submission-form-footer[_ngcontent-%COMP%]{border-radius:var(--bs-card-border-radius);bottom:0;background-color:var(--bs-gray-400);padding:calc(var(--bs-spacer) / 2);z-index:var(--ds-submission-footer-z-index)}.btn-link-focus[_ngcontent-%COMP%]{font-weight:400;color:#066;text-decoration:none}.btn-link-focus[_ngcontent-%COMP%]:hover{color:#001a1a;text-decoration:underline}.btn-link-focus[_ngcontent-%COMP%]:disabled, .btn-link-focus.disabled[_ngcontent-%COMP%]{color:#6c757d;pointer-events:none}.btn-link-focus[_ngcontent-%COMP%]:focus, .btn-link-focus.focus[_ngcontent-%COMP%]{text-decoration:underline}"]}),ie})()},49868:(Se,Y,s)=>{"use strict";s.r(Y),s.d(Y,{SubmissionUploadFilesComponent:()=>le});var p=s(9237),I=s(76215),f=s(77176),o=s(73797),y=s(45608),O=s(73716),d=s(1579),R=s(65384),k=s(97176),G=s(11915),ae=s(96289),j=s(98678),N=s(96342),C=s(35103),D=s(17026);function z(q,m){if(1&q){const T=j.\u0275\u0275getCurrentView();j.\u0275\u0275elementStart(0,"ds-uploader",1),j.\u0275\u0275listener("onCompleteItem",function(M){j.\u0275\u0275restoreView(T);const K=j.\u0275\u0275nextContext();return j.\u0275\u0275resetView(K.onCompleteItem(M))})("onUploadError",function(){j.\u0275\u0275restoreView(T);const M=j.\u0275\u0275nextContext();return j.\u0275\u0275resetView(M.onUploadError())}),j.\u0275\u0275elementEnd()}if(2&q){const T=j.\u0275\u0275nextContext();j.\u0275\u0275property("dropMsg",T.dropMsg)("dropOverDocumentMsg",T.dropOverDocumentMsg)("enableDragOverDocument",T.enableDragOverDocument)("onBeforeUpload",T.onBeforeUpload)("uploadFilesOptions",T.uploadFilesOptions)}}let le=(()=>{class q{constructor(T,S,M,K,te){this.notificationsService=T,this.operationsService=S,this.sectionService=M,this.submissionService=K,this.translate=te,this.enableDragOverDocument=!0,this.dropOverDocumentMsg="submission.sections.upload.drop-message",this.dropMsg="submission.sections.upload.drop-message",this.subs=[],this.uploadEnabled=(0,p.of)(!1),this.onBeforeUpload=()=>{const J=this.operationsService.jsonPatchByResourceType(this.submissionService.getSubmissionObjectLinkName(),this.submissionId,"sections").subscribe();return this.subs.push(J),J}}ngOnChanges(){this.uploadEnabled=this.sectionService.isSectionTypeAvailable(this.submissionId,ae.i.Upload)}onCompleteItem(T){this.subs.push(this.uploadEnabled.pipe((0,I.P)()).subscribe(S=>{if(S){const{sections:M}=T,{errors:K}=T,te=(0,k.Z)(K);
1M&&(0,y.UE)(M)&&Object.keys(M).forEach(J=>{const ne=(0,O.Vv)(M[J]),B=te[J];this.sectionService.isSectionType(this.submissionId,J,ae.i.Upload).pipe((0,f.q)(1)).subscribe($=>{$&&((0,y.xb)(B)?this.notificationsService.success(null,this.translate.get("submission.sections.upload.upload-successful")):this.notificationsService.error(null,this.translate.get("submission.sections.upload.upload-failed")))}),this.sectionService.updateSectionData(this.submissionId,J,ne,B,B)})}}))}onUploadError(){this.notificationsService.error(null,this.translate.get("submission.sections.upload.upload-failed"))}ngOnDestroy(){this.subs.filter(T=>(0,y.Uh)(T)).forEach(T=>T.unsubscribe())}}return q.\u0275fac=function(T){return new(T||q)(j.\u0275\u0275directiveInject(R.T),j.\u0275\u0275directiveInject(G.E),j.\u0275\u0275directiveInject(o.J),j.\u0275\u0275directiveInject(d.b),j.\u0275\u0275directiveInject(N.sK))},q.\u0275cmp=j.\u0275\u0275defineComponent({type:q,selectors:[["ds-submission-upload-files"]],inputs:{collectionId:"collectionId",submissionId:"submissionId",uploadFilesOptions:"uploadFilesOptions"},features:[j.\u0275\u0275NgOnChangesFeature],decls:1,vars:1,consts:[[3,"dropMsg","dropOverDocumentMsg","enableDragOverDocument","onBeforeUpload","uploadFilesOptions","onCompleteItem","onUploadError",4,"ngIf"],[3,"dropMsg","dropOverDocumentMsg","enableDragOverDocument","onBeforeUpload","uploadFilesOptions","onCompleteItem","onUploadError"]],template:function(T,S){1&T&&j.\u0275\u0275template(0,z,1,5,"ds-uploader",0),2&T&&j.\u0275\u0275property("ngIf",S.uploadFilesOptions.url)},dependencies:[C.O5,D.B],encapsulation:2}),q})()},71633:(Se,Y,s)=>{"use strict";s.d(Y,{K:()=>y});var p=s(4682),I=s(98678);function f(O,d){}const o=["*"];let y=(()=>{class O extends p.F{constructor(){super(...arguments),this.inAndOutputNames=["collectionId","submissionId","uploadFilesOptions"]}getComponentName(){return"SubmissionUploadFilesComponent"}importThemedComponent(R){return s(94470)(`./${R}/app/submission/form/submission-upload-files/submission-upload-files.component.ts`)}importUnthemedComponent(){return Promise.resolve().then(s.bind(s,49868))}}return O.\u0275fac=function(){let d;return function(k){return(d||(d=I.\u0275\u0275getInheritedFactory(O)))(k||O)}}(),O.\u0275cmp=I.\u0275\u0275defineComponent({type:O,selectors:[["ds-themed-submission-upload-files"]],inputs:{collectionId:"collectionId",submissionId:"submissionId",uploadFilesOptions:"uploadFilesOptions"},features:[I.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:o,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(R,k){1&R&&(I.\u0275\u0275projectionDef(),I.\u0275\u0275template(0,f,0,0,"ng-template",null,0,I.\u0275\u0275templateRefExtractor),I.\u0275\u0275elementStart(2,"div",null,1),I.\u0275\u0275projection(4),I.\u0275\u0275elementEnd())},encapsulation:2}),O})()},96528:(Se,Y,s)=>{"use strict";s.d(Y,{g:()=>d});var p=s(4682),o=(s(13005),s(96187),s(98678));function y(R,k){}const O=["*"];let d=(()=>{class R extends p.F{constructor(){super(...arguments),this.inAndOutputNames=["collectionId","item","collectionModifiable","sections","submissionErrors","selfUrl","submissionDefinition","submissionId"]}getComponentName(){return"SubmissionFormComponent"}importThemedComponent(G){return s(19978)(`./${G}/app/submission/form/submission-form.component`)}importUnthemedComponent(){return Promise.resolve().then(s.bind(s,86183))}}return R.\u0275fac=function(){let k;return function(ae){return(k||(k=o.\u0275\u0275getInheritedFactory(R)))(ae||R)}}(),R.\u0275cmp=o.\u0275\u0275defineComponent({type:R,selectors:[["ds-themed-submission-form"]],inputs:{collectionId:"collectionId",item:"item",collectionModifiable:"collectionModifiable",sections:"sections",submissionErrors:"submissionErrors",selfUrl:"selfUrl",submissionDefinition:"submissionDefinition",submissionId:"submissionId"},features:[o.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:O,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(G,ae){1&G&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275template(0,y,0,0,"ng-template",null,0,o.\u0275\u0275templateRefExtractor),o.\u0275\u0275elementStart(2,"div",null,1),o.\u0275\u0275projection(4),o.\u0275\u0275elementEnd())},encapsulation:2}),R})()},76890:(Se,Y,s)=>{"use strict";s.d(Y,{v:()=>N}),s(45123);var I=s(71432),f=s(69637),o=s(1579),y=s(65384),O=s(9925),d=s(98678),R=s(65706),k=s(67522),G=s(35103),ae=s(96342);function j(C,D){if(1&C&&(d.\u0275\u0275elementStart(0,"div",5)(1,"div",6)(2,"strong"),d.\u0275\u0275text(3),d.\u0275\u0275pipe(4,"translate"),d.\u0275\u0275elementEnd(),d.\u0275\u0275elementStart(5,"p"),d.\u0275\u0275text(6),d.\u0275\u0275elementEnd()()()),2&C){const z=D.$implicit;d.\u0275\u0275advance(3),d.\u0275\u0275textInterpolate(d.\u0275\u0275pipeBind1(4,2,"item.preview."+z.key)),d.\u
10275\u0275advance(3),d.\u0275\u0275textInterpolate(z.value.value)}}let N=(()=>{class C{constructor(z,le,q,m,T){this.activeModal=z,this.submissionService=le,this.modalService=q,this.router=m,this.notificationService=T}ngOnInit(){this.metadataList=[],Object.keys(this.externalSourceEntry.metadata).forEach(le=>{this.metadataList.push({key:le,value:I.S.first(this.externalSourceEntry.metadata,le)})})}closeMetadataModal(){this.activeModal.dismiss(!1)}import(){this.modalRef=this.modalService.open(O.L,{size:"lg"}),this.modalRef.componentInstance.entityType=this.labelPrefix,this.closeMetadataModal(),this.modalRef.componentInstance.selectedEvent.pipe((0,f.z)(z=>this.submissionService.createSubmissionFromExternalSource(this.externalSourceEntry._links.self.href,z.collection.id))).subscribe(z=>{let le=!1;1===z.length&&null!==z[0]&&(le=!0,this.router.navigateByUrl("/workspaceitems/"+z[0].id+"/edit")),le||this.notificationService.error("submission.import-external.preview.error.import.title","submission.import-external.preview.error.import.body"),this.modalRef.close()})}}return C.\u0275fac=function(z){return new(z||C)(d.\u0275\u0275directiveInject(R.Kz),d.\u0275\u0275directiveInject(o.b),d.\u0275\u0275directiveInject(R.FF),d.\u0275\u0275directiveInject(k.F0),d.\u0275\u0275directiveInject(y.T))},C.\u0275cmp=d.\u0275\u0275defineComponent({type:C,selectors:[["ds-submission-import-external-preview"]],inputs:{externalSourceEntry:"externalSourceEntry"},decls:27,vars:10,consts:[[1,"modal-header"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"container"],[1,"row"],[1,"col-md-12"],["class","row",4,"ngFor","ngForOf"],[1,"col-md-12","text-right"],["role","button",1,"btn","btn-success",3,"click"],["aria-hidden","true",1,"fa","fa-file-import"]],template:function(z,le){1&z&&(d.\u0275\u0275elementStart(0,"div",0)(1,"h2"),d.\u0275\u0275text(2),d.\u0275\u0275pipe(3,"translate"),d.\u0275\u0275elementEnd(),d.\u0275\u0275elementStart(4,"button",1),d.\u0275\u0275listener("click",function(){return le.closeMetadataModal()}),d.\u0275\u0275elementStart(5,"span",2),d.\u0275\u0275text(6,"\xd7"),d.\u0275\u0275elementEnd()()(),d.\u0275\u0275elementStart(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"p"),d.\u0275\u0275text(12),d.\u0275\u0275pipe(13,"translate"),d.\u0275\u0275elementEnd()()(),d.\u0275\u0275elementStart(14,"div",5)(15,"div",6),d.\u0275\u0275element(16,"hr"),d.\u0275\u0275elementEnd()(),d.\u0275\u0275template(17,j,7,4,"div",7),d.\u0275\u0275elementStart(18,"div",5)(19,"div",6),d.\u0275\u0275element(20,"hr"),d.\u0275\u0275elementEnd()(),d.\u0275\u0275elementStart(21,"div",5)(22,"div",8)(23,"button",9),d.\u0275\u0275listener("click",function(){return le.import()}),d.\u0275\u0275element(24,"i",10),d.\u0275\u0275text(25),d.\u0275\u0275pipe(26,"translate"),d.\u0275\u0275elementEnd()()()()()),2&z&&(d.\u0275\u0275advance(2),d.\u0275\u0275textInterpolate(d.\u0275\u0275pipeBind1(3,4,"submission.import-external.preview.title."+le.labelPrefix)),d.\u0275\u0275advance(10),d.\u0275\u0275textInterpolate(d.\u0275\u0275pipeBind1(13,6,"submission.import-external.preview.subtitle")),d.\u0275\u0275advance(5),d.\u0275\u0275property("ngForOf",le.metadataList),d.\u0275\u0275advance(8),d.\u0275\u0275textInterpolate1(" ",d.\u0275\u0275pipeBind1(26,8,"submission.import-external.preview.button.import")," "))},dependencies:[G.sg,ae.X$],styles:[".close[_ngcontent-%COMP%]:focus{outline:none!important}"]}),C})()},8019:(Se,Y,s)=>{"use strict";s.d(Y,{p:()=>te});var p=s(98678),I=s(9237),f=s(9249),o=s(27303),y=s(5803),O=s(74304),d=s(20942),R=s(87483),k=s(41121),G=s(10572),ae=s(79849),j=s(45608),N=s(6144),C=s(35103),D=s(5476),z=s(60235),le=s(65706),q=s(96342);function m(J,ne){if(1&J){const B=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"div",10)(1,"input",11),p.\u0275\u0275listener("keyup.enter",function(){p.\u0275\u0275restoreView(B);const F=p.\u0275\u0275nextContext();
1return p.\u0275\u0275resetView(""===F.searchString?null:F.search())})("ngModelChange",function(F){p.\u0275\u0275restoreView(B);const P=p.\u0275\u0275nextContext();return p.\u0275\u0275resetView(P.searchString=F)}),p.\u0275\u0275pipe(2,"translate"),p.\u0275\u0275elementEnd()()}if(2&J){const B=p.\u0275\u0275nextContext();p.\u0275\u0275advance(1),p.\u0275\u0275propertyInterpolate("placeholder",p.\u0275\u0275pipeBind1(2,2,"submission.import-external.search.placeholder")),p.\u0275\u0275property("ngModel",B.searchString)}}function T(J,ne){if(1&J){const B=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"input",11),p.\u0275\u0275listener("keyup.enter",function(){p.\u0275\u0275restoreView(B);const F=p.\u0275\u0275nextContext();return p.\u0275\u0275resetView(""===F.searchString?null:F.search())})("ngModelChange",function(F){p.\u0275\u0275restoreView(B);const P=p.\u0275\u0275nextContext();return p.\u0275\u0275resetView(P.searchString=F)}),p.\u0275\u0275pipe(1,"translate"),p.\u0275\u0275elementEnd()}if(2&J){const B=p.\u0275\u0275nextContext();p.\u0275\u0275propertyInterpolate("placeholder",p.\u0275\u0275pipeBind1(1,2,"submission.import-external.search.placeholder")),p.\u0275\u0275property("ngModel",B.searchString)}}function S(J,ne){if(1&J){const B=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"button",12),p.\u0275\u0275listener("click",function(){const P=p.\u0275\u0275restoreView(B).$implicit,H=p.\u0275\u0275nextContext();
1return p.\u0275\u0275resetView(H.makeSourceSelection(P))}),p.\u0275\u0275pipe(1,"translate"),p.\u0275\u0275text(2),p.\u0275\u0275pipe(3,"translate"),p.\u0275\u0275elementEnd()}if(2&J){const B=ne.$implicit;p.\u0275\u0275propertyInterpolate("title",p.\u0275\u0275pipeBind1(1,2,"submission.import-external.source."+(null==B?null:B.name))),p.\u0275\u0275advance(2),p.\u0275\u0275textInterpolate(p.\u0275\u0275pipeBind1(3,4,"submission.import-external.source."+(null==B?null:B.name)))}}function M(J,ne){1&J&&(p.\u0275\u0275elementStart(0,"div",13)(1,"p"),p.\u0275\u0275text(2),p.\u0275\u0275pipe(3,"translate"),p.\u0275\u0275elementEnd()()),2&J&&(p.\u0275\u0275advance(2),p.\u0275\u0275textInterpolate(p.\u0275\u0275pipeBind1(3,1,"submission.import-external.source.loading")))}const K=function(J){return{"input-group-append":J}};let te=(()=>{class J{constructor(B,$,F){this.externalService=B,this.cdr=$,this.windowService=F,this.sourceListLoading=!1,this.externalSourceData=new p.EventEmitter}ngOnInit(){this.selectedElement={id:"",name:"loading"},this.searchString="",this.sourceList=[],this.findListOptions=Object.assign({},new N.R,{elementsPerPage:5,currentPage:1,searchParams:[new y.g("entityType",this.initExternalSourceData.entity)]}),this.externalService.searchBy("findByEntityType",this.findListOptions).pipe((0,f.K)(()=>{const B=new R.S,$=(0,d.b)(B,[]),F=(0,k.AC)($);return(0,I.of)(F)}),(0,G.Gp)()).subscribe(B=>{B.page.forEach($=>{this.sourceList.push({id:$.id,name:$.name}),this.initExternalSourceData.sourceId===$.id&&(this.selectedElement={id:$.id,name:$.name},this.searchString=this.initExternalSourceData.query)}),""===this.selectedElement.id&&(this.selectedElement=this.sourceList[0]),this.pageInfo=B.pageInfo,this.cdr.detectChanges()}),this.isXsOrSm$=this.windowService.isXsOrSm()}makeSourceSelection(B){this.selectedElement=B}onScroll(){!this.sourceListLoading&&this.pageInfo.currentPage+1<=this.pageInfo.totalPages&&(this.sourceListLoading=!0,this.findListOptions=Object.assign({},new N.R,{elementsPerPage:5,currentPage:this.findListOptions.currentPage+1,searchParams:[new y.g("entityType",this.initExternalSourceData.entity)]}),this.externalService.searchBy("findByEntityType",this.findListOptions).pipe((0,f.K)(()=>{const B=new R.S,$=(0,d.b)(B,[]),F=(0,k.AC)($);return(0,I.of)(F)}),(0,G.xw)(),(0,o.b)(()=>this.sourceListLoading=!1)).subscribe(B=>{B.payload.page.forEach($=>{this.sourceList.push({id:$.id,name:$.name})}),this.pageInfo=B.payload.pageInfo,this.cdr.detectChanges()}))}search(){this.externalSourceData.emit({entity:this.initExternalSourceData.entity,sourceId:this.selectedElement.id,query:this.searchString})}ngOnDestroy(){(0,j.Uh)(this.sub)&&this.sub.unsubscribe()}}return J.\u0275fac=function(B){return new(B||J)(p.\u0275\u0275directiveInject(O.G),p.\u0275\u0275directiveInject(p.ChangeDetectorRef),p.\u0275\u0275directiveInject(ae.I))},J.\u0275cmp=p.\u0275\u0275defineComponent({type:J,selectors:[["ds-submission-import-external-searchbar"]],inputs:{initExternalSourceData:"initExternalSourceData"},outputs:{externalSourceData:"externalSourceData"},decls:20,vars:31,consts:[["class","input-group mb-2",4,"ngIf"],[1,"input-group","mb-5"],["type","text","class","form-control","aria-label","","aria-describedby","",3,"ngModel","placeholder","keyup.enter","ngModelChange",4,"ngIf"],["ngbDropdown","","role","group","aria-label","",3,"ngClass"],["ngbDropdownToggle","",1,"btn","btn-outline-secondary","w-fx",3,"title"],["ngbDropdownMenu","","aria-haspopup","true","aria-expanded","false","aria-labelledby","scrollableDropdownMenuButton",1,"dropdown-menu","scrollable-dropdown-menu","w-100"],["aria-labelledby","scrollableDropdownMenuButton","infiniteScroll","",1,"scrollable-menu",3,"infiniteScrollDistance","infiniteScrollThrottle","scrollWindow","scrolled"],["ngbDropdownItem","","class","dropdown-item text-truncate",3,"title","click",4,"ngFor","ngForOf"],["ngbDropdownItem","","class","scrollable-dropdown-loading text-center",4,"ngIf"],["type","button",1,"btn","btn-primary",3,"title","disabled","click"],[1,"input-group","mb-2"],["type","text","aria-label","","aria-describedby","",1,"form-control",3,"ngModel","placeholder","keyup.enter","ngModelChange"],["ngbDropdownItem","",1,"dropdown-item","text-truncate",3,"title","click"],["ngbDropdownItem","",1,"scrollable-dropdown-loading","text-center"]],template:function(B,$){1&B&&(p.\u0275\u0275template(0,m,3,4,"div",0),p.\u0275\u0275pipe(1,"async"),p.\u0275\u0275elementStart(2,"div",1),p.\u0275\u0275template(3,T,2,4,"
1input",2),p.\u0275\u0275pipe(4,"async"),p.\u0275\u0275elementStart(5,"div",3),p.\u0275\u0275pipe(6,"async"),p.\u0275\u0275elementStart(7,"button",4),p.\u0275\u0275pipe(8,"translate"),p.\u0275\u0275text(9),p.\u0275\u0275pipe(10,"translate"),p.\u0275\u0275elementEnd(),p.\u0275\u0275elementStart(11,"div",5)(12,"div",6),p.\u0275\u0275listener("scrolled",function(){return $.onScroll()}),p.\u0275\u0275template(13,S,4,6,"button",7),p.\u0275\u0275template(14,M,4,3,"div",8),p.\u0275\u0275elementEnd()(),p.\u0275\u0275elementStart(15,"button",9),p.\u0275\u0275listener("click",function(){return $.search()}),p.\u0275\u0275pipe(16,"translate"),p.\u0275\u0275pipe(17,"translate"),p.\u0275\u0275text(18),p.\u0275\u0275pipe(19,"translate"),p.\u0275\u0275elementEnd()()()),2&B&&(p.\u0275\u0275property("ngIf",p.\u0275\u0275pipeBind1(1,13,$.isXsOrSm$)),p.\u0275\u0275advance(3),p.\u0275\u0275property("ngIf",!p.\u0275\u0275pipeBind1(4,15,$.isXsOrSm$)),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngClass",p.\u0275\u0275pureFunction1(29,K,!p.\u0275\u0275pipeBind1(6,17,$.isXsOrSm$))),p.\u0275\u0275advance(2),p.\u0275\u0275propertyInterpolate("title",p.\u0275\u0275pipeBind1(8,19,"submission.import-external.search.source.hint")),p.\u0275\u0275advance(2),p.\u0275\u0275textInterpolate(p.\u0275\u0275pipeBind1(10,21,"submission.import-external.source."+(null==$.selectedElement?null:$.selectedElement.name))),p.\u0275\u0275advance(3),p.\u0275\u0275property("infiniteScrollDistance",2)("infiniteScrollThrottle",50)("scrollWindow",!1),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngForOf",$.sourceList),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf",$.sourceListLoading),p.\u0275\u0275advance(1),p.\u0275\u0275property("title",""===$.searchString?p.\u0275\u0275pipeBind1(16,23,"submission.import-external.search.button.hint"):p.\u0275\u0275pipeBind1(17,25,"submission.import-external.search.button"))("disabled",""===$.searchString),p.\u0275\u0275advance(3),p.\u0275\u0275textInterpolate(p.\u0275\u0275pipeBind1(19,27,"submission.import-external.search.button")))},dependencies:[C.mk,C.sg,C.O5,D.Fj,D.JJ,D.On,z.Ry,le.jt,le.iD,le.Vi,le.TH,C.Ov,q.X$],styles:[".input-group-append[_ngcontent-%COMP%]:last-child > .btn[_ngcontent-%COMP%]:not(:last-child):not(.dropdown-toggle){margin-left:-1px;border-radius:0 .25rem .25rem 0}.input-group-append[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]{border-radius:0}
1.w-fx[_ngcontent-%COMP%]{min-width:200px}.scrollable-menu[_ngcontent-%COMP%]{height:auto;max-height:calc(var(--ds-dropdown-menu-max-height) / 2);overflow-x:hidden}.scrollable-dropdown-loading[_ngcontent-%COMP%]{height:calc(var(--bs-spacer) * 2)!important}.scrollable-dropdown-loading[_ngcontent-%COMP%]{background-color:var(--bs-primary);color:#fff;line-height:calc(var(--bs-spacer) * 2);position:sticky;bottom:0}"]}),J})()},10251:(Se,Y,s)=>{"use strict";s.r(Y),s.d(Y,{SubmissionImportExternalComponent:()=>Me});var p=s(35841),I=s(53426),f=s(77176),o=s(77007),y=s(21160),O=s(27303),d=s(69637),R=s(74304),k=s(20942),G=s(33530),ae=s(97462),j=s(45180),N=s(74997),C=s(41121),D=s(76890),z=s(58106),le=s(87483),q=s(45608),m=s(10572),T=s(44205),S=s(98678),M=s(67522),K=s(65706),te=s(35103),J=s(87586),ne=s(87657),B=s(12955),$=s(41966),F=s(8019),P=s(96342);function H(Pe,Ze){1&Pe&&(S.\u0275\u0275elementStart(0,"h3"),S.\u0275\u0275text(1),S.\u0275\u0275pipe(2,"translate"),S.\u0275\u0275elementEnd()),2&Pe&&(S.\u0275\u0275advance(1),S.\u0275\u0275textInterpolate(S.\u0275\u0275pipeBind1(2,1,"submission.sections.describe.relationship-lookup.selection-tab.title")))}const oe=function(Pe,Ze){return{repeatable:Pe,listId:Ze}};function Q(Pe,Ze){if(1&Pe){const Ee=S.\u0275\u0275getCurrentView();S.\u0275\u0275elementStart(0,"ds-viewable-collection",15),S.\u0275\u0275listener("importObject",function(ht){S.\u0275\u0275restoreView(Ee);const Rt=S.\u0275\u0275nextContext(4);return S.\u0275\u0275resetView(Rt.import(ht))}),S.\u0275\u0275elementEnd()}if(2&Pe){const Ee=S.\u0275\u0275nextContext().ngVar,Ne=S.\u0275\u0275nextContext(3);S.\u0275\u0275property("@fadeIn",void 0)("objects",Ee)("selectionConfig",S.\u0275\u0275pureFunction2(8,oe,Ne.repeatable,Ne.listId))("config",Ne.initialPagination)("hideGear",!0)("context",Ne.context)("importable",!0)("importConfig",Ne.importConfig)}}function ie(Pe,Ze){1&Pe&&(S.\u0275\u0275element(0,"ds-themed-loading",16),S.\u0275\u0275pipe(1,"translate")),2&Pe&&S.\u0275\u0275propertyInterpolate("message",S.\u0275\u0275pipeBind1(1,1,"loading.search-results"))}function se(Pe,Ze){1&Pe&&(S.\u0275\u0275elementStart(0,"div",17)(1,"ds-alert",18),S.\u0275\u0275text(2),S.\u0275\u0275pipe(3,"translate"),S.\u0275\u0275elementEnd()()),2&Pe&&(S.\u0275\u0275advance(1),S.\u0275\u0275property("type","alert-info"),S.\u0275\u0275advance(1),S.\u0275\u0275textInterpolate(S.\u0275\u0275pipeBind1(3,2,"search.results.empty")))}function X(Pe,Ze){1&Pe&&(S.\u0275\u0275elementStart(0,"div",19)(1,"ds-alert",18),S.\u0275\u0275text(2),S.\u0275\u0275pipe(3,"translate"),S.\u0275\u0275elementEnd()()),2&Pe&&(S.\u0275\u0275advance(1),S.\u0275\u0275property("type","alert-info"),S.\u0275\u0275advance(1),S.\u0275\u0275textInterpolate(S.\u0275\u0275pipeBind1(3,2,"search.results.response.500")))}function xe(Pe,Ze){if(1&Pe&&(S.\u0275\u0275elementContainerStart(0),S.\u0275\u0275template(1,H,3,3,"h3",10),S.\u0275\u0275template(2,Q,1,11,"ds-viewable-collection",11),S.\u0275\u0275pipe(3,"async"),S.\u0275\u0275template(4,ie,2,3,"ds-themed-loading",12),S.\u0275\u0275pipe(5,"async"),S.\u0275\u0275template(6,se,4,4,"div",13),S.\u0275\u0275pipe(7,"async"),S.\u0275\u0275template(8,X,4,4,"div",14),S.\u0275\u0275pipe(9,"async"),S.\u0275\u0275elementContainerEnd()),2&Pe){const Ee=Ze.ngVar,Ne=S.\u0275\u0275nextContext(3);S.\u0275\u0275advance(1),S.\u0275\u0275property("ngIf",Ee&&0!==(null==Ee||null==Ee.payload||null==Ee.payload.page?null:Ee.payload.page.length)),S.\u0275\u0275advance(1),S.\u0275\u0275property("ngIf",(null==Ee?null:Ee.hasSucceeded)&&!S.\u0275\u0275pipeBind1(3,5,Ne.isLoading$)&&(null==Ee||null==Ee.payload||null==Ee.payload.page?null:Ee.payload.page.length)>0),S.\u0275\u0275advance(2),S.\u0275\u0275property("ngIf",S.\u0275\u0275pipeBind1(5,7,Ne.isLoading$)),S.\u0275\u0275advance(2),S.\u0275\u0275property("ngIf",!S.\u0275\u0275pipeBind1(7,9,Ne.isLoading$)&&0===(null==Ee||null==Ee.payload||null==Ee.payload.page?null:Ee.payload.page.length)),S.\u0275\u0275advance(2),S.\u0275\u0275property("ngIf",!S.\u0275\u0275pipeBind1(9,11,Ne.isLoading$)&&500===Ee.statusCode)}}function De(Pe,Ze){if(1&Pe&&(S.\u0275\u0275elementStart(0,"div",2),S.\u0275\u0275template(1,xe,10,13,"ng-container",9),S.\u0275\u0275pipe(2,"async"),S.\u0275\u0275elementEnd()),2&Pe){const Ee=S.\u0275\u0275nextContext(2);S.\u0275\u0275advance(1),S.\u0275\u0275property("ngVar",S.\u0275\u0275pipeBind1(2,1,Ee.entriesRD$))}}function ge(Pe,Ze){1&Pe&&(S.\u0275\u0275elementStart(0,"div",2)(1,"ds-alert",18)(2,"p",20),S.\u0275\u0275text(3),S.\u0275\u0275pipe(4,"translate"),S.\u0275\u0275elementEnd()()()),2&Pe&&(S.\u0275\u0275advance(1),S.\u0275\u0275property("type","alert-info"),S.\u0275\u0275advance(2),S.\u0275\u0275textInterpolate(S.\u0275\u0275pipeBind1(4,2,"submission.import-external.page.hint")))}function pe(Pe,Ze){if(1&Pe&&(S.\u0275\u0275elementStart(0,"div",1),S.\u0275\u0275template(1,De,3,3,"div",8),S.\u0275\u0275template(2,ge,5,4,"div",8),S.\u0275\u0275elementEnd()),2&Pe){const Ee=S.\u0275\u0275nextContext();S.\u0275\u0275advance(1),S.\u0275\u0275property("ngIf",""!==Ee.reload$.value.sourceId),S.\u0275\u0275advance(1),S.\u0275\u0275property("ngIf",""===Ee.reload$.value.sourceId)}}const Ce=function(){return["/mydspace"]};let Me=(()=>{class Pe{constructor(Ee,Ne,ht,Rt,Et){this.searchConfigService=Ee,this.externalService=Ne,this.routeService=ht,this.router=Rt,this.modalService=Et,this.entriesRD$=new p.X(null),this.isLoading$=new p.X(!1),this.reload$=new p.X({entity:"",query:"",sourceId:""}),this.initialPagination=Object.assign(new j.r,{id:"spc",pageSize:10}),this.subs=[]}ngOnInit(){this.listId="list-submission-external-sources",this.context=ae._.EntitySearchModalWithNameVariants,this.repeatable=!1,this.routeData={entity:"",sourceId:"",query:""},this.importConfig={buttonLabel:"submission.sections.describe.relationship-lookup.external-source.import-button-title."+this.label},this.entriesRD$=new p.X((0,C.AC)((0,k.b)(new le.S,[]))),this.isLoading$=new p.X(!1),this.subs.push((0,I.a)([this.routeService.getQueryParameterValue("entity"),this.routeService.getQueryParameterValue("sourceId"),this.routeService.getQueryParameterValue("query")]).pipe((0,f.q)(1)).subscribe(([Ee,Ne,ht])=>{this.reload$.next({entity:Ee||T.N,query:ht,sourceId:Ne}
1),this.selectLabel(Ee),this.retrieveExternalSources()}))}getExternalSourceData(Ee){this.router.navigate([],{queryParams:Ee,replaceUrl:!0}).then(()=>{this.reload$.next(Ee),this.retrieveExternalSources()})}import(Ee){this.modalRef=this.modalService.open(D.v,{size:"lg"});const Ne=this.modalRef.componentInstance;Ne.externalSourceEntry=Ee,Ne.labelPrefix=this.label}ngOnDestroy(){this.subs.filter(Ee=>(0,q.Uh)(Ee)).forEach(Ee=>Ee.unsubscribe()),(0,q.Uh)(this.retrieveExternalSourcesSub)&&this.retrieveExternalSourcesSub.unsubscribe()}retrieveExternalSources(){(0,q.Uh)(this.retrieveExternalSourcesSub)&&this.retrieveExternalSourcesSub.unsubscribe(),this.retrieveExternalSourcesSub=this.reload$.pipe((0,o.h)(Ee=>(0,q.UE)(Ee.sourceId)&&(0,q.UE)(Ee.query)),(0,y.w)(Ee=>{const Ne=Ee.query;return this.routeData=Ee,this.searchConfigService.paginatedSearchOptions.pipe((0,O.b)(()=>this.isLoading$.next(!0)),(0,o.h)(ht=>ht.query===Ne),(0,d.z)(ht=>this.externalService.getExternalSourceEntries(this.routeData.sourceId,ht).pipe((0,m.sJ)())))})).subscribe(Ee=>{this.entriesRD$.next(Ee),this.isLoading$.next(!1)})}selectLabel(Ee){this.label=Ee,this.importConfig={buttonLabel:"submission.sections.describe.relationship-lookup.external-source.import-button-title."+this.label}}}return Pe.\u0275fac=function(Ee){return new(Ee||Pe)(S.\u0275\u0275directiveInject(G.U),S.\u0275\u0275directiveInject(R.G),S.\u0275\u0275directiveInject(N.MZ),S.\u0275\u0275directiveInject(M.F0),S.\u0275\u0275directiveInject(K.FF))},Pe.\u0275cmp=S.\u0275\u0275defineComponent({type:Pe,selectors:[["ds-submission-import-external"]],decls:15,vars:10,consts:[[1,"container"],[1,"row"],[1,"col-md-12"],["id","header",1,"pb-2"],[3,"initExternalSourceData","externalSourceData"],["class","row",4,"ngIf"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["aria-hidden","true",1,"fa","fa-chevron-left"],["class","col-md-12",4,"ngIf"],[4,"ngVar"],[4,"ngIf"],[3,"objects","selectionConfig","config","hideGear","context","importable","importConfig","importObject",4,"ngIf"],[3,"message",4,"ngIf"],["data-test","empty-external-entry-list",4,"ngIf"],["data-test","empty-external-error-500",4,"ngIf"],[3,"objects","selectionConfig","config","hideGear","context","importable","importConfig","importObject"],[3,"message"],["data-test","empty-external-entry-list"],[3,"type"],["data-test","empty-external-error-500"],[1,"lead","mb-0"]],template:function(Ee,Ne){1&Ee&&(S.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),S.\u0275\u0275text(4),S.\u0275\u0275pipe(5,"translate"),S.\u0275\u0275elementEnd(),S.\u0275\u0275elementStart(6,"ds-submission-import-external-searchbar",4),S.\u0275\u0275listener("externalSourceData",function(Rt){return Ne.getExternalSourceData(Rt)}),S.\u0275\u0275elementEnd()()(),S.\u0275\u0275template(7,pe,3,2,"div",5),S.\u0275\u0275elementStart(8,"div",1)(9,"div",2),S.\u0275\u0275element(10,"hr"),S.\u0275\u0275elementStart(11,"a",6),S.\u0275\u0275element(12,"i",7),S.\u0275\u0275text(13),S.\u0275\u0275pipe(14,"translate"),S.\u0275\u0275elementEnd()()()()),2&Ee&&(S.\u0275\u0275advance(4),S.\u0275\u0275textInterpolate(S.\u0275\u0275pipeBind1(5,5,"submission.import-external.title"+(Ne.label?"."+Ne.label:""))),S.\u0275\u0275advance(2),S.\u0275\u0275property("initExternalSourceData",Ne.reload$.value),S.\u0275\u0275advance(1),S.\u0275\u0275property("ngIf",Ne.reload$.value.entity),S.\u0275\u0275advance(4),S.\u0275\u0275property("routerLink",S.\u0275\u0275pureFunction0(9,Ce)),S.\u0275\u0275advance(2),S.\u0275\u0275textInterpolate1(" ",S.\u0275\u0275pipeBind1(14,7,"submission.import-external.back-to-my-dspace")," "))},dependencies:[te.O5,M.rH,J.w,ne.Z,B.c,$.g,F.p,te.Ov,P.X$],data:{animation:[z.Ji]}}),Pe})()},13873:(Se,Y,s)=>{"use strict";s.d(Y,{i:()=>y});var p=s(4682),I=s(98678);function f(O,d){}const o=["*"];let y=(()=>{class O extends p.F{getComponentName(){return"SubmissionImportExternalComponent"}importThemedComponent(R){return s(49252)(`./${R}/app/submission/import-external/submission-import-external.component`)}importUnthemedComponent(){return Promise.resolve().then(s.bind(s,10251))}}return O.\u0275fac=function(){let d;
1return function(k){return(d||(d=I.\u0275\u0275getInheritedFactory(O)))(k||O)}}(),O.\u0275cmp=I.\u0275\u0275defineComponent({type:O,selectors:[["ds-themed-submission-import-external"]],features:[I.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:o,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(R,k){1&R&&(I.\u0275\u0275projectionDef(),I.\u0275\u0275template(0,f,0,0,"ng-template",null,0,I.\u0275\u0275templateRefExtractor),I.\u0275\u0275elementStart(2,"div",null,1),I.\u0275\u0275projection(4),I.\u0275\u0275elementEnd())},encapsulation:2}),O})()},51437:(Se,Y,s)=>{"use strict";s.d(Y,{y:()=>ne});var p=s(98678),I=s(49175),f=s(76297),o=s(65244),y=s(35103),O=s(65706),d=s(87586),R=s(96342);const k=["sectionRef"];function G(B,$){1&B&&(p.\u0275\u0275element(0,"i",18),p.\u0275\u0275pipe(1,"translate"),p.\u0275\u0275pipe(2,"translate")),2&B&&(p.\u0275\u0275propertyInterpolate("title",p.\u0275\u0275pipeBind1(1,2,"submission.sections.status.warnings.title")),p.\u0275\u0275attribute("aria-label",p.\u0275\u0275pipeBind1(2,4,"submission.sections.status.warnings.aria")))}function ae(B,$){1&B&&(p.\u0275\u0275element(0,"i",19),p.\u0275\u0275pipe(1,"translate"),p.\u0275\u0275pipe(2,"translate")),2&B&&(p.\u0275\u0275propertyInterpolate("title",p.\u0275\u0275pipeBind1(1,2,"submission.sections.status.errors.title")),p.\u0275\u0275attribute("aria-label",p.\u0275\u0275pipeBind1(2,4,"submission.sections.status.errors.aria")))}function j(B,$){1&B&&(p.\u0275\u0275element(0,"i",20),p.\u0275\u0275pipe(1,"translate"),p.\u0275\u0275pipe(2,"translate")),2&B&&(p.\u0275\u0275propertyInterpolate("title",p.\u0275\u0275pipeBind1(1,2,"submission.sections.status.valid.title")),p.\u0275\u0275attribute("aria-label",p.\u0275\u0275pipeBind1(2,4,"submission.sections.status.valid.aria")))}function N(B,$){1&B&&(p.\u0275\u0275element(0,"i",21),p.\u0275\u0275pipe(1,"translate"),p.\u0275\u0275pipe(2,"translate")),2&B&&(p.\u0275\u0275propertyInterpolate("title",p.\u0275\u0275pipeBind1(1,2,"submission.sections.status.info.title")),p.\u0275\u0275attribute("aria-label",p.\u0275\u0275pipeBind1(2,4,"submission.sections.status.info.aria")))}const C=function(B){return{"text-white":B}};function D(B,$){if(1&B&&p.\u0275\u0275element(0,"span",22),2&B){p.\u0275\u0275nextContext(3);const F=p.\u0275\u0275reference(1);p.\u0275\u0275property("ngClass",p.\u0275\u0275pureFunction1(1,C,F.isInfo()))}}function z(B,$){1&B&&p.\u0275\u0275element(0,"span",23)}function le(B,$){if(1&B){const F=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"a",24),p.\u0275\u0275listener("click",function(H){p.\u0275\u0275restoreView(F);const oe=p.\u0275\u0275nextContext(3);
1return p.\u0275\u0275resetView(oe.removeSection(H))}),p.\u0275\u0275element(1,"i",25),p.\u0275\u0275elementEnd()}}const q=function(B){return{sectionHeader:B}};function m(B,$){if(1&B&&(p.\u0275\u0275elementStart(0,"span",8),p.\u0275\u0275text(1),p.\u0275\u0275pipe(2,"translate"),p.\u0275\u0275elementEnd(),p.\u0275\u0275elementStart(3,"div",9),p.\u0275\u0275template(4,G,3,6,"i",10),p.\u0275\u0275pipe(5,"async"),p.\u0275\u0275template(6,ae,3,6,"i",11),p.\u0275\u0275template(7,j,3,6,"i",12),p.\u0275\u0275pipe(8,"async"),p.\u0275\u0275template(9,N,3,6,"i",13),p.\u0275\u0275elementStart(10,"a",14),p.\u0275\u0275pipe(11,"translate"),p.\u0275\u0275pipe(12,"translate"),p.\u0275\u0275pipe(13,"translate"),p.\u0275\u0275template(14,D,1,3,"span",15),p.\u0275\u0275template(15,z,1,0,"span",16),p.\u0275\u0275elementEnd(),p.\u0275\u0275template(16,le,2,0,"a",17),p.\u0275\u0275elementEnd()),2&B){const F=p.\u0275\u0275nextContext(2),P=p.\u0275\u0275reference(1);p.\u0275\u0275property("ngClass",p.\u0275\u0275pureFunction1(24,C,P.isInfo())),p.\u0275\u0275advance(1),p.\u0275\u0275textInterpolate(p.\u0275\u0275pipeBind1(2,11,"submission.sections."+F.sectionData.header)),p.\u0275\u0275advance(3),p.\u0275\u0275property("ngIf",!p.\u0275\u0275pipeBind1(5,13,P.isValid())&&!P.hasErrors()&&!P.isInfo()),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngIf",P.hasErrors()&&!P.isInfo()),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf",p.\u0275\u0275pipeBind1(8,15,P.isValid())&&!P.hasErrors()&&!P.isInfo()),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngIf",P.isInfo()),p.\u0275\u0275advance(1),p.\u0275\u0275property("title",p.\u0275\u0275pipeBind1(13,22,P.isOpen()?"submission.sections.toggle.close":"submission.sections.toggle.open")),p.\u0275\u0275attribute("aria-label",p.\u0275\u0275pipeBind2(11,17,P.isOpen()?"submission.sections.toggle.aria.close":"submission.sections.toggle.aria.open",p.\u0275\u0275pureFunction1(26,q,p.\u0275\u0275pipeBind1(12,20,"submission.sections."+F.sectionData.header)))),p.\u0275\u0275advance(4),p.\u0275\u0275property("ngIf",P.isOpen()),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf",!P.isOpen()),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngIf",!P.isMandatory())}}function T(B,$){if(1&B){const F=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"ds-alert",31),p.\u0275\u0275listener("close",function(){const oe=p.\u0275\u0275restoreView(F).index;p.\u0275\u0275nextContext(4);const Q=p.\u0275\u0275reference(1);
1return p.\u0275\u0275resetView(Q.removeError(oe))}),p.\u0275\u0275elementEnd()}if(2&B){const F=$.$implicit,P=p.\u0275\u0275nextContext(4);p.\u0275\u0275property("content",F)("dismissible",!0)("type",P.AlertTypeEnum.Error)}}function S(B,$){if(1&B&&(p.\u0275\u0275elementStart(0,"div",29),p.\u0275\u0275template(1,T,1,3,"ds-alert",30),p.\u0275\u0275elementEnd()),2&B){const F=p.\u0275\u0275nextContext(3),P=p.\u0275\u0275reference(1);p.\u0275\u0275propertyInterpolate1("id","sectionGenericError_",F.sectionData.id,""),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngForOf",P.getErrors())}}function M(B,$){1&B&&p.\u0275\u0275elementContainer(0)}function K(B,$){if(1&B){const F=p.\u0275\u0275getCurrentView();p.\u0275\u0275template(0,S,2,2,"div",26),p.\u0275\u0275elementStart(1,"div",27),p.\u0275\u0275listener("click",function(H){p.\u0275\u0275restoreView(F),p.\u0275\u0275nextContext(2);const oe=p.\u0275\u0275reference(1);return p.\u0275\u0275resetView(oe.setFocus(H))}),p.\u0275\u0275template(2,M,1,0,"ng-container",28),p.\u0275\u0275elementEnd()}if(2&B){const F=p.\u0275\u0275nextContext(2),P=p.\u0275\u0275reference(1);p.\u0275\u0275property("ngIf",P.hasGenericErrors()),p.\u0275\u0275advance(1),p.\u0275\u0275propertyInterpolate1("id","sectionContent_",F.sectionData.id,""),p.\u0275\u0275advance(1),p.\u0275\u0275property("ngComponentOutlet",F.getSectionContent())("ngComponentOutletInjector",F.objectInjector)}}function te(B,$){if(1&B){const F=p.\u0275\u0275getCurrentView();p.\u0275\u0275elementStart(0,"ngb-accordion",3,4),p.\u0275\u0275listener("panelChange",function(H){p.\u0275\u0275restoreView(F),p.\u0275\u0275nextContext();const oe=p.\u0275\u0275reference(1);
1return p.\u0275\u0275resetView(oe.sectionChange(H))}),p.\u0275\u0275elementStart(2,"ngb-panel",5),p.\u0275\u0275template(3,m,17,28,"ng-template",6),p.\u0275\u0275template(4,K,3,4,"ng-template",7),p.\u0275\u0275elementEnd()()}if(2&B){const F=p.\u0275\u0275nextContext(),P=p.\u0275\u0275reference(1);p.\u0275\u0275propertyInterpolate("activeIds",F.sectionData.id),p.\u0275\u0275property("destroyOnHide",!1),p.\u0275\u0275advance(2),p.\u0275\u0275propertyInterpolate("id",F.sectionData.id),p.\u0275\u0275property("type",P.isInfo()?"info":"")}}const J=function(B){return{"section-focus":B}};let ne=(()=>{class B{constructor(F){this.injector=F,this.AlertTypeEnum=o.N}ngOnInit(){this.objectInjector=p.Injector.create({providers:[{provide:"collectionIdProvider",useFactory:()=>this.collectionId,deps:[]},{provide:"sectionDataProvider",useFactory:()=>this.sectionData,deps:[]},{provide:"submissionIdProvider",useFactory:()=>this.submissionId,deps:[]}],parent:this.injector})}removeSection(F){F.preventDefault(),F.stopPropagation(),this.sectionRef.removeSection(this.submissionId,this.sectionData.id)}getSectionContent(){return(0,f.A)(this.sectionData.sectionType)}}return B.\u0275fac=function(F){return new(F||B)(p.\u0275\u0275directiveInject(p.Injector))},B.\u0275cmp=p.\u0275\u0275defineComponent({type:B,selectors:[["ds-submission-section-container"]],viewQuery:function(F,P){if(1&F&&p.\u0275\u0275viewQuery(k,5),2&F){let H;p.\u0275\u0275queryRefresh(H=p.\u0275\u0275loadQuery())&&(P.sectionRef=H.first)}},inputs:{collectionId:"collectionId",sectionData:"sectionData",submissionId:"submissionId"},decls:4,vars:11,consts:[["dsSection","",3,"ngClass","mandatory","submissionId","sectionType","sectionId"],["sectionRef","sectionRef"],[3,"activeIds","destroyOnHide","panelChange",4,"ngIf"],[3,"activeIds","destroyOnHide","panelChange"],["acc","ngbAccordion"],[3,"id","type"],["ngbPanelTitle",""],["ngbPanelContent",""],["tabindex","0",1,"float-left","section-title",3,"ngClass"],[1,"d-inline-block","float-right"],["class","fas fa-exclamation-circle text-warning mr-3","role","img",3,"title",4,"ngIf"],["class","fas fa-exclamation-circle text-danger mr-3","role","img",3,"title",4,"ngIf"],["class","fas fa-check-circle text-success mr-3","role","img",3,"title",4,"ngIf"],["class","fas fa-info-circle mr-3 text-white","role","img",3,"title",4,"ngIf"],["tabindex","0","role","button",1,"close",3,"title"],["class","fas fa-chevron-up fa-fw",3,"ngClass",4,"ngIf"],["class","fas fa-chevron-down fa-fw",4,"ngIf"],["href","javascript:void(0);","class","close mr-3",3,"click",4,"ngIf"],["role","img",1,"fas","fa-exclamation-circle","text-warning","mr-3",3,"title"],["role","img",1,"fas","fa-exclamation-circle","text-danger","mr-3",3,"title"],["role","img",1,"fas","fa-check-circle","text-success","mr-3",3,"title"],["role","img",1,"fas","fa-info-circle","mr-3","text-white",3,"title"],[1,"fas","fa-chevron-up","fa-fw",3,"ngClass"],[1,"fas","fa-chevron-down","fa-fw"],["href","javascript:void(0);",1,"close","mr-3",3,"click"],["aria-hidden","true","tabindex","0",1,"fas","fa-trash-o"],[3,"id",4,"ngIf"],[3,"id","click"],[4,"ngComponentOutlet","ngComponentOutletInjector"],[3,"id"],[3,"content","dismissible","type","close",4,"ngFor","ngForOf"],[3,"content","dismissible","type","close"]],template:function(F,P){if(1&F&&(p.\u0275\u0275elementStart(0,"div",0,1),p.\u0275\u0275template(2,te,5,4,"ngb-accordion",2),p.\u0275\u0275pipe(3,"async"),p.\u0275\u0275elementEnd()),2&F){const H=p.\u0275\u0275reference(1);p.\u0275\u0275property("ngClass",p.\u0275\u0275pureFunction1(9,J,H.isSectionActive()))("mandatory",P.sectionData.mandatory)("submissionId",P.submissionId)("sectionType",P.sectionData.sectionType)("sectionId",P.sectionData.id),p.\u0275\u0275attribute("id","section_"+P.sectionData.id),p.\u0275\u0275advance(2),p.\u0275\u0275property("ngIf",p.\u0275\u0275pipeBind1(3,7,H.isEnabled()))}},dependencies:[y.mk,y.$G,y.sg,y.O5,O.gY,O.Gk,O.Cu,O.gW,d.w,I.y,y.Ov,R.X$],styles:["[_nghost-%COMP%] .card{margin-bottom:var(--ds-submission-sections-margin-bottom);overflow:unset}.section-focus[_ngcontent-%COMP%]{border-radius:var(--bs-border-radius);
1box-shadow:var(--bs-btn-focus-box-shadow)}[_nghost-%COMP%] .card:first-of-type{border-bottom:var(--bs-card-border-width) solid var(--bs-card-border-color)!important;border-bottom-left-radius:var(--bs-card-border-radius)!important;border-bottom-right-radius:var(--bs-card-border-radius)!important}[_nghost-%COMP%] .card-header button{box-shadow:none!important}[_nghost-%COMP%] .card-header button{width:100%}"]}),B})()},79900:(Se,Y,s)=>{"use strict";s.d(Y,{v:()=>y});var p=s(77007),I=s(9302),f=s(45608),o=s(98678);let y=(()=>{class O{constructor(R,k,G){this.injectedCollectionId=R,this.injectedSectionData=k,this.injectedSubmissionId=G,this.collectionId=R,this.sectionData=k,this.submissionId=G}ngOnInit(){this.onSectionInit(),this.updateSectionStatus()}updateSectionStatus(){this.sectionStatusSub=this.getSectionStatus().pipe((0,p.h)(R=>(0,f.pT)(R)),(0,I.O)(!0)).subscribe(R=>{this.sectionService.setSectionStatus(this.submissionId,this.sectionData.id,R)})}ngOnDestroy(){(0,f.Uh)(this.sectionStatusSub)&&this.sectionStatusSub.unsubscribe(),this.onSectionDestroy()}}return O.\u0275fac=function(R){return new(R||O)(o.\u0275\u0275directiveInject("collectionIdProvider"),o.\u0275\u0275directiveInject("sectionDataProvider"),o.\u0275\u0275directiveInject("submissionIdProvider"))},O.\u0275cmp=o.\u0275\u0275defineComponent({type:O,selectors:[["ds-section-model"]],decls:0,vars:0,template:function(R,k){},encapsulation:2}),O})()},76297:(Se,Y,s)=>{"use strict";s.d(Y,{A:()=>f,E:()=>I});const p=new Map;function I(o){return function(O){O&&p.set(o,O)}}function f(o){return p.get(o)}},49175:(Se,Y,s)=>{"use strict";s.d(Y,{y:()=>G});var p=s(48358),I=s(75004),f=s.n(I),o=s(73797),y=s(45608),O=s(14297),d=s(1579),k=(s(96289),s(98678));let G=(()=>{class ae{constructor(N,C,D){this.changeDetectorRef=N,this.submissionService=C,this.sectionService=D,this.mandatory=!0,this.genericSectionErrors=[],this.allSectionErrors=[],this.active=!0,this.sectionState=this.mandatory,this.subs=[]}ngOnInit(){this.valid=this.sectionService.isSectionValid(this.submissionId,this.sectionId).pipe((0,p.U)(N=>(N&&this.resetErrors(),N))),this.subs.push(this.sectionService.getShownSectionErrors(this.submissionId,this.sectionId,this.sectionType).subscribe(N=>{(0,y.UE)(N)?N.forEach(C=>{(0,O.Z)(C.path).forEach(z=>{z.fieldId?this.allSectionErrors.push(C.message):this.genericSectionErrors=f()(this.genericSectionErrors.concat(C.message))})}):this.resetErrors()}),this.submissionService.getActiveSectionId(this.submissionId).subscribe(N=>{const C=this.active;this.active=N===this.sectionId,C!==this.active&&(this.changeDetectorRef.detectChanges(),!this.active&&(0,y.K0)(N)&&this.submissionService.dispatchSave(this.submissionId))})),this.enabled=this.sectionService.isSectionEnabled(this.submissionId,this.sectionId)}ngOnDestroy(){this.subs.filter(N=>(0,y.Uh)(N)).forEach(N=>N.unsubscribe())}sectionChange(N){this.sectionState=N.nextState}isOpen(){return this.sectionState}isMandatory(){return this.mandatory}isSectionActive(){return this.active}isEnabled(){return this.enabled}isValid(){return this.valid}removeSection(N,C){this.sectionService.removeSection(N,C)}hasGenericErrors(){return this.genericSectionErrors&&this.genericSectionErrors.length>0}hasErrors(){return this.genericSectionErrors&&this.genericSectionErrors.length>0||this.allSectionErrors&&this.allSectionErrors.length>0}getErrors(){return this.genericSectionErrors}setFocus(N){this.active||this.submissionService.setActiveSection(this.submissionId,this.sectionId)}isInfo(){return this.sectionService.getIsInformational(this.sectionType)}removeError(N){this.genericSectionErrors.splice(N)}resetErrors(){(0,y.UE)(this.genericSectionErrors)&&this.sectionService.dispatchRemoveSectionErrors(this.submissionId,this.sectionId),this.genericSectionErrors=[],this.allSectionErrors=[]}}return ae.\u0275fac=function(N){return new(N||ae)(k.\u0275\u0275directiveInject(k.ChangeDetectorRef),k.\u0275\u0275directiveInject(d.b),k.\u0275\u0275directiveInject(o.J))},ae.\u0275dir=k.\u0275\u0275defineDirective({type:ae,selectors:[["","dsSection",""]],inputs:{mandatory:"mandatory",sectionId:"sectionId",sectionType:"sectionType",submissionId:"submissionId"},exportAs:["sectionRef"]}),ae})()},73797:(Se,Y,s)=>{"use strict";s.d(Y,{J:()=>P});var p=s(21160),I=s(53426),f=s(48358),o=s(49887),y=s(77007),O=s(77176),d=s(54385),R=s.n(d),k=s(34045),G=s.n(k),ae=s(94667),j=s.n(ae),N=s(45608),C=s(32924),D=s(86769),z=s(94056),le=s(14297),q=s(64405),m=s(65384),T=s(1579),S=s(96289),M=s(73716),K=s(5737),te=s(4786),J=s(60030),ne=s(98678),B=s(18603),$=s(89702),F=s(96342);let P=(()=>{class H{constructor(Q,ie,se,X,xe,De){this.formService=Q,this.notificationsService=ie,this.scrollToService=se,this.submissionService=X,this.store=xe,this.translate=De}checkSectionErrors(Q,ie,se,X,xe=[]){if((0,N.xb)(X))this.store.dispatch(new C.QC(Q,ie)),this.store.dispatch(new q.y5(se));else if(!j()(X,xe)){const De=[];
1X.forEach(ge=>{(0,le.Z)(ge.path).forEach(Ce=>{Ce.fieldId&&(this.formService.addError(se,Ce.fieldId,Ce.fieldIndex,ge.message),De.push(Ce.fieldId))})}),xe.forEach(ge=>{(0,le.Z)(ge.path).forEach(Ce=>{Ce.fieldId&&(De.includes(Ce.fieldId)||this.formService.removeError(se,Ce.fieldId,Ce.fieldIndex))})})}}dispatchRemoveSectionErrors(Q,ie){this.store.dispatch(new C.QC(Q,ie))}dispatchSetSectionFormId(Q,ie,se){this.store.dispatch(new C.re(Q,ie,se))}getSectionData(Q,ie,se){return this.store.select((0,D.y5)(Q,ie)).pipe((0,f.U)(X=>se===S.i.SubmissionForm?(0,M.Vv)(X):X),(0,o.x)())}getShownSectionErrors(Q,ie,se){let X;return X=se!==S.i.SubmissionForm?this.getSectionErrors(Q,ie):this.getSectionState(Q,ie,se).pipe((0,p.w)(xe=>this.formService.getFormErrors(xe.formId).pipe((0,f.U)(De=>{const ge=new J.K("sections",ie),pe=De.map(Ce=>({path:ge.getPath(Ce.fieldId.replace(/\_/g,".")).path,message:Ce.message})).filter(Ce=>-1===R()(xe.errorsToShow,{path:Ce.path}));return[...xe.errorsToShow,...pe]})))),X}getSectionErrors(Q,ie){return this.store.select((0,D.Mb)(Q,ie)).pipe((0,o.x)())}getSectionServerErrors(Q,ie){return this.store.select((0,D.fh)(Q,ie)).pipe((0,o.x)())}getSectionState(Q,ie,se){return this.store.select((0,D.gd)(Q,ie)).pipe((0,y.h)(X=>(0,N.Uh)(X)),(0,f.U)(X=>X),(0,f.U)(X=>(0,N.Uh)(X.data)&&se===S.i.SubmissionForm?Object.assign({},X,{data:(0,M.Vv)(X.data)}):X),(0,o.x)())}isSectionValid(Q,ie){return this.store.select((0,D.gd)(Q,ie)).pipe((0,y.h)(se=>(0,N.Uh)(se)),(0,f.U)(se=>se.isValid),(0,o.x)())}isSectionActive(Q,ie){return this.submissionService.getActiveSectionId(Q).pipe((0,f.U)(se=>ie===se),(0,o.x)())}isSectionEnabled(Q,ie){return this.store.select((0,D.gd)(Q,ie)).pipe((0,y.h)(se=>(0,N.Uh)(se)),(0,f.U)(se=>se.enabled),(0,o.x)())}isSectionReadOnly(Q,ie,se){return this.store.select((0,D.gd)(Q,ie)).pipe((0,y.h)(X=>(0,N.Uh)(X)),(0,f.U)(X=>(0,N.UE)(X.visibility)&&("READONLY"===X.visibility.other&&se!==z.S.WorkspaceItem||"READONLY"===X.visibility.main&&se===z.S.WorkspaceItem)),(0,o.x)())}isSectionAvailable(Q,ie){return this.store.select((0,D.ak)(Q)).pipe((0,y.h)(se=>(0,N.pT)(se)),(0,f.U)(se=>(0,N.pT)(se.sections)&&(0,N.pT)(se.sections[ie])),(0,o.x)())}isSectionTypeAvailable(Q,ie){return this.store.select((0,D.ak)(Q)).pipe((0,y.h)(se=>(0,N.pT)(se)),(0,f.U)(se=>(0,N.pT)(se.sections)&&((0,N.pT)(G()(se.sections,{sectionType:ie}))||(0,N.pT)(G()(se.sections,{extendsSectionType:ie})))),(0,o.x)())}isSectionType(Q,ie,se){return this.store.select((0,D.ak)(Q)).pipe((0,y.h)(X=>(0,N.pT)(X)),(0,f.U)(X=>(0,N.pT)(X.sections)&&(0,N.pT)(X.sections[ie])&&(X.sections[ie].sectionType===se||X.sections[ie].extendsSectionType===se)),(0,o.x)())}addSection(Q,ie){this.store.dispatch(new C.gn(Q,ie)),this.scrollToService.scrollTo({target:ie,offset:-70})}removeSection(Q,ie){this.store.dispatch(new C.s0(Q,ie))}updateSectionData(Q,ie,se,X=[],xe=[],De){if((0,N.UE)(se)){const ge=this.isSectionAvailable(Q,ie),pe=this.isSectionEnabled(Q,ie);(0,I.a)(ge,pe).pipe((0,O.q)(1),(0,y.h)(([Ce,Me])=>Ce)).subscribe(([Ce,Me])=>{this.store.dispatch(new C.z6(Q,ie,se,X,xe,De))})}}setSectionError(Q,ie,se){this.store.dispatch(new C.uO(Q,ie,se))}setSectionStatus(Q,ie,se){this.store.dispatch(new C.hx(Q,ie,se))}computeSectionConfiguredMetadata(Q){const ie=[],se="string"==typeof Q?JSON.parse(Q,K.WMN):Q;return se.rows&&!(0,N.xb)(se.rows)&&se.rows.forEach(X=>{X.fields&&!(0,N.xb)(X.fields)&&X.fields.forEach(xe=>{xe.selectableRelationship&&ie.push(`relation.${xe.selectableRelationship.relationshipType}`),xe.selectableMetadata&&!(0,N.xb)(xe.selectableMetadata)&&xe.selectableMetadata.forEach(De=>{ie.includes(De.metadata)||ie.push(De.metadata)})})}),ie}getIsInformational(Q){return Q===S.i.SherpaPolicies}}return H.\u0275fac=function(Q){return new(Q||H)(ne.\u0275\u0275inject(te.o),ne.\u0275\u0275inject(m.T),ne.\u0275\u0275inject(B.ij),ne.\u0275\u0275inject(T.b),ne.\u0275\u0275inject($.yh),ne.\u0275\u0275inject(F.sK))},H.\u0275prov=ne.\u0275\u0275defineInjectable({token:H,factory:H.\u0275fac}),H})()},89360:(Se,Y,s)=>{"use strict";s.d(Y,{O:()=>ae});var p=s(66154),I=s(30303),f=s(45608),o=s(8842),y=s(98678),O=s(35103);
1function d(j,N){if(1&j&&(y.\u0275\u0275elementStart(0,"span",3),y.\u0275\u0275text(1),y.\u0275\u0275elementEnd()),2&j){const C=y.\u0275\u0275nextContext().$implicit;y.\u0275\u0275advance(1),y.\u0275\u0275textInterpolate3(" ",C.name," ",C.startDate," ",C.endDate," ")}}function R(j,N){if(1&j&&(y.\u0275\u0275elementStart(0,"span",3),y.\u0275\u0275text(1),y.\u0275\u0275elementEnd()),2&j){const C=y.\u0275\u0275nextContext().$implicit;y.\u0275\u0275advance(1),y.\u0275\u0275textInterpolate2("",C.name," from ",C.endDate,"")}}function k(j,N){if(1&j&&(y.\u0275\u0275elementStart(0,"span",4),y.\u0275\u0275text(1),y.\u0275\u0275elementEnd()),2&j){const C=y.\u0275\u0275nextContext().$implicit;y.\u0275\u0275advance(1),y.\u0275\u0275textInterpolate2("",C.name," until ",C.startDate,"")}}function G(j,N){if(1&j&&(y.\u0275\u0275elementContainerStart(0),y.\u0275\u0275template(1,d,2,3,"span",1),y.\u0275\u0275template(2,R,2,2,"span",1),y.\u0275\u0275template(3,k,2,2,"span",2),y.\u0275\u0275element(4,"br"),y.\u0275\u0275elementContainerEnd()),2&j){const C=N.$implicit;y.\u0275\u0275advance(1),y.\u0275\u0275property("ngIf","DEFAULT_BITSTREAM_READ"==C.action),y.\u0275\u0275advance(1),y.\u0275\u0275property("ngIf","lease"==C.name),y.\u0275\u0275advance(1),y.\u0275\u0275property("ngIf","embargo"==C.name)}}let ae=(()=>{class j{constructor(C,D){this.dsoNameService=C,this.groupService=D,this.accessConditionsList=[]}ngOnInit(){this.accessConditions.forEach(C=>{(0,f.xb)(C.name)?this.groupService.findByHref(C._links.group.href).pipe((0,p.s)(D=>!D.isResponsePending&&D.hasSucceeded)).subscribe(D=>{const z=D.payload,le=Object.assign({},C);le.name=this.dsoNameService.getName(z),this.accessConditionsList.push(le)}):this.accessConditionsList.push(C)})}}return j.\u0275fac=function(C){return new(C||j)(y.\u0275\u0275directiveInject(o._),y.\u0275\u0275directiveInject(I.O))},j.\u0275cmp=y.\u0275\u0275defineComponent({type:j,selectors:[["ds-submission-section-upload-access-conditions"]],inputs:{accessConditions:"accessConditions"},decls:1,vars:1,consts:[[4,"ngFor","ngForOf"],["class","badge badge-primary mt-3 mr-2",4,"ngIf"],["class","badge badge-dark mt-3 mr-2",4,"ngIf"],[1,"badge","badge-primary","mt-3","mr-2"],[1,"badge","badge-dark","mt-3","mr-2"]],template:function(C,D){1&C&&y.\u0275\u0275template(0,G,5,3,"ng-container",0),2&C&&y.\u0275\u0275property("ngForOf",D.accessConditionsList)},dependencies:[O.sg,O.O5],encapsulation:2}),j})()},90532:(Se,Y,s)=>{"use strict";s.d(Y,{e:()=>M});var p=s(5737),I=s(4915),f=s(38935),o=s(50123),y=s(45608),O=s(1579),d=s(4786),R=s(82485),k=s(77176),G=s(77007),ae=s(69637),j=s(22124),N=s(78187),C=s(11915),D=s(53113),z=s(98678),le=s(65706),q=s(35103),m=s(96342);const T=["formRef"];function S(K,te){if(1&K){const J=z.\u0275\u0275getCurrentView();z.\u0275\u0275elementStart(0,"ds-form",6,7),z.\u0275\u0275listener("submitForm",function(){z.\u0275\u0275restoreView(J);const B=z.\u0275\u0275nextContext();return z.\u0275\u0275resetView(B.onSubmit())})("cancel",function(){z.\u0275\u0275restoreView(J);const B=z.\u0275\u0275nextContext();return z.\u0275\u0275resetView(B.onModalClose())})("dfChange",function(B){z.\u0275\u0275restoreView(J);const $=z.\u0275\u0275nextContext();return z.\u0275\u0275resetView($.onChange(B))}),z.\u0275\u0275elementEnd()}if(2&K){const J=z.\u0275\u0275nextContext();z.\u0275\u0275property("formId",J.formId)("formModel",J.formModel)("displaySubmit",!J.isSaving)("displayCancel",!J.isSaving)}}let M=(()=>{class K{constructor(J,ne,B,$,F,P,H,oe){this.activeModal=J,this.cdr=ne,this.formBuilderService=B,this.formService=$,this.submissionService=F,this.operationsBuilder=P,this.operationsService=H,this.uploadService=oe,this.formMetadata=[],this.isSaving=!1,this.subscriptions=[]}initModelData(J){this.fileData.accessConditions.forEach((ne,B)=>{Array.of("name","startDate","endDate").filter($=>ne.hasOwnProperty($)&&(0,y.UE)(ne[$])).forEach($=>{const F=this.formBuilderService.findById($,J,B);if(F)if(F.type===p.VId){const P=new Date(ne[$]);F.value={year:P.getUTCFullYear(),month:P.getUTCMonth()+1,day:P.getUTCDate()}}else F.value=ne[$]})})}onChange(J){"name"===J.model.id&&this.setOptions(J.model,J.control)}onModalClose(){this.activeModal.dismiss()}onSubmit(){this.isSaving=!0,this.saveBitstreamData()}setOptions(J,ne){let B=null;if(this.availableAccessConditionOptions.filter($=>
1$.name===ne.value).forEach($=>B=$),(0,y.UE)(B)){const $=ne.parent.get("startDate"),F=ne.parent.get("endDate");$?.markAsUntouched(),F?.markAsUntouched(),$?.setValue(null),ne.parent.markAsDirty(),F?.setValue(null)}}ngOnInit(){this.fileData&&this.formId&&(this.formModel=this.buildFileEditForm(),this.cdr.detectChanges())}ngOnDestroy(){this.unsubscribeAll()}retrieveValueFromField(J){const ne=Array.isArray(J)?J[0]:J;return ne?ne.value:void 0}buildFileEditForm(){const J=Object.assign({},this.configMetadataForm.rows[0].fields[0]);J.repeatable=!1;const ne=Object.assign({},this.configMetadataForm,{fields:Object.assign([],this.configMetadataForm.rows[0].fields[0],[this.configMetadataForm.rows[0].fields[0],J])}),B=[],$=Object.assign({},f.Wm);$.group=this.formBuilderService.modelFromConfiguration(this.submissionId,ne,this.collectionId,this.fileData.metadata,this.submissionService.getSubmissionScope()),B.push(new p.S_O($,f.Oy));const F=Object.assign({},f.hv),P=Object.assign({},f.z7),H=[];if(this.collectionPolicyType===o.B1){for(const pe of this.availableAccessConditionOptions)H.push({label:pe.name,value:pe.name});F.options=H;const oe=[],Q=[];let ie,se;this.availableAccessConditionOptions.forEach(pe=>{if(pe.hasStartDate&&(oe.push({id:"name",value:pe.name}),pe.maxStartDate)){const Ce=new Date(pe.maxStartDate);ie={year:Ce.getUTCFullYear(),month:Ce.getUTCMonth()+1,day:Ce.getUTCDate()}}if(pe.hasEndDate&&(Q.push({id:"name",value:pe.name}),pe.maxEndDate)){const Ce=new Date(pe.maxEndDate);se={year:Ce.getUTCFullYear(),month:Ce.getUTCMonth()+1,day:Ce.getUTCDate()}}});const X={relations:[{match:p.O6Y,operator:p.F8e,when:oe}]},xe={relations:[{match:p.O6Y,operator:p.F8e,when:Q}]},De=oe.length>0,ge=Q.length>0;P.groupFactory=()=>{const pe=new p.nMt(F,f.V6),Ce=Object.assign({},f.WD,X);ie&&(Ce.max=ie);const Me=Object.assign({},f.hR,xe);se&&(Me.max=se);const Pe=new p.oqv(Ce,f.WH),Ze=new p.oqv(Me,f.D0),Ee=Object.assign({},f.Ji);return Ee.group=[pe],De&&Ee.group.push(Pe),ge&&Ee.group.push(Ze),[new p.S_O(Ee,f.AU)]},P.initialCount=(0,y.UE)(this.fileData.accessConditions)?this.fileData.accessConditions.length:1,B.push(new p.RRz(P,f.Zj))}return this.initModelData(B),B}saveBitstreamData(){this.formService.validateAllFormFields(this.formRef.formGroup);const J=this.formService.isValid(this.formId).pipe((0,k.q)(1),(0,G.h)(ne=>ne),(0,ae.z)(()=>this.formService.getFormData(this.formId)),(0,k.q)(1),(0,ae.z)(ne=>{Object.keys(ne.metadata).filter($=>(0,y.UE)(ne.metadata[$])).forEach($=>{const P=`metadata/${$.replace(/_/g,".")}`;this.operationsBuilder.add(this.pathCombiner.getPath(P),ne.metadata[$],!0)}),Object.keys(this.fileData.metadata).filter($=>(0,y.UE)(this.fileData.metadata[$])).filter($=>(0,y.xI)(ne.metadata[$])).filter($=>this.formMetadata.includes($)).forEach($=>{const P=`metadata/${$.replace(/_/g,".")}`;this.operationsBuilder.remove(this.pathCombiner.getPath(P))});const B=[];return ne.accessConditions.map($=>$.accessConditionGroup).filter($=>(0,y.UE)($)).forEach($=>{let F;if(this.availableAccessConditionOptions.filter(P=>(0,y.K0)($.name)&&P.name===$.name[0].value).forEach(P=>F=P),F){const P=Object.assign({},$);if(P.name=this.retrieveValueFromField($.name),F.hasStartDate){if($.startDate){const H=this.retrieveValueFromField($.startDate);let oe=new Date(H);if(F.maxStartDate){const Q=new Date(F.maxStartDate);oe>Q&&(oe=Q)}P.startDate=(0,j.iV)(oe)}}else delete P.startDate;if(F.hasEndDate){if($.endDate){const H=this.retrieveValueFromField($.endDate);let oe=new Date(H);if(F.maxEndDate){const Q=new Date(F.maxEndDate);oe>Q&&(oe=Q)}P.endDate=(0,j.iV)(oe)}}else delete P.endDate;B.push(P)}}),(0,y.UE)(B)&&(console.log("path",this.pathCombiner.getPath("accessConditions")),console.log("accessConditionsToSave:",B),this.operationsBuilder.add(this.pathCombiner.getPath("accessConditions"),B,!0)),this.operationsService.jsonPatchByResourceID(this.submissionService.getSubmissionObjectLinkName(),this.submissionId,this.pathCombiner.rootElement,this.pathCombiner.subRootElement)})).subscribe(ne=>{if(ne[0].sections[this.sectionId]){const B=ne[0].sections[this.sectionId];Object.keys(B.files).filter($=>
1B.files[$].uuid===this.fileId).forEach($=>this.uploadService.updateFileData(this.submissionId,this.sectionId,this.fileId,B.files[$]))}this.isSaving=!1,this.activeModal.close()});this.subscriptions.push(J)}unsubscribeAll(){this.subscriptions.filter(J=>(0,y.Uh)(J)).forEach(J=>J.unsubscribe())}}return K.\u0275fac=function(J){return new(J||K)(z.\u0275\u0275directiveInject(le.Kz),z.\u0275\u0275directiveInject(z.ChangeDetectorRef),z.\u0275\u0275directiveInject(I.c),z.\u0275\u0275directiveInject(d.o),z.\u0275\u0275directiveInject(O.b),z.\u0275\u0275directiveInject(N.w),z.\u0275\u0275directiveInject(C.E),z.\u0275\u0275directiveInject(D.K))},K.\u0275cmp=z.\u0275\u0275defineComponent({type:K,selectors:[["ds-submission-section-upload-file-edit"]],viewQuery:function(J,ne){if(1&J&&z.\u0275\u0275viewQuery(T,5),2&J){let B;z.\u0275\u0275queryRefresh(B=z.\u0275\u0275loadQuery())&&(ne.formRef=B.first)}},decls:10,vars:5,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"disabled","click"],["aria-hidden","true"],[1,"modal-body"],[3,"formId","formModel","displaySubmit","displayCancel","submitForm","cancel","dfChange",4,"ngIf"],[3,"formId","formModel","displaySubmit","displayCancel","submitForm","cancel","dfChange"],["formRef","formComponent"]],template:function(J,ne){1&J&&(z.\u0275\u0275elementStart(0,"div")(1,"div",0)(2,"h4",1),z.\u0275\u0275text(3),z.\u0275\u0275pipe(4,"translate"),z.\u0275\u0275elementEnd(),z.\u0275\u0275elementStart(5,"button",2),z.\u0275\u0275listener("click",function(){return ne.onModalClose()}),z.\u0275\u0275elementStart(6,"span",3),z.\u0275\u0275text(7,"\xd7"),z.\u0275\u0275elementEnd()()(),z.\u0275\u0275elementStart(8,"div",4),z.\u0275\u0275template(9,S,2,4,"ds-form",5),z.\u0275\u0275elementEnd()()),2&J&&(z.\u0275\u0275advance(3),z.\u0275\u0275textInterpolate(z.\u0275\u0275pipeBind1(4,3,"submission.sections.upload.edit.title")),z.\u0275\u0275advance(2),z.\u0275\u0275property("disabled",ne.isSaving),z.\u0275\u0275advance(4),z.\u0275\u0275property("ngIf",ne.formModel))},dependencies:[q.O5,R.U,m.X$],styles:[".access-condition-group{position:relative;top:-2.3rem;margin-bottom:-2.3rem}"]}),K})()},80434:(Se,Y,s)=>{"use strict";s.r(Y),s.d(Y,{SubmissionSectionUploadFileComponent:()=>ne});var p=s(35841),I=s(77007),f=s(53113),o=s(45608),y=s(4786),O=s(78187),d=s(60030),k=(s(36424),s(1579)),G=s(18005),ae=s(11915),j=s(90532),N=s(1535),C=s(98678),D=s(65706),z=s(35103),le=s(18639),q=s(50122),m=s(64744),T=s(69721),S=s(96342);function M(B,$){1&B&&C.\u0275\u0275element(0,"i",18)}function K(B,$){1&B&&C.\u0275\u0275element(0,"i",19)}function te(B,$){if(1&B){const F=C.\u0275\u0275getCurrentView();C.\u0275\u0275elementContainerStart(0),C.\u0275\u0275elementStart(1,"div",2)(2,"div",3),C.\u0275\u0275element(3,"ds-themed-thumbnail",4),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(4,"div",5)(5,"div",6)(6,"h3"),C.\u0275\u0275text(7),C.\u0275\u0275elementStart(8,"span",7),C.\u0275\u0275text(9),C.\u0275\u0275pipe(10,"dsFileSize"),C.\u0275\u0275elementEnd()()(),C.\u0275\u0275elementStart(11,"div",8),C.\u0275\u0275elementContainerStart(12),C.\u0275\u0275elementStart(13,"ds-themed-file-download-link",9),C.\u0275\u0275element(14,"i",10),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(15,"button",11),C.\u0275\u0275listener("click",function(H){C.\u0275\u0275restoreView(F);const oe=C.\u0275\u0275nextContext();return H.preventDefault(),C.\u0275\u0275resetView(oe.editBitstreamData())}),C.\u0275\u0275pipe(16,"translate"),C.\u0275\u0275pipe(17,"translate"),C.\u0275\u0275element(18,"i",12),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(19,"button",13),C.\u0275\u0275listener("click",function(H){C.\u0275\u0275restoreView(F);const oe=C.\u0275\u0275nextContext(),Q=C.\u0275\u0275reference(2);return H.preventDefault(),C.\u0275\u0275resetView(oe.confirmDelete(Q))}),C.\u0275\u0275pipe(20,"translate"),C.\u0275\u0275pipe(21,"translate"),C.\u0275\u0275pipe(22,"async"),C.\u0275\u0275template(23,M,1,0,"i",14),C.\u0275\u0275pipe(24,"async"),C.\u0275\u0275template(25,K,1,0,"i",15),C.\u0275\u0275pipe(26,"async"),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementContainerEnd(),C.\u0275\u0275elementEnd(),C.\u0275\u0275element(27,"div",16)(28,"ds-submission-section-upload-file-view",17),C.\u0275\u0275elementEnd()(),C.\u0275\u0275elementContainerEnd()}if(2&B){const F=C.\u0275\u0275nextContext();C.\u0275\u0275advance(3),C.\u0275\u0275property("thumbnail",null==F.fileData?null:F.fileData.thumbnail),C.\u0275\u0275advance(4),C.\u0275\u0275textInterpolate1("",F.fileName," "),C.\u0275\u0275advance(2),C.\u0275\u0275textInterpolate1("(",C.\u0275\u0275pipeBind1(10,15,null==F.fileData?null:F.fileData.sizeBytes),")"),C.\u0275\u0275advance(4),C.\u0275\u0275property("cssClasse
1s","btn btn-link-focus")("isBlank",!0)("bitstream",F.getBitstream())("enableRequestACopy",!1),C.\u0275\u0275advance(2),C.\u0275\u0275propertyInterpolate("title",C.\u0275\u0275pipeBind1(17,19,"submission.sections.upload.edit.title")),C.\u0275\u0275attribute("aria-label",C.\u0275\u0275pipeBind1(16,17,"submission.sections.upload.edit.title")),C.\u0275\u0275advance(4),C.\u0275\u0275propertyInterpolate("title",C.\u0275\u0275pipeBind1(21,23,"submission.sections.upload.delete.confirm.title")),C.\u0275\u0275property("disabled",C.\u0275\u0275pipeBind1(22,25,F.processingDelete$)),C.\u0275\u0275attribute("aria-label",C.\u0275\u0275pipeBind1(20,21,"submission.sections.upload.delete.confirm.title")),C.\u0275\u0275advance(4),C.\u0275\u0275property("ngIf",C.\u0275\u0275pipeBind1(24,27,F.processingDelete$)),C.\u0275\u0275advance(2),C.\u0275\u0275property("ngIf",!C.\u0275\u0275pipeBind1(26,29,F.processingDelete$)),C.\u0275\u0275advance(3),C.\u0275\u0275property("fileData",F.fileData)}}function J(B,$){if(1&B){const F=C.\u0275\u0275getCurrentView();C.\u0275\u0275elementStart(0,"div",20)(1,"h4",21),C.\u0275\u0275text(2),C.\u0275\u0275pipe(3,"translate"),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(4,"button",22),C.\u0275\u0275listener("click",function(){const oe=C.\u0275\u0275restoreView(F).dismiss;return C.\u0275\u0275resetView(oe("cancel"))}),C.\u0275\u0275elementStart(5,"span",23),C.\u0275\u0275text(6,"\xd7"),C.\u0275\u0275elementEnd()()(),C.\u0275\u0275elementStart(7,"div",24)(8,"p"),C.\u0275\u0275text(9),C.\u0275\u0275pipe(10,"translate"),C.\u0275\u0275elementEnd()(),C.\u0275\u0275elementStart(11,"div",25)(12,"button",26),C.\u0275\u0275listener("click",function(){const oe=C.\u0275\u0275restoreView(F).close;return C.\u0275\u0275resetView(oe("cancel"))}),C.\u0275\u0275text(13),C.\u0275\u0275pipe(14,"translate"),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(15,"button",27),C.\u0275\u0275listener("click",function(){const oe=C.\u0275\u0275restoreView(F).close;return C.\u0275\u0275resetView(oe("ok"))}),C.\u0275\u0275text(16),C.\u0275\u0275pipe(17,"translate"),C.\u0275\u0275elementEnd()()}2&B&&(C.\u0275\u0275advance(2),C.\u0275\u0275textInterpolate(C.\u0275\u0275pipeBind1(3,4,"submission.sections.upload.delete.confirm.title")),C.\u0275\u0275advance(7),C.\u0275\u0275textInterpolate(C.\u0275\u0275pipeBind1(10,6,"submission.sections.upload.delete.confirm.info")),C.\u0275\u0275advance(4),C.\u0275\u0275textInterpolate(C.\u0275\u0275pipeBind1(14,8,"submission.sections.upload.delete.confirm.cancel")),C.\u0275\u0275advance(3),C.\u0275\u0275textInterpolate(C.\u0275\u0275pipeBind1(17,10,"submission.sections.upload.delete.confirm.submit")))}let ne=(()=>{class B{constructor(F,P,H,oe,Q,ie,se,X){this.cdr=F,this.formService=P,this.halService=H,this.modalService=oe,this.operationsBuilder=Q,this.operationsService=ie,this.submissionService=se,this.uploadService=X,this.processingDelete$=new p.X(!1),this.subscriptions=[],this.formMetadata=[],this.readMode=!0}ngOnChanges(F){this.availableAccessConditionOptions&&this.subscriptions.push(this.uploadService.getFileData(this.submissionId,this.sectionId,this.fileId).pipe((0,I.h)(P=>(0,o.pT)(P))).subscribe(P=>{this.fileData=P}))}ngOnInit(){this.formId=this.formService.getUniqueId(this.fileId),this.pathCombiner=new d.K("sections",this.sectionId,"files",this.fileIndex),this.loadFormMetadata()}confirmDelete(F){this.modalService.open(F).result.then(P=>{"ok"===P&&(this.processingDelete$.next(!0),this.deleteFile())})}getBitstream(){return Object.assign(new N.Z,{uuid:this.fileData.uuid})}editBitstreamData(){const P=this.modalService.open(j.e,{size:"xl",backdrop:"static"});P.componentInstance.availableAccessConditionOptions=this.availableAccessConditionOptions,P.componentInstance.collectionId=this.collectionId,P.componentInstance.collectionPolicyType=this.collectionPolicyType,P.componentInstance.configMetadataForm=this.configMetadataForm,P.componentInstance.fileData=this.fileData,P.componentInstance.fileId=this.fileId,P.componentInstance.fileIndex=this.fileIndex,P.componentInstance.formId=this.formId,P.componentInstance.sectionId=this.sectionId,P.componentInstance.formMetadata=this.formMetadata,P.componentInstance.pathCombiner=this.pathCombiner,P.componentInstance.submissionId=this.submissionId}ngOnDestroy(){this.unsubscribeAll()}unsubscribeAll(){this.subscriptions.filter(F=>
1(0,o.Uh)(F)).forEach(F=>F.unsubscribe())}loadFormMetadata(){this.configMetadataForm.rows.forEach(F=>{F.fields.forEach(P=>{P.selectableMetadata.forEach(H=>{this.formMetadata.push(H.metadata)})})})}deleteFile(){this.operationsBuilder.remove(this.pathCombiner.getPath()),this.subscriptions.push(this.operationsService.jsonPatchByResourceID(this.submissionService.getSubmissionObjectLinkName(),this.submissionId,this.pathCombiner.rootElement,this.pathCombiner.subRootElement).subscribe(()=>{this.uploadService.removeUploadedFile(this.submissionId,this.sectionId,this.fileId),this.processingDelete$.next(!1)}))}}return B.\u0275fac=function(F){return new(F||B)(C.\u0275\u0275directiveInject(C.ChangeDetectorRef),C.\u0275\u0275directiveInject(y.o),C.\u0275\u0275directiveInject(G.q),C.\u0275\u0275directiveInject(D.FF),C.\u0275\u0275directiveInject(O.w),C.\u0275\u0275directiveInject(ae.E),C.\u0275\u0275directiveInject(k.b),C.\u0275\u0275directiveInject(f.K))},B.\u0275cmp=C.\u0275\u0275defineComponent({type:B,selectors:[["ds-submission-upload-section-file"]],viewQuery:function(F,P){if(1&F&&C.\u0275\u0275viewQuery(j.e,5),2&F){let H;C.\u0275\u0275queryRefresh(H=C.\u0275\u0275loadQuery())&&(P.fileEditComp=H.first)}},inputs:{availableAccessConditionOptions:"availableAccessConditionOptions",collectionId:"collectionId",collectionPolicyType:"collectionPolicyType",configMetadataForm:"configMetadataForm",fileId:"fileId",fileIndex:"fileIndex",fileName:"fileName",sectionId:"sectionId",submissionId:"submissionId"},features:[C.\u0275\u0275NgOnChangesFeature],decls:3,vars:1,consts:[[4,"ngIf"],["content",""],[1,"row"],[1,"col-md-2"],[3,"thumbnail"],[1,"col-md-10"],[1,"float-left","w-75"],[1,"text-muted"],[1,"float-right","w-15"],[3,"cssClasses","isBlank","bitstream","enableRequestACopy"],["aria-hidden","true",1,"fa","fa-download","fa-2x","text-normal"],[1,"btn","btn-link-focus",3,"title","click"],[1,"fa","fa-edit","fa-2x","text-normal"],[1,"btn","btn-link-focus",3,"title","disabled","click"],["class","fas fa-circle-notch fa-spin fa-2x text-danger",4,"ngIf"],["class","fa fa-trash fa-2x text-danger",4,"ngIf"],[1,"clearfix"],[3,"fileData"],[1,"fas","fa-circle-notch","fa-spin","fa-2x","text-danger"],[1,"fa","fa-trash","fa-2x","text-danger"],[1,"modal-header"],[1,"modal-title","text-danger"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["type","button",1,"btn","btn-secondary",3,"click"],["type","button",1,"btn","btn-danger",3,"click"]],template:function(F,P){1&F&&(C.\u0275\u0275template(0,te,29,31,"ng-container",0),C.\u0275\u0275template(1,J,18,12,"ng-template",null,1,C.\u0275\u0275templateRefExtractor)),2&F&&C.\u0275\u0275property("ngIf",P.fileData)},dependencies:[z.O5,le.z,q.t,m.m,z.Ov,T.p,S.X$]}),B})()},64744:(Se,Y,s)=>{"use strict";s.d(Y,{m:()=>q});var p=s(45608),I=s(71432),f=s(98678),o=s(35103),y=s(89360),O=s(21322),d=s(96342);function R(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275elementStart(1,"h5"),f.\u0275\u0275text(2),f.\u0275\u0275elementEnd(),f.\u0275\u0275elementContainerEnd()),2&m){const S=f.\u0275\u0275nextContext().$implicit;f.\u0275\u0275advance(2),f.\u0275\u0275textInterpolate1(" ",S.value," ")}}function k(m,T){if(1&m&&(f.\u0275\u0275elementStart(0,"h5")(1,"span",4),f.\u0275\u0275text(2),f.\u0275\u0275pipe(3,"translate"),f.\u0275\u0275elementEnd()()),2&m){const S=f.\u0275\u0275nextContext(4);f.\u0275\u0275advance(2),f.\u0275\u0275textInterpolate2("",f.\u0275\u0275pipeBind1(3,2,"submission.sections.upload.no-entry")," ",S.fileTitleKey,"")}}function G(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275template(1,k,4,4,"h5",0),f.\u0275\u0275elementContainerEnd()),2&m){const S=f.\u0275\u0275nextContext().$implicit,M=f.\u0275\u0275nextContext(2);f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",0===M.metadata[M.fileTitleKey].indexOf(S))}}function ae(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275template(1,R,3,1,"ng-container",0),f.\u0275\u0275template(2,G,2,1,"ng-container",0),f.\u0275\u0275element(3,"span",1),f.\u0275\u0275elementContainerEnd()),2&m){const S=T.$implicit;f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",""!==S.value),f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",""===S.value)}}const j=function(){return["150"]};function N(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275text(1),f.\u0275\u0275pipe(2,"dsTruncate"),f.\u0275\u0275elementContainerEnd()),2&m){const S=f.\u0275\u0275nextContext().$implicit;f.\u0275\u0275advance(1),f.\u0275\u0275textInterpolate1(" ",f.\u0275\u0275pipeBind2(2,1,S.value,f.\u0275\u0275pureFunction0(4,j))," ")}}function C(m,T){if(1&m&&(f.\u0275\u0275elementStart(0,"span",4),f.\u0275\u0275text(1),f.\u0275\u0275pipe(2,"translate"),f.\u0275\u0275elementEnd()),2&m){const S=f.\u0275\u0275nextContext(4);f.\u0275\u0275advance(1),f.\u0275\u0275textInterpolate2("",f.\u0275\u0275pipeBind1(2,2,"submission.sections.upload.no-entry")," ",S.fileDescrKey,"")}}function D(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275template(1,C,3,4,"span",5),f.\u0275\u0275elementContainerEnd()),2&m){const S=f.\u0275\u0275nextContext().$implicit,M=f.\u0275\u0275nextContext(2);f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",0===M.metadata[M.fileDescrKey].indexOf(S))}}function z(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275template(1,N,3,5,"ng-container",0),f.\u0275\u0275template(2,D,2,1,"ng-container",0),f.\u0275\u0275element(3,"span",1),f.\u0275\u0275elementContainerEnd()),2&m){const S=T.$implicit;f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",""!==S.value),f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",""===S.value)}}function le(m,T){if(1&m&&(f.\u0275\u0275elementContainerStart(0),f.\u0275\u0275template(1,ae,4,2,"ng-container",3),f.\u0275\u0275template(2,z,4,2,"ng-container",3),f.\u0275\u0275elementContainerEnd()),2&m){const S=f.\u0275\u0275nextContext();f.\u0275\u0275advance(1),f.\u0275\u0275property("ngForOf",S.getAllMetadataValue(S.fileTitleKey)),f.\u0275\u0275advance(1),f.\u0275\u0275property("ngForOf",S.getAllMetadataValue(S.fileDescrKey))}}let q=(()=>{class m{constructor(){this.metadata=Object.create({}),this.fileTitleKey="Title",this.fileDescrKey="Description"}ngOnInit(){(0,p.UE)(this.fileData.metadata)&&(this.metadata[this.fileTitleKey]=I.S.all(this.fileData.metadata,"dc.title"),this.metadata[this.fileDescrKey]=I.S.all(this.fileData.metadata,"dc.description"))}getAllMetadataValue(S){return I.S.all(this.metadata,S)}}return m.\u0275fac=function(S){return new(S||m)},m.\u0275cmp=f.\u0275\u0275defineComponent({type:m,selectors:[["ds-submission-section-upload-file-view"]],inputs:{fileData:"fileData"},decls:4,vars:2,consts:[[4,"ngIf"],[1,"clearfix"],[3,"accessConditions"],[4,"ngFor","ngForOf"],[1,"text-muted"],["class","text-muted",4,"ngIf"]],template:function(S,M){1&S&&(f.\u0275\u0275elementStart(0,"div"),f.\u0275\u0275template(1,le,3,2,"ng-container",0),f.\u0275\u0275element(2,"span",1)(3,"ds-submission-section-upload-access-conditions",2),f.\u0275\u0275elementEnd()),2&S&&(f.\u0275\u0275advance(1),f.\u0275\u0275property("ngIf",M.metadata),f.\u0275\u0275advance(2),f.\u0275\u0275property("accessConditions",M.fileData.accessConditions))},dependencies:[o.sg,o.O5,y.O,O.W,d.X$],encapsulation:2,changeDetection:0}),m})()},50123:(Se,Y,s)=>{"use strict";s.d(Y,{B1:()=>se,vk:()=>X});var ne,p=s(70655),I=s(98678),f=s(35841),o=s(53426),y=s(48358),O=s(21160),d=s(77007),R=s(27303),k=s(69637),G=s(49887),ae=s(79900),j=s(45608),N=s(53113),C=s(95445),D=s(30303),z=s(35071),le=s(37920),q=s(96289),m=s(76297),T=s(65244),S=s(73797),M=s(1579),K=s(46533),te=s(10572),J=s(8842);function B(xe,De){1&xe&&(I.\u0275\u0275elementContainerStart(0),I.\u0275\u0275elementStart(1,"div",2)(2,"div",3)(3,"h3",4)(4,"span",5),I.\u0275\u0275text(5),I.\u0275\u0275pipe(6,"translate"),I.\u0275\u0275elementEnd()()()(),I.\u0275\u0275elementContainerEnd()),2&xe&&(I.\u0275\u0275advance(5),I.\u0275\u0275textInterpolate(I.\u0275\u0275pipeBind1(6,1,"submission.sections.upload.no-file-uploaded")))}const $=function(xe){return{collectionName:xe}};function F(xe,De){if(1&xe&&(I.\u0275\u0275elementContainerStart(0),I.\u0275\u0275text(1),I.\u0275\u0275pipe(2,"translate"),I.\u0275\u0275elementContainerEnd()),2&xe){const ge=I.\u0275\u0275nextContext(3);I.\u0275\u0275advance(1),I.\u0275\u0275textInterpolate1(" ",I.\u0275\u0275pipeBind2(2,1,"submission.sections.upload.header.policy.default.nolist",I.\u0275\u0275pureFunction1(4,$,ge.collectionName))," ")}}function P(xe,De){if(1&xe&&(I.\u0275\u0275elementContainerStart(0),I.\u0275\u0275text(1),I.\u0275\u0275pipe(2,"translate"),I.\u0275\u0275elementContainerEnd()),2&xe){const ge=I.\u0275\u0275nextContext(3);I.\u0275\u0275advance(1),I.\u0275\u0275textInterpolate1(" ",I.\u0275\u0275pipeBind2(2,1,"submission.sections.upload.header.policy.default.withlist",I.\u0275\u0275pureFunction1(4,$,ge.collectionName))," ")}}function H(xe,De){if(1&xe&&(I.\u0275\u0275elementStart(0,"div",2)(1,"div",8)(2,"ds-alert",9),I.\u0275\u0275template(3,F,3,6,"ng-container",1),I.\u0275\u0275template(4,P,3,6,"ng-container",1),I.\u0275\u0275element(5,"span",10)(6,"ds-submission-section-upload-access-conditions",11),I.\u0275\u0275elementEnd()()()),2&xe){const ge=I.\u0275\u0275nextContext(2);I.\u0275\u0275advance(2),I.\u0275\u0275property("type",ge.AlertTypeEnum.Warning),I.\u0275\u0275advance(1),I.\u0275\u0275property("ngIf",1===ge.collectionPolicyType),I.\u0275\u0275advance(1),I.\u0275\u0275property("ngIf",2===ge.collectionPolicyType),I.\u0275\u0275advance(2),I.\u0275\u0275property("accessConditions",ge.collectionDefaultAccessConditions)}}function oe(xe,De){if(1&xe&&(I.\u0275\u0275elementContainerStart(0),I.\u0275\u0275element(1,"ds-themed-submission-upload-section-file",12),I.\u0275\u0275pipe(2,"async"),I.\u0275\u0275elementStart(3,"div",2)(4,"div",3),I.\u0275\u0275element(5,"hr"),I.\u0275\u0275elementEnd()(),I.\u0275\u0275elementContainerEnd()),2&xe){const ge=De.$implicit,pe=I.\u0275\u0275nextContext(2);I.\u0275\u0275advance(1),I.\u0275\u0275property("availableAccessConditionOptions",pe.availableAccessConditionOptions)("collectionId",pe.collectionId)("collectionPolicyType",pe.collectionPolicyType)("configMetadataForm",I.\u0275\u0275pipeBind1(2,9,pe.configMetadataForm$))("fileId",pe.f
1ileIndexes[pe.fileList.indexOf(ge)])("fileIndex",pe.fileList.indexOf(ge))("fileName",pe.fileNames[pe.fileList.indexOf(ge)])("sectionId",pe.sectionData.id)("submissionId",pe.submissionId)}}function Q(xe,De){if(1&xe&&(I.\u0275\u0275elementContainerStart(0),I.\u0275\u0275template(1,H,7,4,"div",6),I.\u0275\u0275template(2,oe,6,11,"ng-container",7),I.\u0275\u0275elementContainerEnd()),2&xe){const ge=I.\u0275\u0275nextContext();I.\u0275\u0275advance(1),I.\u0275\u0275property("ngIf",ge.collectionDefaultAccessConditions.length>0),I.\u0275\u0275advance(1),I.\u0275\u0275property("ngForOf",ge.fileList)}}const se=2;let X=((ne=class extends ae.v{constructor(De,ge,pe,Ce,Me,Pe,Ze,Ee,Ne,ht,Rt){super(void 0,ht,Rt),this.bitstreamService=De,this.changeDetectorRef=ge,this.collectionDataService=pe,this.groupService=Ce,this.resourcePolicyService=Me,this.sectionService=Pe,this.submissionService=Ze,this.uploadsConfigService=Ee,this.dsoNameService=Ne,this.injectedSectionData=ht,this.injectedSubmissionId=Rt,this.AlertTypeEnum=T.N,this.fileIndexes=[],this.fileList=[],this.fileNames=[],this.collectionDefaultAccessConditions=[],this.required$=new f.X(!0),this.subs=[]}onSectionInit(){const De=this.uploadsConfigService.findByHref(this.sectionData.config,!0,!1,(0,K.l)("metadata")).pipe((0,te.xw)(),(0,y.U)(ge=>ge.payload));this.configMetadataForm$=De.pipe((0,O.w)(ge=>ge.metadata.pipe((0,te.xw)(),(0,y.U)(pe=>pe.payload)))),this.subs.push(this.submissionService.getSubmissionObject(this.submissionId).pipe((0,d.h)(ge=>(0,j.pT)(ge)&&!ge.isLoading),(0,d.h)(ge=>(0,j.o8)(this.collectionId)||this.collectionId!==ge.collection),(0,R.b)(ge=>this.collectionId=ge.collection),(0,k.z)(ge=>this.collectionDataService.findById(ge.collection)),(0,d.h)(ge=>(0,j.pT)(ge.payload)),(0,R.b)(ge=>this.collectionName=this.dsoNameService.getName(ge.payload)),(0,k.z)(()=>De)).subscribe(ge=>{this.required$.next(ge.required),this.availableAccessConditionOptions=(0,j.UE)(ge.accessConditionOptions)?ge.accessConditionOptions:[],this.collectionPolicyType=this.availableAccessConditionOptions.length>0?se:1,this.requestAccessOption=ge.requestAccessOption,this.changeDetectorRef.detectChanges()}),(0,o.a)(this.configMetadataForm$,this.bitstreamService.getUploadedFileList(this.submissionId,this.sectionData.id)).pipe((0,d.h)(([ge,pe])=>(0,j.UE)(ge)&&(0,j.pT)(pe)),(0,G.x)()).subscribe(([ge,pe])=>{this.fileList=[],this.fileIndexes=[],this.fileNames=[],this.changeDetectorRef.detectChanges(),(0,j.pT)(pe)&&pe.length>0&&pe.forEach(Ce=>{this.fileList.push(Ce),this.fileIndexes.push(Ce.uuid),this.fileNames.push(this.getFileName(ge,Ce))}),this.changeDetectorRef.detectChanges()}))}getFileName(De,ge){const pe=De.rows[0].fields[0].selectableMetadata[0].metadata;let Ce;return Ce=(0,j.UE)(ge.metadata)&&(0,j.UE)(ge.metadata[pe])?ge.metadata[pe][0].display:ge.uuid,Ce}getSectionStatus(){return(0,o.a)(this.required$,this.bitstreamService.getUploadedFileList(this.submissionId,this.sectionData.id),(De,ge)=>!De||(0,j.pT)(ge)&&ge.length>0)}onSectionDestroy(){this.subs.filter(De=>(0,j.Uh)(De)).forEach(De=>De.unsubscribe())}}).\u0275fac=function(De){return new(De||ne)(I.\u0275\u0275directiveInject(N.K),I.\u0275\u0275directiveInject(I.ChangeDetectorRef),I.\u0275\u0275directiveInject(C.W),I.\u0275\u0275directiveInject(D.O),I.\u0275\u0275directiveInject(z.I),I.\u0275\u0275directiveInject(S.J),I.\u0275\u0275directiveInject(M.b),I.\u0275\u0275directiveInject(le.w),I.\u0275\u0275directiveInject(J._),I.\u0275\u0275directiveInject("sectionDataProvider"),I.\u0275\u0275directiveInject("submissionIdProvider"))},ne.\u0275cmp=I.\u0275\u0275defineComponent({type:ne,selectors:[["ds-submission-section-upload"]],features:[I.\u0275\u0275InheritDefinitionFeature],decls:3,vars:5,consts:[[3,"content","dismissible","type"],[4,"ngIf"],[1,"row"],[1,"col-md-12"],[1,"text-center"],[1,"text-muted"],["class","row",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"col-sm-12"],[3,"type"],[1,"clearfix"],[3,"accessConditions"],[3,"availableAccessConditionOptions","collectionId","collectionPolicyType","configMetadataForm","fileId","fileIndex","fileName","sectionId","submissionId"]],template:function(De,ge){1&De&&(I.\u0275\u0275element(0,"ds-alert",0),I.\u0275\u0275template(1,B,7,3,"ng-container",1),I.\u0275\u0275template(2,Q,3,2,"ng-container",1)),2&De&&(I.\u0275\u0275property("content","submission.sections.upload.info")("dismissible",!0)("type",ge.AlertTypeEnum.Info),I.\u0275\u0275advance(1),I.\u0275\u0275property("ngIf",0==ge.fileList.length),I.\u0275\u0275advance(1),I.\u0275\u0275property("ngIf",ge.fileList.length>0))}}),ne);X=(0,p.__decorate)([(0,m.E)(q.i.Upload),(0,p.__metadata)("design:paramtypes",[N.K,I.ChangeDetectorRef,C.W,D.O,z.I,S.J,M.b,le.w,J._,Object,String])],X)},53113:(Se,Y,s)=>{"use strict";s.d(Y,{K:()=>k}
1);var p=s(48358),I=s(49887),f=s(77007),o=s(32924),y=s(86769),O=s(45608),d=s(98678),R=s(89702);let k=(()=>{class G{constructor(j){this.store=j}getUploadedFileList(j,N){return this.store.select((0,y.y8)(j,N)).pipe((0,p.U)(C=>C),(0,I.x)())}getFileData(j,N,C){return this.store.select((0,y.y8)(j,N)).pipe((0,f.h)(D=>!(0,O.o8)(D)),(0,p.U)(D=>{let z;return Object.keys(D).filter(le=>D[le].uuid===C).forEach(le=>z=D[le]),z}),(0,I.x)())}getDefaultPolicies(j,N,C){return this.store.select((0,y.G)(j,N,C)).pipe((0,p.U)(D=>D),(0,I.x)())}addUploadedFile(j,N,C,D){this.store.dispatch(new o.l5(j,N,C,D))}updateFileData(j,N,C,D){this.store.dispatch(new o.GM(j,N,C,D))}removeUploadedFile(j,N,C){this.store.dispatch(new o.YU(j,N,C))}}return G.\u0275fac=function(j){return new(j||G)(d.\u0275\u0275inject(R.yh))},G.\u0275prov=d.\u0275\u0275defineInjectable({token:G,factory:G.\u0275fac}),G})()},72577:(Se,Y,s)=>{"use strict";s.d(Y,{o:()=>Fa});var p=s(27331),I=s(78181),f=s(70655),o=s(98678),y=s(53426),O=s(48358),d=s(27303),R=s(69637),k=s(77176),G=s(66154),ae=s(49887),j=s(77007),N=s(96342),C=s(54385),D=s.n(C),z=s(94667),le=s.n(z),q=s(4915),m=s(82485),T=s(4786),S=s(79900),M=s(61285),K=s(45608),te=s(60030);class J{constructor(_=null,u=null){this._path=_,this._value=u}get path(){return this._path}set path(_){this._path=_}get value(){return this._value}set value(_){this._value=_}delete(){this._value=null,this._path=null}isPathEqual(_){return this._path&&le()(this._path,_)}}var ne=s(76297),B=s(96289),$=s(1579),F=s(90537),P=s.n(F),H=s(5737),oe=s(78187),Q=s(97686),ie=s(22726),se=s(31042),X=s(88666),xe=s(55152),De=s(22124);let ge=(()=>{class w{constructor(u,E){this.formBuilder=u,this.operationsBuilder=E}dispatchOperationsFromEvent(u,E,L,de){switch(E.type){case"remove":this.dispatchOperationsFromRemoveEvent(u,E,L);break;case"change":this.dispatchOperationsFromChangeEvent(u,E,L,de);break;case"move":this.dispatchOperationsFromMoveEvent(u,E,L)}}getArrayIndexFromEvent(u){let E;return(0,K.UE)(u)&&((0,H.Gp8)(u)?(0,K.Ft)(u.context)?this.isPartOfArrayOfGroup(u.model)&&(E=u.model.parent.parent.index):E=u.context.index:E=u.index),(0,K.pT)(E)?E:0}isPartOfArrayOfGroup(u){return(0,K.K0)(u.parent)&&u.parent.type===H.Qam&&u.parent.parent&&u.parent.parent.context&&u.parent.parent.context.type===H.i9b}getQualdropValueMap(u){const E=new Map;return(this.formBuilder.isQualdropGroup(u.model)?u.model.parent.context:u.model.parent.parent.context).groups.forEach(de=>{const be=de.group[0],Oe=E.get(be.qualdropId)?E.get(be.qualdropId):[];be.value&&(Oe.push(be.value),E.set(be.qualdropId,Oe))}),E}getFieldPathFromEvent(u){const E=this.getArrayIndexFromEvent(u),L=this.getFieldPathSegmentedFromChangeEvent(u);return(0,K.pT)(E)?L+"/"+E:L}getQualdropItemPathFromEvent(u){const E=this.getArrayIndexFromEvent(u),L=new Map;let de=null;return(this.formBuilder.isQualdropGroup(u.model)?u.model.parent.context:u.model.parent.parent.context).groups.forEach((Oe,ze)=>{const Ge=Oe.group[0],tt=L.get(Ge.qualdropId)?L.get(Ge.qualdropId):[];Ge.value&&(tt.push(Ge.value),L.set(Ge.qualdropId,tt)),ze===E&&(de=Ge.qualdropId+"/"+(tt.length-1))}),de}getFieldPathSegmentedFromChangeEvent(u){let E;return E=this.formBuilder.isQualdropGroup(u.model)?u.model.qualdropId:this.formBuilder.isQualdropGroup(u.model.parent)?u.model.parent.qualdropId:this.formBuilder.getId(u.model),E}getFieldValueFromChangeEvent(u){let E;const L=u.model.value;if(this.formBuilder.isModelInCustomGroup(u.model))E=u.model.parent.value;else if(this.formBuilder.isRelationGroup(u.model))E=u.model.getGroupValue();else if(u.model.hasLanguages){const de=u.model.language;u.model.hasAuthority?Array.isArray(L)?(L.forEach((be,Oe)=>{be=Object.assign(new ie.j,be,{language:de}),L[Oe]=be}),E=L):E=Object.assign(new ie.j,L,{language:de}):E=new se.u(L,de)}else E=(0,De.UV)(L)?new se.u((0,De.UW)(L)):L instanceof Q.Z||L instanceof ie.j||L instanceof X.w||P()(L)?L:new se.u(L);return E}getValueMap(u){const E=new Map;return u.forEach(L=>{Object.keys(L).forEach(de=>{const be=E.get(de)?E.get(de):[];be.push(L[de]),E.set(de,be)})}),E}dispatchOperationsFromRemoveEvent(u,E,L){const de=this.getFieldPathFromEvent(E),be=this.getFieldValueFromChangeEvent(E);this.formBuilder.isQualdropGroup(E.model)?this.dispatchOperationsFromMap(this.getQualdropValueMap(E),u,E,L):E.context&&E.context instanceof H.NJD?this.handleArrayGroupPatch(u,E,E.context.context,L):((0,K.UE)(be)&&"string"==typeof be||(0,K.UE)(be)&&be instanceof se.u&&be.hasValue())&&this.operationsBuilder.remove(u.getPath(de))}dispatchOperationsFromAddEvent(u,E){const L=this.getFieldPathSegmentedFromChangeEvent(E),de=(0,xe.I8)(this.getFieldValueFromChangeEvent(E));(0,K.UE)(de)&&(de.place=this.getArrayIndexFromEvent(E),(0,K.Uh)(E.group)&&(0,K.Uh)(E.group.value)&&(1===E.group.value.map(Oe=>Object.values(Oe)).reduce((Oe,ze)=>Oe.concat(ze)).filter(Oe=>(0,K.UE)(Oe)).length?this.operationsBuilder.add(u.getPath([L]),[de],!1):this.operationsBuilder.add(u.getPath([L,"-"]),de,!1)))}dispatchOperationsFromChangeEvent(u,E,L,de){if(E.context&&E.context instanceof H.NJD)return void this.handleArrayGroupPatch(u,E,E.context.context,L);const be=this.getFieldPathFromEvent(E),Oe=this.getFieldPathSegmentedFromChangeEvent(E),ze=this.getFieldValueFromChangeEvent(E);if(this.formBuilder.isQualdropGroup(E.model.parent)||this.formBuilder.isQualdropGroup(E.model))this.dispatchOperationsFromMap(this.getQualdropValueMap(E),u,E,L);else if(this.formBuilder.isRelationGroup(E.model))this.dispatchOperationsFromMap(this.getValueMap(ze),u,E,L);else if(this.formBuilder.hasArrayGroupValue(E.model))this.operationsBuilder.add(u.getPath(Oe),ze,!0);else if(L.isPathEqual(this.formBuilder.getPath(E.model))||de&&(0,K.UE)(L.value)){if((0,K.Uh)(E.$event)&&(0,K.Uh)(E.$event.previousIndex))if(E.$event.previousIndex<0)this.operationsBuilder.add(u.getPath(Oe),ze,!0);else{const Ge=u.getPath(be),tt=u.getPath(Oe+"/"+E.$event.previousIndex);(0,K.UE)(tt.path)&&(0,K.UE)(Ge.path)&&tt.path!==Ge.path&&this.operationsBuilder.move(Ge,tt.path)}else ze.hasValue()?this.operationsBuilder.replace(u.getPath(be),ze):0===this.getArrayIndexFromEvent(E)?this.operationsBuilder.remove(u.getPath(Oe)):this.operationsBuilder.remove(u.getPath(be));L.delete()}else ze.hasValue()&&((0,K.o8)(this.getArrayIndexFromEvent(E))||0===this.getArrayIndexFromEvent(E)?this.operationsBuilder.add(u.getPath(Oe),ze,!0):this.operationsBuilder.add(u.getPath(be),ze))}dispatchOperationsFromMap(u,E,L,de){const be=u;if("remove"===L.type){const Oe=this.getQualdropItemPathFromEvent(L);this.operationsBuilder.remove(E.getPath(Oe))}else de.isPathEqual(this.formBuilder.getPath(L.model))&&de.value.forEach((Oe,ze)=>{const Ge=be.get(ze);Ge?(le()(Oe,Ge)||this.operationsBuilder.add(E.getPath(ze),Ge,!0),be.delete(ze)):Ge||this.operationsBuilder.remove(E.getPath(ze))}),be.forEach((Oe,ze)=>{1===Oe.length&&(0,K.Ft)(Oe[0])?this.operationsBuilder.remove(E.getPath(ze)):this.operationsBuilder.add(E.getPath(ze),Oe,!0)});de.delete()}dispatchOperationsFromMoveEvent(u,E,L){return this.handleArrayGroupPatch(u,E.$event,E.$event.arrayModel,L)}handleArrayGroupPatch(u,E,L,de){const be=this.formBuilder.getValueFromModel([L]),Oe=this.getFieldPathSegmentedFromChangeEvent(E);(0,K.UE)(be)?this.operationsBuilder.add(u.getPath(Oe),be[Oe],!1):de.isPathEqual(this.formBuilder.getPath(E.model))&&this.operationsBuilder.remove(u.getPath(Oe))}}return w.\u0275fac=function(u){return new(u||w)(o.\u0275\u0275inject(q.c),o.\u0275\u0275inject(oe.w))},w.\u0275prov=o.\u0275\u0275defineInjectable({token:w,factory:w.\u0275fac}),w})();var Ie,pe=s(65384),Ce=s(73797),Me=s(10882),Pe=s(31638),Ze=s(10572),Ee=s(14677),Ne=s(55624),ht=s(6952),Rt=s(46533),Et=s(76774),Qo=s(94056),vs=s(54384),Je=s(35103),Hn=s(87657);const _s=["formRef"];function ot(w,_){1&w&&o.\u0275\u0275element(0,"ds-themed-loading",2)}function xs(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"ds-form",3,4),o.\u0275\u0275listener("dfChange",function(L){o.\u0275\u0275restoreView(u);const de=o.\u0275\u0275nextContext();
1return o.\u0275\u0275resetView(de.onChange(L))})("dfFocus",function(L){o.\u0275\u0275restoreView(u);const de=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(de.onFocus(L))})("remove",function(L){o.\u0275\u0275restoreView(u);const de=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(de.onRemove(L))})("ngbEvent",function(L){o.\u0275\u0275restoreView(u);const de=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(de.onCustomEvent(L))})("removeArrayItem",function(L){o.\u0275\u0275restoreView(u);const de=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(de.onRemove(L))}),o.\u0275\u0275elementEnd()}if(2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275property("formId",u.formId)("formModel",u.formModel)("displaySubmit",!1)("displayCancel",!1)}}let ki=((Ie=class extends S.v{constructor(_,u,E,L,de,be,Oe,ze,Ge,tt,ye,Ve,Qe,Ke,Xe){super(Qe,Ke,Xe),this.cdr=_,this.formBuilderService=u,this.formOperationsService=E,this.formService=L,this.formConfigService=de,this.notificationsService=be,this.sectionService=Oe,this.submissionService=ze,this.translate=Ge,this.submissionObjectService=tt,this.objectCache=ye,this.requestService=Ve,this.injectedCollectionId=Qe,this.injectedSectionData=Ke,this.injectedSubmissionId=Xe,this.isUpdating=!1,this.isLoading=!0,this.fieldsOnTheirWayToBeRemoved=new Map,this.formData=Object.create({}),this.previousValue=new J,this.subs=[],this.isSectionReadonly=!1}onSectionInit(){this.pathCombiner=new te.K("sections",this.sectionData.id),this.formId=this.formService.getUniqueId(this.sectionData.id),this.sectionService.dispatchSetSectionFormId(this.submissionId,this.sectionData.id,this.formId),this.formConfigService.findByHref(this.sectionData.config).pipe((0,O.U)(_=>_.payload),(0,d.b)(_=>this.formConfig=_),(0,R.z)(()=>(0,y.a)([this.sectionService.getSectionData(this.submissionId,this.sectionData.id,this.sectionData.sectionType),this.submissionObjectService.findById(this.submissionId,!0,!1,(0,Rt.l)("item")).pipe((0,Ze.xw)(),(0,Ze.xe)()),this.sectionService.isSectionReadOnly(this.submissionId,this.sectionData.id,this.submissionService.getSubmissionScope())])),(0,k.q)(1)).subscribe(([_,u,E])=>{(0,K.o8)(this.formModel)&&(this.submissionObject=u,this.isSectionReadonly=E,this.initForm(_,this.sectionData.errorsToShow,this.sectionData.serverValidationErrors),this.sectionData.data=_,this.subscriptions(),this.isLoading=!1,this.cdr.detectChanges())})}onSectionDestroy(){this.subs.filter(_=>(0,K.Uh)(_)).forEach(_=>_.unsubscribe())}getSectionStatus(){const _=this.formService.isValid(this.formId),u=this.sectionService.getSectionServerErrors(this.submissionId,this.sectionData.id).pipe((0,O.U)(E=>(0,K.xb)(E)));return(0,y.a)([_,u]).pipe((0,O.U)(([E,L])=>E&&L))}hasMetadataEnrichment(_){const u={};Object.keys(_).forEach(de=>{this.inCurrentSubmissionScope(de)&&(u[de]=_[de])});const E=this.hasDifferences(u,this.formData),L=this.hasDifferences(this.formData,u);return E||L}hasDifferences(_,u){const E=[],L=(0,Me.e5)(_,u);return Object.keys(L).forEach(de=>{L[de].forEach(be=>{be.hasOwnProperty("value")&&D()(u[de],{value:be.value})<0&&E.push(be)})}),(0,K.UE)(E)}inCurrentSubmissionScope(_){if((0,K.UE)(this.sectionMetadata)&&!this.sectionMetadata.includes(_))return!1;switch(this.formConfig?.rows.find(E=>E.fields?.[0]?.selectableMetadata?E.fields?.[0]?.selectableMetadata?.[0]?.metadata===_:!!E.fields?.[0]?.selectableRelationship&&E.fields?.[0]?.selectableRelationship.relationshipType===_.replace(/^relationship\./g,""))?.fields?.[0]?.scope){case Qo.S.WorkspaceItem:return this.submissionObject.type===Pe.K.type.value;case Qo.S.WorkflowItem:return this.submissionObject.type===vs.p.type.value;default:return!0}}initForm(_,u,E){try{this.formModel=this.formBuilderService.modelFromConfiguration(this.submissionId,this.formConfig,this.collectionId,_,this.submissionService.getSubmissionScope(),this.isSectionReadonly);const L=this.sectionService.computeSectionConfiguredMetadata(this.formConfig);this.sectionService.updateSectionData(this.submissionId,this.sectionData.id,_,u,E,L)}catch(L){const be={message:this.translate.instant("error.submission.sections.init-form-error")+L.toString(),path:"/sections/"+this.sectionData.id};console.error(L.stack),this.sectionService.setSectionError(this.submissionId,this.sectionData.id,be)}}updateForm(_){const u=_.data,E=_.errorsToShow;(0,K.UE)(u)&&!le()(u,this.sectionData.data)?(this.sectionData.data=u,this.hasMetadataEnrichment(u)?(this.isUpdating=!0,this.formModel=null,this.cdr.detectChanges(),this.initForm(u,E,_.serverValidationErrors),this.checksForErrors(E),this.isUpdating=!1,this.cdr.detectChanges()):((0,K.UE)(E)||(0,K.UE)(this.sectionData.errorsToShow))&&this.checksForErrors(E)):((0,K.UE)(E)||(0,K.UE)(this.sectionData.errorsToShow))&&this.checksForErrors(E)}checksForErrors(_){this.formService.isFormInitialized(this.formId).pipe((0,G.s)(u=>!0===u&&!this.isUpdating)).subscribe(()=>{this.sectionService.checkSectionErrors(this.submissionId,this.sectionData.id,this.formId,_,this.sectionData.errorsToShow),this.sectionData.errorsToShow=_,this.cdr.detectChanges()})}subscriptions(){this.subs.push(this.formService.getFormData(this.formId).pipe((0,ae.x)()).subscribe(_=>{this.formData=_}),this.sectionService.getSectionState(this.submissionId,this.sectionData.id,this.sectionData.sectionType).pipe((0,j.h)(_=>(0,K.UE)(_)&&((0,K.UE)(_.data)||(0,K.UE)(_.errorsToShow))),(0,ae.x)()).subscribe(_=>{this.fieldsOnTheirWayToBeRemoved=new Map,this.sectionMetadata=_.metadata,this.updateForm(_)}))}onChange(_){this.formOperationsService.dispatchOperationsFromEvent(this.pathCombiner,_,this.previousValue,this.hasStoredValue(this.formBuilderService.getId(_.model),this.formOperationsService.getArrayIndexFromEvent(_)));const u=this.formOperationsService.getFieldPathSegmentedFromChangeEvent(_),E=this.formOperationsService.getFieldValueFromChangeEvent(_);(-1!==Et.N.submission.autosave.metadata.indexOf(u)&&(0,K.UE)(E)||this.hasRelatedCustomError(u))&&this.submissionService.dispatchSave(this.submissionId)}hasRelatedCustomError(_){const u=D()(this.sectionData.errorsToShow,{path:this.pathCombiner.getPath(_).path});if(-1!==u){const L=this.sectionData.errorsToShow[u].message.replace("error.validation.","");return!Et.N.form.validatorMap.hasOwnProperty(L)}return!1}
1onFocus(_){const u=this.formOperationsService.getFieldValueFromChangeEvent(_),E=this.formBuilderService.getPath(_.model);this.formBuilderService.hasMappedGroupValue(_.model)?(this.previousValue.path=E,this.previousValue.value=this.formOperationsService.getQualdropValueMap(_)):(0,K.UE)(u)&&("object"==typeof u&&(0,K.UE)(u.value)||"string"==typeof u)&&(this.previousValue.path=E,this.previousValue.value=u)}onRemove(_){const u=this.formBuilderService.getId(_.model),E=this.formOperationsService.getArrayIndexFromEvent(_);if(this.fieldsOnTheirWayToBeRemoved.has(u)){const L=this.fieldsOnTheirWayToBeRemoved.get(u);L.push(E),this.fieldsOnTheirWayToBeRemoved.set(u,L)}else this.fieldsOnTheirWayToBeRemoved.set(u,[E]);this.formOperationsService.dispatchOperationsFromEvent(this.pathCombiner,_,this.previousValue,this.hasStoredValue(u,E))}hasStoredValue(_,u){return!!(0,K.UE)(this.sectionData.data)&&this.sectionData.data.hasOwnProperty(_)&&(0,K.UE)(this.sectionData.data[_][u])&&!this.isFieldToRemove(_,u)}isFieldToRemove(_,u){return this.fieldsOnTheirWayToBeRemoved.has(_)&&this.fieldsOnTheirWayToBeRemoved.get(_).includes(u)}onCustomEvent(_){this.formOperationsService.dispatchOperationsFromEvent(this.pathCombiner,_,this.previousValue,null)}}).\u0275fac=function(_){return new(_||Ie)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(q.c),o.\u0275\u0275directiveInject(ge),o.\u0275\u0275directiveInject(T.o),o.\u0275\u0275directiveInject(M.X),o.\u0275\u0275directiveInject(pe.T),o.\u0275\u0275directiveInject(Ce.J),o.\u0275\u0275directiveInject($.b),o.\u0275\u0275directiveInject(N.sK),o.\u0275\u0275directiveInject(Ee.O),o.\u0275\u0275directiveInject(Ne.a),o.\u0275\u0275directiveInject(ht.s),o.\u0275\u0275directiveInject("collectionIdProvider"),o.\u0275\u0275directiveInject("sectionDataProvider"),o.\u0275\u0275directiveInject("submissionIdProvider"))},Ie.\u0275cmp=o.\u0275\u0275defineComponent({type:Ie,selectors:[["ds-submission-section-form"]],viewQuery:function(_,u){if(1&_&&o.\u0275\u0275viewQuery(_s,5),2&_){let E;o.\u0275\u0275queryRefresh(E=o.\u0275\u0275loadQuery())&&(u.formRef=E.first)}},features:[o.\u0275\u0275InheritDefinitionFeature],decls:2,vars:2,consts:[["message","Loading...",4,"ngIf"],[3,"formId","formModel","displaySubmit","displayCancel","dfChange","dfFocus","remove","ngbEvent","removeArrayItem",4,"ngIf"],["message","Loading..."],[3,"formId","formModel","displaySubmit","displayCancel","dfChange","dfFocus","remove","ngbEvent","removeArrayItem"],["formRef","formComponent"]],template:function(_,u){1&_&&(o.\u0275\u0275template(0,ot,1,0,"ds-themed-loading",0),o.\u0275\u0275template(1,xs,2,4,"ds-form",1)),2&_&&(o.\u0275\u0275property("ngIf",u.isLoading),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!u.isLoading&&u.formModel))},dependencies:[Je.O5,Hn.Z,m.U]}),Ie);ki=(0,f.__decorate)([(0,ne.E)(B.i.SubmissionForm),(0,f.__metadata)("design:paramtypes",[o.ChangeDetectorRef,q.c,ge,T.o,M.X,pe.T,Ce.J,$.b,N.sK,Ee.O,Ne.a,ht.s,String,Object,String])],ki);s(49175),s(35273),s(71532),s(86183),s(51104),s(51437);var jt=s(89702),Ae=s(589),qi=s(66723),Gn=s(34045),en=s.n(Gn),Zn=s(56246),tn=s.n(Zn),gi=s(14111),Dt=s(9237),dt=s(21160),Zt=s(9249),Ot=s(22040),nn=s(11915),bi=s(97176),Le=s(32924),Pn=s(14297),Ss=s(46342);function ws(w,_,u){return w?w[_.sections[u].formId]:null}function Is(w,_,u,E){if(E||u!==B.i.SubmissionForm)return _;if(!w||!w.touched)return[];const L=[];return _.forEach(de=>{(0,Pn.Z)(de.path).forEach(Oe=>{Oe.fieldId&&w.touched[Oe.fieldId]&&L.push(de)})}),L}const Es=[(()=>{class w{constructor(u,E,L,de,be,Oe,ze,Ge,tt){this.actions$=u,this.notificationsService=E,this.operationsService=L,this.sectionService=de,this.store$=be,this.submissionService=Oe,this.submissionObjectService=ze,this.translate=Ge,this.workspaceItemDataService=tt,this.loadForm$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.INIT_SUBMISSION_FORM),(0,O.U)(ye=>{const Ve=ye.payload.submissionDefinition,Qe=[];return Ve.sections.page.forEach(Ke=>{const Xe=Ke._links.self.href||Ke._links.self,Qt=Xe.substr(Xe.lastIndexOf("/")+1),$i=Ke._links.config?Ke._links.config.href||Ke._links.config:"",Nt=Ke.mandatory||(0,K.UE)(ye.payload.sections)&&ye.payload.sections.hasOwnProperty(Qt);let Vi;Vi=Ke.sectionType!==B.i.SubmissionForm?(0,K.pT)(ye.payload.sections)&&(0,K.pT)(ye.payload.sections[Qt])?ye.payload.sections[Qt]:Object.create(null):ye.payload.item.metadata;const Hi=(0,K.UE)(ye.payload.errors)&&ye.payload.errors[Qt]||null;Qe.push(new Le.qK(ye.payload.submissionId,Qt,Ke.header,$i,Ke.mandatory,Ke.sectionType,Ke.extendsSectionType,Ke.visibility,Nt,Vi,Hi))}),{action:ye,definition:Ve,mappedActions:Qe}}
1),(0,R.z)(ye=>(0,gi.D)(ye.mappedActions.concat(new Le.p3(ye.action.payload.submissionId)))))),this.resetForm$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.RESET_SUBMISSION_FORM),(0,O.U)(ye=>new Le.Xq(ye.payload.collectionId,ye.payload.submissionId,ye.payload.selfUrl,ye.payload.submissionDefinition,ye.payload.sections,ye.payload.item,null)))),this.saveSubmission$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.SAVE_SUBMISSION_FORM),(0,dt.w)(ye=>this.operationsService.jsonPatchByResourceType(this.submissionService.getSubmissionObjectLinkName(),ye.payload.submissionId,"sections").pipe((0,O.U)(Ve=>new Le.Uq(ye.payload.submissionId,Ve,ye.payload.isManual,ye.payload.isManual)),(0,Zt.K)(()=>(0,Dt.of)(new Le.ec(ye.payload.submissionId))))))),this.saveForLaterSubmission$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.SAVE_FOR_LATER_SUBMISSION_FORM),(0,dt.w)(ye=>this.operationsService.jsonPatchByResourceType(this.submissionService.getSubmissionObjectLinkName(),ye.payload.submissionId,"sections").pipe((0,O.U)(Ve=>new Le.gA(ye.payload.submissionId,Ve)),(0,Zt.K)(()=>(0,Dt.of)(new Le.ec(ye.payload.submissionId))))))),this.saveSubmissionSuccess$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.SAVE_SUBMISSION_FORM_SUCCESS),(0,Ot.M)(this.store$),(0,O.U)(([ye,Ve])=>this.parseSaveResponse(Ve.submission.objects[ye.payload.submissionId],ye.payload.submissionObject,ye.payload.submissionId,Ve.forms,ye.payload.showNotifications,ye.payload.showErrors)),(0,R.z)(ye=>(0,gi.D)(ye)))),this.saveSubmissionSectionSuccess$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.SAVE_SUBMISSION_SECTION_FORM_SUCCESS),(0,Ot.M)(this.store$),(0,O.U)(([ye,Ve])=>this.parseSaveResponse(Ve.submission.objects[ye.payload.submissionId],ye.payload.submissionObject,ye.payload.submissionId,Ve.forms,!1,!1)),(0,R.z)(ye=>(0,gi.D)(ye)))),this.saveSection$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.SAVE_SUBMISSION_SECTION_FORM),(0,dt.w)(ye=>this.operationsService.jsonPatchByResourceID(this.submissionService.getSubmissionObjectLinkName(),ye.payload.submissionId,"sections",ye.payload.sectionId).pipe((0,O.U)(Ve=>new Le.hM(ye.payload.submissionId,Ve)),(0,Zt.K)(()=>(0,Dt.of)(new Le.cT(ye.payload.submissionId))))))),this.saveError$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.SAVE_SUBMISSION_FORM_ERROR,Le.tI.SAVE_SUBMISSION_SECTION_FORM_ERROR),(0,Ot.M)(this.store$),(0,d.b)(()=>this.notificationsService.error(null,this.translate.get("submission.sections.general.save_error_notice")))),{dispatch:!1}),this.saveAndDeposit$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.SAVE_AND_DEPOSIT_SUBMISSION),(0,Ot.M)(this.submissionService.hasUnsavedModification()),(0,dt.w)(([ye,Ve])=>{let Qe;return Qe=Ve?this.operationsService.jsonPatchByResourceType(this.submissionService.getSubmissionObjectLinkName(),ye.payload.submissionId,"sections"):this.submissionObjectService.findById(ye.payload.submissionId,!1,!0).pipe((0,Ze.Gp)(),(0,O.U)(Ke=>[Ke])),Qe.pipe((0,O.U)(Ke=>this.canDeposit(Ke)?new Le.wn(ye.payload.submissionId):(this.notificationsService.warning(null,this.translate.instant("submission.sections.general.cannot_deposit"),null,!0),new Le.Uq(ye.payload.submissionId,Ke,!1,!0))),(0,Zt.K)(()=>(0,Dt.of)(new Le.ec(ye.payload.submissionId))))}))),this.depositSubmission$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.DEPOSIT_SUBMISSION),(0,Ot.M)(this.store$),(0,dt.w)(([ye,Ve])=>this.submissionService.depositSubmission(Ve.submission.objects[ye.payload.submissionId].selfUrl).pipe((0,O.U)(()=>new Le.e7(ye.payload.submissionId)),(0,Zt.K)(Qe=>(0,Dt.of)(new Le.jn(ye.payload.submissionId))))))),this.saveForLaterSubmissionSuccess$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.SAVE_FOR_LATER_SUBMISSION_FORM_SUCCESS),(0,d.b)(()=>this.notificationsService.success(null,this.translate.get("submission.sections.general.save_success_notice"))),(0,d.b)(()=>this.submissionService.redirectToMyDSpace())),{dispatch:!1}),this.depositSubmissionSuccess$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.DEPOSIT_SUBMISSION_SUCCESS),(0,d.b)(()=>this.notificationsService.success(null,this.translate.get("submission.sections.general.deposit_success_notice"))),(0,d.b)(ye=>this.workspaceItemDataService.invalidateById(ye.payload.submissionId)),(0,d.b)(()=>this.submissionService.redirectToMyDSpace())),{dispatch:!1}),this.depositSubmissionError$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.DEPOSIT_SUBMISSION_ERROR),(0,d.b)(()=>this.notificationsService.error(null,this.translate.get("submission.sections.general.deposit_error_notice")))),{dispatch:!1}),this.discardSubmission$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.DISCARD_SUBMISSION),(0,dt.w)(ye=>this.submissionService.discardSubmission(ye.payload.submissionId).pipe((0,O.U)(()=>new Le._w(ye.payload.submissionId)),(0,Zt.K)(()=>(0,Dt.of)(new Le.kj(ye.payload.submissionId))))))),this.addAllMetadataToSectionData=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.UPDATE_SECTION_DATA),(0,dt.w)(ye=>this.sectionService.getSectionState(ye.payload.submissionId,ye.payload.sectionId,B.i.Upload).pipe((0,O.U)(Ve=>[ye,Ve]),(0,k.q)(1))),(0,j.h)(([ye,Ve])=>Ve.sectionType===B.i.SubmissionForm),(0,dt.w)(([ye,Ve])=>Ve.sectionType===B.i.SubmissionForm?this.submissionObjectService.findById(ye.payload.submissionId,!0,!1,(0,Rt.l)("item")).pipe((0,Ze.Gp)()).pipe((0,dt.w)(Xe=>Xe.item.pipe((0,Ze.Gp)()))).pipe((0,O.U)(Xe=>Xe.metadata),(0,j.h)(Xe=>
1!le()(ye.payload.data,Xe)),(0,O.U)(Xe=>new Le.z6(ye.payload.submissionId,ye.payload.sectionId,Xe,ye.payload.errorsToShow,ye.payload.serverValidationErrors,ye.payload.metadata))):(0,Dt.of)(new Le.jQ)))),this.discardSubmissionSuccess$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.DISCARD_SUBMISSION_SUCCESS),(0,d.b)(()=>this.notificationsService.success(null,this.translate.get("submission.sections.general.discard_success_notice"))),(0,d.b)(()=>this.submissionService.redirectToMyDSpace())),{dispatch:!1}),this.discardSubmissionError$=(0,Ae.GW)(()=>this.actions$.pipe((0,Ae.l4)(Le.tI.DISCARD_SUBMISSION_ERROR),(0,d.b)(()=>this.notificationsService.error(null,this.translate.get("submission.sections.general.discard_error_notice")))),{dispatch:!1})}canDeposit(u){let E=!0;return(0,K.UE)(u)&&u.forEach(L=>{const{errors:de}=L;de&&!(0,K.xb)(de)&&(E=!1)}),E}parseSaveResponse(u,E,L,de,be=!0,Oe=!0){const ze=[];return(0,K.UE)(E)&&(be&&this.notificationsService.success(null,this.translate.get("submission.sections.general.save_success_notice")),E.forEach(Ge=>{let tt=Object.create({});const{errors:ye}=Ge;ye&&!(0,K.xb)(ye)&&(tt=(0,bi.Z)(ye),be&&this.notificationsService.warning(null,this.translate.get("submission.sections.general.sections_not_valid")));const Ve=Ge.sections&&(0,K.UE)(Ge.sections)?Ge.sections:{},Qe=tn()(Object.keys(Ve),Object.keys(tt));for(const Xe of Qe){const Qt=tt[Xe]||[],$i=Ve[Xe]||{};if(u.sections[Xe].sectionType===B.i.Upload&&(0,K.xb)($i.files)&&!u.sections[Xe].enabled)continue;be&&!u.sections[Xe].enabled&&this.submissionService.notifyNewSection(L,Xe,u.sections[Xe].sectionType);const Vi=Is(ws(de,u,Xe),Qt,u.sections[Xe].sectionType,Oe);ze.push(new Le.z6(L,Xe,$i,Vi,Qt))}const Ke=en()(u.sections,Xe=>Xe.sectionType===B.i.SherpaPolicies);(0,K.pT)(Ke)&&(0,K.UE)(u.sections[Ke]?.data)&&(0,K.xb)(Ve[Ke])&&ze.push(new Le.z6(L,Ke,null,[],[]))})),ze}}return w.\u0275fac=function(u){return new(u||w)(o.\u0275\u0275inject(Ae.eX),o.\u0275\u0275inject(pe.T),o.\u0275\u0275inject(nn.E),o.\u0275\u0275inject(Ce.J),o.\u0275\u0275inject(jt.yh),o.\u0275\u0275inject($.b),o.\u0275\u0275inject(Ee.O),o.\u0275\u0275inject(N.sK),o.\u0275\u0275inject(Ss.p))},w.\u0275prov=o.\u0275\u0275defineInjectable({token:w,factory:w.\u0275fac}),w})()];var Xo=s(50123),Ds=s(53113),Yo=(s(49868),s(9302)),Jo=s(95445);const Os={granted:{element:{container:"custom-control custom-checkbox pl-1",control:"custom-control-input",label:"custom-control-label pt-1"}}},Bs=[{id:"granted",label:"submission.sections.license.granted-label",required:!0,value:!1,validators:{required:null},errorMessages:{required:"submission.sections.license.required",notgranted:"submission.sections.license.notgranted"},type:"CHECKBOX"}];var di;const Ts=["formRef"];function qo(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"ds-form",2,3),o.\u0275\u0275listener("dfChange",function(L){o.\u0275\u0275restoreView(u);const de=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(de.onChange(L))}),o.\u0275\u0275elementEnd()}if(2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275property("formId",u.formId)("formModel",u.formModel)("formLayout",u.formLayout)("displaySubmit",u.displaySubmit)("displayCancel",!1)}}let On=((di=class extends S.v{constructor(_,u,E,L,de,be,Oe,ze,Ge,tt,ye,Ve){super(tt,ye,Ve),this.changeDetectorRef=_,this.collectionDataService=u,this.formBuilderService=E,this.formOperationsService=L,this.formService=de,this.operationsBuilder=be,this.sectionService=Oe,this.submissionService=ze,this.translateService=Ge,this.injectedCollectionId=tt,this.injectedSectionData=ye,this.injectedSubmissionId=Ve,this.formLayout=Os,this.displaySubmit=!1,this.subs=[]}onSectionInit(){this.pathCombiner=new te.K("sections",this.sectionData.id),this.formId=this.formService.getUniqueId(this.sectionData.id),this.formModel=this.formBuilderService.fromJSON(Bs);const _=this.formBuilderService.findById("granted",this.formModel);_.label=this.translateService.instant(_.label),_.value=this.sectionData.data.granted,this.licenseText$=this.collectionDataService.findById(this.collectionId,!0,!0,(0,Rt.l)("license")).pipe((0,j.h)(u=>
1(0,K.pT)(u.payload)),(0,R.z)(u=>u.payload.license),(0,G.s)(u=>(0,K.pT)(u.payload)),(0,O.U)(u=>u.payload.text),(0,Yo.O)("")),this.subs.push(this.sectionService.isSectionReadOnly(this.submissionId,this.sectionData.id,this.submissionService.getSubmissionScope()).pipe((0,k.q)(1),(0,j.h)(u=>u)).subscribe(()=>{_.disabled=!0}),this.sectionService.getSectionErrors(this.submissionId,this.sectionData.id).pipe((0,j.h)(u=>(0,K.UE)(u)),(0,ae.x)()).subscribe(u=>{const E=u.map(L=>"/sections/license"===L.path?_.checked?null:Object.assign({},L,{path:"/sections/license/granted"}):L).filter(L=>(0,K.K0)(L));(0,K.UE)(E)?(this.sectionService.checkSectionErrors(this.submissionId,this.sectionData.id,this.formId,E),this.sectionData.errors=u):this.sectionService.dispatchRemoveSectionErrors(this.submissionId,this.sectionData.id),this.changeDetectorRef.detectChanges()}))}getSectionStatus(){const _=this.formBuilderService.findById("granted",this.formModel);return _.valueChanges.pipe((0,O.U)(u=>!0===u),(0,Yo.O)(_.value))}onChange(_){const u=this.formOperationsService.getFieldPathSegmentedFromChangeEvent(_),E=this.formOperationsService.getFieldValueFromChangeEvent(_);E?(this.operationsBuilder.add(this.pathCombiner.getPath(u),E.value.toString(),!1,!0),this.sectionService.dispatchRemoveSectionErrors(this.submissionId,this.sectionData.id)):this.operationsBuilder.remove(this.pathCombiner.getPath(u))}onSectionDestroy(){this.subs.filter(_=>(0,K.Uh)(_)).forEach(_=>_.unsubscribe())}}).\u0275fac=function(_){return new(_||di)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(Jo.W),o.\u0275\u0275directiveInject(q.c),o.\u0275\u0275directiveInject(ge),o.\u0275\u0275directiveInject(T.o),o.\u0275\u0275directiveInject(oe.w),o.\u0275\u0275directiveInject(Ce.J),o.\u0275\u0275directiveInject($.b),o.\u0275\u0275directiveInject(N.sK),o.\u0275\u0275directiveInject("collectionIdProvider"),o.\u0275\u0275directiveInject("sectionDataProvider"),o.\u0275\u0275directiveInject("submissionIdProvider"))},di.\u0275cmp=o.\u0275\u0275defineComponent({type:di,selectors:[["ds-submission-section-license"]],viewQuery:function(_,u){if(1&_&&o.\u0275\u0275viewQuery(Ts,5),2&_){let E;o.\u0275\u0275queryRefresh(E=o.\u0275\u0275loadQuery())&&(u.formRef=E.first)}},features:[o.\u0275\u0275InheritDefinitionFeature],decls:5,vars:4,consts:[[1,"mb-5","preserve-line-breaks",3,"innerHTML"],[3,"formId","formModel","formLayout","displaySubmit","displayCancel","dfChange",4,"ngIf"],[3,"formId","formModel","formLayout","displaySubmit","displayCancel","dfChange"],["formRef","formComponent"]],template:function(_,u){1&_&&(o.\u0275\u0275element(0,"span",0),o.\u0275\u0275pipe(1,"async"),o.\u0275\u0275element(2,"br")(3,"br"),o.\u0275\u0275template(4,qo,2,5,"ds-form",1)),2&_&&(o.\u0275\u0275property("innerHTML",o.\u0275\u0275pipeBind1(1,2,u.licenseText$),o.\u0275\u0275sanitizeHtml),o.\u0275\u0275advance(4),o.\u0275\u0275property("ngIf",u.formModel))},dependencies:[Je.O5,m.U,Je.Ov]}),di);On=(0,f.__decorate)([(0,ne.E)(B.i.License),(0,f.__metadata)("design:paramtypes",[o.ChangeDetectorRef,Jo.W,q.c,ge,T.o,oe.w,Ce.J,$.b,N.sK,String,Object,String])],On);var vi,Fs=s(37920),ji=(s(44918),s(80434),s(90532),s(64744),s(89360)),Ms=(s(69653),s(97487)),Qn=(s(10251),s(8019),s(76890),s(9925),s(23266)),ei=s(65706),Tn=s(29353),on=s(73194),As=s(78154),rr=s(41966);function sr(w,_){1&w&&(o.\u0275\u0275elementStart(0,"span"),o.\u0275\u0275element(1,"ds-themed-loading"),o.\u0275\u0275elementEnd())}function zi(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"span"),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",u.getSelectedCcLicense().name," ")}}function ar(w,_){1&w&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementContainerEnd()),2&w&&(o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(2,1,"submission.sections.ccLicense.change")," "))}function Rs(w,_){1&w&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementContainerEnd()),2&w&&(o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(2,1,"submission.sections.ccLicense.select")," "))}function ks(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"span"),o.\u0275\u0275template(1,ar,3,3,"ng-container",3),o.\u0275\u0275template(2,Rs,3,3,"ng-container",3),o.\u0275\u0275elementEnd()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",u.storedCcLicenseLink),o.\u
10275\u0275advance(1),o.\u0275\u0275property("ngIf",!u.storedCcLicenseLink)}}function lr(w,_){1&w&&(o.\u0275\u0275elementStart(0,"button",7),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementEnd()),2&w&&(o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(2,1,"submission.sections.ccLicense.none")," "))}function pr(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"button",8),o.\u0275\u0275listener("click",function(){const de=o.\u0275\u0275restoreView(u).$implicit,be=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(be.selectCcLicense(de))}),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()}if(2&w){const u=_.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",u.name," ")}}function Xn(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",10)(1,"h5"),o.\u0275\u0275text(2),o.\u0275\u0275elementEnd(),o.\u0275\u0275element(3,"div",21),o.\u0275\u0275elementEnd()),2&w){const u=_.$implicit;o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate1(" ",u.label," "),o.\u0275\u0275advance(1),o.\u0275\u0275property("innerHTML",u.description,o.\u0275\u0275sanitizeHtml)}}function dr(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div")(1,"div",16)(2,"div")(3,"h4"),o.\u0275\u0275text(4),o.\u0275\u0275elementEnd(),o.\u0275\u0275element(5,"div",17),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(6,"button",18),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(u);const L=o.\u0275\u0275nextContext(3);return o.\u0275\u0275resetView(L.closeInfoModal())}),o.\u0275\u0275elementStart(7,"span",19),o.\u0275\u0275text(8,"\xd7"),o.\u0275\u0275elementEnd()()(),o.\u0275\u0275elementStart(9,"div",20),o.\u0275\u0275template(10,Xn,4,2,"div",9),o.\u0275\u0275elementEnd()()}if(2&w){const u=o.\u0275\u0275nextContext().$implicit;o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",u.label," "),o.\u0275\u0275advance(1),o.\u0275\u0275property("innerHTML",u.description,o.\u0275\u0275sanitizeHtml),o.\u0275\u0275advance(5),o.\u0275\u0275property("ngForOf",u.enums)}}function cr(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"span"),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&w){const u=o.\u0275\u0275nextContext().ngVar;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",u.label," ")}}function Ls(w,_){1&w&&(o.\u0275\u0275elementStart(0,"span"),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementEnd()),2&w&&(o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(2,1,"submission.sections.ccLicense.option.select")," "))}function ur(w,_){if(1&w&&(o.\u0275\u0275elementContainerStart(0,2),o.\u0275\u0275template(1,cr,2,1,"span",3),o.\u0275\u0275template(2,Ls,3,3,"span",3),o.\u0275\u0275elementContainerEnd()),2&w){const u=_.ngVar;o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",u),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!u)}}function Yn(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"button",8),o.\u0275\u0275listener("click",function(){const de=o.\u0275\u0275restoreView(u).$implicit,be=o.\u0275\u0275nextContext(2).$implicit,Oe=o.\u0275\u0275nextContext(2);return o.\u0275\u0275resetView(Oe.selectOption(Oe.getSelectedCcLicense(),be,de))}),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()}if(2&w){const u=_.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",u.label," ")}}function js(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"ds-select",1),o.\u0275\u0275template(1,ur,3,2,"ng-container",22),o.\u0275\u0275elementContainerStart(2,4),o.\u0275\u0275elementStart(3,"div",23),o.\u0275\u0275template(4,Yn,2,1,"button",6),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementContainerEnd(),o.\u0275\u0275elementEnd()),2&w){const u=o.\u0275\u0275nextContext().$implicit,E=o.\u0275\u0275nextContext(2);o.\u0275\u0275property("disabled","jurisdiction"===u.id&&void 0!==E.defaultJurisdiction&&"none"!==E.defaultJurisdiction),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngVar",E.getSelectedOption(E.getSelectedCcLicense(),u)),o.\u
10275\u0275advance(3),o.\u0275\u0275property("ngForOf",u.enums)}}function hr(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",25)(1,"div",26),o.\u0275\u0275listener("click",function(){const de=o.\u0275\u0275restoreView(u).$implicit,be=o.\u0275\u0275nextContext(2).$implicit,Oe=o.\u0275\u0275nextContext(2);return o.\u0275\u0275resetView(Oe.selectOption(Oe.getSelectedCcLicense(),be,de))}),o.\u0275\u0275element(2,"input",27),o.\u0275\u0275elementStart(3,"span"),o.\u0275\u0275text(4),o.\u0275\u0275elementEnd()()()}if(2&w){const u=_.$implicit,E=o.\u0275\u0275nextContext(2).$implicit,L=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(2),o.\u0275\u0275propertyInterpolate("title",u.label),o.\u0275\u0275property("checked",L.isSelectedOption(L.getSelectedCcLicense(),E,u)),o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate(u.label)}}function mr(w,_){if(1&w&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,hr,5,3,"div",24),o.\u0275\u0275elementContainerEnd()),2&w){const u=o.\u0275\u0275nextContext().$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",u.enums)}}function fr(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",10)(1,"div",11)(2,"div"),o.\u0275\u0275text(3),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(4,"button",12),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(u);const L=o.\u0275\u0275reference(7),de=o.\u0275\u0275nextContext(2);return o.\u0275\u0275resetView(de.openInfoModal(L))}),o.\u0275\u0275element(5,"i",13),o.\u0275\u0275elementEnd()(),o.\u0275\u0275template(6,dr,11,3,"ng-template",null,14,o.\u0275\u0275templateRefExtractor),o.\u0275\u0275template(8,js,5,3,"ds-select",15),o.\u0275\u0275template(9,mr,2,1,"ng-container",3),o.\u0275\u0275elementEnd()}if(2&w){const u=_.$implicit;o.\u0275\u0275advance(2),o.\u0275\u0275classMapInterpolate1("font-weight-bold ",u.id,""),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",u.label," "),o.\u0275\u0275advance(5),o.\u0275\u0275property("ngIf",(null==u.enums?null:u.enums.length)>5),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",(null==u.enums?null:u.enums.length)<=5)}}function lp(w,_){if(1&w&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,fr,10,6,"div",9),o.\u0275\u0275elementContainerEnd()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",u.getSelectedCcLicense().fields)}}function zs(w,_){1&w&&(o.\u0275\u0275elementStart(0,"div"),o.\u0275\u0275element(1,"ds-themed-loading"),o.\u0275\u0275elementEnd())}function Ns(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",29)(1,"div"),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(4,"a",30),o.\u0275\u0275text(5),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(6,"div",31)(7,"div",26),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(u);const L=o.\u0275\u0275nextContext(2);return o.\u0275\u0275resetView(L.setAccepted(!L.accepted))}),o.\u0275\u0275element(8,"input",32),o.\u0275\u0275elementStart(9,"span"),o.\u0275\u0275text(10),o.\u0275\u0275pipe(11,"translate"),o.\u0275\u0275elementEnd()()()()}if(2&w){const u=o.\u0275\u0275nextContext().ngIf,E=o.\u0275\u0275nextContext();o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(3,5,"submission.sections.ccLicense.link")," "),o.\u0275\u0275advance(2),o.\u0275\u0275propertyInterpolate("href",u,o.\u0275\u0275sanitizeUrl),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",u," "),o.\u0275\u0275advance(3),o.\u0275\u0275property("checked",E.accepted),o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(11,7,"submission.sections.ccLicense.confirmation"),"")}}function Ws(w,_){if(1&w&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,zs,2,0,"div",3),o.\u0275\u0275template(2,Ns,12,9,"div",28),o.\u0275\u0275elementContainerEnd()),2&w){const u=_.ngIf;o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!u),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",u)}}let ci=((vi=class extends S.v{constructor(_,u,E,L,de,be,Oe,ze,Ge){super(Oe,ze,Ge),this.modalService=_,this.sectionService=u,this.submissionCcLicensesDataService=E,this.submissionCcLicenseUrlDataService=L,this.operationsBuilder=de,this.configService=be,this.injectedCollectionId=Oe,this.injectedSectionData=ze,this.injectedSubmissionId=Ge,this.isLoading=!0,this.subscriptions=[]}get storedCcLicenseLink(){return this.data.uri}get accepted(){return void 0===this.data.accepted?!!this.data.uri:this.data.accepted}ngOnInit(){super.ngOnInit(),(0,K.xI)(this.ccLicenseLink$)&&(this.ccLicenseLink$=this.getCcLicenseLink$())}ngOnChanges(_){((0,K.Uh)(_.sectionData)||(0,K.Uh)(_.submissionCcLicenses))&&(this.ccLicenseLink$=this.getCcLicenseLink$())}get data(){return this.sectionData.data}
1selectCcLicense(_){this.getSelectedCcLicense()&&this.getSelectedCcLicense().id===_.id||(this.setAccepted(!1),this.updateSectionData({ccLicense:{id:_.id,fields:{}},uri:void 0}),this.ccLicenseLink$=this.getCcLicenseLink$())}getSelectedCcLicense(){return this.submissionCcLicenses&&this.data.ccLicense?this.submissionCcLicenses.filter(_=>_.id===this.data.ccLicense.id)[0]:null}selectOption(_,u,E){this.isSelectedOption(_,u,E)||(this.updateSectionData({ccLicense:{id:_.id,fields:Object.assign({},this.data.ccLicense.fields,{[u.id]:E})},accepted:!1}),this.ccLicenseLink$=this.getCcLicenseLink$())}getSelectedOption(_,u){return"jurisdiction"===u.id&&void 0!==this.defaultJurisdiction&&"none"!==this.defaultJurisdiction?u.enums.find(E=>E.id===this.defaultJurisdiction):this.data.ccLicense.fields[u.id]}isSelectedOption(_,u,E){return this.getSelectedOption(_,u)&&this.getSelectedOption(_,u).id===E.id}getCcLicenseLink$(){if(this.storedCcLicenseLink)return(0,Dt.of)(this.storedCcLicenseLink);if(!this.getSelectedCcLicense()||this.getSelectedCcLicense().fields.some(u=>!this.getSelectedOption(this.getSelectedCcLicense(),u)))return;const _=this.getSelectedCcLicense();return this.submissionCcLicenseUrlDataService.getCcLicenseLink(_,new Map(_.fields.map(u=>[u,this.getSelectedOption(_,u)])))}openInfoModal(_){this.modalRef=this.modalService.open(_)}closeInfoModal(){this.modalRef.close()}getSectionStatus(){return(0,Dt.of)(this.accepted)}onSectionDestroy(){this.subscriptions.forEach(_=>_.unsubscribe())}onSectionInit(){this.pathCombiner=new te.K("sections",this.sectionData.id),this.subscriptions.push(this.sectionService.getSectionState(this.submissionId,this.sectionData.id,B.i.CcLicense).pipe((0,j.h)(_=>(0,K.UE)(_)&&((0,K.UE)(_.data)||(0,K.UE)(_.errorsToShow))),(0,ae.x)(),(0,O.U)(_=>_.data)).subscribe(_=>{if(this.data.accepted!==_.accepted){const u=this.pathCombiner.getPath("uri");_.accepted?this.getCcLicenseLink$().pipe((0,k.q)(1)).subscribe(E=>{this.operationsBuilder.add(u,E.toString(),!1,!0)}):this.data.uri&&this.operationsBuilder.remove(u)}this.sectionData.data=_}),this.submissionCcLicensesDataService.findAll({elementsPerPage:9999}).pipe((0,Ze.xw)(),(0,Ze.xe)(),(0,O.U)(_=>_.page)).subscribe(_=>this.submissionCcLicenses=_),this.configService.findByPropertyName("cc.license.jurisdiction").pipe((0,Ze.hC)(),(0,Ze.xe)()).subscribe(_=>{this.defaultJurisdiction=void 0===_||0===_.values.length?"":_.values[0]}))}setAccepted(_){this.updateSectionData({accepted:_}),this.updateSectionStatus()}updateSectionData(_){this.sectionService.updateSectionData(this.submissionId,this.sectionData.id,Object.assign({},this.data,_))}}).\u0275fac=function(_){return new(_||vi)(o.\u0275\u0275directiveInject(ei.FF),o.\u0275\u0275directiveInject(Ce.J),o.\u0275\u0275directiveInject(Qn.I),o.\u0275\u0275directiveInject(Tn.K),o.\u0275\u0275directiveInject(oe.w),o.\u0275\u0275directiveInject(on.i),o.\u0275\u0275directiveInject("collectionIdProvider"),o.\u0275\u0275directiveInject("sectionDataProvider"),o.\u0275\u0275directiveInject("submissionIdProvider"))},vi.\u0275cmp=o.\u0275\u0275defineComponent({type:vi,selectors:[["ds-submission-section-cc-licenses"]],features:[o.\u0275\u0275InheritDefinitionFeature,o.\u0275\u0275NgOnChangesFeature],decls:12,vars:10,consts:[[1,"mb-4","ccLicense-select"],[3,"disabled"],[1,"selection"],[4,"ngIf"],[1,"menu"],["class","dropdown-item disabled",4,"ngIf"],["class","dropdown-item",3,"click",4,"ngFor","ngForOf"],[1,"dropdown-item","disabled"],[1,"dropdown-item",3,"click"],["class","mb-4",4,"ngFor","ngForOf"],[1,"mb-4"],[1,"d-flex","flex-row"],[1,"btn","btn-outline-info","btn-sm","ml-2",3,"click"],[1,"fas","fa-question"],["infoModal",""],[3,"disabled",4,"ngIf"],[1,"modal-header","mb-4"],[3,"innerHTML"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"font-weight-light",3,"innerHTML"],["class","selection",4,"ngVar"],[1,"options-select-menu","overflow-auto"],["class","d-flex flex-row m-1",4,"ngFor","ngForOf"],[1,"d-flex","flex-row","m-1"],[3,"click"],["type","radio",1,"mr-1",3,"title","checked"],["class","mt-2 p-4 bg-light text-dark",4,"ngIf"],[1,"mt-2","p-4","bg-light","text-dark"],["target","_blank","rel","noopener noreferrer",1,"license-link",3,"href"],[1,"m-2"],["type","checkbox","title","accepted",3,"checked"]],template:function(_,u){1&_&&(o.\u0275\u0275elementStart(0,"div",0)(1,"ds-select",1),o.\u0275\u0275elementContainerStart(2,2),o.\u0275\u0275template(3,sr,2,0,"span",3),o.\u0275\u0275template(4,zi,2,1,"span",3),o.\u0275\u0275template(5,ks,3,2,"span",3),o.\u0275\u0275elementContainerEnd(),o.\u0275\u0275elementContainerStart(6,4),o.\u0275\u0275template(7,lr,3,3,"button",5),o.\u
10275\u0275template(8,pr,2,1,"button",6),o.\u0275\u0275elementContainerEnd(),o.\u0275\u0275elementEnd()(),o.\u0275\u0275template(9,lp,2,1,"ng-container",3),o.\u0275\u0275template(10,Ws,3,2,"ng-container",3),o.\u0275\u0275pipe(11,"async")),2&_&&(o.\u0275\u0275advance(1),o.\u0275\u0275property("disabled",!u.submissionCcLicenses),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",!u.submissionCcLicenses),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",u.getSelectedCcLicense()),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",u.submissionCcLicenses&&!u.getSelectedCcLicense()),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",0==(null==u.submissionCcLicenses?null:u.submissionCcLicenses.length)),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",u.submissionCcLicenses),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",u.getSelectedCcLicense()),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",o.\u0275\u0275pipeBind1(11,8,u.ccLicenseLink$)))},dependencies:[Je.sg,Je.O5,As.N,Hn.Z,rr.g,Je.Ov,N.X$],styles:[".options-select-menu[_ngcontent-%COMP%]{max-height:25vh}"]}),vi);ci=(0,f.__decorate)([(0,ne.E)(B.i.CcLicense),(0,f.__metadata)("design:paramtypes",[ei.FF,Ce.J,Qn.I,Tn.K,oe.w,on.i,String,Object,String])],ci);var yr=s(26427),Ks=s(19762),Gs=(s(97359),s(83346),s(13873),s(36424),s(4682));function Zs(w,_){}const Qs=["*"];let Fn=(()=>{class w extends Gs.F{constructor(){super(...arguments),this.inAndOutputNames=["availableAccessConditionOptions","collectionId","collectionPolicyType","configMetadataForm","fileId","fileIndex","fileName","sectionId","submissionId"]}getComponentName(){return"SubmissionSectionUploadFileComponent"}importThemedComponent(u){return s(88402)(`./${u}/app/submission/sections/upload/file/section-upload-file.component`)}importUnthemedComponent(){return Promise.resolve().then(s.bind(s,80434))}}return w.\u0275fac=function(){let _;return function(E){return(_||(_=o.\u0275\u0275getInheritedFactory(w)))(E||w)}}(),w.\u0275cmp=o.\u0275\u0275defineComponent({type:w,selectors:[["ds-themed-submission-upload-section-file"]],inputs:{availableAccessConditionOptions:"availableAccessConditionOptions",collectionId:"collectionId",collectionPolicyType:"collectionPolicyType",configMetadataForm:"configMetadataForm",fileId:"fileId",fileIndex:"fileIndex",fileName:"fileName",sectionId:"sectionId",submissionId:"submissionId"},features:[o.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:Qs,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(u,E){1&u&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275template(0,Zs,0,0,"ng-template",null,0,o.\u0275\u0275templateRefExtractor),o.\u0275\u0275elementStart(2,"div",null,1),o.\u0275\u0275projection(4),o.\u0275\u0275elementEnd())},encapsulation:2}),w})();var rn=s(50867),gr=s(86769);let Jn=(()=>{class w{constructor(u){this.store=u}getAccessesData(u,E){return this.store.select((0,gr.y5)(u,E)).pipe((0,j.h)(L=>(0,K.pT)(L)),(0,ae.x)())}}return w.\u0275fac=function(u){return new(u||w)(o.\u0275\u0275inject(jt.yh))},w.\u0275prov=o.\u0275\u0275defineInjectable({token:w,factory:w.\u0275fac}),w})();const sn={id:"discoverable",name:"discoverable"},an={element:{container:"custom-control custom-checkbox pl-1",control:"custom-control-input",label:"custom-control-label pt-1"}},Xs={id:"accessConditionGroup",group:[]},Un={element:{host:"form-group access-condition-group col",container:"pl-1 pr-1",control:"form-row "}},br={id:"accessCondition",groupFactory:null},dp={grid:{group:"form-row pt-4"}},ui={id:"name",label:"submission.sections.accesses.form.access-condition-label",hint:"submission.sections.accesses.form.access-condition-hint",options:[]},Ys={element:{host:"col-12",label:"col-form-label name-label"}},qn={id:"startDate",label:"submission.sections.accesses.form.from-label",hint:"submission.sections.accesses.form.from-hint",placeholder:"submission.sections.accesses.form.from-placeholder",inline:!1,toggleIcon:"far fa-calendar-alt",relations:[{match:H.O6Y,operator:H.F8e,when:[]}],required:!0,validators:{required:null},errorMessages:{required:"submission.sections.accesses.form.date-required-from"}},vr={element:{label:"col-form-label"},grid:{host:"col-6"}},Js={id:"endDate",label:"submission.sections.accesses.form.until-label",hint:"submission.sections.accesses.form.until-hint",placeholder:"submission.sections.accesses.form.until-placeholder",inline:!1,toggleIcon:"far fa-calendar-alt",relations:[{match:H.O6Y,operator:H.F8e,when:[]}],required:!0,validators:{required:null},errorMessages:{required:"submission.sections.accesses.form.date-required-until"}},_r={element:{label:"col-form-label"},grid:{host:"col-6"}};var Bt,qs=s(10102),xr=s(18005),Sr=s(13604),Cr=s(16066),ea=s(1411);let Ni=((Bt=class extends qs.o{constructor(_,u,E,L){super("submissionaccessoptions",_,u,E,L),this.requestService=_,this.rdbService=u,this.objectCache=E,this.halService=L}findByHref(_,u=!0,E=!0,...L){return super.findByHref(_,u,E,...L)}}).\u0275fac=function(_){return new(_||Bt)(o.\u0275\u0275inject(ht.s),o.\u0275\u0275inject(Cr.Q),o.\u
10275\u0275inject(Ne.a),o.\u0275\u0275inject(xr.q))},Bt.\u0275prov=o.\u0275\u0275defineInjectable({token:Bt,factory:Bt.\u0275fac}),Bt);var zt;Ni=(0,f.__decorate)([(0,ea.cQ)(Sr.MX),(0,f.__metadata)("design:paramtypes",[ht.s,Cr.Q,Ne.a,xr.q])],Ni);const ta=["formRef"];function ia(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"ds-form",1,2),o.\u0275\u0275listener("dfChange",function(L){o.\u0275\u0275restoreView(u);const de=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(de.onChange(L))})("removeArrayItem",function(L){o.\u0275\u0275restoreView(u);const de=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(de.onRemove(L))}),o.\u0275\u0275elementEnd()}if(2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275property("formId",u.formId)("formModel",u.formModel)("displaySubmit",!1)("displayCancel",!1)}}let Mn=((zt=class extends S.v{constructor(_,u,E,L,de,be,Oe,ze,Ge,tt,ye){super(void 0,tt,ye),this.sectionService=_,this.formBuilderService=u,this.accessesConfigService=E,this.accessesService=L,this.formOperationsService=de,this.operationsBuilder=be,this.formService=Oe,this.translate=ze,this.operationsService=Ge,this.injectedSectionData=tt,this.injectedSubmissionId=ye,this.subs=[]}initModelData(_){this.accessesData.accessConditions.forEach((u,E)=>{Array.of("name","startDate","endDate").filter(L=>u.hasOwnProperty(L)&&(0,K.UE)(u[L])).forEach(L=>{const de=this.formBuilderService.findById(L,_,E);if(de)if(de.type===H.VId){const be=new Date(u[L]);de.value={year:be.getUTCFullYear(),month:be.getUTCMonth()+1,day:be.getUTCDate()}}else de.value=u[L]})})}
1onChange(_){if(_.model.type===H.fSU){const u=this.formOperationsService.getFieldPathSegmentedFromChangeEvent(_),E=this.formOperationsService.getFieldValueFromChangeEvent(_);this.operationsBuilder.replace(this.pathCombiner.getPath(u),E.value,!0)}else{if(_.model.id===ui.id){const u=_.control.parent.get("startDate"),E=_.control.parent.get("endDate");u?.markAsUntouched(),E?.markAsUntouched(),u?.setValue(null),E?.setValue(null),_.control.parent.markAsDirty()}this.formService.validateAllFormFields(this.formRef.formGroup),this.formService.isValid(this.formId).pipe((0,k.q)(1),(0,j.h)(u=>u),(0,R.z)(()=>this.formService.getFormData(this.formId)),(0,k.q)(1)).subscribe(u=>{const E=[];u.accessCondition.map(L=>L.accessConditionGroup).filter(L=>(0,K.UE)(L)).forEach(L=>{let de;if(this.availableAccessConditionOptions.filter(be=>(0,K.K0)(L.name)&&be.name===L.name[0].value).forEach(be=>de=be),de){const be=Object.assign({},L);if(be.name=this.retrieveValueFromField(L.name),de.hasStartDate){if(L.startDate){const Oe=this.retrieveValueFromField(L.startDate);be.startDate=(0,De.iV)(Oe)}}else delete be.startDate;if(de.hasEndDate){if(L.endDate){const Oe=this.retrieveValueFromField(L.endDate);be.endDate=(0,De.iV)(Oe)}}else delete be.endDate;E.push(be)}}),this.operationsBuilder.add(this.pathCombiner.getPath("accessConditions"),E,!0)})}}onRemove(_){const E="accessConditions/"+this.formOperationsService.getArrayIndexFromEvent(_);this.operationsBuilder.remove(this.pathCombiner.getPath(E))}onSectionDestroy(){this.subs.filter(_=>(0,K.Uh)(_)).forEach(_=>_.unsubscribe())}onSectionInit(){this.pathCombiner=new te.K("sections",this.sectionData.id),this.formId=this.formService.getUniqueId(this.sectionData.id);const _=this.accessesConfigService.findByHref(this.sectionData.config,!0,!1).pipe((0,Ze.xw)(),(0,O.U)(E=>E.payload)),u=this.accessesService.getAccessesData(this.submissionId,this.sectionData.id);(0,y.a)([_,u]).subscribe(([E,L])=>{this.availableAccessConditionOptions=(0,K.UE)(E.accessConditionOptions)?E.accessConditionOptions:[],this.canChangeDiscoverable=!!E.canChangeDiscoverable,this.accessesData=L,this.formModel=this.buildFileEditForm()})}getSectionStatus(){return(0,Dt.of)(!0)}buildFileEditForm(){const _=[];if(this.canChangeDiscoverable){const Qe=Object.assign({},sn,{label:this.translate.instant("submission.sections.accesses.form.discoverable-label"),hint:this.translate.instant("submission.sections.accesses.form.discoverable-description"),value:this.accessesData.discoverable});_.push(new H.dwp(Qe,an))}const u=Object.assign({},ui),E=Object.assign({},br),L=[];for(const Qe of this.availableAccessConditionOptions)L.push({label:Qe.name,value:Qe.name});u.options=L;const de=[],be=[];let Oe,ze;this.availableAccessConditionOptions.forEach(Qe=>{if(Qe.hasStartDate&&(de.push({id:"name",value:Qe.name}),Qe.maxStartDate)){const Ke=new Date(Qe.maxStartDate);Oe={year:Ke.getUTCFullYear(),month:Ke.getUTCMonth()+1,day:Ke.getUTCDate()}}if(Qe.hasEndDate&&(be.push({id:"name",value:Qe.name}),Qe.maxEndDate)){const Ke=new Date(Qe.maxEndDate);ze={year:Ke.getUTCFullYear(),month:Ke.getUTCMonth()+1,day:Ke.getUTCDate()}}});const Ge={relations:[{match:H.O6Y,operator:H.F8e,when:de}]},tt={relations:[{match:H.O6Y,operator:H.F8e,when:be}]},ye=de.length>0,Ve=be.length>0;return E.groupFactory=()=>{const Qe=new H.nMt(u,Ys),Ke=Object.assign({},qn,Ge);Oe&&(Ke.max=Oe);const Xe=Object.assign({},Js,tt);ze&&(Xe.max=ze);const Qt=new H.oqv(Ke,vr),$i=new H.oqv(Xe,_r),Nt=Object.assign({},Xs);return Nt.group=[Qe],ye&&Nt.group.push(Qt),Ve&&Nt.group.push($i),[new H.S_O(Nt,Un)]},E.initialCount=(0,K.UE)(this.accessesData.accessConditions)?this.accessesData.accessConditions.length:1,_.push(new H.RRz(E,dp)),this.initModelData(_),_}retrieveValueFromField(_){const u=Array.isArray(_)?_[0]:_;return u?u.value:void 0}}).\u0275fac=function(_){return new(_||zt)(o.\u0275\u0275directiveInject(Ce.J),o.\u0275\u0275directiveInject(q.c),o.\u0275\u0275directiveInject(Ni),o.\u0275\u0275directiveInject(Jn),o.\u0275\u0275directiveInject(ge),o.\u0275\u0275directiveInject(oe.w),o.\u0275\u0275directiveInject(T.o),o.\u0275\u0275directiveInject(N.sK),o.\u
10275\u0275directiveInject(nn.E),o.\u0275\u0275directiveInject("sectionDataProvider"),o.\u0275\u0275directiveInject("submissionIdProvider"))},zt.\u0275cmp=o.\u0275\u0275defineComponent({type:zt,selectors:[["ds-section-accesses"]],viewQuery:function(_,u){if(1&_&&o.\u0275\u0275viewQuery(ta,5),2&_){let E;o.\u0275\u0275queryRefresh(E=o.\u0275\u0275loadQuery())&&(u.formRef=E.first)}},features:[o.\u0275\u0275InheritDefinitionFeature],decls:1,vars:1,consts:[[3,"formId","formModel","displaySubmit","displayCancel","dfChange","removeArrayItem",4,"ngIf"],[3,"formId","formModel","displaySubmit","displayCancel","dfChange","removeArrayItem"],["formRef","formComponent"]],template:function(_,u){1&_&&o.\u0275\u0275template(0,ia,2,4,"ds-form",0),2&_&&o.\u0275\u0275property("ngIf",!!u.formModel)},dependencies:[Je.O5,m.U],styles:[".access-condition-group{position:relative;top:-2.3rem;margin-bottom:-2.3rem}"]}),zt);Mn=(0,f.__decorate)([(0,ne.E)(B.i.AccessesCondition),(0,f.__metadata)("design:paramtypes",[Ce.J,q.c,Ni,Jn,ge,oe.w,T.o,N.sK,nn.E,Object,String])],Mn);var wr=s(65244),Ir=s(35841),Er=s(87586);function na(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"span"),o.\u0275\u0275element(1,"i",15),o.\u0275\u0275text(2),o.\u0275\u0275elementEnd()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate2(" ",u.version.embargo.amount," ",null==u.version.embargo?null:u.version.embargo.units[0],"")}}function Dr(w,_){1&w&&(o.\u0275\u0275elementStart(0,"span"),o.\u0275\u0275element(1,"i",15),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd()),2&w&&(o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(3,1,"submission.sections.sherpa.publisher.policy.noembargo"),""))}function Pr(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"span"),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&w){const u=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1("+",u.version.locations.length-1,"")}}function Wi(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"span"),o.\u0275\u0275text(1),o.\u0275\u0275template(2,Pr,2,1,"span",16),o.\u0275\u0275elementEnd()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",u.version.locations[0]," "),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",u.version.locations.length>1)}}function Or(w,_){1&w&&(o.\u0275\u0275elementStart(0,"span"),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementEnd()),2&w&&(o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(2,1,"submission.sections.sherpa.publisher.policy.nolocation")))}function Br(w,_){1&w&&o.\u0275\u0275element(0,"span",17)}function eo(w,_){1&w&&o.\u0275\u0275element(0,"span",18)}function oa(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"p",23),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&w){const u=o.\u0275\u0275nextContext(3);o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate2("",u.version.embargo.amount," ",u.version.embargo.units,"")}}function Tr(w,_){1&w&&(o.\u0275\u0275elementStart(0,"p",23),o.\u0275\u0275text(1),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementEnd()),2&w&&(o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(2,1,"submission.sections.sherpa.publisher.policy.noembargo")))}function Fr(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",21)(1,"div",22)(2,"p",23),o.\u0275\u0275element(3,"i",15),o.\u0275\u0275text(4),o.\u0275\u0275pipe(5,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(6,"div",24),o.\u0275\u0275template(7,oa,2,2,"p",25),o.\u0275\u0275template(8,Tr,3,3,"ng-template",null,26,o.\u0275\u0275templateRefExtractor),o.\u0275\u0275elementEnd()()),2&w){const u=o.\u0275\u0275reference(9),E=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(5,3,"submission.sections.sherpa.publisher.policy.embargo"),""),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngIf",!!E.version.embargo)("ngIfElse",u)}}function Ur(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"p",23),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&w){const u=_.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate(u)}}function ra(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",21)(1,"div",22)(2,"p",23),o.\u0275\u0275element(3,"i",27),o.\u
10275\u0275text(4),o.\u0275\u0275pipe(5,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(6,"div",24),o.\u0275\u0275template(7,Ur,2,1,"p",28),o.\u0275\u0275elementEnd()()),2&w){const u=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(5,2,"submission.sections.sherpa.publisher.policy.license"),""),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngForOf",u.version.licenses)}}function to(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"p",23),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&w){const u=_.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate(u)}}function ln(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",21)(1,"div",22)(2,"p",23),o.\u0275\u0275element(3,"i",29),o.\u0275\u0275text(4),o.\u0275\u0275pipe(5,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(6,"div",24),o.\u0275\u0275template(7,to,2,1,"p",28),o.\u0275\u0275elementEnd()()),2&w){const u=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(5,2,"submission.sections.sherpa.publisher.policy.prerequisites"),""),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngForOf",u.version.prerequisites)}}function sa(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"p",23),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&w){const u=_.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate(u)}}function Mr(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",21)(1,"div",22)(2,"p",23),o.\u0275\u0275element(3,"i",7),o.\u0275\u0275text(4),o.\u0275\u0275pipe(5,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(6,"div",24),o.\u0275\u0275template(7,sa,2,1,"p",28),o.\u0275\u0275elementEnd()()),2&w){const u=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(5,2,"submission.sections.sherpa.publisher.policy.location"),""),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngForOf",u.version.locations)}}function aa(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"p",23),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&w){const u=_.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate(u)}}function la(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",21)(1,"div",22)(2,"p",23),o.\u0275\u0275element(3,"i",30),o.\u0275\u0275text(4),o.\u0275\u0275pipe(5,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(6,"div",24),o.\u0275\u0275template(7,aa,2,1,"p",28),o.\u0275\u0275elementEnd()()),2&w){const u=o.\u0275\u0275nextContext(2);o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(5,2,"submission.sections.sherpa.publisher.policy.conditions"),""),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngForOf",u.version.conditions)}}function pa(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",19),o.\u0275\u0275template(1,Fr,10,5,"div",20),o.\u0275\u0275template(2,ra,8,4,"div",20),o.\u0275\u0275template(3,ln,8,4,"div",20),o.\u0275\u0275template(4,Mr,8,4,"div",20),o.\u0275\u0275template(5,la,8,4,"div",20),o.\u0275\u0275elementEnd()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==u.version||!u.version.embargo||null==u.version||!u.version.embargo.amount)),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==u.version||!u.version.licenses)&&u.version.licenses.length>0),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==u.version||!u.version.prerequisites)&&u.version.prerequisites.length>0),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==u.version||!u.version.locations)&&u.version.locations.length>0),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==u.version||!u.version.conditions)&&u.version.conditions.length>0)}}let Ar=(()=>{class w{constructor(){this.isCollapsed=!0}}return w.\u0275fac=function(u){return new(u||w)},w.\u0275cmp=o.\u0275\u0275defineComponent({type:w,selectors:[["ds-content-accordion"]],inputs:{version:"version"},decls:22,vars:15,consts:[["data-test","collapse",1,"mb-3","border-bottom"],[1,"w-100","d-flex","justify-content-between","collapse-toggle",3,"click"],[1,"d-flex"],["type","button","aria-controls","collapseExample",1,"btn","btn-link","p-0","mr-4",3,"click"],[4,"ngIf","ngIfElse"],["noEmbargoTitle",""],[1,"m-1","ml-4"],[1,"far","fa-folder-open"],["noLocations",""],[1,"d-inline-block"],["class","fas fa-chevron-down",4,"ngIf"],["class","fas fa-chevron-up",4,"ngIf"],[3,"ngbCollapse"],["collapse","ngbCollapse"],["class","ml-4",4,"ngIf"],[1,"fas","fa-hourglass-half"],[4,"ngIf"],[1,"fas","fa-chevron-down"],[1,"fas","fa-chevron-up"],[1,"ml-4"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"m-1"],[1,"col-6"],["class","m-1",4,"ngIf","ngIfElse"],["noEmbargo",""],[1,"fas","fa-certificate"],["class","m-1",4,"ngFor","ngForOf"],[1,"fas","fa-exclamation-circle"],[1,"fas","fa-tasks"]],template:function(u,E){if(1&u){const L=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",0)(1,"div",1),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(L);const be=o.\u0275\u0275reference(20);
1return o.\u0275\u0275resetView(be.toggle())}),o.\u0275\u0275elementStart(2,"div",2)(3,"button",3),o.\u0275\u0275listener("click",function(be){return be.preventDefault()}),o.\u0275\u0275text(4),o.\u0275\u0275pipe(5,"titlecase"),o.\u0275\u0275pipe(6,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(7,"div"),o.\u0275\u0275template(8,na,3,2,"span",4),o.\u0275\u0275template(9,Dr,4,3,"ng-template",null,5,o.\u0275\u0275templateRefExtractor),o.\u0275\u0275elementStart(11,"span",6),o.\u0275\u0275element(12,"i",7),o.\u0275\u0275template(13,Wi,3,2,"span",4),o.\u0275\u0275template(14,Or,3,3,"ng-template",null,8,o.\u0275\u0275templateRefExtractor),o.\u0275\u0275elementEnd()()(),o.\u0275\u0275elementStart(16,"div",9),o.\u0275\u0275template(17,Br,1,0,"span",10),o.\u0275\u0275template(18,eo,1,0,"span",11),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(19,"div",12,13),o.\u0275\u0275template(21,pa,6,5,"div",14),o.\u0275\u0275elementEnd()()}if(2&u){const L=o.\u0275\u0275reference(10),de=o.\u0275\u0275reference(15),be=o.\u0275\u0275reference(20);o.\u0275\u0275advance(3),o.\u0275\u0275attribute("aria-expanded",!be.collapsed),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate2(" ",o.\u0275\u0275pipeBind1(5,11,E.version.articleVersion)," ",o.\u0275\u0275pipeBind1(6,13,"submission.sections.sherpa.publisher.policy.version")," "),o.\u0275\u0275advance(4),o.\u0275\u0275property("ngIf",!(null==E.version||!E.version.embargo||null==E.version||!E.version.embargo.amount))("ngIfElse",L),o.\u0275\u0275advance(5),o.\u0275\u0275property("ngIf",!(null==E.version||!E.version.locations)&&E.version.locations.length>0)("ngIfElse",de),o.\u0275\u0275advance(4),o.\u0275\u0275property("ngIf",be.collapsed),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!be.collapsed),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngbCollapse",E.isCollapsed),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngIf",!!E.version)}},dependencies:[Je.sg,Je.O5,ei._D,Je.rS,N.X$]}),w})();function pn(w,_){1&w&&o.\u0275\u0275element(0,"ds-content-accordion",3),2&w&&o.\u0275\u0275property("version",_.$implicit)}function da(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"li")(1,"a",8),o.\u0275\u0275text(2),o.\u0275\u0275elementEnd()()),2&w){const u=_.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275propertyInterpolate("href",u.key,o.\u0275\u0275sanitizeUrl),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate(u.value)}}function Rr(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",4)(1,"div",5)(2,"p",6),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(5,"ul"),o.\u0275\u0275template(6,da,3,2,"li",7),o.\u0275\u0275pipe(7,"keyvalue"),o.\u0275\u0275elementEnd()()()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.publisher.policy.more.information")," "),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngForOf",o.\u0275\u0275pipeBind1(7,4,u.policy.urls))}}let kr=(()=>{class w{constructor(){this.AlertTypeEnum=wr.N}}return w.\u0275fac=function(u){return new(u||w)},w.\u0275cmp=o.\u0275\u0275defineComponent({type:w,selectors:[["ds-publisher-policy"]],inputs:{policy:"policy"},decls:3,vars:2,consts:[[1,"ml-4"],[3,"version",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],[3,"version"],[1,"row"],[1,"col-12"],[1,"m-1"],[4,"ngFor","ngForOf"],["target","_blank","rel","noopener noreferrer",3,"href"]],template:function(u,E){1&u&&(o.\u0275\u0275elementStart(0,"div",0),o.\u0275\u0275template(1,pn,1,1,"ds-content-accordion",1),o.\u0275\u0275template(2,Rr,8,6,"div",2),o.\u0275\u0275elementEnd()),2&u&&(o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",E.policy.permittedVersions),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==E.policy||!E.policy.urls)))},dependencies:[Je.sg,Je.O5,Ar,Je.Nd,N.X$]}),w})();function ca(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"p",4),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&w){const u=_.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1("",u," ")}}function ua(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(5,"div",3),o.\u0275\u0275template(6,ca,2,1,"p",5),o.\u
10275\u0275elementEnd()()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.publication.information.title")),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngForOf",u.journal.titles)}}function io(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"p",4),o.\u0275\u0275text(1),o.\u0275\u0275elementEnd()),2&w){const u=_.$implicit;o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1("",u," ")}}function no(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(5,"div",3),o.\u0275\u0275template(6,io,2,1,"p",5),o.\u0275\u0275elementEnd()()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.publication.information.issns")),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngForOf",u.journal.issns)}}function Lr(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(5,"div",3)(6,"p",4)(7,"a",6),o.\u0275\u0275text(8),o.\u0275\u0275elementEnd()()()()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(4,3,"submission.sections.sherpa.publication.information.url")),o.\u0275\u0275advance(4),o.\u0275\u0275propertyInterpolate("href",u.journal.url,o.\u0275\u0275sanitizeUrl),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",u.journal.url," ")}}function ha(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",3)(1,"p",4)(2,"a",6),o.\u0275\u0275text(3),o.\u0275\u0275elementEnd()()()),2&w){const u=_.$implicit;o.\u0275\u0275advance(2),o.\u0275\u0275propertyInterpolate("href",u.uri,o.\u0275\u0275sanitizeUrl),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",u.name," ")}}function ma(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275template(5,ha,4,2,"div",7),o.\u
10275\u0275elementEnd()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.publication.information.publishers")),o.\u0275\u0275advance(2),o.\u0275\u0275property("ngForOf",u.journal.publishers)}}function dn(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(5,"div",3)(6,"p",4),o.\u0275\u0275text(7),o.\u0275\u0275elementEnd()()()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.publication.information.romeoPub")),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",u.journal.romeoPub," ")}}function oo(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(5,"div",3)(6,"p",4),o.\u0275\u0275text(7),o.\u0275\u0275elementEnd()()()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.publication.information.zetoPub")),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1(" ",u.journal.zetoPub," ")}}let ro=(()=>{class w{}return w.\u0275fac=function(u){return new(u||w)},w.\u0275cmp=o.\u0275\u0275defineComponent({type:w,selectors:[["ds-publication-information"]],inputs:{journal:"journal"},decls:7,vars:6,consts:[[1,"ml-4"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"m-1"],["class","m-1",4,"ngFor","ngForOf"],["target","_blank","rel","noopener noreferrer",3,"href"],["class","col-4",4,"ngFor","ngForOf"]],template:function(u,E){1&u&&(o.\u0275\u0275elementStart(0,"div",0),o.\u0275\u0275template(1,ua,7,4,"div",1),o.\u0275\u0275template(2,no,7,4,"div",1),o.\u0275\u0275template(3,Lr,9,5,"div",1),o.\u0275\u0275template(4,ma,6,4,"div",1),o.\u0275\u0275template(5,dn,8,4,"div",1),o.\u0275\u0275template(6,oo,8,4,"div",1),o.\u0275\u0275elementEnd()),2&u&&(o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==E.journal||!E.journal.titles)&&E.journal.titles.length>0),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==E.journal||!E.journal.issns)&&E.journal.issns.length>0),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==E.journal||!E.journal.url)),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==E.journal||!E.journal.publishers)&&E.journal.publishers.length>0),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==E.journal||!E.journal.romeoPub)),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==E.journal||!E.journal.zetoPub)))},dependencies:[Je.sg,Je.O5,N.X$]}),w})();function so(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(5,"div",5)(6,"p",4),o.\u0275\u0275text(7),o.\u0275\u0275elementEnd()()()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.record.information.id")),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1("",u.metadata.id," ")}}function fa(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(5,"div",5)(6,"p",4),o.\u0275\u0275text(7),o.\u0275\u0275pipe(8,"date"),o.\u0275\u0275elementEnd()()()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.record.information.date.created")),o.\u0275\u0275advance(4),o.\u0275\u0275textInterpolate1("",o.\u0275\u0275pipeBind2(8,4,u.metadata.dateCreated,"d MMMM Y H:mm:ss zzzz")," ")}}function ya(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(5,"div",5)(6,"p",4),o.\u0275\u0275text(7),o.\u0275\u0275pipe(8,"date"),o.\u0275\u0275elementEnd()()()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(4,2,"submission.sections.sherpa.record.information.date.modified")),o.\u
10275\u0275advance(4),o.\u0275\u0275textInterpolate1("",o.\u0275\u0275pipeBind2(8,4,u.metadata.dateModified,"d MMMM Y H:mm:ss zzzz")," ")}}function ga(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div",2)(1,"div",3)(2,"p",4),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(5,"div",5)(6,"p",4)(7,"a",6),o.\u0275\u0275text(8),o.\u0275\u0275elementEnd()()()()),2&w){const u=o.\u0275\u0275nextContext();o.\u0275\u0275advance(3),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(4,3,"submission.sections.sherpa.record.information.uri")),o.\u0275\u0275advance(4),o.\u0275\u0275property("href",u.metadata.uri,o.\u0275\u0275sanitizeUrl),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate(u.metadata.uri)}}let jr=(()=>{class w{}return w.\u0275fac=function(u){return new(u||w)},w.\u0275cmp=o.\u0275\u0275defineComponent({type:w,selectors:[["ds-metadata-information"]],inputs:{metadata:"metadata"},decls:5,vars:4,consts:[[1,"ml-4"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"m-1"],[1,"col-8"],["target","_blank",3,"href"]],template:function(u,E){1&u&&(o.\u0275\u0275elementStart(0,"div",0),o.\u0275\u0275template(1,so,8,4,"div",1),o.\u0275\u0275template(2,fa,9,7,"div",1),o.\u0275\u0275template(3,ya,9,7,"div",1),o.\u0275\u0275template(4,ga,9,5,"div",1),o.\u0275\u0275elementEnd()),2&u&&(o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==E.metadata||!E.metadata.id)),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==E.metadata||!E.metadata.dateCreated)),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==E.metadata||!E.metadata.dateModified)),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!(null==E.metadata||!E.metadata.uri)))},dependencies:[Je.O5,Je.uU,N.X$]}),w})();var Ki;function ba(w,_){1&w&&o.\u0275\u0275element(0,"ds-alert",3),2&w&&o.\u0275\u0275property("type","alert-info")("content","submission.sections.sherpa-policy.title-empty")}function zr(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",4)(1,"ds-alert",5),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(4,"div")(5,"button",6),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(u);const L=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(L.refresh())}),o.\u0275\u0275elementStart(6,"span"),o.\u0275\u0275element(7,"i",7),o.\u0275\u0275text(8),o.\u0275\u0275pipe(9,"translate"),o.\u0275\u0275elementEnd()()()()}2&w&&(o.\u0275\u0275advance(1),o.\u0275\u0275property("type","alert-info"),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(3,3,"submission.sections.sherpa.publisher.policy.description")," "),o.\u0275\u0275advance(6),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(9,5,"submission.sections.sherpa.publisher.policy.refresh")," "))}function va(w,_){1&w&&o.\u0275\u0275element(0,"span",21)}function _a(w,_){1&w&&o.\u0275\u0275element(0,"span",22)}function xa(w,_){1&w&&o.\u0275\u0275element(0,"span",21)}function Sa(w,_){1&w&&o.\u0275\u0275element(0,"span",22)}function cn(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",10)(1,"div",11),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(u);const L=o.\u0275\u0275reference(9);return o.\u0275\u0275resetView(L.toggle())}),o.\u0275\u0275elementStart(2,"button",12),o.\u0275\u0275listener("click",function(L){return L.preventDefault()}),o.\u0275\u0275text(3),o.\u0275\u0275pipe(4,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(5,"div",13),o.\u0275\u0275template(6,xa,1,0,"span",14),o.\u0275\u0275template(7,Sa,1,0,"span",15),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(8,"div",16,17),o.\u0275\u0275element(10,"ds-publisher-policy",23),o.\u0275\u0275elementEnd()()}if(2&w){const u=_.$implicit,E=o.\u0275\u0275reference(9),L=o.\u0275\u0275nextContext(4);o.\u0275\u0275advance(2),o.\u0275\u0275attribute("aria-expanded",!E.collapsed),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(4,6,"submission.sections.sherpa.publisher.policy")," "),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngIf",E.collapsed),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!E.collapsed),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngbCollapse",L.isCollapsed),o.\u0275\u0275advance(2),o.\u0275\u0275property("policy",u)}}function Ca(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275elementStart(1,"div",10)(2,"div",11),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(u);const L=o.\u0275\u0275reference(10);
1return o.\u0275\u0275resetView(L.toggle())}),o.\u0275\u0275elementStart(3,"button",12),o.\u0275\u0275listener("click",function(L){return L.preventDefault()}),o.\u0275\u0275text(4),o.\u0275\u0275pipe(5,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(6,"div",13),o.\u0275\u0275template(7,va,1,0,"span",14),o.\u0275\u0275template(8,_a,1,0,"span",15),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(9,"div",16,17),o.\u0275\u0275element(11,"ds-publication-information",19),o.\u0275\u0275elementEnd()(),o.\u0275\u0275template(12,cn,11,8,"div",20),o.\u0275\u0275elementContainerEnd()}if(2&w){const u=_.$implicit,E=o.\u0275\u0275reference(10),L=o.\u0275\u0275nextContext(3);o.\u0275\u0275advance(3),o.\u0275\u0275attribute("aria-expanded",!E.collapsed),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(5,7,"submission.sections.sherpa.publication.information")," "),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngIf",E.collapsed),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!E.collapsed),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngbCollapse",L.isCollapsed),o.\u0275\u0275advance(2),o.\u0275\u0275property("journal",u),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",u.policies)}}function Nr(w,_){1&w&&o.\u0275\u0275element(0,"span",21)}function wa(w,_){1&w&&o.\u0275\u0275element(0,"span",22)}function Ia(w,_){if(1&w){const u=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,Ca,13,9,"ng-container",9),o.\u0275\u0275elementStart(2,"div",10)(3,"div",11),o.\u0275\u0275listener("click",function(){o.\u0275\u0275restoreView(u);const L=o.\u0275\u0275reference(11);return o.\u0275\u0275resetView(L.toggle())}),o.\u0275\u0275elementStart(4,"button",12),o.\u0275\u0275listener("click",function(L){return L.preventDefault()}),o.\u0275\u0275text(5),o.\u0275\u0275pipe(6,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(7,"div",13),o.\u0275\u0275template(8,Nr,1,0,"span",14),o.\u0275\u0275template(9,wa,1,0,"span",15),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementStart(10,"div",16,17),o.\u0275\u0275element(12,"ds-metadata-information",18),o.\u0275\u0275elementEnd()(),o.\u0275\u0275elementContainerEnd()}if(2&w){const u=o.\u0275\u0275reference(11),E=o.\u0275\u0275nextContext().ngVar,L=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngForOf",E.journals),o.\u0275\u0275advance(3),o.\u0275\u0275attribute("aria-expanded",!u.collapsed),o.\u0275\u0275advance(1),o.\u0275\u0275textInterpolate1(" ",o.\u0275\u0275pipeBind1(6,7,"submission.sections.sherpa.record.information")," "),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngIf",u.collapsed),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!u.collapsed),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngbCollapse",L.isCollapsed),o.\u0275\u0275advance(2),o.\u0275\u0275property("metadata",E.metadata)}}function Ea(w,_){if(1&w&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275element(1,"ds-alert",3),o.\u0275\u0275pipe(2,"translate"),o.\u0275\u0275elementContainerEnd()),2&w){const u=o.\u0275\u0275nextContext().ngVar,E=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("type",E.AlertTypeEnum.Error)("content",u.message?u.message:o.\u0275\u0275pipeBind1(2,2,"submission.sections.sherpa.error.message"))}}function Wr(w,_){if(1&w&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,Ia,13,9,"ng-container",8),o.\u0275\u0275template(2,Ea,3,4,"ng-container",8),o.\u0275\u0275elementContainerEnd()),2&w){const u=_.ngVar,E=o.\u0275\u0275nextContext();o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!E.hasNoData()&&!!u&&!u.error),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!!u&&u.error)}}let _i=((Ki=class extends S.v{constructor(_,u,E,L,de){super(void 0,L,de),this.sectionService=_,this.operationsBuilder=u,this.submissionService=E,this.injectedSectionData=L,this.injectedSubmissionId=de,this.sherpaPoliciesData$=new Ir.X(null),this.subs=[],this.isCollapsed=!1,this.AlertTypeEnum=wr.N}onSectionDestroy(){this.subs.filter(_=>
1(0,K.Uh)(_)).forEach(_=>_.unsubscribe())}onSectionInit(){this.pathCombiner=new te.K("sections",this.sectionData.id),this.subs.push(this.sectionService.getSectionData(this.submissionId,this.sectionData.id,this.sectionData.sectionType).subscribe(_=>{this.sherpaPoliciesData$.next(_)}))}getSectionStatus(){return(0,Dt.of)(!0)}hasNoData(){return(0,K.xb)(this.sherpaPoliciesData$.value)}refresh(){this.operationsBuilder.remove(this.pathCombiner.getPath("retrievalTime")),this.submissionService.dispatchSaveSection(this.submissionId,this.sectionData.id)}}).\u0275fac=function(_){return new(_||Ki)(o.\u0275\u0275directiveInject(Ce.J),o.\u0275\u0275directiveInject(oe.w),o.\u0275\u0275directiveInject($.b),o.\u0275\u0275directiveInject("sectionDataProvider"),o.\u0275\u0275directiveInject("submissionIdProvider"))},Ki.\u0275cmp=o.\u0275\u0275defineComponent({type:Ki,selectors:[["ds-section-sherpa-policies"]],features:[o.\u0275\u0275InheritDefinitionFeature],decls:4,vars:5,consts:[[3,"type","content",4,"ngIf"],["class","d-flex flex-column flex-nowrap mt-2 mb-4",4,"ngIf"],[4,"ngVar"],[3,"type","content"],[1,"d-flex","flex-column","flex-nowrap","mt-2","mb-4"],[3,"type"],["type","button","data-test","refresh-btn",1,"btn","btn-secondary","float-right",3,"click"],[1,"fas","fa-sync"],[4,"ngIf"],[4,"ngFor","ngForOf"],["data-test","collapse",1,"mb-3","border-bottom"],[1,"w-100","d-flex","justify-content-between","collapse-toggle","mb-3",3,"click"],["type","button","aria-controls","collapseExample",1,"btn","btn-link","p-0",3,"click"],[1,"d-inline-block"],["class","fas fa-chevron-down",4,"ngIf"],["class","fas fa-chevron-up",4,"ngIf"],[3,"ngbCollapse"],["collapse","ngbCollapse"],[3,"metadata"],[3,"journal"],["class","mb-3 border-bottom","data-test","collapse",4,"ngFor","ngForOf"],[1,"fas","fa-chevron-down"],[1,"fas","fa-chevron-up"],[3,"policy"]],template:function(_,u){if(1&_&&(o.\u0275\u0275template(0,ba,1,2,"ds-alert",0),o.\u0275\u0275template(1,zr,10,7,"div",1),o.\u0275\u0275template(2,Wr,3,2,"ng-container",2),o.\u0275\u0275pipe(3,"async")),2&_){let E;o.\u0275\u0275property("ngIf",u.hasNoData()),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",!u.hasNoData()),o.\u0275\u0275advance(1),o.\u0275\u0275property("ngVar",null==(E=o.\u0275\u0275pipeBind1(3,3,u.sherpaPoliciesData$))?null:E.sherpaResponse)}},dependencies:[Je.sg,Je.O5,ei._D,Er.w,rr.g,kr,ro,jr,Je.Ov,N.X$]}),Ki);_i=(0,f.__decorate)([(0,ne.E)(B.i.SherpaPolicies),(0,f.__metadata)("design:paramtypes",[Ce.J,oe.w,$.b,Object,String])],_i);var xi,Da=s(89716);function Pa(w,_){if(1&w&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275elementStart(1,"li"),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementContainerEnd()),2&w){const u=o.\u0275\u0275nextContext().$implicit;o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate2("",o.\u0275\u0275pipeBind1(3,2,"submission.sections.identifiers."+u.identifierType+"_label")," ",u.value," ")}}function Oa(w,_){if(1&w&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,Pa,4,4,"ng-container",0),o.\u0275\u0275elementContainerEnd()),2&w){const u=_.$implicit,E=o.\u0275\u0275nextContext(2).ngIf;o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",E.displayTypes.includes(u.identifierType)&&u.value)}}function Ba(w,_){if(1&w&&(o.\u0275\u0275elementStart(0,"div")(1,"span"),o.\u0275\u0275text(2),o.\u0275\u0275pipe(3,"translate"),o.\u0275\u0275elementEnd(),o.\u0275\u0275elementStart(4,"ul"),o.\u0275\u0275template(5,Oa,2,1,"ng-container",1),o.\u0275\u0275elementEnd()()),2&w){const u=o.\u0275\u0275nextContext().ngIf;o.\u0275\u0275advance(2),o.\u0275\u0275textInterpolate(o.\u0275\u0275pipeBind1(3,2,"submission.sections.identifiers.info")),o.\u0275\u0275advance(3),o.\u0275\u0275property("ngForOf",u.identifiers)}}function Kr(w,_){if(1&w&&(o.\u0275\u0275elementContainerStart(0),o.\u0275\u0275template(1,Ba,6,4,"div",0),o.\u0275\u0275elementContainerEnd()),2&w){const u=_.ngIf;
1o.\u0275\u0275advance(1),o.\u0275\u0275property("ngIf",u.identifiers)}}let ao=((xi=class extends S.v{constructor(_,u,E,L,de,be){super(L,de,be),this.translate=_,this.sectionService=u,this.submissionService=E,this.injectedCollectionId=L,this.injectedSectionData=de,this.injectedSubmissionId=be,this.isLoading=!0}onSectionInit(){this.isLoading=!1,this.identifierData$=this.getIdentifierData()}onSectionDestroy(){}getSectionStatus(){return(0,Dt.of)(!this.isLoading)}getIdentifierData(){return this.sectionService.getSectionData(this.submissionId,this.sectionData.id,this.sectionData.sectionType)}}).\u0275fac=function(_){return new(_||xi)(o.\u0275\u0275directiveInject(N.sK),o.\u0275\u0275directiveInject(Ce.J),o.\u0275\u0275directiveInject($.b),o.\u0275\u0275directiveInject("collectionIdProvider"),o.\u0275\u0275directiveInject("sectionDataProvider"),o.\u0275\u0275directiveInject("submissionIdProvider"))},xi.\u0275cmp=o.\u0275\u0275defineComponent({type:xi,selectors:[["ds-submission-section-identifiers"]],features:[o.\u0275\u0275InheritDefinitionFeature],decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngFor","ngForOf"]],template:function(_,u){1&_&&(o.\u0275\u0275template(0,Kr,2,1,"ng-container",0),o.\u0275\u0275pipe(1,"async")),2&_&&o.\u0275\u0275property("ngIf",o.\u0275\u0275pipeBind1(1,1,u.identifierData$))},dependencies:[Je.sg,Je.O5,Je.Ov,N.X$],encapsulation:2}),xi);ao=(0,f.__decorate)([(0,ne.E)(B.i.Identifiers),(0,f.__metadata)("design:paramtypes",[N.sK,Ce.J,$.b,String,Object,String])],ao);s(96528),s(71633),s(63551);const po=[Xo.vk,ki,On,ci,Mn,_i];let Fa=(()=>{class w{static withEntryComponents(){return{ngModule:w,providers:po.map(u=>({provide:u}))}}}return w.\u0275fac=function(u){return new(u||w)},w.\u0275mod=o.\u0275\u0275defineNgModule({type:w}),w.\u0275inj=o.\u0275\u0275defineInjector({providers:[Ds.K,Ce.J,Fs.w,Ni,Jn,ge],imports:[Je.ez,p.IR.forRoot(),I.m,jt.Aw.forFeature("submission",qi.L,Ms.z7),Ae.sQ.forFeature(Es),yr.x.withEntryComponents(),Ks.a.withEntryComponents(),rn.e,ei.bz,ei.lQ,ei.Gs,Da.c,rn.e]}),w})();o.\u0275\u0275setComponentScope(Xo.vk,function(){return[Je.sg,Je.O5,Er.w,ji.O,Fn]},function(){return[Je.Ov,N.X$]})},69653:(Se,Y,s)=>{"use strict";s.r(Y),s.d(Y,{SubmissionSubmitComponent:()=>j});var p=s(35841),I=s(21160),f=s(3358),o=s(45608),y=s(65384),O=s(1579),d=s(10572),R=s(29442),k=s(98678),G=s(67522),ae=s(96342);let j=(()=>{class N{constructor(D,z,le,q,m,T,S,M){this.changeDetectorRef=D,this.notificationsService=z,this.router=le,this.itemDataService=q,this.submissionService=m,this.translate=T,this.viewContainerRef=S,this.route=M,this.itemLink$=new p.X(void 0),this.subs=[],this.route.queryParams.subscribe(K=>{this.collectionParam=K.collection})}ngOnInit(){this.subs.push(this.submissionService.createSubmission(this.collectionParam).subscribe(D=>{(0,o.K0)(D)&&((0,o.xb)(D)?(this.notificationsService.info(null,this.translate.get("submission.general.cannot_submit")),this.router.navigate(["/mydspace"])):this.router.navigate(["/workspaceitems",D.id,"edit"],{replaceUrl:!0}))}),this.itemLink$.pipe((0,o.iy)(),(0,I.w)(D=>this.itemDataService.findByHref(D)),(0,d.g1)(),(0,f.b)(300)).subscribe(D=>{this.item=D.payload,this.changeDetectorRef.detectChanges()}))}ngOnDestroy(){this.subs.filter(D=>(0,o.Uh)(D)).forEach(D=>D.unsubscribe()),this.viewContainerRef.clear(),this.changeDetectorRef.markForCheck()}}return N.\u0275fac=function(D){return new(D||N)(k.\u0275\u0275directiveInject(k.ChangeDetectorRef),k.\u0275\u0275directiveInject(y.T),k.\u0275\u0275directiveInject(G.F0),k.\u0275\u0275directiveInject(R.S),k.\u0275\u0275directiveInject(O.b),k.\u0275\u0275directiveInject(ae.sK),k.\u0275\u0275directiveInject(k.ViewContainerRef),k.\u0275\u0275directiveInject(G.gz))},N.\u0275cmp=k.\u0275\u0275defineComponent({type:N,selectors:[["ds-submission-submit"]],decls:0,vars:0,template:function(D,z){}}),N})()},83346:(Se,Y,s)=>{"use strict";s.d(Y,{Y:()=>y});var p=s(4682),I=s(98678);function f(O,d){}const o=["*"];let y=(()=>{class O extends p.F{getComponentName(){return"SubmissionSubmitComponent"}importThemedComponent(R){return s(39881)(`./${R}/app/submission/submit/submission-submit.component`)}importUnthemedComponent(){return Promise.resolve().then(s.bind(s,69653))}}return O.\u0275fac=function(){let d;
1return function(k){return(d||(d=I.\u0275\u0275getInheritedFactory(O)))(k||O)}}(),O.\u0275cmp=I.\u0275\u0275defineComponent({type:O,selectors:[["ds-themed-submission-submit"]],features:[I.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:o,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(R,k){1&R&&(I.\u0275\u0275projectionDef(),I.\u0275\u0275template(0,f,0,0,"ng-template",null,0,I.\u0275\u0275templateRefExtractor),I.\u0275\u0275elementStart(2,"div",null,1),I.\u0275\u0275projection(4),I.\u0275\u0275elementEnd())},encapsulation:2}),O})()},14297:(Se,Y,s)=>{"use strict";s.d(Y,{Z:()=>y});var p=s(45608);const I=/([^\/]+)/g,f=/\/sections\/(.*)/,y=O=>("string"==typeof O?[O]:O).map(R=>R.match(I)&&R.match(I).length>2?{sectionId:R.match(I)[1],fieldId:R.match(I)[2],fieldIndex:(0,p.Uh)(R.match(I)[3])?+R.match(I)[3]:0,originalPath:R}:{sectionId:R.match(f)[1],originalPath:R})},97176:(Se,Y,s)=>{"use strict";s.d(Y,{Z:()=>f});var p=s(14297);const f=(o=[])=>{const y=Object.create({});return o.forEach(O=>{(0,p.Z)(O.paths).forEach(R=>{const k={path:R.originalPath,message:O.message};y[R.sectionId]||(y[R.sectionId]=[]),y[R.sectionId].push(k)})}),y}},27777:Se=>{"use strict";Se.exports=function(s){if("number"!=typeof s||Number.isNaN(s))throw new TypeError("Expected a number, got "+typeof s);const p=s<0,I=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(p&&(s=-s),s<1)return(p?"-":"")+s+" B";const f=Math.min(Math.floor(Math.log(s)/Math.log(1024)),I.length-1);s=Number(s/1024**f);const o=I[f];return s>=10||s%1==0?`${(p?"-":"")+s.toFixed(0)} ${o}`:`${(p?"-":"")+s.toFixed(1)} ${o}`}},80695:(Se,Y,s)=>{Se.exports=s(62402)},62402:(Se,Y,s)=>{var p=s(39650);Y.operation=function(I){var f=Y.timeouts(I);return new p(f,{forever:I&&(I.forever||I.retries===1/0),unref:I&&I.unref,maxRetryTime:I&&I.maxRetryTime})},Y.timeouts=function(I){if(I instanceof Array)return[].concat(I);var f={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var o in I)f[o]=I[o];if(f.minTimeout>f.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var y=[],O=0;O<f.retries;O++)y.push(this.createTimeout(O,f));return I&&I.forever&&!y.length&&y.push(this.createTimeout(O,f)),y.sort(function(d,R){return d-R}),y},Y.createTimeout=function(I,f){var o=f.randomize?Math.random()+1:1,y=Math.round(o*Math.max(f.minTimeout,1)*Math.pow(f.factor,I));return Math.min(y,f.maxTimeout)},Y.wrap=function(I,f,o){if(f instanceof Array&&(o=f,f=null),!o)for(var y in o=[],I)"function"==typeof I[y]&&o.push(y);for(var O=0;O<o.length;O++){var d=o[O];I[d]=function(G){var ae=Y.operation(f),j=Array.prototype.slice.call(arguments,1),N=j.pop();j.push(function(C){ae.retry(C)||(C&&(arguments[0]=ae.mainError()),N.apply(this,arguments))}),ae.attempt(function(){G.apply(I,j)})}.bind(I,I[d]),I[d].options=f}}},39650:Se=>{function Y(s,p){"boolean"==typeof p&&(p={forever:p}),this._originalTimeouts=JSON.parse(JSON.stringify(s)),this._timeouts=s,this._options=p||{},this._maxRetryTime=p&&p.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}Se.exports=Y,Y.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},Y.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},Y.prototype.retry=function(s){if(this._timeout&&clearTimeout(this._timeout),!s)return!1;var p=(new Date).getTime();if(s&&p-this._operationStart>=this._maxRetryTime)return this._errors.push(s),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(s);var I=this._timeouts.shift();if(void 0===I){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),I=this._cachedTimeouts.slice(-1)}var f=this;return this._timer=setTimeout(function(){f._attempts++,f._operationTimeoutCb&&(f._timeout=setTimeout(function(){f._operationTimeoutCb(f._attempts)},f._operationTimeout),f._options.unref&&f._timeout.unref()),f._fn(f._attempts)},I),this._options.unref&&this._timer.unref(),!0},Y.prototype.attempt=function(s,p){this._fn=s,p&&(p.timeout&&(this._operationTimeout=p.timeout),p.cb&&(this._operationTimeoutCb=p.cb));var I=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){I._operationTimeoutCb()},I._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},Y.prototype.try=function(s){console.log("Using RetryOperation.try() is deprecated"),this.attempt(s)},Y.prototype.start=function(s){console.log("Using RetryOperation.start() is deprecated"),this.attempt(s)},Y.prototype.start=Y.prototype.try,Y.prototype.errors=function(){return this._errors},Y.prototype.attempts=function(){return this._attempts},Y.prototype.mainError=function(){if(0===this._errors.length)return null;for(var s={},p=null,I=0,f=0;f<this._errors.length;f++){var o=this._errors[f],y=o.message,O=(s[y]||0)+1;s[y]=O,O>=I&&(p=o,I=O)}return p}},85822:(Se,Y)=>{var p;!function(){"use strict";var I={}.hasOwnProperty;function o(){for(var y=[],O=0;O<arguments.length;O++){var d=arguments[O];if(d){var R=typeof d;if("string"===R||"number"===R)y.push(d);else if(Array.isArray(d)){if(d.length){var k=o.apply(null,d);k&&y.push(k)}}else if("object"===R){if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]")){y.push(d.toString());continue}for(var G in d)I.call(d,G)&&d[G]&&y.push(G)}}}return y.join(" ")}Se.exports?(o.default=o,Se.exports=o):void 0!==(p=function(){return o}.apply(Y,[]))&&(Se.exports=p)}()},1393:Se=>{Se.exports=function(s,p){if(s===p)return!0;for(var I in s)if(!(I in p))return!1;for(var I in p)if(s[I]!==p[I])return!1;return!0}},68430:(Se,Y,s)=>{var p=s(87111),I=s(90537);Se.exports=function o(y,O,d){var R=!0,k=!0;if("function"!=typeof y)throw new TypeError("Expected a function");return I(d)&&(R="leading"in d?!!d.leading:R,k="trailing"in d?!!d.trailing:k),p(y,O,{leading:R,maxWait:O,trailing:k})}},56246:(Se,Y,s)=>{var p=s(6380),I=s(86667),f=s(40976),o=s(91609),y=I(function(O){return f(p(O,1,o,!0))});Se.exports=y},75004:(Se,Y,s)=>{var p=s(40976);Se.exports=function I(f){return f&&f.length?p(f):[]}},46271:(Se,Y,s)=>{var p=s(6811),I=/[\/\+\.]/;Se.exports=function(f,o){function y(O){var d=p(O,f,I);return d&&d.length>=2}return o?y(o.split(";")[0]):y}},8767:Se=>{Se.exports=function(){var s={},p=s._fns={};return s.emit=function(y,O,d,R,k,G,ae){var j=function I(o){for(var y=p[o]?p[o]:[],O=o.indexOf(":"),d=-1===O?[o]:[o.substring(0,O),o.substring(O+1)],R=Object.keys(p),k=0,G=R.length;k<G;k++){var ae=R[k];if("*"===ae&&(y=y.concat(p[ae])),2===d.length&&d[0]===ae){y=y.concat(p[ae]);break}}return y}(y);j.length&&function f(o,y,O){for(var d=0,R=y.length;d<R&&y[d];d++)y[d].event=o,y[d].apply(y[d],O)}(y,j,[O,d,R,k,G,ae])},s.on=function(y,O){p[y]||(p[y]=[]),p[y].push(O)},s.once=function(y,O){this.on(y,function d(){O.apply(this,arguments),s.off(y,d)})},s.off=function(y,O){var d=[];if(y&&O)for(var R=this._fns[y],k=0,G=R?R.length:0;k<G;k++)R[k]!==O&&d.push(R[k]);d.length?this._fns[y]=d:delete this._fns[y]},s}},15730:Se=>{"use strict";var Y=Object.prototype.hasOwnProperty,s="~";function p(){}function I(O,d,R){this.fn=O,this.context=d,this.once=R||!1}function f(O,d,R,k,G){if("function"!=typeof R)throw new TypeError("The listener must be a function");var ae=new I(R,k||O,G),j=s?s+d:d;return O._events[j]?O._events[j].fn?O._events[j]=[O._events[j],ae]:O._events[j].push(ae):(O._events[j]=ae,O._eventsCount++),O}function o(O,d){0==--O._eventsCount?O._events=new p:delete O._events[d]}function y(){this._events=new p,this._eventsCount=0}Object.create&&(p.prototype=Object.create(null),(new p).__proto__||(s=!1)),y.prototype.eventNames=function(){var R,k,d=[];if(0===this._eventsCount)return d;for(k in R=this._events)Y.call(R,k)&&d.push(s?k.slice(1):k);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(R)
1):d},y.prototype.listeners=function(d){var k=this._events[s?s+d:d];if(!k)return[];if(k.fn)return[k.fn];for(var G=0,ae=k.length,j=new Array(ae);G<ae;G++)j[G]=k[G].fn;return j},y.prototype.listenerCount=function(d){var k=this._events[s?s+d:d];return k?k.fn?1:k.length:0},y.prototype.emit=function(d,R,k,G,ae,j){var N=s?s+d:d;if(!this._events[N])return!1;var z,le,C=this._events[N],D=arguments.length;if(C.fn){switch(C.once&&this.removeListener(d,C.fn,void 0,!0),D){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,R),!0;case 3:return C.fn.call(C.context,R,k),!0;case 4:return C.fn.call(C.context,R,k,G),!0;case 5:return C.fn.call(C.context,R,k,G,ae),!0;case 6:return C.fn.call(C.context,R,k,G,ae,j),!0}for(le=1,z=new Array(D-1);le<D;le++)z[le-1]=arguments[le];C.fn.apply(C.context,z)}else{var m,q=C.length;for(le=0;le<q;le++)switch(C[le].once&&this.removeListener(d,C[le].fn,void 0,!0),D){case 1:C[le].fn.call(C[le].context);break;case 2:C[le].fn.call(C[le].context,R);break;case 3:C[le].fn.call(C[le].context,R,k);break;case 4:C[le].fn.call(C[le].context,R,k,G);break;default:if(!z)for(m=1,z=new Array(D-1);m<D;m++)z[m-1]=arguments[m];C[le].fn.apply(C[le].context,z)}}return!0},y.prototype.on=function(d,R,k){return f(this,d,R,k,!1)},y.prototype.once=function(d,R,k){return f(this,d,R,k,!0)},y.prototype.removeListener=function(d,R,k,G){var ae=s?s+d:d;if(!this._events[ae])return this;if(!R)return o(this,ae),this;var j=this._events[ae];if(j.fn)j.fn===R&&(!G||j.once)&&(!k||j.context===k)&&o(this,ae);else{for(var N=0,C=[],D=j.length;N<D;N++)(j[N].fn!==R||G&&!j[N].once||k&&j[N].context!==k)&&C.push(j[N]);C.length?this._events[ae]=1===C.length?C[0]:C:o(this,ae)}return this},y.prototype.removeAllListeners=function(d){var R;return d?this._events[R=s?s+d:d]&&o(this,R):(this._events=new p,this._eventsCount=0),this},y.prototype.off=y.prototype.removeListener,y.prototype.addListener=y.prototype.on,y.prefixed=s,y.EventEmitter=y,Se.exports=y},57103:(Se,Y)=>{"use strict";var s=Object.prototype.hasOwnProperty;function I(O){try{return decodeURIComponent(O.replace(/\+/g," "))}catch{return null}}function f(O){try{return encodeURIComponent(O)}catch{return null}}Y.stringify=function y(O,d){d=d||"";var k,G,R=[];for(G in"string"!=typeof d&&(d="?"),O)if(s.call(O,G)){if(!(k=O[G])&&(null==k||isNaN(k))&&(k=""),G=f(G),k=f(k),null===G||null===k)continue;R.push(G+"="+k)}return R.length?d+R.join("&"):""},Y.parse=function o(O){for(var k,d=/([^=?#&]+)=?([^&]*)/g,R={};k=d.exec(O);){var G=I(k[1]),ae=I(k[2]);null===G||null===ae||G in R||(R[G]=ae)}return R}},13127:Se=>{"use strict";Se.exports=function(s,p){if(p=p.split(":")[0],!(s=+s))return!1;switch(p){case"http":case"ws":return 80!==s;case"https":case"wss":return 443!==s;case"ftp":return 21!==s;case"gopher":return 70!==s;case"file":return!1}return 0!==s}},47799:(Se,Y,s)=>{"use strict";var p=s(13127),I=s(57103),f=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,y=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,O=/:\d+$/,d=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,R=/^[a-zA-Z]:/;function k(m){return(m||"").toString().replace(f,"")}var G=[["#","hash"],["?","query"],function(T,S){return N(S.protocol)?T.replace(/\\/g,"/"):T},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ae={hash:1,query:1};function j(m){var T;T=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};var te,M={},K=typeof(m=m||T.location||{});if("blob:"===m.protocol)M=new z(unescape(m.pathname),{});else if("string"===K)for(te in M=new z(m,{}),ae)delete M[te];else if("object"===K){for(te in m)te in ae||(M[te]=m[te]);void 0===M.slashes&&(M.slashes=y.test(m.href))}return M}function N(m){return"file:"===m||"ftp:"===m||"http:"===m||"https:"===m||"ws:"===m||"wss:"===m}function C(m,T){m=(m=k(m)).replace(o,""),T=T||{};var ne,S=d.exec(m),M=S[1]?S[1].toLowerCase():"",K=!!S[2],te=!!S[3],J=0;return K?te?(ne=S[2]+S[3]+S[4],J=S[2].length+S[3].length):(ne=S[2]+S[4],J=S[2].length):te?(ne=S[3]+S[4],J=S[3].length):ne=S[4],"file:"===M?J>=2&&(ne=ne.slice(2)):N(M)?ne=S[4]:M?K&&(ne=ne.slice(2)):J>=2&&N(T.protocol)&&(ne=S[4]),{protocol:M,slashes:K||N(M),slashesCount:J,rest:ne}}function z(m,T,S){if(m=(m=k(m)).replace(o,""),!(this instanceof z))return new z(m,T,S);var M,K,te,J,ne,B,$=G.slice(),F=typeof T,P=this,H=0;for("object"!==F&&"string"!==F&&(S=T,T=null),S&&"function"!=typeof S&&(S=I.parse),M=!(K=C(m||"",T=j(T))).protocol&&!K.slashes,P.slashes=K.slashes||M&&T.slashes,P.protocol=K.protocol||T.protocol||"",m=K.rest,("file:"===K.protocol&&(2!==K.slashesCount||R.test(m))||!K.slashes&&(K.protocol||K.slashesCount<2||!N(P.protocol)))&&($[3]=[/(.*)/,"pathname"]);H<$.length;H++)"function"!=typeof(J=$[H])?(B=J[1],(te=J[0])!=te?P[B]=m:"string"==typeof te?~(ne="@"===te?m.lastIndexOf(te):m.indexOf(te))&&("number"==typeof J[2]?(P[B]=m.slice(0,ne),m=m.slice(ne+J[2])):(P[B]=m.slice(ne),m=m.slice(0,ne))):(ne=te.exec(m))&&(P[B]=ne[1],m=m.slice(0,ne.index)),P[B]=P[B]||M&&J[3]&&T[B]||"",J[4]&&(P[B]=P[B].toLowerCase())):m=J(m,P);S&&(P.query=S(P.query)),M&&T.slashes&&"/"!==P.pathname.charAt(0)&&(""!==P.pathname||""!==T.pathname)&&(P.pathname=function D(m,T){if(""===m)return T;for(var S=(T||"/").split("/").slice(0,-1).concat(m.split("/")),M=S.length,K=S[M-1],te=!1,J=0;M--;)"."===S[M]?S.splice(M,1):".."===S[M]?(S.splice(M,1),J++):J&&(0===M&&(te=!0),S.splice(M,1),J--);return te&&S.unshift(""),("."===K||".."===K)&&S.push(""),S.join("/")}(P.pathname,T.pathname)),"/"!==P.pathname.charAt(0)&&N(P.protocol)&&(P.pathname="/"+P.pathname),p(P.port,P.protocol)||(P.host=P.hostname,P.port=""),P.username=P.password="",P.auth&&(~(ne=P.auth.indexOf(":"))?(P.username=P.auth.slice(0,ne),P.username=encodeURIComponent(decodeURIComponent(P.username)),P.password=P.auth.slice(ne+1),P.password=encodeURIComponent(decodeURIComponent(P.password))):P.username=encodeURIComponent(decodeURIComponent(P.auth)),P.auth=P.password?P.username+":"+P.password:P.username),P.origin="file:"!==P.protocol&&N(P.protocol)&&P.host?P.protocol+"//"+P.host:"null",P.href=P.toString()}z.prototype={set:function le(m,T,S){var M=this;switch(m){case"query":"string"==typeof T&&T.length&&(T=(S||I.parse)(T)),M[m]=T;break;case"port":M[m]=T,p(T,M.protocol)?T&&(M.host=M.hostname+":"+T):(M.host=M.hostname,M[m]="");break;case"hostname":M[m]=T,M.port&&(T+=":"+M.port),M.host=T;break;case"host":M[m]=T,O.test(T)?(T=T.split(":"),M.port=T.pop(),M.hostname=T.join(":")):(M.hostname=T,M.port="");break;case"protocol":M.protocol=T.toLowerCase(),M.slashes=!S;break;case"pathname":case"hash":if(T){var K="pathname"===m?"/":"#";M[m]=T.charAt(0)!==K?K+T:T}else M[m]=T;break;case"username":case"password":M[m]=encodeURIComponent(T);break;case"auth":var te=T.indexOf(":");~te?(M.username=T.slice(0,te),M.username=encodeURIComponent(decodeURIComponent(M.username)),M.password=T.slice(te+1),M.password=encodeURIComponent(decodeURIComponent(M.password))):M.username=encodeURIComponent(decodeURIComponent(T))}for(var J=0;J<G.length;J++){var ne=G[J];ne[4]&&(M[ne[1]]=M[ne[1]].toLowerCase())}return M.auth=M.password?M.username+":"+M.password:M.username,M.origin="file:"!==M.protocol&&N(M.protocol)&&M.host?M.protocol+"//"+M.host:"null",M.href=M.toString(),M},toString:function q(m){(!m||"function"!=typeof m)&&(m=I.stringify);var T,S=this,M=S.host,K=S.protocol;K&&":"!==K.charAt(K.length-1)&&(K+=":");var te=K+(S.protocol&&S.slashes||N(S.protocol)?"//":"");return S.username?(te+=S.username,S.password&&(te+=":"+S.password),te+="@"):S.password?(te+=":"+S.password,te+="@"):"file:"!==S.protocol&&N(S.protocol)&&!M&&"/"!==S.pathname&&(te+="@"),(":"===M[M.length-1]||O.test(S.hostname)&&!S.port)&&(M+=":"),te+=M+S.pathname,(T="object"==typeof S.query?m(S.query):S.query)&&(te+="?"!==T.charAt(0)?"?"+T:T),S.hash&&(te+=S.hash),te}},z.extractProtocol=C,z.location=j,z.trimLeft=k,z.qs=I,Se.exports=z},6811:Se=>{"use strict";function Y(s,p){this.text=s=s||"",this.hasWild=~s.indexOf("*"),this.separator=p,this.parts=s.split(p)}Y.prototype.match=function(s){var f,y,p=!0,I=this.parts,o=I.length;if("string"==typeof s||s instanceof String)if(this.hasWild||this.text==s){for(y=(s||"").split(this.separator),f=0;p&&f<o;f++)"*"!==I[f]&&(p=f<y.length&&I[f]===y[f]);p=p&&y}else p=!1;else if("function"==typeof s.splice)for(p=[],f=s.length;f--;)this.match(s[f])&&(p[p.length]=s[f]);else if("object"==typeof s)for(var O in p={},s)this.match(O)&&(p[O]=s[O]);return p},Se.exports=function(s,p,I){var f=new Y(s,I||/[\/\.]/);return typeof p<"u"?f.match(p):f}},8377:(Se,Y,s)=>{var p={"./custom/app/submission/edit/submission-edit.component":[52678,2678]};function I(f){if(!s.o(p,f))return Promise.resolve().then(()=>{var O=new Error("Cannot find module '"+f+"'");throw O.code="MODULE_NOT_FOUND",O});var o=p[f],y=o[0];return s.e(o[1]).then(()=>s(y))}I.keys=()=>Object.keys(p),I.id=8377,Se.exports=I},19978:(Se,Y,s)=>{var p={"./atmire/app/submission/form/submission-form.component":[19524,9524],"./custom/app/submission/form/submission-form.component":[82435,2435]};function I(f){if(!s.o(p,f))return Promise.resolve().then(()=>{var O=new Error("Cannot find module '"+f+"'");throw O.code="MODULE_NOT_FOUND",O});var o=p[f],y=o[0];return s.e(o[1]).then(()=>s(y))}I.keys=()=>Object.keys(p),I.id=19978,Se.exports=I},94470:(Se,Y,s)=>{var p={"./atmire/app/submission/form/submission-upload-files/submission-upload-files.component.ts":[31528,1528],"./custom/app/submission/form/submission-upload-files/submission-upload-files.component.ts":[91057,1057]};function I(f){if(!s.o(p,f))return Promise.resolve().then(()=>{var O=new Error("Cannot find module '"+f+"'");throw O.code="MODULE_NOT_FOUND",O});var o=p[f],y=o[0];return s.e(o[1]).then(()=>s(y))}I.keys=()=>
1Object.keys(p),I.id=94470,Se.exports=I},49252:(Se,Y,s)=>{var p={"./custom/app/submission/import-external/submission-import-external.component":[57094,7094]};function I(f){if(!s.o(p,f))return Promise.resolve().then(()=>{var O=new Error("Cannot find module '"+f+"'");throw O.code="MODULE_NOT_FOUND",O});var o=p[f],y=o[0];return s.e(o[1]).then(()=>s(y))}I.keys=()=>Object.keys(p),I.id=49252,Se.exports=I},88402:(Se,Y,s)=>{var p={"./atmire/app/submission/sections/upload/file/section-upload-file.component":[50906,906],"./custom/app/submission/sections/upload/file/section-upload-file.component":[62285,2285]};function I(f){if(!s.o(p,f))return Promise.resolve().then(()=>{var O=new Error("Cannot find module '"+f+"'");throw O.code="MODULE_NOT_FOUND",O});var o=p[f],y=o[0];return s.e(o[1]).then(()=>s(y))}I.keys=()=>Object.keys(p),I.id=88402,Se.exports=I},13970:Se=>{function Y(s){return Promise.resolve().then(()=>{var p=new Error("Cannot find module '"+s+"'");throw p.code="MODULE_NOT_FOUND",p})}Y.keys=()=>[],Y.resolve=Y,Y.id=13970,Se.exports=Y},39881:(Se,Y,s)=>{var p={"./custom/app/submission/submit/submission-submit.component":[9700,9700]};function I(f){if(!s.o(p,f))return Promise.resolve().then(()=>{var O=new Error("Cannot find module '"+f+"'");throw O.code="MODULE_NOT_FOUND",O});var o=p[f],y=o[0];return s.e(o[1]).then(()=>s(y))}I.keys=()=>Object.keys(p),I.id=39881,Se.exports=I}}]);
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.