@enablerr-ui/task 0.2.129 → 0.2.130

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","@enablerr-ui/detail","@enablerr-ui/workflow","@enablerr-ui/report","@enablerr-ui/collab"],function(t){"use strict";var e,n,o,s,r,a,i,l,c,u,d,m,f;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,s=t.currentRoles,r=t.settings,a=t.toasts,i=t.TextArea,l=t.Page},function(t){c=t.Form,u=t.checkDate},function(t){d=t.Workflow},function(t){m=t.Report},function(t){f=t.Collaboration}],execute:function(){t("version","0.2.129");function $(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var p,g,v=(p=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){s(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 s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t){return r="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},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==r(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},a),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:i.bind(null,e,n),mount:l.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var a={component:null,domElementGetter:null,props:{}};function i(t){return Promise.resolve()}function l(t,e,n){var s=Object.keys(a),r=Object.keys(t).reduce(function(e,n){return s.includes(n)||(e[n]=t[n]),e},{});return Promise.resolve().then(function(){var s=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),a=s();e.instance=new t.component(o(o({},r),{},{target:a,props:Object.assign({},n,t.props)}))})}function c(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)})}},p(g={exports:{}},g.exports),g.exports),b=$(v);function y(){}function h(t){return t()}function w(){return Object.create(null)}function k(t){t.forEach(h)}function x(t){return"function"==typeof t}function I(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function _(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return y;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function j(t,e){t.appendChild(e)}function S(t,e,n){t.insertBefore(e,n||null)}function E(t){t.parentNode.removeChild(t)}function C(t){return document.createElement(t)}function N(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function T(t){return document.createTextNode(t)}function B(){return T(" ")}function O(){return T("")}function D(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function z(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function P(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let A;function W(t){A=t}function V(){if(!A)throw new Error("Function called outside component initialization");return A}const M=[],R=[],q=[],G=[],F=Promise.resolve();let U=!1;function Y(){U||(U=!0,F.then(Q))}function J(){return Y(),F}function L(t){q.push(t)}function K(t){G.push(t)}let Z=!1;const H=new Set;function Q(){if(!Z){Z=!0;do{for(let t=0;t<M.length;t+=1){const e=M[t];W(e),X(e.$$)}for(W(null),M.length=0;R.length;)R.pop()();for(let t=0;t<q.length;t+=1){const e=q[t];H.has(e)||(H.add(e),e())}q.length=0}while(M.length);for(;G.length;)G.pop()();U=!1,Z=!1,H.clear()}}function X(t){if(null!==t.fragment){t.update(),k(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const tt=new Set;let et;function nt(){et={r:0,c:[],p:et}}function ot(){et.r||k(et.c),et=et.p}function st(t,e){t&&t.i&&(tt.delete(t),t.i(e))}function rt(t,e,n,o){if(t&&t.o){if(tt.has(t))return;tt.add(t),et&&et.c.push(()=>{tt.delete(t),o&&(n&&t.d(1),o())}),t.o(e)}}function at(t,e){const n=e.token={};function o(t,o,s,r){if(e.token!==n)return;e.resolved=r;let a=e.ctx;void 0!==s&&(a=a.slice(),a[s]=r);const i=t&&(e.current=t)(a);let l=!1;e.block&&(e.blocks?e.blocks.forEach((t,n)=>{n!==o&&t&&(nt(),rt(t,1,1,()=>{e.blocks[n]===t&&(e.blocks[n]=null)}),ot())}):e.block.d(1),i.c(),st(i,1),i.m(e.mount(),e.anchor),l=!0),e.block=i,e.blocks&&(e.blocks[o]=i),l&&Q()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=V();if(t.then(t=>{W(n),o(e.then,1,e.value,t),W(null)},t=>{if(W(n),o(e.catch,2,e.error,t),W(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 s}function it(t,e,n){const o=e.slice(),{resolved:s}=t;t.current===t.then&&(o[t.value]=s),t.current===t.catch&&(o[t.error]=s),t.block.p(o,n)}const lt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ct(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function ut(t){t&&t.c()}function dt(t,e,n,o){const{fragment:s,on_mount:r,on_destroy:a,after_update:i}=t.$$;s&&s.m(e,n),o||L(()=>{const e=r.map(h).filter(x);a?a.push(...e):k(e),t.$$.on_mount=[]}),i.forEach(L)}function mt(t,e){const n=t.$$;null!==n.fragment&&(k(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ft(t,e,n,o,s,r,a=[-1]){const i=A;W(t);const l=t.$$={fragment:null,ctx:null,props:r,update:y,not_equal:s,bound:w(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i?i.$$.context:e.context||[]),callbacks:w(),dirty:a,skip_bound:!1};let c=!1;if(l.ctx=n?n(t,e.props||{},(e,n,...o)=>{const r=o.length?o[0]:n;return l.ctx&&s(l.ctx[e],l.ctx[e]=r)&&(!l.skip_bound&&l.bound[e]&&l.bound[e](r),c&&function(t,e){-1===t.$$.dirty[0]&&(M.push(t),Y(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n}):[],l.update(),c=!0,k(l.before_update),l.fragment=!!o&&o(l.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);l.fragment&&l.fragment.l(t),t.forEach(E)}else l.fragment&&l.fragment.c();e.intro&&st(t.$$.fragment),dt(t,e.target,e.anchor,e.customElement),Q()}W(i)}class $t{$destroy(){mt(this,1),this.$destroy=y}$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 pt(t){let e,n,o,s,r;return{c(){e=N("svg"),n=N("path"),o=N("line"),s=N("line"),D(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"),D(o,"x1","12"),D(o,"y1","9"),D(o,"x2","12"),D(o,"y2","13"),D(s,"x1","12"),D(s,"y1","17"),D(s,"x2","12.01"),D(s,"y2","17"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"width",t[0]),D(e,"height",t[0]),D(e,"fill","none"),D(e,"viewBox","0 0 24 24"),D(e,"stroke","currentColor"),D(e,"stroke-width",t[1]),D(e,"stroke-linecap","round"),D(e,"stroke-linejoin","round"),D(e,"class",r="feather feather-alert-triangle "+t[2])},m(t,r){S(t,e,r),j(e,n),j(e,o),j(e,s)},p(t,[n]){1&n&&D(e,"width",t[0]),1&n&&D(e,"height",t[0]),2&n&&D(e,"stroke-width",t[1]),4&n&&r!==(r="feather feather-alert-triangle "+t[2])&&D(e,"class",r)},i:y,o:y,d(t){t&&E(e)}}}function gt(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=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,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class vt extends $t{constructor(t){super(),ft(this,t,gt,pt,I,{size:0,strokeWidth:1,class:2})}}function bt(t){let e,n,o;return{c(){e=N("svg"),n=N("polyline"),D(n,"points","6 9 12 15 18 9"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"width",t[0]),D(e,"height",t[0]),D(e,"fill","none"),D(e,"viewBox","0 0 24 24"),D(e,"stroke","currentColor"),D(e,"stroke-width",t[1]),D(e,"stroke-linecap","round"),D(e,"stroke-linejoin","round"),D(e,"class",o="feather feather-chevron-down "+t[2])},m(t,o){S(t,e,o),j(e,n)},p(t,[n]){1&n&&D(e,"width",t[0]),1&n&&D(e,"height",t[0]),2&n&&D(e,"stroke-width",t[1]),4&n&&o!==(o="feather feather-chevron-down "+t[2])&&D(e,"class",o)},i:y,o:y,d(t){t&&E(e)}}}function yt(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=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,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class ht extends $t{constructor(t){super(),ft(this,t,yt,bt,I,{size:0,strokeWidth:1,class:2})}}function wt(t){return{c:y,m:y,p:y,i:y,o:y,d:y}}function kt(t){let e,n,o,s,r,a,i,l,u,d,m,f,$,p,g,v,b,h,w,k,x,I=t[15](t[4].status)+"",_=t[22].identity.shortDescription&&function(t){let e,n,o=t[22].identity.shortDescription+"";return{c(){e=C("div"),n=T(o),D(e,"class","shortDescription svelte-3m9yjb")},m(t,o){S(t,e,o),j(e,n)},p:y,d(t){t&&E(e)}}}(t),N=t[22].identity.description&&function(t){let e,n;return e=new t[9]({props:{$$slots:{default:[jt]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};16777216&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}(t);r=new t[12]({});let A=t[4]._stornoUser&&St(t),W=t[4]._stornoReason&&Et(t);function V(e){t[19](e)}g=new t[12]({props:{class:"divider"}});let M={schema:t[22],recID:t[6],prevEventID:t[7],taskId:t[2],taskOrg:t[1],prev:t[8],readonly:t[5],deletable:t[1]?.task?.deletable,stornable:t[1]?.task?.stornable,isStandalone:t[3],root:"true"};return void 0!==t[0]&&(M.__disabled=t[0]),w=new c({props:M}),R.push(()=>ct(w,"__disabled",V)),w.$on("back",t[14]),{c(){e=C("div"),n=C("div"),_&&_.c(),o=B(),N&&N.c(),s=B(),ut(r.$$.fragment),a=B(),i=C("div"),l=C("div"),l.textContent="Task-Status",u=B(),d=C("div"),m=T(I),f=B(),A&&A.c(),$=O(),W&&W.c(),p=B(),ut(g.$$.fragment),v=B(),b=C("div"),b.textContent=" ",h=B(),ut(w.$$.fragment),D(n,"class","accordion-description svelte-3m9yjb"),D(l,"class","task--status-title svelte-3m9yjb"),D(d,"class","task--status-label svelte-3m9yjb"),D(i,"class","task--status svelte-3m9yjb"),D(e,"class","subcat svelte-3m9yjb"),P(b,"height","0.5em")},m(t,c){S(t,e,c),j(e,n),_&&_.m(n,null),j(n,o),N&&N.m(n,null),j(n,s),dt(r,n,null),j(e,a),j(e,i),j(i,l),j(i,u),j(i,d),j(d,m),j(d,f),A&&A.m(d,null),j(d,$),W&&W.m(d,null),S(t,p,c),dt(g,t,c),S(t,v,c),S(t,b,c),S(t,h,c),dt(w,t,c),x=!0},p(t,e){t[22].identity.shortDescription&&_.p(t,e),t[22].identity.description&&N.p(t,e),(!x||16&e)&&I!==(I=t[15](t[4].status)+"")&&z(m,I),t[4]._stornoUser?A?A.p(t,e):(A=St(t),A.c(),A.m(d,$)):A&&(A.d(1),A=null),t[4]._stornoReason?W?W.p(t,e):(W=Et(t),W.c(),W.m(d,null)):W&&(W.d(1),W=null);const n={};64&e&&(n.recID=t[6]),128&e&&(n.prevEventID=t[7]),4&e&&(n.taskId=t[2]),2&e&&(n.taskOrg=t[1]),256&e&&(n.prev=t[8]),32&e&&(n.readonly=t[5]),2&e&&(n.deletable=t[1]?.task?.deletable),2&e&&(n.stornable=t[1]?.task?.stornable),8&e&&(n.isStandalone=t[3]),!k&&1&e&&(k=!0,n.__disabled=t[0],K(()=>k=!1)),w.$set(n)},i(t){x||(st(N),st(r.$$.fragment,t),st(g.$$.fragment,t),st(w.$$.fragment,t),x=!0)},o(t){rt(N),rt(r.$$.fragment,t),rt(g.$$.fragment,t),rt(w.$$.fragment,t),x=!1},d(t){t&&E(e),_&&_.d(),N&&N.d(),mt(r),A&&A.d(),W&&W.d(),t&&E(p),mt(g,t),t&&E(v),t&&E(b),t&&E(h),mt(w,t)}}}function xt(t){let e,n,o=t[22].identity.description+"";return{c(){e=C("div"),n=T(o),D(e,"class","description svelte-3m9yjb")},m(t,o){S(t,e,o),j(e,n)},p:y,d(t){t&&E(e)}}}function It(t){let e,n,o;return n=new ht({props:{size:"20",class:"ml accordion-chevron"}}),{c(){e=T("Beschreibung\n "),ut(n.$$.fragment)},m(t,s){S(t,e,s),dt(n,t,s),o=!0},p:y,i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&E(e),mt(n,t)}}}function _t(t){let e,n,o;return n=new t[11]({props:{noRipple:!0,$$slots:{default:[It]},$$scope:{ctx:t}}}),n.$on("click",function(){x(t[23])&&t[23].apply(this,arguments)}),{c(){e=C("div"),ut(n.$$.fragment),D(e,"slot","handle")},m(t,s){S(t,e,s),dt(n,e,null),o=!0},p(e,o){t=e;const s={};16777216&o&&(s.$$scope={dirty:o,ctx:t}),n.$set(s)},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&E(e),mt(n)}}}function jt(t){let e,n;return e=new t[10]({props:{$$slots:{handle:[_t,({toggle:t})=>({23:t}),({toggle:t})=>t?8388608:0],default:[xt]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};25165824&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function St(t){let e,n,o=t[4]._stornoUser+"";return{c(){e=T("von "),n=T(o)},m(t,o){S(t,e,o),S(t,n,o)},p(t,e){16&e&&o!==(o=t[4]._stornoUser+"")&&z(n,o)},d(t){t&&E(e),t&&E(n)}}}function Et(t){let e,n,o=t[4]._stornoReason+"";return{c(){e=T(", "),n=T(o)},m(t,o){S(t,e,o),S(t,n,o)},p(t,e){16&e&&o!==(o=t[4]._stornoReason+"")&&z(n,o)},d(t){t&&E(e),t&&E(n)}}}function Ct(t){return{c:y,m:y,p:y,i:y,o:y,d:y}}function Nt(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:Ct,then:kt,catch:wt,value:22,blocks:[,,,]};return at(t[13],o),{c(){e=O(),o.block.c()},m(t,s){S(t,e,s),o.block.m(t,o.anchor=s),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){it(o,t=e,n)},i(t){n||(st(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){rt(o.blocks[t])}n=!1},d(t){t&&E(e),o.block.d(t),o.token=null,o=null}}}function Tt(t,s,r){let{task:a}=s,{taskId:i}=s,{eventItem:l}=s,{followerEventId:c}=s,{followerTaskId:u}=s,{isStandalone:d}=s,{__disabled:m}=s;const{Accordion:f,AccordionSection:$,Button:p,Divider:g}=e,v=a,b=l,y=n.getSchema(c||b._id);let h,w,k=v.task?.readonly,x=v.docId||v.id;c&&(w=x,x=void 0,h=b._id),o.subscribe(async t=>{t&&t.taskId===i&&n.getTaskqueue(null,t.taskId).then(({task:e})=>{r(4,v.status=e.status||t.status,v),r(4,v.readonly=e.readonly,v),v.readonly&&r(5,k=v.readonly)})});const I={New:x?"Eröffnet":"Neu",WaitingForApproval:"Zu visieren",Ready:"Bereit für nächsten Schritt",Waiting:"Wartet auf Verarbeitung",Closing:"Wartet auf Abschluss",Closed:"Abgeschlossen",Storno:"Storniert"};return t.$$set=t=>{"task"in t&&r(1,a=t.task),"taskId"in t&&r(2,i=t.taskId),"eventItem"in t&&r(16,l=t.eventItem),"followerEventId"in t&&r(17,c=t.followerEventId),"followerTaskId"in t&&r(18,u=t.followerTaskId),"isStandalone"in t&&r(3,d=t.isStandalone),"__disabled"in t&&r(0,m=t.__disabled)},[m,a,i,d,v,k,x,h,w,f,$,p,g,y,()=>window.singleSpaNavigate("/"),t=>{if(c)return"Neu";return I[t]||""},l,c,u,function(t){m=t,r(0,m)}]}class Bt extends $t{constructor(t){var e;super(),document.getElementById("svelte-3m9yjb-style")||((e=C("style")).id="svelte-3m9yjb-style",e.textContent=".subcat.svelte-3m9yjb .task--status.svelte-3m9yjb{width:100%;display:flex;gap:1em;margin:1.1em 0}.subcat.svelte-3m9yjb .task--status .task--status-title.svelte-3m9yjb{flex:0 1 40%}.subcat.svelte-3m9yjb .task--status .task--status-label.svelte-3m9yjb{flex:1}.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb{margin:2em 0 1em 0}.subcat.svelte-3m9yjb .accordion-description .description.svelte-3m9yjb{margin-top:1em}.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb .btn,.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb .btn:hover,.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb .btn:focus{padding:0;background:inherit}.description.svelte-3m9yjb.svelte-3m9yjb{font-style:italic;white-space:pre-wrap}.shortDescription.svelte-3m9yjb.svelte-3m9yjb{font-style:italic;margin-bottom:1em}",j(document.head,e)),ft(this,t,Tt,Nt,I,{task:1,taskId:2,eventItem:16,followerEventId:17,followerTaskId:18,isStandalone:3,__disabled:0})}}const{document:Ot}=lt;function Dt(t){return{c:y,m:y,p:y,i:y,o:y,d:y}}function zt(t){let e,n,o,s,r,a,i,l,c,u,d,m,f=t[21]&&function(t){let e;return{c(){e=C("div"),e.textContent=`${t[21]}`,D(e,"class","description svelte-s8a1g4")},m(t,n){S(t,e,n)},p:y,d(t){t&&E(e)}}}(t);r=new t[13]({props:{name:"Rolle",$$slots:{default:[Pt]},$$scope:{ctx:t}}}),i=new t[13]({props:{name:"visiert von",$$slots:{default:[At]},$$scope:{ctx:t}}}),c=new t[13]({props:{name:"visiert am",$$slots:{default:[Vt]},$$scope:{ctx:t}}});let $=t[0].mailInfo&&Mt(t),p=!(t[0].task?.stornable||"Storno"===t[0].status)&&Zt(t);return{c(){e=C("h3"),e.textContent="Visum bearbeiten",n=B(),o=C("div"),f&&f.c(),s=B(),ut(r.$$.fragment),a=B(),ut(i.$$.fragment),l=B(),ut(c.$$.fragment),u=B(),$&&$.c(),d=B(),p&&p.c(),D(o,"class","visum svelte-s8a1g4")},m(t,g){S(t,e,g),S(t,n,g),S(t,o,g),f&&f.m(o,null),j(o,s),dt(r,o,null),j(o,a),dt(i,o,null),j(o,l),dt(c,o,null),j(o,u),$&&$.m(o,null),j(o,d),p&&p.m(o,null),m=!0},p(t,e){t[21]&&f.p(t,e);const n={};5&e[0]|512&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const s={};64&e[0]|512&e[1]&&(s.$$scope={dirty:e,ctx:t}),i.$set(s);const a={};33&e[0]|512&e[1]&&(a.$$scope={dirty:e,ctx:t}),c.$set(a),t[0].mailInfo?$?($.p(t,e),1&e[0]&&st($,1)):($=Mt(t),$.c(),st($,1),$.m(o,d)):$&&(nt(),rt($,1,1,()=>{$=null}),ot()),t[0].task?.stornable||"Storno"===t[0].status?p&&(nt(),rt(p,1,1,()=>{p=null}),ot()):p?(p.p(t,e),1&e[0]&&st(p,1)):(p=Zt(t),p.c(),st(p,1),p.m(o,null))},i(t){m||(st(r.$$.fragment,t),st(i.$$.fragment,t),st(c.$$.fragment,t),st($),st(p),m=!0)},o(t){rt(r.$$.fragment,t),rt(i.$$.fragment,t),rt(c.$$.fragment,t),rt($),rt(p),m=!1},d(t){t&&E(e),t&&E(n),t&&E(o),f&&f.d(),mt(r),mt(i),mt(c),$&&$.d(),p&&p.d()}}}function Pt(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[0].visum?.role||t[2]}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};5&n[0]&&(o.value=t[0].visum?.role||t[2]),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function At(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[6]}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};64&n[0]&&(o.value=t[6]),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Wt(t){let e,n,o,s;return e=new t[15]({props:{noCalendar:!0,disabled:!0,value:t[5]}}),o=new t[16]({props:{inputClass:"visumTime",disabled:!0,value:t[5]}}),{c(){ut(e.$$.fragment),n=B(),ut(o.$$.fragment)},m(t,r){dt(e,t,r),S(t,n,r),dt(o,t,r),s=!0},p(t,n){const s={};32&n[0]&&(s.value=t[5]),e.$set(s);const r={};32&n[0]&&(r.value=t[5]),o.$set(r)},i(t){s||(st(e.$$.fragment,t),st(o.$$.fragment,t),s=!0)},o(t){rt(e.$$.fragment,t),rt(o.$$.fragment,t),s=!1},d(t){mt(e,t),t&&E(n),mt(o,t)}}}function Vt(t){let e,n,o=t[0].visum&&Wt(t);return{c(){o&&o.c(),e=O()},m(t,s){o&&o.m(t,s),S(t,e,s),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n[0]&&st(o,1)):(o=Wt(t),o.c(),st(o,1),o.m(e.parentNode,e)):o&&(nt(),rt(o,1,1,()=>{o=null}),ot())},i(t){n||(st(o),n=!0)},o(t){rt(o),n=!1},d(t){o&&o.d(t),t&&E(e)}}}function Mt(t){let e,n,o,s,r,a,i,l,c,u,d;e=new t[18]({props:{text:"Infos aus Mailversand"}});let m=t[0].mailInfo.accepted?.length&&Rt(t),f=t[0].mailInfo.rejected?.length&&Gt(t),$=t[0].mailInfo.fileName&&Ut(t);return a=new t[13]({props:{name:"Grösse inkl. Datei in Bytes",$$slots:{default:[Jt]},$$scope:{ctx:t}}}),l=new t[13]({props:{name:"Antwort vom Mailsystem",$$slots:{default:[Lt]},$$scope:{ctx:t}}}),u=new t[13]({props:{name:"Identifikation des Mailversands",$$slots:{default:[Kt]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment),n=B(),m&&m.c(),o=B(),f&&f.c(),s=B(),$&&$.c(),r=B(),ut(a.$$.fragment),i=B(),ut(l.$$.fragment),c=B(),ut(u.$$.fragment)},m(t,p){dt(e,t,p),S(t,n,p),m&&m.m(t,p),S(t,o,p),f&&f.m(t,p),S(t,s,p),$&&$.m(t,p),S(t,r,p),dt(a,t,p),S(t,i,p),dt(l,t,p),S(t,c,p),dt(u,t,p),d=!0},p(t,e){t[0].mailInfo.accepted?.length?m?(m.p(t,e),1&e[0]&&st(m,1)):(m=Rt(t),m.c(),st(m,1),m.m(o.parentNode,o)):m&&(nt(),rt(m,1,1,()=>{m=null}),ot()),t[0].mailInfo.rejected?.length?f?(f.p(t,e),1&e[0]&&st(f,1)):(f=Gt(t),f.c(),st(f,1),f.m(s.parentNode,s)):f&&(nt(),rt(f,1,1,()=>{f=null}),ot()),t[0].mailInfo.fileName?$?($.p(t,e),1&e[0]&&st($,1)):($=Ut(t),$.c(),st($,1),$.m(r.parentNode,r)):$&&(nt(),rt($,1,1,()=>{$=null}),ot());const n={};1&e[0]|512&e[1]&&(n.$$scope={dirty:e,ctx:t}),a.$set(n);const i={};1&e[0]|512&e[1]&&(i.$$scope={dirty:e,ctx:t}),l.$set(i);const c={};1&e[0]|512&e[1]&&(c.$$scope={dirty:e,ctx:t}),u.$set(c)},i(t){d||(st(e.$$.fragment,t),st(m),st(f),st($),st(a.$$.fragment,t),st(l.$$.fragment,t),st(u.$$.fragment,t),d=!0)},o(t){rt(e.$$.fragment,t),rt(m),rt(f),rt($),rt(a.$$.fragment,t),rt(l.$$.fragment,t),rt(u.$$.fragment,t),d=!1},d(t){mt(e,t),t&&E(n),m&&m.d(t),t&&E(o),f&&f.d(t),t&&E(s),$&&$.d(t),t&&E(r),mt(a,t),t&&E(i),mt(l,t),t&&E(c),mt(u,t)}}}function Rt(t){let e,n;return e=new t[13]({props:{name:"versandt an",$$slots:{default:[qt]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function qt(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[0].mailInfo.accepted.join(", ")}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.accepted.join(", ")),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Gt(t){let e,n;return e=new t[13]({props:{name:"nicht versandt an",$$slots:{default:[Ft]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Ft(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[0].mailInfo.rejected.join(", ")}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.rejected.join(", ")),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Ut(t){let e,n;return e=new t[13]({props:{name:"Dateiname",$$slots:{default:[Yt]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Yt(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[0].mailInfo.fileName}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.fileName),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Jt(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[0].mailInfo.messageSize}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.messageSize),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Lt(t){let e,n;return e=new i({props:{disabled:!0,value:t[0].mailInfo.response}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.response),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Kt(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[0].mailInfo.messageId}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.messageId),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Zt(t){let e,n,o,s;const r=[Qt,Ht],a=[];function i(t,e){return t[0].visum?0:1}return e=i(t),n=a[e]=r[e](t),{c(){n.c(),o=O()},m(t,n){a[e].m(t,n),S(t,o,n),s=!0},p(t,s){let l=e;e=i(t),e===l?a[e].p(t,s):(nt(),rt(a[l],1,1,()=>{a[l]=null}),ot(),n=a[e],n?n.p(t,s):(n=a[e]=r[e](t),n.c()),st(n,1),n.m(o.parentNode,o))},i(t){s||(st(n),s=!0)},o(t){rt(n),s=!1},d(t){a[e].d(t),t&&E(o)}}}function Ht(t){let e,n,o,s;e=new t[17]({props:{filled:!0,disabled:!t[39]||t[1]||t[8],$$slots:{default:[Xt]},$$scope:{ctx:t}}}),e.$on("click",t[23]);let r=!t[39]&&t[9]?.comment&&te(t);return{c(){ut(e.$$.fragment),n=B(),r&&r.c(),o=O()},m(t,a){dt(e,t,a),S(t,n,a),r&&r.m(t,a),S(t,o,a),s=!0},p(t,n){const s={};258&n[0]&&(s.disabled=!t[39]||t[1]||t[8]),128&n[0]|512&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s),!t[39]&&t[9]?.comment?r?(r.p(t,n),512&n[0]&&st(r,1)):(r=te(t),r.c(),st(r,1),r.m(o.parentNode,o)):r&&(nt(),rt(r,1,1,()=>{r=null}),ot())},i(t){s||(st(e.$$.fragment,t),st(r),s=!0)},o(t){rt(e.$$.fragment,t),rt(r),s=!1},d(t){mt(e,t),t&&E(n),r&&r.d(t),t&&E(o)}}}function Qt(t){let e,n,o,s;e=new t[17]({props:{disabled:!t[39],filled:!0,danger:!0,$$slots:{default:[ee]},$$scope:{ctx:t}}}),e.$on("click",t[24]);let r=!t[39]&&t[10]?.comment&&ne(t);return{c(){ut(e.$$.fragment),n=B(),r&&r.c(),o=O()},m(t,a){dt(e,t,a),S(t,n,a),r&&r.m(t,a),S(t,o,a),s=!0},p(t,n){const s={};512&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s),!t[39]&&t[10]?.comment?r?(r.p(t,n),1024&n[0]&&st(r,1)):(r=ne(t),r.c(),st(r,1),r.m(o.parentNode,o)):r&&(nt(),rt(r,1,1,()=>{r=null}),ot())},i(t){s||(st(e.$$.fragment,t),st(r),s=!0)},o(t){rt(e.$$.fragment,t),rt(r),s=!1},d(t){mt(e,t),t&&E(n),r&&r.d(t),t&&E(o)}}}function Xt(t){let e;return{c(){e=T(t[7])},m(t,n){S(t,e,n)},p(t,n){128&n[0]&&z(e,t[7])},d(t){t&&E(e)}}}function te(t){let e,n,o;return n=new t[14]({props:{style:"color: darkred; font-weight: 900;",value:t[9].comment}}),{c(){e=C("div"),ut(n.$$.fragment),P(e,"margin-top","1em")},m(t,s){S(t,e,s),dt(n,e,null),o=!0},p(t,e){const o={};512&e[0]&&(o.value=t[9].comment),n.$set(o)},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&E(e),mt(n)}}}function ee(t){let e;return{c(){e=T("Visum zurücknehmen")},m(t,n){S(t,e,n)},d(t){t&&E(e)}}}function ne(t){let e,n,o;return n=new t[14]({props:{style:"color: darkred; font-weight: 900;",value:t[10].comment}}),{c(){e=C("div"),ut(n.$$.fragment),P(e,"margin-top","1em")},m(t,s){S(t,e,s),dt(n,e,null),o=!0},p(t,e){const o={};1024&e[0]&&(o.value=t[10].comment),n.$set(o)},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&E(e),mt(n)}}}function oe(t){return{c:y,m:y,p:y,i:y,o:y,d:y}}function se(t){let e;return{c(){e=T("Abbrechen")},m(t,n){S(t,e,n)},d(t){t&&E(e)}}}function re(t){let e;return{c(){e=T("Ja, bitte visieren")},m(t,n){S(t,e,n)},d(t){t&&E(e)}}}function ae(t){let e,n,o,s,r,a,i;return s=new t[17]({props:{filled:!0,$$slots:{default:[se]},$$scope:{ctx:t}}}),s.$on("click",t[33]),a=new t[17]({props:{danger:!0,outline:!0,$$slots:{default:[re]},$$scope:{ctx:t}}}),a.$on("click",t[26]),{c(){e=C("p"),e.textContent="Willst du den Vorgang jetzt visieren?",n=B(),o=C("div"),ut(s.$$.fragment),r=B(),ut(a.$$.fragment),D(o,"class","flex_div svelte-s8a1g4")},m(t,l){S(t,e,l),S(t,n,l),S(t,o,l),dt(s,o,null),j(o,r),dt(a,o,null),i=!0},p(t,e){const n={};512&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};512&e[1]&&(o.$$scope={dirty:e,ctx:t}),a.$set(o)},i(t){i||(st(s.$$.fragment,t),st(a.$$.fragment,t),i=!0)},o(t){rt(s.$$.fragment,t),rt(a.$$.fragment,t),i=!1},d(t){t&&E(e),t&&E(n),t&&E(o),mt(s),mt(a)}}}function ie(t){let e,n,o;return n=new vt({props:{size:"25"}}),{c(){e=C("div"),ut(n.$$.fragment),D(e,"slot","title-icon")},m(t,s){S(t,e,s),dt(n,e,null),o=!0},p:y,i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&E(e),mt(n)}}}function le(t){let e,n;return e=new t[12]({props:{title:"Bestätigung",closeCallback:t[38],danger:!0,$$slots:{"title-icon":[ie],default:[ae]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};128&n[1]&&(o.closeCallback=t[38]),512&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function ce(t){let e;return{c(){e=T("Abbrechen")},m(t,n){S(t,e,n)},d(t){t&&E(e)}}}function ue(t){let e;return{c(){e=T("Ja, bitte zurücknehmen")},m(t,n){S(t,e,n)},d(t){t&&E(e)}}}function de(t){let e,n,o,s,r,a,i;return s=new t[17]({props:{filled:!0,$$slots:{default:[ce]},$$scope:{ctx:t}}}),s.$on("click",t[35]),a=new t[17]({props:{danger:!0,outline:!0,$$slots:{default:[ue]},$$scope:{ctx:t}}}),a.$on("click",t[27]),{c(){e=C("p"),e.textContent="Willst du das Visum zurücknehmen?",n=B(),o=C("div"),ut(s.$$.fragment),r=B(),ut(a.$$.fragment),D(o,"class","flex_div svelte-s8a1g4")},m(t,l){S(t,e,l),S(t,n,l),S(t,o,l),dt(s,o,null),j(o,r),dt(a,o,null),i=!0},p(t,e){const n={};512&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};512&e[1]&&(o.$$scope={dirty:e,ctx:t}),a.$set(o)},i(t){i||(st(s.$$.fragment,t),st(a.$$.fragment,t),i=!0)},o(t){rt(s.$$.fragment,t),rt(a.$$.fragment,t),i=!1},d(t){t&&E(e),t&&E(n),t&&E(o),mt(s),mt(a)}}}function me(t){let e,n,o;return n=new vt({props:{size:"25"}}),{c(){e=C("div"),ut(n.$$.fragment),D(e,"slot","title-icon")},m(t,s){S(t,e,s),dt(n,e,null),o=!0},p:y,i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&E(e),mt(n)}}}function fe(t){let e,n;return e=new t[12]({props:{title:"Bestätigung",closeCallback:t[38],danger:!0,$$slots:{"title-icon":[me],default:[de]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};128&n[1]&&(o.closeCallback=t[38]),512&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function $e(t){let e,n,o;return n=new t[20]({props:{outline:!0,$$slots:{default:[pe]},$$scope:{ctx:t}}}),{c(){e=C("div"),ut(n.$$.fragment),P(e,"margin-top","1em")},m(t,s){S(t,e,s),dt(n,e,null),o=!0},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&E(e),mt(n)}}}function pe(t){let e,n,o;return n=new t[19]({}),{c(){e=T("Bitte warten!\n"),ut(n.$$.fragment)},m(t,s){S(t,e,s),dt(n,t,s),o=!0},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&E(e),mt(n,t)}}}function ge(t){let e,n,o,s,r,a,i,l,c,u={ctx:t,current:null,token:null,hasCatch:!1,pending:oe,then:zt,catch:Dt,value:39,blocks:[,,,]};function d(e){t[34](e)}at(t[22](),u);let m={$$slots:{default:[le,({closeCallback:t})=>({38:t}),({closeCallback:t})=>[0,t?128:0]]},$$scope:{ctx:t}};function f(e){t[36](e)}void 0!==t[3]&&(m.open=t[3]),n=new t[11]({props:m}),R.push(()=>ct(n,"open",d));let $={$$slots:{default:[fe,({closeCallback:t})=>({38:t}),({closeCallback:t})=>[0,t?128:0]]},$$scope:{ctx:t}};void 0!==t[4]&&($.open=t[4]),r=new t[11]({props:$}),R.push(()=>ct(r,"open",f));let p=t[8]&&$e(t);return{c(){u.block.c(),e=B(),ut(n.$$.fragment),s=B(),ut(r.$$.fragment),i=B(),p&&p.c(),l=O()},m(t,o){u.block.m(t,u.anchor=o),u.mount=()=>e.parentNode,u.anchor=e,S(t,e,o),dt(n,t,o),S(t,s,o),dt(r,t,o),S(t,i,o),p&&p.m(t,o),S(t,l,o),c=!0},p(e,s){it(u,t=e,s);const i={};640&s[1]&&(i.$$scope={dirty:s,ctx:t}),!o&&8&s[0]&&(o=!0,i.open=t[3],K(()=>o=!1)),n.$set(i);const c={};640&s[1]&&(c.$$scope={dirty:s,ctx:t}),!a&&16&s[0]&&(a=!0,c.open=t[4],K(()=>a=!1)),r.$set(c),t[8]?p?256&s[0]&&st(p,1):(p=$e(t),p.c(),st(p,1),p.m(l.parentNode,l)):p&&(nt(),rt(p,1,1,()=>{p=null}),ot())},i(t){c||(st(u.block),st(n.$$.fragment,t),st(r.$$.fragment,t),st(p),c=!0)},o(t){for(let t=0;t<3;t+=1){rt(u.blocks[t])}rt(n.$$.fragment,t),rt(r.$$.fragment,t),rt(p),c=!1},d(t){u.block.d(t),u.token=null,u=null,t&&E(e),mt(n,t),t&&E(s),mt(r,t),t&&E(i),p&&p.d(t),t&&E(l)}}}function ve(t,i,l){let c,u;_(t,s,t=>l(31,c=t)),_(t,r,t=>l(32,u=t));const{Modal:d,Dialog:m,FormField:f,TextField:$,DatePicker:p,TimePicker:g,Button:v,Divider:b,Loading:y,Chip:h}=e;let w,k,x,I,j,S,E,C,N,{task:T}=i,{taskId:B}=i,{eventItem:O}=i,D=!1,z=!1;const P=O.output.approval[0].description||"",A=()=>{l(3,D=!1)};o.subscribe(t=>{t&&t.taskId===B&&(l(0,T.visum=t.data,T),l(0,T.status=t.status,T))});return t.$$set=t=>{"task"in t&&l(0,T=t.task),"taskId"in t&&l(28,B=t.taskId),"eventItem"in t&&l(29,O=t.eventItem)},t.$$.update=()=>{1610612743&t.$$.dirty[0]|3&t.$$.dirty[1]&&(l(5,k=new Date(T.visum?.timeStamp)),l(7,I=T.visum?"Visum erfolgreich erstellt":"Jetzt visieren"),l(30,j=!T.visum),l(30,j=j&&!!O.output?.approval?.length),j&&c&&(l(2,S=O.output.approval.flatMap(({refRole:t})=>t)),l(30,j=S.some(t=>c.some(e=>t===e)))),l(1,w=!j),l(6,x=T.visum?.user||(w?"":u.email)),J().then(()=>{const t=document.getElementsByClassName("visumTime")[0];t&&(t.disabled=!0)}))},[T,w,S,D,z,k,x,I,E,C,N,d,m,f,$,p,g,v,b,y,h,P,async()=>{if(T.visum){if(l(10,N=O.output.approval?.at(0)?.preventRemove),!0===N)return!1;if(!N)return!0;const{refItem:t,_state:e,mayBeEmpty:o}=N,s=O.output.class[0].name,r=await n.getDocById(s,T.docId),a=await n.getDocById(t,r[t]);if(!a)return o;return(await n.getTaskByDocId(a._id,!0)).status!==e}if(l(9,C=O.output.approval?.at(0)?.prevent),!C)return!0;const{refItem:t,_state:e,mayBeEmpty:o}=C,s=O.output.class[0].name,r=await n.getSectionView(t,{[s]:T.docId},!1);if(!r?.length)return o;const a=r.map(t=>t._id);return!(await n.getSectionView("_task",{docId:{$in:a}},!1)).some(t=>t.status===e)},()=>{l(3,D=!0)},()=>{l(4,z=!0)},A,()=>{l(3,D=!1);const t={eventId:O._id,eventDesignation:O.identity.designation,docId:T.docId,role:S.filter(t=>c.find(e=>e===t)).join(", "),user:u.email,timeStamp:(new Date).toISOString()};l(8,E=!0),n.setTaskVisum(T._id,t).then(e=>{e.taskId?(l(0,T.visum=t,T),window.singleSpaNavigate(`/task/${O._id}/${T._id}/task`)):a.failed("Das Visum konnte ncht gesetzt werden!",3e3)}).finally(()=>l(8,E=!1))},()=>{l(4,z=!1),n.deleteTaskVisum(T._id,O._id).then(t=>{!1!==t.status?(l(0,T.visum=!1,T),window.singleSpaNavigate(`/task/${O._id}/${T._id}/task`)):a.failed("Das Visum konnte ncht zurück genommen werden!",3e3)})},B,O,j,c,u,()=>A(),function(t){D=t,l(3,D)},()=>A(),function(t){z=t,l(4,z)}]}class be extends $t{constructor(t){var e;super(),Ot.getElementById("svelte-s8a1g4-style")||((e=C("style")).id="svelte-s8a1g4-style",e.textContent=".visum .time-picker .dropdown{display:none !important}.visum .form-field{margin-bottom:1em !important}.flex_div.svelte-s8a1g4.svelte-s8a1g4{display:flex;margin-top:1em;gap:0.5em;justify-content:space-between}div.visum.svelte-s8a1g4 div.description.svelte-s8a1g4{font-family:inherit;font-size:inherit;width:100%;min-height:2em;line-height:1.25em;margin-top:1em;margin-bottom:1.5em}",j(Ot.head,e)),ft(this,t,ve,ge,I,{task:0,taskId:28,eventItem:29},[-1,-1])}}const ye=[];const he=t("taskClipboard",function(t,e=y){let n;const o=[];function s(e){if(I(t,e)&&(t=e,n)){const e=!ye.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),ye.push(n,t)}if(e){for(let t=0;t<ye.length;t+=2)ye[t][0](ye[t+1]);ye.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(r,a=y){const i=[r,a];return o.push(i),1===o.length&&(n=e(s)||y),r(t),()=>{const t=o.indexOf(i);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1)),{document:we}=lt;function ke(t){let e,n,o,s,r,a,i,l,c,u=t[9](t[37],!!t[38]||t[0]===t[32],t[1])+"";function d(e){t[11](e)}n=new t[4]({props:{name:"menu",items:t[35],value:t[36].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",function(){x(t[8](t[41],t[33],t[32],t[38],t[39]))&&t[8](t[41],t[33],t[32],t[38],t[39]).apply(this,arguments)});var m=t[36].component;function f(t){let e={taskId:t[33],task:t[40],eventItem:t[37],followerEventId:t[38],isStandalone:t[5]};return void 0!==t[1]&&(e.__disabled=t[1]),{props:e}}return m&&(i=new m(f(t)),R.push(()=>ct(i,"__disabled",d)),i.$on("back",t[12])),{c(){e=C("div"),ut(n.$$.fragment),o=B(),s=T(u),r=B(),a=C("div"),i&&ut(i.$$.fragment),D(e,"class","task--header svelte-kw8mxg"),D(a,"class","task--content svelte-kw8mxg")},m(t,l){S(t,e,l),dt(n,e,null),j(e,o),j(e,s),S(t,r,l),S(t,a,l),i&&dt(i,a,null),c=!0},p(e,o){t=e;const r={};16&o[1]&&(r.items=t[35]),32&o[1]&&(r.value=t[36].name),n.$set(r),(!c||3&o[0]|194&o[1])&&u!==(u=t[9](t[37],!!t[38]||t[0]===t[32],t[1])+"")&&z(s,u);const $={};if(4&o[1]&&($.taskId=t[33]),512&o[1]&&($.task=t[40]),64&o[1]&&($.eventItem=t[37]),128&o[1]&&($.followerEventId=t[38]),!l&&2&o[0]&&(l=!0,$.__disabled=t[1],K(()=>l=!1)),m!==(m=t[36].component)){if(i){nt();const t=i;rt(t.$$.fragment,1,0,()=>{mt(t,1)}),ot()}m?(i=new m(f(t)),R.push(()=>ct(i,"__disabled",d)),i.$on("back",t[12]),ut(i.$$.fragment),st(i.$$.fragment,1),dt(i,a,null)):i=null}else m&&i.$set($)},i(t){c||(st(n.$$.fragment,t),i&&st(i.$$.fragment,t),c=!0)},o(t){rt(n.$$.fragment,t),i&&rt(i.$$.fragment,t),c=!1},d(t){t&&E(e),mt(n),t&&E(r),t&&E(a),i&&mt(i)}}}function xe(t){let e,n,o;return n=new t[3]({props:{constrainWidth:!0,title:t[31],titleClass:"task_title",closeCallback:t[13],class:"task--area",$$slots:{default:[ke]},$$scope:{ctx:t}}}),{c(){e=C("div"),ut(n.$$.fragment),D(e,"class","task svelte-kw8mxg")},m(t,s){S(t,e,s),dt(n,e,null),o=!0},p(t,e){const o={};1&e[1]&&(o.title=t[31]),3&e[0]|6134&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&E(e),mt(n)}}}function Ie(t){let e,n,o;return n=new t[2]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[xe,({closeCallback:t})=>({42:t}),({closeCallback:t})=>[0,t?2048:0]]},$$scope:{ctx:t}}}),n.$on("change",t[7]),{c(){e=C("div"),ut(n.$$.fragment),D(e,"class","task--page svelte-kw8mxg")},m(t,s){S(t,e,s),dt(n,e,null),o=!0},p(t,e){const o={};3&e[0]|6135&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&E(e),mt(n)}}}function _e(t){let e,n,o;return n=new l({props:{update:t[6],$$slots:{default:[Ie,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:s,item:r,eventItem:a,followerEventId:i,followerTaskId:l,task:c,findMenu:u}})=>({31:t,32:e,33:n,34:o,35:s,36:r,37:a,38:i,39:l,40:c,41:u}),({prop:t})=>[0,(t?1:0)|(t?2:0)|(t?4:0)|(t?8:0)|(t?16:0)|(t?32:0)|(t?64:0)|(t?128:0)|(t?256:0)|(t?512:0)|(t?1024:0)]]},$$scope:{ctx:t}}}),{c(){e=B(),ut(n.$$.fragment),we.title="enablerr - Task"},m(t,s){S(t,e,s),dt(n,t,s),o=!0},p(t,e){const o={};3&e[0]|6135&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&E(e),mt(n,t)}}}function je(t,o,s){let a,i;_(t,r,t=>s(10,a=t)),_(t,he,t=>s(25,i=t));const{Modal:l,Dialog:c,Tabs:$}=e;let p,g,v,b,y,h,w;const k=-1!==window.location.search.indexOf("view=standalone");let x,I,j,S=!1;const E={items:[{id:"task",name:"Aufgabe",component:Bt},{id:"visum",name:"Visum",component:be},{id:"collab",name:"Kommunikation",component:f},{id:"workflow",name:"Workflow",component:d},{id:"report",name:"Anhänge",component:m},{id:"widget"}],findBy(t,e){return this.items.find(n=>n[t]===e)},findByName(t){return this.findBy("name",t)},findById(t){return this.findBy("id",t)},deflt(){return this.items[0]},map(){return this.items.map(t=>t.name)}},C=()=>{scrollY=window.scrollY,x=document.body.style.position,I=document.body.style.overflow,j=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};C();const N=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){V().$$.on_destroy.push(t)}(()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"}),function(t){V().$$.on_mount.push(t)}(async()=>{!function(t,e,n=e){t.set(n)}(he,i=!1,i),await(async()=>{const t=t=>new Promise(e=>setTimeout(e,t));for(let e=0;e<5&&!g;e++)await t(100);if(!g)return!1;const e=await n.getEvents();return b=e.filter(t=>"widget"===t.output?.type&&t.output?.subType).filter(t=>t.authorization.some(t=>g.find(e=>e===t.role))).map(t=>{const{subType:n}=t.output,o=e.find(t=>t.output?.widgetType?.id===n);return{type:n,className:o?.output?.class[0].name,widget:o?.output?.widgetType}}),!0})()});return t.$$.update=()=>{1024&t.$$.dirty[0]&&a.role&&(g=a.role)},[p,S,l,c,$,k,async(t,e,o,r)=>{const a=await n.getEvent(t);a||window.singleSpaNavigate("/error");const i=E.findById(o);if(!i)return N(t,e,E.deflt());"task"!==o&&(r=void 0),s(0,p=e);let l={status:"New"},c=a.identity.designation;if(e!==t){const t=await n.getTaskById(e);let o=a.output.class[0].display?.find(t=>"identifier"===t.type)?.refItem;if(o||(o=t?.eventSchema?.display?.slice(0,1)),t.data&&o?.length){const e=o.map(e=>(e=e.split(".")[0],u(t.data["_"+e]||t.data[e]))).join(" • ");e&&(c+=` / ${e}`)}}let d="";if(r?.includes(":")&&([r,d]=r.split(":")),r){const t=await n.getEvent(r);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}if(e!==t?(l=await n.getTaskById(e,!0),l||window.singleSpaNavigate("/error"),l.event!==a._id.toString()&&(a._id=l.event)):e=void 0,"widget"===o){if(y&&!w){const t=await n.getTaskById(e);if(a.output.class[0].name===h.className)w=t.docId;else{const e=await n.getTask(a.output.class[0].name,t.docId);w=e[h.className]}}o=v||E.deflt().id,w&&window.open(`/widget/${h.type}/${w}?view=standalone`),N(t,e,E.findById(o))}else v=o;return{title:c,eventId:t,taskId:e,tabId:o,item:i,eventItem:a,followerEventId:r,followerTaskId:d,task:l,items:E.map(),findMenu:t=>E.findByName(t)}},function(t){t.detail.value?C():(document.body.style.position=x||"",document.body.style.top="",document.body.style.overflow=I||"",document.body.style.width=j||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:s}})=>{o||N(n,e,t(s))},(t,e,n)=>{const o=b||[];if(!t)return"";let s=!t.output?.approval;return J().then(()=>{Array.from(document.getElementsByClassName("menuTab")).map((r,a)=>{if(n&&a)r.querySelector("input").disabled=!0;else if(a&&(r.querySelector("input").disabled=e),1===a&&(r.querySelector("input").disabled=e||s),5===a){if(void 0===y)for(const e of o)if(y=!!t.output.class[0].item.find(n=>n.refClass===e.className||t.input?.class?.find(t=>t.name===e.className)||t.output.class[0].name===e.className),y){h=e;break}const e=r.querySelector("input + .content");y&&h?.widget?.name?(e.textContent=h?.widget?.name,e.style.display="flex"):e.style.display="none"}})}),""},a,function(t){S=t,s(1,S)},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(t=>t(e))}(t,e)},()=>k?window.close():window.singleSpaNavigate("/")]}class Se extends $t{constructor(t){var e;super(),we.getElementById("svelte-kw8mxg-style")||((e=C("style")).id="svelte-kw8mxg-style",e.textContent='.task--page.svelte-kw8mxg .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-kw8mxg{margin-top:4em}@media(max-height: 900px){.task.svelte-kw8mxg{margin-top:0}}.task.svelte-kw8mxg .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-kw8mxg .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}.task--header.svelte-kw8mxg{margin-top:0.5em}.task--header.svelte-kw8mxg .task_tabs{margin-bottom:1em}.task--content.svelte-kw8mxg{margin-top:1em;height:fit-content;min-height:40vh;max-height:90vh}',j(we.head,e)),ft(this,t,je,_e,I,{},[-1,-1])}}const Ee=b({component:Se,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Ce,mount:Ne,unmount:Te}=Ee;t({bootstrap:Ce,mount:Ne,unmount:Te});t("Task",Se)}}});
1
+ System.register(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/detail","@enablerr-ui/workflow","@enablerr-ui/report","@enablerr-ui/collab"],function(t){"use strict";var e,n,o,s,r,a,i,l,c,u,d,m,f;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,s=t.currentRoles,r=t.settings,a=t.toasts,i=t.TextArea,l=t.Page},function(t){c=t.Form,u=t.checkDate},function(t){d=t.Workflow},function(t){m=t.Report},function(t){f=t.Collaboration}],execute:function(){t("version","0.2.130");function $(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var p,g,v=(p=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){s(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 s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t){return r="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},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==r(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},a),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:i.bind(null,e,n),mount:l.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var a={component:null,domElementGetter:null,props:{}};function i(t){return Promise.resolve()}function l(t,e,n){var s=Object.keys(a),r=Object.keys(t).reduce(function(e,n){return s.includes(n)||(e[n]=t[n]),e},{});return Promise.resolve().then(function(){var s=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),a=s();e.instance=new t.component(o(o({},r),{},{target:a,props:Object.assign({},n,t.props)}))})}function c(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)})}},p(g={exports:{}},g.exports),g.exports),b=$(v);function y(){}function h(t){return t()}function w(){return Object.create(null)}function k(t){t.forEach(h)}function x(t){return"function"==typeof t}function I(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function _(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return y;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function j(t,e){t.appendChild(e)}function E(t,e,n){t.insertBefore(e,n||null)}function S(t){t.parentNode.removeChild(t)}function C(t){return document.createElement(t)}function N(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function B(t){return document.createTextNode(t)}function T(){return B(" ")}function O(){return B("")}function D(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function z(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function P(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let A;function W(t){A=t}function V(){if(!A)throw new Error("Function called outside component initialization");return A}const M=[],R=[],q=[],G=[],F=Promise.resolve();let U=!1;function Y(){U||(U=!0,F.then(Q))}function J(){return Y(),F}function L(t){q.push(t)}function K(t){G.push(t)}let Z=!1;const H=new Set;function Q(){if(!Z){Z=!0;do{for(let t=0;t<M.length;t+=1){const e=M[t];W(e),X(e.$$)}for(W(null),M.length=0;R.length;)R.pop()();for(let t=0;t<q.length;t+=1){const e=q[t];H.has(e)||(H.add(e),e())}q.length=0}while(M.length);for(;G.length;)G.pop()();U=!1,Z=!1,H.clear()}}function X(t){if(null!==t.fragment){t.update(),k(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const tt=new Set;let et;function nt(){et={r:0,c:[],p:et}}function ot(){et.r||k(et.c),et=et.p}function st(t,e){t&&t.i&&(tt.delete(t),t.i(e))}function rt(t,e,n,o){if(t&&t.o){if(tt.has(t))return;tt.add(t),et&&et.c.push(()=>{tt.delete(t),o&&(n&&t.d(1),o())}),t.o(e)}}function at(t,e){const n=e.token={};function o(t,o,s,r){if(e.token!==n)return;e.resolved=r;let a=e.ctx;void 0!==s&&(a=a.slice(),a[s]=r);const i=t&&(e.current=t)(a);let l=!1;e.block&&(e.blocks?e.blocks.forEach((t,n)=>{n!==o&&t&&(nt(),rt(t,1,1,()=>{e.blocks[n]===t&&(e.blocks[n]=null)}),ot())}):e.block.d(1),i.c(),st(i,1),i.m(e.mount(),e.anchor),l=!0),e.block=i,e.blocks&&(e.blocks[o]=i),l&&Q()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=V();if(t.then(t=>{W(n),o(e.then,1,e.value,t),W(null)},t=>{if(W(n),o(e.catch,2,e.error,t),W(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 s}function it(t,e,n){const o=e.slice(),{resolved:s}=t;t.current===t.then&&(o[t.value]=s),t.current===t.catch&&(o[t.error]=s),t.block.p(o,n)}const lt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ct(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function ut(t){t&&t.c()}function dt(t,e,n,o){const{fragment:s,on_mount:r,on_destroy:a,after_update:i}=t.$$;s&&s.m(e,n),o||L(()=>{const e=r.map(h).filter(x);a?a.push(...e):k(e),t.$$.on_mount=[]}),i.forEach(L)}function mt(t,e){const n=t.$$;null!==n.fragment&&(k(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ft(t,e,n,o,s,r,a=[-1]){const i=A;W(t);const l=t.$$={fragment:null,ctx:null,props:r,update:y,not_equal:s,bound:w(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i?i.$$.context:e.context||[]),callbacks:w(),dirty:a,skip_bound:!1};let c=!1;if(l.ctx=n?n(t,e.props||{},(e,n,...o)=>{const r=o.length?o[0]:n;return l.ctx&&s(l.ctx[e],l.ctx[e]=r)&&(!l.skip_bound&&l.bound[e]&&l.bound[e](r),c&&function(t,e){-1===t.$$.dirty[0]&&(M.push(t),Y(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n}):[],l.update(),c=!0,k(l.before_update),l.fragment=!!o&&o(l.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);l.fragment&&l.fragment.l(t),t.forEach(S)}else l.fragment&&l.fragment.c();e.intro&&st(t.$$.fragment),dt(t,e.target,e.anchor,e.customElement),Q()}W(i)}class $t{$destroy(){mt(this,1),this.$destroy=y}$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 pt(t){let e,n,o,s,r;return{c(){e=N("svg"),n=N("path"),o=N("line"),s=N("line"),D(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"),D(o,"x1","12"),D(o,"y1","9"),D(o,"x2","12"),D(o,"y2","13"),D(s,"x1","12"),D(s,"y1","17"),D(s,"x2","12.01"),D(s,"y2","17"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"width",t[0]),D(e,"height",t[0]),D(e,"fill","none"),D(e,"viewBox","0 0 24 24"),D(e,"stroke","currentColor"),D(e,"stroke-width",t[1]),D(e,"stroke-linecap","round"),D(e,"stroke-linejoin","round"),D(e,"class",r="feather feather-alert-triangle "+t[2])},m(t,r){E(t,e,r),j(e,n),j(e,o),j(e,s)},p(t,[n]){1&n&&D(e,"width",t[0]),1&n&&D(e,"height",t[0]),2&n&&D(e,"stroke-width",t[1]),4&n&&r!==(r="feather feather-alert-triangle "+t[2])&&D(e,"class",r)},i:y,o:y,d(t){t&&S(e)}}}function gt(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=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,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class vt extends $t{constructor(t){super(),ft(this,t,gt,pt,I,{size:0,strokeWidth:1,class:2})}}function bt(t){let e,n,o;return{c(){e=N("svg"),n=N("polyline"),D(n,"points","6 9 12 15 18 9"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"width",t[0]),D(e,"height",t[0]),D(e,"fill","none"),D(e,"viewBox","0 0 24 24"),D(e,"stroke","currentColor"),D(e,"stroke-width",t[1]),D(e,"stroke-linecap","round"),D(e,"stroke-linejoin","round"),D(e,"class",o="feather feather-chevron-down "+t[2])},m(t,o){E(t,e,o),j(e,n)},p(t,[n]){1&n&&D(e,"width",t[0]),1&n&&D(e,"height",t[0]),2&n&&D(e,"stroke-width",t[1]),4&n&&o!==(o="feather feather-chevron-down "+t[2])&&D(e,"class",o)},i:y,o:y,d(t){t&&S(e)}}}function yt(t,e,n){let{size:o="100%"}=e,{strokeWidth:s=2}=e,{class:r=""}=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,s=t.strokeWidth),"class"in t&&n(2,r=t.class)},[o,s,r]}class ht extends $t{constructor(t){super(),ft(this,t,yt,bt,I,{size:0,strokeWidth:1,class:2})}}function wt(t){return{c:y,m:y,p:y,i:y,o:y,d:y}}function kt(t){let e,n,o,s,r,a,i,l,u,d,m,f,$,p,g,v,b,h,w,k,x,I=t[15](t[4].status)+"",_=t[22].identity.shortDescription&&function(t){let e,n,o=t[22].identity.shortDescription+"";return{c(){e=C("div"),n=B(o),D(e,"class","shortDescription svelte-3m9yjb")},m(t,o){E(t,e,o),j(e,n)},p:y,d(t){t&&S(e)}}}(t),N=t[22].identity.description&&function(t){let e,n;return e=new t[9]({props:{$$slots:{default:[jt]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};16777216&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}(t);r=new t[12]({});let A=t[4]._stornoUser&&Et(t),W=t[4]._stornoReason&&St(t);function V(e){t[19](e)}g=new t[12]({props:{class:"divider"}});let M={schema:t[22],recID:t[6],prevEventID:t[7],taskId:t[2],taskOrg:t[1],prev:t[8],readonly:t[5],deletable:t[1]?.task?.deletable,stornable:t[1]?.task?.stornable,isStandalone:t[3],root:"true"};return void 0!==t[0]&&(M.__disabled=t[0]),w=new c({props:M}),R.push(()=>ct(w,"__disabled",V)),w.$on("back",t[14]),{c(){e=C("div"),n=C("div"),_&&_.c(),o=T(),N&&N.c(),s=T(),ut(r.$$.fragment),a=T(),i=C("div"),l=C("div"),l.textContent="Task-Status",u=T(),d=C("div"),m=B(I),f=T(),A&&A.c(),$=O(),W&&W.c(),p=T(),ut(g.$$.fragment),v=T(),b=C("div"),b.textContent=" ",h=T(),ut(w.$$.fragment),D(n,"class","accordion-description svelte-3m9yjb"),D(l,"class","task--status-title svelte-3m9yjb"),D(d,"class","task--status-label svelte-3m9yjb"),D(i,"class","task--status svelte-3m9yjb"),D(e,"class","subcat svelte-3m9yjb"),P(b,"height","0.5em")},m(t,c){E(t,e,c),j(e,n),_&&_.m(n,null),j(n,o),N&&N.m(n,null),j(n,s),dt(r,n,null),j(e,a),j(e,i),j(i,l),j(i,u),j(i,d),j(d,m),j(d,f),A&&A.m(d,null),j(d,$),W&&W.m(d,null),E(t,p,c),dt(g,t,c),E(t,v,c),E(t,b,c),E(t,h,c),dt(w,t,c),x=!0},p(t,e){t[22].identity.shortDescription&&_.p(t,e),t[22].identity.description&&N.p(t,e),(!x||16&e)&&I!==(I=t[15](t[4].status)+"")&&z(m,I),t[4]._stornoUser?A?A.p(t,e):(A=Et(t),A.c(),A.m(d,$)):A&&(A.d(1),A=null),t[4]._stornoReason?W?W.p(t,e):(W=St(t),W.c(),W.m(d,null)):W&&(W.d(1),W=null);const n={};64&e&&(n.recID=t[6]),128&e&&(n.prevEventID=t[7]),4&e&&(n.taskId=t[2]),2&e&&(n.taskOrg=t[1]),256&e&&(n.prev=t[8]),32&e&&(n.readonly=t[5]),2&e&&(n.deletable=t[1]?.task?.deletable),2&e&&(n.stornable=t[1]?.task?.stornable),8&e&&(n.isStandalone=t[3]),!k&&1&e&&(k=!0,n.__disabled=t[0],K(()=>k=!1)),w.$set(n)},i(t){x||(st(N),st(r.$$.fragment,t),st(g.$$.fragment,t),st(w.$$.fragment,t),x=!0)},o(t){rt(N),rt(r.$$.fragment,t),rt(g.$$.fragment,t),rt(w.$$.fragment,t),x=!1},d(t){t&&S(e),_&&_.d(),N&&N.d(),mt(r),A&&A.d(),W&&W.d(),t&&S(p),mt(g,t),t&&S(v),t&&S(b),t&&S(h),mt(w,t)}}}function xt(t){let e,n,o=t[22].identity.description+"";return{c(){e=C("div"),n=B(o),D(e,"class","description svelte-3m9yjb")},m(t,o){E(t,e,o),j(e,n)},p:y,d(t){t&&S(e)}}}function It(t){let e,n,o;return n=new ht({props:{size:"20",class:"ml accordion-chevron"}}),{c(){e=B("Beschreibung\n "),ut(n.$$.fragment)},m(t,s){E(t,e,s),dt(n,t,s),o=!0},p:y,i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&S(e),mt(n,t)}}}function _t(t){let e,n,o;return n=new t[11]({props:{noRipple:!0,$$slots:{default:[It]},$$scope:{ctx:t}}}),n.$on("click",function(){x(t[23])&&t[23].apply(this,arguments)}),{c(){e=C("div"),ut(n.$$.fragment),D(e,"slot","handle")},m(t,s){E(t,e,s),dt(n,e,null),o=!0},p(e,o){t=e;const s={};16777216&o&&(s.$$scope={dirty:o,ctx:t}),n.$set(s)},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&S(e),mt(n)}}}function jt(t){let e,n;return e=new t[10]({props:{$$slots:{handle:[_t,({toggle:t})=>({23:t}),({toggle:t})=>t?8388608:0],default:[xt]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};25165824&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Et(t){let e,n,o=t[4]._stornoUser+"";return{c(){e=B("von "),n=B(o)},m(t,o){E(t,e,o),E(t,n,o)},p(t,e){16&e&&o!==(o=t[4]._stornoUser+"")&&z(n,o)},d(t){t&&S(e),t&&S(n)}}}function St(t){let e,n,o=t[4]._stornoReason+"";return{c(){e=B(", "),n=B(o)},m(t,o){E(t,e,o),E(t,n,o)},p(t,e){16&e&&o!==(o=t[4]._stornoReason+"")&&z(n,o)},d(t){t&&S(e),t&&S(n)}}}function Ct(t){return{c:y,m:y,p:y,i:y,o:y,d:y}}function Nt(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:Ct,then:kt,catch:wt,value:22,blocks:[,,,]};return at(t[13],o),{c(){e=O(),o.block.c()},m(t,s){E(t,e,s),o.block.m(t,o.anchor=s),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){it(o,t=e,n)},i(t){n||(st(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){rt(o.blocks[t])}n=!1},d(t){t&&S(e),o.block.d(t),o.token=null,o=null}}}function Bt(t,s,r){let{task:a}=s,{taskId:i}=s,{eventItem:l}=s,{followerEventId:c}=s,{followerTaskId:u}=s,{isStandalone:d}=s,{__disabled:m}=s;const{Accordion:f,AccordionSection:$,Button:p,Divider:g}=e,v=a,b=l,y=n.getSchema(c||b._id);let h,w,k=v.task?.readonly,x=v.docId||v.id;c&&(w=x,x=void 0,h=b._id),o.subscribe(async t=>{t&&t.taskId===i&&n.getTaskqueue(null,t.taskId).then(({task:e})=>{r(4,v.status=e.status||t.status,v),r(4,v.readonly=e.readonly,v),v.readonly&&r(5,k=v.readonly)})});const I={New:x?"Eröffnet":"Neu",WaitingForApproval:"Zu visieren",Ready:"Bereit für nächsten Schritt",Waiting:"Wartet auf Verarbeitung",Closing:"Wartet auf Abschluss",Closed:"Abgeschlossen",Storno:"Storniert"};return t.$$set=t=>{"task"in t&&r(1,a=t.task),"taskId"in t&&r(2,i=t.taskId),"eventItem"in t&&r(16,l=t.eventItem),"followerEventId"in t&&r(17,c=t.followerEventId),"followerTaskId"in t&&r(18,u=t.followerTaskId),"isStandalone"in t&&r(3,d=t.isStandalone),"__disabled"in t&&r(0,m=t.__disabled)},[m,a,i,d,v,k,x,h,w,f,$,p,g,y,()=>window.singleSpaNavigate("/"),t=>{if(c)return"Neu";return I[t]||""},l,c,u,function(t){m=t,r(0,m)}]}class Tt extends $t{constructor(t){var e;super(),document.getElementById("svelte-3m9yjb-style")||((e=C("style")).id="svelte-3m9yjb-style",e.textContent=".subcat.svelte-3m9yjb .task--status.svelte-3m9yjb{width:100%;display:flex;gap:1em;margin:1.1em 0}.subcat.svelte-3m9yjb .task--status .task--status-title.svelte-3m9yjb{flex:0 1 40%}.subcat.svelte-3m9yjb .task--status .task--status-label.svelte-3m9yjb{flex:1}.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb{margin:2em 0 1em 0}.subcat.svelte-3m9yjb .accordion-description .description.svelte-3m9yjb{margin-top:1em}.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb .btn,.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb .btn:hover,.subcat.svelte-3m9yjb .accordion-description.svelte-3m9yjb .btn:focus{padding:0;background:inherit}.description.svelte-3m9yjb.svelte-3m9yjb{font-style:italic;white-space:pre-wrap}.shortDescription.svelte-3m9yjb.svelte-3m9yjb{font-style:italic;margin-bottom:1em}",j(document.head,e)),ft(this,t,Bt,Nt,I,{task:1,taskId:2,eventItem:16,followerEventId:17,followerTaskId:18,isStandalone:3,__disabled:0})}}const{document:Ot}=lt;function Dt(t){return{c:y,m:y,p:y,i:y,o:y,d:y}}function zt(t){let e,n,o,s,r,a,i,l,c,u,d,m,f=t[21]&&function(t){let e;return{c(){e=C("div"),e.textContent=`${t[21]}`,D(e,"class","description svelte-s8a1g4")},m(t,n){E(t,e,n)},p:y,d(t){t&&S(e)}}}(t);r=new t[13]({props:{name:"Rolle",$$slots:{default:[Pt]},$$scope:{ctx:t}}}),i=new t[13]({props:{name:"visiert von",$$slots:{default:[At]},$$scope:{ctx:t}}}),c=new t[13]({props:{name:"visiert am",$$slots:{default:[Vt]},$$scope:{ctx:t}}});let $=t[0].mailInfo&&Mt(t),p=!(t[0].task?.stornable||"Storno"===t[0].status)&&Zt(t);return{c(){e=C("h3"),e.textContent="Visum bearbeiten",n=T(),o=C("div"),f&&f.c(),s=T(),ut(r.$$.fragment),a=T(),ut(i.$$.fragment),l=T(),ut(c.$$.fragment),u=T(),$&&$.c(),d=T(),p&&p.c(),D(o,"class","visum svelte-s8a1g4")},m(t,g){E(t,e,g),E(t,n,g),E(t,o,g),f&&f.m(o,null),j(o,s),dt(r,o,null),j(o,a),dt(i,o,null),j(o,l),dt(c,o,null),j(o,u),$&&$.m(o,null),j(o,d),p&&p.m(o,null),m=!0},p(t,e){t[21]&&f.p(t,e);const n={};5&e[0]|512&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const s={};64&e[0]|512&e[1]&&(s.$$scope={dirty:e,ctx:t}),i.$set(s);const a={};33&e[0]|512&e[1]&&(a.$$scope={dirty:e,ctx:t}),c.$set(a),t[0].mailInfo?$?($.p(t,e),1&e[0]&&st($,1)):($=Mt(t),$.c(),st($,1),$.m(o,d)):$&&(nt(),rt($,1,1,()=>{$=null}),ot()),t[0].task?.stornable||"Storno"===t[0].status?p&&(nt(),rt(p,1,1,()=>{p=null}),ot()):p?(p.p(t,e),1&e[0]&&st(p,1)):(p=Zt(t),p.c(),st(p,1),p.m(o,null))},i(t){m||(st(r.$$.fragment,t),st(i.$$.fragment,t),st(c.$$.fragment,t),st($),st(p),m=!0)},o(t){rt(r.$$.fragment,t),rt(i.$$.fragment,t),rt(c.$$.fragment,t),rt($),rt(p),m=!1},d(t){t&&S(e),t&&S(n),t&&S(o),f&&f.d(),mt(r),mt(i),mt(c),$&&$.d(),p&&p.d()}}}function Pt(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[0].visum?.role||t[2]}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};5&n[0]&&(o.value=t[0].visum?.role||t[2]),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function At(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[6]}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};64&n[0]&&(o.value=t[6]),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Wt(t){let e,n,o,s;return e=new t[15]({props:{noCalendar:!0,disabled:!0,value:t[5]}}),o=new t[16]({props:{inputClass:"visumTime",disabled:!0,value:t[5]}}),{c(){ut(e.$$.fragment),n=T(),ut(o.$$.fragment)},m(t,r){dt(e,t,r),E(t,n,r),dt(o,t,r),s=!0},p(t,n){const s={};32&n[0]&&(s.value=t[5]),e.$set(s);const r={};32&n[0]&&(r.value=t[5]),o.$set(r)},i(t){s||(st(e.$$.fragment,t),st(o.$$.fragment,t),s=!0)},o(t){rt(e.$$.fragment,t),rt(o.$$.fragment,t),s=!1},d(t){mt(e,t),t&&S(n),mt(o,t)}}}function Vt(t){let e,n,o=t[0].visum&&Wt(t);return{c(){o&&o.c(),e=O()},m(t,s){o&&o.m(t,s),E(t,e,s),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n[0]&&st(o,1)):(o=Wt(t),o.c(),st(o,1),o.m(e.parentNode,e)):o&&(nt(),rt(o,1,1,()=>{o=null}),ot())},i(t){n||(st(o),n=!0)},o(t){rt(o),n=!1},d(t){o&&o.d(t),t&&S(e)}}}function Mt(t){let e,n,o,s,r,a,i,l,c,u,d;e=new t[18]({props:{text:"Infos aus Mailversand"}});let m=t[0].mailInfo.accepted?.length&&Rt(t),f=t[0].mailInfo.rejected?.length&&Gt(t),$=t[0].mailInfo.fileName&&Ut(t);return a=new t[13]({props:{name:"Grösse inkl. Datei in Bytes",$$slots:{default:[Jt]},$$scope:{ctx:t}}}),l=new t[13]({props:{name:"Antwort vom Mailsystem",$$slots:{default:[Lt]},$$scope:{ctx:t}}}),u=new t[13]({props:{name:"Identifikation des Mailversands",$$slots:{default:[Kt]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment),n=T(),m&&m.c(),o=T(),f&&f.c(),s=T(),$&&$.c(),r=T(),ut(a.$$.fragment),i=T(),ut(l.$$.fragment),c=T(),ut(u.$$.fragment)},m(t,p){dt(e,t,p),E(t,n,p),m&&m.m(t,p),E(t,o,p),f&&f.m(t,p),E(t,s,p),$&&$.m(t,p),E(t,r,p),dt(a,t,p),E(t,i,p),dt(l,t,p),E(t,c,p),dt(u,t,p),d=!0},p(t,e){t[0].mailInfo.accepted?.length?m?(m.p(t,e),1&e[0]&&st(m,1)):(m=Rt(t),m.c(),st(m,1),m.m(o.parentNode,o)):m&&(nt(),rt(m,1,1,()=>{m=null}),ot()),t[0].mailInfo.rejected?.length?f?(f.p(t,e),1&e[0]&&st(f,1)):(f=Gt(t),f.c(),st(f,1),f.m(s.parentNode,s)):f&&(nt(),rt(f,1,1,()=>{f=null}),ot()),t[0].mailInfo.fileName?$?($.p(t,e),1&e[0]&&st($,1)):($=Ut(t),$.c(),st($,1),$.m(r.parentNode,r)):$&&(nt(),rt($,1,1,()=>{$=null}),ot());const n={};1&e[0]|512&e[1]&&(n.$$scope={dirty:e,ctx:t}),a.$set(n);const i={};1&e[0]|512&e[1]&&(i.$$scope={dirty:e,ctx:t}),l.$set(i);const c={};1&e[0]|512&e[1]&&(c.$$scope={dirty:e,ctx:t}),u.$set(c)},i(t){d||(st(e.$$.fragment,t),st(m),st(f),st($),st(a.$$.fragment,t),st(l.$$.fragment,t),st(u.$$.fragment,t),d=!0)},o(t){rt(e.$$.fragment,t),rt(m),rt(f),rt($),rt(a.$$.fragment,t),rt(l.$$.fragment,t),rt(u.$$.fragment,t),d=!1},d(t){mt(e,t),t&&S(n),m&&m.d(t),t&&S(o),f&&f.d(t),t&&S(s),$&&$.d(t),t&&S(r),mt(a,t),t&&S(i),mt(l,t),t&&S(c),mt(u,t)}}}function Rt(t){let e,n;return e=new t[13]({props:{name:"versandt an",$$slots:{default:[qt]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function qt(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[0].mailInfo.accepted.join(", ")}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.accepted.join(", ")),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Gt(t){let e,n;return e=new t[13]({props:{name:"nicht versandt an",$$slots:{default:[Ft]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Ft(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[0].mailInfo.rejected.join(", ")}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.rejected.join(", ")),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Ut(t){let e,n;return e=new t[13]({props:{name:"Dateiname",$$slots:{default:[Yt]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Yt(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[0].mailInfo.fileName}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.fileName),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Jt(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[0].mailInfo.messageSize}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.messageSize),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Lt(t){let e,n;return e=new i({props:{disabled:!0,value:t[0].mailInfo.response}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.response),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Kt(t){let e,n;return e=new t[14]({props:{disabled:!0,value:t[0].mailInfo.messageId}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.value=t[0].mailInfo.messageId),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function Zt(t){let e,n,o,s;const r=[Qt,Ht],a=[];function i(t,e){return t[0].visum?0:1}return e=i(t),n=a[e]=r[e](t),{c(){n.c(),o=O()},m(t,n){a[e].m(t,n),E(t,o,n),s=!0},p(t,s){let l=e;e=i(t),e===l?a[e].p(t,s):(nt(),rt(a[l],1,1,()=>{a[l]=null}),ot(),n=a[e],n?n.p(t,s):(n=a[e]=r[e](t),n.c()),st(n,1),n.m(o.parentNode,o))},i(t){s||(st(n),s=!0)},o(t){rt(n),s=!1},d(t){a[e].d(t),t&&S(o)}}}function Ht(t){let e,n,o,s;e=new t[17]({props:{filled:!0,disabled:!t[39]||t[1]||t[8],$$slots:{default:[Xt]},$$scope:{ctx:t}}}),e.$on("click",t[23]);let r=!t[39]&&t[9]?.comment&&te(t);return{c(){ut(e.$$.fragment),n=T(),r&&r.c(),o=O()},m(t,a){dt(e,t,a),E(t,n,a),r&&r.m(t,a),E(t,o,a),s=!0},p(t,n){const s={};258&n[0]&&(s.disabled=!t[39]||t[1]||t[8]),128&n[0]|512&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s),!t[39]&&t[9]?.comment?r?(r.p(t,n),512&n[0]&&st(r,1)):(r=te(t),r.c(),st(r,1),r.m(o.parentNode,o)):r&&(nt(),rt(r,1,1,()=>{r=null}),ot())},i(t){s||(st(e.$$.fragment,t),st(r),s=!0)},o(t){rt(e.$$.fragment,t),rt(r),s=!1},d(t){mt(e,t),t&&S(n),r&&r.d(t),t&&S(o)}}}function Qt(t){let e,n,o,s;e=new t[17]({props:{disabled:!t[39],filled:!0,danger:!0,$$slots:{default:[ee]},$$scope:{ctx:t}}}),e.$on("click",t[24]);let r=!t[39]&&t[10]?.comment&&ne(t);return{c(){ut(e.$$.fragment),n=T(),r&&r.c(),o=O()},m(t,a){dt(e,t,a),E(t,n,a),r&&r.m(t,a),E(t,o,a),s=!0},p(t,n){const s={};512&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s),!t[39]&&t[10]?.comment?r?(r.p(t,n),1024&n[0]&&st(r,1)):(r=ne(t),r.c(),st(r,1),r.m(o.parentNode,o)):r&&(nt(),rt(r,1,1,()=>{r=null}),ot())},i(t){s||(st(e.$$.fragment,t),st(r),s=!0)},o(t){rt(e.$$.fragment,t),rt(r),s=!1},d(t){mt(e,t),t&&S(n),r&&r.d(t),t&&S(o)}}}function Xt(t){let e;return{c(){e=B(t[7])},m(t,n){E(t,e,n)},p(t,n){128&n[0]&&z(e,t[7])},d(t){t&&S(e)}}}function te(t){let e,n,o;return n=new t[14]({props:{style:"color: darkred; font-weight: 900;",value:t[9].comment}}),{c(){e=C("div"),ut(n.$$.fragment),P(e,"margin-top","1em")},m(t,s){E(t,e,s),dt(n,e,null),o=!0},p(t,e){const o={};512&e[0]&&(o.value=t[9].comment),n.$set(o)},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&S(e),mt(n)}}}function ee(t){let e;return{c(){e=B("Visum zurücknehmen")},m(t,n){E(t,e,n)},d(t){t&&S(e)}}}function ne(t){let e,n,o;return n=new t[14]({props:{style:"color: darkred; font-weight: 900;",value:t[10].comment}}),{c(){e=C("div"),ut(n.$$.fragment),P(e,"margin-top","1em")},m(t,s){E(t,e,s),dt(n,e,null),o=!0},p(t,e){const o={};1024&e[0]&&(o.value=t[10].comment),n.$set(o)},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&S(e),mt(n)}}}function oe(t){return{c:y,m:y,p:y,i:y,o:y,d:y}}function se(t){let e;return{c(){e=B("Abbrechen")},m(t,n){E(t,e,n)},d(t){t&&S(e)}}}function re(t){let e;return{c(){e=B("Ja, bitte visieren")},m(t,n){E(t,e,n)},d(t){t&&S(e)}}}function ae(t){let e,n,o,s,r,a,i;return s=new t[17]({props:{filled:!0,$$slots:{default:[se]},$$scope:{ctx:t}}}),s.$on("click",t[33]),a=new t[17]({props:{danger:!0,outline:!0,$$slots:{default:[re]},$$scope:{ctx:t}}}),a.$on("click",t[26]),{c(){e=C("p"),e.textContent="Willst du den Vorgang jetzt visieren?",n=T(),o=C("div"),ut(s.$$.fragment),r=T(),ut(a.$$.fragment),D(o,"class","flex_div svelte-s8a1g4")},m(t,l){E(t,e,l),E(t,n,l),E(t,o,l),dt(s,o,null),j(o,r),dt(a,o,null),i=!0},p(t,e){const n={};512&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};512&e[1]&&(o.$$scope={dirty:e,ctx:t}),a.$set(o)},i(t){i||(st(s.$$.fragment,t),st(a.$$.fragment,t),i=!0)},o(t){rt(s.$$.fragment,t),rt(a.$$.fragment,t),i=!1},d(t){t&&S(e),t&&S(n),t&&S(o),mt(s),mt(a)}}}function ie(t){let e,n,o;return n=new vt({props:{size:"25"}}),{c(){e=C("div"),ut(n.$$.fragment),D(e,"slot","title-icon")},m(t,s){E(t,e,s),dt(n,e,null),o=!0},p:y,i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&S(e),mt(n)}}}function le(t){let e,n;return e=new t[12]({props:{title:"Bestätigung",closeCallback:t[38],danger:!0,$$slots:{"title-icon":[ie],default:[ae]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};128&n[1]&&(o.closeCallback=t[38]),512&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function ce(t){let e;return{c(){e=B("Abbrechen")},m(t,n){E(t,e,n)},d(t){t&&S(e)}}}function ue(t){let e;return{c(){e=B("Ja, bitte zurücknehmen")},m(t,n){E(t,e,n)},d(t){t&&S(e)}}}function de(t){let e,n,o,s,r,a,i;return s=new t[17]({props:{filled:!0,$$slots:{default:[ce]},$$scope:{ctx:t}}}),s.$on("click",t[35]),a=new t[17]({props:{danger:!0,outline:!0,$$slots:{default:[ue]},$$scope:{ctx:t}}}),a.$on("click",t[27]),{c(){e=C("p"),e.textContent="Willst du das Visum zurücknehmen?",n=T(),o=C("div"),ut(s.$$.fragment),r=T(),ut(a.$$.fragment),D(o,"class","flex_div svelte-s8a1g4")},m(t,l){E(t,e,l),E(t,n,l),E(t,o,l),dt(s,o,null),j(o,r),dt(a,o,null),i=!0},p(t,e){const n={};512&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};512&e[1]&&(o.$$scope={dirty:e,ctx:t}),a.$set(o)},i(t){i||(st(s.$$.fragment,t),st(a.$$.fragment,t),i=!0)},o(t){rt(s.$$.fragment,t),rt(a.$$.fragment,t),i=!1},d(t){t&&S(e),t&&S(n),t&&S(o),mt(s),mt(a)}}}function me(t){let e,n,o;return n=new vt({props:{size:"25"}}),{c(){e=C("div"),ut(n.$$.fragment),D(e,"slot","title-icon")},m(t,s){E(t,e,s),dt(n,e,null),o=!0},p:y,i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&S(e),mt(n)}}}function fe(t){let e,n;return e=new t[12]({props:{title:"Bestätigung",closeCallback:t[38],danger:!0,$$slots:{"title-icon":[me],default:[de]},$$scope:{ctx:t}}}),{c(){ut(e.$$.fragment)},m(t,o){dt(e,t,o),n=!0},p(t,n){const o={};128&n[1]&&(o.closeCallback=t[38]),512&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){mt(e,t)}}}function $e(t){let e,n,o;return n=new t[20]({props:{outline:!0,$$slots:{default:[pe]},$$scope:{ctx:t}}}),{c(){e=C("div"),ut(n.$$.fragment),P(e,"margin-top","1em")},m(t,s){E(t,e,s),dt(n,e,null),o=!0},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&S(e),mt(n)}}}function pe(t){let e,n,o;return n=new t[19]({}),{c(){e=B("Bitte warten!\n"),ut(n.$$.fragment)},m(t,s){E(t,e,s),dt(n,t,s),o=!0},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&S(e),mt(n,t)}}}function ge(t){let e,n,o,s,r,a,i,l,c,u={ctx:t,current:null,token:null,hasCatch:!1,pending:oe,then:zt,catch:Dt,value:39,blocks:[,,,]};function d(e){t[34](e)}at(t[22](),u);let m={$$slots:{default:[le,({closeCallback:t})=>({38:t}),({closeCallback:t})=>[0,t?128:0]]},$$scope:{ctx:t}};function f(e){t[36](e)}void 0!==t[3]&&(m.open=t[3]),n=new t[11]({props:m}),R.push(()=>ct(n,"open",d));let $={$$slots:{default:[fe,({closeCallback:t})=>({38:t}),({closeCallback:t})=>[0,t?128:0]]},$$scope:{ctx:t}};void 0!==t[4]&&($.open=t[4]),r=new t[11]({props:$}),R.push(()=>ct(r,"open",f));let p=t[8]&&$e(t);return{c(){u.block.c(),e=T(),ut(n.$$.fragment),s=T(),ut(r.$$.fragment),i=T(),p&&p.c(),l=O()},m(t,o){u.block.m(t,u.anchor=o),u.mount=()=>e.parentNode,u.anchor=e,E(t,e,o),dt(n,t,o),E(t,s,o),dt(r,t,o),E(t,i,o),p&&p.m(t,o),E(t,l,o),c=!0},p(e,s){it(u,t=e,s);const i={};640&s[1]&&(i.$$scope={dirty:s,ctx:t}),!o&&8&s[0]&&(o=!0,i.open=t[3],K(()=>o=!1)),n.$set(i);const c={};640&s[1]&&(c.$$scope={dirty:s,ctx:t}),!a&&16&s[0]&&(a=!0,c.open=t[4],K(()=>a=!1)),r.$set(c),t[8]?p?256&s[0]&&st(p,1):(p=$e(t),p.c(),st(p,1),p.m(l.parentNode,l)):p&&(nt(),rt(p,1,1,()=>{p=null}),ot())},i(t){c||(st(u.block),st(n.$$.fragment,t),st(r.$$.fragment,t),st(p),c=!0)},o(t){for(let t=0;t<3;t+=1){rt(u.blocks[t])}rt(n.$$.fragment,t),rt(r.$$.fragment,t),rt(p),c=!1},d(t){u.block.d(t),u.token=null,u=null,t&&S(e),mt(n,t),t&&S(s),mt(r,t),t&&S(i),p&&p.d(t),t&&S(l)}}}function ve(t,i,l){let c,u;_(t,s,t=>l(31,c=t)),_(t,r,t=>l(32,u=t));const{Modal:d,Dialog:m,FormField:f,TextField:$,DatePicker:p,TimePicker:g,Button:v,Divider:b,Loading:y,Chip:h}=e;let w,k,x,I,j,E,S,C,N,{task:B}=i,{taskId:T}=i,{eventItem:O}=i,D=!1,z=!1;const P=O.output.approval[0].description||"",A=()=>{l(3,D=!1)};o.subscribe(t=>{t&&t.taskId===T&&(l(0,B.visum=t.data,B),l(0,B.status=t.status,B))});return t.$$set=t=>{"task"in t&&l(0,B=t.task),"taskId"in t&&l(28,T=t.taskId),"eventItem"in t&&l(29,O=t.eventItem)},t.$$.update=()=>{1610612743&t.$$.dirty[0]|3&t.$$.dirty[1]&&(l(5,k=new Date(B.visum?.timeStamp)),l(7,I=B.visum?"Visum erfolgreich erstellt":"Jetzt visieren"),l(30,j=!B.visum),l(30,j=j&&!!O.output?.approval?.length),j&&c&&(l(2,E=O.output.approval.flatMap(({refRole:t})=>t)),l(30,j=E.some(t=>c.some(e=>t===e)))),l(1,w=!j),l(6,x=B.visum?.user||(w?"":u.email)),J().then(()=>{const t=document.getElementsByClassName("visumTime")[0];t&&(t.disabled=!0)}))},[B,w,E,D,z,k,x,I,S,C,N,d,m,f,$,p,g,v,b,y,h,P,async()=>{if(B.visum){if(l(10,N=O.output.approval?.at(0)?.preventRemove),!0===N)return!1;if(!N)return!0;const{refItem:t,_state:e,mayBeEmpty:o}=N,s=O.output.class[0].name,r=await n.getDocById(s,B.docId),a=await n.getDocById(t,r[t]);if(!a)return o;return(await n.getTaskByDocId(a._id,!0)).status!==e}if(l(9,C=O.output.approval?.at(0)?.prevent),!C)return!0;const{refItem:t,_state:e,mayBeEmpty:o}=C,s=O.output.class[0].name,r=await n.getSectionView(t,{[s]:B.docId},!1);if(!r?.length)return o;const a=r.map(t=>t._id);return!(await n.getSectionView("_task",{docId:{$in:a}},!1)).some(t=>t.status===e)},()=>{l(3,D=!0)},()=>{l(4,z=!0)},A,()=>{l(3,D=!1);const t={eventId:O._id,eventDesignation:O.identity.designation,docId:B.docId,role:E.filter(t=>c.find(e=>e===t)).join(", "),user:u.email,timeStamp:(new Date).toISOString()};l(8,S=!0),n.setTaskVisum(B._id,t).then(e=>{e.taskId?(l(0,B.visum=t,B),window.singleSpaNavigate(`/task/${O._id}/${B._id}/task`)):a.failed("Das Visum konnte ncht gesetzt werden!",3e3)}).finally(()=>l(8,S=!1))},()=>{l(4,z=!1),n.deleteTaskVisum(B._id,O._id).then(t=>{!1!==t.status?(l(0,B.visum=!1,B),window.singleSpaNavigate(`/task/${O._id}/${B._id}/task`)):a.failed("Das Visum konnte ncht zurück genommen werden!",3e3)})},T,O,j,c,u,()=>A(),function(t){D=t,l(3,D)},()=>A(),function(t){z=t,l(4,z)}]}class be extends $t{constructor(t){var e;super(),Ot.getElementById("svelte-s8a1g4-style")||((e=C("style")).id="svelte-s8a1g4-style",e.textContent=".visum .time-picker .dropdown{display:none !important}.visum .form-field{margin-bottom:1em !important}.flex_div.svelte-s8a1g4.svelte-s8a1g4{display:flex;margin-top:1em;gap:0.5em;justify-content:space-between}div.visum.svelte-s8a1g4 div.description.svelte-s8a1g4{font-family:inherit;font-size:inherit;width:100%;min-height:2em;line-height:1.25em;margin-top:1em;margin-bottom:1.5em}",j(Ot.head,e)),ft(this,t,ve,ge,I,{task:0,taskId:28,eventItem:29},[-1,-1])}}const ye=[];const he=t("taskClipboard",function(t,e=y){let n;const o=[];function s(e){if(I(t,e)&&(t=e,n)){const e=!ye.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),ye.push(n,t)}if(e){for(let t=0;t<ye.length;t+=2)ye[t][0](ye[t+1]);ye.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(r,a=y){const i=[r,a];return o.push(i),1===o.length&&(n=e(s)||y),r(t),()=>{const t=o.indexOf(i);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1)),{document:we}=lt;function ke(t){let e,n,o,s,r,a,i,l,c,u=t[9](t[37],!!t[38]||t[0]===t[32],t[1])+"";function d(e){t[11](e)}n=new t[4]({props:{name:"menu",items:t[35],value:t[36].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",function(){x(t[8](t[41],t[33],t[32],t[38],t[39]))&&t[8](t[41],t[33],t[32],t[38],t[39]).apply(this,arguments)});var m=t[36].component;function f(t){let e={taskId:t[33],task:t[40],eventItem:t[37],followerEventId:t[38],isStandalone:t[5]};return void 0!==t[1]&&(e.__disabled=t[1]),{props:e}}return m&&(i=new m(f(t)),R.push(()=>ct(i,"__disabled",d)),i.$on("back",t[12])),{c(){e=C("div"),ut(n.$$.fragment),o=T(),s=B(u),r=T(),a=C("div"),i&&ut(i.$$.fragment),D(e,"class","task--header svelte-kw8mxg"),D(a,"class","task--content svelte-kw8mxg")},m(t,l){E(t,e,l),dt(n,e,null),j(e,o),j(e,s),E(t,r,l),E(t,a,l),i&&dt(i,a,null),c=!0},p(e,o){t=e;const r={};16&o[1]&&(r.items=t[35]),32&o[1]&&(r.value=t[36].name),n.$set(r),(!c||3&o[0]|194&o[1])&&u!==(u=t[9](t[37],!!t[38]||t[0]===t[32],t[1])+"")&&z(s,u);const $={};if(4&o[1]&&($.taskId=t[33]),512&o[1]&&($.task=t[40]),64&o[1]&&($.eventItem=t[37]),128&o[1]&&($.followerEventId=t[38]),!l&&2&o[0]&&(l=!0,$.__disabled=t[1],K(()=>l=!1)),m!==(m=t[36].component)){if(i){nt();const t=i;rt(t.$$.fragment,1,0,()=>{mt(t,1)}),ot()}m?(i=new m(f(t)),R.push(()=>ct(i,"__disabled",d)),i.$on("back",t[12]),ut(i.$$.fragment),st(i.$$.fragment,1),dt(i,a,null)):i=null}else m&&i.$set($)},i(t){c||(st(n.$$.fragment,t),i&&st(i.$$.fragment,t),c=!0)},o(t){rt(n.$$.fragment,t),i&&rt(i.$$.fragment,t),c=!1},d(t){t&&S(e),mt(n),t&&S(r),t&&S(a),i&&mt(i)}}}function xe(t){let e,n,o;return n=new t[3]({props:{constrainWidth:!0,title:t[31],titleClass:"task_title",closeCallback:t[13],class:"task--area",$$slots:{default:[ke]},$$scope:{ctx:t}}}),{c(){e=C("div"),ut(n.$$.fragment),D(e,"class","task svelte-kw8mxg")},m(t,s){E(t,e,s),dt(n,e,null),o=!0},p(t,e){const o={};1&e[1]&&(o.title=t[31]),3&e[0]|6134&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&S(e),mt(n)}}}function Ie(t){let e,n,o;return n=new t[2]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[xe,({closeCallback:t})=>({42:t}),({closeCallback:t})=>[0,t?2048:0]]},$$scope:{ctx:t}}}),n.$on("change",t[7]),{c(){e=C("div"),ut(n.$$.fragment),D(e,"class","task--page svelte-kw8mxg")},m(t,s){E(t,e,s),dt(n,e,null),o=!0},p(t,e){const o={};3&e[0]|6135&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&S(e),mt(n)}}}function _e(t){let e,n,o;return n=new l({props:{update:t[6],$$slots:{default:[Ie,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:s,item:r,eventItem:a,followerEventId:i,followerTaskId:l,task:c,findMenu:u}})=>({31:t,32:e,33:n,34:o,35:s,36:r,37:a,38:i,39:l,40:c,41:u}),({prop:t})=>[0,(t?1:0)|(t?2:0)|(t?4:0)|(t?8:0)|(t?16:0)|(t?32:0)|(t?64:0)|(t?128:0)|(t?256:0)|(t?512:0)|(t?1024:0)]]},$$scope:{ctx:t}}}),{c(){e=T(),ut(n.$$.fragment),we.title="enablerr - Task"},m(t,s){E(t,e,s),dt(n,t,s),o=!0},p(t,e){const o={};3&e[0]|6135&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(st(n.$$.fragment,t),o=!0)},o(t){rt(n.$$.fragment,t),o=!1},d(t){t&&S(e),mt(n,t)}}}function je(t,o,s){let a,i;_(t,r,t=>s(10,a=t)),_(t,he,t=>s(25,i=t));const{Modal:l,Dialog:c,Tabs:$}=e;let p,g,v,b,y,h,w;const k=-1!==window.location.search.indexOf("view=standalone");let x,I,j,E=!1;const S={items:[{id:"task",name:"Aufgabe",component:Tt},{id:"visum",name:"Visum",component:be},{id:"collab",name:"Kommunikation",component:f},{id:"workflow",name:"Workflow",component:d},{id:"report",name:"Anhänge",component:m},{id:"widget"}],findBy(t,e){return this.items.find(n=>n[t]===e)},findByName(t){return this.findBy("name",t)},findById(t){return this.findBy("id",t)},deflt(){return this.items[0]},map(){return this.items.map(t=>t.name)}},C=()=>{scrollY=window.scrollY,x=document.body.style.position,I=document.body.style.overflow,j=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};C();const N=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){V().$$.on_destroy.push(t)}(()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"}),function(t){V().$$.on_mount.push(t)}(async()=>{!function(t,e,n=e){t.set(n)}(he,i=!1,i),await(async()=>{const t=t=>new Promise(e=>setTimeout(e,t));for(let e=0;e<5&&!g;e++)await t(100);if(!g)return!1;const e=await n.getEvents();return b=e.filter(t=>"widget"===t.output?.type&&t.output?.subType).filter(t=>t.authorization.some(t=>g.find(e=>e===t.role))).map(t=>{const{subType:n}=t.output,o=e.find(t=>t.output?.widgetType?.id===n);return{type:n,className:o?.output?.class[0].name,widget:o?.output?.widgetType}}),!0})()});return t.$$.update=()=>{1024&t.$$.dirty[0]&&a.role&&(g=a.role)},[p,E,l,c,$,k,async(t,e,o,r)=>{const a=await n.getEvent(t);a||window.singleSpaNavigate("/error");const i=S.findById(o);if(!i)return N(t,e,S.deflt());"task"!==o&&(r=void 0),s(0,p=e);let l={status:"New"},c=a.identity.designation,d="";if(r?.includes(":")&&([r,d]=r.split(":")),r){const t=await n.getEvent(r);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}if(e!==t){l=await n.getTaskById(e,!0),l||window.singleSpaNavigate("/error"),l.event!==a._id.toString()&&(a._id=l.event);let t=a.output.class[0].display?.find(t=>"identifier"===t.type)?.refItem;if(t||(t=a.output.class[0].display?.find(t=>"list"===t.type)?.refItem?.slice(0,1)),t?.length){const e=await n.getDocById(a.output.class[0].name,l.docId),o=t.map(t=>(t=t.split(".")[0],u(e["_"+t]||e[t]))).join(" • ");o&&(c+=` / ${o}`)}}else e=void 0;if("widget"===o){if(y&&!w){const t=await n.getTaskById(e);if(a.output.class[0].name===h.className)w=t.docId;else{const e=await n.getTask(a.output.class[0].name,t.docId);w=e[h.className]}}o=v||S.deflt().id,w&&window.open(`/widget/${h.type}/${w}?view=standalone`),N(t,e,S.findById(o))}else v=o;return{title:c,eventId:t,taskId:e,tabId:o,item:i,eventItem:a,followerEventId:r,followerTaskId:d,task:l,items:S.map(),findMenu:t=>S.findByName(t)}},function(t){t.detail.value?C():(document.body.style.position=x||"",document.body.style.top="",document.body.style.overflow=I||"",document.body.style.width=j||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:s}})=>{o||N(n,e,t(s))},(t,e,n)=>{const o=b||[];if(!t)return"";let s=!t.output?.approval;return J().then(()=>{Array.from(document.getElementsByClassName("menuTab")).map((r,a)=>{if(n&&a)r.querySelector("input").disabled=!0;else if(a&&(r.querySelector("input").disabled=e),1===a&&(r.querySelector("input").disabled=e||s),5===a){if(void 0===y)for(const e of o)if(y=!!t.output.class[0].item.find(n=>n.refClass===e.className||t.input?.class?.find(t=>t.name===e.className)||t.output.class[0].name===e.className),y){h=e;break}const e=r.querySelector("input + .content");y&&h?.widget?.name?(e.textContent=h?.widget?.name,e.style.display="flex"):e.style.display="none"}})}),""},a,function(t){E=t,s(1,E)},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(t=>t(e))}(t,e)},()=>k?window.close():window.singleSpaNavigate("/")]}class Ee extends $t{constructor(t){var e;super(),we.getElementById("svelte-kw8mxg-style")||((e=C("style")).id="svelte-kw8mxg-style",e.textContent='.task--page.svelte-kw8mxg .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-kw8mxg{margin-top:4em}@media(max-height: 900px){.task.svelte-kw8mxg{margin-top:0}}.task.svelte-kw8mxg .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-kw8mxg .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}.task--header.svelte-kw8mxg{margin-top:0.5em}.task--header.svelte-kw8mxg .task_tabs{margin-bottom:1em}.task--content.svelte-kw8mxg{margin-top:1em;height:fit-content;min-height:40vh;max-height:90vh}',j(we.head,e)),ft(this,t,je,_e,I,{},[-1,-1])}}const Se=b({component:Ee,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Ce,mount:Ne,unmount:Be}=Se;t({bootstrap:Ce,mount:Ne,unmount:Be});t("Task",Ee)}}});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enablerr-ui/task",
3
3
  "description": "enablerr - the Next Enterprise Solution",
4
- "version": "0.2.129",
4
+ "version": "0.2.130",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"