@enablerr-ui/detail 0.2.309 → 0.2.310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@enablerr-ui/form","@enablerr-ui/layout"],(function(e){"use strict";var t,n,o,r,i,s,l,a,c;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.Storage,r=e.TextArea,i=e.toasts,s=e.settings,l=e.currentRoles,a=e.Page},function(e){c=e.getAttractions}],execute:function(){e("version","0.2.309");const d=e("checkDate",((e,t)=>"string"!=typeof e||e.length<20||!(t=e.split(" · "))?e:t.map((e=>2===e.split("T").length&&3===e.split("T")[0].split("-").length?new Date(e).toLocaleDateString():e)).filter((e=>!!e)).join(" · "))),u=e=>{try{return new Date(e).toLocaleString()}catch{return e}},m=e=>e?"(ja)":"(nein)",f=(e,t)=>{const n={...t};return(e.display?.reduce(((t,o)=>{let[r,i]=o.split(".");if(e.list?.find((({name:e})=>e===r))&&i&&void 0!==n[r]){const e=`${r}_${i}`;n[e]=n[r][i],r=e}return t.find((e=>e===r))||t.push(r),t}),[]).map((e=>d(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":"boolean"===e.type?m(t[e.name]):t[e.name]))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function p(){}function $(e){return e()}function g(){return Object.create(null)}function h(e){e.forEach($)}function v(e){return"function"==typeof e}function b(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function w(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return p;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function y(e){return null==e?"":e}function x(e,t){e.appendChild(t)}function k(e,t,n){e.insertBefore(t,n||null)}function I(e){e.parentNode.removeChild(e)}function F(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function _(e){return document.createElement(e)}function N(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function C(e){return document.createTextNode(e)}function j(){return C(" ")}function S(){return C("")}function L(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function E(e){return function(t){return t.preventDefault(),e.call(this,t)}}function q(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function D(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function z(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function O(e,t){e.value=null==t?"":t}function T(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function B(e,t,n){e.classList[n?"add":"remove"](t)}let M;function P(e){M=e}function V(){if(!M)throw new Error("Function called outside component initialization");return M}function W(e){V().$$.on_mount.push(e)}function A(){const e=V();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const r=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);o.slice().forEach((t=>{t.call(e,r)}))}}}function R(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const H=[],Y=[],G=[],J=[],U=Promise.resolve();let Q=!1;function K(){Q||(Q=!0,U.then(oe))}function X(){return K(),U}function Z(e){G.push(e)}function ee(e){J.push(e)}let te=!1;const ne=new Set;function oe(){if(!te){te=!0;do{for(let e=0;e<H.length;e+=1){const t=H[e];P(t),re(t.$$)}for(P(null),H.length=0;Y.length;)Y.pop()();for(let e=0;e<G.length;e+=1){const t=G[e];ne.has(t)||(ne.add(t),t())}G.length=0}while(H.length);for(;J.length;)J.pop()();Q=!1,te=!1,ne.clear()}}function re(e){if(null!==e.fragment){e.update(),h(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Z)}}const ie=new Set;let se;function le(){se={r:0,c:[],p:se}}function ae(){se.r||h(se.c),se=se.p}function ce(e,t){e&&e.i&&(ie.delete(e),e.i(t))}function de(e,t,n,o){if(e&&e.o){if(ie.has(e))return;ie.add(e),se&&se.c.push((()=>{ie.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function ue(e,t){const n=t.token={};function o(e,o,r,i){if(t.token!==n)return;t.resolved=i;let s=t.ctx;void 0!==r&&(s=s.slice(),s[r]=i);const l=e&&(t.current=e)(s);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(le(),de(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ae())})):t.block.d(1),l.c(),ce(l,1),l.m(t.mount(),t.anchor),a=!0),t.block=l,t.blocks&&(t.blocks[o]=l),a&&oe()}if((r=e)&&"object"==typeof r&&"function"==typeof r.then){const n=V();if(e.then((e=>{P(n),o(t.then,1,t.value,e),P(null)}),(e=>{if(P(n),o(t.catch,2,t.error,e),P(null),!t.hasCatch)throw e})),t.current!==t.pending)return o(t.pending,0),!0}else{if(t.current!==t.then)return o(t.then,1,t.value,e),!0;t.resolved=e}var r}function me(e,t,n){const o=t.slice(),{resolved:r}=e;e.current===e.then&&(o[e.value]=r),e.current===e.catch&&(o[e.error]=r),e.block.p(o,n)}const fe="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function pe(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function $e(e){e&&e.c()}function ge(e,t,n,o){const{fragment:r,on_mount:i,on_destroy:s,after_update:l}=e.$$;r&&r.m(t,n),o||Z((()=>{const t=i.map($).filter(v);s?s.push(...t):h(t),e.$$.on_mount=[]})),l.forEach(Z)}function he(e,t){const n=e.$$;null!==n.fragment&&(h(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ve(e,t,n,o,r,i,s=[-1]){const l=M;P(e);const a=e.$$={fragment:null,ctx:null,props:i,update:p,not_equal:r,bound:g(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:g(),dirty:s,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return a.ctx&&r(a.ctx[t],a.ctx[t]=i)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](i),c&&function(e,t){-1===e.$$.dirty[0]&&(H.push(e),K(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,h(a.before_update),a.fragment=!!o&&o(a.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);a.fragment&&a.fragment.l(e),e.forEach(I)}else a.fragment&&a.fragment.c();t.intro&&ce(e.$$.fragment),ge(e,t.target,t.anchor,t.customElement),oe()}P(l)}class be{$destroy(){he(this,1),this.$destroy=p}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function we(e){let t,n,o,r,i;return{c(){t=N("svg"),n=N("circle"),o=N("polyline"),r=N("line"),D(n,"cx","12"),D(n,"cy","12"),D(n,"r","10"),D(o,"points","8 12 12 16 16 12"),D(r,"x1","12"),D(r,"y1","8"),D(r,"x2","12"),D(r,"y2","16"),D(t,"xmlns","http://www.w3.org/2000/svg"),D(t,"width",e[0]),D(t,"height",e[0]),D(t,"fill","none"),D(t,"viewBox","0 0 24 24"),D(t,"stroke","currentColor"),D(t,"stroke-width",e[1]),D(t,"stroke-linecap","round"),D(t,"stroke-linejoin","round"),D(t,"class",i="feather feather-arrow-down-circle "+e[2])},m(e,i){k(e,t,i),x(t,n),x(t,o),x(t,r)},p(e,[n]){1&n&&D(t,"width",e[0]),1&n&&D(t,"height",e[0]),2&n&&D(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-arrow-down-circle "+e[2])&&D(t,"class",i)},i:p,o:p,d(e){e&&I(t)}}}function ye(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class xe extends be{constructor(e){super(),ve(this,e,ye,we,b,{size:0,strokeWidth:1,class:2})}}function ke(e){let t,n,o,r;return{c(){t=N("svg"),n=N("path"),o=N("polyline"),D(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),D(o,"points","22 4 12 14.01 9 11.01"),D(t,"xmlns","http://www.w3.org/2000/svg"),D(t,"width",e[0]),D(t,"height",e[0]),D(t,"fill","none"),D(t,"viewBox","0 0 24 24"),D(t,"stroke","currentColor"),D(t,"stroke-width",e[1]),D(t,"stroke-linecap","round"),D(t,"stroke-linejoin","round"),D(t,"class",r="feather feather-check-circle "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&D(t,"width",e[0]),1&n&&D(t,"height",e[0]),2&n&&D(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-check-circle "+e[2])&&D(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Ie(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Fe extends be{constructor(e){super(),ve(this,e,Ie,ke,b,{size:0,strokeWidth:1,class:2})}}function _e(e){let t,n,o;return{c(){t=N("svg"),n=N("path"),D(n,"d","M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"),D(t,"xmlns","http://www.w3.org/2000/svg"),D(t,"width",e[0]),D(t,"height",e[0]),D(t,"fill","none"),D(t,"viewBox","0 0 24 24"),D(t,"stroke","currentColor"),D(t,"stroke-width",e[1]),D(t,"stroke-linecap","round"),D(t,"stroke-linejoin","round"),D(t,"class",o="feather feather-command "+e[2])},m(e,o){k(e,t,o),x(t,n)},p(e,[n]){1&n&&D(t,"width",e[0]),1&n&&D(t,"height",e[0]),2&n&&D(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-command "+e[2])&&D(t,"class",o)},i:p,o:p,d(e){e&&I(t)}}}function Ne(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Ce extends be{constructor(e){super(),ve(this,e,Ne,_e,b,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,o,r;return{c(){t=N("svg"),n=N("polyline"),o=N("path"),D(n,"points","9 10 4 15 9 20"),D(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),D(t,"xmlns","http://www.w3.org/2000/svg"),D(t,"width",e[0]),D(t,"height",e[0]),D(t,"fill","none"),D(t,"viewBox","0 0 24 24"),D(t,"stroke","currentColor"),D(t,"stroke-width",e[1]),D(t,"stroke-linecap","round"),D(t,"stroke-linejoin","round"),D(t,"class",r="feather feather-corner-down-left "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&D(t,"width",e[0]),1&n&&D(t,"height",e[0]),2&n&&D(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-corner-down-left "+e[2])&&D(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Se(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Le extends be{constructor(e){super(),ve(this,e,Se,je,b,{size:0,strokeWidth:1,class:2})}}function Ee(e){let t,n,o,r,i;return{c(){t=N("svg"),n=N("path"),o=N("line"),r=N("line"),D(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),D(o,"x1","18"),D(o,"y1","9"),D(o,"x2","12"),D(o,"y2","15"),D(r,"x1","12"),D(r,"y1","9"),D(r,"x2","18"),D(r,"y2","15"),D(t,"xmlns","http://www.w3.org/2000/svg"),D(t,"width",e[0]),D(t,"height",e[0]),D(t,"fill","none"),D(t,"viewBox","0 0 24 24"),D(t,"stroke","currentColor"),D(t,"stroke-width",e[1]),D(t,"stroke-linecap","round"),D(t,"stroke-linejoin","round"),D(t,"class",i="feather feather-delete "+e[2])},m(e,i){k(e,t,i),x(t,n),x(t,o),x(t,r)},p(e,[n]){1&n&&D(t,"width",e[0]),1&n&&D(t,"height",e[0]),2&n&&D(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-delete "+e[2])&&D(t,"class",i)},i:p,o:p,d(e){e&&I(t)}}}function qe(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class De extends be{constructor(e){super(),ve(this,e,qe,Ee,b,{size:0,strokeWidth:1,class:2})}}function ze(e){let t,n,o,r,i;return{c(){t=N("svg"),n=N("path"),o=N("polyline"),r=N("line"),D(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),D(o,"points","15 3 21 3 21 9"),D(r,"x1","10"),D(r,"y1","14"),D(r,"x2","21"),D(r,"y2","3"),D(t,"xmlns","http://www.w3.org/2000/svg"),D(t,"width",e[0]),D(t,"height",e[0]),D(t,"fill","none"),D(t,"viewBox","0 0 24 24"),D(t,"stroke","currentColor"),D(t,"stroke-width",e[1]),D(t,"stroke-linecap","round"),D(t,"stroke-linejoin","round"),D(t,"class",i="feather feather-external-link "+e[2])},m(e,i){k(e,t,i),x(t,n),x(t,o),x(t,r)},p(e,[n]){1&n&&D(t,"width",e[0]),1&n&&D(t,"height",e[0]),2&n&&D(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-external-link "+e[2])&&D(t,"class",i)},i:p,o:p,d(e){e&&I(t)}}}function Oe(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Te extends be{constructor(e){super(),ve(this,e,Oe,ze,b,{size:0,strokeWidth:1,class:2})}}function Be(e){let t,n,o,r;return{c(){t=N("svg"),n=N("circle"),o=N("line"),D(n,"cx","11"),D(n,"cy","11"),D(n,"r","8"),D(o,"x1","21"),D(o,"y1","21"),D(o,"x2","16.65"),D(o,"y2","16.65"),D(t,"xmlns","http://www.w3.org/2000/svg"),D(t,"width",e[0]),D(t,"height",e[0]),D(t,"fill","none"),D(t,"viewBox","0 0 24 24"),D(t,"stroke","currentColor"),D(t,"stroke-width",e[1]),D(t,"stroke-linecap","round"),D(t,"stroke-linejoin","round"),D(t,"class",r="feather feather-search "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&D(t,"width",e[0]),1&n&&D(t,"height",e[0]),2&n&&D(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-search "+e[2])&&D(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Me(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Pe extends be{constructor(e){super(),ve(this,e,Me,Be,b,{size:0,strokeWidth:1,class:2})}}const{document:Ve}=fe;function We(e){e[25]=e[27].list,e[26]=e[27].items}function Ae(e,t,n){const o=e.slice();return o[28]=t[n],o}function Re(e,t,n){const o=e.slice();return o[31]=t[n],o}function He(e,t,n){const o=e.slice();return o[31]=t[n],o}function Ye(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Ge(e){let t,n,o,r,i,s;We(e);let l=e[25]?.length&&Je(e),a=e[26]?.length&&Ue(e),c=e[25]?.length&&Xe(e);return{c(){l&&l.c(),t=j(),n=_("div"),o=_("table"),a&&a.c(),r=j(),i=_("tbody"),c&&c.c(),D(o,"striped",""),D(o,"class","svelte-btngop"),D(n,"class","eList svelte-btngop")},m(e,d){l&&l.m(e,d),k(e,t,d),k(e,n,d),x(n,o),a&&a.m(o,null),x(o,r),x(o,i),c&&c.m(i,null),s=!0},p(e,n){We(e),e[25]?.length?l?(l.p(e,n),4&n[0]&&ce(l,1)):(l=Je(e),l.c(),ce(l,1),l.m(t.parentNode,t)):l&&(le(),de(l,1,1,(()=>{l=null})),ae()),e[26]?.length?a?a.p(e,n):(a=Ue(e),a.c(),a.m(o,r)):a&&(a.d(1),a=null),e[25]?.length?c?(c.p(e,n),4&n[0]&&ce(c,1)):(c=Xe(e),c.c(),ce(c,1),c.m(i,null)):c&&(le(),de(c,1,1,(()=>{c=null})),ae())},i(e){s||(ce(l),ce(c),s=!0)},o(e){de(l),de(c),s=!1},d(e){l&&l.d(e),e&&I(t),e&&I(n),a&&a.d(),c&&c.d()}}}function Je(e){let t,n,o,r,i,s,l,a,c,d;function u(t){e[19](t)}let m={id:e[6]};return void 0!==e[3]&&(m.value=e[3]),o=new e[5]({props:m}),Y.push((()=>pe(o,"value",u))),o.$on("input",e[10]),l=new De({props:{size:"18"}}),{c(){t=_("div"),n=C("Suchen: "),$e(o.$$.fragment),i=j(),s=_("span"),$e(l.$$.fragment),D(s,"class","feather pointer svelte-btngop"),T(t,"margin-bottom","1em"),T(t,"position","relative")},m(r,u){k(r,t,u),x(t,n),ge(o,t,null),x(t,i),x(t,s),ge(l,s,null),a=!0,c||(d=L(s,"click",e[13]),c=!0)},p(e,t){const n={};!r&&8&t[0]&&(r=!0,n.value=e[3],ee((()=>r=!1))),o.$set(n)},i(e){a||(ce(o.$$.fragment,e),ce(l.$$.fragment,e),a=!0)},o(e){de(o.$$.fragment,e),de(l.$$.fragment,e),a=!1},d(e){e&&I(t),he(o),he(l),c=!1,d()}}}function Ue(e){let t,n,o,r=e[0]&&Qe(),i=e[26],s=[];for(let t=0;t<i.length;t+=1)s[t]=Ke(He(e,i,t));return{c(){t=_("thead"),n=_("tr"),r&&r.c(),o=j();for(let e=0;e<s.length;e+=1)s[e].c();D(n,"class","svelte-btngop"),D(t,"class","svelte-btngop")},m(e,i){k(e,t,i),x(t,n),r&&r.m(n,null),x(n,o);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(e[0]?r||(r=Qe(),r.c(),r.m(n,o)):r&&(r.d(1),r=null),516&t[0]){let o;for(i=e[26],o=0;o<i.length;o+=1){const r=He(e,i,o);s[o]?s[o].p(r,t):(s[o]=Ke(r),s[o].c(),s[o].m(n,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=i.length}},d(e){e&&I(t),r&&r.d(),F(s,e)}}}function Qe(e){let t;return{c(){t=_("th"),D(t,"class","svelte-btngop")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Ke(e){let t,n,o=e[31]?.designation+"";return{c(){t=_("th"),n=C(o),D(t,"class","svelte-btngop")},m(e,o){k(e,t,o),x(t,n)},p(e,t){4&t[0]&&o!==(o=e[31]?.designation+"")&&z(n,o)},d(e){e&&I(t)}}}function Xe(e){let t,n,o=e[25],r=[];for(let t=0;t<o.length;t+=1)r[t]=it(Ae(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(7055&n[0]){let s;for(o=e[25],s=0;s<o.length;s+=1){const i=Ae(e,o,s);r[s]?(r[s].p(i,n),ce(r[s],1)):(r[s]=it(i),r[s].c(),ce(r[s],1),r[s].m(t.parentNode,t))}for(le(),s=o.length;s<r.length;s+=1)i(s);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function Ze(e){let t,n,o,r,i=e[0]&&et(e),s=e[26],l=[];for(let t=0;t<s.length;t+=1)l[t]=rt(Re(e,s,t));return{c(){t=_("tr"),i&&i.c(),n=j();for(let e=0;e<l.length;e+=1)l[e].c();o=j(),D(t,"class","pointer svelte-btngop"),B(t,"active",e[28]._id===e[1])},m(e,s){k(e,t,s),i&&i.m(t,null),x(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);x(t,o),r=!0},p(e,r){if(e[0]?i?(i.p(e,r),1&r[0]&&ce(i,1)):(i=et(e),i.c(),ce(i,1),i.m(t,n)):i&&(le(),de(i,1,1,(()=>{i=null})),ae()),900&r[0]){let n;for(s=e[26],n=0;n<s.length;n+=1){const i=Re(e,s,n);l[n]?l[n].p(i,r):(l[n]=rt(i),l[n].c(),l[n].m(t,o))}for(;n<l.length;n+=1)l[n].d(1);l.length=s.length}518&r[0]&&B(t,"active",e[28]._id===e[1])},i(e){r||(ce(i),r=!0)},o(e){de(i),r=!1},d(e){e&&I(t),i&&i.d(),F(l,e)}}}function et(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:ot,then:nt,catch:tt,value:34,blocks:[,,,]};return ue(n=e[12](e[28]),r),{c(){t=S(),r.block.c()},m(e,n){k(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,o){e=t,r.ctx=e,4&o[0]&&n!==(n=e[12](e[28]))&&ue(n,r)||me(r,e,o)},i(e){o||(ce(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){de(r.blocks[e])}o=!1},d(e){e&&I(t),r.block.d(e),r.token=null,r=null}}}function tt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function nt(e){let t,n,o,r,i;return o=new Te({props:{size:"18"}}),{c(){t=_("td"),n=_("a"),$e(o.$$.fragment),D(n,"href",r=e[34]),D(n,"target","_blank"),D(t,"class","editRow svelte-btngop")},m(e,r){k(e,t,r),x(t,n),ge(o,n,null),i=!0},p(e,t){(!i||4&t[0]&&r!==(r=e[34]))&&D(n,"href",r)},i(e){i||(ce(o.$$.fragment,e),i=!0)},o(e){de(o.$$.fragment,e),i=!1},d(e){e&&I(t),he(o)}}}function ot(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function rt(e){let t,n,o,r,i=e[7](e[28],e[31])+"";return{c(){t=_("td"),n=C(i),D(t,"class","svelte-btngop")},m(i,s){k(i,t,s),x(t,n),o||(r=L(t,"click",q((function(){v(e[8](e[28]))&&e[8](e[28]).apply(this,arguments)}))),o=!0)},p(t,o){e=t,4&o[0]&&i!==(i=e[7](e[28],e[31])+"")&&z(n,i)},d(e){e&&I(t),o=!1,r()}}}function it(e){let t,n,o=e[11](e[28],e[26],e[3]),r=o&&Ze(e);return{c(){r&&r.c(),t=S()},m(e,o){r&&r.m(e,o),k(e,t,o),n=!0},p(e,n){12&n[0]&&(o=e[11](e[28],e[26],e[3])),o?r?(r.p(e,n),12&n[0]&&ce(r,1)):(r=Ze(e),r.c(),ce(r,1),r.m(t.parentNode,t)):r&&(le(),de(r,1,1,(()=>{r=null})),ae())},i(e){n||(ce(r),n=!0)},o(e){de(r),n=!1},d(e){r&&r.d(e),e&&I(t)}}}function st(e){let t,n;return t=new e[4]({}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:p,i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function lt(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:st,then:Ge,catch:Ye,value:27,blocks:[,,,]};return ue(n=e[2]&&e[9](),r),{c(){t=S(),r.block.c()},m(e,n){k(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,o){e=t,r.ctx=e,4&o[0]&&n!==(n=e[2]&&e[9]())&&ue(n,r)||me(r,e,o)},i(e){o||(ce(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){de(r.blocks[e])}o=!1},d(e){e&&I(t),r.block.d(e),r.token=null,r=null}}}function at(e,o,r){const i=A(),{Loading:s,TextField:l}=c;let{className:a}=o,{rowId:u}=o,{filterForReady:f=!1}=o,{showEdit:p=!1}=o,{praefix:$=""}=o,{selectionFields:g=!1}=o,{deList:h}=o,v=!0,b="",w=a+Math.floor(9e3*Math.random()+1e3).toString()+"search";const y=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?m(n):d(e[`_${t.name}`]||e[t.name]||"")},x=t.getSchemaByClass(a),k=async(e,t,n,o)=>{const{value:r,refClass:i}=o,[s,l]=n.split("."),a=r?.get($),c=a&&await oi(s,a);if(!c)return e;const d=c[l];return d?.length?d.map((n=>{let o=e?.find((e=>e._id===n[t]))||{};o={...o};for(const e in o)n[e]&&(o[e]=n[e]);for(const e in n)n[e]&&(o[e]=n[e]);return ti(i+o._id.toString(),o),o})):e};W((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(w)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await x;e.eventId===t.id&&(ri(t.class,e.eventId),r(2,v=!r(2,v=!1)))}));return e.$$set=e=>{"className"in e&&r(14,a=e.className),"rowId"in e&&r(1,u=e.rowId),"filterForReady"in e&&r(15,f=e.filterForReady),"showEdit"in e&&r(0,p=e.showEdit),"praefix"in e&&r(16,$=e.praefix),"selectionFields"in e&&r(17,g=e.selectionFields),"deList"in e&&r(18,h=e.deList)},[p,u,v,b,s,l,w,y,e=>()=>i("choose",{row:e}),async()=>{const e=await x;let n,o,s=n=await Zr(e.class,e.id),l=!1,a="";const c=g&&g?.find((t=>e.class===t.refClass.split(":")[0])),d=c?.value?.get&&c.value.get($);if(d){const[n,r]=c.refClass.split(":");e.class===n&&(s=await k(s,n,r,c)),l=c.parentClass?.find((e=>"quantity"===e.name)),a=c.className,o=await t.getCountedSection(a,r.split(".")[0],d,n,"quantity")}r(0,p&&=!c),!c&&f&&(s=((e,t)=>"Information"===t.state.task?e:e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status)))(s,e));let u=[],m=e.display;return m&&m.length?m.map((t=>{const[n,o]=t.split(".");let r=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));r&&(r={...r},r.name=`${n}_${o}`,s=s.map((e=>(e[n]&&(e[r.name]=e[n][o]),e)))),r||(r=e.items.find((e=>e.name===n))),u.find((e=>e?.name===n))||u.push(r)})):u=e.items,!p&&l?(u=u.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),s=s.map((e=>{const t=o.find((t=>t._id===e._id));return t&&(e.ist=t.quantity.$numberDecimal),e})),o.map((e=>{if(!s.find((t=>t._id===e._id))){const t=n.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,s.push(t)}})),i("init",s)):h&&(s=s.filter((e=>!h.find((t=>t._id===e._id))))),{list:s,items:u}},({detail:{value:e}})=>{r(3,b=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(y(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},async e=>`/task/${(await x).id}/${e._task._id}/task?view=standalone`,()=>{r(3,b="")},a,f,$,g,h,function(e){b=e,r(3,b)}]}class ct extends be{constructor(e){var t;super(),Ve.getElementById("svelte-btngop-style")||((t=_("style")).id="svelte-btngop-style",t.textContent=".feather.svelte-btngop.svelte-btngop{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-btngop.svelte-btngop{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-btngop .editRow.svelte-btngop{width:1em}.eList.svelte-btngop table.svelte-btngop{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-btngop table thead.svelte-btngop{position:sticky;top:0;background:#326173;color:white}.eList.svelte-btngop table thead tr.svelte-btngop{height:2.3em}.eList.svelte-btngop table tbody tr.svelte-btngop{height:2.75em !important}th.svelte-btngop.svelte-btngop,td.svelte-btngop.svelte-btngop{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-btngop.svelte-btngop:hover{background-color:#DAE1E5}tr.active.svelte-btngop.svelte-btngop{color:#326173;background-color:#fcebd5}",x(Ve.head,t)),ve(this,e,at,lt,b,{className:14,rowId:1,filterForReady:15,showEdit:0,praefix:16,selectionFields:17,deList:18},[-1,-1])}}function dt(e){let t,n,o;return n=new e[7]({props:{lang:e[8].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[6],step:e[9],pattern:e[5],placeholder:e[10],readonly:e[11],disabled:e[3],required:e[4]}}),n.$on("change",e[12]),n.$on("focus",e[13]),{c(){t=_("div"),$e(n.$$.fragment),T(t,"position","relative"),T(t,"max-width","10em")},m(e,r){k(e,t,r),ge(n,t,null),o=!0},p(e,[t]){const o={};6&t&&(o.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),64&t&&(o.value=e[6]),32&t&&(o.pattern=e[5]),8&t&&(o.disabled=e[3]),16&t&&(o.required=e[4]),n.$set(o)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n)}}}function ut(e,t,n){let r;const i=A(),{TextField:s}=c;let{id:l}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t,{formnovalidate:p}=t;const $=JSON.parse(o.getItem("Locale")),g=Number("1.1").toLocaleString($.id).substring(1,2),{properties:h={}}=a;let{min:v,max:b,step:w,pattern:y,decimals:x=0,unit:k="",placeholder:I,hint:F,readonly:_,negative:N,required:C=!1}=h;y||(y=x?`[0-9]+([${g}][0-9]{1,${x}})?`:"[0-9]*"),N&&(y="-?"+y);return e.$$set=e=>{"id"in e&&n(0,l=e.id),"item"in e&&n(14,a=e.item),"value"in e&&n(15,d=e.value),"noForm"in e&&n(1,u=e.noForm),"classId"in e&&n(2,m=e.classId),"disabled"in e&&n(3,f=e.disabled),"formnovalidate"in e&&n(16,p=e.formnovalidate)},e.$$.update=()=>{65552&e.$$.dirty&&n(4,C=C&&!p),32768&e.$$.dirty&&n(6,r=Number(d.toString().replace(g,".")).toFixed(x).toString().replace(".",g))},[l,u,m,f,C,y,r,s,$,w,I,_,({detail:e})=>i("blur",{value:e.value}),({detail:e})=>{_||Number(d.toString().replace(g,"."))||n(6,r="")},a,d,p]}class mt extends be{constructor(e){super(),ve(this,e,ut,dt,b,{id:0,item:14,value:15,noForm:1,classId:2,disabled:3,formnovalidate:16})}}const{document:ft}=fe;function pt(e){e[29]=e[31].list,e[30]=e[31].items}function $t(e,t,n){const o=e.slice();return o[32]=t[n],o[34]=n,o}function gt(e,t,n){const o=e.slice();return o[35]=t[n],o[37]=n,o}function ht(e,t,n){const o=e.slice();return o[35]=t[n],o}function vt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function bt(e){let t,n,o,r,i,s,l,a,c,d,u,m,f,p,$,g,h,v,b,w;function y(t){e[27](t)}pt(e),n=new e[7]({props:{outline:!0,$$slots:{default:[wt]},$$scope:{ctx:e}}}),n.$on("click",e[26]),r=new e[7]({props:{disabled:!e[29].length,filled:!0,$$slots:{default:[yt]},$$scope:{ctx:e}}}),r.$on("click",e[16](e[29]));let N={id:e[10]};void 0!==e[1]&&(N.value=e[1]),a=new e[5]({props:N}),Y.push((()=>pe(a,"value",y))),a.$on("input",e[13]),m=new De({props:{size:"18"}});let E=e[30]?.length&&function(e){let t,n,o,r,i,s;r=new Fe({props:{size:"20"}});let l=e[30],a=[];for(let t=0;t<l.length;t+=1)a[t]=xt(ht(e,l,t));return{c(){t=_("thead"),n=_("tr"),o=_("th"),$e(r.$$.fragment),i=j();for(let e=0;e<a.length;e+=1)a[e].c();D(o,"class","svelte-1m010ne"),D(n,"class","svelte-1m010ne"),D(t,"class","svelte-1m010ne")},m(e,l){k(e,t,l),x(t,n),x(n,o),ge(r,o,null),x(n,i);for(let e=0;e<a.length;e+=1)a[e].m(n,null);s=!0},p(e,t){if(4096&t[0]){let o;for(l=e[30],o=0;o<l.length;o+=1){const r=ht(e,l,o);a[o]?a[o].p(r,t):(a[o]=xt(r),a[o].c(),a[o].m(n,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=l.length}},i(e){s||(ce(r.$$.fragment,e),s=!0)},o(e){de(r.$$.fragment,e),s=!1},d(e){e&&I(t),he(r),F(a,e)}}}(e),q=e[29]?.length&&function(e){let t,n,o=e[29],r=[];for(let t=0;t<o.length;t+=1)r[t]=_t($t(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(153607&n[0]){let s;for(o=e[29],s=0;s<o.length;s+=1){const i=$t(e,o,s);r[s]?(r[s].p(i,n),ce(r[s],1)):(r[s]=_t(i),r[s].c(),ce(r[s],1),r[s].m(t.parentNode,t))}for(le(),s=o.length;s<r.length;s+=1)i(s);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}(e);return{c(){t=_("div"),$e(n.$$.fragment),o=j(),$e(r.$$.fragment),i=j(),s=_("div"),l=C("Suchen: "),$e(a.$$.fragment),d=j(),u=_("span"),$e(m.$$.fragment),f=j(),p=_("div"),$=_("table"),E&&E.c(),g=j(),h=_("tbody"),q&&q.c(),D(t,"class","form--buttons svelte-1m010ne"),D(u,"class","feather pointer svelte-1m010ne"),T(s,"margin-bottom","1em"),T(s,"position","relative"),D($,"striped",""),D($,"class","svelte-1m010ne"),D(p,"class","eList svelte-1m010ne")},m(c,y){k(c,t,y),ge(n,t,null),x(t,o),ge(r,t,null),k(c,i,y),k(c,s,y),x(s,l),ge(a,s,null),x(s,d),x(s,u),ge(m,u,null),k(c,f,y),k(c,p,y),x(p,$),E&&E.m($,null),x($,g),x($,h),q&&q.m(h,null),v=!0,b||(w=L(u,"click",e[15]),b=!0)},p(e,t){pt(e);const o={};512&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};512&t[1]&&(i.$$scope={dirty:t,ctx:e}),r.$set(i);const s={};!c&&2&t[0]&&(c=!0,s.value=e[1],ee((()=>c=!1))),a.$set(s),e[30]?.length&&E.p(e,t),e[29]?.length&&q.p(e,t)},i(e){v||(ce(n.$$.fragment,e),ce(r.$$.fragment,e),ce(a.$$.fragment,e),ce(m.$$.fragment,e),ce(E),ce(q),v=!0)},o(e){de(n.$$.fragment,e),de(r.$$.fragment,e),de(a.$$.fragment,e),de(m.$$.fragment,e),de(E),de(q),v=!1},d(e){e&&I(t),he(n),he(r),e&&I(i),e&&I(s),he(a),he(m),e&&I(f),e&&I(p),E&&E.d(),q&&q.d(),b=!1,w()}}}function wt(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function yt(e){let t;return{c(){t=C("Bestätigen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function xt(e){let t,n,o=e[35]+"";return{c(){t=_("th"),n=C(o),D(t,"class","svelte-1m010ne")},m(e,o){k(e,t,o),x(t,n)},p:p,d(e){e&&I(t)}}}function kt(e){let t,n,o,r,i,s,l=e[0],a=It(e),c=e[30],d=[];for(let t=0;t<c.length;t+=1)d[t]=Ft(gt(e,c,t));return{c(){t=_("tr"),a.c(),n=j();for(let e=0;e<d.length;e+=1)d[e].c();o=j(),T(t,"cursor","zoom-in"),D(t,"title","übernimmt den Wert direkt"),D(t,"class","svelte-1m010ne"),B(t,"active",e[0].includes(e[32]))},m(l,c){k(l,t,c),a.m(t,null),x(t,n);for(let e=0;e<d.length;e+=1)d[e].m(t,null);x(t,o),r=!0,i||(s=L(t,"click",e[17](e[32])),i=!0)},p(r,i){if(e=r,1&i[0]&&b(l,l=e[0])?(le(),de(a,1,1,p),ae(),a=It(e),a.c(),ce(a),a.m(t,n)):a.p(e,i),4100&i[0]){let n;for(c=e[30],n=0;n<c.length;n+=1){const r=gt(e,c,n);d[n]?d[n].p(r,i):(d[n]=Ft(r),d[n].c(),d[n].m(t,o))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}4097&i[0]&&B(t,"active",e[0].includes(e[32]))},i(e){r||(ce(a),r=!0)},o(e){de(a),r=!1},d(e){e&&I(t),a.d(e),F(d,e),i=!1,s()}}}function It(e){let t,n,o;return n=new e[9]({props:{name:e[11],data:e[34],checked:e[0].includes(e[32]),round:!0}}),{c(){t=_("td"),$e(n.$$.fragment),D(t,"title","Wählt den Wert aus"),D(t,"class","svelte-1m010ne")},m(e,r){k(e,t,r),ge(n,t,null),o=!0},p(e,t){const o={};1&t[0]&&(o.checked=e[0].includes(e[32])),n.$set(o)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n)}}}function Ft(e){let t,n,o=(e[2][e[34]]?e[2][e[34]][e[37]]:e[32])+"";return{c(){t=_("td"),n=C(o),D(t,"class","svelte-1m010ne")},m(e,o){k(e,t,o),x(t,n)},p(e,t){4&t[0]&&o!==(o=(e[2][e[34]]?e[2][e[34]][e[37]]:e[32])+"")&&z(n,o)},d(e){e&&I(t)}}}function _t(e){let t,n,o=e[14](e[32],e[1]),r=o&&kt(e);return{c(){r&&r.c(),t=S()},m(e,o){r&&r.m(e,o),k(e,t,o),n=!0},p(e,n){2&n[0]&&(o=e[14](e[32],e[1])),o?r?(r.p(e,n),2&n[0]&&ce(r,1)):(r=kt(e),r.c(),ce(r,1),r.m(t.parentNode,t)):r&&(le(),de(r,1,1,(()=>{r=null})),ae())},i(e){n||(ce(r),n=!0)},o(e){de(r),n=!1},d(e){r&&r.d(e),e&&I(t)}}}function Nt(e){let t,n;return t=new e[4]({}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:p,i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Ct(e){let t,n,o,r;t=new e[8]({});let i={ctx:e,current:null,token:null,hasCatch:!1,pending:Nt,then:bt,catch:vt,value:31,blocks:[,,,]};return ue(e[12](),i),{c(){$e(t.$$.fragment),n=j(),o=S(),i.block.c()},m(e,s){ge(t,e,s),k(e,n,s),k(e,o,s),i.block.m(e,i.anchor=s),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(t,n){me(i,e=t,n)},i(e){r||(ce(t.$$.fragment,e),ce(i.block),r=!0)},o(e){de(t.$$.fragment,e);for(let e=0;e<3;e+=1){de(i.blocks[e])}r=!1},d(e){he(t,e),e&&I(n),e&&I(o),i.block.d(e),i.token=null,i=null}}}function jt(e){let t,n;return t=new e[6]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Ct]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};7&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function St(e,n,o){const r=A(),{Loading:i,TextField:s,Dialog:l,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=n,{id:f}=n,{selection:p}=n,{tableName:$}=n,{idName:g}=n,{target:h}=n,{view:v}=n,{unique:b}=n,{uniqueView:w}=n;p||=[];let y="",x=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",k=[];const I=$+g+h+"checkbox",F=(e,t)=>e>t?1:t>e?-1:0;return e.$$set=e=>{"classId"in e&&o(18,m=e.classId),"id"in e&&o(19,f=e.id),"selection"in e&&o(0,p=e.selection),"tableName"in e&&o(20,$=e.tableName),"idName"in e&&o(21,g=e.idName),"target"in e&&o(22,h=e.target),"view"in e&&o(23,v=e.view),"unique"in e&&o(24,b=e.unique),"uniqueView"in e&&o(25,w=e.uniqueView)},[p,y,k,r,i,s,l,a,d,u,x,I,async()=>{let e,n=[];if(o(2,k=[]),v){const n=m.split("-")[1].slice(0,-4),o="input."+m+"[name='_id']",r=document.querySelector(o).value,i={[g]:f,$or:[{status:!0},{[n]:r}]};e=await t.getSectionView($,i),e=e.sort(((e,t)=>{const o=e=>(e[n]||"z").toString()+e[h];return F(o(e),o(t))}))}else if(w){const r={[g]:f,status:!0};Object.entries(w).map((([e,t])=>{t?.length&&(r[e]={$in:t}),n.push(e)})),e=await t.getSectionView($,r),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[h])?"0-":"1-")+e[h];return F(n(e),n(t))})),o(2,k=e.map((e=>{const t=[e[h]];return n.map((n=>t.push(e[n]))),t})))}else b?(e=await t.getSection($,g,f,b),e=e.sort(((e,t)=>F(e,t)))):(e=await t.getSection($,g,f),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[h])?"0-":"1-")+e[h];return F(n(e),n(t))})));const r=[];e.map((e=>r.push(e[h])));const i=await t.getSchemaByClass($),s=i.items.find((e=>e.name===h))?.designation;return n=n.map((e=>i.items.find((t=>t.name===e))?.designation)),{list:r.flat(),items:[s,...n]}},({detail:{value:e}})=>{o(1,y=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{o(1,y="")},e=>()=>{const t=document.getElementsByName(I),n=[];t.forEach(((t,o)=>{t.checked&&n.push(e[+t.attributes.data.value])})),r("choose",{list:n})},e=>t=>{"TD"===t.originalTarget.tagName&&(o(0,p=p.includes(e)?p.filter((t=>t!==e)):p.concat(e)),r("choose",{list:p}))},m,f,$,g,h,v,b,w,()=>r("back"),function(e){y=e,o(1,y)}]}class Lt extends be{constructor(e){var t;super(),ft.getElementById("svelte-1m010ne-style")||((t=_("style")).id="svelte-1m010ne-style",t.textContent=".feather.svelte-1m010ne.svelte-1m010ne{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-1m010ne.svelte-1m010ne{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-1m010ne table.svelte-1m010ne{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-1m010ne table thead.svelte-1m010ne{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1m010ne table tbody tr.svelte-1m010ne{height:2.3em}th.svelte-1m010ne.svelte-1m010ne,td.svelte-1m010ne.svelte-1m010ne{padding-left:0.4em;padding-right:0.4em}tr.active.svelte-1m010ne.svelte-1m010ne{color:#326173;background-color:#fcebd5}.dialog.eList{max-height:90vh}.checkbox.round > .selector{border-color:#326173 !important}.form--buttons.svelte-1m010ne.svelte-1m010ne{display:flex;gap:1em;padding:0.5em 0}",x(ft.head,t)),ve(this,e,St,jt,b,{classId:18,id:19,selection:0,tableName:20,idName:21,target:22,view:23,unique:24,uniqueView:25},[-1,-1])}}const{document:Et}=fe;function qt(e){let t,n,o,r,i,s=e[7].length+"";return{c(){t=_("span"),n=C("("),o=C(s),r=C(")"),D(t,"class",i=y(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,i){k(e,t,i),x(t,n),x(t,o),x(t,r)},p(e,n){128&n[0]&&s!==(s=e[7].length+"")&&z(o,s),2&n[0]&&i!==(i=y(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&D(t,"class",i)},d(e){e&&I(t)}}}function Dt(e){let t;return{c(){t=_("div"),D(t,"class","load-more-options"),D(t,"slot","load-more-options-message slot")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function zt(e){let t,n,o,r;const i=[Bt,Tt,Ot],s=[];function l(e,t){return e[7].length?0:e[17]?1:e[14]&&e[16].view?2:-1}return~(t=l(e))&&(n=s[t]=i[t](e)),{c(){n&&n.c(),o=S()},m(e,n){~t&&s[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?~t&&s[t].p(e,r):(n&&(le(),de(s[a],1,1,(()=>{s[a]=null})),ae()),~t?(n=s[t],n?n.p(e,r):(n=s[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o)):n=null)},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){~t&&s[t].d(e),e&&I(o)}}}function Ot(e){let t,n,o,r,i;return n=new xe({props:{size:"18"}}),{c(){t=_("span"),$e(n.$$.fragment),D(t,"title","Übernehmen"),D(t,"class","feather pointer svelte-1rbaejz")},m(s,l){k(s,t,l),ge(n,t,null),o=!0,r||(i=L(t,"click",e[24]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n),r=!1,i()}}}function Tt(e){let t,n,o,r,i;return n=new Ce({props:{size:"18"}}),{c(){t=_("span"),$e(n.$$.fragment),D(t,"title",e[17].title||"Generieren"),D(t,"class","feather pointer svelte-1rbaejz")},m(s,l){k(s,t,l),ge(n,t,null),o=!0,r||(i=L(t,"click",e[23]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n),r=!1,i()}}}function Bt(e){let t,n,o,r,i;return n=new De({props:{size:"18"}}),{c(){t=_("span"),$e(n.$$.fragment),D(t,"title","Löschen"),D(t,"class","feather pointer svelte-1rbaejz")},m(s,l){k(s,t,l),ge(n,t,null),o=!0,r||(i=L(t,"click",e[25]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n),r=!1,i()}}}function Mt(e){let t,n,o;function r(t){e[32](t)}let i={class:"tModal",noClickaway:!0,$$slots:{default:[Pt]},$$scope:{ctx:e}};return void 0!==e[10]&&(i.open=e[10]),t=new e[11]({props:i}),Y.push((()=>pe(t,"open",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};53&o[0]|256&o[1]&&(r.$$scope={dirty:o,ctx:e}),!n&&1024&o[0]&&(n=!0,r.open=e[10],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function Pt(e){let t,n;return t=new Lt({props:{classId:e[2],selection:e[0],view:e[15],unique:e[16].unique&&e[4].name,uniqueView:e[16].view&&{[e[16].view]:e[5][e[16].view]},id:e[5][e[19]],tableName:e[18],idName:e[19],target:e[4].name}}),t.$on("choose",e[22]),t.$on("back",e[21]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4&n[0]&&(o.classId=e[2]),1&n[0]&&(o.selection=e[0]),16&n[0]&&(o.unique=e[16].unique&&e[4].name),32&n[0]&&(o.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(o.id=e[5][e[19]]),16&n[0]&&(o.target=e[4].name),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Vt(e){let t,n,o,r,i,s,l,a,c,d=e[7].length&&qt(e);function u(t){e[30](t)}function m(t){e[31](t)}let f={id:e[3],name:e[3],class:e[3],readonly:e[13],disabled:e[1],required:e[6],placeholder:e[8],getOptions:Wt,minSearchLength:"3",$$slots:{"load-more-options-message slot":[Dt]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),o=new e[12]({props:f}),Y.push((()=>pe(o,"selection",u))),Y.push((()=>pe(o,"maxOptions",m))),o.$on("change",e[20]);let p=!e[1]&&zt(e),$=e[10]&&Mt(e);return{c(){t=_("div"),d&&d.c(),n=j(),$e(o.$$.fragment),s=j(),p&&p.c(),l=j(),$&&$.c(),a=S(),T(t,"position","relative")},m(e,r){k(e,t,r),d&&d.m(t,null),x(t,n),ge(o,t,null),x(t,s),p&&p.m(t,null),k(e,l,r),$&&$.m(e,r),k(e,a,r),c=!0},p(e,s){e[7].length?d?d.p(e,s):(d=qt(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const l={};8&s[0]&&(l.id=e[3]),8&s[0]&&(l.name=e[3]),8&s[0]&&(l.class=e[3]),2&s[0]&&(l.disabled=e[1]),64&s[0]&&(l.required=e[6]),256&s[0]&&(l.placeholder=e[8]),256&s[1]&&(l.$$scope={dirty:s,ctx:e}),!r&&128&s[0]&&(r=!0,l.selection=e[7],ee((()=>r=!1))),!i&&512&s[0]&&(i=!0,l.maxOptions=e[9],ee((()=>i=!1))),o.$set(l),e[1]?p&&(le(),de(p,1,1,(()=>{p=null})),ae()):p?(p.p(e,s),2&s[0]&&ce(p,1)):(p=zt(e),p.c(),ce(p,1),p.m(t,null)),e[10]?$?($.p(e,s),1024&s[0]&&ce($,1)):($=Mt(e),$.c(),ce($,1),$.m(a.parentNode,a)):$&&(le(),de($,1,1,(()=>{$=null})),ae())},i(e){c||(ce(o.$$.fragment,e),ce(p),ce($),c=!0)},o(e){de(o.$$.fragment,e),de(p),de($),c=!1},d(e){e&&I(t),d&&d.d(),he(o),p&&p.d(),e&&I(l),$&&$.d(e),e&&I(a)}}}async function*Wt(e){yield[{name:e}]}function At(e,n,o){const r=A(),{Modal:i,Autocomplete:s}=c;let{classId:l}=n,{id:a}=n,{item:d}=n,{record:u}=n,{value:m}=n,{noForm:f=!1}=n,{disabled:p}=n,{formnovalidate:$}=n,{numberInput:g}=n,{praefix:h}=n;const{properties:v={}}=d;let{placeholder:b,hint:w,readonly:y,required:x=!1,lookup:k="",view:I=!1,multi:F,max:_=1e3,generate:N=!1}=v;const[C,j]=k.split(":");let S=!1,L=m.map&&m.map((e=>({name:e})))||[];p||=y,p&&(b="");W((async()=>{const e=document.getElementById(a);e.classList.add(l),!y&&k&&e.addEventListener("focus",E)}));const E=()=>{if(k){document.getElementById(a).blur(),(F.unique||L.length<_)&&o(10,S=!0)}},q=()=>{o(10,S&&=!1)},D=({detail:e})=>{o(7,L=e.list.map((e=>({name:e})))),r("blur",{value:e.list}),q()},z=(e=!1)=>{if(p||!F.required)return;const t=F.maxItem;if(!t||F.unique)return;o(9,_=!1!==e?e:u[t]||0);const n=L.length!=_,i=document.getElementById(a);i?.classList?.toggle("invalid",n),r("invalid",{idx:h,value:n})};return e.$$set=e=>{"classId"in e&&o(2,l=e.classId),"id"in e&&o(3,a=e.id),"item"in e&&o(4,d=e.item),"record"in e&&o(5,u=e.record),"value"in e&&o(0,m=e.value),"noForm"in e&&o(26,f=e.noForm),"disabled"in e&&o(1,p=e.disabled),"formnovalidate"in e&&o(27,$=e.formnovalidate),"numberInput"in e&&o(28,g=e.numberInput),"praefix"in e&&o(29,h=e.praefix)},e.$$.update=()=>{128&e.$$.dirty[0]&&L&&(o(0,m=L.map&&L.map((e=>e.name))||[]),z()),268435456&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:o}=e;void 0!==h&&h!==o||t&&t.name===F.maxItem&&z(n)})(g),134217792&e.$$.dirty[0]&&o(6,x=x&&!$)},[m,p,l,a,d,u,x,L,b,_,S,i,s,y,k,I,F,N,C,j,({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),o(7,L=t.map((e=>({name:e.trim()})))),r("blur",{value:L.map((e=>e.name))})},q,D,()=>{const e=u[N.itemQuantity];if(!e)return;const t=N.prefix||"",n=u[N.variable]||"",o=N.len||5,r=Array.from({length:e},((e,r)=>t+n+"-"+r.toString().padStart(o,"0")));D({detail:{list:r}})},async()=>{const e=u[F.maxItem];if(!e)return;const n={[j]:u[j],status:!0},o=[].concat(u[F.view]||[]);o.length&&(n[F.view]={$in:o});const r=await t.getSectionView(C,n),i=Array.from({length:e<r.length?e:r.length},((e,t)=>r[t][d.name]));D({detail:{list:i}})},()=>{D({detail:{list:[]}})},f,$,g,h,function(e){L=e,o(7,L)},function(e){_=e,o(9,_)},function(e){S=e,o(10,S)}]}class Rt extends be{constructor(e){var t;super(),Et.getElementById("svelte-1rbaejz-style")||((t=_("style")).id="svelte-1rbaejz-style",t.textContent=".feather.svelte-1rbaejz{position:absolute;top:1em;right:0.5em;color:#4300b0}.showNumber.svelte-1rbaejz{position:absolute;display:inline-block;width:3.5em;text-align:right;top:1em;left:-4em;color:#4300b0}.showNumber.disabled.svelte-1rbaejz{color:#888 !important}.autocomplete .notice,.autocomplete .load-more-options,.autocomplete .show-on-focus,.autocomplete.disabled .chip button.btn,.autocomplete.disabled .chip+.autocomplete-field input{display:none}.autocomplete-field input.invalid{border:1px red solid !important}.autocomplete.disabled .chip{height:2.25em !important;padding-right:0.75em !important}",x(Et.head,t)),ve(this,e,At,Vt,b,{classId:2,id:3,item:4,record:5,value:0,noForm:26,disabled:1,formnovalidate:27,numberInput:28,praefix:29},[-1,-1])}}function Ht(e,t,n){const o=e.slice();return o[10]=t[n],o}function Yt(e){let t,n,o,r=e[10]+"";return{c(){t=_("option"),n=C(r),t.__value=e[10],t.value=t.__value,t.selected=o=e[1]===e[10],D(t,"class","svelte-5xpzvo")},m(e,o){k(e,t,o),x(t,n)},p(e,n){2&n&&o!==(o=e[1]===e[10])&&(t.selected=o)},d(e){e&&I(t)}}}function Gt(e){let t,n,o,r,i,s=e[4],l=[];for(let t=0;t<s.length;t+=1)l[t]=Yt(Ht(e,s,t));return{c(){t=_("select"),n=_("option");for(let e=0;e<l.length;e+=1)l[e].c();n.__value="",n.value=n.__value,D(n,"class","svelte-5xpzvo"),D(t,"class",o=y(e[2]||e[3])+" svelte-5xpzvo"),D(t,"id",e[0]),D(t,"name",e[0]),D(t,"readonly",e[5])},m(o,s){k(o,t,s),x(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);r||(i=L(t,"change",e[6]),r=!0)},p(e,[n]){if(18&n){let o;for(s=e[4],o=0;o<s.length;o+=1){const r=Ht(e,s,o);l[o]?l[o].p(r,n):(l[o]=Yt(r),l[o].c(),l[o].m(t,null))}for(;o<l.length;o+=1)l[o].d(1);l.length=s.length}12&n&&o!==(o=y(e[2]||e[3])+" svelte-5xpzvo")&&D(t,"class",o),1&n&&D(t,"id",e[0]),1&n&&D(t,"name",e[0])},i:p,o:p,d(e){e&&I(t),F(l,e),r=!1,i()}}}function Jt(e,t,n){const o=A();let{id:r}=t,{item:i}=t,{value:s}=t,{noForm:l=!1}=t,{classId:a}=t,{disabled:c}=t;const{enum:d}=i.properties,u=c||i.properties.readonly;return e.$$set=e=>{"id"in e&&n(0,r=e.id),"item"in e&&n(7,i=e.item),"value"in e&&n(1,s=e.value),"noForm"in e&&n(2,l=e.noForm),"classId"in e&&n(3,a=e.classId),"disabled"in e&&n(8,c=e.disabled)},[r,s,l,a,d,u,e=>o("blur",{value:e.srcElement.value}),i,c]}class Ut extends be{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=_("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo.svelte-5xpzvo{padding:0 0.625em 0.0625em;box-sizing:border-box;width:100%;border:0 solid rgba(0, 0, 0, 0.42);border-bottom-width:0px;border-bottom-width:0.0625em;border-top-left-radius:0.375em;border-top-right-radius:0.375em;background-color:#f5f5f5;outline:none;font-size:1rem;font-weight:300;height:2.8em}select.svelte-5xpzvo.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}select[readonly].svelte-5xpzvo option.svelte-5xpzvo{display:none}",x(document.head,t)),ve(this,e,Jt,Gt,b,{id:0,item:7,value:1,noForm:2,classId:3,disabled:8})}}const Qt=/\d+/g,Kt=/%[HMSpPdmyY%]/g;function Xt(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("%%","%")}function Zt(e){let t;return{c(){t=C("Stunden")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function en(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Zt]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function tn(e){let t;return{c(){t=C("Minuten")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function nn(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[tn]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function on(e){let t;return{c(){t=C("Jetzt")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function rn(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[on]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function sn(e){let t,n,o,r,i,s,l,a,c;return r=new e[5]({props:{value:e[0],closeOnSelection:!0}}),r.$on("change",e[8]),s=new e[6]({props:{value:e[0],$$slots:{"now-label":[rn],"minutes-label":[nn],"hours-label":[en]},$$scope:{ctx:e}}}),s.$on("change",e[7]),{c(){t=_("input"),o=j(),$e(r.$$.fragment),i=j(),$e(s.$$.fragment),D(t,"type","string"),D(t,"class",n=e[2]||e[3]),D(t,"id",e[1]),D(t,"name",e[1]),t.hidden=!0},m(n,d){k(n,t,d),O(t,e[0]),k(n,o,d),ge(r,n,d),k(n,i,d),ge(s,n,d),l=!0,a||(c=L(t,"input",e[9]),a=!0)},p(e,[o]){(!l||12&o&&n!==(n=e[2]||e[3]))&&D(t,"class",n),(!l||2&o)&&D(t,"id",e[1]),(!l||2&o)&&D(t,"name",e[1]),1&o&&O(t,e[0]);const i={};1&o&&(i.value=e[0]),r.$set(i);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),s.$set(a)},i(e){l||(ce(r.$$.fragment,e),ce(s.$$.fragment,e),l=!0)},o(e){de(r.$$.fragment,e),de(s.$$.fragment,e),l=!1},d(e){e&&I(t),e&&I(o),he(r,e),e&&I(i),he(s,e),a=!1,c()}}}function ln(e,t,n){const o=A(),{Label:r,DatePicker:i,TimePicker:s}=c;let{value:l}=t,{id:a}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>o("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,l=e.value),"id"in e&&n(1,a=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[l,a,d,u,r,i,s,({detail:e})=>{var t,o;n(0,(t=e.value,o=l,l=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(l)},({detail:e})=>{var t,o;n(0,(t=e.value,o=l,l=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(l)},function(){l=this.value,n(0,l)}]}class an extends be{constructor(e){super(),ve(this,e,ln,sn,b,{value:0,id:1,noForm:2,classId:3})}}function cn(e){let t,n,o;return n=new e[6]({props:{type:"string",inputClass:e[2]?"":" "+e[3],id:e[0],name:e[0],value:e[1],pattern:dn,placeholder:un,readonly:e[4],disabled:e[5]}}),n.$on("change",e[7]),{c(){t=_("div"),$e(n.$$.fragment),T(t,"max-width","4em")},m(e,r){k(e,t,r),ge(n,t,null),o=!0},p(e,[t]){const o={};12&t&&(o.inputClass=e[2]?"":" "+e[3]),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),2&t&&(o.value=e[1]),16&t&&(o.readonly=e[4]),32&t&&(o.disabled=e[5]),n.$set(o)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n)}}}const dn="([01][0-9]|2[0-3]):([0-5][0-9])",un="";function mn(e,t,n){const o=A(),{TextField:r}=c;let{id:i}=t,{item:s}=t,{value:l}=t,{noForm:a=!1}=t,{classId:d}=t,{readonly:u}=t,{disabled:m}=t,{praefix:f}=t;const p=e=>{if(!e)return"";const[t,n]=e.split(":");return 4===t.length?`${t.substr(0,2)}:${t.substring(2,4)}`:3===t.length?t.substring(0,2)>23?`0${t.substring(0,1)}:${t.substring(1,3)}`:`${t.substring(0,2)}:${t.substring(2,3)}0`:2===t.length?t>23?`0${t.substring(0,1)}:${t.substring(1,2)}0`:`${t}:${(n||"0").padStart(2,"0")}`:`0${t}:${(n||"0").padStart(2,"0")}`};return e.$$set=e=>{"id"in e&&n(0,i=e.id),"item"in e&&n(8,s=e.item),"value"in e&&n(1,l=e.value),"noForm"in e&&n(2,a=e.noForm),"classId"in e&&n(3,d=e.classId),"readonly"in e&&n(4,u=e.readonly),"disabled"in e&&n(5,m=e.disabled),"praefix"in e&&n(9,f=e.praefix)},[i,l,a,d,u,m,r,({detail:e})=>{o("blur",{value:p(e.value)}),o("checkRange",{idx:f,fieldId:i,value:e.value})},s,f]}class fn extends be{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=_("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",x(document.head,t)),ve(this,e,mn,cn,b,{id:0,item:8,value:1,noForm:2,classId:3,readonly:4,disabled:5,praefix:9})}}function pn(e){let t,n;return t=new e[15]({props:{inputClass:e[3]||e[4],disabled:e[6],formnovalidate:e[8],readonly:e[19],pattern:e[21],required:e[18],id:e[23],name:e[22],value:e[12]()}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),4096&n[0]&&(o.value=e[12]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function $n(e){let t,n;return t=new e[15]({props:{inputClass:e[3]||e[4],disabled:e[6],formnovalidate:e[8],readonly:e[19],required:e[18],type:"email",id:e[23],name:e[22],value:e[12]()}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),4096&n[0]&&(o.value=e[12]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function gn(e){let t,n;return t=new fn({props:{inputClass:e[3]||e[4],disabled:e[6],readonly:e[19],required:e[18],id:e[23],item:e[1],value:e[12](),praefix:e[2]}}),t.$on("blur",e[25]()),t.$on("checkRange",e[30]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.item=e[1]),4096&n[0]&&(o.value=e[12]()),4&n[0]&&(o.praefix=e[2]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function hn(e){let t,n;return t=new an({props:{classId:e[4],id:e[23],disabled:e[6],required:e[18],value:e[24](),noForm:e[3]}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function vn(e){let t,n;return t=new e[16]({props:{inputClass:e[3]||e[4],required:e[18],disabled:e[6],id:e[23],name:e[22],value:e[24](),closeOnSelection:!0}}),t.$on("change",e[25](!0)),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function bn(e){let t,n;return t=new e[17]({props:{round:!0,inputClass:e[3]||e[4],disabled:e[6]||e[19],required:e[18],id:e[23],name:e[22],checked:e[12]()}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]||e[19]),4096&n[0]&&(o.checked=e[12]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function wn(e){let t,n;return t=new Rt({props:{classId:e[4],disabled:e[6],required:e[18],id:e[23],item:e[1],record:e[0],value:e[12](),noForm:e[3],multi:e[1].properties.multi,numberInput:e[10],praefix:e[2]}}),t.$on("blur",e[25]()),t.$on("invalid",e[29]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),2&n[0]&&(o.multi=e[1].properties.multi),1024&n[0]&&(o.numberInput=e[10]),4&n[0]&&(o.praefix=e[2]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function yn(e){let t,n;return t=new Ut({props:{classId:e[4],disabled:e[6],required:e[18],id:e[23],item:e[1],value:e[12](),noForm:e[3]}}),t.$on("blur",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.item=e[1]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function xn(e){let t,n;return t=new mt({props:{classId:e[4],disabled:e[6],formnovalidate:e[8],required:e[18],readonly:e[19],id:e[23],item:e[1],value:e[12](),noForm:e[3]}}),t.$on("blur",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),2&n[0]&&(o.item=e[1]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function kn(e){let t,n;return t=new r({props:{classId:e[4],disabled:e[6],readonly:e[19],id:e[23],name:e[1].name,value:e[12](),noForm:e[3]}}),t.$on("blur",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.name=e[1].name),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function In(e){let t,n;return t=new jo({props:{classId:e[4],eventId:e[5],required:e[18],disabled:e[6],formnovalidate:e[8],readonly:e[19],id:e[23],item:e[1],desc:e[13],value:e[12](),noForm:e[3],praefix:e[2],selectionFields:e[7],selection:e[9],deList:e[11],recordId:e[0]._id}}),t.$on("task",e[28]),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),32&n[0]&&(o.eventId=e[5]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),2&n[0]&&(o.item=e[1]),8192&n[0]&&(o.desc=e[13]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),4&n[0]&&(o.praefix=e[2]),128&n[0]&&(o.selectionFields=e[7]),512&n[0]&&(o.selection=e[9]),2048&n[0]&&(o.deList=e[11]),1&n[0]&&(o.recordId=e[0]._id),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Fn(e){let t,n,o,r;const i=[In,kn,xn,yn,wn,bn,vn,hn,gn,$n,pn],s=[];function l(e,t){return"object"===e[1].type?0:"textarea"===e[1].type||e[1].properties&&"textarea"===e[1].properties.format?1:"number"===e[1].type?2:e[1].properties&&e[1].properties.enum?3:e[1].properties&&e[1].properties.multi?4:"boolean"===e[1].type?5:"date"===e[1].type?6:"datetime"===e[1].type?7:"time"===e[1].properties?.format?8:"email"===e[1].type?9:10}return t=l(e),n=s[t]=i[t](e),{c(){n.c(),o=S()},m(e,n){s[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?s[t].p(e,r):(le(),de(s[a],1,1,(()=>{s[a]=null})),ae(),n=s[t],n?n.p(e,r):(n=s[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o))},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){s[t].d(e),e&&I(o)}}}function _n(e){let t,n;return t=new e[14]({props:{id:e[26](e[23]),class:e[20]&&"hidden",name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[Fn]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),16383&n[0]|32&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Nn(e,t,n){let o,r,i;const s=A(),{FormField:l,TextField:a,DatePicker:u,TimePicker:m,Checkbox:f}=c;let{praefix:p=""}=t,{item:$}=t,{listName:g=""}=t,{record:h}=t,{noForm:v=!1}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{selectionFields:x}=t,{formnovalidate:k}=t,{selection:I=!1}=t,{numberInput:F}=t,{deList:_}=t;const{required:N,readonly:C,hidden:j,pattern:S}=$.properties||{};if("string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const L=(g?g+".":"")+$.name,E=L+(""!==p?"-"+p:""),q=(e,t=L)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(2,p=e.praefix),"item"in e&&n(1,$=e.item),"listName"in e&&n(27,g=e.listName),"record"in e&&n(0,h=e.record),"noForm"in e&&n(3,v=e.noForm),"classId"in e&&n(4,b=e.classId),"eventId"in e&&n(5,w=e.eventId),"disabled"in e&&n(6,y=e.disabled),"selectionFields"in e&&n(7,x=e.selectionFields),"formnovalidate"in e&&n(8,k=e.formnovalidate),"selection"in e&&n(9,I=e.selection),"numberInput"in e&&n(10,F=e.numberInput),"deList"in e&&n(11,_=e.deList)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(12,o=(e=L)=>{let t=q(h);return void 0===t?"":t}),1&e.$$.dirty[0]&&(i=q(h))},n(13,r=((e=L)=>{let t=h["_"+e];return t=d(t),void 0===t?"":t})()),[h,$,p,v,b,w,y,x,k,I,F,_,o,r,l,a,u,f,N,C,j,S,L,E,(e=L)=>{let t=q(h);return t?new Date(t):new Date},e=>({detail:t})=>{let{value:o,checked:r}=t;void 0!==r&&(o=r),n(0,h[L]=e?Xt(o,"%d.%m.%Y"):o,h);const l=Object.values(h).every((e=>!e))&&o;s("notify",{oldValue:i,value:o,add:l,itemName:L,desc:t.description})},()=>"object"===$.type?"comment_"+E:E,g,function(t){R(e,t)},function(t){R(e,t)},function(t){R(e,t)}]}class Cn extends be{constructor(e){var t;super(),document.getElementById("svelte-mea5fj-style")||((t=_("style")).id="svelte-mea5fj-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.form-field div.field > label.checkbox{padding-top:0.5em}",x(document.head,t)),ve(this,e,Nn,_n,b,{praefix:2,item:1,listName:27,record:0,noForm:3,classId:4,eventId:5,disabled:6,selectionFields:7,formnovalidate:8,selection:9,numberInput:10,deList:11},[-1,-1])}}function jn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Sn(e){let t,n,o=e[33]&&Ln(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){e[33]?o?(o.p(e,n),4&n[0]&&ce(o,1)):(o=Ln(e),o.c(),ce(o,1),o.m(t.parentNode,t)):o&&(le(),de(o,1,1,(()=>{o=null})),ae())},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Ln(e){let t,n;return t=new e[15]({props:{title:e[18],class:"eList "+(e[8]?"form":""),$$slots:{default:[Vn]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};256&n[0]&&(o.class="eList "+(e[8]?"form":"")),32767&n[0]|8&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function En(e){let t,n;return t=new ai({props:{schema:e[1],recID:e[0],readonly:e[9]}}),t.$on("choose",(function(){v(e[24](e[33]))&&e[24](e[33]).apply(this,arguments)})),t.$on("back",e[20]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const r={};2&o[0]&&(r.schema=e[1]),1&o[0]&&(r.recID=e[0]),512&o[0]&&(r.readonly=e[9]),t.$set(r)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function qn(e){let t,n,o,r,i,s,l;t=new e[16]({});const a=[zn,Dn],c=[];function d(e,t){return e[10]?0:1}return o=d(e),r=c[o]=a[o](e),s=new ct({props:{className:e[1].class,filterForReady:e[3],praefix:e[4],selectionFields:e[5],rowId:e[0],deList:e[7],showEdit:e[6]}}),s.$on("edit",e[25]),s.$on("choose",e[28]),s.$on("init",e[26]),{c(){$e(t.$$.fragment),n=j(),r.c(),i=j(),$e(s.$$.fragment)},m(e,r){ge(t,e,r),k(e,n,r),c[o].m(e,r),k(e,i,r),ge(s,e,r),l=!0},p(e,t){let n=o;o=d(e),o===n?c[o].p(e,t):(le(),de(c[n],1,1,(()=>{c[n]=null})),ae(),r=c[o],r?r.p(e,t):(r=c[o]=a[o](e),r.c()),ce(r,1),r.m(i.parentNode,i));const l={};2&t[0]&&(l.className=e[1].class),8&t[0]&&(l.filterForReady=e[3]),16&t[0]&&(l.praefix=e[4]),32&t[0]&&(l.selectionFields=e[5]),1&t[0]&&(l.rowId=e[0]),128&t[0]&&(l.deList=e[7]),64&t[0]&&(l.showEdit=e[6]),s.$set(l)},i(e){l||(ce(t.$$.fragment,e),ce(r),ce(s.$$.fragment,e),l=!0)},o(e){de(t.$$.fragment,e),de(r),de(s.$$.fragment,e),l=!1},d(e){he(t,e),e&&I(n),c[o].d(e),e&&I(i),he(s,e)}}}function Dn(e){let t,n,o,r,i;return n=new e[17]({props:{outline:!0,$$slots:{default:[On]},$$scope:{ctx:e}}}),n.$on("click",e[21]),r=new e[17]({props:{filled:!0,$$slots:{default:[Tn]},$$scope:{ctx:e}}}),r.$on("click",e[22]),{c(){t=_("div"),$e(n.$$.fragment),o=j(),$e(r.$$.fragment),D(t,"class","form--buttons svelte-jb5mrh")},m(e,s){k(e,t,s),ge(n,t,null),x(t,o),ge(r,t,null),i=!0},p(e,t){const o={};8&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};8&t[1]&&(i.$$scope={dirty:t,ctx:e}),r.$set(i)},i(e){i||(ce(n.$$.fragment,e),ce(r.$$.fragment,e),i=!0)},o(e){de(n.$$.fragment,e),de(r.$$.fragment,e),i=!1},d(e){e&&I(t),he(n),he(r)}}}function zn(e){let t,n,o,r,i,s,l=e[13]&&Bn(e);return o=new e[17]({props:{outline:!0,$$slots:{default:[Mn]},$$scope:{ctx:e}}}),o.$on("click",e[21]),i=new e[17]({props:{disabled:!e[14],filled:!0,$$slots:{default:[Pn]},$$scope:{ctx:e}}}),i.$on("click",e[23]),{c(){l&&l.c(),t=j(),n=_("div"),$e(o.$$.fragment),r=j(),$e(i.$$.fragment),D(n,"class","form--buttons svelte-jb5mrh")},m(e,a){l&&l.m(e,a),k(e,t,a),k(e,n,a),ge(o,n,null),x(n,r),ge(i,n,null),s=!0},p(e,n){e[13]?l?(l.p(e,n),8192&n[0]&&ce(l,1)):(l=Bn(e),l.c(),ce(l,1),l.m(t.parentNode,t)):l&&(le(),de(l,1,1,(()=>{l=null})),ae());const r={};8&n[1]&&(r.$$scope={dirty:n,ctx:e}),o.$set(r);const s={};16384&n[0]&&(s.disabled=!e[14]),8&n[1]&&(s.$$scope={dirty:n,ctx:e}),i.$set(s)},i(e){s||(ce(l),ce(o.$$.fragment,e),ce(i.$$.fragment,e),s=!0)},o(e){de(l),de(o.$$.fragment,e),de(i.$$.fragment,e),s=!1},d(e){l&&l.d(e),e&&I(t),e&&I(n),he(o),he(i)}}}function On(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Tn(e){let t;return{c(){t=C("Neu")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Bn(e){let t,n;return t=new Cn({props:{item:e[11],record:{_id:"",[e[11].name]:""},noForm:"true",classId:"sel_"+e[11].name,eventId:e[12],deList:e[13]}}),t.$on("notify",e[27]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};2048&n[0]&&(o.item=e[11]),2048&n[0]&&(o.record={_id:"",[e[11].name]:""}),2048&n[0]&&(o.classId="sel_"+e[11].name),4096&n[0]&&(o.eventId=e[12]),8192&n[0]&&(o.deList=e[13]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Mn(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Pn(e){let t;return{c(){t=C("Übernehmen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Vn(e){let t,n,o,r;const i=[qn,En],s=[];function l(e,t){return e[33].length&&!e[8]?0:1}return t=l(e),n=s[t]=i[t](e),{c(){n.c(),o=S()},m(e,n){s[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?s[t].p(e,r):(le(),de(s[a],1,1,(()=>{s[a]=null})),ae(),n=s[t],n?n.p(e,r):(n=s[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o))},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){s[t].d(e),e&&I(o)}}}function Wn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function An(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Wn,then:Sn,catch:jn,value:33,blocks:[,,,]};return ue(n=e[19](e[2]),r),{c(){t=S(),r.block.c()},m(e,n){k(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,o){e=t,r.ctx=e,4&o[0]&&n!==(n=e[19](e[2]))&&ue(n,r)||me(r,e,o)},i(e){o||(ce(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){de(r.blocks[e])}o=!1},d(e){e&&I(t),r.block.d(e),r.token=null,r=null}}}function Rn(e,n,o){const{Dialog:r,Divider:i,Button:s}=c,l=A();let{schema:a}=n,{recID:d}=n,{isOpening:u=!0}=n,{filterForReady:m=!1}=n,{praefix:f=""}=n,{selectionFields:p=!1}=n,{showEdit:$=!0}=n,{deList:g}=n,h=a.identity.designation;a.class;let v,b,w,y,x,k,I,F,_=!1;return e.$$set=e=>{"schema"in e&&o(1,a=e.schema),"recID"in e&&o(0,d=e.recID),"isOpening"in e&&o(2,u=e.isOpening),"filterForReady"in e&&o(3,m=e.filterForReady),"praefix"in e&&o(4,f=e.praefix),"selectionFields"in e&&o(5,p=e.selectionFields),"showEdit"in e&&o(6,$=e.showEdit),"deList"in e&&o(7,g=e.deList)},[d,a,u,m,f,p,$,g,_,v,w,x,k,I,F,r,i,s,h,async e=>{if(!e)return!1;const n=await Zr(a.class,a.id);if(b=p&&p?.find((e=>a.class===e.refClass.split(":")[0])),o(10,w=b?.value?.get&&b.value.get(f)),w){y=b.refClass;const e=y.split(":")[0];o(11,x=b.parentClass.find((t=>t.name===e)));const n=await t.getSchemaByClass(x.refClass);o(12,k=n.id)}return n},()=>{o(8,_=!1),d||l("back"),$||l("back")},()=>{o(8,_=!1),l("back")},()=>{o(0,d=!1),o(9,v=!1),o(8,_=!0)},()=>{l("choose",{row:{_id:F}})},e=>({detail:{row:e}})=>{let t=a.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let r=a.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(r){e[`${n}_${o}`]=e[n][o]}})),l("choose",{row:e})},({detail:e})=>{o(9,v=!!e._task.visum||"Closed"===e._task.status),o(0,d=e._docId),o(8,_=!0)},({detail:e})=>{w&&o(13,I=e)},({detail:e})=>{o(14,F=e.value)},function(t){R(e,t)}]}class Hn extends be{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=_("style")).id="svelte-jb5mrh-style",t.textContent=".eList .flex button.btn{width:max-content !important}.dialog.eList{max-height:90vh}.form--buttons.svelte-jb5mrh{display:flex;gap:1em;padding:0.5em 0}",x(document.head,t)),ve(this,e,Rn,An,b,{schema:1,recID:0,isOpening:2,filterForReady:3,praefix:4,selectionFields:5,showEdit:6,deList:7},[-1,-1])}}const{document:Yn}=fe;function Gn(e){e[25]=e[27].list,e[26]=e[27].items}function Jn(e,t,n){const o=e.slice();return o[28]=t[n],o}function Un(e,t,n){const o=e.slice();return o[31]=t[n],o}function Qn(e,t,n){const o=e.slice();return o[31]=t[n],o}function Kn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Xn(e){let t,n,o,r,i,s,l,a,c,d,u,m,f,p,$,g,h,v;function b(t){e[22](t)}Gn(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Zn]},$$scope:{ctx:e}}}),n.$on("click",e[21]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),Y.push((()=>pe(s,"value",b))),s.$on("input",e[12]),d=new De({props:{size:"18"}});let y=e[26]?.length&&function(e){let t,n,o=e[26],r=[];for(let t=0;t<o.length;t+=1)r[t]=eo(Qn(e,o,t));return{c(){t=_("thead"),n=_("tr");for(let e=0;e<r.length;e+=1)r[e].c();D(n,"class","svelte-14hcfjl"),D(t,"class","svelte-14hcfjl")},m(e,o){k(e,t,o),x(t,n);for(let e=0;e<r.length;e+=1)r[e].m(n,null)},p(e,t){if(2048&t[0]){let i;for(o=e[26],i=0;i<o.length;i+=1){const s=Qn(e,o,i);r[i]?r[i].p(s,t):(r[i]=eo(s),r[i].c(),r[i].m(n,null))}for(;i<r.length;i+=1)r[i].d(1);r.length=o.length}},d(e){e&&I(t),F(r,e)}}}(e),N=e[25]?.length&&function(e){let t,n=e[25],o=[];for(let t=0;t<n.length;t+=1)o[t]=oo(Jn(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=S()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);k(e,t,n)},p(e,r){if(11779&r[0]){let i;for(n=e[25],i=0;i<n.length;i+=1){const s=Jn(e,n,i);o[i]?o[i].p(s,r):(o[i]=oo(s),o[i].c(),o[i].m(t.parentNode,t))}for(;i<o.length;i+=1)o[i].d(1);o.length=n.length}},d(e){F(o,e),e&&I(t)}}}(e);return{c(){t=_("div"),$e(n.$$.fragment),o=j(),r=_("div"),i=C("Suchen: "),$e(s.$$.fragment),a=j(),c=_("span"),$e(d.$$.fragment),u=j(),m=_("div"),f=_("table"),y&&y.c(),p=j(),$=_("tbody"),N&&N.c(),D(t,"class","form--buttons svelte-14hcfjl"),D(c,"class","feather pointer svelte-14hcfjl"),T(r,"margin-bottom","1em"),T(r,"position","relative"),D(f,"striped",""),D(f,"class","svelte-14hcfjl"),D(m,"class","eList svelte-14hcfjl")},m(l,b){k(l,t,b),ge(n,t,null),k(l,o,b),k(l,r,b),x(r,i),ge(s,r,null),x(r,a),x(r,c),ge(d,c,null),k(l,u,b),k(l,m,b),x(m,f),y&&y.m(f,null),x(f,p),x(f,$),N&&N.m($,null),g=!0,h||(v=L(c,"click",e[14]),h=!0)},p(e,t){Gn(e);const o={};32&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const r={};!l&&2&t[0]&&(l=!0,r.value=e[1],ee((()=>l=!1))),s.$set(r),e[26]?.length&&y.p(e,t),e[25]?.length&&N.p(e,t)},i(e){g||(ce(n.$$.fragment,e),ce(s.$$.fragment,e),ce(d.$$.fragment,e),g=!0)},o(e){de(n.$$.fragment,e),de(s.$$.fragment,e),de(d.$$.fragment,e),g=!1},d(e){e&&I(t),he(n),e&&I(o),e&&I(r),he(s),he(d),e&&I(u),e&&I(m),y&&y.d(),N&&N.d(),h=!1,v()}}}function Zn(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function eo(e){let t,n,o=e[31]?.designation+"";return{c(){t=_("th"),n=C(o),D(t,"class","svelte-14hcfjl")},m(e,o){k(e,t,o),x(t,n)},p:p,d(e){e&&I(t)}}}function to(e){let t,n,o=e[26],r=[];for(let t=0;t<o.length;t+=1)r[t]=no(Un(e,o,t));return{c(){t=_("tr");for(let e=0;e<r.length;e+=1)r[e].c();n=j(),D(t,"class","pointer svelte-14hcfjl"),B(t,"active",e[28]._id===e[0])},m(e,o){k(e,t,o);for(let e=0;e<r.length;e+=1)r[e].m(t,null);x(t,n)},p(e,i){if(3584&i[0]){let s;for(o=e[26],s=0;s<o.length;s+=1){const l=Un(e,o,s);r[s]?r[s].p(l,i):(r[s]=no(l),r[s].c(),r[s].m(t,n))}for(;s<r.length;s+=1)r[s].d(1);r.length=o.length}2049&i[0]&&B(t,"active",e[28]._id===e[0])},d(e){e&&I(t),F(r,e)}}}function no(e){let t,n,o,r,i=e[9](e[28],e[31])+"";return{c(){t=_("td"),n=C(i),D(t,"class","svelte-14hcfjl")},m(i,s){k(i,t,s),x(t,n),o||(r=L(t,"click",q(e[10](e[28]))),o=!0)},p(t,n){e=t},d(e){e&&I(t),o=!1,r()}}}function oo(e){let t,n=e[13](e[28],e[26],e[1]),o=n&&to(e);return{c(){o&&o.c(),t=S()},m(e,n){o&&o.m(e,n),k(e,t,n)},p(e,r){2&r[0]&&(n=e[13](e[28],e[26],e[1])),n?o?o.p(e,r):(o=to(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&I(t)}}}function ro(e){let t,n;return t=new e[5]({}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:p,i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function io(e){let t,n,o,r;t=new e[4]({});let i={ctx:e,current:null,token:null,hasCatch:!1,pending:ro,then:Xn,catch:Kn,value:27,blocks:[,,,]};return ue(e[11](),i),{c(){$e(t.$$.fragment),n=j(),o=S(),i.block.c()},m(e,s){ge(t,e,s),k(e,n,s),k(e,o,s),i.block.m(e,i.anchor=s),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(t,n){me(i,e=t,n)},i(e){r||(ce(t.$$.fragment,e),ce(i.block),r=!0)},o(e){de(t.$$.fragment,e);for(let e=0;e<3;e+=1){de(i.blocks[e])}r=!1},d(e){he(t,e),e&&I(n),e&&I(o),i.block.d(e),i.token=null,i=null}}}function so(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[io]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};3&n[0]|32&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function lo(e,o,r){const i=A(),{Dialog:s,Divider:l,Loading:a,TextField:u,Button:f}=c;let{item:p}=o,{classId:$}=o,{className:g}=o,{rowId:h}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:w}=o,y="",x=$+Math.floor(9e3*Math.random()+1e3).toString()+"search";const k=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?m(n):d(e[`_${t.name}`]||e[t.name]||"")},I=t.getSchemaByClass(g);W((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(x)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await I;e.eventId===t.id&&ri(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&r(15,p=e.item),"classId"in e&&r(16,$=e.classId),"className"in e&&r(17,g=e.className),"rowId"in e&&r(0,h=e.rowId),"viewName"in e&&r(18,v=e.viewName),"viewValue"in e&&r(19,b=e.viewValue),"recordId"in e&&r(20,w=e.recordId)},[h,y,i,s,l,a,u,f,x,k,e=>()=>i("choose",{row:e}),async()=>{const e=await I,n="."+$+"#"+v,o=document.querySelector(n);let r={[v]:o?.value||w};if(p.refItem){const e="."+$+"#"+p.refItem,t=document.querySelector(e);if(t){const e={$or:[{[p.refItem]:t.value},{[p.refItem]:{$exists:!0,$eq:""}}]};r={...r,...e}}}let i=[];r[v]&&(i=await t.getSectionView(e.class,r,!0));let s=[],l=e.display;return l&&l.length?l.map((t=>{const[n,o]=t.split(".");let r=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));r&&(r={...r},r.name=`${n}_${o}`,i=i.map((e=>(e[n]&&(e[r.name]=e[n][o]),e)))),r||(r=e.items.find((e=>e.name===n))),s.find((e=>e?.name===n))||s.push(r)})):s=e.items,{list:i,items:s}},({detail:{value:e}})=>{r(1,y=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(k(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{r(1,y="")},p,$,g,v,b,w,()=>i("back"),function(e){y=e,r(1,y)}]}class ao extends be{constructor(e){var t;super(),Yn.getElementById("svelte-14hcfjl-style")||((t=_("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",x(Yn.head,t)),ve(this,e,lo,so,b,{item:15,classId:16,className:17,rowId:0,viewName:18,viewValue:19,recordId:20},[-1,-1])}}const{document:co}=fe;function uo(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function mo(e){let t,n,o,i,s,l,a,c,d,u,m,f,p,$,g;n=new r({props:{class:"full-width",id:e[19],value:e[2],rows:"1",required:e[1],disabled:e[3],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"}}),n.$on("click",e[21]()),n.$on("onFocus",e[21](e[19]));const h=[po,fo],v=[];function b(e,t){return e[3]?e[0]?1:-1:0}~(i=b(e))&&(s=v[i]=h[i](e));let w=!e[3]&&vo(e);function F(t){e[29](t)}let N={class:"tModal",noClickaway:!0,$$slots:{default:[xo]},$$scope:{ctx:e}};void 0!==e[14]&&(N.open=e[14]),m=new e[18]({props:N}),Y.push((()=>pe(m,"open",F)));let C=e[15]&&ko(e);return{c(){t=_("div"),$e(n.$$.fragment),o=j(),s&&s.c(),l=j(),a=_("input"),d=j(),w&&w.c(),u=j(),$e(m.$$.fragment),p=j(),C&&C.c(),$=S(),D(a,"class",c=y(e[6]||e[7])+" svelte-jox15l"),D(a,"id",e[4]),D(a,"name",e[4]),a.value=e[0],a.hidden=!0,T(t,"position","relative")},m(e,r){k(e,t,r),ge(n,t,null),x(t,o),~i&&v[i].m(t,null),x(t,l),x(t,a),x(t,d),w&&w.m(t,null),k(e,u,r),ge(m,e,r),k(e,p,r),C&&C.m(e,r),k(e,$,r),g=!0},p(e,o){const r={};4&o[0]&&(r.value=e[2]),2&o[0]&&(r.required=e[1]),8&o[0]&&(r.disabled=e[3]),n.$set(r);let d=i;i=b(e),i===d?~i&&v[i].p(e,o):(s&&(le(),de(v[d],1,1,(()=>{v[d]=null})),ae()),~i?(s=v[i],s?s.p(e,o):(s=v[i]=h[i](e),s.c()),ce(s,1),s.m(t,l)):s=null),(!g||192&o[0]&&c!==(c=y(e[6]||e[7])+" svelte-jox15l"))&&D(a,"class",c),(!g||16&o[0])&&D(a,"id",e[4]),(!g||16&o[0])&&D(a,"name",e[4]),(!g||1&o[0]&&a.value!==e[0])&&(a.value=e[0]),e[3]?w&&(le(),de(w,1,1,(()=>{w=null})),ae()):w?(w.p(e,o),8&o[0]&&ce(w,1)):(w=vo(e),w.c(),ce(w,1),w.m(t,null));const u={};32673&o[0]|64&o[1]&&(u.$$scope={dirty:o,ctx:e}),!f&&16384&o[0]&&(f=!0,u.open=e[14],ee((()=>f=!1))),m.$set(u),e[15]?C?(C.p(e,o),32768&o[0]&&ce(C,1)):(C=ko(e),C.c(),ce(C,1),C.m($.parentNode,$)):C&&(le(),de(C,1,1,(()=>{C=null})),ae())},i(e){g||(ce(n.$$.fragment,e),ce(s),ce(w),ce(m.$$.fragment,e),ce(C),g=!0)},o(e){de(n.$$.fragment,e),de(s),de(w),de(m.$$.fragment,e),de(C),g=!1},d(e){e&&I(t),he(n),~i&&v[i].d(),w&&w.d(),e&&I(u),he(m,e),e&&I(p),C&&C.d(e),e&&I($)}}}function fo(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ho,then:go,catch:$o,value:36,blocks:[,,,]};return ue(e[25](),o),{c(){t=S(),o.block.c()},m(e,r){k(e,t,r),o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){me(o,e=t,n)},i(e){n||(ce(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){de(o.blocks[e])}n=!1},d(e){e&&I(t),o.block.d(e),o.token=null,o=null}}}function po(e){let t,n,o,r,i;return n=new Pe({props:{size:"18"}}),{c(){t=_("span"),$e(n.$$.fragment),D(t,"class","feather pointer svelte-jox15l")},m(s,l){k(s,t,l),ge(n,t,null),o=!0,r||(i=[L(t,"click",e[21]()),L(t,"choose",e[22])],r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n),r=!1,h(i)}}}function $o(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function go(e){let t,n,o,r;return o=new Te({props:{size:"18"}}),{c(){t=_("span"),n=_("a"),$e(o.$$.fragment),D(n,"href",e[36]),D(n,"target","_blank"),D(t,"class","feather pointer svelte-jox15l")},m(e,i){k(e,t,i),x(t,n),ge(o,n,null),r=!0},p:p,i(e){r||(ce(o.$$.fragment,e),r=!0)},o(e){de(o.$$.fragment,e),r=!1},d(e){e&&I(t),he(o)}}}function ho(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function vo(e){let t,n,o,r,i;return n=new De({props:{size:"18"}}),{c(){t=_("span"),$e(n.$$.fragment),D(t,"class","feather2 pointer svelte-jox15l")},m(s,l){k(s,t,l),ge(n,t,null),o=!0,r||(i=L(t,"click",e[24]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n),r=!1,i()}}}function bo(e){let t,n;return t=new Hn({props:{schema:e[13],recID:e[0],isOpening:e[14],filterForReady:"true",selectionFields:e[10],deList:e[12],praefix:e[9]}}),t.$on("choose",e[22]),t.$on("back",e[23]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};8192&n[0]&&(o.schema=e[13]),1&n[0]&&(o.recID=e[0]),16384&n[0]&&(o.isOpening=e[14]),1024&n[0]&&(o.selectionFields=e[10]),4096&n[0]&&(o.deList=e[12]),512&n[0]&&(o.praefix=e[9]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function wo(e){let t,n,o=e[14]&&yo(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){e[14]?o?(o.p(e,n),16384&n[0]&&ce(o,1)):(o=yo(e),o.c(),ce(o,1),o.m(t.parentNode,t)):o&&(le(),de(o,1,1,(()=>{o=null})),ae())},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function yo(e){let t,n;return t=new ao({props:{item:e[5],className:e[13].class,classId:e[7],rowId:e[0],recordId:e[8],viewName:e[11],viewValue:""}}),t.$on("choose",e[22]),t.$on("back",e[23]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.item=e[5]),8192&n[0]&&(o.className=e[13].class),128&n[0]&&(o.classId=e[7]),1&n[0]&&(o.rowId=e[0]),256&n[0]&&(o.recordId=e[8]),2048&n[0]&&(o.viewName=e[11]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function xo(e){let t,n,o,r;const i=[wo,bo],s=[];function l(e,t){return e[11]?0:1}return t=l(e),n=s[t]=i[t](e),{c(){n.c(),o=S()},m(e,n){s[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?s[t].p(e,r):(le(),de(s[a],1,1,(()=>{s[a]=null})),ae(),n=s[t],n?n.p(e,r):(n=s[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o))},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){s[t].d(e),e&&I(o)}}}function ko(e){let t,n,o;function r(t){e[30](t)}let i={class:"tModal",noClickaway:!0,$$slots:{default:[Fo]},$$scope:{ctx:e}};return void 0!==e[15]&&(i.open=e[15]),t=new e[18]({props:i}),Y.push((()=>pe(t,"open",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};73729&o[0]|64&o[1]&&(r.$$scope={dirty:o,ctx:e}),!n&&32768&o[0]&&(n=!0,r.open=e[15],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function Io(e){let t,n;return t=new ai({props:{schema:e[13],recID:e[0],readonly:!0}}),t.$on("back",e[23]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};8192&n[0]&&(o.schema=e[13]),1&n[0]&&(o.recID=e[0]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Fo(e){let t,n;return t=new e[17]({props:{title:e[16],$$slots:{default:[Io]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};65536&n[0]&&(o.title=e[16]),8193&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function _o(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function No(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:_o,then:mo,catch:uo,value:35,blocks:[,,,]};return ue(e[20](),o),{c(){t=S(),o.block.c()},m(e,r){k(e,t,r),o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){me(o,e=t,n)},i(e){n||(ce(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){de(o.blocks[e])}n=!1},d(e){e&&I(t),o.block.d(e),o.token=null,o=null}}}function Co(e,n,o){const r=A(),{Dialog:i,Modal:s}=c;let{id:l}=n,{item:a}=n,{value:d=""}=n,{desc:u=""}=n,{noForm:m=!1}=n,{classId:p}=n,{eventId:$}=n,{recordId:g}=n,{required:h}=n,{disabled:v}=n,{readonly:b}=n,{praefix:w}=n,{selectionFields:y}=n,{formnovalidate:x}=n,{selection:k}=n,{deList:I}=n;const F="comment_"+l;let _,N,C,j=!1;v||=b;const S=e=>{e&&(o(2,u=f(C,e)),r("change",{value:d,description:u}),r("task",{row:e}))},L=()=>{o(14,j=!1),o(15,_=!1)};return e.$$set=e=>{"id"in e&&o(4,l=e.id),"item"in e&&o(5,a=e.item),"value"in e&&o(0,d=e.value),"desc"in e&&o(2,u=e.desc),"noForm"in e&&o(6,m=e.noForm),"classId"in e&&o(7,p=e.classId),"eventId"in e&&o(26,$=e.eventId),"recordId"in e&&o(8,g=e.recordId),"required"in e&&o(1,h=e.required),"disabled"in e&&o(3,v=e.disabled),"readonly"in e&&o(27,b=e.readonly),"praefix"in e&&o(9,w=e.praefix),"selectionFields"in e&&o(10,y=e.selectionFields),"formnovalidate"in e&&o(28,x=e.formnovalidate),"selection"in e&&o(11,k=e.selection),"deList"in e&&o(12,I=e.deList)},e.$$.update=()=>{268435458&e.$$.dirty[0]&&o(1,h=h&&!x),8225&e.$$.dirty[0]&&d&&C&&Promise.resolve(ei(a.refClass,C.id,d)).then((e=>S(e))),8193&e.$$.dirty[0]&&!d&&C&&S({})},[d,h,u,v,l,a,m,p,g,w,y,k,I,C,j,_,N,i,s,F,async()=>{if(o(13,C=await t.getSchemaByClass(a.refClass)),$&&d&&!v){const e=await t.getSchema($);e.input?.find((e=>e===a.refClass))&&o(3,v=!0)}return o(16,N=C.identity.designation),!0},e=>t=>{if("BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}o(14,j=!0)},({detail:e})=>{o(0,d=e.row._id),L()},L,()=>{o(0,d=o(2,u="")),r("change",{value:d,description:u}),r("task",{row:{_task:{event:C.id,_id:!1}}})},async()=>{if(!d)return;const e=(await ei(a.refClass,C.id,d))._task._id;return`/task/${C.id}/${e}/task?view=standalone`},$,b,x,function(e){j=e,o(14,j)},function(e){_=e,o(15,_)}]}class jo extends be{constructor(e){var t;super(),co.getElementById("svelte-jox15l-style")||((t=_("style")).id="svelte-jox15l-style",t.textContent=".feather.svelte-jox15l{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-jox15l{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:invalid{border-bottom:1px #b80000 solid !important;background-color:#fbeeee !important}",x(co.head,t)),ve(this,e,Co,No,b,{id:4,item:5,value:0,desc:2,noForm:6,classId:7,eventId:26,recordId:8,required:1,disabled:3,readonly:27,praefix:9,selectionFields:10,formnovalidate:28,selection:11,deList:12},[-1,-1])}}function So(e){let t,n;return t=new e[15]({props:{inputClass:e[3]||e[4],disabled:e[6],formnovalidate:e[8],readonly:e[19],pattern:e[21],required:e[18],id:e[23],name:e[22],value:e[12]()}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),4096&n[0]&&(o.value=e[12]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Lo(e){let t,n;return t=new e[15]({props:{inputClass:e[3]||e[4],disabled:e[6],formnovalidate:e[8],readonly:e[19],required:e[18],type:"email",id:e[23],name:e[22],value:e[12]()}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),4096&n[0]&&(o.value=e[12]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Eo(e){let t,n;return t=new fn({props:{inputClass:e[3]||e[4],disabled:e[6],readonly:e[19],required:e[18],id:e[23],item:e[1],value:e[12](),praefix:e[2]}}),t.$on("blur",e[25]()),t.$on("checkRange",e[30]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.item=e[1]),4096&n[0]&&(o.value=e[12]()),4&n[0]&&(o.praefix=e[2]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function qo(e){let t,n;return t=new an({props:{classId:e[4],id:e[23],disabled:e[6],required:e[18],value:e[24](),noForm:e[3]}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Do(e){let t,n;return t=new e[16]({props:{inputClass:e[3]||e[4],required:e[18],disabled:e[6],id:e[23],name:e[22],value:e[24](),closeOnSelection:!0}}),t.$on("change",e[25](!0)),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function zo(e){let t,n;return t=new e[17]({props:{round:!0,inputClass:e[3]||e[4],disabled:e[6]||e[19],required:e[18],id:e[23],name:e[22],checked:e[12]()}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]||e[19]),4096&n[0]&&(o.checked=e[12]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Oo(e){let t,n;return t=new Rt({props:{classId:e[4],disabled:e[6],required:e[18],id:e[23],item:e[1],record:e[0],value:e[12](),noForm:e[3],multi:e[1].properties.multi,numberInput:e[10],praefix:e[2]}}),t.$on("blur",e[25]()),t.$on("invalid",e[29]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),2&n[0]&&(o.multi=e[1].properties.multi),1024&n[0]&&(o.numberInput=e[10]),4&n[0]&&(o.praefix=e[2]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function To(e){let t,n;return t=new Ut({props:{classId:e[4],disabled:e[6],required:e[18],id:e[23],item:e[1],value:e[12](),noForm:e[3]}}),t.$on("blur",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.item=e[1]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Bo(e){let t,n;return t=new mt({props:{classId:e[4],disabled:e[6],formnovalidate:e[8],required:e[18],readonly:e[19],id:e[23],item:e[1],value:e[12](),noForm:e[3]}}),t.$on("blur",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),2&n[0]&&(o.item=e[1]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Mo(e){let t,n;return t=new r({props:{classId:e[4],disabled:e[6],readonly:e[19],id:e[23],name:e[1].name,value:e[12](),noForm:e[3]}}),t.$on("blur",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.name=e[1].name),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Po(e){let t,n;return t=new jo({props:{classId:e[4],eventId:e[5],required:e[18],disabled:e[6],formnovalidate:e[8],readonly:e[19],id:e[23],item:e[1],desc:e[13],value:e[12](),noForm:e[3],praefix:e[2],selectionFields:e[7],selection:e[9],deList:e[11],recordId:e[0]._id}}),t.$on("task",e[28]),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),32&n[0]&&(o.eventId=e[5]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),2&n[0]&&(o.item=e[1]),8192&n[0]&&(o.desc=e[13]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),4&n[0]&&(o.praefix=e[2]),128&n[0]&&(o.selectionFields=e[7]),512&n[0]&&(o.selection=e[9]),2048&n[0]&&(o.deList=e[11]),1&n[0]&&(o.recordId=e[0]._id),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Vo(e){let t,n,o,r;const i=[Po,Mo,Bo,To,Oo,zo,Do,qo,Eo,Lo,So],s=[];function l(e,t){return"object"===e[1].type?0:"textarea"===e[1].type||e[1].properties&&"textarea"===e[1].properties.format?1:"number"===e[1].type?2:e[1].properties&&e[1].properties.enum?3:e[1].properties&&e[1].properties.multi?4:"boolean"===e[1].type?5:"date"===e[1].type?6:"datetime"===e[1].type?7:"time"===e[1].properties?.format?8:"email"===e[1].type?9:10}return t=l(e),n=s[t]=i[t](e),{c(){n.c(),o=S()},m(e,n){s[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?s[t].p(e,r):(le(),de(s[a],1,1,(()=>{s[a]=null})),ae(),n=s[t],n?n.p(e,r):(n=s[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o))},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){s[t].d(e),e&&I(o)}}}function Wo(e){let t,n;return t=new e[14]({props:{id:e[26](e[23]),class:e[20]&&"hidden",name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[Vo]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),16383&n[0]|32&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Ao(e,t,n){let o,r,i;const s=A(),{FormField:l,TextField:a,DatePicker:u,TimePicker:m,Checkbox:f}=c;let{praefix:p=""}=t,{item:$}=t,{listName:g=""}=t,{record:h}=t,{noForm:v=!1}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{selectionFields:x}=t,{formnovalidate:k}=t,{selection:I=!1}=t,{numberInput:F}=t,{deList:_}=t;const{required:N,readonly:C,hidden:j,pattern:S}=$.properties||{};if("string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const L=(g?g+".":"")+$.name,E=L+(""!==p?"-"+p:""),q=(e,t=L)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(2,p=e.praefix),"item"in e&&n(1,$=e.item),"listName"in e&&n(27,g=e.listName),"record"in e&&n(0,h=e.record),"noForm"in e&&n(3,v=e.noForm),"classId"in e&&n(4,b=e.classId),"eventId"in e&&n(5,w=e.eventId),"disabled"in e&&n(6,y=e.disabled),"selectionFields"in e&&n(7,x=e.selectionFields),"formnovalidate"in e&&n(8,k=e.formnovalidate),"selection"in e&&n(9,I=e.selection),"numberInput"in e&&n(10,F=e.numberInput),"deList"in e&&n(11,_=e.deList)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(12,o=(e=L)=>{let t=q(h);return void 0===t?"":t}),1&e.$$.dirty[0]&&(i=q(h))},n(13,r=((e=L)=>{let t=h["_"+e];return t=d(t),void 0===t?"":t})()),[h,$,p,v,b,w,y,x,k,I,F,_,o,r,l,a,u,f,N,C,j,S,L,E,(e=L)=>{let t=q(h);return t?new Date(t):new Date},e=>({detail:t})=>{let{value:o,checked:r}=t;void 0!==r&&(o=r),n(0,h[L]=e?Xt(o,"%d.%m.%Y"):o,h);const l=Object.values(h).every((e=>!e))&&o;s("notify",{oldValue:i,value:o,add:l,itemName:L,desc:t.description})},()=>"object"===$.type?"comment_"+E:E,g,function(t){R(e,t)},function(t){R(e,t)},function(t){R(e,t)}]}class Ro extends be{constructor(e){var t;super(),document.getElementById("svelte-mea5fj-style")||((t=_("style")).id="svelte-mea5fj-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.form-field div.field > label.checkbox{padding-top:0.5em}",x(document.head,t)),ve(this,e,Ao,Wo,b,{praefix:2,item:1,listName:27,record:0,noForm:3,classId:4,eventId:5,disabled:6,selectionFields:7,formnovalidate:8,selection:9,numberInput:10,deList:11},[-1,-1])}}const{document:Ho}=fe;function Yo(e,t,n){const o=e.slice();return o[62]=t[n],o[64]=n,o}function Go(e,t,n){const o=e.slice();return o[71]=t[n],o}function Jo(e,t,n){const o=e.slice();return o[66]=t[n].title,o[67]=t[n].toDelete,o[68]=t[n].icon,o}function Uo(e){let t,n;return t=new e[13]({props:{name:"Total Wochen",nameClass:"formField_italic",$$slots:{default:[Qo]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};64&n[0]|4096&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Qo(e){let t,n,o;function r(t){e[38](t)}let i={item:e[22],disabled:!0};return void 0!==e[6]&&(i.value=e[6]),t=new mt({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&64&o[0]&&(n=!0,r.value=e[6],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function Ko(e){let t,n;return t=new e[13]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[Xo]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};512&n[0]|4096&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Xo(e){let t,n,o;function r(t){e[39](t)}let i={item:e[20],disabled:!0};return void 0!==e[9]&&(i.value=e[9]),t=new mt({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&512&o[0]&&(n=!0,r.value=e[9],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function Zo(e){let t,n;return t=new e[13]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[er]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]|4096&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function er(e){let t,n,o;function r(t){e[40](t)}let i={item:e[18],disabled:!0};return void 0!==e[5]&&(i.value=e[5]),t=new mt({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&32&o[0]&&(n=!0,r.value=e[5],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function tr(e){let t,n;return t=new e[16]({props:{class:e[10][e[64]],$$slots:{handle:[cr,({toggle:e})=>({65:e}),({toggle:e})=>[0,0,e?8:0]],default:[ir,({toggle:e})=>({65:e}),({toggle:e})=>[0,0,e?8:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){v(e[61])&&e[61].apply(this,arguments)})),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const r={};1024&o[0]&&(r.class=e[10][e[64]]),6543&o[0]|4104&o[2]&&(r.$$scope={dirty:o,ctx:e}),t.$set(r)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function nr(e){let t,n;return t=new Ro({props:{praefix:e[64],item:e[71],eventId:e[3],record:e[62],noForm:pr,classId:e[2],disabled:e[0],selectionFields:e[23],numberInput:e[12],formnovalidate:e[64]===e[7].length-1||e[7][e[64]]._delete}}),t.$on("notify",(function(){v(e[25](e[71],e[64]))&&e[25](e[71],e[64]).apply(this,arguments)})),t.$on("task",e[41]),t.$on("invalid",e[26]),t.$on("checkRange",e[27]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const r={};2&o[0]&&(r.item=e[71]),8&o[0]&&(r.eventId=e[3]),128&o[0]&&(r.record=e[62]),4&o[0]&&(r.classId=e[2]),1&o[0]&&(r.disabled=e[0]),4096&o[0]&&(r.numberInput=e[12]),128&o[0]&&(r.formnovalidate=e[64]===e[7].length-1||e[7][e[64]]._delete),t.$set(r)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function or(e){let t,n,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=nr(Go(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(243273871&n[0]){let s;for(o=e[1].item,s=0;s<o.length;s+=1){const i=Go(e,o,s);r[s]?(r[s].p(i,n),ce(r[s],1)):(r[s]=nr(i),r[s].c(),ce(r[s],1),r[s].m(t.parentNode,t))}for(le(),s=o.length;s<r.length;s+=1)i(s);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function rr(e){let t,n,o=e[7][e[64]]._delete,r=or(e);return{c(){r.c(),t=S()},m(e,o){r.m(e,o),k(e,t,o),n=!0},p(e,n){128&n[0]&&b(o,o=e[7][e[64]]._delete)?(le(),de(r,1,1,p),ae(),r=or(e),r.c(),ce(r),r.m(t.parentNode,t)):r.p(e,n)},i(e){n||(ce(r),n=!0)},o(e){de(r),n=!1},d(e){e&&I(t),r.d(e)}}}function ir(e){let t,n,o,r,i=e[7].length,s=rr(e);return{c(){t=_("div"),s.c(),o=j(),D(t,"id",n=`accordion-content-${e[2]}-${e[1].name}-${e[64]}`)},m(e,n){k(e,t,n),s.m(t,null),k(e,o,n),r=!0},p(e,o){128&o[0]&&b(i,i=e[7].length)?(le(),de(s,1,1,p),ae(),s=rr(e),s.c(),ce(s),s.m(t,null)):s.p(e,o),(!r||6&o[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}-${e[64]}`))&&D(t,"id",n)},i(e){r||(ce(s),r=!0)},o(e){de(s),r=!1},d(e){e&&I(t),s.d(e),e&&I(o)}}}function sr(e){let t,n,o,r,i,s=e[24](e[8],e[64])+"";return{c(){t=_("div"),n=C(s),D(t,"class",o=y("draggableListItem "+e[1].name)+" svelte-1es1ap1"),D(t,"draggable",!0),B(t,"delete",e[62]._delete),B(t,"is-active-top",e[11]?.top===e[64]),B(t,"is-active-bottom",e[11]?.bottom===e[64])},m(o,s){k(o,t,s),x(t,n),r||(i=[L(t,"dragover",e[33]),L(t,"dragleave",e[34](e[64])),L(t,"dragstart",e[31](e[64])),L(t,"drop",E(e[30](e[64]))),L(t,"dragenter",e[32](e[64]))],r=!0)},p(r,i){e=r,256&i[0]&&s!==(s=e[24](e[8],e[64])+"")&&z(n,s),2&i[0]&&o!==(o=y("draggableListItem "+e[1].name)+" svelte-1es1ap1")&&D(t,"class",o),130&i[0]&&B(t,"delete",e[62]._delete),2050&i[0]&&B(t,"is-active-top",e[11]?.top===e[64]),2050&i[0]&&B(t,"is-active-bottom",e[11]?.bottom===e[64])},d(e){e&&I(t),r=!1,h(i)}}}function lr(e){let t,n,o;var r=e[68];return r&&(t=new r({props:{size:"20"}})),{c(){t&&$e(t.$$.fragment),n=S()},m(e,r){t&&ge(t,e,r),k(e,n,r),o=!0},p(e,o){if(r!==(r=e[68])){if(t){le();const e=t;de(e.$$.fragment,1,0,(()=>{he(e,1)})),ae()}r?(t=new r({props:{size:"20"}}),$e(t.$$.fragment),ce(t.$$.fragment,1),ge(t,n.parentNode,n)):t=null}},i(e){o||(t&&ce(t.$$.fragment,e),o=!0)},o(e){t&&de(t.$$.fragment,e),o=!1},d(e){e&&I(n),t&&he(t,e)}}}function ar(e){let t,n,o,r,i,s=!e[0]&&lr(e);return{c(){t=_("span"),s&&s.c(),D(t,"class","pointer icon svelte-1es1ap1"),D(t,"title",e[66]),t.hidden=n=e[64]===e[7].length-1||!(e[62]._delete^e[67])},m(n,l){k(n,t,l),s&&s.m(t,null),o=!0,r||(i=L(t,"click",e[29](e[64])),r=!0)},p(r,i){(e=r)[0]?s&&(le(),de(s,1,1,(()=>{s=null})),ae()):s?(s.p(e,i),1&i[0]&&ce(s,1)):(s=lr(e),s.c(),ce(s,1),s.m(t,null)),(!o||128&i[0]&&n!==(n=e[64]===e[7].length-1||!(e[62]._delete^e[67])))&&(t.hidden=n)},i(e){o||(ce(s),o=!0)},o(e){de(s),o=!1},d(e){e&&I(t),s&&s.d(),r=!1,i()}}}function cr(e){let t,n,o,r,i,s;n=new e[14]({props:{$$slots:{default:[sr]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[28](e[65],e[64]))&&e[28](e[65],e[64]).apply(this,arguments)}));let l=[{title:"löschen",toDelete:!0,icon:De},{title:"undo",toDelete:!1,icon:Le}],a=[];for(let t=0;t<2;t+=1)a[t]=ar(Jo(e,l,t));const c=e=>de(a[e],1,1,(()=>{a[e]=null}));return{c(){t=_("div"),$e(n.$$.fragment),o=j();for(let e=0;e<2;e+=1)a[e].c();r=j(),D(t,"class",i=y("accordion "+e[1].name)+" svelte-1es1ap1"),D(t,"slot","handle")},m(e,i){k(e,t,i),ge(n,t,null),x(t,o);for(let e=0;e<2;e+=1)a[e].m(t,null);x(t,r),s=!0},p(o,d){e=o;const u={};if(2434&d[0]|4096&d[2]&&(u.$$scope={dirty:d,ctx:e}),n.$set(u),536871041&d[0]){let n;for(l=[{title:"löschen",toDelete:!0,icon:De},{title:"undo",toDelete:!1,icon:Le}],n=0;n<2;n+=1){const o=Jo(e,l,n);a[n]?(a[n].p(o,d),ce(a[n],1)):(a[n]=ar(o),a[n].c(),ce(a[n],1),a[n].m(t,r))}for(le(),n=2;n<2;n+=1)c(n);ae()}(!s||2&d[0]&&i!==(i=y("accordion "+e[1].name)+" svelte-1es1ap1"))&&D(t,"class",i)},i(e){if(!s){ce(n.$$.fragment,e);for(let e=0;e<2;e+=1)ce(a[e]);s=!0}},o(e){de(n.$$.fragment,e),a=a.filter(Boolean);for(let e=0;e<2;e+=1)de(a[e]);s=!1},d(e){e&&I(t),he(n),F(a,e)}}}function dr(e){let t,n,o=(!e[4]&&!e[0]||e[64]<e[7].length-1)&&tr(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){!e[4]&&!e[0]||e[64]<e[7].length-1?o?(o.p(e,n),145&n[0]&&ce(o,1)):(o=tr(e),o.c(),ce(o,1),o.m(t.parentNode,t)):o&&(le(),de(o,1,1,(()=>{o=null})),ae())},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function ur(e){let t,n,o=e[7],r=[];for(let t=0;t<o.length;t+=1)r[t]=dr(Yo(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(2139102623&n[0]|1073741839&n[1]|8&n[2]){let s;for(o=e[7],s=0;s<o.length;s+=1){const i=Yo(e,o,s);r[s]?(r[s].p(i,n),ce(r[s],1)):(r[s]=dr(i),r[s].c(),ce(r[s],1),r[s].m(t.parentNode,t))}for(le(),s=o.length;s<r.length;s+=1)i(s);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function mr(e){let t,n,o,r,i,s,l=e[21]&&0!=e[6]&&Uo(e),a=e[19]&&0!=e[9]&&Ko(e),c=e[17]&&0!=e[5]&&Zo(e);return i=new e[15]({props:{$$slots:{default:[ur,({closeOtherPanels:e})=>({61:e}),({closeOtherPanels:e})=>[0,e?1073741824:0]]},$$scope:{ctx:e}}}),{c(){t=_("div"),l&&l.c(),n=j(),a&&a.c(),o=j(),c&&c.c(),r=j(),$e(i.$$.fragment),D(t,"class","formList")},m(e,d){k(e,t,d),l&&l.m(t,null),x(t,n),a&&a.m(t,null),x(t,o),c&&c.m(t,null),x(t,r),ge(i,t,null),s=!0},p(e,s){e[21]&&0!=e[6]?l?(l.p(e,s),64&s[0]&&ce(l,1)):(l=Uo(e),l.c(),ce(l,1),l.m(t,n)):l&&(le(),de(l,1,1,(()=>{l=null})),ae()),e[19]&&0!=e[9]?a?(a.p(e,s),512&s[0]&&ce(a,1)):(a=Ko(e),a.c(),ce(a,1),a.m(t,o)):a&&(le(),de(a,1,1,(()=>{a=null})),ae()),e[17]&&0!=e[5]?c?(c.p(e,s),32&s[0]&&ce(c,1)):(c=Zo(e),c.c(),ce(c,1),c.m(t,r)):c&&(le(),de(c,1,1,(()=>{c=null})),ae());const d={};7583&s[0]|1073741824&s[1]|4096&s[2]&&(d.$$scope={dirty:s,ctx:e}),i.$set(d)},i(e){s||(ce(l),ce(a),ce(c),ce(i.$$.fragment,e),s=!0)},o(e){de(l),de(a),de(c),de(i.$$.fragment,e),s=!1},d(e){e&&I(t),l&&l.d(),a&&a.d(),c&&c.d(),he(i)}}}let fr=new Map;const pr=!0,$r="pos/target";function gr(e,t,n){let o,r;const{FormField:i,TextField:s,Button:l,Accordion:a,AccordionSection:f,Divider:p}=c,$=A();let{list:g}=t,{schema:h}=t,{record:v}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{fixed:x}=t;const k=h.find((e=>"price"===e.name&&!e.properties?.hidden)),I=k&&h.find((e=>"quantity"===e.name));let F=0;const _=h.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let N=0;const C=h.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name||"",j=!!C;let S=0;const L={};let E=h.properties?.readonly;y||=E;let q,D,z=[],O=[],T=!1,B={};h.filter((e=>e.selection)).map((e=>z.push({className:b.split("form-")[1].slice(0,-4),parentClass:h,refClass:e.selection,value:""})));const M=(e,t)=>{let o=`#accordion-content-${b}-${g.name}-${e} .form-field .field :required`;const r=document.querySelectorAll(o);let i=!1;r.forEach((e=>{""===e.value&&(i=!0)})),void 0===t&&(o=`#accordion-content-${b}-${g.name}-${e} .form-field .field input.invalid`,document.querySelector(o)&&(t=!0)),n(10,O[e]=i||t?"invalid":"",O)},P=e=>{if(!e)return 0;const[t,n=0]=e.split(":");return 60*t+parseInt(n)},V=(e,t)=>{if(!t)return;const o=h.find((e=>e.name===t)),r=o.properties.value.formula,{operator:i,argument:s}=r,l=s.map((t=>q[e][t.refItem]));let a=0;"$add"===i&&(a=l.reduce(((e,t)=>e+ +t))),"$subtract"===i&&(a=l.reduce(((e,t)=>{if(!e)return 0;if(!t)return 0;const[n,o]=e.split(":");e=o?(+n+ +o/60).toFixed(2):+n;const[r,i]=t.split(":");return r?e-=i?(+r+ +i/60).toFixed(2):+r:0}))),n(7,q[e][t]=(a||0).toFixed(o.properties.decimals||0),q),n(12,B={item:o,value:a,idx:e})};D=h.filter((e=>e.refClass)).reduce((async(e,t)=>{e=await e;const n=h.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,o]=t.selection.split(":"),[r]=o.split(".");r&&e.push({refClass:r,items:[n],selection:t.selection})}const o={refClass:t.refClass,items:[]};return n.forEach((e=>{o.items.push(e.name)})),e.push(o),e}),[]);const W=async(e,t,o,r)=>{const i=(await D).find((e=>e.refClass===t.refClass));if(!i)return;const{refClass:s,items:l,selection:a}=i;return o?Promise.all(l.map((i=>{let c="";const{refInput:d}=t;if(d&&q[e]){const[t,n]=d.split(".");c=n?q[e][n]:v[t]}if(a&&o!==r)l.map((t=>{n(7,q[e][t]="",q)}));else if(d&&!c||H(e,i)){const o=h.find((e=>e.refClass===s)),r=q[e][o.name];if(t.selection){const o=ni(t.selection+r.toString());if(o)return Promise.resolve(o).then((t=>n(7,q[e][i]=t[i],q)))}return Promise.resolve(oi(o.refClass,r)).then((t=>n(7,q[e][i]=t[i],q)))}}))):Promise.resolve(l.map((t=>{n(7,q[e][t]="",q)})))},H=(e,t)=>{let n=q[e][t];return"number"===h.find((e=>e.name===t)).type&&(n=Number(n||0)),!n},Y=e=>!(!x&&e>=q.length-1),G=(e,t=!1)=>{const[n,o]=e.split(";");return g.name===o&&(!!Y(t)&&((!1===t||t!=n)&&parseInt(n)))};return h.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=h.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))})),e.$$set=e=>{"list"in e&&n(1,g=e.list),"schema"in e&&n(35,h=e.schema),"record"in e&&n(36,v=e.record),"classId"in e&&n(2,b=e.classId),"eventId"in e&&n(3,w=e.eventId),"disabled"in e&&n(0,y=e.disabled),"fixed"in e&&n(4,x=e.fixed)},e.$$.update=()=>{2&e.$$.dirty[0]|32&e.$$.dirty[1]&&v&&n(7,q=(v[g.name]||[]).concat({})),128&e.$$.dirty[0]&&n(8,o=q),482&e.$$.dirty[0]&&o&&((()=>{if(_)n(9,N=q?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(j)n(6,S=q?.reduce(((e,t)=>e+(t._delete?0:+(t[C]||0))),0)||0)})(),(()=>{if(k)n(5,F=q?.reduce(((e,t)=>{if(t.price){const n=(I?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),$("save",{listName:g.name,value:q,amountValue:F,weeksValue:S})),64&e.$$.dirty[1]&&(r=e=>L[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[y,g,b,w,x,F,S,q,o,N,O,T,B,i,l,a,f,k,{name:"amountValue",properties:{decimals:2}},_,{name:"hoursValue",properties:{decimals:2}},j,{name:"weeksValue",properties:{decimals:1}},z,(e,t)=>{const n=e[t];return n&&h.filter((e=>!e.properties?.hidden&&void 0!==n[e.name]&&"textarea"!==e.properties?.format)).map((e=>""===n[e.name]?"":"object"===e.type?r(n[e.name]):"boolean"===e.type?m(n[e.name]):"date"===e.type?d(n[e.name]):"datetime"===e.type?u(n[e.name]):e.properties?.multi?"":n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>async({detail:r})=>{const{oldValue:i,value:s,add:l,desc:a}=r;V(t,e._formulaActor);const c=z?.find((t=>t.refClass.split(":")[1].split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,s)),s&&q.length===t+1&&n(7,q=q.concat({})),a&&n(37,L[s]=a,L),await W(t,e,s,i),n(8,o=q),"number"===e.type&&n(12,B={item:e,value:s,idx:t}),M(t)},({detail:e})=>{const{idx:t,value:n}=e;M(t,n)},({detail:e})=>{const{idx:t,fieldId:n,value:o}=e;if(!o)return;const r=P(o);let i=!1;q.forEach(((e,n)=>{if(t===n)return;const{start:o,end:s}=q[n];o&&s&&r>P(o)&&r<P(s)&&(i=!0)}));const s=document.getElementById(n);s?.classList?.toggle("invalid",i)},(e,t)=>n=>{e(n);const o=`#accordion-content-${b}-${g.name}-${t} > div.form-field:not(.hidden)`,r=document.querySelectorAll(o),i=r[r.length-1];X().then((()=>i.scrollIntoView({behavior:"smooth",block:"end"})))},e=>()=>{n(7,q[e]._delete=!q[e]._delete,q)},e=>t=>{t.preventDefault(),n(11,T=!1);const o=G(t.dataTransfer.getData($r),e);if(!1===o)return;t.dataTransfer.dropEffect="move";const r=[...q].map(((e,t)=>(e._index=t,e)));o<e?(r.splice(e+1,0,r[o]),r.splice(o,1)):(r.splice(e,0,r[o]),r.splice(o+1,1)),r.map(((e,t)=>{return n=e._index,o=t,void fr.set(o,n);var n,o}));let i=[];O.map(((e,t)=>{i[t]=O[(e=>{const t=fr.get(e);return void 0===t?e:t})(t)]})),n(10,O=i),n(7,q=r.map(((e,t)=>(delete e._index,e))))},e=>t=>{if(!Y(e))return!1;t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move",t.dataTransfer.setData($r,e+";"+g.name)},e=>t=>{const o=G(t.dataTransfer.getData($r),e);return!1===o||o===e?n(11,T=!1):void n(11,T={top:o>e&&e,bottom:o<e&&e})},e=>e.preventDefault(),e=>e=>{n(11,T=!1)},h,v,L,function(e){S=e,n(6,S)},function(e){N=e,n(9,N)},function(e){F=e,n(5,F)},function(t){R(e,t)}]}class hr extends be{constructor(e){var t;super(),Ho.getElementById("svelte-1es1ap1-style")||((t=_("style")).id="svelte-1es1ap1-style",t.textContent=".accordion.svelte-1es1ap1{display:flex;overflow:hidden}.accordion-content.svelte-1es1ap1{position:relative}.formList .accordion > .btn{display:inline-block;margin-bottom:1em;background-color:#F5F5F5}.sTask .formList .accordion > .btn{width:95% !important}.sEmbedded .formList .accordion > .btn{width:97%}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-1es1ap1{padding-top:1em}div.delete.svelte-1es1ap1{text-decoration:line-through}.icon.svelte-1es1ap1{margin-right:-0.75em}.form-field .formField_italic{font-style:italic}.panel.invalid .btn{border:1px #b80000 solid}.draggableListItem.svelte-1es1ap1{cursor:drag}.draggableListItem.is-active-top.svelte-1es1ap1{border-top:3px purple solid;padding-top:2em}.draggableListItem.is-active-bottom.svelte-1es1ap1{border-bottom:3px purple solid;padding-bottom:2em}",x(Ho.head,t)),ve(this,e,gr,mr,b,{list:1,schema:35,record:36,classId:2,eventId:3,disabled:0,fixed:4},[-1,-1,-1])}}const{document:vr}=fe;function br(e,t,n){const o=e.slice();return o[17]=t[n],o}function wr(e){let t,n;return t=new Ro({props:{classId:e[2],item:e[17],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4]}}),t.$on("notify",e[10]),t.$on("task",e[13]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[17]),2&n&&(o.listName=e[1].name),8&n&&(o.eventId=e[3]),1&n&&(o.record=e[0]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function yr(e){let t,n,o,r=e[1].item,i=[];for(let t=0;t<r.length;t+=1)i[t]=wr(br(e,r,t));const s=e=>de(i[e],1,1,(()=>{i[e]=null}));return{c(){t=_("div");for(let e=0;e<i.length;e+=1)i[e].c();D(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){k(e,t,n);for(let e=0;e<i.length;e+=1)i[e].m(t,null);o=!0},p(e,l){if(1055&l){let n;for(r=e[1].item,n=0;n<r.length;n+=1){const o=br(e,r,n);i[n]?(i[n].p(o,l),ce(i[n],1)):(i[n]=wr(o),i[n].c(),ce(i[n],1),i[n].m(t,null))}for(le(),n=r.length;n<i.length;n+=1)s(n);ae()}(!o||6&l&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&D(t,"id",n)},i(e){if(!o){for(let e=0;e<r.length;e+=1)ce(i[e]);o=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)de(i[e]);o=!1},d(e){e&&I(t),F(i,e)}}}function xr(e){let t,n,o=e[9](e[5])+"";return{c(){t=_("span"),n=C(o)},m(e,o){k(e,t,o),x(t,n)},p(e,t){32&t&&o!==(o=e[9](e[5])+"")&&z(n,o)},d(e){e&&I(t)}}}function kr(e){let t,n,o;return n=new e[6]({props:{$$slots:{default:[xr]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[11](e[16]))&&e[11](e[16]).apply(this,arguments)})),{c(){t=_("div"),$e(n.$$.fragment),D(t,"class","accordion svelte-148ktt9"),D(t,"slot","handle")},m(e,r){k(e,t,r),ge(n,t,null),o=!0},p(t,o){e=t;const r={};1048608&o&&(r.$$scope={dirty:o,ctx:e}),n.$set(r)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n)}}}function Ir(e){let t,n;return t=new e[8]({props:{$$slots:{handle:[kr,({toggle:e})=>({16:e}),({toggle:e})=>e?65536:0],default:[yr,({toggle:e})=>({16:e}),({toggle:e})=>e?65536:0]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1114175&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Fr(e){let t,n,o;return n=new e[7]({props:{$$slots:{default:[Ir]},$$scope:{ctx:e}}}),{c(){t=_("div"),$e(n.$$.fragment),D(t,"class","formList")},m(e,r){k(e,t,r),ge(n,t,null),o=!0},p(e,[t]){const o={};1048639&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n)}}}function _r(e,t,n){const{Button:o,Accordion:r,AccordionSection:i}=c;let{list:s}=t,{schema:l}=t,{record:a}=t,{classId:f}=t,{eventId:p}=t,{disabled:$}=t;const g={};let h=a[s.name]||{};a[s.name]=h;const v=e=>g[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,s=e.list),"schema"in e&&n(12,l=e.schema),"record"in e&&n(0,a=e.record),"classId"in e&&n(2,f=e.classId),"eventId"in e&&n(3,p=e.eventId),"disabled"in e&&n(4,$=e.disabled)},[a,s,f,p,$,h,o,r,i,e=>l.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?v(t.name):"boolean"===t.type?m(e[t.name]):"date"===t.type?d(e[t.name]):"datetime"===t.type?u(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&(g[o]=e.desc);const r=a[t];n(0,a[t]={...r,[o]:e.value},a),n(5,h=a[t])},e=>t=>{e(t);const n=`#accordion-content-${f}-${s.name} > div.form-field:last-child`,o=document.querySelector(n);X().then((()=>o.scrollIntoView({behavior:"smooth",block:"end"})))},l,function(t){R(e,t)}]}class Nr extends be{constructor(e){var t;super(),vr.getElementById("svelte-148ktt9-style")||((t=_("style")).id="svelte-148ktt9-style",t.textContent=".accordion.svelte-148ktt9{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}",x(vr.head,t)),ve(this,e,_r,Fr,b,{list:1,schema:12,record:0,classId:2,eventId:3,disabled:4})}}const{Boolean:Cr,document:jr}=fe;function Sr(e,t,n){const o=e.slice();return o[65]=t[n],o}function Lr(e,t,n){const o=e.slice();return o[68]=t[n],o}function Er(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function qr(e){let t,n,o=e[64]&&function(e){let t,n,o,r,i,s,l,a,c,d,u,m,f,p,$,g,v,b,w=e[0].items,N=[];for(let t=0;t<w.length;t+=1)N[t]=zr(Lr(e,w,t));const C=e=>de(N[e],1,1,(()=>{N[e]=null}));let S=e[0].list&&Or(e);m=new e[8]({props:{outline:!0,$$slots:{default:[Rr]},$$scope:{ctx:e}}}),m.$on("click",e[19]),p=new e[8]({props:{class:"close",disabled:e[5],form:e[10],filled:!0,type:"submit",$$slots:{default:[Hr]},$$scope:{ctx:e}}});let q=e[1]&&!e[5]&&Yr(e);return{c(){t=_("section"),n=_("form"),o=_("input"),i=j();for(let e=0;e<N.length;e+=1)N[e].c();s=j(),S&&S.c(),l=j(),a=_("div"),c=_("small"),c.textContent=`${si}`,d=j(),u=_("div"),$e(m.$$.fragment),f=j(),$e(p.$$.fragment),$=j(),q&&q.c(),D(o,"class",y(e[10])+" svelte-1dh1s6w"),D(o,"name","_id"),D(o,"type","hidden"),o.value=r=e[2]._id||"",D(n,"class",y(e[11])+" svelte-1dh1s6w"),D(n,"id",e[10]),D(a,"class","comment svelte-1dh1s6w"),D(u,"class","form--buttons svelte-1dh1s6w"),D(t,"class",y(e[12])+" svelte-1dh1s6w")},m(r,h){k(r,t,h),x(t,n),x(n,o),x(n,i);for(let e=0;e<N.length;e+=1)N[e].m(n,null);x(n,s),S&&S.m(n,null),x(t,l),x(t,a),x(a,c),x(t,d),x(t,u),ge(m,u,null),x(u,f),ge(p,u,null),x(u,$),q&&q.m(u,null),g=!0,v||(b=[L(n,"keydown",e[23]),L(n,"submit",E(e[18]))],v=!0)},p(e,t){if((!g||4&t[0]&&r!==(r=e[2]._id||""))&&(o.value=r),3146789&t[0]){let o;for(w=e[0].items,o=0;o<w.length;o+=1){const r=Lr(e,w,o);N[o]?(N[o].p(r,t),ce(N[o],1)):(N[o]=zr(r),N[o].c(),ce(N[o],1),N[o].m(n,s))}for(le(),o=w.length;o<N.length;o+=1)C(o);ae()}e[0].list?S?(S.p(e,t),1&t[0]&&ce(S,1)):(S=Or(e),S.c(),ce(S,1),S.m(n,null)):S&&(le(),de(S,1,1,(()=>{S=null})),ae());const i={};512&t[2]&&(i.$$scope={dirty:t,ctx:e}),m.$set(i);const l={};32&t[0]&&(l.disabled=e[5]),512&t[2]&&(l.$$scope={dirty:t,ctx:e}),p.$set(l),e[1]&&!e[5]?q?(q.p(e,t),34&t[0]&&ce(q,1)):(q=Yr(e),q.c(),ce(q,1),q.m(u,null)):q&&(le(),de(q,1,1,(()=>{q=null})),ae())},i(e){if(!g){for(let e=0;e<w.length;e+=1)ce(N[e]);ce(S),ce(m.$$.fragment,e),ce(p.$$.fragment,e),ce(q),g=!0}},o(e){N=N.filter(Cr);for(let e=0;e<N.length;e+=1)de(N[e]);de(S),de(m.$$.fragment,e),de(p.$$.fragment,e),de(q),g=!1},d(e){e&&I(t),F(N,e),S&&S.d(),he(m),he(p),q&&q.d(),v=!1,h(b)}}}(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,t){e[64]&&o.p(e,t)},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Dr(e){let t,n;return t=new Ro({props:{classId:e[10],item:e[68],selection:e[68].selection,record:e[2],disabled:e[5],eventId:e[0].id}}),t.$on("task",e[20]),t.$on("notify",e[21]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[68]),1&n[0]&&(o.selection=e[68].selection),4&n[0]&&(o.record=e[2]),32&n[0]&&(o.disabled=e[5]),1&n[0]&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function zr(e){let t,n,o="list"!==e[68].type&&Dr(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){"list"!==e[68].type?o?(o.p(e,n),1&n[0]&&ce(o,1)):(o=Dr(e),o.c(),ce(o,1),o.m(t.parentNode,t)):o&&(le(),de(o,1,1,(()=>{o=null})),ae())},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Or(e){let t,n,o,r,i=e[14]&&0!=e[3]&&Tr(e),s=e[15]&&0!=e[4]&&Mr(e),l=e[0].list,a=[];for(let t=0;t<l.length;t+=1)a[t]=Ar(Sr(e,l,t));const c=e=>de(a[e],1,1,(()=>{a[e]=null}));return{c(){i&&i.c(),t=j(),s&&s.c(),n=j();for(let e=0;e<a.length;e+=1)a[e].c();o=S()},m(e,l){i&&i.m(e,l),k(e,t,l),s&&s.m(e,l),k(e,n,l);for(let t=0;t<a.length;t+=1)a[t].m(e,l);k(e,o,l),r=!0},p(e,r){if(e[14]&&0!=e[3]?i?(i.p(e,r),8&r[0]&&ce(i,1)):(i=Tr(e),i.c(),ce(i,1),i.m(t.parentNode,t)):i&&(le(),de(i,1,1,(()=>{i=null})),ae()),e[15]&&0!=e[4]?s?(s.p(e,r),16&r[0]&&ce(s,1)):(s=Mr(e),s.c(),ce(s,1),s.m(n.parentNode,n)):s&&(le(),de(s,1,1,(()=>{s=null})),ae()),4195365&r[0]){let t;for(l=e[0].list,t=0;t<l.length;t+=1){const n=Sr(e,l,t);a[t]?(a[t].p(n,r),ce(a[t],1)):(a[t]=Ar(n),a[t].c(),ce(a[t],1),a[t].m(o.parentNode,o))}for(le(),t=l.length;t<a.length;t+=1)c(t);ae()}},i(e){if(!r){ce(i),ce(s);for(let e=0;e<l.length;e+=1)ce(a[e]);r=!0}},o(e){de(i),de(s),a=a.filter(Cr);for(let e=0;e<a.length;e+=1)de(a[e]);r=!1},d(e){i&&i.d(e),e&&I(t),s&&s.d(e),e&&I(n),F(a,e),e&&I(o)}}}function Tr(e){let t,n;return t=new e[9]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[Br]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};8&n[0]|512&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Br(e){let t,n,o;function r(t){e[33](t)}let i={item:e[13],disabled:!0};return void 0!==e[3]&&(i.value=e[3]),t=new mt({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&8&o[0]&&(n=!0,r.value=e[3],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function Mr(e){let t,n;return t=new e[9]({props:{name:"Gesamtzeit in Wochen",nameClass:"formField_italic",$$slots:{default:[Pr]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]|512&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Pr(e){let t,n,o;function r(t){e[34](t)}let i={item:e[16],disabled:!0};return void 0!==e[4]&&(i.value=e[4]),t=new mt({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&16&o[0]&&(n=!0,r.value=e[4],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function Vr(e){let t,n;return t=new Nr({props:{classId:e[10],list:e[65],eventId:e[0].id,schema:e[65].item,record:e[2],disabled:e[5]}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[65]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[65].item),4&n[0]&&(o.record=e[2]),32&n[0]&&(o.disabled=e[5]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Wr(e){let t,n;return t=new hr({props:{classId:e[10],list:e[65],eventId:e[0].id,schema:e[65].item,record:e[2],disabled:e[5],fixed:e[65].fixed}}),t.$on("save",e[22]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[65]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[65].item),4&n[0]&&(o.record=e[2]),32&n[0]&&(o.disabled=e[5]),1&n[0]&&(o.fixed=e[65].fixed),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Ar(e){let t,n,o,r,i,s;t=new e[7]({props:{text:e[65].designation}});const l=[Wr,Vr],a=[];function c(e,t){return"array"===e[65].type?0:1}return o=c(e),r=a[o]=l[o](e),{c(){$e(t.$$.fragment),n=j(),r.c(),i=S()},m(e,r){ge(t,e,r),k(e,n,r),a[o].m(e,r),k(e,i,r),s=!0},p(e,n){const s={};1&n[0]&&(s.text=e[65].designation),t.$set(s);let d=o;o=c(e),o===d?a[o].p(e,n):(le(),de(a[d],1,1,(()=>{a[d]=null})),ae(),r=a[o],r?r.p(e,n):(r=a[o]=l[o](e),r.c()),ce(r,1),r.m(i.parentNode,i))},i(e){s||(ce(t.$$.fragment,e),ce(r),s=!0)},o(e){de(t.$$.fragment,e),de(r),s=!1},d(e){he(t,e),e&&I(n),a[o].d(e),e&&I(i)}}}function Rr(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Hr(e){let t;return{c(){t=C("Speichern und schliessen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Yr(e){let t,n;return t=new e[8]({props:{form:e[10],filled:!0,type:"submit",style:"opacity: 0.75;",$$slots:{default:[Gr]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};512&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Gr(e){let t;return{c(){t=C("Speichern")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Jr(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Ur(e){let t,n,o,r;jr.title=t=e[6];let i={ctx:e,current:null,token:null,hasCatch:!1,pending:Jr,then:qr,catch:Er,value:64,blocks:[,,,]};return ue(e[17](),i),{c(){n=j(),o=S(),i.block.c()},m(e,t){k(e,n,t),k(e,o,t),i.block.m(e,i.anchor=t),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(n,o){e=n,(!r||64&o[0])&&t!==(t=e[6])&&(jr.title=t),me(i,e,o)},i(e){r||(ce(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){de(i.blocks[e])}r=!1},d(e){e&&I(n),e&&I(o),i.block.d(e),i.token=null,i=null}}}let Qr=new Map,Kr=new Map,Xr=new Map;const Zr=(e,n)=>{const o=n;return Qr.has(o)||Qr.set(o,t.getTasksList(n).then((({data:e})=>e))),Qr.get(o)},ei=(e,n,o)=>Kr.get(o)||Zr(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(Kr.set(o,e),e))),ti=(e,t)=>{Xr.set(e,t)},ni=e=>Xr.get(e),oi=(e,n)=>Xr.get(n)||t.getTask(e,n).then((e=>(Xr.set(n,e),e))),ri=(e,n)=>{if(!Qr.get(n))return;const o=n;Qr.set(o,t.getTasksList(n).then((({data:e})=>e)))},ii=()=>{Qr=new Map,Kr=new Map,Xr=new Map};let si="";function li(e,r,a){let d,u,m,p;w(e,s,(e=>a(40,m=e))),w(e,l,(e=>a(41,p=e)));const{Divider:$,Button:g,FormField:h}=c,v=JSON.parse(o.getItem("Locale")),b=A();let y,x,{schema:k}=r,{recID:I}=r,{prevEventID:F=!1}=r,{prev:_=!1}=r,{taskId:N=!1}=r,{description:C=""}=r,{root:j=!1}=r,{readonly:S}=r,{isStandalone:L}=r,E={},q={},D="form-"+k.class+Math.floor(9e3*Math.random()+1e3).toString();const z=j?"fEmbedded":"fTask",O=j?"sEmbedded":"sTask";let T=0,B=0;const M={},P=k.items.find((e=>"price"===e.name&&!e.properties?.hidden)),V=k.items.find((e=>"quantity"===e.name&&!e.properties?.hidden)),R=!!P,H=k.list?.filter((e=>"array"===e.type))?.length>1||R,Y=k.items.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name,G=!!Y,J=k.list?.filter((e=>"array"===e.type))?.length>1||G,U={};let Q=0,K=0;const X=async()=>{if(!k.input)return;if(!k.input.length)return;if(k.input.length<2)return;const e=await t.getEvent(k.id),n=!e.input.class[0].name&&e.input.class[0].selection;if(!n)return;const o=e.input.class[1].name,r=e.input.class[1].destination?.split(".")[0];if(!o||!r)return;const i=k.list?.find((e=>e.name===o));if(!i)return;const s=await t.getSchemaByClass(n),l=(await t.getTasks(s.id)).data;if(!l?.length)return;const c=[];for(const e of l){const t={};for(const n of i.item)n.name===r?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);c.push(t)}c.length&&a(2,E[o]=c,E)},Z=()=>{for(const e of k.items)e.properties?.value?.concatenation&&ee(e)},ee=async e=>{const t=e.properties.value.concatenation;let n="";for(const e of t)void 0!==e.constant&&(n+=e.constant),"year"===e.variable&&(n+=(new Date).getFullYear()),e.refItemNext&&(n+=await te(e.refItemNext));a(2,E[e.name]=n,E)},te=async e=>{const[n,o]=e.offset?.split(",")||[0,0],r=+e.base||0,i=+e.step||1;e.type;const s=e.refItem,l=await t.getLastId(k.class,s);if(!l?.length)return(r+i).toString().padStart(o,"0");const a=l[0][s];return((+a?.substring(n,n+o)||r)+i).toString().padStart(o,"0")},ne=(e,t,n=!1)=>{const o=t.name,r=e.find((e=>e.name===o));let i=t.value;if(!n&&r&&r.properties?.multi&&(i=E[o]),i&&r&&r.type.startsWith("date"))try{return function(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let r=!1;if(""===e)return null;const i=t.split(Kt);let s=0,l=0;const a=new Date(0);for(const c of i){if(!e.startsWith(c,s))return n;if(s+=c.length,s===e.length){if(l!==t.length)return n;break}if("%"!==t[l+c.length])break;if(l+=c.length+1,"%"===t[l]){if("%"!==e[s])return n;s++}else if("p"===t[l].toLowerCase()){const t=e.substr(s,2).toUpperCase();if("AM"===t)r=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;r=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{Qt.lastIndex=s;const i=Qt.exec(e);if(null==i)return n;switch(t[l]){case"H":a.setHours(parseInt(i[0])+12*r);break;case"M":a.setMinutes(i[0]);break;case"S":a.setSeconds(i[0]);break;case"d":a.setDate(i[0]);break;case"m":a.setMonth(i[0]-1);break;case"y":a.setFullYear(100*o+parseInt(i[0]));break;case"Y":a.setFullYear(i[0])}s+=i[0].length}l++}return isNaN(a.valueOf())?n:a}(i,"%d.%m.%Y").toISOString()}catch{return new Date(i).toISOString()}if(r&&"boolean"===r.type&&(i=!!t.checked),r&&"number"===r.type){const e=Number("1.1").toLocaleString(v.id).substring(1,2);try{i=Number(i.replace(e,".")).toString()}catch{}}return i},oe=()=>L?window.close():j?window.singleSpaNavigate("/"):b("back"),re=async(e,n)=>{if(k.input?.length>1){if(k.input[0]!==e)return;if(n){const o=await t.getTaskOptions(`${e}:${n}`,k.id);a(2,E={...E,...o})}else{const e=k.input.slice(1);for(const t of e)a(2,E[t]=[],E)}}},ie=()=>{let e=0;if(P){let t=1;V&&(t=quantityValue),e=B*t}let t=0;for(const e in M)t+=M[e];a(3,T=t+e)},se=()=>{let e=0;for(const t in U)e+=U[t];a(4,Q=e+ +K)};n.subscribe((async e=>{if(!e)return;if(!Qr.get(e.eventId))return;const n=await t.getTaskList(k.class,e.taskId);((e,t,n)=>{if(!Qr.get(e))return;const o=t;Kr.set(o,n)})(e.eventId,e.taskId,n)})),W(ii);return e.$$set=e=>{"schema"in e&&a(0,k=e.schema),"recID"in e&&a(28,I=e.recID),"prevEventID"in e&&a(26,F=e.prevEventID),"prev"in e&&a(29,_=e.prev),"taskId"in e&&a(27,N=e.taskId),"description"in e&&a(24,C=e.description),"root"in e&&a(1,j=e.root),"readonly"in e&&a(25,S=e.readonly),"isStandalone"in e&&a(30,L=e.isStandalone)},e.$$.update=()=>{33554432&e.$$.dirty[0]&&a(5,d=S),1&e.$$.dirty[0]|3&e.$$.dirty[1]&&x&&y&&k.items.map((({name:e,type:t})=>{const n=y.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;x[e]&&a(2,E[e]=x[e],E),x[o]&&a(2,E[o]=x[o],E)})),16777218&e.$$.dirty[0]&&a(6,u=j?C||"enablerr - Form":document.title)},[k,j,E,T,Q,d,u,$,g,h,D,z,O,{name:"amountValue",properties:{decimals:2}},H,J,{name:"weekValue",properties:{decimals:1}},async()=>{if(I&&(a(2,E=await t.getTask(k.class,I)),a(24,C=f(k,E))),F){a(25,S=!1),a(31,y=await t.getSchema(F)),"string"==typeof _&&a(32,x=await t.getTask(y.class,_));const e=k.items.find((e=>e.refClass===y.class));a(2,E[e.name]=x._id,E)}J&&(K=E[Y]||0);const e=await t.getEvent(k.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&a(25,S=!0),m.role?.length&&k.authorization?.length){const e=k.authorization.some((e=>p?.find((t=>t===e.role&&"edit"===e.activity))));a(25,S||=!e)}return I||(Z(),X()),!0},async e=>{I||a(5,d=!0);const n=e.submitter?.className?.includes("close"),o={};Array.from(document.querySelectorAll("form#"+D+" ."+D)).map((e=>{if(e.name)if(e.name.includes(".")){const[t,n]=e.name.split("."),r=k.list.find((e=>e.name===t));o[e.name]=ne(r.item,e)}else o[e.name]=ne(k.items,e)})),k.list&&k.list.map((e=>{"array"===e.type&&q[e.name]&&(o[e.name]=q[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,o])=>("_delete"!==n&&(t[n]=ne(e.item,{name:n,value:o,checked:o},!0)),t)),{}))),[]))})),o._event=k.id,o._prevEventId=F,o._taskId=N;const{id:r,task:s,error:l}=await t.saveData(k.class,o);if(l?.text){const e=l.field?" in "+l.field+": "+l.value:"";return i.failed(`${l.text} ${e}`,3e3),void a(5,d=!1)}i.success("Die Daten wurden gespeichert.",2e3),o._id=r;const c=await t.getTaskList(k.class,r);return b("choose",{row:c}),n?oe():I?void 0:window.singleSpaNavigate(`/task/${k.id}/${s}/task`)},()=>F?window.history.back():oe(),async({detail:{row:e}})=>{if(I)return;if(await(async()=>{for(const e of k.items)if(e.refItem&&E[e.refItem]){const n=await t.getTask(e.refItem,E[e.refItem]);n&&a(2,E[e.name]=n[e.name],E)}for(const e of k.list||[])if(e.refItem&&E[e.refItem]){const n=await t.getTask(e.refItem,E[e.refItem]),o=[];for(const t of n[e.name]){const n={};for(const o of e.item)t[o.name]&&(n[o.name]=t[o.name]);o.push(n)}a(2,E[e.name]=o,E)}})(),!e._task)return;const n=e._task.event,o=await t.getEvent(n),r=await t.getEvent(k.id);if(!r.output?.class?.length)return;const i=r.output.class[0]?.item.find((e=>e.name===o.output.class[0]?.name));(r.input?.class?.length&&r.input.class[0]?.name===o.output.class[0]?.name||i?.asInput)&&(a(31,y=await t.getSchema(n)),a(26,F=n),a(27,N=e._task._id),a(32,x=!!N&&await t.getTask(y.class,e._task.docId)),re(y.class,e?._task?.docId))},({detail:e})=>{if(J&&(e.itemName===Y&&(K=+e.value),se()),R){if(e.itemName===P?.name)B=e.value;else{if(e.itemName!==V?.name)return;quantityValue=e.value}ie()}},({detail:e})=>{q[e.listName]=e.value,H&&(M[e.listName]=e.amountValue,ie()),J&&(U[e.listName]=e.weeksValue||0,se())},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},C,S,F,N,I,_,L,y,x,function(e){T=e,a(3,T)},function(e){Q=e,a(4,Q)}]}class ai extends be{constructor(e){var t;super(),jr.getElementById("svelte-1dh1s6w-style")||((t=_("style")).id="svelte-1dh1s6w-style",t.textContent="form.disabled.svelte-1dh1s6w input.svelte-1dh1s6w{background-color:red !important}.comment.svelte-1dh1s6w.svelte-1dh1s6w{color:green;margin-bottom:1em}form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:30em}}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w,.fTask.svelte-1dh1s6w.svelte-1dh1s6w{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;max-height:70vh}.sTask.svelte-1dh1s6w.svelte-1dh1s6w{height:95%;display:inline-grid}.sTask.svelte-1dh1s6w .btn.svelte-1dh1s6w{display:initial !important}.form--buttons.svelte-1dh1s6w.svelte-1dh1s6w{display:flex;gap:1em;padding-bottom:0.5em}",x(jr.head,t)),ve(this,e,li,Ur,b,{schema:0,recID:28,prevEventID:26,prev:29,taskId:27,description:24,root:1,readonly:25,isStandalone:30},[-1,-1,-1])}}function ci(e){let t,n,o;function r(t){e[4](t)}let i={schema:e[5],recID:e[6]};return void 0!==e[0]&&(i.description=e[0]),t=new ai({props:i}),Y.push((()=>pe(t,"description",r))),t.$on("back",e[2]),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};32&o&&(r.schema=e[5]),64&o&&(r.recID=e[6]),!n&&1&o&&(n=!0,r.description=e[0],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function di(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[ci,({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(){$e(t.$$.fragment)},m(e,o){ge(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||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function ui(e,n,o){let r,{refresh:i}=n;return e.$$set=e=>{"refresh"in e&&o(3,i=e.refresh)},[r,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},i,function(e){r=e,o(0,r)}]}function mi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fi,pi,$i=(fi=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return i="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},i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==i(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},s),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var s={component:null,domElementGetter:null,props:{}};function l(e){return Promise.resolve()}function a(e,t,n){var r=Object.keys(s),i=Object.keys(e).reduce((function(t,n){return r.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var r=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),s=r();t.instance=new e.component(o(o({},i),{},{target:s,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)}))}},fi(pi={exports:{}},pi.exports),pi.exports);const gi=mi($i)({component:class extends be{constructor(e){super(),ve(this,e,ui,di,b,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:hi,mount:vi,unmount:bi}=gi;e({bootstrap:hi,mount:vi,unmount:bi});e("Form",ai),e("List",ct)}}}));
|
|
1
|
+
System.register(["@enablerr-ui/form","@enablerr-ui/layout"],(function(e){"use strict";var t,n,o,r,i,s,l,a,c;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.Storage,r=e.TextArea,i=e.toasts,s=e.settings,l=e.currentRoles,a=e.Page},function(e){c=e.getAttractions}],execute:function(){e("version","0.2.310");const d=e("checkDate",((e,t)=>"string"!=typeof e||e.length<20||!(t=e.split(" · "))?e:t.map((e=>2===e.split("T").length&&3===e.split("T")[0].split("-").length?new Date(e).toLocaleDateString():e)).filter((e=>!!e)).join(" · "))),u=e=>{try{return new Date(e).toLocaleString()}catch{return e}},m=e=>e?"(ja)":"(nein)",f=(e,t)=>{const n={...t};return(e.display?.reduce(((t,o)=>{let[r,i]=o.split(".");if(e.list?.find((({name:e})=>e===r))&&i&&void 0!==n[r]){const e=`${r}_${i}`;n[e]=n[r][i],r=e}return t.find((e=>e===r))||t.push(r),t}),[]).map((e=>d(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":"boolean"===e.type?m(t[e.name]):t[e.name]))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function p(){}function $(e){return e()}function g(){return Object.create(null)}function h(e){e.forEach($)}function v(e){return"function"==typeof e}function b(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function w(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return p;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function y(e){return null==e?"":e}function x(e,t){e.appendChild(t)}function k(e,t,n){e.insertBefore(t,n||null)}function I(e){e.parentNode.removeChild(e)}function F(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function _(e){return document.createElement(e)}function N(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function C(e){return document.createTextNode(e)}function j(){return C(" ")}function S(){return C("")}function L(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function E(e){return function(t){return t.preventDefault(),e.call(this,t)}}function q(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function z(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 O(e,t){e.value=null==t?"":t}function T(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function B(e,t,n){e.classList[n?"add":"remove"](t)}let M;function P(e){M=e}function V(){if(!M)throw new Error("Function called outside component initialization");return M}function W(e){V().$$.on_mount.push(e)}function A(){const e=V();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const r=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);o.slice().forEach((t=>{t.call(e,r)}))}}}function R(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const H=[],Y=[],G=[],J=[],U=Promise.resolve();let Z=!1;function Q(){Z||(Z=!0,U.then(oe))}function K(){return Q(),U}function X(e){G.push(e)}function ee(e){J.push(e)}let te=!1;const ne=new Set;function oe(){if(!te){te=!0;do{for(let e=0;e<H.length;e+=1){const t=H[e];P(t),re(t.$$)}for(P(null),H.length=0;Y.length;)Y.pop()();for(let e=0;e<G.length;e+=1){const t=G[e];ne.has(t)||(ne.add(t),t())}G.length=0}while(H.length);for(;J.length;)J.pop()();Z=!1,te=!1,ne.clear()}}function re(e){if(null!==e.fragment){e.update(),h(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(X)}}const ie=new Set;let se;function le(){se={r:0,c:[],p:se}}function ae(){se.r||h(se.c),se=se.p}function ce(e,t){e&&e.i&&(ie.delete(e),e.i(t))}function de(e,t,n,o){if(e&&e.o){if(ie.has(e))return;ie.add(e),se&&se.c.push((()=>{ie.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function ue(e,t){const n=t.token={};function o(e,o,r,i){if(t.token!==n)return;t.resolved=i;let s=t.ctx;void 0!==r&&(s=s.slice(),s[r]=i);const l=e&&(t.current=e)(s);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(le(),de(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ae())})):t.block.d(1),l.c(),ce(l,1),l.m(t.mount(),t.anchor),a=!0),t.block=l,t.blocks&&(t.blocks[o]=l),a&&oe()}if((r=e)&&"object"==typeof r&&"function"==typeof r.then){const n=V();if(e.then((e=>{P(n),o(t.then,1,t.value,e),P(null)}),(e=>{if(P(n),o(t.catch,2,t.error,e),P(null),!t.hasCatch)throw e})),t.current!==t.pending)return o(t.pending,0),!0}else{if(t.current!==t.then)return o(t.then,1,t.value,e),!0;t.resolved=e}var r}function me(e,t,n){const o=t.slice(),{resolved:r}=e;e.current===e.then&&(o[e.value]=r),e.current===e.catch&&(o[e.error]=r),e.block.p(o,n)}const fe="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function pe(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function $e(e){e&&e.c()}function ge(e,t,n,o){const{fragment:r,on_mount:i,on_destroy:s,after_update:l}=e.$$;r&&r.m(t,n),o||X((()=>{const t=i.map($).filter(v);s?s.push(...t):h(t),e.$$.on_mount=[]})),l.forEach(X)}function he(e,t){const n=e.$$;null!==n.fragment&&(h(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ve(e,t,n,o,r,i,s=[-1]){const l=M;P(e);const a=e.$$={fragment:null,ctx:null,props:i,update:p,not_equal:r,bound:g(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:g(),dirty:s,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return a.ctx&&r(a.ctx[t],a.ctx[t]=i)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](i),c&&function(e,t){-1===e.$$.dirty[0]&&(H.push(e),Q(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,h(a.before_update),a.fragment=!!o&&o(a.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);a.fragment&&a.fragment.l(e),e.forEach(I)}else a.fragment&&a.fragment.c();t.intro&&ce(e.$$.fragment),ge(e,t.target,t.anchor,t.customElement),oe()}P(l)}class be{$destroy(){he(this,1),this.$destroy=p}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function we(e){let t,n,o,r,i;return{c(){t=N("svg"),n=N("circle"),o=N("polyline"),r=N("line"),z(n,"cx","12"),z(n,"cy","12"),z(n,"r","10"),z(o,"points","8 12 12 16 16 12"),z(r,"x1","12"),z(r,"y1","8"),z(r,"x2","12"),z(r,"y2","16"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",i="feather feather-arrow-down-circle "+e[2])},m(e,i){k(e,t,i),x(t,n),x(t,o),x(t,r)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-arrow-down-circle "+e[2])&&z(t,"class",i)},i:p,o:p,d(e){e&&I(t)}}}function ye(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class xe extends be{constructor(e){super(),ve(this,e,ye,we,b,{size:0,strokeWidth:1,class:2})}}function ke(e){let t,n,o,r;return{c(){t=N("svg"),n=N("path"),o=N("polyline"),z(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),z(o,"points","22 4 12 14.01 9 11.01"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",r="feather feather-check-circle "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-check-circle "+e[2])&&z(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Ie(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Fe extends be{constructor(e){super(),ve(this,e,Ie,ke,b,{size:0,strokeWidth:1,class:2})}}function _e(e){let t,n,o;return{c(){t=N("svg"),n=N("path"),z(n,"d","M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",o="feather feather-command "+e[2])},m(e,o){k(e,t,o),x(t,n)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-command "+e[2])&&z(t,"class",o)},i:p,o:p,d(e){e&&I(t)}}}function Ne(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Ce extends be{constructor(e){super(),ve(this,e,Ne,_e,b,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,o,r;return{c(){t=N("svg"),n=N("polyline"),o=N("path"),z(n,"points","9 10 4 15 9 20"),z(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",r="feather feather-corner-down-left "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-corner-down-left "+e[2])&&z(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Se(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Le extends be{constructor(e){super(),ve(this,e,Se,je,b,{size:0,strokeWidth:1,class:2})}}function Ee(e){let t,n,o,r,i;return{c(){t=N("svg"),n=N("path"),o=N("line"),r=N("line"),z(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),z(o,"x1","18"),z(o,"y1","9"),z(o,"x2","12"),z(o,"y2","15"),z(r,"x1","12"),z(r,"y1","9"),z(r,"x2","18"),z(r,"y2","15"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",i="feather feather-delete "+e[2])},m(e,i){k(e,t,i),x(t,n),x(t,o),x(t,r)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-delete "+e[2])&&z(t,"class",i)},i:p,o:p,d(e){e&&I(t)}}}function qe(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class ze extends be{constructor(e){super(),ve(this,e,qe,Ee,b,{size:0,strokeWidth:1,class:2})}}function De(e){let t,n,o,r,i;return{c(){t=N("svg"),n=N("path"),o=N("polyline"),r=N("line"),z(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),z(o,"points","15 3 21 3 21 9"),z(r,"x1","10"),z(r,"y1","14"),z(r,"x2","21"),z(r,"y2","3"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",i="feather feather-external-link "+e[2])},m(e,i){k(e,t,i),x(t,n),x(t,o),x(t,r)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-external-link "+e[2])&&z(t,"class",i)},i:p,o:p,d(e){e&&I(t)}}}function Oe(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Te extends be{constructor(e){super(),ve(this,e,Oe,De,b,{size:0,strokeWidth:1,class:2})}}function Be(e){let t,n,o,r;return{c(){t=N("svg"),n=N("circle"),o=N("line"),z(n,"cx","11"),z(n,"cy","11"),z(n,"r","8"),z(o,"x1","21"),z(o,"y1","21"),z(o,"x2","16.65"),z(o,"y2","16.65"),z(t,"xmlns","http://www.w3.org/2000/svg"),z(t,"width",e[0]),z(t,"height",e[0]),z(t,"fill","none"),z(t,"viewBox","0 0 24 24"),z(t,"stroke","currentColor"),z(t,"stroke-width",e[1]),z(t,"stroke-linecap","round"),z(t,"stroke-linejoin","round"),z(t,"class",r="feather feather-search "+e[2])},m(e,r){k(e,t,r),x(t,n),x(t,o)},p(e,[n]){1&n&&z(t,"width",e[0]),1&n&&z(t,"height",e[0]),2&n&&z(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-search "+e[2])&&z(t,"class",r)},i:p,o:p,d(e){e&&I(t)}}}function Me(e,t,n){let{size:o="100%"}=t,{strokeWidth:r=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,r=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,r,i]}class Pe extends be{constructor(e){super(),ve(this,e,Me,Be,b,{size:0,strokeWidth:1,class:2})}}const{document:Ve}=fe;function We(e){e[25]=e[27].list,e[26]=e[27].items}function Ae(e,t,n){const o=e.slice();return o[28]=t[n],o}function Re(e,t,n){const o=e.slice();return o[31]=t[n],o}function He(e,t,n){const o=e.slice();return o[31]=t[n],o}function Ye(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Ge(e){let t,n,o,r,i,s;We(e);let l=e[25]?.length&&Je(e),a=e[26]?.length&&Ue(e),c=e[25]?.length&&Ke(e);return{c(){l&&l.c(),t=j(),n=_("div"),o=_("table"),a&&a.c(),r=j(),i=_("tbody"),c&&c.c(),z(o,"striped",""),z(o,"class","svelte-btngop"),z(n,"class","eList svelte-btngop")},m(e,d){l&&l.m(e,d),k(e,t,d),k(e,n,d),x(n,o),a&&a.m(o,null),x(o,r),x(o,i),c&&c.m(i,null),s=!0},p(e,n){We(e),e[25]?.length?l?(l.p(e,n),4&n[0]&&ce(l,1)):(l=Je(e),l.c(),ce(l,1),l.m(t.parentNode,t)):l&&(le(),de(l,1,1,(()=>{l=null})),ae()),e[26]?.length?a?a.p(e,n):(a=Ue(e),a.c(),a.m(o,r)):a&&(a.d(1),a=null),e[25]?.length?c?(c.p(e,n),4&n[0]&&ce(c,1)):(c=Ke(e),c.c(),ce(c,1),c.m(i,null)):c&&(le(),de(c,1,1,(()=>{c=null})),ae())},i(e){s||(ce(l),ce(c),s=!0)},o(e){de(l),de(c),s=!1},d(e){l&&l.d(e),e&&I(t),e&&I(n),a&&a.d(),c&&c.d()}}}function Je(e){let t,n,o,r,i,s,l,a,c,d;function u(t){e[19](t)}let m={id:e[6]};return void 0!==e[3]&&(m.value=e[3]),o=new e[5]({props:m}),Y.push((()=>pe(o,"value",u))),o.$on("input",e[10]),l=new ze({props:{size:"18"}}),{c(){t=_("div"),n=C("Suchen: "),$e(o.$$.fragment),i=j(),s=_("span"),$e(l.$$.fragment),z(s,"class","feather pointer svelte-btngop"),T(t,"margin-bottom","1em"),T(t,"position","relative")},m(r,u){k(r,t,u),x(t,n),ge(o,t,null),x(t,i),x(t,s),ge(l,s,null),a=!0,c||(d=L(s,"click",e[13]),c=!0)},p(e,t){const n={};!r&&8&t[0]&&(r=!0,n.value=e[3],ee((()=>r=!1))),o.$set(n)},i(e){a||(ce(o.$$.fragment,e),ce(l.$$.fragment,e),a=!0)},o(e){de(o.$$.fragment,e),de(l.$$.fragment,e),a=!1},d(e){e&&I(t),he(o),he(l),c=!1,d()}}}function Ue(e){let t,n,o,r=e[0]&&Ze(),i=e[26],s=[];for(let t=0;t<i.length;t+=1)s[t]=Qe(He(e,i,t));return{c(){t=_("thead"),n=_("tr"),r&&r.c(),o=j();for(let e=0;e<s.length;e+=1)s[e].c();z(n,"class","svelte-btngop"),z(t,"class","svelte-btngop")},m(e,i){k(e,t,i),x(t,n),r&&r.m(n,null),x(n,o);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(e[0]?r||(r=Ze(),r.c(),r.m(n,o)):r&&(r.d(1),r=null),516&t[0]){let o;for(i=e[26],o=0;o<i.length;o+=1){const r=He(e,i,o);s[o]?s[o].p(r,t):(s[o]=Qe(r),s[o].c(),s[o].m(n,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=i.length}},d(e){e&&I(t),r&&r.d(),F(s,e)}}}function Ze(e){let t;return{c(){t=_("th"),z(t,"class","svelte-btngop")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Qe(e){let t,n,o=e[31]?.designation+"";return{c(){t=_("th"),n=C(o),z(t,"class","svelte-btngop")},m(e,o){k(e,t,o),x(t,n)},p(e,t){4&t[0]&&o!==(o=e[31]?.designation+"")&&D(n,o)},d(e){e&&I(t)}}}function Ke(e){let t,n,o=e[25],r=[];for(let t=0;t<o.length;t+=1)r[t]=it(Ae(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(7055&n[0]){let s;for(o=e[25],s=0;s<o.length;s+=1){const i=Ae(e,o,s);r[s]?(r[s].p(i,n),ce(r[s],1)):(r[s]=it(i),r[s].c(),ce(r[s],1),r[s].m(t.parentNode,t))}for(le(),s=o.length;s<r.length;s+=1)i(s);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function Xe(e){let t,n,o,r,i=e[0]&&et(e),s=e[26],l=[];for(let t=0;t<s.length;t+=1)l[t]=rt(Re(e,s,t));return{c(){t=_("tr"),i&&i.c(),n=j();for(let e=0;e<l.length;e+=1)l[e].c();o=j(),z(t,"class","pointer svelte-btngop"),B(t,"active",e[28]._id===e[1])},m(e,s){k(e,t,s),i&&i.m(t,null),x(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);x(t,o),r=!0},p(e,r){if(e[0]?i?(i.p(e,r),1&r[0]&&ce(i,1)):(i=et(e),i.c(),ce(i,1),i.m(t,n)):i&&(le(),de(i,1,1,(()=>{i=null})),ae()),900&r[0]){let n;for(s=e[26],n=0;n<s.length;n+=1){const i=Re(e,s,n);l[n]?l[n].p(i,r):(l[n]=rt(i),l[n].c(),l[n].m(t,o))}for(;n<l.length;n+=1)l[n].d(1);l.length=s.length}518&r[0]&&B(t,"active",e[28]._id===e[1])},i(e){r||(ce(i),r=!0)},o(e){de(i),r=!1},d(e){e&&I(t),i&&i.d(),F(l,e)}}}function et(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:ot,then:nt,catch:tt,value:34,blocks:[,,,]};return ue(n=e[12](e[28]),r),{c(){t=S(),r.block.c()},m(e,n){k(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,o){e=t,r.ctx=e,4&o[0]&&n!==(n=e[12](e[28]))&&ue(n,r)||me(r,e,o)},i(e){o||(ce(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){de(r.blocks[e])}o=!1},d(e){e&&I(t),r.block.d(e),r.token=null,r=null}}}function tt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function nt(e){let t,n,o,r,i;return o=new Te({props:{size:"18"}}),{c(){t=_("td"),n=_("a"),$e(o.$$.fragment),z(n,"href",r=e[34]),z(n,"target","_blank"),z(t,"class","editRow svelte-btngop")},m(e,r){k(e,t,r),x(t,n),ge(o,n,null),i=!0},p(e,t){(!i||4&t[0]&&r!==(r=e[34]))&&z(n,"href",r)},i(e){i||(ce(o.$$.fragment,e),i=!0)},o(e){de(o.$$.fragment,e),i=!1},d(e){e&&I(t),he(o)}}}function ot(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function rt(e){let t,n,o,r,i=e[7](e[28],e[31])+"";return{c(){t=_("td"),n=C(i),z(t,"class","svelte-btngop")},m(i,s){k(i,t,s),x(t,n),o||(r=L(t,"click",q((function(){v(e[8](e[28]))&&e[8](e[28]).apply(this,arguments)}))),o=!0)},p(t,o){e=t,4&o[0]&&i!==(i=e[7](e[28],e[31])+"")&&D(n,i)},d(e){e&&I(t),o=!1,r()}}}function it(e){let t,n,o=e[11](e[28],e[26],e[3]),r=o&&Xe(e);return{c(){r&&r.c(),t=S()},m(e,o){r&&r.m(e,o),k(e,t,o),n=!0},p(e,n){12&n[0]&&(o=e[11](e[28],e[26],e[3])),o?r?(r.p(e,n),12&n[0]&&ce(r,1)):(r=Xe(e),r.c(),ce(r,1),r.m(t.parentNode,t)):r&&(le(),de(r,1,1,(()=>{r=null})),ae())},i(e){n||(ce(r),n=!0)},o(e){de(r),n=!1},d(e){r&&r.d(e),e&&I(t)}}}function st(e){let t,n;return t=new e[4]({}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:p,i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function lt(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:st,then:Ge,catch:Ye,value:27,blocks:[,,,]};return ue(n=e[2]&&e[9](),r),{c(){t=S(),r.block.c()},m(e,n){k(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,o){e=t,r.ctx=e,4&o[0]&&n!==(n=e[2]&&e[9]())&&ue(n,r)||me(r,e,o)},i(e){o||(ce(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){de(r.blocks[e])}o=!1},d(e){e&&I(t),r.block.d(e),r.token=null,r=null}}}function at(e,o,r){const i=A(),{Loading:s,TextField:l}=c;let{className:a}=o,{rowId:u}=o,{filterForReady:f=!1}=o,{showEdit:p=!1}=o,{praefix:$=""}=o,{selectionFields:g=!1}=o,{deList:h}=o,v=!0,b="",w=a+Math.floor(9e3*Math.random()+1e3).toString()+"search";const y=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?m(n):d(e[`_${t.name}`]||e[t.name]||"")},x=t.getSchemaByClass(a),k=async(e,t,n,o)=>{const{value:r,refClass:i}=o,[s,l]=n.split("."),a=r?.get($),c=a&&await oi(s,a);if(!c)return e;const d=c[l];return d?.length?d.map((n=>{let o=e?.find((e=>e._id===n[t]))||{};o={...o};for(const e in o)n[e]&&(o[e]=n[e]);for(const e in n)n[e]&&(o[e]=n[e]);return ti(i+o._id.toString(),o),o})):e};W((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(w)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await x;e.eventId===t.id&&(ri(t.class,e.eventId),r(2,v=!r(2,v=!1)))}));return e.$$set=e=>{"className"in e&&r(14,a=e.className),"rowId"in e&&r(1,u=e.rowId),"filterForReady"in e&&r(15,f=e.filterForReady),"showEdit"in e&&r(0,p=e.showEdit),"praefix"in e&&r(16,$=e.praefix),"selectionFields"in e&&r(17,g=e.selectionFields),"deList"in e&&r(18,h=e.deList)},[p,u,v,b,s,l,w,y,e=>()=>i("choose",{row:e}),async()=>{const e=await x;let n,o,s=n=await Xr(e.class,e.id),l=!1,a="";const c=g&&g?.find((t=>e.class===t.refClass.split(":")[0])),d=c?.value?.get&&c.value.get($);if(d){const[n,r]=c.refClass.split(":");e.class===n&&(s=await k(s,n,r,c)),l=c.parentClass?.find((e=>"quantity"===e.name)),a=c.className,o=await t.getCountedSection(a,r.split(".")[0],d,n,"quantity")}r(0,p&&=!c),!c&&f&&(s=((e,t)=>"Information"===t.state.task?e:e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status)))(s,e));let u=[],m=e.display;return m&&m.length?m.map((t=>{const[n,o]=t.split(".");let r=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));r&&(r={...r},r.name=`${n}_${o}`,s=s.map((e=>(e[n]&&(e[r.name]=e[n][o]),e)))),r||(r=e.items.find((e=>e.name===n))),u.find((e=>e?.name===n))||u.push(r)})):u=e.items,!p&&l?(u=u.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),s=s.map((e=>{const t=o.find((t=>t._id===e._id));return t&&(e.ist=t.quantity.$numberDecimal),e})),o.map((e=>{if(!s.find((t=>t._id===e._id))){const t=n.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,s.push(t)}})),i("init",s)):h&&(s=s.filter((e=>!h.find((t=>t._id===e._id))))),{list:s,items:u}},({detail:{value:e}})=>{r(3,b=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(y(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},async e=>`/task/${(await x).id}/${e._task._id}/task?view=standalone`,()=>{r(3,b="")},a,f,$,g,h,function(e){b=e,r(3,b)}]}class ct extends be{constructor(e){var t;super(),Ve.getElementById("svelte-btngop-style")||((t=_("style")).id="svelte-btngop-style",t.textContent=".feather.svelte-btngop.svelte-btngop{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-btngop.svelte-btngop{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-btngop .editRow.svelte-btngop{width:1em}.eList.svelte-btngop table.svelte-btngop{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-btngop table thead.svelte-btngop{position:sticky;top:0;background:#326173;color:white}.eList.svelte-btngop table thead tr.svelte-btngop{height:2.3em}.eList.svelte-btngop table tbody tr.svelte-btngop{height:2.75em !important}th.svelte-btngop.svelte-btngop,td.svelte-btngop.svelte-btngop{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-btngop.svelte-btngop:hover{background-color:#DAE1E5}tr.active.svelte-btngop.svelte-btngop{color:#326173;background-color:#fcebd5}",x(Ve.head,t)),ve(this,e,at,lt,b,{className:14,rowId:1,filterForReady:15,showEdit:0,praefix:16,selectionFields:17,deList:18},[-1,-1])}}function dt(e){let t,n,o;return n=new e[7]({props:{lang:e[8].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[6],step:e[9],pattern:e[5],placeholder:e[10],readonly:e[11],disabled:e[3],required:e[4]}}),n.$on("change",e[12]),n.$on("focus",e[13]),{c(){t=_("div"),$e(n.$$.fragment),T(t,"position","relative"),T(t,"max-width","10em")},m(e,r){k(e,t,r),ge(n,t,null),o=!0},p(e,[t]){const o={};6&t&&(o.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),64&t&&(o.value=e[6]),32&t&&(o.pattern=e[5]),8&t&&(o.disabled=e[3]),16&t&&(o.required=e[4]),n.$set(o)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n)}}}function ut(e,t,n){let r;const i=A(),{TextField:s}=c;let{id:l}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t,{formnovalidate:p}=t;const $=JSON.parse(o.getItem("Locale")),g=Number("1.1").toLocaleString($.id).substring(1,2),{properties:h={}}=a;let{min:v,max:b,step:w,pattern:y,decimals:x=0,unit:k="",placeholder:I,hint:F,readonly:_,negative:N,required:C=!1}=h;y||(y=x?`[0-9]+([${g}][0-9]{1,${x}})?`:"[0-9]*"),N&&(y="-?"+y);return e.$$set=e=>{"id"in e&&n(0,l=e.id),"item"in e&&n(14,a=e.item),"value"in e&&n(15,d=e.value),"noForm"in e&&n(1,u=e.noForm),"classId"in e&&n(2,m=e.classId),"disabled"in e&&n(3,f=e.disabled),"formnovalidate"in e&&n(16,p=e.formnovalidate)},e.$$.update=()=>{65552&e.$$.dirty&&n(4,C=C&&!p),32768&e.$$.dirty&&n(6,r=Number(d.toString().replace(g,".")).toFixed(x).toString().replace(".",g))},[l,u,m,f,C,y,r,s,$,w,I,_,({detail:e})=>i("blur",{value:e.value}),({detail:e})=>{_||Number(d.toString().replace(g,"."))||n(6,r="")},a,d,p]}class mt extends be{constructor(e){super(),ve(this,e,ut,dt,b,{id:0,item:14,value:15,noForm:1,classId:2,disabled:3,formnovalidate:16})}}const{document:ft}=fe;function pt(e){e[29]=e[31].list,e[30]=e[31].items}function $t(e,t,n){const o=e.slice();return o[32]=t[n],o[34]=n,o}function gt(e,t,n){const o=e.slice();return o[35]=t[n],o[37]=n,o}function ht(e,t,n){const o=e.slice();return o[35]=t[n],o}function vt(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function bt(e){let t,n,o,r,i,s,l,a,c,d,u,m,f,p,$,g,h,v,b,w;function y(t){e[27](t)}pt(e),n=new e[7]({props:{outline:!0,$$slots:{default:[wt]},$$scope:{ctx:e}}}),n.$on("click",e[26]),r=new e[7]({props:{disabled:!e[29].length,filled:!0,$$slots:{default:[yt]},$$scope:{ctx:e}}}),r.$on("click",e[16](e[29]));let N={id:e[10]};void 0!==e[1]&&(N.value=e[1]),a=new e[5]({props:N}),Y.push((()=>pe(a,"value",y))),a.$on("input",e[13]),m=new ze({props:{size:"18"}});let E=e[30]?.length&&function(e){let t,n,o,r,i,s;r=new Fe({props:{size:"20"}});let l=e[30],a=[];for(let t=0;t<l.length;t+=1)a[t]=xt(ht(e,l,t));return{c(){t=_("thead"),n=_("tr"),o=_("th"),$e(r.$$.fragment),i=j();for(let e=0;e<a.length;e+=1)a[e].c();z(o,"class","svelte-1m010ne"),z(n,"class","svelte-1m010ne"),z(t,"class","svelte-1m010ne")},m(e,l){k(e,t,l),x(t,n),x(n,o),ge(r,o,null),x(n,i);for(let e=0;e<a.length;e+=1)a[e].m(n,null);s=!0},p(e,t){if(4096&t[0]){let o;for(l=e[30],o=0;o<l.length;o+=1){const r=ht(e,l,o);a[o]?a[o].p(r,t):(a[o]=xt(r),a[o].c(),a[o].m(n,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=l.length}},i(e){s||(ce(r.$$.fragment,e),s=!0)},o(e){de(r.$$.fragment,e),s=!1},d(e){e&&I(t),he(r),F(a,e)}}}(e),q=e[29]?.length&&function(e){let t,n,o=e[29],r=[];for(let t=0;t<o.length;t+=1)r[t]=_t($t(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(153607&n[0]){let s;for(o=e[29],s=0;s<o.length;s+=1){const i=$t(e,o,s);r[s]?(r[s].p(i,n),ce(r[s],1)):(r[s]=_t(i),r[s].c(),ce(r[s],1),r[s].m(t.parentNode,t))}for(le(),s=o.length;s<r.length;s+=1)i(s);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}(e);return{c(){t=_("div"),$e(n.$$.fragment),o=j(),$e(r.$$.fragment),i=j(),s=_("div"),l=C("Suchen: "),$e(a.$$.fragment),d=j(),u=_("span"),$e(m.$$.fragment),f=j(),p=_("div"),$=_("table"),E&&E.c(),g=j(),h=_("tbody"),q&&q.c(),z(t,"class","form--buttons svelte-1m010ne"),z(u,"class","feather pointer svelte-1m010ne"),T(s,"margin-bottom","1em"),T(s,"position","relative"),z($,"striped",""),z($,"class","svelte-1m010ne"),z(p,"class","eList svelte-1m010ne")},m(c,y){k(c,t,y),ge(n,t,null),x(t,o),ge(r,t,null),k(c,i,y),k(c,s,y),x(s,l),ge(a,s,null),x(s,d),x(s,u),ge(m,u,null),k(c,f,y),k(c,p,y),x(p,$),E&&E.m($,null),x($,g),x($,h),q&&q.m(h,null),v=!0,b||(w=L(u,"click",e[15]),b=!0)},p(e,t){pt(e);const o={};512&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};512&t[1]&&(i.$$scope={dirty:t,ctx:e}),r.$set(i);const s={};!c&&2&t[0]&&(c=!0,s.value=e[1],ee((()=>c=!1))),a.$set(s),e[30]?.length&&E.p(e,t),e[29]?.length&&q.p(e,t)},i(e){v||(ce(n.$$.fragment,e),ce(r.$$.fragment,e),ce(a.$$.fragment,e),ce(m.$$.fragment,e),ce(E),ce(q),v=!0)},o(e){de(n.$$.fragment,e),de(r.$$.fragment,e),de(a.$$.fragment,e),de(m.$$.fragment,e),de(E),de(q),v=!1},d(e){e&&I(t),he(n),he(r),e&&I(i),e&&I(s),he(a),he(m),e&&I(f),e&&I(p),E&&E.d(),q&&q.d(),b=!1,w()}}}function wt(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function yt(e){let t;return{c(){t=C("Bestätigen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function xt(e){let t,n,o=e[35]+"";return{c(){t=_("th"),n=C(o),z(t,"class","svelte-1m010ne")},m(e,o){k(e,t,o),x(t,n)},p:p,d(e){e&&I(t)}}}function kt(e){let t,n,o,r,i,s,l=e[0],a=It(e),c=e[30],d=[];for(let t=0;t<c.length;t+=1)d[t]=Ft(gt(e,c,t));return{c(){t=_("tr"),a.c(),n=j();for(let e=0;e<d.length;e+=1)d[e].c();o=j(),T(t,"cursor","zoom-in"),z(t,"title","übernimmt den Wert direkt"),z(t,"class","svelte-1m010ne"),B(t,"active",e[0].includes(e[32]))},m(l,c){k(l,t,c),a.m(t,null),x(t,n);for(let e=0;e<d.length;e+=1)d[e].m(t,null);x(t,o),r=!0,i||(s=L(t,"click",e[17](e[32])),i=!0)},p(r,i){if(e=r,1&i[0]&&b(l,l=e[0])?(le(),de(a,1,1,p),ae(),a=It(e),a.c(),ce(a),a.m(t,n)):a.p(e,i),4100&i[0]){let n;for(c=e[30],n=0;n<c.length;n+=1){const r=gt(e,c,n);d[n]?d[n].p(r,i):(d[n]=Ft(r),d[n].c(),d[n].m(t,o))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}4097&i[0]&&B(t,"active",e[0].includes(e[32]))},i(e){r||(ce(a),r=!0)},o(e){de(a),r=!1},d(e){e&&I(t),a.d(e),F(d,e),i=!1,s()}}}function It(e){let t,n,o;return n=new e[9]({props:{name:e[11],data:e[34],checked:e[0].includes(e[32]),round:!0}}),{c(){t=_("td"),$e(n.$$.fragment),z(t,"title","Wählt den Wert aus"),z(t,"class","svelte-1m010ne")},m(e,r){k(e,t,r),ge(n,t,null),o=!0},p(e,t){const o={};1&t[0]&&(o.checked=e[0].includes(e[32])),n.$set(o)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n)}}}function Ft(e){let t,n,o=(e[2][e[34]]?e[2][e[34]][e[37]]:e[32])+"";return{c(){t=_("td"),n=C(o),z(t,"class","svelte-1m010ne")},m(e,o){k(e,t,o),x(t,n)},p(e,t){4&t[0]&&o!==(o=(e[2][e[34]]?e[2][e[34]][e[37]]:e[32])+"")&&D(n,o)},d(e){e&&I(t)}}}function _t(e){let t,n,o=e[14](e[32],e[1]),r=o&&kt(e);return{c(){r&&r.c(),t=S()},m(e,o){r&&r.m(e,o),k(e,t,o),n=!0},p(e,n){2&n[0]&&(o=e[14](e[32],e[1])),o?r?(r.p(e,n),2&n[0]&&ce(r,1)):(r=kt(e),r.c(),ce(r,1),r.m(t.parentNode,t)):r&&(le(),de(r,1,1,(()=>{r=null})),ae())},i(e){n||(ce(r),n=!0)},o(e){de(r),n=!1},d(e){r&&r.d(e),e&&I(t)}}}function Nt(e){let t,n;return t=new e[4]({}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:p,i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Ct(e){let t,n,o,r;t=new e[8]({});let i={ctx:e,current:null,token:null,hasCatch:!1,pending:Nt,then:bt,catch:vt,value:31,blocks:[,,,]};return ue(e[12](),i),{c(){$e(t.$$.fragment),n=j(),o=S(),i.block.c()},m(e,s){ge(t,e,s),k(e,n,s),k(e,o,s),i.block.m(e,i.anchor=s),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(t,n){me(i,e=t,n)},i(e){r||(ce(t.$$.fragment,e),ce(i.block),r=!0)},o(e){de(t.$$.fragment,e);for(let e=0;e<3;e+=1){de(i.blocks[e])}r=!1},d(e){he(t,e),e&&I(n),e&&I(o),i.block.d(e),i.token=null,i=null}}}function jt(e){let t,n;return t=new e[6]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Ct]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};7&n[0]|512&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function St(e,n,o){const r=A(),{Loading:i,TextField:s,Dialog:l,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=n,{id:f}=n,{selection:p}=n,{tableName:$}=n,{idName:g}=n,{target:h}=n,{view:v}=n,{unique:b}=n,{uniqueView:w}=n;p||=[];let y="",x=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",k=[];const I=$+g+h+"checkbox",F=(e,t)=>e>t?1:t>e?-1:0;return e.$$set=e=>{"classId"in e&&o(18,m=e.classId),"id"in e&&o(19,f=e.id),"selection"in e&&o(0,p=e.selection),"tableName"in e&&o(20,$=e.tableName),"idName"in e&&o(21,g=e.idName),"target"in e&&o(22,h=e.target),"view"in e&&o(23,v=e.view),"unique"in e&&o(24,b=e.unique),"uniqueView"in e&&o(25,w=e.uniqueView)},[p,y,k,r,i,s,l,a,d,u,x,I,async()=>{let e,n=[];if(o(2,k=[]),v){const n=m.split("-")[1].slice(0,-4),o="input."+m+"[name='_id']",r=document.querySelector(o).value,i={[g]:f,$or:[{status:!0},{[n]:r}]};e=await t.getSectionView($,i),e=e.sort(((e,t)=>{const o=e=>(e[n]||"z").toString()+e[h];return F(o(e),o(t))}))}else if(w){const r={[g]:f,status:!0};Object.entries(w).map((([e,t])=>{t?.length&&(r[e]={$in:t}),n.push(e)})),e=await t.getSectionView($,r),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[h])?"0-":"1-")+e[h];return F(n(e),n(t))})),o(2,k=e.map((e=>{const t=[e[h]];return n.map((n=>t.push(e[n]))),t})))}else b?(e=await t.getSection($,g,f,b),e=e.sort(((e,t)=>F(e,t)))):(e=await t.getSection($,g,f),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[h])?"0-":"1-")+e[h];return F(n(e),n(t))})));const r=[];e.map((e=>r.push(e[h])));const i=await t.getSchemaByClass($),s=i.items.find((e=>e.name===h))?.designation;return n=n.map((e=>i.items.find((t=>t.name===e))?.designation)),{list:r.flat(),items:[s,...n]}},({detail:{value:e}})=>{o(1,y=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{o(1,y="")},e=>()=>{const t=document.getElementsByName(I),n=[];t.forEach(((t,o)=>{t.checked&&n.push(e[+t.attributes.data.value])})),r("choose",{list:n})},e=>t=>{"TD"===t.originalTarget.tagName&&(o(0,p=p.includes(e)?p.filter((t=>t!==e)):p.concat(e)),r("choose",{list:p}))},m,f,$,g,h,v,b,w,()=>r("back"),function(e){y=e,o(1,y)}]}class Lt extends be{constructor(e){var t;super(),ft.getElementById("svelte-1m010ne-style")||((t=_("style")).id="svelte-1m010ne-style",t.textContent=".feather.svelte-1m010ne.svelte-1m010ne{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-1m010ne.svelte-1m010ne{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-1m010ne table.svelte-1m010ne{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-1m010ne table thead.svelte-1m010ne{position:sticky;top:0;background:#326173;color:white}.eList.svelte-1m010ne table tbody tr.svelte-1m010ne{height:2.3em}th.svelte-1m010ne.svelte-1m010ne,td.svelte-1m010ne.svelte-1m010ne{padding-left:0.4em;padding-right:0.4em}tr.active.svelte-1m010ne.svelte-1m010ne{color:#326173;background-color:#fcebd5}.dialog.eList{max-height:90vh}.checkbox.round > .selector{border-color:#326173 !important}.form--buttons.svelte-1m010ne.svelte-1m010ne{display:flex;gap:1em;padding:0.5em 0}",x(ft.head,t)),ve(this,e,St,jt,b,{classId:18,id:19,selection:0,tableName:20,idName:21,target:22,view:23,unique:24,uniqueView:25},[-1,-1])}}const{document:Et}=fe;function qt(e){let t,n,o,r,i,s=e[7].length+"";return{c(){t=_("span"),n=C("("),o=C(s),r=C(")"),z(t,"class",i=y(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,i){k(e,t,i),x(t,n),x(t,o),x(t,r)},p(e,n){128&n[0]&&s!==(s=e[7].length+"")&&D(o,s),2&n[0]&&i!==(i=y(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&z(t,"class",i)},d(e){e&&I(t)}}}function zt(e){let t;return{c(){t=_("div"),z(t,"class","load-more-options"),z(t,"slot","load-more-options-message slot")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Dt(e){let t,n,o,r;const i=[Bt,Tt,Ot],s=[];function l(e,t){return e[7].length?0:e[17]?1:e[14]&&e[16].view?2:-1}return~(t=l(e))&&(n=s[t]=i[t](e)),{c(){n&&n.c(),o=S()},m(e,n){~t&&s[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?~t&&s[t].p(e,r):(n&&(le(),de(s[a],1,1,(()=>{s[a]=null})),ae()),~t?(n=s[t],n?n.p(e,r):(n=s[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o)):n=null)},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){~t&&s[t].d(e),e&&I(o)}}}function Ot(e){let t,n,o,r,i;return n=new xe({props:{size:"18"}}),{c(){t=_("span"),$e(n.$$.fragment),z(t,"title","Übernehmen"),z(t,"class","feather pointer svelte-1rbaejz")},m(s,l){k(s,t,l),ge(n,t,null),o=!0,r||(i=L(t,"click",e[24]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n),r=!1,i()}}}function Tt(e){let t,n,o,r,i;return n=new Ce({props:{size:"18"}}),{c(){t=_("span"),$e(n.$$.fragment),z(t,"title",e[17].title||"Generieren"),z(t,"class","feather pointer svelte-1rbaejz")},m(s,l){k(s,t,l),ge(n,t,null),o=!0,r||(i=L(t,"click",e[23]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n),r=!1,i()}}}function Bt(e){let t,n,o,r,i;return n=new ze({props:{size:"18"}}),{c(){t=_("span"),$e(n.$$.fragment),z(t,"title","Löschen"),z(t,"class","feather pointer svelte-1rbaejz")},m(s,l){k(s,t,l),ge(n,t,null),o=!0,r||(i=L(t,"click",e[25]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n),r=!1,i()}}}function Mt(e){let t,n,o;function r(t){e[32](t)}let i={class:"tModal",noClickaway:!0,$$slots:{default:[Pt]},$$scope:{ctx:e}};return void 0!==e[10]&&(i.open=e[10]),t=new e[11]({props:i}),Y.push((()=>pe(t,"open",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};53&o[0]|256&o[1]&&(r.$$scope={dirty:o,ctx:e}),!n&&1024&o[0]&&(n=!0,r.open=e[10],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function Pt(e){let t,n;return t=new Lt({props:{classId:e[2],selection:e[0],view:e[15],unique:e[16].unique&&e[4].name,uniqueView:e[16].view&&{[e[16].view]:e[5][e[16].view]},id:e[5][e[19]],tableName:e[18],idName:e[19],target:e[4].name}}),t.$on("choose",e[22]),t.$on("back",e[21]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4&n[0]&&(o.classId=e[2]),1&n[0]&&(o.selection=e[0]),16&n[0]&&(o.unique=e[16].unique&&e[4].name),32&n[0]&&(o.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(o.id=e[5][e[19]]),16&n[0]&&(o.target=e[4].name),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Vt(e){let t,n,o,r,i,s,l,a,c,d=e[7].length&&qt(e);function u(t){e[30](t)}function m(t){e[31](t)}let f={id:e[3],name:e[3],class:e[3],readonly:e[13],disabled:e[1],required:e[6],placeholder:e[8],getOptions:Wt,minSearchLength:"3",$$slots:{"load-more-options-message slot":[zt]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),o=new e[12]({props:f}),Y.push((()=>pe(o,"selection",u))),Y.push((()=>pe(o,"maxOptions",m))),o.$on("change",e[20]);let p=!e[1]&&Dt(e),$=e[10]&&Mt(e);return{c(){t=_("div"),d&&d.c(),n=j(),$e(o.$$.fragment),s=j(),p&&p.c(),l=j(),$&&$.c(),a=S(),T(t,"position","relative")},m(e,r){k(e,t,r),d&&d.m(t,null),x(t,n),ge(o,t,null),x(t,s),p&&p.m(t,null),k(e,l,r),$&&$.m(e,r),k(e,a,r),c=!0},p(e,s){e[7].length?d?d.p(e,s):(d=qt(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const l={};8&s[0]&&(l.id=e[3]),8&s[0]&&(l.name=e[3]),8&s[0]&&(l.class=e[3]),2&s[0]&&(l.disabled=e[1]),64&s[0]&&(l.required=e[6]),256&s[0]&&(l.placeholder=e[8]),256&s[1]&&(l.$$scope={dirty:s,ctx:e}),!r&&128&s[0]&&(r=!0,l.selection=e[7],ee((()=>r=!1))),!i&&512&s[0]&&(i=!0,l.maxOptions=e[9],ee((()=>i=!1))),o.$set(l),e[1]?p&&(le(),de(p,1,1,(()=>{p=null})),ae()):p?(p.p(e,s),2&s[0]&&ce(p,1)):(p=Dt(e),p.c(),ce(p,1),p.m(t,null)),e[10]?$?($.p(e,s),1024&s[0]&&ce($,1)):($=Mt(e),$.c(),ce($,1),$.m(a.parentNode,a)):$&&(le(),de($,1,1,(()=>{$=null})),ae())},i(e){c||(ce(o.$$.fragment,e),ce(p),ce($),c=!0)},o(e){de(o.$$.fragment,e),de(p),de($),c=!1},d(e){e&&I(t),d&&d.d(),he(o),p&&p.d(),e&&I(l),$&&$.d(e),e&&I(a)}}}async function*Wt(e){yield[{name:e}]}function At(e,n,o){const r=A(),{Modal:i,Autocomplete:s}=c;let{classId:l}=n,{id:a}=n,{item:d}=n,{record:u}=n,{value:m}=n,{noForm:f=!1}=n,{disabled:p}=n,{formnovalidate:$}=n,{numberInput:g}=n,{praefix:h}=n;const{properties:v={}}=d;let{placeholder:b,hint:w,readonly:y,required:x=!1,lookup:k="",view:I=!1,multi:F,max:_=1e3,generate:N=!1}=v;const[C,j]=k.split(":");let S=!1,L=m.map&&m.map((e=>({name:e})))||[];p||=y,p&&(b="");W((async()=>{const e=document.getElementById(a);e.classList.add(l),!y&&k&&e.addEventListener("focus",E)}));const E=()=>{if(k){document.getElementById(a).blur(),(F.unique||L.length<_)&&o(10,S=!0)}},q=()=>{o(10,S&&=!1)},z=({detail:e})=>{o(7,L=e.list.map((e=>({name:e})))),r("blur",{value:e.list}),q()},D=(e=!1)=>{if(p||!F.required)return;const t=F.maxItem;if(!t||F.unique)return;o(9,_=!1!==e?e:u[t]||0);const n=L.length!=_,i=document.getElementById(a);i?.classList?.toggle("invalid",n),r("invalid",{idx:h,value:n})};return e.$$set=e=>{"classId"in e&&o(2,l=e.classId),"id"in e&&o(3,a=e.id),"item"in e&&o(4,d=e.item),"record"in e&&o(5,u=e.record),"value"in e&&o(0,m=e.value),"noForm"in e&&o(26,f=e.noForm),"disabled"in e&&o(1,p=e.disabled),"formnovalidate"in e&&o(27,$=e.formnovalidate),"numberInput"in e&&o(28,g=e.numberInput),"praefix"in e&&o(29,h=e.praefix)},e.$$.update=()=>{128&e.$$.dirty[0]&&L&&(o(0,m=L.map&&L.map((e=>e.name))||[]),D()),268435456&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:o}=e;void 0!==h&&h!==o||t&&t.name===F.maxItem&&D(n)})(g),134217792&e.$$.dirty[0]&&o(6,x=x&&!$)},[m,p,l,a,d,u,x,L,b,_,S,i,s,y,k,I,F,N,C,j,({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),o(7,L=t.map((e=>({name:e.trim()})))),r("blur",{value:L.map((e=>e.name))})},q,z,()=>{const e=u[N.itemQuantity];if(!e)return;const t=N.prefix||"",n=u[N.variable]||"",o=N.len||5,r=Array.from({length:e},((e,r)=>t+n+"-"+r.toString().padStart(o,"0")));z({detail:{list:r}})},async()=>{const e=u[F.maxItem];if(!e)return;const n={[j]:u[j],status:!0},o=[].concat(u[F.view]||[]);o.length&&(n[F.view]={$in:o});const r=await t.getSectionView(C,n),i=Array.from({length:e<r.length?e:r.length},((e,t)=>r[t][d.name]));z({detail:{list:i}})},()=>{z({detail:{list:[]}})},f,$,g,h,function(e){L=e,o(7,L)},function(e){_=e,o(9,_)},function(e){S=e,o(10,S)}]}class Rt extends be{constructor(e){var t;super(),Et.getElementById("svelte-1rbaejz-style")||((t=_("style")).id="svelte-1rbaejz-style",t.textContent=".feather.svelte-1rbaejz{position:absolute;top:1em;right:0.5em;color:#4300b0}.showNumber.svelte-1rbaejz{position:absolute;display:inline-block;width:3.5em;text-align:right;top:1em;left:-4em;color:#4300b0}.showNumber.disabled.svelte-1rbaejz{color:#888 !important}.autocomplete .notice,.autocomplete .load-more-options,.autocomplete .show-on-focus,.autocomplete.disabled .chip button.btn,.autocomplete.disabled .chip+.autocomplete-field input{display:none}.autocomplete-field input.invalid{border:1px red solid !important}.autocomplete.disabled .chip{height:2.25em !important;padding-right:0.75em !important}",x(Et.head,t)),ve(this,e,At,Vt,b,{classId:2,id:3,item:4,record:5,value:0,noForm:26,disabled:1,formnovalidate:27,numberInput:28,praefix:29},[-1,-1])}}function Ht(e,t,n){const o=e.slice();return o[10]=t[n],o}function Yt(e){let t,n,o,r=e[10]+"";return{c(){t=_("option"),n=C(r),t.__value=e[10],t.value=t.__value,t.selected=o=e[1]===e[10],z(t,"class","svelte-5xpzvo")},m(e,o){k(e,t,o),x(t,n)},p(e,n){2&n&&o!==(o=e[1]===e[10])&&(t.selected=o)},d(e){e&&I(t)}}}function Gt(e){let t,n,o,r,i,s=e[4],l=[];for(let t=0;t<s.length;t+=1)l[t]=Yt(Ht(e,s,t));return{c(){t=_("select"),n=_("option");for(let e=0;e<l.length;e+=1)l[e].c();n.__value="",n.value=n.__value,z(n,"class","svelte-5xpzvo"),z(t,"class",o=y(e[2]||e[3])+" svelte-5xpzvo"),z(t,"id",e[0]),z(t,"name",e[0]),z(t,"readonly",e[5])},m(o,s){k(o,t,s),x(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);r||(i=L(t,"change",e[6]),r=!0)},p(e,[n]){if(18&n){let o;for(s=e[4],o=0;o<s.length;o+=1){const r=Ht(e,s,o);l[o]?l[o].p(r,n):(l[o]=Yt(r),l[o].c(),l[o].m(t,null))}for(;o<l.length;o+=1)l[o].d(1);l.length=s.length}12&n&&o!==(o=y(e[2]||e[3])+" svelte-5xpzvo")&&z(t,"class",o),1&n&&z(t,"id",e[0]),1&n&&z(t,"name",e[0])},i:p,o:p,d(e){e&&I(t),F(l,e),r=!1,i()}}}function Jt(e,t,n){const o=A();let{id:r}=t,{item:i}=t,{value:s}=t,{noForm:l=!1}=t,{classId:a}=t,{disabled:c}=t;const{enum:d}=i.properties,u=c||i.properties.readonly;return e.$$set=e=>{"id"in e&&n(0,r=e.id),"item"in e&&n(7,i=e.item),"value"in e&&n(1,s=e.value),"noForm"in e&&n(2,l=e.noForm),"classId"in e&&n(3,a=e.classId),"disabled"in e&&n(8,c=e.disabled)},[r,s,l,a,d,u,e=>o("blur",{value:e.srcElement.value}),i,c]}class Ut extends be{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=_("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo.svelte-5xpzvo{padding:0 0.625em 0.0625em;box-sizing:border-box;width:100%;border:0 solid rgba(0, 0, 0, 0.42);border-bottom-width:0px;border-bottom-width:0.0625em;border-top-left-radius:0.375em;border-top-right-radius:0.375em;background-color:#f5f5f5;outline:none;font-size:1rem;font-weight:300;height:2.8em}select.svelte-5xpzvo.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}select[readonly].svelte-5xpzvo option.svelte-5xpzvo{display:none}",x(document.head,t)),ve(this,e,Jt,Gt,b,{id:0,item:7,value:1,noForm:2,classId:3,disabled:8})}}const Zt=/\d+/g,Qt=/%[HMSpPdmyY%]/g;function Kt(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("%%","%")}function Xt(e){let t;return{c(){t=C("Stunden")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function en(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Xt]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function tn(e){let t;return{c(){t=C("Minuten")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function nn(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[tn]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function on(e){let t;return{c(){t=C("Jetzt")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function rn(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[on]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function sn(e){let t,n,o,r,i,s,l,a,c;return r=new e[5]({props:{value:e[0],closeOnSelection:!0}}),r.$on("change",e[8]),s=new e[6]({props:{value:e[0],$$slots:{"now-label":[rn],"minutes-label":[nn],"hours-label":[en]},$$scope:{ctx:e}}}),s.$on("change",e[7]),{c(){t=_("input"),o=j(),$e(r.$$.fragment),i=j(),$e(s.$$.fragment),z(t,"type","string"),z(t,"class",n=e[2]||e[3]),z(t,"id",e[1]),z(t,"name",e[1]),t.hidden=!0},m(n,d){k(n,t,d),O(t,e[0]),k(n,o,d),ge(r,n,d),k(n,i,d),ge(s,n,d),l=!0,a||(c=L(t,"input",e[9]),a=!0)},p(e,[o]){(!l||12&o&&n!==(n=e[2]||e[3]))&&z(t,"class",n),(!l||2&o)&&z(t,"id",e[1]),(!l||2&o)&&z(t,"name",e[1]),1&o&&O(t,e[0]);const i={};1&o&&(i.value=e[0]),r.$set(i);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),s.$set(a)},i(e){l||(ce(r.$$.fragment,e),ce(s.$$.fragment,e),l=!0)},o(e){de(r.$$.fragment,e),de(s.$$.fragment,e),l=!1},d(e){e&&I(t),e&&I(o),he(r,e),e&&I(i),he(s,e),a=!1,c()}}}function ln(e,t,n){const o=A(),{Label:r,DatePicker:i,TimePicker:s}=c;let{value:l}=t,{id:a}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>o("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,l=e.value),"id"in e&&n(1,a=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[l,a,d,u,r,i,s,({detail:e})=>{var t,o;n(0,(t=e.value,o=l,l=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(l)},({detail:e})=>{var t,o;n(0,(t=e.value,o=l,l=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(l)},function(){l=this.value,n(0,l)}]}class an extends be{constructor(e){super(),ve(this,e,ln,sn,b,{value:0,id:1,noForm:2,classId:3})}}function cn(e){let t,n,o;return n=new e[6]({props:{type:"string",inputClass:e[2]?"":" "+e[3],id:e[0],name:e[0],value:e[1],pattern:dn,placeholder:un,readonly:e[4],disabled:e[5]}}),n.$on("change",e[7]),{c(){t=_("div"),$e(n.$$.fragment),T(t,"max-width","4em")},m(e,r){k(e,t,r),ge(n,t,null),o=!0},p(e,[t]){const o={};12&t&&(o.inputClass=e[2]?"":" "+e[3]),1&t&&(o.id=e[0]),1&t&&(o.name=e[0]),2&t&&(o.value=e[1]),16&t&&(o.readonly=e[4]),32&t&&(o.disabled=e[5]),n.$set(o)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n)}}}const dn="([01][0-9]|2[0-3]):([0-5][0-9])",un="";function mn(e,t,n){const o=A(),{TextField:r}=c;let{id:i}=t,{item:s}=t,{value:l}=t,{noForm:a=!1}=t,{classId:d}=t,{readonly:u}=t,{disabled:m}=t,{praefix:f}=t;const p=e=>{if(!e)return"";const[t,n]=e.split(":");return 4===t.length?`${t.substr(0,2)}:${t.substring(2,4)}`:3===t.length?t.substring(0,2)>23?`0${t.substring(0,1)}:${t.substring(1,3)}`:`${t.substring(0,2)}:${t.substring(2,3)}0`:2===t.length?t>23?`0${t.substring(0,1)}:${t.substring(1,2)}0`:`${t}:${(n||"0").padStart(2,"0")}`:`0${t}:${(n||"0").padStart(2,"0")}`};return e.$$set=e=>{"id"in e&&n(0,i=e.id),"item"in e&&n(8,s=e.item),"value"in e&&n(1,l=e.value),"noForm"in e&&n(2,a=e.noForm),"classId"in e&&n(3,d=e.classId),"readonly"in e&&n(4,u=e.readonly),"disabled"in e&&n(5,m=e.disabled),"praefix"in e&&n(9,f=e.praefix)},[i,l,a,d,u,m,r,({detail:e})=>{o("blur",{value:p(e.value)}),o("checkRange",{idx:f,fieldId:i,value:e.value})},s,f]}class fn extends be{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=_("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",x(document.head,t)),ve(this,e,mn,cn,b,{id:0,item:8,value:1,noForm:2,classId:3,readonly:4,disabled:5,praefix:9})}}function pn(e){let t,n;return t=new e[15]({props:{inputClass:e[3]||e[4],disabled:e[6],formnovalidate:e[8],readonly:e[19],pattern:e[21],required:e[18],id:e[23],name:e[22],value:e[12]()}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),4096&n[0]&&(o.value=e[12]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function $n(e){let t,n;return t=new e[15]({props:{inputClass:e[3]||e[4],disabled:e[6],formnovalidate:e[8],readonly:e[19],required:e[18],type:"email",id:e[23],name:e[22],value:e[12]()}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),4096&n[0]&&(o.value=e[12]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function gn(e){let t,n;return t=new fn({props:{inputClass:e[3]||e[4],disabled:e[6],readonly:e[19],required:e[18],id:e[23],item:e[1],value:e[12](),praefix:e[2]}}),t.$on("blur",e[25]()),t.$on("checkRange",e[30]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.item=e[1]),4096&n[0]&&(o.value=e[12]()),4&n[0]&&(o.praefix=e[2]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function hn(e){let t,n;return t=new an({props:{classId:e[4],id:e[23],disabled:e[6],required:e[18],value:e[24](),noForm:e[3]}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function vn(e){let t,n;return t=new e[16]({props:{inputClass:e[3]||e[4],required:e[18],disabled:e[6],id:e[23],name:e[22],value:e[24](),closeOnSelection:!0}}),t.$on("change",e[25](!0)),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function bn(e){let t,n;return t=new e[17]({props:{round:!0,inputClass:e[3]||e[4],disabled:e[6]||e[19],required:e[18],id:e[23],name:e[22],checked:e[12]()}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]||e[19]),4096&n[0]&&(o.checked=e[12]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function wn(e){let t,n;return t=new Rt({props:{classId:e[4],disabled:e[6],required:e[18],id:e[23],item:e[1],record:e[0],value:e[12](),noForm:e[3],multi:e[1].properties.multi,numberInput:e[10],praefix:e[2]}}),t.$on("blur",e[25]()),t.$on("invalid",e[29]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),2&n[0]&&(o.multi=e[1].properties.multi),1024&n[0]&&(o.numberInput=e[10]),4&n[0]&&(o.praefix=e[2]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function yn(e){let t,n;return t=new Ut({props:{classId:e[4],disabled:e[6],required:e[18],id:e[23],item:e[1],value:e[12](),noForm:e[3]}}),t.$on("blur",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.item=e[1]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function xn(e){let t,n;return t=new mt({props:{classId:e[4],disabled:e[6],formnovalidate:e[8],required:e[18],readonly:e[19],id:e[23],item:e[1],value:e[12](),noForm:e[3]}}),t.$on("blur",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),2&n[0]&&(o.item=e[1]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function kn(e){let t,n;return t=new r({props:{classId:e[4],disabled:e[6],readonly:e[19],id:e[23],name:e[1].name,value:e[12](),noForm:e[3]}}),t.$on("blur",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.name=e[1].name),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function In(e){let t,n;return t=new jo({props:{classId:e[4],eventId:e[5],required:e[18],disabled:e[6],formnovalidate:e[8],readonly:e[19],id:e[23],item:e[1],desc:e[13],value:e[12](),noForm:e[3],praefix:e[2],selectionFields:e[7],selection:e[9],deList:e[11],recordId:e[0]._id}}),t.$on("task",e[28]),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),32&n[0]&&(o.eventId=e[5]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),2&n[0]&&(o.item=e[1]),8192&n[0]&&(o.desc=e[13]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),4&n[0]&&(o.praefix=e[2]),128&n[0]&&(o.selectionFields=e[7]),512&n[0]&&(o.selection=e[9]),2048&n[0]&&(o.deList=e[11]),1&n[0]&&(o.recordId=e[0]._id),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Fn(e){let t,n,o,r;const i=[In,kn,xn,yn,wn,bn,vn,hn,gn,$n,pn],s=[];function l(e,t){return"object"===e[1].type?0:"textarea"===e[1].type||e[1].properties&&"textarea"===e[1].properties.format?1:"number"===e[1].type?2:e[1].properties&&e[1].properties.enum?3:e[1].properties&&e[1].properties.multi?4:"boolean"===e[1].type?5:"date"===e[1].type?6:"datetime"===e[1].type?7:"time"===e[1].properties?.format?8:"email"===e[1].type?9:10}return t=l(e),n=s[t]=i[t](e),{c(){n.c(),o=S()},m(e,n){s[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?s[t].p(e,r):(le(),de(s[a],1,1,(()=>{s[a]=null})),ae(),n=s[t],n?n.p(e,r):(n=s[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o))},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){s[t].d(e),e&&I(o)}}}function _n(e){let t,n;return t=new e[14]({props:{id:e[26](e[23]),class:e[20]&&"hidden",name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[Fn]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),16383&n[0]|32&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Nn(e,t,n){let o,r,i;const s=A(),{FormField:l,TextField:a,DatePicker:u,TimePicker:m,Checkbox:f}=c;let{praefix:p=""}=t,{item:$}=t,{listName:g=""}=t,{record:h}=t,{noForm:v=!1}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{selectionFields:x}=t,{formnovalidate:k}=t,{selection:I=!1}=t,{numberInput:F}=t,{deList:_}=t;const{required:N,readonly:C,hidden:j,pattern:S}=$.properties||{};if("string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const L=(g?g+".":"")+$.name,E=L+(""!==p?"-"+p:""),q=(e,t=L)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(2,p=e.praefix),"item"in e&&n(1,$=e.item),"listName"in e&&n(27,g=e.listName),"record"in e&&n(0,h=e.record),"noForm"in e&&n(3,v=e.noForm),"classId"in e&&n(4,b=e.classId),"eventId"in e&&n(5,w=e.eventId),"disabled"in e&&n(6,y=e.disabled),"selectionFields"in e&&n(7,x=e.selectionFields),"formnovalidate"in e&&n(8,k=e.formnovalidate),"selection"in e&&n(9,I=e.selection),"numberInput"in e&&n(10,F=e.numberInput),"deList"in e&&n(11,_=e.deList)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(12,o=(e=L)=>{let t=q(h);return void 0===t?"":t}),1&e.$$.dirty[0]&&(i=q(h))},n(13,r=((e=L)=>{let t=h["_"+e];return t=d(t),void 0===t?"":t})()),[h,$,p,v,b,w,y,x,k,I,F,_,o,r,l,a,u,f,N,C,j,S,L,E,(e=L)=>{let t=q(h);return t?new Date(t):new Date},e=>({detail:t})=>{let{value:o,checked:r}=t;void 0!==r&&(o=r),n(0,h[L]=e?Kt(o,"%d.%m.%Y"):o,h);const l=Object.values(h).every((e=>!e))&&o;s("notify",{oldValue:i,value:o,add:l,itemName:L,desc:t.description})},()=>"object"===$.type?"comment_"+E:E,g,function(t){R(e,t)},function(t){R(e,t)},function(t){R(e,t)}]}class Cn extends be{constructor(e){var t;super(),document.getElementById("svelte-mea5fj-style")||((t=_("style")).id="svelte-mea5fj-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.form-field div.field > label.checkbox{padding-top:0.5em}",x(document.head,t)),ve(this,e,Nn,_n,b,{praefix:2,item:1,listName:27,record:0,noForm:3,classId:4,eventId:5,disabled:6,selectionFields:7,formnovalidate:8,selection:9,numberInput:10,deList:11},[-1,-1])}}function jn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Sn(e){let t,n,o=e[33]&&Ln(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){e[33]?o?(o.p(e,n),4&n[0]&&ce(o,1)):(o=Ln(e),o.c(),ce(o,1),o.m(t.parentNode,t)):o&&(le(),de(o,1,1,(()=>{o=null})),ae())},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Ln(e){let t,n;return t=new e[15]({props:{title:e[18],class:"eList "+(e[8]?"form":""),$$slots:{default:[Vn]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};256&n[0]&&(o.class="eList "+(e[8]?"form":"")),32767&n[0]|8&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function En(e){let t,n;return t=new ai({props:{schema:e[1],recID:e[0],readonly:e[9]}}),t.$on("choose",(function(){v(e[24](e[33]))&&e[24](e[33]).apply(this,arguments)})),t.$on("back",e[20]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const r={};2&o[0]&&(r.schema=e[1]),1&o[0]&&(r.recID=e[0]),512&o[0]&&(r.readonly=e[9]),t.$set(r)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function qn(e){let t,n,o,r,i,s,l;t=new e[16]({props:{text:e[10]?"Zusätzliche Auswahl":""}});const a=[Dn,zn],c=[];function d(e,t){return e[10]?0:1}return o=d(e),r=c[o]=a[o](e),s=new ct({props:{className:e[1].class,filterForReady:e[3],praefix:e[4],selectionFields:e[5],rowId:e[0],deList:e[7],showEdit:e[6]}}),s.$on("edit",e[25]),s.$on("choose",e[28]),s.$on("init",e[26]),{c(){$e(t.$$.fragment),n=j(),r.c(),i=j(),$e(s.$$.fragment)},m(e,r){ge(t,e,r),k(e,n,r),c[o].m(e,r),k(e,i,r),ge(s,e,r),l=!0},p(e,n){const l={};1024&n[0]&&(l.text=e[10]?"Zusätzliche Auswahl":""),t.$set(l);let u=o;o=d(e),o===u?c[o].p(e,n):(le(),de(c[u],1,1,(()=>{c[u]=null})),ae(),r=c[o],r?r.p(e,n):(r=c[o]=a[o](e),r.c()),ce(r,1),r.m(i.parentNode,i));const m={};2&n[0]&&(m.className=e[1].class),8&n[0]&&(m.filterForReady=e[3]),16&n[0]&&(m.praefix=e[4]),32&n[0]&&(m.selectionFields=e[5]),1&n[0]&&(m.rowId=e[0]),128&n[0]&&(m.deList=e[7]),64&n[0]&&(m.showEdit=e[6]),s.$set(m)},i(e){l||(ce(t.$$.fragment,e),ce(r),ce(s.$$.fragment,e),l=!0)},o(e){de(t.$$.fragment,e),de(r),de(s.$$.fragment,e),l=!1},d(e){he(t,e),e&&I(n),c[o].d(e),e&&I(i),he(s,e)}}}function zn(e){let t,n,o,r,i;return n=new e[17]({props:{outline:!0,$$slots:{default:[On]},$$scope:{ctx:e}}}),n.$on("click",e[21]),r=new e[17]({props:{filled:!0,$$slots:{default:[Tn]},$$scope:{ctx:e}}}),r.$on("click",e[22]),{c(){t=_("div"),$e(n.$$.fragment),o=j(),$e(r.$$.fragment),z(t,"class","form--buttons svelte-jb5mrh")},m(e,s){k(e,t,s),ge(n,t,null),x(t,o),ge(r,t,null),i=!0},p(e,t){const o={};8&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};8&t[1]&&(i.$$scope={dirty:t,ctx:e}),r.$set(i)},i(e){i||(ce(n.$$.fragment,e),ce(r.$$.fragment,e),i=!0)},o(e){de(n.$$.fragment,e),de(r.$$.fragment,e),i=!1},d(e){e&&I(t),he(n),he(r)}}}function Dn(e){let t,n,o,r,i,s,l,a,c=e[13]&&Bn(e);return o=new e[17]({props:{outline:!0,$$slots:{default:[Mn]},$$scope:{ctx:e}}}),o.$on("click",e[21]),i=new e[17]({props:{disabled:!e[14],filled:!0,$$slots:{default:[Pn]},$$scope:{ctx:e}}}),i.$on("click",e[23]),l=new e[16]({props:{text:"Liste"}}),{c(){c&&c.c(),t=j(),n=_("div"),$e(o.$$.fragment),r=j(),$e(i.$$.fragment),s=j(),$e(l.$$.fragment),z(n,"class","form--buttons svelte-jb5mrh")},m(e,d){c&&c.m(e,d),k(e,t,d),k(e,n,d),ge(o,n,null),x(n,r),ge(i,n,null),k(e,s,d),ge(l,e,d),a=!0},p(e,n){e[13]?c?(c.p(e,n),8192&n[0]&&ce(c,1)):(c=Bn(e),c.c(),ce(c,1),c.m(t.parentNode,t)):c&&(le(),de(c,1,1,(()=>{c=null})),ae());const r={};8&n[1]&&(r.$$scope={dirty:n,ctx:e}),o.$set(r);const s={};16384&n[0]&&(s.disabled=!e[14]),8&n[1]&&(s.$$scope={dirty:n,ctx:e}),i.$set(s)},i(e){a||(ce(c),ce(o.$$.fragment,e),ce(i.$$.fragment,e),ce(l.$$.fragment,e),a=!0)},o(e){de(c),de(o.$$.fragment,e),de(i.$$.fragment,e),de(l.$$.fragment,e),a=!1},d(e){c&&c.d(e),e&&I(t),e&&I(n),he(o),he(i),e&&I(s),he(l,e)}}}function On(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Tn(e){let t;return{c(){t=C("Neu")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Bn(e){let t,n;return t=new Cn({props:{item:e[11],record:{_id:"",[e[11].name]:""},noForm:"true",classId:"sel_"+e[11].name,eventId:e[12],deList:e[13]}}),t.$on("notify",e[27]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};2048&n[0]&&(o.item=e[11]),2048&n[0]&&(o.record={_id:"",[e[11].name]:""}),2048&n[0]&&(o.classId="sel_"+e[11].name),4096&n[0]&&(o.eventId=e[12]),8192&n[0]&&(o.deList=e[13]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Mn(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Pn(e){let t;return{c(){t=C("Übernehmen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Vn(e){let t,n,o,r;const i=[qn,En],s=[];function l(e,t){return e[33].length&&!e[8]?0:1}return t=l(e),n=s[t]=i[t](e),{c(){n.c(),o=S()},m(e,n){s[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?s[t].p(e,r):(le(),de(s[a],1,1,(()=>{s[a]=null})),ae(),n=s[t],n?n.p(e,r):(n=s[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o))},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){s[t].d(e),e&&I(o)}}}function Wn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function An(e){let t,n,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Wn,then:Sn,catch:jn,value:33,blocks:[,,,]};return ue(n=e[19](e[2]),r),{c(){t=S(),r.block.c()},m(e,n){k(e,t,n),r.block.m(e,r.anchor=n),r.mount=()=>t.parentNode,r.anchor=t,o=!0},p(t,o){e=t,r.ctx=e,4&o[0]&&n!==(n=e[19](e[2]))&&ue(n,r)||me(r,e,o)},i(e){o||(ce(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){de(r.blocks[e])}o=!1},d(e){e&&I(t),r.block.d(e),r.token=null,r=null}}}function Rn(e,n,o){const{Dialog:r,Divider:i,Button:s}=c,l=A();let{schema:a}=n,{recID:d}=n,{isOpening:u=!0}=n,{filterForReady:m=!1}=n,{praefix:f=""}=n,{selectionFields:p=!1}=n,{showEdit:$=!0}=n,{deList:g}=n,h=a.identity.designation;a.class;let v,b,w,y,x,k,I,F,_=!1;return e.$$set=e=>{"schema"in e&&o(1,a=e.schema),"recID"in e&&o(0,d=e.recID),"isOpening"in e&&o(2,u=e.isOpening),"filterForReady"in e&&o(3,m=e.filterForReady),"praefix"in e&&o(4,f=e.praefix),"selectionFields"in e&&o(5,p=e.selectionFields),"showEdit"in e&&o(6,$=e.showEdit),"deList"in e&&o(7,g=e.deList)},[d,a,u,m,f,p,$,g,_,v,w,x,k,I,F,r,i,s,h,async e=>{if(!e)return!1;const n=await Xr(a.class,a.id);if(b=p&&p?.find((e=>a.class===e.refClass.split(":")[0])),o(10,w=b?.value?.get&&b.value.get(f)),w){y=b.refClass;const e=y.split(":")[0];o(11,x=b.parentClass.find((t=>t.name===e)));const n=await t.getSchemaByClass(x.refClass);o(12,k=n.id)}return n},()=>{o(8,_=!1),d||l("back"),$||l("back")},()=>{o(8,_=!1),l("back")},()=>{o(0,d=!1),o(9,v=!1),o(8,_=!0)},()=>{l("choose",{row:{_id:F}})},e=>({detail:{row:e}})=>{let t=a.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let r=a.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(r){e[`${n}_${o}`]=e[n][o]}})),l("choose",{row:e})},({detail:e})=>{o(9,v=!!e._task.visum||"Closed"===e._task.status),o(0,d=e._docId),o(8,_=!0)},({detail:e})=>{w&&o(13,I=e)},({detail:e})=>{o(14,F=e.value)},function(t){R(e,t)}]}class Hn extends be{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=_("style")).id="svelte-jb5mrh-style",t.textContent=".eList .flex button.btn{width:max-content !important}.dialog.eList{max-height:90vh}.form--buttons.svelte-jb5mrh{display:flex;gap:1em;padding:0.5em 0}",x(document.head,t)),ve(this,e,Rn,An,b,{schema:1,recID:0,isOpening:2,filterForReady:3,praefix:4,selectionFields:5,showEdit:6,deList:7},[-1,-1])}}const{document:Yn}=fe;function Gn(e){e[25]=e[27].list,e[26]=e[27].items}function Jn(e,t,n){const o=e.slice();return o[28]=t[n],o}function Un(e,t,n){const o=e.slice();return o[31]=t[n],o}function Zn(e,t,n){const o=e.slice();return o[31]=t[n],o}function Qn(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Kn(e){let t,n,o,r,i,s,l,a,c,d,u,m,f,p,$,g,h,v;function b(t){e[22](t)}Gn(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Xn]},$$scope:{ctx:e}}}),n.$on("click",e[21]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),Y.push((()=>pe(s,"value",b))),s.$on("input",e[12]),d=new ze({props:{size:"18"}});let y=e[26]?.length&&function(e){let t,n,o=e[26],r=[];for(let t=0;t<o.length;t+=1)r[t]=eo(Zn(e,o,t));return{c(){t=_("thead"),n=_("tr");for(let e=0;e<r.length;e+=1)r[e].c();z(n,"class","svelte-14hcfjl"),z(t,"class","svelte-14hcfjl")},m(e,o){k(e,t,o),x(t,n);for(let e=0;e<r.length;e+=1)r[e].m(n,null)},p(e,t){if(2048&t[0]){let i;for(o=e[26],i=0;i<o.length;i+=1){const s=Zn(e,o,i);r[i]?r[i].p(s,t):(r[i]=eo(s),r[i].c(),r[i].m(n,null))}for(;i<r.length;i+=1)r[i].d(1);r.length=o.length}},d(e){e&&I(t),F(r,e)}}}(e),N=e[25]?.length&&function(e){let t,n=e[25],o=[];for(let t=0;t<n.length;t+=1)o[t]=oo(Jn(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=S()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);k(e,t,n)},p(e,r){if(11779&r[0]){let i;for(n=e[25],i=0;i<n.length;i+=1){const s=Jn(e,n,i);o[i]?o[i].p(s,r):(o[i]=oo(s),o[i].c(),o[i].m(t.parentNode,t))}for(;i<o.length;i+=1)o[i].d(1);o.length=n.length}},d(e){F(o,e),e&&I(t)}}}(e);return{c(){t=_("div"),$e(n.$$.fragment),o=j(),r=_("div"),i=C("Suchen: "),$e(s.$$.fragment),a=j(),c=_("span"),$e(d.$$.fragment),u=j(),m=_("div"),f=_("table"),y&&y.c(),p=j(),$=_("tbody"),N&&N.c(),z(t,"class","form--buttons svelte-14hcfjl"),z(c,"class","feather pointer svelte-14hcfjl"),T(r,"margin-bottom","1em"),T(r,"position","relative"),z(f,"striped",""),z(f,"class","svelte-14hcfjl"),z(m,"class","eList svelte-14hcfjl")},m(l,b){k(l,t,b),ge(n,t,null),k(l,o,b),k(l,r,b),x(r,i),ge(s,r,null),x(r,a),x(r,c),ge(d,c,null),k(l,u,b),k(l,m,b),x(m,f),y&&y.m(f,null),x(f,p),x(f,$),N&&N.m($,null),g=!0,h||(v=L(c,"click",e[14]),h=!0)},p(e,t){Gn(e);const o={};32&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const r={};!l&&2&t[0]&&(l=!0,r.value=e[1],ee((()=>l=!1))),s.$set(r),e[26]?.length&&y.p(e,t),e[25]?.length&&N.p(e,t)},i(e){g||(ce(n.$$.fragment,e),ce(s.$$.fragment,e),ce(d.$$.fragment,e),g=!0)},o(e){de(n.$$.fragment,e),de(s.$$.fragment,e),de(d.$$.fragment,e),g=!1},d(e){e&&I(t),he(n),e&&I(o),e&&I(r),he(s),he(d),e&&I(u),e&&I(m),y&&y.d(),N&&N.d(),h=!1,v()}}}function Xn(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function eo(e){let t,n,o=e[31]?.designation+"";return{c(){t=_("th"),n=C(o),z(t,"class","svelte-14hcfjl")},m(e,o){k(e,t,o),x(t,n)},p:p,d(e){e&&I(t)}}}function to(e){let t,n,o=e[26],r=[];for(let t=0;t<o.length;t+=1)r[t]=no(Un(e,o,t));return{c(){t=_("tr");for(let e=0;e<r.length;e+=1)r[e].c();n=j(),z(t,"class","pointer svelte-14hcfjl"),B(t,"active",e[28]._id===e[0])},m(e,o){k(e,t,o);for(let e=0;e<r.length;e+=1)r[e].m(t,null);x(t,n)},p(e,i){if(3584&i[0]){let s;for(o=e[26],s=0;s<o.length;s+=1){const l=Un(e,o,s);r[s]?r[s].p(l,i):(r[s]=no(l),r[s].c(),r[s].m(t,n))}for(;s<r.length;s+=1)r[s].d(1);r.length=o.length}2049&i[0]&&B(t,"active",e[28]._id===e[0])},d(e){e&&I(t),F(r,e)}}}function no(e){let t,n,o,r,i=e[9](e[28],e[31])+"";return{c(){t=_("td"),n=C(i),z(t,"class","svelte-14hcfjl")},m(i,s){k(i,t,s),x(t,n),o||(r=L(t,"click",q(e[10](e[28]))),o=!0)},p(t,n){e=t},d(e){e&&I(t),o=!1,r()}}}function oo(e){let t,n=e[13](e[28],e[26],e[1]),o=n&&to(e);return{c(){o&&o.c(),t=S()},m(e,n){o&&o.m(e,n),k(e,t,n)},p(e,r){2&r[0]&&(n=e[13](e[28],e[26],e[1])),n?o?o.p(e,r):(o=to(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&I(t)}}}function ro(e){let t,n;return t=new e[5]({}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:p,i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function io(e){let t,n,o,r;t=new e[4]({});let i={ctx:e,current:null,token:null,hasCatch:!1,pending:ro,then:Kn,catch:Qn,value:27,blocks:[,,,]};return ue(e[11](),i),{c(){$e(t.$$.fragment),n=j(),o=S(),i.block.c()},m(e,s){ge(t,e,s),k(e,n,s),k(e,o,s),i.block.m(e,i.anchor=s),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(t,n){me(i,e=t,n)},i(e){r||(ce(t.$$.fragment,e),ce(i.block),r=!0)},o(e){de(t.$$.fragment,e);for(let e=0;e<3;e+=1){de(i.blocks[e])}r=!1},d(e){he(t,e),e&&I(n),e&&I(o),i.block.d(e),i.token=null,i=null}}}function so(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[io]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};3&n[0]|32&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function lo(e,o,r){const i=A(),{Dialog:s,Divider:l,Loading:a,TextField:u,Button:f}=c;let{item:p}=o,{classId:$}=o,{className:g}=o,{rowId:h}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:w}=o,y="",x=$+Math.floor(9e3*Math.random()+1e3).toString()+"search";const k=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?m(n):d(e[`_${t.name}`]||e[t.name]||"")},I=t.getSchemaByClass(g);W((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(x)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await I;e.eventId===t.id&&ri(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&r(15,p=e.item),"classId"in e&&r(16,$=e.classId),"className"in e&&r(17,g=e.className),"rowId"in e&&r(0,h=e.rowId),"viewName"in e&&r(18,v=e.viewName),"viewValue"in e&&r(19,b=e.viewValue),"recordId"in e&&r(20,w=e.recordId)},[h,y,i,s,l,a,u,f,x,k,e=>()=>i("choose",{row:e}),async()=>{const e=await I,n="."+$+"#"+v,o=document.querySelector(n);let r={[v]:o?.value||w};if(p.refItem){const e="."+$+"#"+p.refItem,t=document.querySelector(e);if(t){const e={$or:[{[p.refItem]:t.value},{[p.refItem]:{$exists:!0,$eq:""}}]};r={...r,...e}}}let i=[];r[v]&&(i=await t.getSectionView(e.class,r,!0));let s=[],l=e.display;return l&&l.length?l.map((t=>{const[n,o]=t.split(".");let r=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));r&&(r={...r},r.name=`${n}_${o}`,i=i.map((e=>(e[n]&&(e[r.name]=e[n][o]),e)))),r||(r=e.items.find((e=>e.name===n))),s.find((e=>e?.name===n))||s.push(r)})):s=e.items,{list:i,items:s}},({detail:{value:e}})=>{r(1,y=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(k(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{r(1,y="")},p,$,g,v,b,w,()=>i("back"),function(e){y=e,r(1,y)}]}class ao extends be{constructor(e){var t;super(),Yn.getElementById("svelte-14hcfjl-style")||((t=_("style")).id="svelte-14hcfjl-style",t.textContent=".feather.svelte-14hcfjl.svelte-14hcfjl{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-14hcfjl.svelte-14hcfjl{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-14hcfjl table.svelte-14hcfjl{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-14hcfjl table thead.svelte-14hcfjl{position:sticky;top:0;background:#326173;color:white}.eList.svelte-14hcfjl table tbody tr.svelte-14hcfjl{height:2.3em}th.svelte-14hcfjl.svelte-14hcfjl,td.svelte-14hcfjl.svelte-14hcfjl{padding-left:0.4em;padding-right:0.4em}tr.pointer.svelte-14hcfjl.svelte-14hcfjl:hover{background-color:#DAE1E5}tr.active.svelte-14hcfjl.svelte-14hcfjl{color:#326173;background-color:#fcebd5}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",x(Yn.head,t)),ve(this,e,lo,so,b,{item:15,classId:16,className:17,rowId:0,viewName:18,viewValue:19,recordId:20},[-1,-1])}}const{document:co}=fe;function uo(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function mo(e){let t,n,o,i,s,l,a,c,d,u,m,f,p,$,g;n=new r({props:{class:"full-width",id:e[19],value:e[2],rows:"1",required:e[1],disabled:e[3],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"}}),n.$on("click",e[21]()),n.$on("onFocus",e[21](e[19]));const h=[po,fo],v=[];function b(e,t){return e[3]?e[0]?1:-1:0}~(i=b(e))&&(s=v[i]=h[i](e));let w=!e[3]&&vo(e);function F(t){e[29](t)}let N={class:"tModal",noClickaway:!0,$$slots:{default:[xo]},$$scope:{ctx:e}};void 0!==e[14]&&(N.open=e[14]),m=new e[18]({props:N}),Y.push((()=>pe(m,"open",F)));let C=e[15]&&ko(e);return{c(){t=_("div"),$e(n.$$.fragment),o=j(),s&&s.c(),l=j(),a=_("input"),d=j(),w&&w.c(),u=j(),$e(m.$$.fragment),p=j(),C&&C.c(),$=S(),z(a,"class",c=y(e[6]||e[7])+" svelte-jox15l"),z(a,"id",e[4]),z(a,"name",e[4]),a.value=e[0],a.hidden=!0,T(t,"position","relative")},m(e,r){k(e,t,r),ge(n,t,null),x(t,o),~i&&v[i].m(t,null),x(t,l),x(t,a),x(t,d),w&&w.m(t,null),k(e,u,r),ge(m,e,r),k(e,p,r),C&&C.m(e,r),k(e,$,r),g=!0},p(e,o){const r={};4&o[0]&&(r.value=e[2]),2&o[0]&&(r.required=e[1]),8&o[0]&&(r.disabled=e[3]),n.$set(r);let d=i;i=b(e),i===d?~i&&v[i].p(e,o):(s&&(le(),de(v[d],1,1,(()=>{v[d]=null})),ae()),~i?(s=v[i],s?s.p(e,o):(s=v[i]=h[i](e),s.c()),ce(s,1),s.m(t,l)):s=null),(!g||192&o[0]&&c!==(c=y(e[6]||e[7])+" svelte-jox15l"))&&z(a,"class",c),(!g||16&o[0])&&z(a,"id",e[4]),(!g||16&o[0])&&z(a,"name",e[4]),(!g||1&o[0]&&a.value!==e[0])&&(a.value=e[0]),e[3]?w&&(le(),de(w,1,1,(()=>{w=null})),ae()):w?(w.p(e,o),8&o[0]&&ce(w,1)):(w=vo(e),w.c(),ce(w,1),w.m(t,null));const u={};32673&o[0]|64&o[1]&&(u.$$scope={dirty:o,ctx:e}),!f&&16384&o[0]&&(f=!0,u.open=e[14],ee((()=>f=!1))),m.$set(u),e[15]?C?(C.p(e,o),32768&o[0]&&ce(C,1)):(C=ko(e),C.c(),ce(C,1),C.m($.parentNode,$)):C&&(le(),de(C,1,1,(()=>{C=null})),ae())},i(e){g||(ce(n.$$.fragment,e),ce(s),ce(w),ce(m.$$.fragment,e),ce(C),g=!0)},o(e){de(n.$$.fragment,e),de(s),de(w),de(m.$$.fragment,e),de(C),g=!1},d(e){e&&I(t),he(n),~i&&v[i].d(),w&&w.d(),e&&I(u),he(m,e),e&&I(p),C&&C.d(e),e&&I($)}}}function fo(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ho,then:go,catch:$o,value:36,blocks:[,,,]};return ue(e[25](),o),{c(){t=S(),o.block.c()},m(e,r){k(e,t,r),o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){me(o,e=t,n)},i(e){n||(ce(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){de(o.blocks[e])}n=!1},d(e){e&&I(t),o.block.d(e),o.token=null,o=null}}}function po(e){let t,n,o,r,i;return n=new Pe({props:{size:"18"}}),{c(){t=_("span"),$e(n.$$.fragment),z(t,"class","feather pointer svelte-jox15l")},m(s,l){k(s,t,l),ge(n,t,null),o=!0,r||(i=[L(t,"click",e[21]()),L(t,"choose",e[22])],r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n),r=!1,h(i)}}}function $o(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function go(e){let t,n,o,r;return o=new Te({props:{size:"18"}}),{c(){t=_("span"),n=_("a"),$e(o.$$.fragment),z(n,"href",e[36]),z(n,"target","_blank"),z(t,"class","feather pointer svelte-jox15l")},m(e,i){k(e,t,i),x(t,n),ge(o,n,null),r=!0},p:p,i(e){r||(ce(o.$$.fragment,e),r=!0)},o(e){de(o.$$.fragment,e),r=!1},d(e){e&&I(t),he(o)}}}function ho(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function vo(e){let t,n,o,r,i;return n=new ze({props:{size:"18"}}),{c(){t=_("span"),$e(n.$$.fragment),z(t,"class","feather2 pointer svelte-jox15l")},m(s,l){k(s,t,l),ge(n,t,null),o=!0,r||(i=L(t,"click",e[24]),r=!0)},p:p,i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n),r=!1,i()}}}function bo(e){let t,n;return t=new Hn({props:{schema:e[13],recID:e[0],isOpening:e[14],filterForReady:"true",selectionFields:e[10],deList:e[12],praefix:e[9]}}),t.$on("choose",e[22]),t.$on("back",e[23]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};8192&n[0]&&(o.schema=e[13]),1&n[0]&&(o.recID=e[0]),16384&n[0]&&(o.isOpening=e[14]),1024&n[0]&&(o.selectionFields=e[10]),4096&n[0]&&(o.deList=e[12]),512&n[0]&&(o.praefix=e[9]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function wo(e){let t,n,o=e[14]&&yo(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){e[14]?o?(o.p(e,n),16384&n[0]&&ce(o,1)):(o=yo(e),o.c(),ce(o,1),o.m(t.parentNode,t)):o&&(le(),de(o,1,1,(()=>{o=null})),ae())},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function yo(e){let t,n;return t=new ao({props:{item:e[5],className:e[13].class,classId:e[7],rowId:e[0],recordId:e[8],viewName:e[11],viewValue:""}}),t.$on("choose",e[22]),t.$on("back",e[23]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.item=e[5]),8192&n[0]&&(o.className=e[13].class),128&n[0]&&(o.classId=e[7]),1&n[0]&&(o.rowId=e[0]),256&n[0]&&(o.recordId=e[8]),2048&n[0]&&(o.viewName=e[11]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function xo(e){let t,n,o,r;const i=[wo,bo],s=[];function l(e,t){return e[11]?0:1}return t=l(e),n=s[t]=i[t](e),{c(){n.c(),o=S()},m(e,n){s[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?s[t].p(e,r):(le(),de(s[a],1,1,(()=>{s[a]=null})),ae(),n=s[t],n?n.p(e,r):(n=s[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o))},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){s[t].d(e),e&&I(o)}}}function ko(e){let t,n,o;function r(t){e[30](t)}let i={class:"tModal",noClickaway:!0,$$slots:{default:[Fo]},$$scope:{ctx:e}};return void 0!==e[15]&&(i.open=e[15]),t=new e[18]({props:i}),Y.push((()=>pe(t,"open",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};73729&o[0]|64&o[1]&&(r.$$scope={dirty:o,ctx:e}),!n&&32768&o[0]&&(n=!0,r.open=e[15],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function Io(e){let t,n;return t=new ai({props:{schema:e[13],recID:e[0],readonly:!0}}),t.$on("back",e[23]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};8192&n[0]&&(o.schema=e[13]),1&n[0]&&(o.recID=e[0]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Fo(e){let t,n;return t=new e[17]({props:{title:e[16],$$slots:{default:[Io]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};65536&n[0]&&(o.title=e[16]),8193&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function _o(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function No(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:_o,then:mo,catch:uo,value:35,blocks:[,,,]};return ue(e[20](),o),{c(){t=S(),o.block.c()},m(e,r){k(e,t,r),o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){me(o,e=t,n)},i(e){n||(ce(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){de(o.blocks[e])}n=!1},d(e){e&&I(t),o.block.d(e),o.token=null,o=null}}}function Co(e,n,o){const r=A(),{Dialog:i,Modal:s}=c;let{id:l}=n,{item:a}=n,{value:d=""}=n,{desc:u=""}=n,{noForm:m=!1}=n,{classId:p}=n,{eventId:$}=n,{recordId:g}=n,{required:h}=n,{disabled:v}=n,{readonly:b}=n,{praefix:w}=n,{selectionFields:y}=n,{formnovalidate:x}=n,{selection:k}=n,{deList:I}=n;const F="comment_"+l;let _,N,C,j=!1;v||=b;const S=e=>{e&&(o(2,u=f(C,e)),r("change",{value:d,description:u}),r("task",{row:e}))},L=()=>{o(14,j=!1),o(15,_=!1)};return e.$$set=e=>{"id"in e&&o(4,l=e.id),"item"in e&&o(5,a=e.item),"value"in e&&o(0,d=e.value),"desc"in e&&o(2,u=e.desc),"noForm"in e&&o(6,m=e.noForm),"classId"in e&&o(7,p=e.classId),"eventId"in e&&o(26,$=e.eventId),"recordId"in e&&o(8,g=e.recordId),"required"in e&&o(1,h=e.required),"disabled"in e&&o(3,v=e.disabled),"readonly"in e&&o(27,b=e.readonly),"praefix"in e&&o(9,w=e.praefix),"selectionFields"in e&&o(10,y=e.selectionFields),"formnovalidate"in e&&o(28,x=e.formnovalidate),"selection"in e&&o(11,k=e.selection),"deList"in e&&o(12,I=e.deList)},e.$$.update=()=>{268435458&e.$$.dirty[0]&&o(1,h=h&&!x),8225&e.$$.dirty[0]&&d&&C&&Promise.resolve(ei(a.refClass,C.id,d)).then((e=>S(e))),8193&e.$$.dirty[0]&&!d&&C&&S({})},[d,h,u,v,l,a,m,p,g,w,y,k,I,C,j,_,N,i,s,F,async()=>{if(o(13,C=await t.getSchemaByClass(a.refClass)),$&&d&&!v){const e=await t.getSchema($);e.input?.find((e=>e===a.refClass))&&o(3,v=!0)}return o(16,N=C.identity.designation),!0},e=>t=>{if("BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}o(14,j=!0)},({detail:e})=>{o(0,d=e.row._id),L()},L,()=>{o(0,d=o(2,u="")),r("change",{value:d,description:u}),r("task",{row:{_task:{event:C.id,_id:!1}}})},async()=>{if(!d)return;const e=(await ei(a.refClass,C.id,d))._task._id;return`/task/${C.id}/${e}/task?view=standalone`},$,b,x,function(e){j=e,o(14,j)},function(e){_=e,o(15,_)}]}class jo extends be{constructor(e){var t;super(),co.getElementById("svelte-jox15l-style")||((t=_("style")).id="svelte-jox15l-style",t.textContent=".feather.svelte-jox15l{position:absolute;top:0.75em;left:0.5em;color:#4300b0}.feather2.svelte-jox15l{position:absolute;top:0.75em;right:0.5em;color:#4300b0}.text-field textarea:invalid{border-bottom:1px #b80000 solid !important;background-color:#fbeeee !important}",x(co.head,t)),ve(this,e,Co,No,b,{id:4,item:5,value:0,desc:2,noForm:6,classId:7,eventId:26,recordId:8,required:1,disabled:3,readonly:27,praefix:9,selectionFields:10,formnovalidate:28,selection:11,deList:12},[-1,-1])}}function So(e){let t,n;return t=new e[15]({props:{inputClass:e[3]||e[4],disabled:e[6],formnovalidate:e[8],readonly:e[19],pattern:e[21],required:e[18],id:e[23],name:e[22],value:e[12]()}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),4096&n[0]&&(o.value=e[12]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Lo(e){let t,n;return t=new e[15]({props:{inputClass:e[3]||e[4],disabled:e[6],formnovalidate:e[8],readonly:e[19],required:e[18],type:"email",id:e[23],name:e[22],value:e[12]()}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),4096&n[0]&&(o.value=e[12]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Eo(e){let t,n;return t=new fn({props:{inputClass:e[3]||e[4],disabled:e[6],readonly:e[19],required:e[18],id:e[23],item:e[1],value:e[12](),praefix:e[2]}}),t.$on("blur",e[25]()),t.$on("checkRange",e[30]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.item=e[1]),4096&n[0]&&(o.value=e[12]()),4&n[0]&&(o.praefix=e[2]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function qo(e){let t,n;return t=new an({props:{classId:e[4],id:e[23],disabled:e[6],required:e[18],value:e[24](),noForm:e[3]}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function zo(e){let t,n;return t=new e[16]({props:{inputClass:e[3]||e[4],required:e[18],disabled:e[6],id:e[23],name:e[22],value:e[24](),closeOnSelection:!0}}),t.$on("change",e[25](!0)),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Do(e){let t,n;return t=new e[17]({props:{round:!0,inputClass:e[3]||e[4],disabled:e[6]||e[19],required:e[18],id:e[23],name:e[22],checked:e[12]()}}),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};24&n[0]&&(o.inputClass=e[3]||e[4]),64&n[0]&&(o.disabled=e[6]||e[19]),4096&n[0]&&(o.checked=e[12]()),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Oo(e){let t,n;return t=new Rt({props:{classId:e[4],disabled:e[6],required:e[18],id:e[23],item:e[1],record:e[0],value:e[12](),noForm:e[3],multi:e[1].properties.multi,numberInput:e[10],praefix:e[2]}}),t.$on("blur",e[25]()),t.$on("invalid",e[29]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),2&n[0]&&(o.multi=e[1].properties.multi),1024&n[0]&&(o.numberInput=e[10]),4&n[0]&&(o.praefix=e[2]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function To(e){let t,n;return t=new Ut({props:{classId:e[4],disabled:e[6],required:e[18],id:e[23],item:e[1],value:e[12](),noForm:e[3]}}),t.$on("blur",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.item=e[1]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Bo(e){let t,n;return t=new mt({props:{classId:e[4],disabled:e[6],formnovalidate:e[8],required:e[18],readonly:e[19],id:e[23],item:e[1],value:e[12](),noForm:e[3]}}),t.$on("blur",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),2&n[0]&&(o.item=e[1]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Mo(e){let t,n;return t=new r({props:{classId:e[4],disabled:e[6],readonly:e[19],id:e[23],name:e[1].name,value:e[12](),noForm:e[3]}}),t.$on("blur",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),64&n[0]&&(o.disabled=e[6]),2&n[0]&&(o.name=e[1].name),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Po(e){let t,n;return t=new jo({props:{classId:e[4],eventId:e[5],required:e[18],disabled:e[6],formnovalidate:e[8],readonly:e[19],id:e[23],item:e[1],desc:e[13],value:e[12](),noForm:e[3],praefix:e[2],selectionFields:e[7],selection:e[9],deList:e[11],recordId:e[0]._id}}),t.$on("task",e[28]),t.$on("change",e[25]()),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]&&(o.classId=e[4]),32&n[0]&&(o.eventId=e[5]),64&n[0]&&(o.disabled=e[6]),256&n[0]&&(o.formnovalidate=e[8]),2&n[0]&&(o.item=e[1]),8192&n[0]&&(o.desc=e[13]),4096&n[0]&&(o.value=e[12]()),8&n[0]&&(o.noForm=e[3]),4&n[0]&&(o.praefix=e[2]),128&n[0]&&(o.selectionFields=e[7]),512&n[0]&&(o.selection=e[9]),2048&n[0]&&(o.deList=e[11]),1&n[0]&&(o.recordId=e[0]._id),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Vo(e){let t,n,o,r;const i=[Po,Mo,Bo,To,Oo,Do,zo,qo,Eo,Lo,So],s=[];function l(e,t){return"object"===e[1].type?0:"textarea"===e[1].type||e[1].properties&&"textarea"===e[1].properties.format?1:"number"===e[1].type?2:e[1].properties&&e[1].properties.enum?3:e[1].properties&&e[1].properties.multi?4:"boolean"===e[1].type?5:"date"===e[1].type?6:"datetime"===e[1].type?7:"time"===e[1].properties?.format?8:"email"===e[1].type?9:10}return t=l(e),n=s[t]=i[t](e),{c(){n.c(),o=S()},m(e,n){s[t].m(e,n),k(e,o,n),r=!0},p(e,r){let a=t;t=l(e),t===a?s[t].p(e,r):(le(),de(s[a],1,1,(()=>{s[a]=null})),ae(),n=s[t],n?n.p(e,r):(n=s[t]=i[t](e),n.c()),ce(n,1),n.m(o.parentNode,o))},i(e){r||(ce(n),r=!0)},o(e){de(n),r=!1},d(e){s[t].d(e),e&&I(o)}}}function Wo(e){let t,n;return t=new e[14]({props:{id:e[26](e[23]),class:e[20]&&"hidden",name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[Vo]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),16383&n[0]|32&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Ao(e,t,n){let o,r,i;const s=A(),{FormField:l,TextField:a,DatePicker:u,TimePicker:m,Checkbox:f}=c;let{praefix:p=""}=t,{item:$}=t,{listName:g=""}=t,{record:h}=t,{noForm:v=!1}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{selectionFields:x}=t,{formnovalidate:k}=t,{selection:I=!1}=t,{numberInput:F}=t,{deList:_}=t;const{required:N,readonly:C,hidden:j,pattern:S}=$.properties||{};if("string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const L=(g?g+".":"")+$.name,E=L+(""!==p?"-"+p:""),q=(e,t=L)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(2,p=e.praefix),"item"in e&&n(1,$=e.item),"listName"in e&&n(27,g=e.listName),"record"in e&&n(0,h=e.record),"noForm"in e&&n(3,v=e.noForm),"classId"in e&&n(4,b=e.classId),"eventId"in e&&n(5,w=e.eventId),"disabled"in e&&n(6,y=e.disabled),"selectionFields"in e&&n(7,x=e.selectionFields),"formnovalidate"in e&&n(8,k=e.formnovalidate),"selection"in e&&n(9,I=e.selection),"numberInput"in e&&n(10,F=e.numberInput),"deList"in e&&n(11,_=e.deList)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(12,o=(e=L)=>{let t=q(h);return void 0===t?"":t}),1&e.$$.dirty[0]&&(i=q(h))},n(13,r=((e=L)=>{let t=h["_"+e];return t=d(t),void 0===t?"":t})()),[h,$,p,v,b,w,y,x,k,I,F,_,o,r,l,a,u,f,N,C,j,S,L,E,(e=L)=>{let t=q(h);return t?new Date(t):new Date},e=>({detail:t})=>{let{value:o,checked:r}=t;void 0!==r&&(o=r),n(0,h[L]=e?Kt(o,"%d.%m.%Y"):o,h);const l=Object.values(h).every((e=>!e))&&o;s("notify",{oldValue:i,value:o,add:l,itemName:L,desc:t.description})},()=>"object"===$.type?"comment_"+E:E,g,function(t){R(e,t)},function(t){R(e,t)},function(t){R(e,t)}]}class Ro extends be{constructor(e){var t;super(),document.getElementById("svelte-mea5fj-style")||((t=_("style")).id="svelte-mea5fj-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em}.form-field div.field > label.checkbox{padding-top:0.5em}",x(document.head,t)),ve(this,e,Ao,Wo,b,{praefix:2,item:1,listName:27,record:0,noForm:3,classId:4,eventId:5,disabled:6,selectionFields:7,formnovalidate:8,selection:9,numberInput:10,deList:11},[-1,-1])}}const{document:Ho}=fe;function Yo(e,t,n){const o=e.slice();return o[62]=t[n],o[64]=n,o}function Go(e,t,n){const o=e.slice();return o[71]=t[n],o}function Jo(e,t,n){const o=e.slice();return o[66]=t[n].title,o[67]=t[n].toDelete,o[68]=t[n].icon,o}function Uo(e){let t,n;return t=new e[13]({props:{name:"Total Wochen",nameClass:"formField_italic",$$slots:{default:[Zo]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};64&n[0]|4096&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Zo(e){let t,n,o;function r(t){e[38](t)}let i={item:e[22],disabled:!0};return void 0!==e[6]&&(i.value=e[6]),t=new mt({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&64&o[0]&&(n=!0,r.value=e[6],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function Qo(e){let t,n;return t=new e[13]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[Ko]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};512&n[0]|4096&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Ko(e){let t,n,o;function r(t){e[39](t)}let i={item:e[20],disabled:!0};return void 0!==e[9]&&(i.value=e[9]),t=new mt({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&512&o[0]&&(n=!0,r.value=e[9],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function Xo(e){let t,n;return t=new e[13]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[er]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]|4096&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function er(e){let t,n,o;function r(t){e[40](t)}let i={item:e[18],disabled:!0};return void 0!==e[5]&&(i.value=e[5]),t=new mt({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&32&o[0]&&(n=!0,r.value=e[5],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function tr(e){let t,n;return t=new e[16]({props:{class:e[10][e[64]],$$slots:{handle:[cr,({toggle:e})=>({65:e}),({toggle:e})=>[0,0,e?8:0]],default:[ir,({toggle:e})=>({65:e}),({toggle:e})=>[0,0,e?8:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){v(e[61])&&e[61].apply(this,arguments)})),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const r={};1024&o[0]&&(r.class=e[10][e[64]]),6543&o[0]|4104&o[2]&&(r.$$scope={dirty:o,ctx:e}),t.$set(r)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function nr(e){let t,n;return t=new Ro({props:{praefix:e[64],item:e[71],eventId:e[3],record:e[62],noForm:pr,classId:e[2],disabled:e[0],selectionFields:e[23],numberInput:e[12],formnovalidate:e[64]===e[7].length-1||e[7][e[64]]._delete}}),t.$on("notify",(function(){v(e[25](e[71],e[64]))&&e[25](e[71],e[64]).apply(this,arguments)})),t.$on("task",e[41]),t.$on("invalid",e[26]),t.$on("checkRange",e[27]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const r={};2&o[0]&&(r.item=e[71]),8&o[0]&&(r.eventId=e[3]),128&o[0]&&(r.record=e[62]),4&o[0]&&(r.classId=e[2]),1&o[0]&&(r.disabled=e[0]),4096&o[0]&&(r.numberInput=e[12]),128&o[0]&&(r.formnovalidate=e[64]===e[7].length-1||e[7][e[64]]._delete),t.$set(r)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function or(e){let t,n,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=nr(Go(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(243273871&n[0]){let s;for(o=e[1].item,s=0;s<o.length;s+=1){const i=Go(e,o,s);r[s]?(r[s].p(i,n),ce(r[s],1)):(r[s]=nr(i),r[s].c(),ce(r[s],1),r[s].m(t.parentNode,t))}for(le(),s=o.length;s<r.length;s+=1)i(s);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function rr(e){let t,n,o=e[7][e[64]]._delete,r=or(e);return{c(){r.c(),t=S()},m(e,o){r.m(e,o),k(e,t,o),n=!0},p(e,n){128&n[0]&&b(o,o=e[7][e[64]]._delete)?(le(),de(r,1,1,p),ae(),r=or(e),r.c(),ce(r),r.m(t.parentNode,t)):r.p(e,n)},i(e){n||(ce(r),n=!0)},o(e){de(r),n=!1},d(e){e&&I(t),r.d(e)}}}function ir(e){let t,n,o,r,i=e[7].length,s=rr(e);return{c(){t=_("div"),s.c(),o=j(),z(t,"id",n=`accordion-content-${e[2]}-${e[1].name}-${e[64]}`)},m(e,n){k(e,t,n),s.m(t,null),k(e,o,n),r=!0},p(e,o){128&o[0]&&b(i,i=e[7].length)?(le(),de(s,1,1,p),ae(),s=rr(e),s.c(),ce(s),s.m(t,null)):s.p(e,o),(!r||6&o[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}-${e[64]}`))&&z(t,"id",n)},i(e){r||(ce(s),r=!0)},o(e){de(s),r=!1},d(e){e&&I(t),s.d(e),e&&I(o)}}}function sr(e){let t,n,o,r,i,s=e[24](e[8],e[64])+"";return{c(){t=_("div"),n=C(s),z(t,"class",o=y("draggableListItem "+e[1].name)+" svelte-1es1ap1"),z(t,"draggable",!0),B(t,"delete",e[62]._delete),B(t,"is-active-top",e[11]?.top===e[64]),B(t,"is-active-bottom",e[11]?.bottom===e[64])},m(o,s){k(o,t,s),x(t,n),r||(i=[L(t,"dragover",e[33]),L(t,"dragleave",e[34](e[64])),L(t,"dragstart",e[31](e[64])),L(t,"drop",E(e[30](e[64]))),L(t,"dragenter",e[32](e[64]))],r=!0)},p(r,i){e=r,256&i[0]&&s!==(s=e[24](e[8],e[64])+"")&&D(n,s),2&i[0]&&o!==(o=y("draggableListItem "+e[1].name)+" svelte-1es1ap1")&&z(t,"class",o),130&i[0]&&B(t,"delete",e[62]._delete),2050&i[0]&&B(t,"is-active-top",e[11]?.top===e[64]),2050&i[0]&&B(t,"is-active-bottom",e[11]?.bottom===e[64])},d(e){e&&I(t),r=!1,h(i)}}}function lr(e){let t,n,o;var r=e[68];return r&&(t=new r({props:{size:"20"}})),{c(){t&&$e(t.$$.fragment),n=S()},m(e,r){t&&ge(t,e,r),k(e,n,r),o=!0},p(e,o){if(r!==(r=e[68])){if(t){le();const e=t;de(e.$$.fragment,1,0,(()=>{he(e,1)})),ae()}r?(t=new r({props:{size:"20"}}),$e(t.$$.fragment),ce(t.$$.fragment,1),ge(t,n.parentNode,n)):t=null}},i(e){o||(t&&ce(t.$$.fragment,e),o=!0)},o(e){t&&de(t.$$.fragment,e),o=!1},d(e){e&&I(n),t&&he(t,e)}}}function ar(e){let t,n,o,r,i,s=!e[0]&&lr(e);return{c(){t=_("span"),s&&s.c(),z(t,"class","pointer icon svelte-1es1ap1"),z(t,"title",e[66]),t.hidden=n=e[64]===e[7].length-1||!(e[62]._delete^e[67])},m(n,l){k(n,t,l),s&&s.m(t,null),o=!0,r||(i=L(t,"click",e[29](e[64])),r=!0)},p(r,i){(e=r)[0]?s&&(le(),de(s,1,1,(()=>{s=null})),ae()):s?(s.p(e,i),1&i[0]&&ce(s,1)):(s=lr(e),s.c(),ce(s,1),s.m(t,null)),(!o||128&i[0]&&n!==(n=e[64]===e[7].length-1||!(e[62]._delete^e[67])))&&(t.hidden=n)},i(e){o||(ce(s),o=!0)},o(e){de(s),o=!1},d(e){e&&I(t),s&&s.d(),r=!1,i()}}}function cr(e){let t,n,o,r,i,s;n=new e[14]({props:{$$slots:{default:[sr]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[28](e[65],e[64]))&&e[28](e[65],e[64]).apply(this,arguments)}));let l=[{title:"löschen",toDelete:!0,icon:ze},{title:"undo",toDelete:!1,icon:Le}],a=[];for(let t=0;t<2;t+=1)a[t]=ar(Jo(e,l,t));const c=e=>de(a[e],1,1,(()=>{a[e]=null}));return{c(){t=_("div"),$e(n.$$.fragment),o=j();for(let e=0;e<2;e+=1)a[e].c();r=j(),z(t,"class",i=y("accordion "+e[1].name)+" svelte-1es1ap1"),z(t,"slot","handle")},m(e,i){k(e,t,i),ge(n,t,null),x(t,o);for(let e=0;e<2;e+=1)a[e].m(t,null);x(t,r),s=!0},p(o,d){e=o;const u={};if(2434&d[0]|4096&d[2]&&(u.$$scope={dirty:d,ctx:e}),n.$set(u),536871041&d[0]){let n;for(l=[{title:"löschen",toDelete:!0,icon:ze},{title:"undo",toDelete:!1,icon:Le}],n=0;n<2;n+=1){const o=Jo(e,l,n);a[n]?(a[n].p(o,d),ce(a[n],1)):(a[n]=ar(o),a[n].c(),ce(a[n],1),a[n].m(t,r))}for(le(),n=2;n<2;n+=1)c(n);ae()}(!s||2&d[0]&&i!==(i=y("accordion "+e[1].name)+" svelte-1es1ap1"))&&z(t,"class",i)},i(e){if(!s){ce(n.$$.fragment,e);for(let e=0;e<2;e+=1)ce(a[e]);s=!0}},o(e){de(n.$$.fragment,e),a=a.filter(Boolean);for(let e=0;e<2;e+=1)de(a[e]);s=!1},d(e){e&&I(t),he(n),F(a,e)}}}function dr(e){let t,n,o=(!e[4]&&!e[0]||e[64]<e[7].length-1)&&tr(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){!e[4]&&!e[0]||e[64]<e[7].length-1?o?(o.p(e,n),145&n[0]&&ce(o,1)):(o=tr(e),o.c(),ce(o,1),o.m(t.parentNode,t)):o&&(le(),de(o,1,1,(()=>{o=null})),ae())},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function ur(e){let t,n,o=e[7],r=[];for(let t=0;t<o.length;t+=1)r[t]=dr(Yo(e,o,t));const i=e=>de(r[e],1,1,(()=>{r[e]=null}));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=S()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);k(e,t,o),n=!0},p(e,n){if(2139102623&n[0]|1073741839&n[1]|8&n[2]){let s;for(o=e[7],s=0;s<o.length;s+=1){const i=Yo(e,o,s);r[s]?(r[s].p(i,n),ce(r[s],1)):(r[s]=dr(i),r[s].c(),ce(r[s],1),r[s].m(t.parentNode,t))}for(le(),s=o.length;s<r.length;s+=1)i(s);ae()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ce(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)de(r[e]);n=!1},d(e){F(r,e),e&&I(t)}}}function mr(e){let t,n,o,r,i,s,l=e[21]&&0!=e[6]&&Uo(e),a=e[19]&&0!=e[9]&&Qo(e),c=e[17]&&0!=e[5]&&Xo(e);return i=new e[15]({props:{$$slots:{default:[ur,({closeOtherPanels:e})=>({61:e}),({closeOtherPanels:e})=>[0,e?1073741824:0]]},$$scope:{ctx:e}}}),{c(){t=_("div"),l&&l.c(),n=j(),a&&a.c(),o=j(),c&&c.c(),r=j(),$e(i.$$.fragment),z(t,"class","formList")},m(e,d){k(e,t,d),l&&l.m(t,null),x(t,n),a&&a.m(t,null),x(t,o),c&&c.m(t,null),x(t,r),ge(i,t,null),s=!0},p(e,s){e[21]&&0!=e[6]?l?(l.p(e,s),64&s[0]&&ce(l,1)):(l=Uo(e),l.c(),ce(l,1),l.m(t,n)):l&&(le(),de(l,1,1,(()=>{l=null})),ae()),e[19]&&0!=e[9]?a?(a.p(e,s),512&s[0]&&ce(a,1)):(a=Qo(e),a.c(),ce(a,1),a.m(t,o)):a&&(le(),de(a,1,1,(()=>{a=null})),ae()),e[17]&&0!=e[5]?c?(c.p(e,s),32&s[0]&&ce(c,1)):(c=Xo(e),c.c(),ce(c,1),c.m(t,r)):c&&(le(),de(c,1,1,(()=>{c=null})),ae());const d={};7583&s[0]|1073741824&s[1]|4096&s[2]&&(d.$$scope={dirty:s,ctx:e}),i.$set(d)},i(e){s||(ce(l),ce(a),ce(c),ce(i.$$.fragment,e),s=!0)},o(e){de(l),de(a),de(c),de(i.$$.fragment,e),s=!1},d(e){e&&I(t),l&&l.d(),a&&a.d(),c&&c.d(),he(i)}}}let fr=new Map;const pr=!0,$r="pos/target";function gr(e,t,n){let o,r;const{FormField:i,TextField:s,Button:l,Accordion:a,AccordionSection:f,Divider:p}=c,$=A();let{list:g}=t,{schema:h}=t,{record:v}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{fixed:x}=t;const k=h.find((e=>"price"===e.name&&!e.properties?.hidden)),I=k&&h.find((e=>"quantity"===e.name));let F=0;const _=h.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let N=0;const C=h.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name||"",j=!!C;let S=0;const L={};let E=h.properties?.readonly;y||=E;let q,z,D=[],O=[],T=!1,B={};h.filter((e=>e.selection)).map((e=>D.push({className:b.split("form-")[1].slice(0,-4),parentClass:h,refClass:e.selection,value:""})));const M=(e,t)=>{let o=`#accordion-content-${b}-${g.name}-${e} .form-field .field :required`;const r=document.querySelectorAll(o);let i=!1;r.forEach((e=>{""===e.value&&(i=!0)})),void 0===t&&(o=`#accordion-content-${b}-${g.name}-${e} .form-field .field input.invalid`,document.querySelector(o)&&(t=!0)),n(10,O[e]=i||t?"invalid":"",O)},P=e=>{if(!e)return 0;const[t,n=0]=e.split(":");return 60*t+parseInt(n)},V=(e,t)=>{if(!t)return;const o=h.find((e=>e.name===t)),r=o.properties.value.formula,{operator:i,argument:s}=r,l=s.map((t=>q[e][t.refItem]));let a=0;"$add"===i&&(a=l.reduce(((e,t)=>e+ +t))),"$subtract"===i&&(a=l.reduce(((e,t)=>{if(!e)return 0;if(!t)return 0;const[n,o]=e.split(":");e=o?(+n+ +o/60).toFixed(2):+n;const[r,i]=t.split(":");return r?e-=i?(+r+ +i/60).toFixed(2):+r:0}))),n(7,q[e][t]=(a||0).toFixed(o.properties.decimals||0),q),n(12,B={item:o,value:a,idx:e})};z=h.filter((e=>e.refClass)).reduce((async(e,t)=>{e=await e;const n=h.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,o]=t.selection.split(":"),[r]=o.split(".");r&&e.push({refClass:r,items:[n],selection:t.selection})}const o={refClass:t.refClass,items:[]};return n.forEach((e=>{o.items.push(e.name)})),e.push(o),e}),[]);const W=async(e,t,o,r)=>{const i=(await z).find((e=>e.refClass===t.refClass));if(!i)return;const{refClass:s,items:l,selection:a}=i;return o?Promise.all(l.map((i=>{let c="";const{refInput:d}=t;if(d&&q[e]){const[t,n]=d.split(".");c=n?q[e][n]:v[t]}if(a&&o!==r)l.map((t=>{n(7,q[e][t]="",q)}));else if(d&&!c||H(e,i)){const o=h.find((e=>e.refClass===s)),r=q[e][o.name];if(t.selection){const o=ni(t.selection+r.toString());if(o)return Promise.resolve(o).then((t=>n(7,q[e][i]=t[i],q)))}return Promise.resolve(oi(o.refClass,r)).then((t=>n(7,q[e][i]=t[i],q)))}}))):Promise.resolve(l.map((t=>{n(7,q[e][t]="",q)})))},H=(e,t)=>{let n=q[e][t];return"number"===h.find((e=>e.name===t)).type&&(n=Number(n||0)),!n},Y=e=>!(!x&&e>=q.length-1),G=(e,t=!1)=>{const[n,o]=e.split(";");return g.name===o&&(!!Y(t)&&((!1===t||t!=n)&&parseInt(n)))};return h.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=h.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))})),e.$$set=e=>{"list"in e&&n(1,g=e.list),"schema"in e&&n(35,h=e.schema),"record"in e&&n(36,v=e.record),"classId"in e&&n(2,b=e.classId),"eventId"in e&&n(3,w=e.eventId),"disabled"in e&&n(0,y=e.disabled),"fixed"in e&&n(4,x=e.fixed)},e.$$.update=()=>{2&e.$$.dirty[0]|32&e.$$.dirty[1]&&v&&n(7,q=(v[g.name]||[]).concat({})),128&e.$$.dirty[0]&&n(8,o=q),482&e.$$.dirty[0]&&o&&((()=>{if(_)n(9,N=q?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(j)n(6,S=q?.reduce(((e,t)=>e+(t._delete?0:+(t[C]||0))),0)||0)})(),(()=>{if(k)n(5,F=q?.reduce(((e,t)=>{if(t.price){const n=(I?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),$("save",{listName:g.name,value:q,amountValue:F,weeksValue:S})),64&e.$$.dirty[1]&&(r=e=>L[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[y,g,b,w,x,F,S,q,o,N,O,T,B,i,l,a,f,k,{name:"amountValue",properties:{decimals:2}},_,{name:"hoursValue",properties:{decimals:2}},j,{name:"weeksValue",properties:{decimals:1}},D,(e,t)=>{const n=e[t];return n&&h.filter((e=>!e.properties?.hidden&&void 0!==n[e.name]&&"textarea"!==e.properties?.format)).map((e=>""===n[e.name]?"":"object"===e.type?r(n[e.name]):"boolean"===e.type?m(n[e.name]):"date"===e.type?d(n[e.name]):"datetime"===e.type?u(n[e.name]):e.properties?.multi?"":n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>async({detail:r})=>{const{oldValue:i,value:s,add:l,desc:a}=r;V(t,e._formulaActor);const c=D?.find((t=>t.refClass.split(":")[1].split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,s)),s&&q.length===t+1&&n(7,q=q.concat({})),a&&n(37,L[s]=a,L),await W(t,e,s,i),n(8,o=q),"number"===e.type&&n(12,B={item:e,value:s,idx:t}),M(t)},({detail:e})=>{const{idx:t,value:n}=e;M(t,n)},({detail:e})=>{const{idx:t,fieldId:n,value:o}=e;if(!o)return;const r=P(o);let i=!1;q.forEach(((e,n)=>{if(t===n)return;const{start:o,end:s}=q[n];o&&s&&r>P(o)&&r<P(s)&&(i=!0)}));const s=document.getElementById(n);s?.classList?.toggle("invalid",i)},(e,t)=>n=>{e(n);const o=`#accordion-content-${b}-${g.name}-${t} > div.form-field:not(.hidden)`,r=document.querySelectorAll(o),i=r[r.length-1];K().then((()=>i.scrollIntoView({behavior:"smooth",block:"end"})))},e=>()=>{n(7,q[e]._delete=!q[e]._delete,q)},e=>t=>{t.preventDefault(),n(11,T=!1);const o=G(t.dataTransfer.getData($r),e);if(!1===o)return;t.dataTransfer.dropEffect="move";const r=[...q].map(((e,t)=>(e._index=t,e)));o<e?(r.splice(e+1,0,r[o]),r.splice(o,1)):(r.splice(e,0,r[o]),r.splice(o+1,1)),r.map(((e,t)=>{return n=e._index,o=t,void fr.set(o,n);var n,o}));let i=[];O.map(((e,t)=>{i[t]=O[(e=>{const t=fr.get(e);return void 0===t?e:t})(t)]})),n(10,O=i),n(7,q=r.map(((e,t)=>(delete e._index,e))))},e=>t=>{if(!Y(e))return!1;t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move",t.dataTransfer.setData($r,e+";"+g.name)},e=>t=>{const o=G(t.dataTransfer.getData($r),e);return!1===o||o===e?n(11,T=!1):void n(11,T={top:o>e&&e,bottom:o<e&&e})},e=>e.preventDefault(),e=>e=>{n(11,T=!1)},h,v,L,function(e){S=e,n(6,S)},function(e){N=e,n(9,N)},function(e){F=e,n(5,F)},function(t){R(e,t)}]}class hr extends be{constructor(e){var t;super(),Ho.getElementById("svelte-1es1ap1-style")||((t=_("style")).id="svelte-1es1ap1-style",t.textContent=".accordion.svelte-1es1ap1{display:flex;overflow:hidden}.accordion-content.svelte-1es1ap1{position:relative}.formList .accordion > .btn{display:inline-block;margin-bottom:1em;background-color:#F5F5F5}.sTask .formList .accordion > .btn{width:95% !important}.sEmbedded .formList .accordion > .btn{width:97%}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-1es1ap1{padding-top:1em}div.delete.svelte-1es1ap1{text-decoration:line-through}.icon.svelte-1es1ap1{margin-right:-0.75em}.form-field .formField_italic{font-style:italic}.panel.invalid .btn{border:1px #b80000 solid}.draggableListItem.svelte-1es1ap1{cursor:drag}.draggableListItem.is-active-top.svelte-1es1ap1{border-top:3px purple solid;padding-top:2em}.draggableListItem.is-active-bottom.svelte-1es1ap1{border-bottom:3px purple solid;padding-bottom:2em}",x(Ho.head,t)),ve(this,e,gr,mr,b,{list:1,schema:35,record:36,classId:2,eventId:3,disabled:0,fixed:4},[-1,-1,-1])}}const{document:vr}=fe;function br(e,t,n){const o=e.slice();return o[17]=t[n],o}function wr(e){let t,n;return t=new Ro({props:{classId:e[2],item:e[17],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4]}}),t.$on("notify",e[10]),t.$on("task",e[13]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.classId=e[2]),2&n&&(o.item=e[17]),2&n&&(o.listName=e[1].name),8&n&&(o.eventId=e[3]),1&n&&(o.record=e[0]),16&n&&(o.disabled=e[4]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function yr(e){let t,n,o,r=e[1].item,i=[];for(let t=0;t<r.length;t+=1)i[t]=wr(br(e,r,t));const s=e=>de(i[e],1,1,(()=>{i[e]=null}));return{c(){t=_("div");for(let e=0;e<i.length;e+=1)i[e].c();z(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){k(e,t,n);for(let e=0;e<i.length;e+=1)i[e].m(t,null);o=!0},p(e,l){if(1055&l){let n;for(r=e[1].item,n=0;n<r.length;n+=1){const o=br(e,r,n);i[n]?(i[n].p(o,l),ce(i[n],1)):(i[n]=wr(o),i[n].c(),ce(i[n],1),i[n].m(t,null))}for(le(),n=r.length;n<i.length;n+=1)s(n);ae()}(!o||6&l&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&z(t,"id",n)},i(e){if(!o){for(let e=0;e<r.length;e+=1)ce(i[e]);o=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)de(i[e]);o=!1},d(e){e&&I(t),F(i,e)}}}function xr(e){let t,n,o=e[9](e[5])+"";return{c(){t=_("span"),n=C(o)},m(e,o){k(e,t,o),x(t,n)},p(e,t){32&t&&o!==(o=e[9](e[5])+"")&&D(n,o)},d(e){e&&I(t)}}}function kr(e){let t,n,o;return n=new e[6]({props:{$$slots:{default:[xr]},$$scope:{ctx:e}}}),n.$on("click",(function(){v(e[11](e[16]))&&e[11](e[16]).apply(this,arguments)})),{c(){t=_("div"),$e(n.$$.fragment),z(t,"class","accordion svelte-148ktt9"),z(t,"slot","handle")},m(e,r){k(e,t,r),ge(n,t,null),o=!0},p(t,o){e=t;const r={};1048608&o&&(r.$$scope={dirty:o,ctx:e}),n.$set(r)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n)}}}function Ir(e){let t,n;return t=new e[8]({props:{$$slots:{handle:[kr,({toggle:e})=>({16:e}),({toggle:e})=>e?65536:0],default:[yr,({toggle:e})=>({16:e}),({toggle:e})=>e?65536:0]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1114175&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Fr(e){let t,n,o;return n=new e[7]({props:{$$slots:{default:[Ir]},$$scope:{ctx:e}}}),{c(){t=_("div"),$e(n.$$.fragment),z(t,"class","formList")},m(e,r){k(e,t,r),ge(n,t,null),o=!0},p(e,[t]){const o={};1048639&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(ce(n.$$.fragment,e),o=!0)},o(e){de(n.$$.fragment,e),o=!1},d(e){e&&I(t),he(n)}}}function _r(e,t,n){const{Button:o,Accordion:r,AccordionSection:i}=c;let{list:s}=t,{schema:l}=t,{record:a}=t,{classId:f}=t,{eventId:p}=t,{disabled:$}=t;const g={};let h=a[s.name]||{};a[s.name]=h;const v=e=>g[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,s=e.list),"schema"in e&&n(12,l=e.schema),"record"in e&&n(0,a=e.record),"classId"in e&&n(2,f=e.classId),"eventId"in e&&n(3,p=e.eventId),"disabled"in e&&n(4,$=e.disabled)},[a,s,f,p,$,h,o,r,i,e=>l.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?v(t.name):"boolean"===t.type?m(e[t.name]):"date"===t.type?d(e[t.name]):"datetime"===t.type?u(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&(g[o]=e.desc);const r=a[t];n(0,a[t]={...r,[o]:e.value},a),n(5,h=a[t])},e=>t=>{e(t);const n=`#accordion-content-${f}-${s.name} > div.form-field:last-child`,o=document.querySelector(n);K().then((()=>o.scrollIntoView({behavior:"smooth",block:"end"})))},l,function(t){R(e,t)}]}class Nr extends be{constructor(e){var t;super(),vr.getElementById("svelte-148ktt9-style")||((t=_("style")).id="svelte-148ktt9-style",t.textContent=".accordion.svelte-148ktt9{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}",x(vr.head,t)),ve(this,e,_r,Fr,b,{list:1,schema:12,record:0,classId:2,eventId:3,disabled:4})}}const{Boolean:Cr,document:jr}=fe;function Sr(e,t,n){const o=e.slice();return o[65]=t[n],o}function Lr(e,t,n){const o=e.slice();return o[68]=t[n],o}function Er(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function qr(e){let t,n,o=e[64]&&function(e){let t,n,o,r,i,s,l,a,c,d,u,m,f,p,$,g,v,b,w=e[0].items,N=[];for(let t=0;t<w.length;t+=1)N[t]=Dr(Lr(e,w,t));const C=e=>de(N[e],1,1,(()=>{N[e]=null}));let S=e[0].list&&Or(e);m=new e[8]({props:{outline:!0,$$slots:{default:[Rr]},$$scope:{ctx:e}}}),m.$on("click",e[19]),p=new e[8]({props:{class:"close",disabled:e[5],form:e[10],filled:!0,type:"submit",$$slots:{default:[Hr]},$$scope:{ctx:e}}});let q=e[1]&&!e[5]&&Yr(e);return{c(){t=_("section"),n=_("form"),o=_("input"),i=j();for(let e=0;e<N.length;e+=1)N[e].c();s=j(),S&&S.c(),l=j(),a=_("div"),c=_("small"),c.textContent=`${si}`,d=j(),u=_("div"),$e(m.$$.fragment),f=j(),$e(p.$$.fragment),$=j(),q&&q.c(),z(o,"class",y(e[10])+" svelte-1dh1s6w"),z(o,"name","_id"),z(o,"type","hidden"),o.value=r=e[2]._id||"",z(n,"class",y(e[11])+" svelte-1dh1s6w"),z(n,"id",e[10]),z(a,"class","comment svelte-1dh1s6w"),z(u,"class","form--buttons svelte-1dh1s6w"),z(t,"class",y(e[12])+" svelte-1dh1s6w")},m(r,h){k(r,t,h),x(t,n),x(n,o),x(n,i);for(let e=0;e<N.length;e+=1)N[e].m(n,null);x(n,s),S&&S.m(n,null),x(t,l),x(t,a),x(a,c),x(t,d),x(t,u),ge(m,u,null),x(u,f),ge(p,u,null),x(u,$),q&&q.m(u,null),g=!0,v||(b=[L(n,"keydown",e[23]),L(n,"submit",E(e[18]))],v=!0)},p(e,t){if((!g||4&t[0]&&r!==(r=e[2]._id||""))&&(o.value=r),3146789&t[0]){let o;for(w=e[0].items,o=0;o<w.length;o+=1){const r=Lr(e,w,o);N[o]?(N[o].p(r,t),ce(N[o],1)):(N[o]=Dr(r),N[o].c(),ce(N[o],1),N[o].m(n,s))}for(le(),o=w.length;o<N.length;o+=1)C(o);ae()}e[0].list?S?(S.p(e,t),1&t[0]&&ce(S,1)):(S=Or(e),S.c(),ce(S,1),S.m(n,null)):S&&(le(),de(S,1,1,(()=>{S=null})),ae());const i={};512&t[2]&&(i.$$scope={dirty:t,ctx:e}),m.$set(i);const l={};32&t[0]&&(l.disabled=e[5]),512&t[2]&&(l.$$scope={dirty:t,ctx:e}),p.$set(l),e[1]&&!e[5]?q?(q.p(e,t),34&t[0]&&ce(q,1)):(q=Yr(e),q.c(),ce(q,1),q.m(u,null)):q&&(le(),de(q,1,1,(()=>{q=null})),ae())},i(e){if(!g){for(let e=0;e<w.length;e+=1)ce(N[e]);ce(S),ce(m.$$.fragment,e),ce(p.$$.fragment,e),ce(q),g=!0}},o(e){N=N.filter(Cr);for(let e=0;e<N.length;e+=1)de(N[e]);de(S),de(m.$$.fragment,e),de(p.$$.fragment,e),de(q),g=!1},d(e){e&&I(t),F(N,e),S&&S.d(),he(m),he(p),q&&q.d(),v=!1,h(b)}}}(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,t){e[64]&&o.p(e,t)},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function zr(e){let t,n;return t=new Ro({props:{classId:e[10],item:e[68],selection:e[68].selection,record:e[2],disabled:e[5],eventId:e[0].id}}),t.$on("task",e[20]),t.$on("notify",e[21]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[68]),1&n[0]&&(o.selection=e[68].selection),4&n[0]&&(o.record=e[2]),32&n[0]&&(o.disabled=e[5]),1&n[0]&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Dr(e){let t,n,o="list"!==e[68].type&&zr(e);return{c(){o&&o.c(),t=S()},m(e,r){o&&o.m(e,r),k(e,t,r),n=!0},p(e,n){"list"!==e[68].type?o?(o.p(e,n),1&n[0]&&ce(o,1)):(o=zr(e),o.c(),ce(o,1),o.m(t.parentNode,t)):o&&(le(),de(o,1,1,(()=>{o=null})),ae())},i(e){n||(ce(o),n=!0)},o(e){de(o),n=!1},d(e){o&&o.d(e),e&&I(t)}}}function Or(e){let t,n,o,r,i=e[14]&&0!=e[3]&&Tr(e),s=e[15]&&0!=e[4]&&Mr(e),l=e[0].list,a=[];for(let t=0;t<l.length;t+=1)a[t]=Ar(Sr(e,l,t));const c=e=>de(a[e],1,1,(()=>{a[e]=null}));return{c(){i&&i.c(),t=j(),s&&s.c(),n=j();for(let e=0;e<a.length;e+=1)a[e].c();o=S()},m(e,l){i&&i.m(e,l),k(e,t,l),s&&s.m(e,l),k(e,n,l);for(let t=0;t<a.length;t+=1)a[t].m(e,l);k(e,o,l),r=!0},p(e,r){if(e[14]&&0!=e[3]?i?(i.p(e,r),8&r[0]&&ce(i,1)):(i=Tr(e),i.c(),ce(i,1),i.m(t.parentNode,t)):i&&(le(),de(i,1,1,(()=>{i=null})),ae()),e[15]&&0!=e[4]?s?(s.p(e,r),16&r[0]&&ce(s,1)):(s=Mr(e),s.c(),ce(s,1),s.m(n.parentNode,n)):s&&(le(),de(s,1,1,(()=>{s=null})),ae()),4195365&r[0]){let t;for(l=e[0].list,t=0;t<l.length;t+=1){const n=Sr(e,l,t);a[t]?(a[t].p(n,r),ce(a[t],1)):(a[t]=Ar(n),a[t].c(),ce(a[t],1),a[t].m(o.parentNode,o))}for(le(),t=l.length;t<a.length;t+=1)c(t);ae()}},i(e){if(!r){ce(i),ce(s);for(let e=0;e<l.length;e+=1)ce(a[e]);r=!0}},o(e){de(i),de(s),a=a.filter(Cr);for(let e=0;e<a.length;e+=1)de(a[e]);r=!1},d(e){i&&i.d(e),e&&I(t),s&&s.d(e),e&&I(n),F(a,e),e&&I(o)}}}function Tr(e){let t,n;return t=new e[9]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[Br]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};8&n[0]|512&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Br(e){let t,n,o;function r(t){e[33](t)}let i={item:e[13],disabled:!0};return void 0!==e[3]&&(i.value=e[3]),t=new mt({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&8&o[0]&&(n=!0,r.value=e[3],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function Mr(e){let t,n;return t=new e[9]({props:{name:"Gesamtzeit in Wochen",nameClass:"formField_italic",$$slots:{default:[Pr]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]|512&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Pr(e){let t,n,o;function r(t){e[34](t)}let i={item:e[16],disabled:!0};return void 0!==e[4]&&(i.value=e[4]),t=new mt({props:i}),Y.push((()=>pe(t,"value",r))),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};!n&&16&o[0]&&(n=!0,r.value=e[4],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function Vr(e){let t,n;return t=new Nr({props:{classId:e[10],list:e[65],eventId:e[0].id,schema:e[65].item,record:e[2],disabled:e[5]}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[65]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[65].item),4&n[0]&&(o.record=e[2]),32&n[0]&&(o.disabled=e[5]),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Wr(e){let t,n;return t=new hr({props:{classId:e[10],list:e[65],eventId:e[0].id,schema:e[65].item,record:e[2],disabled:e[5],fixed:e[65].fixed}}),t.$on("save",e[22]),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[65]),1&n[0]&&(o.eventId=e[0].id),1&n[0]&&(o.schema=e[65].item),4&n[0]&&(o.record=e[2]),32&n[0]&&(o.disabled=e[5]),1&n[0]&&(o.fixed=e[65].fixed),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Ar(e){let t,n,o,r,i,s;t=new e[7]({props:{text:e[65].designation}});const l=[Wr,Vr],a=[];function c(e,t){return"array"===e[65].type?0:1}return o=c(e),r=a[o]=l[o](e),{c(){$e(t.$$.fragment),n=j(),r.c(),i=S()},m(e,r){ge(t,e,r),k(e,n,r),a[o].m(e,r),k(e,i,r),s=!0},p(e,n){const s={};1&n[0]&&(s.text=e[65].designation),t.$set(s);let d=o;o=c(e),o===d?a[o].p(e,n):(le(),de(a[d],1,1,(()=>{a[d]=null})),ae(),r=a[o],r?r.p(e,n):(r=a[o]=l[o](e),r.c()),ce(r,1),r.m(i.parentNode,i))},i(e){s||(ce(t.$$.fragment,e),ce(r),s=!0)},o(e){de(t.$$.fragment,e),de(r),s=!1},d(e){he(t,e),e&&I(n),a[o].d(e),e&&I(i)}}}function Rr(e){let t;return{c(){t=C("Abbrechen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Hr(e){let t;return{c(){t=C("Speichern und schliessen")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Yr(e){let t,n;return t=new e[8]({props:{form:e[10],filled:!0,type:"submit",style:"opacity: 0.75;",$$slots:{default:[Gr]},$$scope:{ctx:e}}}),{c(){$e(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};512&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function Gr(e){let t;return{c(){t=C("Speichern")},m(e,n){k(e,t,n)},d(e){e&&I(t)}}}function Jr(e){return{c:p,m:p,p:p,i:p,o:p,d:p}}function Ur(e){let t,n,o,r;jr.title=t=e[6];let i={ctx:e,current:null,token:null,hasCatch:!1,pending:Jr,then:qr,catch:Er,value:64,blocks:[,,,]};return ue(e[17](),i),{c(){n=j(),o=S(),i.block.c()},m(e,t){k(e,n,t),k(e,o,t),i.block.m(e,i.anchor=t),i.mount=()=>o.parentNode,i.anchor=o,r=!0},p(n,o){e=n,(!r||64&o[0])&&t!==(t=e[6])&&(jr.title=t),me(i,e,o)},i(e){r||(ce(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){de(i.blocks[e])}r=!1},d(e){e&&I(n),e&&I(o),i.block.d(e),i.token=null,i=null}}}let Zr=new Map,Qr=new Map,Kr=new Map;const Xr=(e,n)=>{const o=n;return Zr.has(o)||Zr.set(o,t.getTasksList(n).then((({data:e})=>e))),Zr.get(o)},ei=(e,n,o)=>Qr.get(o)||Xr(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(Qr.set(o,e),e))),ti=(e,t)=>{Kr.set(e,t)},ni=e=>Kr.get(e),oi=(e,n)=>Kr.get(n)||t.getTask(e,n).then((e=>(Kr.set(n,e),e))),ri=(e,n)=>{if(!Zr.get(n))return;const o=n;Zr.set(o,t.getTasksList(n).then((({data:e})=>e)))},ii=()=>{Zr=new Map,Qr=new Map,Kr=new Map};let si="";function li(e,r,a){let d,u,m,p;w(e,s,(e=>a(40,m=e))),w(e,l,(e=>a(41,p=e)));const{Divider:$,Button:g,FormField:h}=c,v=JSON.parse(o.getItem("Locale")),b=A();let y,x,{schema:k}=r,{recID:I}=r,{prevEventID:F=!1}=r,{prev:_=!1}=r,{taskId:N=!1}=r,{description:C=""}=r,{root:j=!1}=r,{readonly:S}=r,{isStandalone:L}=r,E={},q={},z="form-"+k.class+Math.floor(9e3*Math.random()+1e3).toString();const D=j?"fEmbedded":"fTask",O=j?"sEmbedded":"sTask";let T=0,B=0;const M={},P=k.items.find((e=>"price"===e.name&&!e.properties?.hidden)),V=k.items.find((e=>"quantity"===e.name&&!e.properties?.hidden)),R=!!P,H=k.list?.filter((e=>"array"===e.type))?.length>1||R,Y=k.items.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name,G=!!Y,J=k.list?.filter((e=>"array"===e.type))?.length>1||G,U={};let Z=0,Q=0;const K=async()=>{if(!k.input)return;if(!k.input.length)return;if(k.input.length<2)return;const e=await t.getEvent(k.id),n=!e.input.class[0].name&&e.input.class[0].selection;if(!n)return;const o=e.input.class[1].name,r=e.input.class[1].destination?.split(".")[0];if(!o||!r)return;const i=k.list?.find((e=>e.name===o));if(!i)return;const s=await t.getSchemaByClass(n),l=(await t.getTasks(s.id)).data;if(!l?.length)return;const c=[];for(const e of l){const t={};for(const n of i.item)n.name===r?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);c.push(t)}c.length&&a(2,E[o]=c,E)},X=()=>{for(const e of k.items)e.properties?.value?.concatenation&&ee(e)},ee=async e=>{const t=e.properties.value.concatenation;let n="";for(const e of t)void 0!==e.constant&&(n+=e.constant),"year"===e.variable&&(n+=(new Date).getFullYear()),e.refItemNext&&(n+=await te(e.refItemNext));a(2,E[e.name]=n,E)},te=async e=>{const[n,o]=e.offset?.split(",")||[0,0],r=+e.base||0,i=+e.step||1;e.type;const s=e.refItem,l=await t.getLastId(k.class,s);if(!l?.length)return(r+i).toString().padStart(o,"0");const a=l[0][s];return((+a?.substring(n,n+o)||r)+i).toString().padStart(o,"0")},ne=(e,t,n=!1)=>{const o=t.name,r=e.find((e=>e.name===o));let i=t.value;if(!n&&r&&r.properties?.multi&&(i=E[o]),i&&r&&r.type.startsWith("date"))try{return function(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let r=!1;if(""===e)return null;const i=t.split(Qt);let s=0,l=0;const a=new Date(0);for(const c of i){if(!e.startsWith(c,s))return n;if(s+=c.length,s===e.length){if(l!==t.length)return n;break}if("%"!==t[l+c.length])break;if(l+=c.length+1,"%"===t[l]){if("%"!==e[s])return n;s++}else if("p"===t[l].toLowerCase()){const t=e.substr(s,2).toUpperCase();if("AM"===t)r=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;r=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{Zt.lastIndex=s;const i=Zt.exec(e);if(null==i)return n;switch(t[l]){case"H":a.setHours(parseInt(i[0])+12*r);break;case"M":a.setMinutes(i[0]);break;case"S":a.setSeconds(i[0]);break;case"d":a.setDate(i[0]);break;case"m":a.setMonth(i[0]-1);break;case"y":a.setFullYear(100*o+parseInt(i[0]));break;case"Y":a.setFullYear(i[0])}s+=i[0].length}l++}return isNaN(a.valueOf())?n:a}(i,"%d.%m.%Y").toISOString()}catch{return new Date(i).toISOString()}if(r&&"boolean"===r.type&&(i=!!t.checked),r&&"number"===r.type){const e=Number("1.1").toLocaleString(v.id).substring(1,2);try{i=Number(i.replace(e,".")).toString()}catch{}}return i},oe=()=>L?window.close():j?window.singleSpaNavigate("/"):b("back"),re=async(e,n)=>{if(k.input?.length>1){if(k.input[0]!==e)return;if(n){const o=await t.getTaskOptions(`${e}:${n}`,k.id);a(2,E={...E,...o})}else{const e=k.input.slice(1);for(const t of e)a(2,E[t]=[],E)}}},ie=()=>{let e=0;if(P){let t=1;V&&(t=quantityValue),e=B*t}let t=0;for(const e in M)t+=M[e];a(3,T=t+e)},se=()=>{let e=0;for(const t in U)e+=U[t];a(4,Z=e+ +Q)};n.subscribe((async e=>{if(!e)return;if(!Zr.get(e.eventId))return;const n=await t.getTaskList(k.class,e.taskId);((e,t,n)=>{if(!Zr.get(e))return;const o=t;Qr.set(o,n)})(e.eventId,e.taskId,n)})),W(ii);return e.$$set=e=>{"schema"in e&&a(0,k=e.schema),"recID"in e&&a(28,I=e.recID),"prevEventID"in e&&a(26,F=e.prevEventID),"prev"in e&&a(29,_=e.prev),"taskId"in e&&a(27,N=e.taskId),"description"in e&&a(24,C=e.description),"root"in e&&a(1,j=e.root),"readonly"in e&&a(25,S=e.readonly),"isStandalone"in e&&a(30,L=e.isStandalone)},e.$$.update=()=>{33554432&e.$$.dirty[0]&&a(5,d=S),1&e.$$.dirty[0]|3&e.$$.dirty[1]&&x&&y&&k.items.map((({name:e,type:t})=>{const n=y.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;x[e]&&a(2,E[e]=x[e],E),x[o]&&a(2,E[o]=x[o],E)})),16777218&e.$$.dirty[0]&&a(6,u=j?C||"enablerr - Form":document.title)},[k,j,E,T,Z,d,u,$,g,h,z,D,O,{name:"amountValue",properties:{decimals:2}},H,J,{name:"weekValue",properties:{decimals:1}},async()=>{if(I&&(a(2,E=await t.getTask(k.class,I)),a(24,C=f(k,E))),F){a(25,S=!1),a(31,y=await t.getSchema(F)),"string"==typeof _&&a(32,x=await t.getTask(y.class,_));const e=k.items.find((e=>e.refClass===y.class));a(2,E[e.name]=x._id,E)}J&&(Q=E[Y]||0);const e=await t.getEvent(k.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&a(25,S=!0),m.role?.length&&k.authorization?.length){const e=k.authorization.some((e=>p?.find((t=>t===e.role&&"edit"===e.activity))));a(25,S||=!e)}return I||(X(),K()),!0},async e=>{I||a(5,d=!0);const n=e.submitter?.className?.includes("close"),o={};Array.from(document.querySelectorAll("form#"+z+" ."+z)).map((e=>{if(e.name)if(e.name.includes(".")){const[t,n]=e.name.split("."),r=k.list.find((e=>e.name===t));o[e.name]=ne(r.item,e)}else o[e.name]=ne(k.items,e)})),k.list&&k.list.map((e=>{"array"===e.type&&q[e.name]&&(o[e.name]=q[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,o])=>("_delete"!==n&&(t[n]=ne(e.item,{name:n,value:o,checked:o},!0)),t)),{}))),[]))})),o._event=k.id,o._prevEventId=F,o._taskId=N;const{id:r,task:s,error:l}=await t.saveData(k.class,o);if(l?.text){const e=l.field?" in "+l.field+": "+l.value:"";return i.failed(`${l.text} ${e}`,3e3),void a(5,d=!1)}i.success("Die Daten wurden gespeichert.",2e3),o._id=r;const c=await t.getTaskList(k.class,r);return b("choose",{row:c}),n?oe():I?void 0:window.singleSpaNavigate(`/task/${k.id}/${s}/task`)},()=>F?window.history.back():oe(),async({detail:{row:e}})=>{if(I)return;if(await(async()=>{for(const e of k.items)if(e.refItem&&E[e.refItem]){const n=await t.getTask(e.refItem,E[e.refItem]);n&&a(2,E[e.name]=n[e.name],E)}for(const e of k.list||[])if(e.refItem&&E[e.refItem]){const n=await t.getTask(e.refItem,E[e.refItem]),o=[];for(const t of n[e.name]){const n={};for(const o of e.item)t[o.name]&&(n[o.name]=t[o.name]);o.push(n)}a(2,E[e.name]=o,E)}})(),!e._task)return;const n=e._task.event,o=await t.getEvent(n),r=await t.getEvent(k.id);if(!r.output?.class?.length)return;const i=r.output.class[0]?.item.find((e=>e.name===o.output.class[0]?.name));(r.input?.class?.length&&r.input.class[0]?.name===o.output.class[0]?.name||i?.asInput)&&(a(31,y=await t.getSchema(n)),a(26,F=n),a(27,N=e._task._id),a(32,x=!!N&&await t.getTask(y.class,e._task.docId)),re(y.class,e?._task?.docId))},({detail:e})=>{if(J&&(e.itemName===Y&&(Q=+e.value),se()),R){if(e.itemName===P?.name)B=e.value;else{if(e.itemName!==V?.name)return;quantityValue=e.value}ie()}},({detail:e})=>{q[e.listName]=e.value,H&&(M[e.listName]=e.amountValue,ie()),J&&(U[e.listName]=e.weeksValue||0,se())},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},C,S,F,N,I,_,L,y,x,function(e){T=e,a(3,T)},function(e){Z=e,a(4,Z)}]}class ai extends be{constructor(e){var t;super(),jr.getElementById("svelte-1dh1s6w-style")||((t=_("style")).id="svelte-1dh1s6w-style",t.textContent="form.disabled.svelte-1dh1s6w input.svelte-1dh1s6w{background-color:red !important}.comment.svelte-1dh1s6w.svelte-1dh1s6w{color:green;margin-bottom:1em}form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:30em}}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w,.fTask.svelte-1dh1s6w.svelte-1dh1s6w{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;max-height:70vh}.sTask.svelte-1dh1s6w.svelte-1dh1s6w{height:95%;display:inline-grid}.sTask.svelte-1dh1s6w .btn.svelte-1dh1s6w{display:initial !important}.form--buttons.svelte-1dh1s6w.svelte-1dh1s6w{display:flex;gap:1em;padding-bottom:0.5em}",x(jr.head,t)),ve(this,e,li,Ur,b,{schema:0,recID:28,prevEventID:26,prev:29,taskId:27,description:24,root:1,readonly:25,isStandalone:30},[-1,-1,-1])}}function ci(e){let t,n,o;function r(t){e[4](t)}let i={schema:e[5],recID:e[6]};return void 0!==e[0]&&(i.description=e[0]),t=new ai({props:i}),Y.push((()=>pe(t,"description",r))),t.$on("back",e[2]),{c(){$e(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const r={};32&o&&(r.schema=e[5]),64&o&&(r.recID=e[6]),!n&&1&o&&(n=!0,r.description=e[0],ee((()=>n=!1))),t.$set(r)},i(e){o||(ce(t.$$.fragment,e),o=!0)},o(e){de(t.$$.fragment,e),o=!1},d(e){he(t,e)}}}function di(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[ci,({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(){$e(t.$$.fragment)},m(e,o){ge(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||(ce(t.$$.fragment,e),n=!0)},o(e){de(t.$$.fragment,e),n=!1},d(e){he(t,e)}}}function ui(e,n,o){let r,{refresh:i}=n;return e.$$set=e=>{"refresh"in e&&o(3,i=e.refresh)},[r,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},i,function(e){r=e,o(0,r)}]}function mi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fi,pi,$i=(fi=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return i="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},i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==i(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},s),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var s={component:null,domElementGetter:null,props:{}};function l(e){return Promise.resolve()}function a(e,t,n){var r=Object.keys(s),i=Object.keys(e).reduce((function(t,n){return r.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var r=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),s=r();t.instance=new e.component(o(o({},i),{},{target:s,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)}))}},fi(pi={exports:{}},pi.exports),pi.exports);const gi=mi($i)({component:class extends be{constructor(e){super(),ve(this,e,ui,di,b,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:hi,mount:vi,unmount:bi}=gi;e({bootstrap:hi,mount:vi,unmount:bi});e("Form",ai),e("List",ct)}}}));
|