@enablerr-ui/detail 0.2.202 → 0.2.203
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/form","@enablerr-ui/layout"],(function(e){"use strict";var t,n,o,r,s,i,l,a,c;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.TextArea,r=e.Storage,s=e.toasts,i=e.settings,l=e.currentRoles,a=e.Page},function(e){c=e.getAttractions}],execute:function(){e("version","0.2.202");const d=e("checkDate",((e,t)=>"string"!=typeof e||e.length<20||!(t=e.split(" · "))?e:t.map((e=>2===e.split("T").length&&3===e.split("T")[0].split("-").length?new Date(e).toLocaleDateString():e)).filter((e=>!!e)).join(" · "))),u=e=>{try{return new Date(e).toLocaleString()}catch{return e}},m=e=>e?"(ja)":"(nein)",f=(e,t)=>{const n={...t};return(e.display?.reduce(((t,o)=>{let[r,s]=o.split(".");if(e.list?.find((({name:e})=>e===r))&&s&&void 0!==n[r]){const e=`${r}_${s}`;n[e]=n[r][s],r=e}return t.find((e=>e===r))||t.push(r),t}),[]).map((e=>d(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":t[e.name]))).map((e=>e?.split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function p(){}function $(e){return e()}function g(){return Object.create(null)}function h(e){e.forEach($)}function v(e){return"function"==typeof e}function b(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function y(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return p;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function w(e){return null==e?"":e}function x(e,t){e.appendChild(t)}function k(e,t,n){e.insertBefore(t,n||null)}function I(e){e.parentNode.removeChild(e)}function F(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function _(e){return document.createElement(e)}function S(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function C(e){return document.createTextNode(e)}function E(){return C(" ")}function D(){return C("")}function N(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function O(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function j(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function z(e,t){e.value=null==t?"":t}function L(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function P(e,t,n){e.classList[n?"add":"remove"](t)}let T;function M(e){T=e}function B(){if(!T)throw new Error("Function called outside component initialization");return T}function A(e){B().$$.on_mount.push(e)}function q(){const e=B();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const r=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);o.slice().forEach((t=>{t.call(e,r)}))}}}function W(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const H=[],R=[],Y=[],G=[],V=Promise.resolve();let J=!1;function U(e){Y.push(e)}function K(e){G.push(e)}let Q=!1;const X=new Set;function Z(){if(!Q){Q=!0;do{for(let e=0;e<H.length;e+=1){const t=H[e];M(t),ee(t.$$)}for(M(null),H.length=0;R.length;)R.pop()();for(let e=0;e<Y.length;e+=1){const t=Y[e];X.has(t)||(X.add(t),t())}Y.length=0}while(H.length);for(;G.length;)G.pop()();J=!1,Q=!1,X.clear()}}function ee(e){if(null!==e.fragment){e.update(),h(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(U)}}const te=new Set;let ne;function oe(){ne={r:0,c:[],p:ne}}function re(){ne.r||h(ne.c),ne=ne.p}function se(e,t){e&&e.i&&(te.delete(e),e.i(t))}function ie(e,t,n,o){if(e&&e.o){if(te.has(e))return;te.add(e),ne&&ne.c.push((()=>{te.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function le(e,t){const n=t.token={};function o(e,o,r,s){if(t.token!==n)return;t.resolved=s;let i=t.ctx;void 0!==r&&(i=i.slice(),i[r]=s);const l=e&&(t.current=e)(i);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(oe(),ie(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),re())})):t.block.d(1),l.c(),se(l,1),l.m(t.mount(),t.anchor),a=!0),t.block=l,t.blocks&&(t.blocks[o]=l),a&&Z()}if((r=e)&&"object"==typeof r&&"function"==typeof r.then){const n=B();if(e.then((e=>{M(n),o(t.then,1,t.value,e),M(null)}),(e=>{if(M(n),o(t.catch,2,t.error,e),M(null),!t.hasCatch)throw e})),t.current!==t.pending)return o(t.pending,0),!0}else{if(t.current!==t.then)return o(t.then,1,t.value,e),!0;t.resolved=e}var r}function ae(e,t,n){const o=t.slice(),{resolved:r}=e;e.current===e.then&&(o[e.value]=r),e.current===e.catch&&(o[e.error]=r),e.block.p(o,n)}const ce="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function de(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function ue(e){e&&e.c()}function me(e,t,n,o){const{fragment:r,on_mount:s,on_destroy:i,after_update:l}=e.$$;r&&r.m(t,n),o||U((()=>{const t=s.map($).filter(v);i?i.push(...t):h(t),e.$$.on_mount=[]})),l.forEach(U)}function fe(e,t){const n=e.$$;null!==n.fragment&&(h(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function pe(e,t){-1===e.$$.dirty[0]&&(H.push(e),J||(J=!0,V.then(Z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function $e(e,t,n,o,r,s,i=[-1]){const l=T;M(e);const a=e.$$={fragment:null,ctx:null,props:s,update:p,not_equal:r,bound:g(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:g(),dirty:i,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const s=o.length?o[0]:n;return a.ctx&&r(a.ctx[t],a.ctx[t]=s)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](s),c&&pe(e,t)),n})):[],a.update(),c=!0,h(a.before_update),a.fragment=!!o&&o(a.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);a.fragment&&a.fragment.l(e),e.forEach(I)}else a.fragment&&a.fragment.c();t.intro&&se(e.$$.fragment),me(e,t.target,t.anchor,t.customElement),Z()}M(l)}class ge{$destroy(){fe(this,1),this.$destroy=p}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function he(e){let t,n,o,r;return{c(){t=S("svg"),n=S("polyline"),o=S("path"),O(n,"points","9 10 4 15 9 20"),O(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),O(t,"xmlns","http://www.w3.org/2000/svg"),O(t,"width",e[0]),O(t,"height",e[0]),O(t,"fill","none"),O(t,"viewBox","0 0 24 24"),O(t,"stroke","currentColor"),O(t,"stroke-width",e[1]),O(t,"stroke-linecap","round"),O(t,"stroke-linejoin","round"),O(t,"class",r="feather feather-corner-down-left "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&O(t,"width",e[0]),1&n&&O(t,"height",e[0]),2&n&&O(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-corner-down-left "+e[2])&&O(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function ve(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,r,s]}class be extends ge{constructor(e){super(),$e(this,e,ve,he,b,{size:0,strokeWidth:1,class:2})}}function ye(e){let t,n,o,r,s;return{c(){t=S("svg"),n=S("path"),o=S("line"),r=S("line"),O(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),O(o,"x1","18"),O(o,"y1","9"),O(o,"x2","12"),O(o,"y2","15"),O(r,"x1","12"),O(r,"y1","9"),O(r,"x2","18"),O(r,"y2","15"),O(t,"xmlns","http://www.w3.org/2000/svg"),O(t,"width",e[0]),O(t,"height",e[0]),O(t,"fill","none"),O(t,"viewBox","0 0 24 24"),O(t,"stroke","currentColor"),O(t,"stroke-width",e[1]),O(t,"stroke-linecap","round"),O(t,"stroke-linejoin","round"),O(t,"class",s="feather feather-delete "+e[2])},m(e,s){k(e,t,s),x(t,n),x(t,o),x(t,r)},p(e,[n]){1&n&&O(t,"width",e[0]),1&n&&O(t,"height",e[0]),2&n&&O(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-delete "+e[2])&&O(t,"class",s)},i:p,o:p,d(e){e&&I(t)}}}function we(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,r,s]}class xe extends ge{constructor(e){super(),$e(this,e,we,ye,b,{size:0,strokeWidth:1,class:2})}}function ke(e){let t,n,o,r;return{c(){t=S("svg"),n=S("path"),o=S("path"),O(n,"d","M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"),O(o,"d","M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"),O(t,"xmlns","http://www.w3.org/2000/svg"),O(t,"width",e[0]),O(t,"height",e[0]),O(t,"fill","none"),O(t,"viewBox","0 0 24 24"),O(t,"stroke","currentColor"),O(t,"stroke-width",e[1]),O(t,"stroke-linecap","round"),O(t,"stroke-linejoin","round"),O(t,"class",r="feather feather-edit "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&O(t,"width",e[0]),1&n&&O(t,"height",e[0]),2&n&&O(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-edit "+e[2])&&O(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Ie(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,r,s]}class Fe extends ge{constructor(e){super(),$e(this,e,Ie,ke,b,{size:0,strokeWidth:1,class:2})}}function _e(e){let t,n,o,r;return{c(){t=S("svg"),n=S("circle"),o=S("line"),O(n,"cx","11"),O(n,"cy","11"),O(n,"r","8"),O(o,"x1","21"),O(o,"y1","21"),O(o,"x2","16.65"),O(o,"y2","16.65"),O(t,"xmlns","http://www.w3.org/2000/svg"),O(t,"width",e[0]),O(t,"height",e[0]),O(t,"fill","none"),O(t,"viewBox","0 0 24 24"),O(t,"stroke","currentColor"),O(t,"stroke-width",e[1]),O(t,"stroke-linecap","round"),O(t,"stroke-linejoin","round"),O(t,"class",r="feather feather-search "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&O(t,"width",e[0]),1&n&&O(t,"height",e[0]),2&n&&O(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-search "+e[2])&&O(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Se(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,r,s]}class Ce extends ge{constructor(e){super(),$e(this,e,Se,_e,b,{size:0,strokeWidth:1,class:2})}}const{document:Ee}=ce;function De(e){e[19]=e[21].list,e[20]=e[21].items}function Ne(e,t,n){const o=e.slice();return o[22]=t[n],o}function Oe(e,t,n){const o=e.slice();return o[25]=t[n],o}function je(e,t,n){const o=e.slice();return o[25]=t[n],o}function ze(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Le(e){let t,n,o,r,s,i;De(e);let l=e[19]?.length&&Pe(e),a=e[20]?.length&&Te(e),c=e[19]?.length&&Ae(e);return{c(){l&&l.c(),t=E(),n=_("div"),o=_("table"),a&&a.c(),r=E(),s=_("tbody"),c&&c.c(),O(o,"striped",""),O(o,"class","svelte-1c3ufb0"),O(n,"class","eList svelte-1c3ufb0")},m(e,d){l&&l.m(e,d),k(e,t,d),k(e,n,d),x(n,o),a&&a.m(o,null),x(o,r),x(o,s),c&&c.m(s,null),i=!0},p(e,n){De(e),e[19]?.length?l?(l.p(e,n),4&n&&se(l,1)):(l=Pe(e),l.c(),se(l,1),l.m(t.parentNode,t)):l&&(oe(),ie(l,1,1,(()=>{l=null})),re()),e[20]?.length?a?a.p(e,n):(a=Te(e),a.c(),a.m(o,r)):a&&(a.d(1),a=null),e[19]?.length?c?(c.p(e,n),4&n&&se(c,1)):(c=Ae(e),c.c(),se(c,1),c.m(s,null)):c&&(oe(),ie(c,1,1,(()=>{c=null})),re())},i(e){i||(se(l),se(c),i=!0)},o(e){ie(l),ie(c),i=!1},d(e){l&&l.d(e),e&&I(t),e&&I(n),a&&a.d(),c&&c.d()}}}function Pe(e){let t,n,o;return n=new e[5]({props:{value:""}}),n.$on("input",e[10]),{c(){t=C("Suchen: "),ue(n.$$.fragment)},m(e,r){k(e,t,r),me(n,e,r),o=!0},p:p,i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n,e)}}}function Te(e){let t,n,o,r=e[0]&&Me(),s=e[20],i=[];for(let t=0;t<s.length;t+=1)i[t]=Be(je(e,s,t));return{c(){t=_("thead"),n=_("tr"),r&&r.c(),o=E();for(let e=0;e<i.length;e+=1)i[e].c();O(n,"class","svelte-1c3ufb0"),O(t,"class","svelte-1c3ufb0")},m(e,s){k(e,t,s),x(t,n),r&&r.m(n,null),x(n,o);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(e[0]?r||(r=Me(),r.c(),r.m(n,o)):r&&(r.d(1),r=null),260&t){let o;for(s=e[20],o=0;o<s.length;o+=1){const r=je(e,s,o);i[o]?i[o].p(r,t):(i[o]=Be(r),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=s.length}},d(e){e&&I(t),r&&r.d(),F(i,e)}}}function Me(e){let t;return{c(){t=_("th"),O(t,"class","svelte-1c3ufb0")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Be(e){let t,n,o=e[25]?.designation+"";return{c(){t=_("th"),n=C(o),O(t,"class","svelte-1c3ufb0")},m(e,o){k(e,t,o),x(t,n)},p(e,t){4&t&&o!==(o=e[25]?.designation+"")&&j(n,o)},d(e){e&&I(t)}}}function Ae(e){let t,n,o=e[19],r=[];for(let t=0;t<o.length;t+=1)r[t]=Re(Ne(e,o,t));const s=e=>ie(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=D()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(3023&n){let i;for(o=e[19],i=0;i<o.length;i+=1){const s=Ne(e,o,i);r[i]?(r[i].p(s,n),se(r[i],1)):(r[i]=Re(s),r[i].c(),se(r[i],1),r[i].m(t.parentNode,t))}for(oe(),i=o.length;i<r.length;i+=1)s(i);re()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ie(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function qe(e){let t,n,o,r,s,i,l=e[0]&&We(e),a=e[20],c=[];for(let t=0;t<a.length;t+=1)c[t]=He(Oe(e,a,t));return{c(){t=_("tr"),l&&l.c(),n=E();for(let e=0;e<c.length;e+=1)c[e].c();o=E(),O(t,"class","pointer svelte-1c3ufb0"),P(t,"active",e[22]._id===e[1])},m(a,d){k(a,t,d),l&&l.m(t,null),x(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);x(t,o),r=!0,s||(i=N(t,"click",(function(){v(e[7](e[22]))&&e[7](e[22]).apply(this,arguments)})),s=!0)},p(r,s){if((e=r)[0]?l?(l.p(e,s),1&s&&se(l,1)):(l=We(e),l.c(),se(l,1),l.m(t,n)):l&&(oe(),ie(l,1,1,(()=>{l=null})),re()),324&s){let n;for(a=e[20],n=0;n<a.length;n+=1){const r=Oe(e,a,n);c[n]?c[n].p(r,s):(c[n]=He(r),c[n].c(),c[n].m(t,o))}for(;n<c.length;n+=1)c[n].d(1);c.length=a.length}262&s&&P(t,"active",e[22]._id===e[1])},i(e){r||(se(l),r=!0)},o(e){ie(l),r=!1},d(e){e&&I(t),l&&l.d(),F(c,e),s=!1,i()}}}function We(e){let t,n,o,r,s;return n=new Fe({props:{size:"18"}}),{c(){t=_("td"),ue(n.$$.fragment),O(t,"id","editRow"),O(t,"class","svelte-1c3ufb0")},m(i,l){var a;k(i,t,l),me(n,t,null),o=!0,r||(s=N(t,"click",(a=function(){v(e[9](e[22]))&&e[9](e[22]).apply(this,arguments)},function(e){return e.stopPropagation(),a.call(this,e)})),r=!0)},p(t,n){e=t},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n),r=!1,s()}}}function He(e){let t,n,o=e[6](e[22],e[25])+"";return{c(){t=_("td"),n=C(o),O(t,"class","svelte-1c3ufb0")},m(e,o){k(e,t,o),x(t,n)},p(e,t){4&t&&o!==(o=e[6](e[22],e[25])+"")&&j(n,o)},d(e){e&&I(t)}}}function Re(e){let t,n,o=e[11](e[22],e[20],e[3]),r=o&&qe(e);return{c(){r&&r.c(),t=D()},m(e,o){r&&r.m(e,o),k(e,t,o),n=!0},p(e,n){12&n&&(o=e[11](e[22],e[20],e[3])),o?r?(r.p(e,n),12&n&&se(r,1)):(r=qe(e),r.c(),se(r,1),r.m(t.parentNode,t)):r&&(oe(),ie(r,1,1,(()=>{r=null})),re())},i(e){n||(se(r),n=!0)},o(e){ie(r),n=!1},d(e){r&&r.d(e),e&&I(t)}}}function Ye(e){let t,n;return t=new e[4]({}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p:p,i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Ge(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Ye,then:Le,catch:ze,value:21,blocks:[,,,]};return le(n=e[2]&&e[8](),r),{c(){t=D(),r.block.c()},m(e,n){k(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,[o]){e=t,r.ctx=e,4&o&&n!==(n=e[2]&&e[8]())&&le(n,r)||ae(r,e,o)},i(e){o||(se(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ie(r.blocks[e])}o=!1},d(e){e&&I(t),r.block.d(e),r.token=null,r=null}}}function Ve(e,o,r){const s=q(),{Loading:i,TextField:l}=c;let{className:a}=o,{rowId:u}=o,{filterForReady:m=!1}=o,{showEdit:f=!1}=o,{selectionFields:p=!1}=o,$=!0,g="";const h=(e,t)=>t&&d(e[`_${t.name}`]||e[t.name]||""),v=t.getSchemaByClass(a),b=async(e,t,n,o)=>{const{value:r,refClass:s}=o,[i,l]=n.split("."),a=await Kn(i,r);if(!a)return e;const c=a[l];return c?.length?c.map((n=>{let o=e?.find((e=>e._id===n[t]))||{};o={...o};for(const e in o)n[e]&&(o[e]=n[e]);for(const e in n)n[e]&&(o[e]=n[e]);return Jn(s+o._id.toString(),o),o})):e};A((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"})})),n.subscribe((async e=>{if(!e)return;const t=await v;e.eventId===t.id&&(Qn(t.class,e.eventId),r(2,$=!r(2,$=!1)))}));return e.$$set=e=>{"className"in e&&r(12,a=e.className),"rowId"in e&&r(1,u=e.rowId),"filterForReady"in e&&r(13,m=e.filterForReady),"showEdit"in e&&r(0,f=e.showEdit),"selectionFields"in e&&r(14,p=e.selectionFields)},[f,u,$,g,i,l,h,e=>()=>s("choose",{row:e}),async()=>{const e=await v;let t=await Gn(e.class,e.id);const n=p&&p?.find((t=>e.class===t.refClass.split(":")[0]));if(n&&n.value){const[o,s]=n.refClass.split(":");e.class===o&&(t=await b(t,o,s,n)),r(0,f=!t)}!p&&m&&(t=((e,t)=>"Information"===t.state.task?e:e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status)))(t,e));let o=[],s=e.display;return s&&s.length?s.map((n=>{const[r,s]=n.split(".");let i=e.list?.find((e=>e.name===r))?.item.find((e=>e.name===s));i&&(i={...i},i.name=`${r}_${s}`,t=t.map((e=>(e[r]&&(e[i.name]=e[r][s]),e)))),i||(i=e.items.find((e=>e.name===r))),o.find((e=>e?.name===r))||o.push(i)})):o=e.items,{list:t,items:o}},e=>t=>{s("edit",e)},({detail:{value:e}})=>{r(3,g=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(h(e,o)?.toLowerCase()?.includes(n))return!0;return!1},a,m,p]}class Je extends ge{constructor(e){var t;super(),Ee.getElementById("svelte-1c3ufb0-style")||((t=_("style")).id="svelte-1c3ufb0-style",t.textContent=".eList.svelte-1c3ufb0.svelte-1c3ufb0{min-height:12em;height:fit-content;max-height:65vh;overflow:auto}.eList.svelte-1c3ufb0 #editRow.svelte-1c3ufb0{width:1em}.eList.svelte-1c3ufb0 table.svelte-1c3ufb0{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important;margin-top:1em}.eList.svelte-1c3ufb0 table thead.svelte-1c3ufb0{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1c3ufb0 table tbody tr.svelte-1c3ufb0{height:2.3em}th.svelte-1c3ufb0.svelte-1c3ufb0,td.svelte-1c3ufb0.svelte-1c3ufb0{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-1c3ufb0.svelte-1c3ufb0:hover{background-color:#DAE1E5}tr.active.svelte-1c3ufb0.svelte-1c3ufb0{color:#326173;background-color:#fcebd5}",x(Ee.head,t)),$e(this,e,Ve,Ge,b,{className:12,rowId:1,filterForReady:13,showEdit:0,selectionFields:14})}}function Ue(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Ke(e){let t,n,o=e[21]&&Qe(e);return{c(){o&&o.c(),t=D()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){e[21]?o?(o.p(e,n),4&n&&se(o,1)):(o=Qe(e),o.c(),se(o,1),o.m(t.parentNode,t)):o&&(oe(),ie(o,1,1,(()=>{o=null})),re())},i(e){n||(se(o),n=!0)},o(e){ie(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Qe(e){let t,n;return t=new e[8]({props:{title:e[11],class:"eList "+(e[6]?"form":""),$$slots:{default:[nt]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.class="eList "+(e[6]?"form":"")),4194559&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Xe(e){let t,n;return t=new to({props:{schema:e[1],recID:e[0],readonly:e[7]}}),t.$on("choose",(function(){v(e[16](e[21]))&&e[16](e[21]).apply(this,arguments)})),t.$on("back",e[13]),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(n,o){e=n;const r={};2&o&&(r.schema=e[1]),1&o&&(r.recID=e[0]),128&o&&(r.readonly=e[7]),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Ze(e){let t,n,o,r,s,i,l,a,c;return t=new e[9]({}),r=new e[10]({props:{outline:!0,$$slots:{default:[et]},$$scope:{ctx:e}}}),r.$on("click",e[14]),i=new e[10]({props:{filled:!0,$$slots:{default:[tt]},$$scope:{ctx:e}}}),i.$on("click",e[15]),a=new Je({props:{className:e[1].class,filterForReady:e[3],selectionFields:e[4],rowId:e[0],showEdit:e[5]}}),a.$on("edit",e[17]),a.$on("choose",e[18]),{c(){ue(t.$$.fragment),n=E(),o=_("div"),ue(r.$$.fragment),s=E(),ue(i.$$.fragment),l=E(),ue(a.$$.fragment),O(o,"class","form--buttons svelte-jb5mrh")},m(e,d){me(t,e,d),k(e,n,d),k(e,o,d),me(r,o,null),x(o,s),me(i,o,null),k(e,l,d),me(a,e,d),c=!0},p(e,t){const n={};4194304&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n);const o={};4194304&t&&(o.$$scope={dirty:t,ctx:e}),i.$set(o);const s={};2&t&&(s.className=e[1].class),8&t&&(s.filterForReady=e[3]),16&t&&(s.selectionFields=e[4]),1&t&&(s.rowId=e[0]),32&t&&(s.showEdit=e[5]),a.$set(s)},i(e){c||(se(t.$$.fragment,e),se(r.$$.fragment,e),se(i.$$.fragment,e),se(a.$$.fragment,e),c=!0)},o(e){ie(t.$$.fragment,e),ie(r.$$.fragment,e),ie(i.$$.fragment,e),ie(a.$$.fragment,e),c=!1},d(e){fe(t,e),e&&I(n),e&&I(o),fe(r),fe(i),e&&I(l),fe(a,e)}}}function et(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function tt(e){let t;return{c(){t=C("Neu")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function nt(e){let t,n,o,r;const s=[Ze,Xe],i=[];function l(e,t){return e[21].length&&!e[6]?0:1}return t=l(e),n=i[t]=s[t](e),{c(){n.c(),o=D()},m(e,n){i[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?i[t].p(e,r):(oe(),ie(i[a],1,1,(()=>{i[a]=null})),re(),n=i[t],n?n.p(e,r):(n=i[t]=s[t](e),n.c()),se(n,1),n.m(o.parentNode,o))},i(e){r||(se(n),r=!0)},o(e){ie(n),r=!1},d(e){i[t].d(e),e&&I(o)}}}function ot(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function rt(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:ot,then:Ke,catch:Ue,value:21,blocks:[,,,]};return le(n=e[12](e[2]),r),{c(){t=D(),r.block.c()},m(e,n){k(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,[o]){e=t,r.ctx=e,4&o&&n!==(n=e[12](e[2]))&&le(n,r)||ae(r,e,o)},i(e){o||(se(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ie(r.blocks[e])}o=!1},d(e){e&&I(t),r.block.d(e),r.token=null,r=null}}}function st(e,t,n){const{Dialog:o,Divider:r,Button:s}=c,i=q();let{schema:l}=t,{recID:a}=t,{isOpening:d=!0}=t,{filterForReady:u=!1}=t,{selectionFields:m=!1}=t,{showEdit:f=!0}=t,p=l.identity.designation;l.class;let $,g=!1;return e.$$set=e=>{"schema"in e&&n(1,l=e.schema),"recID"in e&&n(0,a=e.recID),"isOpening"in e&&n(2,d=e.isOpening),"filterForReady"in e&&n(3,u=e.filterForReady),"selectionFields"in e&&n(4,m=e.selectionFields),"showEdit"in e&&n(5,f=e.showEdit)},[a,l,d,u,m,f,g,$,o,r,s,p,e=>e&&Gn(l.class,l.id),()=>{n(6,g=!1),a||i("back"),f||i("back")},()=>{n(6,g=!1),i("back")},()=>{n(0,a=!1),n(7,$=!1),n(6,g=!0)},e=>({detail:{row:e}})=>{let t=l.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let r=l.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(r){e[`${n}_${o}`]=e[n][o]}})),i("choose",{row:e})},({detail:e})=>{n(7,$=!!e._task.visum||"Closed"===e._task.status),n(0,a=e._docId),n(6,g=!0)},function(t){W(e,t)}]}class it extends ge{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=_("style")).id="svelte-jb5mrh-style",t.textContent=".eList .flex button.btn{width:max-content !important}.dialog.eList{max-height:90vh}.form--buttons.svelte-jb5mrh{display:flex;gap:1em;padding:0.5em 0}",x(document.head,t)),$e(this,e,st,rt,b,{schema:1,recID:0,isOpening:2,filterForReady:3,selectionFields:4,showEdit:5})}}function lt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function at(e){let t,n,r,s,i,l,a,c,d,u,m;n=new o({props:{class:"full-width",id:e[10],value:e[1],rows:"1",readonly:!0,style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"}});let f=!e[2]&&ct(e),p=!e[2]&&dt(e);function $(t){e[19](t)}let g={class:"tModal",noClickaway:!0,$$slots:{default:[ut]},$$scope:{ctx:e}};return void 0!==e[8]&&(g.open=e[8]),d=new e[9]({props:g}),R.push((()=>de(d,"open",$))),{c(){t=_("div"),ue(n.$$.fragment),r=E(),f&&f.c(),s=E(),i=_("input"),a=E(),p&&p.c(),c=E(),ue(d.$$.fragment),O(i,"class",l=w(e[4]||e[5])+" svelte-axxims"),O(i,"id",e[3]),O(i,"name",e[3]),i.value=e[0],i.hidden=!0,L(t,"position","relative")},m(e,o){k(e,t,o),me(n,t,null),x(t,r),f&&f.m(t,null),x(t,s),x(t,i),x(t,a),p&&p.m(t,null),k(e,c,o),me(d,e,o),m=!0},p(e,o){const r={};2&o&&(r.value=e[1]),n.$set(r),e[2]?f&&(oe(),ie(f,1,1,(()=>{f=null})),re()):f?(f.p(e,o),4&o&&se(f,1)):(f=ct(e),f.c(),se(f,1),f.m(t,s)),(!m||48&o&&l!==(l=w(e[4]||e[5])+" svelte-axxims"))&&O(i,"class",l),(!m||8&o)&&O(i,"id",e[3]),(!m||8&o)&&O(i,"name",e[3]),(!m||1&o&&i.value!==e[0])&&(i.value=e[0]),e[2]?p&&(oe(),ie(p,1,1,(()=>{p=null})),re()):p?(p.p(e,o),4&o&&se(p,1)):(p=dt(e),p.c(),se(p,1),p.m(t,null));const a={};16777665&o&&(a.$$scope={dirty:o,ctx:e}),!u&&256&o&&(u=!0,a.open=e[8],K((()=>u=!1))),d.$set(a)},i(e){m||(se(n.$$.fragment,e),se(f),se(p),se(d.$$.fragment,e),m=!0)},o(e){ie(n.$$.fragment,e),ie(f),ie(p),ie(d.$$.fragment,e),m=!1},d(e){e&&I(t),fe(n),f&&f.d(),p&&p.d(),e&&I(c),fe(d,e)}}}function ct(e){let t,n,o,r,s;return n=new Ce({props:{size:"18"}}),{c(){t=_("span"),ue(n.$$.fragment),O(t,"class","feather pointer svelte-axxims")},m(i,l){k(i,t,l),me(n,t,null),o=!0,r||(s=[N(t,"click",e[12]),N(t,"choose",e[13])],r=!0)},p:p,i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n),r=!1,h(s)}}}function dt(e){let t,n,o,r,s;return n=new xe({props:{size:"18"}}),{c(){t=_("span"),ue(n.$$.fragment),O(t,"class","feather2 pointer svelte-axxims")},m(i,l){k(i,t,l),me(n,t,null),o=!0,r||(s=N(t,"click",e[15]),r=!0)},p:p,i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n),r=!1,s()}}}function ut(e){let t,n;return t=new it({props:{schema:e[7],recID:e[0],isOpening:e[8],filterForReady:"true",selectionFields:e[6]}}),t.$on("choose",e[13]),t.$on("back",e[14]),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};128&n&&(o.schema=e[7]),1&n&&(o.recID=e[0]),256&n&&(o.isOpening=e[8]),64&n&&(o.selectionFields=e[6]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function mt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function ft(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:mt,then:at,catch:lt,value:23,blocks:[,,,]};return le(e[11](),o),{c(){t=D(),o.block.c()},m(e,r){k(e,t,r),o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,[n]){ae(o,e=t,n)},i(e){n||(se(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ie(o.blocks[e])}n=!1},d(e){e&&I(t),o.block.d(e),o.token=null,o=null}}}function pt(e,n,o){const r=q(),{Modal:s}=c;let{id:i}=n,{item:l}=n,{value:a=""}=n,{desc:d=""}=n,{noForm:u=!1}=n,{classId:m}=n,{eventId:p}=n,{disabled:$}=n,{readonly:g}=n,{selectionFields:h}=n;const v="comment_"+i;let b,y=!1;$||=g;const w=()=>{o(8,y=!1)};return e.$$set=e=>{"id"in e&&o(3,i=e.id),"item"in e&&o(16,l=e.item),"value"in e&&o(0,a=e.value),"desc"in e&&o(1,d=e.desc),"noForm"in e&&o(4,u=e.noForm),"classId"in e&&o(5,m=e.classId),"eventId"in e&&o(17,p=e.eventId),"disabled"in e&&o(2,$=e.disabled),"readonly"in e&&o(18,g=e.readonly),"selectionFields"in e&&o(6,h=e.selectionFields)},e.$$.update=()=>{65665&e.$$.dirty&&a&&b&&Promise.resolve(Vn(l.refClass,b.id,a)).then((e=>{var t;(t=e)&&(o(1,d=f(b,t)),r("change",{value:a,description:d}),r("task",{row:t}))}))},[a,d,$,i,u,m,h,b,y,s,v,async()=>{if(o(7,b=await t.getSchemaByClass(l.refClass)),p&&a&&!$){(await t.getSchema(p)).input?.find((e=>e===l.refClass))&&o(2,$=!0)}return!0},function(){o(8,y=!0)},({detail:e})=>{o(0,a=e.row._id),w()},w,()=>{o(0,a=o(1,d="")),r("change",{value:a,description:d}),r("task",{row:{_task:{event:b.id,_id:!1}}})},l,p,g,function(e){y=e,o(8,y)}]}class $t extends ge{constructor(e){var t;super(),document.getElementById("svelte-axxims-style")||((t=_("style")).id="svelte-axxims-style",t.textContent=".feather.svelte-axxims{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-axxims{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:disabled{padding-left:0.625em !important}",x(document.head,t)),$e(this,e,pt,ft,b,{id:3,item:16,value:0,desc:1,noForm:4,classId:5,eventId:17,disabled:2,readonly:18,selectionFields:6})}}function gt(e){let t,n,o;return n=new e[6]({props:{lang:e[7].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[5],step:e[8],pattern:e[4],placeholder:e[9],readonly:e[10],disabled:e[3]}}),n.$on("change",e[11]),n.$on("focus",e[12]),{c(){t=_("div"),ue(n.$$.fragment),L(t,"position","relative"),L(t,"max-width","10em")},m(e,r){k(e,t,r),me(n,t,null),o=!0},p(e,[t]){const o={};6&t&&(o.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),32&t&&(o.value=e[5]),16&t&&(o.pattern=e[4]),8&t&&(o.disabled=e[3]),n.$set(o)},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n)}}}function ht(e,t,n){let o;const s=q(),{TextField:i}=c;let{id:l}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t;const p=JSON.parse(r.getItem("Locale")),$=Number("1.1").toLocaleString(p.id).substring(1,2),{properties:g={}}=a;let{min:h,max:v,step:b,pattern:y,decimals:w=0,unit:x="",placeholder:k,hint:I,readonly:F}=g;y||(y=w?`[0-9]+([${$}][0-9]{1,${w}})?`:"[0-9]*");return e.$$set=e=>{"id"in e&&n(0,l=e.id),"item"in e&&n(13,a=e.item),"value"in e&&n(14,d=e.value),"noForm"in e&&n(1,u=e.noForm),"classId"in e&&n(2,m=e.classId),"disabled"in e&&n(3,f=e.disabled)},e.$$.update=()=>{16384&e.$$.dirty&&n(5,o=Number(d.toString().replace($,".")).toFixed(w).toString().replace(".",$))},[l,u,m,f,y,o,i,p,b,k,F,({detail:e})=>s("blur",{value:e.value}),({detail:e})=>{F||Number(d.toString().replace($,"."))||n(5,o="")},a,d]}class vt extends ge{constructor(e){super(),$e(this,e,ht,gt,b,{id:0,item:13,value:14,noForm:1,classId:2,disabled:3})}}function bt(e,t,n){const o=e.slice();return o[9]=t[n],o}function yt(e){let t,n,o,r=e[9]+"";return{c(){t=_("option"),n=C(r),t.__value=e[9],t.value=t.__value,t.selected=o=e[1]===e[9],O(t,"class","svelte-5xpzvo")},m(e,o){k(e,t,o),x(t,n)},p(e,n){2&n&&o!==(o=e[1]===e[9])&&(t.selected=o)},d(e){e&&I(t)}}}function wt(e){let t,n,o,r,s,i=e[4],l=[];for(let t=0;t<i.length;t+=1)l[t]=yt(bt(e,i,t));return{c(){t=_("select"),n=_("option");for(let e=0;e<l.length;e+=1)l[e].c();n.__value="",n.value=n.__value,O(n,"class","svelte-5xpzvo"),O(t,"class",o=w(e[2]||e[3])+" svelte-5xpzvo"),O(t,"id",e[0]),O(t,"name",e[0]),O(t,"readonly",e[5])},m(o,i){k(o,t,i),x(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);r||(s=N(t,"change",e[6]),r=!0)},p(e,[n]){if(18&n){let o;for(i=e[4],o=0;o<i.length;o+=1){const r=bt(e,i,o);l[o]?l[o].p(r,n):(l[o]=yt(r),l[o].c(),l[o].m(t,null))}for(;o<l.length;o+=1)l[o].d(1);l.length=i.length}12&n&&o!==(o=w(e[2]||e[3])+" svelte-5xpzvo")&&O(t,"class",o),1&n&&O(t,"id",e[0]),1&n&&O(t,"name",e[0])},i:p,o:p,d(e){e&&I(t),F(l,e),r=!1,s()}}}function xt(e,t,n){const o=q();let{id:r}=t,{item:s}=t,{value:i}=t,{noForm:l=!1}=t,{classId:a}=t;const{enum:c,readonly:d}=s.properties;return e.$$set=e=>{"id"in e&&n(0,r=e.id),"item"in e&&n(7,s=e.item),"value"in e&&n(1,i=e.value),"noForm"in e&&n(2,l=e.noForm),"classId"in e&&n(3,a=e.classId)},[r,i,l,a,c,d,e=>o("blur",{value:e.srcElement.value}),s]}class kt extends ge{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=_("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo.svelte-5xpzvo{padding:0 0.625em 0.0625em;box-sizing:border-box;width:100%;border:0 solid rgba(0, 0, 0, 0.42);border-bottom-width:0px;border-bottom-width:0.0625em;border-top-left-radius:0.375em;border-top-right-radius:0.375em;background-color:#f5f5f5;outline:none;font-size:1rem;font-weight:300;height:2.8em}select.svelte-5xpzvo.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}select[readonly].svelte-5xpzvo option.svelte-5xpzvo{display:none}",x(document.head,t)),$e(this,e,xt,wt,b,{id:0,item:7,value:1,noForm:2,classId:3})}}const It=/\d+/g,Ft=/%[HMSpPdmyY%]/g;function _t(e){let t;return{c(){t=C("Stunden")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function St(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[_t]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Ct(e){let t;return{c(){t=C("Minuten")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Et(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Ct]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Dt(e){let t;return{c(){t=C("Jetzt")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Nt(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[Dt]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Ot(e){let t,n,o,r,s,i,l,a,c;return r=new e[5]({props:{value:e[0],closeOnSelection:!0}}),r.$on("change",e[8]),i=new e[6]({props:{value:e[0],$$slots:{"now-label":[Nt],"minutes-label":[Et],"hours-label":[St]},$$scope:{ctx:e}}}),i.$on("change",e[7]),{c(){t=_("input"),o=E(),ue(r.$$.fragment),s=E(),ue(i.$$.fragment),O(t,"type","string"),O(t,"class",n=e[2]||e[3]),O(t,"id",e[1]),O(t,"name",e[1]),t.hidden=!0},m(n,d){k(n,t,d),z(t,e[0]),k(n,o,d),me(r,n,d),k(n,s,d),me(i,n,d),l=!0,a||(c=N(t,"input",e[9]),a=!0)},p(e,[o]){(!l||12&o&&n!==(n=e[2]||e[3]))&&O(t,"class",n),(!l||2&o)&&O(t,"id",e[1]),(!l||2&o)&&O(t,"name",e[1]),1&o&&z(t,e[0]);const s={};1&o&&(s.value=e[0]),r.$set(s);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),i.$set(a)},i(e){l||(se(r.$$.fragment,e),se(i.$$.fragment,e),l=!0)},o(e){ie(r.$$.fragment,e),ie(i.$$.fragment,e),l=!1},d(e){e&&I(t),e&&I(o),fe(r,e),e&&I(s),fe(i,e),a=!1,c()}}}function jt(e,t,n){const o=q(),{Label:r,DatePicker:s,TimePicker:i}=c;let{value:l}=t,{id:a}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>o("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,l=e.value),"id"in e&&n(1,a=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[l,a,d,u,r,s,i,({detail:e})=>{var t,o;n(0,(t=e.value,o=l,l=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(l)},({detail:e})=>{var t,o;n(0,(t=e.value,o=l,l=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(l)},function(){l=this.value,n(0,l)}]}class zt extends ge{constructor(e){super(),$e(this,e,jt,Ot,b,{value:0,id:1,noForm:2,classId:3})}}function Lt(e){let t,n,o;return n=new e[6]({props:{type:"string",inputClass:e[2]?"":" "+e[3],id:e[0],name:e[0],value:e[1],pattern:Pt,placeholder:Tt,readonly:e[4],disabled:e[5]}}),n.$on("change",e[7]),{c(){t=_("div"),ue(n.$$.fragment),L(t,"max-width","4em")},m(e,r){k(e,t,r),me(n,t,null),o=!0},p(e,[t]){const o={};12&t&&(o.inputClass=e[2]?"":" "+e[3]),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),2&t&&(o.value=e[1]),16&t&&(o.readonly=e[4]),32&t&&(o.disabled=e[5]),n.$set(o)},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n)}}}const Pt="([01][0-9]|2[0-3]):([0-5][0-9])",Tt="";function Mt(e,t,n){const o=q(),{TextField:r}=c;let{id:s}=t,{item:i}=t,{value:l}=t,{noForm:a=!1}=t,{classId:d}=t,{readonly:u}=t,{disabled:m}=t;const f=e=>{if(!e)return"";const[t,n]=e.split(":");return 4===t.length?`${t.substr(0,2)}:${t.substring(2,4)}`:3===t.length?t.substring(0,2)>23?`0${t.substring(0,1)}:${t.substring(1,3)}`:`${t.substring(0,2)}:${t.substring(2,3)}0`:2===t.length?t>23?`0${t.substring(0,1)}:${t.substring(1,2)}0`:`${t}:${(n||"0").padStart(2,"0")}`:`0${t}:${(n||"0").padStart(2,"0")}`};return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(8,i=e.item),"value"in e&&n(1,l=e.value),"noForm"in e&&n(2,a=e.noForm),"classId"in e&&n(3,d=e.classId),"readonly"in e&&n(4,u=e.readonly),"disabled"in e&&n(5,m=e.disabled)},[s,l,a,d,u,m,r,({detail:e})=>{o("blur",{value:f(e.value)})},i]}class Bt extends ge{constructor(e){super(),$e(this,e,Mt,Lt,b,{id:0,item:8,value:1,noForm:2,classId:3,readonly:4,disabled:5})}}function At(e){let t,n;return t=new e[9]({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],id:e[16],name:e[15],value:e[6]()}}),t.$on("change",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function qt(e){let t,n;return t=new e[9]({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],type:"email",id:e[16],name:e[15],value:e[6]()}}),t.$on("change",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Wt(e){let t,n;return t=new Bt({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],id:e[16],item:e[0],value:e[6]()}}),t.$on("blur",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Ht(e){let t,n;return t=new zt({props:{classId:e[2],id:e[16],disabled:e[4],required:e[12],value:e[17](),noForm:e[1]}}),t.$on("change",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Rt(e){let t,n;return t=new e[11]({props:{inputClass:e[1]||e[2],required:e[12],disabled:e[4],id:e[16],name:e[15],value:e[17](),closeOnSelection:!0}}),t.$on("change",e[18](!0)),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Yt(e){let t,n;return t=new e[10]({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],id:e[16],name:e[15],value:e[6]()}}),t.$on("change",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Gt(e){let t,n;return t=new kt({props:{classId:e[2],disabled:e[4],required:e[12],id:e[16],item:e[0],value:e[6](),noForm:e[1]}}),t.$on("blur",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Vt(e){let t,n;return t=new vt({props:{classId:e[2],disabled:e[4],required:e[12],readonly:e[13],id:e[16],item:e[0],value:e[6](),noForm:e[1]}}),t.$on("blur",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Jt(e){let t,n;return t=new o({props:{classId:e[2],disabled:e[4],readonly:e[13],id:e[16],name:e[0].name,value:e[6](),noForm:e[1]}}),t.$on("blur",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.name=e[0].name),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Ut(e){let t,n;return t=new $t({props:{classId:e[2],eventId:e[3],disabled:e[4],readonly:e[13],id:e[16],item:e[0],desc:e[7],value:e[6](),noForm:e[1],selectionFields:e[5]}}),t.$on("task",e[23]),t.$on("change",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),8&n&&(o.eventId=e[3]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),128&n&&(o.desc=e[7]),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),32&n&&(o.selectionFields=e[5]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Kt(e){let t,n,o,r;const s=[Ut,Jt,Vt,Gt,Yt,Rt,Ht,Wt,qt,At],i=[];function l(e,t){return"object"===e[0].type?0:"textarea"===e[0].type||e[0].properties&&"textarea"===e[0].properties.format?1:"number"===e[0].type?2:e[0].properties&&e[0].properties.enum?3:"boolean"===e[0].type?4:"date"===e[0].type?5:"datetime"===e[0].type?6:"time"===e[0].properties?.format?7:"email"===e[0].type?8:9}return t=l(e),n=i[t]=s[t](e),{c(){n.c(),o=D()},m(e,n){i[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?i[t].p(e,r):(oe(),ie(i[a],1,1,(()=>{i[a]=null})),re(),n=i[t],n?n.p(e,r):(n=i[t]=s[t](e),n.c()),se(n,1),n.m(o.parentNode,o))},i(e){r||(se(n),r=!0)},o(e){ie(n),r=!1},d(e){i[t].d(e),e&&I(o)}}}function Qt(e){let t,n;return t=new e[8]({props:{id:e[19](e[16]),class:e[14]&&"hidden",name:e[0].designation,help:e[0].properties?.hint,$$slots:{default:[Kt]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,[n]){const o={};1&n&&(o.name=e[0].designation),1&n&&(o.help=e[0].properties?.hint),268435711&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Xt(e,t,n){let o,r;const s=q(),{FormField:i,TextField:l,Switch:a,DatePicker:u,TimePicker:m}=c;let{praefix:f=""}=t,{item:p}=t,{listName:$=""}=t,{record:g}=t,{noForm:h=!1}=t,{classId:v}=t,{eventId:b}=t,{disabled:y}=t,{selectionFields:w}=t;const x=p.properties?.required,k=p.properties?.readonly,I=p.properties?.hidden;if("string"==typeof p.name){const[e,t]=p.name.split("_");t&&(p.name=t)}const F=($?$+".":"")+p.name,_=F+(""!==f?"-"+f:""),S=(e,t=F)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(21,f=e.praefix),"item"in e&&n(0,p=e.item),"listName"in e&&n(22,$=e.listName),"record"in e&&n(20,g=e.record),"noForm"in e&&n(1,h=e.noForm),"classId"in e&&n(2,v=e.classId),"eventId"in e&&n(3,b=e.eventId),"disabled"in e&&n(4,y=e.disabled),"selectionFields"in e&&n(5,w=e.selectionFields)},e.$$.update=()=>{1048576&e.$$.dirty&&n(6,o=(e=F)=>{let t=S(g);return void 0===t?"":t})},n(7,r=((e=F)=>{let t=g["_"+e];return t=d(t),void 0===t?"":t})()),[p,h,v,b,y,w,o,r,i,l,a,u,x,k,I,F,_,(e=F)=>{let t=S(g);return t?new Date(t):new Date},e=>({detail:t})=>{const o=t.value;n(20,g[F]=e?function(e,t){if(null==e)return null;let n=e.getHours();return/%p/i.test(t)&&(n%=12,0===n&&(n=12)),t.replace("%Y",e.getFullYear()).replace("%y",(e.getFullYear()%100).toString().padStart(2,"0")).replace("%m",(e.getMonth()+1).toString().padStart(2,"0")).replace("%d",e.getDate().toString().padStart(2,"0")).replace("%H",n.toString().padStart(2,"0")).replace("%M",e.getMinutes().toString().padStart(2,"0")).replace("%S",e.getSeconds().toString().padStart(2,"0")).replace("%p",e.getHours()<12?"am":"pm").replace("%P",e.getHours()<12?"AM":"PM").replace("%%","%")}(o,"%d.%m.%Y"):o,g);const r=Object.values(g).every((e=>!e))&&o;s("notify",{value:o,add:r,itemName:F,desc:t.description})},()=>"object"===p.type?"comment_"+_:_,g,f,$,function(t){W(e,t)}]}class Zt extends ge{constructor(e){var t;super(),document.getElementById("svelte-9h2mb5-style")||((t=_("style")).id="svelte-9h2mb5-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.field .switch{padding-top:0.75em}",x(document.head,t)),$e(this,e,Xt,Qt,b,{praefix:21,item:0,listName:22,record:20,noForm:1,classId:2,eventId:3,disabled:4,selectionFields:5})}}function en(e,t,n){const o=e.slice();return o[38]=t[n],o[40]=n,o}function tn(e,t,n){const o=e.slice();return o[47]=t[n],o}function nn(e,t,n){const o=e.slice();return o[42]=t[n].title,o[43]=t[n].toDelete,o[44]=t[n].icon,o}function on(e){let t,n,o;function r(t){e[23](t)}let s={item:e[15],disabled:!0};return void 0!==e[7]&&(s.value=e[7]),t=new vt({props:s}),R.push((()=>de(t,"value",r))),{c(){ue(t.$$.fragment)},m(e,n){me(t,e,n),o=!0},p(e,o){const r={};!n&&128&o[0]&&(n=!0,r.value=e[7],K((()=>n=!1))),t.$set(r)},i(e){o||(se(t.$$.fragment,e),o=!0)},o(e){ie(t.$$.fragment,e),o=!1},d(e){fe(t,e)}}}function rn(e){let t,n,o;function r(t){e[24](t)}let s={item:e[13],disabled:!0};return void 0!==e[6]&&(s.value=e[6]),t=new vt({props:s}),R.push((()=>de(t,"value",r))),{c(){ue(t.$$.fragment)},m(e,n){me(t,e,n),o=!0},p(e,o){const r={};!n&&64&o[0]&&(n=!0,r.value=e[6],K((()=>n=!1))),t.$set(r)},i(e){o||(se(t.$$.fragment,e),o=!0)},o(e){ie(t.$$.fragment,e),o=!1},d(e){fe(t,e)}}}function sn(e){let t,n;return t=new Zt({props:{praefix:e[40],item:e[47],eventId:e[2],record:e[38],noForm:$n,classId:e[1],disabled:e[3],selectionFields:e[16]}}),t.$on("notify",(function(){v(e[18](e[47],e[40]))&&e[18](e[47],e[40]).apply(this,arguments)})),t.$on("task",e[25]),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(n,o){e=n;const r={};1&o[0]&&(r.item=e[47]),4&o[0]&&(r.eventId=e[2]),16&o[0]&&(r.record=e[38]),2&o[0]&&(r.classId=e[1]),8&o[0]&&(r.disabled=e[3]),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function ln(e){let t,n,o=e[0].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=sn(tn(e,o,t));const s=e=>ie(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=E()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(327711&n[0]){let i;for(o=e[0].item,i=0;i<o.length;i+=1){const s=tn(e,o,i);r[i]?(r[i].p(s,n),se(r[i],1)):(r[i]=sn(s),r[i].c(),se(r[i],1),r[i].m(t.parentNode,t))}for(oe(),i=o.length;i<r.length;i+=1)s(i);re()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ie(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function an(e){let t,n,o=e[17](e[5],e[40])+"";return{c(){t=_("span"),n=C(o),O(t,"class","svelte-17omp3o"),P(t,"delete",e[38]._delete)},m(e,o){k(e,t,o),x(t,n)},p(e,r){32&r[0]&&o!==(o=e[17](e[5],e[40])+"")&&j(n,o),16&r[0]&&P(t,"delete",e[38]._delete)},d(e){e&&I(t)}}}function cn(e){let t,n,o;var r=e[44];return r&&(t=new r({props:{size:"20"}})),{c(){t&&ue(t.$$.fragment),n=D()},m(e,r){t&&me(t,e,r),k(e,n,r),o=!0},p(e,o){if(r!==(r=e[44])){if(t){oe();const e=t;ie(e.$$.fragment,1,0,(()=>{fe(e,1)})),re()}r?(t=new r({props:{size:"20"}}),ue(t.$$.fragment),se(t.$$.fragment,1),me(t,n.parentNode,n)):t=null}},i(e){o||(t&&se(t.$$.fragment,e),o=!0)},o(e){t&&ie(t.$$.fragment,e),o=!1},d(e){e&&I(n),t&&fe(t,e)}}}function dn(e){let t,n,o,r,s,i=!e[3]&&cn(e);return{c(){t=_("span"),i&&i.c(),O(t,"class","pointer icon svelte-17omp3o"),O(t,"title",e[42]),t.hidden=n=e[40]===e[4].length-1||!(e[38]._delete^e[43])},m(n,l){k(n,t,l),i&&i.m(t,null),o=!0,r||(s=N(t,"click",e[19](e[40])),r=!0)},p(r,s){(e=r)[3]?i&&(oe(),ie(i,1,1,(()=>{i=null})),re()):i?(i.p(e,s),8&s[0]&&se(i,1)):(i=cn(e),i.c(),se(i,1),i.m(t,null)),(!o||16&s[0]&&n!==(n=e[40]===e[4].length-1||!(e[38]._delete^e[43])))&&(t.hidden=n)},i(e){o||(se(i),o=!0)},o(e){ie(i),o=!1},d(e){e&&I(t),i&&i.d(),r=!1,s()}}}function un(e){let t,n,o,r,s;n=new e[9]({props:{$$slots:{default:[an]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[41])&&e[41].apply(this,arguments)}));let i=[{title:"löschen",toDelete:!0,icon:xe},{title:"undo",toDelete:!1,icon:be}],l=[];for(let t=0;t<2;t+=1)l[t]=dn(nn(e,i,t));const a=e=>ie(l[e],1,1,(()=>{l[e]=null}));return{c(){t=_("div"),ue(n.$$.fragment),o=E();for(let e=0;e<2;e+=1)l[e].c();r=E(),O(t,"class","accordion svelte-17omp3o"),O(t,"slot","handle")},m(e,i){k(e,t,i),me(n,t,null),x(t,o);for(let e=0;e<2;e+=1)l[e].m(t,null);x(t,r),s=!0},p(o,s){e=o;const c={};if(48&s[0]|524288&s[1]&&(c.$$scope={dirty:s,ctx:e}),n.$set(c),524312&s[0]){let n;for(i=[{title:"löschen",toDelete:!0,icon:xe},{title:"undo",toDelete:!1,icon:be}],n=0;n<2;n+=1){const o=nn(e,i,n);l[n]?(l[n].p(o,s),se(l[n],1)):(l[n]=dn(o),l[n].c(),se(l[n],1),l[n].m(t,r))}for(oe(),n=2;n<2;n+=1)a(n);re()}},i(e){if(!s){se(n.$$.fragment,e);for(let e=0;e<2;e+=1)se(l[e]);s=!0}},o(e){ie(n.$$.fragment,e),l=l.filter(Boolean);for(let e=0;e<2;e+=1)ie(l[e]);s=!1},d(e){e&&I(t),fe(n),F(l,e)}}}function mn(e){let t,n;return t=new e[11]({props:{$$slots:{handle:[un,({toggle:e})=>({41:e}),({toggle:e})=>[0,e?1024:0]],default:[ln,({toggle:e})=>({41:e}),({toggle:e})=>[0,e?1024:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){v(e[37])&&e[37].apply(this,arguments)})),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(n,o){e=n;const r={};63&o[0]|525312&o[1]&&(r.$$scope={dirty:o,ctx:e}),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function fn(e){let t,n,o=e[4],r=[];for(let t=0;t<o.length;t+=1)r[t]=mn(en(e,o,t));const s=e=>ie(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=D()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(983103&n[0]|1088&n[1]){let i;for(o=e[4],i=0;i<o.length;i+=1){const s=en(e,o,i);r[i]?(r[i].p(s,n),se(r[i],1)):(r[i]=mn(s),r[i].c(),se(r[i],1),r[i].m(t.parentNode,t))}for(oe(),i=o.length;i<r.length;i+=1)s(i);re()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ie(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function pn(e){let t,n,o,r,s,i=e[14]&&function(e){let t,n;return t=new e[8]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[on]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};128&n[0]|524288&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}(e),l=e[12]&&function(e){let t,n;return t=new e[8]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[rn]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};64&n[0]|524288&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}(e);return r=new e[10]({props:{$$slots:{default:[fn,({closeOtherPanels:e})=>({37:e}),({closeOtherPanels:e})=>[0,e?64:0]]},$$scope:{ctx:e}}}),{c(){t=_("div"),i&&i.c(),n=E(),l&&l.c(),o=E(),ue(r.$$.fragment),O(t,"class","formList")},m(e,a){k(e,t,a),i&&i.m(t,null),x(t,n),l&&l.m(t,null),x(t,o),me(r,t,null),s=!0},p(e,t){e[14]&&i.p(e,t),e[12]&&l.p(e,t);const n={};63&t[0]|524352&t[1]&&(n.$$scope={dirty:t,ctx:e}),r.$set(n)},i(e){s||(se(i),se(l),se(r.$$.fragment,e),s=!0)},o(e){ie(i),ie(l),ie(r.$$.fragment,e),s=!1},d(e){e&&I(t),i&&i.d(),l&&l.d(),fe(r)}}}const $n=!0;function gn(e,n,o){let r,s;const{FormField:i,TextField:l,Button:a,Accordion:f,AccordionSection:p}=c,$=q();let{list:g}=n,{schema:h}=n,{record:v}=n,{classId:b}=n,{eventId:y}=n,{disabled:w}=n;const x=h.find((e=>"price"===e.name&&!e.properties?.hidden)),k=x&&h.find((e=>"quantity"===e.name));let I=0;const F=h.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let _=0;const S={};let C,E,D=[];h.filter((e=>e.selection)).map((e=>D.push({refClass:e.selection,value:""})));const N=(e,t)=>{if(!t)return;const n=h.find((e=>e.name===t)),r=n.properties.value.formula,{operator:s,argument:i}=r,l=i.map((t=>C[e][t.refItem]));let a=0;"$add"===s&&(a=l.reduce(((e,t)=>e+ +t))),"$subtract"===s&&(a=l.reduce(((e,t)=>{if(!e)return 0;if(!t)return 0;const[n,o]=e.split(":");e=o?(+n+ +o/60).toFixed(2):+n;const[r,s]=t.split(":");return r?e-=s?(+r+ +s/60).toFixed(2):+r:0}))),o(4,C[e][t]=(a||0).toFixed(n.properties.decimals||0),C)};E=h.filter((e=>e.refClass)).reduce((async(e,n)=>{e=await e;const o=h.filter((e=>e.refItem===n.refClass));if(!o?.length)return e;t.getSchemaByClass(n.refClass);const r={refClass:n.refClass,items:[]};return o.forEach((e=>{r.items.push(e.name)})),e.push(r),e}),[]);const O=async(e,t,n)=>{const r=(await E).find((e=>e.refClass===t.refClass));if(!r)return;const{refClass:s,items:i}=r;return n?Promise.all(i.map((n=>{let r="";const{refInput:i}=t;if(i&&C[e]){const[t,n]=i.split(".");r=n?C[e][n]:v[t]}if(i&&!r||j(e,n)){const r=h.find((e=>e.refClass===s)),i=C[e][r.name];if(t.selection){const r=Un(t.selection+i.toString());if(r)return Promise.resolve(r).then((t=>o(4,C[e][n]=t[n],C)))}return Promise.resolve(Kn(r.refClass,i)).then((t=>o(4,C[e][n]=t[n],C)))}}))):Promise.resolve(i.map((t=>{o(4,C[e][t]="",C)})))},j=(e,t)=>{let n=C[e][t];return"number"===h.find((e=>e.name===t)).type&&(n=Number(n||0)),!n};return h.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=h.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))})),e.$$set=e=>{"list"in e&&o(0,g=e.list),"schema"in e&&o(20,h=e.schema),"record"in e&&o(21,v=e.record),"classId"in e&&o(1,b=e.classId),"eventId"in e&&o(2,y=e.eventId),"disabled"in e&&o(3,w=e.disabled)},e.$$.update=()=>{2097153&e.$$.dirty[0]&&v&&o(4,C=(v[g.name]||[]).concat({})),16&e.$$.dirty[0]&&o(5,r=C),49&e.$$.dirty[0]&&r&&((()=>{if(F)o(7,_=C?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(x)o(6,I=C?.reduce(((e,t)=>{if(t.price){const n=(k?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),$("save",{listName:g.name,value:C})),4194304&e.$$.dirty[0]&&(s=e=>S[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[g,b,y,w,C,r,I,_,i,a,f,p,x,{name:"amountValue",properties:{decimals:2}},F,{name:"hoursValue",properties:{decimals:2}},D,(e,t)=>{const n=e[t];return h.filter((e=>!e.properties?.hidden&&void 0!==n[e.name]&&"textarea"!==e.properties?.format)).map((e=>"object"===e.type?s(n[e.name]):"boolean"===e.type?m(n[e.name]):"date"===e.type?d(n[e.name]):"datetime"===e.type?u(n[e.name]):n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>({detail:n})=>{const{value:s,add:i,desc:l}=n;N(t,e._formulaActor);const a=D?.find((t=>t.refClass.split(":")[1].split(".")[0]===e.refClass));a&&(a.value=s),s&&C.length===t+1&&o(4,C=C.concat({})),l&&o(22,S[s]=l,S),O(t,e,s),o(5,r=C)},e=>()=>{o(4,C[e]._delete=!C[e]._delete,C)},h,v,S,function(e){_=e,o(7,_)},function(e){I=e,o(6,I)},function(t){W(e,t)}]}class hn extends ge{constructor(e){var t;super(),document.getElementById("svelte-17omp3o-style")||((t=_("style")).id="svelte-17omp3o-style",t.textContent=".accordion.svelte-17omp3o{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-17omp3o{padding-top:1em}span.delete.svelte-17omp3o{text-decoration:line-through}.icon.svelte-17omp3o{margin-right:-0.75em}.formList .formField_italic{font-style:italic}",x(document.head,t)),$e(this,e,gn,pn,b,{list:0,schema:20,record:21,classId:1,eventId:2,disabled:3},[-1,-1])}}function vn(e,t,n){const o=e.slice();return o[16]=t[n],o}function bn(e){let t,n;return t=new Zt({props:{classId:e[2],item:e[16],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4]}}),t.$on("notify",e[10]),t.$on("task",e[12]),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[16]),2&n&&(o.listName=e[1].name),8&n&&(o.eventId=e[3]),1&n&&(o.record=e[0]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function yn(e){let t,n,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=bn(vn(e,o,t));const s=e=>ie(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=D()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(1055&n){let i;for(o=e[1].item,i=0;i<o.length;i+=1){const s=vn(e,o,i);r[i]?(r[i].p(s,n),se(r[i],1)):(r[i]=bn(s),r[i].c(),se(r[i],1),r[i].m(t.parentNode,t))}for(oe(),i=o.length;i<r.length;i+=1)s(i);re()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ie(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function wn(e){let t,n,o=e[9](e[5])+"";return{c(){t=_("span"),n=C(o)},m(e,o){k(e,t,o),x(t,n)},p(e,t){32&t&&o!==(o=e[9](e[5])+"")&&j(n,o)},d(e){e&&I(t)}}}function xn(e){let t,n,o;return n=new e[6]({props:{$$slots:{default:[wn]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[15])&&e[15].apply(this,arguments)})),{c(){t=_("div"),ue(n.$$.fragment),O(t,"class","accordion svelte-148ktt9"),O(t,"slot","handle")},m(e,r){k(e,t,r),me(n,t,null),o=!0},p(t,o){e=t;const r={};524320&o&&(r.$$scope={dirty:o,ctx:e}),n.$set(r)},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n)}}}function kn(e){let t,n;return t=new e[8]({props:{$$slots:{handle:[xn,({toggle:e})=>({15:e}),({toggle:e})=>e?32768:0],default:[yn,({toggle:e})=>({15:e}),({toggle:e})=>e?32768:0]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};557119&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function In(e){let t,n,o;return n=new e[7]({props:{$$slots:{default:[kn]},$$scope:{ctx:e}}}),{c(){t=_("div"),ue(n.$$.fragment),O(t,"class","formList")},m(e,r){k(e,t,r),me(n,t,null),o=!0},p(e,[t]){const o={};524351&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n)}}}function Fn(e,t,n){const{Button:o,Accordion:r,AccordionSection:s}=c;let{list:i}=t,{schema:l}=t,{record:a}=t,{classId:f}=t,{eventId:p}=t,{disabled:$}=t;const g={};let h=a[i.name]||{};a[i.name]=h;const v=e=>g[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,i=e.list),"schema"in e&&n(11,l=e.schema),"record"in e&&n(0,a=e.record),"classId"in e&&n(2,f=e.classId),"eventId"in e&&n(3,p=e.eventId),"disabled"in e&&n(4,$=e.disabled)},[a,i,f,p,$,h,o,r,s,e=>l.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?v(t.name):"boolean"===t.type?m(e[t.name]):"date"===t.type?d(e[t.name]):"datetime"===t.type?u(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&(g[o]=e.desc);const r=a[t];n(0,a[t]={...r,[o]:e.value},a),n(5,h=a[t])},l,function(t){W(e,t)}]}class _n extends ge{constructor(e){var t;super(),document.getElementById("svelte-148ktt9-style")||((t=_("style")).id="svelte-148ktt9-style",t.textContent=".accordion.svelte-148ktt9{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}",x(document.head,t)),$e(this,e,Fn,In,b,{list:1,schema:11,record:0,classId:2,eventId:3,disabled:4})}}const{Boolean:Sn,document:Cn}=ce;function En(e,t,n){const o=e.slice();return o[40]=t[n],o}function Dn(e,t,n){const o=e.slice();return o[43]=t[n],o}function Nn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function On(e){let t,n,o=e[39]&&function(e){let t,n,o,r,s,i,l,a,c,d,u,m,f,p,$,g,h,v=e[0].items,b=[];for(let t=0;t<v.length;t+=1)b[t]=zn(Dn(e,v,t));const y=e=>ie(b[e],1,1,(()=>{b[e]=null}));let S=e[0].list&&Ln(e);return m=new e[5]({props:{outline:!0,$$slots:{default:[Bn]},$$scope:{ctx:e}}}),m.$on("click",e[11]),p=new e[5]({props:{disabled:e[2],form:e[6],filled:!0,type:"submit",$$slots:{default:[An]},$$scope:{ctx:e}}}),{c(){t=_("section"),n=_("form"),o=_("input"),s=E();for(let e=0;e<b.length;e+=1)b[e].c();i=E(),S&&S.c(),l=E(),a=_("div"),c=_("small"),c.textContent=`${Zn}`,d=E(),u=_("div"),ue(m.$$.fragment),f=E(),ue(p.$$.fragment),O(o,"class",w(e[6])+" svelte-rovpm0"),O(o,"name","_id"),O(o,"type","hidden"),o.value=r=e[1]._id||"",O(n,"class",w(e[7])+" svelte-rovpm0"),O(n,"id",e[6]),O(a,"class","comment svelte-rovpm0"),O(u,"class","form--buttons svelte-rovpm0"),O(t,"class",w(e[8])+" svelte-rovpm0")},m(r,v){k(r,t,v),x(t,n),x(n,o),x(n,s);for(let e=0;e<b.length;e+=1)b[e].m(n,null);var y;x(n,i),S&&S.m(n,null),x(t,l),x(t,a),x(a,c),x(t,d),x(t,u),me(m,u,null),x(u,f),me(p,u,null),$=!0,g||(h=N(n,"submit",(y=e[10],function(e){return e.preventDefault(),y.call(this,e)})),g=!0)},p(e,t){if((!$||2&t[0]&&r!==(r=e[1]._id||""))&&(o.value=r),4167&t[0]){let o;for(v=e[0].items,o=0;o<v.length;o+=1){const r=Dn(e,v,o);b[o]?(b[o].p(r,t),se(b[o],1)):(b[o]=zn(r),b[o].c(),se(b[o],1),b[o].m(n,i))}for(oe(),o=v.length;o<b.length;o+=1)y(o);re()}e[0].list?S?(S.p(e,t),1&t[0]&&se(S,1)):(S=Ln(e),S.c(),se(S,1),S.m(n,null)):S&&(oe(),ie(S,1,1,(()=>{S=null})),re());const s={};32768&t[1]&&(s.$$scope={dirty:t,ctx:e}),m.$set(s);const l={};4&t[0]&&(l.disabled=e[2]),32768&t[1]&&(l.$$scope={dirty:t,ctx:e}),p.$set(l)},i(e){if(!$){for(let e=0;e<v.length;e+=1)se(b[e]);se(S),se(m.$$.fragment,e),se(p.$$.fragment,e),$=!0}},o(e){b=b.filter(Sn);for(let e=0;e<b.length;e+=1)ie(b[e]);ie(S),ie(m.$$.fragment,e),ie(p.$$.fragment,e),$=!1},d(e){e&&I(t),F(b,e),S&&S.d(),fe(m),fe(p),g=!1,h()}}}(e);return{c(){o&&o.c(),t=D()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,t){e[39]&&o.p(e,t)},i(e){n||(se(o),n=!0)},o(e){ie(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function jn(e){let t,n;return t=new Zt({props:{classId:e[6],item:e[43],record:e[1],disabled:e[2],eventId:e[0].id}}),t.$on("task",e[12]),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[43]),2&n[0]&&(o.record=e[1]),4&n[0]&&(o.disabled=e[2]),1&n[0]&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function zn(e){let t,n,o="list"!==e[43].type&&jn(e);return{c(){o&&o.c(),t=D()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){"list"!==e[43].type?o?(o.p(e,n),1&n[0]&&se(o,1)):(o=jn(e),o.c(),se(o,1),o.m(t.parentNode,t)):o&&(oe(),ie(o,1,1,(()=>{o=null})),re())},i(e){n||(se(o),n=!0)},o(e){ie(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Ln(e){let t,n,o=e[0].list,r=[];for(let t=0;t<o.length;t+=1)r[t]=Mn(En(e,o,t));const s=e=>ie(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=D()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(8263&n[0]){let i;for(o=e[0].list,i=0;i<o.length;i+=1){const s=En(e,o,i);r[i]?(r[i].p(s,n),se(r[i],1)):(r[i]=Mn(s),r[i].c(),se(r[i],1),r[i].m(t.parentNode,t))}for(oe(),i=o.length;i<r.length;i+=1)s(i);re()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(r[e]);n=!0}},o(e){r=r.filter(Sn);for(let e=0;e<r.length;e+=1)ie(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function Pn(e){let t,n;return t=new _n({props:{classId:e[6],list:e[40],eventId:e[0].id,schema:e[40].item,record:e[1],disabled:e[2]}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[40]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[40].item),2&n[0]&&(o.record=e[1]),4&n[0]&&(o.disabled=e[2]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Tn(e){let t,n;return t=new hn({props:{classId:e[6],list:e[40],eventId:e[0].id,schema:e[40].item,record:e[1],disabled:e[2]}}),t.$on("save",e[13]),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[40]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[40].item),2&n[0]&&(o.record=e[1]),4&n[0]&&(o.disabled=e[2]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Mn(e){let t,n,o,r,s,i;t=new e[4]({props:{text:e[40].designation}});const l=[Tn,Pn],a=[];function c(e,t){return"array"===e[40].type?0:1}return o=c(e),r=a[o]=l[o](e),{c(){ue(t.$$.fragment),n=E(),r.c(),s=D()},m(e,r){me(t,e,r),k(e,n,r),a[o].m(e,r),k(e,s,r),i=!0},p(e,n){const i={};1&n[0]&&(i.text=e[40].designation),t.$set(i);let d=o;o=c(e),o===d?a[o].p(e,n):(oe(),ie(a[d],1,1,(()=>{a[d]=null})),re(),r=a[o],r?r.p(e,n):(r=a[o]=l[o](e),r.c()),se(r,1),r.m(s.parentNode,s))},i(e){i||(se(t.$$.fragment,e),se(r),i=!0)},o(e){ie(t.$$.fragment,e),ie(r),i=!1},d(e){fe(t,e),e&&I(n),a[o].d(e),e&&I(s)}}}function Bn(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function An(e){let t;return{c(){t=C("Speichern")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function qn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Wn(e){let t,n,o,r;Cn.title=t=e[3];let s={ctx:e,current:null,token:null,hasCatch:!1,pending:qn,then:On,catch:Nn,value:39,blocks:[,,,]};return le(e[9](),s),{c(){n=E(),o=D(),s.block.c()},m(e,t){k(e,n,t),k(e,o,t),s.block.m(e,s.anchor=t),s.mount=()=>o.parentNode,s.anchor=o,r=!0},p(n,o){e=n,(!r||8&o[0])&&t!==(t=e[3])&&(Cn.title=t),ae(s,e,o)},i(e){r||(se(s.block),r=!0)},o(e){for(let e=0;e<3;e+=1){ie(s.blocks[e])}r=!1},d(e){e&&I(n),e&&I(o),s.block.d(e),s.token=null,s=null}}}let Hn=new Map,Rn=new Map,Yn=new Map;const Gn=(e,n)=>{const o=n;return Hn.has(o)||Hn.set(o,t.getTasksList(n).then((({data:e})=>e))),Hn.get(o)},Vn=(e,n,o)=>Rn.get(o)||Gn(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(Rn.set(o,e),e))),Jn=(e,t)=>{Yn.set(e,t)},Un=e=>Yn.get(e),Kn=(e,n)=>Yn.get(n)||t.getTask(e,n).then((e=>(Yn.set(n,e),e))),Qn=(e,n)=>{if(!Hn.get(n))return;const o=n;Hn.set(o,t.getTasksList(n).then((({data:e})=>e)))},Xn=()=>{Hn=new Map,Rn=new Map,Yn=new Map};let Zn="";function eo(e,o,a){let d,u,m,p;y(e,i,(e=>a(24,m=e))),y(e,l,(e=>a(25,p=e)));const{Divider:$,Button:g}=c,h=JSON.parse(r.getItem("Locale")),v=q();let b,w,{schema:x}=o,{recID:k}=o,{prevEventID:I=!1}=o,{prev:F=!1}=o,{taskId:_=!1}=o,{description:S=""}=o,{root:C=!1}=o,{readonly:E}=o,D={},N={},O="form-"+x.class+Math.floor(9e3*Math.random()+1e3).toString();const j=C?"fEmbedded":"fTask",z=C?"sEmbedded":"sTask",L=()=>{for(const e of x.items)e.properties?.value?.concatenation&&P(e)},P=async e=>{const t=e.properties.value.concatenation;let n="";for(const e of t)void 0!==e.constant&&(n+=e.constant),"year"===e.variable&&(n+=(new Date).getFullYear()),e.refItemNext&&(n+=await T(e.refItemNext));a(1,D[e.name]=n,D)},T=async e=>{const[n,o]=e.offset?.split(",")||[0,0],r=+e.base||0,s=+e.step||1;e.type;const i=e.refItem,l=await t.getLastId(x.class,i);if(!l?.length)return(r+s).toString().padStart(o,"0");return((+l[0][i]?.substring(n,n+o)||r)+s).toString().padStart(o,"0")},M=(e,t)=>{const n=t.name,o=e.find((e=>e.name===n));let r=t.value;if(r&&o&&o.type.startsWith("date"))try{return function(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let r=!1;if(""===e)return null;const s=t.split(Ft);let i=0,l=0;const a=new Date(0);for(const c of s){if(!e.startsWith(c,i))return n;if(i+=c.length,i===e.length){if(l!==t.length)return n;break}if("%"!==t[l+c.length])break;if(l+=c.length+1,"%"===t[l]){if("%"!==e[i])return n;i++}else if("p"===t[l].toLowerCase()){const t=e.substr(i,2).toUpperCase();if("AM"===t)r=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;r=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{It.lastIndex=i;const s=It.exec(e);if(null==s)return n;switch(t[l]){case"H":a.setHours(parseInt(s[0])+12*r);break;case"M":a.setMinutes(s[0]);break;case"S":a.setSeconds(s[0]);break;case"d":a.setDate(s[0]);break;case"m":a.setMonth(s[0]-1);break;case"y":a.setFullYear(100*o+parseInt(s[0]));break;case"Y":a.setFullYear(s[0])}i+=s[0].length}l++}return isNaN(a.valueOf())?n:a}(r,"%d.%m.%Y").toISOString()}catch{return new Date(r).toISOString()}if(o&&"boolean"===o.type&&(r=!!t.checked),o&&"number"===o.type){const e=Number("1.1").toLocaleString(h.id).substring(1,2);try{r=Number(r.replace(e,".")).toString()}catch{}}return r},B=()=>C?window.singleSpaNavigate("/"):v("back"),W=async(e,n)=>{if(x.input?.length>1){if(x.input[0]!==e)return;if(n){const o=await t.getTaskOptions(`${e}:${n}`,x.id);a(1,D={...D,...o})}else{const e=x.input.slice(1);for(const t of e)a(1,D[t]=[],D)}}};return n.subscribe((async e=>{if(!e)return;if(!Hn.get(e.eventId))return;const n=await t.getTaskList(x.class,e.taskId);((e,t,n)=>{if(!Hn.get(e))return;const o=t;Rn.set(o,n)})(e.eventId,e.taskId,n)})),A(Xn),e.$$set=e=>{"schema"in e&&a(0,x=e.schema),"recID"in e&&a(18,k=e.recID),"prevEventID"in e&&a(16,I=e.prevEventID),"prev"in e&&a(19,F=e.prev),"taskId"in e&&a(17,_=e.taskId),"description"in e&&a(14,S=e.description),"root"in e&&a(20,C=e.root),"readonly"in e&&a(15,E=e.readonly)},e.$$.update=()=>{32768&e.$$.dirty[0]&&a(2,d=E),6291457&e.$$.dirty[0]&&w&&b&&x.items.map((({name:e,type:t})=>{const n=b.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;w[e]&&a(1,D[e]=w[e],D),w[o]&&a(1,D[o]=w[o],D)})),1064960&e.$$.dirty[0]&&a(3,u=C?S||"enablerr - Form":document.title)},[x,D,d,u,$,g,O,j,z,async()=>{if(k&&(a(1,D=await t.getTask(x.class,k)),a(14,S=f(x,D))),I){a(15,E=!1),a(21,b=await t.getSchema(I)),"string"==typeof F&&a(22,w=await t.getTask(b.class,F));const e=x.items.find((e=>e.refClass===b.class));a(1,D[e.name]=w._id,D)}const e=await t.getEvent(x.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&a(15,E=!0),m.role?.length&&x.authorization?.length){const e=x.authorization.some((e=>p?.find((t=>t===e.role&&"edit"===e.activity))));a(15,E||=!e)}return k||L(),!0},async()=>{const e={};Array.from(document.querySelectorAll("form#"+O+" ."+O)).map((t=>{if(t.name)if(t.name.includes(".")){const[n,o]=t.name.split("."),r=x.list.find((e=>e.name===n));e[t.name]=M(r.item,t)}else e[t.name]=M(x.items,t)})),x.list&&x.list.map((t=>{"array"===t.type&&N[t.name]&&(e[t.name]=N[t.name].reduce(((e,n)=>n._delete||!Object.values(n).some(Boolean)?e:e.concat(Object.entries(n).reduce(((e,[n,o])=>("_delete"!==n&&(e[n]=M(t.item,{name:n,value:o,checked:o})),e)),{}))),[]))})),e._event=x.id,e._prevEventId=I,e._taskId=_;const{id:n,task:o,error:r}=await t.saveData(x.class,e);if(r?.text){const e=r.field?" in "+r.field+": "+r.value:"";return void s.failed(`${r.text} ${e}`,3e3)}s.success("Die Daten wurden gespeichert.",2e3),e._id=n;const i=await t.getTaskList(x.class,n);v("choose",{row:i}),C&&!k?window.singleSpaNavigate(`/task/${x.id}/${o}/task`):B()},()=>I?window.history.back():B(),async({detail:{row:e}})=>{if(k)return;await(async()=>{for(const e of x.items)if(e.refItem&&D[e.refItem]){const n=await t.getTask(e.refItem,D[e.refItem]);n&&a(1,D[e.name]=n[e.name],D)}for(const e of x.list||[])if(e.refItem&&D[e.refItem]){const n=await t.getTask(e.refItem,D[e.refItem]),o=[];for(const t of n[e.name]){const n={};for(const o of e.item)t[o.name]&&(n[o.name]=t[o.name]);o.push(n)}a(1,D[e.name]=o,D)}})();const n=e._task.event,o=await t.getEvent(n),r=await t.getEvent(x.id),s=r.output?.class?.at(0)?.item.find((e=>e.name===o.output?.class[0]?.name));(r.input?.class?.at(0)?.name===o.output.class[0]?.name||s?.asInput)&&(a(21,b=await t.getSchema(n)),a(16,I=n),a(17,_=e._task._id),a(22,w=!!_&&await t.getTask(b.class,e._task.docId)),W(b.class,e?._task?.docId))},({detail:e})=>{N[e.listName]=e.value},S,E,I,_,k,F,C,b,w]}class to extends ge{constructor(e){var t;super(),Cn.getElementById("svelte-rovpm0-style")||((t=_("style")).id="svelte-rovpm0-style",t.textContent="form.disabled.svelte-rovpm0 input.svelte-rovpm0{background-color:red !important}.comment.svelte-rovpm0.svelte-rovpm0{color:green;margin-bottom:1em}form.svelte-rovpm0.svelte-rovpm0{min-width:25em}@media only screen and (min-width: 600px){form.svelte-rovpm0.svelte-rovpm0{min-width:30em}}.fEmbedded.svelte-rovpm0.svelte-rovpm0,.fTask.svelte-rovpm0.svelte-rovpm0{overflow-y:auto;overflow-x:hidden}.fEmbedded.svelte-rovpm0.svelte-rovpm0{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-rovpm0.svelte-rovpm0{height:fit-content;max-height:70vh}.sTask.svelte-rovpm0.svelte-rovpm0{height:95%;display:inline-grid}.sTask.svelte-rovpm0 .btn.svelte-rovpm0{display:initial !important}.form--buttons.svelte-rovpm0.svelte-rovpm0{display:flex;gap:1em;padding-bottom:0.5em}",x(Cn.head,t)),$e(this,e,eo,Wn,b,{schema:0,recID:18,prevEventID:16,prev:19,taskId:17,description:14,root:20,readonly:15},[-1,-1])}}function no(e){let t,n,o;function r(t){e[4](t)}let s={schema:e[5],recID:e[6]};return void 0!==e[0]&&(s.description=e[0]),t=new to({props:s}),R.push((()=>de(t,"description",r))),t.$on("back",e[2]),{c(){ue(t.$$.fragment)},m(e,n){me(t,e,n),o=!0},p(e,o){const r={};32&o&&(r.schema=e[5]),64&o&&(r.recID=e[6]),!n&&1&o&&(n=!0,r.description=e[0],K((()=>n=!1))),t.$set(r)},i(e){o||(se(t.$$.fragment,e),o=!0)},o(e){ie(t.$$.fragment,e),o=!1},d(e){fe(t,e)}}}function oo(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[no,({prop:{schema:e,recID:t,eventID:n}})=>({5:e,6:t,7:n}),({prop:e})=>(e?32:0)|(e?64:0)|(e?128:0)]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,[n]){const o={};1&n&&(o.description=e[0]),353&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function ro(e,n,o){let r,{refresh:s}=n;return e.$$set=e=>{"refresh"in e&&o(3,s=e.refresh)},[r,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},s,function(e){r=e,o(0,r)}]}function so(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var io,lo,ao=(io=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==s(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},i),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var i={component:null,domElementGetter:null,props:{}};function l(e){return Promise.resolve()}function a(e,t,n){var r=Object.keys(i),s=Object.keys(e).reduce((function(t,n){return r.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var r=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)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(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),i=r();t.instance=new e.component(o(o({},s),{},{target:i,props:Object.assign({},n,e.props)}))}))}function c(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function d(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},io(lo={exports:{}},lo.exports),lo.exports);const co=so(ao)({component:class extends ge{constructor(e){super(),$e(this,e,ro,oo,b,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:uo,mount:mo,unmount:fo}=co;e({bootstrap:uo,mount:mo,unmount:fo});e("Form",to),e("List",Je)}}}));
|
|
1
|
+
System.register(["@enablerr-ui/form","@enablerr-ui/layout"],(function(e){"use strict";var t,n,o,r,s,i,l,a,c;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.TextArea,r=e.Storage,s=e.toasts,i=e.settings,l=e.currentRoles,a=e.Page},function(e){c=e.getAttractions}],execute:function(){e("version","0.2.203");const d=e("checkDate",((e,t)=>"string"!=typeof e||e.length<20||!(t=e.split(" · "))?e:t.map((e=>2===e.split("T").length&&3===e.split("T")[0].split("-").length?new Date(e).toLocaleDateString():e)).filter((e=>!!e)).join(" · "))),u=e=>{try{return new Date(e).toLocaleString()}catch{return e}},m=e=>e?"(ja)":"(nein)",f=(e,t)=>{const n={...t};return(e.display?.reduce(((t,o)=>{let[r,s]=o.split(".");if(e.list?.find((({name:e})=>e===r))&&s&&void 0!==n[r]){const e=`${r}_${s}`;n[e]=n[r][s],r=e}return t.find((e=>e===r))||t.push(r),t}),[]).map((e=>d(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":t[e.name]))).map((e=>e?.split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function p(){}function $(e){return e()}function g(){return Object.create(null)}function h(e){e.forEach($)}function v(e){return"function"==typeof e}function b(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function y(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return p;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function w(e){return null==e?"":e}function x(e,t){e.appendChild(t)}function k(e,t,n){e.insertBefore(t,n||null)}function I(e){e.parentNode.removeChild(e)}function F(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function _(e){return document.createElement(e)}function S(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function C(e){return document.createTextNode(e)}function E(){return C(" ")}function D(){return C("")}function N(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function O(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function j(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function z(e,t){e.value=null==t?"":t}function L(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function P(e,t,n){e.classList[n?"add":"remove"](t)}let T;function M(e){T=e}function B(){if(!T)throw new Error("Function called outside component initialization");return T}function A(e){B().$$.on_mount.push(e)}function q(){const e=B();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const r=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);o.slice().forEach((t=>{t.call(e,r)}))}}}function W(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const H=[],R=[],Y=[],G=[],V=Promise.resolve();let J=!1;function U(e){Y.push(e)}function K(e){G.push(e)}let Q=!1;const X=new Set;function Z(){if(!Q){Q=!0;do{for(let e=0;e<H.length;e+=1){const t=H[e];M(t),ee(t.$$)}for(M(null),H.length=0;R.length;)R.pop()();for(let e=0;e<Y.length;e+=1){const t=Y[e];X.has(t)||(X.add(t),t())}Y.length=0}while(H.length);for(;G.length;)G.pop()();J=!1,Q=!1,X.clear()}}function ee(e){if(null!==e.fragment){e.update(),h(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(U)}}const te=new Set;let ne;function oe(){ne={r:0,c:[],p:ne}}function re(){ne.r||h(ne.c),ne=ne.p}function se(e,t){e&&e.i&&(te.delete(e),e.i(t))}function ie(e,t,n,o){if(e&&e.o){if(te.has(e))return;te.add(e),ne&&ne.c.push((()=>{te.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function le(e,t){const n=t.token={};function o(e,o,r,s){if(t.token!==n)return;t.resolved=s;let i=t.ctx;void 0!==r&&(i=i.slice(),i[r]=s);const l=e&&(t.current=e)(i);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(oe(),ie(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),re())})):t.block.d(1),l.c(),se(l,1),l.m(t.mount(),t.anchor),a=!0),t.block=l,t.blocks&&(t.blocks[o]=l),a&&Z()}if((r=e)&&"object"==typeof r&&"function"==typeof r.then){const n=B();if(e.then((e=>{M(n),o(t.then,1,t.value,e),M(null)}),(e=>{if(M(n),o(t.catch,2,t.error,e),M(null),!t.hasCatch)throw e})),t.current!==t.pending)return o(t.pending,0),!0}else{if(t.current!==t.then)return o(t.then,1,t.value,e),!0;t.resolved=e}var r}function ae(e,t,n){const o=t.slice(),{resolved:r}=e;e.current===e.then&&(o[e.value]=r),e.current===e.catch&&(o[e.error]=r),e.block.p(o,n)}const ce="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function de(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function ue(e){e&&e.c()}function me(e,t,n,o){const{fragment:r,on_mount:s,on_destroy:i,after_update:l}=e.$$;r&&r.m(t,n),o||U((()=>{const t=s.map($).filter(v);i?i.push(...t):h(t),e.$$.on_mount=[]})),l.forEach(U)}function fe(e,t){const n=e.$$;null!==n.fragment&&(h(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function pe(e,t){-1===e.$$.dirty[0]&&(H.push(e),J||(J=!0,V.then(Z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function $e(e,t,n,o,r,s,i=[-1]){const l=T;M(e);const a=e.$$={fragment:null,ctx:null,props:s,update:p,not_equal:r,bound:g(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:g(),dirty:i,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const s=o.length?o[0]:n;return a.ctx&&r(a.ctx[t],a.ctx[t]=s)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](s),c&&pe(e,t)),n})):[],a.update(),c=!0,h(a.before_update),a.fragment=!!o&&o(a.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);a.fragment&&a.fragment.l(e),e.forEach(I)}else a.fragment&&a.fragment.c();t.intro&&se(e.$$.fragment),me(e,t.target,t.anchor,t.customElement),Z()}M(l)}class ge{$destroy(){fe(this,1),this.$destroy=p}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function he(e){let t,n,o,r;return{c(){t=S("svg"),n=S("polyline"),o=S("path"),O(n,"points","9 10 4 15 9 20"),O(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),O(t,"xmlns","http://www.w3.org/2000/svg"),O(t,"width",e[0]),O(t,"height",e[0]),O(t,"fill","none"),O(t,"viewBox","0 0 24 24"),O(t,"stroke","currentColor"),O(t,"stroke-width",e[1]),O(t,"stroke-linecap","round"),O(t,"stroke-linejoin","round"),O(t,"class",r="feather feather-corner-down-left "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&O(t,"width",e[0]),1&n&&O(t,"height",e[0]),2&n&&O(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-corner-down-left "+e[2])&&O(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function ve(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,r,s]}class be extends ge{constructor(e){super(),$e(this,e,ve,he,b,{size:0,strokeWidth:1,class:2})}}function ye(e){let t,n,o,r,s;return{c(){t=S("svg"),n=S("path"),o=S("line"),r=S("line"),O(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),O(o,"x1","18"),O(o,"y1","9"),O(o,"x2","12"),O(o,"y2","15"),O(r,"x1","12"),O(r,"y1","9"),O(r,"x2","18"),O(r,"y2","15"),O(t,"xmlns","http://www.w3.org/2000/svg"),O(t,"width",e[0]),O(t,"height",e[0]),O(t,"fill","none"),O(t,"viewBox","0 0 24 24"),O(t,"stroke","currentColor"),O(t,"stroke-width",e[1]),O(t,"stroke-linecap","round"),O(t,"stroke-linejoin","round"),O(t,"class",s="feather feather-delete "+e[2])},m(e,s){k(e,t,s),x(t,n),x(t,o),x(t,r)},p(e,[n]){1&n&&O(t,"width",e[0]),1&n&&O(t,"height",e[0]),2&n&&O(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-delete "+e[2])&&O(t,"class",s)},i:p,o:p,d(e){e&&I(t)}}}function we(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,r,s]}class xe extends ge{constructor(e){super(),$e(this,e,we,ye,b,{size:0,strokeWidth:1,class:2})}}function ke(e){let t,n,o,r;return{c(){t=S("svg"),n=S("path"),o=S("path"),O(n,"d","M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"),O(o,"d","M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"),O(t,"xmlns","http://www.w3.org/2000/svg"),O(t,"width",e[0]),O(t,"height",e[0]),O(t,"fill","none"),O(t,"viewBox","0 0 24 24"),O(t,"stroke","currentColor"),O(t,"stroke-width",e[1]),O(t,"stroke-linecap","round"),O(t,"stroke-linejoin","round"),O(t,"class",r="feather feather-edit "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&O(t,"width",e[0]),1&n&&O(t,"height",e[0]),2&n&&O(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-edit "+e[2])&&O(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Ie(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,r,s]}class Fe extends ge{constructor(e){super(),$e(this,e,Ie,ke,b,{size:0,strokeWidth:1,class:2})}}function _e(e){let t,n,o,r;return{c(){t=S("svg"),n=S("circle"),o=S("line"),O(n,"cx","11"),O(n,"cy","11"),O(n,"r","8"),O(o,"x1","21"),O(o,"y1","21"),O(o,"x2","16.65"),O(o,"y2","16.65"),O(t,"xmlns","http://www.w3.org/2000/svg"),O(t,"width",e[0]),O(t,"height",e[0]),O(t,"fill","none"),O(t,"viewBox","0 0 24 24"),O(t,"stroke","currentColor"),O(t,"stroke-width",e[1]),O(t,"stroke-linecap","round"),O(t,"stroke-linejoin","round"),O(t,"class",r="feather feather-search "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&O(t,"width",e[0]),1&n&&O(t,"height",e[0]),2&n&&O(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-search "+e[2])&&O(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Se(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,r,s]}class Ce extends ge{constructor(e){super(),$e(this,e,Se,_e,b,{size:0,strokeWidth:1,class:2})}}const{document:Ee}=ce;function De(e){e[19]=e[21].list,e[20]=e[21].items}function Ne(e,t,n){const o=e.slice();return o[22]=t[n],o}function Oe(e,t,n){const o=e.slice();return o[25]=t[n],o}function je(e,t,n){const o=e.slice();return o[25]=t[n],o}function ze(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Le(e){let t,n,o,r,s,i;De(e);let l=e[19]?.length&&Pe(e),a=e[20]?.length&&Te(e),c=e[19]?.length&&Ae(e);return{c(){l&&l.c(),t=E(),n=_("div"),o=_("table"),a&&a.c(),r=E(),s=_("tbody"),c&&c.c(),O(o,"striped",""),O(o,"class","svelte-1c3ufb0"),O(n,"class","eList svelte-1c3ufb0")},m(e,d){l&&l.m(e,d),k(e,t,d),k(e,n,d),x(n,o),a&&a.m(o,null),x(o,r),x(o,s),c&&c.m(s,null),i=!0},p(e,n){De(e),e[19]?.length?l?(l.p(e,n),4&n&&se(l,1)):(l=Pe(e),l.c(),se(l,1),l.m(t.parentNode,t)):l&&(oe(),ie(l,1,1,(()=>{l=null})),re()),e[20]?.length?a?a.p(e,n):(a=Te(e),a.c(),a.m(o,r)):a&&(a.d(1),a=null),e[19]?.length?c?(c.p(e,n),4&n&&se(c,1)):(c=Ae(e),c.c(),se(c,1),c.m(s,null)):c&&(oe(),ie(c,1,1,(()=>{c=null})),re())},i(e){i||(se(l),se(c),i=!0)},o(e){ie(l),ie(c),i=!1},d(e){l&&l.d(e),e&&I(t),e&&I(n),a&&a.d(),c&&c.d()}}}function Pe(e){let t,n,o;return n=new e[5]({props:{value:""}}),n.$on("input",e[10]),{c(){t=C("Suchen: "),ue(n.$$.fragment)},m(e,r){k(e,t,r),me(n,e,r),o=!0},p:p,i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n,e)}}}function Te(e){let t,n,o,r=e[0]&&Me(),s=e[20],i=[];for(let t=0;t<s.length;t+=1)i[t]=Be(je(e,s,t));return{c(){t=_("thead"),n=_("tr"),r&&r.c(),o=E();for(let e=0;e<i.length;e+=1)i[e].c();O(n,"class","svelte-1c3ufb0"),O(t,"class","svelte-1c3ufb0")},m(e,s){k(e,t,s),x(t,n),r&&r.m(n,null),x(n,o);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(e[0]?r||(r=Me(),r.c(),r.m(n,o)):r&&(r.d(1),r=null),260&t){let o;for(s=e[20],o=0;o<s.length;o+=1){const r=je(e,s,o);i[o]?i[o].p(r,t):(i[o]=Be(r),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=s.length}},d(e){e&&I(t),r&&r.d(),F(i,e)}}}function Me(e){let t;return{c(){t=_("th"),O(t,"class","svelte-1c3ufb0")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Be(e){let t,n,o=e[25]?.designation+"";return{c(){t=_("th"),n=C(o),O(t,"class","svelte-1c3ufb0")},m(e,o){k(e,t,o),x(t,n)},p(e,t){4&t&&o!==(o=e[25]?.designation+"")&&j(n,o)},d(e){e&&I(t)}}}function Ae(e){let t,n,o=e[19],r=[];for(let t=0;t<o.length;t+=1)r[t]=Re(Ne(e,o,t));const s=e=>ie(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=D()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(3023&n){let i;for(o=e[19],i=0;i<o.length;i+=1){const s=Ne(e,o,i);r[i]?(r[i].p(s,n),se(r[i],1)):(r[i]=Re(s),r[i].c(),se(r[i],1),r[i].m(t.parentNode,t))}for(oe(),i=o.length;i<r.length;i+=1)s(i);re()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ie(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function qe(e){let t,n,o,r,s,i,l=e[0]&&We(e),a=e[20],c=[];for(let t=0;t<a.length;t+=1)c[t]=He(Oe(e,a,t));return{c(){t=_("tr"),l&&l.c(),n=E();for(let e=0;e<c.length;e+=1)c[e].c();o=E(),O(t,"class","pointer svelte-1c3ufb0"),P(t,"active",e[22]._id===e[1])},m(a,d){k(a,t,d),l&&l.m(t,null),x(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);x(t,o),r=!0,s||(i=N(t,"click",(function(){v(e[7](e[22]))&&e[7](e[22]).apply(this,arguments)})),s=!0)},p(r,s){if((e=r)[0]?l?(l.p(e,s),1&s&&se(l,1)):(l=We(e),l.c(),se(l,1),l.m(t,n)):l&&(oe(),ie(l,1,1,(()=>{l=null})),re()),324&s){let n;for(a=e[20],n=0;n<a.length;n+=1){const r=Oe(e,a,n);c[n]?c[n].p(r,s):(c[n]=He(r),c[n].c(),c[n].m(t,o))}for(;n<c.length;n+=1)c[n].d(1);c.length=a.length}262&s&&P(t,"active",e[22]._id===e[1])},i(e){r||(se(l),r=!0)},o(e){ie(l),r=!1},d(e){e&&I(t),l&&l.d(),F(c,e),s=!1,i()}}}function We(e){let t,n,o,r,s;return n=new Fe({props:{size:"18"}}),{c(){t=_("td"),ue(n.$$.fragment),O(t,"id","editRow"),O(t,"class","svelte-1c3ufb0")},m(i,l){var a;k(i,t,l),me(n,t,null),o=!0,r||(s=N(t,"click",(a=function(){v(e[9](e[22]))&&e[9](e[22]).apply(this,arguments)},function(e){return e.stopPropagation(),a.call(this,e)})),r=!0)},p(t,n){e=t},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n),r=!1,s()}}}function He(e){let t,n,o=e[6](e[22],e[25])+"";return{c(){t=_("td"),n=C(o),O(t,"class","svelte-1c3ufb0")},m(e,o){k(e,t,o),x(t,n)},p(e,t){4&t&&o!==(o=e[6](e[22],e[25])+"")&&j(n,o)},d(e){e&&I(t)}}}function Re(e){let t,n,o=e[11](e[22],e[20],e[3]),r=o&&qe(e);return{c(){r&&r.c(),t=D()},m(e,o){r&&r.m(e,o),k(e,t,o),n=!0},p(e,n){12&n&&(o=e[11](e[22],e[20],e[3])),o?r?(r.p(e,n),12&n&&se(r,1)):(r=qe(e),r.c(),se(r,1),r.m(t.parentNode,t)):r&&(oe(),ie(r,1,1,(()=>{r=null})),re())},i(e){n||(se(r),n=!0)},o(e){ie(r),n=!1},d(e){r&&r.d(e),e&&I(t)}}}function Ye(e){let t,n;return t=new e[4]({}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p:p,i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Ge(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Ye,then:Le,catch:ze,value:21,blocks:[,,,]};return le(n=e[2]&&e[8](),r),{c(){t=D(),r.block.c()},m(e,n){k(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,[o]){e=t,r.ctx=e,4&o&&n!==(n=e[2]&&e[8]())&&le(n,r)||ae(r,e,o)},i(e){o||(se(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ie(r.blocks[e])}o=!1},d(e){e&&I(t),r.block.d(e),r.token=null,r=null}}}function Ve(e,o,r){const s=q(),{Loading:i,TextField:l}=c;let{className:a}=o,{rowId:u}=o,{filterForReady:m=!1}=o,{showEdit:f=!1}=o,{selectionFields:p=!1}=o,$=!0,g="";const h=(e,t)=>t&&d(e[`_${t.name}`]||e[t.name]||""),v=t.getSchemaByClass(a),b=async(e,t,n,o)=>{const{value:r,refClass:s}=o,[i,l]=n.split("."),a=await Kn(i,r);if(!a)return e;const c=a[l];return c?.length?c.map((n=>{let o=e?.find((e=>e._id===n[t]))||{};o={...o};for(const e in o)n[e]&&(o[e]=n[e]);for(const e in n)n[e]&&(o[e]=n[e]);return Jn(s+o._id.toString(),o),o})):e};A((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"})})),n.subscribe((async e=>{if(!e)return;const t=await v;e.eventId===t.id&&(Qn(t.class,e.eventId),r(2,$=!r(2,$=!1)))}));return e.$$set=e=>{"className"in e&&r(12,a=e.className),"rowId"in e&&r(1,u=e.rowId),"filterForReady"in e&&r(13,m=e.filterForReady),"showEdit"in e&&r(0,f=e.showEdit),"selectionFields"in e&&r(14,p=e.selectionFields)},[f,u,$,g,i,l,h,e=>()=>s("choose",{row:e}),async()=>{const e=await v;let t=await Gn(e.class,e.id);const n=p&&p?.find((t=>e.class===t.refClass.split(":")[0]));if(n&&n.value){const[o,s]=n.refClass.split(":");e.class===o&&(t=await b(t,o,s,n)),r(0,f=!t)}!p&&m&&(t=((e,t)=>"Information"===t.state.task?e:e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status)))(t,e));let o=[],s=e.display;return s&&s.length?s.map((n=>{const[r,s]=n.split(".");let i=e.list?.find((e=>e.name===r))?.item.find((e=>e.name===s));i&&(i={...i},i.name=`${r}_${s}`,t=t.map((e=>(e[r]&&(e[i.name]=e[r][s]),e)))),i||(i=e.items.find((e=>e.name===r))),o.find((e=>e?.name===r))||o.push(i)})):o=e.items,{list:t,items:o}},e=>t=>{s("edit",e)},({detail:{value:e}})=>{r(3,g=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(h(e,o)?.toLowerCase()?.includes(n))return!0;return!1},a,m,p]}class Je extends ge{constructor(e){var t;super(),Ee.getElementById("svelte-1c3ufb0-style")||((t=_("style")).id="svelte-1c3ufb0-style",t.textContent=".eList.svelte-1c3ufb0.svelte-1c3ufb0{min-height:12em;height:fit-content;max-height:65vh;overflow:auto}.eList.svelte-1c3ufb0 #editRow.svelte-1c3ufb0{width:1em}.eList.svelte-1c3ufb0 table.svelte-1c3ufb0{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important;margin-top:1em}.eList.svelte-1c3ufb0 table thead.svelte-1c3ufb0{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1c3ufb0 table tbody tr.svelte-1c3ufb0{height:2.3em}th.svelte-1c3ufb0.svelte-1c3ufb0,td.svelte-1c3ufb0.svelte-1c3ufb0{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-1c3ufb0.svelte-1c3ufb0:hover{background-color:#DAE1E5}tr.active.svelte-1c3ufb0.svelte-1c3ufb0{color:#326173;background-color:#fcebd5}",x(Ee.head,t)),$e(this,e,Ve,Ge,b,{className:12,rowId:1,filterForReady:13,showEdit:0,selectionFields:14})}}function Ue(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Ke(e){let t,n,o=e[21]&&Qe(e);return{c(){o&&o.c(),t=D()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){e[21]?o?(o.p(e,n),4&n&&se(o,1)):(o=Qe(e),o.c(),se(o,1),o.m(t.parentNode,t)):o&&(oe(),ie(o,1,1,(()=>{o=null})),re())},i(e){n||(se(o),n=!0)},o(e){ie(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Qe(e){let t,n;return t=new e[8]({props:{title:e[11],class:"eList "+(e[6]?"form":""),$$slots:{default:[nt]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.class="eList "+(e[6]?"form":"")),4194559&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Xe(e){let t,n;return t=new to({props:{schema:e[1],recID:e[0],readonly:e[7]}}),t.$on("choose",(function(){v(e[16](e[21]))&&e[16](e[21]).apply(this,arguments)})),t.$on("back",e[13]),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(n,o){e=n;const r={};2&o&&(r.schema=e[1]),1&o&&(r.recID=e[0]),128&o&&(r.readonly=e[7]),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Ze(e){let t,n,o,r,s,i,l,a,c;return t=new e[9]({}),r=new e[10]({props:{outline:!0,$$slots:{default:[et]},$$scope:{ctx:e}}}),r.$on("click",e[14]),i=new e[10]({props:{filled:!0,$$slots:{default:[tt]},$$scope:{ctx:e}}}),i.$on("click",e[15]),a=new Je({props:{className:e[1].class,filterForReady:e[3],selectionFields:e[4],rowId:e[0],showEdit:e[5]}}),a.$on("edit",e[17]),a.$on("choose",e[18]),{c(){ue(t.$$.fragment),n=E(),o=_("div"),ue(r.$$.fragment),s=E(),ue(i.$$.fragment),l=E(),ue(a.$$.fragment),O(o,"class","form--buttons svelte-jb5mrh")},m(e,d){me(t,e,d),k(e,n,d),k(e,o,d),me(r,o,null),x(o,s),me(i,o,null),k(e,l,d),me(a,e,d),c=!0},p(e,t){const n={};4194304&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n);const o={};4194304&t&&(o.$$scope={dirty:t,ctx:e}),i.$set(o);const s={};2&t&&(s.className=e[1].class),8&t&&(s.filterForReady=e[3]),16&t&&(s.selectionFields=e[4]),1&t&&(s.rowId=e[0]),32&t&&(s.showEdit=e[5]),a.$set(s)},i(e){c||(se(t.$$.fragment,e),se(r.$$.fragment,e),se(i.$$.fragment,e),se(a.$$.fragment,e),c=!0)},o(e){ie(t.$$.fragment,e),ie(r.$$.fragment,e),ie(i.$$.fragment,e),ie(a.$$.fragment,e),c=!1},d(e){fe(t,e),e&&I(n),e&&I(o),fe(r),fe(i),e&&I(l),fe(a,e)}}}function et(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function tt(e){let t;return{c(){t=C("Neu")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function nt(e){let t,n,o,r;const s=[Ze,Xe],i=[];function l(e,t){return e[21].length&&!e[6]?0:1}return t=l(e),n=i[t]=s[t](e),{c(){n.c(),o=D()},m(e,n){i[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?i[t].p(e,r):(oe(),ie(i[a],1,1,(()=>{i[a]=null})),re(),n=i[t],n?n.p(e,r):(n=i[t]=s[t](e),n.c()),se(n,1),n.m(o.parentNode,o))},i(e){r||(se(n),r=!0)},o(e){ie(n),r=!1},d(e){i[t].d(e),e&&I(o)}}}function ot(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function rt(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:ot,then:Ke,catch:Ue,value:21,blocks:[,,,]};return le(n=e[12](e[2]),r),{c(){t=D(),r.block.c()},m(e,n){k(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,[o]){e=t,r.ctx=e,4&o&&n!==(n=e[12](e[2]))&&le(n,r)||ae(r,e,o)},i(e){o||(se(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ie(r.blocks[e])}o=!1},d(e){e&&I(t),r.block.d(e),r.token=null,r=null}}}function st(e,t,n){const{Dialog:o,Divider:r,Button:s}=c,i=q();let{schema:l}=t,{recID:a}=t,{isOpening:d=!0}=t,{filterForReady:u=!1}=t,{selectionFields:m=!1}=t,{showEdit:f=!0}=t,p=l.identity.designation;l.class;let $,g=!1;return e.$$set=e=>{"schema"in e&&n(1,l=e.schema),"recID"in e&&n(0,a=e.recID),"isOpening"in e&&n(2,d=e.isOpening),"filterForReady"in e&&n(3,u=e.filterForReady),"selectionFields"in e&&n(4,m=e.selectionFields),"showEdit"in e&&n(5,f=e.showEdit)},[a,l,d,u,m,f,g,$,o,r,s,p,e=>e&&Gn(l.class,l.id),()=>{n(6,g=!1),a||i("back"),f||i("back")},()=>{n(6,g=!1),i("back")},()=>{n(0,a=!1),n(7,$=!1),n(6,g=!0)},e=>({detail:{row:e}})=>{let t=l.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let r=l.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(r){e[`${n}_${o}`]=e[n][o]}})),i("choose",{row:e})},({detail:e})=>{n(7,$=!!e._task.visum||"Closed"===e._task.status),n(0,a=e._docId),n(6,g=!0)},function(t){W(e,t)}]}class it extends ge{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=_("style")).id="svelte-jb5mrh-style",t.textContent=".eList .flex button.btn{width:max-content !important}.dialog.eList{max-height:90vh}.form--buttons.svelte-jb5mrh{display:flex;gap:1em;padding:0.5em 0}",x(document.head,t)),$e(this,e,st,rt,b,{schema:1,recID:0,isOpening:2,filterForReady:3,selectionFields:4,showEdit:5})}}function lt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function at(e){let t,n,r,s,i,l,a,c,d,u,m;n=new o({props:{class:"full-width",id:e[10],value:e[1],rows:"1",readonly:!0,disabled:e[2],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"}});let f=!e[2]&&ct(e),p=!e[2]&&dt(e);function $(t){e[19](t)}let g={class:"tModal",noClickaway:!0,$$slots:{default:[ut]},$$scope:{ctx:e}};return void 0!==e[8]&&(g.open=e[8]),d=new e[9]({props:g}),R.push((()=>de(d,"open",$))),{c(){t=_("div"),ue(n.$$.fragment),r=E(),f&&f.c(),s=E(),i=_("input"),a=E(),p&&p.c(),c=E(),ue(d.$$.fragment),O(i,"class",l=w(e[4]||e[5])+" svelte-axxims"),O(i,"id",e[3]),O(i,"name",e[3]),i.value=e[0],i.hidden=!0,L(t,"position","relative")},m(e,o){k(e,t,o),me(n,t,null),x(t,r),f&&f.m(t,null),x(t,s),x(t,i),x(t,a),p&&p.m(t,null),k(e,c,o),me(d,e,o),m=!0},p(e,o){const r={};2&o&&(r.value=e[1]),4&o&&(r.disabled=e[2]),n.$set(r),e[2]?f&&(oe(),ie(f,1,1,(()=>{f=null})),re()):f?(f.p(e,o),4&o&&se(f,1)):(f=ct(e),f.c(),se(f,1),f.m(t,s)),(!m||48&o&&l!==(l=w(e[4]||e[5])+" svelte-axxims"))&&O(i,"class",l),(!m||8&o)&&O(i,"id",e[3]),(!m||8&o)&&O(i,"name",e[3]),(!m||1&o&&i.value!==e[0])&&(i.value=e[0]),e[2]?p&&(oe(),ie(p,1,1,(()=>{p=null})),re()):p?(p.p(e,o),4&o&&se(p,1)):(p=dt(e),p.c(),se(p,1),p.m(t,null));const a={};16777665&o&&(a.$$scope={dirty:o,ctx:e}),!u&&256&o&&(u=!0,a.open=e[8],K((()=>u=!1))),d.$set(a)},i(e){m||(se(n.$$.fragment,e),se(f),se(p),se(d.$$.fragment,e),m=!0)},o(e){ie(n.$$.fragment,e),ie(f),ie(p),ie(d.$$.fragment,e),m=!1},d(e){e&&I(t),fe(n),f&&f.d(),p&&p.d(),e&&I(c),fe(d,e)}}}function ct(e){let t,n,o,r,s;return n=new Ce({props:{size:"18"}}),{c(){t=_("span"),ue(n.$$.fragment),O(t,"class","feather pointer svelte-axxims")},m(i,l){k(i,t,l),me(n,t,null),o=!0,r||(s=[N(t,"click",e[12]),N(t,"choose",e[13])],r=!0)},p:p,i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n),r=!1,h(s)}}}function dt(e){let t,n,o,r,s;return n=new xe({props:{size:"18"}}),{c(){t=_("span"),ue(n.$$.fragment),O(t,"class","feather2 pointer svelte-axxims")},m(i,l){k(i,t,l),me(n,t,null),o=!0,r||(s=N(t,"click",e[15]),r=!0)},p:p,i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n),r=!1,s()}}}function ut(e){let t,n;return t=new it({props:{schema:e[7],recID:e[0],isOpening:e[8],filterForReady:"true",selectionFields:e[6]}}),t.$on("choose",e[13]),t.$on("back",e[14]),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};128&n&&(o.schema=e[7]),1&n&&(o.recID=e[0]),256&n&&(o.isOpening=e[8]),64&n&&(o.selectionFields=e[6]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function mt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function ft(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:mt,then:at,catch:lt,value:23,blocks:[,,,]};return le(e[11](),o),{c(){t=D(),o.block.c()},m(e,r){k(e,t,r),o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,[n]){ae(o,e=t,n)},i(e){n||(se(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ie(o.blocks[e])}n=!1},d(e){e&&I(t),o.block.d(e),o.token=null,o=null}}}function pt(e,n,o){const r=q(),{Modal:s}=c;let{id:i}=n,{item:l}=n,{value:a=""}=n,{desc:d=""}=n,{noForm:u=!1}=n,{classId:m}=n,{eventId:p}=n,{disabled:$}=n,{readonly:g}=n,{selectionFields:h}=n;const v="comment_"+i;let b,y=!1;$||=g;const w=()=>{o(8,y=!1)};return e.$$set=e=>{"id"in e&&o(3,i=e.id),"item"in e&&o(16,l=e.item),"value"in e&&o(0,a=e.value),"desc"in e&&o(1,d=e.desc),"noForm"in e&&o(4,u=e.noForm),"classId"in e&&o(5,m=e.classId),"eventId"in e&&o(17,p=e.eventId),"disabled"in e&&o(2,$=e.disabled),"readonly"in e&&o(18,g=e.readonly),"selectionFields"in e&&o(6,h=e.selectionFields)},e.$$.update=()=>{65665&e.$$.dirty&&a&&b&&Promise.resolve(Vn(l.refClass,b.id,a)).then((e=>{var t;(t=e)&&(o(1,d=f(b,t)),r("change",{value:a,description:d}),r("task",{row:t}))}))},[a,d,$,i,u,m,h,b,y,s,v,async()=>{if(o(7,b=await t.getSchemaByClass(l.refClass)),p&&a&&!$){(await t.getSchema(p)).input?.find((e=>e===l.refClass))&&o(2,$=!0)}return!0},function(){o(8,y=!0)},({detail:e})=>{o(0,a=e.row._id),w()},w,()=>{o(0,a=o(1,d="")),r("change",{value:a,description:d}),r("task",{row:{_task:{event:b.id,_id:!1}}})},l,p,g,function(e){y=e,o(8,y)}]}class $t extends ge{constructor(e){var t;super(),document.getElementById("svelte-axxims-style")||((t=_("style")).id="svelte-axxims-style",t.textContent=".feather.svelte-axxims{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-axxims{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:disabled{padding-left:0.625em !important}",x(document.head,t)),$e(this,e,pt,ft,b,{id:3,item:16,value:0,desc:1,noForm:4,classId:5,eventId:17,disabled:2,readonly:18,selectionFields:6})}}function gt(e){let t,n,o;return n=new e[6]({props:{lang:e[7].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[5],step:e[8],pattern:e[4],placeholder:e[9],readonly:e[10],disabled:e[3]}}),n.$on("change",e[11]),n.$on("focus",e[12]),{c(){t=_("div"),ue(n.$$.fragment),L(t,"position","relative"),L(t,"max-width","10em")},m(e,r){k(e,t,r),me(n,t,null),o=!0},p(e,[t]){const o={};6&t&&(o.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),32&t&&(o.value=e[5]),16&t&&(o.pattern=e[4]),8&t&&(o.disabled=e[3]),n.$set(o)},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n)}}}function ht(e,t,n){let o;const s=q(),{TextField:i}=c;let{id:l}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t;const p=JSON.parse(r.getItem("Locale")),$=Number("1.1").toLocaleString(p.id).substring(1,2),{properties:g={}}=a;let{min:h,max:v,step:b,pattern:y,decimals:w=0,unit:x="",placeholder:k,hint:I,readonly:F}=g;y||(y=w?`[0-9]+([${$}][0-9]{1,${w}})?`:"[0-9]*");return e.$$set=e=>{"id"in e&&n(0,l=e.id),"item"in e&&n(13,a=e.item),"value"in e&&n(14,d=e.value),"noForm"in e&&n(1,u=e.noForm),"classId"in e&&n(2,m=e.classId),"disabled"in e&&n(3,f=e.disabled)},e.$$.update=()=>{16384&e.$$.dirty&&n(5,o=Number(d.toString().replace($,".")).toFixed(w).toString().replace(".",$))},[l,u,m,f,y,o,i,p,b,k,F,({detail:e})=>s("blur",{value:e.value}),({detail:e})=>{F||Number(d.toString().replace($,"."))||n(5,o="")},a,d]}class vt extends ge{constructor(e){super(),$e(this,e,ht,gt,b,{id:0,item:13,value:14,noForm:1,classId:2,disabled:3})}}function bt(e,t,n){const o=e.slice();return o[9]=t[n],o}function yt(e){let t,n,o,r=e[9]+"";return{c(){t=_("option"),n=C(r),t.__value=e[9],t.value=t.__value,t.selected=o=e[1]===e[9],O(t,"class","svelte-5xpzvo")},m(e,o){k(e,t,o),x(t,n)},p(e,n){2&n&&o!==(o=e[1]===e[9])&&(t.selected=o)},d(e){e&&I(t)}}}function wt(e){let t,n,o,r,s,i=e[4],l=[];for(let t=0;t<i.length;t+=1)l[t]=yt(bt(e,i,t));return{c(){t=_("select"),n=_("option");for(let e=0;e<l.length;e+=1)l[e].c();n.__value="",n.value=n.__value,O(n,"class","svelte-5xpzvo"),O(t,"class",o=w(e[2]||e[3])+" svelte-5xpzvo"),O(t,"id",e[0]),O(t,"name",e[0]),O(t,"readonly",e[5])},m(o,i){k(o,t,i),x(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);r||(s=N(t,"change",e[6]),r=!0)},p(e,[n]){if(18&n){let o;for(i=e[4],o=0;o<i.length;o+=1){const r=bt(e,i,o);l[o]?l[o].p(r,n):(l[o]=yt(r),l[o].c(),l[o].m(t,null))}for(;o<l.length;o+=1)l[o].d(1);l.length=i.length}12&n&&o!==(o=w(e[2]||e[3])+" svelte-5xpzvo")&&O(t,"class",o),1&n&&O(t,"id",e[0]),1&n&&O(t,"name",e[0])},i:p,o:p,d(e){e&&I(t),F(l,e),r=!1,s()}}}function xt(e,t,n){const o=q();let{id:r}=t,{item:s}=t,{value:i}=t,{noForm:l=!1}=t,{classId:a}=t;const{enum:c,readonly:d}=s.properties;return e.$$set=e=>{"id"in e&&n(0,r=e.id),"item"in e&&n(7,s=e.item),"value"in e&&n(1,i=e.value),"noForm"in e&&n(2,l=e.noForm),"classId"in e&&n(3,a=e.classId)},[r,i,l,a,c,d,e=>o("blur",{value:e.srcElement.value}),s]}class kt extends ge{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=_("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo.svelte-5xpzvo{padding:0 0.625em 0.0625em;box-sizing:border-box;width:100%;border:0 solid rgba(0, 0, 0, 0.42);border-bottom-width:0px;border-bottom-width:0.0625em;border-top-left-radius:0.375em;border-top-right-radius:0.375em;background-color:#f5f5f5;outline:none;font-size:1rem;font-weight:300;height:2.8em}select.svelte-5xpzvo.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}select[readonly].svelte-5xpzvo option.svelte-5xpzvo{display:none}",x(document.head,t)),$e(this,e,xt,wt,b,{id:0,item:7,value:1,noForm:2,classId:3})}}const It=/\d+/g,Ft=/%[HMSpPdmyY%]/g;function _t(e){let t;return{c(){t=C("Stunden")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function St(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[_t]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Ct(e){let t;return{c(){t=C("Minuten")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Et(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Ct]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Dt(e){let t;return{c(){t=C("Jetzt")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Nt(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[Dt]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Ot(e){let t,n,o,r,s,i,l,a,c;return r=new e[5]({props:{value:e[0],closeOnSelection:!0}}),r.$on("change",e[8]),i=new e[6]({props:{value:e[0],$$slots:{"now-label":[Nt],"minutes-label":[Et],"hours-label":[St]},$$scope:{ctx:e}}}),i.$on("change",e[7]),{c(){t=_("input"),o=E(),ue(r.$$.fragment),s=E(),ue(i.$$.fragment),O(t,"type","string"),O(t,"class",n=e[2]||e[3]),O(t,"id",e[1]),O(t,"name",e[1]),t.hidden=!0},m(n,d){k(n,t,d),z(t,e[0]),k(n,o,d),me(r,n,d),k(n,s,d),me(i,n,d),l=!0,a||(c=N(t,"input",e[9]),a=!0)},p(e,[o]){(!l||12&o&&n!==(n=e[2]||e[3]))&&O(t,"class",n),(!l||2&o)&&O(t,"id",e[1]),(!l||2&o)&&O(t,"name",e[1]),1&o&&z(t,e[0]);const s={};1&o&&(s.value=e[0]),r.$set(s);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),i.$set(a)},i(e){l||(se(r.$$.fragment,e),se(i.$$.fragment,e),l=!0)},o(e){ie(r.$$.fragment,e),ie(i.$$.fragment,e),l=!1},d(e){e&&I(t),e&&I(o),fe(r,e),e&&I(s),fe(i,e),a=!1,c()}}}function jt(e,t,n){const o=q(),{Label:r,DatePicker:s,TimePicker:i}=c;let{value:l}=t,{id:a}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>o("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,l=e.value),"id"in e&&n(1,a=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[l,a,d,u,r,s,i,({detail:e})=>{var t,o;n(0,(t=e.value,o=l,l=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(l)},({detail:e})=>{var t,o;n(0,(t=e.value,o=l,l=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(l)},function(){l=this.value,n(0,l)}]}class zt extends ge{constructor(e){super(),$e(this,e,jt,Ot,b,{value:0,id:1,noForm:2,classId:3})}}function Lt(e){let t,n,o;return n=new e[6]({props:{type:"string",inputClass:e[2]?"":" "+e[3],id:e[0],name:e[0],value:e[1],pattern:Pt,placeholder:Tt,readonly:e[4],disabled:e[5]}}),n.$on("change",e[7]),{c(){t=_("div"),ue(n.$$.fragment),L(t,"max-width","4em")},m(e,r){k(e,t,r),me(n,t,null),o=!0},p(e,[t]){const o={};12&t&&(o.inputClass=e[2]?"":" "+e[3]),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),2&t&&(o.value=e[1]),16&t&&(o.readonly=e[4]),32&t&&(o.disabled=e[5]),n.$set(o)},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n)}}}const Pt="([01][0-9]|2[0-3]):([0-5][0-9])",Tt="";function Mt(e,t,n){const o=q(),{TextField:r}=c;let{id:s}=t,{item:i}=t,{value:l}=t,{noForm:a=!1}=t,{classId:d}=t,{readonly:u}=t,{disabled:m}=t;const f=e=>{if(!e)return"";const[t,n]=e.split(":");return 4===t.length?`${t.substr(0,2)}:${t.substring(2,4)}`:3===t.length?t.substring(0,2)>23?`0${t.substring(0,1)}:${t.substring(1,3)}`:`${t.substring(0,2)}:${t.substring(2,3)}0`:2===t.length?t>23?`0${t.substring(0,1)}:${t.substring(1,2)}0`:`${t}:${(n||"0").padStart(2,"0")}`:`0${t}:${(n||"0").padStart(2,"0")}`};return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(8,i=e.item),"value"in e&&n(1,l=e.value),"noForm"in e&&n(2,a=e.noForm),"classId"in e&&n(3,d=e.classId),"readonly"in e&&n(4,u=e.readonly),"disabled"in e&&n(5,m=e.disabled)},[s,l,a,d,u,m,r,({detail:e})=>{o("blur",{value:f(e.value)})},i]}class Bt extends ge{constructor(e){super(),$e(this,e,Mt,Lt,b,{id:0,item:8,value:1,noForm:2,classId:3,readonly:4,disabled:5})}}function At(e){let t,n;return t=new e[9]({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],id:e[16],name:e[15],value:e[6]()}}),t.$on("change",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function qt(e){let t,n;return t=new e[9]({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],type:"email",id:e[16],name:e[15],value:e[6]()}}),t.$on("change",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Wt(e){let t,n;return t=new Bt({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],id:e[16],item:e[0],value:e[6]()}}),t.$on("blur",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Ht(e){let t,n;return t=new zt({props:{classId:e[2],id:e[16],disabled:e[4],required:e[12],value:e[17](),noForm:e[1]}}),t.$on("change",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Rt(e){let t,n;return t=new e[11]({props:{inputClass:e[1]||e[2],required:e[12],disabled:e[4],id:e[16],name:e[15],value:e[17](),closeOnSelection:!0}}),t.$on("change",e[18](!0)),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Yt(e){let t,n;return t=new e[10]({props:{inputClass:e[1]||e[2],disabled:e[4],readonly:e[13],required:e[12],id:e[16],name:e[15],value:e[6]()}}),t.$on("change",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),64&n&&(o.value=e[6]()),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Gt(e){let t,n;return t=new kt({props:{classId:e[2],disabled:e[4],required:e[12],id:e[16],item:e[0],value:e[6](),noForm:e[1]}}),t.$on("blur",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Vt(e){let t,n;return t=new vt({props:{classId:e[2],disabled:e[4],required:e[12],readonly:e[13],id:e[16],item:e[0],value:e[6](),noForm:e[1]}}),t.$on("blur",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Jt(e){let t,n;return t=new o({props:{classId:e[2],disabled:e[4],readonly:e[13],id:e[16],name:e[0].name,value:e[6](),noForm:e[1]}}),t.$on("blur",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.name=e[0].name),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Ut(e){let t,n;return t=new $t({props:{classId:e[2],eventId:e[3],disabled:e[4],readonly:e[13],id:e[16],item:e[0],desc:e[7],value:e[6](),noForm:e[1],selectionFields:e[5]}}),t.$on("task",e[23]),t.$on("change",e[18]()),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),8&n&&(o.eventId=e[3]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),128&n&&(o.desc=e[7]),64&n&&(o.value=e[6]()),2&n&&(o.noForm=e[1]),32&n&&(o.selectionFields=e[5]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Kt(e){let t,n,o,r;const s=[Ut,Jt,Vt,Gt,Yt,Rt,Ht,Wt,qt,At],i=[];function l(e,t){return"object"===e[0].type?0:"textarea"===e[0].type||e[0].properties&&"textarea"===e[0].properties.format?1:"number"===e[0].type?2:e[0].properties&&e[0].properties.enum?3:"boolean"===e[0].type?4:"date"===e[0].type?5:"datetime"===e[0].type?6:"time"===e[0].properties?.format?7:"email"===e[0].type?8:9}return t=l(e),n=i[t]=s[t](e),{c(){n.c(),o=D()},m(e,n){i[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?i[t].p(e,r):(oe(),ie(i[a],1,1,(()=>{i[a]=null})),re(),n=i[t],n?n.p(e,r):(n=i[t]=s[t](e),n.c()),se(n,1),n.m(o.parentNode,o))},i(e){r||(se(n),r=!0)},o(e){ie(n),r=!1},d(e){i[t].d(e),e&&I(o)}}}function Qt(e){let t,n;return t=new e[8]({props:{id:e[19](e[16]),class:e[14]&&"hidden",name:e[0].designation,help:e[0].properties?.hint,$$slots:{default:[Kt]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,[n]){const o={};1&n&&(o.name=e[0].designation),1&n&&(o.help=e[0].properties?.hint),268435711&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Xt(e,t,n){let o,r;const s=q(),{FormField:i,TextField:l,Switch:a,DatePicker:u,TimePicker:m}=c;let{praefix:f=""}=t,{item:p}=t,{listName:$=""}=t,{record:g}=t,{noForm:h=!1}=t,{classId:v}=t,{eventId:b}=t,{disabled:y}=t,{selectionFields:w}=t;const x=p.properties?.required,k=p.properties?.readonly,I=p.properties?.hidden;if("string"==typeof p.name){const[e,t]=p.name.split("_");t&&(p.name=t)}const F=($?$+".":"")+p.name,_=F+(""!==f?"-"+f:""),S=(e,t=F)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(21,f=e.praefix),"item"in e&&n(0,p=e.item),"listName"in e&&n(22,$=e.listName),"record"in e&&n(20,g=e.record),"noForm"in e&&n(1,h=e.noForm),"classId"in e&&n(2,v=e.classId),"eventId"in e&&n(3,b=e.eventId),"disabled"in e&&n(4,y=e.disabled),"selectionFields"in e&&n(5,w=e.selectionFields)},e.$$.update=()=>{1048576&e.$$.dirty&&n(6,o=(e=F)=>{let t=S(g);return void 0===t?"":t})},n(7,r=((e=F)=>{let t=g["_"+e];return t=d(t),void 0===t?"":t})()),[p,h,v,b,y,w,o,r,i,l,a,u,x,k,I,F,_,(e=F)=>{let t=S(g);return t?new Date(t):new Date},e=>({detail:t})=>{const o=t.value;n(20,g[F]=e?function(e,t){if(null==e)return null;let n=e.getHours();return/%p/i.test(t)&&(n%=12,0===n&&(n=12)),t.replace("%Y",e.getFullYear()).replace("%y",(e.getFullYear()%100).toString().padStart(2,"0")).replace("%m",(e.getMonth()+1).toString().padStart(2,"0")).replace("%d",e.getDate().toString().padStart(2,"0")).replace("%H",n.toString().padStart(2,"0")).replace("%M",e.getMinutes().toString().padStart(2,"0")).replace("%S",e.getSeconds().toString().padStart(2,"0")).replace("%p",e.getHours()<12?"am":"pm").replace("%P",e.getHours()<12?"AM":"PM").replace("%%","%")}(o,"%d.%m.%Y"):o,g);const r=Object.values(g).every((e=>!e))&&o;s("notify",{value:o,add:r,itemName:F,desc:t.description})},()=>"object"===p.type?"comment_"+_:_,g,f,$,function(t){W(e,t)}]}class Zt extends ge{constructor(e){var t;super(),document.getElementById("svelte-9h2mb5-style")||((t=_("style")).id="svelte-9h2mb5-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.field .switch{padding-top:0.75em}",x(document.head,t)),$e(this,e,Xt,Qt,b,{praefix:21,item:0,listName:22,record:20,noForm:1,classId:2,eventId:3,disabled:4,selectionFields:5})}}function en(e,t,n){const o=e.slice();return o[38]=t[n],o[40]=n,o}function tn(e,t,n){const o=e.slice();return o[47]=t[n],o}function nn(e,t,n){const o=e.slice();return o[42]=t[n].title,o[43]=t[n].toDelete,o[44]=t[n].icon,o}function on(e){let t,n,o;function r(t){e[23](t)}let s={item:e[15],disabled:!0};return void 0!==e[7]&&(s.value=e[7]),t=new vt({props:s}),R.push((()=>de(t,"value",r))),{c(){ue(t.$$.fragment)},m(e,n){me(t,e,n),o=!0},p(e,o){const r={};!n&&128&o[0]&&(n=!0,r.value=e[7],K((()=>n=!1))),t.$set(r)},i(e){o||(se(t.$$.fragment,e),o=!0)},o(e){ie(t.$$.fragment,e),o=!1},d(e){fe(t,e)}}}function rn(e){let t,n,o;function r(t){e[24](t)}let s={item:e[13],disabled:!0};return void 0!==e[6]&&(s.value=e[6]),t=new vt({props:s}),R.push((()=>de(t,"value",r))),{c(){ue(t.$$.fragment)},m(e,n){me(t,e,n),o=!0},p(e,o){const r={};!n&&64&o[0]&&(n=!0,r.value=e[6],K((()=>n=!1))),t.$set(r)},i(e){o||(se(t.$$.fragment,e),o=!0)},o(e){ie(t.$$.fragment,e),o=!1},d(e){fe(t,e)}}}function sn(e){let t,n;return t=new Zt({props:{praefix:e[40],item:e[47],eventId:e[2],record:e[38],noForm:$n,classId:e[1],disabled:e[3],selectionFields:e[16]}}),t.$on("notify",(function(){v(e[18](e[47],e[40]))&&e[18](e[47],e[40]).apply(this,arguments)})),t.$on("task",e[25]),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(n,o){e=n;const r={};1&o[0]&&(r.item=e[47]),4&o[0]&&(r.eventId=e[2]),16&o[0]&&(r.record=e[38]),2&o[0]&&(r.classId=e[1]),8&o[0]&&(r.disabled=e[3]),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function ln(e){let t,n,o=e[0].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=sn(tn(e,o,t));const s=e=>ie(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=E()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(327711&n[0]){let i;for(o=e[0].item,i=0;i<o.length;i+=1){const s=tn(e,o,i);r[i]?(r[i].p(s,n),se(r[i],1)):(r[i]=sn(s),r[i].c(),se(r[i],1),r[i].m(t.parentNode,t))}for(oe(),i=o.length;i<r.length;i+=1)s(i);re()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ie(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function an(e){let t,n,o=e[17](e[5],e[40])+"";return{c(){t=_("span"),n=C(o),O(t,"class","svelte-17omp3o"),P(t,"delete",e[38]._delete)},m(e,o){k(e,t,o),x(t,n)},p(e,r){32&r[0]&&o!==(o=e[17](e[5],e[40])+"")&&j(n,o),16&r[0]&&P(t,"delete",e[38]._delete)},d(e){e&&I(t)}}}function cn(e){let t,n,o;var r=e[44];return r&&(t=new r({props:{size:"20"}})),{c(){t&&ue(t.$$.fragment),n=D()},m(e,r){t&&me(t,e,r),k(e,n,r),o=!0},p(e,o){if(r!==(r=e[44])){if(t){oe();const e=t;ie(e.$$.fragment,1,0,(()=>{fe(e,1)})),re()}r?(t=new r({props:{size:"20"}}),ue(t.$$.fragment),se(t.$$.fragment,1),me(t,n.parentNode,n)):t=null}},i(e){o||(t&&se(t.$$.fragment,e),o=!0)},o(e){t&&ie(t.$$.fragment,e),o=!1},d(e){e&&I(n),t&&fe(t,e)}}}function dn(e){let t,n,o,r,s,i=!e[3]&&cn(e);return{c(){t=_("span"),i&&i.c(),O(t,"class","pointer icon svelte-17omp3o"),O(t,"title",e[42]),t.hidden=n=e[40]===e[4].length-1||!(e[38]._delete^e[43])},m(n,l){k(n,t,l),i&&i.m(t,null),o=!0,r||(s=N(t,"click",e[19](e[40])),r=!0)},p(r,s){(e=r)[3]?i&&(oe(),ie(i,1,1,(()=>{i=null})),re()):i?(i.p(e,s),8&s[0]&&se(i,1)):(i=cn(e),i.c(),se(i,1),i.m(t,null)),(!o||16&s[0]&&n!==(n=e[40]===e[4].length-1||!(e[38]._delete^e[43])))&&(t.hidden=n)},i(e){o||(se(i),o=!0)},o(e){ie(i),o=!1},d(e){e&&I(t),i&&i.d(),r=!1,s()}}}function un(e){let t,n,o,r,s;n=new e[9]({props:{$$slots:{default:[an]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[41])&&e[41].apply(this,arguments)}));let i=[{title:"löschen",toDelete:!0,icon:xe},{title:"undo",toDelete:!1,icon:be}],l=[];for(let t=0;t<2;t+=1)l[t]=dn(nn(e,i,t));const a=e=>ie(l[e],1,1,(()=>{l[e]=null}));return{c(){t=_("div"),ue(n.$$.fragment),o=E();for(let e=0;e<2;e+=1)l[e].c();r=E(),O(t,"class","accordion svelte-17omp3o"),O(t,"slot","handle")},m(e,i){k(e,t,i),me(n,t,null),x(t,o);for(let e=0;e<2;e+=1)l[e].m(t,null);x(t,r),s=!0},p(o,s){e=o;const c={};if(48&s[0]|524288&s[1]&&(c.$$scope={dirty:s,ctx:e}),n.$set(c),524312&s[0]){let n;for(i=[{title:"löschen",toDelete:!0,icon:xe},{title:"undo",toDelete:!1,icon:be}],n=0;n<2;n+=1){const o=nn(e,i,n);l[n]?(l[n].p(o,s),se(l[n],1)):(l[n]=dn(o),l[n].c(),se(l[n],1),l[n].m(t,r))}for(oe(),n=2;n<2;n+=1)a(n);re()}},i(e){if(!s){se(n.$$.fragment,e);for(let e=0;e<2;e+=1)se(l[e]);s=!0}},o(e){ie(n.$$.fragment,e),l=l.filter(Boolean);for(let e=0;e<2;e+=1)ie(l[e]);s=!1},d(e){e&&I(t),fe(n),F(l,e)}}}function mn(e){let t,n;return t=new e[11]({props:{$$slots:{handle:[un,({toggle:e})=>({41:e}),({toggle:e})=>[0,e?1024:0]],default:[ln,({toggle:e})=>({41:e}),({toggle:e})=>[0,e?1024:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){v(e[37])&&e[37].apply(this,arguments)})),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(n,o){e=n;const r={};63&o[0]|525312&o[1]&&(r.$$scope={dirty:o,ctx:e}),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function fn(e){let t,n,o=e[4],r=[];for(let t=0;t<o.length;t+=1)r[t]=mn(en(e,o,t));const s=e=>ie(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=D()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(983103&n[0]|1088&n[1]){let i;for(o=e[4],i=0;i<o.length;i+=1){const s=en(e,o,i);r[i]?(r[i].p(s,n),se(r[i],1)):(r[i]=mn(s),r[i].c(),se(r[i],1),r[i].m(t.parentNode,t))}for(oe(),i=o.length;i<r.length;i+=1)s(i);re()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ie(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function pn(e){let t,n,o,r,s,i=e[14]&&function(e){let t,n;return t=new e[8]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[on]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};128&n[0]|524288&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}(e),l=e[12]&&function(e){let t,n;return t=new e[8]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[rn]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};64&n[0]|524288&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}(e);return r=new e[10]({props:{$$slots:{default:[fn,({closeOtherPanels:e})=>({37:e}),({closeOtherPanels:e})=>[0,e?64:0]]},$$scope:{ctx:e}}}),{c(){t=_("div"),i&&i.c(),n=E(),l&&l.c(),o=E(),ue(r.$$.fragment),O(t,"class","formList")},m(e,a){k(e,t,a),i&&i.m(t,null),x(t,n),l&&l.m(t,null),x(t,o),me(r,t,null),s=!0},p(e,t){e[14]&&i.p(e,t),e[12]&&l.p(e,t);const n={};63&t[0]|524352&t[1]&&(n.$$scope={dirty:t,ctx:e}),r.$set(n)},i(e){s||(se(i),se(l),se(r.$$.fragment,e),s=!0)},o(e){ie(i),ie(l),ie(r.$$.fragment,e),s=!1},d(e){e&&I(t),i&&i.d(),l&&l.d(),fe(r)}}}const $n=!0;function gn(e,n,o){let r,s;const{FormField:i,TextField:l,Button:a,Accordion:f,AccordionSection:p}=c,$=q();let{list:g}=n,{schema:h}=n,{record:v}=n,{classId:b}=n,{eventId:y}=n,{disabled:w}=n;const x=h.find((e=>"price"===e.name&&!e.properties?.hidden)),k=x&&h.find((e=>"quantity"===e.name));let I=0;const F=h.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let _=0;const S={};let C,E,D=[];h.filter((e=>e.selection)).map((e=>D.push({refClass:e.selection,value:""})));const N=(e,t)=>{if(!t)return;const n=h.find((e=>e.name===t)),r=n.properties.value.formula,{operator:s,argument:i}=r,l=i.map((t=>C[e][t.refItem]));let a=0;"$add"===s&&(a=l.reduce(((e,t)=>e+ +t))),"$subtract"===s&&(a=l.reduce(((e,t)=>{if(!e)return 0;if(!t)return 0;const[n,o]=e.split(":");e=o?(+n+ +o/60).toFixed(2):+n;const[r,s]=t.split(":");return r?e-=s?(+r+ +s/60).toFixed(2):+r:0}))),o(4,C[e][t]=(a||0).toFixed(n.properties.decimals||0),C)};E=h.filter((e=>e.refClass)).reduce((async(e,n)=>{e=await e;const o=h.filter((e=>e.refItem===n.refClass));if(!o?.length)return e;t.getSchemaByClass(n.refClass);const r={refClass:n.refClass,items:[]};return o.forEach((e=>{r.items.push(e.name)})),e.push(r),e}),[]);const O=async(e,t,n)=>{const r=(await E).find((e=>e.refClass===t.refClass));if(!r)return;const{refClass:s,items:i}=r;return n?Promise.all(i.map((n=>{let r="";const{refInput:i}=t;if(i&&C[e]){const[t,n]=i.split(".");r=n?C[e][n]:v[t]}if(i&&!r||j(e,n)){const r=h.find((e=>e.refClass===s)),i=C[e][r.name];if(t.selection){const r=Un(t.selection+i.toString());if(r)return Promise.resolve(r).then((t=>o(4,C[e][n]=t[n],C)))}return Promise.resolve(Kn(r.refClass,i)).then((t=>o(4,C[e][n]=t[n],C)))}}))):Promise.resolve(i.map((t=>{o(4,C[e][t]="",C)})))},j=(e,t)=>{let n=C[e][t];return"number"===h.find((e=>e.name===t)).type&&(n=Number(n||0)),!n};return h.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=h.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))})),e.$$set=e=>{"list"in e&&o(0,g=e.list),"schema"in e&&o(20,h=e.schema),"record"in e&&o(21,v=e.record),"classId"in e&&o(1,b=e.classId),"eventId"in e&&o(2,y=e.eventId),"disabled"in e&&o(3,w=e.disabled)},e.$$.update=()=>{2097153&e.$$.dirty[0]&&v&&o(4,C=(v[g.name]||[]).concat({})),16&e.$$.dirty[0]&&o(5,r=C),49&e.$$.dirty[0]&&r&&((()=>{if(F)o(7,_=C?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(x)o(6,I=C?.reduce(((e,t)=>{if(t.price){const n=(k?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),$("save",{listName:g.name,value:C})),4194304&e.$$.dirty[0]&&(s=e=>S[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[g,b,y,w,C,r,I,_,i,a,f,p,x,{name:"amountValue",properties:{decimals:2}},F,{name:"hoursValue",properties:{decimals:2}},D,(e,t)=>{const n=e[t];return h.filter((e=>!e.properties?.hidden&&void 0!==n[e.name]&&"textarea"!==e.properties?.format)).map((e=>"object"===e.type?s(n[e.name]):"boolean"===e.type?m(n[e.name]):"date"===e.type?d(n[e.name]):"datetime"===e.type?u(n[e.name]):n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>({detail:n})=>{const{value:s,add:i,desc:l}=n;N(t,e._formulaActor);const a=D?.find((t=>t.refClass.split(":")[1].split(".")[0]===e.refClass));a&&(a.value=s),s&&C.length===t+1&&o(4,C=C.concat({})),l&&o(22,S[s]=l,S),O(t,e,s),o(5,r=C)},e=>()=>{o(4,C[e]._delete=!C[e]._delete,C)},h,v,S,function(e){_=e,o(7,_)},function(e){I=e,o(6,I)},function(t){W(e,t)}]}class hn extends ge{constructor(e){var t;super(),document.getElementById("svelte-17omp3o-style")||((t=_("style")).id="svelte-17omp3o-style",t.textContent=".accordion.svelte-17omp3o{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-17omp3o{padding-top:1em}span.delete.svelte-17omp3o{text-decoration:line-through}.icon.svelte-17omp3o{margin-right:-0.75em}.formList .formField_italic{font-style:italic}",x(document.head,t)),$e(this,e,gn,pn,b,{list:0,schema:20,record:21,classId:1,eventId:2,disabled:3},[-1,-1])}}function vn(e,t,n){const o=e.slice();return o[16]=t[n],o}function bn(e){let t,n;return t=new Zt({props:{classId:e[2],item:e[16],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4]}}),t.$on("notify",e[10]),t.$on("task",e[12]),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[16]),2&n&&(o.listName=e[1].name),8&n&&(o.eventId=e[3]),1&n&&(o.record=e[0]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function yn(e){let t,n,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=bn(vn(e,o,t));const s=e=>ie(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=D()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(1055&n){let i;for(o=e[1].item,i=0;i<o.length;i+=1){const s=vn(e,o,i);r[i]?(r[i].p(s,n),se(r[i],1)):(r[i]=bn(s),r[i].c(),se(r[i],1),r[i].m(t.parentNode,t))}for(oe(),i=o.length;i<r.length;i+=1)s(i);re()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ie(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function wn(e){let t,n,o=e[9](e[5])+"";return{c(){t=_("span"),n=C(o)},m(e,o){k(e,t,o),x(t,n)},p(e,t){32&t&&o!==(o=e[9](e[5])+"")&&j(n,o)},d(e){e&&I(t)}}}function xn(e){let t,n,o;return n=new e[6]({props:{$$slots:{default:[wn]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[15])&&e[15].apply(this,arguments)})),{c(){t=_("div"),ue(n.$$.fragment),O(t,"class","accordion svelte-148ktt9"),O(t,"slot","handle")},m(e,r){k(e,t,r),me(n,t,null),o=!0},p(t,o){e=t;const r={};524320&o&&(r.$$scope={dirty:o,ctx:e}),n.$set(r)},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n)}}}function kn(e){let t,n;return t=new e[8]({props:{$$slots:{handle:[xn,({toggle:e})=>({15:e}),({toggle:e})=>e?32768:0],default:[yn,({toggle:e})=>({15:e}),({toggle:e})=>e?32768:0]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};557119&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function In(e){let t,n,o;return n=new e[7]({props:{$$slots:{default:[kn]},$$scope:{ctx:e}}}),{c(){t=_("div"),ue(n.$$.fragment),O(t,"class","formList")},m(e,r){k(e,t,r),me(n,t,null),o=!0},p(e,[t]){const o={};524351&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(se(n.$$.fragment,e),o=!0)},o(e){ie(n.$$.fragment,e),o=!1},d(e){e&&I(t),fe(n)}}}function Fn(e,t,n){const{Button:o,Accordion:r,AccordionSection:s}=c;let{list:i}=t,{schema:l}=t,{record:a}=t,{classId:f}=t,{eventId:p}=t,{disabled:$}=t;const g={};let h=a[i.name]||{};a[i.name]=h;const v=e=>g[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,i=e.list),"schema"in e&&n(11,l=e.schema),"record"in e&&n(0,a=e.record),"classId"in e&&n(2,f=e.classId),"eventId"in e&&n(3,p=e.eventId),"disabled"in e&&n(4,$=e.disabled)},[a,i,f,p,$,h,o,r,s,e=>l.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?v(t.name):"boolean"===t.type?m(e[t.name]):"date"===t.type?d(e[t.name]):"datetime"===t.type?u(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&(g[o]=e.desc);const r=a[t];n(0,a[t]={...r,[o]:e.value},a),n(5,h=a[t])},l,function(t){W(e,t)}]}class _n extends ge{constructor(e){var t;super(),document.getElementById("svelte-148ktt9-style")||((t=_("style")).id="svelte-148ktt9-style",t.textContent=".accordion.svelte-148ktt9{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}",x(document.head,t)),$e(this,e,Fn,In,b,{list:1,schema:11,record:0,classId:2,eventId:3,disabled:4})}}const{Boolean:Sn,document:Cn}=ce;function En(e,t,n){const o=e.slice();return o[40]=t[n],o}function Dn(e,t,n){const o=e.slice();return o[43]=t[n],o}function Nn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function On(e){let t,n,o=e[39]&&function(e){let t,n,o,r,s,i,l,a,c,d,u,m,f,p,$,g,h,v=e[0].items,b=[];for(let t=0;t<v.length;t+=1)b[t]=zn(Dn(e,v,t));const y=e=>ie(b[e],1,1,(()=>{b[e]=null}));let S=e[0].list&&Ln(e);return m=new e[5]({props:{outline:!0,$$slots:{default:[Bn]},$$scope:{ctx:e}}}),m.$on("click",e[11]),p=new e[5]({props:{disabled:e[2],form:e[6],filled:!0,type:"submit",$$slots:{default:[An]},$$scope:{ctx:e}}}),{c(){t=_("section"),n=_("form"),o=_("input"),s=E();for(let e=0;e<b.length;e+=1)b[e].c();i=E(),S&&S.c(),l=E(),a=_("div"),c=_("small"),c.textContent=`${Zn}`,d=E(),u=_("div"),ue(m.$$.fragment),f=E(),ue(p.$$.fragment),O(o,"class",w(e[6])+" svelte-rovpm0"),O(o,"name","_id"),O(o,"type","hidden"),o.value=r=e[1]._id||"",O(n,"class",w(e[7])+" svelte-rovpm0"),O(n,"id",e[6]),O(a,"class","comment svelte-rovpm0"),O(u,"class","form--buttons svelte-rovpm0"),O(t,"class",w(e[8])+" svelte-rovpm0")},m(r,v){k(r,t,v),x(t,n),x(n,o),x(n,s);for(let e=0;e<b.length;e+=1)b[e].m(n,null);var y;x(n,i),S&&S.m(n,null),x(t,l),x(t,a),x(a,c),x(t,d),x(t,u),me(m,u,null),x(u,f),me(p,u,null),$=!0,g||(h=N(n,"submit",(y=e[10],function(e){return e.preventDefault(),y.call(this,e)})),g=!0)},p(e,t){if((!$||2&t[0]&&r!==(r=e[1]._id||""))&&(o.value=r),4167&t[0]){let o;for(v=e[0].items,o=0;o<v.length;o+=1){const r=Dn(e,v,o);b[o]?(b[o].p(r,t),se(b[o],1)):(b[o]=zn(r),b[o].c(),se(b[o],1),b[o].m(n,i))}for(oe(),o=v.length;o<b.length;o+=1)y(o);re()}e[0].list?S?(S.p(e,t),1&t[0]&&se(S,1)):(S=Ln(e),S.c(),se(S,1),S.m(n,null)):S&&(oe(),ie(S,1,1,(()=>{S=null})),re());const s={};32768&t[1]&&(s.$$scope={dirty:t,ctx:e}),m.$set(s);const l={};4&t[0]&&(l.disabled=e[2]),32768&t[1]&&(l.$$scope={dirty:t,ctx:e}),p.$set(l)},i(e){if(!$){for(let e=0;e<v.length;e+=1)se(b[e]);se(S),se(m.$$.fragment,e),se(p.$$.fragment,e),$=!0}},o(e){b=b.filter(Sn);for(let e=0;e<b.length;e+=1)ie(b[e]);ie(S),ie(m.$$.fragment,e),ie(p.$$.fragment,e),$=!1},d(e){e&&I(t),F(b,e),S&&S.d(),fe(m),fe(p),g=!1,h()}}}(e);return{c(){o&&o.c(),t=D()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,t){e[39]&&o.p(e,t)},i(e){n||(se(o),n=!0)},o(e){ie(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function jn(e){let t,n;return t=new Zt({props:{classId:e[6],item:e[43],record:e[1],disabled:e[2],eventId:e[0].id}}),t.$on("task",e[12]),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[43]),2&n[0]&&(o.record=e[1]),4&n[0]&&(o.disabled=e[2]),1&n[0]&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function zn(e){let t,n,o="list"!==e[43].type&&jn(e);return{c(){o&&o.c(),t=D()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){"list"!==e[43].type?o?(o.p(e,n),1&n[0]&&se(o,1)):(o=jn(e),o.c(),se(o,1),o.m(t.parentNode,t)):o&&(oe(),ie(o,1,1,(()=>{o=null})),re())},i(e){n||(se(o),n=!0)},o(e){ie(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Ln(e){let t,n,o=e[0].list,r=[];for(let t=0;t<o.length;t+=1)r[t]=Mn(En(e,o,t));const s=e=>ie(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=D()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(8263&n[0]){let i;for(o=e[0].list,i=0;i<o.length;i+=1){const s=En(e,o,i);r[i]?(r[i].p(s,n),se(r[i],1)):(r[i]=Mn(s),r[i].c(),se(r[i],1),r[i].m(t.parentNode,t))}for(oe(),i=o.length;i<r.length;i+=1)s(i);re()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)se(r[e]);n=!0}},o(e){r=r.filter(Sn);for(let e=0;e<r.length;e+=1)ie(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function Pn(e){let t,n;return t=new _n({props:{classId:e[6],list:e[40],eventId:e[0].id,schema:e[40].item,record:e[1],disabled:e[2]}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[40]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[40].item),2&n[0]&&(o.record=e[1]),4&n[0]&&(o.disabled=e[2]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Tn(e){let t,n;return t=new hn({props:{classId:e[6],list:e[40],eventId:e[0].id,schema:e[40].item,record:e[1],disabled:e[2]}}),t.$on("save",e[13]),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[40]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[40].item),2&n[0]&&(o.record=e[1]),4&n[0]&&(o.disabled=e[2]),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function Mn(e){let t,n,o,r,s,i;t=new e[4]({props:{text:e[40].designation}});const l=[Tn,Pn],a=[];function c(e,t){return"array"===e[40].type?0:1}return o=c(e),r=a[o]=l[o](e),{c(){ue(t.$$.fragment),n=E(),r.c(),s=D()},m(e,r){me(t,e,r),k(e,n,r),a[o].m(e,r),k(e,s,r),i=!0},p(e,n){const i={};1&n[0]&&(i.text=e[40].designation),t.$set(i);let d=o;o=c(e),o===d?a[o].p(e,n):(oe(),ie(a[d],1,1,(()=>{a[d]=null})),re(),r=a[o],r?r.p(e,n):(r=a[o]=l[o](e),r.c()),se(r,1),r.m(s.parentNode,s))},i(e){i||(se(t.$$.fragment,e),se(r),i=!0)},o(e){ie(t.$$.fragment,e),ie(r),i=!1},d(e){fe(t,e),e&&I(n),a[o].d(e),e&&I(s)}}}function Bn(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function An(e){let t;return{c(){t=C("Speichern")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function qn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Wn(e){let t,n,o,r;Cn.title=t=e[3];let s={ctx:e,current:null,token:null,hasCatch:!1,pending:qn,then:On,catch:Nn,value:39,blocks:[,,,]};return le(e[9](),s),{c(){n=E(),o=D(),s.block.c()},m(e,t){k(e,n,t),k(e,o,t),s.block.m(e,s.anchor=t),s.mount=()=>o.parentNode,s.anchor=o,r=!0},p(n,o){e=n,(!r||8&o[0])&&t!==(t=e[3])&&(Cn.title=t),ae(s,e,o)},i(e){r||(se(s.block),r=!0)},o(e){for(let e=0;e<3;e+=1){ie(s.blocks[e])}r=!1},d(e){e&&I(n),e&&I(o),s.block.d(e),s.token=null,s=null}}}let Hn=new Map,Rn=new Map,Yn=new Map;const Gn=(e,n)=>{const o=n;return Hn.has(o)||Hn.set(o,t.getTasksList(n).then((({data:e})=>e))),Hn.get(o)},Vn=(e,n,o)=>Rn.get(o)||Gn(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(Rn.set(o,e),e))),Jn=(e,t)=>{Yn.set(e,t)},Un=e=>Yn.get(e),Kn=(e,n)=>Yn.get(n)||t.getTask(e,n).then((e=>(Yn.set(n,e),e))),Qn=(e,n)=>{if(!Hn.get(n))return;const o=n;Hn.set(o,t.getTasksList(n).then((({data:e})=>e)))},Xn=()=>{Hn=new Map,Rn=new Map,Yn=new Map};let Zn="";function eo(e,o,a){let d,u,m,p;y(e,i,(e=>a(24,m=e))),y(e,l,(e=>a(25,p=e)));const{Divider:$,Button:g}=c,h=JSON.parse(r.getItem("Locale")),v=q();let b,w,{schema:x}=o,{recID:k}=o,{prevEventID:I=!1}=o,{prev:F=!1}=o,{taskId:_=!1}=o,{description:S=""}=o,{root:C=!1}=o,{readonly:E}=o,D={},N={},O="form-"+x.class+Math.floor(9e3*Math.random()+1e3).toString();const j=C?"fEmbedded":"fTask",z=C?"sEmbedded":"sTask",L=()=>{for(const e of x.items)e.properties?.value?.concatenation&&P(e)},P=async e=>{const t=e.properties.value.concatenation;let n="";for(const e of t)void 0!==e.constant&&(n+=e.constant),"year"===e.variable&&(n+=(new Date).getFullYear()),e.refItemNext&&(n+=await T(e.refItemNext));a(1,D[e.name]=n,D)},T=async e=>{const[n,o]=e.offset?.split(",")||[0,0],r=+e.base||0,s=+e.step||1;e.type;const i=e.refItem,l=await t.getLastId(x.class,i);if(!l?.length)return(r+s).toString().padStart(o,"0");return((+l[0][i]?.substring(n,n+o)||r)+s).toString().padStart(o,"0")},M=(e,t)=>{const n=t.name,o=e.find((e=>e.name===n));let r=t.value;if(r&&o&&o.type.startsWith("date"))try{return function(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let r=!1;if(""===e)return null;const s=t.split(Ft);let i=0,l=0;const a=new Date(0);for(const c of s){if(!e.startsWith(c,i))return n;if(i+=c.length,i===e.length){if(l!==t.length)return n;break}if("%"!==t[l+c.length])break;if(l+=c.length+1,"%"===t[l]){if("%"!==e[i])return n;i++}else if("p"===t[l].toLowerCase()){const t=e.substr(i,2).toUpperCase();if("AM"===t)r=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;r=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{It.lastIndex=i;const s=It.exec(e);if(null==s)return n;switch(t[l]){case"H":a.setHours(parseInt(s[0])+12*r);break;case"M":a.setMinutes(s[0]);break;case"S":a.setSeconds(s[0]);break;case"d":a.setDate(s[0]);break;case"m":a.setMonth(s[0]-1);break;case"y":a.setFullYear(100*o+parseInt(s[0]));break;case"Y":a.setFullYear(s[0])}i+=s[0].length}l++}return isNaN(a.valueOf())?n:a}(r,"%d.%m.%Y").toISOString()}catch{return new Date(r).toISOString()}if(o&&"boolean"===o.type&&(r=!!t.checked),o&&"number"===o.type){const e=Number("1.1").toLocaleString(h.id).substring(1,2);try{r=Number(r.replace(e,".")).toString()}catch{}}return r},B=()=>C?window.singleSpaNavigate("/"):v("back"),W=async(e,n)=>{if(x.input?.length>1){if(x.input[0]!==e)return;if(n){const o=await t.getTaskOptions(`${e}:${n}`,x.id);a(1,D={...D,...o})}else{const e=x.input.slice(1);for(const t of e)a(1,D[t]=[],D)}}};return n.subscribe((async e=>{if(!e)return;if(!Hn.get(e.eventId))return;const n=await t.getTaskList(x.class,e.taskId);((e,t,n)=>{if(!Hn.get(e))return;const o=t;Rn.set(o,n)})(e.eventId,e.taskId,n)})),A(Xn),e.$$set=e=>{"schema"in e&&a(0,x=e.schema),"recID"in e&&a(18,k=e.recID),"prevEventID"in e&&a(16,I=e.prevEventID),"prev"in e&&a(19,F=e.prev),"taskId"in e&&a(17,_=e.taskId),"description"in e&&a(14,S=e.description),"root"in e&&a(20,C=e.root),"readonly"in e&&a(15,E=e.readonly)},e.$$.update=()=>{32768&e.$$.dirty[0]&&a(2,d=E),6291457&e.$$.dirty[0]&&w&&b&&x.items.map((({name:e,type:t})=>{const n=b.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;w[e]&&a(1,D[e]=w[e],D),w[o]&&a(1,D[o]=w[o],D)})),1064960&e.$$.dirty[0]&&a(3,u=C?S||"enablerr - Form":document.title)},[x,D,d,u,$,g,O,j,z,async()=>{if(k&&(a(1,D=await t.getTask(x.class,k)),a(14,S=f(x,D))),I){a(15,E=!1),a(21,b=await t.getSchema(I)),"string"==typeof F&&a(22,w=await t.getTask(b.class,F));const e=x.items.find((e=>e.refClass===b.class));a(1,D[e.name]=w._id,D)}const e=await t.getEvent(x.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&a(15,E=!0),m.role?.length&&x.authorization?.length){const e=x.authorization.some((e=>p?.find((t=>t===e.role&&"edit"===e.activity))));a(15,E||=!e)}return k||L(),!0},async()=>{const e={};Array.from(document.querySelectorAll("form#"+O+" ."+O)).map((t=>{if(t.name)if(t.name.includes(".")){const[n,o]=t.name.split("."),r=x.list.find((e=>e.name===n));e[t.name]=M(r.item,t)}else e[t.name]=M(x.items,t)})),x.list&&x.list.map((t=>{"array"===t.type&&N[t.name]&&(e[t.name]=N[t.name].reduce(((e,n)=>n._delete||!Object.values(n).some(Boolean)?e:e.concat(Object.entries(n).reduce(((e,[n,o])=>("_delete"!==n&&(e[n]=M(t.item,{name:n,value:o,checked:o})),e)),{}))),[]))})),e._event=x.id,e._prevEventId=I,e._taskId=_;const{id:n,task:o,error:r}=await t.saveData(x.class,e);if(r?.text){const e=r.field?" in "+r.field+": "+r.value:"";return void s.failed(`${r.text} ${e}`,3e3)}s.success("Die Daten wurden gespeichert.",2e3),e._id=n;const i=await t.getTaskList(x.class,n);v("choose",{row:i}),C&&!k?window.singleSpaNavigate(`/task/${x.id}/${o}/task`):B()},()=>I?window.history.back():B(),async({detail:{row:e}})=>{if(k)return;await(async()=>{for(const e of x.items)if(e.refItem&&D[e.refItem]){const n=await t.getTask(e.refItem,D[e.refItem]);n&&a(1,D[e.name]=n[e.name],D)}for(const e of x.list||[])if(e.refItem&&D[e.refItem]){const n=await t.getTask(e.refItem,D[e.refItem]),o=[];for(const t of n[e.name]){const n={};for(const o of e.item)t[o.name]&&(n[o.name]=t[o.name]);o.push(n)}a(1,D[e.name]=o,D)}})();const n=e._task.event,o=await t.getEvent(n),r=await t.getEvent(x.id),s=r.output?.class?.at(0)?.item.find((e=>e.name===o.output?.class[0]?.name));(r.input?.class?.at(0)?.name===o.output.class[0]?.name||s?.asInput)&&(a(21,b=await t.getSchema(n)),a(16,I=n),a(17,_=e._task._id),a(22,w=!!_&&await t.getTask(b.class,e._task.docId)),W(b.class,e?._task?.docId))},({detail:e})=>{N[e.listName]=e.value},S,E,I,_,k,F,C,b,w]}class to extends ge{constructor(e){var t;super(),Cn.getElementById("svelte-rovpm0-style")||((t=_("style")).id="svelte-rovpm0-style",t.textContent="form.disabled.svelte-rovpm0 input.svelte-rovpm0{background-color:red !important}.comment.svelte-rovpm0.svelte-rovpm0{color:green;margin-bottom:1em}form.svelte-rovpm0.svelte-rovpm0{min-width:25em}@media only screen and (min-width: 600px){form.svelte-rovpm0.svelte-rovpm0{min-width:30em}}.fEmbedded.svelte-rovpm0.svelte-rovpm0,.fTask.svelte-rovpm0.svelte-rovpm0{overflow-y:auto;overflow-x:hidden}.fEmbedded.svelte-rovpm0.svelte-rovpm0{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-rovpm0.svelte-rovpm0{height:fit-content;max-height:70vh}.sTask.svelte-rovpm0.svelte-rovpm0{height:95%;display:inline-grid}.sTask.svelte-rovpm0 .btn.svelte-rovpm0{display:initial !important}.form--buttons.svelte-rovpm0.svelte-rovpm0{display:flex;gap:1em;padding-bottom:0.5em}",x(Cn.head,t)),$e(this,e,eo,Wn,b,{schema:0,recID:18,prevEventID:16,prev:19,taskId:17,description:14,root:20,readonly:15},[-1,-1])}}function no(e){let t,n,o;function r(t){e[4](t)}let s={schema:e[5],recID:e[6]};return void 0!==e[0]&&(s.description=e[0]),t=new to({props:s}),R.push((()=>de(t,"description",r))),t.$on("back",e[2]),{c(){ue(t.$$.fragment)},m(e,n){me(t,e,n),o=!0},p(e,o){const r={};32&o&&(r.schema=e[5]),64&o&&(r.recID=e[6]),!n&&1&o&&(n=!0,r.description=e[0],K((()=>n=!1))),t.$set(r)},i(e){o||(se(t.$$.fragment,e),o=!0)},o(e){ie(t.$$.fragment,e),o=!1},d(e){fe(t,e)}}}function oo(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[no,({prop:{schema:e,recID:t,eventID:n}})=>({5:e,6:t,7:n}),({prop:e})=>(e?32:0)|(e?64:0)|(e?128:0)]},$$scope:{ctx:e}}}),{c(){ue(t.$$.fragment)},m(e,o){me(t,e,o),n=!0},p(e,[n]){const o={};1&n&&(o.description=e[0]),353&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ie(t.$$.fragment,e),n=!1},d(e){fe(t,e)}}}function ro(e,n,o){let r,{refresh:s}=n;return e.$$set=e=>{"refresh"in e&&o(3,s=e.refresh)},[r,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},s,function(e){r=e,o(0,r)}]}function so(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var io,lo,ao=(io=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==s(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},i),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var i={component:null,domElementGetter:null,props:{}};function l(e){return Promise.resolve()}function a(e,t,n){var r=Object.keys(i),s=Object.keys(e).reduce((function(t,n){return r.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var r=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)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(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),i=r();t.instance=new e.component(o(o({},s),{},{target:i,props:Object.assign({},n,e.props)}))}))}function c(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function d(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},io(lo={exports:{}},lo.exports),lo.exports);const co=so(ao)({component:class extends ge{constructor(e){super(),$e(this,e,ro,oo,b,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:uo,mount:mo,unmount:fo}=co;e({bootstrap:uo,mount:mo,unmount:fo});e("Form",to),e("List",Je)}}}));
|