@dbp-topics/signature
Version:
[GitLab Repository](https://gitlab.tugraz.at/dbp/esign/signature) | [npmjs package](https://www.npmjs.com/package/@dbp-topics/signature) | [Unpkg CDN](https://unpkg.com/browse/@dbp-topics/signature/) | [Esign Bundle](https://gitlab.tugraz.at/dbp/esign/dbp
416 lines (409 loc) • 34.2 kB
JavaScript
let e,i,t,s,n,a,l,o,d,r,u=e=>e;function c(){return c=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},c.apply(this,arguments)}
/*!
* License: LGPL-2.1-or-later
* Dependencies:
*
* @webcomponents/scoped-custom-element-registry: BSD-3-Clause
* @dbp-toolkit/app-shell: LGPL-2.1-or-later
* @dbp-toolkit/language-select: LGPL-2.1-or-later
* @dbp-toolkit/common: LGPL-2.1-or-later
* @dbp-toolkit/auth: LGPL-2.1-or-later
* event-target-shim: MIT
* @dbp-toolkit/notification: LGPL-2.1-or-later
* @dbp-toolkit/theme-switcher: LGPL-2.1-or-later
* path-to-regexp: MIT
* universal-router: MIT
* generateUrls: MIT
* @dbp-toolkit/matomo: LGPL-2.1-or-later
* @tugraz/web-components: LGPL-2.1-or-later
* @babel/runtime: MIT
* i18next: MIT
* @lit/reactive-element: BSD-3-Clause
* lit-html: BSD-3-Clause
* lit-element: BSD-3-Clause
* @open-wc/dedupe-mixin: MIT
* @open-wc/scoped-elements: MIT
* @digital-blueprint/annotpdf: MIT
* pdfjs-dist: Apache-2.0
* dommatrix: MIT
* web-streams-polyfill: MIT
* @dbp-toolkit/file-handling: LGPL-2.1-or-later
* webdav: MIT
* tabulator-tables: MIT
* jose: MIT
* file-saver: MIT
* jquery: MIT
* select2: MIT
* @dbp-toolkit/resource-select: LGPL-2.1-or-later
*/import{D as h,c as p,A as g,f as b}from"./shared/activity.9b918d92.es.js";import{S as f,f as m,i as v,y as F,I as $,m as y,g as P,a as w,d as q,b as x,n as S,h as A}from"./shared/dbp-lit-element.80eb49d3.es.js";import{F as E,a as k,P as I,g as U,n as C}from"./shared/styles.226a59b2.es.js";import{M as _,o as D,B as L,s as N,J as R}from"./shared/jsonld.78121145.es.js";import{T as B,P as Q}from"./shared/dbp-pdf-annotation-view.3ed0f53e.es.js";var j={element:"dbp-qualified-signature-pdf-upload",module_src:"dbp-qualified-signature-pdf-upload.js",routing_name:"qualified-pdf-upload",name:{de:"Dokument persönlich signieren",en:"Personally sign document"},short_name:{de:"Dokument persönlich signieren",en:"Personally sign document"},description:{de:"Erlaubt das Hochladen von PDF-Dokumenten, um sie mit einer persönlichen elektronischen Signatur zu versehen",en:"Allows upload of PDF-documents to personally sign them"},subscribe:"lang,entry-point-url,nextcloud-web-app-password-url,nextcloud-webdav-url,nextcloud-name,nextcloud-auth-info,nextcloud-file-url,file-handling-enabled-targets,auth,allow-annotating"};class M extends(f(m)){constructor(){super(),this._loading=!1,this.locationCount=0,this.loginPageLoaded=!1,this._onReceiveIframeMessage=this._onReceiveIframeMessage.bind(this)}static get scopedElements(){return{"dbp-mini-spinner":_}}static get properties(){return{_loading:{type:Boolean,attribute:!1},locationCount:{type:Number,attribute:"location-count",reflect:!0},loginPageLoaded:{type:Boolean,attribute:"login-page-loaded",reflect:!0}}}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this._onReceiveIframeMessage)}disconnectedCallback(){window.removeEventListener("message",this._onReceiveIframeMessage),super.disconnectedCallback()}_onReceiveIframeMessage(e){const i=e.data;if("pdf-as-error"===i.type){let e=i.error;i.cause&&(e=`${e}: ${i.cause}`),this.dispatchEvent(new CustomEvent("signature-error",{detail:{message:e}}))}else"pdf-as-callback"===i.type&&this.dispatchEvent(new CustomEvent("signature-done",{detail:{id:i.sessionId}}))}setUrl(e){let i=this.renderRoot.querySelector("#iframe");this._loading=!0,i.src=e,this.locationCount=0}reset(){this.setUrl("about:blank"),this.locationCount=0}static get styles(){return v(e||(e=u`
:host {
display: inline-block;
}
#iframe {
/* "overflow" should not be supported by browsers,
but some seem to use it */
overflow: hidden;
border-width: 0;
width: 100%;
height: 100%;
}
.hidden {
display: none;
}
`))}update(e){e.forEach(((e,i)=>{if("locationCount"===i)this.loginPageLoaded=this.locationCount>1})),super.update(e)}render(){return F(i||(i=u`
${0}
<!-- "scrolling" is deprecated, but still seem to help -->
<iframe
id="iframe"
class=${0}
="${0}"
="${0}"
scrolling="no"></iframe>
`),this._loading?F(t||(t=u`
<dbp-mini-spinner></dbp-mini-spinner>
`)):F(s||(s=u``)),D({hidden:this._loading}),(e=>{this._loading=!1,this.locationCount++}),(e=>{this._loading=!1}))}}class T extends(f(h)){constructor(){super(),this._i18n=p(),this.lang=this._i18n.language,this.entryPointUrl="",this.nextcloudWebAppPasswordURL="",this.nextcloudWebDavURL="",this.nextcloudName="",this.nextcloudFileURL="",this.nextcloudAuthInfo="",this.externalAuthInProgress=!1,this.signedFiles=[],this.signedFilesCount=0,this.signedFilesToDownload=0,this.errorFiles=[],this.errorFilesCount=0,this.uploadStatusFileName="",this.uploadStatusText="",this.currentFile={},this.currentFileName="",this.currentFilePlacementMode="",this.currentFileSignaturePlacement={},this.signingProcessEnabled=!1,this.signingProcessActive=!1,this.signaturePlacementInProgress=!1,this.withSigBlock=!1,this.queuedFilesSignaturePlacements=[],this.queuedFilesPlacementModes=[],this.queuedFilesNeedsPlacement=new Map,this.currentPreviewQueueKey="",this.allowAnnotating=!1,this.queuedFilesAnnotations=[],this.queuedFilesAnnotationModes=[],this.queuedFilesAnnotationsCount=0,this.queuedFilesAnnotationSaved=[],this.queuedFilesEnabledAnnotations=[],this.isAnnotationViewVisible=!1,this.addAnnotationInProgress=!1,this.activity=new g(j),this.fileHandlingEnabledTargets="local",this._onReceiveBeforeUnload=this.onReceiveBeforeUnload.bind(this)}static get scopedElements(){return{"dbp-icon":$,"dbp-file-source":E,"dbp-file-sink":k,"dbp-pdf-preview":I,"dbp-mini-spinner":_,"dbp-button":L,"dbp-textswitch":B,"dbp-pdf-annotation-view":Q,"external-sign-iframe":M}}static get properties(){return c({},super.properties,{lang:{type:String},entryPointUrl:{type:String,attribute:"entry-point-url"},nextcloudWebAppPasswordURL:{type:String,attribute:"nextcloud-web-app-password-url"},nextcloudWebDavURL:{type:String,attribute:"nextcloud-webdav-url"},nextcloudName:{type:String,attribute:"nextcloud-name"},nextcloudFileURL:{type:String,attribute:"nextcloud-file-url"},nextcloudAuthInfo:{type:String,attribute:"nextcloud-auth-info"},signedFiles:{type:Array,attribute:!1},signedFilesCount:{type:Number,attribute:!1},signedFilesToDownload:{type:Number,attribute:!1},queuedFilesCount:{type:Number,attribute:!1},errorFiles:{type:Array,attribute:!1},errorFilesCount:{type:Number,attribute:!1},uploadInProgress:{type:Boolean,attribute:!1},uploadStatusFileName:{type:String,attribute:!1},uploadStatusText:{type:String,attribute:!1},externalAuthInProgress:{type:Boolean,attribute:!1},signingProcessEnabled:{type:Boolean,attribute:!1},signingProcessActive:{type:Boolean,attribute:!1},queueBlockEnabled:{type:Boolean,attribute:!1},currentFile:{type:Object,attribute:!1},currentFileName:{type:String,attribute:!1},signaturePlacementInProgress:{type:Boolean,attribute:!1},withSigBlock:{type:Boolean,attribute:!1},isSignaturePlacement:{type:Boolean,attribute:!1},allowAnnotating:{type:Boolean,attribute:"allow-annotating"},isAnnotationViewVisible:{type:Boolean,attribute:!1},queuedFilesAnnotations:{type:Array,attribute:!1},queuedFilesAnnotationsCount:{type:Number,attribute:!1},addAnnotationInProgress:{type:Boolean,attribute:!1},queuedFilesAnnotationModes:{type:Array,attribute:!1},queuedFilesAnnotationSaved:{type:Array,attribute:!1},fileHandlingEnabledTargets:{type:String,attribute:"file-handling-enabled-targets"}})}connectedCallback(){super.connectedCallback(),setInterval((()=>{this.handleQueuedFiles()}),1e3),window.addEventListener("beforeunload",this._onReceiveBeforeUnload)}disconnectedCallback(){window.removeEventListener("beforeunload",this._onReceiveBeforeUnload),window.removeEventListener("beforeunload",this._onReceiveBeforeUnload),super.disconnectedCallback()}async queueFile(e){let i=await super.queueFile(e);return await this._updateNeedsPlacementStatus(i),this.requestUpdate(),i}async handleQueuedFiles(){const e=this._i18n;if(this.endSigningProcessIfQueueEmpty(),0===this.queuedFilesCount)return void(this.signingProcessEnabled=!1);if(!this.signingProcessEnabled||this.externalAuthInProgress||this.uploadInProgress||this.addAnnotationInProgress)return;this.signaturePlacementInProgress=!1;for(const i of Object.keys(this.queuedFiles)){const t="manual"===this.queuedFilesPlacementModes[i];if(this.queuedFilesNeedsPlacement.get(i)&&!t)return N({body:e.t("error-manual-positioning-missing"),type:"danger",timeout:5}),this.signingProcessEnabled=!1,void(this.signingProcessActive=!1)}const i=Object.keys(this.queuedFiles)[0],t=this.takeFileFromQueue(i).file;this.currentFile=t,this.currentFilePlacementMode=this.queuedFilesPlacementModes[i],this.currentFileSignaturePlacement=this.queuedFilesSignaturePlacements[i],this.uploadInProgress=!0;let s={};if("manual"===this.queuedFilesPlacementModes[i]){const e=this.queuedFilesSignaturePlacements[i];void 0!==e&&(s=b(e))}s.profile="default",this.uploadStatusText=e.t("qualified-pdf-upload.upload-status-file-text",{fileName:t.name,fileSize:y(t.size,!1)});const n=this.isAnnotationsEnabledForKey(i),a=this.takeAnnotationsFromQueue(i);await this.uploadFile(t,s,n?a:[]),this.uploadInProgress=!1}onReceiveBeforeUnload(e){const i=this._i18n;if(0!==this.signedFilesCount){if(!e.isTrusted){if(confirm(i.t("qualified-pdf-upload.confirm-page-leave")))return}e.preventDefault(),e.returnValue=""}}parseError(e){const i=this._i18n;let t=e;return e.includes("SecurityLayer Error: [6001]")||e.includes("SecurityLayer Error: [6000]")?t=i.t("error-cancel-message"):e.includes("SecurityLayer Error: [6002]")&&(t=i.t("error-rights-message")),t}_onIFrameDone(e){const i=e.detail.id;if("string"!=typeof i||i.length<15)return;console.log("Got iframe message for sessionId "+i);const t=this,s=""===this.currentFileName?"mydoc.pdf":this.currentFileName;R.getInstance(this.entryPointUrl).then((e=>{let n;try{n=e.getApiUrlForEntityName("EsignQualifiedlySignedDocument")}catch(i){n=e.getApiUrlForEntityName("QualifiedlySignedDocument")}const a=n+"/"+encodeURIComponent(i)+"?fileName="+encodeURIComponent(s);fetch(a,{headers:{"Content-Type":"application/ld+json",Authorization:"Bearer "+t.auth.token}}).then((e=>{if(t.externalAuthInProgress=!1,this._("#iframe").reset(),this.endSigningProcessIfQueueEmpty(),!e.ok)throw e;return e.json()})).then((e=>{t.signedFiles.push(e),t.signedFilesCount++,this.sendSetPropertyEvent("analytics-event",{category:"QualifiedlySigning",action:"DocumentSigned",name:e.contentSize})})).catch((e=>{let i=this.currentFile;i.json={"hydra:description":"Download failed!"},this.addToErrorFiles(i)}))}),{},t.lang)}_onIFrameError(e){let i=e.detail.message,t=this.currentFile;t.json={"hydra:description":this.parseError(i)},this.addToErrorFiles(t),this._("#iframe").reset(),this.externalAuthInProgress=!1,this.endSigningProcessIfQueueEmpty()}addToErrorFiles(e){this.endSigningProcessIfQueueEmpty(),this.errorFiles[Math.floor(1e6*Math.random())]=e,this.errorFilesCount++,this.sendSetPropertyEvent("analytics-event",{category:"QualifiedlySigning",action:"SigningFailed",name:e.json["hydra:description"]})}onFileUploadFinished(e){if(201!==e.status)this.addToErrorFiles(e);else if("http://schema.org/EntryPoint"===e.json["@type"]){this.externalAuthInProgress=!0;const i=e.json;this.currentFileName=i.name,this.currentFile=e,this._("#iframe").setUrl(i.url)}}update(e){e.forEach(((e,i)=>{switch(i){case"lang":this._i18n.changeLanguage(this.lang);break;case"entryPointUrl":R.getInstance(this.entryPointUrl).then((e=>{let i;try{i=e.getApiUrlForEntityName("EsignQualifiedSigningRequest")}catch(t){i=e.getApiUrlForEntityName("QualifiedSigningRequest")}this.fileSourceUrl=i}))}})),super.update(e)}clearQueuedFiles(){this.queuedFilesSignaturePlacements=[],this.queuedFilesPlacementModes=[],this.queuedFilesNeedsPlacement.clear(),super.clearQueuedFiles()}static get styles(){return v(n||(n=u`
${0}
${0}
${0}
${0}
${0}
#external-auth #iframe {
margin-top: 0.5em;
}
#external-auth .button.is-cancel {
color: var(--dbp-danger);
}
#iframe {
width: 100%;
height: 350px;
/* keeps the A-Trust webpage aligned left */
max-width: 575px;
}
`),P(),w(!1),q(),x(),U())}getQueuedFilesHtml(){const e=Object.keys(this.queuedFiles),i=this._i18n;let t=[];return e.forEach((e=>{const s=this.queuedFiles[e].file,n="manual"===this.queuedFilesPlacementModes[e],o=this.queuedFilesNeedsPlacement.get(e)&&!n;t.push(F(a||(a=u`
<div class="file-block">
<div class="header">
<span class="filename">
<strong>${0}</strong>
(${0})
</span>
<button
class="button close"
?disabled="${0}"
title="${0}"
="${0}">
<dbp-icon name="trash"></dbp-icon>
</button>
</div>
<div class="bottom-line">
<div></div>
<button
class="button"
?disabled="${0}"
="${0}">
${0}
</button>
<span class="headline">${0}:</span>
<dbp-textswitch
name1="auto"
name2="manual"
name="${0}"
class="${0}"
value1="${0}"
value2="${0}"
?disabled="${0}"
=${0}></dbp-textswitch>
<span class="headline ${0}">
${0}:
</span>
<div class="${0}">
<dbp-textswitch
id="annotation-switch"
name1="no-text"
name2="text-selected"
name="${0}"
class="${0}"
value1="${0}"
value2="${0}"
?disabled="${0}"
=${0}></dbp-textswitch>
</div>
</div>
<div class="error-line">
${0}
</div>
</div>
`),s.name,y(s.size),this.signingProcessEnabled,i.t("qualified-pdf-upload.remove-queued-file-button-title"),(()=>{this.takeFileFromQueue(e)}),this.signingProcessEnabled,(()=>{this.showPreview(e)}),i.t("qualified-pdf-upload.show-preview"),i.t("qualified-pdf-upload.positioning"),this.queuedFilesPlacementModes[e]||"auto",D({"placement-missing":o,switch:!0}),i.t("qualified-pdf-upload.positioning-automatic"),i.t("qualified-pdf-upload.positioning-manual"),this.signingProcessEnabled,(i=>this.queuePlacementSwitch(e,i.target.name)),D({hidden:!this.allowAnnotating}),i.t("qualified-pdf-upload.annotation"),D({hidden:!this.allowAnnotating}),this.queuedFilesAnnotationModes[e]||"no-text",D({switch:!0}),i.t("qualified-pdf-upload.annotation-no"),i.t("qualified-pdf-upload.annotation-yes"),this.signingProcessEnabled,(i=>this.showAnnotationView(e,i.target.name)),o?F(l||(l=u`
${0}
`),i.t("label-manual-positioning-missing")):""))})),t}getSignedFilesHtml(){const e=Object.keys(this.signedFiles),i=this._i18n;let t=[];return e.forEach((e=>{const s=this.signedFiles[e];t.push(F(o||(o=u`
<div class="file-block" id="file-block-${0}">
<div class="header">
<span class="filename">
<span class="bold-filename">${0}</span>
(${0})
</span>
<button
class="button"
title="${0}"
="${0}">
<dbp-icon name="download"></dbp-icon>
</button>
</div>
</div>
`),e,s.name,y(s.contentSize),i.t("qualified-pdf-upload.download-file-button-title"),(()=>{this.downloadFileClickHandler(s,"file-block-"+e)})))})),t}getErrorFilesHtml(){const e=Object.keys(this.errorFiles),i=this._i18n;let t=[];return e.forEach((e=>{const s=this.errorFiles[e];void 0!==s.file&&t.push(F(d||(d=u`
<div class="file-block error">
<div class="header">
<span class="filename">
<strong>${0}</strong>
(${0})
</span>
<div class="buttons">
<button
class="button"
title="${0}"
="${0}">
<dbp-icon name="reload"></dbp-icon>
</button>
<button
class="button"
title="${0}"
="${0}">
<dbp-icon name="trash"></dbp-icon>
</button>
</div>
</div>
<div class="bottom-line">
<strong class="error">${0}</strong>
</div>
</div>
`),s.file.name,y(s.file.size),i.t("qualified-pdf-upload.re-upload-file-button-title"),(()=>{this.fileQueueingClickHandler(s.file,e)}),i.t("qualified-pdf-upload.remove-failed-file-button-title"),(()=>{this.takeFailedFileFromQueue(e)}),s.json["hydra:description"]))})),t}hasSignaturePermissions(){return this._hasSignaturePermissions("ROLE_SCOPE_QUALIFIED-SIGNATURE")}async stopSigningProcess(){if(this.externalAuthInProgress&&(this._("#iframe").reset(),this.signingProcessEnabled=!1,this.externalAuthInProgress=!1,this.signingProcessActive=!1,void 0!==this.currentFile.file)){const e=await this.queueFile(this.currentFile.file);this.queuedFilesPlacementModes[e]=this.currentFilePlacementMode,this.queuedFilesSignaturePlacements[e]=this.currentFileSignaturePlacement}}render(){const e=S(C,"qualified-signature-placeholder.png"),i=this._i18n;return F(r||(r=u`
<div
class="${0}">
<div class="field ${0}">
<h2>${0}</h2>
<p class="subheadline">${0}</p>
<div class="control">
<p>${0}</p>
<button
="${0}"
?disabled="${0}"
class="button is-primary">
${0}
</button>
<dbp-file-source
id="file-source"
subscribe="nextcloud-store-session:nextcloud-store-session"
context="${0}"
allowed-mime-types="application/pdf"
enabled-targets="${0}"
nextcloud-auth-url="${0}"
nextcloud-web-dav-url="${0}"
nextcloud-name="${0}"
nextcloud-auth-info="${0}"
nextcloud-file-url="${0}"
decompress-zip
max-file-size="32000"
lang="${0}"
?disabled="${0}"
text="${0}"
button-label="${0}"
-file-source-file-selected="${0}"
-file-source-switched="${0}"></dbp-file-source>
</div>
</div>
<div id="grid-container">
<div class="left-container">
<div
class="files-block field ${0}">
<!-- Queued files headline and queueing spinner -->
<h3
class="${0}">
${0}
</h3>
<!-- Buttons to start/stop signing process and clear queue -->
<div class="control field">
<button
="${0}"
?disabled="${0}"
class="button ${0}">
${0}
</button>
<button
="${0}"
?disabled="${0}"
class="button is-right is-primary ${0}">
${0}
</button>
<!--
<button ="${0}"
?disabled="${0}"
id="cancel-signing-process"
class="button is-right ${0}">
${0}
</button>
-->
</div>
<!-- List of queued files -->
<div
class="control file-list ${0}">
${0}
</div>
<!-- Text "queue empty" -->
<div
class="empty-queue control ${0}">
${0}
<br />
${0}
</div>
</div>
<!-- List of signed PDFs -->
<div
class="files-block field ${0}">
<h3>${0}</h3>
<!-- Button to download all signed PDFs -->
<div class="field ${0}">
<div class="control">
<button ="${0}" class="button">
${0}
</button>
<dbp-button
id="zip-download-button"
value="${0}"
title="${0}"
class="is-right"
="${0}"
type="is-primary"></dbp-button>
</div>
</div>
<div class="control">${0}</div>
</div>
<!-- List of errored files -->
<div
class="files-block error-files field ${0}">
<h3>${0}</h3>
<!-- Button to upload errored files again -->
<div class="field ${0}">
<div class="control">
<button ="${0}" class="button">
${0}
</button>
<dbp-button
id="re-upload-all-button"
?disabled="${0}"
value="${0}"
title="${0}"
class="is-right"
="${0}"
type="is-primary"></dbp-button>
</div>
</div>
<div class="control">${0}</div>
</div>
</div>
<div class="right-container">
<!-- PDF preview -->
<div
id="pdf-preview"
class="field ${0}">
<h3>
${0}
</h3>
<div class="box-header">
<div class="filename">
<strong>${0}</strong>
(${0})
</div>
<button class="is-cancel" ="${0}">
<dbp-icon name="close"></dbp-icon>
</button>
</div>
<dbp-pdf-preview
lang="${0}"
allow-signature-rotation
signature-placeholder-image-src="${0}"
signature-width="80"
signature-height="29"
-pdf-preview-accept="${0}"
-pdf-preview-cancel="${0}"></dbp-pdf-preview>
</div>
<!-- Annotation view -->
<div
id="annotation-view"
class="field ${0}">
<h2>${0}</h2>
<div class="box-header">
<div class="filename">
<strong>
${0}
</strong>
(${0})
</div>
<button
class="is-cancel annotation"
="${0}">
<dbp-icon name="close" id="close-icon"></dbp-icon>
</button>
</div>
<dbp-pdf-annotation-view
lang="${0}"
-pdf-annotations-save="${0}"
-pdf-annotations-cancel="${0}"></dbp-pdf-annotation-view>
</div>
<!-- File upload progress -->
<div
id="upload-progress"
class="field notification is-info ${0}">
<dbp-mini-spinner></dbp-mini-spinner>
<strong>${0}</strong>
${0}
</div>
<!-- External auth -->
<div
id="external-auth"
class="files-block field ${0}">
<h3>${0}</h3>
<div class="box">
<div class="box-header">
<div class="filename">
<strong>${0}</strong>
(${0})
</div>
<button
class="is-cancel"
title="${0}"
="${0}">
<dbp-icon name="close"></dbp-icon>
</button>
</div>
<external-sign-iframe
id="iframe"
-error="${0}"
-done="${0}"></external-sign-iframe>
</div>
</div>
</div>
</div>
</div>
<div
class="notification is-warning ${0}">
${0}
</div>
<div
class="notification is-danger ${0}">
${0}
</div>
<div class="${0}">
<dbp-mini-spinner></dbp-mini-spinner>
</div>
<dbp-file-sink
id="file-sink"
context="${0}"
filename="signed-documents.zip"
subscribe="initial-file-handling-state:initial-file-handling-state,nextcloud-store-session:nextcloud-store-session"
enabled-targets="${0}"
nextcloud-auth-url="${0}"
nextcloud-web-dav-url="${0}"
nextcloud-name="${0}"
nextcloud-file-url="${0}"
lang="${0}"></dbp-file-sink>
`),D({hidden:!this.isLoggedIn()||!this.hasSignaturePermissions()||this.isLoading()}),D({"is-disabled":this.isUserInterfaceDisabled()}),this.activity.getName(this.lang),this.activity.getDescription(this.lang),i.t("qualified-pdf-upload.upload-text"),(()=>{this._("#file-source").setAttribute("dialog-open","")}),this.signingProcessActive,i.t("qualified-pdf-upload.upload-button-label"),i.t("qualified-pdf-upload.file-picker-context"),this.fileHandlingEnabledTargets,this.nextcloudWebAppPasswordURL,this.nextcloudWebDavURL,this.nextcloudName,this.nextcloudAuthInfo,this.nextcloudFileURL,this.lang,this.signingProcessActive,i.t("qualified-pdf-upload.upload-area-text"),i.t("qualified-pdf-upload.upload-button-label"),this.onFileSelected,this.onFileSourceSwitch,D({hidden:!this.queueBlockEnabled}),D({"is-disabled":this.isUserInterfaceDisabled()}),i.t("qualified-pdf-upload.queued-files-label"),this.clearQueuedFiles,0===this.queuedFilesCount||this.signingProcessActive||this.isUserInterfaceDisabled(),D({"is-disabled":this.isUserInterfaceDisabled()}),i.t("qualified-pdf-upload.clear-all"),(()=>{this.signingProcessEnabled=!0,this.signingProcessActive=!0}),0===this.queuedFilesCount,D({"is-disabled":this.isUserInterfaceDisabled()}),i.t("qualified-pdf-upload.start-signing-process-button"),this.stopSigningProcess,this.uploadInProgress,D({hidden:!this.signingProcessActive}),i.t("qualified-pdf-upload.stop-signing-process-button"),D({"is-disabled":this.isUserInterfaceDisabled()}),this.getQueuedFilesHtml(),D({hidden:0!==this.queuedFilesCount,"is-disabled":this.isUserInterfaceDisabled()}),i.t("qualified-pdf-upload.queued-files-empty1"),i.t("qualified-pdf-upload.queued-files-empty2"),D({hidden:0===this.signedFilesCount,"is-disabled":this.isUserInterfaceDisabled()}),i.t("qualified-pdf-upload.signed-files-label"),D({hidden:0===this.signedFilesCount}),this.clearSignedFiles,i.t("qualified-pdf-upload.clear-all"),i.t("qualified-pdf-upload.download-zip-button"),i.t("qualified-pdf-upload.download-zip-button-tooltip"),this.zipDownloadClickHandler,this.getSignedFilesHtml(),D({hidden:0===this.errorFilesCount,"is-disabled":this.isUserInterfaceDisabled()}),i.t("qualified-pdf-upload.error-files-label"),D({hidden:0===this.errorFilesCount}),this.clearErrorFiles,i.t("qualified-pdf-upload.clear-all"),this.uploadInProgress,i.t("qualified-pdf-upload.re-upload-all-button"),i.t("qualified-pdf-upload.re-upload-all-button-title"),this.reUploadAllClickHandler,this.getErrorFilesHtml(),D({hidden:!this.signaturePlacementInProgress}),this.withSigBlock?i.t("qualified-pdf-upload.signature-placement-label"):i.t("qualified-pdf-upload.preview-label"),this.currentFile.name,y(void 0!==this.currentFile?this.currentFile.size:0),this.hidePDF,this.lang,e,this.storePDFData,this.hidePDF,D({hidden:!this.isAnnotationViewVisible||!this.allowAnnotating}),i.t("qualified-pdf-upload.annotation-view-label"),void 0!==this.currentFile.file?this.currentFile.file.name:"",y(void 0!==this.currentFile.file?this.currentFile.file.size:0),this.hideAnnotationView,this.lang,this.processAnnotationEvent,this.processAnnotationCancelEvent,D({hidden:!this.uploadInProgress}),this.uploadStatusFileName,this.uploadStatusText,D({hidden:!this.externalAuthInProgress}),i.t("qualified-pdf-upload.current-signing-process-label"),this.currentFileName,y(void 0!==this.currentFile.file?this.currentFile.file.size:0),i.t("qualified-pdf-upload.stop-signing-process-button"),this.stopSigningProcess,this._onIFrameError,this._onIFrameDone,D({hidden:this.isLoggedIn()||this.isLoading()}),i.t("error-login-message"),D({hidden:this.hasSignaturePermissions()||!this.isLoggedIn()||this.isLoading()}),i.t("error-permission-message"),D({hidden:!this.isLoading()}),i.t("qualified-pdf-upload.save-field-label",{count:this.signedFilesToDownload}),this.fileHandlingEnabledTargets,this.nextcloudWebAppPasswordURL,this.nextcloudWebDavURL,this.nextcloudName,this.nextcloudFileURL,this.lang)}}A("dbp-qualified-signature-pdf-upload",T);
//# sourceMappingURL=dbp-qualified-signature-pdf-upload.js.map