@enablerr-ui/task 0.2.122 → 0.2.123

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