@enablerr-ui/task 0.2.95 → 0.2.97
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 +1 -1
- package/package.json +1 -1
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;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,s=t.currentRoles,r=t.settings,i=t.toasts,a=t.Page},function(t){l=t.Form},function(t){c=t.Workflow},function(t){u=t.Report},function(t){d=t.Collaboration}],execute:function(){t("version","0.2.95");function m(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $,f,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)}))}},$(f={exports:{}},f.exports),f.exports),g=m(p);function v(){}function b(t){return t()}function h(){return Object.create(null)}function y(t){t.forEach(b)}function k(t){return"function"==typeof t}function w(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function x(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return v;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function I(t,e){t.appendChild(e)}function j(t,e,n){t.insertBefore(e,n||null)}function E(t){t.parentNode.removeChild(t)}function _(t){return document.createElement(t)}function S(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function C(t){return document.createTextNode(t)}function O(){return C(" ")}function B(){return C("")}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)}let N;function P(t){N=t}function T(){if(!N)throw new Error("Function called outside component initialization");return N}const W=[],A=[],M=[],V=[],q=Promise.resolve();let G=!1;function R(){G||(G=!0,q.then(Z))}function F(){return R(),q}function Y(t){M.push(t)}function J(t){V.push(t)}let L=!1;const K=new Set;function Z(){if(!L){L=!0;do{for(let t=0;t<W.length;t+=1){const e=W[t];P(e),H(e.$$)}for(P(null),W.length=0;A.length;)A.pop()();for(let t=0;t<M.length;t+=1){const e=M[t];K.has(e)||(K.add(e),e())}M.length=0}while(W.length);for(;V.length;)V.pop()();G=!1,L=!1,K.clear()}}function H(t){if(null!==t.fragment){t.update(),y(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Y)}}const Q=new Set;let U;function X(){U={r:0,c:[],p:U}}function tt(){U.r||y(U.c),U=U.p}function et(t,e){t&&t.i&&(Q.delete(t),t.i(e))}function nt(t,e,n,o){if(t&&t.o){if(Q.has(t))return;Q.add(t),U&&U.c.push((()=>{Q.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const ot="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function st(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function rt(t){t&&t.c()}function it(t,e,n,o){const{fragment:s,on_mount:r,on_destroy:i,after_update:a}=t.$$;s&&s.m(e,n),o||Y((()=>{const e=r.map(b).filter(k);i?i.push(...e):y(e),t.$$.on_mount=[]})),a.forEach(Y)}function at(t,e){const n=t.$$;null!==n.fragment&&(y(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function lt(t,e,n,o,s,r,i=[-1]){const a=N;P(t);const l=t.$$={fragment:null,ctx:null,props:r,update:v,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]&&(W.push(t),R(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],l.update(),c=!0,y(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&&et(t.$$.fragment),it(t,e.target,e.anchor,e.customElement),Z()}P(a)}class ct{$destroy(){at(this,1),this.$destroy=v}$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 ut(t){let e,n,o,s,r;return{c(){e=S("svg"),n=S("path"),o=S("line"),s=S("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){j(t,e,r),I(e,n),I(e,o),I(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:v,o:v,d(t){t&&E(e)}}}function dt(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 mt extends ct{constructor(t){super(),lt(this,t,dt,ut,w,{size:0,strokeWidth:1,class:2})}}function $t(t){let e,n,o;return{c(){e=S("svg"),n=S("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){j(t,e,o),I(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:v,o:v,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 ct{constructor(t){super(),lt(this,t,ft,$t,w,{size:0,strokeWidth:1,class:2})}}function gt(t){return{c:v,m:v,p:v,i:v,o:v,d:v}}function vt(t){let e,n,o,s,r,i,a,c,u,d,m,$,f,p,g,b,h,y,k=t[14](t[3].status)+"",w=t[19].identity.shortDescription&&function(t){let e,n,o=t[19].identity.shortDescription+"";return{c(){e=_("div"),n=C(o),D(e,"class","shortDescription svelte-3m9yjb")},m(t,o){j(t,e,o),I(e,n)},p:v,d(t){t&&E(e)}}}(t),x=t[19].identity.description&&function(t){let e,n;return e=new t[8]({props:{$$slots:{default:[kt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};2097152&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(et(e.$$.fragment,t),n=!0)},o(t){nt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}(t);return r=new t[11]({}),f=new t[11]({props:{class:"divider"}}),h=new l({props:{schema:t[19],recID:t[5],prevEventID:t[6],taskId:t[1],prev:t[7],readonly:t[4],deletable:t[0]?.task?.deletable,isStandalone:t[2],root:"true"}}),h.$on("back",t[13]),{c(){var t,l,v;e=_("div"),n=_("div"),w&&w.c(),o=O(),x&&x.c(),s=O(),rt(r.$$.fragment),i=O(),a=_("div"),c=_("div"),c.textContent="Task-Status",u=O(),d=_("div"),m=C(k),$=O(),rt(f.$$.fragment),p=O(),g=_("div"),g.textContent=" ",b=O(),rt(h.$$.fragment),D(n,"class","accordion-description svelte-3m9yjb"),D(c,"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"),t="height",l="0.5em",g.style.setProperty(t,l,v?"important":"")},m(t,l){j(t,e,l),I(e,n),w&&w.m(n,null),I(n,o),x&&x.m(n,null),I(n,s),it(r,n,null),I(e,i),I(e,a),I(a,c),I(a,u),I(a,d),I(d,m),j(t,$,l),it(f,t,l),j(t,p,l),j(t,g,l),j(t,b,l),it(h,t,l),y=!0},p(t,e){t[19].identity.shortDescription&&w.p(t,e),t[19].identity.description&&x.p(t,e),(!y||8&e)&&k!==(k=t[14](t[3].status)+"")&&z(m,k);const n={};32&e&&(n.recID=t[5]),64&e&&(n.prevEventID=t[6]),2&e&&(n.taskId=t[1]),128&e&&(n.prev=t[7]),16&e&&(n.readonly=t[4]),1&e&&(n.deletable=t[0]?.task?.deletable),4&e&&(n.isStandalone=t[2]),h.$set(n)},i(t){y||(et(x),et(r.$$.fragment,t),et(f.$$.fragment,t),et(h.$$.fragment,t),y=!0)},o(t){nt(x),nt(r.$$.fragment,t),nt(f.$$.fragment,t),nt(h.$$.fragment,t),y=!1},d(t){t&&E(e),w&&w.d(),x&&x.d(),at(r),t&&E($),at(f,t),t&&E(p),t&&E(g),t&&E(b),at(h,t)}}}function bt(t){let e,n,o=t[19].identity.description+"";return{c(){e=_("div"),n=C(o),D(e,"class","description svelte-3m9yjb")},m(t,o){j(t,e,o),I(e,n)},p:v,d(t){t&&E(e)}}}function ht(t){let e,n,o;return n=new pt({props:{size:"20",class:"ml accordion-chevron"}}),{c(){e=C("Beschreibung\n "),rt(n.$$.fragment)},m(t,s){j(t,e,s),it(n,t,s),o=!0},p:v,i(t){o||(et(n.$$.fragment,t),o=!0)},o(t){nt(n.$$.fragment,t),o=!1},d(t){t&&E(e),at(n,t)}}}function yt(t){let e,n,o;return n=new t[10]({props:{noRipple:!0,$$slots:{default:[ht]},$$scope:{ctx:t}}}),n.$on("click",(function(){k(t[20])&&t[20].apply(this,arguments)})),{c(){e=_("div"),rt(n.$$.fragment),D(e,"slot","handle")},m(t,s){j(t,e,s),it(n,e,null),o=!0},p(e,o){t=e;const s={};2097152&o&&(s.$$scope={dirty:o,ctx:t}),n.$set(s)},i(t){o||(et(n.$$.fragment,t),o=!0)},o(t){nt(n.$$.fragment,t),o=!1},d(t){t&&E(e),at(n)}}}function kt(t){let e,n;return e=new t[9]({props:{$$slots:{handle:[yt,({toggle:t})=>({20:t}),({toggle:t})=>t?1048576:0],default:[bt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};3145728&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(et(e.$$.fragment,t),n=!0)},o(t){nt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function wt(t){return{c:v,m:v,p:v,i:v,o:v,d:v}}function xt(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:wt,then:vt,catch:gt,value:19,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&&(X(),nt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),tt())})):e.block.d(1),a.c(),et(a,1),a.m(e.mount(),e.anchor),l=!0),e.block=a,e.blocks&&(e.blocks[o]=a),l&&Z()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=T();if(t.then((t=>{P(n),o(e.then,1,e.value,t),P(null)}),(t=>{if(P(n),o(e.catch,2,e.error,t),P(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){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||(et(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){nt(o.blocks[t])}n=!1},d(t){t&&E(e),o.block.d(t),o.token=null,o=null}}}function It(t,s,r){let{task:i}=s,{taskId:a}=s,{eventItem:l}=s,{followerEventId:c}=s,{isStandalone:u}=s;const{Accordion:d,AccordionSection:m,Button:$,Divider:f}=e,p=i,g=l,v=n.getSchema(c||g._id);let b,h,y=p.task?.readonly,k=p.docId||p.id;c&&(h=k,k=void 0,b=g._id),o.subscribe((async t=>{t&&t.taskId===a&&n.getTaskqueue(null,t.taskId).then((({task:e})=>{r(3,p.status=e.status||t.status,p),r(3,p.readonly=e.readonly,p),p.readonly&&r(4,y=p.readonly)}))}));const w={New:k?"Eröffnet":"Neu",WaitingForApproval:"Zu visieren",Ready:"Bereit für nächsten Schritt",Waiting:"Wartet auf Verarbeitung",Closing:"Wartet auf Abschluss",Closed:"Abgeschlossen"};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),"isStandalone"in t&&r(2,u=t.isStandalone)},[i,a,u,p,y,k,b,h,d,m,$,f,v,()=>window.singleSpaNavigate("/"),t=>w[t]||"",l,c]}class jt extends ct{constructor(t){var e;super(),document.getElementById("svelte-3m9yjb-style")||((e=_("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}",I(document.head,e)),lt(this,t,It,xt,w,{task:0,taskId:1,eventItem:15,followerEventId:16,isStandalone:2})}}const{document:Et}=ot;function _t(t){let e,n;return e=new t[11]({props:{disabled:!0,value:t[0].visum?.role||t[2]}}),{c(){rt(e.$$.fragment)},m(t,o){it(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||(et(e.$$.fragment,t),n=!0)},o(t){nt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function St(t){let e,n;return e=new t[11]({props:{disabled:!0,value:t[6]}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};64&n[0]&&(o.value=t[6]),e.$set(o)},i(t){n||(et(e.$$.fragment,t),n=!0)},o(t){nt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Ct(t){let e,n,o,s;return e=new t[12]({props:{noCalendar:!0,disabled:!0,value:t[5]}}),o=new t[13]({props:{inputClass:"visumTime",disabled:!0,value:t[5]}}),{c(){rt(e.$$.fragment),n=O(),rt(o.$$.fragment)},m(t,r){it(e,t,r),j(t,n,r),it(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||(et(e.$$.fragment,t),et(o.$$.fragment,t),s=!0)},o(t){nt(e.$$.fragment,t),nt(o.$$.fragment,t),s=!1},d(t){at(e,t),t&&E(n),at(o,t)}}}function Ot(t){let e,n,o=t[0].visum&&Ct(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]&&et(o,1)):(o=Ct(t),o.c(),et(o,1),o.m(e.parentNode,e)):o&&(X(),nt(o,1,1,(()=>{o=null})),tt())},i(t){n||(et(o),n=!0)},o(t){nt(o),n=!1},d(t){o&&o.d(t),t&&E(e)}}}function Bt(t){let e,n,o,s,r,i,a,l,c,u;return e=new t[15]({props:{text:"Infos aus Mailversand"}}),o=new t[10]({props:{name:"versandt an",$$slots:{default:[Dt]},$$scope:{ctx:t}}}),r=new t[10]({props:{name:"Grösse inkl. Datei in Bytes",$$slots:{default:[zt]},$$scope:{ctx:t}}}),a=new t[10]({props:{name:"Antwort vom Mailsystem",$$slots:{default:[Nt]},$$scope:{ctx:t}}}),c=new t[10]({props:{name:"Identifikation des Mailversands",$$slots:{default:[Pt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment),n=O(),rt(o.$$.fragment),s=O(),rt(r.$$.fragment),i=O(),rt(a.$$.fragment),l=O(),rt(c.$$.fragment)},m(t,d){it(e,t,d),j(t,n,d),it(o,t,d),j(t,s,d),it(r,t,d),j(t,i,d),it(a,t,d),j(t,l,d),it(c,t,d),u=!0},p(t,e){const n={};1&e[0]|4&e[1]&&(n.$$scope={dirty:e,ctx:t}),o.$set(n);const s={};1&e[0]|4&e[1]&&(s.$$scope={dirty:e,ctx:t}),r.$set(s);const i={};1&e[0]|4&e[1]&&(i.$$scope={dirty:e,ctx:t}),a.$set(i);const l={};1&e[0]|4&e[1]&&(l.$$scope={dirty:e,ctx:t}),c.$set(l)},i(t){u||(et(e.$$.fragment,t),et(o.$$.fragment,t),et(r.$$.fragment,t),et(a.$$.fragment,t),et(c.$$.fragment,t),u=!0)},o(t){nt(e.$$.fragment,t),nt(o.$$.fragment,t),nt(r.$$.fragment,t),nt(a.$$.fragment,t),nt(c.$$.fragment,t),u=!1},d(t){at(e,t),t&&E(n),at(o,t),t&&E(s),at(r,t),t&&E(i),at(a,t),t&&E(l),at(c,t)}}}function Dt(t){let e,n;return e=new t[11]({props:{disabled:!0,value:t[0].mailInfo.accepted.join(", ")}}),{c(){rt(e.$$.fragment)},m(t,o){it(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||(et(e.$$.fragment,t),n=!0)},o(t){nt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function zt(t){let e,n;return e=new t[11]({props:{disabled:!0,value:t[0].mailInfo.messageSize}}),{c(){rt(e.$$.fragment)},m(t,o){it(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||(et(e.$$.fragment,t),n=!0)},o(t){nt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Nt(t){let e,n;return e=new t[11]({props:{disabled:!0,value:t[0].mailInfo.response}}),{c(){rt(e.$$.fragment)},m(t,o){it(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||(et(e.$$.fragment,t),n=!0)},o(t){nt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Pt(t){let e,n;return e=new t[11]({props:{disabled:!0,value:t[0].mailInfo.messageId}}),{c(){rt(e.$$.fragment)},m(t,o){it(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||(et(e.$$.fragment,t),n=!0)},o(t){nt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Tt(t){let e,n;return e=new t[14]({props:{filled:!0,disabled:t[1],$$slots:{default:[At]},$$scope:{ctx:t}}}),e.$on("click",t[17]),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};2&n[0]&&(o.disabled=t[1]),128&n[0]|4&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(et(e.$$.fragment,t),n=!0)},o(t){nt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Wt(t){let e,n;return e=new t[14]({props:{filled:!0,danger:!0,$$slots:{default:[Mt]},$$scope:{ctx:t}}}),e.$on("click",t[18]),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};4&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(et(e.$$.fragment,t),n=!0)},o(t){nt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function At(t){let e;return{c(){e=C(t[7])},m(t,n){j(t,e,n)},p(t,n){128&n[0]&&z(e,t[7])},d(t){t&&E(e)}}}function Mt(t){let e;return{c(){e=C("Visum zurücknehmen")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function Vt(t){let e;return{c(){e=C("Abbrechen")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function qt(t){let e;return{c(){e=C("Ja, bitte visieren")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function Gt(t){let e,n,o,s,r,i,a;return s=new t[14]({props:{filled:!0,$$slots:{default:[Vt]},$$scope:{ctx:t}}}),s.$on("click",t[27]),i=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[qt]},$$scope:{ctx:t}}}),i.$on("click",t[20]),{c(){e=_("p"),e.textContent="Willst du den Vorgang jetzt visieren?",n=O(),o=_("div"),rt(s.$$.fragment),r=O(),rt(i.$$.fragment),D(o,"class","flex_div svelte-s8a1g4")},m(t,l){j(t,e,l),j(t,n,l),j(t,o,l),it(s,o,null),I(o,r),it(i,o,null),a=!0},p(t,e){const n={};4&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};4&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){a||(et(s.$$.fragment,t),et(i.$$.fragment,t),a=!0)},o(t){nt(s.$$.fragment,t),nt(i.$$.fragment,t),a=!1},d(t){t&&E(e),t&&E(n),t&&E(o),at(s),at(i)}}}function Rt(t){let e,n,o;return n=new mt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),D(e,"slot","title-icon")},m(t,s){j(t,e,s),it(n,e,null),o=!0},p:v,i(t){o||(et(n.$$.fragment,t),o=!0)},o(t){nt(n.$$.fragment,t),o=!1},d(t){t&&E(e),at(n)}}}function Ft(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[32],danger:!0,$$slots:{"title-icon":[Rt],default:[Gt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};2&n[1]&&(o.closeCallback=t[32]),4&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(et(e.$$.fragment,t),n=!0)},o(t){nt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Yt(t){let e;return{c(){e=C("Abbrechen")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function Jt(t){let e;return{c(){e=C("Ja, bitte zurücknehmen")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function Lt(t){let e,n,o,s,r,i,a;return s=new t[14]({props:{filled:!0,$$slots:{default:[Yt]},$$scope:{ctx:t}}}),s.$on("click",t[29]),i=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[Jt]},$$scope:{ctx:t}}}),i.$on("click",t[21]),{c(){e=_("p"),e.textContent="Willst du das Visum zurücknehmen?",n=O(),o=_("div"),rt(s.$$.fragment),r=O(),rt(i.$$.fragment),D(o,"class","flex_div svelte-s8a1g4")},m(t,l){j(t,e,l),j(t,n,l),j(t,o,l),it(s,o,null),I(o,r),it(i,o,null),a=!0},p(t,e){const n={};4&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};4&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){a||(et(s.$$.fragment,t),et(i.$$.fragment,t),a=!0)},o(t){nt(s.$$.fragment,t),nt(i.$$.fragment,t),a=!1},d(t){t&&E(e),t&&E(n),t&&E(o),at(s),at(i)}}}function Kt(t){let e,n,o;return n=new mt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),D(e,"slot","title-icon")},m(t,s){j(t,e,s),it(n,e,null),o=!0},p:v,i(t){o||(et(n.$$.fragment,t),o=!0)},o(t){nt(n.$$.fragment,t),o=!1},d(t){t&&E(e),at(n)}}}function Zt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[32],danger:!0,$$slots:{"title-icon":[Kt],default:[Lt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};2&n[1]&&(o.closeCallback=t[32]),4&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(et(e.$$.fragment,t),n=!0)},o(t){nt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Ht(t){let e,n,o,s,r,i,a,l,c,u,d,m,$,f,p,g,b,h,y,k,w=t[16]&&function(t){let e;return{c(){e=_("div"),e.textContent=`${t[16]}`,D(e,"class","description svelte-s8a1g4")},m(t,n){j(t,e,n)},p:v,d(t){t&&E(e)}}}(t);r=new t[10]({props:{name:"Rolle",$$slots:{default:[_t]},$$scope:{ctx:t}}}),a=new t[10]({props:{name:"visiert von",$$slots:{default:[St]},$$scope:{ctx:t}}}),c=new t[10]({props:{name:"visiert am",$$slots:{default:[Ot]},$$scope:{ctx:t}}});let x=t[0].mailInfo&&Bt(t);const S=[Wt,Tt],C=[];function B(t,e){return t[0].visum?0:1}function z(e){t[28](e)}m=B(t),$=C[m]=S[m](t);let N={$$slots:{default:[Ft,({closeCallback:t})=>({32:t}),({closeCallback:t})=>[0,t?2:0]]},$$scope:{ctx:t}};function P(e){t[30](e)}void 0!==t[3]&&(N.open=t[3]),p=new t[8]({props:N}),A.push((()=>st(p,"open",z)));let T={$$slots:{default:[Zt,({closeCallback:t})=>({32:t}),({closeCallback:t})=>[0,t?2:0]]},$$scope:{ctx:t}};return void 0!==t[4]&&(T.open=t[4]),h=new t[8]({props:T}),A.push((()=>st(h,"open",P))),{c(){e=_("h3"),e.textContent="Visum bearbeiten",n=O(),o=_("div"),w&&w.c(),s=O(),rt(r.$$.fragment),i=O(),rt(a.$$.fragment),l=O(),rt(c.$$.fragment),u=O(),x&&x.c(),d=O(),$.c(),f=O(),rt(p.$$.fragment),b=O(),rt(h.$$.fragment),D(o,"class","visum svelte-s8a1g4")},m(t,$){j(t,e,$),j(t,n,$),j(t,o,$),w&&w.m(o,null),I(o,s),it(r,o,null),I(o,i),it(a,o,null),I(o,l),it(c,o,null),I(o,u),x&&x.m(o,null),I(o,d),C[m].m(o,null),j(t,f,$),it(p,t,$),j(t,b,$),it(h,t,$),k=!0},p(t,e){t[16]&&w.p(t,e);const n={};5&e[0]|4&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const s={};64&e[0]|4&e[1]&&(s.$$scope={dirty:e,ctx:t}),a.$set(s);const i={};33&e[0]|4&e[1]&&(i.$$scope={dirty:e,ctx:t}),c.$set(i),t[0].mailInfo?x?(x.p(t,e),1&e[0]&&et(x,1)):(x=Bt(t),x.c(),et(x,1),x.m(o,d)):x&&(X(),nt(x,1,1,(()=>{x=null})),tt());let l=m;m=B(t),m===l?C[m].p(t,e):(X(),nt(C[l],1,1,(()=>{C[l]=null})),tt(),$=C[m],$?$.p(t,e):($=C[m]=S[m](t),$.c()),et($,1),$.m(o,null));const u={};6&e[1]&&(u.$$scope={dirty:e,ctx:t}),!g&&8&e[0]&&(g=!0,u.open=t[3],J((()=>g=!1))),p.$set(u);const f={};6&e[1]&&(f.$$scope={dirty:e,ctx:t}),!y&&16&e[0]&&(y=!0,f.open=t[4],J((()=>y=!1))),h.$set(f)},i(t){k||(et(r.$$.fragment,t),et(a.$$.fragment,t),et(c.$$.fragment,t),et(x),et($),et(p.$$.fragment,t),et(h.$$.fragment,t),k=!0)},o(t){nt(r.$$.fragment,t),nt(a.$$.fragment,t),nt(c.$$.fragment,t),nt(x),nt($),nt(p.$$.fragment,t),nt(h.$$.fragment,t),k=!1},d(t){t&&E(e),t&&E(n),t&&E(o),w&&w.d(),at(r),at(a),at(c),x&&x.d(),C[m].d(),t&&E(f),at(p,t),t&&E(b),at(h,t)}}}function Qt(t,a,l){let c,u;x(t,s,(t=>l(25,c=t))),x(t,r,(t=>l(26,u=t)));const{Modal:d,Dialog:m,FormField:$,TextField:f,DatePicker:p,TimePicker:g,Button:v,Divider:b}=e;let h,y,k,w,I,j,{task:E}=a,{taskId:_}=a,{eventItem:S}=a,C=!1,O=!1;const B=S.output.approval[0].description||"",D=()=>{l(3,C=!1)};o.subscribe((t=>{t&&t.taskId===_&&(l(0,E.visum=t.data,E),l(0,E.status=t.status,E))}));return t.$$set=t=>{"task"in t&&l(0,E=t.task),"taskId"in t&&l(22,_=t.taskId),"eventItem"in t&&l(23,S=t.eventItem)},t.$$.update=()=>{125829127&t.$$.dirty[0]&&(l(5,y=new Date(E.visum?.timeStamp)),l(7,w=E.visum?"Visum erfolgreich erstellt":"Jetzt visieren"),l(24,I=!E.visum),l(24,I=I&&!!S.output?.approval?.length),I&&c&&(l(2,j=S.output.approval.flatMap((({refRole:t})=>t))),l(24,I=j.some((t=>c.some((e=>t===e)))))),l(1,h=!I),l(6,k=E.visum?.user||(h?"":u.email)),F().then((()=>{const t=document.getElementsByClassName("visumTime")[0];t&&(t.disabled=!0)})))},[E,h,j,C,O,y,k,w,d,m,$,f,p,g,v,b,B,()=>{l(3,C=!0)},()=>{l(4,O=!0)},D,()=>{l(3,C=!1);const t={eventId:S._id,eventDesignation:S.identity.designation,docId:E.docId,role:j.filter((t=>c.find((e=>e===t)))).join(", "),user:u.email,timeStamp:(new Date).toISOString()};n.setTaskVisum(E._id,t).then((e=>{e.taskId?(l(0,E.visum=t,E),window.singleSpaNavigate(`/task/${S._id}/${E._id}/task`)):i.failed("Das Visum konnte ncht gesetzt werden!",3e3)}))},()=>{l(4,O=!1),n.deleteTaskVisum(E._id,S._id).then((t=>{!1!==t.status?(l(0,E.visum=!1,E),window.singleSpaNavigate(`/task/${S._id}/${E._id}/task`)):i.failed("Das Visum konnte ncht zurück genommen werden!",3e3)}))},_,S,I,c,u,()=>D(),function(t){C=t,l(3,C)},()=>D(),function(t){O=t,l(4,O)}]}class Ut extends ct{constructor(t){var e;super(),Et.getElementById("svelte-s8a1g4-style")||((e=_("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}",I(Et.head,e)),lt(this,t,Qt,Ht,w,{task:0,taskId:22,eventItem:23},[-1,-1])}}const Xt=[];const te=t("taskClipboard",function(t,e=v){let n;const o=[];function s(e){if(w(t,e)&&(t=e,n)){const e=!Xt.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),Xt.push(n,t)}if(e){for(let t=0;t<Xt.length;t+=2)Xt[t][0](Xt[t+1]);Xt.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(r,i=v){const a=[r,i];return o.push(a),1===o.length&&(n=e(s)||v),r(t),()=>{const t=o.indexOf(a);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1)),{document:ee}=ot;function ne(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(){k(t[7](t[30],t[23],t[22],t[28]))&&t[7](t[30],t[23],t[22],t[28]).apply(this,arguments)}));var u=t[26].component;function d(t){return{props:{taskId:t[23],task:t[29],eventItem:t[27],followerEventId:t[28],isStandalone:t[4]}}}return u&&(a=new u(d(t)),a.$on("back",t[9])),{c(){e=_("div"),rt(n.$$.fragment),o=O(),s=C(c),r=O(),i=_("div"),a&&rt(a.$$.fragment),D(e,"class","task--header svelte-kw8mxg"),D(i,"class","task--content svelte-kw8mxg")},m(t,c){j(t,e,c),it(n,e,null),I(e,o),I(e,s),j(t,r,c),j(t,i,c),a&&it(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])+"")&&z(s,c);const m={};if(8388608&o[0]&&(m.taskId=t[23]),536870912&o[0]&&(m.task=t[29]),134217728&o[0]&&(m.eventItem=t[27]),268435456&o[0]&&(m.followerEventId=t[28]),u!==(u=t[26].component)){if(a){X();const t=a;nt(t.$$.fragment,1,0,(()=>{at(t,1)})),tt()}u?(a=new u(d(t)),a.$on("back",t[9]),rt(a.$$.fragment),et(a.$$.fragment,1),it(a,i,null)):a=null}else u&&a.$set(m)},i(t){l||(et(n.$$.fragment,t),a&&et(a.$$.fragment,t),l=!0)},o(t){nt(n.$$.fragment,t),a&&nt(a.$$.fragment,t),l=!1},d(t){t&&E(e),at(n),t&&E(r),t&&E(i),a&&at(a)}}}function oe(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:[ne]},$$scope:{ctx:t}}}),{c(){e=_("div"),rt(n.$$.fragment),D(e,"class","task svelte-kw8mxg")},m(t,s){j(t,e,s),it(n,e,null),o=!0},p(t,e){const o={};2097152&e[0]&&(o.title=t[21]),2126512129&e[0]|2&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(et(n.$$.fragment,t),o=!0)},o(t){nt(n.$$.fragment,t),o=!1},d(t){t&&E(e),at(n)}}}function se(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[oe,({closeCallback:t})=>({31:t}),({closeCallback:t})=>[0,t?1:0]]},$$scope:{ctx:t}}}),n.$on("change",t[6]),{c(){e=_("div"),rt(n.$$.fragment),D(e,"class","task--page svelte-kw8mxg")},m(t,s){j(t,e,s),it(n,e,null),o=!0},p(t,e){const o={};2128609281&e[0]|2&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(et(n.$$.fragment,t),o=!0)},o(t){nt(n.$$.fragment,t),o=!1},d(t){t&&E(e),at(n)}}}function re(t){let e,n,o;return n=new a({props:{update:t[5],$$slots:{default:[se,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:s,item:r,eventItem:i,followerEventId:a,task:l,findMenu:c}})=>({21:t,22:e,23:n,24:o,25:s,26:r,27:i,28:a,29:l,30:c}),({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)]]},$$scope:{ctx:t}}}),{c(){e=O(),rt(n.$$.fragment),ee.title="enablerr - Task"},m(t,s){j(t,e,s),it(n,t,s),o=!0},p(t,e){const o={};2128609281&e[0]|2&e[1]&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(et(n.$$.fragment,t),o=!0)},o(t){nt(n.$$.fragment,t),o=!1},d(t){t&&E(e),at(n,t)}}}function ie(t,o,s){let r;x(t,te,(t=>s(16,r=t)));const{Modal:i,Dialog:a,Tabs:l}=e;let m;const $=-1!==window.location.search.indexOf("view=standalone");let f,p,g;const v={items:[{id:"task",name:"Aufgabe",component:jt},{id:"visum",name:"Visum",component:Ut},{id:"collab",name:"Kommunikation",component:d},{id:"workflow",name:"Workflow",component:c},{id:"report",name:"Anhänge",component:u}],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){T().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"})),function(t){T().$$.on_mount.push(t)}((()=>{!function(t,e,n=e){t.set(n)}(te,r=!1,r)}));return[m,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,m=e);let a={status:"New"};const l=await n.getEvent(t);l||window.singleSpaNavigate("/error");let c=l.identity.designation;if(r){const t=await n.getEvent(r);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}return e!==t?(a=await n.getTaskById(e),a||window.singleSpaNavigate("/error"),a.event!==l._id.toString()&&(l._id=a.event)):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:i,eventItem:l,followerEventId:r,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 F().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 ae extends ct{constructor(t){var e;super(),ee.getElementById("svelte-kw8mxg-style")||((e=_("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}',I(ee.head,e)),lt(this,t,ie,re,w,{},[-1,-1])}}const le=g({component:ae,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:ce,mount:ue,unmount:de}=le;t({bootstrap:ce,mount:ue,unmount:de});t("Task",ae)}}}));
|
|
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.97");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 E(t,e,n){t.insertBefore(e,n||null)}function _(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 T(){return O(" ")}function B(){return O("")}function D(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function N(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}let z;function P(t){z=t}function A(){if(!z)throw new Error("Function called outside component initialization");return z}const W=[],M=[],V=[],q=[],G=Promise.resolve();let R=!1;function F(){R||(R=!0,G.then(H))}function Y(){return F(),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<W.length;t+=1){const e=W[t];P(e),Q(e.$$)}for(P(null),W.length=0;M.length;)M.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(W.length);for(;q.length;)q.pop()();R=!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 U=new Set;let X;function tt(){X={r:0,c:[],p:X}}function et(){X.r||k(X.c),X=X.p}function nt(t,e){t&&t.i&&(U.delete(t),t.i(e))}function ot(t,e,n,o){if(t&&t.o){if(U.has(t))return;U.add(t),X&&X.c.push((()=>{U.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const st="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function rt(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function it(t){t&&t.c()}function at(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 lt(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 ct(t,e,n,o,s,r,i=[-1]){const a=z;P(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]&&(W.push(t),F(),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(_)}else l.fragment&&l.fragment.c();e.intro&&nt(t.$$.fragment),at(t,e.target,e.anchor,e.customElement),H()}P(a)}class ut{$destroy(){lt(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 dt(t){let e,n,o,s,r;return{c(){e=C("svg"),n=C("path"),o=C("line"),s=C("line"),D(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),D(o,"x1","12"),D(o,"y1","9"),D(o,"x2","12"),D(o,"y2","13"),D(s,"x1","12"),D(s,"y1","17"),D(s,"x2","12.01"),D(s,"y2","17"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"width",t[0]),D(e,"height",t[0]),D(e,"fill","none"),D(e,"viewBox","0 0 24 24"),D(e,"stroke","currentColor"),D(e,"stroke-width",t[1]),D(e,"stroke-linecap","round"),D(e,"stroke-linejoin","round"),D(e,"class",r="feather feather-alert-triangle "+t[2])},m(t,r){E(t,e,r),j(e,n),j(e,o),j(e,s)},p(t,[n]){1&n&&D(e,"width",t[0]),1&n&&D(e,"height",t[0]),2&n&&D(e,"stroke-width",t[1]),4&n&&r!==(r="feather feather-alert-triangle "+t[2])&&D(e,"class",r)},i:b,o:b,d(t){t&&_(e)}}}function mt(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 $t extends ut{constructor(t){super(),ct(this,t,mt,dt,x,{size:0,strokeWidth:1,class:2})}}function ft(t){let e,n,o;return{c(){e=C("svg"),n=C("polyline"),D(n,"points","6 9 12 15 18 9"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"width",t[0]),D(e,"height",t[0]),D(e,"fill","none"),D(e,"viewBox","0 0 24 24"),D(e,"stroke","currentColor"),D(e,"stroke-width",t[1]),D(e,"stroke-linecap","round"),D(e,"stroke-linejoin","round"),D(e,"class",o="feather feather-chevron-down "+t[2])},m(t,o){E(t,e,o),j(e,n)},p(t,[n]){1&n&&D(e,"width",t[0]),1&n&&D(e,"height",t[0]),2&n&&D(e,"stroke-width",t[1]),4&n&&o!==(o="feather feather-chevron-down "+t[2])&&D(e,"class",o)},i:b,o:b,d(t){t&&_(e)}}}function pt(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 gt extends ut{constructor(t){super(),ct(this,t,pt,ft,x,{size:0,strokeWidth:1,class:2})}}function vt(t){return{c:b,m:b,p:b,i:b,o:b,d:b}}function bt(t){let e,n,o,s,r,i,a,l,u,d,m,$,f,p,g,v,h,y,k=t[14](t[3].status)+"",w=t[20].identity.shortDescription&&function(t){let e,n,o=t[20].identity.shortDescription+"";return{c(){e=S("div"),n=O(o),D(e,"class","shortDescription svelte-3m9yjb")},m(t,o){E(t,e,o),j(e,n)},p:b,d(t){t&&_(e)}}}(t),x=t[20].identity.description&&function(t){let e,n;return e=new t[8]({props:{$$slots:{default:[wt]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};4194304&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}(t);return r=new t[11]({}),f=new t[11]({props:{class:"divider"}}),h=new c({props:{schema:t[20],recID:t[5],prevEventID:t[6],taskId:t[1],prev:t[7],readonly:t[4],deletable:t[0]?.task?.deletable,isStandalone:t[2],root:"true"}}),h.$on("back",t[13]),{c(){var t,c,b;e=S("div"),n=S("div"),w&&w.c(),o=T(),x&&x.c(),s=T(),it(r.$$.fragment),i=T(),a=S("div"),l=S("div"),l.textContent="Task-Status",u=T(),d=S("div"),m=O(k),$=T(),it(f.$$.fragment),p=T(),g=S("div"),g.textContent=" ",v=T(),it(h.$$.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"),t="height",c="0.5em",g.style.setProperty(t,c,b?"important":"")},m(t,c){E(t,e,c),j(e,n),w&&w.m(n,null),j(n,o),x&&x.m(n,null),j(n,s),at(r,n,null),j(e,i),j(e,a),j(a,l),j(a,u),j(a,d),j(d,m),E(t,$,c),at(f,t,c),E(t,p,c),E(t,g,c),E(t,v,c),at(h,t,c),y=!0},p(t,e){t[20].identity.shortDescription&&w.p(t,e),t[20].identity.description&&x.p(t,e),(!y||8&e)&&k!==(k=t[14](t[3].status)+"")&&N(m,k);const n={};32&e&&(n.recID=t[5]),64&e&&(n.prevEventID=t[6]),2&e&&(n.taskId=t[1]),128&e&&(n.prev=t[7]),16&e&&(n.readonly=t[4]),1&e&&(n.deletable=t[0]?.task?.deletable),4&e&&(n.isStandalone=t[2]),h.$set(n)},i(t){y||(nt(x),nt(r.$$.fragment,t),nt(f.$$.fragment,t),nt(h.$$.fragment,t),y=!0)},o(t){ot(x),ot(r.$$.fragment,t),ot(f.$$.fragment,t),ot(h.$$.fragment,t),y=!1},d(t){t&&_(e),w&&w.d(),x&&x.d(),lt(r),t&&_($),lt(f,t),t&&_(p),t&&_(g),t&&_(v),lt(h,t)}}}function ht(t){let e,n,o=t[20].identity.description+"";return{c(){e=S("div"),n=O(o),D(e,"class","description svelte-3m9yjb")},m(t,o){E(t,e,o),j(e,n)},p:b,d(t){t&&_(e)}}}function yt(t){let e,n,o;return n=new gt({props:{size:"20",class:"ml accordion-chevron"}}),{c(){e=O("Beschreibung\n "),it(n.$$.fragment)},m(t,s){E(t,e,s),at(n,t,s),o=!0},p:b,i(t){o||(nt(n.$$.fragment,t),o=!0)},o(t){ot(n.$$.fragment,t),o=!1},d(t){t&&_(e),lt(n,t)}}}function kt(t){let e,n,o;return n=new t[10]({props:{noRipple:!0,$$slots:{default:[yt]},$$scope:{ctx:t}}}),n.$on("click",(function(){w(t[21])&&t[21].apply(this,arguments)})),{c(){e=S("div"),it(n.$$.fragment),D(e,"slot","handle")},m(t,s){E(t,e,s),at(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||(nt(n.$$.fragment,t),o=!0)},o(t){ot(n.$$.fragment,t),o=!1},d(t){t&&_(e),lt(n)}}}function wt(t){let e,n;return e=new t[9]({props:{$$slots:{handle:[kt,({toggle:t})=>({21:t}),({toggle:t})=>t?2097152:0],default:[ht]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};6291456&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function xt(t){return{c:b,m:b,p:b,i:b,o:b,d:b}}function It(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:xt,then:bt,catch:vt,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&&(tt(),ot(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),et())})):e.block.d(1),a.c(),nt(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=A();if(t.then((t=>{P(n),o(e.then,1,e.value,t),P(null)}),(t=>{if(P(n),o(e.catch,2,e.error,t),P(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){E(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||(nt(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){ot(o.blocks[t])}n=!1},d(t){t&&_(e),o.block.d(t),o.token=null,o=null}}}function jt(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"};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=>x[t]||"",l,c,u]}class Et extends ut{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)),ct(this,t,jt,It,x,{task:0,taskId:1,eventItem:15,followerEventId:16,followerTaskId:17,isStandalone:2})}}const{document:_t}=st;function St(t){let e,n;return e=new t[11]({props:{disabled:!0,value:t[0].visum?.role||t[2]}}),{c(){it(e.$$.fragment)},m(t,o){at(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||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function Ct(t){let e,n;return e=new t[11]({props:{disabled:!0,value:t[6]}}),{c(){it(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};64&n[0]&&(o.value=t[6]),e.$set(o)},i(t){n||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function Ot(t){let e,n,o,s;return e=new t[12]({props:{noCalendar:!0,disabled:!0,value:t[5]}}),o=new t[13]({props:{inputClass:"visumTime",disabled:!0,value:t[5]}}),{c(){it(e.$$.fragment),n=T(),it(o.$$.fragment)},m(t,r){at(e,t,r),E(t,n,r),at(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||(nt(e.$$.fragment,t),nt(o.$$.fragment,t),s=!0)},o(t){ot(e.$$.fragment,t),ot(o.$$.fragment,t),s=!1},d(t){lt(e,t),t&&_(n),lt(o,t)}}}function Tt(t){let e,n,o=t[0].visum&&Ot(t);return{c(){o&&o.c(),e=B()},m(t,s){o&&o.m(t,s),E(t,e,s),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n[0]&&nt(o,1)):(o=Ot(t),o.c(),nt(o,1),o.m(e.parentNode,e)):o&&(tt(),ot(o,1,1,(()=>{o=null})),et())},i(t){n||(nt(o),n=!0)},o(t){ot(o),n=!1},d(t){o&&o.d(t),t&&_(e)}}}function Bt(t){let e,n,o,s,r,i,a,l,c,u;e=new t[15]({props:{text:"Infos aus Mailversand"}});let d=t[0].mailInfo.accepted?.length&&Dt(t),m=t[0].mailInfo.rejected?.length&&zt(t);return r=new t[10]({props:{name:"Grösse inkl. Datei in Bytes",$$slots:{default:[At]},$$scope:{ctx:t}}}),a=new t[10]({props:{name:"Antwort vom Mailsystem",$$slots:{default:[Wt]},$$scope:{ctx:t}}}),c=new t[10]({props:{name:"Identifikation des Mailversands",$$slots:{default:[Mt]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment),n=T(),d&&d.c(),o=T(),m&&m.c(),s=T(),it(r.$$.fragment),i=T(),it(a.$$.fragment),l=T(),it(c.$$.fragment)},m(t,$){at(e,t,$),E(t,n,$),d&&d.m(t,$),E(t,o,$),m&&m.m(t,$),E(t,s,$),at(r,t,$),E(t,i,$),at(a,t,$),E(t,l,$),at(c,t,$),u=!0},p(t,e){t[0].mailInfo.accepted?.length?d?(d.p(t,e),1&e[0]&&nt(d,1)):(d=Dt(t),d.c(),nt(d,1),d.m(o.parentNode,o)):d&&(tt(),ot(d,1,1,(()=>{d=null})),et()),t[0].mailInfo.rejected?.length?m?(m.p(t,e),1&e[0]&&nt(m,1)):(m=zt(t),m.c(),nt(m,1),m.m(s.parentNode,s)):m&&(tt(),ot(m,1,1,(()=>{m=null})),et());const n={};1&e[0]|4&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const i={};1&e[0]|4&e[1]&&(i.$$scope={dirty:e,ctx:t}),a.$set(i);const l={};1&e[0]|4&e[1]&&(l.$$scope={dirty:e,ctx:t}),c.$set(l)},i(t){u||(nt(e.$$.fragment,t),nt(d),nt(m),nt(r.$$.fragment,t),nt(a.$$.fragment,t),nt(c.$$.fragment,t),u=!0)},o(t){ot(e.$$.fragment,t),ot(d),ot(m),ot(r.$$.fragment,t),ot(a.$$.fragment,t),ot(c.$$.fragment,t),u=!1},d(t){lt(e,t),t&&_(n),d&&d.d(t),t&&_(o),m&&m.d(t),t&&_(s),lt(r,t),t&&_(i),lt(a,t),t&&_(l),lt(c,t)}}}function Dt(t){let e,n;return e=new t[10]({props:{name:"versandt an",$$slots:{default:[Nt]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n[0]|4&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function Nt(t){let e,n;return e=new t[11]({props:{disabled:!0,value:t[0].mailInfo.accepted.join(", ")}}),{c(){it(e.$$.fragment)},m(t,o){at(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||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function zt(t){let e,n;return e=new t[10]({props:{name:"nicht versandt an",$$slots:{default:[Pt]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n[0]|4&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function Pt(t){let e,n;return e=new t[11]({props:{disabled:!0,value:t[0].mailInfo.rejected.join(", ")}}),{c(){it(e.$$.fragment)},m(t,o){at(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||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function At(t){let e,n;return e=new t[11]({props:{disabled:!0,value:t[0].mailInfo.messageSize}}),{c(){it(e.$$.fragment)},m(t,o){at(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||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function Wt(t){let e,n;return e=new i({props:{disabled:!0,value:t[0].mailInfo.response}}),{c(){it(e.$$.fragment)},m(t,o){at(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||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function Mt(t){let e,n;return e=new t[11]({props:{disabled:!0,value:t[0].mailInfo.messageId}}),{c(){it(e.$$.fragment)},m(t,o){at(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||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function Vt(t){let e,n;return e=new t[14]({props:{filled:!0,disabled:t[1],$$slots:{default:[Gt]},$$scope:{ctx:t}}}),e.$on("click",t[17]),{c(){it(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};2&n[0]&&(o.disabled=t[1]),128&n[0]|4&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function qt(t){let e,n;return e=new t[14]({props:{filled:!0,danger:!0,$$slots:{default:[Rt]},$$scope:{ctx:t}}}),e.$on("click",t[18]),{c(){it(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};4&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function Gt(t){let e;return{c(){e=O(t[7])},m(t,n){E(t,e,n)},p(t,n){128&n[0]&&N(e,t[7])},d(t){t&&_(e)}}}function Rt(t){let e;return{c(){e=O("Visum zurücknehmen")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Ft(t){let e;return{c(){e=O("Abbrechen")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Yt(t){let e;return{c(){e=O("Ja, bitte visieren")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Jt(t){let e,n,o,s,r,i,a;return s=new t[14]({props:{filled:!0,$$slots:{default:[Ft]},$$scope:{ctx:t}}}),s.$on("click",t[27]),i=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[Yt]},$$scope:{ctx:t}}}),i.$on("click",t[20]),{c(){e=S("p"),e.textContent="Willst du den Vorgang jetzt visieren?",n=T(),o=S("div"),it(s.$$.fragment),r=T(),it(i.$$.fragment),D(o,"class","flex_div svelte-s8a1g4")},m(t,l){E(t,e,l),E(t,n,l),E(t,o,l),at(s,o,null),j(o,r),at(i,o,null),a=!0},p(t,e){const n={};4&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};4&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){a||(nt(s.$$.fragment,t),nt(i.$$.fragment,t),a=!0)},o(t){ot(s.$$.fragment,t),ot(i.$$.fragment,t),a=!1},d(t){t&&_(e),t&&_(n),t&&_(o),lt(s),lt(i)}}}function Lt(t){let e,n,o;return n=new $t({props:{size:"25"}}),{c(){e=S("div"),it(n.$$.fragment),D(e,"slot","title-icon")},m(t,s){E(t,e,s),at(n,e,null),o=!0},p:b,i(t){o||(nt(n.$$.fragment,t),o=!0)},o(t){ot(n.$$.fragment,t),o=!1},d(t){t&&_(e),lt(n)}}}function Kt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[32],danger:!0,$$slots:{"title-icon":[Lt],default:[Jt]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};2&n[1]&&(o.closeCallback=t[32]),4&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function Zt(t){let e;return{c(){e=O("Abbrechen")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Ht(t){let e;return{c(){e=O("Ja, bitte zurücknehmen")},m(t,n){E(t,e,n)},d(t){t&&_(e)}}}function Qt(t){let e,n,o,s,r,i,a;return s=new t[14]({props:{filled:!0,$$slots:{default:[Zt]},$$scope:{ctx:t}}}),s.$on("click",t[29]),i=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[Ht]},$$scope:{ctx:t}}}),i.$on("click",t[21]),{c(){e=S("p"),e.textContent="Willst du das Visum zurücknehmen?",n=T(),o=S("div"),it(s.$$.fragment),r=T(),it(i.$$.fragment),D(o,"class","flex_div svelte-s8a1g4")},m(t,l){E(t,e,l),E(t,n,l),E(t,o,l),at(s,o,null),j(o,r),at(i,o,null),a=!0},p(t,e){const n={};4&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};4&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){a||(nt(s.$$.fragment,t),nt(i.$$.fragment,t),a=!0)},o(t){ot(s.$$.fragment,t),ot(i.$$.fragment,t),a=!1},d(t){t&&_(e),t&&_(n),t&&_(o),lt(s),lt(i)}}}function Ut(t){let e,n,o;return n=new $t({props:{size:"25"}}),{c(){e=S("div"),it(n.$$.fragment),D(e,"slot","title-icon")},m(t,s){E(t,e,s),at(n,e,null),o=!0},p:b,i(t){o||(nt(n.$$.fragment,t),o=!0)},o(t){ot(n.$$.fragment,t),o=!1},d(t){t&&_(e),lt(n)}}}function Xt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[32],danger:!0,$$slots:{"title-icon":[Ut],default:[Qt]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};2&n[1]&&(o.closeCallback=t[32]),4&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(nt(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function te(t){let e,n,o,s,r,i,a,l,c,u,d,m,$,f,p,g,v,h,y,k,w=t[16]&&function(t){let e;return{c(){e=S("div"),e.textContent=`${t[16]}`,D(e,"class","description svelte-s8a1g4")},m(t,n){E(t,e,n)},p:b,d(t){t&&_(e)}}}(t);r=new t[10]({props:{name:"Rolle",$$slots:{default:[St]},$$scope:{ctx:t}}}),a=new t[10]({props:{name:"visiert von",$$slots:{default:[Ct]},$$scope:{ctx:t}}}),c=new t[10]({props:{name:"visiert am",$$slots:{default:[Tt]},$$scope:{ctx:t}}});let x=t[0].mailInfo&&Bt(t);const I=[qt,Vt],C=[];function O(t,e){return t[0].visum?0:1}function B(e){t[28](e)}m=O(t),$=C[m]=I[m](t);let N={$$slots:{default:[Kt,({closeCallback:t})=>({32:t}),({closeCallback:t})=>[0,t?2:0]]},$$scope:{ctx:t}};function z(e){t[30](e)}void 0!==t[3]&&(N.open=t[3]),p=new t[8]({props:N}),M.push((()=>rt(p,"open",B)));let P={$$slots:{default:[Xt,({closeCallback:t})=>({32:t}),({closeCallback:t})=>[0,t?2:0]]},$$scope:{ctx:t}};return void 0!==t[4]&&(P.open=t[4]),h=new t[8]({props:P}),M.push((()=>rt(h,"open",z))),{c(){e=S("h3"),e.textContent="Visum bearbeiten",n=T(),o=S("div"),w&&w.c(),s=T(),it(r.$$.fragment),i=T(),it(a.$$.fragment),l=T(),it(c.$$.fragment),u=T(),x&&x.c(),d=T(),$.c(),f=T(),it(p.$$.fragment),v=T(),it(h.$$.fragment),D(o,"class","visum svelte-s8a1g4")},m(t,$){E(t,e,$),E(t,n,$),E(t,o,$),w&&w.m(o,null),j(o,s),at(r,o,null),j(o,i),at(a,o,null),j(o,l),at(c,o,null),j(o,u),x&&x.m(o,null),j(o,d),C[m].m(o,null),E(t,f,$),at(p,t,$),E(t,v,$),at(h,t,$),k=!0},p(t,e){t[16]&&w.p(t,e);const n={};5&e[0]|4&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const s={};64&e[0]|4&e[1]&&(s.$$scope={dirty:e,ctx:t}),a.$set(s);const i={};33&e[0]|4&e[1]&&(i.$$scope={dirty:e,ctx:t}),c.$set(i),t[0].mailInfo?x?(x.p(t,e),1&e[0]&&nt(x,1)):(x=Bt(t),x.c(),nt(x,1),x.m(o,d)):x&&(tt(),ot(x,1,1,(()=>{x=null})),et());let l=m;m=O(t),m===l?C[m].p(t,e):(tt(),ot(C[l],1,1,(()=>{C[l]=null})),et(),$=C[m],$?$.p(t,e):($=C[m]=I[m](t),$.c()),nt($,1),$.m(o,null));const u={};6&e[1]&&(u.$$scope={dirty:e,ctx:t}),!g&&8&e[0]&&(g=!0,u.open=t[3],L((()=>g=!1))),p.$set(u);const f={};6&e[1]&&(f.$$scope={dirty:e,ctx:t}),!y&&16&e[0]&&(y=!0,f.open=t[4],L((()=>y=!1))),h.$set(f)},i(t){k||(nt(r.$$.fragment,t),nt(a.$$.fragment,t),nt(c.$$.fragment,t),nt(x),nt($),nt(p.$$.fragment,t),nt(h.$$.fragment,t),k=!0)},o(t){ot(r.$$.fragment,t),ot(a.$$.fragment,t),ot(c.$$.fragment,t),ot(x),ot($),ot(p.$$.fragment,t),ot(h.$$.fragment,t),k=!1},d(t){t&&_(e),t&&_(n),t&&_(o),w&&w.d(),lt(r),lt(a),lt(c),x&&x.d(),C[m].d(),t&&_(f),lt(p,t),t&&_(v),lt(h,t)}}}function ee(t,i,l){let c,u;I(t,s,(t=>l(25,c=t))),I(t,r,(t=>l(26,u=t)));const{Modal:d,Dialog:m,FormField:$,TextField:f,DatePicker:p,TimePicker:g,Button:v,Divider:b}=e;let h,y,k,w,x,j,{task:E}=i,{taskId:_}=i,{eventItem:S}=i,C=!1,O=!1;const T=S.output.approval[0].description||"",B=()=>{l(3,C=!1)};o.subscribe((t=>{t&&t.taskId===_&&(l(0,E.visum=t.data,E),l(0,E.status=t.status,E))}));return t.$$set=t=>{"task"in t&&l(0,E=t.task),"taskId"in t&&l(22,_=t.taskId),"eventItem"in t&&l(23,S=t.eventItem)},t.$$.update=()=>{125829127&t.$$.dirty[0]&&(l(5,y=new Date(E.visum?.timeStamp)),l(7,w=E.visum?"Visum erfolgreich erstellt":"Jetzt visieren"),l(24,x=!E.visum),l(24,x=x&&!!S.output?.approval?.length),x&&c&&(l(2,j=S.output.approval.flatMap((({refRole:t})=>t))),l(24,x=j.some((t=>c.some((e=>t===e)))))),l(1,h=!x),l(6,k=E.visum?.user||(h?"":u.email)),Y().then((()=>{const t=document.getElementsByClassName("visumTime")[0];t&&(t.disabled=!0)})))},[E,h,j,C,O,y,k,w,d,m,$,f,p,g,v,b,T,()=>{l(3,C=!0)},()=>{l(4,O=!0)},B,()=>{l(3,C=!1);const t={eventId:S._id,eventDesignation:S.identity.designation,docId:E.docId,role:j.filter((t=>c.find((e=>e===t)))).join(", "),user:u.email,timeStamp:(new Date).toISOString()};n.setTaskVisum(E._id,t).then((e=>{e.taskId?(l(0,E.visum=t,E),window.singleSpaNavigate(`/task/${S._id}/${E._id}/task`)):a.failed("Das Visum konnte ncht gesetzt werden!",3e3)}))},()=>{l(4,O=!1),n.deleteTaskVisum(E._id,S._id).then((t=>{!1!==t.status?(l(0,E.visum=!1,E),window.singleSpaNavigate(`/task/${S._id}/${E._id}/task`)):a.failed("Das Visum konnte ncht zurück genommen werden!",3e3)}))},_,S,x,c,u,()=>B(),function(t){C=t,l(3,C)},()=>B(),function(t){O=t,l(4,O)}]}class ne extends ut{constructor(t){var e;super(),_t.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(_t.head,e)),ct(this,t,ee,te,x,{task:0,taskId:22,eventItem:23},[-1,-1])}}const oe=[];const se=t("taskClipboard",function(t,e=b){let n;const o=[];function s(e){if(x(t,e)&&(t=e,n)){const e=!oe.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),oe.push(n,t)}if(e){for(let t=0;t<oe.length;t+=2)oe[t][0](oe[t+1]);oe.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:re}=st;function ie(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"),it(n.$$.fragment),o=T(),s=O(c),r=T(),i=S("div"),a&&it(a.$$.fragment),D(e,"class","task--header svelte-kw8mxg"),D(i,"class","task--content svelte-kw8mxg")},m(t,c){E(t,e,c),at(n,e,null),j(e,o),j(e,s),E(t,r,c),E(t,i,c),a&&at(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])+"")&&N(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){tt();const t=a;ot(t.$$.fragment,1,0,(()=>{lt(t,1)})),et()}u?(a=new u(d(t)),a.$on("back",t[9]),it(a.$$.fragment),nt(a.$$.fragment,1),at(a,i,null)):a=null}else u&&a.$set(m)},i(t){l||(nt(n.$$.fragment,t),a&&nt(a.$$.fragment,t),l=!0)},o(t){ot(n.$$.fragment,t),a&&ot(a.$$.fragment,t),l=!1},d(t){t&&_(e),lt(n),t&&_(r),t&&_(i),a&<(a)}}}function ae(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:[ie]},$$scope:{ctx:t}}}),{c(){e=S("div"),it(n.$$.fragment),D(e,"class","task svelte-kw8mxg")},m(t,s){E(t,e,s),at(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||(nt(n.$$.fragment,t),o=!0)},o(t){ot(n.$$.fragment,t),o=!1},d(t){t&&_(e),lt(n)}}}function le(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[ae,({closeCallback:t})=>({32:t}),({closeCallback:t})=>[0,t?2:0]]},$$scope:{ctx:t}}}),n.$on("change",t[6]),{c(){e=S("div"),it(n.$$.fragment),D(e,"class","task--page svelte-kw8mxg")},m(t,s){E(t,e,s),at(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||(nt(n.$$.fragment,t),o=!0)},o(t){ot(n.$$.fragment,t),o=!1},d(t){t&&_(e),lt(n)}}}function ce(t){let e,n,o;return n=new l({props:{update:t[5],$$slots:{default:[le,({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=T(),it(n.$$.fragment),re.title="enablerr - Task"},m(t,s){E(t,e,s),at(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||(nt(n.$$.fragment,t),o=!0)},o(t){ot(n.$$.fragment,t),o=!1},d(t){t&&_(e),lt(n,t)}}}function ue(t,o,s){let r;I(t,se,(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:Et},{id:"visum",name:"Visum",component:ne},{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){A().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"})),function(t){A().$$.on_mount.push(t)}((()=>{!function(t,e,n=e){t.set(n)}(se,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),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 de extends ut{constructor(t){var e;super(),re.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(re.head,e)),ct(this,t,ue,ce,x,{},[-1,-1])}}const me=v({component:de,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:$e,mount:fe,unmount:pe}=me;t({bootstrap:$e,mount:fe,unmount:pe});t("Task",de)}}}));
|