@enablerr-ui/detail 0.2.232 → 0.2.233
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,s,r,i,l,a,c;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.TextArea,s=e.Storage,r=e.toasts,i=e.settings,l=e.currentRoles,a=e.Page},function(e){c=e.getAttractions}],execute:function(){e("version","0.2.232");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[s,r]=o.split(".");if(e.list?.find((({name:e})=>e===s))&&r&&void 0!==n[s]){const e=`${s}_${r}`;n[e]=n[s][r],s=e}return t.find((e=>e===s))||t.push(s),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 h(){return Object.create(null)}function g(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 k(e,t){e.appendChild(t)}function x(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 j(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function N(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function O(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 T(e,t,n){e.classList[n?"add":"remove"](t)}let P;function M(e){P=e}function B(){if(!P)throw new Error("Function called outside component initialization");return P}function q(e){B().$$.on_mount.push(e)}function A(){const e=B();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const s=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,s)}))}}}function W(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const H=[],R=[],Y=[],V=[],G=Promise.resolve();let J=!1;function U(){J||(J=!0,G.then(te))}function K(){return U(),G}function Q(e){Y.push(e)}function X(e){V.push(e)}let Z=!1;const ee=new Set;function te(){if(!Z){Z=!0;do{for(let e=0;e<H.length;e+=1){const t=H[e];M(t),ne(t.$$)}for(M(null),H.length=0;R.length;)R.pop()();for(let e=0;e<Y.length;e+=1){const t=Y[e];ee.has(t)||(ee.add(t),t())}Y.length=0}while(H.length);for(;V.length;)V.pop()();J=!1,Z=!1,ee.clear()}}function ne(e){if(null!==e.fragment){e.update(),g(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Q)}}const oe=new Set;let se;function re(){se={r:0,c:[],p:se}}function ie(){se.r||g(se.c),se=se.p}function le(e,t){e&&e.i&&(oe.delete(e),e.i(t))}function ae(e,t,n,o){if(e&&e.o){if(oe.has(e))return;oe.add(e),se&&se.c.push((()=>{oe.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function ce(e,t){const n=t.token={};function o(e,o,s,r){if(t.token!==n)return;t.resolved=r;let i=t.ctx;void 0!==s&&(i=i.slice(),i[s]=r);const l=e&&(t.current=e)(i);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(re(),ae(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ie())})):t.block.d(1),l.c(),le(l,1),l.m(t.mount(),t.anchor),a=!0),t.block=l,t.blocks&&(t.blocks[o]=l),a&&te()}if((s=e)&&"object"==typeof s&&"function"==typeof s.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 s}function de(e,t,n){const o=t.slice(),{resolved:s}=e;e.current===e.then&&(o[e.value]=s),e.current===e.catch&&(o[e.error]=s),e.block.p(o,n)}const ue="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function me(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function fe(e){e&&e.c()}function pe(e,t,n,o){const{fragment:s,on_mount:r,on_destroy:i,after_update:l}=e.$$;s&&s.m(t,n),o||Q((()=>{const t=r.map($).filter(v);i?i.push(...t):g(t),e.$$.on_mount=[]})),l.forEach(Q)}function $e(e,t){const n=e.$$;null!==n.fragment&&(g(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function he(e,t,n,o,s,r,i=[-1]){const l=P;M(e);const a=e.$$={fragment:null,ctx:null,props:r,update:p,not_equal:s,bound:h(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:h(),dirty:i,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return a.ctx&&s(a.ctx[t],a.ctx[t]=r)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](r),c&&function(e,t){-1===e.$$.dirty[0]&&(H.push(e),U(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,g(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&&le(e.$$.fragment),pe(e,t.target,t.anchor,t.customElement),te()}M(l)}class ge{$destroy(){$e(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 ve(e){let t,n,o,s;return{c(){t=S("svg"),n=S("polyline"),o=S("path"),N(n,"points","9 10 4 15 9 20"),N(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",s="feather feather-corner-down-left "+e[2])},m(e,s){x(e,t,s),k(t,n),k(t,o)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-corner-down-left "+e[2])&&N(t,"class",s)},i:p,o:p,d(e){e&&I(t)}}}function be(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:r=""}=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,s=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,s,r]}class ye extends ge{constructor(e){super(),he(this,e,be,ve,b,{size:0,strokeWidth:1,class:2})}}function we(e){let t,n,o,s,r;return{c(){t=S("svg"),n=S("path"),o=S("line"),s=S("line"),N(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),N(o,"x1","18"),N(o,"y1","9"),N(o,"x2","12"),N(o,"y2","15"),N(s,"x1","12"),N(s,"y1","9"),N(s,"x2","18"),N(s,"y2","15"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",r="feather feather-delete "+e[2])},m(e,r){x(e,t,r),k(t,n),k(t,o),k(t,s)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-delete "+e[2])&&N(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function ke(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:r=""}=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,s=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,s,r]}class xe extends ge{constructor(e){super(),he(this,e,ke,we,b,{size:0,strokeWidth:1,class:2})}}function Ie(e){let t,n,o,s,r;return{c(){t=S("svg"),n=S("path"),o=S("polyline"),s=S("line"),N(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),N(o,"points","15 3 21 3 21 9"),N(s,"x1","10"),N(s,"y1","14"),N(s,"x2","21"),N(s,"y2","3"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",r="feather feather-external-link "+e[2])},m(e,r){x(e,t,r),k(t,n),k(t,o),k(t,s)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-external-link "+e[2])&&N(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Fe(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:r=""}=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,s=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,s,r]}class _e extends ge{constructor(e){super(),he(this,e,Fe,Ie,b,{size:0,strokeWidth:1,class:2})}}function Se(e){let t,n,o,s;return{c(){t=S("svg"),n=S("circle"),o=S("line"),N(n,"cx","11"),N(n,"cy","11"),N(n,"r","8"),N(o,"x1","21"),N(o,"y1","21"),N(o,"x2","16.65"),N(o,"y2","16.65"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",s="feather feather-search "+e[2])},m(e,s){x(e,t,s),k(t,n),k(t,o)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-search "+e[2])&&N(t,"class",s)},i:p,o:p,d(e){e&&I(t)}}}function Ce(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:r=""}=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,s=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,s,r]}class Ee extends ge{constructor(e){super(),he(this,e,Ce,Se,b,{size:0,strokeWidth:1,class:2})}}const{document:De}=ue;function je(e){e[22]=e[24].list,e[23]=e[24].items}function Ne(e,t,n){const o=e.slice();return o[25]=t[n],o}function Oe(e,t,n){const o=e.slice();return o[28]=t[n],o}function ze(e,t,n){const o=e.slice();return o[28]=t[n],o}function Le(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Te(e){let t,n,o,s,r,i;je(e);let l=e[22]?.length&&Pe(e),a=e[23]?.length&&Me(e),c=e[22]?.length&&Ae(e);return{c(){t=_("div"),l&&l.c(),n=E(),o=_("table"),a&&a.c(),s=E(),r=_("tbody"),c&&c.c(),N(o,"striped",""),N(o,"class","svelte-d5dkb1"),N(t,"class","eList svelte-d5dkb1")},m(e,d){x(e,t,d),l&&l.m(t,null),k(t,n),k(t,o),a&&a.m(o,null),k(o,s),k(o,r),c&&c.m(r,null),i=!0},p(e,i){je(e),e[22]?.length?l?(l.p(e,i),4&i[0]&&le(l,1)):(l=Pe(e),l.c(),le(l,1),l.m(t,n)):l&&(re(),ae(l,1,1,(()=>{l=null})),ie()),e[23]?.length?a?a.p(e,i):(a=Me(e),a.c(),a.m(o,s)):a&&(a.d(1),a=null),e[22]?.length?c?(c.p(e,i),4&i[0]&&le(c,1)):(c=Ae(e),c.c(),le(c,1),c.m(r,null)):c&&(re(),ae(c,1,1,(()=>{c=null})),ie())},i(e){i||(le(l),le(c),i=!0)},o(e){ae(l),ae(c),i=!1},d(e){e&&I(t),l&&l.d(),a&&a.d(),c&&c.d()}}}function Pe(e){let t,n,o;return n=new e[5]({props:{id:e[6],value:""}}),n.$on("input",e[10]),{c(){t=C("Suchen: "),fe(n.$$.fragment)},m(e,s){x(e,t,s),pe(n,e,s),o=!0},p:p,i(e){o||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n,e)}}}function Me(e){let t,n,o,s=e[0]&&Be(),r=e[23],i=[];for(let t=0;t<r.length;t+=1)i[t]=qe(ze(e,r,t));return{c(){t=_("thead"),n=_("tr"),s&&s.c(),o=E();for(let e=0;e<i.length;e+=1)i[e].c();N(n,"class","svelte-d5dkb1"),N(t,"class","svelte-d5dkb1")},m(e,r){x(e,t,r),k(t,n),s&&s.m(n,null),k(n,o);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(e[0]?s||(s=Be(),s.c(),s.m(n,o)):s&&(s.d(1),s=null),516&t[0]){let o;for(r=e[23],o=0;o<r.length;o+=1){const s=ze(e,r,o);i[o]?i[o].p(s,t):(i[o]=qe(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&I(t),s&&s.d(),F(i,e)}}}function Be(e){let t;return{c(){t=_("th"),N(t,"class","svelte-d5dkb1")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function qe(e){let t,n,o=e[28]?.designation+"";return{c(){t=_("th"),n=C(o),N(t,"class","svelte-d5dkb1")},m(e,o){x(e,t,o),k(t,n)},p(e,t){4&t[0]&&o!==(o=e[28]?.designation+"")&&O(n,o)},d(e){e&&I(t)}}}function Ae(e){let t,n,o=e[22],s=[];for(let t=0;t<o.length;t+=1)s[t]=Je(Ne(e,o,t));const r=e=>ae(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=D()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(7055&n[0]){let i;for(o=e[22],i=0;i<o.length;i+=1){const r=Ne(e,o,i);s[i]?(s[i].p(r,n),le(s[i],1)):(s[i]=Je(r),s[i].c(),le(s[i],1),s[i].m(t.parentNode,t))}for(re(),i=o.length;i<s.length;i+=1)r(i);ie()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)le(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)ae(s[e]);n=!1},d(e){F(s,e),e&&I(t)}}}function We(e){let t,n,o,s,r=e[0]&&He(e),i=e[23],l=[];for(let t=0;t<i.length;t+=1)l[t]=Ge(Oe(e,i,t));return{c(){t=_("tr"),r&&r.c(),n=E();for(let e=0;e<l.length;e+=1)l[e].c();o=E(),N(t,"class","pointer svelte-d5dkb1"),T(t,"active",e[25]._id===e[1])},m(e,i){x(e,t,i),r&&r.m(t,null),k(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);k(t,o),s=!0},p(e,s){if(e[0]?r?(r.p(e,s),1&s[0]&&le(r,1)):(r=He(e),r.c(),le(r,1),r.m(t,n)):r&&(re(),ae(r,1,1,(()=>{r=null})),ie()),900&s[0]){let n;for(i=e[23],n=0;n<i.length;n+=1){const r=Oe(e,i,n);l[n]?l[n].p(r,s):(l[n]=Ge(r),l[n].c(),l[n].m(t,o))}for(;n<l.length;n+=1)l[n].d(1);l.length=i.length}518&s[0]&&T(t,"active",e[25]._id===e[1])},i(e){s||(le(r),s=!0)},o(e){ae(r),s=!1},d(e){e&&I(t),r&&r.d(),F(l,e)}}}function He(e){let t,n,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:Ve,then:Ye,catch:Re,value:31,blocks:[,,,]};return ce(n=e[12](e[25]),s),{c(){t=D(),s.block.c()},m(e,n){x(e,t,n),s.block.m(e,s.anchor=n),s.mount=()=>t.parentNode,s.anchor=t,o=!0},p(t,o){e=t,s.ctx=e,4&o[0]&&n!==(n=e[12](e[25]))&&ce(n,s)||de(s,e,o)},i(e){o||(le(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ae(s.blocks[e])}o=!1},d(e){e&&I(t),s.block.d(e),s.token=null,s=null}}}function Re(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Ye(e){let t,n,o,s,r;return o=new _e({props:{size:"18"}}),{c(){t=_("td"),n=_("a"),fe(o.$$.fragment),N(n,"href",s=e[31]),N(n,"target","_blank"),N(t,"class","editRow svelte-d5dkb1")},m(e,s){x(e,t,s),k(t,n),pe(o,n,null),r=!0},p(e,t){(!r||4&t[0]&&s!==(s=e[31]))&&N(n,"href",s)},i(e){r||(le(o.$$.fragment,e),r=!0)},o(e){ae(o.$$.fragment,e),r=!1},d(e){e&&I(t),$e(o)}}}function Ve(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Ge(e){let t,n,o,s,r=e[7](e[25],e[28])+"";return{c(){t=_("td"),n=C(r),N(t,"class","svelte-d5dkb1")},m(r,i){var l;x(r,t,i),k(t,n),o||(s=j(t,"click",(l=function(){v(e[8](e[25]))&&e[8](e[25]).apply(this,arguments)},function(e){return e.stopPropagation(),l.call(this,e)})),o=!0)},p(t,o){e=t,4&o[0]&&r!==(r=e[7](e[25],e[28])+"")&&O(n,r)},d(e){e&&I(t),o=!1,s()}}}function Je(e){let t,n,o=e[11](e[25],e[23],e[3]),s=o&&We(e);return{c(){s&&s.c(),t=D()},m(e,o){s&&s.m(e,o),x(e,t,o),n=!0},p(e,n){12&n[0]&&(o=e[11](e[25],e[23],e[3])),o?s?(s.p(e,n),12&n[0]&&le(s,1)):(s=We(e),s.c(),le(s,1),s.m(t.parentNode,t)):s&&(re(),ae(s,1,1,(()=>{s=null})),ie())},i(e){n||(le(s),n=!0)},o(e){ae(s),n=!1},d(e){s&&s.d(e),e&&I(t)}}}function Ue(e){let t,n;return t=new e[4]({}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p:p,i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Ke(e){let t,n,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:Ue,then:Te,catch:Le,value:24,blocks:[,,,]};return ce(n=e[2]&&e[9](),s),{c(){t=D(),s.block.c()},m(e,n){x(e,t,n),s.block.m(e,s.anchor=n),s.mount=()=>t.parentNode,s.anchor=t,o=!0},p(t,o){e=t,s.ctx=e,4&o[0]&&n!==(n=e[2]&&e[9]())&&ce(n,s)||de(s,e,o)},i(e){o||(le(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ae(s.blocks[e])}o=!1},d(e){e&&I(t),s.block.d(e),s.token=null,s=null}}}function Qe(e,o,s){const r=A(),{Loading:i,TextField:l}=c;let{className:a}=o,{rowId:u}=o,{filterForReady:m=!1}=o,{showEdit:f=!1}=o,{praefix:p=""}=o,{selectionFields:$=!1}=o,h=!0,g="",v=a+Math.floor(9e3*Math.random()+1e3).toString()+"search";const b=(e,t)=>t&&d(e[`_${t.name}`]||e[t.name]||""),y=t.getSchemaByClass(a),w=async(e,t,n,o)=>{const{value:s,refClass:r}=o,[i,l]=n.split("."),a=s.get(p),c=a&&await $o(i,a);if(!c)return e;const d=c[l];return d?.length?d.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 fo(r+o._id.toString(),o),o})):e};q((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"}),window.setTimeout((()=>document.getElementById(v)?.focus()),100)})),n.subscribe((async e=>{if(!e)return;const t=await y;e.eventId===t.id&&(ho(t.class,e.eventId),s(2,h=!s(2,h=!1)))}));return e.$$set=e=>{"className"in e&&s(13,a=e.className),"rowId"in e&&s(1,u=e.rowId),"filterForReady"in e&&s(14,m=e.filterForReady),"showEdit"in e&&s(0,f=e.showEdit),"praefix"in e&&s(15,p=e.praefix),"selectionFields"in e&&s(16,$=e.selectionFields)},[f,u,h,g,i,l,v,b,e=>()=>r("choose",{row:e}),async()=>{const e=await y;let t=await uo(e.class,e.id);const n=$&&$?.find((t=>e.class===t.refClass.split(":")[0]));if(n&&n.value){const[o,s]=n.refClass.split(":");e.class===o&&(t=await w(t,o,s,n))}s(0,f&&=!n),!n&&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=[],r=e.display;return r&&r.length?r.map((n=>{const[s,r]=n.split(".");let i=e.list?.find((e=>e.name===s))?.item.find((e=>e.name===r));i&&(i={...i},i.name=`${s}_${r}`,t=t.map((e=>(e[s]&&(e[i.name]=e[s][r]),e)))),i||(i=e.items.find((e=>e.name===s))),o.find((e=>e?.name===s))||o.push(i)})):o=e.items,{list:t,items:o}},({detail:{value:e}})=>{s(3,g=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(b(e,o)?.toLowerCase()?.includes(n))return!0;return!1},async e=>`/task/${(await y).id}/${e._task._id}/task?view=standalone`,a,m,p,$]}class Xe extends ge{constructor(e){var t;super(),De.getElementById("svelte-d5dkb1-style")||((t=_("style")).id="svelte-d5dkb1-style",t.textContent=".eList.svelte-d5dkb1.svelte-d5dkb1{min-height:12em;height:fit-content;max-height:65vh;overflow:auto}.eList.svelte-d5dkb1 .editRow.svelte-d5dkb1{width:1em}.eList.svelte-d5dkb1 table.svelte-d5dkb1{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important;margin-top:1em}.eList.svelte-d5dkb1 table thead.svelte-d5dkb1{position:sticky;top:0;background:#326173;color:white}.eList.svelte-d5dkb1 table tbody tr.svelte-d5dkb1{height:2.3em}th.svelte-d5dkb1.svelte-d5dkb1,td.svelte-d5dkb1.svelte-d5dkb1{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-d5dkb1.svelte-d5dkb1:hover{background-color:#DAE1E5}tr.active.svelte-d5dkb1.svelte-d5dkb1{color:#326173;background-color:#fcebd5}",k(De.head,t)),he(this,e,Qe,Ke,b,{className:13,rowId:1,filterForReady:14,showEdit:0,praefix:15,selectionFields:16},[-1,-1])}}function Ze(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function et(e){let t,n,o=e[22]&&tt(e);return{c(){o&&o.c(),t=D()},m(e,s){o&&o.m(e,s),x(e,t,s),n=!0},p(e,n){e[22]?o?(o.p(e,n),4&n&&le(o,1)):(o=tt(e),o.c(),le(o,1),o.m(t.parentNode,t)):o&&(re(),ae(o,1,1,(()=>{o=null})),ie())},i(e){n||(le(o),n=!0)},o(e){ae(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function tt(e){let t,n;return t=new e[9]({props:{title:e[12],class:"eList "+(e[7]?"form":""),$$slots:{default:[it]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};128&n&&(o.class="eList "+(e[7]?"form":"")),8389119&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function nt(e){let t,n;return t=new yo({props:{schema:e[1],recID:e[0],readonly:e[8]}}),t.$on("choose",(function(){v(e[17](e[22]))&&e[17](e[22]).apply(this,arguments)})),t.$on("back",e[14]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(n,o){e=n;const s={};2&o&&(s.schema=e[1]),1&o&&(s.recID=e[0]),256&o&&(s.readonly=e[8]),t.$set(s)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function ot(e){let t,n,o,s,r,i,l,a,c;return t=new e[10]({}),s=new e[11]({props:{outline:!0,$$slots:{default:[st]},$$scope:{ctx:e}}}),s.$on("click",e[15]),i=new e[11]({props:{filled:!0,$$slots:{default:[rt]},$$scope:{ctx:e}}}),i.$on("click",e[16]),a=new Xe({props:{className:e[1].class,filterForReady:e[3],praefix:e[4],selectionFields:e[5],rowId:e[0],showEdit:e[6]}}),a.$on("edit",e[18]),a.$on("choose",e[19]),{c(){fe(t.$$.fragment),n=E(),o=_("div"),fe(s.$$.fragment),r=E(),fe(i.$$.fragment),l=E(),fe(a.$$.fragment),N(o,"class","form--buttons svelte-jb5mrh")},m(e,d){pe(t,e,d),x(e,n,d),x(e,o,d),pe(s,o,null),k(o,r),pe(i,o,null),x(e,l,d),pe(a,e,d),c=!0},p(e,t){const n={};8388608&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n);const o={};8388608&t&&(o.$$scope={dirty:t,ctx:e}),i.$set(o);const r={};2&t&&(r.className=e[1].class),8&t&&(r.filterForReady=e[3]),16&t&&(r.praefix=e[4]),32&t&&(r.selectionFields=e[5]),1&t&&(r.rowId=e[0]),64&t&&(r.showEdit=e[6]),a.$set(r)},i(e){c||(le(t.$$.fragment,e),le(s.$$.fragment,e),le(i.$$.fragment,e),le(a.$$.fragment,e),c=!0)},o(e){ae(t.$$.fragment,e),ae(s.$$.fragment,e),ae(i.$$.fragment,e),ae(a.$$.fragment,e),c=!1},d(e){$e(t,e),e&&I(n),e&&I(o),$e(s),$e(i),e&&I(l),$e(a,e)}}}function st(e){let t;return{c(){t=C("Abbrechen")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function rt(e){let t;return{c(){t=C("Neu")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function it(e){let t,n,o,s;const r=[ot,nt],i=[];function l(e,t){return e[22].length&&!e[7]?0:1}return t=l(e),n=i[t]=r[t](e),{c(){n.c(),o=D()},m(e,n){i[t].m(e,n),x(e,o,n),s=!0},p(e,s){let a=t;t=l(e),t===a?i[t].p(e,s):(re(),ae(i[a],1,1,(()=>{i[a]=null})),ie(),n=i[t],n?n.p(e,s):(n=i[t]=r[t](e),n.c()),le(n,1),n.m(o.parentNode,o))},i(e){s||(le(n),s=!0)},o(e){ae(n),s=!1},d(e){i[t].d(e),e&&I(o)}}}function lt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function at(e){let t,n,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:lt,then:et,catch:Ze,value:22,blocks:[,,,]};return ce(n=e[13](e[2]),s),{c(){t=D(),s.block.c()},m(e,n){x(e,t,n),s.block.m(e,s.anchor=n),s.mount=()=>t.parentNode,s.anchor=t,o=!0},p(t,[o]){e=t,s.ctx=e,4&o&&n!==(n=e[13](e[2]))&&ce(n,s)||de(s,e,o)},i(e){o||(le(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ae(s.blocks[e])}o=!1},d(e){e&&I(t),s.block.d(e),s.token=null,s=null}}}function ct(e,t,n){const{Dialog:o,Divider:s,Button:r}=c,i=A();let{schema:l}=t,{recID:a}=t,{isOpening:d=!0}=t,{filterForReady:u=!1}=t,{praefix:m=""}=t,{selectionFields:f=!1}=t,{showEdit:p=!0}=t,$=l.identity.designation;l.class;let h,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),"praefix"in e&&n(4,m=e.praefix),"selectionFields"in e&&n(5,f=e.selectionFields),"showEdit"in e&&n(6,p=e.showEdit)},[a,l,d,u,m,f,p,g,h,o,s,r,$,e=>e&&uo(l.class,l.id),()=>{n(7,g=!1),a||i("back"),p||i("back")},()=>{n(7,g=!1),i("back")},()=>{n(0,a=!1),n(8,h=!1),n(7,g=!0)},e=>({detail:{row:e}})=>{let t=l.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let s=l.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(s){e[`${n}_${o}`]=e[n][o]}})),i("choose",{row:e})},({detail:e})=>{n(8,h=!!e._task.visum||"Closed"===e._task.status),n(0,a=e._docId),n(7,g=!0)},function(t){W(e,t)}]}class dt 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}",k(document.head,t)),he(this,e,ct,at,b,{schema:1,recID:0,isOpening:2,filterForReady:3,praefix:4,selectionFields:5,showEdit:6})}}function ut(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function mt(e){let t,n,s,r,i,l,a,c,d,u,m,f,p,$,h;n=new o({props:{class:"full-width",id:e[14],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;"}}),n.$on("click",e[16]),n.$on("onFocus",e[16]);const g=[pt,ft],v=[];function b(e,t){return e[2]?e[0]?1:-1:0}~(r=b(e))&&(i=v[r]=g[r](e));let y=!e[2]&&vt(e);function F(t){e[24](t)}let S={class:"tModal",noClickaway:!0,$$slots:{default:[bt]},$$scope:{ctx:e}};void 0!==e[9]&&(S.open=e[9]),m=new e[13]({props:S}),R.push((()=>me(m,"open",F)));let C=e[10]&&yt(e);return{c(){t=_("div"),fe(n.$$.fragment),s=E(),i&&i.c(),l=E(),a=_("input"),d=E(),y&&y.c(),u=E(),fe(m.$$.fragment),p=E(),C&&C.c(),$=D(),N(a,"class",c=w(e[4]||e[5])+" svelte-tbrk84"),N(a,"id",e[3]),N(a,"name",e[3]),a.value=e[0],a.hidden=!0,L(t,"position","relative")},m(e,o){x(e,t,o),pe(n,t,null),k(t,s),~r&&v[r].m(t,null),k(t,l),k(t,a),k(t,d),y&&y.m(t,null),x(e,u,o),pe(m,e,o),x(e,p,o),C&&C.m(e,o),x(e,$,o),h=!0},p(e,o){const s={};2&o[0]&&(s.value=e[1]),4&o[0]&&(s.disabled=e[2]),n.$set(s);let d=r;r=b(e),r===d?~r&&v[r].p(e,o):(i&&(re(),ae(v[d],1,1,(()=>{v[d]=null})),ie()),~r?(i=v[r],i?i.p(e,o):(i=v[r]=g[r](e),i.c()),le(i,1),i.m(t,l)):i=null),(!h||48&o[0]&&c!==(c=w(e[4]||e[5])+" svelte-tbrk84"))&&N(a,"class",c),(!h||8&o[0])&&N(a,"id",e[3]),(!h||8&o[0])&&N(a,"name",e[3]),(!h||1&o[0]&&a.value!==e[0])&&(a.value=e[0]),e[2]?y&&(re(),ae(y,1,1,(()=>{y=null})),ie()):y?(y.p(e,o),4&o[0]&&le(y,1)):(y=vt(e),y.c(),le(y,1),y.m(t,null));const u={};961&o[0]|2&o[1]&&(u.$$scope={dirty:o,ctx:e}),!f&&512&o[0]&&(f=!0,u.open=e[9],X((()=>f=!1))),m.$set(u),e[10]?C?(C.p(e,o),1024&o[0]&&le(C,1)):(C=yt(e),C.c(),le(C,1),C.m($.parentNode,$)):C&&(re(),ae(C,1,1,(()=>{C=null})),ie())},i(e){h||(le(n.$$.fragment,e),le(i),le(y),le(m.$$.fragment,e),le(C),h=!0)},o(e){ae(n.$$.fragment,e),ae(i),ae(y),ae(m.$$.fragment,e),ae(C),h=!1},d(e){e&&I(t),$e(n),~r&&v[r].d(),y&&y.d(),e&&I(u),$e(m,e),e&&I(p),C&&C.d(e),e&&I($)}}}function ft(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:gt,then:ht,catch:$t,value:31,blocks:[,,,]};return ce(e[20](),o),{c(){t=D(),o.block.c()},m(e,s){x(e,t,s),o.block.m(e,o.anchor=s),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){de(o,e=t,n)},i(e){n||(le(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ae(o.blocks[e])}n=!1},d(e){e&&I(t),o.block.d(e),o.token=null,o=null}}}function pt(e){let t,n,o,s,r;return n=new Ee({props:{size:"18"}}),{c(){t=_("span"),fe(n.$$.fragment),N(t,"class","feather pointer svelte-tbrk84")},m(i,l){x(i,t,l),pe(n,t,null),o=!0,s||(r=[j(t,"click",e[16]),j(t,"choose",e[17])],s=!0)},p:p,i(e){o||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n),s=!1,g(r)}}}function $t(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function ht(e){let t,n,o,s;return o=new _e({props:{size:"18"}}),{c(){t=_("span"),n=_("a"),fe(o.$$.fragment),N(n,"href",e[31]),N(n,"target","_blank"),N(t,"class","feather pointer svelte-tbrk84")},m(e,r){x(e,t,r),k(t,n),pe(o,n,null),s=!0},p:p,i(e){s||(le(o.$$.fragment,e),s=!0)},o(e){ae(o.$$.fragment,e),s=!1},d(e){e&&I(t),$e(o)}}}function gt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function vt(e){let t,n,o,s,r;return n=new xe({props:{size:"18"}}),{c(){t=_("span"),fe(n.$$.fragment),N(t,"class","feather2 pointer svelte-tbrk84")},m(i,l){x(i,t,l),pe(n,t,null),o=!0,s||(r=j(t,"click",e[19]),s=!0)},p:p,i(e){o||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n),s=!1,r()}}}function bt(e){let t,n;return t=new dt({props:{schema:e[8],recID:e[0],isOpening:e[9],filterForReady:"true",selectionFields:e[7],praefix:e[6]}}),t.$on("choose",e[17]),t.$on("back",e[18]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};256&n[0]&&(o.schema=e[8]),1&n[0]&&(o.recID=e[0]),512&n[0]&&(o.isOpening=e[9]),128&n[0]&&(o.selectionFields=e[7]),64&n[0]&&(o.praefix=e[6]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function yt(e){let t,n,o;function s(t){e[25](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[kt]},$$scope:{ctx:e}};return void 0!==e[10]&&(r.open=e[10]),t=new e[13]({props:r}),R.push((()=>me(t,"open",s))),{c(){fe(t.$$.fragment)},m(e,n){pe(t,e,n),o=!0},p(e,o){const s={};2305&o[0]|2&o[1]&&(s.$$scope={dirty:o,ctx:e}),!n&&1024&o[0]&&(n=!0,s.open=e[10],X((()=>n=!1))),t.$set(s)},i(e){o||(le(t.$$.fragment,e),o=!0)},o(e){ae(t.$$.fragment,e),o=!1},d(e){$e(t,e)}}}function wt(e){let t,n;return t=new yo({props:{schema:e[8],recID:e[0],readonly:!0}}),t.$on("back",e[18]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};256&n[0]&&(o.schema=e[8]),1&n[0]&&(o.recID=e[0]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function kt(e){let t,n;return t=new e[12]({props:{title:e[11],$$slots:{default:[wt]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};2048&n[0]&&(o.title=e[11]),257&n[0]|2&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function xt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function It(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:xt,then:mt,catch:ut,value:30,blocks:[,,,]};return ce(e[15](),o),{c(){t=D(),o.block.c()},m(e,s){x(e,t,s),o.block.m(e,o.anchor=s),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){de(o,e=t,n)},i(e){n||(le(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ae(o.blocks[e])}n=!1},d(e){e&&I(t),o.block.d(e),o.token=null,o=null}}}function Ft(e,n,o){const s=A(),{Dialog:r,Modal:i}=c;let{id:l}=n,{item:a}=n,{value:d=""}=n,{desc:u=""}=n,{noForm:m=!1}=n,{classId:p}=n,{eventId:$}=n,{disabled:h}=n,{readonly:g}=n,{praefix:v}=n,{selectionFields:b}=n;const y="comment_"+l;let w,k,x,I=!1;h||=g;const F=e=>{e&&(o(1,u=f(x,e)),s("change",{value:d,description:u}),s("task",{row:e}))},_=()=>{o(9,I=!1),o(10,w=!1)};return e.$$set=e=>{"id"in e&&o(3,l=e.id),"item"in e&&o(21,a=e.item),"value"in e&&o(0,d=e.value),"desc"in e&&o(1,u=e.desc),"noForm"in e&&o(4,m=e.noForm),"classId"in e&&o(5,p=e.classId),"eventId"in e&&o(22,$=e.eventId),"disabled"in e&&o(2,h=e.disabled),"readonly"in e&&o(23,g=e.readonly),"praefix"in e&&o(6,v=e.praefix),"selectionFields"in e&&o(7,b=e.selectionFields)},e.$$.update=()=>{2097409&e.$$.dirty[0]&&d&&x&&Promise.resolve(mo(a.refClass,x.id,d)).then((e=>F(e))),257&e.$$.dirty[0]&&!d&&x&&F({})},[d,u,h,l,m,p,v,b,x,I,w,k,r,i,y,async()=>{if(o(8,x=await t.getSchemaByClass(a.refClass)),$&&d&&!h){const e=await t.getSchema($);e.input?.find((e=>e===a.refClass))&&o(2,h=!0)}return o(11,k=x.identity.designation),!0},function(){o(9,I=!0)},({detail:e})=>{o(0,d=e.row._id),_()},_,()=>{o(0,d=o(1,u="")),s("change",{value:d,description:u}),s("task",{row:{_task:{event:x.id,_id:!1}}})},async()=>{if(!d)return;const e=(await mo(a.refClass,x.id,d))._task._id;return`/task/${x.id}/${e}/task?view=standalone`},a,$,g,function(e){I=e,o(9,I)},function(e){w=e,o(10,w)}]}class _t extends ge{constructor(e){var t;super(),document.getElementById("svelte-tbrk84-style")||((t=_("style")).id="svelte-tbrk84-style",t.textContent=".feather.svelte-tbrk84{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-tbrk84{position:absolute;top:0.75em;right:0.5em;color:#4300b0}",k(document.head,t)),he(this,e,Ft,It,b,{id:3,item:21,value:0,desc:1,noForm:4,classId:5,eventId:22,disabled:2,readonly:23,praefix:6,selectionFields:7},[-1,-1])}}function St(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"),fe(n.$$.fragment),L(t,"position","relative"),L(t,"max-width","10em")},m(e,s){x(e,t,s),pe(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||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n)}}}function Ct(e,t,n){let o;const r=A(),{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(s.getItem("Locale")),$=Number("1.1").toLocaleString(p.id).substring(1,2),{properties:h={}}=a;let{min:g,max:v,step:b,pattern:y,decimals:w=0,unit:k="",placeholder:x,hint:I,readonly:F,negative:_}=h;y||(y=w?`[0-9]+([${$}][0-9]{1,${w}})?`:"[0-9]*"),_&&(y="-?"+y);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,x,F,({detail:e})=>r("blur",{value:e.value}),({detail:e})=>{F||Number(d.toString().replace($,"."))||n(5,o="")},a,d]}class Et extends ge{constructor(e){super(),he(this,e,Ct,St,b,{id:0,item:13,value:14,noForm:1,classId:2,disabled:3})}}function Dt(e,t,n){const o=e.slice();return o[10]=t[n],o}function jt(e){let t,n,o,s=e[10]+"";return{c(){t=_("option"),n=C(s),t.__value=e[10],t.value=t.__value,t.selected=o=e[1]===e[10],N(t,"class","svelte-5xpzvo")},m(e,o){x(e,t,o),k(t,n)},p(e,n){2&n&&o!==(o=e[1]===e[10])&&(t.selected=o)},d(e){e&&I(t)}}}function Nt(e){let t,n,o,s,r,i=e[4],l=[];for(let t=0;t<i.length;t+=1)l[t]=jt(Dt(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,N(n,"class","svelte-5xpzvo"),N(t,"class",o=w(e[2]||e[3])+" svelte-5xpzvo"),N(t,"id",e[0]),N(t,"name",e[0]),N(t,"readonly",e[5])},m(o,i){x(o,t,i),k(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);s||(r=j(t,"change",e[6]),s=!0)},p(e,[n]){if(18&n){let o;for(i=e[4],o=0;o<i.length;o+=1){const s=Dt(e,i,o);l[o]?l[o].p(s,n):(l[o]=jt(s),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")&&N(t,"class",o),1&n&&N(t,"id",e[0]),1&n&&N(t,"name",e[0])},i:p,o:p,d(e){e&&I(t),F(l,e),s=!1,r()}}}function Ot(e,t,n){const o=A();let{id:s}=t,{item:r}=t,{value:i}=t,{noForm:l=!1}=t,{classId:a}=t,{disabled:c}=t;const{enum:d}=r.properties,u=c||r.properties.readonly;return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(7,r=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),"disabled"in e&&n(8,c=e.disabled)},[s,i,l,a,d,u,e=>o("blur",{value:e.srcElement.value}),r,c]}class zt 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}",k(document.head,t)),he(this,e,Ot,Nt,b,{id:0,item:7,value:1,noForm:2,classId:3,disabled:8})}}const Lt=/\d+/g,Tt=/%[HMSpPdmyY%]/g;function Pt(e){let t;return{c(){t=C("Stunden")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function Mt(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Pt]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Bt(e){let t;return{c(){t=C("Minuten")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function qt(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Bt]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function At(e){let t;return{c(){t=C("Jetzt")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function Wt(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[At]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Ht(e){let t,n,o,s,r,i,l,a,c;return s=new e[5]({props:{value:e[0],closeOnSelection:!0}}),s.$on("change",e[8]),i=new e[6]({props:{value:e[0],$$slots:{"now-label":[Wt],"minutes-label":[qt],"hours-label":[Mt]},$$scope:{ctx:e}}}),i.$on("change",e[7]),{c(){t=_("input"),o=E(),fe(s.$$.fragment),r=E(),fe(i.$$.fragment),N(t,"type","string"),N(t,"class",n=e[2]||e[3]),N(t,"id",e[1]),N(t,"name",e[1]),t.hidden=!0},m(n,d){x(n,t,d),z(t,e[0]),x(n,o,d),pe(s,n,d),x(n,r,d),pe(i,n,d),l=!0,a||(c=j(t,"input",e[9]),a=!0)},p(e,[o]){(!l||12&o&&n!==(n=e[2]||e[3]))&&N(t,"class",n),(!l||2&o)&&N(t,"id",e[1]),(!l||2&o)&&N(t,"name",e[1]),1&o&&z(t,e[0]);const r={};1&o&&(r.value=e[0]),s.$set(r);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),i.$set(a)},i(e){l||(le(s.$$.fragment,e),le(i.$$.fragment,e),l=!0)},o(e){ae(s.$$.fragment,e),ae(i.$$.fragment,e),l=!1},d(e){e&&I(t),e&&I(o),$e(s,e),e&&I(r),$e(i,e),a=!1,c()}}}function Rt(e,t,n){const o=A(),{Label:s,DatePicker:r,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,s,r,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 Yt extends ge{constructor(e){super(),he(this,e,Rt,Ht,b,{value:0,id:1,noForm:2,classId:3})}}function Vt(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:Gt,placeholder:Jt,readonly:e[4],disabled:e[5]}}),n.$on("change",e[7]),{c(){t=_("div"),fe(n.$$.fragment),L(t,"max-width","4em")},m(e,s){x(e,t,s),pe(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||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n)}}}const Gt="([01][0-9]|2[0-3]):([0-5][0-9])",Jt="";function Ut(e,t,n){const o=A(),{TextField:s}=c;let{id:r}=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,r=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)},[r,l,a,d,u,m,s,({detail:e})=>{o("blur",{value:f(e.value)})},i]}class Kt extends ge{constructor(e){super(),he(this,e,Ut,Vt,b,{id:0,item:8,value:1,noForm:2,classId:3,readonly:4,disabled:5})}}function Qt(e){let t,n;return t=new e[10]({props:{inputClass:e[2]||e[3],disabled:e[5],readonly:e[14],pattern:e[16],required:e[13],id:e[18],name:e[17],value:e[7]()}}),t.$on("change",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};12&n&&(o.inputClass=e[2]||e[3]),32&n&&(o.disabled=e[5]),128&n&&(o.value=e[7]()),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Xt(e){let t,n;return t=new e[10]({props:{inputClass:e[2]||e[3],disabled:e[5],readonly:e[14],required:e[13],type:"email",id:e[18],name:e[17],value:e[7]()}}),t.$on("change",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};12&n&&(o.inputClass=e[2]||e[3]),32&n&&(o.disabled=e[5]),128&n&&(o.value=e[7]()),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Zt(e){let t,n;return t=new Kt({props:{inputClass:e[2]||e[3],disabled:e[5],readonly:e[14],required:e[13],id:e[18],item:e[0],value:e[7]()}}),t.$on("blur",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};12&n&&(o.inputClass=e[2]||e[3]),32&n&&(o.disabled=e[5]),1&n&&(o.item=e[0]),128&n&&(o.value=e[7]()),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function en(e){let t,n;return t=new Yt({props:{classId:e[3],id:e[18],disabled:e[5],required:e[13],value:e[19](),noForm:e[2]}}),t.$on("change",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.classId=e[3]),32&n&&(o.disabled=e[5]),4&n&&(o.noForm=e[2]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function tn(e){let t,n;return t=new e[12]({props:{inputClass:e[2]||e[3],required:e[13],disabled:e[5],id:e[18],name:e[17],value:e[19](),closeOnSelection:!0}}),t.$on("change",e[20](!0)),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};12&n&&(o.inputClass=e[2]||e[3]),32&n&&(o.disabled=e[5]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function nn(e){let t,n;return t=new e[11]({props:{inputClass:e[2]||e[3],disabled:e[5],readonly:e[14],required:e[13],id:e[18],name:e[17],value:e[7]()}}),t.$on("change",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};12&n&&(o.inputClass=e[2]||e[3]),32&n&&(o.disabled=e[5]),128&n&&(o.value=e[7]()),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function on(e){let t,n;return t=new zt({props:{classId:e[3],disabled:e[5],required:e[13],id:e[18],item:e[0],value:e[7](),noForm:e[2]}}),t.$on("blur",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.classId=e[3]),32&n&&(o.disabled=e[5]),1&n&&(o.item=e[0]),128&n&&(o.value=e[7]()),4&n&&(o.noForm=e[2]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function sn(e){let t,n;return t=new Et({props:{classId:e[3],disabled:e[5],required:e[13],readonly:e[14],id:e[18],item:e[0],value:e[7](),noForm:e[2]}}),t.$on("blur",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.classId=e[3]),32&n&&(o.disabled=e[5]),1&n&&(o.item=e[0]),128&n&&(o.value=e[7]()),4&n&&(o.noForm=e[2]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function rn(e){let t,n;return t=new o({props:{classId:e[3],disabled:e[5],readonly:e[14],id:e[18],name:e[0].name,value:e[7](),noForm:e[2]}}),t.$on("blur",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.classId=e[3]),32&n&&(o.disabled=e[5]),1&n&&(o.name=e[0].name),128&n&&(o.value=e[7]()),4&n&&(o.noForm=e[2]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function ln(e){let t,n;return t=new _t({props:{classId:e[3],eventId:e[4],disabled:e[5],readonly:e[14],id:e[18],item:e[0],desc:e[8],value:e[7](),noForm:e[2],praefix:e[1],selectionFields:e[6]}}),t.$on("task",e[24]),t.$on("change",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.classId=e[3]),16&n&&(o.eventId=e[4]),32&n&&(o.disabled=e[5]),1&n&&(o.item=e[0]),256&n&&(o.desc=e[8]),128&n&&(o.value=e[7]()),4&n&&(o.noForm=e[2]),2&n&&(o.praefix=e[1]),64&n&&(o.selectionFields=e[6]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function an(e){let t,n,o,s;const r=[ln,rn,sn,on,nn,tn,en,Zt,Xt,Qt],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]=r[t](e),{c(){n.c(),o=D()},m(e,n){i[t].m(e,n),x(e,o,n),s=!0},p(e,s){let a=t;t=l(e),t===a?i[t].p(e,s):(re(),ae(i[a],1,1,(()=>{i[a]=null})),ie(),n=i[t],n?n.p(e,s):(n=i[t]=r[t](e),n.c()),le(n,1),n.m(o.parentNode,o))},i(e){s||(le(n),s=!0)},o(e){ae(n),s=!1},d(e){i[t].d(e),e&&I(o)}}}function cn(e){let t,n;return t=new e[9]({props:{id:e[21](e[18]),class:e[15]&&"hidden",name:e[0].designation,help:e[0].properties?.hint,$$slots:{default:[an]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(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),1073742335&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function dn(e,t,n){let o,s;const r=A(),{FormField:i,TextField:l,Switch:a,DatePicker:u,TimePicker:m}=c;let{praefix:f=""}=t,{item:p}=t,{listName:$=""}=t,{record:h}=t,{noForm:g=!1}=t,{classId:v}=t,{eventId:b}=t,{disabled:y}=t,{selectionFields:w}=t;const k=p.properties?.required,x=p.properties?.readonly,I=p.properties?.hidden,F=p.properties?.pattern;if("string"==typeof p.name){const[e,t]=p.name.split("_");t&&(p.name=t)}const _=($?$+".":"")+p.name,S=_+(""!==f?"-"+f:""),C=(e,t=_)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}},E=C(h);return e.$$set=e=>{"praefix"in e&&n(1,f=e.praefix),"item"in e&&n(0,p=e.item),"listName"in e&&n(23,$=e.listName),"record"in e&&n(22,h=e.record),"noForm"in e&&n(2,g=e.noForm),"classId"in e&&n(3,v=e.classId),"eventId"in e&&n(4,b=e.eventId),"disabled"in e&&n(5,y=e.disabled),"selectionFields"in e&&n(6,w=e.selectionFields)},e.$$.update=()=>{4194304&e.$$.dirty&&n(7,o=(e=_)=>{let t=C(h);return void 0===t?"":t})},n(8,s=((e=_)=>{let t=h["_"+e];return t=d(t),void 0===t?"":t})()),[p,f,g,v,b,y,w,o,s,i,l,a,u,k,x,I,F,_,S,(e=_)=>{let t=C(h);return t?new Date(t):new Date},e=>({detail:t})=>{const o=t.value;n(22,h[_]=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,h);const s=Object.values(h).every((e=>!e))&&o;r("notify",{oldValue:E,value:o,add:s,itemName:_,desc:t.description})},()=>"object"===p.type?"comment_"+S:S,h,$,function(t){W(e,t)}]}class un 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}",k(document.head,t)),he(this,e,dn,cn,b,{praefix:1,item:0,listName:23,record:22,noForm:2,classId:3,eventId:4,disabled:5,selectionFields:6})}}const{document:mn}=ue;function fn(e,t,n){const o=e.slice();return o[41]=t[n],o[43]=n,o}function pn(e,t,n){const o=e.slice();return o[50]=t[n],o}function $n(e,t,n){const o=e.slice();return o[45]=t[n].title,o[46]=t[n].toDelete,o[47]=t[n].icon,o}function hn(e){let t,n,o;function s(t){e[25](t)}let r={item:e[16],disabled:!0};return void 0!==e[8]&&(r.value=e[8]),t=new Et({props:r}),R.push((()=>me(t,"value",s))),{c(){fe(t.$$.fragment)},m(e,n){pe(t,e,n),o=!0},p(e,o){const s={};!n&&256&o[0]&&(n=!0,s.value=e[8],X((()=>n=!1))),t.$set(s)},i(e){o||(le(t.$$.fragment,e),o=!0)},o(e){ae(t.$$.fragment,e),o=!1},d(e){$e(t,e)}}}function gn(e){let t,n,o;function s(t){e[26](t)}let r={item:e[14],disabled:!0};return void 0!==e[5]&&(r.value=e[5]),t=new Et({props:r}),R.push((()=>me(t,"value",s))),{c(){fe(t.$$.fragment)},m(e,n){pe(t,e,n),o=!0},p(e,o){const s={};!n&&32&o[0]&&(n=!0,s.value=e[5],X((()=>n=!1))),t.$set(s)},i(e){o||(le(t.$$.fragment,e),o=!0)},o(e){ae(t.$$.fragment,e),o=!1},d(e){$e(t,e)}}}function vn(e){let t,n;return t=new e[12]({props:{$$slots:{handle:[In,({toggle:e})=>({44:e}),({toggle:e})=>[0,e?8192:0]],default:[yn,({toggle:e})=>({44:e}),({toggle:e})=>[0,e?8192:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){v(e[40])&&e[40].apply(this,arguments)})),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(n,o){e=n;const s={};207&o[0]|4202496&o[1]&&(s.$$scope={dirty:o,ctx:e}),t.$set(s)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function bn(e){let t,n;return t=new un({props:{praefix:e[43],item:e[50],eventId:e[3],record:e[41],noForm:Cn,classId:e[2],disabled:e[0],selectionFields:e[17]}}),t.$on("notify",(function(){v(e[19](e[50],e[43]))&&e[19](e[50],e[43]).apply(this,arguments)})),t.$on("task",e[27]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(n,o){e=n;const s={};2&o[0]&&(s.item=e[50]),8&o[0]&&(s.eventId=e[3]),64&o[0]&&(s.record=e[41]),4&o[0]&&(s.classId=e[2]),1&o[0]&&(s.disabled=e[0]),t.$set(s)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function yn(e){let t,n,o,s,r=e[1].item,i=[];for(let t=0;t<r.length;t+=1)i[t]=bn(pn(e,r,t));const l=e=>ae(i[e],1,1,(()=>{i[e]=null}));return{c(){t=_("div");for(let e=0;e<i.length;e+=1)i[e].c();o=E(),N(t,"id",n=`accordion-content-${e[2]}-${e[1].name}-${e[43]}`)},m(e,n){x(e,t,n);for(let e=0;e<i.length;e+=1)i[e].m(t,null);x(e,o,n),s=!0},p(e,o){if(655439&o[0]){let n;for(r=e[1].item,n=0;n<r.length;n+=1){const s=pn(e,r,n);i[n]?(i[n].p(s,o),le(i[n],1)):(i[n]=bn(s),i[n].c(),le(i[n],1),i[n].m(t,null))}for(re(),n=r.length;n<i.length;n+=1)l(n);ie()}(!s||6&o[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}-${e[43]}`))&&N(t,"id",n)},i(e){if(!s){for(let e=0;e<r.length;e+=1)le(i[e]);s=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ae(i[e]);s=!1},d(e){e&&I(t),F(i,e),e&&I(o)}}}function wn(e){let t,n,o=e[18](e[7],e[43])+"";return{c(){t=_("span"),n=C(o),N(t,"class","svelte-6jvaou"),T(t,"delete",e[41]._delete)},m(e,o){x(e,t,o),k(t,n)},p(e,s){128&s[0]&&o!==(o=e[18](e[7],e[43])+"")&&O(n,o),64&s[0]&&T(t,"delete",e[41]._delete)},d(e){e&&I(t)}}}function kn(e){let t,n,o;var s=e[47];return s&&(t=new s({props:{size:"20"}})),{c(){t&&fe(t.$$.fragment),n=D()},m(e,s){t&&pe(t,e,s),x(e,n,s),o=!0},p(e,o){if(s!==(s=e[47])){if(t){re();const e=t;ae(e.$$.fragment,1,0,(()=>{$e(e,1)})),ie()}s?(t=new s({props:{size:"20"}}),fe(t.$$.fragment),le(t.$$.fragment,1),pe(t,n.parentNode,n)):t=null}},i(e){o||(t&&le(t.$$.fragment,e),o=!0)},o(e){t&&ae(t.$$.fragment,e),o=!1},d(e){e&&I(n),t&&$e(t,e)}}}function xn(e){let t,n,o,s,r,i=!e[0]&&kn(e);return{c(){t=_("span"),i&&i.c(),N(t,"class","pointer icon svelte-6jvaou"),N(t,"title",e[45]),t.hidden=n=e[43]===e[6].length-1||!(e[41]._delete^e[46])},m(n,l){x(n,t,l),i&&i.m(t,null),o=!0,s||(r=j(t,"click",e[21](e[43])),s=!0)},p(s,r){(e=s)[0]?i&&(re(),ae(i,1,1,(()=>{i=null})),ie()):i?(i.p(e,r),1&r[0]&&le(i,1)):(i=kn(e),i.c(),le(i,1),i.m(t,null)),(!o||64&r[0]&&n!==(n=e[43]===e[6].length-1||!(e[41]._delete^e[46])))&&(t.hidden=n)},i(e){o||(le(i),o=!0)},o(e){ae(i),o=!1},d(e){e&&I(t),i&&i.d(),s=!1,r()}}}function In(e){let t,n,o,s,r;n=new e[10]({props:{$$slots:{default:[wn]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[20](e[44],e[43]))&&e[20](e[44],e[43]).apply(this,arguments)}));let i=[{title:"löschen",toDelete:!0,icon:xe},{title:"undo",toDelete:!1,icon:ye}],l=[];for(let t=0;t<2;t+=1)l[t]=xn($n(e,i,t));const a=e=>ae(l[e],1,1,(()=>{l[e]=null}));return{c(){t=_("div"),fe(n.$$.fragment),o=E();for(let e=0;e<2;e+=1)l[e].c();s=E(),N(t,"class","accordion svelte-6jvaou"),N(t,"slot","handle")},m(e,i){x(e,t,i),pe(n,t,null),k(t,o);for(let e=0;e<2;e+=1)l[e].m(t,null);k(t,s),r=!0},p(o,r){e=o;const c={};if(192&r[0]|4194304&r[1]&&(c.$$scope={dirty:r,ctx:e}),n.$set(c),2097217&r[0]){let n;for(i=[{title:"löschen",toDelete:!0,icon:xe},{title:"undo",toDelete:!1,icon:ye}],n=0;n<2;n+=1){const o=$n(e,i,n);l[n]?(l[n].p(o,r),le(l[n],1)):(l[n]=xn(o),l[n].c(),le(l[n],1),l[n].m(t,s))}for(re(),n=2;n<2;n+=1)a(n);ie()}},i(e){if(!r){le(n.$$.fragment,e);for(let e=0;e<2;e+=1)le(l[e]);r=!0}},o(e){ae(n.$$.fragment,e),l=l.filter(Boolean);for(let e=0;e<2;e+=1)ae(l[e]);r=!1},d(e){e&&I(t),$e(n),F(l,e)}}}function Fn(e){let t,n,o=(!e[4]&&!e[0]||e[43]<e[6].length-1)&&vn(e);return{c(){o&&o.c(),t=D()},m(e,s){o&&o.m(e,s),x(e,t,s),n=!0},p(e,n){!e[4]&&!e[0]||e[43]<e[6].length-1?o?(o.p(e,n),81&n[0]&&le(o,1)):(o=vn(e),o.c(),le(o,1),o.m(t.parentNode,t)):o&&(re(),ae(o,1,1,(()=>{o=null})),ie())},i(e){n||(le(o),n=!0)},o(e){ae(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function _n(e){let t,n,o=e[6],s=[];for(let t=0;t<o.length;t+=1)s[t]=Fn(fn(e,o,t));const r=e=>ae(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=D()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(4063455&n[0]|8704&n[1]){let i;for(o=e[6],i=0;i<o.length;i+=1){const r=fn(e,o,i);s[i]?(s[i].p(r,n),le(s[i],1)):(s[i]=Fn(r),s[i].c(),le(s[i],1),s[i].m(t.parentNode,t))}for(re(),i=o.length;i<s.length;i+=1)r(i);ie()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)le(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)ae(s[e]);n=!1},d(e){F(s,e),e&&I(t)}}}function Sn(e){let t,n,o,s,r,i=e[15]&&function(e){let t,n;return t=new e[9]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[hn]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};256&n[0]|4194304&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}(e),l=e[13]&&function(e){let t,n;return t=new e[9]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[gn]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};32&n[0]|4194304&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}(e);return s=new e[11]({props:{$$slots:{default:[_n,({closeOtherPanels:e})=>({40:e}),({closeOtherPanels:e})=>[0,e?512:0]]},$$scope:{ctx:e}}}),{c(){t=_("div"),i&&i.c(),n=E(),l&&l.c(),o=E(),fe(s.$$.fragment),N(t,"class","formList")},m(e,a){x(e,t,a),i&&i.m(t,null),k(t,n),l&&l.m(t,null),k(t,o),pe(s,t,null),r=!0},p(e,t){e[15]&&i.p(e,t),e[13]&&l.p(e,t);const n={};223&t[0]|4194816&t[1]&&(n.$$scope={dirty:t,ctx:e}),s.$set(n)},i(e){r||(le(i),le(l),le(s.$$.fragment,e),r=!0)},o(e){ae(i),ae(l),ae(s.$$.fragment,e),r=!1},d(e){e&&I(t),i&&i.d(),l&&l.d(),$e(s)}}}const Cn=!0;function En(e,t,n){let o,s;const{FormField:r,TextField:i,Button:l,Accordion:a,AccordionSection:f}=c,p=A();let{list:$}=t,{schema:h}=t,{record:g}=t,{classId:v}=t,{eventId:b}=t,{disabled:y}=t,{fixed:w}=t;const k=h.find((e=>"price"===e.name&&!e.properties?.hidden)),x=k&&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=h.properties?.readonly;y||=C;let E,D,j=[];h.filter((e=>e.selection)).map((e=>j.push({refClass:e.selection,value:""})));const N=(e,t)=>{if(!t)return;const o=h.find((e=>e.name===t)),s=o.properties.value.formula,{operator:r,argument:i}=s,l=i.map((t=>E[e][t.refItem]));let a=0;"$add"===r&&(a=l.reduce(((e,t)=>e+ +t))),"$subtract"===r&&(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[s,r]=t.split(":");return s?e-=r?(+s+ +r/60).toFixed(2):+s:0}))),n(6,E[e][t]=(a||0).toFixed(o.properties.decimals||0),E)};D=h.filter((e=>e.refClass)).reduce((async(e,t)=>{e=await e;const n=h.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,o]=t.selection.split(":"),[s]=o.split(".");s&&e.push({refClass:s,items:[n],selection:t.selection})}const o={refClass:t.refClass,items:[]};return n.forEach((e=>{o.items.push(e.name)})),e.push(o),e}),[]);const O=async(e,t,o,s)=>{const r=(await D).find((e=>e.refClass===t.refClass));if(!r)return;const{refClass:i,items:l,selection:a}=r;return o?Promise.all(l.map((r=>{let c="";const{refInput:d}=t;if(d&&E[e]){const[t,n]=d.split(".");c=n?E[e][n]:g[t]}if(a&&o!==s)return Promise.resolve(l.map((t=>{n(6,E[e][t]="",E)})));if(d&&!c||z(e,r)){const o=h.find((e=>e.refClass===i)),s=E[e][o.name];if(t.selection){const o=po(t.selection+s.toString());if(o)return Promise.resolve(o).then((t=>n(6,E[e][r]=t[r],E)))}return Promise.resolve($o(o.refClass,s)).then((t=>n(6,E[e][r]=t[r],E)))}}))):Promise.resolve(l.map((t=>{n(6,E[e][t]="",E)})))},z=(e,t)=>{let n=E[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&&n(1,$=e.list),"schema"in e&&n(22,h=e.schema),"record"in e&&n(23,g=e.record),"classId"in e&&n(2,v=e.classId),"eventId"in e&&n(3,b=e.eventId),"disabled"in e&&n(0,y=e.disabled),"fixed"in e&&n(4,w=e.fixed)},e.$$.update=()=>{8388610&e.$$.dirty[0]&&g&&n(6,E=(g[$.name]||[]).concat({})),64&e.$$.dirty[0]&&n(7,o=E),226&e.$$.dirty[0]&&o&&((()=>{if(F)n(8,_=E?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(k)n(5,I=E?.reduce(((e,t)=>{if(t.price){const n=(x?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),p("save",{listName:$.name,value:E,amountValue:I})),16777216&e.$$.dirty[0]&&(s=e=>S[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[y,$,v,b,w,I,E,o,_,r,l,a,f,k,{name:"amountValue",properties:{decimals:2}},F,{name:"hoursValue",properties:{decimals:2}},j,(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)=>async({detail:s})=>{const{oldValue:r,value:i,add:l,desc:a}=s;N(t,e._formulaActor);const c=j?.find((t=>t.refClass.split(":")[1].split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,i)),i&&E.length===t+1&&n(6,E=E.concat({})),a&&n(24,S[i]=a,S),await O(t,e,i,r),n(7,o=E)},(e,t)=>n=>{e(n);const o=`#accordion-content-${v}-${$.name}-${t} > div.form-field:not(.hidden)`,s=document.querySelectorAll(o),r=s[s.length-1];K().then((()=>r.scrollIntoView({behavior:"smooth",block:"end"})))},e=>()=>{n(6,E[e]._delete=!E[e]._delete,E)},h,g,S,function(e){_=e,n(8,_)},function(e){I=e,n(5,I)},function(t){W(e,t)}]}class Dn extends ge{constructor(e){var t;super(),mn.getElementById("svelte-6jvaou-style")||((t=_("style")).id="svelte-6jvaou-style",t.textContent=".accordion.svelte-6jvaou{display:flex;overflow:hidden}.formList .accordion > .btn{display:inline-block;margin-bottom:1em;background-color:#F5F5F5}.sTask .formList .accordion > .btn{width:95% !important}.sEmbedded .formList .accordion > .btn{width:97%}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-6jvaou{padding-top:1em}span.delete.svelte-6jvaou{text-decoration:line-through}.icon.svelte-6jvaou{margin-right:-0.75em}.form-field .formField_italic{font-style:italic}",k(mn.head,t)),he(this,e,En,Sn,b,{list:1,schema:22,record:23,classId:2,eventId:3,disabled:0,fixed:4},[-1,-1])}}const{document:jn}=ue;function Nn(e,t,n){const o=e.slice();return o[17]=t[n],o}function On(e){let t,n;return t=new un({props:{classId:e[2],item:e[17],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4]}}),t.$on("notify",e[10]),t.$on("task",e[13]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[17]),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||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function zn(e){let t,n,o,s=e[1].item,r=[];for(let t=0;t<s.length;t+=1)r[t]=On(Nn(e,s,t));const i=e=>ae(r[e],1,1,(()=>{r[e]=null}));return{c(){t=_("div");for(let e=0;e<r.length;e+=1)r[e].c();N(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){x(e,t,n);for(let e=0;e<r.length;e+=1)r[e].m(t,null);o=!0},p(e,l){if(1055&l){let n;for(s=e[1].item,n=0;n<s.length;n+=1){const o=Nn(e,s,n);r[n]?(r[n].p(o,l),le(r[n],1)):(r[n]=On(o),r[n].c(),le(r[n],1),r[n].m(t,null))}for(re(),n=s.length;n<r.length;n+=1)i(n);ie()}(!o||6&l&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&N(t,"id",n)},i(e){if(!o){for(let e=0;e<s.length;e+=1)le(r[e]);o=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ae(r[e]);o=!1},d(e){e&&I(t),F(r,e)}}}function Ln(e){let t,n,o=e[9](e[5])+"";return{c(){t=_("span"),n=C(o)},m(e,o){x(e,t,o),k(t,n)},p(e,t){32&t&&o!==(o=e[9](e[5])+"")&&O(n,o)},d(e){e&&I(t)}}}function Tn(e){let t,n,o;return n=new e[6]({props:{$$slots:{default:[Ln]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[11](e[16]))&&e[11](e[16]).apply(this,arguments)})),{c(){t=_("div"),fe(n.$$.fragment),N(t,"class","accordion svelte-148ktt9"),N(t,"slot","handle")},m(e,s){x(e,t,s),pe(n,t,null),o=!0},p(t,o){e=t;const s={};1048608&o&&(s.$$scope={dirty:o,ctx:e}),n.$set(s)},i(e){o||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n)}}}function Pn(e){let t,n;return t=new e[8]({props:{$$slots:{handle:[Tn,({toggle:e})=>({16:e}),({toggle:e})=>e?65536:0],default:[zn,({toggle:e})=>({16:e}),({toggle:e})=>e?65536:0]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};1114175&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Mn(e){let t,n,o;return n=new e[7]({props:{$$slots:{default:[Pn]},$$scope:{ctx:e}}}),{c(){t=_("div"),fe(n.$$.fragment),N(t,"class","formList")},m(e,s){x(e,t,s),pe(n,t,null),o=!0},p(e,[t]){const o={};1048639&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n)}}}function Bn(e,t,n){const{Button:o,Accordion:s,AccordionSection:r}=c;let{list:i}=t,{schema:l}=t,{record:a}=t,{classId:f}=t,{eventId:p}=t,{disabled:$}=t;const h={};let g=a[i.name]||{};a[i.name]=g;const v=e=>h[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(12,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,$,g,o,s,r,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&&(h[o]=e.desc);const s=a[t];n(0,a[t]={...s,[o]:e.value},a),n(5,g=a[t])},e=>t=>{e(t);const n=`#accordion-content-${f}-${i.name} > div.form-field:last-child`,o=document.querySelector(n);K().then((()=>o.scrollIntoView({behavior:"smooth",block:"end"})))},l,function(t){W(e,t)}]}class qn extends ge{constructor(e){var t;super(),jn.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}}",k(jn.head,t)),he(this,e,Bn,Mn,b,{list:1,schema:12,record:0,classId:2,eventId:3,disabled:4})}}const{Boolean:An,document:Wn}=ue;function Hn(e,t,n){const o=e.slice();return o[49]=t[n],o}function Rn(e,t,n){const o=e.slice();return o[52]=t[n],o}function Yn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Vn(e){let t,n,o=e[48]&&function(e){let t,n,o,s,r,i,l,a,c,d,u,m,f,p,$,h,g,v,b=e[0].items,y=[];for(let t=0;t<b.length;t+=1)y[t]=Jn(Rn(e,b,t));const S=e=>ae(y[e],1,1,(()=>{y[e]=null}));let C=e[0].list&&Un(e);m=new e[7]({props:{outline:!0,$$slots:{default:[to]},$$scope:{ctx:e}}}),m.$on("click",e[17]),p=new e[7]({props:{disabled:e[4],form:e[9],filled:!0,type:"submit",$$slots:{default:[no]},$$scope:{ctx:e}}});let D=e[1]&&!e[4]&&oo(e);return{c(){t=_("section"),n=_("form"),o=_("input"),r=E();for(let e=0;e<y.length;e+=1)y[e].c();i=E(),C&&C.c(),l=E(),a=_("div"),c=_("small"),c.textContent=`${vo}`,d=E(),u=_("div"),fe(m.$$.fragment),f=E(),fe(p.$$.fragment),$=E(),D&&D.c(),N(o,"class",w(e[9])+" svelte-1dh1s6w"),N(o,"name","_id"),N(o,"type","hidden"),o.value=s=e[2]._id||"",N(n,"class",w(e[10])+" svelte-1dh1s6w"),N(n,"id",e[9]),N(a,"class","comment svelte-1dh1s6w"),N(u,"class","form--buttons svelte-1dh1s6w"),N(t,"class",w(e[11])+" svelte-1dh1s6w")},m(s,b){x(s,t,b),k(t,n),k(n,o),k(n,r);for(let e=0;e<y.length;e+=1)y[e].m(n,null);var w;k(n,i),C&&C.m(n,null),k(t,l),k(t,a),k(a,c),k(t,d),k(t,u),pe(m,u,null),k(u,f),pe(p,u,null),k(u,$),D&&D.m(u,null),h=!0,g||(v=j(n,"submit",(w=e[16],function(e){return e.preventDefault(),w.call(this,e)})),g=!0)},p(e,t){if((!h||4&t[0]&&s!==(s=e[2]._id||""))&&(o.value=s),262677&t[0]){let o;for(b=e[0].items,o=0;o<b.length;o+=1){const s=Rn(e,b,o);y[o]?(y[o].p(s,t),le(y[o],1)):(y[o]=Jn(s),y[o].c(),le(y[o],1),y[o].m(n,i))}for(re(),o=b.length;o<y.length;o+=1)S(o);ie()}e[0].list?C?(C.p(e,t),1&t[0]&&le(C,1)):(C=Un(e),C.c(),le(C,1),C.m(n,null)):C&&(re(),ae(C,1,1,(()=>{C=null})),ie());const r={};16777216&t[1]&&(r.$$scope={dirty:t,ctx:e}),m.$set(r);const l={};16&t[0]&&(l.disabled=e[4]),16777216&t[1]&&(l.$$scope={dirty:t,ctx:e}),p.$set(l),e[1]&&!e[4]?D?(D.p(e,t),18&t[0]&&le(D,1)):(D=oo(e),D.c(),le(D,1),D.m(u,null)):D&&(re(),ae(D,1,1,(()=>{D=null})),ie())},i(e){if(!h){for(let e=0;e<b.length;e+=1)le(y[e]);le(C),le(m.$$.fragment,e),le(p.$$.fragment,e),le(D),h=!0}},o(e){y=y.filter(An);for(let e=0;e<y.length;e+=1)ae(y[e]);ae(C),ae(m.$$.fragment,e),ae(p.$$.fragment,e),ae(D),h=!1},d(e){e&&I(t),F(y,e),C&&C.d(),$e(m),$e(p),D&&D.d(),g=!1,v()}}}(e);return{c(){o&&o.c(),t=D()},m(e,s){o&&o.m(e,s),x(e,t,s),n=!0},p(e,t){e[48]&&o.p(e,t)},i(e){n||(le(o),n=!0)},o(e){ae(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Gn(e){let t,n;return t=new un({props:{classId:e[9],item:e[52],record:e[2],disabled:e[4],eventId:e[0].id}}),t.$on("task",e[18]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[52]),4&n[0]&&(o.record=e[2]),16&n[0]&&(o.disabled=e[4]),1&n[0]&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Jn(e){let t,n,o="list"!==e[52].type&&Gn(e);return{c(){o&&o.c(),t=D()},m(e,s){o&&o.m(e,s),x(e,t,s),n=!0},p(e,n){"list"!==e[52].type?o?(o.p(e,n),1&n[0]&&le(o,1)):(o=Gn(e),o.c(),le(o,1),o.m(t.parentNode,t)):o&&(re(),ae(o,1,1,(()=>{o=null})),ie())},i(e){n||(le(o),n=!0)},o(e){ae(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Un(e){let t,n,o,s=e[12]&&e[3]>0&&Kn(e),r=e[0].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=eo(Hn(e,r,t));const l=e=>ae(i[e],1,1,(()=>{i[e]=null}));return{c(){s&&s.c(),t=E();for(let e=0;e<i.length;e+=1)i[e].c();n=D()},m(e,r){s&&s.m(e,r),x(e,t,r);for(let t=0;t<i.length;t+=1)i[t].m(e,r);x(e,n,r),o=!0},p(e,o){if(e[12]&&e[3]>0?s?(s.p(e,o),8&o[0]&&le(s,1)):(s=Kn(e),s.c(),le(s,1),s.m(t.parentNode,t)):s&&(re(),ae(s,1,1,(()=>{s=null})),ie()),524821&o[0]){let t;for(r=e[0].list,t=0;t<r.length;t+=1){const s=Hn(e,r,t);i[t]?(i[t].p(s,o),le(i[t],1)):(i[t]=eo(s),i[t].c(),le(i[t],1),i[t].m(n.parentNode,n))}for(re(),t=r.length;t<i.length;t+=1)l(t);ie()}},i(e){if(!o){le(s);for(let e=0;e<r.length;e+=1)le(i[e]);o=!0}},o(e){ae(s),i=i.filter(An);for(let e=0;e<i.length;e+=1)ae(i[e]);o=!1},d(e){s&&s.d(e),e&&I(t),F(i,e),e&&I(n)}}}function Kn(e){let t,n;return t=new e[8]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[Qn]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};8&n[0]|16777216&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Qn(e){let t,n,o;function s(t){e[29](t)}let r={item:e[13],disabled:!0};return void 0!==e[3]&&(r.value=e[3]),t=new Et({props:r}),R.push((()=>me(t,"value",s))),{c(){fe(t.$$.fragment)},m(e,n){pe(t,e,n),o=!0},p(e,o){const s={};!n&&8&o[0]&&(n=!0,s.value=e[3],X((()=>n=!1))),t.$set(s)},i(e){o||(le(t.$$.fragment,e),o=!0)},o(e){ae(t.$$.fragment,e),o=!1},d(e){$e(t,e)}}}function Xn(e){let t,n;return t=new qn({props:{classId:e[9],list:e[49],eventId:e[0].id,schema:e[49].item,record:e[2],disabled:e[4]}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[49]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[49].item),4&n[0]&&(o.record=e[2]),16&n[0]&&(o.disabled=e[4]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Zn(e){let t,n;return t=new Dn({props:{classId:e[9],list:e[49],eventId:e[0].id,schema:e[49].item,record:e[2],disabled:e[4],fixed:e[49].fixed}}),t.$on("save",e[19]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[49]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[49].item),4&n[0]&&(o.record=e[2]),16&n[0]&&(o.disabled=e[4]),1&n[0]&&(o.fixed=e[49].fixed),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function eo(e){let t,n,o,s,r,i;t=new e[6]({props:{text:e[49].designation}});const l=[Zn,Xn],a=[];function c(e,t){return"array"===e[49].type?0:1}return o=c(e),s=a[o]=l[o](e),{c(){fe(t.$$.fragment),n=E(),s.c(),r=D()},m(e,s){pe(t,e,s),x(e,n,s),a[o].m(e,s),x(e,r,s),i=!0},p(e,n){const i={};1&n[0]&&(i.text=e[49].designation),t.$set(i);let d=o;o=c(e),o===d?a[o].p(e,n):(re(),ae(a[d],1,1,(()=>{a[d]=null})),ie(),s=a[o],s?s.p(e,n):(s=a[o]=l[o](e),s.c()),le(s,1),s.m(r.parentNode,r))},i(e){i||(le(t.$$.fragment,e),le(s),i=!0)},o(e){ae(t.$$.fragment,e),ae(s),i=!1},d(e){$e(t,e),e&&I(n),a[o].d(e),e&&I(r)}}}function to(e){let t;return{c(){t=C("Abbrechen")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function no(e){let t;return{c(){t=C("Speichern und schliessen")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function oo(e){let t,n;return t=new e[7]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[so]},$$scope:{ctx:e}}}),t.$on("click",e[15]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};16777216&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function so(e){let t;return{c(){t=C("Speichern")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function ro(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function io(e){let t,n,o,s;Wn.title=t=e[5];let r={ctx:e,current:null,token:null,hasCatch:!1,pending:ro,then:Vn,catch:Yn,value:48,blocks:[,,,]};return ce(e[14](),r),{c(){n=E(),o=D(),r.block.c()},m(e,t){x(e,n,t),x(e,o,t),r.block.m(e,r.anchor=t),r.mount=()=>o.parentNode,r.anchor=o,s=!0},p(n,o){e=n,(!s||32&o[0])&&t!==(t=e[5])&&(Wn.title=t),de(r,e,o)},i(e){s||(le(r.block),s=!0)},o(e){for(let e=0;e<3;e+=1){ae(r.blocks[e])}s=!1},d(e){e&&I(n),e&&I(o),r.block.d(e),r.token=null,r=null}}}let lo=new Map,ao=new Map,co=new Map;const uo=(e,n)=>{const o=n;return lo.has(o)||lo.set(o,t.getTasksList(n).then((({data:e})=>e))),lo.get(o)},mo=(e,n,o)=>ao.get(o)||uo(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(ao.set(o,e),e))),fo=(e,t)=>{co.set(e,t)},po=e=>co.get(e),$o=(e,n)=>co.get(n)||t.getTask(e,n).then((e=>(co.set(n,e),e))),ho=(e,n)=>{if(!lo.get(n))return;const o=n;lo.set(o,t.getTasksList(n).then((({data:e})=>e)))},go=()=>{lo=new Map,ao=new Map,co=new Map};let vo="";function bo(e,o,a){let d,u,m,p;y(e,i,(e=>a(32,m=e))),y(e,l,(e=>a(33,p=e)));const{Divider:$,Button:h,FormField:g}=c,v=JSON.parse(s.getItem("Locale")),b=A();let w,k,{schema:x}=o,{recID:I}=o,{prevEventID:F=!1}=o,{prev:_=!1}=o,{taskId:S=!1}=o,{description:C=""}=o,{root:E=!1}=o,{readonly:D}=o,{isStandalone:j}=o,N={},O={},z="form-"+x.class+Math.floor(9e3*Math.random()+1e3).toString();const L=E?"fEmbedded":"fTask",T=E?"sEmbedded":"sTask",P=!!x.list.find((e=>"array"===e.type));let M=0;const B={},W=async()=>{if(!x.input)return;if(!x.input.length)return;if(x.input.length<2)return;const e=await t.getEvent(x.id),n=!e.input.class[0].name&&e.input.class[0].selection;if(!n)return;const o=e.input.class[1].name,s=e.input.class[1].destination?.split(".")[0];if(!o||!s)return;const r=x.list?.find((e=>e.name===o));if(!r)return;const i=await t.getSchemaByClass(n),l=(await t.getTasks(i.id)).data;if(!l?.length)return;const c=[];for(const e of l){const t={};for(const n of r.item)n.name===s?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);c.push(t)}c.length&&a(2,N[o]=c,N)},H=()=>{for(const e of x.items)e.properties?.value?.concatenation&&R(e)},R=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 Y(e.refItemNext));a(2,N[e.name]=n,N)},Y=async e=>{const[n,o]=e.offset?.split(",")||[0,0],s=+e.base||0,r=+e.step||1;e.type;const i=e.refItem,l=await t.getLastId(x.class,i);if(!l?.length)return(s+r).toString().padStart(o,"0");const a=l[0][i];return((+a?.substring(n,n+o)||s)+r).toString().padStart(o,"0")},V=(e,t)=>{const n=t.name,o=e.find((e=>e.name===n));let s=t.value;if(s&&o&&o.type.startsWith("date"))try{return function(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let s=!1;if(""===e)return null;const r=t.split(Tt);let i=0,l=0;const a=new Date(0);for(const c of r){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)s=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;s=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{Lt.lastIndex=i;const r=Lt.exec(e);if(null==r)return n;switch(t[l]){case"H":a.setHours(parseInt(r[0])+12*s);break;case"M":a.setMinutes(r[0]);break;case"S":a.setSeconds(r[0]);break;case"d":a.setDate(r[0]);break;case"m":a.setMonth(r[0]-1);break;case"y":a.setFullYear(100*o+parseInt(r[0]));break;case"Y":a.setFullYear(r[0])}i+=r[0].length}l++}return isNaN(a.valueOf())?n:a}(s,"%d.%m.%Y").toISOString()}catch{return new Date(s).toISOString()}if(o&&"boolean"===o.type&&(s=!!t.checked),o&&"number"===o.type){const e=Number("1.1").toLocaleString(v.id).substring(1,2);try{s=Number(s.replace(e,".")).toString()}catch{}}return s},G=async(e=!0)=>{I||a(4,d=!0);const n={};Array.from(document.querySelectorAll("form#"+z+" ."+z)).map((e=>{if(e.name)if(e.name.includes(".")){const[t,o]=e.name.split("."),s=x.list.find((e=>e.name===t));n[e.name]=V(s.item,e)}else n[e.name]=V(x.items,e)})),x.list&&x.list.map((e=>{"array"===e.type&&O[e.name]&&(n[e.name]=O[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,o])=>("_delete"!==n&&(t[n]=V(e.item,{name:n,value:o,checked:o})),t)),{}))),[]))})),n._event=x.id,n._prevEventId=F,n._taskId=S;const{id:o,task:s,error:i}=await t.saveData(x.class,n);if(i?.text){const e=i.field?" in "+i.field+": "+i.value:"";return r.failed(`${i.text} ${e}`,3e3),void a(4,d=!1)}r.success("Die Daten wurden gespeichert.",2e3),n._id=o;const l=await t.getTaskList(x.class,o);return b("choose",{row:l}),e?J():I?void 0:window.singleSpaNavigate(`/task/${x.id}/${s}/task`)},J=()=>j?window.close():E?window.singleSpaNavigate("/"):b("back"),U=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(2,N={...N,...o})}else{const e=x.input.slice(1);for(const t of e)a(2,N[t]=[],N)}}};return n.subscribe((async e=>{if(!e)return;if(!lo.get(e.eventId))return;const n=await t.getTaskList(x.class,e.taskId);((e,t,n)=>{if(!lo.get(e))return;const o=t;ao.set(o,n)})(e.eventId,e.taskId,n)})),q(go),e.$$set=e=>{"schema"in e&&a(0,x=e.schema),"recID"in e&&a(24,I=e.recID),"prevEventID"in e&&a(22,F=e.prevEventID),"prev"in e&&a(25,_=e.prev),"taskId"in e&&a(23,S=e.taskId),"description"in e&&a(20,C=e.description),"root"in e&&a(1,E=e.root),"readonly"in e&&a(21,D=e.readonly),"isStandalone"in e&&a(26,j=e.isStandalone)},e.$$.update=()=>{2097152&e.$$.dirty[0]&&a(4,d=D),402653185&e.$$.dirty[0]&&k&&w&&x.items.map((({name:e,type:t})=>{const n=w.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;k[e]&&a(2,N[e]=k[e],N),k[o]&&a(2,N[o]=k[o],N)})),1048578&e.$$.dirty[0]&&a(5,u=E?C||"enablerr - Form":document.title)},[x,E,N,M,d,u,$,h,g,z,L,T,P,{name:"amountValue",properties:{decimals:2}},async()=>{if(I&&(a(2,N=await t.getTask(x.class,I)),a(20,C=f(x,N))),F){a(21,D=!1),a(27,w=await t.getSchema(F)),"string"==typeof _&&a(28,k=await t.getTask(w.class,_));const e=x.items.find((e=>e.refClass===w.class));a(2,N[e.name]=k._id,N)}const e=await t.getEvent(x.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&a(21,D=!0),m.role?.length&&x.authorization?.length){const e=x.authorization.some((e=>p?.find((t=>t===e.role&&"edit"===e.activity))));a(21,D||=!e)}return I||(H(),W()),!0},()=>{G(!1)},G,()=>F?window.history.back():J(),async({detail:{row:e}})=>{if(I)return;if(await(async()=>{for(const e of x.items)if(e.refItem&&N[e.refItem]){const n=await t.getTask(e.refItem,N[e.refItem]);n&&a(2,N[e.name]=n[e.name],N)}for(const e of x.list||[])if(e.refItem&&N[e.refItem]){const n=await t.getTask(e.refItem,N[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(2,N[e.name]=o,N)}})(),!e._task)return;const n=e._task.event,o=await t.getEvent(n),s=await t.getEvent(x.id);if(!s.output?.class?.length)return;const r=s.output.class[0]?.item.find((e=>e.name===o.output.class[0]?.name));(s.input?.class?.length&&s.input.class[0]?.name===o.output.class[0]?.name||r?.asInput)&&(a(27,w=await t.getSchema(n)),a(22,F=n),a(23,S=e._task._id),a(28,k=!!S&&await t.getTask(w.class,e._task.docId)),U(w.class,e?._task?.docId))},({detail:e})=>{O[e.listName]=e.value,B[e.listName]=e.amountValue;let t=0;for(const e in B)t+=B[e];a(3,M=t)},C,D,F,S,I,_,j,w,k,function(e){M=e,a(3,M)}]}class yo extends ge{constructor(e){var t;super(),Wn.getElementById("svelte-1dh1s6w-style")||((t=_("style")).id="svelte-1dh1s6w-style",t.textContent="form.disabled.svelte-1dh1s6w input.svelte-1dh1s6w{background-color:red !important}.comment.svelte-1dh1s6w.svelte-1dh1s6w{color:green;margin-bottom:1em}form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:30em}}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w,.fTask.svelte-1dh1s6w.svelte-1dh1s6w{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;max-height:70vh}.sTask.svelte-1dh1s6w.svelte-1dh1s6w{height:95%;display:inline-grid}.sTask.svelte-1dh1s6w .btn.svelte-1dh1s6w{display:initial !important}.form--buttons.svelte-1dh1s6w.svelte-1dh1s6w{display:flex;gap:1em;padding-bottom:0.5em}",k(Wn.head,t)),he(this,e,bo,io,b,{schema:0,recID:24,prevEventID:22,prev:25,taskId:23,description:20,root:1,readonly:21,isStandalone:26},[-1,-1])}}function wo(e){let t,n,o;function s(t){e[4](t)}let r={schema:e[5],recID:e[6]};return void 0!==e[0]&&(r.description=e[0]),t=new yo({props:r}),R.push((()=>me(t,"description",s))),t.$on("back",e[2]),{c(){fe(t.$$.fragment)},m(e,n){pe(t,e,n),o=!0},p(e,o){const s={};32&o&&(s.schema=e[5]),64&o&&(s.recID=e[6]),!n&&1&o&&(n=!0,s.description=e[0],X((()=>n=!1))),t.$set(s)},i(e){o||(le(t.$$.fragment,e),o=!0)},o(e){ae(t.$$.fragment,e),o=!1},d(e){$e(t,e)}}}function ko(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[wo,({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(){fe(t.$$.fragment)},m(e,o){pe(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||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function xo(e,n,o){let s,{refresh:r}=n;return e.$$set=e=>{"refresh"in e&&o(3,r=e.refresh)},[s,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},r,function(e){s=e,o(0,s)}]}function Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fo,_o,So=(Fo=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){s(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 s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==r(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 s=Object.keys(i),r=Object.keys(e).reduce((function(t,n){return s.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var s=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=s();t.instance=new e.component(o(o({},r),{},{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)}))}},Fo(_o={exports:{}},_o.exports),_o.exports);const Co=Io(So)({component:class extends ge{constructor(e){super(),he(this,e,xo,ko,b,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Eo,mount:Do,unmount:jo}=Co;e({bootstrap:Eo,mount:Do,unmount:jo});e("Form",yo),e("List",Xe)}}}));
|
|
1
|
+
System.register(["@enablerr-ui/form","@enablerr-ui/layout"],(function(e){"use strict";var t,n,o,s,r,i,l,a,c;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.TextArea,s=e.Storage,r=e.toasts,i=e.settings,l=e.currentRoles,a=e.Page},function(e){c=e.getAttractions}],execute:function(){e("version","0.2.233");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[s,r]=o.split(".");if(e.list?.find((({name:e})=>e===s))&&r&&void 0!==n[s]){const e=`${s}_${r}`;n[e]=n[s][r],s=e}return t.find((e=>e===s))||t.push(s),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 h(){return Object.create(null)}function g(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 k(e,t){e.appendChild(t)}function x(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 j(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function N(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function O(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 T(e,t,n){e.classList[n?"add":"remove"](t)}let P;function M(e){P=e}function B(){if(!P)throw new Error("Function called outside component initialization");return P}function q(e){B().$$.on_mount.push(e)}function A(){const e=B();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const s=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,s)}))}}}function W(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const H=[],R=[],Y=[],V=[],G=Promise.resolve();let J=!1;function U(){J||(J=!0,G.then(te))}function K(){return U(),G}function Q(e){Y.push(e)}function X(e){V.push(e)}let Z=!1;const ee=new Set;function te(){if(!Z){Z=!0;do{for(let e=0;e<H.length;e+=1){const t=H[e];M(t),ne(t.$$)}for(M(null),H.length=0;R.length;)R.pop()();for(let e=0;e<Y.length;e+=1){const t=Y[e];ee.has(t)||(ee.add(t),t())}Y.length=0}while(H.length);for(;V.length;)V.pop()();J=!1,Z=!1,ee.clear()}}function ne(e){if(null!==e.fragment){e.update(),g(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Q)}}const oe=new Set;let se;function re(){se={r:0,c:[],p:se}}function ie(){se.r||g(se.c),se=se.p}function le(e,t){e&&e.i&&(oe.delete(e),e.i(t))}function ae(e,t,n,o){if(e&&e.o){if(oe.has(e))return;oe.add(e),se&&se.c.push((()=>{oe.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function ce(e,t){const n=t.token={};function o(e,o,s,r){if(t.token!==n)return;t.resolved=r;let i=t.ctx;void 0!==s&&(i=i.slice(),i[s]=r);const l=e&&(t.current=e)(i);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(re(),ae(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ie())})):t.block.d(1),l.c(),le(l,1),l.m(t.mount(),t.anchor),a=!0),t.block=l,t.blocks&&(t.blocks[o]=l),a&&te()}if((s=e)&&"object"==typeof s&&"function"==typeof s.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 s}function de(e,t,n){const o=t.slice(),{resolved:s}=e;e.current===e.then&&(o[e.value]=s),e.current===e.catch&&(o[e.error]=s),e.block.p(o,n)}const ue="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function me(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function fe(e){e&&e.c()}function pe(e,t,n,o){const{fragment:s,on_mount:r,on_destroy:i,after_update:l}=e.$$;s&&s.m(t,n),o||Q((()=>{const t=r.map($).filter(v);i?i.push(...t):g(t),e.$$.on_mount=[]})),l.forEach(Q)}function $e(e,t){const n=e.$$;null!==n.fragment&&(g(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function he(e,t,n,o,s,r,i=[-1]){const l=P;M(e);const a=e.$$={fragment:null,ctx:null,props:r,update:p,not_equal:s,bound:h(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:h(),dirty:i,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return a.ctx&&s(a.ctx[t],a.ctx[t]=r)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](r),c&&function(e,t){-1===e.$$.dirty[0]&&(H.push(e),U(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,g(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&&le(e.$$.fragment),pe(e,t.target,t.anchor,t.customElement),te()}M(l)}class ge{$destroy(){$e(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 ve(e){let t,n,o,s;return{c(){t=S("svg"),n=S("polyline"),o=S("path"),N(n,"points","9 10 4 15 9 20"),N(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",s="feather feather-corner-down-left "+e[2])},m(e,s){x(e,t,s),k(t,n),k(t,o)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-corner-down-left "+e[2])&&N(t,"class",s)},i:p,o:p,d(e){e&&I(t)}}}function be(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:r=""}=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,s=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,s,r]}class ye extends ge{constructor(e){super(),he(this,e,be,ve,b,{size:0,strokeWidth:1,class:2})}}function we(e){let t,n,o,s,r;return{c(){t=S("svg"),n=S("path"),o=S("line"),s=S("line"),N(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),N(o,"x1","18"),N(o,"y1","9"),N(o,"x2","12"),N(o,"y2","15"),N(s,"x1","12"),N(s,"y1","9"),N(s,"x2","18"),N(s,"y2","15"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",r="feather feather-delete "+e[2])},m(e,r){x(e,t,r),k(t,n),k(t,o),k(t,s)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-delete "+e[2])&&N(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function ke(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:r=""}=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,s=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,s,r]}class xe extends ge{constructor(e){super(),he(this,e,ke,we,b,{size:0,strokeWidth:1,class:2})}}function Ie(e){let t,n,o,s,r;return{c(){t=S("svg"),n=S("path"),o=S("polyline"),s=S("line"),N(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),N(o,"points","15 3 21 3 21 9"),N(s,"x1","10"),N(s,"y1","14"),N(s,"x2","21"),N(s,"y2","3"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",r="feather feather-external-link "+e[2])},m(e,r){x(e,t,r),k(t,n),k(t,o),k(t,s)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-external-link "+e[2])&&N(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Fe(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:r=""}=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,s=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,s,r]}class _e extends ge{constructor(e){super(),he(this,e,Fe,Ie,b,{size:0,strokeWidth:1,class:2})}}function Se(e){let t,n,o,s;return{c(){t=S("svg"),n=S("circle"),o=S("line"),N(n,"cx","11"),N(n,"cy","11"),N(n,"r","8"),N(o,"x1","21"),N(o,"y1","21"),N(o,"x2","16.65"),N(o,"y2","16.65"),N(t,"xmlns","http://www.w3.org/2000/svg"),N(t,"width",e[0]),N(t,"height",e[0]),N(t,"fill","none"),N(t,"viewBox","0 0 24 24"),N(t,"stroke","currentColor"),N(t,"stroke-width",e[1]),N(t,"stroke-linecap","round"),N(t,"stroke-linejoin","round"),N(t,"class",s="feather feather-search "+e[2])},m(e,s){x(e,t,s),k(t,n),k(t,o)},p(e,[n]){1&n&&N(t,"width",e[0]),1&n&&N(t,"height",e[0]),2&n&&N(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-search "+e[2])&&N(t,"class",s)},i:p,o:p,d(e){e&&I(t)}}}function Ce(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:r=""}=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,s=e.strokeWidth),"class"in e&&n(2,r=e.class)},[o,s,r]}class Ee extends ge{constructor(e){super(),he(this,e,Ce,Se,b,{size:0,strokeWidth:1,class:2})}}const{document:De}=ue;function je(e){e[22]=e[24].list,e[23]=e[24].items}function Ne(e,t,n){const o=e.slice();return o[25]=t[n],o}function Oe(e,t,n){const o=e.slice();return o[28]=t[n],o}function ze(e,t,n){const o=e.slice();return o[28]=t[n],o}function Le(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Te(e){let t,n,o,s,r,i;je(e);let l=e[22]?.length&&Pe(e),a=e[23]?.length&&Me(e),c=e[22]?.length&&Ae(e);return{c(){t=_("div"),l&&l.c(),n=E(),o=_("table"),a&&a.c(),s=E(),r=_("tbody"),c&&c.c(),N(o,"striped",""),N(o,"class","svelte-d5dkb1"),N(t,"class","eList svelte-d5dkb1")},m(e,d){x(e,t,d),l&&l.m(t,null),k(t,n),k(t,o),a&&a.m(o,null),k(o,s),k(o,r),c&&c.m(r,null),i=!0},p(e,i){je(e),e[22]?.length?l?(l.p(e,i),4&i[0]&&le(l,1)):(l=Pe(e),l.c(),le(l,1),l.m(t,n)):l&&(re(),ae(l,1,1,(()=>{l=null})),ie()),e[23]?.length?a?a.p(e,i):(a=Me(e),a.c(),a.m(o,s)):a&&(a.d(1),a=null),e[22]?.length?c?(c.p(e,i),4&i[0]&&le(c,1)):(c=Ae(e),c.c(),le(c,1),c.m(r,null)):c&&(re(),ae(c,1,1,(()=>{c=null})),ie())},i(e){i||(le(l),le(c),i=!0)},o(e){ae(l),ae(c),i=!1},d(e){e&&I(t),l&&l.d(),a&&a.d(),c&&c.d()}}}function Pe(e){let t,n,o;return n=new e[5]({props:{id:e[6],value:""}}),n.$on("input",e[10]),{c(){t=C("Suchen: "),fe(n.$$.fragment)},m(e,s){x(e,t,s),pe(n,e,s),o=!0},p:p,i(e){o||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n,e)}}}function Me(e){let t,n,o,s=e[0]&&Be(),r=e[23],i=[];for(let t=0;t<r.length;t+=1)i[t]=qe(ze(e,r,t));return{c(){t=_("thead"),n=_("tr"),s&&s.c(),o=E();for(let e=0;e<i.length;e+=1)i[e].c();N(n,"class","svelte-d5dkb1"),N(t,"class","svelte-d5dkb1")},m(e,r){x(e,t,r),k(t,n),s&&s.m(n,null),k(n,o);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(e[0]?s||(s=Be(),s.c(),s.m(n,o)):s&&(s.d(1),s=null),516&t[0]){let o;for(r=e[23],o=0;o<r.length;o+=1){const s=ze(e,r,o);i[o]?i[o].p(s,t):(i[o]=qe(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&I(t),s&&s.d(),F(i,e)}}}function Be(e){let t;return{c(){t=_("th"),N(t,"class","svelte-d5dkb1")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function qe(e){let t,n,o=e[28]?.designation+"";return{c(){t=_("th"),n=C(o),N(t,"class","svelte-d5dkb1")},m(e,o){x(e,t,o),k(t,n)},p(e,t){4&t[0]&&o!==(o=e[28]?.designation+"")&&O(n,o)},d(e){e&&I(t)}}}function Ae(e){let t,n,o=e[22],s=[];for(let t=0;t<o.length;t+=1)s[t]=Je(Ne(e,o,t));const r=e=>ae(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=D()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(7055&n[0]){let i;for(o=e[22],i=0;i<o.length;i+=1){const r=Ne(e,o,i);s[i]?(s[i].p(r,n),le(s[i],1)):(s[i]=Je(r),s[i].c(),le(s[i],1),s[i].m(t.parentNode,t))}for(re(),i=o.length;i<s.length;i+=1)r(i);ie()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)le(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)ae(s[e]);n=!1},d(e){F(s,e),e&&I(t)}}}function We(e){let t,n,o,s,r=e[0]&&He(e),i=e[23],l=[];for(let t=0;t<i.length;t+=1)l[t]=Ge(Oe(e,i,t));return{c(){t=_("tr"),r&&r.c(),n=E();for(let e=0;e<l.length;e+=1)l[e].c();o=E(),N(t,"class","pointer svelte-d5dkb1"),T(t,"active",e[25]._id===e[1])},m(e,i){x(e,t,i),r&&r.m(t,null),k(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);k(t,o),s=!0},p(e,s){if(e[0]?r?(r.p(e,s),1&s[0]&&le(r,1)):(r=He(e),r.c(),le(r,1),r.m(t,n)):r&&(re(),ae(r,1,1,(()=>{r=null})),ie()),900&s[0]){let n;for(i=e[23],n=0;n<i.length;n+=1){const r=Oe(e,i,n);l[n]?l[n].p(r,s):(l[n]=Ge(r),l[n].c(),l[n].m(t,o))}for(;n<l.length;n+=1)l[n].d(1);l.length=i.length}518&s[0]&&T(t,"active",e[25]._id===e[1])},i(e){s||(le(r),s=!0)},o(e){ae(r),s=!1},d(e){e&&I(t),r&&r.d(),F(l,e)}}}function He(e){let t,n,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:Ve,then:Ye,catch:Re,value:31,blocks:[,,,]};return ce(n=e[12](e[25]),s),{c(){t=D(),s.block.c()},m(e,n){x(e,t,n),s.block.m(e,s.anchor=n),s.mount=()=>t.parentNode,s.anchor=t,o=!0},p(t,o){e=t,s.ctx=e,4&o[0]&&n!==(n=e[12](e[25]))&&ce(n,s)||de(s,e,o)},i(e){o||(le(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ae(s.blocks[e])}o=!1},d(e){e&&I(t),s.block.d(e),s.token=null,s=null}}}function Re(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Ye(e){let t,n,o,s,r;return o=new _e({props:{size:"18"}}),{c(){t=_("td"),n=_("a"),fe(o.$$.fragment),N(n,"href",s=e[31]),N(n,"target","_blank"),N(t,"class","editRow svelte-d5dkb1")},m(e,s){x(e,t,s),k(t,n),pe(o,n,null),r=!0},p(e,t){(!r||4&t[0]&&s!==(s=e[31]))&&N(n,"href",s)},i(e){r||(le(o.$$.fragment,e),r=!0)},o(e){ae(o.$$.fragment,e),r=!1},d(e){e&&I(t),$e(o)}}}function Ve(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Ge(e){let t,n,o,s,r=e[7](e[25],e[28])+"";return{c(){t=_("td"),n=C(r),N(t,"class","svelte-d5dkb1")},m(r,i){var l;x(r,t,i),k(t,n),o||(s=j(t,"click",(l=function(){v(e[8](e[25]))&&e[8](e[25]).apply(this,arguments)},function(e){return e.stopPropagation(),l.call(this,e)})),o=!0)},p(t,o){e=t,4&o[0]&&r!==(r=e[7](e[25],e[28])+"")&&O(n,r)},d(e){e&&I(t),o=!1,s()}}}function Je(e){let t,n,o=e[11](e[25],e[23],e[3]),s=o&&We(e);return{c(){s&&s.c(),t=D()},m(e,o){s&&s.m(e,o),x(e,t,o),n=!0},p(e,n){12&n[0]&&(o=e[11](e[25],e[23],e[3])),o?s?(s.p(e,n),12&n[0]&&le(s,1)):(s=We(e),s.c(),le(s,1),s.m(t.parentNode,t)):s&&(re(),ae(s,1,1,(()=>{s=null})),ie())},i(e){n||(le(s),n=!0)},o(e){ae(s),n=!1},d(e){s&&s.d(e),e&&I(t)}}}function Ue(e){let t,n;return t=new e[4]({}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p:p,i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Ke(e){let t,n,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:Ue,then:Te,catch:Le,value:24,blocks:[,,,]};return ce(n=e[2]&&e[9](),s),{c(){t=D(),s.block.c()},m(e,n){x(e,t,n),s.block.m(e,s.anchor=n),s.mount=()=>t.parentNode,s.anchor=t,o=!0},p(t,o){e=t,s.ctx=e,4&o[0]&&n!==(n=e[2]&&e[9]())&&ce(n,s)||de(s,e,o)},i(e){o||(le(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ae(s.blocks[e])}o=!1},d(e){e&&I(t),s.block.d(e),s.token=null,s=null}}}function Qe(e,o,s){const r=A(),{Loading:i,TextField:l}=c;let{className:a}=o,{rowId:u}=o,{filterForReady:m=!1}=o,{showEdit:f=!1}=o,{praefix:p=""}=o,{selectionFields:$=!1}=o,h=!0,g="",v=a+Math.floor(9e3*Math.random()+1e3).toString()+"search";const b=(e,t)=>t&&d(e[`_${t.name}`]||e[t.name]||""),y=t.getSchemaByClass(a),w=async(e,t,n,o)=>{const{value:s,refClass:r}=o,[i,l]=n.split("."),a=s.get(p),c=a&&await $o(i,a);if(!c)return e;const d=c[l];return d?.length?d.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 fo(r+o._id.toString(),o),o})):e};q((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"}),window.setTimeout((()=>document.getElementById(v)?.focus()),100)})),n.subscribe((async e=>{if(!e)return;const t=await y;e.eventId===t.id&&(ho(t.class,e.eventId),s(2,h=!s(2,h=!1)))}));return e.$$set=e=>{"className"in e&&s(13,a=e.className),"rowId"in e&&s(1,u=e.rowId),"filterForReady"in e&&s(14,m=e.filterForReady),"showEdit"in e&&s(0,f=e.showEdit),"praefix"in e&&s(15,p=e.praefix),"selectionFields"in e&&s(16,$=e.selectionFields)},[f,u,h,g,i,l,v,b,e=>()=>r("choose",{row:e}),async()=>{const e=await y;let t=await uo(e.class,e.id);const n=$&&$?.find((t=>e.class===t.refClass.split(":")[0]));if(n&&n.value){const[o,s]=n.refClass.split(":");e.class===o&&(t=await w(t,o,s,n))}s(0,f&&=!n),!n&&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=[],r=e.display;return r&&r.length?r.map((n=>{const[s,r]=n.split(".");let i=e.list?.find((e=>e.name===s))?.item.find((e=>e.name===r));i&&(i={...i},i.name=`${s}_${r}`,t=t.map((e=>(e[s]&&(e[i.name]=e[s][r]),e)))),i||(i=e.items.find((e=>e.name===s))),o.find((e=>e?.name===s))||o.push(i)})):o=e.items,{list:t,items:o}},({detail:{value:e}})=>{s(3,g=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(b(e,o)?.toLowerCase()?.includes(n))return!0;return!1},async e=>`/task/${(await y).id}/${e._task._id}/task?view=standalone`,a,m,p,$]}class Xe extends ge{constructor(e){var t;super(),De.getElementById("svelte-d5dkb1-style")||((t=_("style")).id="svelte-d5dkb1-style",t.textContent=".eList.svelte-d5dkb1.svelte-d5dkb1{min-height:12em;height:fit-content;max-height:65vh;overflow:auto}.eList.svelte-d5dkb1 .editRow.svelte-d5dkb1{width:1em}.eList.svelte-d5dkb1 table.svelte-d5dkb1{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important;margin-top:1em}.eList.svelte-d5dkb1 table thead.svelte-d5dkb1{position:sticky;top:0;background:#326173;color:white}.eList.svelte-d5dkb1 table tbody tr.svelte-d5dkb1{height:2.3em}th.svelte-d5dkb1.svelte-d5dkb1,td.svelte-d5dkb1.svelte-d5dkb1{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-d5dkb1.svelte-d5dkb1:hover{background-color:#DAE1E5}tr.active.svelte-d5dkb1.svelte-d5dkb1{color:#326173;background-color:#fcebd5}",k(De.head,t)),he(this,e,Qe,Ke,b,{className:13,rowId:1,filterForReady:14,showEdit:0,praefix:15,selectionFields:16},[-1,-1])}}function Ze(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function et(e){let t,n,o=e[22]&&tt(e);return{c(){o&&o.c(),t=D()},m(e,s){o&&o.m(e,s),x(e,t,s),n=!0},p(e,n){e[22]?o?(o.p(e,n),4&n&&le(o,1)):(o=tt(e),o.c(),le(o,1),o.m(t.parentNode,t)):o&&(re(),ae(o,1,1,(()=>{o=null})),ie())},i(e){n||(le(o),n=!0)},o(e){ae(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function tt(e){let t,n;return t=new e[9]({props:{title:e[12],class:"eList "+(e[7]?"form":""),$$slots:{default:[it]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};128&n&&(o.class="eList "+(e[7]?"form":"")),8389119&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function nt(e){let t,n;return t=new yo({props:{schema:e[1],recID:e[0],readonly:e[8]}}),t.$on("choose",(function(){v(e[17](e[22]))&&e[17](e[22]).apply(this,arguments)})),t.$on("back",e[14]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(n,o){e=n;const s={};2&o&&(s.schema=e[1]),1&o&&(s.recID=e[0]),256&o&&(s.readonly=e[8]),t.$set(s)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function ot(e){let t,n,o,s,r,i,l,a,c;return t=new e[10]({}),s=new e[11]({props:{outline:!0,$$slots:{default:[st]},$$scope:{ctx:e}}}),s.$on("click",e[15]),i=new e[11]({props:{filled:!0,$$slots:{default:[rt]},$$scope:{ctx:e}}}),i.$on("click",e[16]),a=new Xe({props:{className:e[1].class,filterForReady:e[3],praefix:e[4],selectionFields:e[5],rowId:e[0],showEdit:e[6]}}),a.$on("edit",e[18]),a.$on("choose",e[19]),{c(){fe(t.$$.fragment),n=E(),o=_("div"),fe(s.$$.fragment),r=E(),fe(i.$$.fragment),l=E(),fe(a.$$.fragment),N(o,"class","form--buttons svelte-jb5mrh")},m(e,d){pe(t,e,d),x(e,n,d),x(e,o,d),pe(s,o,null),k(o,r),pe(i,o,null),x(e,l,d),pe(a,e,d),c=!0},p(e,t){const n={};8388608&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n);const o={};8388608&t&&(o.$$scope={dirty:t,ctx:e}),i.$set(o);const r={};2&t&&(r.className=e[1].class),8&t&&(r.filterForReady=e[3]),16&t&&(r.praefix=e[4]),32&t&&(r.selectionFields=e[5]),1&t&&(r.rowId=e[0]),64&t&&(r.showEdit=e[6]),a.$set(r)},i(e){c||(le(t.$$.fragment,e),le(s.$$.fragment,e),le(i.$$.fragment,e),le(a.$$.fragment,e),c=!0)},o(e){ae(t.$$.fragment,e),ae(s.$$.fragment,e),ae(i.$$.fragment,e),ae(a.$$.fragment,e),c=!1},d(e){$e(t,e),e&&I(n),e&&I(o),$e(s),$e(i),e&&I(l),$e(a,e)}}}function st(e){let t;return{c(){t=C("Abbrechen")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function rt(e){let t;return{c(){t=C("Neu")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function it(e){let t,n,o,s;const r=[ot,nt],i=[];function l(e,t){return e[22].length&&!e[7]?0:1}return t=l(e),n=i[t]=r[t](e),{c(){n.c(),o=D()},m(e,n){i[t].m(e,n),x(e,o,n),s=!0},p(e,s){let a=t;t=l(e),t===a?i[t].p(e,s):(re(),ae(i[a],1,1,(()=>{i[a]=null})),ie(),n=i[t],n?n.p(e,s):(n=i[t]=r[t](e),n.c()),le(n,1),n.m(o.parentNode,o))},i(e){s||(le(n),s=!0)},o(e){ae(n),s=!1},d(e){i[t].d(e),e&&I(o)}}}function lt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function at(e){let t,n,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:lt,then:et,catch:Ze,value:22,blocks:[,,,]};return ce(n=e[13](e[2]),s),{c(){t=D(),s.block.c()},m(e,n){x(e,t,n),s.block.m(e,s.anchor=n),s.mount=()=>t.parentNode,s.anchor=t,o=!0},p(t,[o]){e=t,s.ctx=e,4&o&&n!==(n=e[13](e[2]))&&ce(n,s)||de(s,e,o)},i(e){o||(le(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ae(s.blocks[e])}o=!1},d(e){e&&I(t),s.block.d(e),s.token=null,s=null}}}function ct(e,t,n){const{Dialog:o,Divider:s,Button:r}=c,i=A();let{schema:l}=t,{recID:a}=t,{isOpening:d=!0}=t,{filterForReady:u=!1}=t,{praefix:m=""}=t,{selectionFields:f=!1}=t,{showEdit:p=!0}=t,$=l.identity.designation;l.class;let h,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),"praefix"in e&&n(4,m=e.praefix),"selectionFields"in e&&n(5,f=e.selectionFields),"showEdit"in e&&n(6,p=e.showEdit)},[a,l,d,u,m,f,p,g,h,o,s,r,$,e=>e&&uo(l.class,l.id),()=>{n(7,g=!1),a||i("back"),p||i("back")},()=>{n(7,g=!1),i("back")},()=>{n(0,a=!1),n(8,h=!1),n(7,g=!0)},e=>({detail:{row:e}})=>{let t=l.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let s=l.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(s){e[`${n}_${o}`]=e[n][o]}})),i("choose",{row:e})},({detail:e})=>{n(8,h=!!e._task.visum||"Closed"===e._task.status),n(0,a=e._docId),n(7,g=!0)},function(t){W(e,t)}]}class dt 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}",k(document.head,t)),he(this,e,ct,at,b,{schema:1,recID:0,isOpening:2,filterForReady:3,praefix:4,selectionFields:5,showEdit:6})}}function ut(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function mt(e){let t,n,s,r,i,l,a,c,d,u,m,f,p,$,h;n=new o({props:{class:"full-width",id:e[14],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;"}}),n.$on("click",e[16]),n.$on("onFocus",e[16]);const g=[pt,ft],v=[];function b(e,t){return e[2]?e[0]?1:-1:0}~(r=b(e))&&(i=v[r]=g[r](e));let y=!e[2]&&vt(e);function F(t){e[24](t)}let S={class:"tModal",noClickaway:!0,$$slots:{default:[bt]},$$scope:{ctx:e}};void 0!==e[9]&&(S.open=e[9]),m=new e[13]({props:S}),R.push((()=>me(m,"open",F)));let C=e[10]&&yt(e);return{c(){t=_("div"),fe(n.$$.fragment),s=E(),i&&i.c(),l=E(),a=_("input"),d=E(),y&&y.c(),u=E(),fe(m.$$.fragment),p=E(),C&&C.c(),$=D(),N(a,"class",c=w(e[4]||e[5])+" svelte-tbrk84"),N(a,"id",e[3]),N(a,"name",e[3]),a.value=e[0],a.hidden=!0,L(t,"position","relative")},m(e,o){x(e,t,o),pe(n,t,null),k(t,s),~r&&v[r].m(t,null),k(t,l),k(t,a),k(t,d),y&&y.m(t,null),x(e,u,o),pe(m,e,o),x(e,p,o),C&&C.m(e,o),x(e,$,o),h=!0},p(e,o){const s={};2&o[0]&&(s.value=e[1]),4&o[0]&&(s.disabled=e[2]),n.$set(s);let d=r;r=b(e),r===d?~r&&v[r].p(e,o):(i&&(re(),ae(v[d],1,1,(()=>{v[d]=null})),ie()),~r?(i=v[r],i?i.p(e,o):(i=v[r]=g[r](e),i.c()),le(i,1),i.m(t,l)):i=null),(!h||48&o[0]&&c!==(c=w(e[4]||e[5])+" svelte-tbrk84"))&&N(a,"class",c),(!h||8&o[0])&&N(a,"id",e[3]),(!h||8&o[0])&&N(a,"name",e[3]),(!h||1&o[0]&&a.value!==e[0])&&(a.value=e[0]),e[2]?y&&(re(),ae(y,1,1,(()=>{y=null})),ie()):y?(y.p(e,o),4&o[0]&&le(y,1)):(y=vt(e),y.c(),le(y,1),y.m(t,null));const u={};961&o[0]|2&o[1]&&(u.$$scope={dirty:o,ctx:e}),!f&&512&o[0]&&(f=!0,u.open=e[9],X((()=>f=!1))),m.$set(u),e[10]?C?(C.p(e,o),1024&o[0]&&le(C,1)):(C=yt(e),C.c(),le(C,1),C.m($.parentNode,$)):C&&(re(),ae(C,1,1,(()=>{C=null})),ie())},i(e){h||(le(n.$$.fragment,e),le(i),le(y),le(m.$$.fragment,e),le(C),h=!0)},o(e){ae(n.$$.fragment,e),ae(i),ae(y),ae(m.$$.fragment,e),ae(C),h=!1},d(e){e&&I(t),$e(n),~r&&v[r].d(),y&&y.d(),e&&I(u),$e(m,e),e&&I(p),C&&C.d(e),e&&I($)}}}function ft(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:gt,then:ht,catch:$t,value:31,blocks:[,,,]};return ce(e[20](),o),{c(){t=D(),o.block.c()},m(e,s){x(e,t,s),o.block.m(e,o.anchor=s),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){de(o,e=t,n)},i(e){n||(le(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ae(o.blocks[e])}n=!1},d(e){e&&I(t),o.block.d(e),o.token=null,o=null}}}function pt(e){let t,n,o,s,r;return n=new Ee({props:{size:"18"}}),{c(){t=_("span"),fe(n.$$.fragment),N(t,"class","feather pointer svelte-tbrk84")},m(i,l){x(i,t,l),pe(n,t,null),o=!0,s||(r=[j(t,"click",e[16]),j(t,"choose",e[17])],s=!0)},p:p,i(e){o||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n),s=!1,g(r)}}}function $t(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function ht(e){let t,n,o,s;return o=new _e({props:{size:"18"}}),{c(){t=_("span"),n=_("a"),fe(o.$$.fragment),N(n,"href",e[31]),N(n,"target","_blank"),N(t,"class","feather pointer svelte-tbrk84")},m(e,r){x(e,t,r),k(t,n),pe(o,n,null),s=!0},p:p,i(e){s||(le(o.$$.fragment,e),s=!0)},o(e){ae(o.$$.fragment,e),s=!1},d(e){e&&I(t),$e(o)}}}function gt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function vt(e){let t,n,o,s,r;return n=new xe({props:{size:"18"}}),{c(){t=_("span"),fe(n.$$.fragment),N(t,"class","feather2 pointer svelte-tbrk84")},m(i,l){x(i,t,l),pe(n,t,null),o=!0,s||(r=j(t,"click",e[19]),s=!0)},p:p,i(e){o||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n),s=!1,r()}}}function bt(e){let t,n;return t=new dt({props:{schema:e[8],recID:e[0],isOpening:e[9],filterForReady:"true",selectionFields:e[7],praefix:e[6]}}),t.$on("choose",e[17]),t.$on("back",e[18]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};256&n[0]&&(o.schema=e[8]),1&n[0]&&(o.recID=e[0]),512&n[0]&&(o.isOpening=e[9]),128&n[0]&&(o.selectionFields=e[7]),64&n[0]&&(o.praefix=e[6]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function yt(e){let t,n,o;function s(t){e[25](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[kt]},$$scope:{ctx:e}};return void 0!==e[10]&&(r.open=e[10]),t=new e[13]({props:r}),R.push((()=>me(t,"open",s))),{c(){fe(t.$$.fragment)},m(e,n){pe(t,e,n),o=!0},p(e,o){const s={};2305&o[0]|2&o[1]&&(s.$$scope={dirty:o,ctx:e}),!n&&1024&o[0]&&(n=!0,s.open=e[10],X((()=>n=!1))),t.$set(s)},i(e){o||(le(t.$$.fragment,e),o=!0)},o(e){ae(t.$$.fragment,e),o=!1},d(e){$e(t,e)}}}function wt(e){let t,n;return t=new yo({props:{schema:e[8],recID:e[0],readonly:!0}}),t.$on("back",e[18]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};256&n[0]&&(o.schema=e[8]),1&n[0]&&(o.recID=e[0]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function kt(e){let t,n;return t=new e[12]({props:{title:e[11],$$slots:{default:[wt]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};2048&n[0]&&(o.title=e[11]),257&n[0]|2&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function xt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function It(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:xt,then:mt,catch:ut,value:30,blocks:[,,,]};return ce(e[15](),o),{c(){t=D(),o.block.c()},m(e,s){x(e,t,s),o.block.m(e,o.anchor=s),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){de(o,e=t,n)},i(e){n||(le(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ae(o.blocks[e])}n=!1},d(e){e&&I(t),o.block.d(e),o.token=null,o=null}}}function Ft(e,n,o){const s=A(),{Dialog:r,Modal:i}=c;let{id:l}=n,{item:a}=n,{value:d=""}=n,{desc:u=""}=n,{noForm:m=!1}=n,{classId:p}=n,{eventId:$}=n,{disabled:h}=n,{readonly:g}=n,{praefix:v}=n,{selectionFields:b}=n;const y="comment_"+l;let w,k,x,I=!1;h||=g;const F=e=>{e&&(o(1,u=f(x,e)),s("change",{value:d,description:u}),s("task",{row:e}))},_=()=>{o(9,I=!1),o(10,w=!1)};return e.$$set=e=>{"id"in e&&o(3,l=e.id),"item"in e&&o(21,a=e.item),"value"in e&&o(0,d=e.value),"desc"in e&&o(1,u=e.desc),"noForm"in e&&o(4,m=e.noForm),"classId"in e&&o(5,p=e.classId),"eventId"in e&&o(22,$=e.eventId),"disabled"in e&&o(2,h=e.disabled),"readonly"in e&&o(23,g=e.readonly),"praefix"in e&&o(6,v=e.praefix),"selectionFields"in e&&o(7,b=e.selectionFields)},e.$$.update=()=>{2097409&e.$$.dirty[0]&&d&&x&&Promise.resolve(mo(a.refClass,x.id,d)).then((e=>F(e))),257&e.$$.dirty[0]&&!d&&x&&F({})},[d,u,h,l,m,p,v,b,x,I,w,k,r,i,y,async()=>{if(o(8,x=await t.getSchemaByClass(a.refClass)),$&&d&&!h){const e=await t.getSchema($);e.input?.find((e=>e===a.refClass))&&o(2,h=!0)}return o(11,k=x.identity.designation),!0},function(){o(9,I=!0)},({detail:e})=>{o(0,d=e.row._id),_()},_,()=>{o(0,d=o(1,u="")),s("change",{value:d,description:u}),s("task",{row:{_task:{event:x.id,_id:!1}}})},async()=>{if(!d)return;const e=(await mo(a.refClass,x.id,d))._task._id;return`/task/${x.id}/${e}/task?view=standalone`},a,$,g,function(e){I=e,o(9,I)},function(e){w=e,o(10,w)}]}class _t extends ge{constructor(e){var t;super(),document.getElementById("svelte-tbrk84-style")||((t=_("style")).id="svelte-tbrk84-style",t.textContent=".feather.svelte-tbrk84{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-tbrk84{position:absolute;top:0.75em;right:0.5em;color:#4300b0}",k(document.head,t)),he(this,e,Ft,It,b,{id:3,item:21,value:0,desc:1,noForm:4,classId:5,eventId:22,disabled:2,readonly:23,praefix:6,selectionFields:7},[-1,-1])}}function St(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"),fe(n.$$.fragment),L(t,"position","relative"),L(t,"max-width","10em")},m(e,s){x(e,t,s),pe(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||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n)}}}function Ct(e,t,n){let o;const r=A(),{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(s.getItem("Locale")),$=Number("1.1").toLocaleString(p.id).substring(1,2),{properties:h={}}=a;let{min:g,max:v,step:b,pattern:y,decimals:w=0,unit:k="",placeholder:x,hint:I,readonly:F,negative:_}=h;y||(y=w?`[0-9]+([${$}][0-9]{1,${w}})?`:"[0-9]*"),_&&(y="-?"+y);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,x,F,({detail:e})=>r("blur",{value:e.value}),({detail:e})=>{F||Number(d.toString().replace($,"."))||n(5,o="")},a,d]}class Et extends ge{constructor(e){super(),he(this,e,Ct,St,b,{id:0,item:13,value:14,noForm:1,classId:2,disabled:3})}}function Dt(e,t,n){const o=e.slice();return o[10]=t[n],o}function jt(e){let t,n,o,s=e[10]+"";return{c(){t=_("option"),n=C(s),t.__value=e[10],t.value=t.__value,t.selected=o=e[1]===e[10],N(t,"class","svelte-5xpzvo")},m(e,o){x(e,t,o),k(t,n)},p(e,n){2&n&&o!==(o=e[1]===e[10])&&(t.selected=o)},d(e){e&&I(t)}}}function Nt(e){let t,n,o,s,r,i=e[4],l=[];for(let t=0;t<i.length;t+=1)l[t]=jt(Dt(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,N(n,"class","svelte-5xpzvo"),N(t,"class",o=w(e[2]||e[3])+" svelte-5xpzvo"),N(t,"id",e[0]),N(t,"name",e[0]),N(t,"readonly",e[5])},m(o,i){x(o,t,i),k(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);s||(r=j(t,"change",e[6]),s=!0)},p(e,[n]){if(18&n){let o;for(i=e[4],o=0;o<i.length;o+=1){const s=Dt(e,i,o);l[o]?l[o].p(s,n):(l[o]=jt(s),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")&&N(t,"class",o),1&n&&N(t,"id",e[0]),1&n&&N(t,"name",e[0])},i:p,o:p,d(e){e&&I(t),F(l,e),s=!1,r()}}}function Ot(e,t,n){const o=A();let{id:s}=t,{item:r}=t,{value:i}=t,{noForm:l=!1}=t,{classId:a}=t,{disabled:c}=t;const{enum:d}=r.properties,u=c||r.properties.readonly;return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(7,r=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),"disabled"in e&&n(8,c=e.disabled)},[s,i,l,a,d,u,e=>o("blur",{value:e.srcElement.value}),r,c]}class zt 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}",k(document.head,t)),he(this,e,Ot,Nt,b,{id:0,item:7,value:1,noForm:2,classId:3,disabled:8})}}const Lt=/\d+/g,Tt=/%[HMSpPdmyY%]/g;function Pt(e){let t;return{c(){t=C("Stunden")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function Mt(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Pt]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Bt(e){let t;return{c(){t=C("Minuten")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function qt(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Bt]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function At(e){let t;return{c(){t=C("Jetzt")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function Wt(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[At]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Ht(e){let t,n,o,s,r,i,l,a,c;return s=new e[5]({props:{value:e[0],closeOnSelection:!0}}),s.$on("change",e[8]),i=new e[6]({props:{value:e[0],$$slots:{"now-label":[Wt],"minutes-label":[qt],"hours-label":[Mt]},$$scope:{ctx:e}}}),i.$on("change",e[7]),{c(){t=_("input"),o=E(),fe(s.$$.fragment),r=E(),fe(i.$$.fragment),N(t,"type","string"),N(t,"class",n=e[2]||e[3]),N(t,"id",e[1]),N(t,"name",e[1]),t.hidden=!0},m(n,d){x(n,t,d),z(t,e[0]),x(n,o,d),pe(s,n,d),x(n,r,d),pe(i,n,d),l=!0,a||(c=j(t,"input",e[9]),a=!0)},p(e,[o]){(!l||12&o&&n!==(n=e[2]||e[3]))&&N(t,"class",n),(!l||2&o)&&N(t,"id",e[1]),(!l||2&o)&&N(t,"name",e[1]),1&o&&z(t,e[0]);const r={};1&o&&(r.value=e[0]),s.$set(r);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),i.$set(a)},i(e){l||(le(s.$$.fragment,e),le(i.$$.fragment,e),l=!0)},o(e){ae(s.$$.fragment,e),ae(i.$$.fragment,e),l=!1},d(e){e&&I(t),e&&I(o),$e(s,e),e&&I(r),$e(i,e),a=!1,c()}}}function Rt(e,t,n){const o=A(),{Label:s,DatePicker:r,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,s,r,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 Yt extends ge{constructor(e){super(),he(this,e,Rt,Ht,b,{value:0,id:1,noForm:2,classId:3})}}function Vt(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:Gt,placeholder:Jt,readonly:e[4],disabled:e[5]}}),n.$on("change",e[7]),{c(){t=_("div"),fe(n.$$.fragment),L(t,"max-width","4em")},m(e,s){x(e,t,s),pe(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||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n)}}}const Gt="([01][0-9]|2[0-3]):([0-5][0-9])",Jt="";function Ut(e,t,n){const o=A(),{TextField:s}=c;let{id:r}=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,r=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)},[r,l,a,d,u,m,s,({detail:e})=>{o("blur",{value:f(e.value)})},i]}class Kt extends ge{constructor(e){super(),he(this,e,Ut,Vt,b,{id:0,item:8,value:1,noForm:2,classId:3,readonly:4,disabled:5})}}function Qt(e){let t,n;return t=new e[10]({props:{inputClass:e[2]||e[3],disabled:e[5],readonly:e[14],pattern:e[16],required:e[13],id:e[18],name:e[17],value:e[7]()}}),t.$on("change",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};12&n&&(o.inputClass=e[2]||e[3]),32&n&&(o.disabled=e[5]),128&n&&(o.value=e[7]()),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Xt(e){let t,n;return t=new e[10]({props:{inputClass:e[2]||e[3],disabled:e[5],readonly:e[14],required:e[13],type:"email",id:e[18],name:e[17],value:e[7]()}}),t.$on("change",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};12&n&&(o.inputClass=e[2]||e[3]),32&n&&(o.disabled=e[5]),128&n&&(o.value=e[7]()),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Zt(e){let t,n;return t=new Kt({props:{inputClass:e[2]||e[3],disabled:e[5],readonly:e[14],required:e[13],id:e[18],item:e[0],value:e[7]()}}),t.$on("blur",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};12&n&&(o.inputClass=e[2]||e[3]),32&n&&(o.disabled=e[5]),1&n&&(o.item=e[0]),128&n&&(o.value=e[7]()),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function en(e){let t,n;return t=new Yt({props:{classId:e[3],id:e[18],disabled:e[5],required:e[13],value:e[19](),noForm:e[2]}}),t.$on("change",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.classId=e[3]),32&n&&(o.disabled=e[5]),4&n&&(o.noForm=e[2]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function tn(e){let t,n;return t=new e[12]({props:{inputClass:e[2]||e[3],required:e[13],disabled:e[5],id:e[18],name:e[17],value:e[19](),closeOnSelection:!0}}),t.$on("change",e[20](!0)),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};12&n&&(o.inputClass=e[2]||e[3]),32&n&&(o.disabled=e[5]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function nn(e){let t,n;return t=new e[11]({props:{inputClass:e[2]||e[3],disabled:e[5],readonly:e[14],required:e[13],id:e[18],name:e[17],value:e[7]()}}),t.$on("change",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};12&n&&(o.inputClass=e[2]||e[3]),32&n&&(o.disabled=e[5]),128&n&&(o.value=e[7]()),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function on(e){let t,n;return t=new zt({props:{classId:e[3],disabled:e[5],required:e[13],id:e[18],item:e[0],value:e[7](),noForm:e[2]}}),t.$on("blur",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.classId=e[3]),32&n&&(o.disabled=e[5]),1&n&&(o.item=e[0]),128&n&&(o.value=e[7]()),4&n&&(o.noForm=e[2]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function sn(e){let t,n;return t=new Et({props:{classId:e[3],disabled:e[5],required:e[13],readonly:e[14],id:e[18],item:e[0],value:e[7](),noForm:e[2]}}),t.$on("blur",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.classId=e[3]),32&n&&(o.disabled=e[5]),1&n&&(o.item=e[0]),128&n&&(o.value=e[7]()),4&n&&(o.noForm=e[2]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function rn(e){let t,n;return t=new o({props:{classId:e[3],disabled:e[5],readonly:e[14],id:e[18],name:e[0].name,value:e[7](),noForm:e[2]}}),t.$on("blur",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.classId=e[3]),32&n&&(o.disabled=e[5]),1&n&&(o.name=e[0].name),128&n&&(o.value=e[7]()),4&n&&(o.noForm=e[2]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function ln(e){let t,n;return t=new _t({props:{classId:e[3],eventId:e[4],disabled:e[5],readonly:e[14],id:e[18],item:e[0],desc:e[8],value:e[7](),noForm:e[2],praefix:e[1],selectionFields:e[6]}}),t.$on("task",e[24]),t.$on("change",e[20]()),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.classId=e[3]),16&n&&(o.eventId=e[4]),32&n&&(o.disabled=e[5]),1&n&&(o.item=e[0]),256&n&&(o.desc=e[8]),128&n&&(o.value=e[7]()),4&n&&(o.noForm=e[2]),2&n&&(o.praefix=e[1]),64&n&&(o.selectionFields=e[6]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function an(e){let t,n,o,s;const r=[ln,rn,sn,on,nn,tn,en,Zt,Xt,Qt],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]=r[t](e),{c(){n.c(),o=D()},m(e,n){i[t].m(e,n),x(e,o,n),s=!0},p(e,s){let a=t;t=l(e),t===a?i[t].p(e,s):(re(),ae(i[a],1,1,(()=>{i[a]=null})),ie(),n=i[t],n?n.p(e,s):(n=i[t]=r[t](e),n.c()),le(n,1),n.m(o.parentNode,o))},i(e){s||(le(n),s=!0)},o(e){ae(n),s=!1},d(e){i[t].d(e),e&&I(o)}}}function cn(e){let t,n;return t=new e[9]({props:{id:e[21](e[18]),class:e[15]&&"hidden",name:e[0].designation,help:e[0].properties?.hint,$$slots:{default:[an]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(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),1073742335&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function dn(e,t,n){let o,s;const r=A(),{FormField:i,TextField:l,Switch:a,DatePicker:u,TimePicker:m}=c;let{praefix:f=""}=t,{item:p}=t,{listName:$=""}=t,{record:h}=t,{noForm:g=!1}=t,{classId:v}=t,{eventId:b}=t,{disabled:y}=t,{selectionFields:w}=t;const k=p.properties?.required,x=p.properties?.readonly,I=p.properties?.hidden,F=p.properties?.pattern;if("string"==typeof p.name){const[e,t]=p.name.split("_");t&&(p.name=t)}const _=($?$+".":"")+p.name,S=_+(""!==f?"-"+f:""),C=(e,t=_)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}},E=C(h);return e.$$set=e=>{"praefix"in e&&n(1,f=e.praefix),"item"in e&&n(0,p=e.item),"listName"in e&&n(23,$=e.listName),"record"in e&&n(22,h=e.record),"noForm"in e&&n(2,g=e.noForm),"classId"in e&&n(3,v=e.classId),"eventId"in e&&n(4,b=e.eventId),"disabled"in e&&n(5,y=e.disabled),"selectionFields"in e&&n(6,w=e.selectionFields)},e.$$.update=()=>{4194304&e.$$.dirty&&n(7,o=(e=_)=>{let t=C(h);return void 0===t?"":t})},n(8,s=((e=_)=>{let t=h["_"+e];return t=d(t),void 0===t?"":t})()),[p,f,g,v,b,y,w,o,s,i,l,a,u,k,x,I,F,_,S,(e=_)=>{let t=C(h);return t?new Date(t):new Date},e=>({detail:t})=>{const o=t.value;n(22,h[_]=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,h);const s=Object.values(h).every((e=>!e))&&o;r("notify",{oldValue:E,value:o,add:s,itemName:_,desc:t.description})},()=>"object"===p.type?"comment_"+S:S,h,$,function(t){W(e,t)}]}class un 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}",k(document.head,t)),he(this,e,dn,cn,b,{praefix:1,item:0,listName:23,record:22,noForm:2,classId:3,eventId:4,disabled:5,selectionFields:6})}}const{document:mn}=ue;function fn(e,t,n){const o=e.slice();return o[41]=t[n],o[43]=n,o}function pn(e,t,n){const o=e.slice();return o[50]=t[n],o}function $n(e,t,n){const o=e.slice();return o[45]=t[n].title,o[46]=t[n].toDelete,o[47]=t[n].icon,o}function hn(e){let t,n,o;function s(t){e[25](t)}let r={item:e[16],disabled:!0};return void 0!==e[8]&&(r.value=e[8]),t=new Et({props:r}),R.push((()=>me(t,"value",s))),{c(){fe(t.$$.fragment)},m(e,n){pe(t,e,n),o=!0},p(e,o){const s={};!n&&256&o[0]&&(n=!0,s.value=e[8],X((()=>n=!1))),t.$set(s)},i(e){o||(le(t.$$.fragment,e),o=!0)},o(e){ae(t.$$.fragment,e),o=!1},d(e){$e(t,e)}}}function gn(e){let t,n,o;function s(t){e[26](t)}let r={item:e[14],disabled:!0};return void 0!==e[5]&&(r.value=e[5]),t=new Et({props:r}),R.push((()=>me(t,"value",s))),{c(){fe(t.$$.fragment)},m(e,n){pe(t,e,n),o=!0},p(e,o){const s={};!n&&32&o[0]&&(n=!0,s.value=e[5],X((()=>n=!1))),t.$set(s)},i(e){o||(le(t.$$.fragment,e),o=!0)},o(e){ae(t.$$.fragment,e),o=!1},d(e){$e(t,e)}}}function vn(e){let t,n;return t=new e[12]({props:{$$slots:{handle:[In,({toggle:e})=>({44:e}),({toggle:e})=>[0,e?8192:0]],default:[yn,({toggle:e})=>({44:e}),({toggle:e})=>[0,e?8192:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){v(e[40])&&e[40].apply(this,arguments)})),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(n,o){e=n;const s={};207&o[0]|4202496&o[1]&&(s.$$scope={dirty:o,ctx:e}),t.$set(s)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function bn(e){let t,n;return t=new un({props:{praefix:e[43],item:e[50],eventId:e[3],record:e[41],noForm:Cn,classId:e[2],disabled:e[0],selectionFields:e[17]}}),t.$on("notify",(function(){v(e[19](e[50],e[43]))&&e[19](e[50],e[43]).apply(this,arguments)})),t.$on("task",e[27]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(n,o){e=n;const s={};2&o[0]&&(s.item=e[50]),8&o[0]&&(s.eventId=e[3]),64&o[0]&&(s.record=e[41]),4&o[0]&&(s.classId=e[2]),1&o[0]&&(s.disabled=e[0]),t.$set(s)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function yn(e){let t,n,o,s,r=e[1].item,i=[];for(let t=0;t<r.length;t+=1)i[t]=bn(pn(e,r,t));const l=e=>ae(i[e],1,1,(()=>{i[e]=null}));return{c(){t=_("div");for(let e=0;e<i.length;e+=1)i[e].c();o=E(),N(t,"id",n=`accordion-content-${e[2]}-${e[1].name}-${e[43]}`)},m(e,n){x(e,t,n);for(let e=0;e<i.length;e+=1)i[e].m(t,null);x(e,o,n),s=!0},p(e,o){if(655439&o[0]){let n;for(r=e[1].item,n=0;n<r.length;n+=1){const s=pn(e,r,n);i[n]?(i[n].p(s,o),le(i[n],1)):(i[n]=bn(s),i[n].c(),le(i[n],1),i[n].m(t,null))}for(re(),n=r.length;n<i.length;n+=1)l(n);ie()}(!s||6&o[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}-${e[43]}`))&&N(t,"id",n)},i(e){if(!s){for(let e=0;e<r.length;e+=1)le(i[e]);s=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ae(i[e]);s=!1},d(e){e&&I(t),F(i,e),e&&I(o)}}}function wn(e){let t,n,o=e[18](e[7],e[43])+"";return{c(){t=_("span"),n=C(o),N(t,"class","svelte-6jvaou"),T(t,"delete",e[41]._delete)},m(e,o){x(e,t,o),k(t,n)},p(e,s){128&s[0]&&o!==(o=e[18](e[7],e[43])+"")&&O(n,o),64&s[0]&&T(t,"delete",e[41]._delete)},d(e){e&&I(t)}}}function kn(e){let t,n,o;var s=e[47];return s&&(t=new s({props:{size:"20"}})),{c(){t&&fe(t.$$.fragment),n=D()},m(e,s){t&&pe(t,e,s),x(e,n,s),o=!0},p(e,o){if(s!==(s=e[47])){if(t){re();const e=t;ae(e.$$.fragment,1,0,(()=>{$e(e,1)})),ie()}s?(t=new s({props:{size:"20"}}),fe(t.$$.fragment),le(t.$$.fragment,1),pe(t,n.parentNode,n)):t=null}},i(e){o||(t&&le(t.$$.fragment,e),o=!0)},o(e){t&&ae(t.$$.fragment,e),o=!1},d(e){e&&I(n),t&&$e(t,e)}}}function xn(e){let t,n,o,s,r,i=!e[0]&&kn(e);return{c(){t=_("span"),i&&i.c(),N(t,"class","pointer icon svelte-6jvaou"),N(t,"title",e[45]),t.hidden=n=e[43]===e[6].length-1||!(e[41]._delete^e[46])},m(n,l){x(n,t,l),i&&i.m(t,null),o=!0,s||(r=j(t,"click",e[21](e[43])),s=!0)},p(s,r){(e=s)[0]?i&&(re(),ae(i,1,1,(()=>{i=null})),ie()):i?(i.p(e,r),1&r[0]&&le(i,1)):(i=kn(e),i.c(),le(i,1),i.m(t,null)),(!o||64&r[0]&&n!==(n=e[43]===e[6].length-1||!(e[41]._delete^e[46])))&&(t.hidden=n)},i(e){o||(le(i),o=!0)},o(e){ae(i),o=!1},d(e){e&&I(t),i&&i.d(),s=!1,r()}}}function In(e){let t,n,o,s,r;n=new e[10]({props:{$$slots:{default:[wn]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[20](e[44],e[43]))&&e[20](e[44],e[43]).apply(this,arguments)}));let i=[{title:"löschen",toDelete:!0,icon:xe},{title:"undo",toDelete:!1,icon:ye}],l=[];for(let t=0;t<2;t+=1)l[t]=xn($n(e,i,t));const a=e=>ae(l[e],1,1,(()=>{l[e]=null}));return{c(){t=_("div"),fe(n.$$.fragment),o=E();for(let e=0;e<2;e+=1)l[e].c();s=E(),N(t,"class","accordion svelte-6jvaou"),N(t,"slot","handle")},m(e,i){x(e,t,i),pe(n,t,null),k(t,o);for(let e=0;e<2;e+=1)l[e].m(t,null);k(t,s),r=!0},p(o,r){e=o;const c={};if(192&r[0]|4194304&r[1]&&(c.$$scope={dirty:r,ctx:e}),n.$set(c),2097217&r[0]){let n;for(i=[{title:"löschen",toDelete:!0,icon:xe},{title:"undo",toDelete:!1,icon:ye}],n=0;n<2;n+=1){const o=$n(e,i,n);l[n]?(l[n].p(o,r),le(l[n],1)):(l[n]=xn(o),l[n].c(),le(l[n],1),l[n].m(t,s))}for(re(),n=2;n<2;n+=1)a(n);ie()}},i(e){if(!r){le(n.$$.fragment,e);for(let e=0;e<2;e+=1)le(l[e]);r=!0}},o(e){ae(n.$$.fragment,e),l=l.filter(Boolean);for(let e=0;e<2;e+=1)ae(l[e]);r=!1},d(e){e&&I(t),$e(n),F(l,e)}}}function Fn(e){let t,n,o=(!e[4]&&!e[0]||e[43]<e[6].length-1)&&vn(e);return{c(){o&&o.c(),t=D()},m(e,s){o&&o.m(e,s),x(e,t,s),n=!0},p(e,n){!e[4]&&!e[0]||e[43]<e[6].length-1?o?(o.p(e,n),81&n[0]&&le(o,1)):(o=vn(e),o.c(),le(o,1),o.m(t.parentNode,t)):o&&(re(),ae(o,1,1,(()=>{o=null})),ie())},i(e){n||(le(o),n=!0)},o(e){ae(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function _n(e){let t,n,o=e[6],s=[];for(let t=0;t<o.length;t+=1)s[t]=Fn(fn(e,o,t));const r=e=>ae(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=D()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);x(e,t,o),n=!0},p(e,n){if(4063455&n[0]|8704&n[1]){let i;for(o=e[6],i=0;i<o.length;i+=1){const r=fn(e,o,i);s[i]?(s[i].p(r,n),le(s[i],1)):(s[i]=Fn(r),s[i].c(),le(s[i],1),s[i].m(t.parentNode,t))}for(re(),i=o.length;i<s.length;i+=1)r(i);ie()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)le(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)ae(s[e]);n=!1},d(e){F(s,e),e&&I(t)}}}function Sn(e){let t,n,o,s,r,i=e[15]&&function(e){let t,n;return t=new e[9]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[hn]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};256&n[0]|4194304&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}(e),l=e[13]&&function(e){let t,n;return t=new e[9]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[gn]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};32&n[0]|4194304&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}(e);return s=new e[11]({props:{$$slots:{default:[_n,({closeOtherPanels:e})=>({40:e}),({closeOtherPanels:e})=>[0,e?512:0]]},$$scope:{ctx:e}}}),{c(){t=_("div"),i&&i.c(),n=E(),l&&l.c(),o=E(),fe(s.$$.fragment),N(t,"class","formList")},m(e,a){x(e,t,a),i&&i.m(t,null),k(t,n),l&&l.m(t,null),k(t,o),pe(s,t,null),r=!0},p(e,t){e[15]&&i.p(e,t),e[13]&&l.p(e,t);const n={};223&t[0]|4194816&t[1]&&(n.$$scope={dirty:t,ctx:e}),s.$set(n)},i(e){r||(le(i),le(l),le(s.$$.fragment,e),r=!0)},o(e){ae(i),ae(l),ae(s.$$.fragment,e),r=!1},d(e){e&&I(t),i&&i.d(),l&&l.d(),$e(s)}}}const Cn=!0;function En(e,t,n){let o,s;const{FormField:r,TextField:i,Button:l,Accordion:a,AccordionSection:f}=c,p=A();let{list:$}=t,{schema:h}=t,{record:g}=t,{classId:v}=t,{eventId:b}=t,{disabled:y}=t,{fixed:w}=t;const k=h.find((e=>"price"===e.name&&!e.properties?.hidden)),x=k&&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=h.properties?.readonly;y||=C;let E,D,j=[];h.filter((e=>e.selection)).map((e=>j.push({refClass:e.selection,value:""})));const N=(e,t)=>{if(!t)return;const o=h.find((e=>e.name===t)),s=o.properties.value.formula,{operator:r,argument:i}=s,l=i.map((t=>E[e][t.refItem]));let a=0;"$add"===r&&(a=l.reduce(((e,t)=>e+ +t))),"$subtract"===r&&(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[s,r]=t.split(":");return s?e-=r?(+s+ +r/60).toFixed(2):+s:0}))),n(6,E[e][t]=(a||0).toFixed(o.properties.decimals||0),E)};D=h.filter((e=>e.refClass)).reduce((async(e,t)=>{e=await e;const n=h.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,o]=t.selection.split(":"),[s]=o.split(".");s&&e.push({refClass:s,items:[n],selection:t.selection})}const o={refClass:t.refClass,items:[]};return n.forEach((e=>{o.items.push(e.name)})),e.push(o),e}),[]);const O=async(e,t,o,s)=>{const r=(await D).find((e=>e.refClass===t.refClass));if(!r)return;const{refClass:i,items:l,selection:a}=r;return o?Promise.all(l.map((r=>{let c="";const{refInput:d}=t;if(d&&E[e]){const[t,n]=d.split(".");c=n?E[e][n]:g[t]}if(a&&o!==s)return Promise.resolve(l.map((t=>{n(6,E[e][t]="",E)})));if(d&&!c||z(e,r)){const o=h.find((e=>e.refClass===i)),s=E[e][o.name];if(t.selection){const o=po(t.selection+s.toString());if(o)return Promise.resolve(o).then((t=>n(6,E[e][r]=t[r],E)))}return Promise.resolve($o(o.refClass,s)).then((t=>n(6,E[e][r]=t[r],E)))}}))):Promise.resolve(l.map((t=>{n(6,E[e][t]="",E)})))},z=(e,t)=>{let n=E[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&&n(1,$=e.list),"schema"in e&&n(22,h=e.schema),"record"in e&&n(23,g=e.record),"classId"in e&&n(2,v=e.classId),"eventId"in e&&n(3,b=e.eventId),"disabled"in e&&n(0,y=e.disabled),"fixed"in e&&n(4,w=e.fixed)},e.$$.update=()=>{8388610&e.$$.dirty[0]&&g&&n(6,E=(g[$.name]||[]).concat({})),64&e.$$.dirty[0]&&n(7,o=E),226&e.$$.dirty[0]&&o&&((()=>{if(F)n(8,_=E?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(k)n(5,I=E?.reduce(((e,t)=>{if(t.price){const n=(x?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),p("save",{listName:$.name,value:E,amountValue:I})),16777216&e.$$.dirty[0]&&(s=e=>S[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[y,$,v,b,w,I,E,o,_,r,l,a,f,k,{name:"amountValue",properties:{decimals:2}},F,{name:"hoursValue",properties:{decimals:2}},j,(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)=>async({detail:s})=>{const{oldValue:r,value:i,add:l,desc:a}=s;N(t,e._formulaActor);const c=j?.find((t=>t.refClass.split(":")[1].split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,i)),i&&E.length===t+1&&n(6,E=E.concat({})),a&&n(24,S[i]=a,S),await O(t,e,i,r),n(7,o=E)},(e,t)=>n=>{e(n);const o=`#accordion-content-${v}-${$.name}-${t} > div.form-field:not(.hidden)`,s=document.querySelectorAll(o),r=s[s.length-1];K().then((()=>r.scrollIntoView({behavior:"smooth",block:"end"})))},e=>()=>{n(6,E[e]._delete=!E[e]._delete,E)},h,g,S,function(e){_=e,n(8,_)},function(e){I=e,n(5,I)},function(t){W(e,t)}]}class Dn extends ge{constructor(e){var t;super(),mn.getElementById("svelte-6jvaou-style")||((t=_("style")).id="svelte-6jvaou-style",t.textContent=".accordion.svelte-6jvaou{display:flex;overflow:hidden}.formList .accordion > .btn{display:inline-block;margin-bottom:1em;background-color:#F5F5F5}.sTask .formList .accordion > .btn{width:95% !important}.sEmbedded .formList .accordion > .btn{width:97%}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-6jvaou{padding-top:1em}span.delete.svelte-6jvaou{text-decoration:line-through}.icon.svelte-6jvaou{margin-right:-0.75em}.form-field .formField_italic{font-style:italic}",k(mn.head,t)),he(this,e,En,Sn,b,{list:1,schema:22,record:23,classId:2,eventId:3,disabled:0,fixed:4},[-1,-1])}}const{document:jn}=ue;function Nn(e,t,n){const o=e.slice();return o[17]=t[n],o}function On(e){let t,n;return t=new un({props:{classId:e[2],item:e[17],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4]}}),t.$on("notify",e[10]),t.$on("task",e[13]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[17]),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||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function zn(e){let t,n,o,s=e[1].item,r=[];for(let t=0;t<s.length;t+=1)r[t]=On(Nn(e,s,t));const i=e=>ae(r[e],1,1,(()=>{r[e]=null}));return{c(){t=_("div");for(let e=0;e<r.length;e+=1)r[e].c();N(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){x(e,t,n);for(let e=0;e<r.length;e+=1)r[e].m(t,null);o=!0},p(e,l){if(1055&l){let n;for(s=e[1].item,n=0;n<s.length;n+=1){const o=Nn(e,s,n);r[n]?(r[n].p(o,l),le(r[n],1)):(r[n]=On(o),r[n].c(),le(r[n],1),r[n].m(t,null))}for(re(),n=s.length;n<r.length;n+=1)i(n);ie()}(!o||6&l&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&N(t,"id",n)},i(e){if(!o){for(let e=0;e<s.length;e+=1)le(r[e]);o=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ae(r[e]);o=!1},d(e){e&&I(t),F(r,e)}}}function Ln(e){let t,n,o=e[9](e[5])+"";return{c(){t=_("span"),n=C(o)},m(e,o){x(e,t,o),k(t,n)},p(e,t){32&t&&o!==(o=e[9](e[5])+"")&&O(n,o)},d(e){e&&I(t)}}}function Tn(e){let t,n,o;return n=new e[6]({props:{$$slots:{default:[Ln]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[11](e[16]))&&e[11](e[16]).apply(this,arguments)})),{c(){t=_("div"),fe(n.$$.fragment),N(t,"class","accordion svelte-148ktt9"),N(t,"slot","handle")},m(e,s){x(e,t,s),pe(n,t,null),o=!0},p(t,o){e=t;const s={};1048608&o&&(s.$$scope={dirty:o,ctx:e}),n.$set(s)},i(e){o||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n)}}}function Pn(e){let t,n;return t=new e[8]({props:{$$slots:{handle:[Tn,({toggle:e})=>({16:e}),({toggle:e})=>e?65536:0],default:[zn,({toggle:e})=>({16:e}),({toggle:e})=>e?65536:0]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};1114175&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Mn(e){let t,n,o;return n=new e[7]({props:{$$slots:{default:[Pn]},$$scope:{ctx:e}}}),{c(){t=_("div"),fe(n.$$.fragment),N(t,"class","formList")},m(e,s){x(e,t,s),pe(n,t,null),o=!0},p(e,[t]){const o={};1048639&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(le(n.$$.fragment,e),o=!0)},o(e){ae(n.$$.fragment,e),o=!1},d(e){e&&I(t),$e(n)}}}function Bn(e,t,n){const{Button:o,Accordion:s,AccordionSection:r}=c;let{list:i}=t,{schema:l}=t,{record:a}=t,{classId:f}=t,{eventId:p}=t,{disabled:$}=t;const h={};let g=a[i.name]||{};a[i.name]=g;const v=e=>h[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(12,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,$,g,o,s,r,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&&(h[o]=e.desc);const s=a[t];n(0,a[t]={...s,[o]:e.value},a),n(5,g=a[t])},e=>t=>{e(t);const n=`#accordion-content-${f}-${i.name} > div.form-field:last-child`,o=document.querySelector(n);K().then((()=>o.scrollIntoView({behavior:"smooth",block:"end"})))},l,function(t){W(e,t)}]}class qn extends ge{constructor(e){var t;super(),jn.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}}",k(jn.head,t)),he(this,e,Bn,Mn,b,{list:1,schema:12,record:0,classId:2,eventId:3,disabled:4})}}const{Boolean:An,document:Wn}=ue;function Hn(e,t,n){const o=e.slice();return o[49]=t[n],o}function Rn(e,t,n){const o=e.slice();return o[52]=t[n],o}function Yn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Vn(e){let t,n,o=e[48]&&function(e){let t,n,o,s,r,i,l,a,c,d,u,m,f,p,$,h,g,v,b=e[0].items,y=[];for(let t=0;t<b.length;t+=1)y[t]=Jn(Rn(e,b,t));const S=e=>ae(y[e],1,1,(()=>{y[e]=null}));let C=e[0].list&&Un(e);m=new e[7]({props:{outline:!0,$$slots:{default:[to]},$$scope:{ctx:e}}}),m.$on("click",e[17]),p=new e[7]({props:{disabled:e[4],form:e[9],filled:!0,type:"submit",$$slots:{default:[no]},$$scope:{ctx:e}}});let D=e[1]&&!e[4]&&oo(e);return{c(){t=_("section"),n=_("form"),o=_("input"),r=E();for(let e=0;e<y.length;e+=1)y[e].c();i=E(),C&&C.c(),l=E(),a=_("div"),c=_("small"),c.textContent=`${vo}`,d=E(),u=_("div"),fe(m.$$.fragment),f=E(),fe(p.$$.fragment),$=E(),D&&D.c(),N(o,"class",w(e[9])+" svelte-1dh1s6w"),N(o,"name","_id"),N(o,"type","hidden"),o.value=s=e[2]._id||"",N(n,"class",w(e[10])+" svelte-1dh1s6w"),N(n,"id",e[9]),N(a,"class","comment svelte-1dh1s6w"),N(u,"class","form--buttons svelte-1dh1s6w"),N(t,"class",w(e[11])+" svelte-1dh1s6w")},m(s,b){x(s,t,b),k(t,n),k(n,o),k(n,r);for(let e=0;e<y.length;e+=1)y[e].m(n,null);var w;k(n,i),C&&C.m(n,null),k(t,l),k(t,a),k(a,c),k(t,d),k(t,u),pe(m,u,null),k(u,f),pe(p,u,null),k(u,$),D&&D.m(u,null),h=!0,g||(v=j(n,"submit",(w=e[16],function(e){return e.preventDefault(),w.call(this,e)})),g=!0)},p(e,t){if((!h||4&t[0]&&s!==(s=e[2]._id||""))&&(o.value=s),262677&t[0]){let o;for(b=e[0].items,o=0;o<b.length;o+=1){const s=Rn(e,b,o);y[o]?(y[o].p(s,t),le(y[o],1)):(y[o]=Jn(s),y[o].c(),le(y[o],1),y[o].m(n,i))}for(re(),o=b.length;o<y.length;o+=1)S(o);ie()}e[0].list?C?(C.p(e,t),1&t[0]&&le(C,1)):(C=Un(e),C.c(),le(C,1),C.m(n,null)):C&&(re(),ae(C,1,1,(()=>{C=null})),ie());const r={};16777216&t[1]&&(r.$$scope={dirty:t,ctx:e}),m.$set(r);const l={};16&t[0]&&(l.disabled=e[4]),16777216&t[1]&&(l.$$scope={dirty:t,ctx:e}),p.$set(l),e[1]&&!e[4]?D?(D.p(e,t),18&t[0]&&le(D,1)):(D=oo(e),D.c(),le(D,1),D.m(u,null)):D&&(re(),ae(D,1,1,(()=>{D=null})),ie())},i(e){if(!h){for(let e=0;e<b.length;e+=1)le(y[e]);le(C),le(m.$$.fragment,e),le(p.$$.fragment,e),le(D),h=!0}},o(e){y=y.filter(An);for(let e=0;e<y.length;e+=1)ae(y[e]);ae(C),ae(m.$$.fragment,e),ae(p.$$.fragment,e),ae(D),h=!1},d(e){e&&I(t),F(y,e),C&&C.d(),$e(m),$e(p),D&&D.d(),g=!1,v()}}}(e);return{c(){o&&o.c(),t=D()},m(e,s){o&&o.m(e,s),x(e,t,s),n=!0},p(e,t){e[48]&&o.p(e,t)},i(e){n||(le(o),n=!0)},o(e){ae(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Gn(e){let t,n;return t=new un({props:{classId:e[9],item:e[52],record:e[2],disabled:e[4],eventId:e[0].id}}),t.$on("task",e[18]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[52]),4&n[0]&&(o.record=e[2]),16&n[0]&&(o.disabled=e[4]),1&n[0]&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Jn(e){let t,n,o="list"!==e[52].type&&Gn(e);return{c(){o&&o.c(),t=D()},m(e,s){o&&o.m(e,s),x(e,t,s),n=!0},p(e,n){"list"!==e[52].type?o?(o.p(e,n),1&n[0]&&le(o,1)):(o=Gn(e),o.c(),le(o,1),o.m(t.parentNode,t)):o&&(re(),ae(o,1,1,(()=>{o=null})),ie())},i(e){n||(le(o),n=!0)},o(e){ae(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Un(e){let t,n,o,s=e[12]&&e[3]>0&&Kn(e),r=e[0].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=eo(Hn(e,r,t));const l=e=>ae(i[e],1,1,(()=>{i[e]=null}));return{c(){s&&s.c(),t=E();for(let e=0;e<i.length;e+=1)i[e].c();n=D()},m(e,r){s&&s.m(e,r),x(e,t,r);for(let t=0;t<i.length;t+=1)i[t].m(e,r);x(e,n,r),o=!0},p(e,o){if(e[12]&&e[3]>0?s?(s.p(e,o),8&o[0]&&le(s,1)):(s=Kn(e),s.c(),le(s,1),s.m(t.parentNode,t)):s&&(re(),ae(s,1,1,(()=>{s=null})),ie()),524821&o[0]){let t;for(r=e[0].list,t=0;t<r.length;t+=1){const s=Hn(e,r,t);i[t]?(i[t].p(s,o),le(i[t],1)):(i[t]=eo(s),i[t].c(),le(i[t],1),i[t].m(n.parentNode,n))}for(re(),t=r.length;t<i.length;t+=1)l(t);ie()}},i(e){if(!o){le(s);for(let e=0;e<r.length;e+=1)le(i[e]);o=!0}},o(e){ae(s),i=i.filter(An);for(let e=0;e<i.length;e+=1)ae(i[e]);o=!1},d(e){s&&s.d(e),e&&I(t),F(i,e),e&&I(n)}}}function Kn(e){let t,n;return t=new e[8]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[Qn]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};8&n[0]|16777216&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Qn(e){let t,n,o;function s(t){e[29](t)}let r={item:e[13],disabled:!0};return void 0!==e[3]&&(r.value=e[3]),t=new Et({props:r}),R.push((()=>me(t,"value",s))),{c(){fe(t.$$.fragment)},m(e,n){pe(t,e,n),o=!0},p(e,o){const s={};!n&&8&o[0]&&(n=!0,s.value=e[3],X((()=>n=!1))),t.$set(s)},i(e){o||(le(t.$$.fragment,e),o=!0)},o(e){ae(t.$$.fragment,e),o=!1},d(e){$e(t,e)}}}function Xn(e){let t,n;return t=new qn({props:{classId:e[9],list:e[49],eventId:e[0].id,schema:e[49].item,record:e[2],disabled:e[4]}}),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[49]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[49].item),4&n[0]&&(o.record=e[2]),16&n[0]&&(o.disabled=e[4]),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function Zn(e){let t,n;return t=new Dn({props:{classId:e[9],list:e[49],eventId:e[0].id,schema:e[49].item,record:e[2],disabled:e[4],fixed:e[49].fixed}}),t.$on("save",e[19]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[49]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[49].item),4&n[0]&&(o.record=e[2]),16&n[0]&&(o.disabled=e[4]),1&n[0]&&(o.fixed=e[49].fixed),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function eo(e){let t,n,o,s,r,i;t=new e[6]({props:{text:e[49].designation}});const l=[Zn,Xn],a=[];function c(e,t){return"array"===e[49].type?0:1}return o=c(e),s=a[o]=l[o](e),{c(){fe(t.$$.fragment),n=E(),s.c(),r=D()},m(e,s){pe(t,e,s),x(e,n,s),a[o].m(e,s),x(e,r,s),i=!0},p(e,n){const i={};1&n[0]&&(i.text=e[49].designation),t.$set(i);let d=o;o=c(e),o===d?a[o].p(e,n):(re(),ae(a[d],1,1,(()=>{a[d]=null})),ie(),s=a[o],s?s.p(e,n):(s=a[o]=l[o](e),s.c()),le(s,1),s.m(r.parentNode,r))},i(e){i||(le(t.$$.fragment,e),le(s),i=!0)},o(e){ae(t.$$.fragment,e),ae(s),i=!1},d(e){$e(t,e),e&&I(n),a[o].d(e),e&&I(r)}}}function to(e){let t;return{c(){t=C("Abbrechen")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function no(e){let t;return{c(){t=C("Speichern und schliessen")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function oo(e){let t,n;return t=new e[7]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[so]},$$scope:{ctx:e}}}),t.$on("click",e[15]),{c(){fe(t.$$.fragment)},m(e,o){pe(t,e,o),n=!0},p(e,n){const o={};16777216&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function so(e){let t;return{c(){t=C("Speichern")},m(e,n){x(e,t,n)},d(e){e&&I(t)}}}function ro(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function io(e){let t,n,o,s;Wn.title=t=e[5];let r={ctx:e,current:null,token:null,hasCatch:!1,pending:ro,then:Vn,catch:Yn,value:48,blocks:[,,,]};return ce(e[14](),r),{c(){n=E(),o=D(),r.block.c()},m(e,t){x(e,n,t),x(e,o,t),r.block.m(e,r.anchor=t),r.mount=()=>o.parentNode,r.anchor=o,s=!0},p(n,o){e=n,(!s||32&o[0])&&t!==(t=e[5])&&(Wn.title=t),de(r,e,o)},i(e){s||(le(r.block),s=!0)},o(e){for(let e=0;e<3;e+=1){ae(r.blocks[e])}s=!1},d(e){e&&I(n),e&&I(o),r.block.d(e),r.token=null,r=null}}}let lo=new Map,ao=new Map,co=new Map;const uo=(e,n)=>{const o=n;return lo.has(o)||lo.set(o,t.getTasksList(n).then((({data:e})=>e))),lo.get(o)},mo=(e,n,o)=>ao.get(o)||uo(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(ao.set(o,e),e))),fo=(e,t)=>{co.set(e,t)},po=e=>co.get(e),$o=(e,n)=>co.get(n)||t.getTask(e,n).then((e=>(co.set(n,e),e))),ho=(e,n)=>{if(!lo.get(n))return;const o=n;lo.set(o,t.getTasksList(n).then((({data:e})=>e)))},go=()=>{lo=new Map,ao=new Map,co=new Map};let vo="";function bo(e,o,a){let d,u,m,p;y(e,i,(e=>a(32,m=e))),y(e,l,(e=>a(33,p=e)));const{Divider:$,Button:h,FormField:g}=c,v=JSON.parse(s.getItem("Locale")),b=A();let w,k,{schema:x}=o,{recID:I}=o,{prevEventID:F=!1}=o,{prev:_=!1}=o,{taskId:S=!1}=o,{description:C=""}=o,{root:E=!1}=o,{readonly:D}=o,{isStandalone:j}=o,N={},O={},z="form-"+x.class+Math.floor(9e3*Math.random()+1e3).toString();const L=E?"fEmbedded":"fTask",T=E?"sEmbedded":"sTask",P=x.list?.filter((e=>"array"===e.type))?.length>1;let M=0;const B={},W=async()=>{if(!x.input)return;if(!x.input.length)return;if(x.input.length<2)return;const e=await t.getEvent(x.id),n=!e.input.class[0].name&&e.input.class[0].selection;if(!n)return;const o=e.input.class[1].name,s=e.input.class[1].destination?.split(".")[0];if(!o||!s)return;const r=x.list?.find((e=>e.name===o));if(!r)return;const i=await t.getSchemaByClass(n),l=(await t.getTasks(i.id)).data;if(!l?.length)return;const c=[];for(const e of l){const t={};for(const n of r.item)n.name===s?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);c.push(t)}c.length&&a(2,N[o]=c,N)},H=()=>{for(const e of x.items)e.properties?.value?.concatenation&&R(e)},R=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 Y(e.refItemNext));a(2,N[e.name]=n,N)},Y=async e=>{const[n,o]=e.offset?.split(",")||[0,0],s=+e.base||0,r=+e.step||1;e.type;const i=e.refItem,l=await t.getLastId(x.class,i);if(!l?.length)return(s+r).toString().padStart(o,"0");const a=l[0][i];return((+a?.substring(n,n+o)||s)+r).toString().padStart(o,"0")},V=(e,t)=>{const n=t.name,o=e.find((e=>e.name===n));let s=t.value;if(s&&o&&o.type.startsWith("date"))try{return function(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let s=!1;if(""===e)return null;const r=t.split(Tt);let i=0,l=0;const a=new Date(0);for(const c of r){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)s=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;s=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{Lt.lastIndex=i;const r=Lt.exec(e);if(null==r)return n;switch(t[l]){case"H":a.setHours(parseInt(r[0])+12*s);break;case"M":a.setMinutes(r[0]);break;case"S":a.setSeconds(r[0]);break;case"d":a.setDate(r[0]);break;case"m":a.setMonth(r[0]-1);break;case"y":a.setFullYear(100*o+parseInt(r[0]));break;case"Y":a.setFullYear(r[0])}i+=r[0].length}l++}return isNaN(a.valueOf())?n:a}(s,"%d.%m.%Y").toISOString()}catch{return new Date(s).toISOString()}if(o&&"boolean"===o.type&&(s=!!t.checked),o&&"number"===o.type){const e=Number("1.1").toLocaleString(v.id).substring(1,2);try{s=Number(s.replace(e,".")).toString()}catch{}}return s},G=async(e=!0)=>{I||a(4,d=!0);const n={};Array.from(document.querySelectorAll("form#"+z+" ."+z)).map((e=>{if(e.name)if(e.name.includes(".")){const[t,o]=e.name.split("."),s=x.list.find((e=>e.name===t));n[e.name]=V(s.item,e)}else n[e.name]=V(x.items,e)})),x.list&&x.list.map((e=>{"array"===e.type&&O[e.name]&&(n[e.name]=O[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,o])=>("_delete"!==n&&(t[n]=V(e.item,{name:n,value:o,checked:o})),t)),{}))),[]))})),n._event=x.id,n._prevEventId=F,n._taskId=S;const{id:o,task:s,error:i}=await t.saveData(x.class,n);if(i?.text){const e=i.field?" in "+i.field+": "+i.value:"";return r.failed(`${i.text} ${e}`,3e3),void a(4,d=!1)}r.success("Die Daten wurden gespeichert.",2e3),n._id=o;const l=await t.getTaskList(x.class,o);return b("choose",{row:l}),e?J():I?void 0:window.singleSpaNavigate(`/task/${x.id}/${s}/task`)},J=()=>j?window.close():E?window.singleSpaNavigate("/"):b("back"),U=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(2,N={...N,...o})}else{const e=x.input.slice(1);for(const t of e)a(2,N[t]=[],N)}}};return n.subscribe((async e=>{if(!e)return;if(!lo.get(e.eventId))return;const n=await t.getTaskList(x.class,e.taskId);((e,t,n)=>{if(!lo.get(e))return;const o=t;ao.set(o,n)})(e.eventId,e.taskId,n)})),q(go),e.$$set=e=>{"schema"in e&&a(0,x=e.schema),"recID"in e&&a(24,I=e.recID),"prevEventID"in e&&a(22,F=e.prevEventID),"prev"in e&&a(25,_=e.prev),"taskId"in e&&a(23,S=e.taskId),"description"in e&&a(20,C=e.description),"root"in e&&a(1,E=e.root),"readonly"in e&&a(21,D=e.readonly),"isStandalone"in e&&a(26,j=e.isStandalone)},e.$$.update=()=>{2097152&e.$$.dirty[0]&&a(4,d=D),402653185&e.$$.dirty[0]&&k&&w&&x.items.map((({name:e,type:t})=>{const n=w.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;k[e]&&a(2,N[e]=k[e],N),k[o]&&a(2,N[o]=k[o],N)})),1048578&e.$$.dirty[0]&&a(5,u=E?C||"enablerr - Form":document.title)},[x,E,N,M,d,u,$,h,g,z,L,T,P,{name:"amountValue",properties:{decimals:2}},async()=>{if(I&&(a(2,N=await t.getTask(x.class,I)),a(20,C=f(x,N))),F){a(21,D=!1),a(27,w=await t.getSchema(F)),"string"==typeof _&&a(28,k=await t.getTask(w.class,_));const e=x.items.find((e=>e.refClass===w.class));a(2,N[e.name]=k._id,N)}const e=await t.getEvent(x.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&a(21,D=!0),m.role?.length&&x.authorization?.length){const e=x.authorization.some((e=>p?.find((t=>t===e.role&&"edit"===e.activity))));a(21,D||=!e)}return I||(H(),W()),!0},()=>{G(!1)},G,()=>F?window.history.back():J(),async({detail:{row:e}})=>{if(I)return;if(await(async()=>{for(const e of x.items)if(e.refItem&&N[e.refItem]){const n=await t.getTask(e.refItem,N[e.refItem]);n&&a(2,N[e.name]=n[e.name],N)}for(const e of x.list||[])if(e.refItem&&N[e.refItem]){const n=await t.getTask(e.refItem,N[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(2,N[e.name]=o,N)}})(),!e._task)return;const n=e._task.event,o=await t.getEvent(n),s=await t.getEvent(x.id);if(!s.output?.class?.length)return;const r=s.output.class[0]?.item.find((e=>e.name===o.output.class[0]?.name));(s.input?.class?.length&&s.input.class[0]?.name===o.output.class[0]?.name||r?.asInput)&&(a(27,w=await t.getSchema(n)),a(22,F=n),a(23,S=e._task._id),a(28,k=!!S&&await t.getTask(w.class,e._task.docId)),U(w.class,e?._task?.docId))},({detail:e})=>{if(O[e.listName]=e.value,!P)return;B[e.listName]=e.amountValue;let t=0;for(const e in B)t+=B[e];a(3,M=t)},C,D,F,S,I,_,j,w,k,function(e){M=e,a(3,M)}]}class yo extends ge{constructor(e){var t;super(),Wn.getElementById("svelte-1dh1s6w-style")||((t=_("style")).id="svelte-1dh1s6w-style",t.textContent="form.disabled.svelte-1dh1s6w input.svelte-1dh1s6w{background-color:red !important}.comment.svelte-1dh1s6w.svelte-1dh1s6w{color:green;margin-bottom:1em}form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:30em}}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w,.fTask.svelte-1dh1s6w.svelte-1dh1s6w{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;max-height:70vh}.sTask.svelte-1dh1s6w.svelte-1dh1s6w{height:95%;display:inline-grid}.sTask.svelte-1dh1s6w .btn.svelte-1dh1s6w{display:initial !important}.form--buttons.svelte-1dh1s6w.svelte-1dh1s6w{display:flex;gap:1em;padding-bottom:0.5em}",k(Wn.head,t)),he(this,e,bo,io,b,{schema:0,recID:24,prevEventID:22,prev:25,taskId:23,description:20,root:1,readonly:21,isStandalone:26},[-1,-1])}}function wo(e){let t,n,o;function s(t){e[4](t)}let r={schema:e[5],recID:e[6]};return void 0!==e[0]&&(r.description=e[0]),t=new yo({props:r}),R.push((()=>me(t,"description",s))),t.$on("back",e[2]),{c(){fe(t.$$.fragment)},m(e,n){pe(t,e,n),o=!0},p(e,o){const s={};32&o&&(s.schema=e[5]),64&o&&(s.recID=e[6]),!n&&1&o&&(n=!0,s.description=e[0],X((()=>n=!1))),t.$set(s)},i(e){o||(le(t.$$.fragment,e),o=!0)},o(e){ae(t.$$.fragment,e),o=!1},d(e){$e(t,e)}}}function ko(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[wo,({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(){fe(t.$$.fragment)},m(e,o){pe(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||(le(t.$$.fragment,e),n=!0)},o(e){ae(t.$$.fragment,e),n=!1},d(e){$e(t,e)}}}function xo(e,n,o){let s,{refresh:r}=n;return e.$$set=e=>{"refresh"in e&&o(3,r=e.refresh)},[s,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},r,function(e){s=e,o(0,s)}]}function Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fo,_o,So=(Fo=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){s(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 s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==r(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 s=Object.keys(i),r=Object.keys(e).reduce((function(t,n){return s.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var s=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=s();t.instance=new e.component(o(o({},r),{},{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)}))}},Fo(_o={exports:{}},_o.exports),_o.exports);const Co=Io(So)({component:class extends ge{constructor(e){super(),he(this,e,xo,ko,b,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Eo,mount:Do,unmount:jo}=Co;e({bootstrap:Eo,mount:Do,unmount:jo});e("Form",yo),e("List",Xe)}}}));
|