@enablerr-ui/report 0.2.37 → 0.2.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.min.js CHANGED
@@ -1 +1 @@
1
- System.register(["@enablerr-ui/layout","@enablerr-ui/form"],(function(t){"use strict";var e,n,o,r,i;return{setters:[function(t){e=t.getAttractions},function(t){n=t.attachment_notification,o=t.Request,r=t.currentRoles,i=t.settings}],execute:function(){t("version","0.2.37");function s(){}function l(t){return t()}function c(){return Object.create(null)}function a(t){t.forEach(l)}function u(t){return"function"==typeof t}function d(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function f(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return s;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function p(t,e){t.appendChild(e)}function m(t,e,n){t.insertBefore(e,n||null)}function h(t){t.parentNode.removeChild(t)}function $(t){return document.createElement(t)}function g(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function v(t){return document.createTextNode(t)}function b(){return v(" ")}function y(){return v("")}function k(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function w(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function x(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function _(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let j;function E(t){j=t}function O(){if(!j)throw new Error("Function called outside component initialization");return j}const z=[],P=[],B=[],C=[],D=Promise.resolve();let M=!1;function W(t){B.push(t)}function S(t){C.push(t)}let I=!1;const A=new Set;function N(){if(!I){I=!0;do{for(let t=0;t<z.length;t+=1){const e=z[t];E(e),G(e.$$)}for(E(null),z.length=0;P.length;)P.pop()();for(let t=0;t<B.length;t+=1){const e=B[t];A.has(e)||(A.add(e),e())}B.length=0}while(z.length);for(;C.length;)C.pop()();M=!1,I=!1,A.clear()}}function G(t){if(null!==t.fragment){t.update(),a(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(W)}}const T=new Set;let F;function L(){F={r:0,c:[],p:F}}function q(){F.r||a(F.c),F=F.p}function R(t,e){t&&t.i&&(T.delete(t),t.i(e))}function H(t,e,n,o){if(t&&t.o){if(T.has(t))return;T.add(t),F&&F.c.push((()=>{T.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function U(t,e){const n=e.token={};function o(t,o,r,i){if(e.token!==n)return;e.resolved=i;let s=e.ctx;void 0!==r&&(s=s.slice(),s[r]=i);const l=t&&(e.current=t)(s);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(L(),H(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),q())})):e.block.d(1),l.c(),R(l,1),l.m(e.mount(),e.anchor),c=!0),e.block=l,e.blocks&&(e.blocks[o]=l),c&&N()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=O();if(t.then((t=>{E(n),o(e.then,1,e.value,t),E(null)}),(t=>{if(E(n),o(e.catch,2,e.error,t),E(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var r}const K="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function V(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function J(t){t&&t.c()}function Q(t,e,n,o){const{fragment:r,on_mount:i,on_destroy:s,after_update:c}=t.$$;r&&r.m(e,n),o||W((()=>{const e=i.map(l).filter(u);s?s.push(...e):a(e),t.$$.on_mount=[]})),c.forEach(W)}function X(t,e){const n=t.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Y(t,e){-1===t.$$.dirty[0]&&(z.push(t),M||(M=!0,D.then(N)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Z(t,e,n,o,r,i,l=[-1]){const u=j;E(t);const d=t.$$={fragment:null,ctx:null,props:i,update:s,not_equal:r,bound:c(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:c(),dirty:l,skip_bound:!1};let f=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const i=o.length?o[0]:n;return d.ctx&&r(d.ctx[e],d.ctx[e]=i)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](i),f&&Y(t,e)),n})):[],d.update(),f=!0,a(d.before_update),d.fragment=!!o&&o(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(h)}else d.fragment&&d.fragment.c();e.intro&&R(t.$$.fragment),Q(t,e.target,e.anchor,e.customElement),N()}E(u)}class tt{$destroy(){X(this,1),this.$destroy=s}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function et(t){let e,n,o,r,i;return{c(){e=g("svg"),n=g("path"),o=g("line"),r=g("line"),w(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),w(o,"x1","12"),w(o,"y1","9"),w(o,"x2","12"),w(o,"y2","13"),w(r,"x1","12"),w(r,"y1","17"),w(r,"x2","12.01"),w(r,"y2","17"),w(e,"xmlns","http://www.w3.org/2000/svg"),w(e,"width",t[0]),w(e,"height",t[0]),w(e,"fill","none"),w(e,"viewBox","0 0 24 24"),w(e,"stroke","currentColor"),w(e,"stroke-width",t[1]),w(e,"stroke-linecap","round"),w(e,"stroke-linejoin","round"),w(e,"class",i="feather feather-alert-triangle "+t[2])},m(t,i){m(t,e,i),p(e,n),p(e,o),p(e,r)},p(t,[n]){1&n&&w(e,"width",t[0]),1&n&&w(e,"height",t[0]),2&n&&w(e,"stroke-width",t[1]),4&n&&i!==(i="feather feather-alert-triangle "+t[2])&&w(e,"class",i)},i:s,o:s,d(t){t&&h(e)}}}function nt(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:i=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,i=t.class)},[o,r,i]}class ot extends tt{constructor(t){super(),Z(this,t,nt,et,d,{size:0,strokeWidth:1,class:2})}}function rt(t){let e,n,o,r,i;return{c(){e=g("svg"),n=g("path"),o=g("polyline"),r=g("line"),w(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),w(o,"points","7 10 12 15 17 10"),w(r,"x1","12"),w(r,"y1","15"),w(r,"x2","12"),w(r,"y2","3"),w(e,"xmlns","http://www.w3.org/2000/svg"),w(e,"width",t[0]),w(e,"height",t[0]),w(e,"fill","none"),w(e,"viewBox","0 0 24 24"),w(e,"stroke","currentColor"),w(e,"stroke-width",t[1]),w(e,"stroke-linecap","round"),w(e,"stroke-linejoin","round"),w(e,"class",i="feather feather-download "+t[2])},m(t,i){m(t,e,i),p(e,n),p(e,o),p(e,r)},p(t,[n]){1&n&&w(e,"width",t[0]),1&n&&w(e,"height",t[0]),2&n&&w(e,"stroke-width",t[1]),4&n&&i!==(i="feather feather-download "+t[2])&&w(e,"class",i)},i:s,o:s,d(t){t&&h(e)}}}function it(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:i=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,i=t.class)},[o,r,i]}class st extends tt{constructor(t){super(),Z(this,t,it,rt,d,{size:0,strokeWidth:1,class:2})}}function lt(t){let e,n,o,r;return{c(){e=g("svg"),n=g("polyline"),o=g("path"),w(n,"points","3 6 5 6 21 6"),w(o,"d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"),w(e,"xmlns","http://www.w3.org/2000/svg"),w(e,"width",t[0]),w(e,"height",t[0]),w(e,"fill","none"),w(e,"viewBox","0 0 24 24"),w(e,"stroke","currentColor"),w(e,"stroke-width",t[1]),w(e,"stroke-linecap","round"),w(e,"stroke-linejoin","round"),w(e,"class",r="feather feather-trash "+t[2])},m(t,r){m(t,e,r),p(e,n),p(e,o)},p(t,[n]){1&n&&w(e,"width",t[0]),1&n&&w(e,"height",t[0]),2&n&&w(e,"stroke-width",t[1]),4&n&&r!==(r="feather feather-trash "+t[2])&&w(e,"class",r)},i:s,o:s,d(t){t&&h(e)}}}function ct(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:i=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,i=t.class)},[o,r,i]}class at extends tt{constructor(t){super(),Z(this,t,ct,lt,d,{size:0,strokeWidth:1,class:2})}}const{document:ut}=K;function dt(t,e,n){const o=t.slice();return o[37]=e[n],o[39]=n,o}function ft(t){let e;return{c(){e=$("div"),e.textContent="Dokument ersetzen"},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function pt(t){let e;return{c(){e=$("div"),e.textContent="Dokument wählen"},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function mt(t){let e;function n(t,e){return t[0]?ft:pt}let o=n(t),r=o(t);return{c(){r.c(),e=y()},m(t,n){r.m(t,n),m(t,e,n)},p(t,i){o!==(o=n(t))&&(r.d(1),r=o(t),r&&(r.c(),r.m(e.parentNode,e)))},d(t){r.d(t),t&&h(e)}}}function ht(t){let e,n,o,r,i,s,l,c,a,u,d,f,g,y,_,j;function E(e){t[26](e)}let O={placeholder:t[8],type:"text",id:"fileTitle",required:!0};return void 0!==t[4]&&(O.value=t[4]),u=new t[12]({props:O}),P.push((()=>V(u,"value",E))),g=new t[11]({props:{disabled:t[5],filled:!0,style:"color: whitesmoke;",type:"submit",$$slots:{default:[$t]},$$scope:{ctx:t}}}),{c(){e=$("div"),n=$("form"),o=$("div"),r=$("div"),i=v(t[6]),s=b(),l=$("div"),c=v(t[7]),a=b(),J(u.$$.fragment),f=b(),J(g.$$.fragment),w(r,"class","word-break svelte-15uidat"),w(o,"class","container-file svelte-15uidat"),w(n,"id","submitForm"),w(e,"class","form-step svelte-15uidat")},m(d,h){var $;m(d,e,h),p(e,n),p(n,o),p(o,r),p(r,i),p(o,s),p(o,l),p(l,c),p(o,a),Q(u,o,null),p(o,f),Q(g,o,null),y=!0,_||(j=k(n,"submit",($=t[13],function(t){return t.preventDefault(),$.call(this,t)})),_=!0)},p(t,e){(!y||64&e[0])&&x(i,t[6]),(!y||128&e[0])&&x(c,t[7]);const n={};256&e[0]&&(n.placeholder=t[8]),!d&&16&e[0]&&(d=!0,n.value=t[4],S((()=>d=!1))),u.$set(n);const o={};32&e[0]&&(o.disabled=t[5]),512&e[1]&&(o.$$scope={dirty:e,ctx:t}),g.$set(o)},i(t){y||(R(u.$$.fragment,t),R(g.$$.fragment,t),y=!0)},o(t){H(u.$$.fragment,t),H(g.$$.fragment,t),y=!1},d(t){t&&h(e),X(u),X(g),_=!1,j()}}}function $t(t){let e;return{c(){e=v("Dokument hochladen")},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function gt(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function vt(t){let e,n,o,r,i,s,l,c;const a=[yt,bt],u=[];function d(t,e){return 0===t[36].length?0:1}return s=d(t),l=u[s]=a[s](t),{c(){e=$("div"),n=$("table"),o=$("thead"),o.innerHTML='<tr class="svelte-15uidat"><th class="svelte-15uidat">#</th> \n <th class="svelte-15uidat">Datei</th> \n <th class="text_right svelte-15uidat">Grösse</th> \n <th id="headAction" class="svelte-15uidat">Aktionen</th></tr>',r=b(),i=$("tbody"),l.c(),w(o,"class","tablehead"),w(n,"class","tableFixHead"),w(e,"class","task_list svelte-15uidat")},m(t,l){m(t,e,l),p(e,n),p(n,o),p(n,r),p(n,i),u[s].m(i,null),c=!0},p(t,e){let n=s;s=d(t),s===n?u[s].p(t,e):(L(),H(u[n],1,1,(()=>{u[n]=null})),q(),l=u[s],l?l.p(t,e):(l=u[s]=a[s](t),l.c()),R(l,1),l.m(i,null))},i(t){c||(R(l),c=!0)},o(t){H(l),c=!1},d(t){t&&h(e),u[s].d()}}}function bt(t){let e,n,o=t[36],r=[];for(let e=0;e<o.length;e+=1)r[e]=xt(dt(t,o,e));const i=t=>H(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=y()},m(t,o){for(let e=0;e<r.length;e+=1)r[e].m(t,o);m(t,e,o),n=!0},p(t,n){if(32804&n[0]){let s;for(o=t[36],s=0;s<o.length;s+=1){const i=dt(t,o,s);r[s]?(r[s].p(i,n),R(r[s],1)):(r[s]=xt(i),r[s].c(),R(r[s],1),r[s].m(e.parentNode,e))}for(L(),s=o.length;s<r.length;s+=1)i(s);q()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)R(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)H(r[t]);n=!1},d(t){!function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(r,t),t&&h(e)}}}function yt(t){let e;return{c(){e=$("tr"),e.innerHTML='<td colspan="4" style="text-align: center;" class="svelte-15uidat">Keine Dokumente gefunden</td>',w(e,"class","svelte-15uidat")},m(t,n){m(t,e,n)},p:s,i:s,o:s,d(t){t&&h(e)}}}function kt(t){let e,n,o,r;return n=new st({props:{size:"18"}}),{c(){e=$("a"),J(n.$$.fragment),w(e,"href",o="/api/userreport/"+t[37]._id+"?h="+window.location.hostname),_(e,"color","whitesmoke")},m(t,o){m(t,e,o),Q(n,e,null),r=!0},p(t,n){(!r||4&n[0]&&o!==(o="/api/userreport/"+t[37]._id+"?h="+window.location.hostname))&&w(e,"href",o)},i(t){r||(R(n.$$.fragment,t),r=!0)},o(t){H(n.$$.fragment,t),r=!1},d(t){t&&h(e),X(n)}}}function wt(t){let e,n;return e=new at({props:{size:"18"}}),{c(){J(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p:s,i(t){n||(R(e.$$.fragment,t),n=!0)},o(t){H(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function xt(t){let e,n,o,r,i,s,l,c,a,u,d,f,g,y,k,j,E=t[39]+1+"",O=t[37].title+"",z=Ct(t[37].sizeInByte)+"";return f=new t[11]({props:{small:!0,filled:!0,style:"display: inline;",$$slots:{default:[kt]},$$scope:{ctx:t}}}),y=new t[11]({props:{disabled:t[5],small:!0,filled:!0,danger:!0,style:"color: whitesmoke; display: inline;",$$slots:{default:[wt]},$$scope:{ctx:t}}}),y.$on("click",(function(){return t[27](t[37])})),{c(){e=$("tr"),n=$("td"),o=v(E),r=b(),i=$("td"),s=v(O),l=b(),c=$("td"),a=v(z),u=b(),d=$("td"),J(f.$$.fragment),g=b(),J(y.$$.fragment),k=b(),w(n,"class","svelte-15uidat"),_(i,"max-width","30em"),w(i,"class","svelte-15uidat"),w(c,"class","text_right svelte-15uidat"),w(d,"class","svelte-15uidat"),w(e,"class","svelte-15uidat")},m(t,h){m(t,e,h),p(e,n),p(n,o),p(e,r),p(e,i),p(i,s),p(e,l),p(e,c),p(c,a),p(e,u),p(e,d),Q(f,d,null),p(d,g),Q(y,d,null),p(e,k),j=!0},p(e,n){t=e,(!j||4&n[0])&&O!==(O=t[37].title+"")&&x(s,O),(!j||4&n[0])&&z!==(z=Ct(t[37].sizeInByte)+"")&&x(a,z);const o={};4&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:t}),f.$set(o);const r={};32&n[0]&&(r.disabled=t[5]),512&n[1]&&(r.$$scope={dirty:n,ctx:t}),y.$set(r)},i(t){j||(R(f.$$.fragment,t),R(y.$$.fragment,t),j=!0)},o(t){H(f.$$.fragment,t),H(y.$$.fragment,t),j=!1},d(t){t&&h(e),X(f),X(y)}}}function _t(t){return{c:s,m:s,p:s,i:s,o:s,d:s}}function jt(t){let e;return{c(){e=v("Abbrechen")},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function Et(t){let e;return{c(){e=v("Löschen")},m(t,n){m(t,e,n)},d(t){t&&h(e)}}}function Ot(t){let e,n,o,r,i,s,l;return r=new t[11]({props:{filled:!0,$$slots:{default:[jt]},$$scope:{ctx:t}}}),r.$on("click",t[28]),s=new t[11]({props:{danger:!0,outline:!0,$$slots:{default:[Et]},$$scope:{ctx:t}}}),s.$on("click",t[29]),{c(){e=$("p"),e.textContent="Willst du das Dokument wirklich löschen?",n=b(),o=$("div"),J(r.$$.fragment),i=b(),J(s.$$.fragment),w(o,"class","flex_div svelte-15uidat")},m(t,c){m(t,e,c),m(t,n,c),m(t,o,c),Q(r,o,null),p(o,i),Q(s,o,null),l=!0},p(t,e){const n={};512&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const o={};512&e[1]&&(o.$$scope={dirty:e,ctx:t}),s.$set(o)},i(t){l||(R(r.$$.fragment,t),R(s.$$.fragment,t),l=!0)},o(t){H(r.$$.fragment,t),H(s.$$.fragment,t),l=!1},d(t){t&&h(e),t&&h(n),t&&h(o),X(r),X(s)}}}function zt(t){let e,n,o;return n=new ot({props:{size:"25"}}),{c(){e=$("div"),J(n.$$.fragment),w(e,"slot","title-icon")},m(t,r){m(t,e,r),Q(n,e,null),o=!0},p:s,i(t){o||(R(n.$$.fragment,t),o=!0)},o(t){H(n.$$.fragment,t),o=!1},d(t){t&&h(e),X(n)}}}function Pt(t){let e,n;return e=new t[10]({props:{title:"Bestätigung",closeCallback:t[35],danger:!0,$$slots:{"title-icon":[zt],default:[Ot]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,n){const o={};16&n[1]&&(o.closeCallback=t[35]),512&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(R(e.$$.fragment,t),n=!0)},o(t){H(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function Bt(t){let e,n,o,r,i,s,l,c,a,u,d,f,g,v,y;r=new t[11]({props:{class:"btn-document btn-document-primary",filled:!0,disabled:t[5],$$slots:{default:[mt]},$$scope:{ctx:t}}}),r.$on("click",t[23]);let x=t[0]&&ht(t),j={ctx:t,current:null,token:null,hasCatch:!1,pending:_t,then:vt,catch:gt,value:36,blocks:[,,,]};function E(e){t[30](e)}U(a=t[2],j);let O={$$slots:{default:[Pt,({closeCallback:t})=>({35:t}),({closeCallback:t})=>[0,t?16:0]]},$$scope:{ctx:t}};return void 0!==t[1]&&(O.open=t[1]),d=new t[9]({props:O}),P.push((()=>V(d,"open",E))),{c(){e=$("div"),n=$("form"),o=$("div"),J(r.$$.fragment),i=b(),s=$("input"),l=b(),x&&x.c(),c=b(),j.block.c(),u=b(),J(d.$$.fragment),w(s,"type","file"),w(s,"accept",".pdf"),w(s,"id","fileInput"),s.required=!0,_(s,"display","none"),w(o,"class","document-choose svelte-15uidat"),w(n,"id","uploadForm"),w(e,"class","form-step svelte-15uidat")},m(a,f){m(a,e,f),p(e,n),p(n,o),Q(r,o,null),p(o,i),p(o,s),t[25](s),m(a,l,f),x&&x.m(a,f),m(a,c,f),j.block.m(a,j.anchor=f),j.mount=()=>u.parentNode,j.anchor=u,m(a,u,f),Q(d,a,f),g=!0,v||(y=k(s,"change",t[24]),v=!0)},p(e,n){t=e;const o={};32&n[0]&&(o.disabled=t[5]),1&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:t}),r.$set(o),t[0]?x?(x.p(t,n),1&n[0]&&R(x,1)):(x=ht(t),x.c(),R(x,1),x.m(c.parentNode,c)):x&&(L(),H(x,1,1,(()=>{x=null})),q()),j.ctx=t,4&n[0]&&a!==(a=t[2])&&U(a,j)||function(t,e,n){const o=e.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,n)}(j,t,n);const i={};528&n[1]&&(i.$$scope={dirty:n,ctx:t}),!f&&2&n[0]&&(f=!0,i.open=t[1],S((()=>f=!1))),d.$set(i)},i(t){g||(R(r.$$.fragment,t),R(x),R(j.block),R(d.$$.fragment,t),g=!0)},o(t){H(r.$$.fragment,t),H(x);for(let t=0;t<3;t+=1){H(j.blocks[t])}H(d.$$.fragment,t),g=!1},d(n){n&&h(e),X(r),t[25](null),n&&h(l),x&&x.d(n),n&&h(c),j.block.d(n),j.token=null,j=null,n&&h(u),X(d,n),v=!1,y()}}}function Ct(t){if(t>=1073741824)t=Math.round(t/1073741824*100)/100+" GB";else if(t>=1048576){t=Math.round(t/1048576*100)/100+" MB"}else if(t>=1024){t=Math.round(t/1024*100)/100+" KB"}else t>1?t+=" bytes":1==t?t+=" byte":t="0 bytes";return t}function Dt(t,s,l){let c,a,u,d,p,m;f(t,r,(t=>l(21,p=t))),f(t,i,(t=>l(22,m=t)));const{Modal:h,Dialog:$,Button:g,Divider:v,TextField:b}=e;let y,k,w,x,_,j,{task:E}=s,O=!1,z=[],B=E.task?.readonly;const C=async()=>{const t=await E;l(19,w=await o.getSchema(t.event)),k=t.task.id;return await o.getUserReports(k)};z=C();const D=()=>{let t=x.files[0];l(4,j=t?t.name.split(".").slice(0,-1).join("."):""),l(0,_=t)},M=t=>{l(1,O=!0),y=t},W=()=>{l(1,O=!1),y=""};function S(){o.deleteUserReport(y).then((()=>{l(1,O=!1),y=""}))}n.subscribe((t=>{t&&t.taskId===k&&l(2,z=C())}));return t.$$set=t=>{"task"in t&&l(18,E=t.task)},t.$$.update=()=>{if(8126464&t.$$.dirty[0]&&w&&E.task&&p&&m.role?.length&&w.authorization?.length){const t=w.authorization.some((t=>p?.find((e=>e===t.role&&"edit"===t.activity))));l(20,B||=!t)}1048576&t.$$.dirty[0]&&l(5,c=B),1&t.$$.dirty[0]&&l(6,a=_?_.name:""),1&t.$$.dirty[0]&&l(7,u=_?Ct(_.size):""),1&t.$$.dirty[0]&&l(8,d=_?_.name.split(".").slice(0,-1).join("."):"")},[_,O,z,x,j,c,a,u,d,h,$,g,b,function(){if(!_||!d)return;const t=new FormData;t.append("title",j),t.append("file",_),o.uploadUserReport(k,t).then((()=>{document.getElementById("submitForm").reset(),l(0,_=null)}))},D,M,W,S,E,w,B,p,m,()=>{x.click()},()=>D(),function(t){P[t?"unshift":"push"]((()=>{x=t,l(3,x)}))},function(t){j=t,l(4,j)},t=>M(t._id),()=>W(),()=>S(),function(t){O=t,l(1,O)}]}class Mt extends tt{constructor(t){var e;super(),ut.getElementById("svelte-15uidat-style")||((e=$("style")).id="svelte-15uidat-style",e.textContent=".form-step.svelte-15uidat .document-choose.svelte-15uidat{margin:1em}.form-step.svelte-15uidat .btn-document{width:300px;text-align:center}.form-step.svelte-15uidat .btn-document div{margin-inline:auto}.form-step.svelte-15uidat .btn-document-primary{color:#fff}.form-step.svelte-15uidat .btn-document-secondary{background-color:#91BDD9}.form-step.svelte-15uidat .container-file.svelte-15uidat{display:grid;gap:1em;grid-template-columns:218px 100px 2fr 1fr;align-items:center}.form-step.svelte-15uidat .word-break.svelte-15uidat{word-break:break-all}.task_list.svelte-15uidat.svelte-15uidat{flex:auto;overflow-y:scroll;overflow-x:hidden;width:99%;height:30em;border:1px solid #ccc;border-radius:0.5em;margin-top:2em}.task_list.svelte-15uidat th.svelte-15uidat{padding:0.8em}.task_list.svelte-15uidat td.svelte-15uidat{padding:0.8em}.task_list.svelte-15uidat tr.svelte-15uidat:nth-child(2n){background-color:#f8f8fe}.flex_div.svelte-15uidat.svelte-15uidat{display:flex;margin-top:1em;justify-content:space-between}.task_list.svelte-15uidat td.svelte-15uidat{vertical-align:middle}#headAction.svelte-15uidat.svelte-15uidat{width:13em}td.text_right.svelte-15uidat.svelte-15uidat,th.text_right.svelte-15uidat.svelte-15uidat{padding-right:1em}",p(ut.head,e)),Z(this,t,Dt,Bt,d,{task:18},[-1,-1])}}function Wt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var St,It,At=(St=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==i(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},s),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,e,n),mount:c.bind(null,e,n),unmount:a.bind(null,e,n),update:u.bind(null,e,n)}};var s={component:null,domElementGetter:null,props:{}};function l(t){return Promise.resolve()}function c(t,e,n){var r=Object.keys(s),i=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),s=r();e.instance=new t.component(o(o({},i),{},{target:s,props:Object.assign({},n,t.props)}))}))}function a(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function u(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},St(It={exports:{}},It.exports),It.exports);const Nt=Wt(At)({component:Mt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Gt,mount:Tt,unmount:Ft}=Nt;t({bootstrap:Gt,mount:Tt,unmount:Ft});t("Report",Mt)}}}));
1
+ System.register(["@enablerr-ui/layout","@enablerr-ui/form"],(function(e){"use strict";var t,n,o,l,r;return{setters:[function(e){t=e.getAttractions},function(e){n=e.attachment_notification,o=e.Request,l=e.currentRoles,r=e.settings}],execute:function(){e("version","0.2.39");function s(){}function i(e,t){for(const n in t)e[n]=t[n];return e}function c(e){return e()}function a(){return Object.create(null)}function u(e){e.forEach(c)}function d(e){return"function"==typeof e}function f(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function p(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return s;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function m(e,t,n,o){if(e){const l=g(e,t,n,o);return e[0](l)}}function g(e,t,n,o){return e[1]&&o?i(n.ctx.slice(),e[1](o(t))):n.ctx}function h(e,t,n,o,l,r,s){const i=function(e,t,n,o){if(e[2]&&o){const l=e[2](o(n));if(void 0===t.dirty)return l;if("object"==typeof l){const e=[],n=Math.max(t.dirty.length,l.length);for(let o=0;o<n;o+=1)e[o]=t.dirty[o]|l[o];return e}return t.dirty|l}return t.dirty}(t,o,l,r);if(i){const l=g(t,n,o,s);e.p(l,i)}}function $(e,t){const n={};t=new Set(t);for(const o in e)t.has(o)||"$"===o[0]||(n[o]=e[o]);return n}function y(e){return null==e?"":e}function v(e,t){e.appendChild(t)}function b(e,t,n){e.insertBefore(t,n||null)}function w(e){e.parentNode.removeChild(e)}function x(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function k(e){return document.createElement(e)}function z(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function _(e){return document.createTextNode(e)}function C(){return _(" ")}function E(){return _("")}function j(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function O(e){return function(t){return t.preventDefault(),e.call(this,t)}}function B(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function L(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function M(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const o in t)null==t[o]?e.removeAttribute(o):"style"===o?e.style.cssText=t[o]:"__value"===o?e.value=e[o]=t[o]:n[o]&&n[o].set?e[o]=t[o]:L(e,o,t[o])}function T(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function P(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function W(e,t,n){e.classList[n?"add":"remove"](t)}let D;function R(e){D=e}function S(){if(!D)throw new Error("Function called outside component initialization");return D}function I(){const e=S();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const l=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);o.slice().forEach((t=>{t.call(e,l)}))}}}const N=[],A=[],F=[],G=[],H=Promise.resolve();let q=!1;function U(e){F.push(e)}function V(e){G.push(e)}let K=!1;const X=new Set;function Y(){if(!K){K=!0;do{for(let e=0;e<N.length;e+=1){const t=N[e];R(t),J(t.$$)}for(R(null),N.length=0;A.length;)A.pop()();for(let e=0;e<F.length;e+=1){const t=F[e];X.has(t)||(X.add(t),t())}F.length=0}while(N.length);for(;G.length;)G.pop()();q=!1,K=!1,X.clear()}}function J(e){if(null!==e.fragment){e.update(),u(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(U)}}const Q=new Set;let Z;function ee(){Z={r:0,c:[],p:Z}}function te(){Z.r||u(Z.c),Z=Z.p}function ne(e,t){e&&e.i&&(Q.delete(e),e.i(t))}function oe(e,t,n,o){if(e&&e.o){if(Q.has(e))return;Q.add(e),Z&&Z.c.push((()=>{Q.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function le(e,t){const n=t.token={};function o(e,o,l,r){if(t.token!==n)return;t.resolved=r;let s=t.ctx;void 0!==l&&(s=s.slice(),s[l]=r);const i=e&&(t.current=e)(s);let c=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(ee(),oe(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),te())})):t.block.d(1),i.c(),ne(i,1),i.m(t.mount(),t.anchor),c=!0),t.block=i,t.blocks&&(t.blocks[o]=i),c&&Y()}if((l=e)&&"object"==typeof l&&"function"==typeof l.then){const n=S();if(e.then((e=>{R(n),o(t.then,1,t.value,e),R(null)}),(e=>{if(R(n),o(t.catch,2,t.error,e),R(null),!t.hasCatch)throw e})),t.current!==t.pending)return o(t.pending,0),!0}else{if(t.current!==t.then)return o(t.then,1,t.value,e),!0;t.resolved=e}var l}function re(e,t){oe(e,1,1,(()=>{t.delete(e.key)}))}function se(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function ie(e){e&&e.c()}function ce(e,t,n,o){const{fragment:l,on_mount:r,on_destroy:s,after_update:i}=e.$$;l&&l.m(t,n),o||U((()=>{const t=r.map(c).filter(d);s?s.push(...t):u(t),e.$$.on_mount=[]})),i.forEach(U)}function ae(e,t){const n=e.$$;null!==n.fragment&&(u(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ue(e,t){-1===e.$$.dirty[0]&&(N.push(e),q||(q=!0,H.then(Y)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function de(e,t,n,o,l,r,i=[-1]){const c=D;R(e);const d=e.$$={fragment:null,ctx:null,props:r,update:s,not_equal:l,bound:a(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(c?c.$$.context:t.context||[]),callbacks:a(),dirty:i,skip_bound:!1};let f=!1;if(d.ctx=n?n(e,t.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return d.ctx&&l(d.ctx[t],d.ctx[t]=r)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](r),f&&ue(e,t)),n})):[],d.update(),f=!0,u(d.before_update),d.fragment=!!o&&o(d.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);d.fragment&&d.fragment.l(e),e.forEach(w)}else d.fragment&&d.fragment.c();t.intro&&ne(e.$$.fragment),ce(e,t.target,t.anchor,t.customElement),Y()}R(c)}class fe{$destroy(){ae(this,1),this.$destroy=s}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function pe(e){let t,n,o,l,r;return{c(){t=z("svg"),n=z("path"),o=z("line"),l=z("line"),L(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),L(o,"x1","12"),L(o,"y1","9"),L(o,"x2","12"),L(o,"y2","13"),L(l,"x1","12"),L(l,"y1","17"),L(l,"x2","12.01"),L(l,"y2","17"),L(t,"xmlns","http://www.w3.org/2000/svg"),L(t,"width",e[0]),L(t,"height",e[0]),L(t,"fill","none"),L(t,"viewBox","0 0 24 24"),L(t,"stroke","currentColor"),L(t,"stroke-width",e[1]),L(t,"stroke-linecap","round"),L(t,"stroke-linejoin","round"),L(t,"class",r="feather feather-alert-triangle "+e[2])},m(e,r){b(e,t,r),v(t,n),v(t,o),v(t,l)},p(e,[n]){1&n&&L(t,"width",e[0]),1&n&&L(t,"height",e[0]),2&n&&L(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-alert-triangle "+e[2])&&L(t,"class",r)},i:s,o:s,d(e){e&&w(t)}}}function me(e,t,n){let{size:o="100%"}=t,{strokeWidth:l=2}=t,{class:r=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,l=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,l,r]}class ge extends fe{constructor(e){super(),de(this,e,me,pe,f,{size:0,strokeWidth:1,class:2})}}function he(e){let t,n,o,l,r;return{c(){t=z("svg"),n=z("path"),o=z("polyline"),l=z("line"),L(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),L(o,"points","7 10 12 15 17 10"),L(l,"x1","12"),L(l,"y1","15"),L(l,"x2","12"),L(l,"y2","3"),L(t,"xmlns","http://www.w3.org/2000/svg"),L(t,"width",e[0]),L(t,"height",e[0]),L(t,"fill","none"),L(t,"viewBox","0 0 24 24"),L(t,"stroke","currentColor"),L(t,"stroke-width",e[1]),L(t,"stroke-linecap","round"),L(t,"stroke-linejoin","round"),L(t,"class",r="feather feather-download "+e[2])},m(e,r){b(e,t,r),v(t,n),v(t,o),v(t,l)},p(e,[n]){1&n&&L(t,"width",e[0]),1&n&&L(t,"height",e[0]),2&n&&L(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-download "+e[2])&&L(t,"class",r)},i:s,o:s,d(e){e&&w(t)}}}function $e(e,t,n){let{size:o="100%"}=t,{strokeWidth:l=2}=t,{class:r=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,l=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,l,r]}class ye extends fe{constructor(e){super(),de(this,e,$e,he,f,{size:0,strokeWidth:1,class:2})}}function ve(e){let t,n,o,l;return{c(){t=z("svg"),n=z("polyline"),o=z("path"),L(n,"points","3 6 5 6 21 6"),L(o,"d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"),L(t,"xmlns","http://www.w3.org/2000/svg"),L(t,"width",e[0]),L(t,"height",e[0]),L(t,"fill","none"),L(t,"viewBox","0 0 24 24"),L(t,"stroke","currentColor"),L(t,"stroke-width",e[1]),L(t,"stroke-linecap","round"),L(t,"stroke-linejoin","round"),L(t,"class",l="feather feather-trash "+e[2])},m(e,l){b(e,t,l),v(t,n),v(t,o)},p(e,[n]){1&n&&L(t,"width",e[0]),1&n&&L(t,"height",e[0]),2&n&&L(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-trash "+e[2])&&L(t,"class",l)},i:s,o:s,d(e){e&&w(t)}}}function be(e,t,n){let{size:o="100%"}=t,{strokeWidth:l=2}=t,{class:r=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,l=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,l,r]}class we extends fe{constructor(e){super(),de(this,e,be,ve,f,{size:0,strokeWidth:1,class:2})}}function xe(e){let t,n,o,l,r;return{c(){t=z("svg"),n=z("path"),o=z("polyline"),l=z("line"),L(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),L(o,"points","17 8 12 3 7 8"),L(l,"x1","12"),L(l,"y1","3"),L(l,"x2","12"),L(l,"y2","15"),L(t,"xmlns","http://www.w3.org/2000/svg"),L(t,"width",e[0]),L(t,"height",e[0]),L(t,"fill","none"),L(t,"viewBox","0 0 24 24"),L(t,"stroke","currentColor"),L(t,"stroke-width",e[1]),L(t,"stroke-linecap","round"),L(t,"stroke-linejoin","round"),L(t,"class",r="feather feather-upload "+e[2])},m(e,r){b(e,t,r),v(t,n),v(t,o),v(t,l)},p(e,[n]){1&n&&L(t,"width",e[0]),1&n&&L(t,"height",e[0]),2&n&&L(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-upload "+e[2])&&L(t,"class",r)},i:s,o:s,d(e){e&&w(t)}}}function ke(e,t,n){let{size:o="100%"}=t,{strokeWidth:l=2}=t,{class:r=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,l=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,l,r]}class ze extends fe{constructor(e){super(),de(this,e,ke,xe,f,{size:0,strokeWidth:1,class:2})}}function _e(e){let t,n;return{c(){t=z("svg"),n=z("path"),L(n,"d","M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"),L(t,"xmlns","http://www.w3.org/2000/svg"),L(t,"width","24"),L(t,"height","24"),L(t,"viewBox","0 0 24 24"),L(t,"fill","none"),L(t,"stroke","currentColor"),L(t,"stroke-width","2"),L(t,"stroke-linecap","round"),L(t,"stroke-linejoin","round")},m(e,o){b(e,t,o),v(t,n)},p:s,i:s,o:s,d(e){e&&w(t)}}}class Ce extends fe{constructor(e){super(),de(this,e,null,_e,f,{})}}function Ee(...e){return e.filter((e=>!!e)).join(" ")}function je(e){let t,n,o,l;return{c(){t=z("svg"),n=z("line"),o=z("line"),L(n,"x1","12"),L(n,"y1","5"),L(n,"x2","12"),L(n,"y2","19"),L(o,"x1","5"),L(o,"y1","12"),L(o,"x2","19"),L(o,"y2","12"),L(t,"xmlns","http://www.w3.org/2000/svg"),L(t,"width","24"),L(t,"height","24"),L(t,"viewBox","0 0 24 24"),L(t,"fill","none"),L(t,"stroke","currentColor"),L(t,"stroke-width","2"),L(t,"stroke-linecap","round"),L(t,"stroke-linejoin","round"),L(t,"class",l=Ee(e[0]))},m(e,l){b(e,t,l),v(t,n),v(t,o)},p(e,[n]){1&n&&l!==(l=Ee(e[0]))&&L(t,"class",l)},i:s,o:s,d(e){e&&w(t)}}}function Oe(e,t,n){let{class:o=null}=t;return e.$$set=e=>{"class"in e&&n(0,o=e.class)},[o]}class Be extends fe{constructor(e){super(),de(this,e,Oe,je,f,{class:0})}}function Le(e,t={}){const n={event:t.event||"click",transition:t.transition||150,zIndex:t.zIndex||"100",bg:t.rippleColor||null,disabled:t.disabled||!1},o=t=>function(e,t,{bg:n,zIndex:o,transition:l}){const r=parseInt(getComputedStyle(t).borderWidth.replace("px","")),s=t.getBoundingClientRect(),i=s.left,c=s.top,a=t.offsetWidth,u=t.offsetHeight,d=e.clientX-i,f=e.clientY-c,p=Math.max(d,a-d),m=Math.max(f,u-f),g=window.getComputedStyle(t),h=Math.sqrt(p*p+m*m),$=r>0?r:0,y=document.createElement("div"),v=document.createElement("div");v.className="ripple-container",y.className="ripple",y.style.marginTop="0px",y.style.marginLeft="0px",y.style.width="1px",y.style.height="1px",y.style.transition=`all ${l}ms cubic-bezier(0.4, 0, 0.2, 1)`,y.style.borderRadius="50%",y.style.pointerEvents="none",y.style.position="relative",y.style.zIndex=o,null!==n&&(y.style.backgroundColor=n);v.style.position="absolute",v.style.left=0-$+"px",v.style.top=0-$+"px",v.style.height="0",v.style.width="0",v.style.pointerEvents="none",v.style.overflow="hidden";const b=t.style.position.length>0?t.style.position:getComputedStyle(t).position;"relative"!==b&&"absolute"!==b&&(t.style.position="relative");function w(){setTimeout((()=>{y.style.backgroundColor="rgba(0, 0, 0, 0)"}),250),setTimeout((()=>{v.parentNode.removeChild(v)}),l+250),setTimeout((()=>{let e=!0;for(let n=0;n<t.childNodes.length;n++)"ripple-container"===t.childNodes[n].className&&(e=!1);e&&(t.style.position="static"!==b?b:"")}),l+250)}v.appendChild(y),t.appendChild(v),y.style.marginLeft=d+"px",y.style.marginTop=f+"px",v.style.width=a+"px",v.style.height=u+"px",v.style.borderTopLeftRadius=g.borderTopLeftRadius,v.style.borderTopRightRadius=g.borderTopRightRadius,v.style.borderBottomLeftRadius=g.borderBottomLeftRadius,v.style.borderBottomRightRadius=g.borderBottomRightRadius,v.style.direction="ltr",setTimeout((()=>{y.style.width=2*h+"px",y.style.height=2*h+"px",y.style.marginLeft=d-h+"px",y.style.marginTop=f-h+"px"}),0),w()}(t,e,n);return n.disabled||e.addEventListener(n.event,o),{destroy(){e.removeEventListener(n.event,o)},update(t={}){t.disabled?e.removeEventListener(n.event,o):e.addEventListener(n.event,o)}}}function Me(e,t){if(null==e)return!0;return e.split(",").map((e=>e.trim().toLowerCase())).some((e=>function(e,t){if(t.name&&e.startsWith("."))return t.name.toLowerCase().endsWith(e);return function(e,t){if("*"===e||"*/*"===e)return!0;const n=e.split("*");if(1===n.length)return e===t;if(2!==n.length)return!1;return t.startsWith(n[0])&&t.endsWith(n[1])}(e.toLowerCase(),(t.type||"").toLowerCase())}(e,t)))}function Te(e,t,n){const o=e.slice();return o[26]=t[n],o}const Pe=e=>({}),We=e=>({}),De=e=>({}),Re=e=>({}),Se=e=>({}),Ie=e=>({}),Ne=e=>({}),Ae=e=>({}),Fe=e=>({}),Ge=e=>({}),He=e=>({wrongType:128&e,dragActive:64&e}),qe=e=>({wrongType:e[7],dragActive:e[6]});function Ue(e){let t;const n=e[18]["drag-and-drop-message"],o=m(n,e,e[17],Re),l=o||function(e){let t;return{c(){t=_("drag & drop here or click to upload files")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}();return{c(){l&&l.c()},m(e,n){l&&l.m(e,n),t=!0},p(e,l){o&&o.p&&(!t||131072&l)&&h(o,n,e,e[17],l,De,Re)},i(e){t||(ne(l,e),t=!0)},o(e){oe(l,e),t=!1},d(e){l&&l.d(e)}}}function Ve(e){let t;const n=e[18]["release-to-upload-message"],o=m(n,e,e[17],Ie),l=o||function(e){let t;return{c(){t=_("release to upload")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}();return{c(){l&&l.c()},m(e,n){l&&l.m(e,n),t=!0},p(e,l){o&&o.p&&(!t||131072&l)&&h(o,n,e,e[17],l,Se,Ie)},i(e){t||(ne(l,e),t=!0)},o(e){oe(l,e),t=!1},d(e){l&&l.d(e)}}}function Ke(e){let t;const n=e[18]["incorrect-file-message"],o=m(n,e,e[17],Ae),l=o||function(e){let t;return{c(){t=_("incorrect file type")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}();return{c(){l&&l.c()},m(e,n){l&&l.m(e,n),t=!0},p(e,l){o&&o.p&&(!t||131072&l)&&h(o,n,e,e[17],l,Ne,Ae)},i(e){t||(ne(l,e),t=!0)},o(e){oe(l,e),t=!1},d(e){l&&l.d(e)}}}function Xe(e){let t;const n=e[18]["upload-unavailable-message"],o=m(n,e,e[17],Ge),l=o||function(e){let t;return{c(){t=_("file upload unavailable")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}();return{c(){l&&l.c()},m(e,n){l&&l.m(e,n),t=!0},p(e,l){o&&o.p&&(!t||131072&l)&&h(o,n,e,e[17],l,Fe,Ge)},i(e){t||(ne(l,e),t=!0)},o(e){oe(l,e),t=!1},d(e){l&&l.d(e)}}}function Ye(e){let t;const n=e[18]["more-icon"],o=m(n,e,e[17],We),l=o||function(e){let t,n;return t=new Be({props:{class:"plus"}}),{c(){ie(t.$$.fragment)},m(e,o){ce(t,e,o),n=!0},p:s,i(e){n||(ne(t.$$.fragment,e),n=!0)},o(e){oe(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}();return{c(){l&&l.c()},m(e,n){l&&l.m(e,n),t=!0},p(e,l){o&&o.p&&(!t||131072&l)&&h(o,n,e,e[17],l,Pe,We)},i(e){t||(ne(l,e),t=!0)},o(e){oe(l,e),t=!1},d(e){l&&l.d(e)}}}function Je(e,t){let n,o,l,r;var s=t[2];function i(e){return{props:{file:e[26]}}}return s&&(o=new s(i(t)),o.$on("delete",t[13])),{key:e,first:null,c(){n=E(),o&&ie(o.$$.fragment),l=E(),this.first=n},m(e,t){b(e,n,t),o&&ce(o,e,t),b(e,l,t),r=!0},p(e,n){t=e;const r={};if(1&n&&(r.file=t[26]),s!==(s=t[2])){if(o){ee();const e=o;oe(e.$$.fragment,1,0,(()=>{ae(e,1)})),te()}s?(o=new s(i(t)),o.$on("delete",t[13]),ie(o.$$.fragment),ne(o.$$.fragment,1),ce(o,l.parentNode,l)):o=null}else s&&o.$set(r)},i(e){r||(o&&ne(o.$$.fragment,e),r=!0)},o(e){o&&oe(o.$$.fragment,e),r=!1},d(e){e&&w(n),e&&w(l),o&&ae(o,e)}}}function Qe(e){let t,n,o,l,r,c,a,f,p,g,$,x,z,_=[],E=new Map,T=[{type:"file"},{multiple:!0},{accept:e[3]},{disabled:o=e[4]||e[0].length>=e[5]},e[15]],P={};for(let e=0;e<T.length;e+=1)P=i(P,T[e]);const D=e[18]["empty-layer"],R=m(D,e,e[17],qe),S=R||function(e){let t,n,o,l,r,s;t=new Ce({props:{class:"icon"}});const i=[Xe,Ke,Ve,Ue],c=[];function a(e,t){return e[4]?0:e[7]?1:e[6]?2:3}return l=a(e),r=c[l]=i[l](e),{c(){ie(t.$$.fragment),n=C(),o=k("div"),r.c(),L(o,"class","title svelte-11deuuc")},m(e,r){ce(t,e,r),b(e,n,r),b(e,o,r),c[l].m(o,null),s=!0},p(e,t){let n=l;l=a(e),l===n?c[l].p(e,t):(ee(),oe(c[n],1,1,(()=>{c[n]=null})),te(),r=c[l],r?r.p(e,t):(r=c[l]=i[l](e),r.c()),ne(r,1),r.m(o,null))},i(e){s||(ne(t.$$.fragment,e),ne(r),s=!0)},o(e){oe(t.$$.fragment,e),oe(r),s=!1},d(e){ae(t,e),e&&w(n),e&&w(o),c[l].d()}}}(e);let I=e[0].length<e[5]&&Ye(e),N=e[0];const A=e=>`${e[26].name}-${e[26].lastModified}`;for(let t=0;t<N.length;t+=1){let n=Te(e,N,t),o=A(n);E.set(o,_[t]=Je(o,n))}return{c(){t=k("label"),n=k("input"),l=C(),r=k("div"),S&&S.c(),c=C(),a=k("div"),I&&I.c(),p=C();for(let e=0;e<_.length;e+=1)_[e].c();M(n,P),W(n,"svelte-11deuuc",!0),L(r,"class","empty-layer svelte-11deuuc"),L(a,"class","dropzone-layer svelte-11deuuc"),W(a,"accepting",e[6]),L(t,"class",g=y(Ee("file-dropzone",e[1]))+" svelte-11deuuc"),W(t,"has-content",e[0]&&0!==e[0].length),W(t,"wrong-type",e[7]),W(t,"disabled",e[4]||e[0].length>=e[5])},m(o,i){b(o,t,i),v(t,n),e[19](n),v(t,l),v(t,r),S&&S.m(r,null),e[20](r),v(t,c),v(t,a),I&&I.m(a,null),e[21](a),v(t,p);for(let e=0;e<_.length;e+=1)_[e].m(t,null);var u;$=!0,x||(z=[j(n,"change",e[12]),j(a,"dragover",B(O(e[11]))),j(a,"dragenter",e[22]),j(a,"dragleave",e[23]),j(a,"drop",B(O(e[12]))),(u=f=Le.call(null,a,{disabled:e[4]||e[0].length>=e[5]}),u&&d(u.destroy)?u.destroy:s),j(t,"click",e[14])],x=!0)},p(e,[l]){M(n,P=function(e,t){const n={},o={},l={$$scope:1};let r=e.length;for(;r--;){const s=e[r],i=t[r];if(i){for(const e in s)e in i||(o[e]=1);for(const e in i)l[e]||(n[e]=i[e],l[e]=1);e[r]=i}else for(const e in s)l[e]=1}for(const e in o)e in n||(n[e]=void 0);return n}(T,[{type:"file"},{multiple:!0},(!$||8&l)&&{accept:e[3]},(!$||49&l&&o!==(o=e[4]||e[0].length>=e[5]))&&{disabled:o},32768&l&&e[15]])),W(n,"svelte-11deuuc",!0),R?R.p&&(!$||131264&l)&&h(R,D,e,e[17],l,He,qe):S&&S.p&&131280&l&&S.p(e,l),e[0].length<e[5]?I?(I.p(e,l),33&l&&ne(I,1)):(I=Ye(e),I.c(),ne(I,1),I.m(a,null)):I&&(ee(),oe(I,1,1,(()=>{I=null})),te()),f&&d(f.update)&&49&l&&f.update.call(null,{disabled:e[4]||e[0].length>=e[5]}),64&l&&W(a,"accepting",e[6]),8197&l&&(N=e[0],ee(),_=function(e,t,n,o,l,r,s,i,c,a,u,d){let f=e.length,p=r.length,m=f;const g={};for(;m--;)g[e[m].key]=m;const h=[],$=new Map,y=new Map;for(m=p;m--;){const e=d(l,r,m),i=n(e);let c=s.get(i);c?o&&c.p(e,t):(c=a(i,e),c.c()),$.set(i,h[m]=c),i in g&&y.set(i,Math.abs(m-g[i]))}const v=new Set,b=new Set;function w(e){ne(e,1),e.m(i,u),s.set(e.key,e),u=e.first,p--}for(;f&&p;){const t=h[p-1],n=e[f-1],o=t.key,l=n.key;t===n?(u=t.first,f--,p--):$.has(l)?!s.has(o)||v.has(o)?w(t):b.has(l)?f--:y.get(o)>y.get(l)?(b.add(o),w(t)):(v.add(l),f--):(c(n,s),f--)}for(;f--;){const t=e[f];$.has(t.key)||c(t,s)}for(;p;)w(h[p-1]);return h}(_,l,A,1,e,N,E,t,re,Je,null,Te),te()),(!$||2&l&&g!==(g=y(Ee("file-dropzone",e[1]))+" svelte-11deuuc"))&&L(t,"class",g),3&l&&W(t,"has-content",e[0]&&0!==e[0].length),130&l&&W(t,"wrong-type",e[7]),51&l&&W(t,"disabled",e[4]||e[0].length>=e[5])},i(e){if(!$){ne(S,e),ne(I);for(let e=0;e<N.length;e+=1)ne(_[e]);$=!0}},o(e){oe(S,e),oe(I);for(let e=0;e<_.length;e+=1)oe(_[e]);$=!1},d(n){n&&w(t),e[19](null),S&&S.d(n),e[20](null),I&&I.d(),e[21](null);for(let e=0;e<_.length;e+=1)_[e].d();x=!1,u(z)}}}function Ze(e,n,o){const l=["class","files","fileComponent","accept","beforeChange","disabled","max"];let r=$(n,l),{$$slots:s={},$$scope:c}=n,{class:a=null}=n;const{FileTile:u}=t;let d,f,p,{files:m=[]}=n,{fileComponent:g=u}=n,{accept:h=null}=n,{beforeChange:y=null}=n,{disabled:v=!1}=n,{max:b=1/0}=n,w=!1,x=!1;const k=I();return e.$$set=e=>{n=i(i({},n),function(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}(e)),o(15,r=$(n,l)),"class"in e&&o(1,a=e.class),"files"in e&&o(0,m=e.files),"fileComponent"in e&&o(2,g=e.fileComponent),"accept"in e&&o(3,h=e.accept),"beforeChange"in e&&o(16,y=e.beforeChange),"disabled"in e&&o(4,v=e.disabled),"max"in e&&o(5,b=e.max),"$$scope"in e&&o(17,c=e.$$scope)},[m,a,g,h,v,b,w,x,d,f,p,function(e){o(7,x=[...e.dataTransfer.items].some((e=>!Me(h,e))))},async function(e){const t=Array.from((e.dataTransfer||e.target).files);await Promise.all(t.map((async e=>{try{"function"==typeof y&&await y(e)}catch(e){return}Me(h,e)&&m.length<b&&m.push(e)}))),setTimeout((()=>o(7,x=!1)),1e3),k("change",{files:m,nativeEvent:e}),o(10,p.value="",p),o(6,w=!1)},function({detail:e}){o(0,m=m.filter((t=>t!==e))),k("change",{files:m})},function(e){e.target!=d&&e.target!=f&&e.target!=p&&e.preventDefault()},r,y,c,s,function(e){A[e?"unshift":"push"]((()=>{p=e,o(10,p)}))},function(e){A[e?"unshift":"push"]((()=>{d=e,o(8,d)}))},function(e){A[e?"unshift":"push"]((()=>{f=e,o(9,f)}))},()=>o(6,w=!0),()=>{o(6,w=!1),o(7,x=!1)}]}class et extends fe{constructor(e){var t;super(),document.getElementById("svelte-11deuuc-style")||((t=k("style")).id="svelte-11deuuc-style",t.textContent=".file-dropzone.svelte-11deuuc.svelte-11deuuc.svelte-11deuuc{border:0.125em dashed currentColor;border-radius:1.5625em;color:#326173;display:block;margin:2em 0 0.5em;position:relative}.file-dropzone.svelte-11deuuc.svelte-11deuuc.svelte-11deuuc:focus-within{border-color:rgba(50, 97, 115, 0.5);border-style:solid}.file-dropzone.disabled.svelte-11deuuc.svelte-11deuuc.svelte-11deuuc{color:#888}.file-dropzone.svelte-11deuuc input.svelte-11deuuc.svelte-11deuuc{clip:rect(0, 0, 0, 0);height:1px;margin:-1px;overflow:hidden;position:absolute;width:1px}.file-dropzone.svelte-11deuuc .icon{stroke:currentColor}.file-dropzone.svelte-11deuuc .empty-layer.svelte-11deuuc.svelte-11deuuc{align-items:center;display:flex;padding:2em 1em;z-index:1}.file-dropzone.svelte-11deuuc .empty-layer .title.svelte-11deuuc.svelte-11deuuc{color:currentColor;flex:1;font-weight:500;margin-left:0.5em;text-align:center}.file-dropzone.svelte-11deuuc .dropzone-layer.svelte-11deuuc.svelte-11deuuc{align-items:center;border-radius:1.5625em;cursor:pointer;display:flex;height:100%;justify-content:flex-end;left:0;position:absolute;top:0;width:100%;z-index:2}.file-dropzone.svelte-11deuuc .dropzone-layer.svelte-11deuuc.svelte-11deuuc:hover{background:rgba(50, 97, 115, 0.025)}.file-dropzone.svelte-11deuuc .dropzone-layer.svelte-11deuuc .ripple{background-color:rgba(50, 97, 115, 0.1)}.file-dropzone.svelte-11deuuc .dropzone-layer.accepting.svelte-11deuuc.svelte-11deuuc{background-color:rgba(50, 97, 115, 0.05)}.file-dropzone.svelte-11deuuc .dropzone-layer.svelte-11deuuc svg{margin-right:1em;opacity:0;pointer-events:none;stroke:currentColor;transition:transform 150ms}.file-dropzone.svelte-11deuuc input.svelte-11deuuc:focus~.dropzone-layer.svelte-11deuuc{background:rgba(50, 97, 115, 0.05)}.file-dropzone.disabled.svelte-11deuuc .dropzone-layer.svelte-11deuuc.svelte-11deuuc{background:none;cursor:not-allowed}.file-dropzone.has-content.svelte-11deuuc.svelte-11deuuc.svelte-11deuuc{display:grid;gap:0.5em;grid-template-columns:repeat(auto-fill, 12em);padding:1em}.file-dropzone.has-content.svelte-11deuuc .empty-layer.svelte-11deuuc.svelte-11deuuc{display:none}.file-dropzone.has-content.svelte-11deuuc .dropzone-layer.svelte-11deuuc svg{opacity:1}.file-dropzone.wrong-type.svelte-11deuuc.svelte-11deuuc.svelte-11deuuc{color:#b80000}.file-dropzone.wrong-type.svelte-11deuuc .dropzone-layer.svelte-11deuuc.svelte-11deuuc:hover{background-color:rgba(184, 0, 0, 0.025)}.file-dropzone.wrong-type.svelte-11deuuc .dropzone-layer.accepting.svelte-11deuuc.svelte-11deuuc{background-color:rgba(184, 0, 0, 0.05)}.file-dropzone.wrong-type.svelte-11deuuc .dropzone-layer.svelte-11deuuc .ripple{background-color:rgba(184, 0, 0, 0.1)}.file-dropzone.wrong-type.svelte-11deuuc .dropzone-layer.svelte-11deuuc svg.plus{transform:rotate(45deg)}",v(document.head,t)),de(this,e,Ze,Qe,f,{class:1,files:0,fileComponent:2,accept:3,beforeChange:16,disabled:4,max:5})}}function tt(e,t,n){const o=e.slice();return o[41]=t[n],o[43]=n,o}function nt(e,t,n){const o=e.slice();return o[44]=t[n],o[45]=t,o[46]=n,o}function ot(e){let t;return{c(){t=k("div"),t.textContent="Drag & Drop Dokumenter oder klicken Sie hier zum Hochladen\n von Dateien",L(t,"slot","drag-and-drop-message")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function lt(e){let t;return{c(){t=k("div"),t.textContent="Inkorrektes File Format",L(t,"slot","incorrect-file-message")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function rt(e){let t;return{c(){t=k("div"),t.textContent="Loslassen um hochzuladen",L(t,"slot","release-to-upload-message")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function st(e){let t;return{c(){t=k("div"),t.textContent="File Upload steht gerade nicht zur Verfügung",L(t,"slot","upload-unavailable-message")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function it(e){let t,n,o,l,r,s,i=e[3],c=[];for(let t=0;t<i.length;t+=1)c[t]=ut(nt(e,i,t));const a=e=>oe(c[e],1,1,(()=>{c[e]=null}));return o=new e[7]({props:{disabled:e[4],filled:!0,style:"color: whitesmoke; display: inline;",type:"submit",$$slots:{default:[dt]},$$scope:{ctx:e}}}),o.$on("click",e[24]),r=new e[7]({props:{small:!0,filled:!0,danger:!0,style:"color: whitesmoke; display: inline;",$$slots:{default:[ft]},$$scope:{ctx:e}}}),r.$on("click",e[25]),{c(){for(let e=0;e<c.length;e+=1)c[e].c();t=C(),n=k("div"),ie(o.$$.fragment),l=C(),ie(r.$$.fragment),L(n,"class","flex gap svelte-ifmgly")},m(e,i){for(let t=0;t<c.length;t+=1)c[t].m(e,i);b(e,t,i),b(e,n,i),ce(o,n,null),v(n,l),ce(r,n,null),s=!0},p(e,n){if(1048&n[0]){let o;for(i=e[3],o=0;o<i.length;o+=1){const l=nt(e,i,o);c[o]?(c[o].p(l,n),ne(c[o],1)):(c[o]=ut(l),c[o].c(),ne(c[o],1),c[o].m(t.parentNode,t))}for(ee(),o=i.length;o<c.length;o+=1)a(o);te()}const l={};16&n[0]&&(l.disabled=e[4]),65536&n[1]&&(l.$$scope={dirty:n,ctx:e}),o.$set(l);const s={};65536&n[1]&&(s.$$scope={dirty:n,ctx:e}),r.$set(s)},i(e){if(!s){for(let e=0;e<i.length;e+=1)ne(c[e]);ne(o.$$.fragment,e),ne(r.$$.fragment,e),s=!0}},o(e){c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)oe(c[e]);oe(o.$$.fragment,e),oe(r.$$.fragment,e),s=!1},d(e){x(c,e),e&&w(t),e&&w(n),ae(o),ae(r)}}}function ct(e){let t,n;return t=new ze({props:{size:"18"}}),{c(){ie(t.$$.fragment)},m(e,o){ce(t,e,o),n=!0},p:s,i(e){n||(ne(t.$$.fragment,e),n=!0)},o(e){oe(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function at(e){let t,n;return t=new we({props:{size:"18"}}),{c(){ie(t.$$.fragment)},m(e,o){ce(t,e,o),n=!0},p:s,i(e){n||(ne(t.$$.fragment,e),n=!0)},o(e){oe(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function ut(e){let t,n,o,l,r,s,i,c,a,u,f,p,m,g,h,$,y,x,z,E,B,M,P,W=e[44].file.name+"",D=jt(e[44].file.size)+"";function R(t){e[22](t,e[44])}let S={type:"text",id:"fileTitle_"+e[46],required:!0};return void 0!==e[44].custom_name&&(S.value=e[44].custom_name),g=new e[8]({props:S}),A.push((()=>se(g,"value",R))),y=new e[7]({props:{disabled:e[4],small:!0,filled:!0,style:"color: whitesmoke; display: inline;",type:"submit",$$slots:{default:[ct]},$$scope:{ctx:e}}}),z=new e[7]({props:{small:!0,filled:!0,danger:!0,style:"color: whitesmoke; display: inline;",$$slots:{default:[at]},$$scope:{ctx:e}}}),z.$on("click",(function(){return e[23](e[46])})),{c(){t=k("div"),n=k("form"),o=k("div"),l=k("div"),r=_("#"),s=_(e[46]),i=C(),c=k("div"),a=_(W),u=C(),f=k("div"),p=_(D),m=C(),ie(g.$$.fragment),$=C(),ie(y.$$.fragment),x=C(),ie(z.$$.fragment),L(c,"class","word-break svelte-ifmgly"),L(o,"class","container-file svelte-ifmgly"),L(n,"id",E="submitForm_"+e[44].file.name+"_"+e[46]),L(n,"class","svelte-ifmgly"),L(t,"class","form-step svelte-ifmgly")},m(h,w){b(h,t,w),v(t,n),v(n,o),v(o,l),v(l,r),v(l,s),v(o,i),v(o,c),v(c,a),v(o,u),v(o,f),v(f,p),v(o,m),ce(g,o,null),v(o,$),ce(y,o,null),v(o,x),ce(z,o,null),B=!0,M||(P=j(n,"submit",O((function(){d(e[10](e[44],e[46]))&&e[10](e[44],e[46]).apply(this,arguments)}))),M=!0)},p(t,o){e=t,(!B||8&o[0])&&W!==(W=e[44].file.name+"")&&T(a,W),(!B||8&o[0])&&D!==(D=jt(e[44].file.size)+"")&&T(p,D);const l={};!h&&8&o[0]&&(h=!0,l.value=e[44].custom_name,V((()=>h=!1))),g.$set(l);const r={};16&o[0]&&(r.disabled=e[4]),65536&o[1]&&(r.$$scope={dirty:o,ctx:e}),y.$set(r);const s={};65536&o[1]&&(s.$$scope={dirty:o,ctx:e}),z.$set(s),(!B||8&o[0]&&E!==(E="submitForm_"+e[44].file.name+"_"+e[46]))&&L(n,"id",E)},i(e){B||(ne(g.$$.fragment,e),ne(y.$$.fragment,e),ne(z.$$.fragment,e),B=!0)},o(e){oe(g.$$.fragment,e),oe(y.$$.fragment,e),oe(z.$$.fragment,e),B=!1},d(e){e&&w(t),ae(g),ae(y),ae(z),M=!1,P()}}}function dt(e){let t;return{c(){t=_("Alle Dokumente hochladen")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function ft(e){let t;return{c(){t=_("Alle Dokumente entfernen")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function pt(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function mt(e){let t,n,o,l,r,s,i,c;const a=[ht,gt],u=[];function d(e,t){return 0===e[40].length?0:1}return s=d(e),i=u[s]=a[s](e),{c(){t=k("div"),n=k("table"),o=k("thead"),o.innerHTML='<tr class="svelte-ifmgly"><th class="svelte-ifmgly">#</th> \n <th class="svelte-ifmgly">Datei</th> \n <th class="text_right svelte-ifmgly">Grösse</th> \n <th class="tablehead--action svelte-ifmgly">Aktionen</th></tr>',l=C(),r=k("tbody"),i.c(),L(o,"class","tablehead"),L(n,"class","tableFixHead"),L(t,"class","task_list svelte-ifmgly")},m(e,i){b(e,t,i),v(t,n),v(n,o),v(n,l),v(n,r),u[s].m(r,null),c=!0},p(e,t){let n=s;s=d(e),s===n?u[s].p(e,t):(ee(),oe(u[n],1,1,(()=>{u[n]=null})),te(),i=u[s],i?i.p(e,t):(i=u[s]=a[s](e),i.c()),ne(i,1),i.m(r,null))},i(e){c||(ne(i),c=!0)},o(e){oe(i),c=!1},d(e){e&&w(t),u[s].d()}}}function gt(e){let t,n,o=e[40],l=[];for(let t=0;t<o.length;t+=1)l[t]=vt(tt(e,o,t));const r=e=>oe(l[e],1,1,(()=>{l[e]=null}));return{c(){for(let e=0;e<l.length;e+=1)l[e].c();t=E()},m(e,o){for(let t=0;t<l.length;t+=1)l[t].m(e,o);b(e,t,o),n=!0},p(e,n){if(2068&n[0]){let s;for(o=e[40],s=0;s<o.length;s+=1){const r=tt(e,o,s);l[s]?(l[s].p(r,n),ne(l[s],1)):(l[s]=vt(r),l[s].c(),ne(l[s],1),l[s].m(t.parentNode,t))}for(ee(),s=o.length;s<l.length;s+=1)r(s);te()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ne(l[e]);n=!0}},o(e){l=l.filter(Boolean);for(let e=0;e<l.length;e+=1)oe(l[e]);n=!1},d(e){x(l,e),e&&w(t)}}}function ht(e){let t;return{c(){t=k("tr"),t.innerHTML='<td colspan="4" style="text-align: center;" class="svelte-ifmgly">Keine Dokumente gefunden</td>',L(t,"class","svelte-ifmgly")},m(e,n){b(e,t,n)},p:s,i:s,o:s,d(e){e&&w(t)}}}function $t(e){let t,n,o,l;return n=new ye({props:{size:"18"}}),{c(){t=k("a"),ie(n.$$.fragment),L(t,"href",o="/api/userreport/"+e[41]._id+"?h="+window.location.hostname),P(t,"color","whitesmoke")},m(e,o){b(e,t,o),ce(n,t,null),l=!0},p(e,n){(!l||4&n[0]&&o!==(o="/api/userreport/"+e[41]._id+"?h="+window.location.hostname))&&L(t,"href",o)},i(e){l||(ne(n.$$.fragment,e),l=!0)},o(e){oe(n.$$.fragment,e),l=!1},d(e){e&&w(t),ae(n)}}}function yt(e){let t,n;return t=new we({props:{size:"18"}}),{c(){ie(t.$$.fragment)},m(e,o){ce(t,e,o),n=!0},p:s,i(e){n||(ne(t.$$.fragment,e),n=!0)},o(e){oe(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function vt(e){let t,n,o,l,r,s,i,c,a,u,d,f,p,m,g,h,$=e[43]+1+"",y=e[41].title+"",x=jt(e[41].sizeInByte)+"";return f=new e[7]({props:{small:!0,filled:!0,style:"display: inline;",$$slots:{default:[$t]},$$scope:{ctx:e}}}),m=new e[7]({props:{disabled:e[4],small:!0,filled:!0,danger:!0,style:"color: whitesmoke; display: inline;",$$slots:{default:[yt]},$$scope:{ctx:e}}}),m.$on("click",(function(){return e[26](e[41])})),{c(){t=k("tr"),n=k("td"),o=_($),l=C(),r=k("td"),s=_(y),i=C(),c=k("td"),a=_(x),u=C(),d=k("td"),ie(f.$$.fragment),p=C(),ie(m.$$.fragment),g=C(),L(n,"class","svelte-ifmgly"),P(r,"max-width","30em"),L(r,"class","svelte-ifmgly"),L(c,"class","text_right svelte-ifmgly"),L(d,"class","svelte-ifmgly"),L(t,"class","svelte-ifmgly")},m(e,$){b(e,t,$),v(t,n),v(n,o),v(t,l),v(t,r),v(r,s),v(t,i),v(t,c),v(c,a),v(t,u),v(t,d),ce(f,d,null),v(d,p),ce(m,d,null),v(t,g),h=!0},p(t,n){e=t,(!h||4&n[0])&&y!==(y=e[41].title+"")&&T(s,y),(!h||4&n[0])&&x!==(x=jt(e[41].sizeInByte)+"")&&T(a,x);const o={};4&n[0]|65536&n[1]&&(o.$$scope={dirty:n,ctx:e}),f.$set(o);const l={};16&n[0]&&(l.disabled=e[4]),65536&n[1]&&(l.$$scope={dirty:n,ctx:e}),m.$set(l)},i(e){h||(ne(f.$$.fragment,e),ne(m.$$.fragment,e),h=!0)},o(e){oe(f.$$.fragment,e),oe(m.$$.fragment,e),h=!1},d(e){e&&w(t),ae(f),ae(m)}}}function bt(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function wt(e){let t;return{c(){t=_("Abbrechen")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function xt(e){let t;return{c(){t=_("Löschen")},m(e,n){b(e,t,n)},d(e){e&&w(t)}}}function kt(e){let t,n,o,l,r,s,i;return l=new e[7]({props:{filled:!0,$$slots:{default:[wt]},$$scope:{ctx:e}}}),l.$on("click",e[27]),s=new e[7]({props:{danger:!0,outline:!0,$$slots:{default:[xt]},$$scope:{ctx:e}}}),s.$on("click",e[28]),{c(){t=k("p"),t.textContent="Willst du das Dokument wirklich löschen?",n=C(),o=k("div"),ie(l.$$.fragment),r=C(),ie(s.$$.fragment),L(o,"class","flex_div svelte-ifmgly")},m(e,c){b(e,t,c),b(e,n,c),b(e,o,c),ce(l,o,null),v(o,r),ce(s,o,null),i=!0},p(e,t){const n={};65536&t[1]&&(n.$$scope={dirty:t,ctx:e}),l.$set(n);const o={};65536&t[1]&&(o.$$scope={dirty:t,ctx:e}),s.$set(o)},i(e){i||(ne(l.$$.fragment,e),ne(s.$$.fragment,e),i=!0)},o(e){oe(l.$$.fragment,e),oe(s.$$.fragment,e),i=!1},d(e){e&&w(t),e&&w(n),e&&w(o),ae(l),ae(s)}}}function zt(e){let t,n,o;return n=new ge({props:{size:"25"}}),{c(){t=k("div"),ie(n.$$.fragment),L(t,"slot","title-icon")},m(e,l){b(e,t,l),ce(n,t,null),o=!0},p:s,i(e){o||(ne(n.$$.fragment,e),o=!0)},o(e){oe(n.$$.fragment,e),o=!1},d(e){e&&w(t),ae(n)}}}function _t(e){let t,n;return t=new e[6]({props:{title:"Bestätigung",closeCallback:e[39],danger:!0,$$slots:{"title-icon":[zt],default:[kt]},$$scope:{ctx:e}}}),{c(){ie(t.$$.fragment)},m(e,o){ce(t,e,o),n=!0},p(e,n){const o={};256&n[1]&&(o.closeCallback=e[39]),65536&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ne(t.$$.fragment,e),n=!0)},o(e){oe(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function Ct(e){let t,n,o,l,r,s,i,c,a,u,d,f;function p(t){e[20](t)}let m={accept:"image/*,.pdf,.csv,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,.ppt,.doc,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",max:Et,$$slots:{"upload-unavailable-message":[st],"release-to-upload-message":[rt],"incorrect-file-message":[lt],"drag-and-drop-message":[ot]},$$scope:{ctx:e}};void 0!==e[0]&&(m.files=e[0]),l=new et({props:m}),A.push((()=>se(l,"files",p))),l.$on("change",e[21]);let g=e[3]&&e[3].length>0&&it(e),h={ctx:e,current:null,token:null,hasCatch:!1,pending:bt,then:mt,catch:pt,value:40,blocks:[,,,]};function $(t){e[29](t)}le(c=e[2],h);let y={$$slots:{default:[_t,({closeCallback:e})=>({39:e}),({closeCallback:e})=>[0,e?256:0]]},$$scope:{ctx:e}};return void 0!==e[1]&&(y.open=e[1]),u=new e[5]({props:y}),A.push((()=>se(u,"open",$))),{c(){t=k("div"),n=k("form"),o=k("div"),ie(l.$$.fragment),s=C(),g&&g.c(),i=C(),h.block.c(),a=C(),ie(u.$$.fragment),L(o,"class","document-choose svelte-ifmgly"),L(n,"id","uploadForm"),L(t,"class","form-step svelte-ifmgly")},m(e,r){b(e,t,r),v(t,n),v(n,o),ce(l,o,null),b(e,s,r),g&&g.m(e,r),b(e,i,r),h.block.m(e,h.anchor=r),h.mount=()=>a.parentNode,h.anchor=a,b(e,a,r),ce(u,e,r),f=!0},p(t,n){e=t;const o={};65536&n[1]&&(o.$$scope={dirty:n,ctx:e}),!r&&1&n[0]&&(r=!0,o.files=e[0],V((()=>r=!1))),l.$set(o),e[3]&&e[3].length>0?g?(g.p(e,n),8&n[0]&&ne(g,1)):(g=it(e),g.c(),ne(g,1),g.m(i.parentNode,i)):g&&(ee(),oe(g,1,1,(()=>{g=null})),te()),h.ctx=e,4&n[0]&&c!==(c=e[2])&&le(c,h)||function(e,t,n){const o=t.slice(),{resolved:l}=e;e.current===e.then&&(o[e.value]=l),e.current===e.catch&&(o[e.error]=l),e.block.p(o,n)}(h,e,n);const s={};65792&n[1]&&(s.$$scope={dirty:n,ctx:e}),!d&&2&n[0]&&(d=!0,s.open=e[1],V((()=>d=!1))),u.$set(s)},i(e){f||(ne(l.$$.fragment,e),ne(g),ne(h.block),ne(u.$$.fragment,e),f=!0)},o(e){oe(l.$$.fragment,e),oe(g);for(let e=0;e<3;e+=1){oe(h.blocks[e])}oe(u.$$.fragment,e),f=!1},d(e){e&&w(t),ae(l),e&&w(s),g&&g.d(e),e&&w(i),h.block.d(e),h.token=null,h=null,e&&w(a),ae(u,e)}}}const Et=5;function jt(e){if(e>=1073741824)e=Math.round(e/1073741824*100)/100+" GB";else if(e>=1048576){e=Math.round(e/1048576*100)/100+" MB"}else if(e>=1024){e=Math.round(e/1024*100)/100+" KB"}else e>1?e+=" bytes":1==e?e+=" byte":e="0 bytes";return e}function Ot(e,s,i){let c,a,u;p(e,l,(e=>i(18,a=e))),p(e,r,(e=>i(19,u=e)));const{Modal:d,Dialog:f,Button:m,TextField:g}=t;let h,$,y,{task:v}=s,b=!1,w=[],x=v.task?.readonly,k=[],z=[];function _(e){e.length<=0?e=[]:(i(3,z=[]),e.forEach((e=>{i(3,z=[...z,{file:e,custom_name:e.name}])})),i(0,k=[]))}function C(e){i(0,k=[...e]),_(k),i(0,k=[])}const E=async()=>{const e=await v;i(16,y=await o.getSchema(e.event)),$=e.task.id;return await o.getUserReports($)};function j(e,t){if(!e)return;if(t){if(!e.name)return}else t=e.name;const n=new FormData;n.append("title",t),n.append("file",e),o.uploadUserReport($,n)}w=E();const O=e=>{i(1,b=!0),h=e},B=()=>{i(1,b=!1),h=""};function L(){o.deleteUserReport(h).then((()=>{i(1,b=!1),h=""}))}async function M(){await Promise.all(z.map((async(e,t)=>{await j(e.file,e.custom_name)}))),i(3,z=[])}n.subscribe((e=>{e&&e.taskId===$&&i(2,w=E())}));return e.$$set=e=>{"task"in e&&i(15,v=e.task)},e.$$.update=()=>{if(1&e.$$.dirty[0]&&_(k),1015808&e.$$.dirty[0]&&y&&v.task&&a&&u.role?.length&&y.authorization?.length){const e=y.authorization.some((e=>a?.find((t=>t===e.role&&"edit"===e.activity))));i(17,x||=!e)}131072&e.$$.dirty[0]&&i(4,c=x)},[k,b,w,z,c,d,f,m,g,C,function(e,t){var n;e.file&&e&&(j(e.file,e.custom_name),n=t,z.splice(n,1),i(3,z=[...z]))},O,B,L,M,v,y,x,a,u,function(e){k=e,i(0,k)},e=>C(e.detail.files),function(t,n){e.$$.not_equal(n.custom_name,t)&&(n.custom_name=t,i(3,z))},e=>{z.splice(e,1),i(3,z=[...z])},()=>{M()},()=>i(3,z=[]),e=>O(e._id),()=>B(),()=>L(),function(e){b=e,i(1,b)}]}class Bt extends fe{constructor(e){var t;super(),document.getElementById("svelte-ifmgly-style")||((t=k("style")).id="svelte-ifmgly-style",t.textContent=".form-step.svelte-ifmgly.svelte-ifmgly{margin-bottom:1em}.form-step.svelte-ifmgly .document-choose.svelte-ifmgly{margin:1em}.form-step.svelte-ifmgly .btn-document{width:300px;text-align:center}.form-step.svelte-ifmgly .btn-document div{margin-inline:auto}.form-step.svelte-ifmgly .btn-document-primary{color:#fff}.form-step.svelte-ifmgly .btn-document-secondary{background-color:#91BDD9}.form-step.svelte-ifmgly .container-file.svelte-ifmgly{display:grid;padding:0 1em;gap:1em;grid-template-columns:50px 218px 80px 1fr 50px 50px;align-items:center}.form-step.svelte-ifmgly .word-break.svelte-ifmgly{word-break:break-all}.gap.svelte-ifmgly.svelte-ifmgly{gap:1em}.task_list.svelte-ifmgly.svelte-ifmgly{flex:auto;overflow-y:scroll;overflow-x:hidden;width:99%;height:30em;border:1px solid #ccc;border-radius:0.5em;margin-top:2em}.task_list.svelte-ifmgly th.svelte-ifmgly{padding:0.8em}.task_list.svelte-ifmgly td.svelte-ifmgly{padding:0.8em}.task_list.svelte-ifmgly tr.svelte-ifmgly:nth-child(2n){background-color:#f8f8fe}.flex_div.svelte-ifmgly.svelte-ifmgly{display:flex;margin-top:1em;justify-content:space-between}.task_list.svelte-ifmgly td.svelte-ifmgly{vertical-align:middle}.tablehead--action.svelte-ifmgly.svelte-ifmgly{width:13em}#nameOfFile.svelte-ifmgly.svelte-ifmgly{width:15em;margin-top:6px;overflow-wrap:anywhere}#sizeOfFile.svelte-ifmgly.svelte-ifmgly{margin-top:3px;font-style:italic}td.text_right.svelte-ifmgly.svelte-ifmgly,th.text_right.svelte-ifmgly.svelte-ifmgly{padding-right:1em}",v(document.head,t)),de(this,e,Ot,Ct,f,{task:15},[-1,-1])}}function Lt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mt,Tt,Pt=(Mt=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){l(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==r(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},s),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:i.bind(null,t,n),mount:c.bind(null,t,n),unmount:a.bind(null,t,n),update:u.bind(null,t,n)}};var s={component:null,domElementGetter:null,props:{}};function i(e){return Promise.resolve()}function c(e,t,n){var l=Object.keys(s),r=Object.keys(e).reduce((function(t,n){return l.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var l=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),s=l();t.instance=new e.component(o(o({},r),{},{target:s,props:Object.assign({},n,e.props)}))}))}function a(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function u(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},Mt(Tt={exports:{}},Tt.exports),Tt.exports);const Wt=Lt(Pt)({component:Bt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Dt,mount:Rt,unmount:St}=Wt;e({bootstrap:Dt,mount:Rt,unmount:St});e("Report",Bt)}}}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enablerr-ui/report",
3
3
  "description": "enablerr - the Next Enterprise Solution",
4
- "version": "0.2.37",
4
+ "version": "0.2.39",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"