@enablerr-ui/task 0.2.112 → 0.2.113

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.112");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 j(t,e){t.appendChild(e)}function _(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){_(t,e,r),j(e,n),j(e,o),j(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){_(t,e,o),j(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=t[14](t[3].status)+"",I=t[20].identity.shortDescription&&function(t){let e,n,o=t[20].identity.shortDescription+"";return{c(){e=S("div"),n=O(o),T(e,"class","shortDescription svelte-3m9yjb")},m(t,o){_(t,e,o),j(e,n)},p:b,d(t){t&&E(e)}}}(t),C=t[20].identity.description&&function(t){let e,n;return e=new t[8]({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={};4194304&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[11]({});let P=t[3]._stornoUser&&It(t),A=t[3]._stornoReason&&jt(t);return g=new t[11]({props:{class:"divider"}}),k=new c({props:{schema:t[20],recID:t[5],prevEventID:t[6],taskId:t[1],taskOrg:t[0],prev:t[7],readonly:t[4],deletable:t[0]?.task?.deletable,stornable:t[0]?.task?.stornable,isStandalone:t[2],root:"true"}}),k.$on("back",t[13]),{c(){e=S("div"),n=S("div"),I&&I.c(),o=N(),C&&C.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(x),$=N(),P&&P.c(),f=B(),A&&A.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){_(t,e,c),j(e,n),I&&I.m(n,null),j(n,o),C&&C.m(n,null),j(n,s),lt(r,n,null),j(e,i),j(e,a),j(a,l),j(a,u),j(a,d),j(d,m),j(d,$),P&&P.m(d,null),j(d,f),A&&A.m(d,null),_(t,p,c),lt(g,t,c),_(t,v,c),_(t,h,c),_(t,y,c),lt(k,t,c),w=!0},p(t,e){t[20].identity.shortDescription&&I.p(t,e),t[20].identity.description&&C.p(t,e),(!w||8&e)&&x!==(x=t[14](t[3].status)+"")&&D(m,x),t[3]._stornoUser?P?P.p(t,e):(P=It(t),P.c(),P.m(d,f)):P&&(P.d(1),P=null),t[3]._stornoReason?A?A.p(t,e):(A=jt(t),A.c(),A.m(d,null)):A&&(A.d(1),A=null);const n={};32&e&&(n.recID=t[5]),64&e&&(n.prevEventID=t[6]),2&e&&(n.taskId=t[1]),1&e&&(n.taskOrg=t[0]),128&e&&(n.prev=t[7]),16&e&&(n.readonly=t[4]),1&e&&(n.deletable=t[0]?.task?.deletable),1&e&&(n.stornable=t[0]?.task?.stornable),4&e&&(n.isStandalone=t[2]),k.$set(n)},i(t){w||(ot(C),ot(r.$$.fragment,t),ot(g.$$.fragment,t),ot(k.$$.fragment,t),w=!0)},o(t){st(C),st(r.$$.fragment,t),st(g.$$.fragment,t),st(k.$$.fragment,t),w=!1},d(t){t&&E(e),I&&I.d(),C&&C.d(),ct(r),P&&P.d(),A&&A.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[20].identity.description+"";return{c(){e=S("div"),n=O(o),T(e,"class","description svelte-3m9yjb")},m(t,o){_(t,e,o),j(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){_(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[10]({props:{noRipple:!0,$$slots:{default:[kt]},$$scope:{ctx:t}}}),n.$on("click",function(){w(t[21])&&t[21].apply(this,arguments)}),{c(){e=S("div"),at(n.$$.fragment),T(e,"slot","handle")},m(t,s){_(t,e,s),lt(n,e,null),o=!0},p(e,o){t=e;const s={};4194304&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[9]({props:{$$slots:{handle:[wt,({toggle:t})=>({21:t}),({toggle:t})=>t?2097152:0],default:[yt]},$$scope:{ctx:t}}}),{c(){at(e.$$.fragment)},m(t,o){lt(e,t,o),n=!0},p(t,n){const o={};6291456&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[3]._stornoUser+"";return{c(){e=O("von "),n=O(o)},m(t,o){_(t,e,o),_(t,n,o)},p(t,e){8&e&&o!==(o=t[3]._stornoUser+"")&&D(n,o)},d(t){t&&E(e),t&&E(n)}}}function jt(t){let e,n,o=t[3]._stornoReason+"";return{c(){e=O(", "),n=O(o)},m(t,o){_(t,e,o),_(t,n,o)},p(t,e){8&e&&o!==(o=t[3]._stornoReason+"")&&D(n,o)},d(t){t&&E(e),t&&E(n)}}}function _t(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:_t,then:ht,catch:bt,value:20,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[12],o),{c(){e=B(),o.block.c()},m(t,s){_(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;const{Accordion:m,AccordionSection:$,Button:f,Divider:p}=e,g=i,v=l,b=n.getSchema(c||v._id);let h,y,k=g.task?.readonly,w=g.docId||g.id;c&&(y=w,w=void 0,h=v._id),o.subscribe(async t=>{t&&t.taskId===a&&n.getTaskqueue(null,t.taskId).then(({task:e})=>{r(3,g.status=e.status||t.status,g),r(3,g.readonly=e.readonly,g),g.readonly&&r(4,k=g.readonly)})});const x={New:w?"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(0,i=t.task),"taskId"in t&&r(1,a=t.taskId),"eventItem"in t&&r(15,l=t.eventItem),"followerEventId"in t&&r(16,c=t.followerEventId),"followerTaskId"in t&&r(17,u=t.followerTaskId),"isStandalone"in t&&r(2,d=t.isStandalone)},[i,a,d,g,k,w,h,y,m,$,f,p,b,()=>window.singleSpaNavigate("/"),t=>{if(c)return"Neu";return x[t]||""},l,c,u]}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}",j(document.head,e)),ut(this,t,St,Et,x,{task:0,taskId:1,eventItem:15,followerEventId:16,followerTaskId:17,isStandalone:2})}}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),_(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),_(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,$),_(t,n,$),d&&d.m(t,$),_(t,o,$),m&&m.m(t,$),_(t,s,$),lt(r,t,$),_(t,i,$),lt(a,t,$),_(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),_(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){_(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){_(t,e,n)},d(t){t&&E(e)}}}function Lt(t){let e;return{c(){e=O("Abbrechen")},m(t,n){_(t,e,n)},d(t){t&&E(e)}}}function Kt(t){let e;return{c(){e=O("Ja, bitte visieren")},m(t,n){_(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){_(t,e,l),_(t,n,l),_(t,o,l),lt(s,o,null),j(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){_(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){_(t,e,n)},d(t){t&&E(e)}}}function te(t){let e;return{c(){e=O("Ja, bitte zurücknehmen")},m(t,n){_(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){_(t,e,l),_(t,n,l),_(t,o,l),lt(s,o,null),j(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){_(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){_(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){_(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){_(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){_(t,e,f),_(t,n,f),_(t,o,f),w&&w.m(o,null),j(o,s),lt(r,o,null),j(o,i),lt(a,o,null),j(o,l),lt(c,o,null),j(o,u),x&&x.m(o,null),j(o,d),I&&I.m(o,null),_(t,m,f),lt($,t,f),_(t,p,f),lt(g,t,f),_(t,h,f),P&&P.m(t,f),_(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,j=C.visum?"Visum erfolgreich erstellt":"Jetzt visieren"),l(27,_=!C.visum),l(27,_=_&&!!N.output?.approval?.length),_&&c&&(l(2,E=N.output.approval.flatMap(({refRole:t})=>t)),l(27,_=E.some(t=>c.some(e=>t===e)))),l(1,k=!_),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,j,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,_,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}",j(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=t[8](t[27],!!t[28]||t[0]===t[22])+"";n=new t[3]({props:{name:"menu",items:t[25],value:t[26].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",function(){w(t[7](t[31],t[23],t[22],t[28],t[29]))&&t[7](t[31],t[23],t[22],t[28],t[29]).apply(this,arguments)});var u=t[26].component;function d(t){return{props:{taskId:t[23],task:t[30],eventItem:t[27],followerEventId:t[28],isStandalone:t[4]}}}return u&&(a=new u(d(t)),a.$on("back",t[9])),{c(){e=S("div"),at(n.$$.fragment),o=N(),s=O(c),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,c){_(t,e,c),lt(n,e,null),j(e,o),j(e,s),_(t,r,c),_(t,i,c),a&&lt(a,i,null),l=!0},p(e,o){t=e;const r={};33554432&o[0]&&(r.items=t[25]),67108864&o[0]&&(r.value=t[26].name),n.$set(r),(!l||406847489&o[0])&&c!==(c=t[8](t[27],!!t[28]||t[0]===t[22])+"")&&D(s,c);const m={};if(8388608&o[0]&&(m.taskId=t[23]),1073741824&o[0]&&(m.task=t[30]),134217728&o[0]&&(m.eventItem=t[27]),268435456&o[0]&&(m.followerEventId=t[28]),u!==(u=t[26].component)){if(a){et();const t=a;st(t.$$.fragment,1,0,()=>{ct(t,1)}),nt()}u?(a=new u(d(t)),a.$on("back",t[9]),at(a.$$.fragment),ot(a.$$.fragment,1),lt(a,i,null)):a=null}else u&&a.$set(m)},i(t){l||(ot(n.$$.fragment,t),a&&ot(a.$$.fragment,t),l=!0)},o(t){st(n.$$.fragment,t),a&&st(a.$$.fragment,t),l=!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[2]({props:{constrainWidth:!0,title:t[21],titleClass:"task_title",closeCallback:t[10],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){_(t,e,s),lt(n,e,null),o=!0},p(t,e){const o={};2097152&e[0]&&(o.title=t[21]),2126512129&e[0]|5&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[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[$e,({closeCallback:t})=>({32:t}),({closeCallback:t})=>[0,t?2:0]]},$$scope:{ctx:t}}}),n.$on("change",t[6]),{c(){e=S("div"),at(n.$$.fragment),T(e,"class","task--page svelte-kw8mxg")},m(t,s){_(t,e,s),lt(n,e,null),o=!0},p(t,e){const o={};2128609281&e[0]|5&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[5],$$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}})=>({21:t,22:e,23:n,24:o,25:s,26:r,27:i,28:a,29:l,30:c,31:u}),({prop:t})=>[(t?2097152:0)|(t?4194304:0)|(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]]},$$scope:{ctx:t}}}),{c(){e=N(),at(n.$$.fragment),de.title="enablerr - Task"},m(t,s){_(t,e,s),lt(n,t,s),o=!0},p(t,e){const o={};2128609281&e[0]|5&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(16,r=t));const{Modal:i,Dialog:a,Tabs:l}=e;let c;const $=-1!==window.location.search.indexOf("view=standalone");let f,p,g;const v={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)}},b=()=>{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%"};b();const h=(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,i,a,l,$,async(t,e,o,r)=>{const i=v.findById(o);if(!i)return h(t,e,v.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:v.map(),findMenu:t=>v.findByName(t)}},function(t){t.detail.value?b():(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||h(n,e,t(s))},(t,e)=>{let n=!t.output?.approval;return Y().then(()=>{Array.from(document.getElementsByClassName("menuTab")).map((t,o)=>{o&&(t.querySelector("input").disabled=e),1===o&&(t.querySelector("input").disabled=e||n)})}),""},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}',j(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.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)}}});
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.112",
4
+ "version": "0.2.113",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"