@enablerr-ui/task 0.2.93 → 0.2.94

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,l,a,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,l=t.Page},function(t){a=t.Form},function(t){c=t.Workflow},function(t){u=t.Report},function(t){d=t.Collaboration}],execute:function(){t("version","0.2.93");function m(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var f,$,p=(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:l.bind(null,e,n),mount:a.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var i={component:null,domElementGetter:null,props:{}};function l(t){return Promise.resolve()}function a(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:{}},$.exports),$.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 C(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function S(t){return document.createTextNode(t)}function z(){return S(" ")}function O(){return S("")}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)}let N;function P(t){N=t}function T(){if(!N)throw new Error("Function called outside component initialization");return N}const W=[],A=[],V=[],M=[],q=Promise.resolve();let R=!1;function F(){R||(R=!0,q.then(Z))}function G(){return F(),q}function Y(t){V.push(t)}function J(t){M.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<V.length;t+=1){const e=V[t];K.has(e)||(K.add(e),e())}V.length=0}while(W.length);for(;M.length;)M.pop()();R=!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:l}=t.$$;s&&s.m(e,n),o||Y((()=>{const e=r.map(b).filter(k);i?i.push(...e):y(e),t.$$.on_mount=[]})),l.forEach(Y)}function lt(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 at(t,e,n,o,s,r,i=[-1]){const l=N;P(t);const a=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(l?l.$$.context:e.context||[]),callbacks:h(),dirty:i,skip_bound:!1};let c=!1;if(a.ctx=n?n(t,e.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return a.ctx&&s(a.ctx[e],a.ctx[e]=r)&&(!a.skip_bound&&a.bound[e]&&a.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})):[],a.update(),c=!0,y(a.before_update),a.fragment=!!o&&o(a.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);a.fragment&&a.fragment.l(t),t.forEach(E)}else a.fragment&&a.fragment.c();e.intro&&et(t.$$.fragment),it(t,e.target,e.anchor,e.customElement),Z()}P(l)}class ct{$destroy(){lt(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=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),I(e,n),I(e,o),I(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: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(),at(this,t,dt,ut,w,{size:0,strokeWidth:1,class:2})}}function ft(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),I(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:v,o:v,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 pt extends ct{constructor(t){super(),at(this,t,$t,ft,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,l,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=S(o),B(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){lt(e,t)}}}(t);return r=new t[11]({}),$=new t[11]({props:{class:"divider"}}),h=new a({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,a,v;e=_("div"),n=_("div"),w&&w.c(),o=z(),x&&x.c(),s=z(),rt(r.$$.fragment),i=z(),l=_("div"),c=_("div"),c.textContent="Task-Status",u=z(),d=_("div"),m=S(k),f=z(),rt($.$$.fragment),p=z(),g=_("div"),g.textContent=" ",b=z(),rt(h.$$.fragment),B(n,"class","accordion-description svelte-3m9yjb"),B(c,"class","task--status-title svelte-3m9yjb"),B(d,"class","task--status-label svelte-3m9yjb"),B(l,"class","task--status svelte-3m9yjb"),B(e,"class","subcat svelte-3m9yjb"),t="height",a="0.5em",g.style.setProperty(t,a,v?"important":"")},m(t,a){j(t,e,a),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,l),I(l,c),I(l,u),I(l,d),I(d,m),j(t,f,a),it($,t,a),j(t,p,a),j(t,g,a),j(t,b,a),it(h,t,a),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)+"")&&D(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($.$$.fragment,t),et(h.$$.fragment,t),y=!0)},o(t){nt(x),nt(r.$$.fragment,t),nt($.$$.fragment,t),nt(h.$$.fragment,t),y=!1},d(t){t&&E(e),w&&w.d(),x&&x.d(),lt(r),t&&E(f),lt($,t),t&&E(p),t&&E(g),t&&E(b),lt(h,t)}}}function bt(t){let e,n,o=t[19].identity.description+"";return{c(){e=_("div"),n=S(o),B(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=S("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),lt(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),B(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),lt(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){lt(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 l=t&&(e.current=t)(i);let a=!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),l.c(),et(l,1),l.m(e.mount(),e.anchor),a=!0),e.block=l,e.blocks&&(e.blocks[o]=l),a&&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=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||(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:l}=s,{eventItem:a}=s,{followerEventId:c}=s,{isStandalone:u}=s;const{Accordion:d,AccordionSection:m,Button:f,Divider:$}=e,p=i,g=a,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===l&&n.getTaskqueue(null,t.taskId).then((({task:e})=>{r(3,p.status=e.status||t.status,p),r(3,p.readonly=e.readonly,p),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,l=t.taskId),"eventItem"in t&&r(15,a=t.eventItem),"followerEventId"in t&&r(16,c=t.followerEventId),"isStandalone"in t&&r(2,u=t.isStandalone)},[i,l,u,p,y,k,b,h,d,m,f,$,v,()=>window.singleSpaNavigate("/"),t=>w[t]||"",a,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)),at(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){lt(e,t)}}}function Ct(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){lt(e,t)}}}function St(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=z(),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){lt(e,t),t&&E(n),lt(o,t)}}}function zt(t){let e,n,o=t[0].visum&&St(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]&&et(o,1)):(o=St(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 Ot(t){let e,n;return e=new t[14]({props:{filled:!0,disabled:t[1],$$slots:{default:[Dt]},$$scope:{ctx:t}}}),e.$on("click",t[16]),{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]|2&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){lt(e,t)}}}function Bt(t){let e,n;return e=new t[14]({props:{filled:!0,danger:!0,$$slots:{default:[Nt]},$$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[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){lt(e,t)}}}function Dt(t){let e;return{c(){e=S(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 Nt(t){let e;return{c(){e=S("Visum zurücknehmen")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function Pt(t){let e;return{c(){e=S("Abbrechen")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function Tt(t){let e;return{c(){e=S("Ja, bitte visieren")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function Wt(t){let e,n,o,s,r,i,l;return s=new t[14]({props:{filled:!0,$$slots:{default:[Pt]},$$scope:{ctx:t}}}),s.$on("click",t[26]),i=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[Tt]},$$scope:{ctx:t}}}),i.$on("click",t[19]),{c(){e=_("p"),e.textContent="Willst du den Vorgang jetzt visieren?",n=z(),o=_("div"),rt(s.$$.fragment),r=z(),rt(i.$$.fragment),B(o,"class","flex_div svelte-1gc6zvk")},m(t,a){j(t,e,a),j(t,n,a),j(t,o,a),it(s,o,null),I(o,r),it(i,o,null),l=!0},p(t,e){const n={};2&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};2&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){l||(et(s.$$.fragment,t),et(i.$$.fragment,t),l=!0)},o(t){nt(s.$$.fragment,t),nt(i.$$.fragment,t),l=!1},d(t){t&&E(e),t&&E(n),t&&E(o),lt(s),lt(i)}}}function At(t){let e,n,o;return n=new mt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),B(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),lt(n)}}}function Vt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[31],danger:!0,$$slots:{"title-icon":[At],default:[Wt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};1&n[1]&&(o.closeCallback=t[31]),2&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){lt(e,t)}}}function Mt(t){let e;return{c(){e=S("Abbrechen")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function qt(t){let e;return{c(){e=S("Ja, bitte zurücknehmen")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function Rt(t){let e,n,o,s,r,i,l;return s=new t[14]({props:{filled:!0,$$slots:{default:[Mt]},$$scope:{ctx:t}}}),s.$on("click",t[28]),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 das Visum zurücknehmen?",n=z(),o=_("div"),rt(s.$$.fragment),r=z(),rt(i.$$.fragment),B(o,"class","flex_div svelte-1gc6zvk")},m(t,a){j(t,e,a),j(t,n,a),j(t,o,a),it(s,o,null),I(o,r),it(i,o,null),l=!0},p(t,e){const n={};2&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};2&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){l||(et(s.$$.fragment,t),et(i.$$.fragment,t),l=!0)},o(t){nt(s.$$.fragment,t),nt(i.$$.fragment,t),l=!1},d(t){t&&E(e),t&&E(n),t&&E(o),lt(s),lt(i)}}}function Ft(t){let e,n,o;return n=new mt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),B(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),lt(n)}}}function Gt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[31],danger:!0,$$slots:{"title-icon":[Ft],default:[Rt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};1&n[1]&&(o.closeCallback=t[31]),2&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){lt(e,t)}}}function Yt(t){let e,n,o,s,r,i,l,a,c,u,d,m,f,$,p,g,b,h,y,k=t[15]&&function(t){let e;return{c(){e=_("div"),e.textContent=`${t[15]}`,B(e,"class","description svelte-1gc6zvk")},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}}}),l=new t[10]({props:{name:"visiert von",$$slots:{default:[Ct]},$$scope:{ctx:t}}}),c=new t[10]({props:{name:"visiert am",$$slots:{default:[zt]},$$scope:{ctx:t}}});const w=[Bt,Ot],x=[];function C(t,e){return t[0].visum?0:1}function S(e){t[27](e)}d=C(t),m=x[d]=w[d](t);let O={$$slots:{default:[Vt,({closeCallback:t})=>({31:t}),({closeCallback:t})=>[0,t?1:0]]},$$scope:{ctx:t}};function D(e){t[29](e)}void 0!==t[3]&&(O.open=t[3]),$=new t[8]({props:O}),A.push((()=>st($,"open",S)));let N={$$slots:{default:[Gt,({closeCallback:t})=>({31:t}),({closeCallback:t})=>[0,t?1:0]]},$$scope:{ctx:t}};return void 0!==t[4]&&(N.open=t[4]),b=new t[8]({props:N}),A.push((()=>st(b,"open",D))),{c(){e=_("h3"),e.textContent="Visum bearbeiten",n=z(),o=_("div"),k&&k.c(),s=z(),rt(r.$$.fragment),i=z(),rt(l.$$.fragment),a=z(),rt(c.$$.fragment),u=z(),m.c(),f=z(),rt($.$$.fragment),g=z(),rt(b.$$.fragment),B(o,"class","visum svelte-1gc6zvk")},m(t,m){j(t,e,m),j(t,n,m),j(t,o,m),k&&k.m(o,null),I(o,s),it(r,o,null),I(o,i),it(l,o,null),I(o,a),it(c,o,null),I(o,u),x[d].m(o,null),j(t,f,m),it($,t,m),j(t,g,m),it(b,t,m),y=!0},p(t,e){t[15]&&k.p(t,e);const n={};5&e[0]|2&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const s={};64&e[0]|2&e[1]&&(s.$$scope={dirty:e,ctx:t}),l.$set(s);const i={};33&e[0]|2&e[1]&&(i.$$scope={dirty:e,ctx:t}),c.$set(i);let a=d;d=C(t),d===a?x[d].p(t,e):(X(),nt(x[a],1,1,(()=>{x[a]=null})),tt(),m=x[d],m?m.p(t,e):(m=x[d]=w[d](t),m.c()),et(m,1),m.m(o,null));const u={};3&e[1]&&(u.$$scope={dirty:e,ctx:t}),!p&&8&e[0]&&(p=!0,u.open=t[3],J((()=>p=!1))),$.$set(u);const f={};3&e[1]&&(f.$$scope={dirty:e,ctx:t}),!h&&16&e[0]&&(h=!0,f.open=t[4],J((()=>h=!1))),b.$set(f)},i(t){y||(et(r.$$.fragment,t),et(l.$$.fragment,t),et(c.$$.fragment,t),et(m),et($.$$.fragment,t),et(b.$$.fragment,t),y=!0)},o(t){nt(r.$$.fragment,t),nt(l.$$.fragment,t),nt(c.$$.fragment,t),nt(m),nt($.$$.fragment,t),nt(b.$$.fragment,t),y=!1},d(t){t&&E(e),t&&E(n),t&&E(o),k&&k.d(),lt(r),lt(l),lt(c),x[d].d(),t&&E(f),lt($,t),t&&E(g),lt(b,t)}}}function Jt(t,l,a){let c,u;x(t,s,(t=>a(24,c=t))),x(t,r,(t=>a(25,u=t)));const{Modal:d,Dialog:m,FormField:f,TextField:$,DatePicker:p,TimePicker:g,Button:v}=e;let b,h,y,k,w,I,{task:j}=l,{taskId:E}=l,{eventItem:_}=l,C=!1,S=!1;const z=_.output.approval[0].description||"",O=()=>{a(3,C=!1)};o.subscribe((t=>{t&&t.taskId===E&&(a(0,j.visum=t.data,j),a(0,j.status=t.status,j))}));return t.$$set=t=>{"task"in t&&a(0,j=t.task),"taskId"in t&&a(21,E=t.taskId),"eventItem"in t&&a(22,_=t.eventItem)},t.$$.update=()=>{62914567&t.$$.dirty[0]&&(a(5,h=new Date(j.visum?.timeStamp)),a(7,k=j.visum?"Visum erfolgreich erstellt":"Jetzt visieren"),a(23,w=!j.visum),a(23,w=w&&!!_.output?.approval?.length),w&&c&&(a(2,I=_.output.approval.flatMap((({refRole:t})=>t))),a(23,w=I.some((t=>c.some((e=>t===e)))))),a(1,b=!w),a(6,y=j.visum?.user||(b?"":u.email)),G().then((()=>{const t=document.getElementsByClassName("visumTime")[0];t&&(t.disabled=!0)})))},[j,b,I,C,S,h,y,k,d,m,f,$,p,g,v,z,()=>{a(3,C=!0)},()=>{a(4,S=!0)},O,()=>{a(3,C=!1);const t={eventId:_._id,eventDesignation:_.identity.designation,docId:j.docId,role:I.filter((t=>c.find((e=>e===t)))).join(", "),user:u.email,timeStamp:(new Date).toISOString()};n.setTaskVisum(j._id,t).then((e=>{e.taskId?(a(0,j.visum=t,j),window.singleSpaNavigate(`/task/${_._id}/${j._id}/task`)):i.failed("Das Visum konnte ncht gesetzt werden!",3e3)}))},()=>{a(4,S=!1),n.deleteTaskVisum(j._id,_._id).then((t=>{!1!==t.status?(a(0,j.visum=!1,j),window.singleSpaNavigate(`/task/${_._id}/${j._id}/task`)):i.failed("Das Visum konnte ncht zurück genommen werden!",3e3)}))},E,_,w,c,u,()=>O(),function(t){C=t,a(3,C)},()=>O(),function(t){S=t,a(4,S)}]}class Lt extends ct{constructor(t){var e;super(),Et.getElementById("svelte-1gc6zvk-style")||((e=_("style")).id="svelte-1gc6zvk-style",e.textContent=".visum .time-picker .dropdown{display:none !important}.flex_div.svelte-1gc6zvk.svelte-1gc6zvk{display:flex;margin-top:1em;gap:0.5em;justify-content:space-between}div.visum.svelte-1gc6zvk div.description.svelte-1gc6zvk{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)),at(this,t,Jt,Yt,w,{task:0,taskId:21,eventItem:22},[-1,-1])}}const Kt=[];const Zt=t("taskClipboard",function(t,e=v){let n;const o=[];function s(e){if(w(t,e)&&(t=e,n)){const e=!Kt.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),Kt.push(n,t)}if(e){for(let t=0;t<Kt.length;t+=2)Kt[t][0](Kt[t+1]);Kt.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(r,i=v){const l=[r,i];return o.push(l),1===o.length&&(n=e(s)||v),r(t),()=>{const t=o.indexOf(l);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1)),{document:Ht}=ot;function Qt(t){let e,n,o,s,r,i,l,a,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&&(l=new u(d(t)),l.$on("back",t[9])),{c(){e=_("div"),rt(n.$$.fragment),o=z(),s=S(c),r=z(),i=_("div"),l&&rt(l.$$.fragment),B(e,"class","task--header svelte-kw8mxg"),B(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),l&&it(l,i,null),a=!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),(!a||406847489&o[0])&&c!==(c=t[8](t[27],!!t[28]||t[0]===t[22])+"")&&D(s,c);const m={};if(8388608&o[0]&&(m.taskId=t[23]),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(l){X();const t=l;nt(t.$$.fragment,1,0,(()=>{lt(t,1)})),tt()}u?(l=new u(d(t)),l.$on("back",t[9]),rt(l.$$.fragment),et(l.$$.fragment,1),it(l,i,null)):l=null}else u&&l.$set(m)},i(t){a||(et(n.$$.fragment,t),l&&et(l.$$.fragment,t),a=!0)},o(t){nt(n.$$.fragment,t),l&&nt(l.$$.fragment,t),a=!1},d(t){t&&E(e),lt(n),t&&E(r),t&&E(i),l&&lt(l)}}}function Ut(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:[Qt]},$$scope:{ctx:t}}}),{c(){e=_("div"),rt(n.$$.fragment),B(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),lt(n)}}}function Xt(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[Ut,({closeCallback:t})=>({31:t}),({closeCallback:t})=>[0,t?1:0]]},$$scope:{ctx:t}}}),n.$on("change",t[6]),{c(){e=_("div"),rt(n.$$.fragment),B(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),lt(n)}}}function te(t){let e,n,o;return n=new l({props:{update:t[5],$$slots:{default:[Xt,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:s,item:r,eventItem:i,followerEventId:l,task:a,findMenu:c}})=>({21:t,22:e,23:n,24:o,25:s,26:r,27:i,28:l,29:a,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=z(),rt(n.$$.fragment),Ht.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),lt(n,t)}}}function ee(t,o,s){let r;x(t,Zt,(t=>s(16,r=t)));const{Modal:i,Dialog:l,Tabs:a}=e;let m;const f=-1!==window.location.search.indexOf("view=standalone");let $,p,g;const v={items:[{id:"task",name:"Aufgabe",component:jt},{id:"visum",name:"Visum",component:Lt},{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,$=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)}(Zt,r=!1,r)}));return[m,i,l,a,f,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 l={status:"New"};const a=await n.getEvent(t);a||window.singleSpaNavigate("/error");let c=a.identity.designation;if(r){const t=await n.getEvent(r);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}return e!==t?(l=await n.getTaskById(e),l||window.singleSpaNavigate("/error"),l.event!==a._id.toString()&&(a._id=l.event)):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:i,eventItem:a,followerEventId:r,task:l,items:v.map(),findMenu:t=>v.findByName(t)}},function(t){t.detail.value?b():(document.body.style.position=$||"",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 G().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)},()=>f?window.close():window.singleSpaNavigate("/")]}class ne extends ct{constructor(t){var e;super(),Ht.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(Ht.head,e)),at(this,t,ee,te,w,{},[-1,-1])}}const oe=g({component:ne,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:se,mount:re,unmount:ie}=oe;t({bootstrap:se,mount:re,unmount:ie});t("Task",ne)}}}));
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,l,a,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,l=t.Page},function(t){a=t.Form},function(t){c=t.Workflow},function(t){u=t.Report},function(t){d=t.Collaboration}],execute:function(){t("version","0.2.94");function m(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var f,$,p=(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:l.bind(null,e,n),mount:a.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var i={component:null,domElementGetter:null,props:{}};function l(t){return Promise.resolve()}function a(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:{}},$.exports),$.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 C(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function S(t){return document.createTextNode(t)}function z(){return S(" ")}function O(){return S("")}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)}let N;function P(t){N=t}function T(){if(!N)throw new Error("Function called outside component initialization");return N}const W=[],A=[],V=[],M=[],q=Promise.resolve();let R=!1;function F(){R||(R=!0,q.then(Z))}function G(){return F(),q}function Y(t){V.push(t)}function J(t){M.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<V.length;t+=1){const e=V[t];K.has(e)||(K.add(e),e())}V.length=0}while(W.length);for(;M.length;)M.pop()();R=!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:l}=t.$$;s&&s.m(e,n),o||Y((()=>{const e=r.map(b).filter(k);i?i.push(...e):y(e),t.$$.on_mount=[]})),l.forEach(Y)}function lt(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 at(t,e,n,o,s,r,i=[-1]){const l=N;P(t);const a=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(l?l.$$.context:e.context||[]),callbacks:h(),dirty:i,skip_bound:!1};let c=!1;if(a.ctx=n?n(t,e.props||{},((e,n,...o)=>{const r=o.length?o[0]:n;return a.ctx&&s(a.ctx[e],a.ctx[e]=r)&&(!a.skip_bound&&a.bound[e]&&a.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})):[],a.update(),c=!0,y(a.before_update),a.fragment=!!o&&o(a.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);a.fragment&&a.fragment.l(t),t.forEach(E)}else a.fragment&&a.fragment.c();e.intro&&et(t.$$.fragment),it(t,e.target,e.anchor,e.customElement),Z()}P(l)}class ct{$destroy(){lt(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=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),I(e,n),I(e,o),I(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: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(),at(this,t,dt,ut,w,{size:0,strokeWidth:1,class:2})}}function ft(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),I(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:v,o:v,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 pt extends ct{constructor(t){super(),at(this,t,$t,ft,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,l,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=S(o),B(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){lt(e,t)}}}(t);return r=new t[11]({}),$=new t[11]({props:{class:"divider"}}),h=new a({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,a,v;e=_("div"),n=_("div"),w&&w.c(),o=z(),x&&x.c(),s=z(),rt(r.$$.fragment),i=z(),l=_("div"),c=_("div"),c.textContent="Task-Status",u=z(),d=_("div"),m=S(k),f=z(),rt($.$$.fragment),p=z(),g=_("div"),g.textContent=" ",b=z(),rt(h.$$.fragment),B(n,"class","accordion-description svelte-3m9yjb"),B(c,"class","task--status-title svelte-3m9yjb"),B(d,"class","task--status-label svelte-3m9yjb"),B(l,"class","task--status svelte-3m9yjb"),B(e,"class","subcat svelte-3m9yjb"),t="height",a="0.5em",g.style.setProperty(t,a,v?"important":"")},m(t,a){j(t,e,a),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,l),I(l,c),I(l,u),I(l,d),I(d,m),j(t,f,a),it($,t,a),j(t,p,a),j(t,g,a),j(t,b,a),it(h,t,a),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)+"")&&D(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($.$$.fragment,t),et(h.$$.fragment,t),y=!0)},o(t){nt(x),nt(r.$$.fragment,t),nt($.$$.fragment,t),nt(h.$$.fragment,t),y=!1},d(t){t&&E(e),w&&w.d(),x&&x.d(),lt(r),t&&E(f),lt($,t),t&&E(p),t&&E(g),t&&E(b),lt(h,t)}}}function bt(t){let e,n,o=t[19].identity.description+"";return{c(){e=_("div"),n=S(o),B(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=S("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),lt(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),B(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),lt(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){lt(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 l=t&&(e.current=t)(i);let a=!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),l.c(),et(l,1),l.m(e.mount(),e.anchor),a=!0),e.block=l,e.blocks&&(e.blocks[o]=l),a&&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=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||(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:l}=s,{eventItem:a}=s,{followerEventId:c}=s,{isStandalone:u}=s;const{Accordion:d,AccordionSection:m,Button:f,Divider:$}=e,p=i,g=a,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===l&&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,l=t.taskId),"eventItem"in t&&r(15,a=t.eventItem),"followerEventId"in t&&r(16,c=t.followerEventId),"isStandalone"in t&&r(2,u=t.isStandalone)},[i,l,u,p,y,k,b,h,d,m,f,$,v,()=>window.singleSpaNavigate("/"),t=>w[t]||"",a,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)),at(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){lt(e,t)}}}function Ct(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){lt(e,t)}}}function St(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=z(),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){lt(e,t),t&&E(n),lt(o,t)}}}function zt(t){let e,n,o=t[0].visum&&St(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]&&et(o,1)):(o=St(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 Ot(t){let e,n;return e=new t[14]({props:{filled:!0,disabled:t[1],$$slots:{default:[Dt]},$$scope:{ctx:t}}}),e.$on("click",t[16]),{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]|2&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){lt(e,t)}}}function Bt(t){let e,n;return e=new t[14]({props:{filled:!0,danger:!0,$$slots:{default:[Nt]},$$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[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){lt(e,t)}}}function Dt(t){let e;return{c(){e=S(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 Nt(t){let e;return{c(){e=S("Visum zurücknehmen")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function Pt(t){let e;return{c(){e=S("Abbrechen")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function Tt(t){let e;return{c(){e=S("Ja, bitte visieren")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function Wt(t){let e,n,o,s,r,i,l;return s=new t[14]({props:{filled:!0,$$slots:{default:[Pt]},$$scope:{ctx:t}}}),s.$on("click",t[26]),i=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[Tt]},$$scope:{ctx:t}}}),i.$on("click",t[19]),{c(){e=_("p"),e.textContent="Willst du den Vorgang jetzt visieren?",n=z(),o=_("div"),rt(s.$$.fragment),r=z(),rt(i.$$.fragment),B(o,"class","flex_div svelte-1gc6zvk")},m(t,a){j(t,e,a),j(t,n,a),j(t,o,a),it(s,o,null),I(o,r),it(i,o,null),l=!0},p(t,e){const n={};2&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};2&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){l||(et(s.$$.fragment,t),et(i.$$.fragment,t),l=!0)},o(t){nt(s.$$.fragment,t),nt(i.$$.fragment,t),l=!1},d(t){t&&E(e),t&&E(n),t&&E(o),lt(s),lt(i)}}}function At(t){let e,n,o;return n=new mt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),B(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),lt(n)}}}function Vt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[31],danger:!0,$$slots:{"title-icon":[At],default:[Wt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};1&n[1]&&(o.closeCallback=t[31]),2&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){lt(e,t)}}}function Mt(t){let e;return{c(){e=S("Abbrechen")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function qt(t){let e;return{c(){e=S("Ja, bitte zurücknehmen")},m(t,n){j(t,e,n)},d(t){t&&E(e)}}}function Rt(t){let e,n,o,s,r,i,l;return s=new t[14]({props:{filled:!0,$$slots:{default:[Mt]},$$scope:{ctx:t}}}),s.$on("click",t[28]),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 das Visum zurücknehmen?",n=z(),o=_("div"),rt(s.$$.fragment),r=z(),rt(i.$$.fragment),B(o,"class","flex_div svelte-1gc6zvk")},m(t,a){j(t,e,a),j(t,n,a),j(t,o,a),it(s,o,null),I(o,r),it(i,o,null),l=!0},p(t,e){const n={};2&e[1]&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};2&e[1]&&(o.$$scope={dirty:e,ctx:t}),i.$set(o)},i(t){l||(et(s.$$.fragment,t),et(i.$$.fragment,t),l=!0)},o(t){nt(s.$$.fragment,t),nt(i.$$.fragment,t),l=!1},d(t){t&&E(e),t&&E(n),t&&E(o),lt(s),lt(i)}}}function Ft(t){let e,n,o;return n=new mt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),B(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),lt(n)}}}function Gt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[31],danger:!0,$$slots:{"title-icon":[Ft],default:[Rt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};1&n[1]&&(o.closeCallback=t[31]),2&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){lt(e,t)}}}function Yt(t){let e,n,o,s,r,i,l,a,c,u,d,m,f,$,p,g,b,h,y,k=t[15]&&function(t){let e;return{c(){e=_("div"),e.textContent=`${t[15]}`,B(e,"class","description svelte-1gc6zvk")},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}}}),l=new t[10]({props:{name:"visiert von",$$slots:{default:[Ct]},$$scope:{ctx:t}}}),c=new t[10]({props:{name:"visiert am",$$slots:{default:[zt]},$$scope:{ctx:t}}});const w=[Bt,Ot],x=[];function C(t,e){return t[0].visum?0:1}function S(e){t[27](e)}d=C(t),m=x[d]=w[d](t);let O={$$slots:{default:[Vt,({closeCallback:t})=>({31:t}),({closeCallback:t})=>[0,t?1:0]]},$$scope:{ctx:t}};function D(e){t[29](e)}void 0!==t[3]&&(O.open=t[3]),$=new t[8]({props:O}),A.push((()=>st($,"open",S)));let N={$$slots:{default:[Gt,({closeCallback:t})=>({31:t}),({closeCallback:t})=>[0,t?1:0]]},$$scope:{ctx:t}};return void 0!==t[4]&&(N.open=t[4]),b=new t[8]({props:N}),A.push((()=>st(b,"open",D))),{c(){e=_("h3"),e.textContent="Visum bearbeiten",n=z(),o=_("div"),k&&k.c(),s=z(),rt(r.$$.fragment),i=z(),rt(l.$$.fragment),a=z(),rt(c.$$.fragment),u=z(),m.c(),f=z(),rt($.$$.fragment),g=z(),rt(b.$$.fragment),B(o,"class","visum svelte-1gc6zvk")},m(t,m){j(t,e,m),j(t,n,m),j(t,o,m),k&&k.m(o,null),I(o,s),it(r,o,null),I(o,i),it(l,o,null),I(o,a),it(c,o,null),I(o,u),x[d].m(o,null),j(t,f,m),it($,t,m),j(t,g,m),it(b,t,m),y=!0},p(t,e){t[15]&&k.p(t,e);const n={};5&e[0]|2&e[1]&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const s={};64&e[0]|2&e[1]&&(s.$$scope={dirty:e,ctx:t}),l.$set(s);const i={};33&e[0]|2&e[1]&&(i.$$scope={dirty:e,ctx:t}),c.$set(i);let a=d;d=C(t),d===a?x[d].p(t,e):(X(),nt(x[a],1,1,(()=>{x[a]=null})),tt(),m=x[d],m?m.p(t,e):(m=x[d]=w[d](t),m.c()),et(m,1),m.m(o,null));const u={};3&e[1]&&(u.$$scope={dirty:e,ctx:t}),!p&&8&e[0]&&(p=!0,u.open=t[3],J((()=>p=!1))),$.$set(u);const f={};3&e[1]&&(f.$$scope={dirty:e,ctx:t}),!h&&16&e[0]&&(h=!0,f.open=t[4],J((()=>h=!1))),b.$set(f)},i(t){y||(et(r.$$.fragment,t),et(l.$$.fragment,t),et(c.$$.fragment,t),et(m),et($.$$.fragment,t),et(b.$$.fragment,t),y=!0)},o(t){nt(r.$$.fragment,t),nt(l.$$.fragment,t),nt(c.$$.fragment,t),nt(m),nt($.$$.fragment,t),nt(b.$$.fragment,t),y=!1},d(t){t&&E(e),t&&E(n),t&&E(o),k&&k.d(),lt(r),lt(l),lt(c),x[d].d(),t&&E(f),lt($,t),t&&E(g),lt(b,t)}}}function Jt(t,l,a){let c,u;x(t,s,(t=>a(24,c=t))),x(t,r,(t=>a(25,u=t)));const{Modal:d,Dialog:m,FormField:f,TextField:$,DatePicker:p,TimePicker:g,Button:v}=e;let b,h,y,k,w,I,{task:j}=l,{taskId:E}=l,{eventItem:_}=l,C=!1,S=!1;const z=_.output.approval[0].description||"",O=()=>{a(3,C=!1)};o.subscribe((t=>{t&&t.taskId===E&&(a(0,j.visum=t.data,j),a(0,j.status=t.status,j))}));return t.$$set=t=>{"task"in t&&a(0,j=t.task),"taskId"in t&&a(21,E=t.taskId),"eventItem"in t&&a(22,_=t.eventItem)},t.$$.update=()=>{62914567&t.$$.dirty[0]&&(a(5,h=new Date(j.visum?.timeStamp)),a(7,k=j.visum?"Visum erfolgreich erstellt":"Jetzt visieren"),a(23,w=!j.visum),a(23,w=w&&!!_.output?.approval?.length),w&&c&&(a(2,I=_.output.approval.flatMap((({refRole:t})=>t))),a(23,w=I.some((t=>c.some((e=>t===e)))))),a(1,b=!w),a(6,y=j.visum?.user||(b?"":u.email)),G().then((()=>{const t=document.getElementsByClassName("visumTime")[0];t&&(t.disabled=!0)})))},[j,b,I,C,S,h,y,k,d,m,f,$,p,g,v,z,()=>{a(3,C=!0)},()=>{a(4,S=!0)},O,()=>{a(3,C=!1);const t={eventId:_._id,eventDesignation:_.identity.designation,docId:j.docId,role:I.filter((t=>c.find((e=>e===t)))).join(", "),user:u.email,timeStamp:(new Date).toISOString()};n.setTaskVisum(j._id,t).then((e=>{e.taskId?(a(0,j.visum=t,j),window.singleSpaNavigate(`/task/${_._id}/${j._id}/task`)):i.failed("Das Visum konnte ncht gesetzt werden!",3e3)}))},()=>{a(4,S=!1),n.deleteTaskVisum(j._id,_._id).then((t=>{!1!==t.status?(a(0,j.visum=!1,j),window.singleSpaNavigate(`/task/${_._id}/${j._id}/task`)):i.failed("Das Visum konnte ncht zurück genommen werden!",3e3)}))},E,_,w,c,u,()=>O(),function(t){C=t,a(3,C)},()=>O(),function(t){S=t,a(4,S)}]}class Lt extends ct{constructor(t){var e;super(),Et.getElementById("svelte-1gc6zvk-style")||((e=_("style")).id="svelte-1gc6zvk-style",e.textContent=".visum .time-picker .dropdown{display:none !important}.flex_div.svelte-1gc6zvk.svelte-1gc6zvk{display:flex;margin-top:1em;gap:0.5em;justify-content:space-between}div.visum.svelte-1gc6zvk div.description.svelte-1gc6zvk{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)),at(this,t,Jt,Yt,w,{task:0,taskId:21,eventItem:22},[-1,-1])}}const Kt=[];const Zt=t("taskClipboard",function(t,e=v){let n;const o=[];function s(e){if(w(t,e)&&(t=e,n)){const e=!Kt.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),Kt.push(n,t)}if(e){for(let t=0;t<Kt.length;t+=2)Kt[t][0](Kt[t+1]);Kt.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(r,i=v){const l=[r,i];return o.push(l),1===o.length&&(n=e(s)||v),r(t),()=>{const t=o.indexOf(l);-1!==t&&o.splice(t,1),0===o.length&&(n(),n=null)}}}}(!1)),{document:Ht}=ot;function Qt(t){let e,n,o,s,r,i,l,a,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&&(l=new u(d(t)),l.$on("back",t[9])),{c(){e=_("div"),rt(n.$$.fragment),o=z(),s=S(c),r=z(),i=_("div"),l&&rt(l.$$.fragment),B(e,"class","task--header svelte-kw8mxg"),B(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),l&&it(l,i,null),a=!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),(!a||406847489&o[0])&&c!==(c=t[8](t[27],!!t[28]||t[0]===t[22])+"")&&D(s,c);const m={};if(8388608&o[0]&&(m.taskId=t[23]),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(l){X();const t=l;nt(t.$$.fragment,1,0,(()=>{lt(t,1)})),tt()}u?(l=new u(d(t)),l.$on("back",t[9]),rt(l.$$.fragment),et(l.$$.fragment,1),it(l,i,null)):l=null}else u&&l.$set(m)},i(t){a||(et(n.$$.fragment,t),l&&et(l.$$.fragment,t),a=!0)},o(t){nt(n.$$.fragment,t),l&&nt(l.$$.fragment,t),a=!1},d(t){t&&E(e),lt(n),t&&E(r),t&&E(i),l&&lt(l)}}}function Ut(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:[Qt]},$$scope:{ctx:t}}}),{c(){e=_("div"),rt(n.$$.fragment),B(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),lt(n)}}}function Xt(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[Ut,({closeCallback:t})=>({31:t}),({closeCallback:t})=>[0,t?1:0]]},$$scope:{ctx:t}}}),n.$on("change",t[6]),{c(){e=_("div"),rt(n.$$.fragment),B(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),lt(n)}}}function te(t){let e,n,o;return n=new l({props:{update:t[5],$$slots:{default:[Xt,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:s,item:r,eventItem:i,followerEventId:l,task:a,findMenu:c}})=>({21:t,22:e,23:n,24:o,25:s,26:r,27:i,28:l,29:a,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=z(),rt(n.$$.fragment),Ht.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),lt(n,t)}}}function ee(t,o,s){let r;x(t,Zt,(t=>s(16,r=t)));const{Modal:i,Dialog:l,Tabs:a}=e;let m;const f=-1!==window.location.search.indexOf("view=standalone");let $,p,g;const v={items:[{id:"task",name:"Aufgabe",component:jt},{id:"visum",name:"Visum",component:Lt},{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,$=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)}(Zt,r=!1,r)}));return[m,i,l,a,f,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 l={status:"New"};const a=await n.getEvent(t);a||window.singleSpaNavigate("/error");let c=a.identity.designation;if(r){const t=await n.getEvent(r);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}return e!==t?(l=await n.getTaskById(e),l||window.singleSpaNavigate("/error"),l.event!==a._id.toString()&&(a._id=l.event)):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:i,eventItem:a,followerEventId:r,task:l,items:v.map(),findMenu:t=>v.findByName(t)}},function(t){t.detail.value?b():(document.body.style.position=$||"",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 G().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)},()=>f?window.close():window.singleSpaNavigate("/")]}class ne extends ct{constructor(t){var e;super(),Ht.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(Ht.head,e)),at(this,t,ee,te,w,{},[-1,-1])}}const oe=g({component:ne,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:se,mount:re,unmount:ie}=oe;t({bootstrap:se,mount:re,unmount:ie});t("Task",ne)}}}));
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.93",
4
+ "version": "0.2.94",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"