@enablerr-ui/detail 0.2.150 → 0.2.151
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,l,i,a;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.TextArea,s=e.Storage,r=e.settings,l=e.currentRoles,i=e.Page},function(e){a=e.getAttractions}],execute:function(){e("version","0.2.150");const c=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(" · "))),d=e=>{try{return new Date(e).toLocaleString()}catch{return e}},u=(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=>c(n["_"+e]||n[e]))).filter((e=>!!e)).join(" • ")||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":t[e.name])).filter((e=>!!e)).join(" • ")};function m(){}function f(e){return e()}function p(){return Object.create(null)}function $(e){e.forEach(f)}function g(e){return"function"==typeof e}function h(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function v(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return m;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function b(e){return null==e?"":e}function y(e,t){e.appendChild(t)}function k(e,t,n){e.insertBefore(t,n||null)}function w(e){e.parentNode.removeChild(e)}function x(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function I(e){return document.createElement(e)}function _(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function F(e){return document.createTextNode(e)}function q(){return F(" ")}function S(){return F("")}function E(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function C(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function D(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function N(e,t){e.value=null==t?"":t}function j(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function O(e,t,n){e.classList[n?"add":"remove"](t)}let P;function L(e){P=e}function M(){if(!P)throw new Error("Function called outside component initialization");return P}function B(e){M().$$.on_mount.push(e)}function T(){const e=M();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 z(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const A=[],H=[],R=[],W=[],Y=Promise.resolve();let G=!1;function J(e){R.push(e)}function V(e){W.push(e)}let U=!1;const K=new Set;function Q(){if(!U){U=!0;do{for(let e=0;e<A.length;e+=1){const t=A[e];L(t),X(t.$$)}for(L(null),A.length=0;H.length;)H.pop()();for(let e=0;e<R.length;e+=1){const t=R[e];K.has(t)||(K.add(t),t())}R.length=0}while(A.length);for(;W.length;)W.pop()();G=!1,U=!1,K.clear()}}function X(e){if(null!==e.fragment){e.update(),$(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(J)}}const Z=new Set;let ee;function te(){ee={r:0,c:[],p:ee}}function ne(){ee.r||$(ee.c),ee=ee.p}function oe(e,t){e&&e.i&&(Z.delete(e),e.i(t))}function se(e,t,n,o){if(e&&e.o){if(Z.has(e))return;Z.add(e),ee&&ee.c.push((()=>{Z.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function re(e,t){const n=t.token={};function o(e,o,s,r){if(t.token!==n)return;t.resolved=r;let l=t.ctx;void 0!==s&&(l=l.slice(),l[s]=r);const i=e&&(t.current=e)(l);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(te(),se(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ne())})):t.block.d(1),i.c(),oe(i,1),i.m(t.mount(),t.anchor),a=!0),t.block=i,t.blocks&&(t.blocks[o]=i),a&&Q()}if((s=e)&&"object"==typeof s&&"function"==typeof s.then){const n=M();if(e.then((e=>{L(n),o(t.then,1,t.value,e),L(null)}),(e=>{if(L(n),o(t.catch,2,t.error,e),L(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 le(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 ie="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ae(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function ce(e){e&&e.c()}function de(e,t,n,o){const{fragment:s,on_mount:r,on_destroy:l,after_update:i}=e.$$;s&&s.m(t,n),o||J((()=>{const t=r.map(f).filter(g);l?l.push(...t):$(t),e.$$.on_mount=[]})),i.forEach(J)}function ue(e,t){const n=e.$$;null!==n.fragment&&($(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function me(e,t){-1===e.$$.dirty[0]&&(A.push(e),G||(G=!0,Y.then(Q)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function fe(e,t,n,o,s,r,l=[-1]){const i=P;L(e);const a=e.$$={fragment:null,ctx:null,props:r,update:m,not_equal:s,bound:p(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i?i.$$.context:t.context||[]),callbacks:p(),dirty:l,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&&me(e,t)),n})):[],a.update(),c=!0,$(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(w)}else a.fragment&&a.fragment.c();t.intro&&oe(e.$$.fragment),de(e,t.target,t.anchor,t.customElement),Q()}L(i)}class pe{$destroy(){ue(this,1),this.$destroy=m}$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 $e(e){let t,n,o,s;return{c(){t=_("svg"),n=_("polyline"),o=_("path"),C(n,"points","9 10 4 15 9 20"),C(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",s="feather feather-corner-down-left "+e[2])},m(e,s){k(e,t,s),y(t,n),y(t,o)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-corner-down-left "+e[2])&&C(t,"class",s)},i:m,o:m,d(e){e&&w(t)}}}function ge(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 he extends pe{constructor(e){super(),fe(this,e,ge,$e,h,{size:0,strokeWidth:1,class:2})}}function ve(e){let t,n,o,s,r;return{c(){t=_("svg"),n=_("path"),o=_("line"),s=_("line"),C(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),C(o,"x1","18"),C(o,"y1","9"),C(o,"x2","12"),C(o,"y2","15"),C(s,"x1","12"),C(s,"y1","9"),C(s,"x2","18"),C(s,"y2","15"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",r="feather feather-delete "+e[2])},m(e,r){k(e,t,r),y(t,n),y(t,o),y(t,s)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-delete "+e[2])&&C(t,"class",r)},i:m,o:m,d(e){e&&w(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 pe{constructor(e){super(),fe(this,e,be,ve,h,{size:0,strokeWidth:1,class:2})}}function ke(e){let t,n,o,s;return{c(){t=_("svg"),n=_("circle"),o=_("line"),C(n,"cx","11"),C(n,"cy","11"),C(n,"r","8"),C(o,"x1","21"),C(o,"y1","21"),C(o,"x2","16.65"),C(o,"y2","16.65"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",s="feather feather-search "+e[2])},m(e,s){k(e,t,s),y(t,n),y(t,o)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-search "+e[2])&&C(t,"class",s)},i:m,o:m,d(e){e&&w(t)}}}function we(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 pe{constructor(e){super(),fe(this,e,we,ke,h,{size:0,strokeWidth:1,class:2})}}const{document:Ie}=ie;function _e(e){e[11]=e[13].list,e[12]=e[13].items}function Fe(e,t,n){const o=e.slice();return o[14]=t[n],o}function qe(e,t,n){const o=e.slice();return o[17]=t[n],o}function Se(e,t,n){const o=e.slice();return o[17]=t[n],o}function Ee(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function Ce(e){let t,n,o,s;_e(e);let r=e[11].length&&De(e),l=e[11],i=[];for(let t=0;t<l.length;t+=1)i[t]=Oe(Fe(e,l,t));return{c(){t=I("div"),n=I("table"),r&&r.c(),o=q(),s=I("tbody");for(let e=0;e<i.length;e+=1)i[e].c();C(n,"striped",""),C(n,"class","svelte-1ifmdyk"),C(t,"class","eList svelte-1ifmdyk")},m(e,l){k(e,t,l),y(t,n),r&&r.m(n,null),y(n,o),y(n,s);for(let e=0;e<i.length;e+=1)i[e].m(s,null)},p(e,t){if(_e(e),e[11].length?r?r.p(e,t):(r=De(e),r.c(),r.m(n,o)):r&&(r.d(1),r=null),59&t){let n;for(l=e[11],n=0;n<l.length;n+=1){const o=Fe(e,l,n);i[n]?i[n].p(o,t):(i[n]=Oe(o),i[n].c(),i[n].m(s,null))}for(;n<i.length;n+=1)i[n].d(1);i.length=l.length}},i:m,o:m,d(e){e&&w(t),r&&r.d(),x(i,e)}}}function De(e){let t,n,o=e[12],s=[];for(let t=0;t<o.length;t+=1)s[t]=Ne(Se(e,o,t));return{c(){t=I("thead"),n=I("tr");for(let e=0;e<s.length;e+=1)s[e].c();C(n,"class","svelte-1ifmdyk"),C(t,"class","svelte-1ifmdyk")},m(e,o){k(e,t,o),y(t,n);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(34&t){let r;for(o=e[12],r=0;r<o.length;r+=1){const l=Se(e,o,r);s[r]?s[r].p(l,t):(s[r]=Ne(l),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}},d(e){e&&w(t),x(s,e)}}}function Ne(e){let t,n,o=e[17].designation+"";return{c(){t=I("th"),n=F(o),C(t,"class","svelte-1ifmdyk")},m(e,o){k(e,t,o),y(t,n)},p(e,t){2&t&&o!==(o=e[17].designation+"")&&D(n,o)},d(e){e&&w(t)}}}function je(e){let t,n,o=e[3](e[14],e[17])+"";return{c(){t=I("td"),n=F(o),C(t,"class","svelte-1ifmdyk")},m(e,o){k(e,t,o),y(t,n)},p(e,t){2&t&&o!==(o=e[3](e[14],e[17])+"")&&D(n,o)},d(e){e&&w(t)}}}function Oe(e){let t,n,o,s,r=e[12],l=[];for(let t=0;t<r.length;t+=1)l[t]=je(qe(e,r,t));return{c(){t=I("tr");for(let e=0;e<l.length;e+=1)l[e].c();n=q(),C(t,"class","pointer svelte-1ifmdyk"),O(t,"active",e[14]._id===e[0])},m(r,i){k(r,t,i);for(let e=0;e<l.length;e+=1)l[e].m(t,null);y(t,n),o||(s=E(t,"click",(function(){g(e[4](e[14]))&&e[4](e[14]).apply(this,arguments)})),o=!0)},p(o,s){if(e=o,42&s){let o;for(r=e[12],o=0;o<r.length;o+=1){const i=qe(e,r,o);l[o]?l[o].p(i,s):(l[o]=je(i),l[o].c(),l[o].m(t,n))}for(;o<l.length;o+=1)l[o].d(1);l.length=r.length}35&s&&O(t,"active",e[14]._id===e[0])},d(e){e&&w(t),x(l,e),o=!1,s()}}}function Pe(e){let t,n;return t=new e[2]({}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p:m,i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Le(e){let t,n,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:Pe,then:Ce,catch:Ee,value:13,blocks:[,,,]};return re(n=e[1]&&e[5](),s),{c(){t=S(),s.block.c()},m(e,n){k(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,2&o&&n!==(n=e[1]&&e[5]())&&re(n,s)||le(s,e,o)},i(e){o||(oe(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){se(s.blocks[e])}o=!1},d(e){e&&w(t),s.block.d(e),s.token=null,s=null}}}function Me(e,o,s){const r=T(),{Loading:l}=a;let{className:i}=o,{rowId:d}=o,{filterForReady:u=!1}=o,m=!0;const f=t.getSchemaByClass(i),p=e=>f.then((t=>"Information"===t.state.task?e:e.filter((e=>"Ready"===e._task.status))));return B((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"})})),n.subscribe((async e=>{if(!e)return;const t=await f;e.eventId===t.id&&(Nn(t.class,e.eventId),s(1,m=!s(1,m=!1)))})),e.$$set=e=>{"className"in e&&s(6,i=e.className),"rowId"in e&&s(0,d=e.rowId),"filterForReady"in e&&s(7,u=e.filterForReady)},[d,m,l,(e,t)=>c(e[`_${t.name}`]||e[t.name]||""),e=>()=>r("choose",{row:e}),async()=>f.then((e=>En(e.class,e.id).then((e=>u?p(e):e)).then((t=>{let n=[],o=e.display;return o&&o.length?o.map((o=>{const[s,r]=o.split(".");let l=e.list?.find((e=>e.name===s))?.item.find((e=>e.name===r));l&&(l={...l},l.name=`${s}_${r}`,t=t.map((e=>(e[s]&&(e[l.name]=e[s][r]),e)))),l||(l=e.items.find((e=>e.name===s))),n.find((e=>e?.name===s))||n.push(l)})):n=e.items,{list:t,items:n}})))),i,u]}class Be extends pe{constructor(e){var t;super(),Ie.getElementById("svelte-1ifmdyk-style")||((t=I("style")).id="svelte-1ifmdyk-style",t.textContent=".eList.svelte-1ifmdyk.svelte-1ifmdyk{min-height:12em;height:fit-content;max-height:65vh;overflow:auto}.eList.svelte-1ifmdyk table.svelte-1ifmdyk{min-width:30vw;position:relative;width:max-content !important;margin-top:1em}.eList.svelte-1ifmdyk table thead.svelte-1ifmdyk{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1ifmdyk table tbody tr.svelte-1ifmdyk{height:2.3em}th.svelte-1ifmdyk.svelte-1ifmdyk,td.svelte-1ifmdyk.svelte-1ifmdyk{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-1ifmdyk.svelte-1ifmdyk:hover{background-color:#DAE1E5}tr.active.svelte-1ifmdyk.svelte-1ifmdyk{color:#326173;background-color:#fcebd5}",y(Ie.head,t)),fe(this,e,Me,Le,h,{className:6,rowId:0,filterForReady:7})}}function Te(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function ze(e){let t,n,o=e[16]&&Ae(e);return{c(){o&&o.c(),t=S()},m(e,s){o&&o.m(e,s),k(e,t,s),n=!0},p(e,n){e[16]?o?(o.p(e,n),4&n&&oe(o,1)):(o=Ae(e),o.c(),oe(o,1),o.m(t.parentNode,t)):o&&(te(),se(o,1,1,(()=>{o=null})),ne())},i(e){n||(oe(o),n=!0)},o(e){se(o),n=!1},d(e){o&&o.d(e),e&&w(t)}}}function Ae(e){let t,n;return t=new e[5]({props:{title:e[8],class:"eList "+(e[4]?"form":""),$$slots:{default:[Ge]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};16&n&&(o.class="eList "+(e[4]?"form":"")),131103&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function He(e){let t,n;return t=new Pn({props:{schema:e[0]}}),t.$on("choose",(function(){g(e[12](e[16]))&&e[12](e[16]).apply(this,arguments)})),t.$on("back",e[10]),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(n,o){e=n;const s={};1&o&&(s.schema=e[0]),t.$set(s)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Re(e){let t,n,o,s,r,l,i,a,c;return t=new e[6]({}),s=new e[7]({props:{outline:!0,$$slots:{default:[We]},$$scope:{ctx:e}}}),s.$on("click",e[10]),l=new e[7]({props:{filled:!0,$$slots:{default:[Ye]},$$scope:{ctx:e}}}),l.$on("click",e[11]),a=new Be({props:{className:e[0].class,filterForReady:e[3],rowId:e[1]}}),a.$on("choose",e[13]),{c(){ce(t.$$.fragment),n=q(),o=I("div"),ce(s.$$.fragment),r=q(),ce(l.$$.fragment),i=q(),ce(a.$$.fragment),C(o,"class","form--buttons svelte-jb5mrh")},m(e,d){de(t,e,d),k(e,n,d),k(e,o,d),de(s,o,null),y(o,r),de(l,o,null),k(e,i,d),de(a,e,d),c=!0},p(e,t){const n={};131072&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n);const o={};131072&t&&(o.$$scope={dirty:t,ctx:e}),l.$set(o);const r={};1&t&&(r.className=e[0].class),8&t&&(r.filterForReady=e[3]),2&t&&(r.rowId=e[1]),a.$set(r)},i(e){c||(oe(t.$$.fragment,e),oe(s.$$.fragment,e),oe(l.$$.fragment,e),oe(a.$$.fragment,e),c=!0)},o(e){se(t.$$.fragment,e),se(s.$$.fragment,e),se(l.$$.fragment,e),se(a.$$.fragment,e),c=!1},d(e){ue(t,e),e&&w(n),e&&w(o),ue(s),ue(l),e&&w(i),ue(a,e)}}}function We(e){let t;return{c(){t=F("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function Ye(e){let t;return{c(){t=F("Neu")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function Ge(e){let t,n,o,s;const r=[Re,He],l=[];function i(e,t){return e[16].length&&!e[4]?0:1}return t=i(e),n=l[t]=r[t](e),{c(){n.c(),o=S()},m(e,n){l[t].m(e,n),k(e,o,n),s=!0},p(e,s){let a=t;t=i(e),t===a?l[t].p(e,s):(te(),se(l[a],1,1,(()=>{l[a]=null})),ne(),n=l[t],n?n.p(e,s):(n=l[t]=r[t](e),n.c()),oe(n,1),n.m(o.parentNode,o))},i(e){s||(oe(n),s=!0)},o(e){se(n),s=!1},d(e){l[t].d(e),e&&w(o)}}}function Je(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function Ve(e){let t,n,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:Je,then:ze,catch:Te,value:16,blocks:[,,,]};return re(n=e[9](e[2]),s),{c(){t=S(),s.block.c()},m(e,n){k(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[9](e[2]))&&re(n,s)||le(s,e,o)},i(e){o||(oe(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){se(s.blocks[e])}o=!1},d(e){e&&w(t),s.block.d(e),s.token=null,s=null}}}function Ue(e,t,n){const{Dialog:o,Divider:s,Button:r}=a,l=T();let{schema:i}=t,{recID:c}=t,{isOpening:d=!0}=t,{filterForReady:u=!1}=t,m=i.identity.designation;i.class;let f=!1;return e.$$set=e=>{"schema"in e&&n(0,i=e.schema),"recID"in e&&n(1,c=e.recID),"isOpening"in e&&n(2,d=e.isOpening),"filterForReady"in e&&n(3,u=e.filterForReady)},[i,c,d,u,f,o,s,r,m,e=>e&&En(i.class,i.id),()=>{n(4,f=!1),l("back")},()=>{n(4,f=!0)},e=>({detail:{row:e}})=>{let t=i.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let s=i.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(s){e[`${n}_${o}`]=e[n][o]}})),l("choose",{row:e})},function(t){z(e,t)}]}class Ke extends pe{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=I("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}",y(document.head,t)),fe(this,e,Ue,Ve,h,{schema:0,recID:1,isOpening:2,filterForReady:3})}}function Qe(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function Xe(e){let t,n,s,r,l,i,a,c,d,u,m;n=new o({props:{class:"full-width",id:e[9],value:e[1],rows:"1",readonly:!0,disabled:e[2],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"}});let f=!e[2]&&Ze(e),p=!e[2]&&et(e);function $(t){e[17](t)}let g={class:"tModal",noClickaway:!0,$$slots:{default:[tt]},$$scope:{ctx:e}};return void 0!==e[7]&&(g.open=e[7]),d=new e[8]({props:g}),H.push((()=>ae(d,"open",$))),{c(){t=I("div"),ce(n.$$.fragment),s=q(),f&&f.c(),r=q(),l=I("input"),a=q(),p&&p.c(),c=q(),ce(d.$$.fragment),C(l,"class",i=b(e[4]||e[5])+" svelte-axxims"),C(l,"id",e[3]),C(l,"name",e[3]),l.value=e[0],l.hidden=!0,l.readOnly=!0,l.disabled=!0,j(t,"position","relative")},m(e,o){k(e,t,o),de(n,t,null),y(t,s),f&&f.m(t,null),y(t,r),y(t,l),y(t,a),p&&p.m(t,null),k(e,c,o),de(d,e,o),m=!0},p(e,o){const s={};2&o&&(s.value=e[1]),4&o&&(s.disabled=e[2]),n.$set(s),e[2]?f&&(te(),se(f,1,1,(()=>{f=null})),ne()):f?(f.p(e,o),4&o&&oe(f,1)):(f=Ze(e),f.c(),oe(f,1),f.m(t,r)),(!m||48&o&&i!==(i=b(e[4]||e[5])+" svelte-axxims"))&&C(l,"class",i),(!m||8&o)&&C(l,"id",e[3]),(!m||8&o)&&C(l,"name",e[3]),(!m||1&o&&l.value!==e[0])&&(l.value=e[0]),e[2]?p&&(te(),se(p,1,1,(()=>{p=null})),ne()):p?(p.p(e,o),4&o&&oe(p,1)):(p=et(e),p.c(),oe(p,1),p.m(t,null));const a={};4194497&o&&(a.$$scope={dirty:o,ctx:e}),!u&&128&o&&(u=!0,a.open=e[7],V((()=>u=!1))),d.$set(a)},i(e){m||(oe(n.$$.fragment,e),oe(f),oe(p),oe(d.$$.fragment,e),m=!0)},o(e){se(n.$$.fragment,e),se(f),se(p),se(d.$$.fragment,e),m=!1},d(e){e&&w(t),ue(n),f&&f.d(),p&&p.d(),e&&w(c),ue(d,e)}}}function Ze(e){let t,n,o,s,r;return n=new xe({props:{size:"18"}}),{c(){t=I("span"),ce(n.$$.fragment),C(t,"class","feather pointer svelte-axxims")},m(l,i){k(l,t,i),de(n,t,null),o=!0,s||(r=[E(t,"click",e[11]),E(t,"choose",e[12])],s=!0)},p:m,i(e){o||(oe(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&w(t),ue(n),s=!1,$(r)}}}function et(e){let t,n,o,s,r;return n=new ye({props:{size:"18"}}),{c(){t=I("span"),ce(n.$$.fragment),C(t,"class","feather2 pointer svelte-axxims")},m(l,i){k(l,t,i),de(n,t,null),o=!0,s||(r=E(t,"click",e[14]),s=!0)},p:m,i(e){o||(oe(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&w(t),ue(n),s=!1,r()}}}function tt(e){let t,n;return t=new Ke({props:{schema:e[6],recID:e[0],isOpening:e[7],filterForReady:"true"}}),t.$on("choose",e[12]),t.$on("back",e[13]),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.schema=e[6]),1&n&&(o.recID=e[0]),128&n&&(o.isOpening=e[7]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function nt(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function ot(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:nt,then:Xe,catch:Qe,value:21,blocks:[,,,]};return re(e[10](),o),{c(){t=S(),o.block.c()},m(e,s){k(e,t,s),o.block.m(e,o.anchor=s),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,[n]){le(o,e=t,n)},i(e){n||(oe(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){se(o.blocks[e])}n=!1},d(e){e&&w(t),o.block.d(e),o.token=null,o=null}}}function st(e,n,o){const s=T(),{Modal:r}=a;let{id:l}=n,{item:i}=n,{value:c=""}=n,{desc:d=""}=n,{noForm:m=!1}=n,{classId:f}=n,{eventId:p}=n,{disabled:$}=n;const g="comment_"+l;let h,v=!1;const b=()=>{o(7,v=!1)};return e.$$set=e=>{"id"in e&&o(3,l=e.id),"item"in e&&o(15,i=e.item),"value"in e&&o(0,c=e.value),"desc"in e&&o(1,d=e.desc),"noForm"in e&&o(4,m=e.noForm),"classId"in e&&o(5,f=e.classId),"eventId"in e&&o(16,p=e.eventId),"disabled"in e&&o(2,$=e.disabled)},e.$$.update=()=>{32833&e.$$.dirty&&c&&h&&Promise.resolve(Cn(i.refClass,h.id,c)).then((e=>{var t;(t=e)&&(o(1,d=u(h,t)),s("change",{value:c,description:d}))}))},[c,d,$,l,m,f,h,v,r,g,async()=>{if(o(6,h=await t.getSchemaByClass(i.refClass)),p&&c&&!$){(await t.getSchema(p)).input?.find((e=>e===i.refClass))&&o(2,$=!0)}return!0},function(){o(7,v=!0)},({detail:e})=>{o(0,c=e.row._id),Promise.resolve(Cn(i.refClass,h.id,c)).then((e=>s("task",{row:e}))),b()},b,()=>{o(0,c=o(1,d="")),s("change",{value:c,description:d}),s("task",{row:{_task:{event:h.id,_id:!1}}})},i,p,function(e){v=e,o(7,v)}]}class rt extends pe{constructor(e){var t;super(),document.getElementById("svelte-axxims-style")||((t=I("style")).id="svelte-axxims-style",t.textContent=".feather.svelte-axxims{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-axxims{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:disabled{padding-left:0.625em !important}",y(document.head,t)),fe(this,e,st,ot,h,{id:3,item:15,value:0,desc:1,noForm:4,classId:5,eventId:16,disabled:2})}}function lt(e){let t,n,o;return n=new e[7]({props:{lang:e[8].id,class:"left",type:"string",inputClass:"txt-right"+(e[2]?"":" "+e[3]),id:e[0],name:e[1].name,value:e[6],step:e[9],pattern:e[5],placeholder:e[10],disabled:e[4]}}),n.$on("change",e[11]),{c(){t=I("div"),ce(n.$$.fragment),j(t,"max-width","10em")},m(e,s){k(e,t,s),de(n,t,null),o=!0},p(e,[t]){const o={};12&t&&(o.inputClass="txt-right"+(e[2]?"":" "+e[3])),1&t&&(o.id=e[0]),2&t&&(o.name=e[1].name),64&t&&(o.value=e[6]),32&t&&(o.pattern=e[5]),16&t&&(o.disabled=e[4]),n.$set(o)},i(e){o||(oe(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&w(t),ue(n)}}}function it(e,t,n){let o;const r=T(),{TextField:l}=a;let{id:i}=t,{item:c}=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:g={}}=c;let{min:h,max:v,step:b,pattern:y,decimals:k=0,unit:w="",placeholder:x,hint:I}=g;y||(y=k?`[0-9]+([${$}][0-9]{1,${k}})?`:"[0-9]*");return e.$$set=e=>{"id"in e&&n(0,i=e.id),"item"in e&&n(1,c=e.item),"value"in e&&n(12,d=e.value),"noForm"in e&&n(2,u=e.noForm),"classId"in e&&n(3,m=e.classId),"disabled"in e&&n(4,f=e.disabled)},e.$$.update=()=>{4096&e.$$.dirty&&n(6,o=Number(d.toString().replace($,".")).toFixed(k).toString().replace(".",$))},[i,c,u,m,f,y,o,l,p,b,x,({detail:e})=>r("blur",{value:e.value}),d]}class at extends pe{constructor(e){super(),fe(this,e,it,lt,h,{id:0,item:1,value:12,noForm:2,classId:3,disabled:4})}}function ct(e,t,n){const o=e.slice();return o[8]=t[n],o}function dt(e){let t,n,o,s=e[8]+"";return{c(){t=I("option"),n=F(s),t.__value=e[8],t.value=t.__value,t.selected=o=e[2]===e[8]},m(e,o){k(e,t,o),y(t,n)},p(e,n){4&n&&o!==(o=e[2]===e[8])&&(t.selected=o)},d(e){e&&w(t)}}}function ut(e){let t,n,o,s,r,l,i=e[5],a=[];for(let t=0;t<i.length;t+=1)a[t]=dt(ct(e,i,t));return{c(){t=I("select"),n=I("option");for(let e=0;e<a.length;e+=1)a[e].c();n.__value="",n.value=n.__value,C(t,"class",o=b(e[3]||e[4])+" svelte-x3xy2g"),C(t,"id",e[0]),C(t,"name",s=e[1].name)},m(o,s){k(o,t,s),y(t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null);r||(l=E(t,"change",e[6]),r=!0)},p(e,[n]){if(36&n){let o;for(i=e[5],o=0;o<i.length;o+=1){const s=ct(e,i,o);a[o]?a[o].p(s,n):(a[o]=dt(s),a[o].c(),a[o].m(t,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=i.length}24&n&&o!==(o=b(e[3]||e[4])+" svelte-x3xy2g")&&C(t,"class",o),1&n&&C(t,"id",e[0]),2&n&&s!==(s=e[1].name)&&C(t,"name",s)},i:m,o:m,d(e){e&&w(t),x(a,e),r=!1,l()}}}function mt(e,t,n){const o=T();let{id:s}=t,{item:r}=t,{value:l}=t,{noForm:i=!1}=t,{classId:a}=t;const{enum:c}=r.properties;return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(1,r=e.item),"value"in e&&n(2,l=e.value),"noForm"in e&&n(3,i=e.noForm),"classId"in e&&n(4,a=e.classId)},[s,r,l,i,a,c,e=>o("blur",{value:e.srcElement.value})]}class ft extends pe{constructor(e){var t;super(),document.getElementById("svelte-x3xy2g-style")||((t=I("style")).id="svelte-x3xy2g-style",t.textContent="select.svelte-x3xy2g{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-x3xy2g:focus{border:none;border-bottom:2px solid #4300b0}",y(document.head,t)),fe(this,e,mt,ut,h,{id:0,item:1,value:2,noForm:3,classId:4})}}const pt=/\d+/g,$t=/%[HMSpPdmyY%]/g;function gt(e){let t;return{c(){t=F("Stunden")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function ht(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[gt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function vt(e){let t;return{c(){t=F("Minuten")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function bt(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[vt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function yt(e){let t;return{c(){t=F("Jetzt")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function kt(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[yt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function wt(e){let t,n,o,s,r,l,i,a,c;return s=new e[5]({props:{value:e[0],closeOnSelection:!0}}),s.$on("change",e[8]),l=new e[6]({props:{value:e[0],$$slots:{"now-label":[kt],"minutes-label":[bt],"hours-label":[ht]},$$scope:{ctx:e}}}),l.$on("change",e[7]),{c(){t=I("input"),o=q(),ce(s.$$.fragment),r=q(),ce(l.$$.fragment),C(t,"type","string"),C(t,"class",n=e[2]||e[3]),C(t,"id",e[1]),C(t,"name",e[1]),t.hidden=!0},m(n,d){k(n,t,d),N(t,e[0]),k(n,o,d),de(s,n,d),k(n,r,d),de(l,n,d),i=!0,a||(c=E(t,"input",e[9]),a=!0)},p(e,[o]){(!i||12&o&&n!==(n=e[2]||e[3]))&&C(t,"class",n),(!i||2&o)&&C(t,"id",e[1]),(!i||2&o)&&C(t,"name",e[1]),1&o&&N(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}),l.$set(a)},i(e){i||(oe(s.$$.fragment,e),oe(l.$$.fragment,e),i=!0)},o(e){se(s.$$.fragment,e),se(l.$$.fragment,e),i=!1},d(e){e&&w(t),e&&w(o),ue(s,e),e&&w(r),ue(l,e),a=!1,c()}}}function xt(e,t,n){const o=T(),{Label:s,DatePicker:r,TimePicker:l}=a;let{value:i}=t,{id:c}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>o("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,i=e.value),"id"in e&&n(1,c=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[i,c,d,u,s,r,l,({detail:e})=>{var t,o;n(0,(t=e.value,o=i,i=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(i)},({detail:e})=>{var t,o;n(0,(t=e.value,o=i,i=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(i)},function(){i=this.value,n(0,i)}]}class It extends pe{constructor(e){super(),fe(this,e,xt,wt,h,{value:0,id:1,noForm:2,classId:3})}}function _t(e){let t,n;return t=new e[8]({props:{inputClass:e[1]||e[2],disabled:e[4],id:e[12],name:e[11],value:e[5]()}}),t.$on("change",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),32&n&&(o.value=e[5]()),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Ft(e){let t,n;return t=new e[8]({props:{inputClass:e[1]||e[2],disabled:e[4],type:"email",id:e[12],name:e[11],value:e[5]()}}),t.$on("change",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),32&n&&(o.value=e[5]()),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function qt(e){let t,n;return t=new It({props:{classId:e[2],id:e[12],disabled:e[4],value:e[13](),noForm:e[1]}}),t.$on("change",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function St(e){let t,n;return t=new e[10]({props:{inputClass:e[1]||e[2],disabled:e[4],id:e[12],name:e[11],value:e[13](),closeOnSelection:!0}}),t.$on("change",e[14](!0)),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Et(e){let t,n;return t=new e[9]({props:{inputClass:e[1]||e[2],disabled:e[4],id:e[12],name:e[11],value:e[5]()}}),t.$on("change",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),32&n&&(o.value=e[5]()),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Ct(e){let t,n;return t=new ft({props:{classId:e[2],disabled:e[4],id:e[12],item:e[0],value:e[5](),noForm:e[1]}}),t.$on("blur",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),32&n&&(o.value=e[5]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Dt(e){let t,n;return t=new at({props:{classId:e[2],disabled:e[4],id:e[12],item:e[0],value:e[5](),noForm:e[1]}}),t.$on("blur",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),32&n&&(o.value=e[5]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Nt(e){let t,n;return t=new o({props:{classId:e[2],disabled:e[4],id:e[12],name:e[0].name,value:e[5](),noForm:e[1]}}),t.$on("blur",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.name=e[0].name),32&n&&(o.value=e[5]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function jt(e){let t,n;return t=new rt({props:{classId:e[2],eventId:e[3],disabled:e[4],id:e[12],item:e[0],desc:e[6],value:e[5](),noForm:e[1]}}),t.$on("task",e[19]),t.$on("change",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),8&n&&(o.eventId=e[3]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.desc=e[6]),32&n&&(o.value=e[5]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Ot(e){let t,n,o,s;const r=[jt,Nt,Dt,Ct,Et,St,qt,Ft,_t],l=[];function i(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:"email"===e[0].type?7:8}return t=i(e),n=l[t]=r[t](e),{c(){n.c(),o=S()},m(e,n){l[t].m(e,n),k(e,o,n),s=!0},p(e,s){let a=t;t=i(e),t===a?l[t].p(e,s):(te(),se(l[a],1,1,(()=>{l[a]=null})),ne(),n=l[t],n?n.p(e,s):(n=l[t]=r[t](e),n.c()),oe(n,1),n.m(o.parentNode,o))},i(e){s||(oe(n),s=!0)},o(e){se(n),s=!1},d(e){l[t].d(e),e&&w(o)}}}function Pt(e){let t,n;return t=new e[7]({props:{id:e[15](e[12]),name:e[0].designation,help:e[0].properties?.hint,$$slots:{default:[Ot]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(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),16777343&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Lt(e,t,n){let o,s;const r=T(),{FormField:l,TextField:i,Switch:d,DatePicker:u,TimePicker:m}=a;let{praefix:f=""}=t,{item:p}=t,{listName:$=""}=t,{record:g}=t,{noForm:h=!1}=t,{classId:v}=t,{eventId:b}=t,{disabled:y}=t;if("string"==typeof p.name){const[e,t]=p.name.split("_");t&&(p.name=t)}const k=($?$+".":"")+p.name,w=k+(""!==f?"-"+f:""),x=(e,t=k)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(17,f=e.praefix),"item"in e&&n(0,p=e.item),"listName"in e&&n(18,$=e.listName),"record"in e&&n(16,g=e.record),"noForm"in e&&n(1,h=e.noForm),"classId"in e&&n(2,v=e.classId),"eventId"in e&&n(3,b=e.eventId),"disabled"in e&&n(4,y=e.disabled)},e.$$.update=()=>{65536&e.$$.dirty&&n(5,o=(e=k)=>{let t=x(g);return void 0===t?"":t})},n(6,s=((e=k)=>{let t=g["_"+e];return t=c(t),void 0===t?"":t})()),[p,h,v,b,y,o,s,l,i,d,u,k,w,(e=k)=>{let t=x(g);return t?new Date(t):new Date},e=>({detail:t})=>{const o=t.value;n(16,g[k]=e?function(e,t){if(null==e)return null;let n=e.getHours();return/%p/i.test(t)&&(n%=12,0===n&&(n=12)),t.replace("%Y",e.getFullYear()).replace("%y",(e.getFullYear()%100).toString().padStart(2,"0")).replace("%m",(e.getMonth()+1).toString().padStart(2,"0")).replace("%d",e.getDate().toString().padStart(2,"0")).replace("%H",n.toString().padStart(2,"0")).replace("%M",e.getMinutes().toString().padStart(2,"0")).replace("%S",e.getSeconds().toString().padStart(2,"0")).replace("%p",e.getHours()<12?"am":"pm").replace("%P",e.getHours()<12?"AM":"PM").replace("%%","%")}(o,"%d.%m.%Y"):o,g);const s=Object.values(g).every((e=>!e))&&o;r("notify",{value:o,add:s,itemName:k,desc:t.description})},()=>"object"===p.type?"comment_"+w:w,g,f,$,function(t){z(e,t)}]}class Mt extends pe{constructor(e){var t;super(),document.getElementById("svelte-mv4e64-style")||((t=I("style")).id="svelte-mv4e64-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field > .description{padding-top:0.75em}.field .switch{padding-top:0.75em}",y(document.head,t)),fe(this,e,Lt,Pt,h,{praefix:17,item:0,listName:18,record:16,noForm:1,classId:2,eventId:3,disabled:4})}}function Bt(e,t,n){const o=e.slice();return o[31]=t[n],o[33]=n,o}function Tt(e,t,n){const o=e.slice();return o[40]=t[n],o}function zt(e,t,n){const o=e.slice();return o[35]=t[n].title,o[36]=t[n].toDelete,o[37]=t[n].icon,o}function At(e){let t,n,o;function s(t){e[19](t)}let r={item:e[12],disabled:!0};return void 0!==e[5]&&(r.value=e[5]),t=new at({props:r}),H.push((()=>ae(t,"value",s))),{c(){ce(t.$$.fragment)},m(e,n){de(t,e,n),o=!0},p(e,o){const s={};!n&&32&o[0]&&(n=!0,s.value=e[5],V((()=>n=!1))),t.$set(s)},i(e){o||(oe(t.$$.fragment,e),o=!0)},o(e){se(t.$$.fragment,e),o=!1},d(e){ue(t,e)}}}function Ht(e){let t,n;return t=new Mt({props:{praefix:e[33],item:e[40],eventId:e[2],record:e[31],noForm:Qt,classId:e[1],disabled:e[3]}}),t.$on("notify",(function(){g(e[14](e[40],e[33]))&&e[14](e[40],e[33]).apply(this,arguments)})),t.$on("task",e[20]),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(n,o){e=n;const s={};1&o[0]&&(s.item=e[40]),4&o[0]&&(s.eventId=e[2]),16&o[0]&&(s.record=e[31]),2&o[0]&&(s.classId=e[1]),8&o[0]&&(s.disabled=e[3]),t.$set(s)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Rt(e){let t,n,o=e[0].item,s=[];for(let t=0;t<o.length;t+=1)s[t]=Ht(Tt(e,o,t));const r=e=>se(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=q()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(16415&n[0]){let l;for(o=e[0].item,l=0;l<o.length;l+=1){const r=Tt(e,o,l);s[l]?(s[l].p(r,n),oe(s[l],1)):(s[l]=Ht(r),s[l].c(),oe(s[l],1),s[l].m(t.parentNode,t))}for(te(),l=o.length;l<s.length;l+=1)r(l);ne()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)oe(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)se(s[e]);n=!1},d(e){x(s,e),e&&w(t)}}}function Wt(e){let t,n,o=e[13](e[6],e[33])+"";return{c(){t=I("span"),n=F(o),C(t,"class","svelte-17omp3o"),O(t,"delete",e[31]._delete)},m(e,o){k(e,t,o),y(t,n)},p(e,s){64&s[0]&&o!==(o=e[13](e[6],e[33])+"")&&D(n,o),16&s[0]&&O(t,"delete",e[31]._delete)},d(e){e&&w(t)}}}function Yt(e){let t,n,o;var s=e[37];return s&&(t=new s({props:{size:"20"}})),{c(){t&&ce(t.$$.fragment),n=S()},m(e,s){t&&de(t,e,s),k(e,n,s),o=!0},p(e,o){if(s!==(s=e[37])){if(t){te();const e=t;se(e.$$.fragment,1,0,(()=>{ue(e,1)})),ne()}s?(t=new s({props:{size:"20"}}),ce(t.$$.fragment),oe(t.$$.fragment,1),de(t,n.parentNode,n)):t=null}},i(e){o||(t&&oe(t.$$.fragment,e),o=!0)},o(e){t&&se(t.$$.fragment,e),o=!1},d(e){e&&w(n),t&&ue(t,e)}}}function Gt(e){let t,n,o,s,r,l=!e[3]&&Yt(e);return{c(){t=I("span"),l&&l.c(),C(t,"class","pointer icon svelte-17omp3o"),C(t,"title",e[35]),t.hidden=n=e[33]===e[4].length-1||!(e[31]._delete^e[36])},m(n,i){k(n,t,i),l&&l.m(t,null),o=!0,s||(r=E(t,"click",e[15](e[33])),s=!0)},p(s,r){(e=s)[3]?l&&(te(),se(l,1,1,(()=>{l=null})),ne()):l?(l.p(e,r),8&r[0]&&oe(l,1)):(l=Yt(e),l.c(),oe(l,1),l.m(t,null)),(!o||16&r[0]&&n!==(n=e[33]===e[4].length-1||!(e[31]._delete^e[36])))&&(t.hidden=n)},i(e){o||(oe(l),o=!0)},o(e){se(l),o=!1},d(e){e&&w(t),l&&l.d(),s=!1,r()}}}function Jt(e){let t,n,o,s,r;n=new e[8]({props:{$$slots:{default:[Wt]},$$scope:{ctx:e}}}),n.$on("click",(function(){g(e[34])&&e[34].apply(this,arguments)}));let l=[{title:"löschen",toDelete:!0,icon:ye},{title:"undo",toDelete:!1,icon:he}],i=[];for(let t=0;t<2;t+=1)i[t]=Gt(zt(e,l,t));const a=e=>se(i[e],1,1,(()=>{i[e]=null}));return{c(){t=I("div"),ce(n.$$.fragment),o=q();for(let e=0;e<2;e+=1)i[e].c();s=q(),C(t,"class","accordion svelte-17omp3o"),C(t,"slot","handle")},m(e,l){k(e,t,l),de(n,t,null),y(t,o);for(let e=0;e<2;e+=1)i[e].m(t,null);y(t,s),r=!0},p(o,r){e=o;const c={};if(80&r[0]|4096&r[1]&&(c.$$scope={dirty:r,ctx:e}),n.$set(c),32792&r[0]){let n;for(l=[{title:"löschen",toDelete:!0,icon:ye},{title:"undo",toDelete:!1,icon:he}],n=0;n<2;n+=1){const o=zt(e,l,n);i[n]?(i[n].p(o,r),oe(i[n],1)):(i[n]=Gt(o),i[n].c(),oe(i[n],1),i[n].m(t,s))}for(te(),n=2;n<2;n+=1)a(n);ne()}},i(e){if(!r){oe(n.$$.fragment,e);for(let e=0;e<2;e+=1)oe(i[e]);r=!0}},o(e){se(n.$$.fragment,e),i=i.filter(Boolean);for(let e=0;e<2;e+=1)se(i[e]);r=!1},d(e){e&&w(t),ue(n),x(i,e)}}}function Vt(e){let t,n;return t=new e[10]({props:{$$slots:{handle:[Jt,({toggle:e})=>({34:e}),({toggle:e})=>[0,e?8:0]],default:[Rt,({toggle:e})=>({34:e}),({toggle:e})=>[0,e?8:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){g(e[30])&&e[30].apply(this,arguments)})),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(n,o){e=n;const s={};95&o[0]|4104&o[1]&&(s.$$scope={dirty:o,ctx:e}),t.$set(s)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Ut(e){let t,n,o=e[4],s=[];for(let t=0;t<o.length;t+=1)s[t]=Vt(Bt(e,o,t));const r=e=>se(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=S()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(1073799263&n[0]|8&n[1]){let l;for(o=e[4],l=0;l<o.length;l+=1){const r=Bt(e,o,l);s[l]?(s[l].p(r,n),oe(s[l],1)):(s[l]=Vt(r),s[l].c(),oe(s[l],1),s[l].m(t.parentNode,t))}for(te(),l=o.length;l<s.length;l+=1)r(l);ne()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)oe(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)se(s[e]);n=!1},d(e){x(s,e),e&&w(t)}}}function Kt(e){let t,n,o,s,r=e[11]&&function(e){let t,n;return t=new e[7]({props:{name:"Betrag",nameClass:"formField_italic",$$slots:{default:[At]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};32&n[0]|4096&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}(e);return o=new e[9]({props:{$$slots:{default:[Ut,({closeOtherPanels:e})=>({30:e}),({closeOtherPanels:e})=>[e?1073741824:0]]},$$scope:{ctx:e}}}),{c(){t=I("div"),r&&r.c(),n=q(),ce(o.$$.fragment),C(t,"class","formList")},m(e,l){k(e,t,l),r&&r.m(t,null),y(t,n),de(o,t,null),s=!0},p(e,t){e[11]&&r.p(e,t);const n={};1073741919&t[0]|4096&t[1]&&(n.$$scope={dirty:t,ctx:e}),o.$set(n)},i(e){s||(oe(r),oe(o.$$.fragment,e),s=!0)},o(e){se(r),se(o.$$.fragment,e),s=!1},d(e){e&&w(t),r&&r.d(),ue(o)}}}const Qt=!0;function Xt(e,n,o){let s,r;const{FormField:l,TextField:i,Button:u,Accordion:m,AccordionSection:f}=a,p=T();let{list:$}=n,{schema:g}=n,{record:h}=n,{classId:v}=n,{eventId:b}=n,{disabled:y}=n;const k=g.find((e=>"price"===e.name)),w=k&&g.find((e=>"quantity"===e.name));let x=0;const I={};let _,F;const q=()=>{k&&o(5,x=_?.reduce(((e,t)=>{if(t.price){e+=(w?t.quantity??0:1)*(t.price??0)}return e}),0)||0)};F=g.filter((e=>"object"===e.type&&e.refClass)).reduce((async(e,n)=>{const o={};e=(await e).concat(o);const s=await t.getSchemaByClass(n.refClass);o.eventId=s.id,o.refClass=n.refClass,o.items=[];const r=s.items;return g.map((e=>{r.find((t=>t.name===e.name&&t.type===e.type))&&(o.items=o.items.concat(e.name))})),e}),[]);const S=async(e,t,n)=>{const s=(await F).find((e=>e.refClass===t.refClass));if(!s)return;const{refClass:r,eventId:l,items:i}=s;return n?Promise.all(i.map((t=>{if(E(e,t)){const n=g.find((e=>e.refClass=r)),s=_[e][n.name];return Promise.resolve(Dn(n.refClass,s)).then((n=>o(4,_[e][t]=n[t],_)))}}))):Promise.resolve(i.map((t=>{o(4,_[e][t]="",_)})))},E=(e,t)=>{let n=_[e][t];return"number"===g.find((e=>e.name===t)).type&&(n=Number(n||0)),!n};return e.$$set=e=>{"list"in e&&o(0,$=e.list),"schema"in e&&o(16,g=e.schema),"record"in e&&o(17,h=e.record),"classId"in e&&o(1,v=e.classId),"eventId"in e&&o(2,b=e.eventId),"disabled"in e&&o(3,y=e.disabled)},e.$$.update=()=>{131073&e.$$.dirty[0]&&h&&o(4,_=(h[$.name]||[]).concat({})),16&e.$$.dirty[0]&&o(6,s=_),262144&e.$$.dirty[0]&&(r=e=>I[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[$,v,b,y,_,x,s,l,u,m,f,k,{name:"amountValue",properties:{decimals:2}},(e,t)=>{const n=e[t];return g.filter((e=>void 0!==n[e.name]&&"boolean"!==e.type)).map((e=>"object"===e.type?r(n[e.name]):"date"===e.type?c(n[e.name]):"datetime"===e.type?d(n[e.name]):n[e.name])).filter((e=>""!==e)).join(" • ")||"+"},(e,t)=>({detail:n})=>{const{value:r,add:l,desc:i}=n;r&&_.length===t+1&&o(4,_=_.concat({})),o(6,s=_),i&&o(18,I[r]=i,I),p("save",{listName:$.name,value:_}),S(t,e,r).then(q)},e=>()=>{o(4,_[e]._delete=!_[e]._delete,_)},g,h,I,function(e){x=e,o(5,x)},function(t){z(e,t)}]}class Zt extends pe{constructor(e){var t;super(),document.getElementById("svelte-17omp3o-style")||((t=I("style")).id="svelte-17omp3o-style",t.textContent=".accordion.svelte-17omp3o{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-17omp3o{padding-top:1em}span.delete.svelte-17omp3o{text-decoration:line-through}.icon.svelte-17omp3o{margin-right:-0.75em}.formList .formField_italic{font-style:italic}",y(document.head,t)),fe(this,e,Xt,Kt,h,{list:0,schema:16,record:17,classId:1,eventId:2,disabled:3},[-1,-1])}}function en(e,t,n){const o=e.slice();return o[16]=t[n],o}function tn(e){let t,n;return t=new Mt({props:{classId:e[2],item:e[16],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4]}}),t.$on("notify",e[10]),t.$on("task",e[12]),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[16]),2&n&&(o.listName=e[1].name),8&n&&(o.eventId=e[3]),1&n&&(o.record=e[0]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function nn(e){let t,n,o=e[1].item,s=[];for(let t=0;t<o.length;t+=1)s[t]=tn(en(e,o,t));const r=e=>se(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=S()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(1055&n){let l;for(o=e[1].item,l=0;l<o.length;l+=1){const r=en(e,o,l);s[l]?(s[l].p(r,n),oe(s[l],1)):(s[l]=tn(r),s[l].c(),oe(s[l],1),s[l].m(t.parentNode,t))}for(te(),l=o.length;l<s.length;l+=1)r(l);ne()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)oe(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)se(s[e]);n=!1},d(e){x(s,e),e&&w(t)}}}function on(e){let t,n,o=e[9](e[5])+"";return{c(){t=I("span"),n=F(o)},m(e,o){k(e,t,o),y(t,n)},p(e,t){32&t&&o!==(o=e[9](e[5])+"")&&D(n,o)},d(e){e&&w(t)}}}function sn(e){let t,n,o;return n=new e[6]({props:{$$slots:{default:[on]},$$scope:{ctx:e}}}),n.$on("click",(function(){g(e[15])&&e[15].apply(this,arguments)})),{c(){t=I("div"),ce(n.$$.fragment),C(t,"class","accordion svelte-148ktt9"),C(t,"slot","handle")},m(e,s){k(e,t,s),de(n,t,null),o=!0},p(t,o){e=t;const s={};524320&o&&(s.$$scope={dirty:o,ctx:e}),n.$set(s)},i(e){o||(oe(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&w(t),ue(n)}}}function rn(e){let t,n;return t=new e[8]({props:{$$slots:{handle:[sn,({toggle:e})=>({15:e}),({toggle:e})=>e?32768:0],default:[nn,({toggle:e})=>({15:e}),({toggle:e})=>e?32768:0]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};557119&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function ln(e){let t,n,o;return n=new e[7]({props:{$$slots:{default:[rn]},$$scope:{ctx:e}}}),{c(){t=I("div"),ce(n.$$.fragment),C(t,"class","formList")},m(e,s){k(e,t,s),de(n,t,null),o=!0},p(e,[t]){const o={};524351&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(oe(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&w(t),ue(n)}}}function an(e,t,n){const{Button:o,Accordion:s,AccordionSection:r}=a;let{list:l}=t,{schema:i}=t,{record:u}=t,{classId:m}=t,{eventId:f}=t,{disabled:p}=t;const $={};let g=u[l.name]||{};u[l.name]=g;const h=e=>$[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,l=e.list),"schema"in e&&n(11,i=e.schema),"record"in e&&n(0,u=e.record),"classId"in e&&n(2,m=e.classId),"eventId"in e&&n(3,f=e.eventId),"disabled"in e&&n(4,p=e.disabled)},[u,l,m,f,p,g,o,s,r,e=>i.filter((t=>void 0!==e[t.name]&&"boolean"!==t.type)).map((t=>"object"===t.type?h(t.name):"date"===t.type?c(e[t.name]):"datetime"===t.type?d(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&($[o]=e.desc);const s=u[t];n(0,u[t]={...s,[o]:e.value},u),n(5,g=u[t])},i,function(t){z(e,t)}]}class cn extends pe{constructor(e){var t;super(),document.getElementById("svelte-148ktt9-style")||((t=I("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}}",y(document.head,t)),fe(this,e,an,ln,h,{list:1,schema:11,record:0,classId:2,eventId:3,disabled:4})}}const{Boolean:dn,document:un}=ie;function mn(e,t,n){const o=e.slice();return o[36]=t[n],o}function fn(e,t,n){const o=e.slice();return o[39]=t[n],o}function pn(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function $n(e){let t,n,o=e[35]&&function(e){let t,n,o,s,r,l,i,a,c,d,u,m,f,p,$,g,h,v,_=e[0].items,S=[];for(let t=0;t<_.length;t+=1)S[t]=hn(fn(e,_,t));const N=e=>se(S[e],1,1,(()=>{S[e]=null}));let j=e[0].list&&vn(e);return f=new e[6]({props:{outline:!0,$$slots:{default:[wn]},$$scope:{ctx:e}}}),f.$on("click",e[12]),$=new e[6]({props:{disabled:e[3],form:e[7],filled:!0,type:"submit",$$slots:{default:[xn]},$$scope:{ctx:e}}}),{c(){t=I("section"),n=I("form"),o=I("input"),r=q();for(let e=0;e<S.length;e+=1)S[e].c();l=q(),j&&j.c(),i=q(),a=I("div"),c=I("small"),d=F(e[2]),u=q(),m=I("div"),ce(f.$$.fragment),p=q(),ce($.$$.fragment),C(o,"class",b(e[7])+" svelte-1asqkqt"),C(o,"name","_id"),C(o,"type","hidden"),o.value=s=e[1]._id||"",C(n,"class",b(e[8])+" svelte-1asqkqt"),C(n,"id",e[7]),C(a,"class","comment svelte-1asqkqt"),C(m,"class","form--buttons svelte-1asqkqt"),C(t,"class",b(e[9])+" svelte-1asqkqt")},m(s,b){k(s,t,b),y(t,n),y(n,o),y(n,r);for(let e=0;e<S.length;e+=1)S[e].m(n,null);var w;y(n,l),j&&j.m(n,null),y(t,i),y(t,a),y(a,c),y(c,d),y(t,u),y(t,m),de(f,m,null),y(m,p),de($,m,null),g=!0,h||(v=E(n,"submit",(w=e[11],function(e){return e.preventDefault(),w.call(this,e)})),h=!0)},p(e,t){if((!g||2&t[0]&&s!==(s=e[1]._id||""))&&(o.value=s),8331&t[0]){let o;for(_=e[0].items,o=0;o<_.length;o+=1){const s=fn(e,_,o);S[o]?(S[o].p(s,t),oe(S[o],1)):(S[o]=hn(s),S[o].c(),oe(S[o],1),S[o].m(n,l))}for(te(),o=_.length;o<S.length;o+=1)N(o);ne()}e[0].list?j?(j.p(e,t),1&t[0]&&oe(j,1)):(j=vn(e),j.c(),oe(j,1),j.m(n,null)):j&&(te(),se(j,1,1,(()=>{j=null})),ne()),(!g||4&t[0])&&D(d,e[2]);const r={};2048&t[1]&&(r.$$scope={dirty:t,ctx:e}),f.$set(r);const i={};8&t[0]&&(i.disabled=e[3]),2048&t[1]&&(i.$$scope={dirty:t,ctx:e}),$.$set(i)},i(e){if(!g){for(let e=0;e<_.length;e+=1)oe(S[e]);oe(j),oe(f.$$.fragment,e),oe($.$$.fragment,e),g=!0}},o(e){S=S.filter(dn);for(let e=0;e<S.length;e+=1)se(S[e]);se(j),se(f.$$.fragment,e),se($.$$.fragment,e),g=!1},d(e){e&&w(t),x(S,e),j&&j.d(),ue(f),ue($),h=!1,v()}}}(e);return{c(){o&&o.c(),t=S()},m(e,s){o&&o.m(e,s),k(e,t,s),n=!0},p(e,t){e[35]&&o.p(e,t)},i(e){n||(oe(o),n=!0)},o(e){se(o),n=!1},d(e){o&&o.d(e),e&&w(t)}}}function gn(e){let t,n;return t=new Mt({props:{classId:e[7],item:e[39],record:e[1],disabled:e[3],eventId:e[0].id}}),t.$on("task",e[13]),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[39]),2&n[0]&&(o.record=e[1]),8&n[0]&&(o.disabled=e[3]),1&n[0]&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function hn(e){let t,n,o="list"!==e[39].type&&gn(e);return{c(){o&&o.c(),t=S()},m(e,s){o&&o.m(e,s),k(e,t,s),n=!0},p(e,n){"list"!==e[39].type?o?(o.p(e,n),1&n[0]&&oe(o,1)):(o=gn(e),o.c(),oe(o,1),o.m(t.parentNode,t)):o&&(te(),se(o,1,1,(()=>{o=null})),ne())},i(e){n||(oe(o),n=!0)},o(e){se(o),n=!1},d(e){o&&o.d(e),e&&w(t)}}}function vn(e){let t,n,o=e[0].list,s=[];for(let t=0;t<o.length;t+=1)s[t]=kn(mn(e,o,t));const r=e=>se(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=S()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(16523&n[0]){let l;for(o=e[0].list,l=0;l<o.length;l+=1){const r=mn(e,o,l);s[l]?(s[l].p(r,n),oe(s[l],1)):(s[l]=kn(r),s[l].c(),oe(s[l],1),s[l].m(t.parentNode,t))}for(te(),l=o.length;l<s.length;l+=1)r(l);ne()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)oe(s[e]);n=!0}},o(e){s=s.filter(dn);for(let e=0;e<s.length;e+=1)se(s[e]);n=!1},d(e){x(s,e),e&&w(t)}}}function bn(e){let t,n;return t=new cn({props:{classId:e[7],list:e[36],eventId:e[0].id,schema:e[36].item,record:e[1],disabled:e[3]}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[36]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[36].item),2&n[0]&&(o.record=e[1]),8&n[0]&&(o.disabled=e[3]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function yn(e){let t,n;return t=new Zt({props:{classId:e[7],list:e[36],eventId:e[0].id,schema:e[36].item,record:e[1],disabled:e[3]}}),t.$on("save",e[14]),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[36]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[36].item),2&n[0]&&(o.record=e[1]),8&n[0]&&(o.disabled=e[3]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function kn(e){let t,n,o,s,r,l;t=new e[5]({props:{text:e[36].designation}});const i=[yn,bn],a=[];function c(e,t){return"array"===e[36].type?0:1}return o=c(e),s=a[o]=i[o](e),{c(){ce(t.$$.fragment),n=q(),s.c(),r=S()},m(e,s){de(t,e,s),k(e,n,s),a[o].m(e,s),k(e,r,s),l=!0},p(e,n){const l={};1&n[0]&&(l.text=e[36].designation),t.$set(l);let d=o;o=c(e),o===d?a[o].p(e,n):(te(),se(a[d],1,1,(()=>{a[d]=null})),ne(),s=a[o],s?s.p(e,n):(s=a[o]=i[o](e),s.c()),oe(s,1),s.m(r.parentNode,r))},i(e){l||(oe(t.$$.fragment,e),oe(s),l=!0)},o(e){se(t.$$.fragment,e),se(s),l=!1},d(e){ue(t,e),e&&w(n),a[o].d(e),e&&w(r)}}}function wn(e){let t;return{c(){t=F("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function xn(e){let t;return{c(){t=F("Speichern")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function In(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function _n(e){let t,n,o,s;un.title=t=e[4];let r={ctx:e,current:null,token:null,hasCatch:!1,pending:In,then:$n,catch:pn,value:35,blocks:[,,,]};return re(e[10](),r),{c(){n=q(),o=S(),r.block.c()},m(e,t){k(e,n,t),k(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||16&o[0])&&t!==(t=e[4])&&(un.title=t),le(r,e,o)},i(e){s||(oe(r.block),s=!0)},o(e){for(let e=0;e<3;e+=1){se(r.blocks[e])}s=!1},d(e){e&&w(n),e&&w(o),r.block.d(e),r.token=null,r=null}}}let Fn=new Map,qn=new Map,Sn=new Map;const En=(e,n)=>{const o=n;return Fn.has(o)||Fn.set(o,t.getTasksList(n).then((({data:e})=>e))),Fn.get(o)},Cn=(e,n,o)=>qn.get(o)||En(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(qn.set(o,e),e))),Dn=(e,n)=>Sn.get(n)||t.getTask(e,n).then((e=>(Sn.set(n,e),e))),Nn=(e,n)=>{if(!Fn.get(n))return;const o=n;Fn.set(o,t.getTasksList(n).then((({data:e})=>e)))},jn=()=>{Fn=new Map,qn=new Map,Sn=new Map};function On(e,o,i){let c,d,m,f;v(e,r,(e=>i(25,m=e))),v(e,l,(e=>i(26,f=e)));const{Divider:p,Button:$}=a,g=JSON.parse(s.getItem("Locale")),h=T();let b,y,{schema:k}=o,{recID:w}=o,{prevEventID:x=!1}=o,{prev:I=!1}=o,{taskId:_=!1}=o,{description:F=""}=o,{root:q=!1}=o,{readonly:S}=o,E={},C={},D="form-"+k.class+Math.floor(9e3*Math.random()+1e3).toString();const N=q?"fEmbedded":"fTask",j=q?"sEmbedded":"sTask";let O="";const P=(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($t);let l=0,i=0;const a=new Date(0);for(const c of r){if(!e.startsWith(c,l))return n;if(l+=c.length,l===e.length){if(i!==t.length)return n;break}if("%"!==t[i+c.length])break;if(i+=c.length+1,"%"===t[i]){if("%"!==e[l])return n;l++}else if("p"===t[i].toLowerCase()){const t=e.substr(l,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{pt.lastIndex=l;const r=pt.exec(e);if(null==r)return n;switch(t[i]){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])}l+=r[0].length}i++}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(g.id).substring(1,2);try{s=Number(s.replace(e,".")).toString()}catch{}}return s},L=()=>q?window.singleSpaNavigate("/"):h("back");return n.subscribe((async e=>{if(!e)return;if(!Fn.get(e.eventId))return;const n=await t.getTaskList(k.class,e.taskId);((e,t,n)=>{if(!Fn.get(e))return;const o=t;qn.set(o,n)})(e.eventId,e.taskId,n)})),B(jn),e.$$set=e=>{"schema"in e&&i(0,k=e.schema),"recID"in e&&i(19,w=e.recID),"prevEventID"in e&&i(17,x=e.prevEventID),"prev"in e&&i(20,I=e.prev),"taskId"in e&&i(18,_=e.taskId),"description"in e&&i(15,F=e.description),"root"in e&&i(21,q=e.root),"readonly"in e&&i(16,S=e.readonly)},e.$$.update=()=>{65536&e.$$.dirty[0]&&i(3,c=S),12582913&e.$$.dirty[0]&&y&&b&&k.items.map((({name:e,type:t})=>{const n=b.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;y[e]&&i(1,E[e]=y[e],E),y[o]&&i(1,E[o]=y[o],E)})),2129920&e.$$.dirty[0]&&i(4,d=q?F||"enablerr - Form":document.title)},[k,E,O,c,d,p,$,D,N,j,async()=>{if(w&&(i(1,E=await t.getTask(k.class,w)),i(15,F=u(k,E))),x){i(16,S=!1),i(22,b=await t.getSchema(x)),"string"==typeof I&&i(23,y=await t.getTask(b.class,I));const e=k.items.find((e=>e.refClass===b.class));i(1,E[e.name]=y._id,E)}if(m.role?.length&&k.authorization?.length){const e=k.authorization.some((e=>f?.find((t=>t===e.role&&"edit"===e.activity))));i(16,S=!e)}return!0},async()=>{const e={};Array.from(document.querySelectorAll("form#"+D+" ."+D)).map((t=>{if(t.name)if(t.name.includes(".")){const[n,o]=t.name.split("."),s=k.list.find((e=>e.name===n));e[t.name]=P(s.item,t)}else e[t.name]=P(k.items,t)})),k.list&&k.list.map((t=>{"array"===t.type&&C[t.name]&&(e[t.name]=C[t.name].reduce(((e,n)=>n._delete||!Object.values(n).some(Boolean)?e:e.concat(Object.entries(n).reduce(((e,[n,o])=>("_delete"!==n&&(e[n]=P(t.item,{name:n,value:o,checked:o})),e)),{}))),[]))})),e._event=k.id,e._prevEventId=x,e._taskId=_,i(2,O="Die Daten werden gespeichert.");const{id:n,task:o}=await t.saveData(k.class,e);e._id=n;const s=await t.getTaskList(k.class,n);h("choose",{row:s}),q&&!w?window.singleSpaNavigate(`/task/${k.id}/${o}/task`):L()},()=>x?window.history.back():L(),async({detail:{row:e}})=>{if(w)return;const n=e._task.event,o=await t.getEvent(n);(await t.getEvent(k.id)).input.class[0]?.name===o.output.class[0]?.name&&(i(22,b=await t.getSchema(n)),i(17,x=n),i(18,_=e._task._id),i(23,y=!!_&&await t.getTask(b.class,e._task.docId)))},({detail:e})=>{C[e.listName]=e.value},F,S,x,_,w,I,q,b,y]}class Pn extends pe{constructor(e){var t;super(),un.getElementById("svelte-1asqkqt-style")||((t=I("style")).id="svelte-1asqkqt-style",t.textContent="form.disabled.svelte-1asqkqt input.svelte-1asqkqt{background-color:red !important}.comment.svelte-1asqkqt.svelte-1asqkqt{color:green;margin-bottom:1em}form.svelte-1asqkqt.svelte-1asqkqt{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1asqkqt.svelte-1asqkqt{min-width:30em}}.fEmbedded.svelte-1asqkqt.svelte-1asqkqt,.fTask.svelte-1asqkqt.svelte-1asqkqt{overflow-y:auto;overflow-x:hidden}.fEmbedded.svelte-1asqkqt.svelte-1asqkqt{height:fit-content;min-height:47vh;max-height:63vh}.fTask.svelte-1asqkqt.svelte-1asqkqt{height:fit-content;max-height:70vh}.sTask.svelte-1asqkqt.svelte-1asqkqt{height:95%;display:inline-grid}.sTask.svelte-1asqkqt .btn.svelte-1asqkqt{display:initial !important}.form--buttons.svelte-1asqkqt.svelte-1asqkqt{display:flex;gap:1em;padding-bottom:0.5em}",y(un.head,t)),fe(this,e,On,_n,h,{schema:0,recID:19,prevEventID:17,prev:20,taskId:18,description:15,root:21,readonly:16},[-1,-1])}}function Ln(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 Pn({props:r}),H.push((()=>ae(t,"description",s))),t.$on("back",e[2]),{c(){ce(t.$$.fragment)},m(e,n){de(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],V((()=>n=!1))),t.$set(s)},i(e){o||(oe(t.$$.fragment,e),o=!0)},o(e){se(t.$$.fragment,e),o=!1},d(e){ue(t,e)}}}function Mn(e){let t,n;return t=new i({props:{update:e[1],description:e[0],$$slots:{default:[Ln,({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(){ce(t.$$.fragment)},m(e,o){de(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||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Bn(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 Tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zn,An,Hn=(zn=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({},l),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:i.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var l={component:null,domElementGetter:null,props:{}};function i(e){return Promise.resolve()}function a(e,t,n){var s=Object.keys(l),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),l=s();t.instance=new e.component(o(o({},r),{},{target:l,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)}))}},zn(An={exports:{}},An.exports),An.exports);const Rn=Tn(Hn)({component:class extends pe{constructor(e){super(),fe(this,e,Bn,Mn,h,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Wn,mount:Yn,unmount:Gn}=Rn;e({bootstrap:Wn,mount:Yn,unmount:Gn});e("Form",Pn),e("List",Be)}}}));
|
|
1
|
+
System.register(["@enablerr-ui/form","@enablerr-ui/layout"],(function(e){"use strict";var t,n,o,s,r,l,i,a;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.TextArea,s=e.Storage,r=e.settings,l=e.currentRoles,i=e.Page},function(e){a=e.getAttractions}],execute:function(){e("version","0.2.151");const c=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(" · "))),d=e=>{try{return new Date(e).toLocaleString()}catch{return e}},u=(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=>c(n["_"+e]||n[e]))).filter((e=>!!e)).join(" • ")||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":t[e.name])).filter((e=>!!e)).join(" • ")};function m(){}function f(e){return e()}function p(){return Object.create(null)}function $(e){e.forEach(f)}function g(e){return"function"==typeof e}function h(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function v(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return m;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function b(e){return null==e?"":e}function y(e,t){e.appendChild(t)}function k(e,t,n){e.insertBefore(t,n||null)}function w(e){e.parentNode.removeChild(e)}function x(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function I(e){return document.createElement(e)}function _(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function F(e){return document.createTextNode(e)}function q(){return F(" ")}function S(){return F("")}function E(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function C(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function D(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function N(e,t){e.value=null==t?"":t}function j(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function O(e,t,n){e.classList[n?"add":"remove"](t)}let P;function L(e){P=e}function M(){if(!P)throw new Error("Function called outside component initialization");return P}function B(e){M().$$.on_mount.push(e)}function T(){const e=M();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 z(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const A=[],H=[],R=[],W=[],Y=Promise.resolve();let G=!1;function J(e){R.push(e)}function V(e){W.push(e)}let U=!1;const K=new Set;function Q(){if(!U){U=!0;do{for(let e=0;e<A.length;e+=1){const t=A[e];L(t),X(t.$$)}for(L(null),A.length=0;H.length;)H.pop()();for(let e=0;e<R.length;e+=1){const t=R[e];K.has(t)||(K.add(t),t())}R.length=0}while(A.length);for(;W.length;)W.pop()();G=!1,U=!1,K.clear()}}function X(e){if(null!==e.fragment){e.update(),$(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(J)}}const Z=new Set;let ee;function te(){ee={r:0,c:[],p:ee}}function ne(){ee.r||$(ee.c),ee=ee.p}function oe(e,t){e&&e.i&&(Z.delete(e),e.i(t))}function se(e,t,n,o){if(e&&e.o){if(Z.has(e))return;Z.add(e),ee&&ee.c.push((()=>{Z.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function re(e,t){const n=t.token={};function o(e,o,s,r){if(t.token!==n)return;t.resolved=r;let l=t.ctx;void 0!==s&&(l=l.slice(),l[s]=r);const i=e&&(t.current=e)(l);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(te(),se(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ne())})):t.block.d(1),i.c(),oe(i,1),i.m(t.mount(),t.anchor),a=!0),t.block=i,t.blocks&&(t.blocks[o]=i),a&&Q()}if((s=e)&&"object"==typeof s&&"function"==typeof s.then){const n=M();if(e.then((e=>{L(n),o(t.then,1,t.value,e),L(null)}),(e=>{if(L(n),o(t.catch,2,t.error,e),L(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 le(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 ie="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ae(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function ce(e){e&&e.c()}function de(e,t,n,o){const{fragment:s,on_mount:r,on_destroy:l,after_update:i}=e.$$;s&&s.m(t,n),o||J((()=>{const t=r.map(f).filter(g);l?l.push(...t):$(t),e.$$.on_mount=[]})),i.forEach(J)}function ue(e,t){const n=e.$$;null!==n.fragment&&($(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function me(e,t){-1===e.$$.dirty[0]&&(A.push(e),G||(G=!0,Y.then(Q)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function fe(e,t,n,o,s,r,l=[-1]){const i=P;L(e);const a=e.$$={fragment:null,ctx:null,props:r,update:m,not_equal:s,bound:p(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i?i.$$.context:t.context||[]),callbacks:p(),dirty:l,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&&me(e,t)),n})):[],a.update(),c=!0,$(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(w)}else a.fragment&&a.fragment.c();t.intro&&oe(e.$$.fragment),de(e,t.target,t.anchor,t.customElement),Q()}L(i)}class pe{$destroy(){ue(this,1),this.$destroy=m}$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 $e(e){let t,n,o,s;return{c(){t=_("svg"),n=_("polyline"),o=_("path"),C(n,"points","9 10 4 15 9 20"),C(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",s="feather feather-corner-down-left "+e[2])},m(e,s){k(e,t,s),y(t,n),y(t,o)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-corner-down-left "+e[2])&&C(t,"class",s)},i:m,o:m,d(e){e&&w(t)}}}function ge(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 he extends pe{constructor(e){super(),fe(this,e,ge,$e,h,{size:0,strokeWidth:1,class:2})}}function ve(e){let t,n,o,s,r;return{c(){t=_("svg"),n=_("path"),o=_("line"),s=_("line"),C(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),C(o,"x1","18"),C(o,"y1","9"),C(o,"x2","12"),C(o,"y2","15"),C(s,"x1","12"),C(s,"y1","9"),C(s,"x2","18"),C(s,"y2","15"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",r="feather feather-delete "+e[2])},m(e,r){k(e,t,r),y(t,n),y(t,o),y(t,s)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-delete "+e[2])&&C(t,"class",r)},i:m,o:m,d(e){e&&w(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 pe{constructor(e){super(),fe(this,e,be,ve,h,{size:0,strokeWidth:1,class:2})}}function ke(e){let t,n,o,s;return{c(){t=_("svg"),n=_("circle"),o=_("line"),C(n,"cx","11"),C(n,"cy","11"),C(n,"r","8"),C(o,"x1","21"),C(o,"y1","21"),C(o,"x2","16.65"),C(o,"y2","16.65"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",s="feather feather-search "+e[2])},m(e,s){k(e,t,s),y(t,n),y(t,o)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-search "+e[2])&&C(t,"class",s)},i:m,o:m,d(e){e&&w(t)}}}function we(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 pe{constructor(e){super(),fe(this,e,we,ke,h,{size:0,strokeWidth:1,class:2})}}const{document:Ie}=ie;function _e(e){e[11]=e[13].list,e[12]=e[13].items}function Fe(e,t,n){const o=e.slice();return o[14]=t[n],o}function qe(e,t,n){const o=e.slice();return o[17]=t[n],o}function Se(e,t,n){const o=e.slice();return o[17]=t[n],o}function Ee(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function Ce(e){let t,n,o,s;_e(e);let r=e[11].length&&De(e),l=e[11],i=[];for(let t=0;t<l.length;t+=1)i[t]=Oe(Fe(e,l,t));return{c(){t=I("div"),n=I("table"),r&&r.c(),o=q(),s=I("tbody");for(let e=0;e<i.length;e+=1)i[e].c();C(n,"striped",""),C(n,"class","svelte-1ifmdyk"),C(t,"class","eList svelte-1ifmdyk")},m(e,l){k(e,t,l),y(t,n),r&&r.m(n,null),y(n,o),y(n,s);for(let e=0;e<i.length;e+=1)i[e].m(s,null)},p(e,t){if(_e(e),e[11].length?r?r.p(e,t):(r=De(e),r.c(),r.m(n,o)):r&&(r.d(1),r=null),59&t){let n;for(l=e[11],n=0;n<l.length;n+=1){const o=Fe(e,l,n);i[n]?i[n].p(o,t):(i[n]=Oe(o),i[n].c(),i[n].m(s,null))}for(;n<i.length;n+=1)i[n].d(1);i.length=l.length}},i:m,o:m,d(e){e&&w(t),r&&r.d(),x(i,e)}}}function De(e){let t,n,o=e[12],s=[];for(let t=0;t<o.length;t+=1)s[t]=Ne(Se(e,o,t));return{c(){t=I("thead"),n=I("tr");for(let e=0;e<s.length;e+=1)s[e].c();C(n,"class","svelte-1ifmdyk"),C(t,"class","svelte-1ifmdyk")},m(e,o){k(e,t,o),y(t,n);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(34&t){let r;for(o=e[12],r=0;r<o.length;r+=1){const l=Se(e,o,r);s[r]?s[r].p(l,t):(s[r]=Ne(l),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}},d(e){e&&w(t),x(s,e)}}}function Ne(e){let t,n,o=e[17].designation+"";return{c(){t=I("th"),n=F(o),C(t,"class","svelte-1ifmdyk")},m(e,o){k(e,t,o),y(t,n)},p(e,t){2&t&&o!==(o=e[17].designation+"")&&D(n,o)},d(e){e&&w(t)}}}function je(e){let t,n,o=e[3](e[14],e[17])+"";return{c(){t=I("td"),n=F(o),C(t,"class","svelte-1ifmdyk")},m(e,o){k(e,t,o),y(t,n)},p(e,t){2&t&&o!==(o=e[3](e[14],e[17])+"")&&D(n,o)},d(e){e&&w(t)}}}function Oe(e){let t,n,o,s,r=e[12],l=[];for(let t=0;t<r.length;t+=1)l[t]=je(qe(e,r,t));return{c(){t=I("tr");for(let e=0;e<l.length;e+=1)l[e].c();n=q(),C(t,"class","pointer svelte-1ifmdyk"),O(t,"active",e[14]._id===e[0])},m(r,i){k(r,t,i);for(let e=0;e<l.length;e+=1)l[e].m(t,null);y(t,n),o||(s=E(t,"click",(function(){g(e[4](e[14]))&&e[4](e[14]).apply(this,arguments)})),o=!0)},p(o,s){if(e=o,42&s){let o;for(r=e[12],o=0;o<r.length;o+=1){const i=qe(e,r,o);l[o]?l[o].p(i,s):(l[o]=je(i),l[o].c(),l[o].m(t,n))}for(;o<l.length;o+=1)l[o].d(1);l.length=r.length}35&s&&O(t,"active",e[14]._id===e[0])},d(e){e&&w(t),x(l,e),o=!1,s()}}}function Pe(e){let t,n;return t=new e[2]({}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p:m,i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Le(e){let t,n,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:Pe,then:Ce,catch:Ee,value:13,blocks:[,,,]};return re(n=e[1]&&e[5](),s),{c(){t=S(),s.block.c()},m(e,n){k(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,2&o&&n!==(n=e[1]&&e[5]())&&re(n,s)||le(s,e,o)},i(e){o||(oe(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){se(s.blocks[e])}o=!1},d(e){e&&w(t),s.block.d(e),s.token=null,s=null}}}function Me(e,o,s){const r=T(),{Loading:l}=a;let{className:i}=o,{rowId:d}=o,{filterForReady:u=!1}=o,m=!0;const f=t.getSchemaByClass(i),p=e=>f.then((t=>"Information"===t.state.task?e:e.filter((e=>"Ready"===e._task.status))));return B((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"})})),n.subscribe((async e=>{if(!e)return;const t=await f;e.eventId===t.id&&(Nn(t.class,e.eventId),s(1,m=!s(1,m=!1)))})),e.$$set=e=>{"className"in e&&s(6,i=e.className),"rowId"in e&&s(0,d=e.rowId),"filterForReady"in e&&s(7,u=e.filterForReady)},[d,m,l,(e,t)=>c(e[`_${t.name}`]||e[t.name]||""),e=>()=>r("choose",{row:e}),async()=>f.then((e=>En(e.class,e.id).then((e=>u?p(e):e)).then((t=>{let n=[],o=e.display;return o&&o.length?o.map((o=>{const[s,r]=o.split(".");let l=e.list?.find((e=>e.name===s))?.item.find((e=>e.name===r));l&&(l={...l},l.name=`${s}_${r}`,t=t.map((e=>(e[s]&&(e[l.name]=e[s][r]),e)))),l||(l=e.items.find((e=>e.name===s))),n.find((e=>e?.name===s))||n.push(l)})):n=e.items,{list:t,items:n}})))),i,u]}class Be extends pe{constructor(e){var t;super(),Ie.getElementById("svelte-1ifmdyk-style")||((t=I("style")).id="svelte-1ifmdyk-style",t.textContent=".eList.svelte-1ifmdyk.svelte-1ifmdyk{min-height:12em;height:fit-content;max-height:65vh;overflow:auto}.eList.svelte-1ifmdyk table.svelte-1ifmdyk{min-width:30vw;position:relative;width:max-content !important;margin-top:1em}.eList.svelte-1ifmdyk table thead.svelte-1ifmdyk{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1ifmdyk table tbody tr.svelte-1ifmdyk{height:2.3em}th.svelte-1ifmdyk.svelte-1ifmdyk,td.svelte-1ifmdyk.svelte-1ifmdyk{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-1ifmdyk.svelte-1ifmdyk:hover{background-color:#DAE1E5}tr.active.svelte-1ifmdyk.svelte-1ifmdyk{color:#326173;background-color:#fcebd5}",y(Ie.head,t)),fe(this,e,Me,Le,h,{className:6,rowId:0,filterForReady:7})}}function Te(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function ze(e){let t,n,o=e[16]&&Ae(e);return{c(){o&&o.c(),t=S()},m(e,s){o&&o.m(e,s),k(e,t,s),n=!0},p(e,n){e[16]?o?(o.p(e,n),4&n&&oe(o,1)):(o=Ae(e),o.c(),oe(o,1),o.m(t.parentNode,t)):o&&(te(),se(o,1,1,(()=>{o=null})),ne())},i(e){n||(oe(o),n=!0)},o(e){se(o),n=!1},d(e){o&&o.d(e),e&&w(t)}}}function Ae(e){let t,n;return t=new e[5]({props:{title:e[8],class:"eList "+(e[4]?"form":""),$$slots:{default:[Ge]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};16&n&&(o.class="eList "+(e[4]?"form":"")),131103&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function He(e){let t,n;return t=new Pn({props:{schema:e[0]}}),t.$on("choose",(function(){g(e[12](e[16]))&&e[12](e[16]).apply(this,arguments)})),t.$on("back",e[10]),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(n,o){e=n;const s={};1&o&&(s.schema=e[0]),t.$set(s)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Re(e){let t,n,o,s,r,l,i,a,c;return t=new e[6]({}),s=new e[7]({props:{outline:!0,$$slots:{default:[We]},$$scope:{ctx:e}}}),s.$on("click",e[10]),l=new e[7]({props:{filled:!0,$$slots:{default:[Ye]},$$scope:{ctx:e}}}),l.$on("click",e[11]),a=new Be({props:{className:e[0].class,filterForReady:e[3],rowId:e[1]}}),a.$on("choose",e[13]),{c(){ce(t.$$.fragment),n=q(),o=I("div"),ce(s.$$.fragment),r=q(),ce(l.$$.fragment),i=q(),ce(a.$$.fragment),C(o,"class","form--buttons svelte-jb5mrh")},m(e,d){de(t,e,d),k(e,n,d),k(e,o,d),de(s,o,null),y(o,r),de(l,o,null),k(e,i,d),de(a,e,d),c=!0},p(e,t){const n={};131072&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n);const o={};131072&t&&(o.$$scope={dirty:t,ctx:e}),l.$set(o);const r={};1&t&&(r.className=e[0].class),8&t&&(r.filterForReady=e[3]),2&t&&(r.rowId=e[1]),a.$set(r)},i(e){c||(oe(t.$$.fragment,e),oe(s.$$.fragment,e),oe(l.$$.fragment,e),oe(a.$$.fragment,e),c=!0)},o(e){se(t.$$.fragment,e),se(s.$$.fragment,e),se(l.$$.fragment,e),se(a.$$.fragment,e),c=!1},d(e){ue(t,e),e&&w(n),e&&w(o),ue(s),ue(l),e&&w(i),ue(a,e)}}}function We(e){let t;return{c(){t=F("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function Ye(e){let t;return{c(){t=F("Neu")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function Ge(e){let t,n,o,s;const r=[Re,He],l=[];function i(e,t){return e[16].length&&!e[4]?0:1}return t=i(e),n=l[t]=r[t](e),{c(){n.c(),o=S()},m(e,n){l[t].m(e,n),k(e,o,n),s=!0},p(e,s){let a=t;t=i(e),t===a?l[t].p(e,s):(te(),se(l[a],1,1,(()=>{l[a]=null})),ne(),n=l[t],n?n.p(e,s):(n=l[t]=r[t](e),n.c()),oe(n,1),n.m(o.parentNode,o))},i(e){s||(oe(n),s=!0)},o(e){se(n),s=!1},d(e){l[t].d(e),e&&w(o)}}}function Je(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function Ve(e){let t,n,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:Je,then:ze,catch:Te,value:16,blocks:[,,,]};return re(n=e[9](e[2]),s),{c(){t=S(),s.block.c()},m(e,n){k(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[9](e[2]))&&re(n,s)||le(s,e,o)},i(e){o||(oe(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){se(s.blocks[e])}o=!1},d(e){e&&w(t),s.block.d(e),s.token=null,s=null}}}function Ue(e,t,n){const{Dialog:o,Divider:s,Button:r}=a,l=T();let{schema:i}=t,{recID:c}=t,{isOpening:d=!0}=t,{filterForReady:u=!1}=t,m=i.identity.designation;i.class;let f=!1;return e.$$set=e=>{"schema"in e&&n(0,i=e.schema),"recID"in e&&n(1,c=e.recID),"isOpening"in e&&n(2,d=e.isOpening),"filterForReady"in e&&n(3,u=e.filterForReady)},[i,c,d,u,f,o,s,r,m,e=>e&&En(i.class,i.id),()=>{n(4,f=!1),l("back")},()=>{n(4,f=!0)},e=>({detail:{row:e}})=>{let t=i.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let s=i.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(s){e[`${n}_${o}`]=e[n][o]}})),l("choose",{row:e})},function(t){z(e,t)}]}class Ke extends pe{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=I("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}",y(document.head,t)),fe(this,e,Ue,Ve,h,{schema:0,recID:1,isOpening:2,filterForReady:3})}}function Qe(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function Xe(e){let t,n,s,r,l,i,a,c,d,u,m;n=new o({props:{class:"full-width",id:e[9],value:e[1],rows:"1",readonly:!0,disabled:e[2],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"}});let f=!e[2]&&Ze(e),p=!e[2]&&et(e);function $(t){e[17](t)}let g={class:"tModal",noClickaway:!0,$$slots:{default:[tt]},$$scope:{ctx:e}};return void 0!==e[7]&&(g.open=e[7]),d=new e[8]({props:g}),H.push((()=>ae(d,"open",$))),{c(){t=I("div"),ce(n.$$.fragment),s=q(),f&&f.c(),r=q(),l=I("input"),a=q(),p&&p.c(),c=q(),ce(d.$$.fragment),C(l,"class",i=b(e[4]||e[5])+" svelte-axxims"),C(l,"id",e[3]),C(l,"name",e[3]),l.value=e[0],l.hidden=!0,l.readOnly=!0,l.disabled=!0,j(t,"position","relative")},m(e,o){k(e,t,o),de(n,t,null),y(t,s),f&&f.m(t,null),y(t,r),y(t,l),y(t,a),p&&p.m(t,null),k(e,c,o),de(d,e,o),m=!0},p(e,o){const s={};2&o&&(s.value=e[1]),4&o&&(s.disabled=e[2]),n.$set(s),e[2]?f&&(te(),se(f,1,1,(()=>{f=null})),ne()):f?(f.p(e,o),4&o&&oe(f,1)):(f=Ze(e),f.c(),oe(f,1),f.m(t,r)),(!m||48&o&&i!==(i=b(e[4]||e[5])+" svelte-axxims"))&&C(l,"class",i),(!m||8&o)&&C(l,"id",e[3]),(!m||8&o)&&C(l,"name",e[3]),(!m||1&o&&l.value!==e[0])&&(l.value=e[0]),e[2]?p&&(te(),se(p,1,1,(()=>{p=null})),ne()):p?(p.p(e,o),4&o&&oe(p,1)):(p=et(e),p.c(),oe(p,1),p.m(t,null));const a={};4194497&o&&(a.$$scope={dirty:o,ctx:e}),!u&&128&o&&(u=!0,a.open=e[7],V((()=>u=!1))),d.$set(a)},i(e){m||(oe(n.$$.fragment,e),oe(f),oe(p),oe(d.$$.fragment,e),m=!0)},o(e){se(n.$$.fragment,e),se(f),se(p),se(d.$$.fragment,e),m=!1},d(e){e&&w(t),ue(n),f&&f.d(),p&&p.d(),e&&w(c),ue(d,e)}}}function Ze(e){let t,n,o,s,r;return n=new xe({props:{size:"18"}}),{c(){t=I("span"),ce(n.$$.fragment),C(t,"class","feather pointer svelte-axxims")},m(l,i){k(l,t,i),de(n,t,null),o=!0,s||(r=[E(t,"click",e[11]),E(t,"choose",e[12])],s=!0)},p:m,i(e){o||(oe(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&w(t),ue(n),s=!1,$(r)}}}function et(e){let t,n,o,s,r;return n=new ye({props:{size:"18"}}),{c(){t=I("span"),ce(n.$$.fragment),C(t,"class","feather2 pointer svelte-axxims")},m(l,i){k(l,t,i),de(n,t,null),o=!0,s||(r=E(t,"click",e[14]),s=!0)},p:m,i(e){o||(oe(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&w(t),ue(n),s=!1,r()}}}function tt(e){let t,n;return t=new Ke({props:{schema:e[6],recID:e[0],isOpening:e[7],filterForReady:"true"}}),t.$on("choose",e[12]),t.$on("back",e[13]),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.schema=e[6]),1&n&&(o.recID=e[0]),128&n&&(o.isOpening=e[7]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function nt(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function ot(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:nt,then:Xe,catch:Qe,value:21,blocks:[,,,]};return re(e[10](),o),{c(){t=S(),o.block.c()},m(e,s){k(e,t,s),o.block.m(e,o.anchor=s),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,[n]){le(o,e=t,n)},i(e){n||(oe(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){se(o.blocks[e])}n=!1},d(e){e&&w(t),o.block.d(e),o.token=null,o=null}}}function st(e,n,o){const s=T(),{Modal:r}=a;let{id:l}=n,{item:i}=n,{value:c=""}=n,{desc:d=""}=n,{noForm:m=!1}=n,{classId:f}=n,{eventId:p}=n,{disabled:$}=n;const g="comment_"+l;let h,v=!1;const b=()=>{o(7,v=!1)};return e.$$set=e=>{"id"in e&&o(3,l=e.id),"item"in e&&o(15,i=e.item),"value"in e&&o(0,c=e.value),"desc"in e&&o(1,d=e.desc),"noForm"in e&&o(4,m=e.noForm),"classId"in e&&o(5,f=e.classId),"eventId"in e&&o(16,p=e.eventId),"disabled"in e&&o(2,$=e.disabled)},e.$$.update=()=>{32833&e.$$.dirty&&c&&h&&Promise.resolve(Cn(i.refClass,h.id,c)).then((e=>{var t;(t=e)&&(o(1,d=u(h,t)),s("change",{value:c,description:d}))}))},[c,d,$,l,m,f,h,v,r,g,async()=>{if(o(6,h=await t.getSchemaByClass(i.refClass)),p&&c&&!$){(await t.getSchema(p)).input?.find((e=>e===i.refClass))&&o(2,$=!0)}return!0},function(){o(7,v=!0)},({detail:e})=>{o(0,c=e.row._id),Promise.resolve(Cn(i.refClass,h.id,c)).then((e=>s("task",{row:e}))),b()},b,()=>{o(0,c=o(1,d="")),s("change",{value:c,description:d}),s("task",{row:{_task:{event:h.id,_id:!1}}})},i,p,function(e){v=e,o(7,v)}]}class rt extends pe{constructor(e){var t;super(),document.getElementById("svelte-axxims-style")||((t=I("style")).id="svelte-axxims-style",t.textContent=".feather.svelte-axxims{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-axxims{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:disabled{padding-left:0.625em !important}",y(document.head,t)),fe(this,e,st,ot,h,{id:3,item:15,value:0,desc:1,noForm:4,classId:5,eventId:16,disabled:2})}}function lt(e){let t,n,o;return n=new e[7]({props:{lang:e[8].id,class:"left",type:"string",inputClass:"txt-right"+(e[2]?"":" "+e[3]),id:e[0],name:e[1].name,value:e[6],step:e[9],pattern:e[5],placeholder:e[10],disabled:e[4]}}),n.$on("change",e[11]),{c(){t=I("div"),ce(n.$$.fragment),j(t,"max-width","10em")},m(e,s){k(e,t,s),de(n,t,null),o=!0},p(e,[t]){const o={};12&t&&(o.inputClass="txt-right"+(e[2]?"":" "+e[3])),1&t&&(o.id=e[0]),2&t&&(o.name=e[1].name),64&t&&(o.value=e[6]),32&t&&(o.pattern=e[5]),16&t&&(o.disabled=e[4]),n.$set(o)},i(e){o||(oe(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&w(t),ue(n)}}}function it(e,t,n){let o;const r=T(),{TextField:l}=a;let{id:i}=t,{item:c}=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:g={}}=c;let{min:h,max:v,step:b,pattern:y,decimals:k=0,unit:w="",placeholder:x,hint:I}=g;y||(y=k?`[0-9]+([${$}][0-9]{1,${k}})?`:"[0-9]*");return e.$$set=e=>{"id"in e&&n(0,i=e.id),"item"in e&&n(1,c=e.item),"value"in e&&n(12,d=e.value),"noForm"in e&&n(2,u=e.noForm),"classId"in e&&n(3,m=e.classId),"disabled"in e&&n(4,f=e.disabled)},e.$$.update=()=>{4096&e.$$.dirty&&n(6,o=Number(d.toString().replace($,".")).toFixed(k).toString().replace(".",$))},[i,c,u,m,f,y,o,l,p,b,x,({detail:e})=>r("blur",{value:e.value}),d]}class at extends pe{constructor(e){super(),fe(this,e,it,lt,h,{id:0,item:1,value:12,noForm:2,classId:3,disabled:4})}}function ct(e,t,n){const o=e.slice();return o[8]=t[n],o}function dt(e){let t,n,o,s=e[8]+"";return{c(){t=I("option"),n=F(s),t.__value=e[8],t.value=t.__value,t.selected=o=e[2]===e[8]},m(e,o){k(e,t,o),y(t,n)},p(e,n){4&n&&o!==(o=e[2]===e[8])&&(t.selected=o)},d(e){e&&w(t)}}}function ut(e){let t,n,o,s,r,l,i=e[5],a=[];for(let t=0;t<i.length;t+=1)a[t]=dt(ct(e,i,t));return{c(){t=I("select"),n=I("option");for(let e=0;e<a.length;e+=1)a[e].c();n.__value="",n.value=n.__value,C(t,"class",o=b(e[3]||e[4])+" svelte-x3xy2g"),C(t,"id",e[0]),C(t,"name",s=e[1].name)},m(o,s){k(o,t,s),y(t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null);r||(l=E(t,"change",e[6]),r=!0)},p(e,[n]){if(36&n){let o;for(i=e[5],o=0;o<i.length;o+=1){const s=ct(e,i,o);a[o]?a[o].p(s,n):(a[o]=dt(s),a[o].c(),a[o].m(t,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=i.length}24&n&&o!==(o=b(e[3]||e[4])+" svelte-x3xy2g")&&C(t,"class",o),1&n&&C(t,"id",e[0]),2&n&&s!==(s=e[1].name)&&C(t,"name",s)},i:m,o:m,d(e){e&&w(t),x(a,e),r=!1,l()}}}function mt(e,t,n){const o=T();let{id:s}=t,{item:r}=t,{value:l}=t,{noForm:i=!1}=t,{classId:a}=t;const{enum:c}=r.properties;return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(1,r=e.item),"value"in e&&n(2,l=e.value),"noForm"in e&&n(3,i=e.noForm),"classId"in e&&n(4,a=e.classId)},[s,r,l,i,a,c,e=>o("blur",{value:e.srcElement.value})]}class ft extends pe{constructor(e){var t;super(),document.getElementById("svelte-x3xy2g-style")||((t=I("style")).id="svelte-x3xy2g-style",t.textContent="select.svelte-x3xy2g{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-x3xy2g:focus{border:none;border-bottom:2px solid #4300b0}",y(document.head,t)),fe(this,e,mt,ut,h,{id:0,item:1,value:2,noForm:3,classId:4})}}const pt=/\d+/g,$t=/%[HMSpPdmyY%]/g;function gt(e){let t;return{c(){t=F("Stunden")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function ht(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[gt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function vt(e){let t;return{c(){t=F("Minuten")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function bt(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[vt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function yt(e){let t;return{c(){t=F("Jetzt")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function kt(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[yt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function wt(e){let t,n,o,s,r,l,i,a,c;return s=new e[5]({props:{value:e[0],closeOnSelection:!0}}),s.$on("change",e[8]),l=new e[6]({props:{value:e[0],$$slots:{"now-label":[kt],"minutes-label":[bt],"hours-label":[ht]},$$scope:{ctx:e}}}),l.$on("change",e[7]),{c(){t=I("input"),o=q(),ce(s.$$.fragment),r=q(),ce(l.$$.fragment),C(t,"type","string"),C(t,"class",n=e[2]||e[3]),C(t,"id",e[1]),C(t,"name",e[1]),t.hidden=!0},m(n,d){k(n,t,d),N(t,e[0]),k(n,o,d),de(s,n,d),k(n,r,d),de(l,n,d),i=!0,a||(c=E(t,"input",e[9]),a=!0)},p(e,[o]){(!i||12&o&&n!==(n=e[2]||e[3]))&&C(t,"class",n),(!i||2&o)&&C(t,"id",e[1]),(!i||2&o)&&C(t,"name",e[1]),1&o&&N(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}),l.$set(a)},i(e){i||(oe(s.$$.fragment,e),oe(l.$$.fragment,e),i=!0)},o(e){se(s.$$.fragment,e),se(l.$$.fragment,e),i=!1},d(e){e&&w(t),e&&w(o),ue(s,e),e&&w(r),ue(l,e),a=!1,c()}}}function xt(e,t,n){const o=T(),{Label:s,DatePicker:r,TimePicker:l}=a;let{value:i}=t,{id:c}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>o("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,i=e.value),"id"in e&&n(1,c=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[i,c,d,u,s,r,l,({detail:e})=>{var t,o;n(0,(t=e.value,o=i,i=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(i)},({detail:e})=>{var t,o;n(0,(t=e.value,o=i,i=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(i)},function(){i=this.value,n(0,i)}]}class It extends pe{constructor(e){super(),fe(this,e,xt,wt,h,{value:0,id:1,noForm:2,classId:3})}}function _t(e){let t,n;return t=new e[8]({props:{inputClass:e[1]||e[2],disabled:e[4],id:e[12],name:e[11],value:e[5]()}}),t.$on("change",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),32&n&&(o.value=e[5]()),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Ft(e){let t,n;return t=new e[8]({props:{inputClass:e[1]||e[2],disabled:e[4],type:"email",id:e[12],name:e[11],value:e[5]()}}),t.$on("change",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),32&n&&(o.value=e[5]()),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function qt(e){let t,n;return t=new It({props:{classId:e[2],id:e[12],disabled:e[4],value:e[13](),noForm:e[1]}}),t.$on("change",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function St(e){let t,n;return t=new e[10]({props:{inputClass:e[1]||e[2],disabled:e[4],id:e[12],name:e[11],value:e[13](),closeOnSelection:!0}}),t.$on("change",e[14](!0)),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Et(e){let t,n;return t=new e[9]({props:{inputClass:e[1]||e[2],disabled:e[4],id:e[12],name:e[11],value:e[5]()}}),t.$on("change",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};6&n&&(o.inputClass=e[1]||e[2]),16&n&&(o.disabled=e[4]),32&n&&(o.value=e[5]()),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Ct(e){let t,n;return t=new ft({props:{classId:e[2],disabled:e[4],id:e[12],item:e[0],value:e[5](),noForm:e[1]}}),t.$on("blur",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),32&n&&(o.value=e[5]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Dt(e){let t,n;return t=new at({props:{classId:e[2],disabled:e[4],id:e[12],item:e[0],value:e[5](),noForm:e[1]}}),t.$on("blur",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),32&n&&(o.value=e[5]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Nt(e){let t,n;return t=new o({props:{classId:e[2],disabled:e[4],id:e[12],name:e[0].name,value:e[5](),noForm:e[1]}}),t.$on("blur",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),16&n&&(o.disabled=e[4]),1&n&&(o.name=e[0].name),32&n&&(o.value=e[5]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function jt(e){let t,n;return t=new rt({props:{classId:e[2],eventId:e[3],disabled:e[4],id:e[12],item:e[0],desc:e[6],value:e[5](),noForm:e[1]}}),t.$on("task",e[19]),t.$on("change",e[14]()),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),8&n&&(o.eventId=e[3]),16&n&&(o.disabled=e[4]),1&n&&(o.item=e[0]),64&n&&(o.desc=e[6]),32&n&&(o.value=e[5]()),2&n&&(o.noForm=e[1]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Ot(e){let t,n,o,s;const r=[jt,Nt,Dt,Ct,Et,St,qt,Ft,_t],l=[];function i(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:"email"===e[0].type?7:8}return t=i(e),n=l[t]=r[t](e),{c(){n.c(),o=S()},m(e,n){l[t].m(e,n),k(e,o,n),s=!0},p(e,s){let a=t;t=i(e),t===a?l[t].p(e,s):(te(),se(l[a],1,1,(()=>{l[a]=null})),ne(),n=l[t],n?n.p(e,s):(n=l[t]=r[t](e),n.c()),oe(n,1),n.m(o.parentNode,o))},i(e){s||(oe(n),s=!0)},o(e){se(n),s=!1},d(e){l[t].d(e),e&&w(o)}}}function Pt(e){let t,n;return t=new e[7]({props:{id:e[15](e[12]),name:e[0].designation,help:e[0].properties?.hint,$$slots:{default:[Ot]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(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),16777343&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Lt(e,t,n){let o,s;const r=T(),{FormField:l,TextField:i,Switch:d,DatePicker:u,TimePicker:m}=a;let{praefix:f=""}=t,{item:p}=t,{listName:$=""}=t,{record:g}=t,{noForm:h=!1}=t,{classId:v}=t,{eventId:b}=t,{disabled:y}=t;if("string"==typeof p.name){const[e,t]=p.name.split("_");t&&(p.name=t)}const k=($?$+".":"")+p.name,w=k+(""!==f?"-"+f:""),x=(e,t=k)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(17,f=e.praefix),"item"in e&&n(0,p=e.item),"listName"in e&&n(18,$=e.listName),"record"in e&&n(16,g=e.record),"noForm"in e&&n(1,h=e.noForm),"classId"in e&&n(2,v=e.classId),"eventId"in e&&n(3,b=e.eventId),"disabled"in e&&n(4,y=e.disabled)},e.$$.update=()=>{65536&e.$$.dirty&&n(5,o=(e=k)=>{let t=x(g);return void 0===t?"":t})},n(6,s=((e=k)=>{let t=g["_"+e];return t=c(t),void 0===t?"":t})()),[p,h,v,b,y,o,s,l,i,d,u,k,w,(e=k)=>{let t=x(g);return t?new Date(t):new Date},e=>({detail:t})=>{const o=t.value;n(16,g[k]=e?function(e,t){if(null==e)return null;let n=e.getHours();return/%p/i.test(t)&&(n%=12,0===n&&(n=12)),t.replace("%Y",e.getFullYear()).replace("%y",(e.getFullYear()%100).toString().padStart(2,"0")).replace("%m",(e.getMonth()+1).toString().padStart(2,"0")).replace("%d",e.getDate().toString().padStart(2,"0")).replace("%H",n.toString().padStart(2,"0")).replace("%M",e.getMinutes().toString().padStart(2,"0")).replace("%S",e.getSeconds().toString().padStart(2,"0")).replace("%p",e.getHours()<12?"am":"pm").replace("%P",e.getHours()<12?"AM":"PM").replace("%%","%")}(o,"%d.%m.%Y"):o,g);const s=Object.values(g).every((e=>!e))&&o;r("notify",{value:o,add:s,itemName:k,desc:t.description})},()=>"object"===p.type?"comment_"+w:w,g,f,$,function(t){z(e,t)}]}class Mt extends pe{constructor(e){var t;super(),document.getElementById("svelte-mv4e64-style")||((t=I("style")).id="svelte-mv4e64-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field > .description{padding-top:0.75em}.field .switch{padding-top:0.75em}",y(document.head,t)),fe(this,e,Lt,Pt,h,{praefix:17,item:0,listName:18,record:16,noForm:1,classId:2,eventId:3,disabled:4})}}function Bt(e,t,n){const o=e.slice();return o[31]=t[n],o[33]=n,o}function Tt(e,t,n){const o=e.slice();return o[40]=t[n],o}function zt(e,t,n){const o=e.slice();return o[35]=t[n].title,o[36]=t[n].toDelete,o[37]=t[n].icon,o}function At(e){let t,n,o;function s(t){e[19](t)}let r={item:e[12],disabled:!0};return void 0!==e[5]&&(r.value=e[5]),t=new at({props:r}),H.push((()=>ae(t,"value",s))),{c(){ce(t.$$.fragment)},m(e,n){de(t,e,n),o=!0},p(e,o){const s={};!n&&32&o[0]&&(n=!0,s.value=e[5],V((()=>n=!1))),t.$set(s)},i(e){o||(oe(t.$$.fragment,e),o=!0)},o(e){se(t.$$.fragment,e),o=!1},d(e){ue(t,e)}}}function Ht(e){let t,n;return t=new Mt({props:{praefix:e[33],item:e[40],eventId:e[2],record:e[31],noForm:Qt,classId:e[1],disabled:e[3]}}),t.$on("notify",(function(){g(e[14](e[40],e[33]))&&e[14](e[40],e[33]).apply(this,arguments)})),t.$on("task",e[20]),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(n,o){e=n;const s={};1&o[0]&&(s.item=e[40]),4&o[0]&&(s.eventId=e[2]),16&o[0]&&(s.record=e[31]),2&o[0]&&(s.classId=e[1]),8&o[0]&&(s.disabled=e[3]),t.$set(s)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Rt(e){let t,n,o=e[0].item,s=[];for(let t=0;t<o.length;t+=1)s[t]=Ht(Tt(e,o,t));const r=e=>se(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=q()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(16415&n[0]){let l;for(o=e[0].item,l=0;l<o.length;l+=1){const r=Tt(e,o,l);s[l]?(s[l].p(r,n),oe(s[l],1)):(s[l]=Ht(r),s[l].c(),oe(s[l],1),s[l].m(t.parentNode,t))}for(te(),l=o.length;l<s.length;l+=1)r(l);ne()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)oe(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)se(s[e]);n=!1},d(e){x(s,e),e&&w(t)}}}function Wt(e){let t,n,o=e[13](e[6],e[33])+"";return{c(){t=I("span"),n=F(o),C(t,"class","svelte-17omp3o"),O(t,"delete",e[31]._delete)},m(e,o){k(e,t,o),y(t,n)},p(e,s){64&s[0]&&o!==(o=e[13](e[6],e[33])+"")&&D(n,o),16&s[0]&&O(t,"delete",e[31]._delete)},d(e){e&&w(t)}}}function Yt(e){let t,n,o;var s=e[37];return s&&(t=new s({props:{size:"20"}})),{c(){t&&ce(t.$$.fragment),n=S()},m(e,s){t&&de(t,e,s),k(e,n,s),o=!0},p(e,o){if(s!==(s=e[37])){if(t){te();const e=t;se(e.$$.fragment,1,0,(()=>{ue(e,1)})),ne()}s?(t=new s({props:{size:"20"}}),ce(t.$$.fragment),oe(t.$$.fragment,1),de(t,n.parentNode,n)):t=null}},i(e){o||(t&&oe(t.$$.fragment,e),o=!0)},o(e){t&&se(t.$$.fragment,e),o=!1},d(e){e&&w(n),t&&ue(t,e)}}}function Gt(e){let t,n,o,s,r,l=!e[3]&&Yt(e);return{c(){t=I("span"),l&&l.c(),C(t,"class","pointer icon svelte-17omp3o"),C(t,"title",e[35]),t.hidden=n=e[33]===e[4].length-1||!(e[31]._delete^e[36])},m(n,i){k(n,t,i),l&&l.m(t,null),o=!0,s||(r=E(t,"click",e[15](e[33])),s=!0)},p(s,r){(e=s)[3]?l&&(te(),se(l,1,1,(()=>{l=null})),ne()):l?(l.p(e,r),8&r[0]&&oe(l,1)):(l=Yt(e),l.c(),oe(l,1),l.m(t,null)),(!o||16&r[0]&&n!==(n=e[33]===e[4].length-1||!(e[31]._delete^e[36])))&&(t.hidden=n)},i(e){o||(oe(l),o=!0)},o(e){se(l),o=!1},d(e){e&&w(t),l&&l.d(),s=!1,r()}}}function Jt(e){let t,n,o,s,r;n=new e[8]({props:{$$slots:{default:[Wt]},$$scope:{ctx:e}}}),n.$on("click",(function(){g(e[34])&&e[34].apply(this,arguments)}));let l=[{title:"löschen",toDelete:!0,icon:ye},{title:"undo",toDelete:!1,icon:he}],i=[];for(let t=0;t<2;t+=1)i[t]=Gt(zt(e,l,t));const a=e=>se(i[e],1,1,(()=>{i[e]=null}));return{c(){t=I("div"),ce(n.$$.fragment),o=q();for(let e=0;e<2;e+=1)i[e].c();s=q(),C(t,"class","accordion svelte-17omp3o"),C(t,"slot","handle")},m(e,l){k(e,t,l),de(n,t,null),y(t,o);for(let e=0;e<2;e+=1)i[e].m(t,null);y(t,s),r=!0},p(o,r){e=o;const c={};if(80&r[0]|4096&r[1]&&(c.$$scope={dirty:r,ctx:e}),n.$set(c),32792&r[0]){let n;for(l=[{title:"löschen",toDelete:!0,icon:ye},{title:"undo",toDelete:!1,icon:he}],n=0;n<2;n+=1){const o=zt(e,l,n);i[n]?(i[n].p(o,r),oe(i[n],1)):(i[n]=Gt(o),i[n].c(),oe(i[n],1),i[n].m(t,s))}for(te(),n=2;n<2;n+=1)a(n);ne()}},i(e){if(!r){oe(n.$$.fragment,e);for(let e=0;e<2;e+=1)oe(i[e]);r=!0}},o(e){se(n.$$.fragment,e),i=i.filter(Boolean);for(let e=0;e<2;e+=1)se(i[e]);r=!1},d(e){e&&w(t),ue(n),x(i,e)}}}function Vt(e){let t,n;return t=new e[10]({props:{$$slots:{handle:[Jt,({toggle:e})=>({34:e}),({toggle:e})=>[0,e?8:0]],default:[Rt,({toggle:e})=>({34:e}),({toggle:e})=>[0,e?8:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){g(e[30])&&e[30].apply(this,arguments)})),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(n,o){e=n;const s={};95&o[0]|4104&o[1]&&(s.$$scope={dirty:o,ctx:e}),t.$set(s)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Ut(e){let t,n,o=e[4],s=[];for(let t=0;t<o.length;t+=1)s[t]=Vt(Bt(e,o,t));const r=e=>se(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=S()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(1073799263&n[0]|8&n[1]){let l;for(o=e[4],l=0;l<o.length;l+=1){const r=Bt(e,o,l);s[l]?(s[l].p(r,n),oe(s[l],1)):(s[l]=Vt(r),s[l].c(),oe(s[l],1),s[l].m(t.parentNode,t))}for(te(),l=o.length;l<s.length;l+=1)r(l);ne()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)oe(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)se(s[e]);n=!1},d(e){x(s,e),e&&w(t)}}}function Kt(e){let t,n,o,s,r=e[11]&&function(e){let t,n;return t=new e[7]({props:{name:"Betrag",nameClass:"formField_italic",$$slots:{default:[At]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};32&n[0]|4096&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}(e);return o=new e[9]({props:{$$slots:{default:[Ut,({closeOtherPanels:e})=>({30:e}),({closeOtherPanels:e})=>[e?1073741824:0]]},$$scope:{ctx:e}}}),{c(){t=I("div"),r&&r.c(),n=q(),ce(o.$$.fragment),C(t,"class","formList")},m(e,l){k(e,t,l),r&&r.m(t,null),y(t,n),de(o,t,null),s=!0},p(e,t){e[11]&&r.p(e,t);const n={};1073741919&t[0]|4096&t[1]&&(n.$$scope={dirty:t,ctx:e}),o.$set(n)},i(e){s||(oe(r),oe(o.$$.fragment,e),s=!0)},o(e){se(r),se(o.$$.fragment,e),s=!1},d(e){e&&w(t),r&&r.d(),ue(o)}}}const Qt=!0;function Xt(e,n,o){let s,r;const{FormField:l,TextField:i,Button:u,Accordion:m,AccordionSection:f}=a,p=T();let{list:$}=n,{schema:g}=n,{record:h}=n,{classId:v}=n,{eventId:b}=n,{disabled:y}=n;const k=g.find((e=>"price"===e.name)),w=k&&g.find((e=>"quantity"===e.name));let x=0;const I={};let _,F;const q=()=>{k&&o(5,x=_?.reduce(((e,t)=>{if(t.price){e+=(w?t.quantity??0:1)*(t.price??0)}return e}),0)||0)};F=g.filter((e=>"object"===e.type&&e.refClass)).reduce((async(e,n)=>{const o={};e=(await e).concat(o);const s=await t.getSchemaByClass(n.refClass);o.eventId=s.id,o.refClass=n.refClass,o.items=[];const r=s.items;return g.map((e=>{r.find((t=>t.name===e.name&&t.type===e.type))&&(o.items=o.items.concat(e.name))})),e}),[]);const S=async(e,t,n)=>{const s=(await F).find((e=>e.refClass===t.refClass));if(!s)return;const{refClass:r,eventId:l,items:i}=s;return n?Promise.all(i.map((t=>{if(E(e,t)){const n=g.find((e=>e.refClass=r)),s=_[e][n.name];return Promise.resolve(Dn(n.refClass,s)).then((n=>o(4,_[e][t]=n[t],_)))}}))):Promise.resolve(i.map((t=>{o(4,_[e][t]="",_)})))},E=(e,t)=>{let n=_[e][t];return"number"===g.find((e=>e.name===t)).type&&(n=Number(n||0)),!n};return e.$$set=e=>{"list"in e&&o(0,$=e.list),"schema"in e&&o(16,g=e.schema),"record"in e&&o(17,h=e.record),"classId"in e&&o(1,v=e.classId),"eventId"in e&&o(2,b=e.eventId),"disabled"in e&&o(3,y=e.disabled)},e.$$.update=()=>{131073&e.$$.dirty[0]&&h&&o(4,_=(h[$.name]||[]).concat({})),16&e.$$.dirty[0]&&o(6,s=_),262144&e.$$.dirty[0]&&(r=e=>I[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[$,v,b,y,_,x,s,l,u,m,f,k,{name:"amountValue",properties:{decimals:2}},(e,t)=>{const n=e[t];return g.filter((e=>void 0!==n[e.name]&&"boolean"!==e.type)).map((e=>"object"===e.type?r(n[e.name]):"date"===e.type?c(n[e.name]):"datetime"===e.type?d(n[e.name]):n[e.name])).filter((e=>""!==e)).join(" • ")||"+"},(e,t)=>({detail:n})=>{const{value:r,add:l,desc:i}=n;r&&_.length===t+1&&o(4,_=_.concat({})),o(6,s=_),i&&o(18,I[r]=i,I),p("save",{listName:$.name,value:_}),S(t,e,r).then(q)},e=>()=>{o(4,_[e]._delete=!_[e]._delete,_)},g,h,I,function(e){x=e,o(5,x)},function(t){z(e,t)}]}class Zt extends pe{constructor(e){var t;super(),document.getElementById("svelte-17omp3o-style")||((t=I("style")).id="svelte-17omp3o-style",t.textContent=".accordion.svelte-17omp3o{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-17omp3o{padding-top:1em}span.delete.svelte-17omp3o{text-decoration:line-through}.icon.svelte-17omp3o{margin-right:-0.75em}.formList .formField_italic{font-style:italic}",y(document.head,t)),fe(this,e,Xt,Kt,h,{list:0,schema:16,record:17,classId:1,eventId:2,disabled:3},[-1,-1])}}function en(e,t,n){const o=e.slice();return o[16]=t[n],o}function tn(e){let t,n;return t=new Mt({props:{classId:e[2],item:e[16],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4]}}),t.$on("notify",e[10]),t.$on("task",e[12]),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[16]),2&n&&(o.listName=e[1].name),8&n&&(o.eventId=e[3]),1&n&&(o.record=e[0]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function nn(e){let t,n,o=e[1].item,s=[];for(let t=0;t<o.length;t+=1)s[t]=tn(en(e,o,t));const r=e=>se(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=S()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(1055&n){let l;for(o=e[1].item,l=0;l<o.length;l+=1){const r=en(e,o,l);s[l]?(s[l].p(r,n),oe(s[l],1)):(s[l]=tn(r),s[l].c(),oe(s[l],1),s[l].m(t.parentNode,t))}for(te(),l=o.length;l<s.length;l+=1)r(l);ne()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)oe(s[e]);n=!0}},o(e){s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)se(s[e]);n=!1},d(e){x(s,e),e&&w(t)}}}function on(e){let t,n,o=e[9](e[5])+"";return{c(){t=I("span"),n=F(o)},m(e,o){k(e,t,o),y(t,n)},p(e,t){32&t&&o!==(o=e[9](e[5])+"")&&D(n,o)},d(e){e&&w(t)}}}function sn(e){let t,n,o;return n=new e[6]({props:{$$slots:{default:[on]},$$scope:{ctx:e}}}),n.$on("click",(function(){g(e[15])&&e[15].apply(this,arguments)})),{c(){t=I("div"),ce(n.$$.fragment),C(t,"class","accordion svelte-148ktt9"),C(t,"slot","handle")},m(e,s){k(e,t,s),de(n,t,null),o=!0},p(t,o){e=t;const s={};524320&o&&(s.$$scope={dirty:o,ctx:e}),n.$set(s)},i(e){o||(oe(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&w(t),ue(n)}}}function rn(e){let t,n;return t=new e[8]({props:{$$slots:{handle:[sn,({toggle:e})=>({15:e}),({toggle:e})=>e?32768:0],default:[nn,({toggle:e})=>({15:e}),({toggle:e})=>e?32768:0]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};557119&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function ln(e){let t,n,o;return n=new e[7]({props:{$$slots:{default:[rn]},$$scope:{ctx:e}}}),{c(){t=I("div"),ce(n.$$.fragment),C(t,"class","formList")},m(e,s){k(e,t,s),de(n,t,null),o=!0},p(e,[t]){const o={};524351&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(oe(n.$$.fragment,e),o=!0)},o(e){se(n.$$.fragment,e),o=!1},d(e){e&&w(t),ue(n)}}}function an(e,t,n){const{Button:o,Accordion:s,AccordionSection:r}=a;let{list:l}=t,{schema:i}=t,{record:u}=t,{classId:m}=t,{eventId:f}=t,{disabled:p}=t;const $={};let g=u[l.name]||{};u[l.name]=g;const h=e=>$[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,l=e.list),"schema"in e&&n(11,i=e.schema),"record"in e&&n(0,u=e.record),"classId"in e&&n(2,m=e.classId),"eventId"in e&&n(3,f=e.eventId),"disabled"in e&&n(4,p=e.disabled)},[u,l,m,f,p,g,o,s,r,e=>i.filter((t=>void 0!==e[t.name]&&"boolean"!==t.type)).map((t=>"object"===t.type?h(t.name):"date"===t.type?c(e[t.name]):"datetime"===t.type?d(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&($[o]=e.desc);const s=u[t];n(0,u[t]={...s,[o]:e.value},u),n(5,g=u[t])},i,function(t){z(e,t)}]}class cn extends pe{constructor(e){var t;super(),document.getElementById("svelte-148ktt9-style")||((t=I("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}}",y(document.head,t)),fe(this,e,an,ln,h,{list:1,schema:11,record:0,classId:2,eventId:3,disabled:4})}}const{Boolean:dn,document:un}=ie;function mn(e,t,n){const o=e.slice();return o[36]=t[n],o}function fn(e,t,n){const o=e.slice();return o[39]=t[n],o}function pn(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function $n(e){let t,n,o=e[35]&&function(e){let t,n,o,s,r,l,i,a,c,d,u,m,f,p,$,g,h,v,_=e[0].items,S=[];for(let t=0;t<_.length;t+=1)S[t]=hn(fn(e,_,t));const N=e=>se(S[e],1,1,(()=>{S[e]=null}));let j=e[0].list&&vn(e);return f=new e[6]({props:{outline:!0,$$slots:{default:[wn]},$$scope:{ctx:e}}}),f.$on("click",e[12]),$=new e[6]({props:{disabled:e[3],form:e[7],filled:!0,type:"submit",$$slots:{default:[xn]},$$scope:{ctx:e}}}),{c(){t=I("section"),n=I("form"),o=I("input"),r=q();for(let e=0;e<S.length;e+=1)S[e].c();l=q(),j&&j.c(),i=q(),a=I("div"),c=I("small"),d=F(e[2]),u=q(),m=I("div"),ce(f.$$.fragment),p=q(),ce($.$$.fragment),C(o,"class",b(e[7])+" svelte-1asqkqt"),C(o,"name","_id"),C(o,"type","hidden"),o.value=s=e[1]._id||"",C(n,"class",b(e[8])+" svelte-1asqkqt"),C(n,"id",e[7]),C(a,"class","comment svelte-1asqkqt"),C(m,"class","form--buttons svelte-1asqkqt"),C(t,"class",b(e[9])+" svelte-1asqkqt")},m(s,b){k(s,t,b),y(t,n),y(n,o),y(n,r);for(let e=0;e<S.length;e+=1)S[e].m(n,null);var w;y(n,l),j&&j.m(n,null),y(t,i),y(t,a),y(a,c),y(c,d),y(t,u),y(t,m),de(f,m,null),y(m,p),de($,m,null),g=!0,h||(v=E(n,"submit",(w=e[11],function(e){return e.preventDefault(),w.call(this,e)})),h=!0)},p(e,t){if((!g||2&t[0]&&s!==(s=e[1]._id||""))&&(o.value=s),8331&t[0]){let o;for(_=e[0].items,o=0;o<_.length;o+=1){const s=fn(e,_,o);S[o]?(S[o].p(s,t),oe(S[o],1)):(S[o]=hn(s),S[o].c(),oe(S[o],1),S[o].m(n,l))}for(te(),o=_.length;o<S.length;o+=1)N(o);ne()}e[0].list?j?(j.p(e,t),1&t[0]&&oe(j,1)):(j=vn(e),j.c(),oe(j,1),j.m(n,null)):j&&(te(),se(j,1,1,(()=>{j=null})),ne()),(!g||4&t[0])&&D(d,e[2]);const r={};2048&t[1]&&(r.$$scope={dirty:t,ctx:e}),f.$set(r);const i={};8&t[0]&&(i.disabled=e[3]),2048&t[1]&&(i.$$scope={dirty:t,ctx:e}),$.$set(i)},i(e){if(!g){for(let e=0;e<_.length;e+=1)oe(S[e]);oe(j),oe(f.$$.fragment,e),oe($.$$.fragment,e),g=!0}},o(e){S=S.filter(dn);for(let e=0;e<S.length;e+=1)se(S[e]);se(j),se(f.$$.fragment,e),se($.$$.fragment,e),g=!1},d(e){e&&w(t),x(S,e),j&&j.d(),ue(f),ue($),h=!1,v()}}}(e);return{c(){o&&o.c(),t=S()},m(e,s){o&&o.m(e,s),k(e,t,s),n=!0},p(e,t){e[35]&&o.p(e,t)},i(e){n||(oe(o),n=!0)},o(e){se(o),n=!1},d(e){o&&o.d(e),e&&w(t)}}}function gn(e){let t,n;return t=new Mt({props:{classId:e[7],item:e[39],record:e[1],disabled:e[3],eventId:e[0].id}}),t.$on("task",e[13]),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[39]),2&n[0]&&(o.record=e[1]),8&n[0]&&(o.disabled=e[3]),1&n[0]&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function hn(e){let t,n,o="list"!==e[39].type&&gn(e);return{c(){o&&o.c(),t=S()},m(e,s){o&&o.m(e,s),k(e,t,s),n=!0},p(e,n){"list"!==e[39].type?o?(o.p(e,n),1&n[0]&&oe(o,1)):(o=gn(e),o.c(),oe(o,1),o.m(t.parentNode,t)):o&&(te(),se(o,1,1,(()=>{o=null})),ne())},i(e){n||(oe(o),n=!0)},o(e){se(o),n=!1},d(e){o&&o.d(e),e&&w(t)}}}function vn(e){let t,n,o=e[0].list,s=[];for(let t=0;t<o.length;t+=1)s[t]=kn(mn(e,o,t));const r=e=>se(s[e],1,1,(()=>{s[e]=null}));return{c(){for(let e=0;e<s.length;e+=1)s[e].c();t=S()},m(e,o){for(let t=0;t<s.length;t+=1)s[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(16523&n[0]){let l;for(o=e[0].list,l=0;l<o.length;l+=1){const r=mn(e,o,l);s[l]?(s[l].p(r,n),oe(s[l],1)):(s[l]=kn(r),s[l].c(),oe(s[l],1),s[l].m(t.parentNode,t))}for(te(),l=o.length;l<s.length;l+=1)r(l);ne()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)oe(s[e]);n=!0}},o(e){s=s.filter(dn);for(let e=0;e<s.length;e+=1)se(s[e]);n=!1},d(e){x(s,e),e&&w(t)}}}function bn(e){let t,n;return t=new cn({props:{classId:e[7],list:e[36],eventId:e[0].id,schema:e[36].item,record:e[1],disabled:e[3]}}),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[36]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[36].item),2&n[0]&&(o.record=e[1]),8&n[0]&&(o.disabled=e[3]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function yn(e){let t,n;return t=new Zt({props:{classId:e[7],list:e[36],eventId:e[0].id,schema:e[36].item,record:e[1],disabled:e[3]}}),t.$on("save",e[14]),{c(){ce(t.$$.fragment)},m(e,o){de(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[36]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[36].item),2&n[0]&&(o.record=e[1]),8&n[0]&&(o.disabled=e[3]),t.$set(o)},i(e){n||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function kn(e){let t,n,o,s,r,l;t=new e[5]({props:{text:e[36].designation}});const i=[yn,bn],a=[];function c(e,t){return"array"===e[36].type?0:1}return o=c(e),s=a[o]=i[o](e),{c(){ce(t.$$.fragment),n=q(),s.c(),r=S()},m(e,s){de(t,e,s),k(e,n,s),a[o].m(e,s),k(e,r,s),l=!0},p(e,n){const l={};1&n[0]&&(l.text=e[36].designation),t.$set(l);let d=o;o=c(e),o===d?a[o].p(e,n):(te(),se(a[d],1,1,(()=>{a[d]=null})),ne(),s=a[o],s?s.p(e,n):(s=a[o]=i[o](e),s.c()),oe(s,1),s.m(r.parentNode,r))},i(e){l||(oe(t.$$.fragment,e),oe(s),l=!0)},o(e){se(t.$$.fragment,e),se(s),l=!1},d(e){ue(t,e),e&&w(n),a[o].d(e),e&&w(r)}}}function wn(e){let t;return{c(){t=F("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function xn(e){let t;return{c(){t=F("Speichern")},m(e,n){k(e,t,n)},d(e){e&&w(t)}}}function In(e){return{c:m,m:m,p:m,i:m,o:m,d:m}}function _n(e){let t,n,o,s;un.title=t=e[4];let r={ctx:e,current:null,token:null,hasCatch:!1,pending:In,then:$n,catch:pn,value:35,blocks:[,,,]};return re(e[10](),r),{c(){n=q(),o=S(),r.block.c()},m(e,t){k(e,n,t),k(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||16&o[0])&&t!==(t=e[4])&&(un.title=t),le(r,e,o)},i(e){s||(oe(r.block),s=!0)},o(e){for(let e=0;e<3;e+=1){se(r.blocks[e])}s=!1},d(e){e&&w(n),e&&w(o),r.block.d(e),r.token=null,r=null}}}let Fn=new Map,qn=new Map,Sn=new Map;const En=(e,n)=>{const o=n;return Fn.has(o)||Fn.set(o,t.getTasksList(n).then((({data:e})=>e))),Fn.get(o)},Cn=(e,n,o)=>qn.get(o)||En(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(qn.set(o,e),e))),Dn=(e,n)=>Sn.get(n)||t.getTask(e,n).then((e=>(Sn.set(n,e),e))),Nn=(e,n)=>{if(!Fn.get(n))return;const o=n;Fn.set(o,t.getTasksList(n).then((({data:e})=>e)))},jn=()=>{Fn=new Map,qn=new Map,Sn=new Map};function On(e,o,i){let c,d,m,f;v(e,r,(e=>i(25,m=e))),v(e,l,(e=>i(26,f=e)));const{Divider:p,Button:$}=a,g=JSON.parse(s.getItem("Locale")),h=T();let b,y,{schema:k}=o,{recID:w}=o,{prevEventID:x=!1}=o,{prev:I=!1}=o,{taskId:_=!1}=o,{description:F=""}=o,{root:q=!1}=o,{readonly:S}=o,E={},C={},D="form-"+k.class+Math.floor(9e3*Math.random()+1e3).toString();const N=q?"fEmbedded":"fTask",j=q?"sEmbedded":"sTask";let O="";const P=(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($t);let l=0,i=0;const a=new Date(0);for(const c of r){if(!e.startsWith(c,l))return n;if(l+=c.length,l===e.length){if(i!==t.length)return n;break}if("%"!==t[i+c.length])break;if(i+=c.length+1,"%"===t[i]){if("%"!==e[l])return n;l++}else if("p"===t[i].toLowerCase()){const t=e.substr(l,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{pt.lastIndex=l;const r=pt.exec(e);if(null==r)return n;switch(t[i]){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])}l+=r[0].length}i++}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(g.id).substring(1,2);try{s=Number(s.replace(e,".")).toString()}catch{}}return s},L=()=>q?window.singleSpaNavigate("/"):h("back");return n.subscribe((async e=>{if(!e)return;if(!Fn.get(e.eventId))return;const n=await t.getTaskList(k.class,e.taskId);((e,t,n)=>{if(!Fn.get(e))return;const o=t;qn.set(o,n)})(e.eventId,e.taskId,n)})),B(jn),e.$$set=e=>{"schema"in e&&i(0,k=e.schema),"recID"in e&&i(19,w=e.recID),"prevEventID"in e&&i(17,x=e.prevEventID),"prev"in e&&i(20,I=e.prev),"taskId"in e&&i(18,_=e.taskId),"description"in e&&i(15,F=e.description),"root"in e&&i(21,q=e.root),"readonly"in e&&i(16,S=e.readonly)},e.$$.update=()=>{65536&e.$$.dirty[0]&&i(3,c=S),12582913&e.$$.dirty[0]&&y&&b&&k.items.map((({name:e,type:t})=>{const n=b.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;y[e]&&i(1,E[e]=y[e],E),y[o]&&i(1,E[o]=y[o],E)})),2129920&e.$$.dirty[0]&&i(4,d=q?F||"enablerr - Form":document.title)},[k,E,O,c,d,p,$,D,N,j,async()=>{if(w&&(i(1,E=await t.getTask(k.class,w)),i(15,F=u(k,E))),x){i(16,S=!1),i(22,b=await t.getSchema(x)),"string"==typeof I&&i(23,y=await t.getTask(b.class,I));const e=k.items.find((e=>e.refClass===b.class));i(1,E[e.name]=y._id,E)}if(m.role?.length&&k.authorization?.length){const e=k.authorization.some((e=>f?.find((t=>t===e.role&&"edit"===e.activity))));i(16,S=!e)}return!0},async()=>{const e={};Array.from(document.querySelectorAll("form#"+D+" ."+D)).map((t=>{if(t.name)if(t.name.includes(".")){const[n,o]=t.name.split("."),s=k.list.find((e=>e.name===n));e[t.name]=P(s.item,t)}else e[t.name]=P(k.items,t)})),k.list&&k.list.map((t=>{"array"===t.type&&C[t.name]&&(e[t.name]=C[t.name].reduce(((e,n)=>n._delete||!Object.values(n).some(Boolean)?e:e.concat(Object.entries(n).reduce(((e,[n,o])=>("_delete"!==n&&(e[n]=P(t.item,{name:n,value:o,checked:o})),e)),{}))),[]))})),e._event=k.id,e._prevEventId=x,e._taskId=_,i(2,O="Die Daten werden gespeichert.");const{id:n,task:o}=await t.saveData(k.class,e);e._id=n;const s=await t.getTaskList(k.class,n);h("choose",{row:s}),q&&!w?window.singleSpaNavigate(`/task/${k.id}/${o}/task`):L()},()=>x?window.history.back():L(),async({detail:{row:e}})=>{if(w)return;const n=e._task.event,o=await t.getEvent(n);(await t.getEvent(k.id)).input?.class[0]?.name===o.output.class[0]?.name&&(i(22,b=await t.getSchema(n)),i(17,x=n),i(18,_=e._task._id),i(23,y=!!_&&await t.getTask(b.class,e._task.docId)))},({detail:e})=>{C[e.listName]=e.value},F,S,x,_,w,I,q,b,y]}class Pn extends pe{constructor(e){var t;super(),un.getElementById("svelte-1asqkqt-style")||((t=I("style")).id="svelte-1asqkqt-style",t.textContent="form.disabled.svelte-1asqkqt input.svelte-1asqkqt{background-color:red !important}.comment.svelte-1asqkqt.svelte-1asqkqt{color:green;margin-bottom:1em}form.svelte-1asqkqt.svelte-1asqkqt{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1asqkqt.svelte-1asqkqt{min-width:30em}}.fEmbedded.svelte-1asqkqt.svelte-1asqkqt,.fTask.svelte-1asqkqt.svelte-1asqkqt{overflow-y:auto;overflow-x:hidden}.fEmbedded.svelte-1asqkqt.svelte-1asqkqt{height:fit-content;min-height:47vh;max-height:63vh}.fTask.svelte-1asqkqt.svelte-1asqkqt{height:fit-content;max-height:70vh}.sTask.svelte-1asqkqt.svelte-1asqkqt{height:95%;display:inline-grid}.sTask.svelte-1asqkqt .btn.svelte-1asqkqt{display:initial !important}.form--buttons.svelte-1asqkqt.svelte-1asqkqt{display:flex;gap:1em;padding-bottom:0.5em}",y(un.head,t)),fe(this,e,On,_n,h,{schema:0,recID:19,prevEventID:17,prev:20,taskId:18,description:15,root:21,readonly:16},[-1,-1])}}function Ln(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 Pn({props:r}),H.push((()=>ae(t,"description",s))),t.$on("back",e[2]),{c(){ce(t.$$.fragment)},m(e,n){de(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],V((()=>n=!1))),t.$set(s)},i(e){o||(oe(t.$$.fragment,e),o=!0)},o(e){se(t.$$.fragment,e),o=!1},d(e){ue(t,e)}}}function Mn(e){let t,n;return t=new i({props:{update:e[1],description:e[0],$$slots:{default:[Ln,({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(){ce(t.$$.fragment)},m(e,o){de(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||(oe(t.$$.fragment,e),n=!0)},o(e){se(t.$$.fragment,e),n=!1},d(e){ue(t,e)}}}function Bn(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 Tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zn,An,Hn=(zn=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({},l),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:i.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var l={component:null,domElementGetter:null,props:{}};function i(e){return Promise.resolve()}function a(e,t,n){var s=Object.keys(l),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),l=s();t.instance=new e.component(o(o({},r),{},{target:l,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)}))}},zn(An={exports:{}},An.exports),An.exports);const Rn=Tn(Hn)({component:class extends pe{constructor(e){super(),fe(this,e,Bn,Mn,h,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Wn,mount:Yn,unmount:Gn}=Rn;e({bootstrap:Wn,mount:Yn,unmount:Gn});e("Form",Pn),e("List",Be)}}}));
|