@enablerr-ui/task 0.2.113 → 0.2.115

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