@enablerr-ui/detail 0.2.361 → 0.2.362
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","@enablerr-ui/auth"],(function(e){"use strict";var t,n,o,i,l,r,s,a,c,d;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.TextArea,i=e.Storage,l=e.toasts,r=e.settings,s=e.currentRoles,a=e.Page},function(e){c=e.getAttractions},function(e){d=e.user}],execute:function(){e("version","0.2.361");const u=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(" · "))),m=e=>{try{return new Date(e).toLocaleString()}catch{return e}},f=e=>e?"(ja)":"(nein)",p=(e,t)=>{const n={...t};return(e.display?.reduce(((t,o)=>{let[i,l]=o.split(".");if(e.list?.find((({name:e})=>e===i))&&l&&void 0!==n[i]){const e=`${i}_${l}`;n[e]=n[i][l],i=e}return t.find((e=>e===i))||t.push(i),t}),[]).map((e=>"boolean"==typeof n[e]?f(n[e]):u(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&f(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function $(){}function h(e){return e()}function g(){return Object.create(null)}function v(e){e.forEach(h)}function b(e){return"function"==typeof e}function w(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function y(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return $;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function x(e){return null==e?"":e}function k(e,t){e.appendChild(t)}function I(e,t,n){e.insertBefore(t,n||null)}function _(e){e.parentNode.removeChild(e)}function N(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function j(e){return document.createElement(e)}function S(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function F(e){return document.createTextNode(e)}function C(){return F(" ")}function q(){return F("")}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 z(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function T(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 B(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function M(e,t,n){e.classList[n?"add":"remove"](t)}let V;function A(e){V=e}function W(){if(!V)throw new Error("Function called outside component initialization");return V}function P(e){W().$$.on_mount.push(e)}function R(){const e=W();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const i=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,i)}))}}}function H(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const Y=[],G=[],J=[],U=[],Z=Promise.resolve();let Q=!1;function K(){Q||(Q=!0,Z.then(ie))}function X(){return K(),Z}function ee(e){J.push(e)}function te(e){U.push(e)}let ne=!1;const oe=new Set;function ie(){if(!ne){ne=!0;do{for(let e=0;e<Y.length;e+=1){const t=Y[e];A(t),le(t.$$)}for(A(null),Y.length=0;G.length;)G.pop()();for(let e=0;e<J.length;e+=1){const t=J[e];oe.has(t)||(oe.add(t),t())}J.length=0}while(Y.length);for(;U.length;)U.pop()();Q=!1,ne=!1,oe.clear()}}function le(e){if(null!==e.fragment){e.update(),v(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ee)}}const re=new Set;let se;function ae(){se={r:0,c:[],p:se}}function ce(){se.r||v(se.c),se=se.p}function de(e,t){e&&e.i&&(re.delete(e),e.i(t))}function ue(e,t,n,o){if(e&&e.o){if(re.has(e))return;re.add(e),se&&se.c.push((()=>{re.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function me(e,t){const n=t.token={};function o(e,o,i,l){if(t.token!==n)return;t.resolved=l;let r=t.ctx;void 0!==i&&(r=r.slice(),r[i]=l);const s=e&&(t.current=e)(r);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(ae(),ue(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ce())})):t.block.d(1),s.c(),de(s,1),s.m(t.mount(),t.anchor),a=!0),t.block=s,t.blocks&&(t.blocks[o]=s),a&&ie()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=W();if(e.then((e=>{A(n),o(t.then,1,t.value,e),A(null)}),(e=>{if(A(n),o(t.catch,2,t.error,e),A(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 i}function fe(e,t,n){const o=t.slice(),{resolved:i}=e;e.current===e.then&&(o[e.value]=i),e.current===e.catch&&(o[e.error]=i),e.block.p(o,n)}const pe="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function $e(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function he(e){e&&e.c()}function ge(e,t,n,o){const{fragment:i,on_mount:l,on_destroy:r,after_update:s}=e.$$;i&&i.m(t,n),o||ee((()=>{const t=l.map(h).filter(b);r?r.push(...t):v(t),e.$$.on_mount=[]})),s.forEach(ee)}function ve(e,t){const n=e.$$;null!==n.fragment&&(v(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function be(e,t,n,o,i,l,r=[-1]){const s=V;A(e);const a=e.$$={fragment:null,ctx:null,props:l,update:$,not_equal:i,bound:g(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:t.context||[]),callbacks:g(),dirty:r,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const l=o.length?o[0]:n;return a.ctx&&i(a.ctx[t],a.ctx[t]=l)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](l),c&&function(e,t){-1===e.$$.dirty[0]&&(Y.push(e),K(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,v(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(_)}else a.fragment&&a.fragment.c();t.intro&&de(e.$$.fragment),ge(e,t.target,t.anchor,t.customElement),ie()}A(s)}class we{$destroy(){ve(this,1),this.$destroy=$}$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 ye(e){let t,n,o,i,l;return{c(){t=S("svg"),n=S("circle"),o=S("polyline"),i=S("line"),T(n,"cx","12"),T(n,"cy","12"),T(n,"r","10"),T(o,"points","8 12 12 16 16 12"),T(i,"x1","12"),T(i,"y1","8"),T(i,"x2","12"),T(i,"y2","16"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",l="feather feather-arrow-down-circle "+e[2])},m(e,l){I(e,t,l),k(t,n),k(t,o),k(t,i)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-arrow-down-circle "+e[2])&&T(t,"class",l)},i:$,o:$,d(e){e&&_(t)}}}function xe(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class ke extends we{constructor(e){super(),be(this,e,xe,ye,w,{size:0,strokeWidth:1,class:2})}}function Ie(e){let t,n,o,i;return{c(){t=S("svg"),n=S("path"),o=S("polyline"),T(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),T(o,"points","22 4 12 14.01 9 11.01"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",i="feather feather-check-circle "+e[2])},m(e,i){I(e,t,i),k(t,n),k(t,o)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-check-circle "+e[2])&&T(t,"class",i)},i:$,o:$,d(e){e&&_(t)}}}function _e(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Ne extends we{constructor(e){super(),be(this,e,_e,Ie,w,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,o;return{c(){t=S("svg"),n=S("path"),T(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"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",o="feather feather-command "+e[2])},m(e,o){I(e,t,o),k(t,n)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-command "+e[2])&&T(t,"class",o)},i:$,o:$,d(e){e&&_(t)}}}function Se(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Fe extends we{constructor(e){super(),be(this,e,Se,je,w,{size:0,strokeWidth:1,class:2})}}function Ce(e){let t,n,o,i;return{c(){t=S("svg"),n=S("polyline"),o=S("path"),T(n,"points","9 10 4 15 9 20"),T(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",i="feather feather-corner-down-left "+e[2])},m(e,i){I(e,t,i),k(t,n),k(t,o)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-corner-down-left "+e[2])&&T(t,"class",i)},i:$,o:$,d(e){e&&_(t)}}}function qe(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Le extends we{constructor(e){super(),be(this,e,qe,Ce,w,{size:0,strokeWidth:1,class:2})}}function Ee(e){let t,n,o,i,l;return{c(){t=S("svg"),n=S("path"),o=S("line"),i=S("line"),T(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),T(o,"x1","18"),T(o,"y1","9"),T(o,"x2","12"),T(o,"y2","15"),T(i,"x1","12"),T(i,"y1","9"),T(i,"x2","18"),T(i,"y2","15"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",l="feather feather-delete "+e[2])},m(e,l){I(e,t,l),k(t,n),k(t,o),k(t,i)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-delete "+e[2])&&T(t,"class",l)},i:$,o:$,d(e){e&&_(t)}}}function ze(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Te extends we{constructor(e){super(),be(this,e,ze,Ee,w,{size:0,strokeWidth:1,class:2})}}function De(e){let t,n,o,i,l;return{c(){t=S("svg"),n=S("path"),o=S("polyline"),i=S("line"),T(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),T(o,"points","15 3 21 3 21 9"),T(i,"x1","10"),T(i,"y1","14"),T(i,"x2","21"),T(i,"y2","3"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",l="feather feather-external-link "+e[2])},m(e,l){I(e,t,l),k(t,n),k(t,o),k(t,i)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-external-link "+e[2])&&T(t,"class",l)},i:$,o:$,d(e){e&&_(t)}}}function Oe(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Be extends we{constructor(e){super(),be(this,e,Oe,De,w,{size:0,strokeWidth:1,class:2})}}function Me(e){let t,n,o,i;return{c(){t=S("svg"),n=S("circle"),o=S("line"),T(n,"cx","11"),T(n,"cy","11"),T(n,"r","8"),T(o,"x1","21"),T(o,"y1","21"),T(o,"x2","16.65"),T(o,"y2","16.65"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",i="feather feather-search "+e[2])},m(e,i){I(e,t,i),k(t,n),k(t,o)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-search "+e[2])&&T(t,"class",i)},i:$,o:$,d(e){e&&_(t)}}}function Ve(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Ae extends we{constructor(e){super(),be(this,e,Ve,Me,w,{size:0,strokeWidth:1,class:2})}}const{document:We}=pe;function Pe(e){e[30]=e[32].list,e[31]=e[32].items}function Re(e,t,n){const o=e.slice();return o[33]=t[n],o}function He(e,t,n){const o=e.slice();return o[36]=t[n],o}function Ye(e,t,n){const o=e.slice();return o[36]=t[n],o}function Ge(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Je(e){let t,n,o,i,l,r;Pe(e);let s=e[30]?.length&&Ue(e),a=e[31]?.length&&Ze(e),c=e[30]?.length&&Xe(e);return{c(){s&&s.c(),t=C(),n=j("div"),o=j("table"),a&&a.c(),i=C(),l=j("tbody"),c&&c.c(),T(o,"striped",""),T(o,"class","svelte-btngop"),T(n,"class","eList svelte-btngop")},m(e,d){s&&s.m(e,d),I(e,t,d),I(e,n,d),k(n,o),a&&a.m(o,null),k(o,i),k(o,l),c&&c.m(l,null),r=!0},p(e,n){Pe(e),e[30]?.length?s?(s.p(e,n),4&n[0]&&de(s,1)):(s=Ue(e),s.c(),de(s,1),s.m(t.parentNode,t)):s&&(ae(),ue(s,1,1,(()=>{s=null})),ce()),e[31]?.length?a?a.p(e,n):(a=Ze(e),a.c(),a.m(o,i)):a&&(a.d(1),a=null),e[30]?.length?c?(c.p(e,n),4&n[0]&&de(c,1)):(c=Xe(e),c.c(),de(c,1),c.m(l,null)):c&&(ae(),ue(c,1,1,(()=>{c=null})),ce())},i(e){r||(de(s),de(c),r=!0)},o(e){ue(s),ue(c),r=!1},d(e){s&&s.d(e),e&&_(t),e&&_(n),a&&a.d(),c&&c.d()}}}function Ue(e){let t,n,o,i,l,r,s,a,c,d;function u(t){e[22](t)}let m={id:e[8]};return void 0!==e[3]&&(m.value=e[3]),o=new e[6]({props:m}),G.push((()=>$e(o,"value",u))),o.$on("input",e[12]),s=new Te({props:{size:"18"}}),{c(){t=j("div"),n=F("Suchen: "),he(o.$$.fragment),l=C(),r=j("span"),he(s.$$.fragment),T(r,"class","feather pointer svelte-btngop"),B(t,"margin-bottom","1em"),B(t,"position","relative")},m(i,u){I(i,t,u),k(t,n),ge(o,t,null),k(t,l),k(t,r),ge(s,r,null),a=!0,c||(d=L(r,"click",e[15]),c=!0)},p(e,t){const n={};!i&&8&t[0]&&(i=!0,n.value=e[3],te((()=>i=!1))),o.$set(n)},i(e){a||(de(o.$$.fragment,e),de(s.$$.fragment,e),a=!0)},o(e){ue(o.$$.fragment,e),ue(s.$$.fragment,e),a=!1},d(e){e&&_(t),ve(o),ve(s),c=!1,d()}}}function Ze(e){let t,n,o,i=e[4]&&e[0]&&Qe(),l=e[31],r=[];for(let t=0;t<l.length;t+=1)r[t]=Ke(Ye(e,l,t));return{c(){t=j("thead"),n=j("tr"),i&&i.c(),o=C();for(let e=0;e<r.length;e+=1)r[e].c();T(n,"class","svelte-btngop"),T(t,"class","svelte-btngop")},m(e,l){I(e,t,l),k(t,n),i&&i.m(n,null),k(n,o);for(let e=0;e<r.length;e+=1)r[e].m(n,null)},p(e,t){if(e[4]&&e[0]?i||(i=Qe(),i.c(),i.m(n,o)):i&&(i.d(1),i=null),2052&t[0]){let o;for(l=e[31],o=0;o<l.length;o+=1){const i=Ye(e,l,o);r[o]?r[o].p(i,t):(r[o]=Ke(i),r[o].c(),r[o].m(n,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=l.length}},d(e){e&&_(t),i&&i.d(),N(r,e)}}}function Qe(e){let t;return{c(){t=j("th"),T(t,"class","svelte-btngop")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Ke(e){let t,n,o=e[36]?.designation+"";return{c(){t=j("th"),n=F(o),T(t,"class","svelte-btngop")},m(e,o){I(e,t,o),k(t,n)},p(e,t){4&t[0]&&o!==(o=e[36]?.designation+"")&&D(n,o)},d(e){e&&_(t)}}}function Xe(e){let t,n,o=e[30],i=[];for(let t=0;t<o.length;t+=1)i[t]=ot(Re(e,o,t));const l=e=>ue(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=q()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(28191&n[0]){let r;for(o=e[30],r=0;r<o.length;r+=1){const l=Re(e,o,r);i[r]?(i[r].p(l,n),de(i[r],1)):(i[r]=ot(l),i[r].c(),de(i[r],1),i[r].m(t.parentNode,t))}for(ae(),r=o.length;r<i.length;r+=1)l(r);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ue(i[e]);n=!1},d(e){N(i,e),e&&_(t)}}}function et(e){let t,n,o,i,l=e[4]&&e[0]&&tt(e),r=e[31],s=[];for(let t=0;t<r.length;t+=1)s[t]=nt(He(e,r,t));return{c(){t=j("tr"),l&&l.c(),n=C();for(let e=0;e<s.length;e+=1)s[e].c();o=C(),T(t,"class","pointer svelte-btngop"),M(t,"active",e[33]._id===e[1])},m(e,r){I(e,t,r),l&&l.m(t,null),k(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);k(t,o),i=!0},p(e,i){if(e[4]&&e[0]?l?(l.p(e,i),17&i[0]&&de(l,1)):(l=tt(e),l.c(),de(l,1),l.m(t,n)):l&&(ae(),ue(l,1,1,(()=>{l=null})),ce()),3588&i[0]){let n;for(r=e[31],n=0;n<r.length;n+=1){const l=He(e,r,n);s[n]?s[n].p(l,i):(s[n]=nt(l),s[n].c(),s[n].m(t,o))}for(;n<s.length;n+=1)s[n].d(1);s.length=r.length}2054&i[0]&&M(t,"active",e[33]._id===e[1])},i(e){i||(de(l),i=!0)},o(e){ue(l),i=!1},d(e){e&&_(t),l&&l.d(),N(s,e)}}}function tt(e){let t,n,o,i,l;return o=new Be({props:{size:"18"}}),{c(){t=j("td"),n=j("a"),he(o.$$.fragment),T(n,"href",i=e[14](e[33])),T(n,"target","_blank"),T(t,"class","editRow svelte-btngop")},m(e,i){I(e,t,i),k(t,n),ge(o,n,null),l=!0},p(e,t){(!l||4&t[0]&&i!==(i=e[14](e[33])))&&T(n,"href",i)},i(e){l||(de(o.$$.fragment,e),l=!0)},o(e){ue(o.$$.fragment,e),l=!1},d(e){e&&_(t),ve(o)}}}function nt(e){let t,n,o,i,l=e[9](e[33],e[36])+"";return{c(){t=j("td"),n=F(l),T(t,"class","svelte-btngop")},m(l,r){I(l,t,r),k(t,n),o||(i=L(t,"click",z((function(){b(e[10](e[33]))&&e[10](e[33]).apply(this,arguments)}))),o=!0)},p(t,o){e=t,4&o[0]&&l!==(l=e[9](e[33],e[36])+"")&&D(n,l)},d(e){e&&_(t),o=!1,i()}}}function ot(e){let t,n,o=e[13](e[33],e[31],e[3]),i=o&&et(e);return{c(){i&&i.c(),t=q()},m(e,o){i&&i.m(e,o),I(e,t,o),n=!0},p(e,n){12&n[0]&&(o=e[13](e[33],e[31],e[3])),o?i?(i.p(e,n),12&n[0]&&de(i,1)):(i=et(e),i.c(),de(i,1),i.m(t.parentNode,t)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce())},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){i&&i.d(e),e&&_(t)}}}function it(e){let t,n;return t=new e[5]({}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:$,i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function lt(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:it,then:Je,catch:Ge,value:32,blocks:[,,,]};return me(n=e[2]&&e[11](),i),{c(){t=q(),i.block.c()},m(e,n){I(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,o=!0},p(t,o){e=t,i.ctx=e,4&o[0]&&n!==(n=e[2]&&e[11]())&&me(n,i)||fe(i,e,o)},i(e){o||(de(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ue(i.blocks[e])}o=!1},d(e){e&&_(t),i.block.d(e),i.token=null,i=null}}}function rt(e,o,i){let l;const r=R(),{Loading:s,TextField:a}=c,{currentTasks:m}=d;y(e,m,(e=>i(23,l=e)));let p,{eventId:$}=o,{className:h}=o,{rowId:g}=o,{filterForReady:v=!1}=o,{showEdit:b=!1}=o,{praefix:w=""}=o,{selectionFields:x=!1}=o,{deList:k}=o,I=!0,_="",N=h+Math.floor(9e3*Math.random()+1e3).toString()+"search";const j=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?f(n):u(e[`_${t.name}`]||e[t.name]||"")},S=t.getSchemaByClass(h),F=async(e,t,n,o)=>{const{value:i,refClass:l}=o,[r,s]=n.split("."),a=i?.get(w),c=a&&await ql(r,a);if(!c)return e;const d=c[s];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 Fl(l+o._id.toString(),o),o})):e};P((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(N)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await S;e.eventId===t.id&&(Ll(t.class,e.eventId),i(2,I=!i(2,I=!1)))}));return e.$$set=e=>{"eventId"in e&&i(16,$=e.eventId),"className"in e&&i(17,h=e.className),"rowId"in e&&i(1,g=e.rowId),"filterForReady"in e&&i(18,v=e.filterForReady),"showEdit"in e&&i(0,b=e.showEdit),"praefix"in e&&i(19,w=e.praefix),"selectionFields"in e&&i(20,x=e.selectionFields),"deList"in e&&i(21,k=e.deList)},[b,g,I,_,p,s,a,m,N,j,e=>()=>r("choose",{row:e}),async()=>{const e=await S;let n;i(4,p=(e=>!l?.length||!!l.find((t=>t===e)))(e.id));let o,s=n=await jl(e.class,e.id),a=!1,c="";const d=x&&x?.find((t=>e.class===t.refClass.split(":")[0])),u=d?.value?.get&&d.value.get(w);if(u){const[n,i]=d.refClass.split(":");e.class===n&&(s=await F(s,n,i,d)),a=d.parentClass?.find((e=>"quantity"===e.name)),c=d.className,o=await t.getCountedSection(c,i.split(".")[0],u,n,"quantity")}i(0,b&&=!d),!d&&v&&(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 m=[],f=e.display;return f&&f.length?f.map((t=>{const[n,o]=t.split(".");let i=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));i&&(i={...i},i.name=`${n}_${o}`,s=s.map((e=>(e[n]&&(e[i.name]=e[n][o]),e)))),i||(i=e.items.find((e=>e.name===n))),m.find((e=>e?.name===n))||m.push(i)})):m=e.items,!b&&a?(m=m.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)}})),r("init",s)):k&&(s=s.filter((e=>!k.find((t=>t._id===e._id))))),{list:s,items:m}},({detail:{value:e}})=>{i(3,_=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(j(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},e=>`/task/${e._task.event}/${e._task._id}/task?view=standalone`,()=>{i(3,_="")},$,h,v,w,x,k,function(e){_=e,i(3,_)}]}class st extends we{constructor(e){var t;super(),We.getElementById("svelte-btngop-style")||((t=j("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}",k(We.head,t)),be(this,e,rt,lt,w,{eventId:16,className:17,rowId:1,filterForReady:18,showEdit:0,praefix:19,selectionFields:20,deList:21},[-1,-1])}}function at(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function ct(e){let t,n,o=e[36]&&dt(e);return{c(){o&&o.c(),t=q()},m(e,i){o&&o.m(e,i),I(e,t,i),n=!0},p(e,n){e[36]?o?(o.p(e,n),4&n[0]&&de(o,1)):(o=dt(e),o.c(),de(o,1),o.m(t.parentNode,t)):o&&(ae(),ue(o,1,1,(()=>{o=null})),ce())},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&_(t)}}}function dt(e){let t,n;return t=new e[15]({props:{title:e[11]?"Auswahl":e[19],class:"eList "+(e[9]?"form":""),$$slots:{default:[bt]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};2048&n[0]&&(o.title=e[11]?"Auswahl":e[19]),512&n[0]&&(o.class="eList "+(e[9]?"form":"")),32767&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ut(e){let t,n;return t=new Dl({props:{schema:e[1],recID:e[0],readonly:e[10]}}),t.$on("choose",(function(){b(e[25](e[36]))&&e[25](e[36]).apply(this,arguments)})),t.$on("back",e[22]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const i={};2&o[0]&&(i.schema=e[1]),1&o[0]&&(i.recID=e[0]),1024&o[0]&&(i.readonly=e[10]),t.$set(i)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function mt(e){let t,n,o,i,l,r,s;t=new e[16]({props:{text:e[11]?"Zusätzliche Auswahl":""}});const a=[pt,ft],c=[];function d(e,t){return e[11]?0:1}return o=d(e),i=c[o]=a[o](e),r=new st({props:{eventId:e[1].id,className:e[1].class,filterForReady:e[3],praefix:e[4],selectionFields:e[5],rowId:e[0],deList:e[7],showEdit:e[6]}}),r.$on("edit",e[26]),r.$on("choose",e[29]),r.$on("init",e[27]),{c(){he(t.$$.fragment),n=C(),i.c(),l=C(),he(r.$$.fragment)},m(e,i){ge(t,e,i),I(e,n,i),c[o].m(e,i),I(e,l,i),ge(r,e,i),s=!0},p(e,n){const s={};2048&n[0]&&(s.text=e[11]?"Zusätzliche Auswahl":""),t.$set(s);let u=o;o=d(e),o===u?c[o].p(e,n):(ae(),ue(c[u],1,1,(()=>{c[u]=null})),ce(),i=c[o],i?i.p(e,n):(i=c[o]=a[o](e),i.c()),de(i,1),i.m(l.parentNode,l));const m={};2&n[0]&&(m.eventId=e[1].id),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]),r.$set(m)},i(e){s||(de(t.$$.fragment,e),de(i),de(r.$$.fragment,e),s=!0)},o(e){ue(t.$$.fragment,e),ue(i),ue(r.$$.fragment,e),s=!1},d(e){ve(t,e),e&&_(n),c[o].d(e),e&&_(l),ve(r,e)}}}function ft(e){let t,n,o,i;n=new e[17]({props:{outline:!0,$$slots:{default:[$t]},$$scope:{ctx:e}}}),n.$on("click",e[23]);let l=e[20]&&function(e){let t,n;return t=new e[17]({props:{filled:!0,$$slots:{default:[ht]},$$scope:{ctx:e}}}),t.$on("click",e[24]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}(e);return{c(){t=j("div"),he(n.$$.fragment),o=C(),l&&l.c(),T(t,"class","form--buttons svelte-jb5mrh")},m(e,r){I(e,t,r),ge(n,t,null),k(t,o),l&&l.m(t,null),i=!0},p(e,t){const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o),e[20]&&l.p(e,t)},i(e){i||(de(n.$$.fragment,e),de(l),i=!0)},o(e){ue(n.$$.fragment,e),ue(l),i=!1},d(e){e&&_(t),ve(n),l&&l.d()}}}function pt(e){let t,n,o,i,l,r,s=e[14]&>(e);return o=new e[17]({props:{outline:!0,$$slots:{default:[vt]},$$scope:{ctx:e}}}),o.$on("click",e[23]),l=new e[16]({props:{text:"Liste aus "+e[8]}}),{c(){s&&s.c(),t=C(),n=j("div"),he(o.$$.fragment),i=C(),he(l.$$.fragment),T(n,"class","form--buttons svelte-jb5mrh")},m(e,a){s&&s.m(e,a),I(e,t,a),I(e,n,a),ge(o,n,null),I(e,i,a),ge(l,e,a),r=!0},p(e,n){e[14]?s?(s.p(e,n),16384&n[0]&&de(s,1)):(s=gt(e),s.c(),de(s,1),s.m(t.parentNode,t)):s&&(ae(),ue(s,1,1,(()=>{s=null})),ce());const i={};64&n[1]&&(i.$$scope={dirty:n,ctx:e}),o.$set(i);const r={};256&n[0]&&(r.text="Liste aus "+e[8]),l.$set(r)},i(e){r||(de(s),de(o.$$.fragment,e),de(l.$$.fragment,e),r=!0)},o(e){ue(s),ue(o.$$.fragment,e),ue(l.$$.fragment,e),r=!1},d(e){s&&s.d(e),e&&_(t),e&&_(n),ve(o),e&&_(i),ve(l,e)}}}function $t(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function ht(e){let t;return{c(){t=F("Neu")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function gt(e){let t,n;return t=new ni({props:{item:e[12],record:{_id:"",[e[12].name]:""},noForm:"true",classId:"sel_"+e[12].name,eventId:e[13],required:!1,hidden:!1,readonly:!1,deList:e[14]}}),t.$on("notify",e[28]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n[0]&&(o.item=e[12]),4096&n[0]&&(o.record={_id:"",[e[12].name]:""}),4096&n[0]&&(o.classId="sel_"+e[12].name),8192&n[0]&&(o.eventId=e[13]),16384&n[0]&&(o.deList=e[14]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function vt(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function bt(e){let t,n,o,i;const l=[mt,ut],r=[];function s(e,t){return e[36].length&&!e[9]?0:1}return t=s(e),n=r[t]=l[t](e),{c(){n.c(),o=q()},m(e,n){r[t].m(e,n),I(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?r[t].p(e,i):(ae(),ue(r[a],1,1,(()=>{r[a]=null})),ce(),n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),de(n,1),n.m(o.parentNode,o))},i(e){i||(de(n),i=!0)},o(e){ue(n),i=!1},d(e){r[t].d(e),e&&_(o)}}}function wt(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function yt(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:wt,then:ct,catch:at,value:36,blocks:[,,,]};return me(n=e[21](e[2]),i),{c(){t=q(),i.block.c()},m(e,n){I(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,o=!0},p(t,o){e=t,i.ctx=e,4&o[0]&&n!==(n=e[21](e[2]))&&me(n,i)||fe(i,e,o)},i(e){o||(de(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ue(i.blocks[e])}o=!1},d(e){e&&_(t),i.block.d(e),i.token=null,i=null}}}function xt(e,n,o){let i;const{Dialog:l,Divider:r,Button:s}=c,a=R(),{currentTasks:u}=d;y(e,u,(e=>o(32,i=e)));let{schema:m}=n,{recID:f}=n,{isOpening:p=!0}=n,{filterForReady:$=!1}=n,{praefix:h=""}=n,{selectionFields:g=!1}=n,{showEdit:v=!0}=n,{deList:b}=n,w=m.identity.designation,x=m.id;m.class;let k,I,_,N,j,S,F,C="",q=!1;const L=!i?.length||i.find((e=>e===x));return e.$$set=e=>{"schema"in e&&o(1,m=e.schema),"recID"in e&&o(0,f=e.recID),"isOpening"in e&&o(2,p=e.isOpening),"filterForReady"in e&&o(3,$=e.filterForReady),"praefix"in e&&o(4,h=e.praefix),"selectionFields"in e&&o(5,g=e.selectionFields),"showEdit"in e&&o(6,v=e.showEdit),"deList"in e&&o(7,b=e.deList)},[f,m,p,$,h,g,v,b,C,q,k,_,j,S,F,l,r,s,u,w,L,async e=>{if(!e)return!1;const n=await jl(m.class,m.id);if(I=g&&g?.find((e=>m.class===e.refClass.split(":")[0])),o(11,_=I?.value?.get&&I.value.get(h)),_){N=I.refClass;const[e,n]=N.split(":"),[i]=n.split(".");o(12,j=I.parentClass.find((t=>t.name===e)));const l=await t.getSchemaByClass(j.refClass);o(13,S=l.id),o(8,C=I.parentClass.find((e=>e.name===i)).designation)}return n},()=>{o(9,q=!1),f||a("back"),v||a("back")},()=>{o(9,q=!1),a("back")},()=>{o(0,f=!1),o(10,k=!1),o(9,q=!0)},e=>({detail:{row:e}})=>{let t=m.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let i=m.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(i){e[`${n}_${o}`]=e[n][o]}})),a("choose",{row:e})},({detail:e})=>{o(10,k=!!e._task.visum||"Closed"===e._task.status),o(0,f=e._docId),o(9,q=!0)},({detail:e})=>{_&&o(14,F=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};a("choose",{row:t})},function(t){H(e,t)}]}class kt extends we{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=j("style")).id="svelte-jb5mrh-style",t.textContent=".eList .flex button.btn{width:max-content !important}.dialog.eList{max-height:90vh}.form--buttons.svelte-jb5mrh{display:flex;gap:1em;padding:0.5em 0}",k(document.head,t)),be(this,e,xt,yt,w,{schema:1,recID:0,isOpening:2,filterForReady:3,praefix:4,selectionFields:5,showEdit:6,deList:7},[-1,-1])}}const{document:It}=pe;function _t(e){e[26]=e[28].list,e[27]=e[28].items}function Nt(e,t,n){const o=e.slice();return o[29]=t[n],o}function jt(e,t,n){const o=e.slice();return o[32]=t[n],o}function St(e,t,n){const o=e.slice();return o[32]=t[n],o}function Ft(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Ct(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g,v;function b(t){e[23](t)}_t(e),n=new e[7]({props:{outline:!0,$$slots:{default:[qt]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),r=new e[6]({props:w}),G.push((()=>$e(r,"value",b))),r.$on("input",e[12]),d=new Te({props:{size:"18"}});let y=e[27]?.length&&function(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=Lt(St(e,o,t));return{c(){t=j("thead"),n=j("tr");for(let e=0;e<i.length;e+=1)i[e].c();T(n,"class","svelte-14hcfjl"),T(t,"class","svelte-14hcfjl")},m(e,o){I(e,t,o),k(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let l;for(o=e[27],l=0;l<o.length;l+=1){const r=St(e,o,l);i[l]?i[l].p(r,t):(i[l]=Lt(r),i[l].c(),i[l].m(n,null))}for(;l<i.length;l+=1)i[l].d(1);i.length=o.length}},d(e){e&&_(t),N(i,e)}}}(e),x=e[26]?.length&&function(e){let t,n=e[26],o=[];for(let t=0;t<n.length;t+=1)o[t]=Tt(Nt(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=q()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);I(e,t,n)},p(e,i){if(11779&i[0]){let l;for(n=e[26],l=0;l<n.length;l+=1){const r=Nt(e,n,l);o[l]?o[l].p(r,i):(o[l]=Tt(r),o[l].c(),o[l].m(t.parentNode,t))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(e){N(o,e),e&&_(t)}}}(e);return{c(){t=j("div"),he(n.$$.fragment),o=C(),i=j("div"),l=F("Suchen: "),he(r.$$.fragment),a=C(),c=j("span"),he(d.$$.fragment),u=C(),m=j("div"),f=j("table"),y&&y.c(),p=C(),$=j("tbody"),x&&x.c(),T(t,"class","form--buttons svelte-14hcfjl"),T(c,"class","feather pointer svelte-14hcfjl"),B(i,"margin-bottom","1em"),B(i,"position","relative"),T(f,"striped",""),T(f,"class","svelte-14hcfjl"),T(m,"class","eList svelte-14hcfjl")},m(s,b){I(s,t,b),ge(n,t,null),I(s,o,b),I(s,i,b),k(i,l),ge(r,i,null),k(i,a),k(i,c),ge(d,c,null),I(s,u,b),I(s,m,b),k(m,f),y&&y.m(f,null),k(f,p),k(f,$),x&&x.m($,null),h=!0,g||(v=L(c,"click",e[14]),g=!0)},p(e,t){_t(e);const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};!s&&2&t[0]&&(s=!0,i.value=e[1],te((()=>s=!1))),r.$set(i),e[27]?.length&&y.p(e,t),e[26]?.length&&x.p(e,t)},i(e){h||(de(n.$$.fragment,e),de(r.$$.fragment,e),de(d.$$.fragment,e),h=!0)},o(e){ue(n.$$.fragment,e),ue(r.$$.fragment,e),ue(d.$$.fragment,e),h=!1},d(e){e&&_(t),ve(n),e&&_(o),e&&_(i),ve(r),ve(d),e&&_(u),e&&_(m),y&&y.d(),x&&x.d(),g=!1,v()}}}function qt(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Lt(e){let t,n,o=e[32]?.designation+"";return{c(){t=j("th"),n=F(o),T(t,"class","svelte-14hcfjl")},m(e,o){I(e,t,o),k(t,n)},p:$,d(e){e&&_(t)}}}function Et(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=zt(jt(e,o,t));return{c(){t=j("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=C(),T(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[29]._id===e[0])},m(e,o){I(e,t,o);for(let e=0;e<i.length;e+=1)i[e].m(t,null);k(t,n)},p(e,l){if(3584&l[0]){let r;for(o=e[27],r=0;r<o.length;r+=1){const s=jt(e,o,r);i[r]?i[r].p(s,l):(i[r]=zt(s),i[r].c(),i[r].m(t,n))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}2049&l[0]&&M(t,"active",e[29]._id===e[0])},d(e){e&&_(t),N(i,e)}}}function zt(e){let t,n,o,i,l=e[9](e[29],e[32])+"";return{c(){t=j("td"),n=F(l),T(t,"class","svelte-14hcfjl")},m(l,r){I(l,t,r),k(t,n),o||(i=L(t,"click",z(e[10](e[29]))),o=!0)},p(t,n){e=t},d(e){e&&_(t),o=!1,i()}}}function Tt(e){let t,n=e[13](e[29],e[27],e[1]),o=n&&Et(e);return{c(){o&&o.c(),t=q()},m(e,n){o&&o.m(e,n),I(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[29],e[27],e[1])),n?o?o.p(e,i):(o=Et(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&_(t)}}}function Dt(e){let t,n;return t=new e[5]({}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:$,i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ot(e){let t,n,o,i;t=new e[4]({});let l={ctx:e,current:null,token:null,hasCatch:!1,pending:Dt,then:Ct,catch:Ft,value:28,blocks:[,,,]};return me(e[11](),l),{c(){he(t.$$.fragment),n=C(),o=q(),l.block.c()},m(e,r){ge(t,e,r),I(e,n,r),I(e,o,r),l.block.m(e,l.anchor=r),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(t,n){fe(l,e=t,n)},i(e){i||(de(t.$$.fragment,e),de(l.block),i=!0)},o(e){ue(t.$$.fragment,e);for(let e=0;e<3;e+=1){ue(l.blocks[e])}i=!1},d(e){ve(t,e),e&&_(n),e&&_(o),l.block.d(e),l.token=null,l=null}}}function Bt(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Ot]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};3&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Mt(e,o,i){const l=R(),{Dialog:r,Divider:s,Loading:a,TextField:d,Button:m}=c;let{item:p}=o,{classId:$}=o,{className:h}=o,{rowId:g}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:w}=o,{filter:y}=o,x="",k=$+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?f(n):u(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass(h);P((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&Ll(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(15,p=e.item),"classId"in e&&i(16,$=e.classId),"className"in e&&i(17,h=e.className),"rowId"in e&&i(0,g=e.rowId),"viewName"in e&&i(18,v=e.viewName),"viewValue"in e&&i(19,b=e.viewValue),"recordId"in e&&i(20,w=e.recordId),"filter"in e&&i(21,y=e.filter)},[g,x,l,r,s,a,d,m,k,I,e=>()=>l("choose",{row:e}),async()=>{const e=await _,n="."+$+"#"+v,o=document.querySelector(n);let i={[v]:o?.value||w};if(p.refItem){const e="."+$+"#"+p.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[p.refItem]:t.value},{[p.refItem]:{$exists:!0,$eq:""}}]};i={...i,...e}}}catch{}}let l=[];i[v]&&(l=await t.getSectionView(e.class,i,!0)),y&&(l=l.filter((e=>e._id!=y)));let r=[],s=e.display;return s&&s.length?s.map((t=>{const[n,o]=t.split(".");let i=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));i&&(i={...i},i.name=`${n}_${o}`,l=l.map((e=>(e[n]&&(e[i.name]=e[n][o]),e)))),i||(i=e.items.find((e=>e.name===n))),r.find((e=>e?.name===n))||r.push(i)})):r=e.items,{list:l,items:r}},({detail:{value:e}})=>{i(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(I(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,x="")},p,$,h,v,b,w,y,()=>l("back"),function(e){x=e,i(1,x)}]}class Vt extends we{constructor(e){var t;super(),It.getElementById("svelte-14hcfjl-style")||((t=j("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}",k(It.head,t)),be(this,e,Mt,Bt,w,{item:15,classId:16,className:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}const{document:At}=pe;function Wt(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Pt(e){let t,n,i=e[40]&&function(e){let t,n,i,l,r,s,a,c,d,u,m,f,p,$,h;n=new o({props:{class:"full-width",id:e[21],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[24]()),n.$on("onFocus",e[24](e[21]));const g=[Ht,Rt],v=[];function b(e,t){return!e[3]||e[13]?0:e[18]&&e[0]?1:-1}~(l=b(e))&&(r=v[l]=g[l](e));let w=(!e[3]||e[13])&&Ut(e);function y(t){e[32](t)}let N={class:"tModal",noClickaway:!0,$$slots:{default:[Xt]},$$scope:{ctx:e}};void 0!==e[15]&&(N.open=e[15]);m=new e[20]({props:N}),G.push((()=>$e(m,"open",y)));let S=e[16]&&en(e);return{c(){t=j("div"),he(n.$$.fragment),i=C(),r&&r.c(),s=C(),a=j("input"),d=C(),w&&w.c(),u=C(),he(m.$$.fragment),p=C(),S&&S.c(),$=q(),T(a,"class",c=x(e[6]||e[7])+" svelte-jox15l"),T(a,"id",e[4]),T(a,"name",e[4]),a.value=e[0],a.hidden=!0,B(t,"position","relative")},m(e,o){I(e,t,o),ge(n,t,null),k(t,i),~l&&v[l].m(t,null),k(t,s),k(t,a),k(t,d),w&&w.m(t,null),I(e,u,o),ge(m,e,o),I(e,p,o),S&&S.m(e,o),I(e,$,o),h=!0},p(e,o){const i={};4&o[0]&&(i.value=e[2]),2&o[0]&&(i.required=e[1]),8&o[0]&&(i.disabled=e[3]),n.$set(i);let d=l;l=b(e),l===d?~l&&v[l].p(e,o):(r&&(ae(),ue(v[d],1,1,(()=>{v[d]=null})),ce()),~l?(r=v[l],r?r.p(e,o):(r=v[l]=g[l](e),r.c()),de(r,1),r.m(t,s)):r=null),(!h||192&o[0]&&c!==(c=x(e[6]||e[7])+" svelte-jox15l"))&&T(a,"class",c),(!h||16&o[0])&&T(a,"id",e[4]),(!h||16&o[0])&&T(a,"name",e[4]),(!h||1&o[0]&&a.value!==e[0])&&(a.value=e[0]),!e[3]||e[13]?w?(w.p(e,o),8200&o[0]&&de(w,1)):(w=Ut(e),w.c(),de(w,1),w.m(t,null)):w&&(ae(),ue(w,1,1,(()=>{w=null})),ce());const u={};57249&o[0]|2048&o[1]&&(u.$$scope={dirty:o,ctx:e}),!f&&32768&o[0]&&(f=!0,u.open=e[15],te((()=>f=!1))),m.$set(u),e[16]?S?(S.p(e,o),65536&o[0]&&de(S,1)):(S=en(e),S.c(),de(S,1),S.m($.parentNode,$)):S&&(ae(),ue(S,1,1,(()=>{S=null})),ce())},i(e){h||(de(n.$$.fragment,e),de(r),de(w),de(m.$$.fragment,e),de(S),h=!0)},o(e){ue(n.$$.fragment,e),ue(r),ue(w),ue(m.$$.fragment,e),ue(S),h=!1},d(e){e&&_(t),ve(n),~l&&v[l].d(),w&&w.d(),e&&_(u),ve(m,e),e&&_(p),S&&S.d(e),e&&_($)}}}(e);return{c(){i&&i.c(),t=q()},m(e,o){i&&i.m(e,o),I(e,t,o),n=!0},p(e,t){e[40]&&i.p(e,t)},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){i&&i.d(e),e&&_(t)}}}function Rt(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Jt,then:Gt,catch:Yt,value:41,blocks:[,,,]};return me(e[28](),o),{c(){t=q(),o.block.c()},m(e,i){I(e,t,i),o.block.m(e,o.anchor=i),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){fe(o,e=t,n)},i(e){n||(de(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ue(o.blocks[e])}n=!1},d(e){e&&_(t),o.block.d(e),o.token=null,o=null}}}function Ht(e){let t,n,o,i,l;return n=new Ae({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"class","feather pointer svelte-jox15l")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=[L(t,"click",e[24]()),L(t,"choose",e[25])],i=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,v(l)}}}function Yt(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Gt(e){let t,n,o,i;return o=new Be({props:{size:"18"}}),{c(){t=j("span"),n=j("a"),he(o.$$.fragment),T(n,"href",e[41]),T(n,"target","_blank"),T(t,"class","feather pointer svelte-jox15l")},m(e,l){I(e,t,l),k(t,n),ge(o,n,null),i=!0},p:$,i(e){i||(de(o.$$.fragment,e),i=!0)},o(e){ue(o.$$.fragment,e),i=!1},d(e){e&&_(t),ve(o)}}}function Jt(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Ut(e){let t,n,o,i,l;return n=new Te({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"class","feather2 pointer svelte-jox15l")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=L(t,"click",e[27]),i=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,l()}}}function Zt(e){let t,n,o,i;const l=[Kt,Qt],r=[];function s(e,t){return e[11]?0:1}return t=s(e),n=r[t]=l[t](e),{c(){n.c(),o=q()},m(e,n){r[t].m(e,n),I(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?r[t].p(e,i):(ae(),ue(r[a],1,1,(()=>{r[a]=null})),ce(),n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),de(n,1),n.m(o.parentNode,o))},i(e){i||(de(n),i=!0)},o(e){ue(n),i=!1},d(e){r[t].d(e),e&&_(o)}}}function Qt(e){let t,n;return t=new kt({props:{schema:e[14],recID:e[0],isOpening:e[15],filterForReady:"true",selectionFields:e[10],deList:e[12],praefix:e[9]}}),t.$on("choose",e[25]),t.$on("back",e[26]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16384&n[0]&&(o.schema=e[14]),1&n[0]&&(o.recID=e[0]),32768&n[0]&&(o.isOpening=e[15]),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||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Kt(e){let t,n;return t=new Vt({props:{item:e[5],className:e[14].class,classId:e[7],rowId:e[0],recordId:e[8],viewName:e[11],viewValue:""}}),t.$on("choose",e[25]),t.$on("back",e[26]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.item=e[5]),16384&n[0]&&(o.className=e[14].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||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Xt(e){let t,n,o=e[15]&&Zt(e);return{c(){o&&o.c(),t=q()},m(e,i){o&&o.m(e,i),I(e,t,i),n=!0},p(e,n){e[15]?o?(o.p(e,n),32768&n[0]&&de(o,1)):(o=Zt(e),o.c(),de(o,1),o.m(t.parentNode,t)):o&&(ae(),ue(o,1,1,(()=>{o=null})),ce())},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&_(t)}}}function en(e){let t,n,o;function i(t){e[33](t)}let l={class:"tModal",noClickaway:!0,$$slots:{default:[nn]},$$scope:{ctx:e}};return void 0!==e[16]&&(l.open=e[16]),t=new e[20]({props:l}),G.push((()=>$e(t,"open",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};147457&o[0]|2048&o[1]&&(i.$$scope={dirty:o,ctx:e}),!n&&65536&o[0]&&(n=!0,i.open=e[16],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function tn(e){let t,n;return t=new Dl({props:{schema:e[14],recID:e[0],readonly:!0}}),t.$on("back",e[26]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16384&n[0]&&(o.schema=e[14]),1&n[0]&&(o.recID=e[0]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function nn(e){let t,n;return t=new e[19]({props:{title:e[17],$$slots:{default:[tn]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};131072&n[0]&&(o.title=e[17]),16385&n[0]|2048&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function on(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function ln(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:on,then:Pt,catch:Wt,value:40,blocks:[,,,]};return me(e[23](),o),{c(){t=q(),o.block.c()},m(e,i){I(e,t,i),o.block.m(e,o.anchor=i),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){fe(o,e=t,n)},i(e){n||(de(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ue(o.blocks[e])}n=!1},d(e){e&&_(t),o.block.d(e),o.token=null,o=null}}}function rn(e,n,o){let i;const l=R(),{Dialog:r,Modal:s}=c;let{id:a}=n,{item:u}=n,{value:m=""}=n,{desc:f=""}=n,{noForm:$=!1}=n,{classId:h}=n,{eventId:g}=n,{recordId:v}=n,{required:b}=n,{disabled:w}=n,{readonly:x}=n,{praefix:k}=n,{selectionFields:I}=n,{formnovalidate:_}=n,{selection:N}=n,{deList:j}=n,{isTemplate:S}=n;const F="comment_"+a;let C,q,L,E,z=!1;x||=v&&u.asInput,w||=x;const{currentTasks:T}=d;y(e,T,(e=>o(34,i=e)));const D=e=>{e&&(o(2,f=p(L,e)),l("change",{value:m,description:f}),l("task",{row:e}))},O=()=>{o(15,z=!1),o(16,C=!1)};return e.$$set=e=>{"id"in e&&o(4,a=e.id),"item"in e&&o(5,u=e.item),"value"in e&&o(0,m=e.value),"desc"in e&&o(2,f=e.desc),"noForm"in e&&o(6,$=e.noForm),"classId"in e&&o(7,h=e.classId),"eventId"in e&&o(30,g=e.eventId),"recordId"in e&&o(8,v=e.recordId),"required"in e&&o(1,b=e.required),"disabled"in e&&o(3,w=e.disabled),"readonly"in e&&o(29,x=e.readonly),"praefix"in e&&o(9,k=e.praefix),"selectionFields"in e&&o(10,I=e.selectionFields),"formnovalidate"in e&&o(31,_=e.formnovalidate),"selection"in e&&o(11,N=e.selection),"deList"in e&&o(12,j=e.deList),"isTemplate"in e&&o(13,S=e.isTemplate)},e.$$.update=()=>{2&e.$$.dirty[0]|1&e.$$.dirty[1]&&o(1,b=b&&!_),16417&e.$$.dirty[0]&&m&&L&&Promise.resolve(Sl(u.refClass,L.id,m)).then((e=>D(e))),16385&e.$$.dirty[0]&&!m&&L&&D({})},[m,b,f,w,a,u,$,h,v,k,I,N,j,S,L,z,C,q,E,r,s,F,T,async()=>{try{if(o(14,L=await t.getSchemaByClass(u.refClass)),o(18,E=(e=>!i?.length||!!i.find((t=>t===e)))(L.id)),g&&v&&m&&!w){const e=await t.getSchema(g);e.input?.find((e=>e===u.refClass))&&o(3,w=!0)}return o(17,q=L.identity.designation),!0}catch{return l("initFail",!0),!1}},e=>t=>{if("BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}o(15,z=!0)},({detail:e})=>{o(0,m=e.row._id),O()},O,()=>{E&&(o(0,m=o(2,f="")),l("change",{value:m,description:f}),l("task",{row:{_task:{event:L.id,_id:!1}}}))},async()=>{if(!m)return;const e=await Sl(u.refClass,L.id,m),t=e._task._id;return`/task/${e._task.event}/${t}/task?view=standalone`},x,g,_,function(e){z=e,o(15,z)},function(e){C=e,o(16,C)}]}class sn extends we{constructor(e){var t;super(),At.getElementById("svelte-jox15l-style")||((t=j("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}",k(At.head,t)),be(this,e,rn,ln,w,{id:4,item:5,value:0,desc:2,noForm:6,classId:7,eventId:30,recordId:8,required:1,disabled:3,readonly:29,praefix:9,selectionFields:10,formnovalidate:31,selection:11,deList:12,isTemplate:13},[-1,-1])}}function an(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=j("div"),he(n.$$.fragment),B(t,"position","relative"),B(t,"max-width","10em")},m(e,i){I(e,t,i),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||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n)}}}function cn(e,t,n){let o;const l=R(),{TextField:r}=c;let{id:s}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t,{formnovalidate:p}=t;const $=JSON.parse(i.getItem("Locale")),h=Number("1.1").toLocaleString($.id).substring(1,2),{properties:g={}}=a;let{min:v,max:b,step:w,pattern:y,decimals:x=0,unit:k="",placeholder:I,hint:_,readonly:N,negative:j,required:S=!1}=g;y||(y=x?`[0-9]+([${h}][0-9]{1,${x}})?`:"[0-9]*"),j&&(y="-?"+y);return e.$$set=e=>{"id"in e&&n(0,s=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,S=S&&!p),32768&e.$$.dirty&&n(6,o=Number(d.toString().replace(h,".")).toFixed(x).toString().replace(".",h))},[s,u,m,f,S,y,o,r,$,w,I,N,({detail:e})=>l("blur",{value:e.value}),({detail:e})=>{N||Number(d.toString().replace(h,"."))||n(6,o="")},a,d,p]}class dn extends we{constructor(e){super(),be(this,e,cn,an,w,{id:0,item:14,value:15,noForm:1,classId:2,disabled:3,formnovalidate:16})}}const{document:un}=pe;function mn(e){e[32]=e[34].list,e[33]=e[34].items}function fn(e,t,n){const o=e.slice();return o[35]=t[n],o[37]=n,o}function pn(e,t,n){const o=e.slice();return o[38]=t[n],o[40]=n,o}function $n(e,t,n){const o=e.slice();return o[38]=t[n],o}function hn(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function gn(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g,v,b;mn(e),n=new e[8]({props:{outline:!0,$$slots:{default:[vn]},$$scope:{ctx:e}}}),n.$on("click",e[29]);let w=!e[1]&&bn(e);function y(t){e[30](t)}let x={id:e[11]};void 0!==e[2]&&(x.value=e[2]),s=new e[6]({props:x}),G.push((()=>$e(s,"value",y))),s.$on("input",e[14]),u=new Te({props:{size:"18"}});let S=e[33]?.length&&function(e){let t,n,o,i,l=!e[1]&&yn(e),r=e[33],s=[];for(let t=0;t<r.length;t+=1)s[t]=xn($n(e,r,t));return{c(){t=j("thead"),n=j("tr"),l&&l.c(),o=C();for(let e=0;e<s.length;e+=1)s[e].c();T(n,"class","svelte-1m010ne"),T(t,"class","svelte-1m010ne")},m(e,r){I(e,t,r),k(t,n),l&&l.m(n,null),k(n,o);for(let e=0;e<s.length;e+=1)s[e].m(n,null);i=!0},p(e,t){if(e[1]?l&&(ae(),ue(l,1,1,(()=>{l=null})),ce()):l?(l.p(e,t),2&t[0]&&de(l,1)):(l=yn(e),l.c(),de(l,1),l.m(n,o)),8192&t[0]){let o;for(r=e[33],o=0;o<r.length;o+=1){const i=$n(e,r,o);s[o]?s[o].p(i,t):(s[o]=xn(i),s[o].c(),s[o].m(n,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=r.length}},i(e){i||(de(l),i=!0)},o(e){ue(l),i=!1},d(e){e&&_(t),l&&l.d(),N(s,e)}}}(e),E=e[32]?.length&&function(e){let t,n,o=e[32],i=[];for(let t=0;t<o.length;t+=1)i[t]=jn(fn(e,o,t));const l=e=>ue(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=q()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(569359&n[0]){let r;for(o=e[32],r=0;r<o.length;r+=1){const l=fn(e,o,r);i[r]?(i[r].p(l,n),de(i[r],1)):(i[r]=jn(l),i[r].c(),de(i[r],1),i[r].m(t.parentNode,t))}for(ae(),r=o.length;r<i.length;r+=1)l(r);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ue(i[e]);n=!1},d(e){N(i,e),e&&_(t)}}}(e);return{c(){t=j("div"),he(n.$$.fragment),o=C(),w&&w.c(),i=C(),l=j("div"),r=F("Suchen: "),he(s.$$.fragment),c=C(),d=j("span"),he(u.$$.fragment),m=C(),f=j("div"),p=j("table"),S&&S.c(),$=C(),h=j("tbody"),E&&E.c(),T(t,"class","form--buttons svelte-1m010ne"),T(d,"class","feather pointer svelte-1m010ne"),B(l,"margin-bottom","1em"),B(l,"position","relative"),T(p,"striped",""),T(p,"class","svelte-1m010ne"),T(f,"class","eList svelte-1m010ne")},m(a,y){I(a,t,y),ge(n,t,null),k(t,o),w&&w.m(t,null),I(a,i,y),I(a,l,y),k(l,r),ge(s,l,null),k(l,c),k(l,d),ge(u,d,null),I(a,m,y),I(a,f,y),k(f,p),S&&S.m(p,null),k(p,$),k(p,h),E&&E.m(h,null),g=!0,v||(b=L(d,"click",e[16]),v=!0)},p(e,o){mn(e);const i={};4096&o[1]&&(i.$$scope={dirty:o,ctx:e}),n.$set(i),e[1]?w&&(ae(),ue(w,1,1,(()=>{w=null})),ce()):w?(w.p(e,o),2&o[0]&&de(w,1)):(w=bn(e),w.c(),de(w,1),w.m(t,null));const l={};!a&&4&o[0]&&(a=!0,l.value=e[2],te((()=>a=!1))),s.$set(l),e[33]?.length&&S.p(e,o),e[32]?.length&&E.p(e,o)},i(e){g||(de(n.$$.fragment,e),de(w),de(s.$$.fragment,e),de(u.$$.fragment,e),de(S),de(E),g=!0)},o(e){ue(n.$$.fragment,e),ue(w),ue(s.$$.fragment,e),ue(u.$$.fragment,e),ue(S),ue(E),g=!1},d(e){e&&_(t),ve(n),w&&w.d(),e&&_(i),e&&_(l),ve(s),ve(u),e&&_(m),e&&_(f),S&&S.d(),E&&E.d(),v=!1,b()}}}function vn(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function bn(e){let t,n;return t=new e[8]({props:{disabled:!e[32].length,filled:!0,$$slots:{default:[wn]},$$scope:{ctx:e}}}),t.$on("click",e[17](e[32])),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function wn(e){let t;return{c(){t=F("Bestätigen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function yn(e){let t,n,o,i,l;return n=new Ne({props:{size:"20"}}),{c(){t=j("th"),he(n.$$.fragment),T(t,"class","svelte-1m010ne")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=L(t,"click",e[18](e[32])),i=!0)},p(t,n){e=t},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,l()}}}function xn(e){let t,n,o=e[38]+"";return{c(){t=j("th"),n=F(o),T(t,"class","svelte-1m010ne")},m(e,o){I(e,t,o),k(t,n)},p:$,d(e){e&&_(t)}}}function kn(e){let t,n,o,i,l,r,s,a=e[0],c=_n(e),d=e[33],u=[];for(let t=0;t<d.length;t+=1)u[t]=Nn(pn(e,d,t));return{c(){t=j("tr"),c.c(),n=C();for(let e=0;e<u.length;e+=1)u[e].c();o=C(),T(t,"style",i=e[1]?"cursor: default;":"cursor: zoom-in;"),T(t,"title","übernimmt den Wert direkt"),T(t,"class","svelte-1m010ne"),M(t,"active",e[0].includes(e[35]))},m(i,a){I(i,t,a),c.m(t,null),k(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);k(t,o),l=!0,r||(s=L(t,"click",e[19](e[35])),r=!0)},p(r,s){if(e=r,1&s[0]&&w(a,a=e[0])?(ae(),ue(c,1,1,$),ce(),c=_n(e),c.c(),de(c),c.m(t,n)):c.p(e,s),8200&s[0]){let n;for(d=e[33],n=0;n<d.length;n+=1){const i=pn(e,d,n);u[n]?u[n].p(i,s):(u[n]=Nn(i),u[n].c(),u[n].m(t,o))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!l||2&s[0]&&i!==(i=e[1]?"cursor: default;":"cursor: zoom-in;"))&&T(t,"style",i),8193&s[0]&&M(t,"active",e[0].includes(e[35]))},i(e){l||(de(c),l=!0)},o(e){ue(c),l=!1},d(e){e&&_(t),c.d(e),N(u,e),r=!1,s()}}}function In(e){let t,n,o;return n=new e[10]({props:{name:e[12],data:e[37],checked:e[0].includes(e[35]),round:!0}}),{c(){t=j("td"),he(n.$$.fragment),T(t,"title","Wählt den Wert aus"),T(t,"class","svelte-1m010ne")},m(e,i){I(e,t,i),ge(n,t,null),o=!0},p(e,t){const o={};1&t[0]&&(o.checked=e[0].includes(e[35])),n.$set(o)},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n)}}}function _n(e){let t,n,o=!e[1]&&In(e);return{c(){o&&o.c(),t=q()},m(e,i){o&&o.m(e,i),I(e,t,i),n=!0},p(e,n){e[1]?o&&(ae(),ue(o,1,1,(()=>{o=null})),ce()):o?(o.p(e,n),2&n[0]&&de(o,1)):(o=In(e),o.c(),de(o,1),o.m(t.parentNode,t))},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&_(t)}}}function Nn(e){let t,n,o=(e[3][e[37]]?e[3][e[37]][e[40]]:e[35])+"";return{c(){t=j("td"),n=F(o),T(t,"class","svelte-1m010ne")},m(e,o){I(e,t,o),k(t,n)},p(e,t){8&t[0]&&o!==(o=(e[3][e[37]]?e[3][e[37]][e[40]]:e[35])+"")&&D(n,o)},d(e){e&&_(t)}}}function jn(e){let t,n,o=e[15](e[35],e[2]),i=o&&kn(e);return{c(){i&&i.c(),t=q()},m(e,o){i&&i.m(e,o),I(e,t,o),n=!0},p(e,n){4&n[0]&&(o=e[15](e[35],e[2])),o?i?(i.p(e,n),4&n[0]&&de(i,1)):(i=kn(e),i.c(),de(i,1),i.m(t.parentNode,t)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce())},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){i&&i.d(e),e&&_(t)}}}function Sn(e){let t,n;return t=new e[5]({}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:$,i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Fn(e){let t,n,o,i;t=new e[9]({});let l={ctx:e,current:null,token:null,hasCatch:!1,pending:Sn,then:gn,catch:hn,value:34,blocks:[,,,]};return me(e[13](),l),{c(){he(t.$$.fragment),n=C(),o=q(),l.block.c()},m(e,r){ge(t,e,r),I(e,n,r),I(e,o,r),l.block.m(e,l.anchor=r),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(t,n){fe(l,e=t,n)},i(e){i||(de(t.$$.fragment,e),de(l.block),i=!0)},o(e){ue(t.$$.fragment,e);for(let e=0;e<3;e+=1){ue(l.blocks[e])}i=!1},d(e){ve(t,e),e&&_(n),e&&_(o),l.block.d(e),l.token=null,l=null}}}function Cn(e){let t,n;return t=new e[7]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Fn]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};15&n[0]|4096&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function qn(e,n,o){const i=R(),{Loading:l,TextField:r,Dialog:s,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=n,{id:f}=n,{selection:p}=n,{tableName:$}=n,{idName:h}=n,{target:g}=n,{view:v}=n,{unique:b}=n,{uniqueView:w}=n,{status:y}=n,{single:x}=n;p||=[];let k="",I=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",_=[];const N=$+h+g+"checkbox",j=(e,t)=>e>t?1:t>e?-1:0;return e.$$set=e=>{"classId"in e&&o(20,m=e.classId),"id"in e&&o(21,f=e.id),"selection"in e&&o(0,p=e.selection),"tableName"in e&&o(22,$=e.tableName),"idName"in e&&o(23,h=e.idName),"target"in e&&o(24,g=e.target),"view"in e&&o(25,v=e.view),"unique"in e&&o(26,b=e.unique),"uniqueView"in e&&o(27,w=e.uniqueView),"status"in e&&o(28,y=e.status),"single"in e&&o(1,x=e.single)},[p,x,k,_,i,l,r,s,a,d,u,I,N,async()=>{let e,n,i=[];if(o(3,_=[]),h)if(v){const o=m.split("-")[1].slice(0,-4),i="input."+m+"[name='_id']",l=document.querySelector(i).value;n={[h]:f},y&&(n.$or=[{status:!0},{[o]:l}]),e=await t.getSectionView($,n),e=e.sort(((e,t)=>{const n=e=>(e[o]||"z").toString()+e[g];return j(n(e),n(t))}))}else w?(n={[h]:f,status:!0},Object.entries(w).map((([e,t])=>{t?.length&&(n[e]={$in:t}),i.push(e)})),e=await t.getSectionView($,n),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[g])?"0-":"1-")+e[g];return j(n(e),n(t))})),o(3,_=e.map((e=>{const t=[e[g]];return i.map((n=>t.push(e[n]))),t})))):b?(e=await t.getSection($,h,f,b),e=e.sort(((e,t)=>j(e,t)))):(e=await t.getSection($,h,f),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[g])?"0-":"1-")+e[g];return j(n(e),n(t))})));else n={_id:f},e=await t.getSectionView($,n);const l=[];e.map((e=>l.push(e[g]||[])));const r=await t.getSchemaByClass($),s=r.items.find((e=>e.name===g))?.designation;return i=i.map((e=>r.items.find((t=>t.name===e))?.designation)),{list:l.flat(),items:[s,...i]}},({detail:{value:e}})=>{o(2,k=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{o(2,k="")},e=>()=>{const t=document.getElementsByName(N),n=[];t.forEach(((t,o)=>{t.checked&&n.push(e[+t.attributes.data.value])})),i("choose",{list:n})},e=>()=>{document.getElementsByName(N).forEach(((e,t)=>{e.checked=!e.checked}))},e=>t=>{console.log("click",t),"TD"===t.target?.nodeName&&(x?i("choose",{list:[].concat(e)}):(o(0,p=p.includes(e)?p.filter((t=>t!==e)):p.concat(e)),i("choose",{list:p})))},m,f,$,h,g,v,b,w,y,()=>i("back"),function(e){k=e,o(2,k)}]}class Ln extends we{constructor(e){var t;super(),un.getElementById("svelte-1m010ne-style")||((t=j("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}",k(un.head,t)),be(this,e,qn,Cn,w,{classId:20,id:21,selection:0,tableName:22,idName:23,target:24,view:25,unique:26,uniqueView:27,status:28,single:1},[-1,-1])}}const{document:En}=pe;function zn(e){let t,n,o,i,l,r=e[7].length+"";return{c(){t=j("span"),n=F("("),o=F(r),i=F(")"),T(t,"class",l=x(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,l){I(e,t,l),k(t,n),k(t,o),k(t,i)},p(e,n){128&n[0]&&r!==(r=e[7].length+"")&&D(o,r),2&n[0]&&l!==(l=x(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&T(t,"class",l)},d(e){e&&_(t)}}}function Tn(e){let t;return{c(){t=j("div"),T(t,"class","load-more-options"),T(t,"slot","load-more-options-message slot")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Dn(e){let t,n,o,i;const l=[Mn,Bn,On],r=[];function s(e,t){return!e[16].single&&e[7].length?0:e[17]?1:e[14]&&e[16].view?2:-1}return~(t=s(e))&&(n=r[t]=l[t](e)),{c(){n&&n.c(),o=q()},m(e,n){~t&&r[t].m(e,n),I(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?~t&&r[t].p(e,i):(n&&(ae(),ue(r[a],1,1,(()=>{r[a]=null})),ce()),~t?(n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),de(n,1),n.m(o.parentNode,o)):n=null)},i(e){i||(de(n),i=!0)},o(e){ue(n),i=!1},d(e){~t&&r[t].d(e),e&&_(o)}}}function On(e){let t,n,o,i,l;return n=new ke({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"title","Übernehmen"),T(t,"class","feather pointer svelte-1rbaejz")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=L(t,"click",e[25]),i=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,l()}}}function Bn(e){let t,n,o,i,l;return n=new Fe({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"title",e[17].title||"Generieren"),T(t,"class","feather pointer svelte-1rbaejz")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=L(t,"click",e[24]),i=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,l()}}}function Mn(e){let t,n,o,i,l;return n=new Te({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"title","Löschen"),T(t,"class","feather pointer svelte-1rbaejz")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=L(t,"click",e[26]),i=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,l()}}}function Vn(e){let t,n,o;function i(t){e[33](t)}let l={class:"tModal",noClickaway:!0,$$slots:{default:[An]},$$scope:{ctx:e}};return void 0!==e[10]&&(l.open=e[10]),t=new e[11]({props:l}),G.push((()=>$e(t,"open",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};53&o[0]|1024&o[1]&&(i.$$scope={dirty:o,ctx:e}),!n&&1024&o[0]&&(n=!0,i.open=e[10],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function An(e){let t,n;return t=new Ln({props:{classId:e[2],selection:e[0],view:e[15],status:e[18],unique:e[16].unique&&e[4].name,uniqueView:e[16].view&&{[e[16].view]:e[5][e[16].view]},id:e[5][e[20]||e[19]],tableName:e[19],idName:e[20],target:e[4].name,single:e[16].single}}),t.$on("choose",e[23]),t.$on("back",e[22]),{c(){he(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[20]||e[19]]),16&n[0]&&(o.target=e[4].name),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Wn(e){let t,n,o,i,l,r,s,a,c,d=!e[16].single&&e[7].length&&zn(e);function u(t){e[31](t)}function m(t){e[32](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:Pn,minSearchLength:"3",$$slots:{"load-more-options-message slot":[Tn]},$$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}),G.push((()=>$e(o,"selection",u))),G.push((()=>$e(o,"maxOptions",m))),o.$on("change",e[21]);let p=!e[1]&&Dn(e),$=e[10]&&Vn(e);return{c(){t=j("div"),d&&d.c(),n=C(),he(o.$$.fragment),r=C(),p&&p.c(),s=C(),$&&$.c(),a=q(),B(t,"position","relative")},m(e,i){I(e,t,i),d&&d.m(t,null),k(t,n),ge(o,t,null),k(t,r),p&&p.m(t,null),I(e,s,i),$&&$.m(e,i),I(e,a,i),c=!0},p(e,r){!e[16].single&&e[7].length?d?d.p(e,r):(d=zn(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const s={};8&r[0]&&(s.id=e[3]),8&r[0]&&(s.name=e[3]),8&r[0]&&(s.class=e[3]),2&r[0]&&(s.disabled=e[1]),64&r[0]&&(s.required=e[6]),256&r[0]&&(s.placeholder=e[8]),1024&r[1]&&(s.$$scope={dirty:r,ctx:e}),!i&&128&r[0]&&(i=!0,s.selection=e[7],te((()=>i=!1))),!l&&512&r[0]&&(l=!0,s.maxOptions=e[9],te((()=>l=!1))),o.$set(s),e[1]?p&&(ae(),ue(p,1,1,(()=>{p=null})),ce()):p?(p.p(e,r),2&r[0]&&de(p,1)):(p=Dn(e),p.c(),de(p,1),p.m(t,null)),e[10]?$?($.p(e,r),1024&r[0]&&de($,1)):($=Vn(e),$.c(),de($,1),$.m(a.parentNode,a)):$&&(ae(),ue($,1,1,(()=>{$=null})),ce())},i(e){c||(de(o.$$.fragment,e),de(p),de($),c=!0)},o(e){ue(o.$$.fragment,e),ue(p),ue($),c=!1},d(e){e&&_(t),d&&d.d(),ve(o),p&&p.d(),e&&_(s),$&&$.d(e),e&&_(a)}}}async function*Pn(e){yield[{name:e}]}function Rn(e,n,o){const i=R(),{Modal:l,Autocomplete:r}=c;let{classId:s}=n,{id:a}=n,{item:d}=n,{record:u}=n,{value:m}=n,{noForm:f=!1}=n,{disabled:p}=n,{formnovalidate:$}=n,{numberInput:h}=n,{praefix:g}=n;const{properties:v={}}=d;let{placeholder:b,hint:w,readonly:y,required:x=!1,lookup:k="",view:I=!1,multi:_,max:N=1e3,generate:j=!1,status:S=!0}=v;const[F,C]=k.split(":");let q=!1,L=m.map&&m.map((e=>({name:e})))||[];p||=y,p&&(b="");P((async()=>{const e=document.getElementById(a);e.classList.add(s),!y&&k&&e.addEventListener("focus",E)}));const E=()=>{if(k){document.getElementById(a).blur(),(_.unique||L.length<N)&&o(10,q=!0)}},z=()=>{o(10,q&&=!1)},T=({detail:e})=>{o(7,L=e.list.map((e=>({name:e})))),i("blur",{value:e.list}),i("multi",{view:_.view,lookup:k,value:e.list}),z()},D=async()=>{const e={[C]:u[C]},n=await t.getSectionView(F,e),o=Array.from({length:n.length},((e,t)=>n[t][d.name]));T({detail:{list:o}})},O=(e=!1)=>{if(p||!_.required)return;const t=_.maxItem;if(!t||_.unique)return;o(9,N=!1!==e?e:u[t]||0);const n=L.length!=N,l=document.getElementById(a);l?.classList?.toggle("invalid",n),i("invalid",{idx:g,value:n})};return e.$$set=e=>{"classId"in e&&o(2,s=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(27,f=e.noForm),"disabled"in e&&o(1,p=e.disabled),"formnovalidate"in e&&o(28,$=e.formnovalidate),"numberInput"in e&&o(29,h=e.numberInput),"praefix"in e&&o(30,g=e.praefix)},e.$$.update=()=>{128&e.$$.dirty[0]&&L&&(o(0,m=L.map&&L.map((e=>e.name))||[]),O()),536870912&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:o}=e;void 0!==g&&g!==o||t&&t.name===_.maxItem&&O(n)})(h),268435520&e.$$.dirty[0]&&o(6,x=x&&!$)},[m,p,s,a,d,u,x,L,b,N,q,l,r,y,k,I,_,j,S,F,C,({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()})))),i("blur",{value:L.map((e=>e.name))}),i("multi",{view:_.view,lookup:k,value:L.map((e=>e.name))})},z,T,()=>{const e=u[j.itemQuantity];if(!e)return;const t=j.prefix||"",n=u[j.variable]||"",o=j.len||5,i=Array.from({length:e},((e,i)=>t+n+"-"+i.toString().padStart(o,"0")));T({detail:{list:i}})},async()=>{if(!0===I)return D();const e=u[_.maxItem];if(!e)return;const n={[C]:u[C],status:!0},o=[].concat(u[_.view]||[]);o.length&&(n[_.view]={$in:o});const i=await t.getSectionView(F,n),l=Array.from({length:e<i.length?e:i.length},((e,t)=>i[t][d.name]));T({detail:{list:l}})},()=>{T({detail:{list:[]}})},f,$,h,g,function(e){L=e,o(7,L)},function(e){N=e,o(9,N)},function(e){q=e,o(10,q)}]}class Hn extends we{constructor(e){var t;super(),En.getElementById("svelte-1rbaejz-style")||((t=j("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}",k(En.head,t)),be(this,e,Rn,Wn,w,{classId:2,id:3,item:4,record:5,value:0,noForm:27,disabled:1,formnovalidate:28,numberInput:29,praefix:30},[-1,-1])}}const{document:Yn}=pe;function Gn(e){e[26]=e[28].list,e[27]=e[28].items}function Jn(e,t,n){const o=e.slice();return o[29]=t[n],o}function Un(e,t,n){const o=e.slice();return o[32]=t[n],o}function Zn(e,t,n){const o=e.slice();return o[32]=t[n],o}function Qn(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Kn(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g,v;function b(t){e[23](t)}Gn(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Xn]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),r=new e[6]({props:w}),G.push((()=>$e(r,"value",b))),r.$on("input",e[12]),d=new Te({props:{size:"18"}});let y=e[27]?.length&&function(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=eo(Zn(e,o,t));return{c(){t=j("thead"),n=j("tr");for(let e=0;e<i.length;e+=1)i[e].c();T(n,"class","svelte-14hcfjl"),T(t,"class","svelte-14hcfjl")},m(e,o){I(e,t,o),k(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let l;for(o=e[27],l=0;l<o.length;l+=1){const r=Zn(e,o,l);i[l]?i[l].p(r,t):(i[l]=eo(r),i[l].c(),i[l].m(n,null))}for(;l<i.length;l+=1)i[l].d(1);i.length=o.length}},d(e){e&&_(t),N(i,e)}}}(e),x=e[26]?.length&&function(e){let t,n=e[26],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=q()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);I(e,t,n)},p(e,i){if(11779&i[0]){let l;for(n=e[26],l=0;l<n.length;l+=1){const r=Jn(e,n,l);o[l]?o[l].p(r,i):(o[l]=oo(r),o[l].c(),o[l].m(t.parentNode,t))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(e){N(o,e),e&&_(t)}}}(e);return{c(){t=j("div"),he(n.$$.fragment),o=C(),i=j("div"),l=F("Suchen: "),he(r.$$.fragment),a=C(),c=j("span"),he(d.$$.fragment),u=C(),m=j("div"),f=j("table"),y&&y.c(),p=C(),$=j("tbody"),x&&x.c(),T(t,"class","form--buttons svelte-14hcfjl"),T(c,"class","feather pointer svelte-14hcfjl"),B(i,"margin-bottom","1em"),B(i,"position","relative"),T(f,"striped",""),T(f,"class","svelte-14hcfjl"),T(m,"class","eList svelte-14hcfjl")},m(s,b){I(s,t,b),ge(n,t,null),I(s,o,b),I(s,i,b),k(i,l),ge(r,i,null),k(i,a),k(i,c),ge(d,c,null),I(s,u,b),I(s,m,b),k(m,f),y&&y.m(f,null),k(f,p),k(f,$),x&&x.m($,null),h=!0,g||(v=L(c,"click",e[14]),g=!0)},p(e,t){Gn(e);const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};!s&&2&t[0]&&(s=!0,i.value=e[1],te((()=>s=!1))),r.$set(i),e[27]?.length&&y.p(e,t),e[26]?.length&&x.p(e,t)},i(e){h||(de(n.$$.fragment,e),de(r.$$.fragment,e),de(d.$$.fragment,e),h=!0)},o(e){ue(n.$$.fragment,e),ue(r.$$.fragment,e),ue(d.$$.fragment,e),h=!1},d(e){e&&_(t),ve(n),e&&_(o),e&&_(i),ve(r),ve(d),e&&_(u),e&&_(m),y&&y.d(),x&&x.d(),g=!1,v()}}}function Xn(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function eo(e){let t,n,o=e[32]?.designation+"";return{c(){t=j("th"),n=F(o),T(t,"class","svelte-14hcfjl")},m(e,o){I(e,t,o),k(t,n)},p:$,d(e){e&&_(t)}}}function to(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=no(Un(e,o,t));return{c(){t=j("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=C(),T(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[29]._id===e[0])},m(e,o){I(e,t,o);for(let e=0;e<i.length;e+=1)i[e].m(t,null);k(t,n)},p(e,l){if(3584&l[0]){let r;for(o=e[27],r=0;r<o.length;r+=1){const s=Un(e,o,r);i[r]?i[r].p(s,l):(i[r]=no(s),i[r].c(),i[r].m(t,n))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}2049&l[0]&&M(t,"active",e[29]._id===e[0])},d(e){e&&_(t),N(i,e)}}}function no(e){let t,n,o,i,l=e[9](e[29],e[32])+"";return{c(){t=j("td"),n=F(l),T(t,"class","svelte-14hcfjl")},m(l,r){I(l,t,r),k(t,n),o||(i=L(t,"click",z(e[10](e[29]))),o=!0)},p(t,n){e=t},d(e){e&&_(t),o=!1,i()}}}function oo(e){let t,n=e[13](e[29],e[27],e[1]),o=n&&to(e);return{c(){o&&o.c(),t=q()},m(e,n){o&&o.m(e,n),I(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[29],e[27],e[1])),n?o?o.p(e,i):(o=to(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&_(t)}}}function io(e){let t,n;return t=new e[5]({}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:$,i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function lo(e){let t,n,o,i;t=new e[4]({});let l={ctx:e,current:null,token:null,hasCatch:!1,pending:io,then:Kn,catch:Qn,value:28,blocks:[,,,]};return me(e[11](),l),{c(){he(t.$$.fragment),n=C(),o=q(),l.block.c()},m(e,r){ge(t,e,r),I(e,n,r),I(e,o,r),l.block.m(e,l.anchor=r),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(t,n){fe(l,e=t,n)},i(e){i||(de(t.$$.fragment,e),de(l.block),i=!0)},o(e){ue(t.$$.fragment,e);for(let e=0;e<3;e+=1){ue(l.blocks[e])}i=!1},d(e){ve(t,e),e&&_(n),e&&_(o),l.block.d(e),l.token=null,l=null}}}function ro(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[lo]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};3&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function so(e,o,i){const l=R(),{Dialog:r,Divider:s,Loading:a,TextField:d,Button:m}=c;let{item:p}=o,{className:$}=o,{classId:h}=o,{rowId:g}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:w}=o,{filter:y}=o,x="",k=h+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?f(n):u(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass($);P((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&Ll(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(15,p=e.item),"className"in e&&i(16,$=e.className),"classId"in e&&i(17,h=e.classId),"rowId"in e&&i(0,g=e.rowId),"viewName"in e&&i(18,v=e.viewName),"viewValue"in e&&i(19,b=e.viewValue),"recordId"in e&&i(20,w=e.recordId),"filter"in e&&i(21,y=e.filter)},[g,x,l,r,s,a,d,m,k,I,e=>()=>l("choose",{row:e}),async()=>{const e=await _,n="."+h+"#"+v;document.querySelector(n);let o={[v]:b},i=[];o[v]&&(i=await t.getSectionView(e.class,o,!0)),y&&(i=i.filter((e=>e._id!=y)));let l=[],r=e.display;return r&&r.length?r.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))),l.find((e=>e?.name===n))||l.push(r)})):l=e.items,{list:i,items:l}},({detail:{value:e}})=>{i(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(I(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,x="")},p,$,h,v,b,w,y,()=>l("back"),function(e){x=e,i(1,x)}]}class ao extends we{constructor(e){var t;super(),Yn.getElementById("svelte-14hcfjl-style")||((t=j("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}",k(Yn.head,t)),be(this,e,so,ro,w,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function co(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function uo(e){let t,n,o,i,l;function r(t){e[21](t)}let s={id:e[2],name:e[3].name,inputClass:e[5]||e[1],disabled:e[6],formnovalidate:e[7],readonly:e[13],pattern:e[12],required:e[14],style:"padding-left:2em;"};void 0!==e[0]&&(s.value=e[0]),n=new e[10]({props:s}),G.push((()=>$e(n,"value",r)));let a=!e[6]&&mo(e);return{c(){t=j("div"),he(n.$$.fragment),i=C(),a&&a.c(),B(t,"position","relative")},m(e,o){I(e,t,o),ge(n,t,null),k(t,i),a&&a.m(t,null),l=!0},p(e,i){const l={};4&i&&(l.id=e[2]),8&i&&(l.name=e[3].name),34&i&&(l.inputClass=e[5]||e[1]),64&i&&(l.disabled=e[6]),128&i&&(l.formnovalidate=e[7]),!o&&1&i&&(o=!0,l.value=e[0],te((()=>o=!1))),n.$set(l),e[6]?a&&(ae(),ue(a,1,1,(()=>{a=null})),ce()):a?(a.p(e,i),64&i&&de(a,1)):(a=mo(e),a.c(),de(a,1),a.m(t,null))},i(e){l||(de(n.$$.fragment,e),de(a),l=!0)},o(e){ue(n.$$.fragment,e),ue(a),l=!1},d(e){e&&_(t),ve(n),a&&a.d()}}}function mo(e){let t,n,o,i,l;return n=new Ae({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"class","feather pointer svelte-wbrqzu")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=L(t,"click",e[17]),i=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,l()}}}function fo(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function po(e){let t,n,o;function i(t){e[22](t)}let l={class:"tModal",noClickaway:!0,$$slots:{default:[$o]},$$scope:{ctx:e}};return void 0!==e[8]&&(l.open=e[8]),t=new e[11]({props:l}),G.push((()=>$e(t,"open",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};268435994&o&&(i.$$scope={dirty:o,ctx:e}),!n&&256&o&&(n=!0,i.open=e[8],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function $o(e){let t,n;return t=new ao({props:{item:e[3],className:e[3].refClass,classId:e[1],rowId:"",recordId:e[4]._id,viewName:e[15].selection,viewValue:e[9],filter:e[4]._id}}),t.$on("choose",e[18]),t.$on("back",e[19]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.item=e[3]),8&n&&(o.className=e[3].refClass),2&n&&(o.classId=e[1]),16&n&&(o.recordId=e[4]._id),512&n&&(o.viewValue=e[9]),16&n&&(o.filter=e[4]._id),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ho(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:fo,then:uo,catch:co,value:27,blocks:[,,,]};me(e[16](),i);let l=e[8]&&po(e);return{c(){i.block.c(),t=C(),l&&l.c(),n=q()},m(e,r){i.block.m(e,i.anchor=r),i.mount=()=>t.parentNode,i.anchor=t,I(e,t,r),l&&l.m(e,r),I(e,n,r),o=!0},p(t,[o]){fe(i,e=t,o),e[8]?l?(l.p(e,o),256&o&&de(l,1)):(l=po(e),l.c(),de(l,1),l.m(n.parentNode,n)):l&&(ae(),ue(l,1,1,(()=>{l=null})),ce())},i(e){o||(de(i.block),de(l),o=!0)},o(e){for(let e=0;e<3;e+=1){ue(i.blocks[e])}ue(l),o=!1},d(e){i.block.d(e),i.token=null,i=null,e&&_(t),l&&l.d(e),e&&_(n)}}}function go(e,t,n){const{TextField:o,Modal:i}=c;let{classId:l}=t,{id:r}=t,{item:s}=t,{record:a}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:m}=t,{formnovalidate:f}=t,{praefix:p}=t;const{properties:$={}}=s;let h,{pattern:g,placeholder:v,readonly:b,required:w=!1,view:y}=$,x=!1;const k=()=>{n(8,x=!1)};return e.$$set=e=>{"classId"in e&&n(1,l=e.classId),"id"in e&&n(2,r=e.id),"item"in e&&n(3,s=e.item),"record"in e&&n(4,a=e.record),"value"in e&&n(0,d=e.value),"noForm"in e&&n(5,u=e.noForm),"disabled"in e&&n(6,m=e.disabled),"formnovalidate"in e&&n(7,f=e.formnovalidate),"praefix"in e&&n(20,p=e.praefix)},[d,l,r,s,a,u,m,f,x,h,o,i,g,b,w,y,async()=>(n(9,h=a[y.selection]),!0),()=>{n(8,x=!0)},({detail:e})=>{n(0,d=e.row[y.value?y.value:"_id"]),k()},k,p,function(e){d=e,n(0,d)},function(e){x=e,n(8,x)}]}class vo extends we{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=j("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",k(document.head,t)),be(this,e,go,ho,w,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function bo(e,t,n){const o=e.slice();return o[10]=t[n],o}function wo(e){let t,n,o,i=e[10]+"";return{c(){t=j("option"),n=F(i),t.__value=e[10],t.value=t.__value,t.selected=o=e[1]===e[10],T(t,"class","svelte-5xpzvo")},m(e,o){I(e,t,o),k(t,n)},p(e,n){2&n&&o!==(o=e[1]===e[10])&&(t.selected=o)},d(e){e&&_(t)}}}function yo(e){let t,n,o,i,l,r=e[4],s=[];for(let t=0;t<r.length;t+=1)s[t]=wo(bo(e,r,t));return{c(){t=j("select"),n=j("option");for(let e=0;e<s.length;e+=1)s[e].c();n.__value="",n.value=n.__value,T(n,"class","svelte-5xpzvo"),T(t,"class",o=x(e[2]||e[3])+" svelte-5xpzvo"),T(t,"id",e[0]),T(t,"name",e[0]),T(t,"readonly",e[5])},m(o,r){I(o,t,r),k(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);i||(l=L(t,"change",e[6]),i=!0)},p(e,[n]){if(18&n){let o;for(r=e[4],o=0;o<r.length;o+=1){const i=bo(e,r,o);s[o]?s[o].p(i,n):(s[o]=wo(i),s[o].c(),s[o].m(t,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=r.length}12&n&&o!==(o=x(e[2]||e[3])+" svelte-5xpzvo")&&T(t,"class",o),1&n&&T(t,"id",e[0]),1&n&&T(t,"name",e[0])},i:$,o:$,d(e){e&&_(t),N(s,e),i=!1,l()}}}function xo(e,t,n){const o=R();let{id:i}=t,{item:l}=t,{value:r}=t,{noForm:s=!1}=t,{classId:a}=t,{disabled:c}=t;const{enum:d}=l.properties,u=c||l.properties.readonly;return e.$$set=e=>{"id"in e&&n(0,i=e.id),"item"in e&&n(7,l=e.item),"value"in e&&n(1,r=e.value),"noForm"in e&&n(2,s=e.noForm),"classId"in e&&n(3,a=e.classId),"disabled"in e&&n(8,c=e.disabled)},[i,r,s,a,d,u,e=>o("blur",{value:e.srcElement.value}),l,c]}class ko extends we{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=j("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo.svelte-5xpzvo{padding:0 0.625em 0.0625em;box-sizing:border-box;width:100%;border:0 solid rgba(0, 0, 0, 0.42);border-bottom-width:0px;border-bottom-width:0.0625em;border-top-left-radius:0.375em;border-top-right-radius:0.375em;background-color:#f5f5f5;outline:none;font-size:1rem;font-weight:300;height:2.8em}select.svelte-5xpzvo.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}select[readonly].svelte-5xpzvo option.svelte-5xpzvo{display:none}",k(document.head,t)),be(this,e,xo,yo,w,{id:0,item:7,value:1,noForm:2,classId:3,disabled:8})}}const Io=/\d+/g,_o=/%[HMSpPdmyY%]/g;function No(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let i=!1;if(""===e)return null;const l=t.split(_o);let r=0,s=0;const a=new Date(0);for(const c of l){if(!e.startsWith(c,r))return n;if(r+=c.length,r===e.length){if(s!==t.length)return n;break}if("%"!==t[s+c.length])break;if(s+=c.length+1,"%"===t[s]){if("%"!==e[r])return n;r++}else if("p"===t[s].toLowerCase()){const t=e.substr(r,2).toUpperCase();if("AM"===t)i=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;i=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{Io.lastIndex=r;const l=Io.exec(e);if(null==l)return n;switch(t[s]){case"H":a.setHours(parseInt(l[0])+12*i);break;case"M":a.setMinutes(l[0]);break;case"S":a.setSeconds(l[0]);break;case"d":a.setDate(l[0]);break;case"m":a.setMonth(l[0]-1);break;case"y":a.setFullYear(100*o+parseInt(l[0]));break;case"Y":a.setFullYear(l[0])}r+=l[0].length}s++}return isNaN(a.valueOf())?n:a}function jo(e){let t;return{c(){t=F("Stunden")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function So(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[jo]},$$scope:{ctx:e}}}),{c(){he(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||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Fo(e){let t;return{c(){t=F("Minuten")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Co(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Fo]},$$scope:{ctx:e}}}),{c(){he(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||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function qo(e){let t;return{c(){t=F("Jetzt")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Lo(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[qo]},$$scope:{ctx:e}}}),{c(){he(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||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Eo(e){let t,n,o,i,l,r,s,a,c;return i=new e[5]({props:{value:e[0],closeOnSelection:!0}}),i.$on("change",e[8]),r=new e[6]({props:{value:e[0],$$slots:{"now-label":[Lo],"minutes-label":[Co],"hours-label":[So]},$$scope:{ctx:e}}}),r.$on("change",e[7]),{c(){t=j("input"),o=C(),he(i.$$.fragment),l=C(),he(r.$$.fragment),T(t,"type","string"),T(t,"class",n=e[2]||e[3]),T(t,"id",e[1]),T(t,"name",e[1]),t.hidden=!0},m(n,d){I(n,t,d),O(t,e[0]),I(n,o,d),ge(i,n,d),I(n,l,d),ge(r,n,d),s=!0,a||(c=L(t,"input",e[9]),a=!0)},p(e,[o]){(!s||12&o&&n!==(n=e[2]||e[3]))&&T(t,"class",n),(!s||2&o)&&T(t,"id",e[1]),(!s||2&o)&&T(t,"name",e[1]),1&o&&O(t,e[0]);const l={};1&o&&(l.value=e[0]),i.$set(l);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),r.$set(a)},i(e){s||(de(i.$$.fragment,e),de(r.$$.fragment,e),s=!0)},o(e){ue(i.$$.fragment,e),ue(r.$$.fragment,e),s=!1},d(e){e&&_(t),e&&_(o),ve(i,e),e&&_(l),ve(r,e),a=!1,c()}}}function zo(e,t,n){const o=R(),{Label:i,DatePicker:l,TimePicker:r}=c;let{value:s}=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,s=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)},[s,a,d,u,i,l,r,({detail:e})=>{var t,o;n(0,(t=e.value,o=s,s=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(s)},({detail:e})=>{var t,o;n(0,(t=e.value,o=s,s=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(s)},function(){s=this.value,n(0,s)}]}class To extends we{constructor(e){super(),be(this,e,zo,Eo,w,{value:0,id:1,noForm:2,classId:3})}}function Do(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:Oo,placeholder:Bo,readonly:e[4],disabled:e[5]}}),n.$on("change",e[7]),{c(){t=j("div"),he(n.$$.fragment),B(t,"max-width","4em")},m(e,i){I(e,t,i),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||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n)}}}const Oo="([01][0-9]|2[0-3]):([0-5][0-9])",Bo="";function Mo(e,t,n){const o=R(),{TextField:i}=c;let{id:l}=t,{item:r}=t,{value:s}=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,l=e.id),"item"in e&&n(8,r=e.item),"value"in e&&n(1,s=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)},[l,s,a,d,u,m,i,({detail:e})=>{o("blur",{value:p(e.value)}),o("checkRange",{idx:f,fieldId:l,value:e.value})},r,f]}class Vo extends we{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=j("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",k(document.head,t)),be(this,e,Mo,Do,w,{id:0,item:8,value:1,noForm:2,classId:3,readonly:4,disabled:5,praefix:9})}}function Ao(e){let t,n;return t=new e[19]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[14],pattern:e[22],required:e[2],id:e[24],name:e[23],value:e[16]()}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.value=e[16]()),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Wo(e){let t,n;return t=new e[19]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[14],required:e[2],type:"email",id:e[24],name:e[23],value:e[16]()}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.value=e[16]()),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Po(e){let t,n;return t=new Vo({props:{inputClass:e[4]||e[5],disabled:e[7],readonly:e[14],required:e[2],id:e[24],item:e[1],value:e[16](),praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("checkRange",e[34]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ro(e){let t,n;return t=new To({props:{classId:e[5],id:e[24],disabled:e[7],required:e[2],value:e[25](),noForm:e[4]}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ho(e){let t,n;return t=new e[20]({props:{inputClass:e[4]||e[5],required:e[2],disabled:e[7],id:e[24],name:e[23],value:e[25](),closeOnSelection:!0}}),t.$on("change",e[26](!0)),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Yo(e){let t,n;return t=new e[21]({props:{round:!0,inputClass:e[4]||e[5],disabled:e[7]||e[14],required:e[2],id:e[24],name:e[23],checked:e[16]()}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),16512&n[0]&&(o.disabled=e[7]||e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.checked=e[16]()),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Go(e){let t,n;return t=new vo({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],record:e[0],value:e[16](),noForm:e[4],view:e[1].properties.view,praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("invalid",e[33]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.view=e[1].properties.view),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Jo(e){let t,n;return t=new Hn({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],record:e[0],value:e[16](),noForm:e[4],multi:e[1].properties.multi,numberInput:e[11],praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("invalid",e[32]),t.$on("multi",e[27]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.multi=e[1].properties.multi),2048&n[0]&&(o.numberInput=e[11]),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Uo(e){let t,n;return t=new ko({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Zo(e){let t,n;return t=new dn({props:{classId:e[5],disabled:e[7],formnovalidate:e[9],required:e[2],readonly:e[14],id:e[24],item:e[1],value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),4&n[0]&&(o.required=e[2]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Qo(e){let t,n;return t=new o({props:{classId:e[5],disabled:e[7],readonly:e[14],id:e[24],name:e[1].name,value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.name=e[1].name),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ko(e){let t,n;return t=new sn({props:{classId:e[5],eventId:e[6],required:e[2],disabled:e[7],formnovalidate:e[9],readonly:e[14],id:e[24],item:e[1],desc:e[17],value:e[16](),noForm:e[4],praefix:e[3],selectionFields:e[8],selection:e[10],deList:e[12],recordId:e[0]._id,isTemplate:e[13]}}),t.$on("task",e[31]),t.$on("change",e[26]()),t.$on("initFail",e[28]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),64&n[0]&&(o.eventId=e[6]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.item=e[1]),131072&n[0]&&(o.desc=e[17]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),8&n[0]&&(o.praefix=e[3]),256&n[0]&&(o.selectionFields=e[8]),1024&n[0]&&(o.selection=e[10]),4096&n[0]&&(o.deList=e[12]),1&n[0]&&(o.recordId=e[0]._id),8192&n[0]&&(o.isTemplate=e[13]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Xo(e){let t,n,o,i;const l=[Ko,Qo,Zo,Uo,Jo,Go,Yo,Ho,Ro,Po,Wo,Ao],r=[];function s(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:e[1].properties&&e[1].properties.view?5:"boolean"===e[1].type?6:"date"===e[1].type?7:"datetime"===e[1].type?8:"time"===e[1].properties?.format?9:"email"===e[1].type?10:11}return t=s(e),n=r[t]=l[t](e),{c(){n.c(),o=q()},m(e,n){r[t].m(e,n),I(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?r[t].p(e,i):(ae(),ue(r[a],1,1,(()=>{r[a]=null})),ce(),n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),de(n,1),n.m(o.parentNode,o))},i(e){i||(de(n),i=!0)},o(e){ue(n),i=!1},d(e){r[t].d(e),e&&_(o)}}}function ei(e){let t,n;return t=new e[18]({props:{id:e[29](e[24]),class:e[1].name+(e[15]?" hidden ":""),name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[Xo]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32770&n[0]&&(o.class=e[1].name+(e[15]?" hidden ":"")),2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),229375&n[0]|1024&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ti(e,t,n){let o,i,l;const r=R(),{FormField:s,TextField:a,DatePicker:d,TimePicker:m,Checkbox:f}=c;let{praefix:p=""}=t,{item:$}=t,{listName:h=""}=t,{record:g}=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:_}=t,{deList:N}=t,{required:j}=t,{isTemplate:S}=t,{required:F,readonly:C,hidden:q,pattern:L}=$.properties||{};if(q=!0===q,void 0!==C&&(C=!0===C),void 0===j&&(j=F),"string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const E=(h?h+".":"")+$.name,z=E+(""!==p?"-"+p:""),T=(e,t=E)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(3,p=e.praefix),"item"in e&&n(1,$=e.item),"listName"in e&&n(30,h=e.listName),"record"in e&&n(0,g=e.record),"noForm"in e&&n(4,v=e.noForm),"classId"in e&&n(5,b=e.classId),"eventId"in e&&n(6,w=e.eventId),"disabled"in e&&n(7,y=e.disabled),"selectionFields"in e&&n(8,x=e.selectionFields),"formnovalidate"in e&&n(9,k=e.formnovalidate),"selection"in e&&n(10,I=e.selection),"numberInput"in e&&n(11,_=e.numberInput),"deList"in e&&n(12,N=e.deList),"required"in e&&n(2,j=e.required),"isTemplate"in e&&n(13,S=e.isTemplate)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(16,o=(e=E)=>{let t=T(g);return void 0===t?"":t}),1&e.$$.dirty[0]&&(l=T(g))},n(17,i=((e=E)=>{let t=g["_"+e];return t=u(t),void 0===t?"":t})()),[g,$,j,p,v,b,w,y,x,k,I,_,N,S,C,q,o,i,s,a,d,f,L,E,z,(e=E)=>{let t=T(g);return t?new Date(t):new Date},e=>({detail:t})=>{let{value:o,checked:i}=t;void 0!==i&&(o=i),n(0,g[E]=e?function(e,t){if(null==e)return null;let n=e.getHours();return/%p/i.test(t)&&(n%=12,0===n&&(n=12)),t.replace("%Y",e.getFullYear()).replace("%y",(e.getFullYear()%100).toString().padStart(2,"0")).replace("%m",(e.getMonth()+1).toString().padStart(2,"0")).replace("%d",e.getDate().toString().padStart(2,"0")).replace("%H",n.toString().padStart(2,"0")).replace("%M",e.getMinutes().toString().padStart(2,"0")).replace("%S",e.getSeconds().toString().padStart(2,"0")).replace("%p",e.getHours()<12?"am":"pm").replace("%P",e.getHours()<12?"AM":"PM").replace("%%","%")}(o,"%d.%m.%Y"):o,g);const s=Object.values(g).every((e=>!e))&&o;r("notify",{oldValue:l,value:o,add:s,itemName:E,desc:t.description})},({detail:e})=>{r("multi",e)},()=>n(15,q=!0),()=>"object"===$.type?"comment_"+z:z,h,function(t){H(e,t)},function(t){H(e,t)},function(t){H(e,t)},function(t){H(e,t)}]}class ni extends we{constructor(e){var t;super(),document.getElementById("svelte-mea5fj-style")||((t=j("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}",k(document.head,t)),be(this,e,ti,ei,w,{praefix:3,item:1,listName:30,record:0,noForm:4,classId:5,eventId:6,disabled:7,selectionFields:8,formnovalidate:9,selection:10,numberInput:11,deList:12,required:2,isTemplate:13},[-1,-1])}}const{document:oi}=pe;function ii(e,t,n){const o=e.slice();return o[69]=t[n],o[71]=n,o}function li(e,t,n){const o=e.slice();return o[78]=t[n],o}function ri(e,t,n){const o=e.slice();return o[73]=t[n].title,o[74]=t[n].toDelete,o[75]=t[n].icon,o}function si(e){let t,n;return t=new e[13]({props:{name:"Total Wochen",nameClass:"formField_italic",$$slots:{default:[ai]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};64&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ai(e){let t,n,o;function i(t){e[40](t)}let l={item:e[23],disabled:!0};return void 0!==e[6]&&(l.value=e[6]),t=new dn({props:l}),G.push((()=>$e(t,"value",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};!n&&64&o[0]&&(n=!0,i.value=e[6],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function ci(e){let t,n;return t=new e[13]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[di]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};512&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function di(e){let t,n,o;function i(t){e[41](t)}let l={item:e[21],disabled:!0};return void 0!==e[9]&&(l.value=e[9]),t=new dn({props:l}),G.push((()=>$e(t,"value",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};!n&&512&o[0]&&(n=!0,i.value=e[9],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function ui(e){let t,n;return t=new e[13]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[mi]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function mi(e){let t,n,o;function i(t){e[42](t)}let l={item:e[19],disabled:!0};return void 0!==e[5]&&(l.value=e[5]),t=new dn({props:l}),G.push((()=>$e(t,"value",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};!n&&32&o[0]&&(n=!0,i.value=e[5],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function fi(e){let t,n;return t=new e[16]({props:{class:e[10][e[71]],$$slots:{handle:[yi,({toggle:e})=>({72:e}),({toggle:e})=>[0,0,e?1024:0]],default:[gi,({toggle:e})=>({72:e}),({toggle:e})=>[0,0,e?1024:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){b(e[68])&&e[68].apply(this,arguments)})),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const i={};1024&o[0]&&(i.class=e[10][e[71]]),6543&o[0]|525312&o[2]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function pi(e){let t,n;return t=new ni({props:{praefix:e[71],item:e[78],eventId:e[3],record:e[69],noForm:Ni,classId:e[2],disabled:e[0],required:e[17],selectionFields:e[24],numberInput:e[12],formnovalidate:e[71]===e[7].length-1||e[7][e[71]]._delete}}),t.$on("notify",(function(){b(e[26](e[78],e[71]))&&e[26](e[78],e[71]).apply(this,arguments)})),t.$on("task",e[43]),t.$on("invalid",e[27]),t.$on("checkRange",e[28]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const i={};2&o[0]&&(i.item=e[78]),8&o[0]&&(i.eventId=e[3]),128&o[0]&&(i.record=e[69]),4&o[0]&&(i.classId=e[2]),1&o[0]&&(i.disabled=e[0]),4096&o[0]&&(i.numberInput=e[12]),128&o[0]&&(i.formnovalidate=e[71]===e[7].length-1||e[7][e[71]]._delete),t.$set(i)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function $i(e){let t,n,o=e[1].item,i=[];for(let t=0;t<o.length;t+=1)i[t]=pi(li(e,o,t));const l=e=>ue(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=q()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(486674575&n[0]){let r;for(o=e[1].item,r=0;r<o.length;r+=1){const l=li(e,o,r);i[r]?(i[r].p(l,n),de(i[r],1)):(i[r]=pi(l),i[r].c(),de(i[r],1),i[r].m(t.parentNode,t))}for(ae(),r=o.length;r<i.length;r+=1)l(r);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ue(i[e]);n=!1},d(e){N(i,e),e&&_(t)}}}function hi(e){let t,n,o=e[7][e[71]]._delete,i=$i(e);return{c(){i.c(),t=q()},m(e,o){i.m(e,o),I(e,t,o),n=!0},p(e,n){128&n[0]&&w(o,o=e[7][e[71]]._delete)?(ae(),ue(i,1,1,$),ce(),i=$i(e),i.c(),de(i),i.m(t.parentNode,t)):i.p(e,n)},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){e&&_(t),i.d(e)}}}function gi(e){let t,n,o,i,l=e[7].length,r=hi(e);return{c(){t=j("div"),r.c(),o=C(),T(t,"id",n=`accordion-content-${e[2]}-${e[1].name}-${e[71]}`)},m(e,n){I(e,t,n),r.m(t,null),I(e,o,n),i=!0},p(e,o){128&o[0]&&w(l,l=e[7].length)?(ae(),ue(r,1,1,$),ce(),r=hi(e),r.c(),de(r),r.m(t,null)):r.p(e,o),(!i||6&o[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}-${e[71]}`))&&T(t,"id",n)},i(e){i||(de(r),i=!0)},o(e){ue(r),i=!1},d(e){e&&_(t),r.d(e),e&&_(o)}}}function vi(e){let t,n,o,i,l,r=e[25](e[8],e[71])+"";return{c(){t=j("div"),n=F(r),T(t,"class",o=x("draggableListItem "+e[1].name)+" svelte-1es1ap1"),T(t,"draggable",!0),M(t,"delete",e[69]._delete),M(t,"is-active-top",e[11]?.top===e[71]),M(t,"is-active-bottom",e[11]?.bottom===e[71])},m(o,r){I(o,t,r),k(t,n),i||(l=[L(t,"dragover",e[34]),L(t,"dragleave",e[35](e[71])),L(t,"dragstart",e[32](e[71])),L(t,"drop",E(e[31](e[71]))),L(t,"dragenter",e[33](e[71]))],i=!0)},p(i,l){e=i,256&l[0]&&r!==(r=e[25](e[8],e[71])+"")&&D(n,r),2&l[0]&&o!==(o=x("draggableListItem "+e[1].name)+" svelte-1es1ap1")&&T(t,"class",o),130&l[0]&&M(t,"delete",e[69]._delete),2050&l[0]&&M(t,"is-active-top",e[11]?.top===e[71]),2050&l[0]&&M(t,"is-active-bottom",e[11]?.bottom===e[71])},d(e){e&&_(t),i=!1,v(l)}}}function bi(e){let t,n,o;var i=e[75];return i&&(t=new i({props:{size:"20"}})),{c(){t&&he(t.$$.fragment),n=q()},m(e,i){t&&ge(t,e,i),I(e,n,i),o=!0},p(e,o){if(i!==(i=e[75])){if(t){ae();const e=t;ue(e.$$.fragment,1,0,(()=>{ve(e,1)})),ce()}i?(t=new i({props:{size:"20"}}),he(t.$$.fragment),de(t.$$.fragment,1),ge(t,n.parentNode,n)):t=null}},i(e){o||(t&&de(t.$$.fragment,e),o=!0)},o(e){t&&ue(t.$$.fragment,e),o=!1},d(e){e&&_(n),t&&ve(t,e)}}}function wi(e){let t,n,o,i,l,r=!e[0]&&bi(e);return{c(){t=j("span"),r&&r.c(),T(t,"class","pointer icon svelte-1es1ap1"),T(t,"title",e[73]),t.hidden=n=e[71]===e[7].length-1||!(e[69]._delete^e[74])},m(n,s){I(n,t,s),r&&r.m(t,null),o=!0,i||(l=L(t,"click",e[30](e[71])),i=!0)},p(i,l){(e=i)[0]?r&&(ae(),ue(r,1,1,(()=>{r=null})),ce()):r?(r.p(e,l),1&l[0]&&de(r,1)):(r=bi(e),r.c(),de(r,1),r.m(t,null)),(!o||128&l[0]&&n!==(n=e[71]===e[7].length-1||!(e[69]._delete^e[74])))&&(t.hidden=n)},i(e){o||(de(r),o=!0)},o(e){ue(r),o=!1},d(e){e&&_(t),r&&r.d(),i=!1,l()}}}function yi(e){let t,n,o,i,l,r;n=new e[14]({props:{$$slots:{default:[vi]},$$scope:{ctx:e}}}),n.$on("click",(function(){b(e[29](e[72],e[71]))&&e[29](e[72],e[71]).apply(this,arguments)}));let s=[{title:"löschen",toDelete:!0,icon:Te},{title:"undo",toDelete:!1,icon:Le}],a=[];for(let t=0;t<2;t+=1)a[t]=wi(ri(e,s,t));const c=e=>ue(a[e],1,1,(()=>{a[e]=null}));return{c(){t=j("div"),he(n.$$.fragment),o=C();for(let e=0;e<2;e+=1)a[e].c();i=C(),T(t,"class",l=x("accordion "+e[1].name)+" svelte-1es1ap1"),T(t,"slot","handle")},m(e,l){I(e,t,l),ge(n,t,null),k(t,o);for(let e=0;e<2;e+=1)a[e].m(t,null);k(t,i),r=!0},p(o,d){e=o;const u={};if(2434&d[0]|524288&d[2]&&(u.$$scope={dirty:d,ctx:e}),n.$set(u),1073741953&d[0]){let n;for(s=[{title:"löschen",toDelete:!0,icon:Te},{title:"undo",toDelete:!1,icon:Le}],n=0;n<2;n+=1){const o=ri(e,s,n);a[n]?(a[n].p(o,d),de(a[n],1)):(a[n]=wi(o),a[n].c(),de(a[n],1),a[n].m(t,i))}for(ae(),n=2;n<2;n+=1)c(n);ce()}(!r||2&d[0]&&l!==(l=x("accordion "+e[1].name)+" svelte-1es1ap1"))&&T(t,"class",l)},i(e){if(!r){de(n.$$.fragment,e);for(let e=0;e<2;e+=1)de(a[e]);r=!0}},o(e){ue(n.$$.fragment,e),a=a.filter(Boolean);for(let e=0;e<2;e+=1)ue(a[e]);r=!1},d(e){e&&_(t),ve(n),N(a,e)}}}function xi(e){let t,n,o=(!e[4]&&!e[0]||e[71]<e[7].length-1)&&fi(e);return{c(){o&&o.c(),t=q()},m(e,i){o&&o.m(e,i),I(e,t,i),n=!0},p(e,n){!e[4]&&!e[0]||e[71]<e[7].length-1?o?(o.p(e,n),145&n[0]&&de(o,1)):(o=fi(e),o.c(),de(o,1),o.m(t.parentNode,t)):o&&(ae(),ue(o,1,1,(()=>{o=null})),ce())},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&_(t)}}}function ki(e){let t,n,o=e[7],i=[];for(let t=0;t<o.length;t+=1)i[t]=xi(ii(e,o,t));const l=e=>ue(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=q()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(2130845087&n[0]|31&n[1]|1088&n[2]){let r;for(o=e[7],r=0;r<o.length;r+=1){const l=ii(e,o,r);i[r]?(i[r].p(l,n),de(i[r],1)):(i[r]=xi(l),i[r].c(),de(i[r],1),i[r].m(t.parentNode,t))}for(ae(),r=o.length;r<i.length;r+=1)l(r);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ue(i[e]);n=!1},d(e){N(i,e),e&&_(t)}}}function Ii(e){let t,n,o,i,l,r,s=e[22]&&0!=e[6]&&si(e),a=e[20]&&0!=e[9]&&ci(e),c=e[18]&&0!=e[5]&&ui(e);return l=new e[15]({props:{$$slots:{default:[ki,({closeOtherPanels:e})=>({68:e}),({closeOtherPanels:e})=>[0,0,e?64:0]]},$$scope:{ctx:e}}}),{c(){t=j("div"),s&&s.c(),n=C(),a&&a.c(),o=C(),c&&c.c(),i=C(),he(l.$$.fragment),T(t,"class","formList")},m(e,d){I(e,t,d),s&&s.m(t,null),k(t,n),a&&a.m(t,null),k(t,o),c&&c.m(t,null),k(t,i),ge(l,t,null),r=!0},p(e,r){e[22]&&0!=e[6]?s?(s.p(e,r),64&r[0]&&de(s,1)):(s=si(e),s.c(),de(s,1),s.m(t,n)):s&&(ae(),ue(s,1,1,(()=>{s=null})),ce()),e[20]&&0!=e[9]?a?(a.p(e,r),512&r[0]&&de(a,1)):(a=ci(e),a.c(),de(a,1),a.m(t,o)):a&&(ae(),ue(a,1,1,(()=>{a=null})),ce()),e[18]&&0!=e[5]?c?(c.p(e,r),32&r[0]&&de(c,1)):(c=ui(e),c.c(),de(c,1),c.m(t,i)):c&&(ae(),ue(c,1,1,(()=>{c=null})),ce());const d={};7583&r[0]|524352&r[2]&&(d.$$scope={dirty:r,ctx:e}),l.$set(d)},i(e){r||(de(s),de(a),de(c),de(l.$$.fragment,e),r=!0)},o(e){ue(s),ue(a),ue(c),ue(l.$$.fragment,e),r=!1},d(e){e&&_(t),s&&s.d(),a&&a.d(),c&&c.d(),ve(l)}}}let _i=new Map;const Ni=!0,ji="pos/target";function Si(e,t,n){let o,i;const{FormField:l,TextField:r,Button:s,Accordion:a,AccordionSection:d,Divider:p}=c,$=R();let{list:h}=t,{schema:g}=t,{record:v}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{fixed:x}=t,{template:k={}}=t;const I=g.find((e=>"price"===e.name&&!e.properties?.hidden)),_=I&&g.find((e=>"quantity"===e.name));let N=0;const j=g.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let S=0;const F=g.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name||"",C=!!F;let q=0;const L={};let E=g.properties?.readonly,z=b.split("form-")[1].slice(0,-4);y||=E;let T,D,O=[],B=[],M=!1,V={},A=[];g.filter((e=>e.selection)).map((e=>O.push({className:z,parentClass:g,refClass:e.selection,value:""})));["readonly","hidden","required"].map((e=>{g.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"";let[o,i]=n.split(".");i||(i=o,o=void 0),A.push({action:e,itemName:t.name,refObj:o,refName:i,op:t.properties[e].invert?"!":""})}))}));const W=async(e,t)=>{const o=A.filter((e=>(e.refObj||z)===t));if(o?.length)for(const t of o){const{action:o,itemName:i,refObj:l,refName:r,op:s}=t;let a,c,d=!1,u=!1;if(l){const t=T[e][l];l===z&&r?d=v:t&&(d=await ql(l,t))}!l&&r&&(d=T[e]),d&&(u=d[r],"!"===s&&(u=!u)),"required"!==o&&"readonly"!==o||(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${i} .field textarea`,c=document.querySelector(a),c||(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${i} .field input`,c=document.querySelector(a)),c&&u&&c.setAttribute(o,"true"),c&&!u&&c.removeAttribute(o)),"hidden"===o&&(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${i}`,c=document.querySelector(a),c?.classList?.toggle("hidden",u),u&&n(7,T[e][i]="",T))}},P=(e,t)=>{let o=`#accordion-content-${b}-${h.name}-${e} .form-field .field :required:not(:disabled)`;const i=document.querySelectorAll(o);let l=!1;i.forEach((e=>{""===e.value&&(l=!0)})),void 0===t&&(o=`#accordion-content-${b}-${h.name}-${e} :not(.form-field.hidden) .field input.invalid`,document.querySelector(o)&&(t=!0)),n(10,B[e]=l||t?"invalid":"",B)},Y=e=>{if(!e)return 0;const[t,n=0]=e.split(":");return 60*t+parseInt(n)},G=(e,t)=>{if(!t)return;const o=g.find((e=>e.name===t)),i=o.properties.value.formula,{operator:l,argument:r}=i,s=r.map((t=>T[e][t.refItem]));let a=0;"$add"===l&&(a=s.reduce(((e,t)=>e+ +t))),"$subtract"===l&&(a=s.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[i,l]=t.split(":");return i?e-=l?(+i+ +l/60).toFixed(2):+i:0}))),n(7,T[e][t]=(a||0).toFixed(o.properties.decimals||0),T),n(12,V={item:o,value:a,idx:e})};D=g.filter((e=>e.refClass)).reduce((async(e,t)=>{e=await e;const n=g.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,o]=t.selection.split(":"),[i]=o.split(".");i&&e.push({refClass:i,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 J=async(e,t,o,i)=>{const l=(await D).find((e=>e.refClass===t.refClass));if(!l)return;const{refClass:r,items:s,selection:a}=l,c=t.name,d=A.find((e=>e.itemName===c));if(d){await W(e,d.refObj);const t=`#accordion-content-${b}-${h.name}-${e} .form-field.${r}.hidden`;if(document.querySelector(t))return}return o?Promise.all(s.map((l=>{let c="";const{refInput:d}=t;if(d&&T[e]){const[t,n]=d.split(".");c=n?T[e][n]:v[t]}if(a&&o!==i)s.map((t=>{n(7,T[e][t]="",T)}));else if(d&&!c||U(e,l)){const o=g.find((e=>e.refClass===r)),i=T[e][o.name];if(t.selection){const o=Cl(t.selection+i.toString());if(o)return Promise.resolve(o).then((t=>n(7,T[e][l]=t[l],T)))}return Promise.resolve(ql(o.refClass,i)).then((t=>n(7,T[e][l]=t[l],T)))}}))):Promise.resolve(s.map((t=>{n(7,T[e][t]="",T)})))},U=(e,t)=>{let n=T[e][t];return"number"===g.find((e=>e.name===t)).type&&(n=Number(n||0)),!n},Z=e=>!(!x&&e>=T.length-1),Q=(e,t=!1)=>{const[n,o]=e.split(";");return h.name===o&&(!!Z(t)&&((!1===t||t!=n)&&parseInt(n)))};return g.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=g.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))})),e.$$set=e=>{"list"in e&&n(1,h=e.list),"schema"in e&&n(36,g=e.schema),"record"in e&&n(37,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),"template"in e&&n(38,k=e.template)},e.$$.update=()=>{2&e.$$.dirty[0]|64&e.$$.dirty[1]&&v&&n(7,T=(v[h.name]||[]).concat({})),128&e.$$.dirty[0]&&n(8,o=T),482&e.$$.dirty[0]&&o&&((()=>{if(j)n(9,S=T?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(C)n(6,q=T?.reduce(((e,t)=>e+(t._delete?0:+(t[F]||0))),0)||0)})(),(()=>{if(I)n(5,N=T?.reduce(((e,t)=>{if(t.price){const n=(_?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),$("save",{listName:h.name,value:T,amountValue:N,weeksValue:q})),256&e.$$.dirty[1]&&(i=e=>L[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[y,h,b,w,x,N,q,T,o,S,B,M,V,l,s,a,d,undefined,I,{name:"amountValue",properties:{decimals:2}},j,{name:"hoursValue",properties:{decimals:2}},C,{name:"weeksValue",properties:{decimals:1}},O,(e,t)=>{const n=e[t];return n&&g.filter((e=>!0!==e.properties?.hidden&&void 0!==n[e.name]&&"textarea"!==e.properties?.format)).map((e=>""===n[e.name]?"":"object"===e.type?i(n[e.name]):"boolean"===e.type?f(n[e.name]):"date"===e.type?u(n[e.name]):"datetime"===e.type?m(n[e.name]):e.properties?.multi?"":n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>async({detail:i})=>{const{oldValue:l,value:r,add:s,desc:a}=i;await W(t,e.name),G(t,e._formulaActor);const c=O?.find((t=>t.refClass.split(":")[1].split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,r)),r&&T.length===t+1&&n(7,T=T.concat({})),a&&n(39,L[r]=a,L),await J(t,e,r,l),n(8,o=T),"number"===e.type&&n(12,V={item:e,value:r,idx:t}),P(t)},({detail:e})=>{const{idx:t,value:n}=e;P(t,n)},({detail:e})=>{const{idx:t,fieldId:n,value:o}=e;if(!o)return;const i=Y(o);let l=!1;T.forEach(((e,n)=>{if(t===n)return;const{start:o,end:r}=T[n];o&&r&&i>Y(o)&&i<Y(r)&&(l=!0)}));const r=document.getElementById(n);r?.classList?.toggle("invalid",l)},(e,t)=>o=>{const{detail:i}=o;e(o);const{target:l}=i,r=l?.closest("li");if(r?.classList.contains("open"))return;(e=>{const t=k[h.name]||{};for(const o in t)k[h.name][o]&&!T[e][o]&&n(7,T[e][o]=k[h.name][o],T)})(t);const s=`#accordion-content-${b}-${h.name}-${t} > div.form-field:not(.hidden)`,a=document.querySelectorAll(s);if(!a?.length)return;const c=a[a.length-1];X().then((()=>c.scrollIntoView({behavior:"smooth",block:"end"})))},e=>()=>{n(7,T[e]._delete=!T[e]._delete,T)},e=>t=>{t.preventDefault(),n(11,M=!1);const o=Q(t.dataTransfer.getData(ji),e);if(!1===o)return;t.dataTransfer.dropEffect="move";const i=[...T].map(((e,t)=>(e._index=t,e)));o<e?(i.splice(e+1,0,i[o]),i.splice(o,1)):(i.splice(e,0,i[o]),i.splice(o+1,1)),i.map(((e,t)=>{return n=e._index,o=t,void _i.set(o,n);var n,o}));let l=[];B.map(((e,t)=>{l[t]=B[(e=>{const t=_i.get(e);return void 0===t?e:t})(t)]})),n(10,B=l),n(7,T=i.map(((e,t)=>(delete e._index,e))))},e=>t=>{if(!Z(e))return!1;t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move",t.dataTransfer.setData(ji,e+";"+h.name)},e=>t=>{const o=Q(t.dataTransfer.getData(ji),e);return!1===o||o===e?n(11,M=!1):void n(11,M={top:o>e&&e,bottom:o<e&&e})},e=>e.preventDefault(),e=>e=>{n(11,M=!1)},g,v,k,L,function(e){q=e,n(6,q)},function(e){S=e,n(9,S)},function(e){N=e,n(5,N)},function(t){H(e,t)}]}class Fi extends we{constructor(e){var t;super(),oi.getElementById("svelte-1es1ap1-style")||((t=j("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}",k(oi.head,t)),be(this,e,Si,Ii,w,{list:1,schema:36,record:37,classId:2,eventId:3,disabled:0,fixed:4,template:38},[-1,-1,-1])}}const{document:Ci}=pe;function qi(e,t,n){const o=e.slice();return o[17]=t[n],o}function Li(e,t,n){const o=e.slice();return o[20]=t[n],o}function Ei(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function zi(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p=e[0].items,$=[];for(let t=0;t<p.length;t+=1)$[t]=Di(Li(e,p,t));const h=e=>ue($[e],1,1,(()=>{$[e]=null}));let g=e[0].list&&Oi(e);return a=new e[5]({props:{outline:!0,$$slots:{default:[Mi]},$$scope:{ctx:e}}}),a.$on("click",e[9]),d=new e[5]({props:{disabled:e[2],class:"close",form:e[6],filled:!0,type:"submit",$$slots:{default:[Vi]},$$scope:{ctx:e}}}),{c(){t=j("form"),n=j("input"),i=C();for(let e=0;e<$.length;e+=1)$[e].c();l=C(),g&&g.c(),r=C(),s=j("div"),he(a.$$.fragment),c=C(),he(d.$$.fragment),T(n,"class",x(e[6])+" svelte-1phofh5"),T(n,"name","_id"),T(n,"type","hidden"),n.value=o=e[1]._id||"",T(t,"class","fTask svelte-1phofh5"),T(t,"id",e[6]),T(s,"class","form--buttons svelte-1phofh5")},m(o,p){I(o,t,p),k(t,n),k(t,i);for(let e=0;e<$.length;e+=1)$[e].m(t,null);k(t,l),g&&g.m(t,null),I(o,r,p),I(o,s,p),ge(a,s,null),k(s,c),ge(d,s,null),u=!0,m||(f=[L(t,"keydown",e[8]),L(t,"submit",E(e[10]))],m=!0)},p(e,i){if((!u||2&i&&o!==(o=e[1]._id||""))&&(n.value=o),75&i){let n;for(p=e[0].items,n=0;n<p.length;n+=1){const o=Li(e,p,n);$[n]?($[n].p(o,i),de($[n],1)):($[n]=Di(o),$[n].c(),de($[n],1),$[n].m(t,l))}for(ae(),n=p.length;n<$.length;n+=1)h(n);ce()}e[0].list?g?(g.p(e,i),1&i&&de(g,1)):(g=Oi(e),g.c(),de(g,1),g.m(t,null)):g&&(ae(),ue(g,1,1,(()=>{g=null})),ce());const r={};8388608&i&&(r.$$scope={dirty:i,ctx:e}),a.$set(r);const s={};4&i&&(s.disabled=e[2]),8388608&i&&(s.$$scope={dirty:i,ctx:e}),d.$set(s)},i(e){if(!u){for(let e=0;e<p.length;e+=1)de($[e]);de(g),de(a.$$.fragment,e),de(d.$$.fragment,e),u=!0}},o(e){$=$.filter(Boolean);for(let e=0;e<$.length;e+=1)ue($[e]);ue(g),ue(a.$$.fragment,e),ue(d.$$.fragment,e),u=!1},d(e){e&&_(t),N($,e),g&&g.d(),e&&_(r),e&&_(s),ve(a),ve(d),m=!1,v(f)}}}function Ti(e){let t,n;return t=new ni({props:{classId:e[6],item:e[20],selection:e[20].selection,record:e[1],disabled:e[3],eventId:e[0].id,required:!1,isTemplate:!0}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n&&(o.item=e[20]),1&n&&(o.selection=e[20].selection),2&n&&(o.record=e[1]),8&n&&(o.disabled=e[3]),1&n&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Di(e){let t,n,o=Pi(!0,e[20]),i=o&&Ti(e);return{c(){i&&i.c(),t=q()},m(e,o){i&&i.m(e,o),I(e,t,o),n=!0},p(e,n){1&n&&(o=Pi(!0,e[20])),o?i?(i.p(e,n),1&n&&de(i,1)):(i=Ti(e),i.c(),de(i,1),i.m(t.parentNode,t)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce())},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){i&&i.d(e),e&&_(t)}}}function Oi(e){let t,n,o=e[0].list,i=[];for(let t=0;t<o.length;t+=1)i[t]=Bi(qi(e,o,t));const l=e=>ue(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=q()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(75&n){let r;for(o=e[0].list,r=0;r<o.length;r+=1){const l=qi(e,o,r);i[r]?(i[r].p(l,n),de(i[r],1)):(i[r]=Bi(l),i[r].c(),de(i[r],1),i[r].m(t.parentNode,t))}for(ae(),r=o.length;r<i.length;r+=1)l(r);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ue(i[e]);n=!1},d(e){N(i,e),e&&_(t)}}}function Bi(e){let t,n,o,i;return t=new e[4]({props:{text:e[17].designation}}),o=new tl({props:{classId:e[6],list:e[17],eventId:e[0].id,schema:e[17].item,record:e[1],disabled:e[3],required:!1,open:!0,isTemplate:!0}}),{c(){he(t.$$.fragment),n=C(),he(o.$$.fragment)},m(e,l){ge(t,e,l),I(e,n,l),ge(o,e,l),i=!0},p(e,n){const i={};1&n&&(i.text=e[17].designation),t.$set(i);const l={};1&n&&(l.list=e[17]),1&n&&(l.eventId=e[0].id),1&n&&(l.schema=e[17].item),2&n&&(l.record=e[1]),8&n&&(l.disabled=e[3]),o.$set(l)},i(e){i||(de(t.$$.fragment,e),de(o.$$.fragment,e),i=!0)},o(e){ue(t.$$.fragment,e),ue(o.$$.fragment,e),i=!1},d(e){ve(t,e),e&&_(n),ve(o,e)}}}function Mi(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Vi(e){let t;return{c(){t=F("Speichern")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Ai(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Wi(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Ai,then:zi,catch:Ei,value:16,blocks:[,,,]};return me(e[7](),i),{c(){t=C(),n=j("section"),i.block.c(),Ci.title="Vorgaben",T(n,"class","sTask svelte-1phofh5")},m(e,l){I(e,t,l),I(e,n,l),i.block.m(n,i.anchor=null),i.mount=()=>n,i.anchor=null,o=!0},p(t,[n]){fe(i,e=t,n)},i(e){o||(de(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ue(i.blocks[e])}o=!1},d(e){e&&_(t),e&&_(n),i.block.d(),i.token=null,i=null}}}const Pi=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function Ri(e,n,o){let a,d,u;y(e,r,(e=>o(11,d=e))),y(e,s,(e=>o(12,u=e)));const{Divider:m,Button:f,FormField:p}=c,$=JSON.parse(i.getItem("Locale"));let{schema:h}=n,{record:g}=n,v="template-"+h.class+Math.floor(9e3*Math.random()+1e3).toString(),b=!1;const w=()=>window.history.back(),x=(e,t,n=!1)=>{const o=t.id,i=e.find((e=>e.name===o));let l=t.value;if(!n&&i&&i.properties?.multi&&(l=g[o]),l&&i&&i.type.startsWith("date"))try{return No(l,"%d.%m.%Y").toISOString()}catch{return new Date(l).toISOString()}if(i&&"boolean"===i.type&&(l=!!t.checked),i&&"number"===i.type){const e=Number("1.1").toLocaleString($.id).substring(1,2);try{l=Number(l.replace(e,".")).toString()}catch{}}return l};return e.$$set=e=>{"schema"in e&&o(0,h=e.schema),"record"in e&&o(1,g=e.record)},e.$$.update=()=>{4&e.$$.dirty&&o(3,a=b)},[h,g,b,a,m,f,v,async()=>{const e=await t.getEvent(h.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&o(2,b=!0),d.role?.length&&h.authorization?.length){const e=h.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));o(2,b||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},w,async e=>{const n={};Array.from(document.querySelectorAll("form#"+v+" ."+v)).map((e=>{const t=e.id||e.name;if(t)if(t.includes(".")){const[o,i]=t.split("."),l=h.list.find((e=>e.name===o));n[t]=x(l.item,e)}else n[t]=x(h.items,e)})),await t.saveTemplate(h.class,n),l.success("Die Vorgaben wurden gespeichert.",2e3),w()}]}const{document:Hi}=pe;function Yi(e,t,n){const o=e.slice();return o[22]=t[n],o}function Gi(e){let t,n;return t=new ni({props:{classId:e[2],item:e[22],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4],required:e[5]}}),t.$on("notify",e[13]),t.$on("task",e[17]),{c(){he(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[22]),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]),32&n&&(o.required=e[5]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ji(e){let t,n,o=Pi(e[7],e[22]),i=o&&Gi(e);return{c(){i&&i.c(),t=q()},m(e,o){i&&i.m(e,o),I(e,t,o),n=!0},p(e,n){130&n&&(o=Pi(e[7],e[22])),o?i?(i.p(e,n),130&n&&de(i,1)):(i=Gi(e),i.c(),de(i,1),i.m(t.parentNode,t)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce())},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){i&&i.d(e),e&&_(t)}}}function Ui(e){let t,n,o,i=e[1].item,l=[];for(let t=0;t<i.length;t+=1)l[t]=Ji(Yi(e,i,t));const r=e=>ue(l[e],1,1,(()=>{l[e]=null}));return{c(){t=j("div");for(let e=0;e<l.length;e+=1)l[e].c();T(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){I(e,t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);o=!0},p(e,s){if(8383&s){let n;for(i=e[1].item,n=0;n<i.length;n+=1){const o=Yi(e,i,n);l[n]?(l[n].p(o,s),de(l[n],1)):(l[n]=Ji(o),l[n].c(),de(l[n],1),l[n].m(t,null))}for(ae(),n=i.length;n<l.length;n+=1)r(n);ce()}(!o||6&s&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&T(t,"id",n)},i(e){if(!o){for(let e=0;e<i.length;e+=1)de(l[e]);o=!0}},o(e){l=l.filter(Boolean);for(let e=0;e<l.length;e+=1)ue(l[e]);o=!1},d(e){e&&_(t),N(l,e)}}}function Zi(e){let t,n,o=e[12](e[8])+"";return{c(){t=j("span"),n=F(o)},m(e,o){I(e,t,o),k(t,n)},p(e,t){256&t&&o!==(o=e[12](e[8])+"")&&D(n,o)},d(e){e&&_(t)}}}function Qi(e){let t,n,o;return n=new e[9]({props:{$$slots:{default:[Zi]},$$scope:{ctx:e}}}),n.$on("click",(function(){b(e[14](e[21]))&&e[14](e[21]).apply(this,arguments)})),{c(){t=j("div"),he(n.$$.fragment),T(t,"class","accordion svelte-148ktt9"),T(t,"slot","handle")},m(e,i){I(e,t,i),ge(n,t,null),o=!0},p(t,o){e=t;const i={};33554688&o&&(i.$$scope={dirty:o,ctx:e}),n.$set(i)},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n)}}}function Ki(e){let t,n;return t=new e[11]({props:{open:e[6],$$slots:{handle:[Qi,({toggle:e})=>({21:e}),({toggle:e})=>e?2097152:0],default:[Ui,({toggle:e})=>({21:e}),({toggle:e})=>e?2097152:0]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.open=e[6]),35652031&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Xi(e){let t,n,o;return n=new e[10]({props:{$$slots:{default:[Ki]},$$scope:{ctx:e}}}),{c(){t=j("div"),he(n.$$.fragment),T(t,"class","formList")},m(e,i){I(e,t,i),ge(n,t,null),o=!0},p(e,[t]){const o={};33554943&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n)}}}function el(e,t,n){const{Button:o,Accordion:i,AccordionSection:l}=c;let{list:r}=t,{schema:s}=t,{record:a}=t,{classId:d}=t,{eventId:p}=t,{disabled:$}=t,{required:h}=t,{open:g=!1}=t,{template:v={}}=t,{isTemplate:b=!1}=t;const w={};let y=a[r.name]||{};a[r.name]=y;const x=e=>w[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,r=e.list),"schema"in e&&n(15,s=e.schema),"record"in e&&n(0,a=e.record),"classId"in e&&n(2,d=e.classId),"eventId"in e&&n(3,p=e.eventId),"disabled"in e&&n(4,$=e.disabled),"required"in e&&n(5,h=e.required),"open"in e&&n(6,g=e.open),"template"in e&&n(16,v=e.template),"isTemplate"in e&&n(7,b=e.isTemplate)},[a,r,d,p,$,h,g,b,y,o,i,l,e=>s.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?x(t.name):"boolean"===t.type?f(e[t.name]):"date"===t.type?u(e[t.name]):"datetime"===t.type?m(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&(w[o]=e.desc);const i=a[t];n(0,a[t]={...i,[o]:e.value},a),n(8,y=a[t])},e=>t=>{(()=>{const e=v[r.name]||{};for(const t in e)v[r.name][t]&&!a[r.name][t]&&n(0,a[r.name][t]=v[r.name][t],a)})(),e(t);const o=`#accordion-content-${d}-${r.name} > div.form-field:last-child`,i=document.querySelector(o);X().then((()=>i.scrollIntoView({behavior:"smooth",block:"end"})))},s,v,function(t){H(e,t)}]}class tl extends we{constructor(e){var t;super(),Hi.getElementById("svelte-148ktt9-style")||((t=j("style")).id="svelte-148ktt9-style",t.textContent=".accordion.svelte-148ktt9{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}",k(Hi.head,t)),be(this,e,el,Xi,w,{list:1,schema:15,record:0,classId:2,eventId:3,disabled:4,required:5,open:6,template:16,isTemplate:7})}}const{Boolean:nl,document:ol}=pe;function il(e,t,n){const o=e.slice();return o[81]=t[n],o}function ll(e,t,n){const o=e.slice();return o[84]=t[n],o}function rl(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function sl(e){let t,n,o=e[80]&&function(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g=e[0].items,b=[];for(let t=0;t<g.length;t+=1)b[t]=cl(ll(e,g,t));const w=e=>ue(b[e],1,1,(()=>{b[e]=null}));let y=e[0].list&&dl(e);m=new e[10]({props:{outline:!0,$$slots:{default:[vl]},$$scope:{ctx:e}}}),m.$on("click",e[25]);let S=e[22]&&function(e){let t,n,o,i;t=new e[10]({props:{class:"close",disabled:e[7],form:e[14],filled:!0,type:"submit",$$slots:{default:[bl]},$$scope:{ctx:e}}});let l=e[1]&&!e[7]&&wl(e);return{c(){he(t.$$.fragment),n=C(),l&&l.c(),o=q()},m(e,r){ge(t,e,r),I(e,n,r),l&&l.m(e,r),I(e,o,r),i=!0},p(e,n){const i={};128&n[0]&&(i.disabled=e[7]),33554432&n[2]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i),e[1]&&!e[7]?l?(l.p(e,n),130&n[0]&&de(l,1)):(l=wl(e),l.c(),de(l,1),l.m(o.parentNode,o)):l&&(ae(),ue(l,1,1,(()=>{l=null})),ce())},i(e){i||(de(t.$$.fragment,e),de(l),i=!0)},o(e){ue(t.$$.fragment,e),ue(l),i=!1},d(e){ve(t,e),e&&_(n),l&&l.d(e),e&&_(o)}}}(e);return{c(){t=j("section"),n=j("form"),o=j("input"),l=C();for(let e=0;e<b.length;e+=1)b[e].c();r=C(),y&&y.c(),s=C(),a=j("div"),c=j("small"),c.textContent=`${zl}`,d=C(),u=j("div"),he(m.$$.fragment),f=C(),S&&S.c(),T(o,"class",x(e[14])+" svelte-1dh1s6w"),T(o,"name","_id"),T(o,"type","hidden"),o.value=i=e[2]._id||"",T(n,"class",x(e[15])+" svelte-1dh1s6w"),T(n,"id",e[14]),T(a,"class","comment svelte-1dh1s6w"),T(u,"class","form--buttons svelte-1dh1s6w"),T(t,"class",x(e[16])+" svelte-1dh1s6w")},m(i,g){I(i,t,g),k(t,n),k(n,o),k(n,l);for(let e=0;e<b.length;e+=1)b[e].m(n,null);k(n,r),y&&y.m(n,null),k(t,s),k(t,a),k(a,c),k(t,d),k(t,u),ge(m,u,null),k(u,f),S&&S.m(u,null),p=!0,$||(h=[L(n,"keydown",e[30]),L(n,"submit",E(e[24]))],$=!0)},p(e,t){if((!p||4&t[0]&&i!==(i=e[2]._id||""))&&(o.value=i),471875717&t[0]|1&t[1]){let o;for(g=e[0].items,o=0;o<g.length;o+=1){const i=ll(e,g,o);b[o]?(b[o].p(i,t),de(b[o],1)):(b[o]=cl(i),b[o].c(),de(b[o],1),b[o].m(n,r))}for(ae(),o=g.length;o<b.length;o+=1)w(o);ce()}e[0].list?y?(y.p(e,t),1&t[0]&&de(y,1)):(y=dl(e),y.c(),de(y,1),y.m(n,null)):y&&(ae(),ue(y,1,1,(()=>{y=null})),ce());const l={};33554432&t[2]&&(l.$$scope={dirty:t,ctx:e}),m.$set(l),e[22]&&S.p(e,t)},i(e){if(!p){for(let e=0;e<g.length;e+=1)de(b[e]);de(y),de(m.$$.fragment,e),de(S),p=!0}},o(e){b=b.filter(nl);for(let e=0;e<b.length;e+=1)ue(b[e]);ue(y),ue(m.$$.fragment,e),ue(S),p=!1},d(e){e&&_(t),N(b,e),y&&y.d(),ve(m),S&&S.d(),$=!1,v(h)}}}(e);return{c(){o&&o.c(),t=q()},m(e,i){o&&o.m(e,i),I(e,t,i),n=!0},p(e,t){e[80]&&o.p(e,t)},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&_(t)}}}function al(e){let t,n;return t=new ni({props:{classId:e[14],item:e[84],selection:e[84].selection,record:e[2],disabled:e[7],eventId:e[21]}}),t.$on("task",e[26]),t.$on("notify",e[27]),t.$on("multi",e[28]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[84]),1&n[0]&&(o.selection=e[84].selection),4&n[0]&&(o.record=e[2]),128&n[0]&&(o.disabled=e[7]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function cl(e){let t,n,o="list"!==e[84].type&&e[31](!0,e[84].name),i=o&&al(e);return{c(){i&&i.c(),t=q()},m(e,o){i&&i.m(e,o),I(e,t,o),n=!0},p(e,n){1&n[0]&&(o="list"!==e[84].type&&e[31](!0,e[84].name)),o?i?(i.p(e,n),1&n[0]&&de(i,1)):(i=al(e),i.c(),de(i,1),i.m(t.parentNode,t)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce())},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){i&&i.d(e),e&&_(t)}}}function dl(e){let t,n,o,i,l=e[18]&&0!=e[3]&&ul(e),r=e[19]&&0!=e[4]&&fl(e),s=e[0].list,a=[];for(let t=0;t<s.length;t+=1)a[t]=gl(il(e,s,t));const c=e=>ue(a[e],1,1,(()=>{a[e]=null}));return{c(){l&&l.c(),t=C(),r&&r.c(),n=C();for(let e=0;e<a.length;e+=1)a[e].c();o=q()},m(e,s){l&&l.m(e,s),I(e,t,s),r&&r.m(e,s),I(e,n,s);for(let t=0;t<a.length;t+=1)a[t].m(e,s);I(e,o,s),i=!0},p(e,i){if(e[18]&&0!=e[3]?l?(l.p(e,i),8&i[0]&&de(l,1)):(l=ul(e),l.c(),de(l,1),l.m(t.parentNode,t)):l&&(ae(),ue(l,1,1,(()=>{l=null})),ce()),e[19]&&0!=e[4]?r?(r.p(e,i),16&i[0]&&de(r,1)):(r=fl(e),r.c(),de(r,1),r.m(n.parentNode,n)):r&&(ae(),ue(r,1,1,(()=>{r=null})),ce()),538984677&i[0]){let t;for(s=e[0].list,t=0;t<s.length;t+=1){const n=il(e,s,t);a[t]?(a[t].p(n,i),de(a[t],1)):(a[t]=gl(n),a[t].c(),de(a[t],1),a[t].m(o.parentNode,o))}for(ae(),t=s.length;t<a.length;t+=1)c(t);ce()}},i(e){if(!i){de(l),de(r);for(let e=0;e<s.length;e+=1)de(a[e]);i=!0}},o(e){ue(l),ue(r),a=a.filter(nl);for(let e=0;e<a.length;e+=1)ue(a[e]);i=!1},d(e){l&&l.d(e),e&&_(t),r&&r.d(e),e&&_(n),N(a,e),e&&_(o)}}}function ul(e){let t,n;return t=new e[11]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[ml]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};8&n[0]|33554432&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ml(e){let t,n,o;function i(t){e[41](t)}let l={item:e[17],disabled:!0};return void 0!==e[3]&&(l.value=e[3]),t=new dn({props:l}),G.push((()=>$e(t,"value",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};!n&&8&o[0]&&(n=!0,i.value=e[3],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function fl(e){let t,n;return t=new e[11]({props:{name:"Gesamtzeit in Wochen",nameClass:"formField_italic",$$slots:{default:[pl]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]|33554432&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function pl(e){let t,n,o;function i(t){e[42](t)}let l={item:e[20],disabled:!0};return void 0!==e[4]&&(l.value=e[4]),t=new dn({props:l}),G.push((()=>$e(t,"value",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};!n&&16&o[0]&&(n=!0,i.value=e[4],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function $l(e){let t,n;return t=new tl({props:{classId:e[14],list:e[81],template:e[5],eventId:e[21],schema:e[81].item,record:e[2],disabled:e[7]}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[81]),32&n[0]&&(o.template=e[5]),1&n[0]&&(o.schema=e[81].item),4&n[0]&&(o.record=e[2]),128&n[0]&&(o.disabled=e[7]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function hl(e){let t,n;return t=new Fi({props:{classId:e[14],list:e[81],template:e[6],eventId:e[21],schema:e[81].item,record:e[2],disabled:e[7],fixed:e[81].fixed}}),t.$on("save",e[29]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[81]),64&n[0]&&(o.template=e[6]),1&n[0]&&(o.schema=e[81].item),4&n[0]&&(o.record=e[2]),128&n[0]&&(o.disabled=e[7]),1&n[0]&&(o.fixed=e[81].fixed),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function gl(e){let t,n,o,i,l,r;t=new e[9]({props:{text:e[81].designation}});const s=[hl,$l],a=[];function c(e,t){return"array"===e[81].type?0:1}return o=c(e),i=a[o]=s[o](e),{c(){he(t.$$.fragment),n=C(),i.c(),l=q()},m(e,i){ge(t,e,i),I(e,n,i),a[o].m(e,i),I(e,l,i),r=!0},p(e,n){const r={};1&n[0]&&(r.text=e[81].designation),t.$set(r);let d=o;o=c(e),o===d?a[o].p(e,n):(ae(),ue(a[d],1,1,(()=>{a[d]=null})),ce(),i=a[o],i?i.p(e,n):(i=a[o]=s[o](e),i.c()),de(i,1),i.m(l.parentNode,l))},i(e){r||(de(t.$$.fragment,e),de(i),r=!0)},o(e){ue(t.$$.fragment,e),ue(i),r=!1},d(e){ve(t,e),e&&_(n),a[o].d(e),e&&_(l)}}}function vl(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function bl(e){let t;return{c(){t=F("Speichern und schliessen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function wl(e){let t,n;return t=new e[10]({props:{form:e[14],filled:!0,type:"submit",style:"opacity: 0.75;",$$slots:{default:[yl]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};33554432&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function yl(e){let t;return{c(){t=F("Speichern")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function xl(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function kl(e){let t,n,o,i;ol.title=t=e[8];let l={ctx:e,current:null,token:null,hasCatch:!1,pending:xl,then:sl,catch:rl,value:80,blocks:[,,,]};return me(e[23](),l),{c(){n=C(),o=q(),l.block.c()},m(e,t){I(e,n,t),I(e,o,t),l.block.m(e,l.anchor=t),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(n,o){e=n,(!i||256&o[0])&&t!==(t=e[8])&&(ol.title=t),fe(l,e,o)},i(e){i||(de(l.block),i=!0)},o(e){for(let e=0;e<3;e+=1){ue(l.blocks[e])}i=!1},d(e){e&&_(n),e&&_(o),l.block.d(e),l.token=null,l=null}}}let Il=new Map,_l=new Map,Nl=new Map;const jl=(e,n)=>{const o=n;return Il.has(o)||Il.set(o,t.getTasksList(n).then((({data:e})=>e))),Il.get(o)},Sl=(e,n,o)=>_l.get(o)||jl(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(_l.set(o,e),e))),Fl=(e,t)=>{Nl.set(e,t)},Cl=e=>Nl.get(e),ql=(e,n)=>Nl.get(n)||t.getTask(e,n).then((e=>(Nl.set(n,e),e))),Ll=(e,n)=>{if(!Il.get(n))return;const o=n;Il.set(o,t.getTasksList(n).then((({data:e})=>e)))},El=()=>{Il=new Map,_l=new Map,Nl=new Map};let zl="";function Tl(e,o,a){let u,m,f,$,h,g;y(e,r,(e=>a(50,$=e))),y(e,s,(e=>a(51,h=e)));const{Divider:v,Button:b,FormField:w}=c,{loggedIn:x,currentTasks:k}=d;y(e,x,(e=>a(52,g=e))),y(e,k,(e=>a(49,f=e)));const I=JSON.parse(i.getItem("Locale")),_=R();let N,j,{schema:S}=o,{recID:F}=o,{prevEventID:C=!1}=o,{prev:q=!1}=o,{taskId:L=!1}=o,{description:E=""}=o,{root:z=!1}=o,{readonly:T}=o,{isStandalone:D}=o,O={},B={},M="form-"+S.class+Math.floor(9e3*Math.random()+1e3).toString();const V=z?"fEmbedded":"fTask",A=z?"sEmbedded":"sTask";let W=0,H=0,Y=1;const G={},J=S.items.find((e=>"price"===e.name&&!e.properties?.hidden)),U=S.items.find((e=>"quantity"===e.name&&!e.properties?.hidden)),Z=!!J,Q=S.list?.filter((e=>"array"===e.type))?.length>1||Z,K=S.items.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name,X=!!K,ee=S.list?.filter((e=>"array"===e.type))?.length>1||X,te={};let ne,oe,ie=0,le=0,re=[];S.class;let se=S.id;const ae=!f?.length||f.find((e=>e===se));["readonly","hidden","required"].map((e=>{S.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[o,i]=n.split(".");re.push({action:e,itemName:t.name,refObj:o,refName:i,op:t.properties[e].invert?"!":""})}))}));const ce=async e=>{if(e?.length)for(const n of e){if(!n.lookup)break;const{name:e}=n;if(O[e])break;const{domain:o,value:i}=n.lookup;if("user"===o&&i){const n={[i]:g.user},o=await t.getSectionView(e,n);if(o?.length){const[{_id:t}]=o;t&&a(2,O[e]=t,O)}}}},de=async()=>{if(!S.input)return;if(!S.input.length)return;if(S.input.length<2)return;const e=await t.getEvent(se),n=!e.input.class[0].name&&e.input.class[0].selection;if(!n)return;const o=e.input.class[1].name,i=e.input.class[1].destination?.split(".")[0];if(!o||!i)return;const l=S.list?.find((e=>e.name===o));if(!l)return;const r=await t.getSchemaByClass(n),s=(await t.getTasks(r.id)).data;if(!s?.length)return;const c=[];for(const e of s){const t={};for(const n of l.item)n.name===i?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);c.push(t)}c.length&&a(2,O[o]=c,O)},ue=()=>{for(const e of S.items)e.properties?.value?.concatenation&&me(e)},me=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 pe(e.refItemNext));a(2,O[e.name]=n,O)},fe=async e=>{const t=re.filter((t=>t.refObj===e));if(t?.length)for(const e of t){const{action:t,itemName:n,refObj:o,refName:i,op:l}=e;if(!o)break;let r,s,c=!1;const d=O[o];c=i?(await ql(o,d))[i]:d,"!"===l&&(c=!c),"required"!==t&&"readonly"!==t||(r=`#${M} .form-field.${n} .field textarea`,s=document.querySelector(r),s||(r=`#${M} .form-field.${n} .field input`,s=document.querySelector(r)),s&&c&&s.setAttribute(t,"true"),s&&!c&&s.removeAttribute(t)),"hidden"===t&&(r=`#${M} .form-field.${n}`,s=document.querySelector(r),s?.classList?.toggle("hidden",c),c&&a(2,O[n]="",O))}},pe=async e=>{const[n,o]=e.offset?.split(",")||[0,0],i=+e.base||0,l=+e.step||1;e.type;const r=e.refItem,s=await t.getLastId(S.class,r);if(!s?.length)return(i+l).toString().padStart(o,"0");const a=s[0][r];return((+a?.substring(n,n+o)||i)+l).toString().padStart(o,"0")},$e=(e,t,n=!1)=>{const o=t.name,i=e.find((e=>e.name===o));let l=t.value;if(!n&&i&&i.properties?.multi&&(l=O[o]),l&&i&&i.type.startsWith("date"))try{return No(l,"%d.%m.%Y").toISOString()}catch{return new Date(l).toISOString()}if(i&&"boolean"===i.type&&(l=!!t.checked),i&&"number"===i.type){const e=Number("1.1").toLocaleString(I.id).substring(1,2);try{l=Number(l.replace(e,".")).toString()}catch{}}return l},he=()=>D?window.close():z?window.singleSpaNavigate("/"):_("back"),ge=async(e,n)=>{if(S.input?.length>1){if(S.input[0]!==e)return;if(n){const o=await t.getTaskOptions(`${e}:${n}`,se);a(2,O={...O,...o})}else{const e=S.input.slice(1);for(const t of e)a(2,O[t]=[],O)}}},ve=()=>{let e=0;if(J){let t=1;U&&(t=Y),e=H*t}let t=0;for(const e in G)t+=G[e];a(3,W=t+e)},be=()=>{let e=0;for(const t in te)e+=te[t];a(4,ie=e+ +le)};n.subscribe((async e=>{if(!e)return;if(!Il.get(e.eventId))return;const n=await t.getTaskList(S.class,e.taskId);((e,t,n)=>{if(!Il.get(e))return;const o=t;_l.set(o,n)})(e.eventId,e.taskId,n)})),P(El);return e.$$set=e=>{"schema"in e&&a(0,S=e.schema),"recID"in e&&a(36,F=e.recID),"prevEventID"in e&&a(34,C=e.prevEventID),"prev"in e&&a(37,q=e.prev),"taskId"in e&&a(35,L=e.taskId),"description"in e&&a(32,E=e.description),"root"in e&&a(1,z=e.root),"readonly"in e&&a(33,T=e.readonly),"isStandalone"in e&&a(38,D=e.isStandalone)},e.$$.update=()=>{4&e.$$.dirty[1]&&a(7,u=T),1&e.$$.dirty[0]|768&e.$$.dirty[1]&&j&&N&&S.items.map((({name:e,type:t})=>{const n=N.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;j[e]&&a(2,O[e]=j[e],O),j[o]&&a(2,O[o]=j[o],O)})),2&e.$$.dirty[0]|2&e.$$.dirty[1]&&a(8,m=z?E||"enablerr - Form":document.title)},[S,z,O,W,ie,ne,oe,u,m,v,b,w,x,k,M,V,A,{name:"amountValue",properties:{decimals:2}},Q,ee,{name:"weekValue",properties:{decimals:1}},se,ae,async()=>{if(a(6,oe=await t.getTemplate(S.class)),F||a(5,ne=oe),F&&(a(2,O=await t.getTask(S.class,F)),a(32,E=p(S,O))),C){a(33,T=!1),a(39,N=await t.getSchema(C)),"string"==typeof q&&a(40,j=await t.getTask(N.class,q));const e=S.items.find((e=>e.refClass===N.class));a(2,O[e.name]=j._id,O)}ee&&(le=O[K]||0);const e=await t.getEvent(se);if(e.trigger?.startOn&&!e.trigger.startOn.some((e=>e.type.indexOf("Manual")>=0))&&a(33,T=!0),$.role?.length&&S.authorization?.length){const e=S.authorization.some((e=>h?.find((t=>t===e.role&&"edit"===e.activity))));a(33,T||=!e)}return F||(ce(e.input?.class),ue(),de()),!0},async e=>{F||a(7,u=!0);const n=e.submitter?.className?.includes("close"),o={};Array.from(document.querySelectorAll("form#"+M+" ."+M)).map((e=>{if(e.name)if(e.name.includes(".")){const[t,n]=e.name.split("."),i=S.list.find((e=>e.name===t));o[e.name]=$e(i.item,e)}else o[e.name]=$e(S.items,e)})),S.list&&S.list.map((e=>{"array"===e.type&&B[e.name]&&(o[e.name]=B[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]=$e(e.item,{name:n,value:o,checked:o},!0)),t)),{}))),[]))})),o._event=se,o._prevEventId=C,o._taskId=L;const{id:i,task:r,error:s}=await t.saveData(S.class,o);if(s?.text){const e=s.field?" in "+s.field+": "+s.value:"";return l.failed(`${s.text} ${e}`,3e3),void a(7,u=!1)}l.success("Die Daten wurden gespeichert.",2e3),o._id=i;const c=await t.getTaskList(S.class,i);return _("choose",{row:c}),n?he():F?void 0:window.singleSpaNavigate(`/task/${se}/${r}/task`)},()=>C?window.history.back():he(),async({detail:{row:e}})=>{if((()=>{if(F)for(const e of re)e.refName||fe(e.itemName)})(),F)return;if(await(async()=>{for(const e of S.items)if(e.refItem&&O[e.refItem]){const n=await t.getTask(e.refItem,O[e.refItem]);n&&a(2,O[e.name]=n[e.name],O)}for(const e of S.list||[])if(e.refItem&&O[e.refItem]){const n=await t.getTask(e.refItem,O[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,O[e.name]=o,O)}})(),!e._task)return;const n=e._task.event,o=await t.getEvent(n),i=await t.getEvent(se);if(!i.output?.class?.length)return;const l=i.output.class[0]?.item.find((e=>(e.refClass||e.name)===o.output.class[0]?.name));(i.input?.class?.length&&i.input.class[0].name===o.output.class[0]?.name||l?.asInput)&&(a(39,N=await t.getSchema(n)),a(34,C=n),a(35,L=e._task._id),a(40,j=!!L&&await t.getTask(N.class,e._task.docId)),ge(N.class,e?._task?.docId))},({detail:e})=>{if(fe(e.itemName),ee&&(e.itemName===K&&(le=+e.value),be()),Z){if(e.itemName===J?.name)H=e.value;else{if(e.itemName!==U?.name)return;Y=e.value}ve()}},async({detail:e})=>{if(!S.input||!S.input.length)return;if(N?.class!==S.input[0])return;if(!(S.input&&S.input.length&&S.input.length>1))return;const{value:n,lookup:o,view:i}=e,[l]=o.split(":"),r=(await t.getSectionView(l,{[i]:{$in:n}})).map((e=>e._id));for(const e of S.input.slice(1)){a(2,O[e]=[],O);const n=await t.getSchemaByClass(e);n.id;let o=await t.getTasks(n.id);if(o=o.data.filter((e=>"Ready"===e._task.status&&r.includes(e[l]))),o?.length){const n=o.map((e=>e._id)),i=await t.getSectionView(e,{_id:{$in:n}});for(const t of i)t[e]=t._id;a(2,O[e]=i,O)}}},({detail:e})=>{B[e.listName]=e.value,Q&&(G[e.listName]=e.amountValue,ve()),ee&&(te[e.listName]=e.weeksValue||0,be())},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},(e,t)=>ne?(void 0!==ne[t]&&a(2,O[t]=ne[t],O),e):e,E,T,C,L,F,q,D,N,j,function(e){W=e,a(3,W)},function(e){ie=e,a(4,ie)}]}class Dl extends we{constructor(e){var t;super(),ol.getElementById("svelte-1dh1s6w-style")||((t=j("style")).id="svelte-1dh1s6w-style",t.textContent="form.disabled.svelte-1dh1s6w input.svelte-1dh1s6w{background-color:red !important}.comment.svelte-1dh1s6w.svelte-1dh1s6w{color:green;margin-bottom:1em}form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:30em}}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w,.fTask.svelte-1dh1s6w.svelte-1dh1s6w{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;max-height:70vh}.sTask.svelte-1dh1s6w.svelte-1dh1s6w{height:95%;display:inline-grid}.sTask.svelte-1dh1s6w .btn.svelte-1dh1s6w{display:initial !important}.form--buttons.svelte-1dh1s6w.svelte-1dh1s6w{display:flex;gap:1em;padding-bottom:0.5em}",k(ol.head,t)),be(this,e,Tl,kl,w,{schema:0,recID:36,prevEventID:34,prev:37,taskId:35,description:32,root:1,readonly:33,isStandalone:38},[-1,-1,-1])}}function Ol(e){let t,n,o;function i(t){e[4](t)}let l={schema:e[5],recID:e[6]};return void 0!==e[0]&&(l.description=e[0]),t=new Dl({props:l}),G.push((()=>$e(t,"description",i))),t.$on("back",e[2]),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};32&o&&(i.schema=e[5]),64&o&&(i.recID=e[6]),!n&&1&o&&(n=!0,i.description=e[0],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function Bl(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[Ol,({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(){he(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||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ml(e,n,o){let i,{refresh:l}=n;return e.$$set=e=>{"refresh"in e&&o(3,l=e.refresh)},[i,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},l,function(e){i=e,o(0,i)}]}function Vl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Al,Wl,Pl=(Al=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){i(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 i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return l="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},l(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==l(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},r),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:s.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var r={component:null,domElementGetter:null,props:{}};function s(e){return Promise.resolve()}function a(e,t,n){var i=Object.keys(r),l=Object.keys(e).reduce((function(t,n){return i.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var i=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),r=i();t.instance=new e.component(o(o({},l),{},{target:r,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)}))}},Al(Wl={exports:{}},Wl.exports),Wl.exports);const Rl=Vl(Pl)({component:class extends we{constructor(e){super(),be(this,e,Ml,Bl,w,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Hl,mount:Yl,unmount:Gl}=Rl;e({bootstrap:Hl,mount:Yl,unmount:Gl});e("Form",Dl),e("List",st),e("Template",class extends we{constructor(e){var t;super(),Ci.getElementById("svelte-1phofh5-style")||((t=j("style")).id="svelte-1phofh5-style",t.textContent="form.svelte-1phofh5.svelte-1phofh5{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1phofh5.svelte-1phofh5{min-width:30em}}.fEmbedded.svelte-1phofh5.svelte-1phofh5,.fTask.svelte-1phofh5.svelte-1phofh5{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1phofh5.svelte-1phofh5{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1phofh5.svelte-1phofh5{height:fit-content;max-height:70vh}.sTask.svelte-1phofh5.svelte-1phofh5{height:95%;display:inline-grid;min-width:40em}.sTask.svelte-1phofh5 .btn.svelte-1phofh5{display:initial !important}.form--buttons.svelte-1phofh5.svelte-1phofh5{display:flex;gap:1em;padding-bottom:0.5em}",k(Ci.head,t)),be(this,e,Ri,Wi,w,{schema:0,record:1})}})}}}));
|
|
1
|
+
System.register(["@enablerr-ui/form","@enablerr-ui/layout","@enablerr-ui/auth"],(function(e){"use strict";var t,n,o,i,l,r,s,a,c,d;return{setters:[function(e){t=e.Request,n=e.task_notification,o=e.TextArea,i=e.Storage,l=e.toasts,r=e.settings,s=e.currentRoles,a=e.Page},function(e){c=e.getAttractions},function(e){d=e.user}],execute:function(){e("version","0.2.362");const u=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(" · "))),m=e=>{try{return new Date(e).toLocaleString()}catch{return e}},f=e=>e?"(ja)":"(nein)",p=(e,t)=>{const n={...t};return(e.display?.reduce(((t,o)=>{let[i,l]=o.split(".");if(e.list?.find((({name:e})=>e===i))&&l&&void 0!==n[i]){const e=`${i}_${l}`;n[e]=n[i][l],i=e}return t.find((e=>e===i))||t.push(i),t}),[]).map((e=>"boolean"==typeof n[e]?f(n[e]):u(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&f(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function $(){}function h(e){return e()}function g(){return Object.create(null)}function v(e){e.forEach(h)}function b(e){return"function"==typeof e}function w(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function y(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return $;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function x(e){return null==e?"":e}function k(e,t){e.appendChild(t)}function I(e,t,n){e.insertBefore(t,n||null)}function _(e){e.parentNode.removeChild(e)}function N(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function j(e){return document.createElement(e)}function S(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function F(e){return document.createTextNode(e)}function C(){return F(" ")}function q(){return F("")}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 z(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function T(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 B(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function M(e,t,n){e.classList[n?"add":"remove"](t)}let V;function A(e){V=e}function W(){if(!V)throw new Error("Function called outside component initialization");return V}function P(e){W().$$.on_mount.push(e)}function R(){const e=W();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const i=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,i)}))}}}function H(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const Y=[],G=[],J=[],U=[],Z=Promise.resolve();let Q=!1;function K(){Q||(Q=!0,Z.then(ie))}function X(){return K(),Z}function ee(e){J.push(e)}function te(e){U.push(e)}let ne=!1;const oe=new Set;function ie(){if(!ne){ne=!0;do{for(let e=0;e<Y.length;e+=1){const t=Y[e];A(t),le(t.$$)}for(A(null),Y.length=0;G.length;)G.pop()();for(let e=0;e<J.length;e+=1){const t=J[e];oe.has(t)||(oe.add(t),t())}J.length=0}while(Y.length);for(;U.length;)U.pop()();Q=!1,ne=!1,oe.clear()}}function le(e){if(null!==e.fragment){e.update(),v(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ee)}}const re=new Set;let se;function ae(){se={r:0,c:[],p:se}}function ce(){se.r||v(se.c),se=se.p}function de(e,t){e&&e.i&&(re.delete(e),e.i(t))}function ue(e,t,n,o){if(e&&e.o){if(re.has(e))return;re.add(e),se&&se.c.push((()=>{re.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function me(e,t){const n=t.token={};function o(e,o,i,l){if(t.token!==n)return;t.resolved=l;let r=t.ctx;void 0!==i&&(r=r.slice(),r[i]=l);const s=e&&(t.current=e)(r);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(ae(),ue(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),ce())})):t.block.d(1),s.c(),de(s,1),s.m(t.mount(),t.anchor),a=!0),t.block=s,t.blocks&&(t.blocks[o]=s),a&&ie()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=W();if(e.then((e=>{A(n),o(t.then,1,t.value,e),A(null)}),(e=>{if(A(n),o(t.catch,2,t.error,e),A(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 i}function fe(e,t,n){const o=t.slice(),{resolved:i}=e;e.current===e.then&&(o[e.value]=i),e.current===e.catch&&(o[e.error]=i),e.block.p(o,n)}const pe="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function $e(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function he(e){e&&e.c()}function ge(e,t,n,o){const{fragment:i,on_mount:l,on_destroy:r,after_update:s}=e.$$;i&&i.m(t,n),o||ee((()=>{const t=l.map(h).filter(b);r?r.push(...t):v(t),e.$$.on_mount=[]})),s.forEach(ee)}function ve(e,t){const n=e.$$;null!==n.fragment&&(v(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function be(e,t,n,o,i,l,r=[-1]){const s=V;A(e);const a=e.$$={fragment:null,ctx:null,props:l,update:$,not_equal:i,bound:g(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:t.context||[]),callbacks:g(),dirty:r,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...o)=>{const l=o.length?o[0]:n;return a.ctx&&i(a.ctx[t],a.ctx[t]=l)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](l),c&&function(e,t){-1===e.$$.dirty[0]&&(Y.push(e),K(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,v(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(_)}else a.fragment&&a.fragment.c();t.intro&&de(e.$$.fragment),ge(e,t.target,t.anchor,t.customElement),ie()}A(s)}class we{$destroy(){ve(this,1),this.$destroy=$}$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 ye(e){let t,n,o,i,l;return{c(){t=S("svg"),n=S("circle"),o=S("polyline"),i=S("line"),T(n,"cx","12"),T(n,"cy","12"),T(n,"r","10"),T(o,"points","8 12 12 16 16 12"),T(i,"x1","12"),T(i,"y1","8"),T(i,"x2","12"),T(i,"y2","16"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",l="feather feather-arrow-down-circle "+e[2])},m(e,l){I(e,t,l),k(t,n),k(t,o),k(t,i)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-arrow-down-circle "+e[2])&&T(t,"class",l)},i:$,o:$,d(e){e&&_(t)}}}function xe(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class ke extends we{constructor(e){super(),be(this,e,xe,ye,w,{size:0,strokeWidth:1,class:2})}}function Ie(e){let t,n,o,i;return{c(){t=S("svg"),n=S("path"),o=S("polyline"),T(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),T(o,"points","22 4 12 14.01 9 11.01"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",i="feather feather-check-circle "+e[2])},m(e,i){I(e,t,i),k(t,n),k(t,o)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-check-circle "+e[2])&&T(t,"class",i)},i:$,o:$,d(e){e&&_(t)}}}function _e(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Ne extends we{constructor(e){super(),be(this,e,_e,Ie,w,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,o;return{c(){t=S("svg"),n=S("path"),T(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"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",o="feather feather-command "+e[2])},m(e,o){I(e,t,o),k(t,n)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-command "+e[2])&&T(t,"class",o)},i:$,o:$,d(e){e&&_(t)}}}function Se(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Fe extends we{constructor(e){super(),be(this,e,Se,je,w,{size:0,strokeWidth:1,class:2})}}function Ce(e){let t,n,o,i;return{c(){t=S("svg"),n=S("polyline"),o=S("path"),T(n,"points","9 10 4 15 9 20"),T(o,"d","M20 4v7a4 4 0 0 1-4 4H4"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",i="feather feather-corner-down-left "+e[2])},m(e,i){I(e,t,i),k(t,n),k(t,o)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-corner-down-left "+e[2])&&T(t,"class",i)},i:$,o:$,d(e){e&&_(t)}}}function qe(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Le extends we{constructor(e){super(),be(this,e,qe,Ce,w,{size:0,strokeWidth:1,class:2})}}function Ee(e){let t,n,o,i,l;return{c(){t=S("svg"),n=S("path"),o=S("line"),i=S("line"),T(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),T(o,"x1","18"),T(o,"y1","9"),T(o,"x2","12"),T(o,"y2","15"),T(i,"x1","12"),T(i,"y1","9"),T(i,"x2","18"),T(i,"y2","15"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",l="feather feather-delete "+e[2])},m(e,l){I(e,t,l),k(t,n),k(t,o),k(t,i)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-delete "+e[2])&&T(t,"class",l)},i:$,o:$,d(e){e&&_(t)}}}function ze(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Te extends we{constructor(e){super(),be(this,e,ze,Ee,w,{size:0,strokeWidth:1,class:2})}}function De(e){let t,n,o,i,l;return{c(){t=S("svg"),n=S("path"),o=S("polyline"),i=S("line"),T(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),T(o,"points","15 3 21 3 21 9"),T(i,"x1","10"),T(i,"y1","14"),T(i,"x2","21"),T(i,"y2","3"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",l="feather feather-external-link "+e[2])},m(e,l){I(e,t,l),k(t,n),k(t,o),k(t,i)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-external-link "+e[2])&&T(t,"class",l)},i:$,o:$,d(e){e&&_(t)}}}function Oe(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Be extends we{constructor(e){super(),be(this,e,Oe,De,w,{size:0,strokeWidth:1,class:2})}}function Me(e){let t,n,o,i;return{c(){t=S("svg"),n=S("circle"),o=S("line"),T(n,"cx","11"),T(n,"cy","11"),T(n,"r","8"),T(o,"x1","21"),T(o,"y1","21"),T(o,"x2","16.65"),T(o,"y2","16.65"),T(t,"xmlns","http://www.w3.org/2000/svg"),T(t,"width",e[0]),T(t,"height",e[0]),T(t,"fill","none"),T(t,"viewBox","0 0 24 24"),T(t,"stroke","currentColor"),T(t,"stroke-width",e[1]),T(t,"stroke-linecap","round"),T(t,"stroke-linejoin","round"),T(t,"class",i="feather feather-search "+e[2])},m(e,i){I(e,t,i),k(t,n),k(t,o)},p(e,[n]){1&n&&T(t,"width",e[0]),1&n&&T(t,"height",e[0]),2&n&&T(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-search "+e[2])&&T(t,"class",i)},i:$,o:$,d(e){e&&_(t)}}}function Ve(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:l=""}=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,i=e.strokeWidth),"class"in e&&n(2,l=e.class)},[o,i,l]}class Ae extends we{constructor(e){super(),be(this,e,Ve,Me,w,{size:0,strokeWidth:1,class:2})}}const{document:We}=pe;function Pe(e){e[30]=e[32].list,e[31]=e[32].items}function Re(e,t,n){const o=e.slice();return o[33]=t[n],o}function He(e,t,n){const o=e.slice();return o[36]=t[n],o}function Ye(e,t,n){const o=e.slice();return o[36]=t[n],o}function Ge(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Je(e){let t,n,o,i,l,r;Pe(e);let s=e[30]?.length&&Ue(e),a=e[31]?.length&&Ze(e),c=e[30]?.length&&Xe(e);return{c(){s&&s.c(),t=C(),n=j("div"),o=j("table"),a&&a.c(),i=C(),l=j("tbody"),c&&c.c(),T(o,"striped",""),T(o,"class","svelte-btngop"),T(n,"class","eList svelte-btngop")},m(e,d){s&&s.m(e,d),I(e,t,d),I(e,n,d),k(n,o),a&&a.m(o,null),k(o,i),k(o,l),c&&c.m(l,null),r=!0},p(e,n){Pe(e),e[30]?.length?s?(s.p(e,n),4&n[0]&&de(s,1)):(s=Ue(e),s.c(),de(s,1),s.m(t.parentNode,t)):s&&(ae(),ue(s,1,1,(()=>{s=null})),ce()),e[31]?.length?a?a.p(e,n):(a=Ze(e),a.c(),a.m(o,i)):a&&(a.d(1),a=null),e[30]?.length?c?(c.p(e,n),4&n[0]&&de(c,1)):(c=Xe(e),c.c(),de(c,1),c.m(l,null)):c&&(ae(),ue(c,1,1,(()=>{c=null})),ce())},i(e){r||(de(s),de(c),r=!0)},o(e){ue(s),ue(c),r=!1},d(e){s&&s.d(e),e&&_(t),e&&_(n),a&&a.d(),c&&c.d()}}}function Ue(e){let t,n,o,i,l,r,s,a,c,d;function u(t){e[22](t)}let m={id:e[8]};return void 0!==e[3]&&(m.value=e[3]),o=new e[6]({props:m}),G.push((()=>$e(o,"value",u))),o.$on("input",e[12]),s=new Te({props:{size:"18"}}),{c(){t=j("div"),n=F("Suchen: "),he(o.$$.fragment),l=C(),r=j("span"),he(s.$$.fragment),T(r,"class","feather pointer svelte-btngop"),B(t,"margin-bottom","1em"),B(t,"position","relative")},m(i,u){I(i,t,u),k(t,n),ge(o,t,null),k(t,l),k(t,r),ge(s,r,null),a=!0,c||(d=L(r,"click",e[15]),c=!0)},p(e,t){const n={};!i&&8&t[0]&&(i=!0,n.value=e[3],te((()=>i=!1))),o.$set(n)},i(e){a||(de(o.$$.fragment,e),de(s.$$.fragment,e),a=!0)},o(e){ue(o.$$.fragment,e),ue(s.$$.fragment,e),a=!1},d(e){e&&_(t),ve(o),ve(s),c=!1,d()}}}function Ze(e){let t,n,o,i=e[4]&&e[0]&&Qe(),l=e[31],r=[];for(let t=0;t<l.length;t+=1)r[t]=Ke(Ye(e,l,t));return{c(){t=j("thead"),n=j("tr"),i&&i.c(),o=C();for(let e=0;e<r.length;e+=1)r[e].c();T(n,"class","svelte-btngop"),T(t,"class","svelte-btngop")},m(e,l){I(e,t,l),k(t,n),i&&i.m(n,null),k(n,o);for(let e=0;e<r.length;e+=1)r[e].m(n,null)},p(e,t){if(e[4]&&e[0]?i||(i=Qe(),i.c(),i.m(n,o)):i&&(i.d(1),i=null),2052&t[0]){let o;for(l=e[31],o=0;o<l.length;o+=1){const i=Ye(e,l,o);r[o]?r[o].p(i,t):(r[o]=Ke(i),r[o].c(),r[o].m(n,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=l.length}},d(e){e&&_(t),i&&i.d(),N(r,e)}}}function Qe(e){let t;return{c(){t=j("th"),T(t,"class","svelte-btngop")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Ke(e){let t,n,o=e[36]?.designation+"";return{c(){t=j("th"),n=F(o),T(t,"class","svelte-btngop")},m(e,o){I(e,t,o),k(t,n)},p(e,t){4&t[0]&&o!==(o=e[36]?.designation+"")&&D(n,o)},d(e){e&&_(t)}}}function Xe(e){let t,n,o=e[30],i=[];for(let t=0;t<o.length;t+=1)i[t]=ot(Re(e,o,t));const l=e=>ue(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=q()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(28191&n[0]){let r;for(o=e[30],r=0;r<o.length;r+=1){const l=Re(e,o,r);i[r]?(i[r].p(l,n),de(i[r],1)):(i[r]=ot(l),i[r].c(),de(i[r],1),i[r].m(t.parentNode,t))}for(ae(),r=o.length;r<i.length;r+=1)l(r);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ue(i[e]);n=!1},d(e){N(i,e),e&&_(t)}}}function et(e){let t,n,o,i,l=e[4]&&e[0]&&tt(e),r=e[31],s=[];for(let t=0;t<r.length;t+=1)s[t]=nt(He(e,r,t));return{c(){t=j("tr"),l&&l.c(),n=C();for(let e=0;e<s.length;e+=1)s[e].c();o=C(),T(t,"class","pointer svelte-btngop"),M(t,"active",e[33]._id===e[1])},m(e,r){I(e,t,r),l&&l.m(t,null),k(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);k(t,o),i=!0},p(e,i){if(e[4]&&e[0]?l?(l.p(e,i),17&i[0]&&de(l,1)):(l=tt(e),l.c(),de(l,1),l.m(t,n)):l&&(ae(),ue(l,1,1,(()=>{l=null})),ce()),3588&i[0]){let n;for(r=e[31],n=0;n<r.length;n+=1){const l=He(e,r,n);s[n]?s[n].p(l,i):(s[n]=nt(l),s[n].c(),s[n].m(t,o))}for(;n<s.length;n+=1)s[n].d(1);s.length=r.length}2054&i[0]&&M(t,"active",e[33]._id===e[1])},i(e){i||(de(l),i=!0)},o(e){ue(l),i=!1},d(e){e&&_(t),l&&l.d(),N(s,e)}}}function tt(e){let t,n,o,i,l;return o=new Be({props:{size:"18"}}),{c(){t=j("td"),n=j("a"),he(o.$$.fragment),T(n,"href",i=e[14](e[33])),T(n,"target","_blank"),T(t,"class","editRow svelte-btngop")},m(e,i){I(e,t,i),k(t,n),ge(o,n,null),l=!0},p(e,t){(!l||4&t[0]&&i!==(i=e[14](e[33])))&&T(n,"href",i)},i(e){l||(de(o.$$.fragment,e),l=!0)},o(e){ue(o.$$.fragment,e),l=!1},d(e){e&&_(t),ve(o)}}}function nt(e){let t,n,o,i,l=e[9](e[33],e[36])+"";return{c(){t=j("td"),n=F(l),T(t,"class","svelte-btngop")},m(l,r){I(l,t,r),k(t,n),o||(i=L(t,"click",z((function(){b(e[10](e[33]))&&e[10](e[33]).apply(this,arguments)}))),o=!0)},p(t,o){e=t,4&o[0]&&l!==(l=e[9](e[33],e[36])+"")&&D(n,l)},d(e){e&&_(t),o=!1,i()}}}function ot(e){let t,n,o=e[13](e[33],e[31],e[3]),i=o&&et(e);return{c(){i&&i.c(),t=q()},m(e,o){i&&i.m(e,o),I(e,t,o),n=!0},p(e,n){12&n[0]&&(o=e[13](e[33],e[31],e[3])),o?i?(i.p(e,n),12&n[0]&&de(i,1)):(i=et(e),i.c(),de(i,1),i.m(t.parentNode,t)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce())},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){i&&i.d(e),e&&_(t)}}}function it(e){let t,n;return t=new e[5]({}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:$,i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function lt(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:it,then:Je,catch:Ge,value:32,blocks:[,,,]};return me(n=e[2]&&e[11](),i),{c(){t=q(),i.block.c()},m(e,n){I(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,o=!0},p(t,o){e=t,i.ctx=e,4&o[0]&&n!==(n=e[2]&&e[11]())&&me(n,i)||fe(i,e,o)},i(e){o||(de(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ue(i.blocks[e])}o=!1},d(e){e&&_(t),i.block.d(e),i.token=null,i=null}}}function rt(e,o,i){let l;const r=R(),{Loading:s,TextField:a}=c,{currentTasks:m}=d;y(e,m,(e=>i(23,l=e)));let p,{eventId:$}=o,{className:h}=o,{rowId:g}=o,{filterForReady:v=!1}=o,{showEdit:b=!1}=o,{praefix:w=""}=o,{selectionFields:x=!1}=o,{deList:k}=o,I=!0,_="",N=h+Math.floor(9e3*Math.random()+1e3).toString()+"search";const j=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?f(n):u(e[`_${t.name}`]||e[t.name]||"")},S=t.getSchemaByClass(h),F=async(e,t,n,o)=>{const{value:i,refClass:l}=o,[r,s]=n.split("."),a=i?.get(w),c=a&&await ql(r,a);if(!c)return e;const d=c[s];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 Fl(l+o._id.toString(),o),o})):e};P((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(N)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await S;e.eventId===t.id&&(Ll(t.class,e.eventId),i(2,I=!i(2,I=!1)))}));return e.$$set=e=>{"eventId"in e&&i(16,$=e.eventId),"className"in e&&i(17,h=e.className),"rowId"in e&&i(1,g=e.rowId),"filterForReady"in e&&i(18,v=e.filterForReady),"showEdit"in e&&i(0,b=e.showEdit),"praefix"in e&&i(19,w=e.praefix),"selectionFields"in e&&i(20,x=e.selectionFields),"deList"in e&&i(21,k=e.deList)},[b,g,I,_,p,s,a,m,N,j,e=>()=>r("choose",{row:e}),async()=>{const e=await S;let n;i(4,p=(e=>!l?.length||!!l.find((t=>t===e)))(e.id));let o,s=n=await jl(e.class,e.id),a=!1,c="";const d=x&&x?.find((t=>e.class===t.refClass.split(":")[0])),u=d?.value?.get&&d.value.get(w);if(u){const[n,i]=d.refClass.split(":");e.class===n&&(s=await F(s,n,i,d)),a=d.parentClass?.find((e=>"quantity"===e.name)),c=d.className,o=await t.getCountedSection(c,i.split(".")[0],u,n,"quantity")}i(0,b&&=!d),!d&&v&&(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 m=[],f=e.display;return f&&f.length?f.map((t=>{const[n,o]=t.split(".");let i=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));i&&(i={...i},i.name=`${n}_${o}`,s=s.map((e=>(e[n]&&(e[i.name]=e[n][o]),e)))),i||(i=e.items.find((e=>e.name===n))),m.find((e=>e?.name===n))||m.push(i)})):m=e.items,!b&&a?(m=m.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)}})),r("init",s)):k&&(s=s.filter((e=>!k.find((t=>t._id===e._id))))),{list:s,items:m}},({detail:{value:e}})=>{i(3,_=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(j(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},e=>`/task/${e._task.event}/${e._task._id}/task?view=standalone`,()=>{i(3,_="")},$,h,v,w,x,k,function(e){_=e,i(3,_)}]}class st extends we{constructor(e){var t;super(),We.getElementById("svelte-btngop-style")||((t=j("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}",k(We.head,t)),be(this,e,rt,lt,w,{eventId:16,className:17,rowId:1,filterForReady:18,showEdit:0,praefix:19,selectionFields:20,deList:21},[-1,-1])}}function at(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function ct(e){let t,n,o=e[36]&&dt(e);return{c(){o&&o.c(),t=q()},m(e,i){o&&o.m(e,i),I(e,t,i),n=!0},p(e,n){e[36]?o?(o.p(e,n),4&n[0]&&de(o,1)):(o=dt(e),o.c(),de(o,1),o.m(t.parentNode,t)):o&&(ae(),ue(o,1,1,(()=>{o=null})),ce())},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&_(t)}}}function dt(e){let t,n;return t=new e[15]({props:{title:e[11]?"Auswahl":e[19],class:"eList "+(e[9]?"form":""),$$slots:{default:[bt]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};2048&n[0]&&(o.title=e[11]?"Auswahl":e[19]),512&n[0]&&(o.class="eList "+(e[9]?"form":"")),32767&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ut(e){let t,n;return t=new Dl({props:{schema:e[1],recID:e[0],readonly:e[10]}}),t.$on("choose",(function(){b(e[25](e[36]))&&e[25](e[36]).apply(this,arguments)})),t.$on("back",e[22]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const i={};2&o[0]&&(i.schema=e[1]),1&o[0]&&(i.recID=e[0]),1024&o[0]&&(i.readonly=e[10]),t.$set(i)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function mt(e){let t,n,o,i,l,r,s;t=new e[16]({props:{text:e[11]?"Zusätzliche Auswahl":""}});const a=[pt,ft],c=[];function d(e,t){return e[11]?0:1}return o=d(e),i=c[o]=a[o](e),r=new st({props:{eventId:e[1].id,className:e[1].class,filterForReady:e[3],praefix:e[4],selectionFields:e[5],rowId:e[0],deList:e[7],showEdit:e[6]}}),r.$on("edit",e[26]),r.$on("choose",e[29]),r.$on("init",e[27]),{c(){he(t.$$.fragment),n=C(),i.c(),l=C(),he(r.$$.fragment)},m(e,i){ge(t,e,i),I(e,n,i),c[o].m(e,i),I(e,l,i),ge(r,e,i),s=!0},p(e,n){const s={};2048&n[0]&&(s.text=e[11]?"Zusätzliche Auswahl":""),t.$set(s);let u=o;o=d(e),o===u?c[o].p(e,n):(ae(),ue(c[u],1,1,(()=>{c[u]=null})),ce(),i=c[o],i?i.p(e,n):(i=c[o]=a[o](e),i.c()),de(i,1),i.m(l.parentNode,l));const m={};2&n[0]&&(m.eventId=e[1].id),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]),r.$set(m)},i(e){s||(de(t.$$.fragment,e),de(i),de(r.$$.fragment,e),s=!0)},o(e){ue(t.$$.fragment,e),ue(i),ue(r.$$.fragment,e),s=!1},d(e){ve(t,e),e&&_(n),c[o].d(e),e&&_(l),ve(r,e)}}}function ft(e){let t,n,o,i;n=new e[17]({props:{outline:!0,$$slots:{default:[$t]},$$scope:{ctx:e}}}),n.$on("click",e[23]);let l=e[20]&&function(e){let t,n;return t=new e[17]({props:{filled:!0,$$slots:{default:[ht]},$$scope:{ctx:e}}}),t.$on("click",e[24]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}(e);return{c(){t=j("div"),he(n.$$.fragment),o=C(),l&&l.c(),T(t,"class","form--buttons svelte-jb5mrh")},m(e,r){I(e,t,r),ge(n,t,null),k(t,o),l&&l.m(t,null),i=!0},p(e,t){const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o),e[20]&&l.p(e,t)},i(e){i||(de(n.$$.fragment,e),de(l),i=!0)},o(e){ue(n.$$.fragment,e),ue(l),i=!1},d(e){e&&_(t),ve(n),l&&l.d()}}}function pt(e){let t,n,o,i,l,r,s=e[14]&>(e);return o=new e[17]({props:{outline:!0,$$slots:{default:[vt]},$$scope:{ctx:e}}}),o.$on("click",e[23]),l=new e[16]({props:{text:"Liste aus "+e[8]}}),{c(){s&&s.c(),t=C(),n=j("div"),he(o.$$.fragment),i=C(),he(l.$$.fragment),T(n,"class","form--buttons svelte-jb5mrh")},m(e,a){s&&s.m(e,a),I(e,t,a),I(e,n,a),ge(o,n,null),I(e,i,a),ge(l,e,a),r=!0},p(e,n){e[14]?s?(s.p(e,n),16384&n[0]&&de(s,1)):(s=gt(e),s.c(),de(s,1),s.m(t.parentNode,t)):s&&(ae(),ue(s,1,1,(()=>{s=null})),ce());const i={};64&n[1]&&(i.$$scope={dirty:n,ctx:e}),o.$set(i);const r={};256&n[0]&&(r.text="Liste aus "+e[8]),l.$set(r)},i(e){r||(de(s),de(o.$$.fragment,e),de(l.$$.fragment,e),r=!0)},o(e){ue(s),ue(o.$$.fragment,e),ue(l.$$.fragment,e),r=!1},d(e){s&&s.d(e),e&&_(t),e&&_(n),ve(o),e&&_(i),ve(l,e)}}}function $t(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function ht(e){let t;return{c(){t=F("Neu")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function gt(e){let t,n;return t=new ni({props:{item:e[12],record:{_id:"",[e[12].name]:""},noForm:"true",classId:"sel_"+e[12].name,eventId:e[13],required:!1,hidden:!1,readonly:!1,deList:e[14]}}),t.$on("notify",e[28]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n[0]&&(o.item=e[12]),4096&n[0]&&(o.record={_id:"",[e[12].name]:""}),4096&n[0]&&(o.classId="sel_"+e[12].name),8192&n[0]&&(o.eventId=e[13]),16384&n[0]&&(o.deList=e[14]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function vt(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function bt(e){let t,n,o,i;const l=[mt,ut],r=[];function s(e,t){return e[36].length&&!e[9]?0:1}return t=s(e),n=r[t]=l[t](e),{c(){n.c(),o=q()},m(e,n){r[t].m(e,n),I(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?r[t].p(e,i):(ae(),ue(r[a],1,1,(()=>{r[a]=null})),ce(),n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),de(n,1),n.m(o.parentNode,o))},i(e){i||(de(n),i=!0)},o(e){ue(n),i=!1},d(e){r[t].d(e),e&&_(o)}}}function wt(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function yt(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:wt,then:ct,catch:at,value:36,blocks:[,,,]};return me(n=e[21](e[2]),i),{c(){t=q(),i.block.c()},m(e,n){I(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,o=!0},p(t,o){e=t,i.ctx=e,4&o[0]&&n!==(n=e[21](e[2]))&&me(n,i)||fe(i,e,o)},i(e){o||(de(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ue(i.blocks[e])}o=!1},d(e){e&&_(t),i.block.d(e),i.token=null,i=null}}}function xt(e,n,o){let i;const{Dialog:l,Divider:r,Button:s}=c,a=R(),{currentTasks:u}=d;y(e,u,(e=>o(32,i=e)));let{schema:m}=n,{recID:f}=n,{isOpening:p=!0}=n,{filterForReady:$=!1}=n,{praefix:h=""}=n,{selectionFields:g=!1}=n,{showEdit:v=!0}=n,{deList:b}=n,w=m.identity.designation,x=m.id;m.class;let k,I,_,N,j,S,F,C="",q=!1;const L=!i?.length||i.find((e=>e===x));return e.$$set=e=>{"schema"in e&&o(1,m=e.schema),"recID"in e&&o(0,f=e.recID),"isOpening"in e&&o(2,p=e.isOpening),"filterForReady"in e&&o(3,$=e.filterForReady),"praefix"in e&&o(4,h=e.praefix),"selectionFields"in e&&o(5,g=e.selectionFields),"showEdit"in e&&o(6,v=e.showEdit),"deList"in e&&o(7,b=e.deList)},[f,m,p,$,h,g,v,b,C,q,k,_,j,S,F,l,r,s,u,w,L,async e=>{if(!e)return!1;const n=await jl(m.class,m.id);if(I=g&&g?.find((e=>m.class===e.refClass.split(":")[0])),o(11,_=I?.value?.get&&I.value.get(h)),_){N=I.refClass;const[e,n]=N.split(":"),[i]=n.split(".");o(12,j=I.parentClass.find((t=>t.name===e)));const l=await t.getSchemaByClass(j.refClass);o(13,S=l.id),o(8,C=I.parentClass.find((e=>e.name===i)).designation)}return n},()=>{o(9,q=!1),f||a("back"),v||a("back")},()=>{o(9,q=!1),a("back")},()=>{o(0,f=!1),o(10,k=!1),o(9,q=!0)},e=>({detail:{row:e}})=>{let t=m.display;t&&t.length&&t.map((t=>{const[n,o]=t.split(".");let i=m.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));if(i){e[`${n}_${o}`]=e[n][o]}})),a("choose",{row:e})},({detail:e})=>{o(10,k=!!e._task.visum||"Closed"===e._task.status),o(0,f=e._docId),o(9,q=!0)},({detail:e})=>{_&&o(14,F=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};a("choose",{row:t})},function(t){H(e,t)}]}class kt extends we{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=j("style")).id="svelte-jb5mrh-style",t.textContent=".eList .flex button.btn{width:max-content !important}.dialog.eList{max-height:90vh}.form--buttons.svelte-jb5mrh{display:flex;gap:1em;padding:0.5em 0}",k(document.head,t)),be(this,e,xt,yt,w,{schema:1,recID:0,isOpening:2,filterForReady:3,praefix:4,selectionFields:5,showEdit:6,deList:7},[-1,-1])}}const{document:It}=pe;function _t(e){e[26]=e[28].list,e[27]=e[28].items}function Nt(e,t,n){const o=e.slice();return o[29]=t[n],o}function jt(e,t,n){const o=e.slice();return o[32]=t[n],o}function St(e,t,n){const o=e.slice();return o[32]=t[n],o}function Ft(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Ct(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g,v;function b(t){e[23](t)}_t(e),n=new e[7]({props:{outline:!0,$$slots:{default:[qt]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),r=new e[6]({props:w}),G.push((()=>$e(r,"value",b))),r.$on("input",e[12]),d=new Te({props:{size:"18"}});let y=e[27]?.length&&function(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=Lt(St(e,o,t));return{c(){t=j("thead"),n=j("tr");for(let e=0;e<i.length;e+=1)i[e].c();T(n,"class","svelte-14hcfjl"),T(t,"class","svelte-14hcfjl")},m(e,o){I(e,t,o),k(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let l;for(o=e[27],l=0;l<o.length;l+=1){const r=St(e,o,l);i[l]?i[l].p(r,t):(i[l]=Lt(r),i[l].c(),i[l].m(n,null))}for(;l<i.length;l+=1)i[l].d(1);i.length=o.length}},d(e){e&&_(t),N(i,e)}}}(e),x=e[26]?.length&&function(e){let t,n=e[26],o=[];for(let t=0;t<n.length;t+=1)o[t]=Tt(Nt(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=q()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);I(e,t,n)},p(e,i){if(11779&i[0]){let l;for(n=e[26],l=0;l<n.length;l+=1){const r=Nt(e,n,l);o[l]?o[l].p(r,i):(o[l]=Tt(r),o[l].c(),o[l].m(t.parentNode,t))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(e){N(o,e),e&&_(t)}}}(e);return{c(){t=j("div"),he(n.$$.fragment),o=C(),i=j("div"),l=F("Suchen: "),he(r.$$.fragment),a=C(),c=j("span"),he(d.$$.fragment),u=C(),m=j("div"),f=j("table"),y&&y.c(),p=C(),$=j("tbody"),x&&x.c(),T(t,"class","form--buttons svelte-14hcfjl"),T(c,"class","feather pointer svelte-14hcfjl"),B(i,"margin-bottom","1em"),B(i,"position","relative"),T(f,"striped",""),T(f,"class","svelte-14hcfjl"),T(m,"class","eList svelte-14hcfjl")},m(s,b){I(s,t,b),ge(n,t,null),I(s,o,b),I(s,i,b),k(i,l),ge(r,i,null),k(i,a),k(i,c),ge(d,c,null),I(s,u,b),I(s,m,b),k(m,f),y&&y.m(f,null),k(f,p),k(f,$),x&&x.m($,null),h=!0,g||(v=L(c,"click",e[14]),g=!0)},p(e,t){_t(e);const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};!s&&2&t[0]&&(s=!0,i.value=e[1],te((()=>s=!1))),r.$set(i),e[27]?.length&&y.p(e,t),e[26]?.length&&x.p(e,t)},i(e){h||(de(n.$$.fragment,e),de(r.$$.fragment,e),de(d.$$.fragment,e),h=!0)},o(e){ue(n.$$.fragment,e),ue(r.$$.fragment,e),ue(d.$$.fragment,e),h=!1},d(e){e&&_(t),ve(n),e&&_(o),e&&_(i),ve(r),ve(d),e&&_(u),e&&_(m),y&&y.d(),x&&x.d(),g=!1,v()}}}function qt(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Lt(e){let t,n,o=e[32]?.designation+"";return{c(){t=j("th"),n=F(o),T(t,"class","svelte-14hcfjl")},m(e,o){I(e,t,o),k(t,n)},p:$,d(e){e&&_(t)}}}function Et(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=zt(jt(e,o,t));return{c(){t=j("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=C(),T(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[29]._id===e[0])},m(e,o){I(e,t,o);for(let e=0;e<i.length;e+=1)i[e].m(t,null);k(t,n)},p(e,l){if(3584&l[0]){let r;for(o=e[27],r=0;r<o.length;r+=1){const s=jt(e,o,r);i[r]?i[r].p(s,l):(i[r]=zt(s),i[r].c(),i[r].m(t,n))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}2049&l[0]&&M(t,"active",e[29]._id===e[0])},d(e){e&&_(t),N(i,e)}}}function zt(e){let t,n,o,i,l=e[9](e[29],e[32])+"";return{c(){t=j("td"),n=F(l),T(t,"class","svelte-14hcfjl")},m(l,r){I(l,t,r),k(t,n),o||(i=L(t,"click",z(e[10](e[29]))),o=!0)},p(t,n){e=t},d(e){e&&_(t),o=!1,i()}}}function Tt(e){let t,n=e[13](e[29],e[27],e[1]),o=n&&Et(e);return{c(){o&&o.c(),t=q()},m(e,n){o&&o.m(e,n),I(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[29],e[27],e[1])),n?o?o.p(e,i):(o=Et(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&_(t)}}}function Dt(e){let t,n;return t=new e[5]({}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:$,i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ot(e){let t,n,o,i;t=new e[4]({});let l={ctx:e,current:null,token:null,hasCatch:!1,pending:Dt,then:Ct,catch:Ft,value:28,blocks:[,,,]};return me(e[11](),l),{c(){he(t.$$.fragment),n=C(),o=q(),l.block.c()},m(e,r){ge(t,e,r),I(e,n,r),I(e,o,r),l.block.m(e,l.anchor=r),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(t,n){fe(l,e=t,n)},i(e){i||(de(t.$$.fragment,e),de(l.block),i=!0)},o(e){ue(t.$$.fragment,e);for(let e=0;e<3;e+=1){ue(l.blocks[e])}i=!1},d(e){ve(t,e),e&&_(n),e&&_(o),l.block.d(e),l.token=null,l=null}}}function Bt(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Ot]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};3&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Mt(e,o,i){const l=R(),{Dialog:r,Divider:s,Loading:a,TextField:d,Button:m}=c;let{item:p}=o,{classId:$}=o,{className:h}=o,{rowId:g}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:w}=o,{filter:y}=o,x="",k=$+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?f(n):u(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass(h);P((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&Ll(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(15,p=e.item),"classId"in e&&i(16,$=e.classId),"className"in e&&i(17,h=e.className),"rowId"in e&&i(0,g=e.rowId),"viewName"in e&&i(18,v=e.viewName),"viewValue"in e&&i(19,b=e.viewValue),"recordId"in e&&i(20,w=e.recordId),"filter"in e&&i(21,y=e.filter)},[g,x,l,r,s,a,d,m,k,I,e=>()=>l("choose",{row:e}),async()=>{const e=await _,n="."+$+"#"+v,o=document.querySelector(n);let i={[v]:o?.value||w};if(p.refItem){const e="."+$+"#"+p.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[p.refItem]:t.value},{[p.refItem]:{$exists:!0,$eq:""}}]};i={...i,...e}}}catch{}}let l=[];i[v]&&(l=await t.getSectionView(e.class,i,!0)),y&&(l=l.filter((e=>e._id!=y)));let r=[],s=e.display;return s&&s.length?s.map((t=>{const[n,o]=t.split(".");let i=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===o));i&&(i={...i},i.name=`${n}_${o}`,l=l.map((e=>(e[n]&&(e[i.name]=e[n][o]),e)))),i||(i=e.items.find((e=>e.name===n))),r.find((e=>e?.name===n))||r.push(i)})):r=e.items,{list:l,items:r}},({detail:{value:e}})=>{i(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(I(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,x="")},p,$,h,v,b,w,y,()=>l("back"),function(e){x=e,i(1,x)}]}class Vt extends we{constructor(e){var t;super(),It.getElementById("svelte-14hcfjl-style")||((t=j("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}",k(It.head,t)),be(this,e,Mt,Bt,w,{item:15,classId:16,className:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}const{document:At}=pe;function Wt(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Pt(e){let t,n,i=e[40]&&function(e){let t,n,i,l,r,s,a,c,d,u,m,f,p,$,h;n=new o({props:{class:"full-width",id:e[21],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[24]()),n.$on("onFocus",e[24](e[21]));const g=[Ht,Rt],v=[];function b(e,t){return!e[3]||e[13]?0:e[18]&&e[0]?1:-1}~(l=b(e))&&(r=v[l]=g[l](e));let w=(!e[3]||e[13])&&Ut(e);function y(t){e[32](t)}let N={class:"tModal",noClickaway:!0,$$slots:{default:[Xt]},$$scope:{ctx:e}};void 0!==e[15]&&(N.open=e[15]);m=new e[20]({props:N}),G.push((()=>$e(m,"open",y)));let S=e[16]&&en(e);return{c(){t=j("div"),he(n.$$.fragment),i=C(),r&&r.c(),s=C(),a=j("input"),d=C(),w&&w.c(),u=C(),he(m.$$.fragment),p=C(),S&&S.c(),$=q(),T(a,"class",c=x(e[6]||e[7])+" svelte-jox15l"),T(a,"id",e[4]),T(a,"name",e[4]),a.value=e[0],a.hidden=!0,B(t,"position","relative")},m(e,o){I(e,t,o),ge(n,t,null),k(t,i),~l&&v[l].m(t,null),k(t,s),k(t,a),k(t,d),w&&w.m(t,null),I(e,u,o),ge(m,e,o),I(e,p,o),S&&S.m(e,o),I(e,$,o),h=!0},p(e,o){const i={};4&o[0]&&(i.value=e[2]),2&o[0]&&(i.required=e[1]),8&o[0]&&(i.disabled=e[3]),n.$set(i);let d=l;l=b(e),l===d?~l&&v[l].p(e,o):(r&&(ae(),ue(v[d],1,1,(()=>{v[d]=null})),ce()),~l?(r=v[l],r?r.p(e,o):(r=v[l]=g[l](e),r.c()),de(r,1),r.m(t,s)):r=null),(!h||192&o[0]&&c!==(c=x(e[6]||e[7])+" svelte-jox15l"))&&T(a,"class",c),(!h||16&o[0])&&T(a,"id",e[4]),(!h||16&o[0])&&T(a,"name",e[4]),(!h||1&o[0]&&a.value!==e[0])&&(a.value=e[0]),!e[3]||e[13]?w?(w.p(e,o),8200&o[0]&&de(w,1)):(w=Ut(e),w.c(),de(w,1),w.m(t,null)):w&&(ae(),ue(w,1,1,(()=>{w=null})),ce());const u={};57249&o[0]|2048&o[1]&&(u.$$scope={dirty:o,ctx:e}),!f&&32768&o[0]&&(f=!0,u.open=e[15],te((()=>f=!1))),m.$set(u),e[16]?S?(S.p(e,o),65536&o[0]&&de(S,1)):(S=en(e),S.c(),de(S,1),S.m($.parentNode,$)):S&&(ae(),ue(S,1,1,(()=>{S=null})),ce())},i(e){h||(de(n.$$.fragment,e),de(r),de(w),de(m.$$.fragment,e),de(S),h=!0)},o(e){ue(n.$$.fragment,e),ue(r),ue(w),ue(m.$$.fragment,e),ue(S),h=!1},d(e){e&&_(t),ve(n),~l&&v[l].d(),w&&w.d(),e&&_(u),ve(m,e),e&&_(p),S&&S.d(e),e&&_($)}}}(e);return{c(){i&&i.c(),t=q()},m(e,o){i&&i.m(e,o),I(e,t,o),n=!0},p(e,t){e[40]&&i.p(e,t)},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){i&&i.d(e),e&&_(t)}}}function Rt(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Jt,then:Gt,catch:Yt,value:41,blocks:[,,,]};return me(e[28](),o),{c(){t=q(),o.block.c()},m(e,i){I(e,t,i),o.block.m(e,o.anchor=i),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){fe(o,e=t,n)},i(e){n||(de(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ue(o.blocks[e])}n=!1},d(e){e&&_(t),o.block.d(e),o.token=null,o=null}}}function Ht(e){let t,n,o,i,l;return n=new Ae({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"class","feather pointer svelte-jox15l")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=[L(t,"click",e[24]()),L(t,"choose",e[25])],i=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,v(l)}}}function Yt(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Gt(e){let t,n,o,i;return o=new Be({props:{size:"18"}}),{c(){t=j("span"),n=j("a"),he(o.$$.fragment),T(n,"href",e[41]),T(n,"target","_blank"),T(t,"class","feather pointer svelte-jox15l")},m(e,l){I(e,t,l),k(t,n),ge(o,n,null),i=!0},p:$,i(e){i||(de(o.$$.fragment,e),i=!0)},o(e){ue(o.$$.fragment,e),i=!1},d(e){e&&_(t),ve(o)}}}function Jt(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Ut(e){let t,n,o,i,l;return n=new Te({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"class","feather2 pointer svelte-jox15l")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=L(t,"click",e[27]),i=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,l()}}}function Zt(e){let t,n,o,i;const l=[Kt,Qt],r=[];function s(e,t){return e[11]?0:1}return t=s(e),n=r[t]=l[t](e),{c(){n.c(),o=q()},m(e,n){r[t].m(e,n),I(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?r[t].p(e,i):(ae(),ue(r[a],1,1,(()=>{r[a]=null})),ce(),n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),de(n,1),n.m(o.parentNode,o))},i(e){i||(de(n),i=!0)},o(e){ue(n),i=!1},d(e){r[t].d(e),e&&_(o)}}}function Qt(e){let t,n;return t=new kt({props:{schema:e[14],recID:e[0],isOpening:e[15],filterForReady:"true",selectionFields:e[10],deList:e[12],praefix:e[9]}}),t.$on("choose",e[25]),t.$on("back",e[26]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16384&n[0]&&(o.schema=e[14]),1&n[0]&&(o.recID=e[0]),32768&n[0]&&(o.isOpening=e[15]),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||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Kt(e){let t,n;return t=new Vt({props:{item:e[5],className:e[14].class,classId:e[7],rowId:e[0],recordId:e[8],viewName:e[11],viewValue:""}}),t.$on("choose",e[25]),t.$on("back",e[26]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.item=e[5]),16384&n[0]&&(o.className=e[14].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||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Xt(e){let t,n,o=e[15]&&Zt(e);return{c(){o&&o.c(),t=q()},m(e,i){o&&o.m(e,i),I(e,t,i),n=!0},p(e,n){e[15]?o?(o.p(e,n),32768&n[0]&&de(o,1)):(o=Zt(e),o.c(),de(o,1),o.m(t.parentNode,t)):o&&(ae(),ue(o,1,1,(()=>{o=null})),ce())},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&_(t)}}}function en(e){let t,n,o;function i(t){e[33](t)}let l={class:"tModal",noClickaway:!0,$$slots:{default:[nn]},$$scope:{ctx:e}};return void 0!==e[16]&&(l.open=e[16]),t=new e[20]({props:l}),G.push((()=>$e(t,"open",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};147457&o[0]|2048&o[1]&&(i.$$scope={dirty:o,ctx:e}),!n&&65536&o[0]&&(n=!0,i.open=e[16],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function tn(e){let t,n;return t=new Dl({props:{schema:e[14],recID:e[0],readonly:!0}}),t.$on("back",e[26]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16384&n[0]&&(o.schema=e[14]),1&n[0]&&(o.recID=e[0]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function nn(e){let t,n;return t=new e[19]({props:{title:e[17],$$slots:{default:[tn]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};131072&n[0]&&(o.title=e[17]),16385&n[0]|2048&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function on(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function ln(e){let t,n,o={ctx:e,current:null,token:null,hasCatch:!1,pending:on,then:Pt,catch:Wt,value:40,blocks:[,,,]};return me(e[23](),o),{c(){t=q(),o.block.c()},m(e,i){I(e,t,i),o.block.m(e,o.anchor=i),o.mount=()=>t.parentNode,o.anchor=t,n=!0},p(t,n){fe(o,e=t,n)},i(e){n||(de(o.block),n=!0)},o(e){for(let e=0;e<3;e+=1){ue(o.blocks[e])}n=!1},d(e){e&&_(t),o.block.d(e),o.token=null,o=null}}}function rn(e,n,o){let i;const l=R(),{Dialog:r,Modal:s}=c;let{id:a}=n,{item:u}=n,{value:m=""}=n,{desc:f=""}=n,{noForm:$=!1}=n,{classId:h}=n,{eventId:g}=n,{recordId:v}=n,{required:b}=n,{disabled:w}=n,{readonly:x}=n,{praefix:k}=n,{selectionFields:I}=n,{formnovalidate:_}=n,{selection:N}=n,{deList:j}=n,{isTemplate:S}=n;const F="comment_"+a;let C,q,L,E,z=!1;x||=v&&u.asInput,w||=x;const{currentTasks:T}=d;y(e,T,(e=>o(34,i=e)));const D=e=>{e&&(o(2,f=p(L,e)),l("change",{value:m,description:f}),l("task",{row:e}))},O=()=>{o(15,z=!1),o(16,C=!1)};return e.$$set=e=>{"id"in e&&o(4,a=e.id),"item"in e&&o(5,u=e.item),"value"in e&&o(0,m=e.value),"desc"in e&&o(2,f=e.desc),"noForm"in e&&o(6,$=e.noForm),"classId"in e&&o(7,h=e.classId),"eventId"in e&&o(30,g=e.eventId),"recordId"in e&&o(8,v=e.recordId),"required"in e&&o(1,b=e.required),"disabled"in e&&o(3,w=e.disabled),"readonly"in e&&o(29,x=e.readonly),"praefix"in e&&o(9,k=e.praefix),"selectionFields"in e&&o(10,I=e.selectionFields),"formnovalidate"in e&&o(31,_=e.formnovalidate),"selection"in e&&o(11,N=e.selection),"deList"in e&&o(12,j=e.deList),"isTemplate"in e&&o(13,S=e.isTemplate)},e.$$.update=()=>{2&e.$$.dirty[0]|1&e.$$.dirty[1]&&o(1,b=b&&!_),16417&e.$$.dirty[0]&&m&&L&&Promise.resolve(Sl(u.refClass,L.id,m)).then((e=>D(e))),16385&e.$$.dirty[0]&&!m&&L&&D({})},[m,b,f,w,a,u,$,h,v,k,I,N,j,S,L,z,C,q,E,r,s,F,T,async()=>{try{if(o(14,L=await t.getSchemaByClass(u.refClass)),o(18,E=(e=>!i?.length||!!i.find((t=>t===e)))(L.id)),g&&v&&m&&!w){const e=await t.getSchema(g);e.input?.find((e=>e===u.refClass))&&o(3,w=!0)}return o(17,q=L.identity.designation),!0}catch{return l("initFail",!0),!1}},e=>t=>{if("BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}o(15,z=!0)},({detail:e})=>{o(0,m=e.row._id),O()},O,()=>{E&&(o(0,m=o(2,f="")),l("change",{value:m,description:f}),l("task",{row:{_task:{event:L.id,_id:!1}}}))},async()=>{if(!m)return;const e=await Sl(u.refClass,L.id,m),t=e._task._id;return`/task/${e._task.event}/${t}/task?view=standalone`},x,g,_,function(e){z=e,o(15,z)},function(e){C=e,o(16,C)}]}class sn extends we{constructor(e){var t;super(),At.getElementById("svelte-jox15l-style")||((t=j("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}",k(At.head,t)),be(this,e,rn,ln,w,{id:4,item:5,value:0,desc:2,noForm:6,classId:7,eventId:30,recordId:8,required:1,disabled:3,readonly:29,praefix:9,selectionFields:10,formnovalidate:31,selection:11,deList:12,isTemplate:13},[-1,-1])}}function an(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=j("div"),he(n.$$.fragment),B(t,"position","relative"),B(t,"max-width","10em")},m(e,i){I(e,t,i),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||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n)}}}function cn(e,t,n){let o;const l=R(),{TextField:r}=c;let{id:s}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t,{formnovalidate:p}=t;const $=JSON.parse(i.getItem("Locale")),h=Number("1.1").toLocaleString($.id).substring(1,2),{properties:g={}}=a;let{min:v,max:b,step:w,pattern:y,decimals:x=0,unit:k="",placeholder:I,hint:_,readonly:N,negative:j,required:S=!1}=g;y||(y=x?`[0-9]+([${h}][0-9]{1,${x}})?`:"[0-9]*"),j&&(y="-?"+y);return e.$$set=e=>{"id"in e&&n(0,s=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,S=S&&!p),32768&e.$$.dirty&&n(6,o=Number(d.toString().replace(h,".")).toFixed(x).toString().replace(".",h))},[s,u,m,f,S,y,o,r,$,w,I,N,({detail:e})=>l("blur",{value:e.value}),({detail:e})=>{N||Number(d.toString().replace(h,"."))||n(6,o="")},a,d,p]}class dn extends we{constructor(e){super(),be(this,e,cn,an,w,{id:0,item:14,value:15,noForm:1,classId:2,disabled:3,formnovalidate:16})}}const{document:un}=pe;function mn(e){e[32]=e[34].list,e[33]=e[34].items}function fn(e,t,n){const o=e.slice();return o[35]=t[n],o[37]=n,o}function pn(e,t,n){const o=e.slice();return o[38]=t[n],o[40]=n,o}function $n(e,t,n){const o=e.slice();return o[38]=t[n],o}function hn(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function gn(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g,v,b;mn(e),n=new e[8]({props:{outline:!0,$$slots:{default:[vn]},$$scope:{ctx:e}}}),n.$on("click",e[29]);let w=!e[1]&&bn(e);function y(t){e[30](t)}let x={id:e[11]};void 0!==e[2]&&(x.value=e[2]),s=new e[6]({props:x}),G.push((()=>$e(s,"value",y))),s.$on("input",e[14]),u=new Te({props:{size:"18"}});let S=e[33]?.length&&function(e){let t,n,o,i,l=!e[1]&&yn(e),r=e[33],s=[];for(let t=0;t<r.length;t+=1)s[t]=xn($n(e,r,t));return{c(){t=j("thead"),n=j("tr"),l&&l.c(),o=C();for(let e=0;e<s.length;e+=1)s[e].c();T(n,"class","svelte-1m010ne"),T(t,"class","svelte-1m010ne")},m(e,r){I(e,t,r),k(t,n),l&&l.m(n,null),k(n,o);for(let e=0;e<s.length;e+=1)s[e].m(n,null);i=!0},p(e,t){if(e[1]?l&&(ae(),ue(l,1,1,(()=>{l=null})),ce()):l?(l.p(e,t),2&t[0]&&de(l,1)):(l=yn(e),l.c(),de(l,1),l.m(n,o)),8192&t[0]){let o;for(r=e[33],o=0;o<r.length;o+=1){const i=$n(e,r,o);s[o]?s[o].p(i,t):(s[o]=xn(i),s[o].c(),s[o].m(n,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=r.length}},i(e){i||(de(l),i=!0)},o(e){ue(l),i=!1},d(e){e&&_(t),l&&l.d(),N(s,e)}}}(e),E=e[32]?.length&&function(e){let t,n,o=e[32],i=[];for(let t=0;t<o.length;t+=1)i[t]=jn(fn(e,o,t));const l=e=>ue(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=q()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(569359&n[0]){let r;for(o=e[32],r=0;r<o.length;r+=1){const l=fn(e,o,r);i[r]?(i[r].p(l,n),de(i[r],1)):(i[r]=jn(l),i[r].c(),de(i[r],1),i[r].m(t.parentNode,t))}for(ae(),r=o.length;r<i.length;r+=1)l(r);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ue(i[e]);n=!1},d(e){N(i,e),e&&_(t)}}}(e);return{c(){t=j("div"),he(n.$$.fragment),o=C(),w&&w.c(),i=C(),l=j("div"),r=F("Suchen: "),he(s.$$.fragment),c=C(),d=j("span"),he(u.$$.fragment),m=C(),f=j("div"),p=j("table"),S&&S.c(),$=C(),h=j("tbody"),E&&E.c(),T(t,"class","form--buttons svelte-1m010ne"),T(d,"class","feather pointer svelte-1m010ne"),B(l,"margin-bottom","1em"),B(l,"position","relative"),T(p,"striped",""),T(p,"class","svelte-1m010ne"),T(f,"class","eList svelte-1m010ne")},m(a,y){I(a,t,y),ge(n,t,null),k(t,o),w&&w.m(t,null),I(a,i,y),I(a,l,y),k(l,r),ge(s,l,null),k(l,c),k(l,d),ge(u,d,null),I(a,m,y),I(a,f,y),k(f,p),S&&S.m(p,null),k(p,$),k(p,h),E&&E.m(h,null),g=!0,v||(b=L(d,"click",e[16]),v=!0)},p(e,o){mn(e);const i={};4096&o[1]&&(i.$$scope={dirty:o,ctx:e}),n.$set(i),e[1]?w&&(ae(),ue(w,1,1,(()=>{w=null})),ce()):w?(w.p(e,o),2&o[0]&&de(w,1)):(w=bn(e),w.c(),de(w,1),w.m(t,null));const l={};!a&&4&o[0]&&(a=!0,l.value=e[2],te((()=>a=!1))),s.$set(l),e[33]?.length&&S.p(e,o),e[32]?.length&&E.p(e,o)},i(e){g||(de(n.$$.fragment,e),de(w),de(s.$$.fragment,e),de(u.$$.fragment,e),de(S),de(E),g=!0)},o(e){ue(n.$$.fragment,e),ue(w),ue(s.$$.fragment,e),ue(u.$$.fragment,e),ue(S),ue(E),g=!1},d(e){e&&_(t),ve(n),w&&w.d(),e&&_(i),e&&_(l),ve(s),ve(u),e&&_(m),e&&_(f),S&&S.d(),E&&E.d(),v=!1,b()}}}function vn(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function bn(e){let t,n;return t=new e[8]({props:{disabled:!e[32].length,filled:!0,$$slots:{default:[wn]},$$scope:{ctx:e}}}),t.$on("click",e[17](e[32])),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};4096&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function wn(e){let t;return{c(){t=F("Bestätigen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function yn(e){let t,n,o,i,l;return n=new Ne({props:{size:"20"}}),{c(){t=j("th"),he(n.$$.fragment),T(t,"class","svelte-1m010ne")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=L(t,"click",e[18](e[32])),i=!0)},p(t,n){e=t},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,l()}}}function xn(e){let t,n,o=e[38]+"";return{c(){t=j("th"),n=F(o),T(t,"class","svelte-1m010ne")},m(e,o){I(e,t,o),k(t,n)},p:$,d(e){e&&_(t)}}}function kn(e){let t,n,o,i,l,r,s,a=e[0],c=_n(e),d=e[33],u=[];for(let t=0;t<d.length;t+=1)u[t]=Nn(pn(e,d,t));return{c(){t=j("tr"),c.c(),n=C();for(let e=0;e<u.length;e+=1)u[e].c();o=C(),T(t,"style",i=e[1]?"cursor: default;":"cursor: zoom-in;"),T(t,"title","übernimmt den Wert direkt"),T(t,"class","svelte-1m010ne"),M(t,"active",e[0].includes(e[35]))},m(i,a){I(i,t,a),c.m(t,null),k(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);k(t,o),l=!0,r||(s=L(t,"click",e[19](e[35])),r=!0)},p(r,s){if(e=r,1&s[0]&&w(a,a=e[0])?(ae(),ue(c,1,1,$),ce(),c=_n(e),c.c(),de(c),c.m(t,n)):c.p(e,s),8200&s[0]){let n;for(d=e[33],n=0;n<d.length;n+=1){const i=pn(e,d,n);u[n]?u[n].p(i,s):(u[n]=Nn(i),u[n].c(),u[n].m(t,o))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!l||2&s[0]&&i!==(i=e[1]?"cursor: default;":"cursor: zoom-in;"))&&T(t,"style",i),8193&s[0]&&M(t,"active",e[0].includes(e[35]))},i(e){l||(de(c),l=!0)},o(e){ue(c),l=!1},d(e){e&&_(t),c.d(e),N(u,e),r=!1,s()}}}function In(e){let t,n,o;return n=new e[10]({props:{name:e[12],data:e[37],checked:e[0].includes(e[35]),round:!0}}),{c(){t=j("td"),he(n.$$.fragment),T(t,"title","Wählt den Wert aus"),T(t,"class","svelte-1m010ne")},m(e,i){I(e,t,i),ge(n,t,null),o=!0},p(e,t){const o={};1&t[0]&&(o.checked=e[0].includes(e[35])),n.$set(o)},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n)}}}function _n(e){let t,n,o=!e[1]&&In(e);return{c(){o&&o.c(),t=q()},m(e,i){o&&o.m(e,i),I(e,t,i),n=!0},p(e,n){e[1]?o&&(ae(),ue(o,1,1,(()=>{o=null})),ce()):o?(o.p(e,n),2&n[0]&&de(o,1)):(o=In(e),o.c(),de(o,1),o.m(t.parentNode,t))},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&_(t)}}}function Nn(e){let t,n,o=(e[3][e[37]]?e[3][e[37]][e[40]]:e[35])+"";return{c(){t=j("td"),n=F(o),T(t,"class","svelte-1m010ne")},m(e,o){I(e,t,o),k(t,n)},p(e,t){8&t[0]&&o!==(o=(e[3][e[37]]?e[3][e[37]][e[40]]:e[35])+"")&&D(n,o)},d(e){e&&_(t)}}}function jn(e){let t,n,o=e[15](e[35],e[2]),i=o&&kn(e);return{c(){i&&i.c(),t=q()},m(e,o){i&&i.m(e,o),I(e,t,o),n=!0},p(e,n){4&n[0]&&(o=e[15](e[35],e[2])),o?i?(i.p(e,n),4&n[0]&&de(i,1)):(i=kn(e),i.c(),de(i,1),i.m(t.parentNode,t)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce())},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){i&&i.d(e),e&&_(t)}}}function Sn(e){let t,n;return t=new e[5]({}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:$,i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Fn(e){let t,n,o,i;t=new e[9]({});let l={ctx:e,current:null,token:null,hasCatch:!1,pending:Sn,then:gn,catch:hn,value:34,blocks:[,,,]};return me(e[13](),l),{c(){he(t.$$.fragment),n=C(),o=q(),l.block.c()},m(e,r){ge(t,e,r),I(e,n,r),I(e,o,r),l.block.m(e,l.anchor=r),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(t,n){fe(l,e=t,n)},i(e){i||(de(t.$$.fragment,e),de(l.block),i=!0)},o(e){ue(t.$$.fragment,e);for(let e=0;e<3;e+=1){ue(l.blocks[e])}i=!1},d(e){ve(t,e),e&&_(n),e&&_(o),l.block.d(e),l.token=null,l=null}}}function Cn(e){let t,n;return t=new e[7]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Fn]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};15&n[0]|4096&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function qn(e,n,o){const i=R(),{Loading:l,TextField:r,Dialog:s,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=n,{id:f}=n,{selection:p}=n,{tableName:$}=n,{idName:h}=n,{target:g}=n,{view:v}=n,{unique:b}=n,{uniqueView:w}=n,{status:y}=n,{single:x}=n;p||=[];let k="",I=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",_=[];const N=$+h+g+"checkbox",j=(e,t)=>e>t?1:t>e?-1:0;return e.$$set=e=>{"classId"in e&&o(20,m=e.classId),"id"in e&&o(21,f=e.id),"selection"in e&&o(0,p=e.selection),"tableName"in e&&o(22,$=e.tableName),"idName"in e&&o(23,h=e.idName),"target"in e&&o(24,g=e.target),"view"in e&&o(25,v=e.view),"unique"in e&&o(26,b=e.unique),"uniqueView"in e&&o(27,w=e.uniqueView),"status"in e&&o(28,y=e.status),"single"in e&&o(1,x=e.single)},[p,x,k,_,i,l,r,s,a,d,u,I,N,async()=>{let e,n,i=[];if(o(3,_=[]),h)if(v){const o=m.split("-")[1].slice(0,-4),i="input."+m+"[name='_id']",l=document.querySelector(i).value;n={[h]:f},y&&(n.$or=[{status:!0},{[o]:l}]),e=await t.getSectionView($,n),e=e.sort(((e,t)=>{const n=e=>(e[o]||"z").toString()+e[g];return j(n(e),n(t))}))}else w?(n={[h]:f,status:!0},Object.entries(w).map((([e,t])=>{t?.length&&(n[e]={$in:t}),i.push(e)})),e=await t.getSectionView($,n),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[g])?"0-":"1-")+e[g];return j(n(e),n(t))})),o(3,_=e.map((e=>{const t=[e[g]];return i.map((n=>t.push(e[n]))),t})))):b?(e=await t.getSection($,h,f,b),e=e.sort(((e,t)=>j(e,t)))):(e=await t.getSection($,h,f),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[g])?"0-":"1-")+e[g];return j(n(e),n(t))})));else n={_id:f},e=await t.getSectionView($,n);const l=[];e.map((e=>l.push(e[g]||[])));const r=await t.getSchemaByClass($),s=r.items.find((e=>e.name===g))?.designation;return i=i.map((e=>r.items.find((t=>t.name===e))?.designation)),{list:l.flat(),items:[s,...i]}},({detail:{value:e}})=>{o(2,k=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{o(2,k="")},e=>()=>{const t=document.getElementsByName(N),n=[];t.forEach(((t,o)=>{t.checked&&n.push(e[+t.attributes.data.value])})),i("choose",{list:n})},e=>()=>{document.getElementsByName(N).forEach(((e,t)=>{e.checked=!e.checked}))},e=>t=>{"TD"===t.target?.nodeName&&(x?i("choose",{list:[].concat(e)}):(o(0,p=p.includes(e)?p.filter((t=>t!==e)):p.concat(e)),i("choose",{list:p})))},m,f,$,h,g,v,b,w,y,()=>i("back"),function(e){k=e,o(2,k)}]}class Ln extends we{constructor(e){var t;super(),un.getElementById("svelte-1m010ne-style")||((t=j("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}",k(un.head,t)),be(this,e,qn,Cn,w,{classId:20,id:21,selection:0,tableName:22,idName:23,target:24,view:25,unique:26,uniqueView:27,status:28,single:1},[-1,-1])}}const{document:En}=pe;function zn(e){let t,n,o,i,l,r=e[7].length+"";return{c(){t=j("span"),n=F("("),o=F(r),i=F(")"),T(t,"class",l=x(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,l){I(e,t,l),k(t,n),k(t,o),k(t,i)},p(e,n){128&n[0]&&r!==(r=e[7].length+"")&&D(o,r),2&n[0]&&l!==(l=x(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&T(t,"class",l)},d(e){e&&_(t)}}}function Tn(e){let t;return{c(){t=j("div"),T(t,"class","load-more-options"),T(t,"slot","load-more-options-message slot")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Dn(e){let t,n,o,i;const l=[Mn,Bn,On],r=[];function s(e,t){return!e[16].single&&e[7].length?0:e[17]?1:e[14]&&e[16].view?2:-1}return~(t=s(e))&&(n=r[t]=l[t](e)),{c(){n&&n.c(),o=q()},m(e,n){~t&&r[t].m(e,n),I(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?~t&&r[t].p(e,i):(n&&(ae(),ue(r[a],1,1,(()=>{r[a]=null})),ce()),~t?(n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),de(n,1),n.m(o.parentNode,o)):n=null)},i(e){i||(de(n),i=!0)},o(e){ue(n),i=!1},d(e){~t&&r[t].d(e),e&&_(o)}}}function On(e){let t,n,o,i,l;return n=new ke({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"title","Übernehmen"),T(t,"class","feather pointer svelte-1rbaejz")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=L(t,"click",e[25]),i=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,l()}}}function Bn(e){let t,n,o,i,l;return n=new Fe({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"title",e[17].title||"Generieren"),T(t,"class","feather pointer svelte-1rbaejz")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=L(t,"click",e[24]),i=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,l()}}}function Mn(e){let t,n,o,i,l;return n=new Te({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"title","Löschen"),T(t,"class","feather pointer svelte-1rbaejz")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=L(t,"click",e[26]),i=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,l()}}}function Vn(e){let t,n,o;function i(t){e[33](t)}let l={class:"tModal",noClickaway:!0,$$slots:{default:[An]},$$scope:{ctx:e}};return void 0!==e[10]&&(l.open=e[10]),t=new e[11]({props:l}),G.push((()=>$e(t,"open",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};53&o[0]|1024&o[1]&&(i.$$scope={dirty:o,ctx:e}),!n&&1024&o[0]&&(n=!0,i.open=e[10],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function An(e){let t,n;return t=new Ln({props:{classId:e[2],selection:e[0],view:e[15],status:e[18],unique:e[16].unique&&e[4].name,uniqueView:e[16].view&&{[e[16].view]:e[5][e[16].view]},id:e[5][e[20]||e[19]],tableName:e[19],idName:e[20],target:e[4].name,single:e[16].single}}),t.$on("choose",e[23]),t.$on("back",e[22]),{c(){he(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[20]||e[19]]),16&n[0]&&(o.target=e[4].name),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Wn(e){let t,n,o,i,l,r,s,a,c,d=!e[16].single&&e[7].length&&zn(e);function u(t){e[31](t)}function m(t){e[32](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:Pn,minSearchLength:"3",$$slots:{"load-more-options-message slot":[Tn]},$$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}),G.push((()=>$e(o,"selection",u))),G.push((()=>$e(o,"maxOptions",m))),o.$on("change",e[21]);let p=!e[1]&&Dn(e),$=e[10]&&Vn(e);return{c(){t=j("div"),d&&d.c(),n=C(),he(o.$$.fragment),r=C(),p&&p.c(),s=C(),$&&$.c(),a=q(),B(t,"position","relative")},m(e,i){I(e,t,i),d&&d.m(t,null),k(t,n),ge(o,t,null),k(t,r),p&&p.m(t,null),I(e,s,i),$&&$.m(e,i),I(e,a,i),c=!0},p(e,r){!e[16].single&&e[7].length?d?d.p(e,r):(d=zn(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const s={};8&r[0]&&(s.id=e[3]),8&r[0]&&(s.name=e[3]),8&r[0]&&(s.class=e[3]),2&r[0]&&(s.disabled=e[1]),64&r[0]&&(s.required=e[6]),256&r[0]&&(s.placeholder=e[8]),1024&r[1]&&(s.$$scope={dirty:r,ctx:e}),!i&&128&r[0]&&(i=!0,s.selection=e[7],te((()=>i=!1))),!l&&512&r[0]&&(l=!0,s.maxOptions=e[9],te((()=>l=!1))),o.$set(s),e[1]?p&&(ae(),ue(p,1,1,(()=>{p=null})),ce()):p?(p.p(e,r),2&r[0]&&de(p,1)):(p=Dn(e),p.c(),de(p,1),p.m(t,null)),e[10]?$?($.p(e,r),1024&r[0]&&de($,1)):($=Vn(e),$.c(),de($,1),$.m(a.parentNode,a)):$&&(ae(),ue($,1,1,(()=>{$=null})),ce())},i(e){c||(de(o.$$.fragment,e),de(p),de($),c=!0)},o(e){ue(o.$$.fragment,e),ue(p),ue($),c=!1},d(e){e&&_(t),d&&d.d(),ve(o),p&&p.d(),e&&_(s),$&&$.d(e),e&&_(a)}}}async function*Pn(e){yield[{name:e}]}function Rn(e,n,o){const i=R(),{Modal:l,Autocomplete:r}=c;let{classId:s}=n,{id:a}=n,{item:d}=n,{record:u}=n,{value:m}=n,{noForm:f=!1}=n,{disabled:p}=n,{formnovalidate:$}=n,{numberInput:h}=n,{praefix:g}=n;const{properties:v={}}=d;let{placeholder:b,hint:w,readonly:y,required:x=!1,lookup:k="",view:I=!1,multi:_,max:N=1e3,generate:j=!1,status:S=!0}=v;const[F,C]=k.split(":");let q=!1,L=m.map&&m.map((e=>({name:e})))||[];p||=y,p&&(b="");P((async()=>{const e=document.getElementById(a);e.classList.add(s),!y&&k&&e.addEventListener("focus",E)}));const E=()=>{if(k){document.getElementById(a).blur(),(_.unique||L.length<N)&&o(10,q=!0)}},z=()=>{o(10,q&&=!1)},T=({detail:e})=>{o(7,L=e.list.map((e=>({name:e})))),i("blur",{value:e.list}),i("multi",{view:_.view,lookup:k,value:e.list}),z()},D=async()=>{const e={[C]:u[C]},n=await t.getSectionView(F,e),o=Array.from({length:n.length},((e,t)=>n[t][d.name]));T({detail:{list:o}})},O=(e=!1)=>{if(p||!_.required)return;const t=_.maxItem;if(!t||_.unique)return;o(9,N=!1!==e?e:u[t]||0);const n=L.length!=N,l=document.getElementById(a);l?.classList?.toggle("invalid",n),i("invalid",{idx:g,value:n})};return e.$$set=e=>{"classId"in e&&o(2,s=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(27,f=e.noForm),"disabled"in e&&o(1,p=e.disabled),"formnovalidate"in e&&o(28,$=e.formnovalidate),"numberInput"in e&&o(29,h=e.numberInput),"praefix"in e&&o(30,g=e.praefix)},e.$$.update=()=>{128&e.$$.dirty[0]&&L&&(o(0,m=L.map&&L.map((e=>e.name))||[]),O()),536870912&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:o}=e;void 0!==g&&g!==o||t&&t.name===_.maxItem&&O(n)})(h),268435520&e.$$.dirty[0]&&o(6,x=x&&!$)},[m,p,s,a,d,u,x,L,b,N,q,l,r,y,k,I,_,j,S,F,C,({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()})))),i("blur",{value:L.map((e=>e.name))}),i("multi",{view:_.view,lookup:k,value:L.map((e=>e.name))})},z,T,()=>{const e=u[j.itemQuantity];if(!e)return;const t=j.prefix||"",n=u[j.variable]||"",o=j.len||5,i=Array.from({length:e},((e,i)=>t+n+"-"+i.toString().padStart(o,"0")));T({detail:{list:i}})},async()=>{if(!0===I)return D();const e=u[_.maxItem];if(!e)return;const n={[C]:u[C],status:!0},o=[].concat(u[_.view]||[]);o.length&&(n[_.view]={$in:o});const i=await t.getSectionView(F,n),l=Array.from({length:e<i.length?e:i.length},((e,t)=>i[t][d.name]));T({detail:{list:l}})},()=>{T({detail:{list:[]}})},f,$,h,g,function(e){L=e,o(7,L)},function(e){N=e,o(9,N)},function(e){q=e,o(10,q)}]}class Hn extends we{constructor(e){var t;super(),En.getElementById("svelte-1rbaejz-style")||((t=j("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}",k(En.head,t)),be(this,e,Rn,Wn,w,{classId:2,id:3,item:4,record:5,value:0,noForm:27,disabled:1,formnovalidate:28,numberInput:29,praefix:30},[-1,-1])}}const{document:Yn}=pe;function Gn(e){e[26]=e[28].list,e[27]=e[28].items}function Jn(e,t,n){const o=e.slice();return o[29]=t[n],o}function Un(e,t,n){const o=e.slice();return o[32]=t[n],o}function Zn(e,t,n){const o=e.slice();return o[32]=t[n],o}function Qn(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Kn(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g,v;function b(t){e[23](t)}Gn(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Xn]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),r=new e[6]({props:w}),G.push((()=>$e(r,"value",b))),r.$on("input",e[12]),d=new Te({props:{size:"18"}});let y=e[27]?.length&&function(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=eo(Zn(e,o,t));return{c(){t=j("thead"),n=j("tr");for(let e=0;e<i.length;e+=1)i[e].c();T(n,"class","svelte-14hcfjl"),T(t,"class","svelte-14hcfjl")},m(e,o){I(e,t,o),k(t,n);for(let e=0;e<i.length;e+=1)i[e].m(n,null)},p(e,t){if(2048&t[0]){let l;for(o=e[27],l=0;l<o.length;l+=1){const r=Zn(e,o,l);i[l]?i[l].p(r,t):(i[l]=eo(r),i[l].c(),i[l].m(n,null))}for(;l<i.length;l+=1)i[l].d(1);i.length=o.length}},d(e){e&&_(t),N(i,e)}}}(e),x=e[26]?.length&&function(e){let t,n=e[26],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=q()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);I(e,t,n)},p(e,i){if(11779&i[0]){let l;for(n=e[26],l=0;l<n.length;l+=1){const r=Jn(e,n,l);o[l]?o[l].p(r,i):(o[l]=oo(r),o[l].c(),o[l].m(t.parentNode,t))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(e){N(o,e),e&&_(t)}}}(e);return{c(){t=j("div"),he(n.$$.fragment),o=C(),i=j("div"),l=F("Suchen: "),he(r.$$.fragment),a=C(),c=j("span"),he(d.$$.fragment),u=C(),m=j("div"),f=j("table"),y&&y.c(),p=C(),$=j("tbody"),x&&x.c(),T(t,"class","form--buttons svelte-14hcfjl"),T(c,"class","feather pointer svelte-14hcfjl"),B(i,"margin-bottom","1em"),B(i,"position","relative"),T(f,"striped",""),T(f,"class","svelte-14hcfjl"),T(m,"class","eList svelte-14hcfjl")},m(s,b){I(s,t,b),ge(n,t,null),I(s,o,b),I(s,i,b),k(i,l),ge(r,i,null),k(i,a),k(i,c),ge(d,c,null),I(s,u,b),I(s,m,b),k(m,f),y&&y.m(f,null),k(f,p),k(f,$),x&&x.m($,null),h=!0,g||(v=L(c,"click",e[14]),g=!0)},p(e,t){Gn(e);const o={};64&t[1]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const i={};!s&&2&t[0]&&(s=!0,i.value=e[1],te((()=>s=!1))),r.$set(i),e[27]?.length&&y.p(e,t),e[26]?.length&&x.p(e,t)},i(e){h||(de(n.$$.fragment,e),de(r.$$.fragment,e),de(d.$$.fragment,e),h=!0)},o(e){ue(n.$$.fragment,e),ue(r.$$.fragment,e),ue(d.$$.fragment,e),h=!1},d(e){e&&_(t),ve(n),e&&_(o),e&&_(i),ve(r),ve(d),e&&_(u),e&&_(m),y&&y.d(),x&&x.d(),g=!1,v()}}}function Xn(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function eo(e){let t,n,o=e[32]?.designation+"";return{c(){t=j("th"),n=F(o),T(t,"class","svelte-14hcfjl")},m(e,o){I(e,t,o),k(t,n)},p:$,d(e){e&&_(t)}}}function to(e){let t,n,o=e[27],i=[];for(let t=0;t<o.length;t+=1)i[t]=no(Un(e,o,t));return{c(){t=j("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=C(),T(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[29]._id===e[0])},m(e,o){I(e,t,o);for(let e=0;e<i.length;e+=1)i[e].m(t,null);k(t,n)},p(e,l){if(3584&l[0]){let r;for(o=e[27],r=0;r<o.length;r+=1){const s=Un(e,o,r);i[r]?i[r].p(s,l):(i[r]=no(s),i[r].c(),i[r].m(t,n))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}2049&l[0]&&M(t,"active",e[29]._id===e[0])},d(e){e&&_(t),N(i,e)}}}function no(e){let t,n,o,i,l=e[9](e[29],e[32])+"";return{c(){t=j("td"),n=F(l),T(t,"class","svelte-14hcfjl")},m(l,r){I(l,t,r),k(t,n),o||(i=L(t,"click",z(e[10](e[29]))),o=!0)},p(t,n){e=t},d(e){e&&_(t),o=!1,i()}}}function oo(e){let t,n=e[13](e[29],e[27],e[1]),o=n&&to(e);return{c(){o&&o.c(),t=q()},m(e,n){o&&o.m(e,n),I(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[29],e[27],e[1])),n?o?o.p(e,i):(o=to(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(e){o&&o.d(e),e&&_(t)}}}function io(e){let t,n;return t=new e[5]({}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p:$,i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function lo(e){let t,n,o,i;t=new e[4]({});let l={ctx:e,current:null,token:null,hasCatch:!1,pending:io,then:Kn,catch:Qn,value:28,blocks:[,,,]};return me(e[11](),l),{c(){he(t.$$.fragment),n=C(),o=q(),l.block.c()},m(e,r){ge(t,e,r),I(e,n,r),I(e,o,r),l.block.m(e,l.anchor=r),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(t,n){fe(l,e=t,n)},i(e){i||(de(t.$$.fragment,e),de(l.block),i=!0)},o(e){ue(t.$$.fragment,e);for(let e=0;e<3;e+=1){ue(l.blocks[e])}i=!1},d(e){ve(t,e),e&&_(n),e&&_(o),l.block.d(e),l.token=null,l=null}}}function ro(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[lo]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};3&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function so(e,o,i){const l=R(),{Dialog:r,Divider:s,Loading:a,TextField:d,Button:m}=c;let{item:p}=o,{className:$}=o,{classId:h}=o,{rowId:g}=o,{viewName:v}=o,{viewValue:b}=o,{recordId:w}=o,{filter:y}=o,x="",k=h+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?f(n):u(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass($);P((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&Ll(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&i(15,p=e.item),"className"in e&&i(16,$=e.className),"classId"in e&&i(17,h=e.classId),"rowId"in e&&i(0,g=e.rowId),"viewName"in e&&i(18,v=e.viewName),"viewValue"in e&&i(19,b=e.viewValue),"recordId"in e&&i(20,w=e.recordId),"filter"in e&&i(21,y=e.filter)},[g,x,l,r,s,a,d,m,k,I,e=>()=>l("choose",{row:e}),async()=>{const e=await _,n="."+h+"#"+v;document.querySelector(n);let o={[v]:b},i=[];o[v]&&(i=await t.getSectionView(e.class,o,!0)),y&&(i=i.filter((e=>e._id!=y)));let l=[],r=e.display;return r&&r.length?r.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))),l.find((e=>e?.name===n))||l.push(r)})):l=e.items,{list:i,items:l}},({detail:{value:e}})=>{i(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const o of t)if(I(e,o)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,x="")},p,$,h,v,b,w,y,()=>l("back"),function(e){x=e,i(1,x)}]}class ao extends we{constructor(e){var t;super(),Yn.getElementById("svelte-14hcfjl-style")||((t=j("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}",k(Yn.head,t)),be(this,e,so,ro,w,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function co(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function uo(e){let t,n,o,i,l;function r(t){e[21](t)}let s={id:e[2],name:e[3].name,inputClass:e[5]||e[1],disabled:e[6],formnovalidate:e[7],readonly:e[13],pattern:e[12],required:e[14],style:"padding-left:2em;"};void 0!==e[0]&&(s.value=e[0]),n=new e[10]({props:s}),G.push((()=>$e(n,"value",r)));let a=!e[6]&&mo(e);return{c(){t=j("div"),he(n.$$.fragment),i=C(),a&&a.c(),B(t,"position","relative")},m(e,o){I(e,t,o),ge(n,t,null),k(t,i),a&&a.m(t,null),l=!0},p(e,i){const l={};4&i&&(l.id=e[2]),8&i&&(l.name=e[3].name),34&i&&(l.inputClass=e[5]||e[1]),64&i&&(l.disabled=e[6]),128&i&&(l.formnovalidate=e[7]),!o&&1&i&&(o=!0,l.value=e[0],te((()=>o=!1))),n.$set(l),e[6]?a&&(ae(),ue(a,1,1,(()=>{a=null})),ce()):a?(a.p(e,i),64&i&&de(a,1)):(a=mo(e),a.c(),de(a,1),a.m(t,null))},i(e){l||(de(n.$$.fragment,e),de(a),l=!0)},o(e){ue(n.$$.fragment,e),ue(a),l=!1},d(e){e&&_(t),ve(n),a&&a.d()}}}function mo(e){let t,n,o,i,l;return n=new Ae({props:{size:"18"}}),{c(){t=j("span"),he(n.$$.fragment),T(t,"class","feather pointer svelte-wbrqzu")},m(r,s){I(r,t,s),ge(n,t,null),o=!0,i||(l=L(t,"click",e[17]),i=!0)},p:$,i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n),i=!1,l()}}}function fo(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function po(e){let t,n,o;function i(t){e[22](t)}let l={class:"tModal",noClickaway:!0,$$slots:{default:[$o]},$$scope:{ctx:e}};return void 0!==e[8]&&(l.open=e[8]),t=new e[11]({props:l}),G.push((()=>$e(t,"open",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};268435994&o&&(i.$$scope={dirty:o,ctx:e}),!n&&256&o&&(n=!0,i.open=e[8],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function $o(e){let t,n;return t=new ao({props:{item:e[3],className:e[3].refClass,classId:e[1],rowId:"",recordId:e[4]._id,viewName:e[15].selection,viewValue:e[9],filter:e[4]._id}}),t.$on("choose",e[18]),t.$on("back",e[19]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};8&n&&(o.item=e[3]),8&n&&(o.className=e[3].refClass),2&n&&(o.classId=e[1]),16&n&&(o.recordId=e[4]._id),512&n&&(o.viewValue=e[9]),16&n&&(o.filter=e[4]._id),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ho(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:fo,then:uo,catch:co,value:27,blocks:[,,,]};me(e[16](),i);let l=e[8]&&po(e);return{c(){i.block.c(),t=C(),l&&l.c(),n=q()},m(e,r){i.block.m(e,i.anchor=r),i.mount=()=>t.parentNode,i.anchor=t,I(e,t,r),l&&l.m(e,r),I(e,n,r),o=!0},p(t,[o]){fe(i,e=t,o),e[8]?l?(l.p(e,o),256&o&&de(l,1)):(l=po(e),l.c(),de(l,1),l.m(n.parentNode,n)):l&&(ae(),ue(l,1,1,(()=>{l=null})),ce())},i(e){o||(de(i.block),de(l),o=!0)},o(e){for(let e=0;e<3;e+=1){ue(i.blocks[e])}ue(l),o=!1},d(e){i.block.d(e),i.token=null,i=null,e&&_(t),l&&l.d(e),e&&_(n)}}}function go(e,t,n){const{TextField:o,Modal:i}=c;let{classId:l}=t,{id:r}=t,{item:s}=t,{record:a}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:m}=t,{formnovalidate:f}=t,{praefix:p}=t;const{properties:$={}}=s;let h,{pattern:g,placeholder:v,readonly:b,required:w=!1,view:y}=$,x=!1;const k=()=>{n(8,x=!1)};return e.$$set=e=>{"classId"in e&&n(1,l=e.classId),"id"in e&&n(2,r=e.id),"item"in e&&n(3,s=e.item),"record"in e&&n(4,a=e.record),"value"in e&&n(0,d=e.value),"noForm"in e&&n(5,u=e.noForm),"disabled"in e&&n(6,m=e.disabled),"formnovalidate"in e&&n(7,f=e.formnovalidate),"praefix"in e&&n(20,p=e.praefix)},[d,l,r,s,a,u,m,f,x,h,o,i,g,b,w,y,async()=>(n(9,h=a[y.selection]),!0),()=>{n(8,x=!0)},({detail:e})=>{n(0,d=e.row[y.value?y.value:"_id"]),k()},k,p,function(e){d=e,n(0,d)},function(e){x=e,n(8,x)}]}class vo extends we{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=j("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",k(document.head,t)),be(this,e,go,ho,w,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function bo(e,t,n){const o=e.slice();return o[10]=t[n],o}function wo(e){let t,n,o,i=e[10]+"";return{c(){t=j("option"),n=F(i),t.__value=e[10],t.value=t.__value,t.selected=o=e[1]===e[10],T(t,"class","svelte-5xpzvo")},m(e,o){I(e,t,o),k(t,n)},p(e,n){2&n&&o!==(o=e[1]===e[10])&&(t.selected=o)},d(e){e&&_(t)}}}function yo(e){let t,n,o,i,l,r=e[4],s=[];for(let t=0;t<r.length;t+=1)s[t]=wo(bo(e,r,t));return{c(){t=j("select"),n=j("option");for(let e=0;e<s.length;e+=1)s[e].c();n.__value="",n.value=n.__value,T(n,"class","svelte-5xpzvo"),T(t,"class",o=x(e[2]||e[3])+" svelte-5xpzvo"),T(t,"id",e[0]),T(t,"name",e[0]),T(t,"readonly",e[5])},m(o,r){I(o,t,r),k(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);i||(l=L(t,"change",e[6]),i=!0)},p(e,[n]){if(18&n){let o;for(r=e[4],o=0;o<r.length;o+=1){const i=bo(e,r,o);s[o]?s[o].p(i,n):(s[o]=wo(i),s[o].c(),s[o].m(t,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=r.length}12&n&&o!==(o=x(e[2]||e[3])+" svelte-5xpzvo")&&T(t,"class",o),1&n&&T(t,"id",e[0]),1&n&&T(t,"name",e[0])},i:$,o:$,d(e){e&&_(t),N(s,e),i=!1,l()}}}function xo(e,t,n){const o=R();let{id:i}=t,{item:l}=t,{value:r}=t,{noForm:s=!1}=t,{classId:a}=t,{disabled:c}=t;const{enum:d}=l.properties,u=c||l.properties.readonly;return e.$$set=e=>{"id"in e&&n(0,i=e.id),"item"in e&&n(7,l=e.item),"value"in e&&n(1,r=e.value),"noForm"in e&&n(2,s=e.noForm),"classId"in e&&n(3,a=e.classId),"disabled"in e&&n(8,c=e.disabled)},[i,r,s,a,d,u,e=>o("blur",{value:e.srcElement.value}),l,c]}class ko extends we{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=j("style")).id="svelte-5xpzvo-style",t.textContent="select.svelte-5xpzvo.svelte-5xpzvo{padding:0 0.625em 0.0625em;box-sizing:border-box;width:100%;border:0 solid rgba(0, 0, 0, 0.42);border-bottom-width:0px;border-bottom-width:0.0625em;border-top-left-radius:0.375em;border-top-right-radius:0.375em;background-color:#f5f5f5;outline:none;font-size:1rem;font-weight:300;height:2.8em}select.svelte-5xpzvo.svelte-5xpzvo:focus{border:none;border-bottom:2px solid #4300b0}select[readonly].svelte-5xpzvo option.svelte-5xpzvo{display:none}",k(document.head,t)),be(this,e,xo,yo,w,{id:0,item:7,value:1,noForm:2,classId:3,disabled:8})}}const Io=/\d+/g,_o=/%[HMSpPdmyY%]/g;function No(e,t,n){const o=Math.floor((new Date).getFullYear()/100);let i=!1;if(""===e)return null;const l=t.split(_o);let r=0,s=0;const a=new Date(0);for(const c of l){if(!e.startsWith(c,r))return n;if(r+=c.length,r===e.length){if(s!==t.length)return n;break}if("%"!==t[s+c.length])break;if(s+=c.length+1,"%"===t[s]){if("%"!==e[r])return n;r++}else if("p"===t[s].toLowerCase()){const t=e.substr(r,2).toUpperCase();if("AM"===t)i=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;i=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{Io.lastIndex=r;const l=Io.exec(e);if(null==l)return n;switch(t[s]){case"H":a.setHours(parseInt(l[0])+12*i);break;case"M":a.setMinutes(l[0]);break;case"S":a.setSeconds(l[0]);break;case"d":a.setDate(l[0]);break;case"m":a.setMonth(l[0]-1);break;case"y":a.setFullYear(100*o+parseInt(l[0]));break;case"Y":a.setFullYear(l[0])}r+=l[0].length}s++}return isNaN(a.valueOf())?n:a}function jo(e){let t;return{c(){t=F("Stunden")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function So(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[jo]},$$scope:{ctx:e}}}),{c(){he(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||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Fo(e){let t;return{c(){t=F("Minuten")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Co(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Fo]},$$scope:{ctx:e}}}),{c(){he(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||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function qo(e){let t;return{c(){t=F("Jetzt")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Lo(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[qo]},$$scope:{ctx:e}}}),{c(){he(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||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Eo(e){let t,n,o,i,l,r,s,a,c;return i=new e[5]({props:{value:e[0],closeOnSelection:!0}}),i.$on("change",e[8]),r=new e[6]({props:{value:e[0],$$slots:{"now-label":[Lo],"minutes-label":[Co],"hours-label":[So]},$$scope:{ctx:e}}}),r.$on("change",e[7]),{c(){t=j("input"),o=C(),he(i.$$.fragment),l=C(),he(r.$$.fragment),T(t,"type","string"),T(t,"class",n=e[2]||e[3]),T(t,"id",e[1]),T(t,"name",e[1]),t.hidden=!0},m(n,d){I(n,t,d),O(t,e[0]),I(n,o,d),ge(i,n,d),I(n,l,d),ge(r,n,d),s=!0,a||(c=L(t,"input",e[9]),a=!0)},p(e,[o]){(!s||12&o&&n!==(n=e[2]||e[3]))&&T(t,"class",n),(!s||2&o)&&T(t,"id",e[1]),(!s||2&o)&&T(t,"name",e[1]),1&o&&O(t,e[0]);const l={};1&o&&(l.value=e[0]),i.$set(l);const a={};1&o&&(a.value=e[0]),4096&o&&(a.$$scope={dirty:o,ctx:e}),r.$set(a)},i(e){s||(de(i.$$.fragment,e),de(r.$$.fragment,e),s=!0)},o(e){ue(i.$$.fragment,e),ue(r.$$.fragment,e),s=!1},d(e){e&&_(t),e&&_(o),ve(i,e),e&&_(l),ve(r,e),a=!1,c()}}}function zo(e,t,n){const o=R(),{Label:i,DatePicker:l,TimePicker:r}=c;let{value:s}=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,s=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)},[s,a,d,u,i,l,r,({detail:e})=>{var t,o;n(0,(t=e.value,o=s,s=null==t||null==o?t:(o.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),o))),m(s)},({detail:e})=>{var t,o;n(0,(t=e.value,o=s,s=null==t||null==o?t:(o.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),o))),m(s)},function(){s=this.value,n(0,s)}]}class To extends we{constructor(e){super(),be(this,e,zo,Eo,w,{value:0,id:1,noForm:2,classId:3})}}function Do(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:Oo,placeholder:Bo,readonly:e[4],disabled:e[5]}}),n.$on("change",e[7]),{c(){t=j("div"),he(n.$$.fragment),B(t,"max-width","4em")},m(e,i){I(e,t,i),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||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n)}}}const Oo="([01][0-9]|2[0-3]):([0-5][0-9])",Bo="";function Mo(e,t,n){const o=R(),{TextField:i}=c;let{id:l}=t,{item:r}=t,{value:s}=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,l=e.id),"item"in e&&n(8,r=e.item),"value"in e&&n(1,s=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)},[l,s,a,d,u,m,i,({detail:e})=>{o("blur",{value:p(e.value)}),o("checkRange",{idx:f,fieldId:l,value:e.value})},r,f]}class Vo extends we{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=j("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",k(document.head,t)),be(this,e,Mo,Do,w,{id:0,item:8,value:1,noForm:2,classId:3,readonly:4,disabled:5,praefix:9})}}function Ao(e){let t,n;return t=new e[19]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[14],pattern:e[22],required:e[2],id:e[24],name:e[23],value:e[16]()}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.value=e[16]()),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Wo(e){let t,n;return t=new e[19]({props:{inputClass:e[4]||e[5],disabled:e[7],formnovalidate:e[9],readonly:e[14],required:e[2],type:"email",id:e[24],name:e[23],value:e[16]()}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.value=e[16]()),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Po(e){let t,n;return t=new Vo({props:{inputClass:e[4]||e[5],disabled:e[7],readonly:e[14],required:e[2],id:e[24],item:e[1],value:e[16](),praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("checkRange",e[34]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),128&n[0]&&(o.disabled=e[7]),16384&n[0]&&(o.readonly=e[14]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ro(e){let t,n;return t=new To({props:{classId:e[5],id:e[24],disabled:e[7],required:e[2],value:e[25](),noForm:e[4]}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ho(e){let t,n;return t=new e[20]({props:{inputClass:e[4]||e[5],required:e[2],disabled:e[7],id:e[24],name:e[23],value:e[25](),closeOnSelection:!0}}),t.$on("change",e[26](!0)),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Yo(e){let t,n;return t=new e[21]({props:{round:!0,inputClass:e[4]||e[5],disabled:e[7]||e[14],required:e[2],id:e[24],name:e[23],checked:e[16]()}}),t.$on("change",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};48&n[0]&&(o.inputClass=e[4]||e[5]),16512&n[0]&&(o.disabled=e[7]||e[14]),4&n[0]&&(o.required=e[2]),65536&n[0]&&(o.checked=e[16]()),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Go(e){let t,n;return t=new vo({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],record:e[0],value:e[16](),noForm:e[4],view:e[1].properties.view,praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("invalid",e[33]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.view=e[1].properties.view),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Jo(e){let t,n;return t=new Hn({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],record:e[0],value:e[16](),noForm:e[4],multi:e[1].properties.multi,numberInput:e[11],praefix:e[3]}}),t.$on("blur",e[26]()),t.$on("invalid",e[32]),t.$on("multi",e[27]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),1&n[0]&&(o.record=e[0]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),2&n[0]&&(o.multi=e[1].properties.multi),2048&n[0]&&(o.numberInput=e[11]),8&n[0]&&(o.praefix=e[3]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Uo(e){let t,n;return t=new ko({props:{classId:e[5],disabled:e[7],required:e[2],id:e[24],item:e[1],value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),4&n[0]&&(o.required=e[2]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Zo(e){let t,n;return t=new dn({props:{classId:e[5],disabled:e[7],formnovalidate:e[9],required:e[2],readonly:e[14],id:e[24],item:e[1],value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),4&n[0]&&(o.required=e[2]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.item=e[1]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Qo(e){let t,n;return t=new o({props:{classId:e[5],disabled:e[7],readonly:e[14],id:e[24],name:e[1].name,value:e[16](),noForm:e[4]}}),t.$on("blur",e[26]()),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),128&n[0]&&(o.disabled=e[7]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.name=e[1].name),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ko(e){let t,n;return t=new sn({props:{classId:e[5],eventId:e[6],required:e[2],disabled:e[7],formnovalidate:e[9],readonly:e[14],id:e[24],item:e[1],desc:e[17],value:e[16](),noForm:e[4],praefix:e[3],selectionFields:e[8],selection:e[10],deList:e[12],recordId:e[0]._id,isTemplate:e[13]}}),t.$on("task",e[31]),t.$on("change",e[26]()),t.$on("initFail",e[28]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]&&(o.classId=e[5]),64&n[0]&&(o.eventId=e[6]),4&n[0]&&(o.required=e[2]),128&n[0]&&(o.disabled=e[7]),512&n[0]&&(o.formnovalidate=e[9]),16384&n[0]&&(o.readonly=e[14]),2&n[0]&&(o.item=e[1]),131072&n[0]&&(o.desc=e[17]),65536&n[0]&&(o.value=e[16]()),16&n[0]&&(o.noForm=e[4]),8&n[0]&&(o.praefix=e[3]),256&n[0]&&(o.selectionFields=e[8]),1024&n[0]&&(o.selection=e[10]),4096&n[0]&&(o.deList=e[12]),1&n[0]&&(o.recordId=e[0]._id),8192&n[0]&&(o.isTemplate=e[13]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Xo(e){let t,n,o,i;const l=[Ko,Qo,Zo,Uo,Jo,Go,Yo,Ho,Ro,Po,Wo,Ao],r=[];function s(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:e[1].properties&&e[1].properties.view?5:"boolean"===e[1].type?6:"date"===e[1].type?7:"datetime"===e[1].type?8:"time"===e[1].properties?.format?9:"email"===e[1].type?10:11}return t=s(e),n=r[t]=l[t](e),{c(){n.c(),o=q()},m(e,n){r[t].m(e,n),I(e,o,n),i=!0},p(e,i){let a=t;t=s(e),t===a?r[t].p(e,i):(ae(),ue(r[a],1,1,(()=>{r[a]=null})),ce(),n=r[t],n?n.p(e,i):(n=r[t]=l[t](e),n.c()),de(n,1),n.m(o.parentNode,o))},i(e){i||(de(n),i=!0)},o(e){ue(n),i=!1},d(e){r[t].d(e),e&&_(o)}}}function ei(e){let t,n;return t=new e[18]({props:{id:e[29](e[24]),class:e[1].name+(e[15]?" hidden ":""),name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[Xo]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32770&n[0]&&(o.class=e[1].name+(e[15]?" hidden ":"")),2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),229375&n[0]|1024&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ti(e,t,n){let o,i,l;const r=R(),{FormField:s,TextField:a,DatePicker:d,TimePicker:m,Checkbox:f}=c;let{praefix:p=""}=t,{item:$}=t,{listName:h=""}=t,{record:g}=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:_}=t,{deList:N}=t,{required:j}=t,{isTemplate:S}=t,{required:F,readonly:C,hidden:q,pattern:L}=$.properties||{};if(q=!0===q,void 0!==C&&(C=!0===C),void 0===j&&(j=F),"string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const E=(h?h+".":"")+$.name,z=E+(""!==p?"-"+p:""),T=(e,t=E)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};return e.$$set=e=>{"praefix"in e&&n(3,p=e.praefix),"item"in e&&n(1,$=e.item),"listName"in e&&n(30,h=e.listName),"record"in e&&n(0,g=e.record),"noForm"in e&&n(4,v=e.noForm),"classId"in e&&n(5,b=e.classId),"eventId"in e&&n(6,w=e.eventId),"disabled"in e&&n(7,y=e.disabled),"selectionFields"in e&&n(8,x=e.selectionFields),"formnovalidate"in e&&n(9,k=e.formnovalidate),"selection"in e&&n(10,I=e.selection),"numberInput"in e&&n(11,_=e.numberInput),"deList"in e&&n(12,N=e.deList),"required"in e&&n(2,j=e.required),"isTemplate"in e&&n(13,S=e.isTemplate)},e.$$.update=()=>{1&e.$$.dirty[0]&&n(16,o=(e=E)=>{let t=T(g);return void 0===t?"":t}),1&e.$$.dirty[0]&&(l=T(g))},n(17,i=((e=E)=>{let t=g["_"+e];return t=u(t),void 0===t?"":t})()),[g,$,j,p,v,b,w,y,x,k,I,_,N,S,C,q,o,i,s,a,d,f,L,E,z,(e=E)=>{let t=T(g);return t?new Date(t):new Date},e=>({detail:t})=>{let{value:o,checked:i}=t;void 0!==i&&(o=i),n(0,g[E]=e?function(e,t){if(null==e)return null;let n=e.getHours();return/%p/i.test(t)&&(n%=12,0===n&&(n=12)),t.replace("%Y",e.getFullYear()).replace("%y",(e.getFullYear()%100).toString().padStart(2,"0")).replace("%m",(e.getMonth()+1).toString().padStart(2,"0")).replace("%d",e.getDate().toString().padStart(2,"0")).replace("%H",n.toString().padStart(2,"0")).replace("%M",e.getMinutes().toString().padStart(2,"0")).replace("%S",e.getSeconds().toString().padStart(2,"0")).replace("%p",e.getHours()<12?"am":"pm").replace("%P",e.getHours()<12?"AM":"PM").replace("%%","%")}(o,"%d.%m.%Y"):o,g);const s=Object.values(g).every((e=>!e))&&o;r("notify",{oldValue:l,value:o,add:s,itemName:E,desc:t.description})},({detail:e})=>{r("multi",e)},()=>n(15,q=!0),()=>"object"===$.type?"comment_"+z:z,h,function(t){H(e,t)},function(t){H(e,t)},function(t){H(e,t)},function(t){H(e,t)}]}class ni extends we{constructor(e){var t;super(),document.getElementById("svelte-mea5fj-style")||((t=j("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}",k(document.head,t)),be(this,e,ti,ei,w,{praefix:3,item:1,listName:30,record:0,noForm:4,classId:5,eventId:6,disabled:7,selectionFields:8,formnovalidate:9,selection:10,numberInput:11,deList:12,required:2,isTemplate:13},[-1,-1])}}const{document:oi}=pe;function ii(e,t,n){const o=e.slice();return o[69]=t[n],o[71]=n,o}function li(e,t,n){const o=e.slice();return o[78]=t[n],o}function ri(e,t,n){const o=e.slice();return o[73]=t[n].title,o[74]=t[n].toDelete,o[75]=t[n].icon,o}function si(e){let t,n;return t=new e[13]({props:{name:"Total Wochen",nameClass:"formField_italic",$$slots:{default:[ai]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};64&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ai(e){let t,n,o;function i(t){e[40](t)}let l={item:e[23],disabled:!0};return void 0!==e[6]&&(l.value=e[6]),t=new dn({props:l}),G.push((()=>$e(t,"value",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};!n&&64&o[0]&&(n=!0,i.value=e[6],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function ci(e){let t,n;return t=new e[13]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[di]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};512&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function di(e){let t,n,o;function i(t){e[41](t)}let l={item:e[21],disabled:!0};return void 0!==e[9]&&(l.value=e[9]),t=new dn({props:l}),G.push((()=>$e(t,"value",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};!n&&512&o[0]&&(n=!0,i.value=e[9],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function ui(e){let t,n;return t=new e[13]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[mi]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};32&n[0]|524288&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function mi(e){let t,n,o;function i(t){e[42](t)}let l={item:e[19],disabled:!0};return void 0!==e[5]&&(l.value=e[5]),t=new dn({props:l}),G.push((()=>$e(t,"value",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};!n&&32&o[0]&&(n=!0,i.value=e[5],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function fi(e){let t,n;return t=new e[16]({props:{class:e[10][e[71]],$$slots:{handle:[yi,({toggle:e})=>({72:e}),({toggle:e})=>[0,0,e?1024:0]],default:[gi,({toggle:e})=>({72:e}),({toggle:e})=>[0,0,e?1024:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){b(e[68])&&e[68].apply(this,arguments)})),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const i={};1024&o[0]&&(i.class=e[10][e[71]]),6543&o[0]|525312&o[2]&&(i.$$scope={dirty:o,ctx:e}),t.$set(i)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function pi(e){let t,n;return t=new ni({props:{praefix:e[71],item:e[78],eventId:e[3],record:e[69],noForm:Ni,classId:e[2],disabled:e[0],required:e[17],selectionFields:e[24],numberInput:e[12],formnovalidate:e[71]===e[7].length-1||e[7][e[71]]._delete}}),t.$on("notify",(function(){b(e[26](e[78],e[71]))&&e[26](e[78],e[71]).apply(this,arguments)})),t.$on("task",e[43]),t.$on("invalid",e[27]),t.$on("checkRange",e[28]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(n,o){e=n;const i={};2&o[0]&&(i.item=e[78]),8&o[0]&&(i.eventId=e[3]),128&o[0]&&(i.record=e[69]),4&o[0]&&(i.classId=e[2]),1&o[0]&&(i.disabled=e[0]),4096&o[0]&&(i.numberInput=e[12]),128&o[0]&&(i.formnovalidate=e[71]===e[7].length-1||e[7][e[71]]._delete),t.$set(i)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function $i(e){let t,n,o=e[1].item,i=[];for(let t=0;t<o.length;t+=1)i[t]=pi(li(e,o,t));const l=e=>ue(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=q()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(486674575&n[0]){let r;for(o=e[1].item,r=0;r<o.length;r+=1){const l=li(e,o,r);i[r]?(i[r].p(l,n),de(i[r],1)):(i[r]=pi(l),i[r].c(),de(i[r],1),i[r].m(t.parentNode,t))}for(ae(),r=o.length;r<i.length;r+=1)l(r);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ue(i[e]);n=!1},d(e){N(i,e),e&&_(t)}}}function hi(e){let t,n,o=e[7][e[71]]._delete,i=$i(e);return{c(){i.c(),t=q()},m(e,o){i.m(e,o),I(e,t,o),n=!0},p(e,n){128&n[0]&&w(o,o=e[7][e[71]]._delete)?(ae(),ue(i,1,1,$),ce(),i=$i(e),i.c(),de(i),i.m(t.parentNode,t)):i.p(e,n)},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){e&&_(t),i.d(e)}}}function gi(e){let t,n,o,i,l=e[7].length,r=hi(e);return{c(){t=j("div"),r.c(),o=C(),T(t,"id",n=`accordion-content-${e[2]}-${e[1].name}-${e[71]}`)},m(e,n){I(e,t,n),r.m(t,null),I(e,o,n),i=!0},p(e,o){128&o[0]&&w(l,l=e[7].length)?(ae(),ue(r,1,1,$),ce(),r=hi(e),r.c(),de(r),r.m(t,null)):r.p(e,o),(!i||6&o[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}-${e[71]}`))&&T(t,"id",n)},i(e){i||(de(r),i=!0)},o(e){ue(r),i=!1},d(e){e&&_(t),r.d(e),e&&_(o)}}}function vi(e){let t,n,o,i,l,r=e[25](e[8],e[71])+"";return{c(){t=j("div"),n=F(r),T(t,"class",o=x("draggableListItem "+e[1].name)+" svelte-1es1ap1"),T(t,"draggable",!0),M(t,"delete",e[69]._delete),M(t,"is-active-top",e[11]?.top===e[71]),M(t,"is-active-bottom",e[11]?.bottom===e[71])},m(o,r){I(o,t,r),k(t,n),i||(l=[L(t,"dragover",e[34]),L(t,"dragleave",e[35](e[71])),L(t,"dragstart",e[32](e[71])),L(t,"drop",E(e[31](e[71]))),L(t,"dragenter",e[33](e[71]))],i=!0)},p(i,l){e=i,256&l[0]&&r!==(r=e[25](e[8],e[71])+"")&&D(n,r),2&l[0]&&o!==(o=x("draggableListItem "+e[1].name)+" svelte-1es1ap1")&&T(t,"class",o),130&l[0]&&M(t,"delete",e[69]._delete),2050&l[0]&&M(t,"is-active-top",e[11]?.top===e[71]),2050&l[0]&&M(t,"is-active-bottom",e[11]?.bottom===e[71])},d(e){e&&_(t),i=!1,v(l)}}}function bi(e){let t,n,o;var i=e[75];return i&&(t=new i({props:{size:"20"}})),{c(){t&&he(t.$$.fragment),n=q()},m(e,i){t&&ge(t,e,i),I(e,n,i),o=!0},p(e,o){if(i!==(i=e[75])){if(t){ae();const e=t;ue(e.$$.fragment,1,0,(()=>{ve(e,1)})),ce()}i?(t=new i({props:{size:"20"}}),he(t.$$.fragment),de(t.$$.fragment,1),ge(t,n.parentNode,n)):t=null}},i(e){o||(t&&de(t.$$.fragment,e),o=!0)},o(e){t&&ue(t.$$.fragment,e),o=!1},d(e){e&&_(n),t&&ve(t,e)}}}function wi(e){let t,n,o,i,l,r=!e[0]&&bi(e);return{c(){t=j("span"),r&&r.c(),T(t,"class","pointer icon svelte-1es1ap1"),T(t,"title",e[73]),t.hidden=n=e[71]===e[7].length-1||!(e[69]._delete^e[74])},m(n,s){I(n,t,s),r&&r.m(t,null),o=!0,i||(l=L(t,"click",e[30](e[71])),i=!0)},p(i,l){(e=i)[0]?r&&(ae(),ue(r,1,1,(()=>{r=null})),ce()):r?(r.p(e,l),1&l[0]&&de(r,1)):(r=bi(e),r.c(),de(r,1),r.m(t,null)),(!o||128&l[0]&&n!==(n=e[71]===e[7].length-1||!(e[69]._delete^e[74])))&&(t.hidden=n)},i(e){o||(de(r),o=!0)},o(e){ue(r),o=!1},d(e){e&&_(t),r&&r.d(),i=!1,l()}}}function yi(e){let t,n,o,i,l,r;n=new e[14]({props:{$$slots:{default:[vi]},$$scope:{ctx:e}}}),n.$on("click",(function(){b(e[29](e[72],e[71]))&&e[29](e[72],e[71]).apply(this,arguments)}));let s=[{title:"löschen",toDelete:!0,icon:Te},{title:"undo",toDelete:!1,icon:Le}],a=[];for(let t=0;t<2;t+=1)a[t]=wi(ri(e,s,t));const c=e=>ue(a[e],1,1,(()=>{a[e]=null}));return{c(){t=j("div"),he(n.$$.fragment),o=C();for(let e=0;e<2;e+=1)a[e].c();i=C(),T(t,"class",l=x("accordion "+e[1].name)+" svelte-1es1ap1"),T(t,"slot","handle")},m(e,l){I(e,t,l),ge(n,t,null),k(t,o);for(let e=0;e<2;e+=1)a[e].m(t,null);k(t,i),r=!0},p(o,d){e=o;const u={};if(2434&d[0]|524288&d[2]&&(u.$$scope={dirty:d,ctx:e}),n.$set(u),1073741953&d[0]){let n;for(s=[{title:"löschen",toDelete:!0,icon:Te},{title:"undo",toDelete:!1,icon:Le}],n=0;n<2;n+=1){const o=ri(e,s,n);a[n]?(a[n].p(o,d),de(a[n],1)):(a[n]=wi(o),a[n].c(),de(a[n],1),a[n].m(t,i))}for(ae(),n=2;n<2;n+=1)c(n);ce()}(!r||2&d[0]&&l!==(l=x("accordion "+e[1].name)+" svelte-1es1ap1"))&&T(t,"class",l)},i(e){if(!r){de(n.$$.fragment,e);for(let e=0;e<2;e+=1)de(a[e]);r=!0}},o(e){ue(n.$$.fragment,e),a=a.filter(Boolean);for(let e=0;e<2;e+=1)ue(a[e]);r=!1},d(e){e&&_(t),ve(n),N(a,e)}}}function xi(e){let t,n,o=(!e[4]&&!e[0]||e[71]<e[7].length-1)&&fi(e);return{c(){o&&o.c(),t=q()},m(e,i){o&&o.m(e,i),I(e,t,i),n=!0},p(e,n){!e[4]&&!e[0]||e[71]<e[7].length-1?o?(o.p(e,n),145&n[0]&&de(o,1)):(o=fi(e),o.c(),de(o,1),o.m(t.parentNode,t)):o&&(ae(),ue(o,1,1,(()=>{o=null})),ce())},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&_(t)}}}function ki(e){let t,n,o=e[7],i=[];for(let t=0;t<o.length;t+=1)i[t]=xi(ii(e,o,t));const l=e=>ue(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=q()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(2130845087&n[0]|31&n[1]|1088&n[2]){let r;for(o=e[7],r=0;r<o.length;r+=1){const l=ii(e,o,r);i[r]?(i[r].p(l,n),de(i[r],1)):(i[r]=xi(l),i[r].c(),de(i[r],1),i[r].m(t.parentNode,t))}for(ae(),r=o.length;r<i.length;r+=1)l(r);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ue(i[e]);n=!1},d(e){N(i,e),e&&_(t)}}}function Ii(e){let t,n,o,i,l,r,s=e[22]&&0!=e[6]&&si(e),a=e[20]&&0!=e[9]&&ci(e),c=e[18]&&0!=e[5]&&ui(e);return l=new e[15]({props:{$$slots:{default:[ki,({closeOtherPanels:e})=>({68:e}),({closeOtherPanels:e})=>[0,0,e?64:0]]},$$scope:{ctx:e}}}),{c(){t=j("div"),s&&s.c(),n=C(),a&&a.c(),o=C(),c&&c.c(),i=C(),he(l.$$.fragment),T(t,"class","formList")},m(e,d){I(e,t,d),s&&s.m(t,null),k(t,n),a&&a.m(t,null),k(t,o),c&&c.m(t,null),k(t,i),ge(l,t,null),r=!0},p(e,r){e[22]&&0!=e[6]?s?(s.p(e,r),64&r[0]&&de(s,1)):(s=si(e),s.c(),de(s,1),s.m(t,n)):s&&(ae(),ue(s,1,1,(()=>{s=null})),ce()),e[20]&&0!=e[9]?a?(a.p(e,r),512&r[0]&&de(a,1)):(a=ci(e),a.c(),de(a,1),a.m(t,o)):a&&(ae(),ue(a,1,1,(()=>{a=null})),ce()),e[18]&&0!=e[5]?c?(c.p(e,r),32&r[0]&&de(c,1)):(c=ui(e),c.c(),de(c,1),c.m(t,i)):c&&(ae(),ue(c,1,1,(()=>{c=null})),ce());const d={};7583&r[0]|524352&r[2]&&(d.$$scope={dirty:r,ctx:e}),l.$set(d)},i(e){r||(de(s),de(a),de(c),de(l.$$.fragment,e),r=!0)},o(e){ue(s),ue(a),ue(c),ue(l.$$.fragment,e),r=!1},d(e){e&&_(t),s&&s.d(),a&&a.d(),c&&c.d(),ve(l)}}}let _i=new Map;const Ni=!0,ji="pos/target";function Si(e,t,n){let o,i;const{FormField:l,TextField:r,Button:s,Accordion:a,AccordionSection:d,Divider:p}=c,$=R();let{list:h}=t,{schema:g}=t,{record:v}=t,{classId:b}=t,{eventId:w}=t,{disabled:y}=t,{fixed:x}=t,{template:k={}}=t;const I=g.find((e=>"price"===e.name&&!e.properties?.hidden)),_=I&&g.find((e=>"quantity"===e.name));let N=0;const j=g.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let S=0;const F=g.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name||"",C=!!F;let q=0;const L={};let E=g.properties?.readonly,z=b.split("form-")[1].slice(0,-4);y||=E;let T,D,O=[],B=[],M=!1,V={},A=[];g.filter((e=>e.selection)).map((e=>O.push({className:z,parentClass:g,refClass:e.selection,value:""})));["readonly","hidden","required"].map((e=>{g.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"";let[o,i]=n.split(".");i||(i=o,o=void 0),A.push({action:e,itemName:t.name,refObj:o,refName:i,op:t.properties[e].invert?"!":""})}))}));const W=async(e,t)=>{const o=A.filter((e=>(e.refObj||z)===t));if(o?.length)for(const t of o){const{action:o,itemName:i,refObj:l,refName:r,op:s}=t;let a,c,d=!1,u=!1;if(l){const t=T[e][l];l===z&&r?d=v:t&&(d=await ql(l,t))}!l&&r&&(d=T[e]),d&&(u=d[r],"!"===s&&(u=!u)),"required"!==o&&"readonly"!==o||(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${i} .field textarea`,c=document.querySelector(a),c||(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${i} .field input`,c=document.querySelector(a)),c&&u&&c.setAttribute(o,"true"),c&&!u&&c.removeAttribute(o)),"hidden"===o&&(a=`#accordion-content-${b}-${h.name}-${e} .form-field.${i}`,c=document.querySelector(a),c?.classList?.toggle("hidden",u),u&&n(7,T[e][i]="",T))}},P=(e,t)=>{let o=`#accordion-content-${b}-${h.name}-${e} .form-field .field :required:not(:disabled)`;const i=document.querySelectorAll(o);let l=!1;i.forEach((e=>{""===e.value&&(l=!0)})),void 0===t&&(o=`#accordion-content-${b}-${h.name}-${e} :not(.form-field.hidden) .field input.invalid`,document.querySelector(o)&&(t=!0)),n(10,B[e]=l||t?"invalid":"",B)},Y=e=>{if(!e)return 0;const[t,n=0]=e.split(":");return 60*t+parseInt(n)},G=(e,t)=>{if(!t)return;const o=g.find((e=>e.name===t)),i=o.properties.value.formula,{operator:l,argument:r}=i,s=r.map((t=>T[e][t.refItem]));let a=0;"$add"===l&&(a=s.reduce(((e,t)=>e+ +t))),"$subtract"===l&&(a=s.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[i,l]=t.split(":");return i?e-=l?(+i+ +l/60).toFixed(2):+i:0}))),n(7,T[e][t]=(a||0).toFixed(o.properties.decimals||0),T),n(12,V={item:o,value:a,idx:e})};D=g.filter((e=>e.refClass)).reduce((async(e,t)=>{e=await e;const n=g.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,o]=t.selection.split(":"),[i]=o.split(".");i&&e.push({refClass:i,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 J=async(e,t,o,i)=>{const l=(await D).find((e=>e.refClass===t.refClass));if(!l)return;const{refClass:r,items:s,selection:a}=l,c=t.name,d=A.find((e=>e.itemName===c));if(d){await W(e,d.refObj);const t=`#accordion-content-${b}-${h.name}-${e} .form-field.${r}.hidden`;if(document.querySelector(t))return}return o?Promise.all(s.map((l=>{let c="";const{refInput:d}=t;if(d&&T[e]){const[t,n]=d.split(".");c=n?T[e][n]:v[t]}if(a&&o!==i)s.map((t=>{n(7,T[e][t]="",T)}));else if(d&&!c||U(e,l)){const o=g.find((e=>e.refClass===r)),i=T[e][o.name];if(t.selection){const o=Cl(t.selection+i.toString());if(o)return Promise.resolve(o).then((t=>n(7,T[e][l]=t[l],T)))}return Promise.resolve(ql(o.refClass,i)).then((t=>n(7,T[e][l]=t[l],T)))}}))):Promise.resolve(s.map((t=>{n(7,T[e][t]="",T)})))},U=(e,t)=>{let n=T[e][t];return"number"===g.find((e=>e.name===t)).type&&(n=Number(n||0)),!n},Z=e=>!(!x&&e>=T.length-1),Q=(e,t=!1)=>{const[n,o]=e.split(";");return h.name===o&&(!!Z(t)&&((!1===t||t!=n)&&parseInt(n)))};return g.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=g.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))})),e.$$set=e=>{"list"in e&&n(1,h=e.list),"schema"in e&&n(36,g=e.schema),"record"in e&&n(37,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),"template"in e&&n(38,k=e.template)},e.$$.update=()=>{2&e.$$.dirty[0]|64&e.$$.dirty[1]&&v&&n(7,T=(v[h.name]||[]).concat({})),128&e.$$.dirty[0]&&n(8,o=T),482&e.$$.dirty[0]&&o&&((()=>{if(j)n(9,S=T?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(C)n(6,q=T?.reduce(((e,t)=>e+(t._delete?0:+(t[F]||0))),0)||0)})(),(()=>{if(I)n(5,N=T?.reduce(((e,t)=>{if(t.price){const n=(_?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),$("save",{listName:h.name,value:T,amountValue:N,weeksValue:q})),256&e.$$.dirty[1]&&(i=e=>L[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[y,h,b,w,x,N,q,T,o,S,B,M,V,l,s,a,d,undefined,I,{name:"amountValue",properties:{decimals:2}},j,{name:"hoursValue",properties:{decimals:2}},C,{name:"weeksValue",properties:{decimals:1}},O,(e,t)=>{const n=e[t];return n&&g.filter((e=>!0!==e.properties?.hidden&&void 0!==n[e.name]&&"textarea"!==e.properties?.format)).map((e=>""===n[e.name]?"":"object"===e.type?i(n[e.name]):"boolean"===e.type?f(n[e.name]):"date"===e.type?u(n[e.name]):"datetime"===e.type?m(n[e.name]):e.properties?.multi?"":n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>async({detail:i})=>{const{oldValue:l,value:r,add:s,desc:a}=i;await W(t,e.name),G(t,e._formulaActor);const c=O?.find((t=>t.refClass.split(":")[1].split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,r)),r&&T.length===t+1&&n(7,T=T.concat({})),a&&n(39,L[r]=a,L),await J(t,e,r,l),n(8,o=T),"number"===e.type&&n(12,V={item:e,value:r,idx:t}),P(t)},({detail:e})=>{const{idx:t,value:n}=e;P(t,n)},({detail:e})=>{const{idx:t,fieldId:n,value:o}=e;if(!o)return;const i=Y(o);let l=!1;T.forEach(((e,n)=>{if(t===n)return;const{start:o,end:r}=T[n];o&&r&&i>Y(o)&&i<Y(r)&&(l=!0)}));const r=document.getElementById(n);r?.classList?.toggle("invalid",l)},(e,t)=>o=>{const{detail:i}=o;e(o);const{target:l}=i,r=l?.closest("li");if(r?.classList.contains("open"))return;(e=>{const t=k[h.name]||{};for(const o in t)k[h.name][o]&&!T[e][o]&&n(7,T[e][o]=k[h.name][o],T)})(t);const s=`#accordion-content-${b}-${h.name}-${t} > div.form-field:not(.hidden)`,a=document.querySelectorAll(s);if(!a?.length)return;const c=a[a.length-1];X().then((()=>c.scrollIntoView({behavior:"smooth",block:"end"})))},e=>()=>{n(7,T[e]._delete=!T[e]._delete,T)},e=>t=>{t.preventDefault(),n(11,M=!1);const o=Q(t.dataTransfer.getData(ji),e);if(!1===o)return;t.dataTransfer.dropEffect="move";const i=[...T].map(((e,t)=>(e._index=t,e)));o<e?(i.splice(e+1,0,i[o]),i.splice(o,1)):(i.splice(e,0,i[o]),i.splice(o+1,1)),i.map(((e,t)=>{return n=e._index,o=t,void _i.set(o,n);var n,o}));let l=[];B.map(((e,t)=>{l[t]=B[(e=>{const t=_i.get(e);return void 0===t?e:t})(t)]})),n(10,B=l),n(7,T=i.map(((e,t)=>(delete e._index,e))))},e=>t=>{if(!Z(e))return!1;t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move",t.dataTransfer.setData(ji,e+";"+h.name)},e=>t=>{const o=Q(t.dataTransfer.getData(ji),e);return!1===o||o===e?n(11,M=!1):void n(11,M={top:o>e&&e,bottom:o<e&&e})},e=>e.preventDefault(),e=>e=>{n(11,M=!1)},g,v,k,L,function(e){q=e,n(6,q)},function(e){S=e,n(9,S)},function(e){N=e,n(5,N)},function(t){H(e,t)}]}class Fi extends we{constructor(e){var t;super(),oi.getElementById("svelte-1es1ap1-style")||((t=j("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}",k(oi.head,t)),be(this,e,Si,Ii,w,{list:1,schema:36,record:37,classId:2,eventId:3,disabled:0,fixed:4,template:38},[-1,-1,-1])}}const{document:Ci}=pe;function qi(e,t,n){const o=e.slice();return o[17]=t[n],o}function Li(e,t,n){const o=e.slice();return o[20]=t[n],o}function Ei(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function zi(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p=e[0].items,$=[];for(let t=0;t<p.length;t+=1)$[t]=Di(Li(e,p,t));const h=e=>ue($[e],1,1,(()=>{$[e]=null}));let g=e[0].list&&Oi(e);return a=new e[5]({props:{outline:!0,$$slots:{default:[Mi]},$$scope:{ctx:e}}}),a.$on("click",e[9]),d=new e[5]({props:{disabled:e[2],class:"close",form:e[6],filled:!0,type:"submit",$$slots:{default:[Vi]},$$scope:{ctx:e}}}),{c(){t=j("form"),n=j("input"),i=C();for(let e=0;e<$.length;e+=1)$[e].c();l=C(),g&&g.c(),r=C(),s=j("div"),he(a.$$.fragment),c=C(),he(d.$$.fragment),T(n,"class",x(e[6])+" svelte-1phofh5"),T(n,"name","_id"),T(n,"type","hidden"),n.value=o=e[1]._id||"",T(t,"class","fTask svelte-1phofh5"),T(t,"id",e[6]),T(s,"class","form--buttons svelte-1phofh5")},m(o,p){I(o,t,p),k(t,n),k(t,i);for(let e=0;e<$.length;e+=1)$[e].m(t,null);k(t,l),g&&g.m(t,null),I(o,r,p),I(o,s,p),ge(a,s,null),k(s,c),ge(d,s,null),u=!0,m||(f=[L(t,"keydown",e[8]),L(t,"submit",E(e[10]))],m=!0)},p(e,i){if((!u||2&i&&o!==(o=e[1]._id||""))&&(n.value=o),75&i){let n;for(p=e[0].items,n=0;n<p.length;n+=1){const o=Li(e,p,n);$[n]?($[n].p(o,i),de($[n],1)):($[n]=Di(o),$[n].c(),de($[n],1),$[n].m(t,l))}for(ae(),n=p.length;n<$.length;n+=1)h(n);ce()}e[0].list?g?(g.p(e,i),1&i&&de(g,1)):(g=Oi(e),g.c(),de(g,1),g.m(t,null)):g&&(ae(),ue(g,1,1,(()=>{g=null})),ce());const r={};8388608&i&&(r.$$scope={dirty:i,ctx:e}),a.$set(r);const s={};4&i&&(s.disabled=e[2]),8388608&i&&(s.$$scope={dirty:i,ctx:e}),d.$set(s)},i(e){if(!u){for(let e=0;e<p.length;e+=1)de($[e]);de(g),de(a.$$.fragment,e),de(d.$$.fragment,e),u=!0}},o(e){$=$.filter(Boolean);for(let e=0;e<$.length;e+=1)ue($[e]);ue(g),ue(a.$$.fragment,e),ue(d.$$.fragment,e),u=!1},d(e){e&&_(t),N($,e),g&&g.d(),e&&_(r),e&&_(s),ve(a),ve(d),m=!1,v(f)}}}function Ti(e){let t,n;return t=new ni({props:{classId:e[6],item:e[20],selection:e[20].selection,record:e[1],disabled:e[3],eventId:e[0].id,required:!1,isTemplate:!0}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n&&(o.item=e[20]),1&n&&(o.selection=e[20].selection),2&n&&(o.record=e[1]),8&n&&(o.disabled=e[3]),1&n&&(o.eventId=e[0].id),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Di(e){let t,n,o=Pi(!0,e[20]),i=o&&Ti(e);return{c(){i&&i.c(),t=q()},m(e,o){i&&i.m(e,o),I(e,t,o),n=!0},p(e,n){1&n&&(o=Pi(!0,e[20])),o?i?(i.p(e,n),1&n&&de(i,1)):(i=Ti(e),i.c(),de(i,1),i.m(t.parentNode,t)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce())},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){i&&i.d(e),e&&_(t)}}}function Oi(e){let t,n,o=e[0].list,i=[];for(let t=0;t<o.length;t+=1)i[t]=Bi(qi(e,o,t));const l=e=>ue(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=q()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);I(e,t,o),n=!0},p(e,n){if(75&n){let r;for(o=e[0].list,r=0;r<o.length;r+=1){const l=qi(e,o,r);i[r]?(i[r].p(l,n),de(i[r],1)):(i[r]=Bi(l),i[r].c(),de(i[r],1),i[r].m(t.parentNode,t))}for(ae(),r=o.length;r<i.length;r+=1)l(r);ce()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)de(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)ue(i[e]);n=!1},d(e){N(i,e),e&&_(t)}}}function Bi(e){let t,n,o,i;return t=new e[4]({props:{text:e[17].designation}}),o=new tl({props:{classId:e[6],list:e[17],eventId:e[0].id,schema:e[17].item,record:e[1],disabled:e[3],required:!1,open:!0,isTemplate:!0}}),{c(){he(t.$$.fragment),n=C(),he(o.$$.fragment)},m(e,l){ge(t,e,l),I(e,n,l),ge(o,e,l),i=!0},p(e,n){const i={};1&n&&(i.text=e[17].designation),t.$set(i);const l={};1&n&&(l.list=e[17]),1&n&&(l.eventId=e[0].id),1&n&&(l.schema=e[17].item),2&n&&(l.record=e[1]),8&n&&(l.disabled=e[3]),o.$set(l)},i(e){i||(de(t.$$.fragment,e),de(o.$$.fragment,e),i=!0)},o(e){ue(t.$$.fragment,e),ue(o.$$.fragment,e),i=!1},d(e){ve(t,e),e&&_(n),ve(o,e)}}}function Mi(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Vi(e){let t;return{c(){t=F("Speichern")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function Ai(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function Wi(e){let t,n,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Ai,then:zi,catch:Ei,value:16,blocks:[,,,]};return me(e[7](),i),{c(){t=C(),n=j("section"),i.block.c(),Ci.title="Vorgaben",T(n,"class","sTask svelte-1phofh5")},m(e,l){I(e,t,l),I(e,n,l),i.block.m(n,i.anchor=null),i.mount=()=>n,i.anchor=null,o=!0},p(t,[n]){fe(i,e=t,n)},i(e){o||(de(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){ue(i.blocks[e])}o=!1},d(e){e&&_(t),e&&_(n),i.block.d(),i.token=null,i=null}}}const Pi=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function Ri(e,n,o){let a,d,u;y(e,r,(e=>o(11,d=e))),y(e,s,(e=>o(12,u=e)));const{Divider:m,Button:f,FormField:p}=c,$=JSON.parse(i.getItem("Locale"));let{schema:h}=n,{record:g}=n,v="template-"+h.class+Math.floor(9e3*Math.random()+1e3).toString(),b=!1;const w=()=>window.history.back(),x=(e,t,n=!1)=>{const o=t.id,i=e.find((e=>e.name===o));let l=t.value;if(!n&&i&&i.properties?.multi&&(l=g[o]),l&&i&&i.type.startsWith("date"))try{return No(l,"%d.%m.%Y").toISOString()}catch{return new Date(l).toISOString()}if(i&&"boolean"===i.type&&(l=!!t.checked),i&&"number"===i.type){const e=Number("1.1").toLocaleString($.id).substring(1,2);try{l=Number(l.replace(e,".")).toString()}catch{}}return l};return e.$$set=e=>{"schema"in e&&o(0,h=e.schema),"record"in e&&o(1,g=e.record)},e.$$.update=()=>{4&e.$$.dirty&&o(3,a=b)},[h,g,b,a,m,f,v,async()=>{const e=await t.getEvent(h.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&o(2,b=!0),d.role?.length&&h.authorization?.length){const e=h.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));o(2,b||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},w,async e=>{const n={};Array.from(document.querySelectorAll("form#"+v+" ."+v)).map((e=>{const t=e.id||e.name;if(t)if(t.includes(".")){const[o,i]=t.split("."),l=h.list.find((e=>e.name===o));n[t]=x(l.item,e)}else n[t]=x(h.items,e)})),await t.saveTemplate(h.class,n),l.success("Die Vorgaben wurden gespeichert.",2e3),w()}]}const{document:Hi}=pe;function Yi(e,t,n){const o=e.slice();return o[22]=t[n],o}function Gi(e){let t,n;return t=new ni({props:{classId:e[2],item:e[22],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4],required:e[5]}}),t.$on("notify",e[13]),t.$on("task",e[17]),{c(){he(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[22]),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]),32&n&&(o.required=e[5]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ji(e){let t,n,o=Pi(e[7],e[22]),i=o&&Gi(e);return{c(){i&&i.c(),t=q()},m(e,o){i&&i.m(e,o),I(e,t,o),n=!0},p(e,n){130&n&&(o=Pi(e[7],e[22])),o?i?(i.p(e,n),130&n&&de(i,1)):(i=Gi(e),i.c(),de(i,1),i.m(t.parentNode,t)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce())},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){i&&i.d(e),e&&_(t)}}}function Ui(e){let t,n,o,i=e[1].item,l=[];for(let t=0;t<i.length;t+=1)l[t]=Ji(Yi(e,i,t));const r=e=>ue(l[e],1,1,(()=>{l[e]=null}));return{c(){t=j("div");for(let e=0;e<l.length;e+=1)l[e].c();T(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){I(e,t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);o=!0},p(e,s){if(8383&s){let n;for(i=e[1].item,n=0;n<i.length;n+=1){const o=Yi(e,i,n);l[n]?(l[n].p(o,s),de(l[n],1)):(l[n]=Ji(o),l[n].c(),de(l[n],1),l[n].m(t,null))}for(ae(),n=i.length;n<l.length;n+=1)r(n);ce()}(!o||6&s&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&T(t,"id",n)},i(e){if(!o){for(let e=0;e<i.length;e+=1)de(l[e]);o=!0}},o(e){l=l.filter(Boolean);for(let e=0;e<l.length;e+=1)ue(l[e]);o=!1},d(e){e&&_(t),N(l,e)}}}function Zi(e){let t,n,o=e[12](e[8])+"";return{c(){t=j("span"),n=F(o)},m(e,o){I(e,t,o),k(t,n)},p(e,t){256&t&&o!==(o=e[12](e[8])+"")&&D(n,o)},d(e){e&&_(t)}}}function Qi(e){let t,n,o;return n=new e[9]({props:{$$slots:{default:[Zi]},$$scope:{ctx:e}}}),n.$on("click",(function(){b(e[14](e[21]))&&e[14](e[21]).apply(this,arguments)})),{c(){t=j("div"),he(n.$$.fragment),T(t,"class","accordion svelte-148ktt9"),T(t,"slot","handle")},m(e,i){I(e,t,i),ge(n,t,null),o=!0},p(t,o){e=t;const i={};33554688&o&&(i.$$scope={dirty:o,ctx:e}),n.$set(i)},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n)}}}function Ki(e){let t,n;return t=new e[11]({props:{open:e[6],$$slots:{handle:[Qi,({toggle:e})=>({21:e}),({toggle:e})=>e?2097152:0],default:[Ui,({toggle:e})=>({21:e}),({toggle:e})=>e?2097152:0]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.open=e[6]),35652031&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Xi(e){let t,n,o;return n=new e[10]({props:{$$slots:{default:[Ki]},$$scope:{ctx:e}}}),{c(){t=j("div"),he(n.$$.fragment),T(t,"class","formList")},m(e,i){I(e,t,i),ge(n,t,null),o=!0},p(e,[t]){const o={};33554943&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){o||(de(n.$$.fragment,e),o=!0)},o(e){ue(n.$$.fragment,e),o=!1},d(e){e&&_(t),ve(n)}}}function el(e,t,n){const{Button:o,Accordion:i,AccordionSection:l}=c;let{list:r}=t,{schema:s}=t,{record:a}=t,{classId:d}=t,{eventId:p}=t,{disabled:$}=t,{required:h}=t,{open:g=!1}=t,{template:v={}}=t,{isTemplate:b=!1}=t;const w={};let y=a[r.name]||{};a[r.name]=y;const x=e=>w[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · ");return e.$$set=e=>{"list"in e&&n(1,r=e.list),"schema"in e&&n(15,s=e.schema),"record"in e&&n(0,a=e.record),"classId"in e&&n(2,d=e.classId),"eventId"in e&&n(3,p=e.eventId),"disabled"in e&&n(4,$=e.disabled),"required"in e&&n(5,h=e.required),"open"in e&&n(6,g=e.open),"template"in e&&n(16,v=e.template),"isTemplate"in e&&n(7,b=e.isTemplate)},[a,r,d,p,$,h,g,b,y,o,i,l,e=>s.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?x(t.name):"boolean"===t.type?f(e[t.name]):"date"===t.type?u(e[t.name]):"datetime"===t.type?m(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,o]=e.itemName.split(".");if(!o)return;e.desc&&(w[o]=e.desc);const i=a[t];n(0,a[t]={...i,[o]:e.value},a),n(8,y=a[t])},e=>t=>{(()=>{const e=v[r.name]||{};for(const t in e)v[r.name][t]&&!a[r.name][t]&&n(0,a[r.name][t]=v[r.name][t],a)})(),e(t);const o=`#accordion-content-${d}-${r.name} > div.form-field:last-child`,i=document.querySelector(o);X().then((()=>i.scrollIntoView({behavior:"smooth",block:"end"})))},s,v,function(t){H(e,t)}]}class tl extends we{constructor(e){var t;super(),Hi.getElementById("svelte-148ktt9-style")||((t=j("style")).id="svelte-148ktt9-style",t.textContent=".accordion.svelte-148ktt9{display:flex}.formList .accordion > .btn{display:inline-block;width:97%;margin-bottom:1em;background-color:#F5F5F5}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}",k(Hi.head,t)),be(this,e,el,Xi,w,{list:1,schema:15,record:0,classId:2,eventId:3,disabled:4,required:5,open:6,template:16,isTemplate:7})}}const{Boolean:nl,document:ol}=pe;function il(e,t,n){const o=e.slice();return o[81]=t[n],o}function ll(e,t,n){const o=e.slice();return o[84]=t[n],o}function rl(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function sl(e){let t,n,o=e[80]&&function(e){let t,n,o,i,l,r,s,a,c,d,u,m,f,p,$,h,g=e[0].items,b=[];for(let t=0;t<g.length;t+=1)b[t]=cl(ll(e,g,t));const w=e=>ue(b[e],1,1,(()=>{b[e]=null}));let y=e[0].list&&dl(e);m=new e[10]({props:{outline:!0,$$slots:{default:[vl]},$$scope:{ctx:e}}}),m.$on("click",e[25]);let S=e[22]&&function(e){let t,n,o,i;t=new e[10]({props:{class:"close",disabled:e[7],form:e[14],filled:!0,type:"submit",$$slots:{default:[bl]},$$scope:{ctx:e}}});let l=e[1]&&!e[7]&&wl(e);return{c(){he(t.$$.fragment),n=C(),l&&l.c(),o=q()},m(e,r){ge(t,e,r),I(e,n,r),l&&l.m(e,r),I(e,o,r),i=!0},p(e,n){const i={};128&n[0]&&(i.disabled=e[7]),33554432&n[2]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i),e[1]&&!e[7]?l?(l.p(e,n),130&n[0]&&de(l,1)):(l=wl(e),l.c(),de(l,1),l.m(o.parentNode,o)):l&&(ae(),ue(l,1,1,(()=>{l=null})),ce())},i(e){i||(de(t.$$.fragment,e),de(l),i=!0)},o(e){ue(t.$$.fragment,e),ue(l),i=!1},d(e){ve(t,e),e&&_(n),l&&l.d(e),e&&_(o)}}}(e);return{c(){t=j("section"),n=j("form"),o=j("input"),l=C();for(let e=0;e<b.length;e+=1)b[e].c();r=C(),y&&y.c(),s=C(),a=j("div"),c=j("small"),c.textContent=`${zl}`,d=C(),u=j("div"),he(m.$$.fragment),f=C(),S&&S.c(),T(o,"class",x(e[14])+" svelte-1dh1s6w"),T(o,"name","_id"),T(o,"type","hidden"),o.value=i=e[2]._id||"",T(n,"class",x(e[15])+" svelte-1dh1s6w"),T(n,"id",e[14]),T(a,"class","comment svelte-1dh1s6w"),T(u,"class","form--buttons svelte-1dh1s6w"),T(t,"class",x(e[16])+" svelte-1dh1s6w")},m(i,g){I(i,t,g),k(t,n),k(n,o),k(n,l);for(let e=0;e<b.length;e+=1)b[e].m(n,null);k(n,r),y&&y.m(n,null),k(t,s),k(t,a),k(a,c),k(t,d),k(t,u),ge(m,u,null),k(u,f),S&&S.m(u,null),p=!0,$||(h=[L(n,"keydown",e[30]),L(n,"submit",E(e[24]))],$=!0)},p(e,t){if((!p||4&t[0]&&i!==(i=e[2]._id||""))&&(o.value=i),471875717&t[0]|1&t[1]){let o;for(g=e[0].items,o=0;o<g.length;o+=1){const i=ll(e,g,o);b[o]?(b[o].p(i,t),de(b[o],1)):(b[o]=cl(i),b[o].c(),de(b[o],1),b[o].m(n,r))}for(ae(),o=g.length;o<b.length;o+=1)w(o);ce()}e[0].list?y?(y.p(e,t),1&t[0]&&de(y,1)):(y=dl(e),y.c(),de(y,1),y.m(n,null)):y&&(ae(),ue(y,1,1,(()=>{y=null})),ce());const l={};33554432&t[2]&&(l.$$scope={dirty:t,ctx:e}),m.$set(l),e[22]&&S.p(e,t)},i(e){if(!p){for(let e=0;e<g.length;e+=1)de(b[e]);de(y),de(m.$$.fragment,e),de(S),p=!0}},o(e){b=b.filter(nl);for(let e=0;e<b.length;e+=1)ue(b[e]);ue(y),ue(m.$$.fragment,e),ue(S),p=!1},d(e){e&&_(t),N(b,e),y&&y.d(),ve(m),S&&S.d(),$=!1,v(h)}}}(e);return{c(){o&&o.c(),t=q()},m(e,i){o&&o.m(e,i),I(e,t,i),n=!0},p(e,t){e[80]&&o.p(e,t)},i(e){n||(de(o),n=!0)},o(e){ue(o),n=!1},d(e){o&&o.d(e),e&&_(t)}}}function al(e){let t,n;return t=new ni({props:{classId:e[14],item:e[84],selection:e[84].selection,record:e[2],disabled:e[7],eventId:e[21]}}),t.$on("task",e[26]),t.$on("notify",e[27]),t.$on("multi",e[28]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.item=e[84]),1&n[0]&&(o.selection=e[84].selection),4&n[0]&&(o.record=e[2]),128&n[0]&&(o.disabled=e[7]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function cl(e){let t,n,o="list"!==e[84].type&&e[31](!0,e[84].name),i=o&&al(e);return{c(){i&&i.c(),t=q()},m(e,o){i&&i.m(e,o),I(e,t,o),n=!0},p(e,n){1&n[0]&&(o="list"!==e[84].type&&e[31](!0,e[84].name)),o?i?(i.p(e,n),1&n[0]&&de(i,1)):(i=al(e),i.c(),de(i,1),i.m(t.parentNode,t)):i&&(ae(),ue(i,1,1,(()=>{i=null})),ce())},i(e){n||(de(i),n=!0)},o(e){ue(i),n=!1},d(e){i&&i.d(e),e&&_(t)}}}function dl(e){let t,n,o,i,l=e[18]&&0!=e[3]&&ul(e),r=e[19]&&0!=e[4]&&fl(e),s=e[0].list,a=[];for(let t=0;t<s.length;t+=1)a[t]=gl(il(e,s,t));const c=e=>ue(a[e],1,1,(()=>{a[e]=null}));return{c(){l&&l.c(),t=C(),r&&r.c(),n=C();for(let e=0;e<a.length;e+=1)a[e].c();o=q()},m(e,s){l&&l.m(e,s),I(e,t,s),r&&r.m(e,s),I(e,n,s);for(let t=0;t<a.length;t+=1)a[t].m(e,s);I(e,o,s),i=!0},p(e,i){if(e[18]&&0!=e[3]?l?(l.p(e,i),8&i[0]&&de(l,1)):(l=ul(e),l.c(),de(l,1),l.m(t.parentNode,t)):l&&(ae(),ue(l,1,1,(()=>{l=null})),ce()),e[19]&&0!=e[4]?r?(r.p(e,i),16&i[0]&&de(r,1)):(r=fl(e),r.c(),de(r,1),r.m(n.parentNode,n)):r&&(ae(),ue(r,1,1,(()=>{r=null})),ce()),538984677&i[0]){let t;for(s=e[0].list,t=0;t<s.length;t+=1){const n=il(e,s,t);a[t]?(a[t].p(n,i),de(a[t],1)):(a[t]=gl(n),a[t].c(),de(a[t],1),a[t].m(o.parentNode,o))}for(ae(),t=s.length;t<a.length;t+=1)c(t);ce()}},i(e){if(!i){de(l),de(r);for(let e=0;e<s.length;e+=1)de(a[e]);i=!0}},o(e){ue(l),ue(r),a=a.filter(nl);for(let e=0;e<a.length;e+=1)ue(a[e]);i=!1},d(e){l&&l.d(e),e&&_(t),r&&r.d(e),e&&_(n),N(a,e),e&&_(o)}}}function ul(e){let t,n;return t=new e[11]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[ml]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};8&n[0]|33554432&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ml(e){let t,n,o;function i(t){e[41](t)}let l={item:e[17],disabled:!0};return void 0!==e[3]&&(l.value=e[3]),t=new dn({props:l}),G.push((()=>$e(t,"value",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};!n&&8&o[0]&&(n=!0,i.value=e[3],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function fl(e){let t,n;return t=new e[11]({props:{name:"Gesamtzeit in Wochen",nameClass:"formField_italic",$$slots:{default:[pl]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};16&n[0]|33554432&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function pl(e){let t,n,o;function i(t){e[42](t)}let l={item:e[20],disabled:!0};return void 0!==e[4]&&(l.value=e[4]),t=new dn({props:l}),G.push((()=>$e(t,"value",i))),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};!n&&16&o[0]&&(n=!0,i.value=e[4],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function $l(e){let t,n;return t=new tl({props:{classId:e[14],list:e[81],template:e[5],eventId:e[21],schema:e[81].item,record:e[2],disabled:e[7]}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[81]),32&n[0]&&(o.template=e[5]),1&n[0]&&(o.schema=e[81].item),4&n[0]&&(o.record=e[2]),128&n[0]&&(o.disabled=e[7]),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function hl(e){let t,n;return t=new Fi({props:{classId:e[14],list:e[81],template:e[6],eventId:e[21],schema:e[81].item,record:e[2],disabled:e[7],fixed:e[81].fixed}}),t.$on("save",e[29]),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};1&n[0]&&(o.list=e[81]),64&n[0]&&(o.template=e[6]),1&n[0]&&(o.schema=e[81].item),4&n[0]&&(o.record=e[2]),128&n[0]&&(o.disabled=e[7]),1&n[0]&&(o.fixed=e[81].fixed),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function gl(e){let t,n,o,i,l,r;t=new e[9]({props:{text:e[81].designation}});const s=[hl,$l],a=[];function c(e,t){return"array"===e[81].type?0:1}return o=c(e),i=a[o]=s[o](e),{c(){he(t.$$.fragment),n=C(),i.c(),l=q()},m(e,i){ge(t,e,i),I(e,n,i),a[o].m(e,i),I(e,l,i),r=!0},p(e,n){const r={};1&n[0]&&(r.text=e[81].designation),t.$set(r);let d=o;o=c(e),o===d?a[o].p(e,n):(ae(),ue(a[d],1,1,(()=>{a[d]=null})),ce(),i=a[o],i?i.p(e,n):(i=a[o]=s[o](e),i.c()),de(i,1),i.m(l.parentNode,l))},i(e){r||(de(t.$$.fragment,e),de(i),r=!0)},o(e){ue(t.$$.fragment,e),ue(i),r=!1},d(e){ve(t,e),e&&_(n),a[o].d(e),e&&_(l)}}}function vl(e){let t;return{c(){t=F("Abbrechen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function bl(e){let t;return{c(){t=F("Speichern und schliessen")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function wl(e){let t,n;return t=new e[10]({props:{form:e[14],filled:!0,type:"submit",style:"opacity: 0.75;",$$slots:{default:[yl]},$$scope:{ctx:e}}}),{c(){he(t.$$.fragment)},m(e,o){ge(t,e,o),n=!0},p(e,n){const o={};33554432&n[2]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function yl(e){let t;return{c(){t=F("Speichern")},m(e,n){I(e,t,n)},d(e){e&&_(t)}}}function xl(e){return{c:$,m:$,p:$,i:$,o:$,d:$}}function kl(e){let t,n,o,i;ol.title=t=e[8];let l={ctx:e,current:null,token:null,hasCatch:!1,pending:xl,then:sl,catch:rl,value:80,blocks:[,,,]};return me(e[23](),l),{c(){n=C(),o=q(),l.block.c()},m(e,t){I(e,n,t),I(e,o,t),l.block.m(e,l.anchor=t),l.mount=()=>o.parentNode,l.anchor=o,i=!0},p(n,o){e=n,(!i||256&o[0])&&t!==(t=e[8])&&(ol.title=t),fe(l,e,o)},i(e){i||(de(l.block),i=!0)},o(e){for(let e=0;e<3;e+=1){ue(l.blocks[e])}i=!1},d(e){e&&_(n),e&&_(o),l.block.d(e),l.token=null,l=null}}}let Il=new Map,_l=new Map,Nl=new Map;const jl=(e,n)=>{const o=n;return Il.has(o)||Il.set(o,t.getTasksList(n).then((({data:e})=>e))),Il.get(o)},Sl=(e,n,o)=>_l.get(o)||jl(e,n).then((n=>n.find((({_id:e})=>e===o))||t.getTaskList(e,o))).then((e=>(_l.set(o,e),e))),Fl=(e,t)=>{Nl.set(e,t)},Cl=e=>Nl.get(e),ql=(e,n)=>Nl.get(n)||t.getTask(e,n).then((e=>(Nl.set(n,e),e))),Ll=(e,n)=>{if(!Il.get(n))return;const o=n;Il.set(o,t.getTasksList(n).then((({data:e})=>e)))},El=()=>{Il=new Map,_l=new Map,Nl=new Map};let zl="";function Tl(e,o,a){let u,m,f,$,h,g;y(e,r,(e=>a(50,$=e))),y(e,s,(e=>a(51,h=e)));const{Divider:v,Button:b,FormField:w}=c,{loggedIn:x,currentTasks:k}=d;y(e,x,(e=>a(52,g=e))),y(e,k,(e=>a(49,f=e)));const I=JSON.parse(i.getItem("Locale")),_=R();let N,j,{schema:S}=o,{recID:F}=o,{prevEventID:C=!1}=o,{prev:q=!1}=o,{taskId:L=!1}=o,{description:E=""}=o,{root:z=!1}=o,{readonly:T}=o,{isStandalone:D}=o,O={},B={},M="form-"+S.class+Math.floor(9e3*Math.random()+1e3).toString();const V=z?"fEmbedded":"fTask",A=z?"sEmbedded":"sTask";let W=0,H=0,Y=1;const G={},J=S.items.find((e=>"price"===e.name&&!e.properties?.hidden)),U=S.items.find((e=>"quantity"===e.name&&!e.properties?.hidden)),Z=!!J,Q=S.list?.filter((e=>"array"===e.type))?.length>1||Z,K=S.items.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name,X=!!K,ee=S.list?.filter((e=>"array"===e.type))?.length>1||X,te={};let ne,oe,ie=0,le=0,re=[];S.class;let se=S.id;const ae=!f?.length||f.find((e=>e===se));["readonly","hidden","required"].map((e=>{S.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[o,i]=n.split(".");re.push({action:e,itemName:t.name,refObj:o,refName:i,op:t.properties[e].invert?"!":""})}))}));const ce=async e=>{if(e?.length)for(const n of e){if(!n.lookup)break;const{name:e}=n;if(O[e])break;const{domain:o,value:i}=n.lookup;if("user"===o&&i){const n={[i]:g.user},o=await t.getSectionView(e,n);if(o?.length){const[{_id:t}]=o;t&&a(2,O[e]=t,O)}}}},de=async()=>{if(!S.input)return;if(!S.input.length)return;if(S.input.length<2)return;const e=await t.getEvent(se),n=!e.input.class[0].name&&e.input.class[0].selection;if(!n)return;const o=e.input.class[1].name,i=e.input.class[1].destination?.split(".")[0];if(!o||!i)return;const l=S.list?.find((e=>e.name===o));if(!l)return;const r=await t.getSchemaByClass(n),s=(await t.getTasks(r.id)).data;if(!s?.length)return;const c=[];for(const e of s){const t={};for(const n of l.item)n.name===i?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);c.push(t)}c.length&&a(2,O[o]=c,O)},ue=()=>{for(const e of S.items)e.properties?.value?.concatenation&&me(e)},me=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 pe(e.refItemNext));a(2,O[e.name]=n,O)},fe=async e=>{const t=re.filter((t=>t.refObj===e));if(t?.length)for(const e of t){const{action:t,itemName:n,refObj:o,refName:i,op:l}=e;if(!o)break;let r,s,c=!1;const d=O[o];c=i?(await ql(o,d))[i]:d,"!"===l&&(c=!c),"required"!==t&&"readonly"!==t||(r=`#${M} .form-field.${n} .field textarea`,s=document.querySelector(r),s||(r=`#${M} .form-field.${n} .field input`,s=document.querySelector(r)),s&&c&&s.setAttribute(t,"true"),s&&!c&&s.removeAttribute(t)),"hidden"===t&&(r=`#${M} .form-field.${n}`,s=document.querySelector(r),s?.classList?.toggle("hidden",c),c&&a(2,O[n]="",O))}},pe=async e=>{const[n,o]=e.offset?.split(",")||[0,0],i=+e.base||0,l=+e.step||1;e.type;const r=e.refItem,s=await t.getLastId(S.class,r);if(!s?.length)return(i+l).toString().padStart(o,"0");const a=s[0][r];return((+a?.substring(n,n+o)||i)+l).toString().padStart(o,"0")},$e=(e,t,n=!1)=>{const o=t.name,i=e.find((e=>e.name===o));let l=t.value;if(!n&&i&&i.properties?.multi&&(l=O[o]),l&&i&&i.type.startsWith("date"))try{return No(l,"%d.%m.%Y").toISOString()}catch{return new Date(l).toISOString()}if(i&&"boolean"===i.type&&(l=!!t.checked),i&&"number"===i.type){const e=Number("1.1").toLocaleString(I.id).substring(1,2);try{l=Number(l.replace(e,".")).toString()}catch{}}return l},he=()=>D?window.close():z?window.singleSpaNavigate("/"):_("back"),ge=async(e,n)=>{if(S.input?.length>1){if(S.input[0]!==e)return;if(n){const o=await t.getTaskOptions(`${e}:${n}`,se);a(2,O={...O,...o})}else{const e=S.input.slice(1);for(const t of e)a(2,O[t]=[],O)}}},ve=()=>{let e=0;if(J){let t=1;U&&(t=Y),e=H*t}let t=0;for(const e in G)t+=G[e];a(3,W=t+e)},be=()=>{let e=0;for(const t in te)e+=te[t];a(4,ie=e+ +le)};n.subscribe((async e=>{if(!e)return;if(!Il.get(e.eventId))return;const n=await t.getTaskList(S.class,e.taskId);((e,t,n)=>{if(!Il.get(e))return;const o=t;_l.set(o,n)})(e.eventId,e.taskId,n)})),P(El);return e.$$set=e=>{"schema"in e&&a(0,S=e.schema),"recID"in e&&a(36,F=e.recID),"prevEventID"in e&&a(34,C=e.prevEventID),"prev"in e&&a(37,q=e.prev),"taskId"in e&&a(35,L=e.taskId),"description"in e&&a(32,E=e.description),"root"in e&&a(1,z=e.root),"readonly"in e&&a(33,T=e.readonly),"isStandalone"in e&&a(38,D=e.isStandalone)},e.$$.update=()=>{4&e.$$.dirty[1]&&a(7,u=T),1&e.$$.dirty[0]|768&e.$$.dirty[1]&&j&&N&&S.items.map((({name:e,type:t})=>{const n=N.items.find((t=>t.name===e));if(!n)return;if(t!==n.type)return;const o="_"+e;j[e]&&a(2,O[e]=j[e],O),j[o]&&a(2,O[o]=j[o],O)})),2&e.$$.dirty[0]|2&e.$$.dirty[1]&&a(8,m=z?E||"enablerr - Form":document.title)},[S,z,O,W,ie,ne,oe,u,m,v,b,w,x,k,M,V,A,{name:"amountValue",properties:{decimals:2}},Q,ee,{name:"weekValue",properties:{decimals:1}},se,ae,async()=>{if(a(6,oe=await t.getTemplate(S.class)),F||a(5,ne=oe),F&&(a(2,O=await t.getTask(S.class,F)),a(32,E=p(S,O))),C){a(33,T=!1),a(39,N=await t.getSchema(C)),"string"==typeof q&&a(40,j=await t.getTask(N.class,q));const e=S.items.find((e=>e.refClass===N.class));a(2,O[e.name]=j._id,O)}ee&&(le=O[K]||0);const e=await t.getEvent(se);if(e.trigger?.startOn&&!e.trigger.startOn.some((e=>e.type.indexOf("Manual")>=0))&&a(33,T=!0),$.role?.length&&S.authorization?.length){const e=S.authorization.some((e=>h?.find((t=>t===e.role&&"edit"===e.activity))));a(33,T||=!e)}return F||(ce(e.input?.class),ue(),de()),!0},async e=>{F||a(7,u=!0);const n=e.submitter?.className?.includes("close"),o={};Array.from(document.querySelectorAll("form#"+M+" ."+M)).map((e=>{if(e.name)if(e.name.includes(".")){const[t,n]=e.name.split("."),i=S.list.find((e=>e.name===t));o[e.name]=$e(i.item,e)}else o[e.name]=$e(S.items,e)})),S.list&&S.list.map((e=>{"array"===e.type&&B[e.name]&&(o[e.name]=B[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]=$e(e.item,{name:n,value:o,checked:o},!0)),t)),{}))),[]))})),o._event=se,o._prevEventId=C,o._taskId=L;const{id:i,task:r,error:s}=await t.saveData(S.class,o);if(s?.text){const e=s.field?" in "+s.field+": "+s.value:"";return l.failed(`${s.text} ${e}`,3e3),void a(7,u=!1)}l.success("Die Daten wurden gespeichert.",2e3),o._id=i;const c=await t.getTaskList(S.class,i);return _("choose",{row:c}),n?he():F?void 0:window.singleSpaNavigate(`/task/${se}/${r}/task`)},()=>C?window.history.back():he(),async({detail:{row:e}})=>{if((()=>{if(F)for(const e of re)e.refName||fe(e.itemName)})(),F)return;if(await(async()=>{for(const e of S.items)if(e.refItem&&O[e.refItem]){const n=await t.getTask(e.refItem,O[e.refItem]);n&&a(2,O[e.name]=n[e.name],O)}for(const e of S.list||[])if(e.refItem&&O[e.refItem]){const n=await t.getTask(e.refItem,O[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,O[e.name]=o,O)}})(),!e._task)return;const n=e._task.event,o=await t.getEvent(n),i=await t.getEvent(se);if(!i.output?.class?.length)return;const l=i.output.class[0]?.item.find((e=>(e.refClass||e.name)===o.output.class[0]?.name));(i.input?.class?.length&&i.input.class[0].name===o.output.class[0]?.name||l?.asInput)&&(a(39,N=await t.getSchema(n)),a(34,C=n),a(35,L=e._task._id),a(40,j=!!L&&await t.getTask(N.class,e._task.docId)),ge(N.class,e?._task?.docId))},({detail:e})=>{if(fe(e.itemName),ee&&(e.itemName===K&&(le=+e.value),be()),Z){if(e.itemName===J?.name)H=e.value;else{if(e.itemName!==U?.name)return;Y=e.value}ve()}},async({detail:e})=>{if(!S.input||!S.input.length)return;if(N?.class!==S.input[0])return;if(!(S.input&&S.input.length&&S.input.length>1))return;const{value:n,lookup:o,view:i}=e,[l]=o.split(":"),r=(await t.getSectionView(l,{[i]:{$in:n}})).map((e=>e._id));for(const e of S.input.slice(1)){a(2,O[e]=[],O);const n=await t.getSchemaByClass(e);n.id;let o=await t.getTasks(n.id);if(o=o.data.filter((e=>"Ready"===e._task.status&&r.includes(e[l]))),o?.length){const n=o.map((e=>e._id)),i=await t.getSectionView(e,{_id:{$in:n}});for(const t of i)t[e]=t._id;a(2,O[e]=i,O)}}},({detail:e})=>{B[e.listName]=e.value,Q&&(G[e.listName]=e.amountValue,ve()),ee&&(te[e.listName]=e.weeksValue||0,be())},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},(e,t)=>ne?(void 0!==ne[t]&&a(2,O[t]=ne[t],O),e):e,E,T,C,L,F,q,D,N,j,function(e){W=e,a(3,W)},function(e){ie=e,a(4,ie)}]}class Dl extends we{constructor(e){var t;super(),ol.getElementById("svelte-1dh1s6w-style")||((t=j("style")).id="svelte-1dh1s6w-style",t.textContent="form.disabled.svelte-1dh1s6w input.svelte-1dh1s6w{background-color:red !important}.comment.svelte-1dh1s6w.svelte-1dh1s6w{color:green;margin-bottom:1em}form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1dh1s6w.svelte-1dh1s6w{min-width:30em}}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w,.fTask.svelte-1dh1s6w.svelte-1dh1s6w{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1dh1s6w.svelte-1dh1s6w{height:fit-content;max-height:70vh}.sTask.svelte-1dh1s6w.svelte-1dh1s6w{height:95%;display:inline-grid}.sTask.svelte-1dh1s6w .btn.svelte-1dh1s6w{display:initial !important}.form--buttons.svelte-1dh1s6w.svelte-1dh1s6w{display:flex;gap:1em;padding-bottom:0.5em}",k(ol.head,t)),be(this,e,Tl,kl,w,{schema:0,recID:36,prevEventID:34,prev:37,taskId:35,description:32,root:1,readonly:33,isStandalone:38},[-1,-1,-1])}}function Ol(e){let t,n,o;function i(t){e[4](t)}let l={schema:e[5],recID:e[6]};return void 0!==e[0]&&(l.description=e[0]),t=new Dl({props:l}),G.push((()=>$e(t,"description",i))),t.$on("back",e[2]),{c(){he(t.$$.fragment)},m(e,n){ge(t,e,n),o=!0},p(e,o){const i={};32&o&&(i.schema=e[5]),64&o&&(i.recID=e[6]),!n&&1&o&&(n=!0,i.description=e[0],te((()=>n=!1))),t.$set(i)},i(e){o||(de(t.$$.fragment,e),o=!0)},o(e){ue(t.$$.fragment,e),o=!1},d(e){ve(t,e)}}}function Bl(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[Ol,({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(){he(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||(de(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ml(e,n,o){let i,{refresh:l}=n;return e.$$set=e=>{"refresh"in e&&o(3,l=e.refresh)},[i,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},l,function(e){i=e,o(0,i)}]}function Vl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Al,Wl,Pl=(Al=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){i(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 i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return l="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},l(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==l(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},r),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:s.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var r={component:null,domElementGetter:null,props:{}};function s(e){return Promise.resolve()}function a(e,t,n){var i=Object.keys(r),l=Object.keys(e).reduce((function(t,n){return i.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var i=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),r=i();t.instance=new e.component(o(o({},l),{},{target:r,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)}))}},Al(Wl={exports:{}},Wl.exports),Wl.exports);const Rl=Vl(Pl)({component:class extends we{constructor(e){super(),be(this,e,Ml,Bl,w,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Hl,mount:Yl,unmount:Gl}=Rl;e({bootstrap:Hl,mount:Yl,unmount:Gl});e("Form",Dl),e("List",st),e("Template",class extends we{constructor(e){var t;super(),Ci.getElementById("svelte-1phofh5-style")||((t=j("style")).id="svelte-1phofh5-style",t.textContent="form.svelte-1phofh5.svelte-1phofh5{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1phofh5.svelte-1phofh5{min-width:30em}}.fEmbedded.svelte-1phofh5.svelte-1phofh5,.fTask.svelte-1phofh5.svelte-1phofh5{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1phofh5.svelte-1phofh5{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1phofh5.svelte-1phofh5{height:fit-content;max-height:70vh}.sTask.svelte-1phofh5.svelte-1phofh5{height:95%;display:inline-grid;min-width:40em}.sTask.svelte-1phofh5 .btn.svelte-1phofh5{display:initial !important}.form--buttons.svelte-1phofh5.svelte-1phofh5{display:flex;gap:1em;padding-bottom:0.5em}",k(Ci.head,t)),be(this,e,Ri,Wi,w,{schema:0,record:1})}})}}}));
|