@enablerr-ui/detail 0.2.596 → 0.2.597

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 CHANGED
@@ -1 +1 @@
1
- System.register(["@enablerr-ui/form","@enablerr-ui/layout","@enablerr-ui/auth","@enablerr-ui/task"],(function(e){"use strict";var t,n,i,o,r,l,s,a,c,d,u,m;return{setters:[function(e){t=e.Request,n=e.task_notification,i=e.currentRoles,o=e.TextArea,r=e.Storage,l=e.toasts,s=e.settings,a=e.Page},function(e){c=e.getAttractions,d=e.PopOver},function(e){u=e.user},function(e){m=e.taskClipboard}],execute:function(){e("version","0.2.596");const f=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(" · "))),p=e=>{try{return new Date(e).toLocaleString()}catch{return e}},$=e=>e?"(ja)":"(nein)",h=(e,t)=>{const n={...t};return(e.display?.reduce(((t,i)=>{let[o,r]=i.split(".");if(e.list?.find((({name:e})=>e===o))&&r&&void 0!==n[o]){const e=`${o}_${r}`;n[e]=n[o][r],o=e}return t.find((e=>e===o))||t.push(o),t}),[]).map((e=>"boolean"==typeof n[e]?$(n[e]):f(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&$(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function g(){}function v(e){return e()}function y(){return Object.create(null)}function b(e){e.forEach(v)}function w(e){return"function"==typeof e}function x(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function k(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return g;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function I(e){return null==e?"":e}function _(e,t){e.appendChild(t)}function C(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode.removeChild(e)}function j(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function q(e){return document.createElement(e)}function N(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function E(e){return document.createTextNode(e)}function L(){return E(" ")}function F(){return E("")}function D(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function z(e){return function(t){return t.preventDefault(),e.call(this,t)}}function T(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function A(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function B(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function V(e,t){e.value=null==t?"":t}function O(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function M(e,t,n){e.classList[n?"add":"remove"](t)}let W;function R(e){W=e}function P(){if(!W)throw new Error("Function called outside component initialization");return W}function H(e){P().$$.on_mount.push(e)}function Q(e){P().$$.on_destroy.push(e)}function Y(){const e=P();return(t,n)=>{const i=e.$$.callbacks[t];if(i){const o=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);i.slice().forEach((t=>{t.call(e,o)}))}}}function G(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const U=[],K=[],J=[],Z=[],X=Promise.resolve();let ee=!1;function te(){ee||(ee=!0,X.then(se))}function ne(){return te(),X}function ie(e){J.push(e)}function oe(e){Z.push(e)}let re=!1;const le=new Set;function se(){if(!re){re=!0;do{for(let e=0;e<U.length;e+=1){const t=U[e];R(t),ae(t.$$)}for(R(null),U.length=0;K.length;)K.pop()();for(let e=0;e<J.length;e+=1){const t=J[e];le.has(t)||(le.add(t),t())}J.length=0}while(U.length);for(;Z.length;)Z.pop()();ee=!1,re=!1,le.clear()}}function ae(e){if(null!==e.fragment){e.update(),b(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ie)}}const ce=new Set;let de;function ue(){de={r:0,c:[],p:de}}function me(){de.r||b(de.c),de=de.p}function fe(e,t){e&&e.i&&(ce.delete(e),e.i(t))}function pe(e,t,n,i){if(e&&e.o){if(ce.has(e))return;ce.add(e),de&&de.c.push((()=>{ce.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}function $e(e,t){const n=t.token={};function i(e,i,o,r){if(t.token!==n)return;t.resolved=r;let l=t.ctx;void 0!==o&&(l=l.slice(),l[o]=r);const s=e&&(t.current=e)(l);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==i&&e&&(ue(),pe(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),me())})):t.block.d(1),s.c(),fe(s,1),s.m(t.mount(),t.anchor),a=!0),t.block=s,t.blocks&&(t.blocks[i]=s),a&&se()}if((o=e)&&"object"==typeof o&&"function"==typeof o.then){const n=P();if(e.then((e=>{R(n),i(t.then,1,t.value,e),R(null)}),(e=>{if(R(n),i(t.catch,2,t.error,e),R(null),!t.hasCatch)throw e})),t.current!==t.pending)return i(t.pending,0),!0}else{if(t.current!==t.then)return i(t.then,1,t.value,e),!0;t.resolved=e}var o}function he(e,t,n){const i=t.slice(),{resolved:o}=e;e.current===e.then&&(i[e.value]=o),e.current===e.catch&&(i[e.error]=o),e.block.p(i,n)}const ge="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ve(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function ye(e){e&&e.c()}function be(e,t,n,i){const{fragment:o,on_mount:r,on_destroy:l,after_update:s}=e.$$;o&&o.m(t,n),i||ie((()=>{const t=r.map(v).filter(w);l?l.push(...t):b(t),e.$$.on_mount=[]})),s.forEach(ie)}function we(e,t){const n=e.$$;null!==n.fragment&&(b(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function xe(e,t,n,i,o,r,l=[-1]){const s=W;R(e);const a=e.$$={fragment:null,ctx:null,props:r,update:g,not_equal:o,bound:y(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:t.context||[]),callbacks:y(),dirty:l,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...i)=>{const r=i.length?i[0]:n;return a.ctx&&o(a.ctx[t],a.ctx[t]=r)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](r),c&&function(e,t){-1===e.$$.dirty[0]&&(U.push(e),te(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,b(a.before_update),a.fragment=!!i&&i(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(S)}else a.fragment&&a.fragment.c();t.intro&&fe(e.$$.fragment),be(e,t.target,t.anchor,t.customElement),se()}R(s)}class ke{$destroy(){we(this,1),this.$destroy=g}$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 Ie(e){let t,n,i,o,r;return{c(){t=N("svg"),n=N("circle"),i=N("polyline"),o=N("line"),A(n,"cx","12"),A(n,"cy","12"),A(n,"r","10"),A(i,"points","8 12 12 16 16 12"),A(o,"x1","12"),A(o,"y1","8"),A(o,"x2","12"),A(o,"y2","16"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",r="feather feather-arrow-down-circle "+e[2])},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-arrow-down-circle "+e[2])&&A(t,"class",r)},i:g,o:g,d(e){e&&S(t)}}}function _e(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ce extends ke{constructor(e){super(),xe(this,e,_e,Ie,x,{size:0,strokeWidth:1,class:2})}}function Se(e){let t,n,i,o;return{c(){t=N("svg"),n=N("path"),i=N("polyline"),A(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),A(i,"points","22 4 12 14.01 9 11.01"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",o="feather feather-check-circle "+e[2])},m(e,o){C(e,t,o),_(t,n),_(t,i)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-check-circle "+e[2])&&A(t,"class",o)},i:g,o:g,d(e){e&&S(t)}}}function je(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class qe extends ke{constructor(e){super(),xe(this,e,je,Se,x,{size:0,strokeWidth:1,class:2})}}function Ne(e){let t,n,i;return{c(){t=N("svg"),n=N("path"),A(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"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",i="feather feather-command "+e[2])},m(e,i){C(e,t,i),_(t,n)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-command "+e[2])&&A(t,"class",i)},i:g,o:g,d(e){e&&S(t)}}}function Ee(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Le extends ke{constructor(e){super(),xe(this,e,Ee,Ne,x,{size:0,strokeWidth:1,class:2})}}function Fe(e){let t,n,i,o;return{c(){t=N("svg"),n=N("polyline"),i=N("path"),A(n,"points","9 10 4 15 9 20"),A(i,"d","M20 4v7a4 4 0 0 1-4 4H4"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",o="feather feather-corner-down-left "+e[2])},m(e,o){C(e,t,o),_(t,n),_(t,i)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-corner-down-left "+e[2])&&A(t,"class",o)},i:g,o:g,d(e){e&&S(t)}}}function De(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class ze extends ke{constructor(e){super(),xe(this,e,De,Fe,x,{size:0,strokeWidth:1,class:2})}}function Te(e){let t,n,i,o,r;return{c(){t=N("svg"),n=N("path"),i=N("line"),o=N("line"),A(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),A(i,"x1","18"),A(i,"y1","9"),A(i,"x2","12"),A(i,"y2","15"),A(o,"x1","12"),A(o,"y1","9"),A(o,"x2","18"),A(o,"y2","15"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",r="feather feather-delete "+e[2])},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-delete "+e[2])&&A(t,"class",r)},i:g,o:g,d(e){e&&S(t)}}}function Ae(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Be extends ke{constructor(e){super(),xe(this,e,Ae,Te,x,{size:0,strokeWidth:1,class:2})}}function Ve(e){let t,n,i,o,r;return{c(){t=N("svg"),n=N("path"),i=N("polyline"),o=N("line"),A(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),A(i,"points","15 3 21 3 21 9"),A(o,"x1","10"),A(o,"y1","14"),A(o,"x2","21"),A(o,"y2","3"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",r="feather feather-external-link "+e[2])},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-external-link "+e[2])&&A(t,"class",r)},i:g,o:g,d(e){e&&S(t)}}}function Oe(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Me extends ke{constructor(e){super(),xe(this,e,Oe,Ve,x,{size:0,strokeWidth:1,class:2})}}function We(e){let t,n,i,o,r;return{c(){t=N("svg"),n=N("circle"),i=N("line"),o=N("path"),A(n,"cx","12"),A(n,"cy","12"),A(n,"r","10"),A(i,"x1","2"),A(i,"y1","12"),A(i,"x2","22"),A(i,"y2","12"),A(o,"d","M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",r="feather feather-globe "+e[2])},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-globe "+e[2])&&A(t,"class",r)},i:g,o:g,d(e){e&&S(t)}}}function Re(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Pe extends ke{constructor(e){super(),xe(this,e,Re,We,x,{size:0,strokeWidth:1,class:2})}}function He(e){let t,n,i,o;return{c(){t=N("svg"),n=N("path"),i=N("polyline"),A(n,"d","M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"),A(i,"points","22,6 12,13 2,6"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",o="feather feather-mail "+e[2])},m(e,o){C(e,t,o),_(t,n),_(t,i)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-mail "+e[2])&&A(t,"class",o)},i:g,o:g,d(e){e&&S(t)}}}function Qe(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ye extends ke{constructor(e){super(),xe(this,e,Qe,He,x,{size:0,strokeWidth:1,class:2})}}function Ge(e){let t,n,i,o;return{c(){t=N("svg"),n=N("path"),i=N("circle"),A(n,"d","M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"),A(i,"cx","12"),A(i,"cy","10"),A(i,"r","3"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",o="feather feather-map-pin "+e[2])},m(e,o){C(e,t,o),_(t,n),_(t,i)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-map-pin "+e[2])&&A(t,"class",o)},i:g,o:g,d(e){e&&S(t)}}}function Ue(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ke extends ke{constructor(e){super(),xe(this,e,Ue,Ge,x,{size:0,strokeWidth:1,class:2})}}function Je(e){let t,n,i,o,r;return{c(){t=N("svg"),n=N("polyline"),i=N("line"),o=N("path"),A(n,"points","23 7 23 1 17 1"),A(i,"x1","16"),A(i,"y1","8"),A(i,"x2","23"),A(i,"y2","1"),A(o,"d","M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",r="feather feather-phone-outgoing "+e[2])},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-phone-outgoing "+e[2])&&A(t,"class",r)},i:g,o:g,d(e){e&&S(t)}}}function Ze(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Xe extends ke{constructor(e){super(),xe(this,e,Ze,Je,x,{size:0,strokeWidth:1,class:2})}}function et(e){let t,n,i,o,r;return{c(){t=N("svg"),n=N("polyline"),i=N("path"),o=N("rect"),A(n,"points","6 9 6 2 18 2 18 9"),A(i,"d","M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"),A(o,"x","6"),A(o,"y","14"),A(o,"width","12"),A(o,"height","8"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",r="feather feather-printer "+e[2])},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-printer "+e[2])&&A(t,"class",r)},i:g,o:g,d(e){e&&S(t)}}}function tt(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class nt extends ke{constructor(e){super(),xe(this,e,tt,et,x,{size:0,strokeWidth:1,class:2})}}function it(e){let t,n,i,o;return{c(){t=N("svg"),n=N("circle"),i=N("line"),A(n,"cx","11"),A(n,"cy","11"),A(n,"r","8"),A(i,"x1","21"),A(i,"y1","21"),A(i,"x2","16.65"),A(i,"y2","16.65"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",o="feather feather-search "+e[2])},m(e,o){C(e,t,o),_(t,n),_(t,i)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-search "+e[2])&&A(t,"class",o)},i:g,o:g,d(e){e&&S(t)}}}function ot(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class rt extends ke{constructor(e){super(),xe(this,e,ot,it,x,{size:0,strokeWidth:1,class:2})}}const{document:lt}=ge;function st(e){e[36]=e[37].items}function at(e,t,n){const i=e.slice();return i[38]=t[n],i}function ct(e,t,n){const i=e.slice();return i[41]=t[n],i}function dt(e,t,n){const i=e.slice();return i[41]=t[n],i}function ut(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function mt(e){let t,n,i,o,r,l;st(e);let s=e[5]?.length&&ft(e),a=e[36]?.length&&$t(e),c=e[5]?.length&&vt(e);return{c(){s&&s.c(),t=L(),n=q("div"),i=q("table"),a&&a.c(),o=L(),r=q("tbody"),c&&c.c(),A(i,"striped",""),A(i,"class","svelte-btngop"),A(n,"class","eList svelte-btngop")},m(e,d){s&&s.m(e,d),C(e,t,d),C(e,n,d),_(n,i),a&&a.m(i,null),_(i,o),_(i,r),c&&c.m(r,null),l=!0},p(e,n){st(e),e[5]?.length?s?(s.p(e,n),32&n[0]&&fe(s,1)):(s=ft(e),s.c(),fe(s,1),s.m(t.parentNode,t)):s&&(ue(),pe(s,1,1,(()=>{s=null})),me()),e[36]?.length?a?a.p(e,n):(a=$t(e),a.c(),a.m(i,o)):a&&(a.d(1),a=null),e[5]?.length?c?(c.p(e,n),32&n[0]&&fe(c,1)):(c=vt(e),c.c(),fe(c,1),c.m(r,null)):c&&(ue(),pe(c,1,1,(()=>{c=null})),me())},i(e){l||(fe(s),fe(c),l=!0)},o(e){pe(s),pe(c),l=!1},d(e){s&&s.d(e),e&&S(t),e&&S(n),a&&a.d(),c&&c.d()}}}function ft(e){let t,n,i,o,r,l,s,a,c,d,u,m=e[6]&&pt(e);function f(t){e[27](t)}let p={id:e[10]};return void 0!==e[3]&&(p.value=e[3]),o=new e[8]({props:p}),K.push((()=>ve(o,"value",f))),o.$on("input",e[14]),a=new Be({props:{size:"18"}}),{c(){m&&m.c(),t=L(),n=q("div"),i=E("Suchen: "),ye(o.$$.fragment),l=L(),s=q("span"),ye(a.$$.fragment),A(s,"class","feather pointer svelte-btngop"),O(n,"margin-bottom","1em"),O(n,"position","relative")},m(r,f){m&&m.m(r,f),C(r,t,f),C(r,n,f),_(n,i),be(o,n,null),_(n,l),_(n,s),be(a,s,null),c=!0,d||(u=D(s,"click",e[17]),d=!0)},p(e,n){e[6]?m?64&n[0]&&fe(m,1):(m=pt(e),m.c(),fe(m,1),m.m(t.parentNode,t)):m&&(ue(),pe(m,1,1,(()=>{m=null})),me());const i={};!r&&8&n[0]&&(r=!0,i.value=e[3],oe((()=>r=!1))),o.$set(i)},i(e){c||(fe(m),fe(o.$$.fragment,e),fe(a.$$.fragment,e),c=!0)},o(e){pe(m),pe(o.$$.fragment,e),pe(a.$$.fragment,e),c=!1},d(e){m&&m.d(e),e&&S(t),e&&S(n),we(o),we(a),d=!1,u()}}}function pt(e){let t,n;return t=new e[7]({}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function $t(e){let t,n,i,o=e[4]&&e[0]&&ht(),r=e[36],l=[];for(let t=0;t<r.length;t+=1)l[t]=gt(dt(e,r,t));return{c(){t=q("thead"),n=q("tr"),o&&o.c(),i=L();for(let e=0;e<l.length;e+=1)l[e].c();A(n,"class","svelte-btngop"),A(t,"class","svelte-btngop")},m(e,r){C(e,t,r),_(t,n),o&&o.m(n,null),_(n,i);for(let e=0;e<l.length;e+=1)l[e].m(n,null)},p(e,t){if(e[4]&&e[0]?o||(o=ht(),o.c(),o.m(n,i)):o&&(o.d(1),o=null),8196&t[0]){let i;for(r=e[36],i=0;i<r.length;i+=1){const o=dt(e,r,i);l[i]?l[i].p(o,t):(l[i]=gt(o),l[i].c(),l[i].m(n,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=r.length}},d(e){e&&S(t),o&&o.d(),j(l,e)}}}function ht(e){let t;return{c(){t=q("th"),A(t,"class","svelte-btngop")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function gt(e){let t,n,i=e[41]?.designation+"";return{c(){t=q("th"),n=E(i),A(t,"class","svelte-btngop")},m(e,i){C(e,t,i),_(t,n)},p(e,t){4&t[0]&&i!==(i=e[41]?.designation+"")&&B(n,i)},d(e){e&&S(t)}}}function vt(e){let t,n,i=e[5],o=[];for(let t=0;t<i.length;t+=1)o[t]=xt(at(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(112703&n[0]){let l;for(i=e[5],l=0;l<i.length;l+=1){const r=at(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=xt(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}function yt(e){let t,n,i,o,r=e[4]&&e[0]&&bt(e),l=e[36],s=[];for(let t=0;t<l.length;t+=1)s[t]=wt(ct(e,l,t));return{c(){t=q("tr"),r&&r.c(),n=L();for(let e=0;e<s.length;e+=1)s[e].c();i=L(),A(t,"class","pointer svelte-btngop"),M(t,"active",e[38]._id===e[1])},m(e,l){C(e,t,l),r&&r.m(t,null),_(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);_(t,i),o=!0},p(e,o){if(e[4]&&e[0]?r?(r.p(e,o),17&o[0]&&fe(r,1)):(r=bt(e),r.c(),fe(r,1),r.m(t,n)):r&&(ue(),pe(r,1,1,(()=>{r=null})),me()),14372&o[0]){let n;for(l=e[36],n=0;n<l.length;n+=1){const r=ct(e,l,n);s[n]?s[n].p(r,o):(s[n]=wt(r),s[n].c(),s[n].m(t,i))}for(;n<s.length;n+=1)s[n].d(1);s.length=l.length}34&o[0]&&M(t,"active",e[38]._id===e[1])},i(e){o||(fe(r),o=!0)},o(e){pe(r),o=!1},d(e){e&&S(t),r&&r.d(),j(s,e)}}}function bt(e){let t,n,i,o,r;return i=new Me({props:{size:"18"}}),{c(){t=q("td"),n=q("a"),ye(i.$$.fragment),A(n,"href",o=e[16](e[38])),A(n,"target","_blank"),A(t,"class","editRow svelte-btngop")},m(e,o){C(e,t,o),_(t,n),be(i,n,null),r=!0},p(e,t){(!r||32&t[0]&&o!==(o=e[16](e[38])))&&A(n,"href",o)},i(e){r||(fe(i.$$.fragment,e),r=!0)},o(e){pe(i.$$.fragment,e),r=!1},d(e){e&&S(t),we(i)}}}function wt(e){let t,n,i,o,r=e[11](e[38],e[41])+"";return{c(){t=q("td"),n=E(r),A(t,"class","svelte-btngop")},m(r,l){C(r,t,l),_(t,n),i||(o=D(t,"click",T((function(){w(e[12](e[38]))&&e[12](e[38]).apply(this,arguments)}))),i=!0)},p(t,i){e=t,36&i[0]&&r!==(r=e[11](e[38],e[41])+"")&&B(n,r)},d(e){e&&S(t),i=!1,o()}}}function xt(e){let t,n,i=e[15](e[38],e[36],e[3]),o=i&&yt(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){44&n[0]&&(i=e[15](e[38],e[36],e[3])),i?o?(o.p(e,n),44&n[0]&&fe(o,1)):(o=yt(e),o.c(),fe(o,1),o.m(t.parentNode,t)):o&&(ue(),pe(o,1,1,(()=>{o=null})),me())},i(e){n||(fe(o),n=!0)},o(e){pe(o),n=!1},d(e){o&&o.d(e),e&&S(t)}}}function kt(e){let t,n;return t=new e[7]({}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p:g,i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function It(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:kt,then:mt,catch:ut,value:37,blocks:[,,,]};return $e(n=e[2]&&e[13](),o),{c(){t=F(),o.block.c()},m(e,n){C(e,t,n),o.block.m(e,o.anchor=n),o.mount=()=>t.parentNode,o.anchor=t,i=!0},p(t,i){e=t,o.ctx=e,4&i[0]&&n!==(n=e[2]&&e[13]())&&$e(n,o)||he(o,e,i)},i(e){i||(fe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){e&&S(t),o.block.d(e),o.token=null,o=null}}}function _t(e,i,o){let r;const l=Y(),{Loading:s,TextField:a}=c,{currentTasks:d}=u;k(e,d,(e=>o(29,r=e)));let m,p,h,{inputList:g}=i,{eventId:v}=i,{prevEventId:y}=i,{className:b}=i,{rowId:w}=i,{filterForReady:x=!1}=i,{refStatus:I}=i,{showEdit:_=!1}=i,{praefix:C=""}=i,{selectionFields:S=!1}=i,{deList:j}=i,q=!0,N="",E=b+Math.floor(9e3*Math.random()+1e3).toString()+"search",L=!1;const F=(e,t)=>{if(!t)return;let n=e[t.name];if(Array.isArray(n)){const e=e=>e.replaceAll(" ",String.fromCharCode(160));n=n.map(e),n.length>3&&(n=n.slice(0,3),n=n.concat("...")),n=n.join(", ")}return"boolean"==typeof n?$(n):f(e[`_${t.name}`]||n||"")},D=t.getSchemaByClass(b),z=async(e,n)=>{if(I)return o(18,I=[].concat(I)),e.filter((e=>!!I.find((t=>e._task.status===t))));if("Information"===n.state.task)return e;if(y){const n=await t.getEvent(y);if("report"===n?.output?.type)return e;if(n?.input?.class?.length&&n.input.class[0].name===b)return"Information"===n.state.task?e.filter((e=>"Closed"!==e._task.status)):e.filter((e=>"Ready"===e._task.status))}return e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status))},T=async(e,t,n,i)=>{const{value:o,refClass:r}=i,[l,s]=n.split("."),a=o?.get(C),c=a&&await Zs(l,a);if(!c)return e;const d=c[s];return d?.length?d.map((n=>{let i=e?.find((e=>e._id===n[t]))||{};i={...i};for(const e in i)n[e]&&(i[e]=n[e]);for(const e in n)n[e]&&(i[e]=n[e]);return Ks(r+i._id.toString(),i),i})):e};H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(E)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await D;e.eventId===t.id&&(Xs(t.class,e.eventId),o(2,q=!o(2,q=!1)))}));return e.$$set=e=>{"inputList"in e&&o(19,g=e.inputList),"eventId"in e&&o(20,v=e.eventId),"prevEventId"in e&&o(21,y=e.prevEventId),"className"in e&&o(22,b=e.className),"rowId"in e&&o(1,w=e.rowId),"filterForReady"in e&&o(23,x=e.filterForReady),"refStatus"in e&&o(18,I=e.refStatus),"showEdit"in e&&o(0,_=e.showEdit),"praefix"in e&&o(24,C=e.praefix),"selectionFields"in e&&o(25,S=e.selectionFields),"deList"in e&&o(26,j=e.deList)},[_,w,q,N,m,p,L,s,a,d,E,F,e=>()=>(o(5,p=[]),l("choose",{row:e})),async()=>{const e=await D;o(4,m=(e=>!r?.length||!!r.find((t=>t===e)))(e.id)),o(5,p=h=g||await Gs(e.class,e.id)),500===p?.length&&(o(6,L=!0),t.getTasksList(e.id,!1,!0).then((({data:e})=>{o(6,L=!1),o(5,p=e),p?.length&&window.setTimeout((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"})}),200)})));let n,i=!1,s="";const a=S&&S?.find((t=>e.class===t.refClass.split(":")[0])),c=a?.value?.get&&a.value.get(C);if(c){const[r,l]=a.refClass.split(":");e.class===r&&o(5,p=await T(p,r,l,a)),i=a.parentClass?.find((e=>"quantity"===e.name)),s=a.className,n=await t.getCountedSection(s,l.split(".")[0],c,r,"quantity")}o(0,_&&=!a),a||!x&&!I||o(5,p=await z(p,e));let d=[],{display:u}=e;return u&&u.length?u.map((t=>{const[n,i]=t.split(".");let r=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===i));r&&(r={...r},r.name=`${n}_${i}`,o(5,p=p.map((e=>(e[n]&&(e[r.name]=e["_"+n]?e["_"+n][i]:e[n][i]),e))))),r||(r=e.items.find((e=>e.name===n))),d.find((e=>e?.name===n))||d.push(r)})):d=e.items,!_&&i?(d=d.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),o(5,p=p.map((e=>{const t=n.find((t=>t._id===e._id));return t&&(e.ist=t.quantity.$numberDecimal),e}))),n.map((e=>{if(!p.find((t=>t._id===e._id))){const t=h.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,p.push(t)}})),l("init",p)):j&&o(5,p=p.filter((e=>!j.find((t=>t._id===e._id))))),{items:d}},({detail:{value:e}})=>{o(3,N=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(F(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},e=>`/task/${e._task.event}/${e._task._id}/task?view=standalone`,()=>{o(3,N="")},I,g,v,y,b,x,C,S,j,function(e){N=e,o(3,N)}]}class Ct extends ke{constructor(e){var t;super(),lt.getElementById("svelte-btngop-style")||((t=q("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}",_(lt.head,t)),xe(this,e,_t,It,x,{inputList:19,eventId:20,prevEventId:21,className:22,rowId:1,filterForReady:23,refStatus:18,showEdit:0,praefix:24,selectionFields:25,deList:26},[-1,-1])}}function St(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function jt(e){let t,n,i=e[39]&&qt(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[39]?i?(i.p(e,n),8&n[0]&&fe(i,1)):(i=qt(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function qt(e){let t,n;return t=new e[19]({props:{title:e[15]?"Auswahl":e[0],class:"eList "+(e[13]?"form":""),$$slots:{default:[Vt]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};32769&n[0]&&(i.title=e[15]?"Auswahl":e[0]),8192&n[0]&&(i.class="eList "+(e[13]?"form":"")),524286&n[0]|512&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Nt(e){let t,n;return t=new ta({props:{schema:e[2],recID:e[1],readonly:e[14]}}),t.$on("choose",(function(){w(e[28](e[39]))&&e[28](e[39]).apply(this,arguments)})),t.$on("back",e[25]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(n,i){e=n;const o={};4&i[0]&&(o.schema=e[2]),2&i[0]&&(o.recID=e[1]),16384&i[0]&&(o.readonly=e[14]),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Et(e){let t,n,i,o,r,l,s;t=new e[20]({props:{text:e[15]?"Zusätzliche Auswahl":""}});const a=[Ft,Lt],c=[];function d(e,t){return e[15]?0:1}return i=d(e),o=c[i]=a[i](e),l=new Ct({props:{eventId:e[2].id,className:e[2].class,prevEventId:e[11],filterForReady:e[4],refStatus:e[5],praefix:e[6],selectionFields:e[7],rowId:e[1],deList:e[9],showEdit:e[8]}}),l.$on("edit",e[29]),l.$on("choose",e[32]),l.$on("init",e[30]),{c(){ye(t.$$.fragment),n=L(),o.c(),r=L(),ye(l.$$.fragment)},m(e,o){be(t,e,o),C(e,n,o),c[i].m(e,o),C(e,r,o),be(l,e,o),s=!0},p(e,n){const s={};32768&n[0]&&(s.text=e[15]?"Zusätzliche Auswahl":""),t.$set(s);let u=i;i=d(e),i===u?c[i].p(e,n):(ue(),pe(c[u],1,1,(()=>{c[u]=null})),me(),o=c[i],o?o.p(e,n):(o=c[i]=a[i](e),o.c()),fe(o,1),o.m(r.parentNode,r));const m={};4&n[0]&&(m.eventId=e[2].id),4&n[0]&&(m.className=e[2].class),2048&n[0]&&(m.prevEventId=e[11]),16&n[0]&&(m.filterForReady=e[4]),32&n[0]&&(m.refStatus=e[5]),64&n[0]&&(m.praefix=e[6]),128&n[0]&&(m.selectionFields=e[7]),2&n[0]&&(m.rowId=e[1]),512&n[0]&&(m.deList=e[9]),256&n[0]&&(m.showEdit=e[8]),l.$set(m)},i(e){s||(fe(t.$$.fragment,e),fe(o),fe(l.$$.fragment,e),s=!0)},o(e){pe(t.$$.fragment,e),pe(o),pe(l.$$.fragment,e),s=!1},d(e){we(t,e),e&&S(n),c[i].d(e),e&&S(r),we(l,e)}}}function Lt(e){let t,n,i,o;n=new e[21]({props:{outline:!0,$$slots:{default:[Dt]},$$scope:{ctx:e}}}),n.$on("click",e[26]);let r=e[23]&&e[10]&&zt(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),r&&r.c(),A(t,"class","form--buttons svelte-jb5mrh")},m(e,l){C(e,t,l),be(n,t,null),_(t,i),r&&r.m(t,null),o=!0},p(e,i){const o={};512&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o),e[23]&&e[10]?r?(r.p(e,i),1024&i[0]&&fe(r,1)):(r=zt(e),r.c(),fe(r,1),r.m(t,null)):r&&(ue(),pe(r,1,1,(()=>{r=null})),me())},i(e){o||(fe(n.$$.fragment,e),fe(r),o=!0)},o(e){pe(n.$$.fragment,e),pe(r),o=!1},d(e){e&&S(t),we(n),r&&r.d()}}}function Ft(e){let t,n,i,o,r,l,s=e[18]&&At(e);return i=new e[21]({props:{outline:!0,$$slots:{default:[Bt]},$$scope:{ctx:e}}}),i.$on("click",e[26]),r=new e[20]({props:{text:"Liste aus "+e[12]}}),{c(){s&&s.c(),t=L(),n=q("div"),ye(i.$$.fragment),o=L(),ye(r.$$.fragment),A(n,"class","form--buttons svelte-jb5mrh")},m(e,a){s&&s.m(e,a),C(e,t,a),C(e,n,a),be(i,n,null),C(e,o,a),be(r,e,a),l=!0},p(e,n){e[18]?s?(s.p(e,n),262144&n[0]&&fe(s,1)):(s=At(e),s.c(),fe(s,1),s.m(t.parentNode,t)):s&&(ue(),pe(s,1,1,(()=>{s=null})),me());const o={};512&n[1]&&(o.$$scope={dirty:n,ctx:e}),i.$set(o);const l={};4096&n[0]&&(l.text="Liste aus "+e[12]),r.$set(l)},i(e){l||(fe(s),fe(i.$$.fragment,e),fe(r.$$.fragment,e),l=!0)},o(e){pe(s),pe(i.$$.fragment,e),pe(r.$$.fragment,e),l=!1},d(e){s&&s.d(e),e&&S(t),e&&S(n),we(i),e&&S(o),we(r,e)}}}function Dt(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function zt(e){let t,n;return t=new e[21]({props:{filled:!0,$$slots:{default:[Tt]},$$scope:{ctx:e}}}),t.$on("click",e[27]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};512&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Tt(e){let t;return{c(){t=E("Neu")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function At(e){let t,n;return t=new Ll({props:{item:e[16],record:{_id:"",[e[16].name]:""},noForm:"true",classId:"sel_"+e[16].name,eventId:e[17],required:!1,hidden:!1,readonly:!1,deList:e[18]}}),t.$on("notify",e[31]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};65536&n[0]&&(i.item=e[16]),65536&n[0]&&(i.record={_id:"",[e[16].name]:""}),65536&n[0]&&(i.classId="sel_"+e[16].name),131072&n[0]&&(i.eventId=e[17]),262144&n[0]&&(i.deList=e[18]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Bt(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Vt(e){let t,n,i,o;const r=[Et,Nt],l=[];function s(e,t){return e[39].length&&!e[13]?0:1}return t=s(e),n=l[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){l[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=s(e),t===a?l[t].p(e,o):(ue(),pe(l[a],1,1,(()=>{l[a]=null})),me(),n=l[t],n?n.p(e,o):(n=l[t]=r[t](e),n.c()),fe(n,1),n.m(i.parentNode,i))},i(e){o||(fe(n),o=!0)},o(e){pe(n),o=!1},d(e){l[t].d(e),e&&S(i)}}}function Ot(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Mt(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Ot,then:jt,catch:St,value:39,blocks:[,,,]};return $e(n=e[24](e[3]),o),{c(){t=F(),o.block.c()},m(e,n){C(e,t,n),o.block.m(e,o.anchor=n),o.mount=()=>t.parentNode,o.anchor=t,i=!0},p(t,i){e=t,o.ctx=e,8&i[0]&&n!==(n=e[24](e[3]))&&$e(n,o)||he(o,e,i)},i(e){i||(fe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){e&&S(t),o.block.d(e),o.token=null,o=null}}}function Wt(e,n,i){let o;const{Dialog:r,Divider:l,Button:s}=c,a=Y(),{currentTasks:d}=u;k(e,d,(e=>i(35,o=e)));let{title:m}=n,{schema:f}=n,{recID:p}=n,{isOpening:$=!0}=n,{filterForReady:h=!1}=n,{refStatus:g}=n,{praefix:v=""}=n,{selectionFields:y=!1}=n,{showEdit:b=!0}=n,{deList:w}=n,{newAllowed:x=!0}=n,{prevEventId:I}=n,_=f.id;f.class;let C,S,j,q,N,E,L,F="",D=!1;m??=f.identity.designation;const z=!o?.length||o.find((e=>e===_));return e.$$set=e=>{"title"in e&&i(0,m=e.title),"schema"in e&&i(2,f=e.schema),"recID"in e&&i(1,p=e.recID),"isOpening"in e&&i(3,$=e.isOpening),"filterForReady"in e&&i(4,h=e.filterForReady),"refStatus"in e&&i(5,g=e.refStatus),"praefix"in e&&i(6,v=e.praefix),"selectionFields"in e&&i(7,y=e.selectionFields),"showEdit"in e&&i(8,b=e.showEdit),"deList"in e&&i(9,w=e.deList),"newAllowed"in e&&i(10,x=e.newAllowed),"prevEventId"in e&&i(11,I=e.prevEventId)},[m,p,f,$,h,g,v,y,b,w,x,I,F,D,C,j,N,E,L,r,l,s,d,z,async e=>{if(!e)return!1;const n=await Gs(f.class,f.id);if(S=y&&y?.find((e=>f.class===e.refClass.split(":")[0])),i(15,j=S?.value?.get&&S.value.get(v)),j){q=S.refClass;const[e,n]=q.split(":"),[o]=n.split(".");i(16,N=S.parentClass.find((t=>t.name===e)));const r=await t.getSchemaByClass(N.refClass);i(17,E=r.id),i(12,F=S.parentClass.find((e=>e.name===o)).designation)}return n},()=>{i(13,D=!1),p||a("back"),b||a("back")},()=>{i(13,D=!1),a("back")},()=>{i(1,p=!1),i(14,C=!1),i(13,D=!0)},e=>({detail:{row:e}})=>{let t=f.display;t&&t.length&&t.map((t=>{const[n,i]=t.split(".");let o=f.list?.find((e=>e.name===n))?.item.find((e=>e.name===i));if(o){e[`${n}_${i}`]=e[n][i]}})),a("choose",{row:e})},({detail:e})=>{i(14,C=!!e._task.visum||"Closed"===e._task.status),i(1,p=e._docId),i(13,D=!0)},({detail:e})=>{j&&i(18,L=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};a("choose",{row:t})},function(t){G(e,t)}]}class Rt extends ke{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=q("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}",_(document.head,t)),xe(this,e,Wt,Mt,x,{title:0,schema:2,recID:1,isOpening:3,filterForReady:4,refStatus:5,praefix:6,selectionFields:7,showEdit:8,deList:9,newAllowed:10,prevEventId:11},[-1,-1])}}const{document:Pt}=ge;function Ht(e){e[27]=e[29].list,e[28]=e[29].items}function Qt(e,t,n){const i=e.slice();return i[30]=t[n],i}function Yt(e,t,n){const i=e.slice();return i[33]=t[n],i}function Gt(e,t,n){const i=e.slice();return i[33]=t[n],i}function Ut(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Kt(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p,$,h,g,v;function y(t){e[24](t)}Ht(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Jt]},$$scope:{ctx:e}}}),n.$on("click",e[23]);let b={id:e[8]};void 0!==e[1]&&(b.value=e[1]),l=new e[6]({props:b}),K.push((()=>ve(l,"value",y))),l.$on("input",e[12]),d=new Be({props:{size:"18"}});let w=e[28]?.length&&function(e){let t,n,i,o,r=e[28],l=[];for(let t=0;t<r.length;t+=1)l[t]=Zt(Gt(e,r,t));return{c(){t=q("thead"),n=q("tr"),i=q("th"),o=L();for(let e=0;e<l.length;e+=1)l[e].c();A(i,"class","svelte-14hcfjl"),A(n,"class","svelte-14hcfjl"),A(t,"class","svelte-14hcfjl")},m(e,r){C(e,t,r),_(t,n),_(n,i),_(n,o);for(let e=0;e<l.length;e+=1)l[e].m(n,null)},p(e,t){if(2048&t[0]){let i;for(r=e[28],i=0;i<r.length;i+=1){const o=Gt(e,r,i);l[i]?l[i].p(o,t):(l[i]=Zt(o),l[i].c(),l[i].m(n,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=r.length}},d(e){e&&S(t),j(l,e)}}}(e),x=e[27]?.length&&function(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=tn(Qt(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(44547&n[0]){let l;for(i=e[27],l=0;l<i.length;l+=1){const r=Qt(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=tn(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),o=q("div"),r=E("Suchen: "),ye(l.$$.fragment),a=L(),c=q("span"),ye(d.$$.fragment),u=L(),m=q("div"),f=q("table"),w&&w.c(),p=L(),$=q("tbody"),x&&x.c(),A(t,"class","form--buttons svelte-14hcfjl"),A(c,"class","feather pointer svelte-14hcfjl"),O(o,"margin-bottom","1em"),O(o,"position","relative"),A(f,"striped",""),A(f,"class","svelte-14hcfjl"),A(m,"class","eList svelte-14hcfjl")},m(s,y){C(s,t,y),be(n,t,null),C(s,i,y),C(s,o,y),_(o,r),be(l,o,null),_(o,a),_(o,c),be(d,c,null),C(s,u,y),C(s,m,y),_(m,f),w&&w.m(f,null),_(f,p),_(f,$),x&&x.m($,null),h=!0,g||(v=D(c,"click",e[14]),g=!0)},p(e,t){Ht(e);const i={};128&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!s&&2&t[0]&&(s=!0,o.value=e[1],oe((()=>s=!1))),l.$set(o),e[28]?.length&&w.p(e,t),e[27]?.length&&x.p(e,t)},i(e){h||(fe(n.$$.fragment,e),fe(l.$$.fragment,e),fe(d.$$.fragment,e),fe(x),h=!0)},o(e){pe(n.$$.fragment,e),pe(l.$$.fragment,e),pe(d.$$.fragment,e),pe(x),h=!1},d(e){e&&S(t),we(n),e&&S(i),e&&S(o),we(l),we(d),e&&S(u),e&&S(m),w&&w.d(),x&&x.d(),g=!1,v()}}}function Jt(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Zt(e){let t,n,i=e[33]?.designation+"";return{c(){t=q("th"),n=E(i),A(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),_(t,n)},p:g,d(e){e&&S(t)}}}function Xt(e){let t,n,i,o,r,l,s,a;i=new Me({props:{size:"18"}});let c=e[28],d=[];for(let t=0;t<c.length;t+=1)d[t]=en(Yt(e,c,t));return{c(){t=q("tr"),n=q("td"),ye(i.$$.fragment),o=L();for(let e=0;e<d.length;e+=1)d[e].c();r=L(),A(n,"class","editRow svelte-14hcfjl"),A(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[30]._id===e[0])},m(c,u){C(c,t,u),_(t,n),be(i,n,null),_(t,o);for(let e=0;e<d.length;e+=1)d[e].m(t,null);_(t,r),l=!0,s||(a=D(n,"click",e[15](e[30])),s=!0)},p(n,i){if(e=n,3584&i[0]){let n;for(c=e[28],n=0;n<c.length;n+=1){const o=Yt(e,c,n);d[n]?d[n].p(o,i):(d[n]=en(o),d[n].c(),d[n].m(t,r))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}2049&i[0]&&M(t,"active",e[30]._id===e[0])},i(e){l||(fe(i.$$.fragment,e),l=!0)},o(e){pe(i.$$.fragment,e),l=!1},d(e){e&&S(t),we(i),j(d,e),s=!1,a()}}}function en(e){let t,n,i,o,r=e[9](e[30],e[33])+"";return{c(){t=q("td"),n=E(r),A(t,"class","svelte-14hcfjl")},m(r,l){C(r,t,l),_(t,n),i||(o=D(t,"click",T(e[10](e[30]))),i=!0)},p(t,n){e=t},d(e){e&&S(t),i=!1,o()}}}function tn(e){let t,n,i=e[13](e[30],e[28],e[1]),o=i&&Xt(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){2&n[0]&&(i=e[13](e[30],e[28],e[1])),i?o?(o.p(e,n),2&n[0]&&fe(o,1)):(o=Xt(e),o.c(),fe(o,1),o.m(t.parentNode,t)):o&&(ue(),pe(o,1,1,(()=>{o=null})),me())},i(e){n||(fe(o),n=!0)},o(e){pe(o),n=!1},d(e){o&&o.d(e),e&&S(t)}}}function nn(e){let t,n;return t=new e[5]({}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p:g,i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function on(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:nn,then:Kt,catch:Ut,value:29,blocks:[,,,]};return $e(e[11](),r),{c(){ye(t.$$.fragment),n=L(),i=F(),r.block.c()},m(e,l){be(t,e,l),C(e,n,l),C(e,i,l),r.block.m(e,r.anchor=l),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){he(r,e=t,n)},i(e){o||(fe(t.$$.fragment,e),fe(r.block),o=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(r.blocks[e])}o=!1},d(e){we(t,e),e&&S(n),e&&S(i),r.block.d(e),r.token=null,r=null}}}function rn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[on]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};3&n[0]|128&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function ln(e,i,o){const r=Y(),{Dialog:l,Divider:s,Loading:a,TextField:d,Button:u}=c;let{item:m}=i,{classId:p}=i,{className:h}=i,{rowId:g}=i,{viewName:v}=i,{viewValue:y}=i,{recordId:b}=i,{filter:w}=i,x="",k=p+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?$(n):f(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass(h);H((()=>{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&&Xs(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&o(16,m=e.item),"classId"in e&&o(17,p=e.classId),"className"in e&&o(18,h=e.className),"rowId"in e&&o(0,g=e.rowId),"viewName"in e&&o(19,v=e.viewName),"viewValue"in e&&o(20,y=e.viewValue),"recordId"in e&&o(21,b=e.recordId),"filter"in e&&o(22,w=e.filter)},[g,x,r,l,s,a,d,u,k,I,e=>()=>r("choose",{row:e}),async()=>{const e=await _;let n=[];if(m.lookup){const e="."+p+"#"+m.lookup,i=document.querySelector(e),o=i?.value||b;if(o){const e=await Zs(m.lookup,o);if(e){const i=e[m.name]?.map((e=>e[m.name]));i&&(n=await t.getSectionView(m.name,{_id:{$in:i}},!0))}}}else{const i="."+p+"#"+v.split(":")[0],o=document.querySelector(i);let r={[v]:o?.value||b};if(m.refItem){const e="."+p+"#"+m.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[m.refItem]:t.value},{[m.refItem]:{$exists:!0,$eq:""}}]};r={...r,...e}}}catch{}}r[v]&&(n=await t.getSectionView(e.class,r,!0)),w&&(n=n.filter((e=>e._id!=w)))}let i=[],o=e.display;return o&&o.length?o.map((t=>{const[o,r]=t.split(".");let l=e.list?.find((e=>e.name===o))?.item.find((e=>e.name===r));l&&(l={...l},l.name=`${o}_${r}`,n=n.map((e=>(e[o]&&(e[l.name]=e["_"+o]?e["_"+o][r]:e[o][r]),e)))),l||(l=e.items.find((e=>e.name===o))),i.find((e=>e?.name===o))||i.push(l)})):i=e.items,{list:n,items:i}},({detail:{value:e}})=>{o(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(I(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{o(1,x="")},e=>async()=>{const n=await t.getTaskByDocId(e._id),i=`/task/${n.event}/${n._id}/task?view=standalone`;window.open(i)},m,p,h,v,y,b,w,()=>r("back"),function(e){x=e,o(1,x)}]}class sn extends ke{constructor(e){var t;super(),Pt.getElementById("svelte-14hcfjl-style")||((t=q("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 .editRow.svelte-14hcfjl{width:1em}.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}",_(Pt.head,t)),xe(this,e,ln,rn,x,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22},[-1,-1])}}const{document:an}=ge;function cn(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function dn(e){let t,n,i=e[50]&&function(e){let t,n,i,r,l,s,a,c,d,u,m,f,p,$,h;n=new o({props:{class:"full-width",id:e[24],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[28]()),n.$on("onFocus",e[28](e[24]));const g=[mn,un],v=[];function y(e,t){return!e[3]||e[14]?0:e[19]&&e[0]?1:-1}~(r=y(e))&&(l=v[r]=g[r](e));let b=(!e[3]||e[14])&&fn(e);function w(t){e[39](t)}let x={class:"tModal",noClickaway:!0,$$slots:{default:[gn]},$$scope:{ctx:e}};void 0!==e[16]&&(x.open=e[16]);m=new e[23]({props:x}),K.push((()=>ve(m,"open",w)));let k=e[17]&&vn(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),l&&l.c(),s=L(),a=q("input"),d=L(),b&&b.c(),u=L(),ye(m.$$.fragment),p=L(),k&&k.c(),$=F(),A(a,"class",c=I(e[7]||e[8])+" svelte-jox15l"),A(a,"id",e[5]),A(a,"name",e[5]),a.value=e[0],a.hidden=!0,O(t,"position","relative")},m(e,o){C(e,t,o),be(n,t,null),_(t,i),~r&&v[r].m(t,null),_(t,s),_(t,a),_(t,d),b&&b.m(t,null),C(e,u,o),be(m,e,o),C(e,p,o),k&&k.m(e,o),C(e,$,o),h=!0},p(e,i){const o={};4&i[0]&&(o.value=e[2]),2&i[0]&&(o.required=e[1]),8&i[0]&&(o.disabled=e[3]),n.$set(o);let d=r;r=y(e),r===d?~r&&v[r].p(e,i):(l&&(ue(),pe(v[d],1,1,(()=>{v[d]=null})),me()),~r?(l=v[r],l?l.p(e,i):(l=v[r]=g[r](e),l.c()),fe(l,1),l.m(t,s)):l=null),(!h||384&i[0]&&c!==(c=I(e[7]||e[8])+" svelte-jox15l"))&&A(a,"class",c),(!h||32&i[0])&&A(a,"id",e[5]),(!h||32&i[0])&&A(a,"name",e[5]),(!h||1&i[0]&&a.value!==e[0])&&(a.value=e[0]),!e[3]||e[14]?b?(b.p(e,i),16392&i[0]&&fe(b,1)):(b=fn(e),b.c(),fe(b,1),b.m(t,null)):b&&(ue(),pe(b,1,1,(()=>{b=null})),me());const u={};3260241&i[0]|1048576&i[1]&&(u.$$scope={dirty:i,ctx:e}),!f&&65536&i[0]&&(f=!0,u.open=e[16],oe((()=>f=!1))),m.$set(u),e[17]?k?(k.p(e,i),131072&i[0]&&fe(k,1)):(k=vn(e),k.c(),fe(k,1),k.m($.parentNode,$)):k&&(ue(),pe(k,1,1,(()=>{k=null})),me())},i(e){h||(fe(n.$$.fragment,e),fe(l),fe(b),fe(m.$$.fragment,e),fe(k),h=!0)},o(e){pe(n.$$.fragment,e),pe(l),pe(b),pe(m.$$.fragment,e),pe(k),h=!1},d(e){e&&S(t),we(n),~r&&v[r].d(),b&&b.d(),e&&S(u),we(m,e),e&&S(p),k&&k.d(e),e&&S($)}}}(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,t){e[50]&&i.p(e,t)},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function un(e){let t,n,i,o,r;return n=new Me({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-jox15l")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[32]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function mn(e){let t,n,i,o,r;return n=new rt({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-jox15l")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=[D(t,"click",e[28]()),D(t,"choose",e[29])],o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,b(r)}}}function fn(e){let t,n,i,o,r;return n=new Be({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather2 pointer svelte-jox15l")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[31]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function pn(e){let t,n,i,o;const r=[hn,$n],l=[];function s(e,t){return e[6].lookup||e[4]&&!e[6].constraint?0:1}return t=s(e),n=l[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){l[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=s(e),t===a?l[t].p(e,o):(ue(),pe(l[a],1,1,(()=>{l[a]=null})),me(),n=l[t],n?n.p(e,o):(n=l[t]=r[t](e),n.c()),fe(n,1),n.m(i.parentNode,i))},i(e){o||(fe(n),o=!0)},o(e){pe(n),o=!1},d(e){l[t].d(e),e&&S(i)}}}function $n(e){let t,n;return t=new Rt({props:{title:e[6].designation,newAllowed:e[20],prevEventId:e[9],schema:e[15],recID:e[0],isOpening:e[16],filterForReady:e[21],refStatus:e[6].refStatus,selectionFields:e[12],deList:e[13],praefix:e[11]}}),t.$on("choose",e[29]),t.$on("back",e[30]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.title=e[6].designation),1048576&n[0]&&(i.newAllowed=e[20]),512&n[0]&&(i.prevEventId=e[9]),32768&n[0]&&(i.schema=e[15]),1&n[0]&&(i.recID=e[0]),65536&n[0]&&(i.isOpening=e[16]),2097152&n[0]&&(i.filterForReady=e[21]),64&n[0]&&(i.refStatus=e[6].refStatus),4096&n[0]&&(i.selectionFields=e[12]),8192&n[0]&&(i.deList=e[13]),2048&n[0]&&(i.praefix=e[11]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function hn(e){let t,n;return t=new sn({props:{item:e[6],className:e[15].class,classId:e[8],rowId:e[0],recordId:e[10],viewName:e[4],viewValue:""}}),t.$on("choose",e[29]),t.$on("back",e[30]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.item=e[6]),32768&n[0]&&(i.className=e[15].class),256&n[0]&&(i.classId=e[8]),1&n[0]&&(i.rowId=e[0]),1024&n[0]&&(i.recordId=e[10]),16&n[0]&&(i.viewName=e[4]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function gn(e){let t,n,i=e[16]&&pn(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[16]?i?(i.p(e,n),65536&n[0]&&fe(i,1)):(i=pn(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function vn(e){let t,n,i;function o(t){e[40](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[bn]},$$scope:{ctx:e}};return void 0!==e[17]&&(r.open=e[17]),t=new e[23]({props:r}),K.push((()=>ve(t,"open",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};294913&i[0]|1048576&i[1]&&(o.$$scope={dirty:i,ctx:e}),!n&&131072&i[0]&&(n=!0,o.open=e[17],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function yn(e){let t,n;return t=new ta({props:{schema:e[15],recID:e[0],readonly:!0}}),t.$on("back",e[30]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};32768&n[0]&&(i.schema=e[15]),1&n[0]&&(i.recID=e[0]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function bn(e){let t,n;return t=new e[22]({props:{title:e[18],$$slots:{default:[yn]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};262144&n[0]&&(i.title=e[18]),32769&n[0]|1048576&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function wn(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function xn(e){let t,n,i={ctx:e,current:null,token:null,hasCatch:!1,pending:wn,then:dn,catch:cn,value:50,blocks:[,,,]};return $e(e[27](),i),{c(){t=F(),i.block.c()},m(e,o){C(e,t,o),i.block.m(e,i.anchor=o),i.mount=()=>t.parentNode,i.anchor=t,n=!0},p(t,n){he(i,e=t,n)},i(e){n||(fe(i.block),n=!0)},o(e){for(let e=0;e<3;e+=1){pe(i.blocks[e])}n=!1},d(e){e&&S(t),i.block.d(e),i.token=null,i=null}}}function kn(e,n,o){let r,l,s;k(e,i,(e=>o(38,r=e)));const a=Y(),{Dialog:d,Modal:m}=c;let{id:f}=n,{item:p}=n,{value:$=""}=n,{desc:g=""}=n,{noForm:v=!1}=n,{classId:y}=n,{eventId:b}=n,{recordId:w}=n,{withRefValue:x=!1}=n,{refValue:I=""}=n,{required:_}=n,{disabled:C}=n,{readonly:S}=n,{praefix:j}=n,{selectionFields:q}=n,{formnovalidate:N}=n,{selection:E}=n,{deList:L}=n,{isTemplate:F}=n;const D="comment_"+f;let z,T,A,B,V,O,M=!1,W=!0,R=!0;S||=w&&p.asInput,C||=S,!E&&p.selection&&1===p.selection.split(":").length&&(E=p.selection);const{currentTasks:P,loggedIn:H}=u;k(e,P,(e=>o(42,l=e))),k(e,H,(e=>o(43,s=e)));const Q=async e=>{e.items.filter((e=>e.properties?.default)).forEach((t=>{a("defPrep",{className:e.class,itemName:t.name,value:t.properties.default})}))},G=e=>{e&&(o(2,g=h(A,e)),a("setRefDesc",g.split(" •")[0]),a("change",{value:$,description:g}),a("task",{row:e,eventId:A.id}))},U=()=>{o(16,M=!1),o(17,z=!1)};return e.$$set=e=>{"id"in e&&o(5,f=e.id),"item"in e&&o(6,p=e.item),"value"in e&&o(0,$=e.value),"desc"in e&&o(2,g=e.desc),"noForm"in e&&o(7,v=e.noForm),"classId"in e&&o(8,y=e.classId),"eventId"in e&&o(9,b=e.eventId),"recordId"in e&&o(10,w=e.recordId),"withRefValue"in e&&o(33,x=e.withRefValue),"refValue"in e&&o(34,I=e.refValue),"required"in e&&o(1,_=e.required),"disabled"in e&&o(3,C=e.disabled),"readonly"in e&&o(35,S=e.readonly),"praefix"in e&&o(11,j=e.praefix),"selectionFields"in e&&o(12,q=e.selectionFields),"formnovalidate"in e&&o(36,N=e.formnovalidate),"selection"in e&&o(4,E=e.selection),"deList"in e&&o(13,L=e.deList),"isTemplate"in e&&o(14,F=e.isTemplate)},e.$$.update=()=>{if(2&e.$$.dirty[0]|32&e.$$.dirty[1]&&o(1,_=_&&!N),12&e.$$.dirty[1]&&x&&o(0,$=I),32833&e.$$.dirty[0]&&$&&A&&Promise.resolve(Us(p.refClass,A.id,$,!!p.lookup)).then(G),65&e.$$.dirty[0]|192&e.$$.dirty[1]&&$&&B&&p.name===B.input?.at(0)&&B.inputLookup?.length){const{domain:e}=B.inputLookup[0]||{};"user"===e&&(r.some((e=>B.authorization?.find((t=>t.role===e&&!t.constraint))))||o(3,C=!0))}32769&e.$$.dirty[0]&&!$&&A&&G({})},[$,_,g,C,E,f,p,v,y,b,w,j,q,L,F,A,M,z,T,V,W,R,d,m,D,P,H,async()=>{try{const e=await t.getEvent(b);if(O="report"===e.output.type,o(21,R=!p.asInput),o(20,W=e.output?.class[0].name!==p.refClass),o(15,A=await t.getSchemaByClass(p.refClass)),Q(A),o(19,V=(e=>!l?.length||!!l.find((t=>t===e)))(A.id)),o(37,B=await t.getSchema(b)),b&&w&&$&&!C&&B.input?.find((e=>e===p.refClass))&&o(3,C=!0),p.properties?.query?.lookup){const{domain:e,value:n}=p.properties.query.lookup;if("user"===e){const e=s.user,i={[n]:e},l=await t.getSectionView(p.refClass,i);if(l?.length){const[{_id:e}]=l;e&&(o(34,I=e),o(33,x=!0))}r.some((e=>A.authorization?.find((t=>t.role===e&&!t.constraint))))||o(3,C=!0)}}return o(18,T=A.identity.designation),!0}catch{return a("initFail",!0),!1}},e=>t=>{if("BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}o(16,M=!0)},({detail:e})=>{o(0,$=e.row._id),U()},U,()=>{(O||V)&&(o(0,$=o(2,g="")),a("change",{value:$,description:g}),a("task",{row:{_task:{event:A.id,_id:!1}}}))},async()=>{if(!$)return;const e=await Us(p.refClass,A.id,$);if(!e._task)return;const t=e._task._id,n=`/task/${e._task.event}/${t}/task?view=standalone`;window.open(n)},x,I,S,N,B,r,function(e){M=e,o(16,M)},function(e){z=e,o(17,z)}]}class In extends ke{constructor(e){var t;super(),an.getElementById("svelte-jox15l-style")||((t=q("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}",_(an.head,t)),xe(this,e,kn,xn,x,{id:5,item:6,value:0,desc:2,noForm:7,classId:8,eventId:9,recordId:10,withRefValue:33,refValue:34,required:1,disabled:3,readonly:35,praefix:11,selectionFields:12,formnovalidate:36,selection:4,deList:13,isTemplate:14},[-1,-1])}}const _n=/\d+/g,Cn=/%[HMSpPdmyY%]/g;function Sn(e,t,n){const i=Math.floor((new Date).getFullYear()/100);let o=!1;if(""===e)return null;const r=t.split(Cn);let l=0,s=0;const a=new Date(0);for(const c of r){if(!e.startsWith(c,l))return n;if(l+=c.length,l===e.length){if(s!==t.length)return n;break}if("%"!==t[s+c.length])break;if(s+=c.length+1,"%"===t[s]){if("%"!==e[l])return n;l++}else if("p"===t[s].toLowerCase()){const t=e.substr(l,2).toUpperCase();if("AM"===t)o=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;o=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{_n.lastIndex=l;const r=_n.exec(e);if(null==r)return n;switch(t[s]){case"H":a.setHours(parseInt(r[0])+12*o);break;case"M":a.setMinutes(r[0]);break;case"S":a.setSeconds(r[0]);break;case"d":a.setDate(r[0]);break;case"m":a.setMonth(r[0]-1);break;case"y":a.setFullYear(100*i+parseInt(r[0]));break;case"Y":a.setFullYear(r[0])}l+=r[0].length}s++}return isNaN(a.valueOf())?n:a}function jn(e,t){return null==e||null==t?e:(t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t)}const{document:qn}=ge;function Nn(e,t,n){const i=e.slice();return i[17]=t[n],i}function En(e,t,n){const i=e.slice();return i[20]=t[n],i}function Ln(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Fn(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p=e[0].items,$=[];for(let t=0;t<p.length;t+=1)$[t]=zn(En(e,p,t));const h=e=>pe($[e],1,1,(()=>{$[e]=null}));let g=e[0].list&&Tn(e);return a=new e[5]({props:{outline:!0,$$slots:{default:[Bn]},$$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:[Vn]},$$scope:{ctx:e}}}),{c(){t=q("form"),n=q("input"),o=L();for(let e=0;e<$.length;e+=1)$[e].c();r=L(),g&&g.c(),l=L(),s=q("div"),ye(a.$$.fragment),c=L(),ye(d.$$.fragment),A(n,"class",I(e[6])+" svelte-1phofh5"),A(n,"name","_id"),A(n,"type","hidden"),n.value=i=e[1]._id||"",A(t,"class","fTask svelte-1phofh5"),A(t,"id",e[6]),A(s,"class","form--buttons svelte-1phofh5")},m(i,p){C(i,t,p),_(t,n),_(t,o);for(let e=0;e<$.length;e+=1)$[e].m(t,null);_(t,r),g&&g.m(t,null),C(i,l,p),C(i,s,p),be(a,s,null),_(s,c),be(d,s,null),u=!0,m||(f=[D(t,"keydown",e[8]),D(t,"submit",z(e[10]))],m=!0)},p(e,o){if((!u||2&o&&i!==(i=e[1]._id||""))&&(n.value=i),75&o){let n;for(p=e[0].items,n=0;n<p.length;n+=1){const i=En(e,p,n);$[n]?($[n].p(i,o),fe($[n],1)):($[n]=zn(i),$[n].c(),fe($[n],1),$[n].m(t,r))}for(ue(),n=p.length;n<$.length;n+=1)h(n);me()}e[0].list?g?(g.p(e,o),1&o&&fe(g,1)):(g=Tn(e),g.c(),fe(g,1),g.m(t,null)):g&&(ue(),pe(g,1,1,(()=>{g=null})),me());const l={};8388608&o&&(l.$$scope={dirty:o,ctx:e}),a.$set(l);const s={};4&o&&(s.disabled=e[2]),8388608&o&&(s.$$scope={dirty:o,ctx:e}),d.$set(s)},i(e){if(!u){for(let e=0;e<p.length;e+=1)fe($[e]);fe(g),fe(a.$$.fragment,e),fe(d.$$.fragment,e),u=!0}},o(e){$=$.filter(Boolean);for(let e=0;e<$.length;e+=1)pe($[e]);pe(g),pe(a.$$.fragment,e),pe(d.$$.fragment,e),u=!1},d(e){e&&S(t),j($,e),g&&g.d(),e&&S(l),e&&S(s),we(a),we(d),m=!1,b(f)}}}function Dn(e){let t,n;return t=new Ll({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(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};1&n&&(i.item=e[20]),1&n&&(i.selection=e[20].selection),2&n&&(i.record=e[1]),8&n&&(i.disabled=e[3]),1&n&&(i.eventId=e[0].id),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function zn(e){let t,n,i=Wn(!0,e[20]),o=i&&Dn(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){1&n&&(i=Wn(!0,e[20])),i?o?(o.p(e,n),1&n&&fe(o,1)):(o=Dn(e),o.c(),fe(o,1),o.m(t.parentNode,t)):o&&(ue(),pe(o,1,1,(()=>{o=null})),me())},i(e){n||(fe(o),n=!0)},o(e){pe(o),n=!1},d(e){o&&o.d(e),e&&S(t)}}}function Tn(e){let t,n,i=e[0].list,o=[];for(let t=0;t<i.length;t+=1)o[t]=An(Nn(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(75&n){let l;for(i=e[0].list,l=0;l<i.length;l+=1){const r=Nn(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=An(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}function An(e){let t,n,i,o;return t=new e[4]({props:{text:e[17].designation}}),i=new ei({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(){ye(t.$$.fragment),n=L(),ye(i.$$.fragment)},m(e,r){be(t,e,r),C(e,n,r),be(i,e,r),o=!0},p(e,n){const o={};1&n&&(o.text=e[17].designation),t.$set(o);const r={};1&n&&(r.list=e[17]),1&n&&(r.eventId=e[0].id),1&n&&(r.schema=e[17].item),2&n&&(r.record=e[1]),8&n&&(r.disabled=e[3]),i.$set(r)},i(e){o||(fe(t.$$.fragment,e),fe(i.$$.fragment,e),o=!0)},o(e){pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!1},d(e){we(t,e),e&&S(n),we(i,e)}}}function Bn(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Vn(e){let t;return{c(){t=E("Speichern")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function On(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Mn(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:On,then:Fn,catch:Ln,value:16,blocks:[,,,]};return $e(e[7](),o),{c(){t=L(),n=q("section"),o.block.c(),qn.title="Vorgaben",A(n,"class","sTask svelte-1phofh5")},m(e,r){C(e,t,r),C(e,n,r),o.block.m(n,o.anchor=null),o.mount=()=>n,o.anchor=null,i=!0},p(t,[n]){he(o,e=t,n)},i(e){i||(fe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){e&&S(t),e&&S(n),o.block.d(),o.token=null,o=null}}}const Wn=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function Rn(e,n,o){let a,d,u;k(e,s,(e=>o(11,d=e))),k(e,i,(e=>o(12,u=e)));const{Divider:m,Button:f,FormField:p}=c,$=JSON.parse(r.getItem("Locale"));let{schema:h}=n,{record:g}=n,v="template-"+h.class+Math.floor(9e3*Math.random()+1e3).toString(),y=!1;const b=()=>window.history.back(),w=(e,t,n=!1)=>{const i=t.id,o=e.find((e=>e.name===i));let r=t.value;if(!n&&o&&o.properties?.multi&&(r=g[i]),r&&o&&o.type.startsWith("date"))try{return Sn(r,"%d.%m.%Y").toISOString()}catch{return new Date(r).toISOString()}if(o&&"boolean"===o.type&&(r=!!t.checked),o&&"number"===o.type){const e=Number("1.1").toLocaleString($.id).substring(1,2);try{r=Number(r.replace(e,".")).toString()}catch{}}return r};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=y)},[h,g,y,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,y=!0),d.role?.length&&h.authorization?.length){const e=h.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));o(2,y||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},b,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[i,o]=t.split("."),r=h.list.find((e=>e.name===i));n[t]=w(r.item,e)}else n[t]=w(h.items,e)})),await t.saveTemplate(h.class,n),l.success("Die Vorgaben wurden gespeichert.",2e3),b()}]}const{document:Pn}=ge;function Hn(e,t,n){const i=e.slice();return i[28]=t[n],i}function Qn(e){let t,n;return t=new Ll({props:{classId:e[2],item:e[28],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4],required:e[5],currency:e[8]}}),t.$on("notify",e[14]),t.$on("defPrep",e[16]),t.$on("task",e[21]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};4&n[0]&&(i.classId=e[2]),2&n[0]&&(i.item=e[28]),2&n[0]&&(i.listName=e[1].name),8&n[0]&&(i.eventId=e[3]),1&n[0]&&(i.record=e[0]),16&n[0]&&(i.disabled=e[4]),32&n[0]&&(i.required=e[5]),256&n[0]&&(i.currency=e[8]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Yn(e){let t,n,i=Wn(e[7],e[28]),o=i&&Qn(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){130&n[0]&&(i=Wn(e[7],e[28])),i?o?(o.p(e,n),130&n[0]&&fe(o,1)):(o=Qn(e),o.c(),fe(o,1),o.m(t.parentNode,t)):o&&(ue(),pe(o,1,1,(()=>{o=null})),me())},i(e){n||(fe(o),n=!0)},o(e){pe(o),n=!1},d(e){o&&o.d(e),e&&S(t)}}}function Gn(e){let t,n,i,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=Yn(Hn(e,o,t));const l=e=>pe(r[e],1,1,(()=>{r[e]=null}));return{c(){t=q("div");for(let e=0;e<r.length;e+=1)r[e].c();A(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){C(e,t,n);for(let e=0;e<r.length;e+=1)r[e].m(t,null);i=!0},p(e,s){if(82367&s[0]){let n;for(o=e[1].item,n=0;n<o.length;n+=1){const i=Hn(e,o,n);r[n]?(r[n].p(i,s),fe(r[n],1)):(r[n]=Yn(i),r[n].c(),fe(r[n],1),r[n].m(t,null))}for(ue(),n=o.length;n<r.length;n+=1)l(n);me()}(!i||6&s[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&A(t,"id",n)},i(e){if(!i){for(let e=0;e<o.length;e+=1)fe(r[e]);i=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)pe(r[e]);i=!1},d(e){e&&S(t),j(r,e)}}}function Un(e){let t,n,i=e[13](e[9])+"";return{c(){t=q("span"),n=E(i)},m(e,i){C(e,t,i),_(t,n)},p(e,t){512&t[0]&&i!==(i=e[13](e[9])+"")&&B(n,i)},d(e){e&&S(t)}}}function Kn(e){let t,n,i;return n=new e[10]({props:{$$slots:{default:[Un]},$$scope:{ctx:e}}}),n.$on("click",(function(){w(e[15](e[27]))&&e[15](e[27]).apply(this,arguments)})),{c(){t=q("div"),ye(n.$$.fragment),A(t,"class","accordion svelte-148ktt9"),A(t,"slot","handle")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p(t,i){e=t;const o={};512&i[0]|1&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o)},i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Jn(e){let t,n;return t=new e[12]({props:{open:e[6],$$slots:{handle:[Kn,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]],default:[Gn,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",e[17]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.open=e[6]),134218687&n[0]|1&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Zn(e){let t,n,i;return n=new e[11]({props:{$$slots:{default:[Jn]},$$scope:{ctx:e}}}),{c(){t=q("div"),ye(n.$$.fragment),A(t,"class","formList")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p(e,t){const i={};1023&t[0]|1&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i)},i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Xn(e,n,i){const{Button:o,Accordion:r,AccordionSection:l}=c;let{list:s}=n,{schema:a}=n,{record:d}=n,{classId:u}=n,{eventId:m}=n,{disabled:h}=n,{required:g}=n,{open:v=!1}=n,{template:y={}}=n,{isTemplate:b=!1}=n,{currency:w}=n,{update:x=!1}=n,k=new Map;const I={};let _=d[s.name]||{};d[s.name]=_;const C=e=>I[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "),S=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};return e.$$set=e=>{"list"in e&&i(1,s=e.list),"schema"in e&&i(18,a=e.schema),"record"in e&&i(0,d=e.record),"classId"in e&&i(2,u=e.classId),"eventId"in e&&i(3,m=e.eventId),"disabled"in e&&i(4,h=e.disabled),"required"in e&&i(5,g=e.required),"open"in e&&i(6,v=e.open),"template"in e&&i(19,y=e.template),"isTemplate"in e&&i(7,b=e.isTemplate),"currency"in e&&i(8,w=e.currency),"update"in e&&i(20,x=e.update)},e.$$.update=()=>{1048579&e.$$.dirty[0]&&x&&d&&i(9,_=d[s.name]||{})},[d,s,u,m,h,g,v,b,w,_,o,r,l,e=>a.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?C(t.name):"boolean"===t.type?$(e[t.name]):"date"===t.type?f(e[t.name]):"datetime"===t.type?p(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,n]=e.itemName.split(".");if(!n)return;e.desc&&(I[n]=e.desc);const o=d[t];i(0,d[t]={...o,[n]:e.value},d),i(9,_=d[t])},e=>t=>{(()=>{const e=y[s.name]||{};for(const t in e)y[s.name][t]&&!d[s.name][t]&&i(0,d[s.name][t]=y[s.name][t],d)})(),e(t);const n=`#accordion-content-${u}-${s.name} > div.form-field:last-child`,o=document.querySelector(n);ne().then((()=>{const e=`#accordion-content-${u}-${s.name} textarea`;Array.from(document.querySelectorAll(e)).forEach(S)})).then((()=>o.scrollIntoView({behavior:"smooth",block:"end"})))},async({detail:{className:e,itemName:n,value:i}})=>{if(k.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===className+"."+s.name))),!i)return;const o={[n]:!0},r=await t.getSectionView(e,o);r?.length&&k.set(e,r[0])},()=>{setTimeout((()=>{Array.from(k).forEach((([e,t])=>{d[s.name][e]||i(0,d[s.name][e]=t._id,d)}))}),500)},a,y,x,function(t){G(e,t)}]}class ei extends ke{constructor(e){var t;super(),Pn.getElementById("svelte-148ktt9-style")||((t=q("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}}",_(Pn.head,t)),xe(this,e,Xn,Zn,x,{list:1,schema:18,record:0,classId:2,eventId:3,disabled:4,required:5,open:6,template:19,isTemplate:7,currency:8,update:20},[-1,-1])}}const{document:ti}=ge;function ni(e){e[0]=e[23].list,e[22]=e[23].items}function ii(e,t,n){const i=e.slice();return i[24]=t[n],i}function oi(e,t,n){const i=e.slice();return i[27]=t[n],i}function ri(e,t,n){const i=e.slice();return i[27]=t[n],i}function li(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function si(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p,$,h,g,v;function y(t){e[19](t)}ni(e),n=new e[7]({props:{outline:!0,$$slots:{default:[ai]},$$scope:{ctx:e}}}),n.$on("click",e[18]);let b={id:e[8]};void 0!==e[1]&&(b.value=e[1]),l=new e[6]({props:b}),K.push((()=>ve(l,"value",y))),l.$on("input",e[12]),d=new Be({props:{size:"18"}});let w=e[22]?.length&&function(e){let t,n,i=e[22],o=[];for(let t=0;t<i.length;t+=1)o[t]=ci(ri(e,i,t));return{c(){t=q("thead"),n=q("tr");for(let e=0;e<o.length;e+=1)o[e].c();A(n,"class","svelte-14hcfjl"),A(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),_(t,n);for(let e=0;e<o.length;e+=1)o[e].m(n,null)},p(e,t){if(2048&t[0]){let r;for(i=e[22],r=0;r<i.length;r+=1){const l=ri(e,i,r);o[r]?o[r].p(l,t):(o[r]=ci(l),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(e){e&&S(t),j(o,e)}}}(e),x=e[0]?.length&&function(e){let t,n=e[0],i=[];for(let t=0;t<n.length;t+=1)i[t]=mi(ii(e,n,t));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=F()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);C(e,t,n)},p(e,o){if(11778&o[0]){let r;for(n=e[0],r=0;r<n.length;r+=1){const l=ii(e,n,r);i[r]?i[r].p(l,o):(i[r]=mi(l),i[r].c(),i[r].m(t.parentNode,t))}for(;r<i.length;r+=1)i[r].d(1);i.length=n.length}},d(e){j(i,e),e&&S(t)}}}(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),o=q("div"),r=E("Suchen: "),ye(l.$$.fragment),a=L(),c=q("span"),ye(d.$$.fragment),u=L(),m=q("div"),f=q("table"),w&&w.c(),p=L(),$=q("tbody"),x&&x.c(),A(t,"class","form--buttons svelte-14hcfjl"),A(c,"class","feather pointer svelte-14hcfjl"),O(o,"margin-bottom","1em"),O(o,"position","relative"),A(f,"striped",""),A(f,"class","svelte-14hcfjl"),A(m,"class","eList svelte-14hcfjl")},m(s,y){C(s,t,y),be(n,t,null),C(s,i,y),C(s,o,y),_(o,r),be(l,o,null),_(o,a),_(o,c),be(d,c,null),C(s,u,y),C(s,m,y),_(m,f),w&&w.m(f,null),_(f,p),_(f,$),x&&x.m($,null),h=!0,g||(v=D(c,"click",e[14]),g=!0)},p(e,t){ni(e);const i={};2&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!s&&2&t[0]&&(s=!0,o.value=e[1],oe((()=>s=!1))),l.$set(o),e[22]?.length&&w.p(e,t),e[0]?.length&&x.p(e,t)},i(e){h||(fe(n.$$.fragment,e),fe(l.$$.fragment,e),fe(d.$$.fragment,e),h=!0)},o(e){pe(n.$$.fragment,e),pe(l.$$.fragment,e),pe(d.$$.fragment,e),h=!1},d(e){e&&S(t),we(n),e&&S(i),e&&S(o),we(l),we(d),e&&S(u),e&&S(m),w&&w.d(),x&&x.d(),g=!1,v()}}}function ai(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function ci(e){let t,n,i=e[27]?.designation+"";return{c(){t=q("th"),n=E(i),A(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),_(t,n)},p:g,d(e){e&&S(t)}}}function di(e){let t,n,i=e[22],o=[];for(let t=0;t<i.length;t+=1)o[t]=ui(oi(e,i,t));return{c(){t=q("tr");for(let e=0;e<o.length;e+=1)o[e].c();n=L(),A(t,"class","pointer svelte-14hcfjl")},m(e,i){C(e,t,i);for(let e=0;e<o.length;e+=1)o[e].m(t,null);_(t,n)},p(e,r){if(3584&r[0]){let l;for(i=e[22],l=0;l<i.length;l+=1){const s=oi(e,i,l);o[l]?o[l].p(s,r):(o[l]=ui(s),o[l].c(),o[l].m(t,n))}for(;l<o.length;l+=1)o[l].d(1);o.length=i.length}},d(e){e&&S(t),j(o,e)}}}function ui(e){let t,n,i,o,r=e[9](e[24],e[27])+"";return{c(){t=q("td"),n=E(r),A(t,"class","svelte-14hcfjl")},m(r,l){C(r,t,l),_(t,n),i||(o=D(t,"click",T(e[10](e[24]))),i=!0)},p(t,n){e=t},d(e){e&&S(t),i=!1,o()}}}function mi(e){let t,n=e[13](e[24],e[22],e[1]),i=n&&di(e);return{c(){i&&i.c(),t=F()},m(e,n){i&&i.m(e,n),C(e,t,n)},p(e,o){2&o[0]&&(n=e[13](e[24],e[22],e[1])),n?i?i.p(e,o):(i=di(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&S(t)}}}function fi(e){let t,n;return t=new e[5]({}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p:g,i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function pi(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:fi,then:si,catch:li,value:23,blocks:[,,,]};return $e(e[11](),r),{c(){ye(t.$$.fragment),n=L(),i=F(),r.block.c()},m(e,l){be(t,e,l),C(e,n,l),C(e,i,l),r.block.m(e,r.anchor=l),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){he(r,e=t,n)},i(e){o||(fe(t.$$.fragment,e),fe(r.block),o=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(r.blocks[e])}o=!1},d(e){we(t,e),e&&S(n),e&&S(i),r.block.d(e),r.token=null,r=null}}}function $i(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[pi]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};2&n[0]|2&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function hi(e,n,i){const o=Y(),{Dialog:r,Divider:l,Loading:s,TextField:a,Button:d}=c;let{item:u}=n,{className:m}=n,{classId:p}=n,{list:h}=n,g="",v=p+Math.floor(9e3*Math.random()+1e3).toString()+"search";const y=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?$(n):f(e[`_${t.name}`]||e[t.name]||"")},b=t.getSchemaByClass(m);H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(v)?.focus()}),200)}));return e.$$set=e=>{"item"in e&&i(15,u=e.item),"className"in e&&i(16,m=e.className),"classId"in e&&i(17,p=e.classId),"list"in e&&i(0,h=e.list)},[h,g,o,r,l,s,a,d,v,y,e=>()=>o("choose",{row:e}),async()=>{const e=await b;let t=[],n=e.display;return n&&n.length?n.map((n=>{const[o,r]=n.split(".");let l=e.list?.find((e=>e.name===o))?.item.find((e=>e.name===r));l&&(l={...l},l.name=`${o}_${r}`,i(0,h=h.map((e=>(e[o]&&(e[l.name]=e["_"+o]?e["_"+o][r]:e[o][r]),e))))),l||(l=e.items.find((e=>e.name===o))),t.find((e=>e?.name===o))||t.push(l)})):t=e.items,{list:h,items:t}},({detail:{value:e}})=>{i(1,g=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(y(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,g="")},u,m,p,()=>o("back"),function(e){g=e,i(1,g)}]}class gi extends ke{constructor(e){var t;super(),ti.getElementById("svelte-14hcfjl-style")||((t=q("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}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",_(ti.head,t)),xe(this,e,hi,$i,x,{item:15,className:16,classId:17,list:0},[-1,-1])}}const{document:vi}=ge;function yi(e,t,n){const i=e.slice();return i[11]=t[n],i}function bi(e,t,n){const i=e.slice();return i[2]=t[n],i}function wi(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function xi(e){let t,n,i,o=e[6].items,r=[];for(let t=0;t<o.length;t+=1)r[t]=Si(bi(e,o,t));const l=e=>pe(r[e],1,1,(()=>{r[e]=null}));let s=e[6].list&&ji(e);return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=L(),s&&s.c(),n=F()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);C(e,t,o),s&&s.m(e,o),C(e,n,o),i=!0},p(e,i){if(5161971&i[0]){let n;for(o=e[6].items,n=0;n<o.length;n+=1){const l=bi(e,o,n);r[n]?(r[n].p(l,i),fe(r[n],1)):(r[n]=Si(l),r[n].c(),fe(r[n],1),r[n].m(t.parentNode,t))}for(ue(),n=o.length;n<r.length;n+=1)l(n);me()}e[6].list?s?(s.p(e,i),64&i[0]&&fe(s,1)):(s=ji(e),s.c(),fe(s,1),s.m(n.parentNode,n)):s&&(ue(),pe(s,1,1,(()=>{s=null})),me())},i(e){if(!i){for(let e=0;e<o.length;e+=1)fe(r[e]);fe(s),i=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)pe(r[e]);pe(s),i=!1},d(e){j(r,e),e&&S(t),s&&s.d(e),e&&S(n)}}}function ki(e){let t,n,i,o;const r=[_i,Ii],l=[];function s(e,t){return e[2].name!==e[14]||e[15]?"lookup"!==e[2].properties?.format?1:-1:0}return~(t=s(e))&&(n=l[t]=r[t](e)),{c(){n&&n.c(),i=F()},m(e,n){~t&&l[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=s(e),t===a?~t&&l[t].p(e,o):(n&&(ue(),pe(l[a],1,1,(()=>{l[a]=null})),me()),~t?(n=l[t],n?n.p(e,o):(n=l[t]=r[t](e),n.c()),fe(n,1),n.m(i.parentNode,i)):n=null)},i(e){o||(fe(n),o=!0)},o(e){pe(n),o=!1},d(e){~t&&l[t].d(e),e&&S(i)}}}function Ii(e){let t,n;return t=new Ll({props:{classId:e[7],item:e[2],record:e[5],disabled:e[2].name===e[14]&&e[15]||e[0],eventId:e[4],currency:e[8],changeValue:e[9]}}),t.$on("notify",e[17]),t.$on("multi",e[18]),t.$on("defPrep",e[19]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),64&n[0]&&(i.item=e[2]),32&n[0]&&(i.record=e[5]),65&n[0]&&(i.disabled=e[2].name===e[14]&&e[15]||e[0]),16&n[0]&&(i.eventId=e[4]),256&n[0]&&(i.currency=e[8]),512&n[0]&&(i.changeValue=e[9]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function _i(e){let t,n,i,o;n=new Ll({props:{classId:e[7],item:e[2],record:e[5],disabled:e[0]||!!e[1],required:!0,eventId:e[4],currency:e[8],changeValue:e[9]}}),n.$on("notify",e[17]),n.$on("multi",e[18]),n.$on("defPrep",e[19]);let r=e[1]&&Ci(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),r&&r.c(),O(t,"padding-top",".25em"),O(t,"background-color","lightyellow"),O(t,"position","relative")},m(e,l){C(e,t,l),be(n,t,null),_(t,i),r&&r.m(t,null),o=!0},p(e,i){const o={};128&i[0]&&(o.classId=e[7]),64&i[0]&&(o.item=e[2]),32&i[0]&&(o.record=e[5]),3&i[0]&&(o.disabled=e[0]||!!e[1]),16&i[0]&&(o.eventId=e[4]),256&i[0]&&(o.currency=e[8]),512&i[0]&&(o.changeValue=e[9]),n.$set(o),e[1]?r?(r.p(e,i),2&i[0]&&fe(r,1)):(r=Ci(e),r.c(),fe(r,1),r.m(t,null)):r&&(ue(),pe(r,1,1,(()=>{r=null})),me())},i(e){o||(fe(n.$$.fragment,e),fe(r),o=!0)},o(e){pe(n.$$.fragment,e),pe(r),o=!1},d(e){e&&S(t),we(n),r&&r.d()}}}function Ci(e){let t,n,i,o,r;return n=new Be({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather2 pointer svelte-16mo2c")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[22]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Si(e){let t,n,i="list"!==e[2].type&&ki(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){"list"!==e[2].type?i?(i.p(e,n),64&n[0]&&fe(i,1)):(i=ki(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function ji(e){let t,n,i=e[6].list,o=[];for(let t=0;t<i.length;t+=1)o[t]=Ni(yi(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(497&n[0]){let l;for(i=e[6].list,l=0;l<i.length;l+=1){const r=yi(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=Ni(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}function qi(e){let t,n,i,o;return t=new e[12]({props:{text:e[11].designation}}),i=new ei({props:{classId:e[7],list:e[11],eventId:e[4],schema:e[11].item,record:e[5],disabled:e[0],currency:e[8],update:!0}}),{c(){ye(t.$$.fragment),n=L(),ye(i.$$.fragment)},m(e,r){be(t,e,r),C(e,n,r),be(i,e,r),o=!0},p(e,n){const o={};64&n[0]&&(o.text=e[11].designation),t.$set(o);const r={};128&n[0]&&(r.classId=e[7]),64&n[0]&&(r.list=e[11]),16&n[0]&&(r.eventId=e[4]),64&n[0]&&(r.schema=e[11].item),32&n[0]&&(r.record=e[5]),1&n[0]&&(r.disabled=e[0]),256&n[0]&&(r.currency=e[8]),i.$set(r)},i(e){o||(fe(t.$$.fragment,e),fe(i.$$.fragment,e),o=!0)},o(e){pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!1},d(e){we(t,e),e&&S(n),we(i,e)}}}function Ni(e){let t,n,i="array"!==e[11].type&&qi(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){"array"!==e[11].type?i?(i.p(e,n),64&n[0]&&fe(i,1)):(i=qi(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function Ei(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Li(e){let t,n;return t=new gi({props:{item:e[2],className:e[3],classId:e[7],list:e[11]}}),t.$on("choose",e[20]),t.$on("back",e[21]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};4&n[0]&&(i.item=e[2]),8&n[0]&&(i.className=e[3]),128&n[0]&&(i.classId=e[7]),2048&n[0]&&(i.list=e[11]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Fi(e){let t,n,i=e[10]&&Li(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[10]?i?(i.p(e,n),1024&n[0]&&fe(i,1)):(i=Li(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function Di(e){let t,n,i,o,r,l,s={ctx:e,current:null,token:null,hasCatch:!1,pending:Ei,then:xi,catch:wi,value:52,blocks:[,,,]};function a(t){e[28](t)}$e(e[16](),s),n=new e[12]({});let c={class:"tModal",noClickaway:!0,$$slots:{default:[Fi]},$$scope:{ctx:e}};return void 0!==e[10]&&(c.open=e[10]),o=new e[13]({props:c}),K.push((()=>ve(o,"open",a))),{c(){s.block.c(),t=L(),ye(n.$$.fragment),i=L(),ye(o.$$.fragment)},m(e,r){s.block.m(e,s.anchor=r),s.mount=()=>t.parentNode,s.anchor=t,C(e,t,r),be(n,e,r),C(e,i,r),be(o,e,r),l=!0},p(t,n){he(s,e=t,n);const i={};3212&n[0]|67108864&n[1]&&(i.$$scope={dirty:n,ctx:e}),!r&&1024&n[0]&&(r=!0,i.open=e[10],oe((()=>r=!1))),o.$set(i)},i(e){l||(fe(s.block),fe(n.$$.fragment,e),fe(o.$$.fragment,e),l=!0)},o(e){for(let e=0;e<3;e+=1){pe(s.blocks[e])}pe(n.$$.fragment,e),pe(o.$$.fragment,e),l=!1},d(e){s.block.d(e),s.token=null,s=null,e&&S(t),we(n,e),e&&S(i),we(o,e)}}}function zi(e,n,i){const{Divider:o,FormField:r,Modal:l}=c,s=Y();let a,d,u,m,f,{required:p}=n,{disabled:$}=n,{readonly:h}=n,{id:g}=n,{item:v}=n,{value:y}=n,{refValue:b}=n,w={},x="CHF",k=[],I=[],_={},C=new Map,S=!1,j="";const q=v.checkOn,N=y,E=e=>{a.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[i,o]=n.split(".");k.push({action:e,itemName:t.name,refObj:i,refName:o,op:t.properties[e].invert?"!":""})}))},L=()=>{a.items.filter((e=>e.lookup)).forEach((e=>{I.push({name:e.name,lookup:e.lookup})})),a.items.filter((e=>e.properties?.lookup)).forEach((e=>{I.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}))},F=async e=>{const t=k.filter((t=>t.refObj===e));if(t?.length){i(9,_={});for(const e of t){const{itemName:t,refObj:n,refName:o,op:r}=e;let{action:l}=e;if(!n)break;let s,a,c=!o&&w[n];const u=w[n];u&&o&&(c=(await getTaskFull(n,u))[o]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===r&&(c=!c),"required"!==l&&"readonly"!==l||(l="required"===l?l:"disabled",setTimeout((()=>{s=`#${d} .form-field.${t} .field textarea`,a=document.querySelector(s),a||(s=`#${d} .form-field.${t} .field input`,a=document.querySelector(s)),a&&c&&a.setAttribute(l,""),a&&!c&&a.removeAttribute(l)}),0)),"hidden"===l&&(s=`#${d} .form-field.${t}`,a=document.querySelector(s),a?.classList?.toggle("hidden",!!c),c&&i(9,_[t]="",_))}}};H((()=>{D()}));const D=async()=>{const e=e=>new Promise((t=>setTimeout(t,e)));let t,n=0;for(;!(t=document.getElementById(d))&&++n<20;)await e(50);t&&((()=>{if(recID)return;const e=new Set;for(const t of k)e.add(t.refObj||u);Array.from(e).forEach((e=>F(e)))})(),z())},z=()=>{setTimeout((()=>{Array.from(C).forEach((([e,t])=>{w[e]||i(5,w[e]=t._id,w)}))}),250)},T=async e=>{if(!e.value)return void B();const n={[e.itemName]:{$regex:`(?i)${e.value}`}},o=await t.getSectionView(u,n);o?.length?(i(11,j=o),i(10,S=!0)):(i(1,y=""),i(23,b=""),s("setRefValue",b))},A=()=>{i(10,S=!1)},B=()=>{i(1,y=""),i(23,b=y),i(5,w={}),s("setRefValue",b)};return e.$$set=e=>{"required"in e&&i(24,p=e.required),"disabled"in e&&i(0,$=e.disabled),"readonly"in e&&i(25,h=e.readonly),"id"in e&&i(26,g=e.id),"item"in e&&i(2,v=e.item),"value"in e&&i(1,y=e.value),"refValue"in e&&i(23,b=e.refValue)},e.$$.update=()=>{33554433&e.$$.dirty[0]&&i(0,$=$||h),134217784&e.$$.dirty[0]&&w&&s("safeReference",{record:w,class:u,event:m,taskId:f})},[$,y,v,u,m,w,a,d,x,_,S,j,o,l,q,N,async()=>{try{if(y){const e=await t.getTask(v.refClass,y);delete e._task,i(5,w=e),i(27,f=(await t.getTaskByDocId(e._id))._id)}else i(5,w={})}catch{}const e=await t.getSectionView("owner",{});if(e?.length&&e[0].currency){const n=await t.getSectionView("currency",{_id:e[0].currency});n?.length&&n[0].designation&&i(8,x=n[0].designation)}return i(6,a=await t.getSchemaByClass(v.refClass)),i(7,d="form-"+a.class+Math.floor(9e3*Math.random()+1e3).toString()),i(3,u=a.class),a.identity.designation,i(4,m=a.id),["readonly","hidden","required"].map(E),L(),!0},async({detail:e})=>{const{itemName:t,value:n}=e;if(i(5,w[t]=n,w),t===q)return T(e);F(t)},async({detail:e})=>{if(!(a.input?.length&&a.input.length>1))return;if(prevSchema?.class!==a.input[0])return;const{value:n,lookup:o,view:r}=e,[l]=o.split(":"),s=(await t.getSectionView(l,{[r]:{$in:n}})).map((e=>e._id));for(const e of a.input.slice(1)){i(5,w[e]=[],w);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&&s.includes(e[l]))),o?.length){const n=o.map((e=>e._id)),r=await t.getSectionView(e,{_id:{$in:n}});for(const t of r)t[e]=t._id;i(5,w[e]=r,w)}}},async({detail:{className:e,itemName:n,value:i}})=>{if(C.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===u))),!i)return;const o={[n]:!0},r=await t.getSectionView(e,o);r?.length&&C.set(e,r[0])},async({detail:e})=>{const n=await t.getSectionView(u,{_id:e.row._id});n?.length&&(i(1,y=n[0]._id),i(23,b=y),s("setRefValue",b),i(5,w=n[0])),A()},A,B,b,p,h,g,f,function(e){S=e,i(10,S)}]}class Ti extends ke{constructor(e){var t;super(),vi.getElementById("svelte-16mo2c-style")||((t=q("style")).id="svelte-16mo2c-style",t.textContent=".feather2.svelte-16mo2c{position:absolute;top:1em;right:0.5em;color:#4300b0}",_(vi.head,t)),xe(this,e,zi,Di,x,{required:24,disabled:0,readonly:25,id:26,item:2,value:1,refValue:23},[-1,-1])}}function Ai(e){let t,n=e[11]&&function(e){let t,n;return{c(){t=q("span"),n=E(e[4]),A(t,"class","item")},m(e,i){C(e,t,i),_(t,n)},p(e,t){16&t&&B(n,e[4])},d(e){e&&S(t)}}}(e);return{c(){n&&n.c(),t=F()},m(e,i){n&&n.m(e,i),C(e,t,i)},p(e,t){e[11]&&n.p(e,t)},d(e){n&&n.d(e),e&&S(t)}}}function Bi(e){let t,n,i;return n=new e[9]({props:{withItem:!0,itemLeft:!0,lang:e[10].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[8],step:e[12],pattern:e[6],placeholder:e[13],readonly:e[7],disabled:e[3],required:e[5],$$slots:{default:[Ai]},$$scope:{ctx:e}}}),n.$on("change",e[14]),n.$on("focus",e[15]),{c(){t=q("div"),ye(n.$$.fragment),O(t,"position","relative"),O(t,"max-width","10em")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p(e,[t]){const i={};6&t&&(i.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t&&(i.id=e[0]),1&t&&(i.name=e[0]),256&t&&(i.value=e[8]),64&t&&(i.pattern=e[6]),128&t&&(i.readonly=e[7]),8&t&&(i.disabled=e[3]),32&t&&(i.required=e[5]),536870928&t&&(i.$$scope={dirty:t,ctx:e}),n.$set(i)},i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Vi(e,t,n){let i;const o=Y(),{TextField:l}=c;let{id:s}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t,{formnovalidate:p}=t,{currency:$}=t;const h=JSON.parse(r.getItem("Locale")),g=["price","amount","amountValue","taxValue","__total"].find((e=>e===a.name?.split("-")[0])),v=Number("1.1").toLocaleString(h.id).substring(1,2),{properties:y={}}=a;let{min:b,max:w,step:x,pattern:k,decimals:I=0,unit:_="",placeholder:C,hint:S,readonly:j,negative:q,required:N=!1}=y;j=!0===j||void 0,k||(k=I?`[0-9]+([${v}][0-9]{1,${I}})?`:"[0-9]*"),q&&(k="-?"+k);return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(16,a=e.item),"value"in e&&n(17,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(18,p=e.formnovalidate),"currency"in e&&n(4,$=e.currency)},e.$$.update=()=>{262176&e.$$.dirty&&n(5,N=N&&!p),131072&e.$$.dirty&&n(8,i=Number(d.toString().replace(v,".")).toFixed(I).toString().replace(".",v))},[s,u,m,f,$,N,k,j,i,l,h,g,x,C,({detail:e})=>o("blur",{value:e.value}),({detail:e})=>{j||Number(d.toString().replace(v,"."))||n(8,i="")},a,d,p]}class Oi extends ke{constructor(e){super(),xe(this,e,Vi,Bi,x,{id:0,item:16,value:17,noForm:1,classId:2,disabled:3,formnovalidate:18,currency:4})}}const{document:Mi}=ge;function Wi(e){e[33]=e[35].list,e[34]=e[35].items}function Ri(e,t,n){const i=e.slice();return i[36]=t[n],i[38]=n,i}function Pi(e,t,n){const i=e.slice();return i[39]=t[n],i[41]=n,i}function Hi(e,t,n){const i=e.slice();return i[39]=t[n],i}function Qi(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Yi(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p,$,h,g,v,y;Wi(e),n=new e[8]({props:{outline:!0,$$slots:{default:[Gi]},$$scope:{ctx:e}}}),n.$on("click",e[30]);let b=!e[1]&&Ui(e);function w(t){e[31](t)}let x={id:e[11]};void 0!==e[2]&&(x.value=e[2]),s=new e[6]({props:x}),K.push((()=>ve(s,"value",w))),s.$on("input",e[14]),u=new Be({props:{size:"18"}});let k=e[34]?.length&&function(e){let t,n,i,o,r=!e[1]&&Ji(e),l=e[34],s=[];for(let t=0;t<l.length;t+=1)s[t]=Zi(Hi(e,l,t));return{c(){t=q("thead"),n=q("tr"),r&&r.c(),i=L();for(let e=0;e<s.length;e+=1)s[e].c();A(n,"class","svelte-1m010ne"),A(t,"class","svelte-1m010ne")},m(e,l){C(e,t,l),_(t,n),r&&r.m(n,null),_(n,i);for(let e=0;e<s.length;e+=1)s[e].m(n,null);o=!0},p(e,t){if(e[1]?r&&(ue(),pe(r,1,1,(()=>{r=null})),me()):r?(r.p(e,t),2&t[0]&&fe(r,1)):(r=Ji(e),r.c(),fe(r,1),r.m(n,i)),8192&t[0]){let i;for(l=e[34],i=0;i<l.length;i+=1){const o=Hi(e,l,i);s[i]?s[i].p(o,t):(s[i]=Zi(o),s[i].c(),s[i].m(n,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=l.length}},i(e){o||(fe(r),o=!0)},o(e){pe(r),o=!1},d(e){e&&S(t),r&&r.d(),j(s,e)}}}(e),I=e[33]?.length&&function(e){let t,n,i=e[33],o=[];for(let t=0;t<i.length;t+=1)o[t]=io(Ri(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(569359&n[0]){let l;for(i=e[33],l=0;l<i.length;l+=1){const r=Ri(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=io(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),b&&b.c(),o=L(),r=q("div"),l=E("Suchen: "),ye(s.$$.fragment),c=L(),d=q("span"),ye(u.$$.fragment),m=L(),f=q("div"),p=q("table"),k&&k.c(),$=L(),h=q("tbody"),I&&I.c(),A(t,"class","form--buttons svelte-1m010ne"),A(d,"class","feather pointer svelte-1m010ne"),O(r,"margin-bottom","1em"),O(r,"position","relative"),A(p,"striped",""),A(p,"class","svelte-1m010ne"),A(f,"class","eList svelte-1m010ne")},m(a,w){C(a,t,w),be(n,t,null),_(t,i),b&&b.m(t,null),C(a,o,w),C(a,r,w),_(r,l),be(s,r,null),_(r,c),_(r,d),be(u,d,null),C(a,m,w),C(a,f,w),_(f,p),k&&k.m(p,null),_(p,$),_(p,h),I&&I.m(h,null),g=!0,v||(y=D(d,"click",e[16]),v=!0)},p(e,i){Wi(e);const o={};8192&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o),e[1]?b&&(ue(),pe(b,1,1,(()=>{b=null})),me()):b?(b.p(e,i),2&i[0]&&fe(b,1)):(b=Ui(e),b.c(),fe(b,1),b.m(t,null));const r={};!a&&4&i[0]&&(a=!0,r.value=e[2],oe((()=>a=!1))),s.$set(r),e[34]?.length&&k.p(e,i),e[33]?.length&&I.p(e,i)},i(e){g||(fe(n.$$.fragment,e),fe(b),fe(s.$$.fragment,e),fe(u.$$.fragment,e),fe(k),fe(I),g=!0)},o(e){pe(n.$$.fragment,e),pe(b),pe(s.$$.fragment,e),pe(u.$$.fragment,e),pe(k),pe(I),g=!1},d(e){e&&S(t),we(n),b&&b.d(),e&&S(o),e&&S(r),we(s),we(u),e&&S(m),e&&S(f),k&&k.d(),I&&I.d(),v=!1,y()}}}function Gi(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Ui(e){let t,n;return t=new e[8]({props:{disabled:!e[33].length,filled:!0,$$slots:{default:[Ki]},$$scope:{ctx:e}}}),t.$on("click",e[17](e[33])),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};8192&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Ki(e){let t;return{c(){t=E("Bestätigen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Ji(e){let t,n,i,o,r;return n=new qe({props:{size:"20"}}),{c(){t=q("th"),ye(n.$$.fragment),A(t,"class","svelte-1m010ne")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[18](e[33])),o=!0)},p(t,n){e=t},i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Zi(e){let t,n,i=e[39]+"";return{c(){t=q("th"),n=E(i),A(t,"class","svelte-1m010ne")},m(e,i){C(e,t,i),_(t,n)},p:g,d(e){e&&S(t)}}}function Xi(e){let t,n,i,o,r,l,s,a=e[0],c=to(e),d=e[34],u=[];for(let t=0;t<d.length;t+=1)u[t]=no(Pi(e,d,t));return{c(){t=q("tr"),c.c(),n=L();for(let e=0;e<u.length;e+=1)u[e].c();i=L(),A(t,"style",o=e[1]?"cursor: default;":"cursor: zoom-in;"),A(t,"title","übernimmt den Wert direkt"),A(t,"class","svelte-1m010ne"),M(t,"active",e[0].includes(e[36]))},m(o,a){C(o,t,a),c.m(t,null),_(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);_(t,i),r=!0,l||(s=D(t,"click",e[19](e[36])),l=!0)},p(l,s){if(e=l,1&s[0]&&x(a,a=e[0])?(ue(),pe(c,1,1,g),me(),c=to(e),c.c(),fe(c),c.m(t,n)):c.p(e,s),8200&s[0]){let n;for(d=e[34],n=0;n<d.length;n+=1){const o=Pi(e,d,n);u[n]?u[n].p(o,s):(u[n]=no(o),u[n].c(),u[n].m(t,i))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!r||2&s[0]&&o!==(o=e[1]?"cursor: default;":"cursor: zoom-in;"))&&A(t,"style",o),8193&s[0]&&M(t,"active",e[0].includes(e[36]))},i(e){r||(fe(c),r=!0)},o(e){pe(c),r=!1},d(e){e&&S(t),c.d(e),j(u,e),l=!1,s()}}}function eo(e){let t,n,i;return n=new e[10]({props:{name:e[12],data:e[38],checked:e[0].includes(e[36]),round:!0}}),{c(){t=q("td"),ye(n.$$.fragment),A(t,"title","Wählt den Wert aus"),A(t,"class","svelte-1m010ne")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p(e,t){const i={};1&t[0]&&(i.checked=e[0].includes(e[36])),n.$set(i)},i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function to(e){let t,n,i=!e[1]&&eo(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[1]?i&&(ue(),pe(i,1,1,(()=>{i=null})),me()):i?(i.p(e,n),2&n[0]&&fe(i,1)):(i=eo(e),i.c(),fe(i,1),i.m(t.parentNode,t))},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function no(e){let t,n,i=(e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"";return{c(){t=q("td"),n=E(i),A(t,"class","svelte-1m010ne")},m(e,i){C(e,t,i),_(t,n)},p(e,t){8&t[0]&&i!==(i=(e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"")&&B(n,i)},d(e){e&&S(t)}}}function io(e){let t,n,i=e[15](e[36],e[2]),o=i&&Xi(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){4&n[0]&&(i=e[15](e[36],e[2])),i?o?(o.p(e,n),4&n[0]&&fe(o,1)):(o=Xi(e),o.c(),fe(o,1),o.m(t.parentNode,t)):o&&(ue(),pe(o,1,1,(()=>{o=null})),me())},i(e){n||(fe(o),n=!0)},o(e){pe(o),n=!1},d(e){o&&o.d(e),e&&S(t)}}}function oo(e){let t,n;return t=new e[5]({}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p:g,i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function ro(e){let t,n,i,o;t=new e[9]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:oo,then:Yi,catch:Qi,value:35,blocks:[,,,]};return $e(e[13](),r),{c(){ye(t.$$.fragment),n=L(),i=F(),r.block.c()},m(e,l){be(t,e,l),C(e,n,l),C(e,i,l),r.block.m(e,r.anchor=l),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){he(r,e=t,n)},i(e){o||(fe(t.$$.fragment,e),fe(r.block),o=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(r.blocks[e])}o=!1},d(e){we(t,e),e&&S(n),e&&S(i),r.block.d(e),r.token=null,r=null}}}function lo(e){let t,n;return t=new e[7]({props:{title:"Auswahl",class:"eList",$$slots:{default:[ro]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};15&n[0]|8192&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function so(e,n,i){const o=Y(),{Loading:r,TextField:l,Dialog:s,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=n,{id:f}=n,{selection:p}=n,{refDoc:$}=n,{tableName:h}=n,{idName:g}=n,{target:v}=n,{view:y}=n,{unique:b}=n,{uniqueView:w}=n,{status:x}=n,{single:k}=n;p||=[];let I="",_=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",C=[];const S=h+g+v+"checkbox",j=(e,t)=>e>t?1:t>e?-1:0;return e.$$set=e=>{"classId"in e&&i(21,m=e.classId),"id"in e&&i(22,f=e.id),"selection"in e&&i(0,p=e.selection),"refDoc"in e&&i(23,$=e.refDoc),"tableName"in e&&i(24,h=e.tableName),"idName"in e&&i(25,g=e.idName),"target"in e&&i(20,v=e.target),"view"in e&&i(26,y=e.view),"unique"in e&&i(27,b=e.unique),"uniqueView"in e&&i(28,w=e.uniqueView),"status"in e&&i(29,x=e.status),"single"in e&&i(1,k=e.single)},[p,k,I,C,o,r,l,s,a,d,u,_,S,async()=>{let e=[],n=[],o={};if(i(3,C=[]),g)if(y){const n=m.split("-")[1].slice(0,-4),i="input."+m+"[name='_id']",r=document.querySelector(i).value;o={[g]:f},x&&(o.$or=[{status:!0},{[n]:r}]),e=await t.getSectionView(h,o),e=e.sort(((e,t)=>{const i=e=>(e[n]||"z").toString()+e[v];return j(i(e),i(t))}))}else w?(o={[g]:f,status:!0},Object.entries(w).map((([e,t])=>{t?.length&&(o[e]={$in:t}),n.push(e)})),e=await t.getSectionView(h,o),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return j(n(e),n(t))})),i(3,C=e.map((e=>{const t=[e[v]];return n.map((n=>t.push(e[n]))),t})))):b?(e=await t.getSection(h,g,f,b),e=e.sort(((e,t)=>j(e,t)))):(e=await t.getSection(h,g,f),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return j(n(e),n(t))})));else o={},Array.isArray(f)||(o._id=f),e=await t.getSectionView(h,o);const r=await t.getSchemaByClass(h),l=[];if($){const t=r.items[0].name,n=r.items[1].name,o=r.list[0].name,l=e.find((e=>e[t]===$));e=l[o],i(20,v=n)}e.map((e=>{let t=e[v];if(t||h!==v||(i(20,v=r.items[0].name),t=e[v]),Array.isArray(t))for(const e of t){let t=e;"string"!=typeof e&&(t=Array.from(Object.values(e)).filter((e=>!!e&&24!==e?.length)).join(", ")),l.push(t||[])}else l.push(t||[])}));const s=r.items.find((e=>e.name===v))?.designation;return n=n.map((e=>r.items.find((t=>t.name===e))?.designation)),{list:l.flat(),items:[s,...n]}},({detail:{value:e}})=>{i(2,I=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{i(2,I="")},e=>()=>{const t=document.getElementsByName(S),n=[];t.forEach(((t,i)=>{t.checked&&n.push(e[+t.attributes.data.value])})),o("choose",{list:n})},e=>()=>{document.getElementsByName(S).forEach(((e,t)=>{e.checked=!e.checked}))},e=>t=>{"TD"===t.target?.nodeName&&(k?o("choose",{list:[].concat(e)}):(i(0,p=p.includes(e)?p.filter((t=>t!==e)):p.concat(e)),o("choose",{list:p})))},v,m,f,$,h,g,y,b,w,x,()=>o("back"),function(e){I=e,i(2,I)}]}class ao extends ke{constructor(e){var t;super(),Mi.getElementById("svelte-1m010ne-style")||((t=q("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}",_(Mi.head,t)),xe(this,e,so,lo,x,{classId:21,id:22,selection:0,refDoc:23,tableName:24,idName:25,target:20,view:26,unique:27,uniqueView:28,status:29,single:1},[-1,-1])}}const{document:co}=ge;function uo(e){let t,n,i,o,r,l=e[7].length+"";return{c(){t=q("span"),n=E("("),i=E(l),o=E(")"),A(t,"class",r=I(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,n){128&n[0]&&l!==(l=e[7].length+"")&&B(i,l),2&n[0]&&r!==(r=I(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&A(t,"class",r)},d(e){e&&S(t)}}}function mo(e){let t;return{c(){t=q("div"),A(t,"class","load-more-options"),A(t,"slot","load-more-options-message slot")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function fo(e){let t,n,i,o;const r=[ho,$o,po],l=[];function s(e,t){return!e[16].single&&e[7].length?0:e[17]?1:e[14]&&e[16].view&&e[16].maxItem?2:-1}return~(t=s(e))&&(n=l[t]=r[t](e)),{c(){n&&n.c(),i=F()},m(e,n){~t&&l[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=s(e),t===a?~t&&l[t].p(e,o):(n&&(ue(),pe(l[a],1,1,(()=>{l[a]=null})),me()),~t?(n=l[t],n?n.p(e,o):(n=l[t]=r[t](e),n.c()),fe(n,1),n.m(i.parentNode,i)):n=null)},i(e){o||(fe(n),o=!0)},o(e){pe(n),o=!1},d(e){~t&&l[t].d(e),e&&S(i)}}}function po(e){let t,n,i,o,r;return n=new Ce({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"title","Übernehmen"),A(t,"class","feather pointer svelte-1rbaejz")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[26]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function $o(e){let t,n,i,o,r;return n=new Le({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"title",e[17].title||"Generieren"),A(t,"class","feather pointer svelte-1rbaejz")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[25]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function ho(e){let t,n,i,o,r;return n=new Be({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"title","Löschen"),A(t,"class","feather pointer svelte-1rbaejz")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[27]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function go(e){let t,n,i;function o(t){e[37](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[vo]},$$scope:{ctx:e}};return void 0!==e[10]&&(r.open=e[10]),t=new e[11]({props:r}),K.push((()=>ve(t,"open",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};53&i[0]|32768&i[1]&&(o.$$scope={dirty:i,ctx:e}),!n&&1024&i[0]&&(n=!0,o.open=e[10],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function vo(e){let t,n;return t=new ao({props:{classId:e[2],selection:e[0],refDoc:e[19],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[21]||e[20]],tableName:e[20],idName:e[21],target:e[4].name,single:e[16].single}}),t.$on("choose",e[24]),t.$on("back",e[23]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};4&n[0]&&(i.classId=e[2]),1&n[0]&&(i.selection=e[0]),16&n[0]&&(i.unique=e[16].unique&&e[4].name),32&n[0]&&(i.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(i.id=e[5][e[21]||e[20]]),16&n[0]&&(i.target=e[4].name),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function yo(e){let t,n,i,o,r,l,s,a,c,d=!e[16].single&&e[7].length&&uo(e);function u(t){e[35](t)}function m(t){e[36](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:bo,minSearchLength:"3",$$slots:{"load-more-options-message slot":[mo]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),i=new e[12]({props:f}),K.push((()=>ve(i,"selection",u))),K.push((()=>ve(i,"maxOptions",m))),i.$on("change",e[22]);let p=!e[1]&&fo(e),$=e[10]&&go(e);return{c(){t=q("div"),d&&d.c(),n=L(),ye(i.$$.fragment),l=L(),p&&p.c(),s=L(),$&&$.c(),a=F(),O(t,"position","relative")},m(e,o){C(e,t,o),d&&d.m(t,null),_(t,n),be(i,t,null),_(t,l),p&&p.m(t,null),C(e,s,o),$&&$.m(e,o),C(e,a,o),c=!0},p(e,l){!e[16].single&&e[7].length?d?d.p(e,l):(d=uo(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const s={};8&l[0]&&(s.id=e[3]),8&l[0]&&(s.name=e[3]),8&l[0]&&(s.class=e[3]),2&l[0]&&(s.disabled=e[1]),64&l[0]&&(s.required=e[6]),256&l[0]&&(s.placeholder=e[8]),32768&l[1]&&(s.$$scope={dirty:l,ctx:e}),!o&&128&l[0]&&(o=!0,s.selection=e[7],oe((()=>o=!1))),!r&&512&l[0]&&(r=!0,s.maxOptions=e[9],oe((()=>r=!1))),i.$set(s),e[1]?p&&(ue(),pe(p,1,1,(()=>{p=null})),me()):p?(p.p(e,l),2&l[0]&&fe(p,1)):(p=fo(e),p.c(),fe(p,1),p.m(t,null)),e[10]?$?($.p(e,l),1024&l[0]&&fe($,1)):($=go(e),$.c(),fe($,1),$.m(a.parentNode,a)):$&&(ue(),pe($,1,1,(()=>{$=null})),me())},i(e){c||(fe(i.$$.fragment,e),fe(p),fe($),c=!0)},o(e){pe(i.$$.fragment,e),pe(p),pe($),c=!1},d(e){e&&S(t),d&&d.d(),we(i),p&&p.d(),e&&S(s),$&&$.d(e),e&&S(a)}}}async function*bo(e){yield[{name:e}]}function wo(e,n,i){const o=Y(),{Modal:r,Autocomplete:l}=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,{toDelete:v}=n,{reqQuantity:y}=n,{notifyList:b}=n;const{properties:w={}}=d;let{placeholder:x,hint:k,readonly:I,required:_=!1,lookup:C="",view:S=!1,multi:j,max:q=1e3,generate:N=!1,status:E=!0,refDoc:L}=w;const[F,D]=C.split(":");let z=!1,T=m.map&&m.map((e=>({name:e})))||[];p||=I,p&&(x="");H((async()=>{const e=document.getElementById(a);e.classList.add(s),!I&&C&&e.addEventListener("focus",A)}));const A=()=>{if(C){document.getElementById(a).blur();const e=y||q;(j.unique||T.length<e)&&i(10,z=!0)}},B=()=>{i(10,z&&=!1)},V=({detail:e})=>{i(7,T=e.list.map((e=>({name:e})))),o("blur",{value:e.list}),o("multi",{view:j.view,lookup:C,name:d.name,value:e.list}),B()},O=async()=>{const e={[D]:u[D]},n=await t.getSectionView(F,e),i=Array.from({length:n.length},((e,t)=>n[t][d.name]));V({detail:{list:i}})},M=(e=!1)=>{if(p||!j.required)return;const t=j.maxItem;if(!t||j.unique)return;i(9,q=!1!==e?e:y||u[t]||0);const n=T.length!=q,r=document.getElementById(a);r?.classList?.toggle("invalid",n),o("invalid",{idx:g,value:n})};return e.$$set=e=>{"classId"in e&&i(2,s=e.classId),"id"in e&&i(3,a=e.id),"item"in e&&i(4,d=e.item),"record"in e&&i(5,u=e.record),"value"in e&&i(0,m=e.value),"noForm"in e&&i(28,f=e.noForm),"disabled"in e&&i(1,p=e.disabled),"formnovalidate"in e&&i(29,$=e.formnovalidate),"numberInput"in e&&i(30,h=e.numberInput),"praefix"in e&&i(31,g=e.praefix),"toDelete"in e&&i(32,v=e.toDelete),"reqQuantity"in e&&i(33,y=e.reqQuantity),"notifyList"in e&&i(34,b=e.notifyList)},e.$$.update=()=>{48&e.$$.dirty[0]&&u&&""===u[d.name]&&i(7,T=[]),48&e.$$.dirty[0]&&u&&Array.isArray(u[d.name])&&i(7,T=u[d.name].map((e=>({name:e})))),16&e.$$.dirty[0]|2&e.$$.dirty[1]&&v&&v===d.name&&i(7,T=[]),128&e.$$.dirty[0]&&T&&(i(0,m=T.map&&T.map((e=>e.name))||[]),M()),1073741824&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:i}=e;void 0!==g&&g!==i||t&&t.name===j.maxItem&&M(n)})(h),536870976&e.$$.dirty[0]&&i(6,_=_&&!$),8&e.$$.dirty[1]&&(async e=>{if(void 0===g)return;const{itemName:n,value:r}=e||{};if(!r)return;if(d.refItem?.split(".")[0]!==n)return;const[l,s]=d.refItem.split("."),a=await t.getTask(l,r);if(!a||!a[s])return;const c=a[s];if(!Array.isArray(c)&&!c.length)return;const u=c[g][d.name];o("record",{itemName:"quantity",value:u?.length||0}),i(7,T=u&&u.map((e=>({name:e})))),setTimeout(M,250)})(b)},[m,p,s,a,d,u,_,T,x,q,z,r,l,I,C,S,j,N,E,L,F,D,({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),i(7,T=t.map((e=>({name:e.trim()})))),o("blur",{value:T.map((e=>e.name))}),o("multi",{view:j.view,lookup:C,value:T.map((e=>e.name))})},B,V,()=>{const e=u[N.itemQuantity]||y;if(!e)return;const t=N.prefix||"",n=u[N.variable]||"",i=N.len||5,o=Array.from({length:e},((e,o)=>t+n+"-"+o.toString().padStart(i,"0")));V({detail:{list:o}})},async()=>{if(!0===S)return O();const e=y||u[j.maxItem];if(!e)return;const n={[D]:u[D],status:!0},i=[].concat(u[j.view]||[]);i.length&&(n[j.view]={$in:i});const o=await t.getSectionView(F,n),r=Array.from({length:e<o.length?e:o.length},((e,t)=>o[t][d.name]));V({detail:{list:r}})},()=>{V({detail:{list:[]}})},f,$,h,g,v,y,b,function(e){T=e,i(7,T),i(5,u),i(4,d),i(32,v)},function(e){q=e,i(9,q)},function(e){z=e,i(10,z)}]}class xo extends ke{constructor(e){var t;super(),co.getElementById("svelte-1rbaejz-style")||((t=q("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}",_(co.head,t)),xe(this,e,wo,yo,x,{classId:2,id:3,item:4,record:5,value:0,noForm:28,disabled:1,formnovalidate:29,numberInput:30,praefix:31,toDelete:32,reqQuantity:33,notifyList:34},[-1,-1])}}const{document:ko}=ge;function Io(e){e[26]=e[28].list,e[27]=e[28].items}function _o(e,t,n){const i=e.slice();return i[29]=t[n],i}function Co(e,t,n){const i=e.slice();return i[32]=t[n],i}function So(e,t,n){const i=e.slice();return i[32]=t[n],i}function jo(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function qo(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p,$,h,g,v;function y(t){e[23](t)}Io(e),n=new e[7]({props:{outline:!0,$$slots:{default:[No]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let b={id:e[8]};void 0!==e[1]&&(b.value=e[1]),l=new e[6]({props:b}),K.push((()=>ve(l,"value",y))),l.$on("input",e[12]),d=new Be({props:{size:"18"}});let w=e[27]?.length&&function(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=Eo(So(e,i,t));return{c(){t=q("thead"),n=q("tr");for(let e=0;e<o.length;e+=1)o[e].c();A(n,"class","svelte-14hcfjl"),A(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),_(t,n);for(let e=0;e<o.length;e+=1)o[e].m(n,null)},p(e,t){if(2048&t[0]){let r;for(i=e[27],r=0;r<i.length;r+=1){const l=So(e,i,r);o[r]?o[r].p(l,t):(o[r]=Eo(l),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(e){e&&S(t),j(o,e)}}}(e),x=e[26]?.length&&function(e){let t,n=e[26],i=[];for(let t=0;t<n.length;t+=1)i[t]=Do(_o(e,n,t));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=F()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);C(e,t,n)},p(e,o){if(11779&o[0]){let r;for(n=e[26],r=0;r<n.length;r+=1){const l=_o(e,n,r);i[r]?i[r].p(l,o):(i[r]=Do(l),i[r].c(),i[r].m(t.parentNode,t))}for(;r<i.length;r+=1)i[r].d(1);i.length=n.length}},d(e){j(i,e),e&&S(t)}}}(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),o=q("div"),r=E("Suchen: "),ye(l.$$.fragment),a=L(),c=q("span"),ye(d.$$.fragment),u=L(),m=q("div"),f=q("table"),w&&w.c(),p=L(),$=q("tbody"),x&&x.c(),A(t,"class","form--buttons svelte-14hcfjl"),A(c,"class","feather pointer svelte-14hcfjl"),O(o,"margin-bottom","1em"),O(o,"position","relative"),A(f,"striped",""),A(f,"class","svelte-14hcfjl"),A(m,"class","eList svelte-14hcfjl")},m(s,y){C(s,t,y),be(n,t,null),C(s,i,y),C(s,o,y),_(o,r),be(l,o,null),_(o,a),_(o,c),be(d,c,null),C(s,u,y),C(s,m,y),_(m,f),w&&w.m(f,null),_(f,p),_(f,$),x&&x.m($,null),h=!0,g||(v=D(c,"click",e[14]),g=!0)},p(e,t){Io(e);const i={};64&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!s&&2&t[0]&&(s=!0,o.value=e[1],oe((()=>s=!1))),l.$set(o),e[27]?.length&&w.p(e,t),e[26]?.length&&x.p(e,t)},i(e){h||(fe(n.$$.fragment,e),fe(l.$$.fragment,e),fe(d.$$.fragment,e),h=!0)},o(e){pe(n.$$.fragment,e),pe(l.$$.fragment,e),pe(d.$$.fragment,e),h=!1},d(e){e&&S(t),we(n),e&&S(i),e&&S(o),we(l),we(d),e&&S(u),e&&S(m),w&&w.d(),x&&x.d(),g=!1,v()}}}function No(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Eo(e){let t,n,i=e[32]?.designation+"";return{c(){t=q("th"),n=E(i),A(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),_(t,n)},p:g,d(e){e&&S(t)}}}function Lo(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=Fo(Co(e,i,t));return{c(){t=q("tr");for(let e=0;e<o.length;e+=1)o[e].c();n=L(),A(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[29]._id===e[0])},m(e,i){C(e,t,i);for(let e=0;e<o.length;e+=1)o[e].m(t,null);_(t,n)},p(e,r){if(3584&r[0]){let l;for(i=e[27],l=0;l<i.length;l+=1){const s=Co(e,i,l);o[l]?o[l].p(s,r):(o[l]=Fo(s),o[l].c(),o[l].m(t,n))}for(;l<o.length;l+=1)o[l].d(1);o.length=i.length}2049&r[0]&&M(t,"active",e[29]._id===e[0])},d(e){e&&S(t),j(o,e)}}}function Fo(e){let t,n,i,o,r=e[9](e[29],e[32])+"";return{c(){t=q("td"),n=E(r),A(t,"class","svelte-14hcfjl")},m(r,l){C(r,t,l),_(t,n),i||(o=D(t,"click",T(e[10](e[29]))),i=!0)},p(t,n){e=t},d(e){e&&S(t),i=!1,o()}}}function Do(e){let t,n=e[13](e[29],e[27],e[1]),i=n&&Lo(e);return{c(){i&&i.c(),t=F()},m(e,n){i&&i.m(e,n),C(e,t,n)},p(e,o){2&o[0]&&(n=e[13](e[29],e[27],e[1])),n?i?i.p(e,o):(i=Lo(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&S(t)}}}function zo(e){let t,n;return t=new e[5]({}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p:g,i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function To(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:zo,then:qo,catch:jo,value:28,blocks:[,,,]};return $e(e[11](),r),{c(){ye(t.$$.fragment),n=L(),i=F(),r.block.c()},m(e,l){be(t,e,l),C(e,n,l),C(e,i,l),r.block.m(e,r.anchor=l),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){he(r,e=t,n)},i(e){o||(fe(t.$$.fragment,e),fe(r.block),o=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(r.blocks[e])}o=!1},d(e){we(t,e),e&&S(n),e&&S(i),r.block.d(e),r.token=null,r=null}}}function Ao(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[To]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};3&n[0]|64&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Bo(e,i,o){const r=Y(),{Dialog:l,Divider:s,Loading:a,TextField:d,Button:u}=c;let{item:m}=i,{className:p}=i,{classId:h}=i,{rowId:g}=i,{viewName:v}=i,{viewValue:y}=i,{recordId:b}=i,{filter:w}=i,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?$(n):f(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass(p);H((()=>{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&&Xs(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&o(15,m=e.item),"className"in e&&o(16,p=e.className),"classId"in e&&o(17,h=e.classId),"rowId"in e&&o(0,g=e.rowId),"viewName"in e&&o(18,v=e.viewName),"viewValue"in e&&o(19,y=e.viewValue),"recordId"in e&&o(20,b=e.recordId),"filter"in e&&o(21,w=e.filter)},[g,x,r,l,s,a,d,u,k,I,e=>()=>r("choose",{row:e}),async()=>{const e=await _,n="."+h+"#"+v;document.querySelector(n);let i={[v]:y},o=[];i[v]&&(o=await t.getSectionView(e.class,i,!0)),w&&(o=o.filter((e=>e._id!=w)));let r=[],l=e.display;return l&&l.length?l.map((t=>{const[n,i]=t.split(".");let l=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===i));l&&(l={...l},l.name=`${n}_${i}`,o=o.map((e=>(e[n]&&(e[l.name]=e["_"+n]?e["_"+n][i]:e[n][i]),e)))),l||(l=e.items.find((e=>e.name===n))),r.find((e=>e?.name===n))||r.push(l)})):r=e.items,{list:o,items:r}},({detail:{value:e}})=>{o(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(I(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{o(1,x="")},m,p,h,v,y,b,w,()=>r("back"),function(e){x=e,o(1,x)}]}class Vo extends ke{constructor(e){var t;super(),ko.getElementById("svelte-14hcfjl-style")||((t=q("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}",_(ko.head,t)),xe(this,e,Bo,Ao,x,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function Oo(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Mo(e){let t,n,i,o,r;function l(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}),K.push((()=>ve(n,"value",l)));let a=!e[6]&&Wo(e);return{c(){t=q("div"),ye(n.$$.fragment),o=L(),a&&a.c(),O(t,"position","relative")},m(e,i){C(e,t,i),be(n,t,null),_(t,o),a&&a.m(t,null),r=!0},p(e,o){const r={};4&o&&(r.id=e[2]),8&o&&(r.name=e[3].name),34&o&&(r.inputClass=e[5]||e[1]),64&o&&(r.disabled=e[6]),128&o&&(r.formnovalidate=e[7]),!i&&1&o&&(i=!0,r.value=e[0],oe((()=>i=!1))),n.$set(r),e[6]?a&&(ue(),pe(a,1,1,(()=>{a=null})),me()):a?(a.p(e,o),64&o&&fe(a,1)):(a=Wo(e),a.c(),fe(a,1),a.m(t,null))},i(e){r||(fe(n.$$.fragment,e),fe(a),r=!0)},o(e){pe(n.$$.fragment,e),pe(a),r=!1},d(e){e&&S(t),we(n),a&&a.d()}}}function Wo(e){let t,n,i,o,r;return n=new rt({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-wbrqzu")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[17]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Ro(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Po(e){let t,n,i;function o(t){e[22](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[Ho]},$$scope:{ctx:e}};return void 0!==e[8]&&(r.open=e[8]),t=new e[11]({props:r}),K.push((()=>ve(t,"open",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};268435994&i&&(o.$$scope={dirty:i,ctx:e}),!n&&256&i&&(n=!0,o.open=e[8],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function Ho(e){let t,n;return t=new Vo({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(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};8&n&&(i.item=e[3]),8&n&&(i.className=e[3].refClass),2&n&&(i.classId=e[1]),16&n&&(i.recordId=e[4]._id),512&n&&(i.viewValue=e[9]),16&n&&(i.filter=e[4]._id),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Qo(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Ro,then:Mo,catch:Oo,value:27,blocks:[,,,]};$e(e[16](),o);let r=e[8]&&Po(e);return{c(){o.block.c(),t=L(),r&&r.c(),n=F()},m(e,l){o.block.m(e,o.anchor=l),o.mount=()=>t.parentNode,o.anchor=t,C(e,t,l),r&&r.m(e,l),C(e,n,l),i=!0},p(t,[i]){he(o,e=t,i),e[8]?r?(r.p(e,i),256&i&&fe(r,1)):(r=Po(e),r.c(),fe(r,1),r.m(n.parentNode,n)):r&&(ue(),pe(r,1,1,(()=>{r=null})),me())},i(e){i||(fe(o.block),fe(r),i=!0)},o(e){for(let e=0;e<3;e+=1){pe(o.blocks[e])}pe(r),i=!1},d(e){o.block.d(e),o.token=null,o=null,e&&S(t),r&&r.d(e),e&&S(n)}}}function Yo(e,t,n){const{TextField:i,Modal:o}=c;let{classId:r}=t,{id:l}=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:y,required:b=!1,view:w}=$,x=!1;const k=()=>{n(8,x=!1)};return e.$$set=e=>{"classId"in e&&n(1,r=e.classId),"id"in e&&n(2,l=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,r,l,s,a,u,m,f,x,h,i,o,g,y,b,w,async()=>(n(9,h=a[w.selection]),!0),()=>{n(8,x=!0)},({detail:e})=>{n(0,d=e.row[w.value?w.value:"_id"]),k()},k,p,function(e){d=e,n(0,d)},function(e){x=e,n(8,x)}]}class Go extends ke{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=q("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",_(document.head,t)),xe(this,e,Yo,Qo,x,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function Uo(e,t,n){const i=e.slice();return i[12]=t[n][0],i[13]=t[n][1],i}function Ko(e){let t;return{c(){t=q("option"),t.textContent="- ",t.selected=!0,t.__value="",t.value=t.__value},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Jo(e){let t;return{c(){t=q("option"),t.textContent="-- Bitte wählen -- ",t.disabled=!0,t.selected=!0,t.__value="",t.value=t.__value},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Zo(e){let t,n,i,o,r=e[12]+"";return{c(){t=q("option"),n=E(r),t.__value=i=e[13],t.value=t.__value,t.selected=o=e[0]==e[13]},m(e,i){C(e,t,i),_(t,n)},p(e,l){64&l&&r!==(r=e[12]+"")&&B(n,r),64&l&&i!==(i=e[13])&&(t.__value=i,t.value=t.__value),65&l&&o!==(o=e[0]==e[13])&&(t.selected=o)},d(e){e&&S(t)}}}function Xo(e){let t,n,i,o,r,l=!e[7]&&function(e){let t;function n(e,t){return e[5]&&!0!==e[8]?Jo:Ko}let i=n(e),o=i(e);return{c(){o.c(),t=F()},m(e,n){o.m(e,n),C(e,t,n)},p(e,r){i!==(i=n(e))&&(o.d(1),o=i(e),o&&(o.c(),o.m(t.parentNode,t)))},d(e){o.d(e),e&&S(t)}}}(e),s=e[6],a=[];for(let t=0;t<s.length;t+=1)a[t]=Zo(Uo(e,s,t));return{c(){t=q("select"),l&&l.c(),n=F();for(let e=0;e<a.length;e+=1)a[e].c();A(t,"class",i=I(e[3]||e[4])+" svelte-5xpzvo"),A(t,"id",e[2]),A(t,"name",e[2]),t.disabled=e[1],t.required=e[5]},m(i,s){C(i,t,s),l&&l.m(t,null),_(t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null);o||(r=D(t,"change",e[9]),o=!0)},p(e,[n]){if(e[7]||l.p(e,n),65&n){let i;for(s=e[6],i=0;i<s.length;i+=1){const o=Uo(e,s,i);a[i]?a[i].p(o,n):(a[i]=Zo(o),a[i].c(),a[i].m(t,null))}for(;i<a.length;i+=1)a[i].d(1);a.length=s.length}24&n&&i!==(i=I(e[3]||e[4])+" svelte-5xpzvo")&&A(t,"class",i),4&n&&A(t,"id",e[2]),4&n&&A(t,"name",e[2]),2&n&&(t.disabled=e[1]),32&n&&(t.required=e[5])},i:g,o:g,d(e){e&&S(t),l&&l.d(),j(a,e),o=!1,r()}}}function er(e,t,n){const i=Y();let{id:o}=t,{item:r}=t,{value:l}=t,{noForm:s=!1}=t,{classId:a}=t,{disabled:c}=t,{required:d}=t,{enum:u,regulation:m,readonly:f}=r.properties;u&&(u=u.map((e=>[e,e]))),"valueAddedTax"===m&&(l||=0,u=[["0% Steuerbefreit",0],["8.1% Normalsatz",.081],["2.6% Reduzierter Satz",.026],["3.8% Beherbergung",.038]]),c||=!!f,c||(c=void 0);return e.$$set=e=>{"id"in e&&n(2,o=e.id),"item"in e&&n(10,r=e.item),"value"in e&&n(0,l=e.value),"noForm"in e&&n(3,s=e.noForm),"classId"in e&&n(4,a=e.classId),"disabled"in e&&n(1,c=e.disabled),"required"in e&&n(5,d=e.required)},[l,c,o,s,a,d,u,m,f,e=>i("blur",{value:e.srcElement.value}),r]}class tr extends ke{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=q("style")).id="svelte-5xpzvo-style",t.textContent="select.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:focus{border:none;border-bottom:2px solid #4300b0}",_(document.head,t)),xe(this,e,er,Xo,x,{id:2,item:10,value:0,noForm:3,classId:4,disabled:1,required:5})}}function nr(e){let t;return{c(){t=E("Stunden")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function ir(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[nr]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function or(e){let t;return{c(){t=E("Minuten")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function rr(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[or]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function lr(e){let t;return{c(){t=E("Jetzt")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function sr(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[lr]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function ar(e){let t,n,i,o,r,l,s,a,c;return o=new e[5]({props:{value:e[0],closeOnSelection:!0}}),o.$on("change",e[8]),l=new e[6]({props:{value:e[0],$$slots:{"now-label":[sr],"minutes-label":[rr],"hours-label":[ir]},$$scope:{ctx:e}}}),l.$on("change",e[7]),{c(){t=q("input"),i=L(),ye(o.$$.fragment),r=L(),ye(l.$$.fragment),A(t,"type","string"),A(t,"class",n=e[2]||e[3]),A(t,"id",e[1]),A(t,"name",e[1]),t.hidden=!0},m(n,d){C(n,t,d),V(t,e[0]),C(n,i,d),be(o,n,d),C(n,r,d),be(l,n,d),s=!0,a||(c=D(t,"input",e[9]),a=!0)},p(e,[i]){(!s||12&i&&n!==(n=e[2]||e[3]))&&A(t,"class",n),(!s||2&i)&&A(t,"id",e[1]),(!s||2&i)&&A(t,"name",e[1]),1&i&&V(t,e[0]);const r={};1&i&&(r.value=e[0]),o.$set(r);const a={};1&i&&(a.value=e[0]),4096&i&&(a.$$scope={dirty:i,ctx:e}),l.$set(a)},i(e){s||(fe(o.$$.fragment,e),fe(l.$$.fragment,e),s=!0)},o(e){pe(o.$$.fragment,e),pe(l.$$.fragment,e),s=!1},d(e){e&&S(t),e&&S(i),we(o,e),e&&S(r),we(l,e),a=!1,c()}}}function cr(e,t,n){const i=Y(),{Label:o,DatePicker:r,TimePicker:l}=c;let{value:s}=t,{id:a}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>i("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,o,r,l,({detail:e})=>{var t,i;n(0,(t=e.value,i=s,s=null==t||null==i?t:(i.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),i))),m(s)},({detail:e})=>{n(0,s=jn(e.value,s)),m(s)},function(){s=this.value,n(0,s)}]}class dr extends ke{constructor(e){super(),xe(this,e,cr,ar,x,{value:0,id:1,noForm:2,classId:3})}}function ur(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p,$,h;return u=new e[9]({props:{format:e[5],required:e[3],disabled:e[4],value:e[7],closeOnSelection:!0}}),u.$on("change",e[10]),f=new e[9]({props:{format:e[6],required:e[3],disabled:e[4],value:e[8],class:"moveLeft",closeOnSelection:!0}}),f.$on("change",e[11]),{c(){t=q("input"),r=L(),l=q("input"),d=L(),ye(u.$$.fragment),m=E(" /\n"),ye(f.$$.fragment),A(t,"type","string"),A(t,"class",n=e[1]||e[2]),A(t,"id",i=e[0]+"_from"),A(t,"name",o=e[0]+"_from"),t.hidden=!0,A(l,"type","string"),A(l,"class",s=e[1]||e[2]),A(l,"id",a=e[0]+"_to"),A(l,"name",c=e[0]+"_to"),l.hidden=!0},m(n,i){C(n,t,i),V(t,e[7]),C(n,r,i),C(n,l,i),V(l,e[8]),C(n,d,i),be(u,n,i),C(n,m,i),be(f,n,i),p=!0,$||(h=[D(t,"input",e[13]),D(l,"input",e[14])],$=!0)},p(e,[r]){(!p||6&r&&n!==(n=e[1]||e[2]))&&A(t,"class",n),(!p||1&r&&i!==(i=e[0]+"_from"))&&A(t,"id",i),(!p||1&r&&o!==(o=e[0]+"_from"))&&A(t,"name",o),128&r&&V(t,e[7]),(!p||6&r&&s!==(s=e[1]||e[2]))&&A(l,"class",s),(!p||1&r&&a!==(a=e[0]+"_to"))&&A(l,"id",a),(!p||1&r&&c!==(c=e[0]+"_to"))&&A(l,"name",c),256&r&&V(l,e[8]);const d={};32&r&&(d.format=e[5]),8&r&&(d.required=e[3]),16&r&&(d.disabled=e[4]),128&r&&(d.value=e[7]),u.$set(d);const m={};64&r&&(m.format=e[6]),8&r&&(m.required=e[3]),16&r&&(m.disabled=e[4]),256&r&&(m.value=e[8]),f.$set(m)},i(e){p||(fe(u.$$.fragment,e),fe(f.$$.fragment,e),p=!0)},o(e){pe(u.$$.fragment,e),pe(f.$$.fragment,e),p=!1},d(e){e&&S(t),e&&S(r),e&&S(l),e&&S(d),we(u,e),e&&S(m),we(f,e),$=!1,b(h)}}}function mr(e,t,n){const i=Y(),{DatePicker:o}=c;let{value:r}=t,{id:l}=t,{noForm:s=!1}=t,{classId:a}=t,{required:d}=t,{disabled:u}=t,m="%d.%m.%Y",f="%d.%m.%Y",p=r?.from,$=r?.to;"Invalid Date"===p?.toString()&&(p=void 0),"Invalid Date"===$?.toString()&&($=void 0),u&&(void 0===p&&(m=""),void 0===$&&(f=""));return e.$$set=e=>{"value"in e&&n(12,r=e.value),"id"in e&&n(0,l=e.id),"noForm"in e&&n(1,s=e.noForm),"classId"in e&&n(2,a=e.classId),"required"in e&&n(3,d=e.required),"disabled"in e&&n(4,u=e.disabled)},[l,s,a,d,u,m,f,p,$,o,({detail:e})=>{n(7,p=jn(e.value,p)),$&&p&&$.valueOf()-p.valueOf()<0&&n(7,p=void 0),i("change",{value:p,range:"_from"})},({detail:e})=>{n(8,$=jn(e.value,$)),$&&p&&$.valueOf()-p.valueOf()<0&&n(8,$=void 0),i("change",{value:$,range:"_to"})},r,function(){p=this.value,n(7,p)},function(){$=this.value,n(8,$)}]}class fr extends ke{constructor(e){var t;super(),document.getElementById("svelte-7itxk4-style")||((t=q("style")).id="svelte-7itxk4-style",t.textContent="div.date-picker.moveLeft div.dropdown.calendar{left:-3em !important}",_(document.head,t)),xe(this,e,mr,ur,x,{value:12,id:0,noForm:1,classId:2,required:3,disabled:4})}}function pr(e){let t,n,i;return n=new e[5]({props:{type:"string",inputClass:e[2],id:e[0],name:e[0],value:e[1],pattern:$r,placeholder:hr,readonly:e[3],disabled:e[4]}}),n.$on("change",e[6]),{c(){t=q("div"),ye(n.$$.fragment),O(t,"max-width","4em")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p(e,[t]){const i={};4&t&&(i.inputClass=e[2]),1&t&&(i.id=e[0]),1&t&&(i.name=e[0]),2&t&&(i.value=e[1]),8&t&&(i.readonly=e[3]),16&t&&(i.disabled=e[4]),n.$set(i)},i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}const $r="([01][0-9]|2[0-3]):([0-5][0-9])",hr="";function gr(e,t,n){const i=Y(),{TextField:o}=c;let{id:r}=t,{item:l}=t,{value:s}=t,{inputClass:a}=t,{readonly:d}=t,{disabled:u}=t,{praefix:m}=t;const f=e=>{if(!e)return"";const[t,n]=e.split(":");return 4===t.length?`${t.substr(0,2)}:${t.substring(2,4)}`:3===t.length?t.substring(0,2)>23?`0${t.substring(0,1)}:${t.substring(1,3)}`:`${t.substring(0,2)}:${t.substring(2,3)}0`:2===t.length?t>23?`0${t.substring(0,1)}:${t.substring(1,2)}0`:`${t}:${(n||"0").padStart(2,"0")}`:`0${t}:${(n||"0").padStart(2,"0")}`};return e.$$set=e=>{"id"in e&&n(0,r=e.id),"item"in e&&n(7,l=e.item),"value"in e&&n(1,s=e.value),"inputClass"in e&&n(2,a=e.inputClass),"readonly"in e&&n(3,d=e.readonly),"disabled"in e&&n(4,u=e.disabled),"praefix"in e&&n(8,m=e.praefix)},[r,s,a,d,u,o,({detail:e})=>{i("blur",{value:f(e.value)}),i("checkRange",{idx:m,fieldId:r,value:e.value})},l,m]}class vr extends ke{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=q("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",_(document.head,t)),xe(this,e,gr,pr,x,{id:0,item:7,value:1,inputClass:2,readonly:3,disabled:4,praefix:8})}}const{document:yr}=ge;function br(e,t,n){const i=e.slice();return i[0]=t[n],i}function wr(e,t,n){const i=e.slice();return i[17]=t[n],i[19]=n,i}function xr(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function kr(e){let t,n,i=e[14],o=[];for(let t=0;t<i.length;t+=1)o[t]=_r(br(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(14&n){let l;for(i=e[14],l=0;l<i.length;l+=1){const r=br(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=_r(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}function Ir(e){let t,n,i=(e[0]["_"+e[17]]||e[0][e[17]])+"",o=e[19]&&function(e){let t;return{c(){t=E(", ")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}();return{c(){t=q("span"),o&&o.c(),n=E(i),A(t,"class","lookupValue")},m(e,i){C(e,t,i),o&&o.m(t,null),_(t,n)},p(e,t){2&t&&i!==(i=(e[0]["_"+e[17]]||e[0][e[17]])+"")&&B(n,i)},d(e){e&&S(t),o&&o.d()}}}function _r(e){let t,n,i,o,r,l,s,a,c=e[1],d=[];for(let t=0;t<c.length;t+=1)d[t]=Ir(wr(e,c,t));return o=new Me({props:{size:"18"}}),{c(){t=q("div");for(let e=0;e<d.length;e+=1)d[e].c();n=L(),i=q("span"),ye(o.$$.fragment),r=L(),A(i,"class","feather pointer svelte-1u646ni"),A(t,"class","lookupItem svelte-1u646ni")},m(c,u){C(c,t,u);for(let e=0;e<d.length;e+=1)d[e].m(t,null);_(t,n),_(t,i),be(o,i,null),_(t,r),l=!0,s||(a=D(i,"click",e[3](e[0]._id)),s=!0)},p(i,o){if(e=i,6&o){let i;for(c=e[1],i=0;i<c.length;i+=1){const r=wr(e,c,i);d[i]?d[i].p(r,o):(d[i]=Ir(r),d[i].c(),d[i].m(t,n))}for(;i<d.length;i+=1)d[i].d(1);d.length=c.length}},i(e){l||(fe(o.$$.fragment,e),l=!0)},o(e){pe(o.$$.fragment,e),l=!1},d(e){e&&S(t),j(d,e),we(o),s=!1,a()}}}function Cr(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Sr(e){let t,n,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Cr,then:kr,catch:xr,value:14,blocks:[,,,]};return $e(e[2](),i),{c(){t=q("div"),i.block.c(),A(t,"class","lookup svelte-1u646ni")},m(e,o){C(e,t,o),i.block.m(t,i.anchor=null),i.mount=()=>t,i.anchor=null,n=!0},p(t,[n]){he(i,e=t,n)},i(e){n||(fe(i.block),n=!0)},o(e){for(let e=0;e<3;e+=1){pe(i.blocks[e])}n=!1},d(e){e&&S(t),i.block.d(),i.token=null,i=null}}}function jr(e,n,i){let{id:o}=n,{item:r}=n,{praefix:l}=n,{record:s}=n;const{refItem:a,view:c}=r.properties;let d=c.split(","),[u,m]=a.split(":");const[f,p]=m.split("."),$=()=>{ne().then((()=>{const e=document.querySelector("div.form-field."+r.name);e&&(e.style.display="none")}))};return e.$$set=e=>{"id"in e&&i(4,o=e.id),"item"in e&&i(0,r=e.item),"praefix"in e&&i(5,l=e.praefix),"record"in e&&i(6,s=e.record)},[r,d,async()=>{let e=[];if(s._id){const n=!d.some((e=>e.includes(":")));p&&(u=p+"."+u);const o={[u]:s[u]||s._id};if(e=await t.getSectionView(f,o,n),!n){const t=d.find((e=>e.includes(":"))).split(":")[0];e=e.map((e=>{const n=e[t].find((e=>e[t]===s._id));return n._id=e._id,n})),i(1,d=d.map((e=>e.split(":")[1])))}}return e.length||$(),e},e=>async()=>{const n=await t.getTaskByDocId(e);if(!n)return;const i=n._id,o=`/task/${n.event}/${i}/task?view=standalone`;window.open(o)},o,l,s]}class qr extends ke{constructor(e){var t;super(),yr.getElementById("svelte-1u646ni-style")||((t=q("style")).id="svelte-1u646ni-style",t.textContent=".feather.svelte-1u646ni{position:absolute;top:0;left:-1.5em;color:#4300b0}div.lookup.svelte-1u646ni{margin-top:0.75em;color:#aaa}div.lookupItem.svelte-1u646ni{position:relative;margin-left:2em}div.form-field:has(div.lookup){margin-bottom:0.5em !important}div.field:has(div.lookupItem){background-color:#f5f5f5 !important}",_(yr.head,t)),xe(this,e,jr,Sr,x,{id:4,item:0,praefix:5,record:6})}}function Nr(e){let t,n,i;return n=new Ke({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Er(e){let t,n,i,o,r;return n=new Ke({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-9up2nn")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[9]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Lr(e){let t,n,i,o,r,l;n=new e[8]({props:{inputClass:e[0],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[12]);const s=[Er,Nr],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=s[o](e),{c(){t=q("div"),ye(n.$$.fragment),i=L(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),be(n,t,null),_(t,i),a[o].m(t,null),l=!0},p(e,[i]){const l={};1&i&&(l.inputClass=e[0]),2&i&&(l.disabled=e[1]),4&i&&(l.formnovalidate=e[2]),8&i&&(l.readonly=e[3]),16&i&&(l.required=e[4]),32&i&&(l.id=e[5]),64&i&&(l.name=e[6]),128&i&&(l.value=e[7]),n.$set(l);let d=o;o=c(e),o===d?a[o].p(e,i):(ue(),pe(a[d],1,1,(()=>{a[d]=null})),me(),r=a[o],r?r.p(e,i):(r=a[o]=s[o](e),r.c()),fe(r,1),r.m(t,null))},i(e){l||(fe(n.$$.fragment,e),fe(r),l=!0)},o(e){pe(n.$$.fragment,e),pe(r),l=!1},d(e){e&&S(t),we(n),a[o].d()}}}function Fr(e,n,i){const{TextField:o}=c;let{inputClass:r}=n,{disabled:l}=n,{formnovalidate:s}=n,{readonly:a}=n,{required:d}=n,{id:u}=n,{name:m}=n,{value:f}=n,{record:p}=n,{item:$}=n;return e.$$set=e=>{"inputClass"in e&&i(0,r=e.inputClass),"disabled"in e&&i(1,l=e.disabled),"formnovalidate"in e&&i(2,s=e.formnovalidate),"readonly"in e&&i(3,a=e.readonly),"required"in e&&i(4,d=e.required),"id"in e&&i(5,u=e.id),"name"in e&&i(6,m=e.name),"value"in e&&i(7,f=e.value),"record"in e&&i(10,p=e.record),"item"in e&&i(11,$=e.item)},[r,l,s,a,d,u,m,f,o,async()=>{if(!f)return;const e=m.includes(".")?p[m.split(".")[0]]:p,{street:n,houseNo:i,postcode:o,location:r,country:l}=e,s=[n&&i?n+" "+i:n,o&&r?o+" "+r:o||r||"",l&&(await t.getTask("country",l)).designation].filter((e=>!!e)).join(", "),a="https://bing.com/maps/default.aspx?where1="+encodeURIComponent(s);window.open(a,"_blank")},p,$,function(t){G(e,t)}]}class Dr extends ke{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=q("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",_(document.head,t)),xe(this,e,Fr,Lr,x,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,record:10,item:11})}}function zr(e){let t,n,i;return n=new Pe({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Tr(e){let t,n,i,o,r;return n=new Pe({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-9up2nn")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[9]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Ar(e){let t,n,i,o,r,l;n=new e[8]({props:{inputClass:e[0],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[10]);const s=[Tr,zr],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=s[o](e),{c(){t=q("div"),ye(n.$$.fragment),i=L(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),be(n,t,null),_(t,i),a[o].m(t,null),l=!0},p(e,[i]){const l={};1&i&&(l.inputClass=e[0]),2&i&&(l.disabled=e[1]),4&i&&(l.formnovalidate=e[2]),8&i&&(l.readonly=e[3]),16&i&&(l.required=e[4]),32&i&&(l.id=e[5]),64&i&&(l.name=e[6]),128&i&&(l.value=e[7]),n.$set(l);let d=o;o=c(e),o===d?a[o].p(e,i):(ue(),pe(a[d],1,1,(()=>{a[d]=null})),me(),r=a[o],r?r.p(e,i):(r=a[o]=s[o](e),r.c()),fe(r,1),r.m(t,null))},i(e){l||(fe(n.$$.fragment,e),fe(r),l=!0)},o(e){pe(n.$$.fragment,e),pe(r),l=!1},d(e){e&&S(t),we(n),a[o].d()}}}function Br(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:l}=t,{readonly:s}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t;return e.$$set=e=>{"inputClass"in e&&n(0,o=e.inputClass),"disabled"in e&&n(1,r=e.disabled),"formnovalidate"in e&&n(2,l=e.formnovalidate),"readonly"in e&&n(3,s=e.readonly),"required"in e&&n(4,a=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,m=e.value)},[o,r,l,s,a,d,u,m,i,async()=>{if(!m)return;let e=m;e.includes("//")||(e="//"+e),window.open(e,"_blank")},function(t){G(e,t)}]}class Vr extends ke{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=q("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",_(document.head,t)),xe(this,e,Br,Ar,x,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7})}}function Or(e){let t,n,i;return n=new Xe({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Mr(e){let t,n,i,o,r;return n=new Xe({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-9up2nn")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[11]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Wr(e){let t,n,i,o,r,l;n=new e[10]({props:{inputClass:e[2],pattern:e[0],placeholder:e[1],disabled:e[3],formnovalidate:e[4],readonly:e[5],required:e[6],id:e[7],name:e[8],value:e[9]}}),n.$on("change",e[12]);const s=[Mr,Or],a=[];function c(e,t){return e[9]?0:1}return o=c(e),r=a[o]=s[o](e),{c(){t=q("div"),ye(n.$$.fragment),i=L(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),be(n,t,null),_(t,i),a[o].m(t,null),l=!0},p(e,[i]){const l={};4&i&&(l.inputClass=e[2]),1&i&&(l.pattern=e[0]),2&i&&(l.placeholder=e[1]),8&i&&(l.disabled=e[3]),16&i&&(l.formnovalidate=e[4]),32&i&&(l.readonly=e[5]),64&i&&(l.required=e[6]),128&i&&(l.id=e[7]),256&i&&(l.name=e[8]),512&i&&(l.value=e[9]),n.$set(l);let d=o;o=c(e),o===d?a[o].p(e,i):(ue(),pe(a[d],1,1,(()=>{a[d]=null})),me(),r=a[o],r?r.p(e,i):(r=a[o]=s[o](e),r.c()),fe(r,1),r.m(t,null))},i(e){l||(fe(n.$$.fragment,e),fe(r),l=!0)},o(e){pe(n.$$.fragment,e),pe(r),l=!1},d(e){e&&S(t),we(n),a[o].d()}}}function Rr(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:l}=t,{readonly:s}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t,{pattern:f}=t,{placeholder:p}=t;f||="(\\+4[1-9]\\s?)([1-9]{2}\\s?\\d{3}\\s?\\d{2}\\s?\\d{2})|(\\d{2,4}\\s?\\d{3}\\s?\\d{2}\\s?\\d{2})",p||="+41 58 234 56 78";return e.$$set=e=>{"inputClass"in e&&n(2,o=e.inputClass),"disabled"in e&&n(3,r=e.disabled),"formnovalidate"in e&&n(4,l=e.formnovalidate),"readonly"in e&&n(5,s=e.readonly),"required"in e&&n(6,a=e.required),"id"in e&&n(7,d=e.id),"name"in e&&n(8,u=e.name),"value"in e&&n(9,m=e.value),"pattern"in e&&n(0,f=e.pattern),"placeholder"in e&&n(1,p=e.placeholder)},[f,p,o,r,l,s,a,d,u,m,i,async()=>{if(!m)return;let e="tel:"+m;window.open(e,"_self")},function(t){G(e,t)}]}class Pr extends ke{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=q("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",_(document.head,t)),xe(this,e,Rr,Wr,x,{inputClass:2,disabled:3,formnovalidate:4,readonly:5,required:6,id:7,name:8,value:9,pattern:0,placeholder:1})}}function Hr(e){let t,n,i;return n=new Ye({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Qr(e){let t,n,i,o,r;return n=new Ye({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-9up2nn")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[11]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Yr(e){let t,n,i,o,r,l;n=new e[10]({props:{type:"email",inputClass:e[0],pattern:e[8],placeholder:e[9],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[12]);const s=[Qr,Hr],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=s[o](e),{c(){t=q("div"),ye(n.$$.fragment),i=L(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),be(n,t,null),_(t,i),a[o].m(t,null),l=!0},p(e,[i]){const l={};1&i&&(l.inputClass=e[0]),256&i&&(l.pattern=e[8]),512&i&&(l.placeholder=e[9]),2&i&&(l.disabled=e[1]),4&i&&(l.formnovalidate=e[2]),8&i&&(l.readonly=e[3]),16&i&&(l.required=e[4]),32&i&&(l.id=e[5]),64&i&&(l.name=e[6]),128&i&&(l.value=e[7]),n.$set(l);let d=o;o=c(e),o===d?a[o].p(e,i):(ue(),pe(a[d],1,1,(()=>{a[d]=null})),me(),r=a[o],r?r.p(e,i):(r=a[o]=s[o](e),r.c()),fe(r,1),r.m(t,null))},i(e){l||(fe(n.$$.fragment,e),fe(r),l=!0)},o(e){pe(n.$$.fragment,e),pe(r),l=!1},d(e){e&&S(t),we(n),a[o].d()}}}function Gr(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:l}=t,{readonly:s}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t,{pattern:f}=t,{placeholder:p}=t;return e.$$set=e=>{"inputClass"in e&&n(0,o=e.inputClass),"disabled"in e&&n(1,r=e.disabled),"formnovalidate"in e&&n(2,l=e.formnovalidate),"readonly"in e&&n(3,s=e.readonly),"required"in e&&n(4,a=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,m=e.value),"pattern"in e&&n(8,f=e.pattern),"placeholder"in e&&n(9,p=e.placeholder)},[o,r,l,s,a,d,u,m,f,p,i,async()=>{if(!m)return;let e="mailto:"+m;window.open(e,"_self")},function(t){G(e,t)}]}class Ur extends ke{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=q("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",_(document.head,t)),xe(this,e,Gr,Yr,x,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,pattern:8,placeholder:9})}}const Kr=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"];function Jr(e){let t;return{c(){t=q("textarea"),A(t,"id",e[0]),O(t,"visibility","hidden")},m(n,i){C(n,t,i),e[18](t)},p(e,n){1&n&&A(t,"id",e[0])},d(n){n&&S(t),e[18](null)}}}function Zr(e){let t;return{c(){t=q("div"),A(t,"id",e[0])},m(n,i){C(n,t,i),e[17](t)},p(e,n){1&n&&A(t,"id",e[0])},d(n){n&&S(t),e[17](null)}}}function Xr(e){let t;function n(e,t){return e[1]?Zr:Jr}let i=n(e),o=i(e);return{c(){t=q("div"),o.c(),A(t,"class",e[2])},m(n,i){C(n,t,i),o.m(t,null),e[19](t)},p(e,[r]){i===(i=n(e))&&o?o.p(e,r):(o.d(1),o=i(e),o&&(o.c(),o.m(t,null))),4&r&&A(t,"class",e[2])},i:g,o:g,d(n){n&&S(t),o.d(),e[19](null)}}}const el=e=>e+"_"+Math.floor(1e9*Math.random())+String(Date.now());let tl=(()=>{let e={listeners:[],scriptId:el("tiny-script"),scriptLoaded:!1,injected:!1};return{load:(t,n,i)=>{e.scriptLoaded?i():(e.listeners.push(i),e.injected||((t,n,i,o)=>{e.injected=!0;const r=n.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=i,r.onload=()=>{o()},n.head&&n.head.appendChild(r)})(e.scriptId,t,n,(()=>{e.listeners.forEach((e=>e())),e.scriptLoaded=!0})))}}})();function nl(e,t,n){var i;let o,r,l,{id:s=el("tinymce-svelte")}=t,{inline:a}=t,{disabled:c=!1}=t,{apiKey:d="no-api-key"}=t,{channel:u="6"}=t,{scriptSrc:m}=t,{conf:f={}}=t,{modelEvents:p="change input undo redo"}=t,{value:$=""}=t,{text:h=""}=t,{cssClass:g="tinymce-wrapper"}=t,v=$,y=c;const b=Y(),w=()=>{const e="undefined"!=typeof window?window:global;return e&&e.tinymce?e.tinymce:null},x=()=>{const e=Object.assign(Object.assign({},f),{target:r,inline:void 0!==a?a:void 0!==f.inline&&f.inline,readonly:c,setup:e=>{n(14,l=e),e.on("init",(()=>{e.setContent($),e.on(p,(()=>{n(15,v=e.getContent()),v!==$&&(n(5,$=v),n(6,h=e.getContent({format:"text"})))}))})),((e,t)=>{Kr.forEach((n=>{e.on(n,(i=>{t(n.toLowerCase(),{eventName:n,event:i,editor:e})}))}))})(e,b),"function"==typeof f.setup&&f.setup(e)}});n(4,r.style.visibility="",r),w().init(e)};return H((()=>{if(null!==w())x();else{const e=m||`https://cdn.tiny.cloud/1/${d}/tinymce/${u}/tinymce.min.js`;tl.load(o.ownerDocument,e,(()=>{x()}))}})),Q((()=>{var e;l&&(null===(e=w())||void 0===e||e.remove(l))})),e.$$set=e=>{"id"in e&&n(0,s=e.id),"inline"in e&&n(1,a=e.inline),"disabled"in e&&n(7,c=e.disabled),"apiKey"in e&&n(8,d=e.apiKey),"channel"in e&&n(9,u=e.channel),"scriptSrc"in e&&n(10,m=e.scriptSrc),"conf"in e&&n(11,f=e.conf),"modelEvents"in e&&n(12,p=e.modelEvents),"value"in e&&n(5,$=e.value),"text"in e&&n(6,h=e.text),"cssClass"in e&&n(2,g=e.cssClass)},e.$$.update=()=>{123040&e.$$.dirty&&(l&&v!==$&&(l.setContent($),n(6,h=l.getContent({format:"text"}))),l&&c!==y&&(n(16,y=c),"function"==typeof(null===n(13,i=l.mode)||void 0===i?void 0:i.set)?l.mode.set(c?"readonly":"design"):l.setMode(c?"readonly":"design")))},[s,a,g,o,r,$,h,c,d,u,m,f,p,i,l,v,y,function(e){K[e?"unshift":"push"]((()=>{r=e,n(4,r)}))},function(e){K[e?"unshift":"push"]((()=>{r=e,n(4,r)}))},function(e){K[e?"unshift":"push"]((()=>{o=e,n(3,o)}))}]}class il extends ke{constructor(e){super(),xe(this,e,nl,Xr,x,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function ol(e){let t,n,i,o,r,l,s;function a(t){e[7](t)}let c={apiKey:"fdzr5donqxlwonl0pkqm8pcogxwbbrjco9jzw0suy9mxu17n",conf:e[6],disabled:e[4],readonly:e[5]};return void 0!==e[0]&&(c.value=e[0]),n=new il({props:c}),K.push((()=>ve(n,"value",a))),{c(){t=q("div"),ye(n.$$.fragment),o=L(),r=q("input"),A(r,"class",l=e[1]||e[2]),A(r,"id",e[3]),A(r,"name",e[3]),r.value=e[0],r.hidden=!0,O(t,"min-height","10em"),O(t,"margin-top","-1em")},m(e,i){C(e,t,i),be(n,t,null),_(t,o),_(t,r),s=!0},p(e,[t]){const o={};16&t&&(o.disabled=e[4]),32&t&&(o.readonly=e[5]),!i&&1&t&&(i=!0,o.value=e[0],oe((()=>i=!1))),n.$set(o),(!s||6&t&&l!==(l=e[1]||e[2]))&&A(r,"class",l),(!s||8&t)&&A(r,"id",e[3]),(!s||8&t)&&A(r,"name",e[3]),(!s||1&t&&r.value!==e[0])&&(r.value=e[0])},i(e){s||(fe(n.$$.fragment,e),s=!0)},o(e){pe(n.$$.fragment,e),s=!1},d(e){e&&S(t),we(n)}}}function rl(e,t,n){let i=JSON.parse(r.getItem("Locale")).id;i=i.startsWith("fr")?"fr_FR":i.split("-")[0];let{value:o}=t,{noForm:l}=t,{classId:s}=t,{id:a}=t,{disabled:c}=t,{readonly:d}=t;const u={plugins:"advlist numlist link image lists table preview emoticons fullscreen",menu:{file:{title:"File",items:"preview"}},menubar:"edit view insert format table",toolbar:"undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | fullscreen",height:600,language:i};return e.$$set=e=>{"value"in e&&n(0,o=e.value),"noForm"in e&&n(1,l=e.noForm),"classId"in e&&n(2,s=e.classId),"id"in e&&n(3,a=e.id),"disabled"in e&&n(4,c=e.disabled),"readonly"in e&&n(5,d=e.readonly)},[o,l,s,a,c,d,u,function(e){o=e,n(0,o)}]}class ll extends ke{constructor(e){var t;super(),document.getElementById("svelte-z42kzx-style")||((t=q("style")).id="svelte-z42kzx-style",t.textContent="div.tox-statusbar{display:none !important}div.tox.tox-tinymce{border:1px #808080 solid}.tox-edit-area__iframe{background-color:#f9f3f6 !important}",_(document.head,t)),xe(this,e,rl,ol,x,{value:0,noForm:1,classId:2,id:3,disabled:4,readonly:5})}}function sl(e){let t,n;return t=new e[24]({props:{id:e[39](e[32]),class:e[1].name+(e[20]?" hidden ":""),name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[jl,({notifyList:e})=>({18:e}),({notifyList:e})=>[e?262144:0]]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};1048578&n[0]&&(i.class=e[1].name+(e[20]?" hidden ":"")),2&n[0]&&(i.name=e[1].designation),2&n[0]&&(i.help=e[1].properties?.hint),13631487&n[0]|33554432&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function al(e){let t,n;return t=new e[28]({props:{text:e[1].designation}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};2&n[0]&&(i.text=e[1].designation),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function cl(e){let t,n,i,o;return t=new e[24]({props:{id:e[39](e[32]),class:e[1].name+(e[20]?" hidden ":""),name:e[1].designation,help:e[1].properties?.hint}}),i=new ll({props:{classId:e[7],disabled:e[3],readonly:e[19],id:e[32],name:e[1].name,value:e[22](),noForm:e[6]}}),i.$on("blur",e[35]()),{c(){ye(t.$$.fragment),n=L(),ye(i.$$.fragment)},m(e,r){be(t,e,r),C(e,n,r),be(i,e,r),o=!0},p(e,n){const o={};1048578&n[0]&&(o.class=e[1].name+(e[20]?" hidden ":"")),2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),t.$set(o);const r={};128&n[0]&&(r.classId=e[7]),8&n[0]&&(r.disabled=e[3]),524288&n[0]&&(r.readonly=e[19]),2&n[0]&&(r.name=e[1].name),4194304&n[0]&&(r.value=e[22]()),64&n[0]&&(r.noForm=e[6]),i.$set(r)},i(e){o||(fe(t.$$.fragment,e),fe(i.$$.fragment,e),o=!0)},o(e){pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!1},d(e){we(t,e),e&&S(n),we(i,e)}}}function dl(e){let t,n,i,o,r,l;return t=new e[24]({props:{id:e[39](e[32]),class:e[1].name+" hidden",name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[ql]},$$scope:{ctx:e}}}),i=new e[28]({props:{text:e[23]}}),r=new Ti({props:{required:e[4],disabled:e[3],readonly:e[19],id:e[32],item:e[1],value:e[22]()}}),r.$on("setRefValue",e[40]),r.$on("safeReference",e[44]),{c(){ye(t.$$.fragment),n=L(),ye(i.$$.fragment),o=L(),ye(r.$$.fragment)},m(e,s){be(t,e,s),C(e,n,s),be(i,e,s),C(e,o,s),be(r,e,s),l=!0},p(e,n){const o={};2&n[0]&&(o.class=e[1].name+" hidden"),2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),6291842&n[0]|33554432&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o);const l={};8388608&n[0]&&(l.text=e[23]),i.$set(l);const s={};16&n[0]&&(s.required=e[4]),8&n[0]&&(s.disabled=e[3]),524288&n[0]&&(s.readonly=e[19]),2&n[0]&&(s.item=e[1]),4194304&n[0]&&(s.value=e[22]()),r.$set(s)},i(e){l||(fe(t.$$.fragment,e),fe(i.$$.fragment,e),fe(r.$$.fragment,e),l=!0)},o(e){pe(t.$$.fragment,e),pe(i.$$.fragment,e),pe(r.$$.fragment,e),l=!1},d(e){we(t,e),e&&S(n),we(i,e),e&&S(o),we(r,e)}}}function ul(e){let t,n;return t=new e[25]({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],pattern:e[29],required:!0===e[4],placeholder:e[30],id:e[32],name:e[31],value:e[22]()}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=!0===e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function ml(e){let t,n;return t=new Pr({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],pattern:e[29],placeholder:e[30],value:e[22]()}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function fl(e){let t,n;return t=new Vr({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],value:e[22]()}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function pl(e){let t,n;return t=new Ur({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],pattern:e[29],placeholder:e[30],value:e[22]()}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function $l(e){let t,n;return t=new vr({props:{inputClass:e[6]||e[7],disabled:e[3],readonly:e[19],required:e[4],id:e[32],item:e[1],value:e[22](),praefix:e[5]}}),t.$on("blur",e[35]()),t.$on("checkRange",e[49]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),2&n[0]&&(i.item=e[1]),4194304&n[0]&&(i.value=e[22]()),32&n[0]&&(i.praefix=e[5]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function hl(e){let t,n;return t=new qr({props:{id:e[32],item:e[1],praefix:e[5],record:e[0]}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};2&n[0]&&(i.item=e[1]),32&n[0]&&(i.praefix=e[5]),1&n[0]&&(i.record=e[0]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function gl(e){let t,n;return t=new Dr({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],value:e[22](),record:e[0],item:e[1]}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),1&n[0]&&(i.record=e[0]),2&n[0]&&(i.item=e[1]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function vl(e){let t,n;return t=new dr({props:{classId:e[7],id:e[32],disabled:e[3],required:e[4],value:e[33](),noForm:e[6]}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function yl(e){let t,n;return t=new fr({props:{classId:e[7],id:e[32],disabled:e[3],required:e[4],value:e[34](),noForm:e[6]}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function bl(e){let t,n;return t=new e[26]({props:{inputClass:e[6]||e[7],required:e[4],disabled:e[3],id:e[32],name:e[31],value:e[33](),closeOnSelection:!0}}),t.$on("change",e[35](!0)),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),16&n[0]&&(i.required=e[4]),8&n[0]&&(i.disabled=e[3]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function wl(e){let t,n;return t=new e[27]({props:{round:!0,inputClass:e[6]||e[7],disabled:e[3]||e[19],required:e[4],id:e[32],name:e[31],checked:e[22]()}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),524296&n[0]&&(i.disabled=e[3]||e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.checked=e[22]()),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function xl(e){let t,n;return t=new Go({props:{classId:e[7],disabled:e[3],required:e[4],id:e[32],item:e[1],record:e[0],value:e[22](),noForm:e[6],view:e[1].properties.view,praefix:e[5]}}),t.$on("blur",e[35]()),t.$on("invalid",e[48]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),2&n[0]&&(i.item=e[1]),1&n[0]&&(i.record=e[0]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),2&n[0]&&(i.view=e[1].properties.view),32&n[0]&&(i.praefix=e[5]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function kl(e){let t,n;return t=new xo({props:{classId:e[7],disabled:e[3],required:e[4],id:e[32],item:e[1],record:e[0],value:e[22](),noForm:e[6],multi:e[1].properties.multi,numberInput:e[12],praefix:e[5],toDelete:e[15],reqQuantity:e[16],notifyList:e[18]}}),t.$on("blur",e[35]()),t.$on("invalid",e[47]),t.$on("record",e[36]),t.$on("multi",e[37]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),2&n[0]&&(i.item=e[1]),1&n[0]&&(i.record=e[0]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),2&n[0]&&(i.multi=e[1].properties.multi),4096&n[0]&&(i.numberInput=e[12]),32&n[0]&&(i.praefix=e[5]),32768&n[0]&&(i.toDelete=e[15]),65536&n[0]&&(i.reqQuantity=e[16]),262144&n[0]&&(i.notifyList=e[18]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Il(e){let t,n;return t=new Oi({props:{classId:e[7],disabled:e[3],formnovalidate:e[10],required:e[4],readonly:e[19],id:e[32],item:e[1],currency:e[17],value:e[22](),noForm:e[6]}}),t.$on("blur",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),16&n[0]&&(i.required=e[4]),524288&n[0]&&(i.readonly=e[19]),2&n[0]&&(i.item=e[1]),131072&n[0]&&(i.currency=e[17]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function _l(e){let t,n;return t=new tr({props:{classId:e[7],disabled:e[3],required:e[4],id:e[32],item:e[1],value:e[22](),noForm:e[6]}}),t.$on("blur",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),2&n[0]&&(i.item=e[1]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Cl(e){let t,n;return t=new o({props:{classId:e[7],disabled:e[3],readonly:e[19],id:e[32],name:e[1].name,value:e[22](),noForm:e[6],placeholder:e[1].properties?.placeholder}}),t.$on("blur",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),524288&n[0]&&(i.readonly=e[19]),2&n[0]&&(i.name=e[1].name),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),2&n[0]&&(i.placeholder=e[1].properties?.placeholder),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Sl(e){let t,n;return t=new In({props:{classId:e[7],eventId:e[8],required:e[4],disabled:e[3],formnovalidate:e[10],readonly:e[19],id:e[32],item:e[1],desc:e[23],value:e[22](),noForm:e[6],praefix:e[5],selectionFields:e[9],selection:e[11],deList:e[13],recordId:e[2],isTemplate:e[14]}}),t.$on("task",e[45]),t.$on("change",e[35]()),t.$on("initFail",e[38]),t.$on("defPrep",e[46]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),256&n[0]&&(i.eventId=e[8]),16&n[0]&&(i.required=e[4]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),2&n[0]&&(i.item=e[1]),8388608&n[0]&&(i.desc=e[23]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),32&n[0]&&(i.praefix=e[5]),512&n[0]&&(i.selectionFields=e[9]),2048&n[0]&&(i.selection=e[11]),8192&n[0]&&(i.deList=e[13]),4&n[0]&&(i.recordId=e[2]),16384&n[0]&&(i.isTemplate=e[14]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function jl(e){let t,n,i,o;const r=[Sl,Cl,_l,Il,kl,xl,wl,bl,yl,vl,gl,hl,$l,pl,fl,ml,ul],l=[];function s(e,t){return"object"===e[1].type?0:"textarea"===e[1].type||e[1].properties&&"textarea"===e[1].properties.format?1:e[1].properties&&(e[1].properties.enum||e[1].properties.regulation)?2:"number"===e[1].type?3:e[1].properties&&e[1].properties.multi?4:e[1].properties&&e[1].properties.view&&"lookup"===!e[1].properties.format?5:"boolean"===e[1].type?6:"date"===e[1].type?7:"dateRange"===e[1].type?8:"datetime"===e[1].type?9:"map"===e[1].properties?.format?10:"lookup"===e[1].properties?.format?11:"time"===e[1].properties?.format?12:"email"===e[1].type||"email"===e[1].properties?.format?13:"url"===e[1].properties?.format?14:"tel"===e[1].properties?.format?15:16}return t=s(e),n=l[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){l[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=s(e),t===a?l[t].p(e,o):(ue(),pe(l[a],1,1,(()=>{l[a]=null})),me(),n=l[t],n?n.p(e,o):(n=l[t]=r[t](e),n.c()),fe(n,1),n.m(i.parentNode,i))},i(e){o||(fe(n),o=!0)},o(e){pe(n),o=!1},d(e){l[t].d(e),e&&S(i)}}}function ql(e){let t,n;return t=new In({props:{classId:e[7],eventId:e[8],disabled:!0,readonly:!0,id:e[32],item:e[1],value:e[22](),withRefValue:!0,refValue:e[21]}}),t.$on("setRefDesc",e[41]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),256&n[0]&&(i.eventId=e[8]),2&n[0]&&(i.item=e[1]),4194304&n[0]&&(i.value=e[22]()),2097152&n[0]&&(i.refValue=e[21]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Nl(e){let t,n,i,o;const r=[dl,cl,al,sl],l=[];function s(e,t){return e[5]||"reference"!==e[1].saveAs||"object"!==e[1].type?"html"===e[1].properties?.format?1:"divider"===e[1].type?2:3:0}return t=s(e),n=l[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){l[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=s(e),t===a?l[t].p(e,o):(ue(),pe(l[a],1,1,(()=>{l[a]=null})),me(),n=l[t],n?n.p(e,o):(n=l[t]=r[t](e),n.c()),fe(n,1),n.m(i.parentNode,i))},i(e){o||(fe(n),o=!0)},o(e){pe(n),o=!1},d(e){l[t].d(e),e&&S(i)}}}function El(e,t,n){let i,o,r;const l=Y(),{FormField:s,TextField:a,DatePicker:d,TimePicker:u,Checkbox:m,Divider:p}=c;let{praefix:$=""}=t,{item:h}=t,{listName:g=""}=t,{record:v}=t,{recordId:y}=t,{noForm:b=!1}=t,{classId:w}=t,{eventId:x}=t,{disabled:k}=t,{selectionFields:I}=t,{formnovalidate:_}=t,{selection:C=!1}=t,{notifyList:S}=t,{numberInput:j}=t,{deList:q}=t,{required:N}=t,{isTemplate:E}=t,{toDelete:L}=t,{reqQuantity:F}=t,{currency:D}=t,{changeValue:z}=t;y||=v._id;let{required:T,readonly:A,hidden:B,pattern:V,placeholder:O}=h.properties||{};if(B=!0===B,void 0!==A&&(A=!0===A),void 0===N&&(N=T),k=k||!!A,"string"==typeof h.name){const[e,t]=h.name.split("_");t&&(h.name=t)}const M=(g?g+".":"")+h.name,W=M+(""!==$?"-"+$:""),R=(e,t=M)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};let P=R(v);return e.$$set=e=>{"praefix"in e&&n(5,$=e.praefix),"item"in e&&n(1,h=e.item),"listName"in e&&n(42,g=e.listName),"record"in e&&n(0,v=e.record),"recordId"in e&&n(2,y=e.recordId),"noForm"in e&&n(6,b=e.noForm),"classId"in e&&n(7,w=e.classId),"eventId"in e&&n(8,x=e.eventId),"disabled"in e&&n(3,k=e.disabled),"selectionFields"in e&&n(9,I=e.selectionFields),"formnovalidate"in e&&n(10,_=e.formnovalidate),"selection"in e&&n(11,C=e.selection),"notifyList"in e&&n(18,S=e.notifyList),"numberInput"in e&&n(12,j=e.numberInput),"deList"in e&&n(13,q=e.deList),"required"in e&&n(4,N=e.required),"isTemplate"in e&&n(14,E=e.isTemplate),"toDelete"in e&&n(15,L=e.toDelete),"reqQuantity"in e&&n(16,F=e.reqQuantity),"currency"in e&&n(17,D=e.currency),"changeValue"in e&&n(43,z=e.changeValue)},e.$$.update=()=>{if(4096&e.$$.dirty[1])for(const e in z)e===M&&n(0,v[M]=z[e],v);1&e.$$.dirty[0]&&n(22,i=(e=M)=>{let t=R(v);return void 0===t?"":t}),1&e.$$.dirty[0]&&(r=R(v))},n(23,o=((e=M)=>{let t=v["_"+e];return t=f(t),void 0===t?"":t})()),[v,h,y,k,N,$,b,w,x,I,_,C,j,q,E,L,F,D,S,A,B,P,i,o,s,a,d,m,p,V,O,M,W,(e=M)=>{let t=R(v);return t?new Date(t):new Date},(e=M)=>{const t=R(v,e+"_from"),n=R(v,e+"_to");return{from:void 0===t?t:new Date(t),to:void 0===n?n:new Date(n)}},e=>({detail:t})=>{let{value:i,checked:o,range:s}=t;void 0!==o&&(i=o);const a=M+(s||"");n(0,v[a]=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("%%","%")}(i,"%d.%m.%Y"):i,v);const c=Object.values(v).every((e=>!e))&&i;l("notify",{oldValue:r,value:i,add:c,itemName:a,desc:t.description})},({detail:e})=>{l("record",e)},({detail:e})=>{l("multi",e)},()=>n(20,B=!0),()=>"object"===h.type?"comment_"+W:W,({detail:e})=>{n(21,P=e)},({detail:e})=>{const{designation:t}=h;n(23,o=t+": "+(e||"(Neu)"))},g,z,function(t){G(e,t)},function(t){G(e,t)},function(t){G(e,t)},function(t){G(e,t)},function(t){G(e,t)},function(t){G(e,t)}]}class Ll extends ke{constructor(e){var t;super(),document.getElementById("svelte-zmu4lk-style")||((t=q("style")).id="svelte-zmu4lk-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em;color:black}.form-field div.field > label.checkbox{padding-top:0.5em}",_(document.head,t)),xe(this,e,El,Nl,x,{praefix:5,item:1,listName:42,record:0,recordId:2,noForm:6,classId:7,eventId:8,disabled:3,selectionFields:9,formnovalidate:10,selection:11,notifyList:18,numberInput:12,deList:13,required:4,isTemplate:14,toDelete:15,reqQuantity:16,currency:17,changeValue:43},[-1,-1])}}const{document:Fl}=ge;function Dl(e,t,n){const i=e.slice();return i[83]=t[n],i[85]=n,i}function zl(e,t,n){const i=e.slice();return i[92]=t[n],i}function Tl(e,t,n){const i=e.slice();return i[87]=t[n].title,i[88]=t[n].toDelete,i[89]=t[n].icon,i}function Al(e){let t,n;return t=new e[18]({props:{name:"Total Wochen",nameClass:"formField_italic",$$slots:{default:[Bl]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};2048&n[0]|4&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Bl(e){let t,n,i;function o(t){e[46](t)}let r={item:e[28],disabled:!0};return void 0!==e[11]&&(r.value=e[11]),t=new Oi({props:r}),K.push((()=>ve(t,"value",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};!n&&2048&i[0]&&(n=!0,o.value=e[11],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function Vl(e){let t,n;return t=new e[18]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[Ol]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};16384&n[0]|4&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Ol(e){let t,n,i;function o(t){e[47](t)}let r={item:e[26],disabled:!0};return void 0!==e[14]&&(r.value=e[14]),t=new Oi({props:r}),K.push((()=>ve(t,"value",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};!n&&16384&i[0]&&(n=!0,o.value=e[14],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function Ml(e){let t,n;return t=new e[18]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[Wl]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};1152&n[0]|4&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Wl(e){let t,n,i;function o(t){e[48](t)}let r={item:e[24],disabled:!0,currency:e[7]};return void 0!==e[10]&&(r.value=e[10]),t=new Oi({props:r}),K.push((()=>ve(t,"value",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};128&i[0]&&(o.currency=e[7]),!n&&1024&i[0]&&(n=!0,o.value=e[10],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function Rl(e){let t,n;return t=new e[21]({props:{class:e[15][e[85]],open:e[9]&&!e[1]&&0===e[85],$$slots:{handle:[Jl,({toggle:e,open:t})=>({86:e,9:t}),({toggle:e,open:t})=>[t?512:0,0,e?16777216:0]],default:[Yl,({toggle:e,open:t})=>({86:e,9:t}),({toggle:e,open:t})=>[t?512:0,0,e?16777216:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){w(e[42](e[85],e[82]))&&e[42](e[85],e[82]).apply(this,arguments)})),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(n,i){e=n;const o={};32768&i[0]&&(o.class=e[15][e[85]]),514&i[0]&&(o.open=e[9]&&!e[1]&&0===e[85]),209917&i[0]|16777216&i[2]|4&i[3]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Pl(e){let t,n;return t=new Ll({props:{praefix:e[85],item:e[92],eventId:e[6],record:e[83],recordId:e[4]._id,reqQuantity:e[2],notifyList:e[8],noForm:ns,classId:e[5],disabled:e[0],required:e[22],selectionFields:e[29],numberInput:e[17],currency:e[7],formnovalidate:e[85]===e[12].length-1||e[12][e[85]]._delete}}),t.$on("notify",(function(){w(e[31](e[92],e[85]))&&e[31](e[92],e[85]).apply(this,arguments)})),t.$on("task",e[49]),t.$on("invalid",e[32]),t.$on("defPrep",e[33]),t.$on("checkRange",e[34]),t.$on("record",e[50]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(n,i){e=n;const o={};8&i[0]&&(o.item=e[92]),64&i[0]&&(o.eventId=e[6]),4096&i[0]&&(o.record=e[83]),16&i[0]&&(o.recordId=e[4]._id),4&i[0]&&(o.reqQuantity=e[2]),256&i[0]&&(o.notifyList=e[8]),32&i[0]&&(o.classId=e[5]),1&i[0]&&(o.disabled=e[0]),131072&i[0]&&(o.numberInput=e[17]),128&i[0]&&(o.currency=e[7]),4096&i[0]&&(o.formnovalidate=e[85]===e[12].length-1||e[12][e[85]]._delete),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Hl(e){let t,n,i=e[3].item,o=[];for(let t=0;t<i.length;t+=1)o[t]=Pl(zl(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(541200893&n[0]|15&n[1]){let l;for(i=e[3].item,l=0;l<i.length;l+=1){const r=zl(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=Pl(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}function Ql(e){let t,n,i=e[12][e[85]]._delete,o=Hl(e);return{c(){o.c(),t=F()},m(e,i){o.m(e,i),C(e,t,i),n=!0},p(e,n){4096&n[0]&&x(i,i=e[12][e[85]]._delete)?(ue(),pe(o,1,1,g),me(),o=Hl(e),o.c(),fe(o),o.m(t.parentNode,t)):o.p(e,n)},i(e){n||(fe(o),n=!0)},o(e){pe(o),n=!1},d(e){e&&S(t),o.d(e)}}}function Yl(e){let t,n,i,o,r=e[12].length,l=Ql(e);return{c(){t=q("div"),l.c(),i=L(),A(t,"id",n=`accordion-content-${e[5]}-${e[3].name}-${e[85]}`)},m(e,n){C(e,t,n),l.m(t,null),C(e,i,n),o=!0},p(e,i){4096&i[0]&&x(r,r=e[12].length)?(ue(),pe(l,1,1,g),me(),l=Ql(e),l.c(),fe(l),l.m(t,null)):l.p(e,i),(!o||40&i[0]&&n!==(n=`accordion-content-${e[5]}-${e[3].name}-${e[85]}`))&&A(t,"id",n)},i(e){o||(fe(l),o=!0)},o(e){pe(l),o=!1},d(e){e&&S(t),l.d(e),e&&S(i)}}}function Gl(e){let t,n,i,o,r,l=e[30](e[13],e[85])+"";return{c(){t=q("div"),n=E(l),A(t,"class",i=I("draggableListItem "+e[3].name)+" svelte-1es1ap1"),A(t,"draggable",!0),M(t,"delete",e[83]._delete),M(t,"is-active-top",e[16]?.top===e[85]),M(t,"is-active-bottom",e[16]?.bottom===e[85])},m(i,l){C(i,t,l),_(t,n),o||(r=[D(t,"dragover",e[40]),D(t,"dragleave",e[41](e[85])),D(t,"dragstart",e[38](e[85])),D(t,"drop",z(e[37](e[85]))),D(t,"dragenter",e[39](e[85]))],o=!0)},p(o,r){e=o,8192&r[0]&&l!==(l=e[30](e[13],e[85])+"")&&B(n,l),8&r[0]&&i!==(i=I("draggableListItem "+e[3].name)+" svelte-1es1ap1")&&A(t,"class",i),4104&r[0]&&M(t,"delete",e[83]._delete),65544&r[0]&&M(t,"is-active-top",e[16]?.top===e[85]),65544&r[0]&&M(t,"is-active-bottom",e[16]?.bottom===e[85])},d(e){e&&S(t),o=!1,b(r)}}}function Ul(e){let t,n,i;var o=e[89];return o&&(t=new o({props:{size:"20"}})),{c(){t&&ye(t.$$.fragment),n=F()},m(e,o){t&&be(t,e,o),C(e,n,o),i=!0},p(e,i){if(o!==(o=e[89])){if(t){ue();const e=t;pe(e.$$.fragment,1,0,(()=>{we(e,1)})),me()}o?(t=new o({props:{size:"20"}}),ye(t.$$.fragment),fe(t.$$.fragment,1),be(t,n.parentNode,n)):t=null}},i(e){i||(t&&fe(t.$$.fragment,e),i=!0)},o(e){t&&pe(t.$$.fragment,e),i=!1},d(e){e&&S(n),t&&we(t,e)}}}function Kl(e){let t,n,i,o,r,l=!e[0]&&!e[3].readonly&&Ul(e);return{c(){t=q("span"),l&&l.c(),A(t,"class","pointer icon svelte-1es1ap1"),A(t,"title",e[87]),t.hidden=n=e[85]===e[12].length-1||!(e[83]._delete^e[88])},m(n,s){C(n,t,s),l&&l.m(t,null),i=!0,o||(r=D(t,"click",(function(){w(e[36](e[85],e[9],e[86]))&&e[36](e[85],e[9],e[86]).apply(this,arguments)})),o=!0)},p(o,r){(e=o)[0]||e[3].readonly?l&&(ue(),pe(l,1,1,(()=>{l=null})),me()):l?(l.p(e,r),9&r[0]&&fe(l,1)):(l=Ul(e),l.c(),fe(l,1),l.m(t,null)),(!i||4096&r[0]&&n!==(n=e[85]===e[12].length-1||!(e[83]._delete^e[88])))&&(t.hidden=n)},i(e){i||(fe(l),i=!0)},o(e){pe(l),i=!1},d(e){e&&S(t),l&&l.d(),o=!1,r()}}}function Jl(e){let t,n,i,o,r,l;n=new e[19]({props:{$$slots:{default:[Gl]},$$scope:{ctx:e}}}),n.$on("click",(function(){w(e[35](e[86],e[85],e[9]))&&e[35](e[86],e[85],e[9]).apply(this,arguments)}));let s=[{title:"löschen",toDelete:!0,icon:Be},{title:"undo",toDelete:!1,icon:ze}],a=[];for(let t=0;t<2;t+=1)a[t]=Kl(Tl(e,s,t));const c=e=>pe(a[e],1,1,(()=>{a[e]=null}));return{c(){t=q("div"),ye(n.$$.fragment),i=L();for(let e=0;e<2;e+=1)a[e].c();o=L(),A(t,"class",r=I("accordion "+e[3].name)+" svelte-1es1ap1"),A(t,"slot","handle")},m(e,r){C(e,t,r),be(n,t,null),_(t,i);for(let e=0;e<2;e+=1)a[e].m(t,null);_(t,o),l=!0},p(i,d){e=i;const u={};if(77832&d[0]|4&d[3]&&(u.$$scope={dirty:d,ctx:e}),n.$set(u),4617&d[0]|32&d[1]|16777216&d[2]){let n;for(s=[{title:"löschen",toDelete:!0,icon:Be},{title:"undo",toDelete:!1,icon:ze}],n=0;n<2;n+=1){const i=Tl(e,s,n);a[n]?(a[n].p(i,d),fe(a[n],1)):(a[n]=Kl(i),a[n].c(),fe(a[n],1),a[n].m(t,o))}for(ue(),n=2;n<2;n+=1)c(n);me()}(!l||8&d[0]&&r!==(r=I("accordion "+e[3].name)+" svelte-1es1ap1"))&&A(t,"class",r)},i(e){if(!l){fe(n.$$.fragment,e);for(let e=0;e<2;e+=1)fe(a[e]);l=!0}},o(e){pe(n.$$.fragment,e),a=a.filter(Boolean);for(let e=0;e<2;e+=1)pe(a[e]);l=!1},d(e){e&&S(t),we(n),j(a,e)}}}function Zl(e){let t,n,i=(!e[1]&&!e[0]||e[85]<e[12].length-1)&&Rl(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){!e[1]&&!e[0]||e[85]<e[12].length-1?i?(i.p(e,n),4099&n[0]&&fe(i,1)):(i=Rl(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function Xl(e){let t,n,i=e[12],o=[];for(let t=0;t<i.length;t+=1)o[t]=Zl(Dl(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(1615049727&n[0]|4095&n[1]|17825792&n[2]){let l;for(i=e[12],l=0;l<i.length;l+=1){const r=Dl(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=Zl(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}function es(e){let t,n,i,o,r,l,s=e[27]&&e[11]&&0!=e[11]&&Al(e),a=e[25]&&e[14]&&0!=e[14]&&Vl(e),c=e[23]&&e[10]&&0!=e[10]&&Ml(e);return r=new e[20]({props:{class:e[5]+e[3].name,$$slots:{default:[Xl,({closeOtherPanels:e})=>({82:e}),({closeOtherPanels:e})=>[0,0,e?1048576:0]]},$$scope:{ctx:e}}}),{c(){t=q("div"),s&&s.c(),n=L(),a&&a.c(),i=L(),c&&c.c(),o=L(),ye(r.$$.fragment),A(t,"class","formList")},m(e,d){C(e,t,d),s&&s.m(t,null),_(t,n),a&&a.m(t,null),_(t,i),c&&c.m(t,null),_(t,o),be(r,t,null),l=!0},p(e,l){e[27]&&e[11]&&0!=e[11]?s?(s.p(e,l),2048&l[0]&&fe(s,1)):(s=Al(e),s.c(),fe(s,1),s.m(t,n)):s&&(ue(),pe(s,1,1,(()=>{s=null})),me()),e[25]&&e[14]&&0!=e[14]?a?(a.p(e,l),16384&l[0]&&fe(a,1)):(a=Vl(e),a.c(),fe(a,1),a.m(t,i)):a&&(ue(),pe(a,1,1,(()=>{a=null})),me()),e[23]&&e[10]&&0!=e[10]?c?(c.p(e,l),1024&l[0]&&fe(c,1)):(c=Ml(e),c.c(),fe(c,1),c.m(t,o)):c&&(ue(),pe(c,1,1,(()=>{c=null})),me());const d={};40&l[0]&&(d.class=e[5]+e[3].name),242687&l[0]|1048576&l[2]|4&l[3]&&(d.$$scope={dirty:l,ctx:e}),r.$set(d)},i(e){l||(fe(s),fe(a),fe(c),fe(r.$$.fragment,e),l=!0)},o(e){pe(s),pe(a),pe(c),pe(r.$$.fragment,e),l=!1},d(e){e&&S(t),s&&s.d(),a&&a.d(),c&&c.d(),we(r)}}}let ts=new Map;const ns=!0,is="pos/target";function os(e,n,i){let o,r;const{FormField:l,TextField:s,Button:a,Accordion:d,AccordionSection:u,Divider:m}=c,h=Y();let{list:g}=n,{schema:v}=n,{record:y}=n,{classId:b}=n,{eventId:w}=n,{disabled:x}=n,{fixed:k}=n,{template:I={}}=n,{reqQuantity:_}=n,{open:C=!1}=n,{currency:S}=n,{notifyList:j}=n;const q=v.find((e=>("price"===e.name||"amount"===e.name)&&!e.properties?.hidden)),N=q&&v.find((e=>"quantity"===e.name));let E=0;const L=v.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let F=0;const D=v.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name||"",z=!!D;let T=0;const A={};let B=v.properties?.readonly,V=b.split("form-")[1].slice(0,-4),O=new Map;g.group&&(k=!0);const M={};x||=B;let W,R,P=[],H=[],Q=!1,U={},K=[];v.filter((e=>e.selection)).map((e=>P.push({className:V,parentClass:v,refClass:e.selection,value:""}))),v.filter((e=>e.refClass)).forEach((e=>{}));["readonly","hidden","required"].map((e=>{v.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"";let[i,o]=n.split(".");o||(o=i,i=void 0),K.push({action:e,itemName:t.name,refObj:i,refName:o,op:t.properties[e].invert?"!":""})}))}));const J=async(e,t,n)=>{const i=y[n];if(!i?.length)return;const o=i[0][n];if(!o)return;const r=await Zs(n,o);return r?r[g.name]:void 0},Z=async(e,t)=>{const n=K.filter((e=>(e.refObj||V)===t||e.refName===t));if(n?.length)for(const t of n){const{itemName:n,refObj:o,refName:r,op:l}=t;let s,a,{action:c}=t,d=!1,u=!1;if(o){const t=W[e][o];o===V&&r?d=y:t&&(d=await Zs(o,t))}!o&&r&&(d=W[e]),d&&(u=d[r],Array.isArray(u)&&0===u.length&&(u=!1)),"!"===l&&(u=!u),"required"!==c&&"readonly"!==c||(c="required"===c?c:"disabled",setTimeout((()=>{s=`#accordion-content-${b}-${g.name}-${e} .form-field.${n} .field textarea`,a=document.querySelector(s),a||(s=`#accordion-content-${b}-${g.name}-${e} .form-field.${n} .field input`,a=document.querySelector(s)),a&&u&&a.setAttribute(c,""),a&&!u&&a.removeAttribute(c)}),0)),"hidden"===c&&(s=`#accordion-content-${b}-${g.name}-${e} .form-field.${n}`,a=document.querySelector(s),a?.classList?.toggle("hidden",u),u&&i(12,W[e][n]="",W))}},X=(e,t)=>{let n=`#accordion-content-${b}-${g.name}-${e} .form-field:not(.hidden) .field :required:not(:disabled)`;const o=document.querySelectorAll(n);let r=!1;o.forEach((e=>{e.required&&""===e.value&&(r=!0)})),void 0===t&&(n=`#accordion-content-${b}-${g.name}-${e} :not(.form-field.hidden) .field input.invalid`,document.querySelector(n)&&(t=!0)),i(15,H[e]=r||t?"invalid":"",H)},ee=e=>{if(!e)return 0;const[t,n=0]=e.split(":");return 60*t+parseInt(n)},te=(e,t)=>{if(!t)return;const n=v.find((e=>e.name===t)),o=n.properties.value.formula,{operator:r,argument:l}=o,s=l.map((t=>W[e][t.refItem]));let a=0;"$add"===r&&(a=s.reduce(((e,t)=>e+ +t))),"$subtract"===r&&(a=s.reduce(((e,t)=>{if(!e)return 0;if(!t)return 0;const[n,i]=e.split(":");e=i?(+n+ +i/60).toFixed(2):+n;const[o,r]=t.split(":");return o?e-=r?(+o+ +r/60).toFixed(2):+o:0})));const c=`#accordion-content-${b}-${g.name}-${e} .form-field.${t} .field input`,d=document.querySelector(c),u=d?.disabled;i(12,W[e][t]=(a||0).toFixed(n.properties.decimals||0),W),i(17,U={item:n,value:a,idx:e}),setTimeout((()=>{const e=document.querySelector(c);u&&e&&e.setAttribute("disabled","")}),0)};R=v.filter((e=>e.refClass)).reduce(((e,t)=>{const n=v.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,i]=t.selection.split(":"),[o]=i?.split(".")||[];o&&e.push({refClass:o,items:[n],selection:t.selection})}const i={refClass:t.refClass,items:[]};return n.forEach((e=>{i.items.push(e.name)})),e.push(i),e}),[]);const ie=async(e,t,n,o)=>{const r=(await R).find((e=>e.refClass===t.refClass));if(!r)return;const{refClass:l,items:s,selection:a}=r,c=t.name;if(K.find((e=>e.itemName===c))){const t=`#accordion-content-${b}-${g.name}-${e} .form-field.${l}.hidden`;if(document.querySelector(t))return}return n?Promise.all(s.map((async r=>{const c=v.find((e=>e.name===r));if(c.properties?.readonly&&!t.refInput){const n=W[e][t.refClass];return Promise.resolve(Zs(t.refClass,n,!0)).then((t=>{let n=t[r];Array.isArray(n)&&(n=n.length?n[0][r]:""),i(12,W[e][r]=n,W)}))}let d="";const{refInput:u}=t;if(u&&W[e]){const[t,n]=u.split(".");d=n?W[e][n]:y[t]}if(a&&n!==o)s.map((t=>{i(12,W[e][t]="",W)}));else if(u&&!d||oe(e,r)||o!==n){const n=v.find((e=>e.refClass===l)),o=W[e][n.name];if(t.selection){const n=Js(t.selection+o.toString());if(n)return Promise.resolve(n).then((t=>i(12,W[e][r]=t[r],W)))}return Promise.resolve(Zs(n.refClass,o)).then((t=>i(12,W[e][r]=t[r],W)))}}))):Promise.resolve(s.map((t=>{i(12,W[e][t]="",W)})))},oe=(e,t)=>{let n=W[e][t];return"number"===v.find((e=>e.name===t)).type&&(n=Number(n||0)),!n},re=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};let le=!1;const se=e=>!(!k&&e>=W.length-1),ae=(e,t=!1)=>{const[n,i]=e.split(";");return g.name===i&&(!!se(t)&&((!1===t||t!=n)&&parseInt(n)))};v.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=v.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))}));const ce=(e,t=!1)=>{const n=`#accordion-content-${b}-${g.name}-${e} > div.form-field:not(.hidden)`,i=document.querySelectorAll(n);if(!i?.length)return;const o=i[i.length-1];ne().then((()=>{const t=`#accordion-content-${b}-${g.name}-${e} textarea`;Array.from(document.querySelectorAll(t)).forEach(re)})).then((()=>{t&&o.scrollIntoView({behavior:"smooth",block:"end"})}))};return e.$$set=e=>{"list"in e&&i(3,g=e.list),"schema"in e&&i(43,v=e.schema),"record"in e&&i(4,y=e.record),"classId"in e&&i(5,b=e.classId),"eventId"in e&&i(6,w=e.eventId),"disabled"in e&&i(0,x=e.disabled),"fixed"in e&&i(1,k=e.fixed),"template"in e&&i(44,I=e.template),"reqQuantity"in e&&i(2,_=e.reqQuantity),"open"in e&&i(9,C=e.open),"currency"in e&&i(7,S=e.currency),"notifyList"in e&&i(8,j=e.notifyList)},e.$$.update=()=>{24&e.$$.dirty[0]&&y&&(i(2,_=y.quantity),i(12,W=(y[g.name]||[]).concat({}))),4096&e.$$.dirty[0]&&i(13,o=W),15368&e.$$.dirty[0]&&o&&((()=>{if(L)i(14,F=W?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(z)i(11,T=W?.reduce(((e,t)=>e+(t._delete?0:+(t[D]||0))),0)||0)})(),(()=>{if(q)i(10,E=W?.reduce(((e,t)=>{if(t.amount){const n=t.amount??0;e+=t._delete?0:+n}if(t.price){const n=(N?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),ne().then((()=>h("save",{listName:g.name,value:W,amountValue:E,weeksValue:T})))),16384&e.$$.dirty[1]&&(r=e=>A[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[x,k,_,g,y,b,w,S,j,C,E,T,W,o,F,H,Q,U,l,a,d,u,undefined,q,{name:"amountValue",properties:{decimals:2}},L,{name:"hoursValue",properties:{decimals:2}},z,{name:"weeksValue",properties:{decimals:1}},P,(e,t)=>{let n=e[t];return M["pos"+t]&&(n=M["pos"+t]),n&&v.filter((e=>!0!==e.properties?.hidden&&void 0!==n[e.name]&&"textarea"!==e.properties?.format)).map((e=>""===n[e.name]?"":"object"===e.type?r(n[e.name]):Array.isArray(n[e.name])?n[e.name][0]||"":"boolean"===e.type?$(n[e.name]):"date"===e.type?f(n[e.name]):"datetime"===e.type?p(n[e.name]):e.properties?.multi?"":n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>async({detail:n})=>{const{oldValue:r,value:l,add:s,desc:a}=n;if(g.refItem){const n=await J(t,e,g.refItem);n&&i(12,W=n)}te(t,e._formulaActor);const c=P?.find((t=>t.refClass.split(":")[1]?.split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,l)),l&&W.length===t+1&&i(12,W=W.concat({})),a&&i(45,A[l]=a,A),await ie(t,e,l,r),await Z(t,e.name),i(13,o=W),"number"===e.type&&i(17,U={item:e,value:l,idx:t}),X(t)},({detail:e})=>{const{idx:t,value:n}=e;X(t,n)},async({detail:{className:e,itemName:n,value:i}})=>{if(O.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===V+"."+g.name))),!i)return;const o={[n]:!0},r=await t.getSectionView(e,o);r?.length&&O.set(e,r[0])},({detail:e})=>{const{idx:t,fieldId:n,value:i}=e;if(!i)return;const o=ee(i);let r=!1;W.forEach(((e,n)=>{if(t===n)return;const{start:i,end:l}=W[n];i&&l&&o>ee(i)&&o<ee(l)&&(r=!0)}));const l=document.getElementById(n);l?.classList?.toggle("invalid",r)},(e,t,n)=>n=>{W[t]._delete||(e(n),ce(t,!0))},(e,t,n)=>o=>{if(i(12,W[e]._delete=!W[e]._delete,W),W[e]._delete){M["pos"+e]={...W[e]};for(const t of v)i(12,W[e][t.name]="",W);t&&n(o)}else{if(M["pos"+e]){const t={};for(const n of v)t[n.name]=M["pos"+e][n.name];i(12,W[e]=t,W)}M["pos"+e]=void 0,t||n(o)}},e=>t=>{t.preventDefault(),i(16,Q=!1);const n=ae(t.dataTransfer.getData(is),e);if(!1===n)return;t.dataTransfer.dropEffect="move";const o=[...W].map(((e,t)=>(e._index=t,e)));n<e?(o.splice(e+1,0,o[n]),o.splice(n,1)):(o.splice(e,0,o[n]),o.splice(n+1,1)),o.map(((e,t)=>{return n=e._index,i=t,void ts.set(i,n);var n,i}));let r=[];H.map(((e,t)=>{r[t]=H[(e=>{const t=ts.get(e);return void 0===t?e:t})(t)]})),i(15,H=r),i(12,W=o.map(((e,t)=>(delete e._index,e)))),le=!1},e=>t=>{if(!se(e))return!1;t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move",t.dataTransfer.setData(is,e+";"+g.name),le=e},e=>t=>{const n=ae(t.dataTransfer.getData(is),e)||le;return!1===n||n===e?i(16,Q=!1):void i(16,Q={top:n>e&&e,bottom:n<e&&e})},e=>e.preventDefault(),e=>e=>{i(16,Q=!1)},(e,t)=>n=>{setTimeout((()=>{Array.from(O).forEach((([t,n])=>{W[e][t]||i(12,W[e][t]=n._id,W)}))}),500);const o=new Set;for(const e of K)o.add(e.refObj||V);for(const t of Array.from(o))Z(e,t);t(n),ce(e)},v,I,A,function(e){T=e,i(11,T)},function(e){F=e,i(14,F)},function(e){E=e,i(10,E)},function(t){G(e,t)},function(t){G(e,t)}]}class rs extends ke{constructor(e){var t;super(),Fl.getElementById("svelte-1es1ap1-style")||((t=q("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}",_(Fl.head,t)),xe(this,e,os,es,x,{list:3,schema:43,record:4,classId:5,eventId:6,disabled:0,fixed:1,template:44,reqQuantity:2,open:9,currency:7,notifyList:8},[-1,-1,-1,-1])}}const{Boolean:ls,document:ss}=ge;function as(e,t,n){const i=e.slice();return i[125]=t[n],i}function cs(e,t,n){const i=e.slice();return i[128]=t[n],i}function ds(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function us(e){let t,n,i=e[124]&&function(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p,$,h,g=e[1].items,v=[];for(let t=0;t<g.length;t+=1)v[t]=fs(cs(e,g,t));const y=e=>pe(v[e],1,1,(()=>{v[e]=null}));let w=e[1].list&&ps(e),x=!e[2]&&e[39]&&e[3]&&!e[21]&&Is(e);d=new e[24]({props:{outline:!0,$$slots:{default:[Cs]},$$scope:{ctx:e}}}),d.$on("click",e[42]);const k=[js,Ss],N=[];function E(e,t){return e[5]?0:e[39]?1:-1}~(m=E(e))&&(f=N[m]=k[m](e));return{c(){t=q("section"),n=q("form"),i=q("input"),r=L();for(let e=0;e<v.length;e+=1)v[e].c();l=L(),w&&w.c(),s=L(),x&&x.c(),a=L(),c=q("div"),ye(d.$$.fragment),u=L(),f&&f.c(),A(i,"class",I(e[29])+" svelte-9xiaib"),A(i,"name","_id"),A(i,"type","hidden"),i.value=o=e[4]._id||"",A(n,"class",I(e[30])+" svelte-9xiaib"),A(n,"id",e[29]),A(c,"class","form--buttons svelte-9xiaib"),A(t,"class",I(e[31])+" svelte-9xiaib")},m(o,f){C(o,t,f),_(t,n),_(n,i),_(n,r);for(let e=0;e<v.length;e+=1)v[e].m(n,null);_(n,l),w&&w.m(n,null),_(t,s),x&&x.m(t,null),_(t,a),_(t,c),be(d,c,null),_(c,u),~m&&N[m].m(c,null),p=!0,$||(h=[D(n,"keydown",e[47]),D(n,"submit",z(e[41]))],$=!0)},p(e,r){if((!p||16&r[0]&&o!==(o=e[4]._id||""))&&(i.value=o),539003026&r[0]|14708864&r[1]){let t;for(g=e[1].items,t=0;t<g.length;t+=1){const i=cs(e,g,t);v[t]?(v[t].p(i,r),fe(v[t],1)):(v[t]=fs(i),v[t].c(),fe(v[t],1),v[t].m(n,l))}for(ue(),t=g.length;t<v.length;t+=1)y(t);me()}e[1].list?w?(w.p(e,r),2&r[0]&&fe(w,1)):(w=ps(e),w.c(),fe(w,1),w.m(n,null)):w&&(ue(),pe(w,1,1,(()=>{w=null})),me()),!e[2]&&e[39]&&e[3]&&!e[21]?x?(x.p(e,r),2097164&r[0]&&fe(x,1)):(x=Is(e),x.c(),fe(x,1),x.m(t,a)):x&&(ue(),pe(x,1,1,(()=>{x=null})),me());const s={};128&r[4]&&(s.$$scope={dirty:r,ctx:e}),d.$set(s);let u=m;m=E(e),m===u?~m&&N[m].p(e,r):(f&&(ue(),pe(N[u],1,1,(()=>{N[u]=null})),me()),~m?(f=N[m],f?f.p(e,r):(f=N[m]=k[m](e),f.c()),fe(f,1),f.m(c,null)):f=null)},i(e){if(!p){for(let e=0;e<g.length;e+=1)fe(v[e]);fe(w),fe(x),fe(d.$$.fragment,e),fe(f),p=!0}},o(e){v=v.filter(ls);for(let e=0;e<v.length;e+=1)pe(v[e]);pe(w),pe(x),pe(d.$$.fragment,e),pe(f),p=!1},d(e){e&&S(t),j(v,e),w&&w.d(),x&&x.d(),we(d),~m&&N[m].d(),$=!1,b(h)}}}(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,t){e[124]&&i.p(e,t)},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function ms(e){let t,n;return t=new Ll({props:{classId:e[29],item:e[128],selection:e[128].selection,record:e[4],disabled:e[21],eventId:e[38],toDelete:e[11],currency:e[7],changeValue:e[15]}}),t.$on("task",e[43]),t.$on("notify",e[44]),t.$on("safeReference",e[53]),t.$on("multi",e[45]),t.$on("defPrep",e[52]),t.$on("record",e[54]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};2&n[0]&&(i.item=e[128]),2&n[0]&&(i.selection=e[128].selection),16&n[0]&&(i.record=e[4]),2097152&n[0]&&(i.disabled=e[21]),2048&n[0]&&(i.toDelete=e[11]),128&n[0]&&(i.currency=e[7]),32768&n[0]&&(i.changeValue=e[15]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function fs(e){let t,n,i="list"!==e[128].type&&ms(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){"list"!==e[128].type?i?(i.p(e,n),2&n[0]&&fe(i,1)):(i=ms(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function ps(e){let t,n,i,o,r,l=e[34]&&e[8]&&0!=e[8]&&$s(e),s=e[9]&&gs(e),a=e[35]&&e[14]&&0!=e[14]&&ys(e),c=e[1].list,d=[];for(let t=0;t<c.length;t+=1)d[t]=ks(as(e,c,t));const u=e=>pe(d[e],1,1,(()=>{d[e]=null}));return{c(){l&&l.c(),t=L(),s&&s.c(),n=L(),a&&a.c(),i=L();for(let e=0;e<d.length;e+=1)d[e].c();o=F()},m(e,c){l&&l.m(e,c),C(e,t,c),s&&s.m(e,c),C(e,n,c),a&&a.m(e,c),C(e,i,c);for(let t=0;t<d.length;t+=1)d[t].m(e,c);C(e,o,c),r=!0},p(e,r){if(e[34]&&e[8]&&0!=e[8]?l?(l.p(e,r),256&r[0]&&fe(l,1)):(l=$s(e),l.c(),fe(l,1),l.m(t.parentNode,t)):l&&(ue(),pe(l,1,1,(()=>{l=null})),me()),e[9]?s?(s.p(e,r),512&r[0]&&fe(s,1)):(s=gs(e),s.c(),fe(s,1),s.m(n.parentNode,n)):s&&(ue(),pe(s,1,1,(()=>{s=null})),me()),e[35]&&e[14]&&0!=e[14]?a?(a.p(e,r),16384&r[0]&&fe(a,1)):(a=ys(e),a.c(),fe(a,1),a.m(i.parentNode,i)):a&&(ue(),pe(a,1,1,(()=>{a=null})),me()),539177174&r[0]|8421504&r[1]){let t;for(c=e[1].list,t=0;t<c.length;t+=1){const n=as(e,c,t);d[t]?(d[t].p(n,r),fe(d[t],1)):(d[t]=ks(n),d[t].c(),fe(d[t],1),d[t].m(o.parentNode,o))}for(ue(),t=c.length;t<d.length;t+=1)u(t);me()}},i(e){if(!r){fe(l),fe(s),fe(a);for(let e=0;e<c.length;e+=1)fe(d[e]);r=!0}},o(e){pe(l),pe(s),pe(a),d=d.filter(ls);for(let e=0;e<d.length;e+=1)pe(d[e]);r=!1},d(e){l&&l.d(e),e&&S(t),s&&s.d(e),e&&S(n),a&&a.d(e),e&&S(i),j(d,e),e&&S(o)}}}function $s(e){let t,n;return t=new e[25]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[hs]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};384&n[0]|128&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function hs(e){let t,n,i;function o(t){e[63](t)}let r={item:e[32],disabled:!0,currency:e[7]};return void 0!==e[8]&&(r.value=e[8]),t=new Oi({props:r}),K.push((()=>ve(t,"value",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};128&i[0]&&(o.currency=e[7]),!n&&256&i[0]&&(n=!0,o.value=e[8],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function gs(e){let t,n;return t=new e[25]({props:{name:"Total MWSt "+(e[10]?"("+e[10]+"%)":""),nameClass:"formField_italic",$$slots:{default:[vs]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};1024&n[0]&&(i.name="Total MWSt "+(e[10]?"("+e[10]+"%)":"")),640&n[0]|128&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function vs(e){let t,n,i;function o(t){e[64](t)}let r={item:e[33],disabled:!0,currency:e[7]};return void 0!==e[9]&&(r.value=e[9]),t=new Oi({props:r}),K.push((()=>ve(t,"value",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};128&i[0]&&(o.currency=e[7]),!n&&512&i[0]&&(n=!0,o.value=e[9],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function ys(e){let t,n;return t=new e[25]({props:{name:"Gesamtzeit in Wochen",nameClass:"formField_italic",$$slots:{default:[bs]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};16384&n[0]|128&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function bs(e){let t,n,i;function o(t){e[65](t)}let r={item:e[36],disabled:!0};return void 0!==e[14]&&(r.value=e[14]),t=new Oi({props:r}),K.push((()=>ve(t,"value",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};!n&&16384&i[0]&&(n=!0,o.value=e[14],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function ws(e){let t,n;return t=new ei({props:{classId:e[29],open:!e[2]&&1===e[1].list.length,list:e[125],template:e[16],eventId:e[38],schema:e[125].item,record:e[4],disabled:e[21],currency:e[7]}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};6&n[0]&&(i.open=!e[2]&&1===e[1].list.length),2&n[0]&&(i.list=e[125]),65536&n[0]&&(i.template=e[16]),2&n[0]&&(i.schema=e[125].item),16&n[0]&&(i.record=e[4]),2097152&n[0]&&(i.disabled=e[21]),128&n[0]&&(i.currency=e[7]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function xs(e){let t,n;return t=new rs({props:{classId:e[29],open:e[13],list:e[125],template:e[17],eventId:e[38],schema:e[125].item,record:e[4],disabled:e[21],fixed:e[125].fixed,reqQuantity:e[12],currency:e[7],notifyList:e[6]}}),t.$on("save",e[46]),t.$on("record",e[54]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};8192&n[0]&&(i.open=e[13]),2&n[0]&&(i.list=e[125]),131072&n[0]&&(i.template=e[17]),2&n[0]&&(i.schema=e[125].item),16&n[0]&&(i.record=e[4]),2097152&n[0]&&(i.disabled=e[21]),2&n[0]&&(i.fixed=e[125].fixed),4096&n[0]&&(i.reqQuantity=e[12]),128&n[0]&&(i.currency=e[7]),64&n[0]&&(i.notifyList=e[6]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function ks(e){let t,n,i,o,r,l;t=new e[23]({props:{text:e[125].designation}});const s=[xs,ws],a=[];function c(e,t){return"array"===e[125].type?0:1}return i=c(e),o=a[i]=s[i](e),{c(){ye(t.$$.fragment),n=L(),o.c(),r=F()},m(e,o){be(t,e,o),C(e,n,o),a[i].m(e,o),C(e,r,o),l=!0},p(e,n){const l={};2&n[0]&&(l.text=e[125].designation),t.$set(l);let d=i;i=c(e),i===d?a[i].p(e,n):(ue(),pe(a[d],1,1,(()=>{a[d]=null})),me(),o=a[i],o?o.p(e,n):(o=a[i]=s[i](e),o.c()),fe(o,1),o.m(r.parentNode,r))},i(e){l||(fe(t.$$.fragment,e),fe(o),l=!0)},o(e){pe(t.$$.fragment,e),pe(o),l=!1},d(e){we(t,e),e&&S(n),a[i].d(e),e&&S(r)}}}function Is(e){let t,n,i,o;function r(t){e[66](t)}let l={title:"",$$slots:{default:[_s]},$$scope:{ctx:e}};return void 0!==e[20]&&(l.checked=e[20]),n=new e[26]({props:l}),K.push((()=>ve(n,"checked",r))),{c(){t=q("div"),ye(n.$$.fragment),A(t,"class","askNext"),O(t,"margin-top","1em"),O(t,"margin-left","23em")},m(e,i){C(e,t,i),be(n,t,null),o=!0},p(e,t){const o={};128&t[4]&&(o.$$scope={dirty:t,ctx:e}),!i&&1048576&t[0]&&(i=!0,o.checked=e[20],oe((()=>i=!1))),n.$set(o)},i(e){o||(fe(n.$$.fragment,e),o=!0)},o(e){pe(n.$$.fragment,e),o=!1},d(e){e&&S(t),we(n)}}}function _s(e){let t;return{c(){t=q("span"),t.textContent="Weiter erfassen",O(t,"margin-left",".75em")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Cs(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Ss(e){let t,n,i,o,r;t=new e[24]({props:{class:"close",disabled:e[21],form:e[29],filled:!0,type:"submit",$$slots:{default:[qs]},$$scope:{ctx:e}}});let l=e[3]&&!e[21]&&Ns(e),s=e[18]&&Ls(e);return{c(){ye(t.$$.fragment),n=L(),l&&l.c(),i=L(),s&&s.c(),o=F()},m(e,a){be(t,e,a),C(e,n,a),l&&l.m(e,a),C(e,i,a),s&&s.m(e,a),C(e,o,a),r=!0},p(e,n){const r={};2097152&n[0]&&(r.disabled=e[21]),128&n[4]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r),e[3]&&!e[21]?l?(l.p(e,n),2097160&n[0]&&fe(l,1)):(l=Ns(e),l.c(),fe(l,1),l.m(i.parentNode,i)):l&&(ue(),pe(l,1,1,(()=>{l=null})),me()),e[18]?s?(s.p(e,n),262144&n[0]&&fe(s,1)):(s=Ls(e),s.c(),fe(s,1),s.m(o.parentNode,o)):s&&(ue(),pe(s,1,1,(()=>{s=null})),me())},i(e){r||(fe(t.$$.fragment,e),fe(l),fe(s),r=!0)},o(e){pe(t.$$.fragment,e),pe(l),pe(s),r=!1},d(e){we(t,e),e&&S(n),l&&l.d(e),e&&S(i),s&&s.d(e),e&&S(o)}}}function js(e){let t,n,i,o;t=new e[24]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[Os]},$$scope:{ctx:e}}}),t.$on("click",e[50]);let r=e[19]&&Ms(e);return{c(){ye(t.$$.fragment),n=L(),r&&r.c(),i=F()},m(e,l){be(t,e,l),C(e,n,l),r&&r.m(e,l),C(e,i,l),o=!0},p(e,n){const o={};128&n[4]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o),e[19]?r?(r.p(e,n),524288&n[0]&&fe(r,1)):(r=Ms(e),r.c(),fe(r,1),r.m(i.parentNode,i)):r&&(ue(),pe(r,1,1,(()=>{r=null})),me())},i(e){o||(fe(t.$$.fragment,e),fe(r),o=!0)},o(e){pe(t.$$.fragment,e),pe(r),o=!1},d(e){we(t,e),e&&S(n),r&&r.d(e),e&&S(i)}}}function qs(e){let t;return{c(){t=E("Speichern und schliessen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Ns(e){let t,n;return t=new e[24]({props:{form:e[29],filled:!0,type:"submit",style:"opacity: 0.75;",$$slots:{default:[Es]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Es(e){let t;return{c(){t=E("Speichern")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Ls(e){let t,n,i,o,r;const l=[Ds,Fs],s=[];t=function(e,t){return e[37]?0:1}(e),n=s[t]=l[t](e);let a=e[19]&&Bs(e);return{c(){n.c(),i=L(),a&&a.c(),o=F()},m(e,n){s[t].m(e,n),C(e,i,n),a&&a.m(e,n),C(e,o,n),r=!0},p(e,t){n.p(e,t),e[19]?a?(a.p(e,t),524288&t[0]&&fe(a,1)):(a=Bs(e),a.c(),fe(a,1),a.m(o.parentNode,o)):a&&(ue(),pe(a,1,1,(()=>{a=null})),me())},i(e){r||(fe(n),fe(a),r=!0)},o(e){pe(n),pe(a),r=!1},d(e){s[t].d(e),e&&S(i),a&&a.d(e),e&&S(o)}}}function Fs(e){let t,n;return t=new e[24]({props:{filled:!0,style:"opacity: 0.6;",$$slots:{default:[zs]},$$scope:{ctx:e}}}),t.$on("click",(function(){w(e[48](e[0]))&&e[48](e[0]).apply(this,arguments)})),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(n,i){e=n;const o={};128&i[4]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Ds(e){let t,n;return t=new d({props:{text:e[37],extended:!0,$$slots:{default:[As]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};1&n[0]|128&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function zs(e){let t,n,i;return n=new nt({props:{size:"18"}}),{c(){t=q("span"),t.textContent=`${e[55]()}`,ye(n.$$.fragment),O(t,"margin-right",".75em")},m(e,o){C(e,t,o),be(n,e,o),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n,e)}}}function Ts(e){let t,n,i;return n=new nt({props:{size:"18"}}),{c(){t=q("span"),t.textContent=`${e[55]()}`,ye(n.$$.fragment),O(t,"margin-right",".75em")},m(e,o){C(e,t,o),be(n,e,o),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n,e)}}}function As(e){let t,n;return t=new e[24]({props:{filled:!0,style:"opacity: 0.6;",$$slots:{default:[Ts]},$$scope:{ctx:e}}}),t.$on("click",(function(){w(e[48](e[0]))&&e[48](e[0]).apply(this,arguments)})),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(n,i){e=n;const o={};128&i[4]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Bs(e){let t,n;return t=new e[24]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[Vs]},$$scope:{ctx:e}}}),t.$on("click",(function(){w(e[49](e[0]))&&e[49](e[0]).apply(this,arguments)})),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(n,i){e=n;const o={};128&i[4]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Vs(e){let t,n,i;return n=new rt({props:{size:"18"}}),{c(){t=q("span"),t.textContent="Daten",ye(n.$$.fragment),O(t,"margin-right",".75em")},m(e,o){C(e,t,o),be(n,e,o),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n,e)}}}function Os(e){let t,n,i;return n=new nt({props:{size:"18"}}),{c(){t=q("span"),t.textContent="Erstellen",ye(n.$$.fragment),O(t,"margin-right",".75em")},m(e,o){C(e,t,o),be(n,e,o),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n,e)}}}function Ms(e){let t,n;return t=new e[24]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[Ws]},$$scope:{ctx:e}}}),t.$on("click",e[51]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Ws(e){let t,n,i;return n=new rt({props:{size:"18"}}),{c(){t=q("span"),t.textContent="Daten",ye(n.$$.fragment),O(t,"margin-right",".75em")},m(e,o){C(e,t,o),be(n,e,o),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n,e)}}}function Rs(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Ps(e){let t,n,i,o;ss.title=t=e[22];let r={ctx:e,current:null,token:null,hasCatch:!1,pending:Rs,then:us,catch:ds,value:124,blocks:[,,,]};return $e(e[40](),r),{c(){n=L(),i=F(),r.block.c()},m(e,t){C(e,n,t),C(e,i,t),r.block.m(e,r.anchor=t),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(n,i){e=n,(!o||4194304&i[0])&&t!==(t=e[22])&&(ss.title=t),he(r,e,i)},i(e){o||(fe(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){pe(r.blocks[e])}o=!1},d(e){e&&S(n),e&&S(i),r.block.d(e),r.token=null,r=null}}}let Hs=new Map,Qs=new Map,Ys=new Map;const Gs=(e,n)=>{const i=n;return Hs.has(i)||Hs.set(i,t.getTasksList(n).then((({data:e})=>e))),Hs.get(i)},Us=(e,n,i,o=!1)=>Qs.get(i)||o?t.getTaskList(e,i).then((e=>(Qs.set(i,e),e))):Gs(e,n).then((n=>n.find((({_id:e})=>e===i))||t.getTaskList(e,i))).then((e=>(Qs.set(i,e),e))),Ks=(e,t)=>{Ys.set(e,t)},Js=e=>Ys.get(e),Zs=(e,n,i=!1)=>!i&&Ys.get(n)||t.getTask(e,n).then((e=>(Ys.set(n,e),e))),Xs=(e,n)=>{if(!Hs.get(n))return;const i=n;Hs.set(i,t.getTasksList(n).then((({data:e})=>e)))};function ea(e,o,a){let d,f,p,$,g,v,y;k(e,m,(e=>a(76,$=e))),k(e,s,(e=>a(77,g=e))),k(e,i,(e=>a(78,v=e)));const{Divider:b,Button:w,FormField:x,Checkbox:I}=c,{loggedIn:_,currentTasks:C}=u;k(e,_,(e=>a(79,y=e))),k(e,C,(e=>a(75,p=e)));const S=JSON.parse(r.getItem("Locale")),j=Y();let q,N,E,L,F,{schema:D}=o,{recID:z}=o,{prevEventID:T=!1}=o,{prev:A=!1}=o,{taskId:B=!1}=o,{description:V=""}=o,{root:O=!1}=o,{readonly:M}=o,{isStandalone:W}=o,R={},P={},G="form-"+D.class+Math.floor(9e3*Math.random()+1e3).toString();const U=O?"fEmbedded":"fTask",K=O?"sEmbedded":"sTask";let J="CHF";let Z,X,ee=0,te=0,ie=0,oe=0,re=1,le=!z&&D.list&&1===D.list.length;const se={},ae=D.items.find((e=>"price"===e.name&&!e.properties?.hidden)),ce=D.items.find((e=>"quantity"===e.name&&!e.properties?.hidden)),de=D.items.find((e=>"amount"===e.name&&!e.properties?.hidden)),ue=!!ae||!!de,me=D.list?.filter((e=>"array"===e.type))?.length>1||ue,fe=D.items.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name,pe=!!fe,$e=D.list?.filter((e=>"array"===e.type))?.length>1||pe,he={},ge=D.result?.resultDef[0].button?.description;let ve,ye,be,we,xe=0,ke=0,Ie=[],_e=[],Ce=[],Se={},je=new Map,qe=D.class,Ne=D.id,Ee=!1,Le=-1!==window.location.search.indexOf("next=");const Fe=!p?.length||p.find((e=>e===Ne));["readonly","hidden","required"].map((e=>{D.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[i,o]=n.split(".");Ie.push({action:e,itemName:t.name,refObj:i,refName:o,op:t.properties[e].invert?"!":""})}))}));D.items.filter((e=>e.selection&&e.constraint)).map((e=>{_e.push({name:e.name,selection:e.selection,constraint:e.constraint})}));D.items.filter((e=>e.lookup)).forEach((e=>{Ce.push({name:e.name,lookup:e.lookup})})),D.items.filter((e=>e.properties?.lookup)).forEach((e=>{Ce.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}));const De=async e=>{if(e?.length)for(const n of e){if(!n.lookup)break;const{name:e}=n;if(R[e])break;const{domain:i,value:o}=n.lookup;if("user"===i&&o){const n=y.user,i={[o]:n},r=await t.getSectionView(e,i);if(r?.length){const[{_id:t}]=r;t&&a(4,R[e]=t,R)}}}},ze=async e=>{if(!D.input)return;if(!D.input.length)return;if(D.input.length<2)return;const n=!e.input.class[0].name&&e.input.class[0].selection;if(!n)return;const i=e.input.class[1].name,o=e.input.class[1].destination?.split(".")[0];if(!i||!o)return;const r=D.list?.find((e=>e.name===i));if(!r)return;const l=await t.getSchemaByClass(n),s=(await t.getTasks(l.id)).data;if(!s?.length)return;const c=[];for(const e of s){const t={};for(const n of r.item)n.name===o?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);c.push(t)}c.length&&a(4,R[i]=c,R)},Te=()=>{for(const e of D.items)e.properties?.value?.concatenation&&Ae(e)},Ae=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 Ve(e.refItemNext));a(4,R[e.name]=n,R)},Be=async e=>{const t=Ie.filter((t=>t.refObj===e));if(t?.length){a(15,Se={});for(const e of t){const{itemName:t,refObj:n,refName:i,op:o}=e;let{action:r}=e;if(!n)break;let l,s,c=!i&&R[n];const d=R[n];d&&i&&(c=(await Zs(n,d))[i]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===o&&(c=!c),"required"!==r&&"readonly"!==r||(r="required"===r?r:"disabled",setTimeout((()=>{l=`#${G} .form-field.${t} .field #${t}`,s=document.querySelector(l),s&&c&&s.setAttribute(r,""),s&&!c&&s.removeAttribute(r)}),0)),"hidden"===r&&(l=`#${G} .form-field.${t}`,s=document.querySelector(l),s?.classList?.toggle("hidden",!!c),c&&a(15,Se[t]="",Se))}}},Ve=async e=>{const[n,i]=e.offset?.split(",")||[0,0],o=+e.base||0,r=+e.step||1;e.type;const l=e.refItem,s=await t.getLastId(D.class,l);if(!s?.length)return(o+r).toString().padStart(i,"0");const a=s[0][l];return((+a?.substring(n,n+i)||o)+r).toString().padStart(i,"0")},Oe=(e,t,n,i=!1)=>{const o=n||t.name,r=o.startsWith("_")?o:o.split("_")[0],l=e.find((e=>e.name===r));let s=t.value;if(!i&&l&&l.properties?.multi&&(s=R[o]),s&&l&&"dateRange"===l.type){let e=new Date(s);return"Invalid Date"==e?"":(e=`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}T00:00:00.000Z`,new Date(e).toISOString())}if(s&&l&&l.type.startsWith("date"))try{return Sn(s,"%d.%m.%Y").toISOString()}catch{return new Date(s).toISOString()}if(l&&"boolean"===l.type&&(s=!!t.checked),l&&"number"===l.type){const e=Number("1.1").toLocaleString(S.id).substring(1,2);try{s=Number(s.replace(e,".")).toString()}catch{}}return s},Me=()=>W?window.close():O?window.singleSpaNavigate("/"):j("back"),We=async(e,n)=>{if(D.input&&D.input.length>1){if(D.input[0]!==e)return;const{recursive:i}=be.input.class[1];if(n){const o=await t.getTaskOptions(`${e}:${n}`,Ne,i);a(4,R={...R,...o})}else{const e=D.input.slice(1);for(const t of e)a(4,R[t]=[],R)}}},Re=()=>{let e=0;if(ae){let t=1;ce&&(t=re),e=oe*t}de&&(e=oe);let t=0;for(const e in se)t+=se[e];a(8,ee=t+e)},Pe=()=>{let e=0;for(const t in he)e+=he[t];a(14,xe=e+ +ke)};n.subscribe((async e=>{if(!e)return;if(!z)return;const n=await t.getSchema(e.eventId);if(!n)return;const i=D.list?.find((e=>e.name===n.class));if(!i)return;const o=await t.getTaskById(e.taskId);((e,t,n)=>{if(!Hs.get(e))return;const i=t;Qs.set(i,n)})(o.event,o.docId,o.data);const r=await t.getTask(n.class,o.docId),l=R[n.class].filter((e=>e[n.class]==r._id));l?.length&&l.map((e=>{e[n.class]=o.docId})),a(4,R),a(62,N),a(61,q),a(1,D)})),H((()=>{Hs=new Map,Qs=new Map,Ys=new Map,He()}));const He=async()=>{const e=e=>new Promise((t=>setTimeout(t,e)));let t,n=0;for(;!(t=document.getElementById(G))&&++n<20;)await e(50);t&&(()=>{if(z)return;const e=new Set;for(const t of Ie)e.add(t.refObj||qe);Array.from(e).forEach((e=>Be(e)))})(),Qe()},Qe=()=>{setTimeout((()=>{Array.from(je).forEach((([e,t])=>{R[e]||a(4,R[e]=t._id,R)}))}),350)};Q((()=>{z&&function(e,t,n=t){e.set(n)}(m,$={[z]:{record:R,lists:P}},$)}));const Ye=()=>{const e={};Array.from(document.querySelectorAll("form#"+G+" ."+G)).map((t=>{if(t.name)if(t.name.includes(".")){const[n,i]=t.name.split("."),o=D.list.find((e=>e.name===n));e[t.name]=Oe(o.item,t)}else e[t.name]=Oe(D.items,t,t.name.split("_")[0])})),D.list&&D.list.map((t=>{"array"===t.type&&P[t.name]&&(e[t.name]=P[t.name].reduce(((e,n)=>n._delete||!Object.values(n).some(Boolean)?e:e.concat(Object.entries(n).reduce(((e,[n,i])=>("_delete"!==n&&(e[n]=Oe(t.item,{name:n,value:i,checked:i},"",!0)),e)),{}))),[]))}));let t=!0;return Object.entries(e).map((([e,n])=>{e=e.split("_")[0];const i=D.items.find((t=>t.name===e));i?.properties?.required&&!n&&(t=!1)})),t&&e},Ge=e=>{const t="/api/report/list/"+e;window.open(t,"_self","width=1 height=1")};return e.$$set=e=>{"schema"in e&&a(1,D=e.schema),"recID"in e&&a(2,z=e.recID),"prevEventID"in e&&a(58,T=e.prevEventID),"prev"in e&&a(59,A=e.prev),"taskId"in e&&a(0,B=e.taskId),"description"in e&&a(56,V=e.description),"root"in e&&a(3,O=e.root),"readonly"in e&&a(57,M=e.readonly),"isStandalone"in e&&a(60,W=e.isStandalone)},e.$$.update=()=>{67108864&e.$$.dirty[1]&&a(21,d=M),2&e.$$.dirty[0]|1073741824&e.$$.dirty[1]|1&e.$$.dirty[2]&&N&&q&&D.items.map((({name:e,type:t,refItem:n})=>{if(!1===n)return;const i=q.items.find((t=>t.name===e));if(!i)return;if(t!==i.type)return;const o="_"+e;N[e]?a(4,R[e]=N[e],R):a(4,R[e]="",R),N[o]&&a(4,R[o]=N[o],R),a(13,le=!1)})),8&e.$$.dirty[0]|33554432&e.$$.dirty[1]&&a(22,f=O?V||"enablerr - Form":document.title)},[B,D,z,O,R,E,F,J,ee,te,ie,Z,X,le,xe,Se,ve,ye,Ee,we,Le,d,f,b,w,x,I,_,C,G,U,K,{name:"amountValue",properties:{decimals:2}},{name:"taxValue",properties:{decimals:2}},me,$e,{name:"weekValue",properties:{decimals:1}},ge,Ne,Fe,async()=>{a(17,ye=await t.getTemplate(D.class));const e=await t.getSectionView("owner",{});if(e?.length&&e[0].currency){const n=await t.getSectionView("currency",{_id:e[0].currency});n?.length&&n[0].designation&&a(7,J=n[0].designation)}if(be=await t.getEvent(Ne),z||(a(16,ve=ye),De(be.input?.class),Te(),ze(be)),z){if($&&$[z]){const e=$[z].record;D.items.map((t=>{e[t.name]=Oe(D.items,{name:t.name,value:e[t.name],checked:e[t.name]})})),a(4,R=e),D.list&&D.list.map((e=>{"array"===e.type&&$[z].lists[e.name]&&a(4,R[e.name]=$[z].lists[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,i])=>("_delete"!==n&&(t[n]=Oe(e.item,{name:n,value:i,checked:i},"",!0)),t)),{}))),[]),R)}))}else a(4,R=await t.getTask(D.class,z));a(56,V=h(D,R)),a(18,Ee=!!D.result?.resultDef),a(9,te=R._tax?._amount),a(10,ie=100*R._tax?._rate||"")}if(T){a(57,M=!1),a(61,q=await t.getSchema(T)),"string"==typeof A&&a(62,N=await t.getTask(q.class,A));const e=D.items.find((e=>e.refClass===q.class));a(4,R[e.name]=N._id,R)}if($e&&(ke=R[fe]||0),be.trigger?.startOn&&!be.trigger.startOn.some((e=>e.type.indexOf("Manual")>=0))&&a(57,M=!0),g.role?.length&&D.authorization?.length){const e=D.authorization.some((e=>v?.find((t=>t===e.role&&"edit"===e.activity))));a(57,M||=!e)}if(a(5,E="report"===be.output.type),a(19,we=!!(await t.getUserSettings()).isAdmin),!we){const e=y.tenants.find((e=>e._id===y.tenant));e&&a(19,we=e.admin?.find((e=>e===y.user)))}return!0},async e=>{z||a(21,d=!0);const n=e.submitter?.className?.includes("close"),i={};if(Array.from(document.querySelectorAll("form#"+G+" ."+G)).map((e=>{if(e.name)if(e.name.includes(".")){const[t,n]=e.name.split("."),o=D.list.find((e=>e.name===t));i[e.name]=Oe(o.item,e)}else i[e.name]=Oe(D.items,e)})),D.list&&D.list.map((e=>{"array"===e.type&&P[e.name]&&(i[e.name]=P[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,i])=>("_delete"!==n&&(t[n]=Oe(e.item,{name:n,value:i,checked:i},"",!0)),t)),{}))),[]))})),i._event=Ne,i._prevEventId=T,i._taskId=B,L){const e=L.record;for(const t in e)t.includes(".")&&delete e[t];e._event=L.event,e._taskId=L.taskId;const{id:n}=await t.saveData(L.class,e);i[L.class]||(i[L.class]=n)}const{id:o,task:r,tax:s,error:c}=await t.saveData(D.class,i);if(c?.text){const e=c.field?" in "+c.field+": "+c.value:"";return l.failed(`${c.text} ${e}`,3e3),void a(21,d=!1)}l.success("Die Daten wurden gespeichert.",2e3),a(9,te=s?._amount||0),a(10,ie=100*(s?._rate||0)||""),i._id=o;const u=await t.getTaskList(D.class,o);if(j("choose",{row:u}),n)return Me();if(!z){if(Le){const e=Math.floor(9e3*Math.random()+1e3).toString();return window.singleSpaNavigate(`/task/${Ne}/${Ne}/task?next=${e}`)}return window.singleSpaNavigate(`/task/${Ne}/${r}/task`)}},()=>!E&&T?window.history.back():Me(),async({detail:e})=>{const{row:n}=e;let{eventId:i}=e;if((()=>{if(z)for(const e of Ie)e.refName||Be(e.itemName)})(),z)return;if(await(async()=>{const e={...R};for(const n of D.items)if(n.refItem&&R[n.refItem]){const i=await t.getTask(n.refItem,R[n.refItem]);i&&(e[n.name]=i[n.name])}for(const n of D.list||[])if(n.refItem&&R[n.refItem]){const i=await t.getTask(n.refItem,R[n.refItem]),o=[];for(const e of i[n.name]){const t={};for(const i of n.item)e[i.name]&&(t[i.name]=e[i.name]);o.push(t)}e[n.name]=o}a(4,R=e)})(),i||=n._task?.event,(async(e,t)=>{if(!e)return;const n=be.output.class[0].name,i=Ce.filter((e=>e.lookup===n));if(i?.length)for(const e of i){const{lookup:n,name:i}=e;let o="";if(t){let e=await Zs(n,t);e&&e[i]?.length&&(o=e[i][0][i])}a(4,R[i]=o,R)}})(i,n._id),i&&D.items.filter((e=>e.properties?.lookup)).forEach((async e=>{const n=await t.getEvent(i);n.output.class[0]?.name===e.properties.lookup&&a(4,R[e.name]="",R)})),!n._task)return;const o=n._task.event,r=await t.getEvent(o);if(!be.output?.class?.length)return;const l=be.output.class[0]?.item.find((e=>(e.refClass||e.name)===r.output.class[0]?.name));(be.input?.class?.length&&be.input.class[0].name===r.output.class[0]?.name||l?.asInput)&&(a(61,q=await t.getSchema(o)),a(58,T=o),a(0,B=n._task._id),a(62,N=B?await t.getTask(q.class,n._task.docId):{}),We(q.class,n?._task?.docId))},async({detail:e})=>{if(a(6,F=e),"quantity"===e.itemName&&a(12,X=R.quantity),(async(e,t)=>{const n=_e.filter((t=>t.selection===e||t.constraint===e));if(n?.length){a(11,Z=!1);for(const i of n){const{selection:n,constraint:o,name:r}=i;if(t)break;a(4,R[r]="",R),e===n&&a(11,Z=o);const l=R[n];if(l&&e===o){let e=await Zs(n,l);const t=R[o];if(t?.length){const n=t[0].split(", ");e=e[o];let i="";for(const t of e)Object.values(t).map((e=>{n.includes(e)&&(i=t[r])}));a(4,R[r]=i,R)}}}}})(e.itemName,e.oldValue===e.value),Be(e.itemName),$e&&fe&&(e.itemName===fe&&(ke=+e.value),Pe()),ue&&me){if(e.itemName===ae?.name)oe=e.value;else if(e.itemName===ce?.name)re=e.value;else{if(e.itemName!==de?.name)return;oe=e.value}Re()}},async({detail:e})=>{if(!(D.input?.length&&D.input.length>1))return;if(q?.class!==D.input[0])return;const{value:n,lookup:i,view:o}=e;if(!i)return;const[r]=i.split(":"),l=(await t.getSectionView(r,{[o]:{$in:n}})).map((e=>e._id));for(const e of D.input.slice(1)){a(4,R[e]=[],R);const n=await t.getSchemaByClass(e);n.id;let i=await t.getTasks(n.id);if(i=i.data.filter((e=>"Ready"===e._task?.status&&l.includes(e[r]))),i?.length){const n=i.map((e=>e._id)),o=await t.getSectionView(e,{_id:{$in:n}});for(const t of o)t[e]=t._id;a(4,R[e]=o,R)}}},({detail:e})=>{P[e.listName]=e.value,me&&(se[e.listName]=e.amountValue,Re()),$e&&(he[e.listName]=e.weeksValue||0,Pe())},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},e=>async()=>{const n=await t.getReportDoc(e)||{},{userReportId:i,type:o}=n;if(!i)return;const r="/api/userreport/"+i;if("ics"===o)return window.open(r,"_self","width=1 height=1");const l="/viewer/doc/index.html?file="+r+"&type="+o;window.open(l,"","popup=yes toolbar=no width=624 height=900")},e=>async()=>{const e=await t.getDocData(B);(async(e,t)=>{const n=window.screen.height,i=window.open("","_blank","width=800,height="+n+",location=no");await ne(),i?.document.write("<title>Report Daten für '"+D.identity.designation+"'</title>"),i?.document.write("<textarea readonly style='resize: none; width: 100%; height: 100%;'>"+e+"</textarea>")})(JSON.stringify(e,null,4),D.identity.designation)},async()=>{const e=Ye();if(!e)return;const n=be.result?.resultDef[0]?.addToReports;if(n){const i=e[n];if(i){const n={docId:i},o=(await t.getSectionView("_task",n))[0];e._taskId=o._id}}const{reportId:i,type:o}=await t.createReport(Ne,e);Ge(i),setTimeout(Me,2e3)},async()=>{const e=Ye();if(!e)return;const n=await t.getReportData(Ne,e),i=window.screen.height,o=window.open("","_blank","width=800,height="+i+",location=no");await ne(),o?.document.write("<title>Report Daten für '"+D.identity.designation+"'</title>"),o?.document.write("<textarea readonly style='resize: none; width: 100%; height: 100%;'>"+JSON.stringify(n,null,4)+"</textarea>")},async({detail:{className:e,itemName:n,value:i}})=>{if(qe!==i)return;if(je.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===qe))),!i)return;const o={[n]:!0},r=await t.getSectionView(e,o);r?.length&&je.set(e,r[0])},({detail:e})=>{L=e},({detail:e})=>{setTimeout((()=>{a(4,R[e.itemName]=e.value,R)}),200)},()=>D.result.resultDef[0].button?.designation||"Dokument erstellen",V,M,T,A,W,q,N,function(e){ee=e,a(8,ee)},function(e){te=e,a(9,te)},function(e){xe=e,a(14,xe)},function(e){Le=e,a(20,Le)}]}class ta extends ke{constructor(e){var t;super(),ss.getElementById("svelte-9xiaib-style")||((t=q("style")).id="svelte-9xiaib-style",t.textContent="form.disabled.svelte-9xiaib input.svelte-9xiaib{background-color:red !important}input:placeholder-shown{font-style:italic}form.svelte-9xiaib.svelte-9xiaib{min-width:25em}hr[data-text]{margin-bottom:1em !important}@media only screen and (min-width: 600px){form.svelte-9xiaib.svelte-9xiaib{min-width:30em}}.fEmbedded.svelte-9xiaib.svelte-9xiaib,.fTask.svelte-9xiaib.svelte-9xiaib{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-9xiaib.svelte-9xiaib{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-9xiaib.svelte-9xiaib{height:fit-content;max-height:70vh}.sTask.svelte-9xiaib.svelte-9xiaib{height:95%;display:inline-grid}.sTask.svelte-9xiaib .btn.svelte-9xiaib{display:initial !important}.form--buttons.svelte-9xiaib.svelte-9xiaib{display:flex;gap:1em;padding-top:0.75em}section.sTask div.date-picker div.dropdown-shell div.dropdown.calendar{position:fixed !important;left:auto !important}form.fTask div.form-field{min-width:49vw}",_(ss.head,t)),xe(this,e,ea,Ps,x,{schema:1,recID:2,prevEventID:58,prev:59,taskId:0,description:56,root:3,readonly:57,isStandalone:60},[-1,-1,-1,-1,-1])}}function na(e){let t,n,i;function o(t){e[4](t)}let r={schema:e[5],recID:e[6]};return void 0!==e[0]&&(r.description=e[0]),t=new ta({props:r}),K.push((()=>ve(t,"description",o))),t.$on("back",e[2]),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};32&i&&(o.schema=e[5]),64&i&&(o.recID=e[6]),!n&&1&i&&(n=!0,o.description=e[0],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function ia(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[na,({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(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,[n]){const i={};1&n&&(i.description=e[0]),353&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function oa(e,n,i){let o,{refresh:r}=n;return e.$$set=e=>{"refresh"in e&&i(3,r=e.refresh)},[o,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},r,function(e){o=e,i(0,o)}]}function ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var la,sa,aa=(la=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==r(e))throw new Error("single-spa-svelte requires a configuration object");var t=i(i({},l),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 l={component:null,domElementGetter:null,props:{}};function s(e){return Promise.resolve()}function a(e,t,n){var o=Object.keys(l),r=Object.keys(e).reduce((function(t,n){return o.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var o=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),l=o();t.instance=new e.component(i(i({},r),{},{target:l,props:Object.assign({},n,e.props)}))}))}function c(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function d(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},la(sa={exports:{}},sa.exports),sa.exports);const ca=ra(aa)({component:class extends ke{constructor(e){super(),xe(this,e,oa,ia,x,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:da,mount:ua,unmount:ma}=ca;e({bootstrap:da,mount:ua,unmount:ma});e("Form",ta),e("List",Ct),e("Template",class extends ke{constructor(e){var t;super(),qn.getElementById("svelte-1phofh5-style")||((t=q("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}",_(qn.head,t)),xe(this,e,Rn,Mn,x,{schema:0,record:1})}})}}}));
1
+ System.register(["@enablerr-ui/form","@enablerr-ui/layout","@enablerr-ui/auth","@enablerr-ui/task"],(function(e){"use strict";var t,n,i,o,r,l,s,a,c,d,u,m;return{setters:[function(e){t=e.Request,n=e.task_notification,i=e.currentRoles,o=e.TextArea,r=e.Storage,l=e.toasts,s=e.settings,a=e.Page},function(e){c=e.getAttractions,d=e.PopOver},function(e){u=e.user},function(e){m=e.taskClipboard}],execute:function(){e("version","0.2.597");const f=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(" · "))),p=e=>{try{return new Date(e).toLocaleString()}catch{return e}},$=e=>e?"(ja)":"(nein)",h=(e,t)=>{const n={...t};return(e.display?.reduce(((t,i)=>{let[o,r]=i.split(".");if(e.list?.find((({name:e})=>e===o))&&r&&void 0!==n[o]){const e=`${o}_${r}`;n[e]=n[o][r],o=e}return t.find((e=>e===o))||t.push(o),t}),[]).map((e=>"boolean"==typeof n[e]?$(n[e]):f(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&$(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")};function g(){}function v(e){return e()}function y(){return Object.create(null)}function b(e){e.forEach(v)}function w(e){return"function"==typeof e}function x(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function k(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return g;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function I(e){return null==e?"":e}function _(e,t){e.appendChild(t)}function C(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode.removeChild(e)}function j(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function q(e){return document.createElement(e)}function N(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function E(e){return document.createTextNode(e)}function L(){return E(" ")}function F(){return E("")}function D(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function z(e){return function(t){return t.preventDefault(),e.call(this,t)}}function T(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function A(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function B(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function V(e,t){e.value=null==t?"":t}function O(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function M(e,t,n){e.classList[n?"add":"remove"](t)}let W;function R(e){W=e}function P(){if(!W)throw new Error("Function called outside component initialization");return W}function H(e){P().$$.on_mount.push(e)}function Q(e){P().$$.on_destroy.push(e)}function Y(){const e=P();return(t,n)=>{const i=e.$$.callbacks[t];if(i){const o=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);i.slice().forEach((t=>{t.call(e,o)}))}}}function G(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const U=[],K=[],J=[],Z=[],X=Promise.resolve();let ee=!1;function te(){ee||(ee=!0,X.then(se))}function ne(){return te(),X}function ie(e){J.push(e)}function oe(e){Z.push(e)}let re=!1;const le=new Set;function se(){if(!re){re=!0;do{for(let e=0;e<U.length;e+=1){const t=U[e];R(t),ae(t.$$)}for(R(null),U.length=0;K.length;)K.pop()();for(let e=0;e<J.length;e+=1){const t=J[e];le.has(t)||(le.add(t),t())}J.length=0}while(U.length);for(;Z.length;)Z.pop()();ee=!1,re=!1,le.clear()}}function ae(e){if(null!==e.fragment){e.update(),b(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ie)}}const ce=new Set;let de;function ue(){de={r:0,c:[],p:de}}function me(){de.r||b(de.c),de=de.p}function fe(e,t){e&&e.i&&(ce.delete(e),e.i(t))}function pe(e,t,n,i){if(e&&e.o){if(ce.has(e))return;ce.add(e),de&&de.c.push((()=>{ce.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}function $e(e,t){const n=t.token={};function i(e,i,o,r){if(t.token!==n)return;t.resolved=r;let l=t.ctx;void 0!==o&&(l=l.slice(),l[o]=r);const s=e&&(t.current=e)(l);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==i&&e&&(ue(),pe(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),me())})):t.block.d(1),s.c(),fe(s,1),s.m(t.mount(),t.anchor),a=!0),t.block=s,t.blocks&&(t.blocks[i]=s),a&&se()}if((o=e)&&"object"==typeof o&&"function"==typeof o.then){const n=P();if(e.then((e=>{R(n),i(t.then,1,t.value,e),R(null)}),(e=>{if(R(n),i(t.catch,2,t.error,e),R(null),!t.hasCatch)throw e})),t.current!==t.pending)return i(t.pending,0),!0}else{if(t.current!==t.then)return i(t.then,1,t.value,e),!0;t.resolved=e}var o}function he(e,t,n){const i=t.slice(),{resolved:o}=e;e.current===e.then&&(i[e.value]=o),e.current===e.catch&&(i[e.error]=o),e.block.p(i,n)}const ge="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ve(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function ye(e){e&&e.c()}function be(e,t,n,i){const{fragment:o,on_mount:r,on_destroy:l,after_update:s}=e.$$;o&&o.m(t,n),i||ie((()=>{const t=r.map(v).filter(w);l?l.push(...t):b(t),e.$$.on_mount=[]})),s.forEach(ie)}function we(e,t){const n=e.$$;null!==n.fragment&&(b(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function xe(e,t,n,i,o,r,l=[-1]){const s=W;R(e);const a=e.$$={fragment:null,ctx:null,props:r,update:g,not_equal:o,bound:y(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:t.context||[]),callbacks:y(),dirty:l,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...i)=>{const r=i.length?i[0]:n;return a.ctx&&o(a.ctx[t],a.ctx[t]=r)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](r),c&&function(e,t){-1===e.$$.dirty[0]&&(U.push(e),te(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,b(a.before_update),a.fragment=!!i&&i(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(S)}else a.fragment&&a.fragment.c();t.intro&&fe(e.$$.fragment),be(e,t.target,t.anchor,t.customElement),se()}R(s)}class ke{$destroy(){we(this,1),this.$destroy=g}$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 Ie(e){let t,n,i,o,r;return{c(){t=N("svg"),n=N("circle"),i=N("polyline"),o=N("line"),A(n,"cx","12"),A(n,"cy","12"),A(n,"r","10"),A(i,"points","8 12 12 16 16 12"),A(o,"x1","12"),A(o,"y1","8"),A(o,"x2","12"),A(o,"y2","16"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",r="feather feather-arrow-down-circle "+e[2])},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-arrow-down-circle "+e[2])&&A(t,"class",r)},i:g,o:g,d(e){e&&S(t)}}}function _e(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ce extends ke{constructor(e){super(),xe(this,e,_e,Ie,x,{size:0,strokeWidth:1,class:2})}}function Se(e){let t,n,i,o;return{c(){t=N("svg"),n=N("path"),i=N("polyline"),A(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),A(i,"points","22 4 12 14.01 9 11.01"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",o="feather feather-check-circle "+e[2])},m(e,o){C(e,t,o),_(t,n),_(t,i)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-check-circle "+e[2])&&A(t,"class",o)},i:g,o:g,d(e){e&&S(t)}}}function je(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class qe extends ke{constructor(e){super(),xe(this,e,je,Se,x,{size:0,strokeWidth:1,class:2})}}function Ne(e){let t,n,i;return{c(){t=N("svg"),n=N("path"),A(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"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",i="feather feather-command "+e[2])},m(e,i){C(e,t,i),_(t,n)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-command "+e[2])&&A(t,"class",i)},i:g,o:g,d(e){e&&S(t)}}}function Ee(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Le extends ke{constructor(e){super(),xe(this,e,Ee,Ne,x,{size:0,strokeWidth:1,class:2})}}function Fe(e){let t,n,i,o;return{c(){t=N("svg"),n=N("polyline"),i=N("path"),A(n,"points","9 10 4 15 9 20"),A(i,"d","M20 4v7a4 4 0 0 1-4 4H4"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",o="feather feather-corner-down-left "+e[2])},m(e,o){C(e,t,o),_(t,n),_(t,i)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-corner-down-left "+e[2])&&A(t,"class",o)},i:g,o:g,d(e){e&&S(t)}}}function De(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class ze extends ke{constructor(e){super(),xe(this,e,De,Fe,x,{size:0,strokeWidth:1,class:2})}}function Te(e){let t,n,i,o,r;return{c(){t=N("svg"),n=N("path"),i=N("line"),o=N("line"),A(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),A(i,"x1","18"),A(i,"y1","9"),A(i,"x2","12"),A(i,"y2","15"),A(o,"x1","12"),A(o,"y1","9"),A(o,"x2","18"),A(o,"y2","15"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",r="feather feather-delete "+e[2])},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-delete "+e[2])&&A(t,"class",r)},i:g,o:g,d(e){e&&S(t)}}}function Ae(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Be extends ke{constructor(e){super(),xe(this,e,Ae,Te,x,{size:0,strokeWidth:1,class:2})}}function Ve(e){let t,n,i,o,r;return{c(){t=N("svg"),n=N("path"),i=N("polyline"),o=N("line"),A(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),A(i,"points","15 3 21 3 21 9"),A(o,"x1","10"),A(o,"y1","14"),A(o,"x2","21"),A(o,"y2","3"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",r="feather feather-external-link "+e[2])},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-external-link "+e[2])&&A(t,"class",r)},i:g,o:g,d(e){e&&S(t)}}}function Oe(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Me extends ke{constructor(e){super(),xe(this,e,Oe,Ve,x,{size:0,strokeWidth:1,class:2})}}function We(e){let t,n,i,o,r;return{c(){t=N("svg"),n=N("circle"),i=N("line"),o=N("path"),A(n,"cx","12"),A(n,"cy","12"),A(n,"r","10"),A(i,"x1","2"),A(i,"y1","12"),A(i,"x2","22"),A(i,"y2","12"),A(o,"d","M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",r="feather feather-globe "+e[2])},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-globe "+e[2])&&A(t,"class",r)},i:g,o:g,d(e){e&&S(t)}}}function Re(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Pe extends ke{constructor(e){super(),xe(this,e,Re,We,x,{size:0,strokeWidth:1,class:2})}}function He(e){let t,n,i,o;return{c(){t=N("svg"),n=N("path"),i=N("polyline"),A(n,"d","M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"),A(i,"points","22,6 12,13 2,6"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",o="feather feather-mail "+e[2])},m(e,o){C(e,t,o),_(t,n),_(t,i)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-mail "+e[2])&&A(t,"class",o)},i:g,o:g,d(e){e&&S(t)}}}function Qe(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ye extends ke{constructor(e){super(),xe(this,e,Qe,He,x,{size:0,strokeWidth:1,class:2})}}function Ge(e){let t,n,i,o;return{c(){t=N("svg"),n=N("path"),i=N("circle"),A(n,"d","M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"),A(i,"cx","12"),A(i,"cy","10"),A(i,"r","3"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",o="feather feather-map-pin "+e[2])},m(e,o){C(e,t,o),_(t,n),_(t,i)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-map-pin "+e[2])&&A(t,"class",o)},i:g,o:g,d(e){e&&S(t)}}}function Ue(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ke extends ke{constructor(e){super(),xe(this,e,Ue,Ge,x,{size:0,strokeWidth:1,class:2})}}function Je(e){let t,n,i,o,r;return{c(){t=N("svg"),n=N("polyline"),i=N("line"),o=N("path"),A(n,"points","23 7 23 1 17 1"),A(i,"x1","16"),A(i,"y1","8"),A(i,"x2","23"),A(i,"y2","1"),A(o,"d","M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",r="feather feather-phone-outgoing "+e[2])},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-phone-outgoing "+e[2])&&A(t,"class",r)},i:g,o:g,d(e){e&&S(t)}}}function Ze(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Xe extends ke{constructor(e){super(),xe(this,e,Ze,Je,x,{size:0,strokeWidth:1,class:2})}}function et(e){let t,n,i,o,r;return{c(){t=N("svg"),n=N("polyline"),i=N("path"),o=N("rect"),A(n,"points","6 9 6 2 18 2 18 9"),A(i,"d","M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"),A(o,"x","6"),A(o,"y","14"),A(o,"width","12"),A(o,"height","8"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",r="feather feather-printer "+e[2])},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-printer "+e[2])&&A(t,"class",r)},i:g,o:g,d(e){e&&S(t)}}}function tt(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class nt extends ke{constructor(e){super(),xe(this,e,tt,et,x,{size:0,strokeWidth:1,class:2})}}function it(e){let t,n,i,o;return{c(){t=N("svg"),n=N("circle"),i=N("line"),A(n,"cx","11"),A(n,"cy","11"),A(n,"r","8"),A(i,"x1","21"),A(i,"y1","21"),A(i,"x2","16.65"),A(i,"y2","16.65"),A(t,"xmlns","http://www.w3.org/2000/svg"),A(t,"width",e[0]),A(t,"height",e[0]),A(t,"fill","none"),A(t,"viewBox","0 0 24 24"),A(t,"stroke","currentColor"),A(t,"stroke-width",e[1]),A(t,"stroke-linecap","round"),A(t,"stroke-linejoin","round"),A(t,"class",o="feather feather-search "+e[2])},m(e,o){C(e,t,o),_(t,n),_(t,i)},p(e,[n]){1&n&&A(t,"width",e[0]),1&n&&A(t,"height",e[0]),2&n&&A(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-search "+e[2])&&A(t,"class",o)},i:g,o:g,d(e){e&&S(t)}}}function ot(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class rt extends ke{constructor(e){super(),xe(this,e,ot,it,x,{size:0,strokeWidth:1,class:2})}}const{document:lt}=ge;function st(e){e[36]=e[37].items}function at(e,t,n){const i=e.slice();return i[38]=t[n],i}function ct(e,t,n){const i=e.slice();return i[41]=t[n],i}function dt(e,t,n){const i=e.slice();return i[41]=t[n],i}function ut(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function mt(e){let t,n,i,o,r,l;st(e);let s=e[5]?.length&&ft(e),a=e[36]?.length&&$t(e),c=e[5]?.length&&vt(e);return{c(){s&&s.c(),t=L(),n=q("div"),i=q("table"),a&&a.c(),o=L(),r=q("tbody"),c&&c.c(),A(i,"striped",""),A(i,"class","svelte-btngop"),A(n,"class","eList svelte-btngop")},m(e,d){s&&s.m(e,d),C(e,t,d),C(e,n,d),_(n,i),a&&a.m(i,null),_(i,o),_(i,r),c&&c.m(r,null),l=!0},p(e,n){st(e),e[5]?.length?s?(s.p(e,n),32&n[0]&&fe(s,1)):(s=ft(e),s.c(),fe(s,1),s.m(t.parentNode,t)):s&&(ue(),pe(s,1,1,(()=>{s=null})),me()),e[36]?.length?a?a.p(e,n):(a=$t(e),a.c(),a.m(i,o)):a&&(a.d(1),a=null),e[5]?.length?c?(c.p(e,n),32&n[0]&&fe(c,1)):(c=vt(e),c.c(),fe(c,1),c.m(r,null)):c&&(ue(),pe(c,1,1,(()=>{c=null})),me())},i(e){l||(fe(s),fe(c),l=!0)},o(e){pe(s),pe(c),l=!1},d(e){s&&s.d(e),e&&S(t),e&&S(n),a&&a.d(),c&&c.d()}}}function ft(e){let t,n,i,o,r,l,s,a,c,d,u,m=e[6]&&pt(e);function f(t){e[27](t)}let p={id:e[10]};return void 0!==e[3]&&(p.value=e[3]),o=new e[8]({props:p}),K.push((()=>ve(o,"value",f))),o.$on("input",e[14]),a=new Be({props:{size:"18"}}),{c(){m&&m.c(),t=L(),n=q("div"),i=E("Suchen: "),ye(o.$$.fragment),l=L(),s=q("span"),ye(a.$$.fragment),A(s,"class","feather pointer svelte-btngop"),O(n,"margin-bottom","1em"),O(n,"position","relative")},m(r,f){m&&m.m(r,f),C(r,t,f),C(r,n,f),_(n,i),be(o,n,null),_(n,l),_(n,s),be(a,s,null),c=!0,d||(u=D(s,"click",e[17]),d=!0)},p(e,n){e[6]?m?64&n[0]&&fe(m,1):(m=pt(e),m.c(),fe(m,1),m.m(t.parentNode,t)):m&&(ue(),pe(m,1,1,(()=>{m=null})),me());const i={};!r&&8&n[0]&&(r=!0,i.value=e[3],oe((()=>r=!1))),o.$set(i)},i(e){c||(fe(m),fe(o.$$.fragment,e),fe(a.$$.fragment,e),c=!0)},o(e){pe(m),pe(o.$$.fragment,e),pe(a.$$.fragment,e),c=!1},d(e){m&&m.d(e),e&&S(t),e&&S(n),we(o),we(a),d=!1,u()}}}function pt(e){let t,n;return t=new e[7]({}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function $t(e){let t,n,i,o=e[4]&&e[0]&&ht(),r=e[36],l=[];for(let t=0;t<r.length;t+=1)l[t]=gt(dt(e,r,t));return{c(){t=q("thead"),n=q("tr"),o&&o.c(),i=L();for(let e=0;e<l.length;e+=1)l[e].c();A(n,"class","svelte-btngop"),A(t,"class","svelte-btngop")},m(e,r){C(e,t,r),_(t,n),o&&o.m(n,null),_(n,i);for(let e=0;e<l.length;e+=1)l[e].m(n,null)},p(e,t){if(e[4]&&e[0]?o||(o=ht(),o.c(),o.m(n,i)):o&&(o.d(1),o=null),8196&t[0]){let i;for(r=e[36],i=0;i<r.length;i+=1){const o=dt(e,r,i);l[i]?l[i].p(o,t):(l[i]=gt(o),l[i].c(),l[i].m(n,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=r.length}},d(e){e&&S(t),o&&o.d(),j(l,e)}}}function ht(e){let t;return{c(){t=q("th"),A(t,"class","svelte-btngop")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function gt(e){let t,n,i=e[41]?.designation+"";return{c(){t=q("th"),n=E(i),A(t,"class","svelte-btngop")},m(e,i){C(e,t,i),_(t,n)},p(e,t){4&t[0]&&i!==(i=e[41]?.designation+"")&&B(n,i)},d(e){e&&S(t)}}}function vt(e){let t,n,i=e[5],o=[];for(let t=0;t<i.length;t+=1)o[t]=xt(at(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(112703&n[0]){let l;for(i=e[5],l=0;l<i.length;l+=1){const r=at(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=xt(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}function yt(e){let t,n,i,o,r=e[4]&&e[0]&&bt(e),l=e[36],s=[];for(let t=0;t<l.length;t+=1)s[t]=wt(ct(e,l,t));return{c(){t=q("tr"),r&&r.c(),n=L();for(let e=0;e<s.length;e+=1)s[e].c();i=L(),A(t,"class","pointer svelte-btngop"),M(t,"active",e[38]._id===e[1])},m(e,l){C(e,t,l),r&&r.m(t,null),_(t,n);for(let e=0;e<s.length;e+=1)s[e].m(t,null);_(t,i),o=!0},p(e,o){if(e[4]&&e[0]?r?(r.p(e,o),17&o[0]&&fe(r,1)):(r=bt(e),r.c(),fe(r,1),r.m(t,n)):r&&(ue(),pe(r,1,1,(()=>{r=null})),me()),14372&o[0]){let n;for(l=e[36],n=0;n<l.length;n+=1){const r=ct(e,l,n);s[n]?s[n].p(r,o):(s[n]=wt(r),s[n].c(),s[n].m(t,i))}for(;n<s.length;n+=1)s[n].d(1);s.length=l.length}34&o[0]&&M(t,"active",e[38]._id===e[1])},i(e){o||(fe(r),o=!0)},o(e){pe(r),o=!1},d(e){e&&S(t),r&&r.d(),j(s,e)}}}function bt(e){let t,n,i,o,r;return i=new Me({props:{size:"18"}}),{c(){t=q("td"),n=q("a"),ye(i.$$.fragment),A(n,"href",o=e[16](e[38])),A(n,"target","_blank"),A(t,"class","editRow svelte-btngop")},m(e,o){C(e,t,o),_(t,n),be(i,n,null),r=!0},p(e,t){(!r||32&t[0]&&o!==(o=e[16](e[38])))&&A(n,"href",o)},i(e){r||(fe(i.$$.fragment,e),r=!0)},o(e){pe(i.$$.fragment,e),r=!1},d(e){e&&S(t),we(i)}}}function wt(e){let t,n,i,o,r=e[11](e[38],e[41])+"";return{c(){t=q("td"),n=E(r),A(t,"class","svelte-btngop")},m(r,l){C(r,t,l),_(t,n),i||(o=D(t,"click",T((function(){w(e[12](e[38]))&&e[12](e[38]).apply(this,arguments)}))),i=!0)},p(t,i){e=t,36&i[0]&&r!==(r=e[11](e[38],e[41])+"")&&B(n,r)},d(e){e&&S(t),i=!1,o()}}}function xt(e){let t,n,i=e[15](e[38],e[36],e[3]),o=i&&yt(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){44&n[0]&&(i=e[15](e[38],e[36],e[3])),i?o?(o.p(e,n),44&n[0]&&fe(o,1)):(o=yt(e),o.c(),fe(o,1),o.m(t.parentNode,t)):o&&(ue(),pe(o,1,1,(()=>{o=null})),me())},i(e){n||(fe(o),n=!0)},o(e){pe(o),n=!1},d(e){o&&o.d(e),e&&S(t)}}}function kt(e){let t,n;return t=new e[7]({}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p:g,i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function It(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:kt,then:mt,catch:ut,value:37,blocks:[,,,]};return $e(n=e[2]&&e[13](),o),{c(){t=F(),o.block.c()},m(e,n){C(e,t,n),o.block.m(e,o.anchor=n),o.mount=()=>t.parentNode,o.anchor=t,i=!0},p(t,i){e=t,o.ctx=e,4&i[0]&&n!==(n=e[2]&&e[13]())&&$e(n,o)||he(o,e,i)},i(e){i||(fe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){e&&S(t),o.block.d(e),o.token=null,o=null}}}function _t(e,i,o){let r;const l=Y(),{Loading:s,TextField:a}=c,{currentTasks:d}=u;k(e,d,(e=>o(29,r=e)));let m,p,h,{inputList:g}=i,{eventId:v}=i,{prevEventId:y}=i,{className:b}=i,{rowId:w}=i,{filterForReady:x=!1}=i,{refStatus:I}=i,{showEdit:_=!1}=i,{praefix:C=""}=i,{selectionFields:S=!1}=i,{deList:j}=i,q=!0,N="",E=b+Math.floor(9e3*Math.random()+1e3).toString()+"search",L=!1;const F=(e,t)=>{if(!t)return;let n=e[t.name];if(Array.isArray(n)){const e=e=>e.replaceAll(" ",String.fromCharCode(160));n=n.map(e),n.length>3&&(n=n.slice(0,3),n=n.concat("...")),n=n.join(", ")}return"boolean"==typeof n?$(n):f(e[`_${t.name}`]||n||"")},D=t.getSchemaByClass(b),z=async(e,n)=>{if(I)return o(18,I=[].concat(I)),e.filter((e=>!!I.find((t=>e._task.status===t))));if("Information"===n.state.task)return e;if(y){const n=await t.getEvent(y);if("report"===n?.output?.type)return e;if(n?.input?.class?.length&&n.input.class[0].name===b)return"Information"===n.state.task?e.filter((e=>"Closed"!==e._task.status)):e.filter((e=>"Ready"===e._task.status))}return e.filter((e=>"WaitingForApproval"===e._task.status||"Ready"===e._task.status||"Closing"===e._task.status))},T=async(e,t,n,i)=>{const{value:o,refClass:r}=i,[l,s]=n.split("."),a=o?.get(C),c=a&&await Zs(l,a);if(!c)return e;const d=c[s];return d?.length?d.map((n=>{let i=e?.find((e=>e._id===n[t]))||{};i={...i};for(const e in i)n[e]&&(i[e]=n[e]);for(const e in n)n[e]&&(i[e]=n[e]);return Ks(r+i._id.toString(),i),i})):e};H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(E)?.focus()}),200)})),n.subscribe((async e=>{if(!e)return;const t=await D;e.eventId===t.id&&(Xs(t.class,e.eventId),o(2,q=!o(2,q=!1)))}));return e.$$set=e=>{"inputList"in e&&o(19,g=e.inputList),"eventId"in e&&o(20,v=e.eventId),"prevEventId"in e&&o(21,y=e.prevEventId),"className"in e&&o(22,b=e.className),"rowId"in e&&o(1,w=e.rowId),"filterForReady"in e&&o(23,x=e.filterForReady),"refStatus"in e&&o(18,I=e.refStatus),"showEdit"in e&&o(0,_=e.showEdit),"praefix"in e&&o(24,C=e.praefix),"selectionFields"in e&&o(25,S=e.selectionFields),"deList"in e&&o(26,j=e.deList)},[_,w,q,N,m,p,L,s,a,d,E,F,e=>()=>(o(5,p=[]),l("choose",{row:e})),async()=>{const e=await D;o(4,m=(e=>!r?.length||!!r.find((t=>t===e)))(e.id)),o(5,p=h=g||await Gs(e.class,e.id)),500===p?.length&&(o(6,L=!0),t.getTasksList(e.id,!1,!0).then((({data:e})=>{o(6,L=!1),o(5,p=e),p?.length&&window.setTimeout((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"})}),200)})));let n,i=!1,s="";const a=S&&S?.find((t=>e.class===t.refClass.split(":")[0])),c=a?.value?.get&&a.value.get(C);if(c){const[r,l]=a.refClass.split(":");e.class===r&&o(5,p=await T(p,r,l,a)),i=a.parentClass?.find((e=>"quantity"===e.name)),s=a.className,n=await t.getCountedSection(s,l.split(".")[0],c,r,"quantity")}o(0,_&&=!a),a||!x&&!I||o(5,p=await z(p,e));let d=[],{display:u}=e;return u&&u.length?u.map((t=>{const[n,i]=t.split(".");let r=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===i));r&&(r={...r},r.name=`${n}_${i}`,o(5,p=p.map((e=>(e[n]&&(e[r.name]=e["_"+n]?e["_"+n][i]:e[n][i]),e))))),r||(r=e.items.find((e=>e.name===n))),d.find((e=>e?.name===n))||d.push(r)})):d=e.items,!_&&i?(d=d.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),o(5,p=p.map((e=>{const t=n.find((t=>t._id===e._id));return t&&(e.ist=t.quantity.$numberDecimal),e}))),n.map((e=>{if(!p.find((t=>t._id===e._id))){const t=h.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,p.push(t)}})),l("init",p)):j&&o(5,p=p.filter((e=>!j.find((t=>t._id===e._id))))),{items:d}},({detail:{value:e}})=>{o(3,N=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(F(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},e=>`/task/${e._task.event}/${e._task._id}/task?view=standalone`,()=>{o(3,N="")},I,g,v,y,b,x,C,S,j,function(e){N=e,o(3,N)}]}class Ct extends ke{constructor(e){var t;super(),lt.getElementById("svelte-btngop-style")||((t=q("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}",_(lt.head,t)),xe(this,e,_t,It,x,{inputList:19,eventId:20,prevEventId:21,className:22,rowId:1,filterForReady:23,refStatus:18,showEdit:0,praefix:24,selectionFields:25,deList:26},[-1,-1])}}function St(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function jt(e){let t,n,i=e[39]&&qt(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[39]?i?(i.p(e,n),8&n[0]&&fe(i,1)):(i=qt(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function qt(e){let t,n;return t=new e[19]({props:{title:e[15]?"Auswahl":e[0],class:"eList "+(e[13]?"form":""),$$slots:{default:[Vt]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};32769&n[0]&&(i.title=e[15]?"Auswahl":e[0]),8192&n[0]&&(i.class="eList "+(e[13]?"form":"")),524286&n[0]|512&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Nt(e){let t,n;return t=new ta({props:{schema:e[2],recID:e[1],readonly:e[14]}}),t.$on("choose",(function(){w(e[28](e[39]))&&e[28](e[39]).apply(this,arguments)})),t.$on("back",e[25]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(n,i){e=n;const o={};4&i[0]&&(o.schema=e[2]),2&i[0]&&(o.recID=e[1]),16384&i[0]&&(o.readonly=e[14]),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Et(e){let t,n,i,o,r,l,s;t=new e[20]({props:{text:e[15]?"Zusätzliche Auswahl":""}});const a=[Ft,Lt],c=[];function d(e,t){return e[15]?0:1}return i=d(e),o=c[i]=a[i](e),l=new Ct({props:{eventId:e[2].id,className:e[2].class,prevEventId:e[11],filterForReady:e[4],refStatus:e[5],praefix:e[6],selectionFields:e[7],rowId:e[1],deList:e[9],showEdit:e[8]}}),l.$on("edit",e[29]),l.$on("choose",e[32]),l.$on("init",e[30]),{c(){ye(t.$$.fragment),n=L(),o.c(),r=L(),ye(l.$$.fragment)},m(e,o){be(t,e,o),C(e,n,o),c[i].m(e,o),C(e,r,o),be(l,e,o),s=!0},p(e,n){const s={};32768&n[0]&&(s.text=e[15]?"Zusätzliche Auswahl":""),t.$set(s);let u=i;i=d(e),i===u?c[i].p(e,n):(ue(),pe(c[u],1,1,(()=>{c[u]=null})),me(),o=c[i],o?o.p(e,n):(o=c[i]=a[i](e),o.c()),fe(o,1),o.m(r.parentNode,r));const m={};4&n[0]&&(m.eventId=e[2].id),4&n[0]&&(m.className=e[2].class),2048&n[0]&&(m.prevEventId=e[11]),16&n[0]&&(m.filterForReady=e[4]),32&n[0]&&(m.refStatus=e[5]),64&n[0]&&(m.praefix=e[6]),128&n[0]&&(m.selectionFields=e[7]),2&n[0]&&(m.rowId=e[1]),512&n[0]&&(m.deList=e[9]),256&n[0]&&(m.showEdit=e[8]),l.$set(m)},i(e){s||(fe(t.$$.fragment,e),fe(o),fe(l.$$.fragment,e),s=!0)},o(e){pe(t.$$.fragment,e),pe(o),pe(l.$$.fragment,e),s=!1},d(e){we(t,e),e&&S(n),c[i].d(e),e&&S(r),we(l,e)}}}function Lt(e){let t,n,i,o;n=new e[21]({props:{outline:!0,$$slots:{default:[Dt]},$$scope:{ctx:e}}}),n.$on("click",e[26]);let r=e[23]&&e[10]&&zt(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),r&&r.c(),A(t,"class","form--buttons svelte-jb5mrh")},m(e,l){C(e,t,l),be(n,t,null),_(t,i),r&&r.m(t,null),o=!0},p(e,i){const o={};512&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o),e[23]&&e[10]?r?(r.p(e,i),1024&i[0]&&fe(r,1)):(r=zt(e),r.c(),fe(r,1),r.m(t,null)):r&&(ue(),pe(r,1,1,(()=>{r=null})),me())},i(e){o||(fe(n.$$.fragment,e),fe(r),o=!0)},o(e){pe(n.$$.fragment,e),pe(r),o=!1},d(e){e&&S(t),we(n),r&&r.d()}}}function Ft(e){let t,n,i,o,r,l,s=e[18]&&At(e);return i=new e[21]({props:{outline:!0,$$slots:{default:[Bt]},$$scope:{ctx:e}}}),i.$on("click",e[26]),r=new e[20]({props:{text:"Liste aus "+e[12]}}),{c(){s&&s.c(),t=L(),n=q("div"),ye(i.$$.fragment),o=L(),ye(r.$$.fragment),A(n,"class","form--buttons svelte-jb5mrh")},m(e,a){s&&s.m(e,a),C(e,t,a),C(e,n,a),be(i,n,null),C(e,o,a),be(r,e,a),l=!0},p(e,n){e[18]?s?(s.p(e,n),262144&n[0]&&fe(s,1)):(s=At(e),s.c(),fe(s,1),s.m(t.parentNode,t)):s&&(ue(),pe(s,1,1,(()=>{s=null})),me());const o={};512&n[1]&&(o.$$scope={dirty:n,ctx:e}),i.$set(o);const l={};4096&n[0]&&(l.text="Liste aus "+e[12]),r.$set(l)},i(e){l||(fe(s),fe(i.$$.fragment,e),fe(r.$$.fragment,e),l=!0)},o(e){pe(s),pe(i.$$.fragment,e),pe(r.$$.fragment,e),l=!1},d(e){s&&s.d(e),e&&S(t),e&&S(n),we(i),e&&S(o),we(r,e)}}}function Dt(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function zt(e){let t,n;return t=new e[21]({props:{filled:!0,$$slots:{default:[Tt]},$$scope:{ctx:e}}}),t.$on("click",e[27]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};512&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Tt(e){let t;return{c(){t=E("Neu")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function At(e){let t,n;return t=new Ll({props:{item:e[16],record:{_id:"",[e[16].name]:""},noForm:"true",classId:"sel_"+e[16].name,eventId:e[17],required:!1,hidden:!1,readonly:!1,deList:e[18]}}),t.$on("notify",e[31]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};65536&n[0]&&(i.item=e[16]),65536&n[0]&&(i.record={_id:"",[e[16].name]:""}),65536&n[0]&&(i.classId="sel_"+e[16].name),131072&n[0]&&(i.eventId=e[17]),262144&n[0]&&(i.deList=e[18]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Bt(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Vt(e){let t,n,i,o;const r=[Et,Nt],l=[];function s(e,t){return e[39].length&&!e[13]?0:1}return t=s(e),n=l[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){l[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=s(e),t===a?l[t].p(e,o):(ue(),pe(l[a],1,1,(()=>{l[a]=null})),me(),n=l[t],n?n.p(e,o):(n=l[t]=r[t](e),n.c()),fe(n,1),n.m(i.parentNode,i))},i(e){o||(fe(n),o=!0)},o(e){pe(n),o=!1},d(e){l[t].d(e),e&&S(i)}}}function Ot(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Mt(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Ot,then:jt,catch:St,value:39,blocks:[,,,]};return $e(n=e[24](e[3]),o),{c(){t=F(),o.block.c()},m(e,n){C(e,t,n),o.block.m(e,o.anchor=n),o.mount=()=>t.parentNode,o.anchor=t,i=!0},p(t,i){e=t,o.ctx=e,8&i[0]&&n!==(n=e[24](e[3]))&&$e(n,o)||he(o,e,i)},i(e){i||(fe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){e&&S(t),o.block.d(e),o.token=null,o=null}}}function Wt(e,n,i){let o;const{Dialog:r,Divider:l,Button:s}=c,a=Y(),{currentTasks:d}=u;k(e,d,(e=>i(35,o=e)));let{title:m}=n,{schema:f}=n,{recID:p}=n,{isOpening:$=!0}=n,{filterForReady:h=!1}=n,{refStatus:g}=n,{praefix:v=""}=n,{selectionFields:y=!1}=n,{showEdit:b=!0}=n,{deList:w}=n,{newAllowed:x=!0}=n,{prevEventId:I}=n,_=f.id;f.class;let C,S,j,q,N,E,L,F="",D=!1;m??=f.identity.designation;const z=!o?.length||o.find((e=>e===_));return e.$$set=e=>{"title"in e&&i(0,m=e.title),"schema"in e&&i(2,f=e.schema),"recID"in e&&i(1,p=e.recID),"isOpening"in e&&i(3,$=e.isOpening),"filterForReady"in e&&i(4,h=e.filterForReady),"refStatus"in e&&i(5,g=e.refStatus),"praefix"in e&&i(6,v=e.praefix),"selectionFields"in e&&i(7,y=e.selectionFields),"showEdit"in e&&i(8,b=e.showEdit),"deList"in e&&i(9,w=e.deList),"newAllowed"in e&&i(10,x=e.newAllowed),"prevEventId"in e&&i(11,I=e.prevEventId)},[m,p,f,$,h,g,v,y,b,w,x,I,F,D,C,j,N,E,L,r,l,s,d,z,async e=>{if(!e)return!1;const n=await Gs(f.class,f.id);if(S=y&&y?.find((e=>f.class===e.refClass.split(":")[0])),i(15,j=S?.value?.get&&S.value.get(v)),j){q=S.refClass;const[e,n]=q.split(":"),[o]=n.split(".");i(16,N=S.parentClass.find((t=>t.name===e)));const r=await t.getSchemaByClass(N.refClass);i(17,E=r.id),i(12,F=S.parentClass.find((e=>e.name===o)).designation)}return n},()=>{i(13,D=!1),p||a("back"),b||a("back")},()=>{i(13,D=!1),a("back")},()=>{i(1,p=!1),i(14,C=!1),i(13,D=!0)},e=>({detail:{row:e}})=>{let t=f.display;t&&t.length&&t.map((t=>{const[n,i]=t.split(".");let o=f.list?.find((e=>e.name===n))?.item.find((e=>e.name===i));if(o){e[`${n}_${i}`]=e[n][i]}})),a("choose",{row:e})},({detail:e})=>{i(14,C=!!e._task.visum||"Closed"===e._task.status),i(1,p=e._docId),i(13,D=!0)},({detail:e})=>{j&&i(18,L=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};a("choose",{row:t})},function(t){G(e,t)}]}class Rt extends ke{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=q("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}",_(document.head,t)),xe(this,e,Wt,Mt,x,{title:0,schema:2,recID:1,isOpening:3,filterForReady:4,refStatus:5,praefix:6,selectionFields:7,showEdit:8,deList:9,newAllowed:10,prevEventId:11},[-1,-1])}}const{document:Pt}=ge;function Ht(e){e[27]=e[29].list,e[28]=e[29].items}function Qt(e,t,n){const i=e.slice();return i[30]=t[n],i}function Yt(e,t,n){const i=e.slice();return i[33]=t[n],i}function Gt(e,t,n){const i=e.slice();return i[33]=t[n],i}function Ut(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Kt(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p,$,h,g,v;function y(t){e[24](t)}Ht(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Jt]},$$scope:{ctx:e}}}),n.$on("click",e[23]);let b={id:e[8]};void 0!==e[1]&&(b.value=e[1]),l=new e[6]({props:b}),K.push((()=>ve(l,"value",y))),l.$on("input",e[12]),d=new Be({props:{size:"18"}});let w=e[28]?.length&&function(e){let t,n,i,o,r=e[28],l=[];for(let t=0;t<r.length;t+=1)l[t]=Zt(Gt(e,r,t));return{c(){t=q("thead"),n=q("tr"),i=q("th"),o=L();for(let e=0;e<l.length;e+=1)l[e].c();A(i,"class","svelte-14hcfjl"),A(n,"class","svelte-14hcfjl"),A(t,"class","svelte-14hcfjl")},m(e,r){C(e,t,r),_(t,n),_(n,i),_(n,o);for(let e=0;e<l.length;e+=1)l[e].m(n,null)},p(e,t){if(2048&t[0]){let i;for(r=e[28],i=0;i<r.length;i+=1){const o=Gt(e,r,i);l[i]?l[i].p(o,t):(l[i]=Zt(o),l[i].c(),l[i].m(n,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=r.length}},d(e){e&&S(t),j(l,e)}}}(e),x=e[27]?.length&&function(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=tn(Qt(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(44547&n[0]){let l;for(i=e[27],l=0;l<i.length;l+=1){const r=Qt(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=tn(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),o=q("div"),r=E("Suchen: "),ye(l.$$.fragment),a=L(),c=q("span"),ye(d.$$.fragment),u=L(),m=q("div"),f=q("table"),w&&w.c(),p=L(),$=q("tbody"),x&&x.c(),A(t,"class","form--buttons svelte-14hcfjl"),A(c,"class","feather pointer svelte-14hcfjl"),O(o,"margin-bottom","1em"),O(o,"position","relative"),A(f,"striped",""),A(f,"class","svelte-14hcfjl"),A(m,"class","eList svelte-14hcfjl")},m(s,y){C(s,t,y),be(n,t,null),C(s,i,y),C(s,o,y),_(o,r),be(l,o,null),_(o,a),_(o,c),be(d,c,null),C(s,u,y),C(s,m,y),_(m,f),w&&w.m(f,null),_(f,p),_(f,$),x&&x.m($,null),h=!0,g||(v=D(c,"click",e[14]),g=!0)},p(e,t){Ht(e);const i={};128&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!s&&2&t[0]&&(s=!0,o.value=e[1],oe((()=>s=!1))),l.$set(o),e[28]?.length&&w.p(e,t),e[27]?.length&&x.p(e,t)},i(e){h||(fe(n.$$.fragment,e),fe(l.$$.fragment,e),fe(d.$$.fragment,e),fe(x),h=!0)},o(e){pe(n.$$.fragment,e),pe(l.$$.fragment,e),pe(d.$$.fragment,e),pe(x),h=!1},d(e){e&&S(t),we(n),e&&S(i),e&&S(o),we(l),we(d),e&&S(u),e&&S(m),w&&w.d(),x&&x.d(),g=!1,v()}}}function Jt(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Zt(e){let t,n,i=e[33]?.designation+"";return{c(){t=q("th"),n=E(i),A(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),_(t,n)},p:g,d(e){e&&S(t)}}}function Xt(e){let t,n,i,o,r,l,s,a;i=new Me({props:{size:"18"}});let c=e[28],d=[];for(let t=0;t<c.length;t+=1)d[t]=en(Yt(e,c,t));return{c(){t=q("tr"),n=q("td"),ye(i.$$.fragment),o=L();for(let e=0;e<d.length;e+=1)d[e].c();r=L(),A(n,"class","editRow svelte-14hcfjl"),A(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[30]._id===e[0])},m(c,u){C(c,t,u),_(t,n),be(i,n,null),_(t,o);for(let e=0;e<d.length;e+=1)d[e].m(t,null);_(t,r),l=!0,s||(a=D(n,"click",e[15](e[30])),s=!0)},p(n,i){if(e=n,3584&i[0]){let n;for(c=e[28],n=0;n<c.length;n+=1){const o=Yt(e,c,n);d[n]?d[n].p(o,i):(d[n]=en(o),d[n].c(),d[n].m(t,r))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}2049&i[0]&&M(t,"active",e[30]._id===e[0])},i(e){l||(fe(i.$$.fragment,e),l=!0)},o(e){pe(i.$$.fragment,e),l=!1},d(e){e&&S(t),we(i),j(d,e),s=!1,a()}}}function en(e){let t,n,i,o,r=e[9](e[30],e[33])+"";return{c(){t=q("td"),n=E(r),A(t,"class","svelte-14hcfjl")},m(r,l){C(r,t,l),_(t,n),i||(o=D(t,"click",T(e[10](e[30]))),i=!0)},p(t,n){e=t},d(e){e&&S(t),i=!1,o()}}}function tn(e){let t,n,i=e[13](e[30],e[28],e[1]),o=i&&Xt(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){2&n[0]&&(i=e[13](e[30],e[28],e[1])),i?o?(o.p(e,n),2&n[0]&&fe(o,1)):(o=Xt(e),o.c(),fe(o,1),o.m(t.parentNode,t)):o&&(ue(),pe(o,1,1,(()=>{o=null})),me())},i(e){n||(fe(o),n=!0)},o(e){pe(o),n=!1},d(e){o&&o.d(e),e&&S(t)}}}function nn(e){let t,n;return t=new e[5]({}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p:g,i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function on(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:nn,then:Kt,catch:Ut,value:29,blocks:[,,,]};return $e(e[11](),r),{c(){ye(t.$$.fragment),n=L(),i=F(),r.block.c()},m(e,l){be(t,e,l),C(e,n,l),C(e,i,l),r.block.m(e,r.anchor=l),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){he(r,e=t,n)},i(e){o||(fe(t.$$.fragment,e),fe(r.block),o=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(r.blocks[e])}o=!1},d(e){we(t,e),e&&S(n),e&&S(i),r.block.d(e),r.token=null,r=null}}}function rn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[on]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};3&n[0]|128&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function ln(e,i,o){const r=Y(),{Dialog:l,Divider:s,Loading:a,TextField:d,Button:u}=c;let{item:m}=i,{classId:p}=i,{className:h}=i,{rowId:g}=i,{viewName:v}=i,{viewValue:y}=i,{recordId:b}=i,{filter:w}=i,x="",k=p+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?$(n):f(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass(h);H((()=>{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&&Xs(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&o(16,m=e.item),"classId"in e&&o(17,p=e.classId),"className"in e&&o(18,h=e.className),"rowId"in e&&o(0,g=e.rowId),"viewName"in e&&o(19,v=e.viewName),"viewValue"in e&&o(20,y=e.viewValue),"recordId"in e&&o(21,b=e.recordId),"filter"in e&&o(22,w=e.filter)},[g,x,r,l,s,a,d,u,k,I,e=>()=>r("choose",{row:e}),async()=>{const e=await _;let n=[];if(m.lookup){const e="."+p+"#"+m.lookup,i=document.querySelector(e),o=i?.value||b;if(o){const e=await Zs(m.lookup,o);if(e){const i=e[m.name]?.map((e=>e[m.name]));i&&(n=await t.getSectionView(m.name,{_id:{$in:i}},!0))}}}else{const i="."+p+"#"+v.split(":")[0],o=document.querySelector(i);let r={[v]:o?.value||b};if(m.refItem){const e="."+p+"#"+m.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[m.refItem]:t.value},{[m.refItem]:{$exists:!0,$eq:""}}]};r={...r,...e}}}catch{}}r[v]&&(n=await t.getSectionView(e.class,r,!0)),w&&(n=n.filter((e=>e._id!=w)))}let i=[],o=e.display;return o&&o.length?o.map((t=>{const[o,r]=t.split(".");let l=e.list?.find((e=>e.name===o))?.item.find((e=>e.name===r));l&&(l={...l},l.name=`${o}_${r}`,n=n.map((e=>(e[o]&&(e[l.name]=e["_"+o]?e["_"+o][r]:e[o][r]),e)))),l||(l=e.items.find((e=>e.name===o))),i.find((e=>e?.name===o))||i.push(l)})):i=e.items,{list:n,items:i}},({detail:{value:e}})=>{o(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(I(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{o(1,x="")},e=>async()=>{const n=await t.getTaskByDocId(e._id),i=`/task/${n.event}/${n._id}/task?view=standalone`;window.open(i)},m,p,h,v,y,b,w,()=>r("back"),function(e){x=e,o(1,x)}]}class sn extends ke{constructor(e){var t;super(),Pt.getElementById("svelte-14hcfjl-style")||((t=q("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 .editRow.svelte-14hcfjl{width:1em}.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}",_(Pt.head,t)),xe(this,e,ln,rn,x,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22},[-1,-1])}}const{document:an}=ge;function cn(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function dn(e){let t,n,i=e[50]&&function(e){let t,n,i,r,l,s,a,c,d,u,m,f,p,$,h;n=new o({props:{class:"full-width",id:e[24],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[28]()),n.$on("onFocus",e[28](e[24]));const g=[mn,un],v=[];function y(e,t){return!e[3]||e[14]?0:e[19]&&e[0]?1:-1}~(r=y(e))&&(l=v[r]=g[r](e));let b=(!e[3]||e[14])&&fn(e);function w(t){e[39](t)}let x={class:"tModal",noClickaway:!0,$$slots:{default:[gn]},$$scope:{ctx:e}};void 0!==e[16]&&(x.open=e[16]);m=new e[23]({props:x}),K.push((()=>ve(m,"open",w)));let k=e[17]&&vn(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),l&&l.c(),s=L(),a=q("input"),d=L(),b&&b.c(),u=L(),ye(m.$$.fragment),p=L(),k&&k.c(),$=F(),A(a,"class",c=I(e[7]||e[8])+" svelte-jox15l"),A(a,"id",e[5]),A(a,"name",e[5]),a.value=e[0],a.hidden=!0,O(t,"position","relative")},m(e,o){C(e,t,o),be(n,t,null),_(t,i),~r&&v[r].m(t,null),_(t,s),_(t,a),_(t,d),b&&b.m(t,null),C(e,u,o),be(m,e,o),C(e,p,o),k&&k.m(e,o),C(e,$,o),h=!0},p(e,i){const o={};4&i[0]&&(o.value=e[2]),2&i[0]&&(o.required=e[1]),8&i[0]&&(o.disabled=e[3]),n.$set(o);let d=r;r=y(e),r===d?~r&&v[r].p(e,i):(l&&(ue(),pe(v[d],1,1,(()=>{v[d]=null})),me()),~r?(l=v[r],l?l.p(e,i):(l=v[r]=g[r](e),l.c()),fe(l,1),l.m(t,s)):l=null),(!h||384&i[0]&&c!==(c=I(e[7]||e[8])+" svelte-jox15l"))&&A(a,"class",c),(!h||32&i[0])&&A(a,"id",e[5]),(!h||32&i[0])&&A(a,"name",e[5]),(!h||1&i[0]&&a.value!==e[0])&&(a.value=e[0]),!e[3]||e[14]?b?(b.p(e,i),16392&i[0]&&fe(b,1)):(b=fn(e),b.c(),fe(b,1),b.m(t,null)):b&&(ue(),pe(b,1,1,(()=>{b=null})),me());const u={};3260241&i[0]|1048576&i[1]&&(u.$$scope={dirty:i,ctx:e}),!f&&65536&i[0]&&(f=!0,u.open=e[16],oe((()=>f=!1))),m.$set(u),e[17]?k?(k.p(e,i),131072&i[0]&&fe(k,1)):(k=vn(e),k.c(),fe(k,1),k.m($.parentNode,$)):k&&(ue(),pe(k,1,1,(()=>{k=null})),me())},i(e){h||(fe(n.$$.fragment,e),fe(l),fe(b),fe(m.$$.fragment,e),fe(k),h=!0)},o(e){pe(n.$$.fragment,e),pe(l),pe(b),pe(m.$$.fragment,e),pe(k),h=!1},d(e){e&&S(t),we(n),~r&&v[r].d(),b&&b.d(),e&&S(u),we(m,e),e&&S(p),k&&k.d(e),e&&S($)}}}(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,t){e[50]&&i.p(e,t)},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function un(e){let t,n,i,o,r;return n=new Me({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-jox15l")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[32]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function mn(e){let t,n,i,o,r;return n=new rt({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-jox15l")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=[D(t,"click",e[28]()),D(t,"choose",e[29])],o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,b(r)}}}function fn(e){let t,n,i,o,r;return n=new Be({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather2 pointer svelte-jox15l")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[31]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function pn(e){let t,n,i,o;const r=[hn,$n],l=[];function s(e,t){return e[6].lookup||e[4]&&!e[6].constraint?0:1}return t=s(e),n=l[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){l[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=s(e),t===a?l[t].p(e,o):(ue(),pe(l[a],1,1,(()=>{l[a]=null})),me(),n=l[t],n?n.p(e,o):(n=l[t]=r[t](e),n.c()),fe(n,1),n.m(i.parentNode,i))},i(e){o||(fe(n),o=!0)},o(e){pe(n),o=!1},d(e){l[t].d(e),e&&S(i)}}}function $n(e){let t,n;return t=new Rt({props:{title:e[6].designation,newAllowed:e[20],prevEventId:e[9],schema:e[15],recID:e[0],isOpening:e[16],filterForReady:e[21],refStatus:e[6].refStatus,selectionFields:e[12],deList:e[13],praefix:e[11]}}),t.$on("choose",e[29]),t.$on("back",e[30]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.title=e[6].designation),1048576&n[0]&&(i.newAllowed=e[20]),512&n[0]&&(i.prevEventId=e[9]),32768&n[0]&&(i.schema=e[15]),1&n[0]&&(i.recID=e[0]),65536&n[0]&&(i.isOpening=e[16]),2097152&n[0]&&(i.filterForReady=e[21]),64&n[0]&&(i.refStatus=e[6].refStatus),4096&n[0]&&(i.selectionFields=e[12]),8192&n[0]&&(i.deList=e[13]),2048&n[0]&&(i.praefix=e[11]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function hn(e){let t,n;return t=new sn({props:{item:e[6],className:e[15].class,classId:e[8],rowId:e[0],recordId:e[10],viewName:e[4],viewValue:""}}),t.$on("choose",e[29]),t.$on("back",e[30]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.item=e[6]),32768&n[0]&&(i.className=e[15].class),256&n[0]&&(i.classId=e[8]),1&n[0]&&(i.rowId=e[0]),1024&n[0]&&(i.recordId=e[10]),16&n[0]&&(i.viewName=e[4]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function gn(e){let t,n,i=e[16]&&pn(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[16]?i?(i.p(e,n),65536&n[0]&&fe(i,1)):(i=pn(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function vn(e){let t,n,i;function o(t){e[40](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[bn]},$$scope:{ctx:e}};return void 0!==e[17]&&(r.open=e[17]),t=new e[23]({props:r}),K.push((()=>ve(t,"open",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};294913&i[0]|1048576&i[1]&&(o.$$scope={dirty:i,ctx:e}),!n&&131072&i[0]&&(n=!0,o.open=e[17],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function yn(e){let t,n;return t=new ta({props:{schema:e[15],recID:e[0],readonly:!0}}),t.$on("back",e[30]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};32768&n[0]&&(i.schema=e[15]),1&n[0]&&(i.recID=e[0]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function bn(e){let t,n;return t=new e[22]({props:{title:e[18],$$slots:{default:[yn]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};262144&n[0]&&(i.title=e[18]),32769&n[0]|1048576&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function wn(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function xn(e){let t,n,i={ctx:e,current:null,token:null,hasCatch:!1,pending:wn,then:dn,catch:cn,value:50,blocks:[,,,]};return $e(e[27](),i),{c(){t=F(),i.block.c()},m(e,o){C(e,t,o),i.block.m(e,i.anchor=o),i.mount=()=>t.parentNode,i.anchor=t,n=!0},p(t,n){he(i,e=t,n)},i(e){n||(fe(i.block),n=!0)},o(e){for(let e=0;e<3;e+=1){pe(i.blocks[e])}n=!1},d(e){e&&S(t),i.block.d(e),i.token=null,i=null}}}function kn(e,n,o){let r,l,s;k(e,i,(e=>o(38,r=e)));const a=Y(),{Dialog:d,Modal:m}=c;let{id:f}=n,{item:p}=n,{value:$=""}=n,{desc:g=""}=n,{noForm:v=!1}=n,{classId:y}=n,{eventId:b}=n,{recordId:w}=n,{withRefValue:x=!1}=n,{refValue:I=""}=n,{required:_}=n,{disabled:C}=n,{readonly:S}=n,{praefix:j}=n,{selectionFields:q}=n,{formnovalidate:N}=n,{selection:E}=n,{deList:L}=n,{isTemplate:F}=n;const D="comment_"+f;let z,T,A,B,V,O,M=!1,W=!0,R=!0;S||=w&&p.asInput,C||=S,!E&&p.selection&&1===p.selection.split(":").length&&(E=p.selection);const{currentTasks:P,loggedIn:H}=u;k(e,P,(e=>o(42,l=e))),k(e,H,(e=>o(43,s=e)));const Q=async e=>{e.items.filter((e=>e.properties?.default)).forEach((t=>{a("defPrep",{className:e.class,itemName:t.name,value:t.properties.default})}))},G=e=>{e&&(o(2,g=h(A,e)),a("setRefDesc",g.split(" •")[0]),a("change",{value:$,description:g}),a("task",{row:e,eventId:A.id}))},U=()=>{o(16,M=!1),o(17,z=!1)};return e.$$set=e=>{"id"in e&&o(5,f=e.id),"item"in e&&o(6,p=e.item),"value"in e&&o(0,$=e.value),"desc"in e&&o(2,g=e.desc),"noForm"in e&&o(7,v=e.noForm),"classId"in e&&o(8,y=e.classId),"eventId"in e&&o(9,b=e.eventId),"recordId"in e&&o(10,w=e.recordId),"withRefValue"in e&&o(33,x=e.withRefValue),"refValue"in e&&o(34,I=e.refValue),"required"in e&&o(1,_=e.required),"disabled"in e&&o(3,C=e.disabled),"readonly"in e&&o(35,S=e.readonly),"praefix"in e&&o(11,j=e.praefix),"selectionFields"in e&&o(12,q=e.selectionFields),"formnovalidate"in e&&o(36,N=e.formnovalidate),"selection"in e&&o(4,E=e.selection),"deList"in e&&o(13,L=e.deList),"isTemplate"in e&&o(14,F=e.isTemplate)},e.$$.update=()=>{if(2&e.$$.dirty[0]|32&e.$$.dirty[1]&&o(1,_=_&&!N),12&e.$$.dirty[1]&&x&&o(0,$=I),32833&e.$$.dirty[0]&&$&&A&&Promise.resolve(Us(p.refClass,A.id,$,!!p.lookup)).then(G),65&e.$$.dirty[0]|192&e.$$.dirty[1]&&$&&B&&p.name===B.input?.at(0)&&B.inputLookup?.length){const{domain:e}=B.inputLookup[0]||{};"user"===e&&(r.some((e=>B.authorization?.find((t=>t.role===e&&!t.constraint))))||o(3,C=!0))}32769&e.$$.dirty[0]&&!$&&A&&G({})},[$,_,g,C,E,f,p,v,y,b,w,j,q,L,F,A,M,z,T,V,W,R,d,m,D,P,H,async()=>{try{const e=await t.getEvent(b);if(O="report"===e.output.type,o(21,R=!p.asInput),o(20,W=e.output?.class[0].name!==p.refClass),o(15,A=await t.getSchemaByClass(p.refClass)),Q(A),o(19,V=(e=>!l?.length||!!l.find((t=>t===e)))(A.id)),o(37,B=await t.getSchema(b)),b&&w&&$&&!C&&B.input?.find((e=>e===p.refClass))&&o(3,C=!0),p.properties?.query?.lookup){const{domain:e,value:n}=p.properties.query.lookup;if("user"===e){const e=s.user,i={[n]:e},l=await t.getSectionView(p.refClass,i);if(l?.length){const[{_id:e}]=l;e&&(o(34,I=e),o(33,x=!0))}r.some((e=>A.authorization?.find((t=>t.role===e&&!t.constraint))))||o(3,C=!0)}}return o(18,T=A.identity.designation),!0}catch{return a("initFail",!0),!1}},e=>t=>{if("BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}o(16,M=!0)},({detail:e})=>{o(0,$=e.row._id),U()},U,()=>{(O||V)&&(o(0,$=o(2,g="")),a("change",{value:$,description:g}),a("task",{row:{_task:{event:A.id,_id:!1}}}))},async()=>{if(!$)return;const e=await Us(p.refClass,A.id,$);if(!e._task)return;const t=e._task._id,n=`/task/${e._task.event}/${t}/task?view=standalone`;window.open(n)},x,I,S,N,B,r,function(e){M=e,o(16,M)},function(e){z=e,o(17,z)}]}class In extends ke{constructor(e){var t;super(),an.getElementById("svelte-jox15l-style")||((t=q("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}",_(an.head,t)),xe(this,e,kn,xn,x,{id:5,item:6,value:0,desc:2,noForm:7,classId:8,eventId:9,recordId:10,withRefValue:33,refValue:34,required:1,disabled:3,readonly:35,praefix:11,selectionFields:12,formnovalidate:36,selection:4,deList:13,isTemplate:14},[-1,-1])}}const _n=/\d+/g,Cn=/%[HMSpPdmyY%]/g;function Sn(e,t,n){const i=Math.floor((new Date).getFullYear()/100);let o=!1;if(""===e)return null;const r=t.split(Cn);let l=0,s=0;const a=new Date(0);for(const c of r){if(!e.startsWith(c,l))return n;if(l+=c.length,l===e.length){if(s!==t.length)return n;break}if("%"!==t[s+c.length])break;if(s+=c.length+1,"%"===t[s]){if("%"!==e[l])return n;l++}else if("p"===t[s].toLowerCase()){const t=e.substr(l,2).toUpperCase();if("AM"===t)o=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;o=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{_n.lastIndex=l;const r=_n.exec(e);if(null==r)return n;switch(t[s]){case"H":a.setHours(parseInt(r[0])+12*o);break;case"M":a.setMinutes(r[0]);break;case"S":a.setSeconds(r[0]);break;case"d":a.setDate(r[0]);break;case"m":a.setMonth(r[0]-1);break;case"y":a.setFullYear(100*i+parseInt(r[0]));break;case"Y":a.setFullYear(r[0])}l+=r[0].length}s++}return isNaN(a.valueOf())?n:a}function jn(e,t){return null==e||null==t?e:(t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t)}const{document:qn}=ge;function Nn(e,t,n){const i=e.slice();return i[17]=t[n],i}function En(e,t,n){const i=e.slice();return i[20]=t[n],i}function Ln(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Fn(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p=e[0].items,$=[];for(let t=0;t<p.length;t+=1)$[t]=zn(En(e,p,t));const h=e=>pe($[e],1,1,(()=>{$[e]=null}));let g=e[0].list&&Tn(e);return a=new e[5]({props:{outline:!0,$$slots:{default:[Bn]},$$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:[Vn]},$$scope:{ctx:e}}}),{c(){t=q("form"),n=q("input"),o=L();for(let e=0;e<$.length;e+=1)$[e].c();r=L(),g&&g.c(),l=L(),s=q("div"),ye(a.$$.fragment),c=L(),ye(d.$$.fragment),A(n,"class",I(e[6])+" svelte-1phofh5"),A(n,"name","_id"),A(n,"type","hidden"),n.value=i=e[1]._id||"",A(t,"class","fTask svelte-1phofh5"),A(t,"id",e[6]),A(s,"class","form--buttons svelte-1phofh5")},m(i,p){C(i,t,p),_(t,n),_(t,o);for(let e=0;e<$.length;e+=1)$[e].m(t,null);_(t,r),g&&g.m(t,null),C(i,l,p),C(i,s,p),be(a,s,null),_(s,c),be(d,s,null),u=!0,m||(f=[D(t,"keydown",e[8]),D(t,"submit",z(e[10]))],m=!0)},p(e,o){if((!u||2&o&&i!==(i=e[1]._id||""))&&(n.value=i),75&o){let n;for(p=e[0].items,n=0;n<p.length;n+=1){const i=En(e,p,n);$[n]?($[n].p(i,o),fe($[n],1)):($[n]=zn(i),$[n].c(),fe($[n],1),$[n].m(t,r))}for(ue(),n=p.length;n<$.length;n+=1)h(n);me()}e[0].list?g?(g.p(e,o),1&o&&fe(g,1)):(g=Tn(e),g.c(),fe(g,1),g.m(t,null)):g&&(ue(),pe(g,1,1,(()=>{g=null})),me());const l={};8388608&o&&(l.$$scope={dirty:o,ctx:e}),a.$set(l);const s={};4&o&&(s.disabled=e[2]),8388608&o&&(s.$$scope={dirty:o,ctx:e}),d.$set(s)},i(e){if(!u){for(let e=0;e<p.length;e+=1)fe($[e]);fe(g),fe(a.$$.fragment,e),fe(d.$$.fragment,e),u=!0}},o(e){$=$.filter(Boolean);for(let e=0;e<$.length;e+=1)pe($[e]);pe(g),pe(a.$$.fragment,e),pe(d.$$.fragment,e),u=!1},d(e){e&&S(t),j($,e),g&&g.d(),e&&S(l),e&&S(s),we(a),we(d),m=!1,b(f)}}}function Dn(e){let t,n;return t=new Ll({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(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};1&n&&(i.item=e[20]),1&n&&(i.selection=e[20].selection),2&n&&(i.record=e[1]),8&n&&(i.disabled=e[3]),1&n&&(i.eventId=e[0].id),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function zn(e){let t,n,i=Wn(!0,e[20]),o=i&&Dn(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){1&n&&(i=Wn(!0,e[20])),i?o?(o.p(e,n),1&n&&fe(o,1)):(o=Dn(e),o.c(),fe(o,1),o.m(t.parentNode,t)):o&&(ue(),pe(o,1,1,(()=>{o=null})),me())},i(e){n||(fe(o),n=!0)},o(e){pe(o),n=!1},d(e){o&&o.d(e),e&&S(t)}}}function Tn(e){let t,n,i=e[0].list,o=[];for(let t=0;t<i.length;t+=1)o[t]=An(Nn(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(75&n){let l;for(i=e[0].list,l=0;l<i.length;l+=1){const r=Nn(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=An(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}function An(e){let t,n,i,o;return t=new e[4]({props:{text:e[17].designation}}),i=new ei({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(){ye(t.$$.fragment),n=L(),ye(i.$$.fragment)},m(e,r){be(t,e,r),C(e,n,r),be(i,e,r),o=!0},p(e,n){const o={};1&n&&(o.text=e[17].designation),t.$set(o);const r={};1&n&&(r.list=e[17]),1&n&&(r.eventId=e[0].id),1&n&&(r.schema=e[17].item),2&n&&(r.record=e[1]),8&n&&(r.disabled=e[3]),i.$set(r)},i(e){o||(fe(t.$$.fragment,e),fe(i.$$.fragment,e),o=!0)},o(e){pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!1},d(e){we(t,e),e&&S(n),we(i,e)}}}function Bn(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Vn(e){let t;return{c(){t=E("Speichern")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function On(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Mn(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:On,then:Fn,catch:Ln,value:16,blocks:[,,,]};return $e(e[7](),o),{c(){t=L(),n=q("section"),o.block.c(),qn.title="Vorgaben",A(n,"class","sTask svelte-1phofh5")},m(e,r){C(e,t,r),C(e,n,r),o.block.m(n,o.anchor=null),o.mount=()=>n,o.anchor=null,i=!0},p(t,[n]){he(o,e=t,n)},i(e){i||(fe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){e&&S(t),e&&S(n),o.block.d(),o.token=null,o=null}}}const Wn=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function Rn(e,n,o){let a,d,u;k(e,s,(e=>o(11,d=e))),k(e,i,(e=>o(12,u=e)));const{Divider:m,Button:f,FormField:p}=c,$=JSON.parse(r.getItem("Locale"));let{schema:h}=n,{record:g}=n,v="template-"+h.class+Math.floor(9e3*Math.random()+1e3).toString(),y=!1;const b=()=>window.history.back(),w=(e,t,n=!1)=>{const i=t.id,o=e.find((e=>e.name===i));let r=t.value;if(!n&&o&&o.properties?.multi&&(r=g[i]),r&&o&&o.type.startsWith("date"))try{return Sn(r,"%d.%m.%Y").toISOString()}catch{return new Date(r).toISOString()}if(o&&"boolean"===o.type&&(r=!!t.checked),o&&"number"===o.type){const e=Number("1.1").toLocaleString($.id).substring(1,2);try{r=Number(r.replace(e,".")).toString()}catch{}}return r};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=y)},[h,g,y,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,y=!0),d.role?.length&&h.authorization?.length){const e=h.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));o(2,y||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},b,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[i,o]=t.split("."),r=h.list.find((e=>e.name===i));n[t]=w(r.item,e)}else n[t]=w(h.items,e)})),await t.saveTemplate(h.class,n),l.success("Die Vorgaben wurden gespeichert.",2e3),b()}]}const{document:Pn}=ge;function Hn(e,t,n){const i=e.slice();return i[28]=t[n],i}function Qn(e){let t,n;return t=new Ll({props:{classId:e[2],item:e[28],listName:e[1].name,eventId:e[3],record:e[0],disabled:e[4],required:e[5],currency:e[8]}}),t.$on("notify",e[14]),t.$on("defPrep",e[16]),t.$on("task",e[21]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};4&n[0]&&(i.classId=e[2]),2&n[0]&&(i.item=e[28]),2&n[0]&&(i.listName=e[1].name),8&n[0]&&(i.eventId=e[3]),1&n[0]&&(i.record=e[0]),16&n[0]&&(i.disabled=e[4]),32&n[0]&&(i.required=e[5]),256&n[0]&&(i.currency=e[8]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Yn(e){let t,n,i=Wn(e[7],e[28]),o=i&&Qn(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){130&n[0]&&(i=Wn(e[7],e[28])),i?o?(o.p(e,n),130&n[0]&&fe(o,1)):(o=Qn(e),o.c(),fe(o,1),o.m(t.parentNode,t)):o&&(ue(),pe(o,1,1,(()=>{o=null})),me())},i(e){n||(fe(o),n=!0)},o(e){pe(o),n=!1},d(e){o&&o.d(e),e&&S(t)}}}function Gn(e){let t,n,i,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=Yn(Hn(e,o,t));const l=e=>pe(r[e],1,1,(()=>{r[e]=null}));return{c(){t=q("div");for(let e=0;e<r.length;e+=1)r[e].c();A(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){C(e,t,n);for(let e=0;e<r.length;e+=1)r[e].m(t,null);i=!0},p(e,s){if(82367&s[0]){let n;for(o=e[1].item,n=0;n<o.length;n+=1){const i=Hn(e,o,n);r[n]?(r[n].p(i,s),fe(r[n],1)):(r[n]=Yn(i),r[n].c(),fe(r[n],1),r[n].m(t,null))}for(ue(),n=o.length;n<r.length;n+=1)l(n);me()}(!i||6&s[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&A(t,"id",n)},i(e){if(!i){for(let e=0;e<o.length;e+=1)fe(r[e]);i=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)pe(r[e]);i=!1},d(e){e&&S(t),j(r,e)}}}function Un(e){let t,n,i=e[13](e[9])+"";return{c(){t=q("span"),n=E(i)},m(e,i){C(e,t,i),_(t,n)},p(e,t){512&t[0]&&i!==(i=e[13](e[9])+"")&&B(n,i)},d(e){e&&S(t)}}}function Kn(e){let t,n,i;return n=new e[10]({props:{$$slots:{default:[Un]},$$scope:{ctx:e}}}),n.$on("click",(function(){w(e[15](e[27]))&&e[15](e[27]).apply(this,arguments)})),{c(){t=q("div"),ye(n.$$.fragment),A(t,"class","accordion svelte-148ktt9"),A(t,"slot","handle")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p(t,i){e=t;const o={};512&i[0]|1&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o)},i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Jn(e){let t,n;return t=new e[12]({props:{open:e[6],$$slots:{handle:[Kn,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]],default:[Gn,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",e[17]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.open=e[6]),134218687&n[0]|1&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Zn(e){let t,n,i;return n=new e[11]({props:{$$slots:{default:[Jn]},$$scope:{ctx:e}}}),{c(){t=q("div"),ye(n.$$.fragment),A(t,"class","formList")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p(e,t){const i={};1023&t[0]|1&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i)},i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Xn(e,n,i){const{Button:o,Accordion:r,AccordionSection:l}=c;let{list:s}=n,{schema:a}=n,{record:d}=n,{classId:u}=n,{eventId:m}=n,{disabled:h}=n,{required:g}=n,{open:v=!1}=n,{template:y={}}=n,{isTemplate:b=!1}=n,{currency:w}=n,{update:x=!1}=n,k=new Map;const I={};let _=d[s.name]||{};d[s.name]=_;const C=e=>I[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "),S=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};return e.$$set=e=>{"list"in e&&i(1,s=e.list),"schema"in e&&i(18,a=e.schema),"record"in e&&i(0,d=e.record),"classId"in e&&i(2,u=e.classId),"eventId"in e&&i(3,m=e.eventId),"disabled"in e&&i(4,h=e.disabled),"required"in e&&i(5,g=e.required),"open"in e&&i(6,v=e.open),"template"in e&&i(19,y=e.template),"isTemplate"in e&&i(7,b=e.isTemplate),"currency"in e&&i(8,w=e.currency),"update"in e&&i(20,x=e.update)},e.$$.update=()=>{1048579&e.$$.dirty[0]&&x&&d&&i(9,_=d[s.name]||{})},[d,s,u,m,h,g,v,b,w,_,o,r,l,e=>a.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format)).map((t=>"object"===t.type?C(t.name):"boolean"===t.type?$(e[t.name]):"date"===t.type?f(e[t.name]):"datetime"===t.type?p(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,n]=e.itemName.split(".");if(!n)return;e.desc&&(I[n]=e.desc);const o=d[t];i(0,d[t]={...o,[n]:e.value},d),i(9,_=d[t])},e=>t=>{(()=>{const e=y[s.name]||{};for(const t in e)y[s.name][t]&&!d[s.name][t]&&i(0,d[s.name][t]=y[s.name][t],d)})(),e(t);const n=`#accordion-content-${u}-${s.name} > div.form-field:last-child`,o=document.querySelector(n);ne().then((()=>{const e=`#accordion-content-${u}-${s.name} textarea`;Array.from(document.querySelectorAll(e)).forEach(S)})).then((()=>o.scrollIntoView({behavior:"smooth",block:"end"})))},async({detail:{className:e,itemName:n,value:i}})=>{if(k.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===className+"."+s.name))),!i)return;const o={[n]:!0},r=await t.getSectionView(e,o);r?.length&&k.set(e,r[0])},()=>{setTimeout((()=>{Array.from(k).forEach((([e,t])=>{d[s.name][e]||i(0,d[s.name][e]=t._id,d)}))}),500)},a,y,x,function(t){G(e,t)}]}class ei extends ke{constructor(e){var t;super(),Pn.getElementById("svelte-148ktt9-style")||((t=q("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}}",_(Pn.head,t)),xe(this,e,Xn,Zn,x,{list:1,schema:18,record:0,classId:2,eventId:3,disabled:4,required:5,open:6,template:19,isTemplate:7,currency:8,update:20},[-1,-1])}}const{document:ti}=ge;function ni(e){e[0]=e[23].list,e[22]=e[23].items}function ii(e,t,n){const i=e.slice();return i[24]=t[n],i}function oi(e,t,n){const i=e.slice();return i[27]=t[n],i}function ri(e,t,n){const i=e.slice();return i[27]=t[n],i}function li(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function si(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p,$,h,g,v;function y(t){e[19](t)}ni(e),n=new e[7]({props:{outline:!0,$$slots:{default:[ai]},$$scope:{ctx:e}}}),n.$on("click",e[18]);let b={id:e[8]};void 0!==e[1]&&(b.value=e[1]),l=new e[6]({props:b}),K.push((()=>ve(l,"value",y))),l.$on("input",e[12]),d=new Be({props:{size:"18"}});let w=e[22]?.length&&function(e){let t,n,i=e[22],o=[];for(let t=0;t<i.length;t+=1)o[t]=ci(ri(e,i,t));return{c(){t=q("thead"),n=q("tr");for(let e=0;e<o.length;e+=1)o[e].c();A(n,"class","svelte-14hcfjl"),A(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),_(t,n);for(let e=0;e<o.length;e+=1)o[e].m(n,null)},p(e,t){if(2048&t[0]){let r;for(i=e[22],r=0;r<i.length;r+=1){const l=ri(e,i,r);o[r]?o[r].p(l,t):(o[r]=ci(l),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(e){e&&S(t),j(o,e)}}}(e),x=e[0]?.length&&function(e){let t,n=e[0],i=[];for(let t=0;t<n.length;t+=1)i[t]=mi(ii(e,n,t));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=F()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);C(e,t,n)},p(e,o){if(11778&o[0]){let r;for(n=e[0],r=0;r<n.length;r+=1){const l=ii(e,n,r);i[r]?i[r].p(l,o):(i[r]=mi(l),i[r].c(),i[r].m(t.parentNode,t))}for(;r<i.length;r+=1)i[r].d(1);i.length=n.length}},d(e){j(i,e),e&&S(t)}}}(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),o=q("div"),r=E("Suchen: "),ye(l.$$.fragment),a=L(),c=q("span"),ye(d.$$.fragment),u=L(),m=q("div"),f=q("table"),w&&w.c(),p=L(),$=q("tbody"),x&&x.c(),A(t,"class","form--buttons svelte-14hcfjl"),A(c,"class","feather pointer svelte-14hcfjl"),O(o,"margin-bottom","1em"),O(o,"position","relative"),A(f,"striped",""),A(f,"class","svelte-14hcfjl"),A(m,"class","eList svelte-14hcfjl")},m(s,y){C(s,t,y),be(n,t,null),C(s,i,y),C(s,o,y),_(o,r),be(l,o,null),_(o,a),_(o,c),be(d,c,null),C(s,u,y),C(s,m,y),_(m,f),w&&w.m(f,null),_(f,p),_(f,$),x&&x.m($,null),h=!0,g||(v=D(c,"click",e[14]),g=!0)},p(e,t){ni(e);const i={};2&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!s&&2&t[0]&&(s=!0,o.value=e[1],oe((()=>s=!1))),l.$set(o),e[22]?.length&&w.p(e,t),e[0]?.length&&x.p(e,t)},i(e){h||(fe(n.$$.fragment,e),fe(l.$$.fragment,e),fe(d.$$.fragment,e),h=!0)},o(e){pe(n.$$.fragment,e),pe(l.$$.fragment,e),pe(d.$$.fragment,e),h=!1},d(e){e&&S(t),we(n),e&&S(i),e&&S(o),we(l),we(d),e&&S(u),e&&S(m),w&&w.d(),x&&x.d(),g=!1,v()}}}function ai(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function ci(e){let t,n,i=e[27]?.designation+"";return{c(){t=q("th"),n=E(i),A(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),_(t,n)},p:g,d(e){e&&S(t)}}}function di(e){let t,n,i=e[22],o=[];for(let t=0;t<i.length;t+=1)o[t]=ui(oi(e,i,t));return{c(){t=q("tr");for(let e=0;e<o.length;e+=1)o[e].c();n=L(),A(t,"class","pointer svelte-14hcfjl")},m(e,i){C(e,t,i);for(let e=0;e<o.length;e+=1)o[e].m(t,null);_(t,n)},p(e,r){if(3584&r[0]){let l;for(i=e[22],l=0;l<i.length;l+=1){const s=oi(e,i,l);o[l]?o[l].p(s,r):(o[l]=ui(s),o[l].c(),o[l].m(t,n))}for(;l<o.length;l+=1)o[l].d(1);o.length=i.length}},d(e){e&&S(t),j(o,e)}}}function ui(e){let t,n,i,o,r=e[9](e[24],e[27])+"";return{c(){t=q("td"),n=E(r),A(t,"class","svelte-14hcfjl")},m(r,l){C(r,t,l),_(t,n),i||(o=D(t,"click",T(e[10](e[24]))),i=!0)},p(t,n){e=t},d(e){e&&S(t),i=!1,o()}}}function mi(e){let t,n=e[13](e[24],e[22],e[1]),i=n&&di(e);return{c(){i&&i.c(),t=F()},m(e,n){i&&i.m(e,n),C(e,t,n)},p(e,o){2&o[0]&&(n=e[13](e[24],e[22],e[1])),n?i?i.p(e,o):(i=di(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&S(t)}}}function fi(e){let t,n;return t=new e[5]({}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p:g,i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function pi(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:fi,then:si,catch:li,value:23,blocks:[,,,]};return $e(e[11](),r),{c(){ye(t.$$.fragment),n=L(),i=F(),r.block.c()},m(e,l){be(t,e,l),C(e,n,l),C(e,i,l),r.block.m(e,r.anchor=l),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){he(r,e=t,n)},i(e){o||(fe(t.$$.fragment,e),fe(r.block),o=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(r.blocks[e])}o=!1},d(e){we(t,e),e&&S(n),e&&S(i),r.block.d(e),r.token=null,r=null}}}function $i(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[pi]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};2&n[0]|2&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function hi(e,n,i){const o=Y(),{Dialog:r,Divider:l,Loading:s,TextField:a,Button:d}=c;let{item:u}=n,{className:m}=n,{classId:p}=n,{list:h}=n,g="",v=p+Math.floor(9e3*Math.random()+1e3).toString()+"search";const y=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?$(n):f(e[`_${t.name}`]||e[t.name]||"")},b=t.getSchemaByClass(m);H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(v)?.focus()}),200)}));return e.$$set=e=>{"item"in e&&i(15,u=e.item),"className"in e&&i(16,m=e.className),"classId"in e&&i(17,p=e.classId),"list"in e&&i(0,h=e.list)},[h,g,o,r,l,s,a,d,v,y,e=>()=>o("choose",{row:e}),async()=>{const e=await b;let t=[],n=e.display;return n&&n.length?n.map((n=>{const[o,r]=n.split(".");let l=e.list?.find((e=>e.name===o))?.item.find((e=>e.name===r));l&&(l={...l},l.name=`${o}_${r}`,i(0,h=h.map((e=>(e[o]&&(e[l.name]=e["_"+o]?e["_"+o][r]:e[o][r]),e))))),l||(l=e.items.find((e=>e.name===o))),t.find((e=>e?.name===o))||t.push(l)})):t=e.items,{list:h,items:t}},({detail:{value:e}})=>{i(1,g=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(y(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,g="")},u,m,p,()=>o("back"),function(e){g=e,i(1,g)}]}class gi extends ke{constructor(e){var t;super(),ti.getElementById("svelte-14hcfjl-style")||((t=q("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}.form--buttons.svelte-14hcfjl.svelte-14hcfjl{display:flex;gap:1em;padding:0.5em 0}",_(ti.head,t)),xe(this,e,hi,$i,x,{item:15,className:16,classId:17,list:0},[-1,-1])}}const{document:vi}=ge;function yi(e,t,n){const i=e.slice();return i[11]=t[n],i}function bi(e,t,n){const i=e.slice();return i[2]=t[n],i}function wi(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function xi(e){let t,n,i,o=e[6].items,r=[];for(let t=0;t<o.length;t+=1)r[t]=Si(bi(e,o,t));const l=e=>pe(r[e],1,1,(()=>{r[e]=null}));let s=e[6].list&&ji(e);return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=L(),s&&s.c(),n=F()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);C(e,t,o),s&&s.m(e,o),C(e,n,o),i=!0},p(e,i){if(5161971&i[0]){let n;for(o=e[6].items,n=0;n<o.length;n+=1){const l=bi(e,o,n);r[n]?(r[n].p(l,i),fe(r[n],1)):(r[n]=Si(l),r[n].c(),fe(r[n],1),r[n].m(t.parentNode,t))}for(ue(),n=o.length;n<r.length;n+=1)l(n);me()}e[6].list?s?(s.p(e,i),64&i[0]&&fe(s,1)):(s=ji(e),s.c(),fe(s,1),s.m(n.parentNode,n)):s&&(ue(),pe(s,1,1,(()=>{s=null})),me())},i(e){if(!i){for(let e=0;e<o.length;e+=1)fe(r[e]);fe(s),i=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)pe(r[e]);pe(s),i=!1},d(e){j(r,e),e&&S(t),s&&s.d(e),e&&S(n)}}}function ki(e){let t,n,i,o;const r=[_i,Ii],l=[];function s(e,t){return e[2].name!==e[14]||e[15]?"lookup"!==e[2].properties?.format?1:-1:0}return~(t=s(e))&&(n=l[t]=r[t](e)),{c(){n&&n.c(),i=F()},m(e,n){~t&&l[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=s(e),t===a?~t&&l[t].p(e,o):(n&&(ue(),pe(l[a],1,1,(()=>{l[a]=null})),me()),~t?(n=l[t],n?n.p(e,o):(n=l[t]=r[t](e),n.c()),fe(n,1),n.m(i.parentNode,i)):n=null)},i(e){o||(fe(n),o=!0)},o(e){pe(n),o=!1},d(e){~t&&l[t].d(e),e&&S(i)}}}function Ii(e){let t,n;return t=new Ll({props:{classId:e[7],item:e[2],record:e[5],disabled:e[2].name===e[14]&&e[15]||e[0],eventId:e[4],currency:e[8],changeValue:e[9]}}),t.$on("notify",e[17]),t.$on("multi",e[18]),t.$on("defPrep",e[19]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),64&n[0]&&(i.item=e[2]),32&n[0]&&(i.record=e[5]),65&n[0]&&(i.disabled=e[2].name===e[14]&&e[15]||e[0]),16&n[0]&&(i.eventId=e[4]),256&n[0]&&(i.currency=e[8]),512&n[0]&&(i.changeValue=e[9]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function _i(e){let t,n,i,o;n=new Ll({props:{classId:e[7],item:e[2],record:e[5],disabled:e[0]||!!e[1],required:!0,eventId:e[4],currency:e[8],changeValue:e[9]}}),n.$on("notify",e[17]),n.$on("multi",e[18]),n.$on("defPrep",e[19]);let r=e[1]&&Ci(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),r&&r.c(),O(t,"padding-top",".25em"),O(t,"background-color","lightyellow"),O(t,"position","relative")},m(e,l){C(e,t,l),be(n,t,null),_(t,i),r&&r.m(t,null),o=!0},p(e,i){const o={};128&i[0]&&(o.classId=e[7]),64&i[0]&&(o.item=e[2]),32&i[0]&&(o.record=e[5]),3&i[0]&&(o.disabled=e[0]||!!e[1]),16&i[0]&&(o.eventId=e[4]),256&i[0]&&(o.currency=e[8]),512&i[0]&&(o.changeValue=e[9]),n.$set(o),e[1]?r?(r.p(e,i),2&i[0]&&fe(r,1)):(r=Ci(e),r.c(),fe(r,1),r.m(t,null)):r&&(ue(),pe(r,1,1,(()=>{r=null})),me())},i(e){o||(fe(n.$$.fragment,e),fe(r),o=!0)},o(e){pe(n.$$.fragment,e),pe(r),o=!1},d(e){e&&S(t),we(n),r&&r.d()}}}function Ci(e){let t,n,i,o,r;return n=new Be({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather2 pointer svelte-16mo2c")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[22]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Si(e){let t,n,i="list"!==e[2].type&&ki(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){"list"!==e[2].type?i?(i.p(e,n),64&n[0]&&fe(i,1)):(i=ki(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function ji(e){let t,n,i=e[6].list,o=[];for(let t=0;t<i.length;t+=1)o[t]=Ni(yi(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(497&n[0]){let l;for(i=e[6].list,l=0;l<i.length;l+=1){const r=yi(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=Ni(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}function qi(e){let t,n,i,o;return t=new e[12]({props:{text:e[11].designation}}),i=new ei({props:{classId:e[7],list:e[11],eventId:e[4],schema:e[11].item,record:e[5],disabled:e[0],currency:e[8],update:!0}}),{c(){ye(t.$$.fragment),n=L(),ye(i.$$.fragment)},m(e,r){be(t,e,r),C(e,n,r),be(i,e,r),o=!0},p(e,n){const o={};64&n[0]&&(o.text=e[11].designation),t.$set(o);const r={};128&n[0]&&(r.classId=e[7]),64&n[0]&&(r.list=e[11]),16&n[0]&&(r.eventId=e[4]),64&n[0]&&(r.schema=e[11].item),32&n[0]&&(r.record=e[5]),1&n[0]&&(r.disabled=e[0]),256&n[0]&&(r.currency=e[8]),i.$set(r)},i(e){o||(fe(t.$$.fragment,e),fe(i.$$.fragment,e),o=!0)},o(e){pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!1},d(e){we(t,e),e&&S(n),we(i,e)}}}function Ni(e){let t,n,i="array"!==e[11].type&&qi(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){"array"!==e[11].type?i?(i.p(e,n),64&n[0]&&fe(i,1)):(i=qi(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function Ei(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Li(e){let t,n;return t=new gi({props:{item:e[2],className:e[3],classId:e[7],list:e[11]}}),t.$on("choose",e[20]),t.$on("back",e[21]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};4&n[0]&&(i.item=e[2]),8&n[0]&&(i.className=e[3]),128&n[0]&&(i.classId=e[7]),2048&n[0]&&(i.list=e[11]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Fi(e){let t,n,i=e[10]&&Li(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[10]?i?(i.p(e,n),1024&n[0]&&fe(i,1)):(i=Li(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function Di(e){let t,n,i,o,r,l,s={ctx:e,current:null,token:null,hasCatch:!1,pending:Ei,then:xi,catch:wi,value:52,blocks:[,,,]};function a(t){e[28](t)}$e(e[16](),s),n=new e[12]({});let c={class:"tModal",noClickaway:!0,$$slots:{default:[Fi]},$$scope:{ctx:e}};return void 0!==e[10]&&(c.open=e[10]),o=new e[13]({props:c}),K.push((()=>ve(o,"open",a))),{c(){s.block.c(),t=L(),ye(n.$$.fragment),i=L(),ye(o.$$.fragment)},m(e,r){s.block.m(e,s.anchor=r),s.mount=()=>t.parentNode,s.anchor=t,C(e,t,r),be(n,e,r),C(e,i,r),be(o,e,r),l=!0},p(t,n){he(s,e=t,n);const i={};3212&n[0]|67108864&n[1]&&(i.$$scope={dirty:n,ctx:e}),!r&&1024&n[0]&&(r=!0,i.open=e[10],oe((()=>r=!1))),o.$set(i)},i(e){l||(fe(s.block),fe(n.$$.fragment,e),fe(o.$$.fragment,e),l=!0)},o(e){for(let e=0;e<3;e+=1){pe(s.blocks[e])}pe(n.$$.fragment,e),pe(o.$$.fragment,e),l=!1},d(e){s.block.d(e),s.token=null,s=null,e&&S(t),we(n,e),e&&S(i),we(o,e)}}}function zi(e,n,i){const{Divider:o,FormField:r,Modal:l}=c,s=Y();let a,d,u,m,f,{required:p}=n,{disabled:$}=n,{readonly:h}=n,{id:g}=n,{item:v}=n,{value:y}=n,{refValue:b}=n,w={},x="CHF",k=[],I=[],_={},C=new Map,S=!1,j="";const q=v.checkOn,N=y,E=e=>{a.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[i,o]=n.split(".");k.push({action:e,itemName:t.name,refObj:i,refName:o,op:t.properties[e].invert?"!":""})}))},L=()=>{a.items.filter((e=>e.lookup)).forEach((e=>{I.push({name:e.name,lookup:e.lookup})})),a.items.filter((e=>e.properties?.lookup)).forEach((e=>{I.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}))},F=async e=>{const t=k.filter((t=>t.refObj===e));if(t?.length){i(9,_={});for(const e of t){const{itemName:t,refObj:n,refName:o,op:r}=e;let{action:l}=e;if(!n)break;let s,a,c=!o&&w[n];const u=w[n];u&&o&&(c=(await getTaskFull(n,u))[o]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===r&&(c=!c),"required"!==l&&"readonly"!==l||(l="required"===l?l:"disabled",setTimeout((()=>{s=`#${d} .form-field.${t} .field textarea`,a=document.querySelector(s),a||(s=`#${d} .form-field.${t} .field input`,a=document.querySelector(s)),a&&c&&a.setAttribute(l,""),a&&!c&&a.removeAttribute(l)}),0)),"hidden"===l&&(s=`#${d} .form-field.${t}`,a=document.querySelector(s),a?.classList?.toggle("hidden",!!c),c&&i(9,_[t]="",_))}}};H((()=>{D()}));const D=async()=>{const e=e=>new Promise((t=>setTimeout(t,e)));let t,n=0;for(;!(t=document.getElementById(d))&&++n<20;)await e(50);t&&((()=>{if(recID)return;const e=new Set;for(const t of k)e.add(t.refObj||u);Array.from(e).forEach((e=>F(e)))})(),z())},z=()=>{setTimeout((()=>{Array.from(C).forEach((([e,t])=>{w[e]||i(5,w[e]=t._id,w)}))}),250)},T=async e=>{if(!e.value)return void B();const n={[e.itemName]:{$regex:`(?i)${e.value}`}},o=await t.getSectionView(u,n);o?.length?(i(11,j=o),i(10,S=!0)):(i(1,y=""),i(23,b=""),s("setRefValue",b))},A=()=>{i(10,S=!1)},B=()=>{i(1,y=""),i(23,b=y),i(5,w={}),s("setRefValue",b)};return e.$$set=e=>{"required"in e&&i(24,p=e.required),"disabled"in e&&i(0,$=e.disabled),"readonly"in e&&i(25,h=e.readonly),"id"in e&&i(26,g=e.id),"item"in e&&i(2,v=e.item),"value"in e&&i(1,y=e.value),"refValue"in e&&i(23,b=e.refValue)},e.$$.update=()=>{33554433&e.$$.dirty[0]&&i(0,$=$||h),134217784&e.$$.dirty[0]&&w&&s("safeReference",{record:w,class:u,event:m,taskId:f})},[$,y,v,u,m,w,a,d,x,_,S,j,o,l,q,N,async()=>{try{if(y){const e=await t.getTask(v.refClass,y);delete e._task,i(5,w=e),i(27,f=(await t.getTaskByDocId(e._id))._id)}else i(5,w={})}catch{}const e=await t.getSectionView("owner",{});if(e?.length&&e[0].currency){const n=await t.getSectionView("currency",{_id:e[0].currency});n?.length&&n[0].designation&&i(8,x=n[0].designation)}return i(6,a=await t.getSchemaByClass(v.refClass)),i(7,d="form-"+a.class+Math.floor(9e3*Math.random()+1e3).toString()),i(3,u=a.class),a.identity.designation,i(4,m=a.id),["readonly","hidden","required"].map(E),L(),!0},async({detail:e})=>{const{itemName:t,value:n}=e;if(i(5,w[t]=n,w),t===q)return T(e);F(t)},async({detail:e})=>{if(!(a.input?.length&&a.input.length>1))return;if(prevSchema?.class!==a.input[0])return;const{value:n,lookup:o,view:r}=e,[l]=o.split(":"),s=(await t.getSectionView(l,{[r]:{$in:n}})).map((e=>e._id));for(const e of a.input.slice(1)){i(5,w[e]=[],w);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&&s.includes(e[l]))),o?.length){const n=o.map((e=>e._id)),r=await t.getSectionView(e,{_id:{$in:n}});for(const t of r)t[e]=t._id;i(5,w[e]=r,w)}}},async({detail:{className:e,itemName:n,value:i}})=>{if(C.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===u))),!i)return;const o={[n]:!0},r=await t.getSectionView(e,o);r?.length&&C.set(e,r[0])},async({detail:e})=>{const n=await t.getSectionView(u,{_id:e.row._id});n?.length&&(i(1,y=n[0]._id),i(23,b=y),s("setRefValue",b),i(5,w=n[0])),A()},A,B,b,p,h,g,f,function(e){S=e,i(10,S)}]}class Ti extends ke{constructor(e){var t;super(),vi.getElementById("svelte-16mo2c-style")||((t=q("style")).id="svelte-16mo2c-style",t.textContent=".feather2.svelte-16mo2c{position:absolute;top:1em;right:0.5em;color:#4300b0}",_(vi.head,t)),xe(this,e,zi,Di,x,{required:24,disabled:0,readonly:25,id:26,item:2,value:1,refValue:23},[-1,-1])}}function Ai(e){let t,n=e[11]&&function(e){let t,n;return{c(){t=q("span"),n=E(e[4]),A(t,"class","item")},m(e,i){C(e,t,i),_(t,n)},p(e,t){16&t&&B(n,e[4])},d(e){e&&S(t)}}}(e);return{c(){n&&n.c(),t=F()},m(e,i){n&&n.m(e,i),C(e,t,i)},p(e,t){e[11]&&n.p(e,t)},d(e){n&&n.d(e),e&&S(t)}}}function Bi(e){let t,n,i;return n=new e[9]({props:{withItem:!0,itemLeft:!0,lang:e[10].id,class:"left",type:"string",inputClass:"txt-right"+(e[1]?"":" "+e[2]),id:e[0],name:e[0],value:e[8],step:e[12],pattern:e[6],placeholder:e[13],readonly:e[7],disabled:e[3],required:e[5],$$slots:{default:[Ai]},$$scope:{ctx:e}}}),n.$on("change",e[14]),n.$on("focus",e[15]),{c(){t=q("div"),ye(n.$$.fragment),O(t,"position","relative"),O(t,"max-width","10em")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p(e,[t]){const i={};6&t&&(i.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t&&(i.id=e[0]),1&t&&(i.name=e[0]),256&t&&(i.value=e[8]),64&t&&(i.pattern=e[6]),128&t&&(i.readonly=e[7]),8&t&&(i.disabled=e[3]),32&t&&(i.required=e[5]),536870928&t&&(i.$$scope={dirty:t,ctx:e}),n.$set(i)},i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Vi(e,t,n){let i;const o=Y(),{TextField:l}=c;let{id:s}=t,{item:a}=t,{value:d}=t,{noForm:u=!1}=t,{classId:m}=t,{disabled:f}=t,{formnovalidate:p}=t,{currency:$}=t;const h=JSON.parse(r.getItem("Locale")),g=["price","amount","amountValue","taxValue","__total"].find((e=>e===a.name?.split("-")[0])),v=Number("1.1").toLocaleString(h.id).substring(1,2),{properties:y={}}=a;let{min:b,max:w,step:x,pattern:k,decimals:I=0,unit:_="",placeholder:C,hint:S,readonly:j,negative:q,required:N=!1}=y;j=!0===j||void 0,k||(k=I?`[0-9]+([${v}][0-9]{1,${I}})?`:"[0-9]*"),q&&(k="-?"+k);return e.$$set=e=>{"id"in e&&n(0,s=e.id),"item"in e&&n(16,a=e.item),"value"in e&&n(17,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(18,p=e.formnovalidate),"currency"in e&&n(4,$=e.currency)},e.$$.update=()=>{262176&e.$$.dirty&&n(5,N=N&&!p),131072&e.$$.dirty&&n(8,i=Number(d.toString().replace(v,".")).toFixed(I).toString().replace(".",v))},[s,u,m,f,$,N,k,j,i,l,h,g,x,C,({detail:e})=>o("blur",{value:e.value}),({detail:e})=>{j||Number(d.toString().replace(v,"."))||n(8,i="")},a,d,p]}class Oi extends ke{constructor(e){super(),xe(this,e,Vi,Bi,x,{id:0,item:16,value:17,noForm:1,classId:2,disabled:3,formnovalidate:18,currency:4})}}const{document:Mi}=ge;function Wi(e){e[33]=e[35].list,e[34]=e[35].items}function Ri(e,t,n){const i=e.slice();return i[36]=t[n],i[38]=n,i}function Pi(e,t,n){const i=e.slice();return i[39]=t[n],i[41]=n,i}function Hi(e,t,n){const i=e.slice();return i[39]=t[n],i}function Qi(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Yi(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p,$,h,g,v,y;Wi(e),n=new e[8]({props:{outline:!0,$$slots:{default:[Gi]},$$scope:{ctx:e}}}),n.$on("click",e[30]);let b=!e[1]&&Ui(e);function w(t){e[31](t)}let x={id:e[11]};void 0!==e[2]&&(x.value=e[2]),s=new e[6]({props:x}),K.push((()=>ve(s,"value",w))),s.$on("input",e[14]),u=new Be({props:{size:"18"}});let k=e[34]?.length&&function(e){let t,n,i,o,r=!e[1]&&Ji(e),l=e[34],s=[];for(let t=0;t<l.length;t+=1)s[t]=Zi(Hi(e,l,t));return{c(){t=q("thead"),n=q("tr"),r&&r.c(),i=L();for(let e=0;e<s.length;e+=1)s[e].c();A(n,"class","svelte-1m010ne"),A(t,"class","svelte-1m010ne")},m(e,l){C(e,t,l),_(t,n),r&&r.m(n,null),_(n,i);for(let e=0;e<s.length;e+=1)s[e].m(n,null);o=!0},p(e,t){if(e[1]?r&&(ue(),pe(r,1,1,(()=>{r=null})),me()):r?(r.p(e,t),2&t[0]&&fe(r,1)):(r=Ji(e),r.c(),fe(r,1),r.m(n,i)),8192&t[0]){let i;for(l=e[34],i=0;i<l.length;i+=1){const o=Hi(e,l,i);s[i]?s[i].p(o,t):(s[i]=Zi(o),s[i].c(),s[i].m(n,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=l.length}},i(e){o||(fe(r),o=!0)},o(e){pe(r),o=!1},d(e){e&&S(t),r&&r.d(),j(s,e)}}}(e),I=e[33]?.length&&function(e){let t,n,i=e[33],o=[];for(let t=0;t<i.length;t+=1)o[t]=io(Ri(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(569359&n[0]){let l;for(i=e[33],l=0;l<i.length;l+=1){const r=Ri(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=io(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),b&&b.c(),o=L(),r=q("div"),l=E("Suchen: "),ye(s.$$.fragment),c=L(),d=q("span"),ye(u.$$.fragment),m=L(),f=q("div"),p=q("table"),k&&k.c(),$=L(),h=q("tbody"),I&&I.c(),A(t,"class","form--buttons svelte-1m010ne"),A(d,"class","feather pointer svelte-1m010ne"),O(r,"margin-bottom","1em"),O(r,"position","relative"),A(p,"striped",""),A(p,"class","svelte-1m010ne"),A(f,"class","eList svelte-1m010ne")},m(a,w){C(a,t,w),be(n,t,null),_(t,i),b&&b.m(t,null),C(a,o,w),C(a,r,w),_(r,l),be(s,r,null),_(r,c),_(r,d),be(u,d,null),C(a,m,w),C(a,f,w),_(f,p),k&&k.m(p,null),_(p,$),_(p,h),I&&I.m(h,null),g=!0,v||(y=D(d,"click",e[16]),v=!0)},p(e,i){Wi(e);const o={};8192&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o),e[1]?b&&(ue(),pe(b,1,1,(()=>{b=null})),me()):b?(b.p(e,i),2&i[0]&&fe(b,1)):(b=Ui(e),b.c(),fe(b,1),b.m(t,null));const r={};!a&&4&i[0]&&(a=!0,r.value=e[2],oe((()=>a=!1))),s.$set(r),e[34]?.length&&k.p(e,i),e[33]?.length&&I.p(e,i)},i(e){g||(fe(n.$$.fragment,e),fe(b),fe(s.$$.fragment,e),fe(u.$$.fragment,e),fe(k),fe(I),g=!0)},o(e){pe(n.$$.fragment,e),pe(b),pe(s.$$.fragment,e),pe(u.$$.fragment,e),pe(k),pe(I),g=!1},d(e){e&&S(t),we(n),b&&b.d(),e&&S(o),e&&S(r),we(s),we(u),e&&S(m),e&&S(f),k&&k.d(),I&&I.d(),v=!1,y()}}}function Gi(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Ui(e){let t,n;return t=new e[8]({props:{disabled:!e[33].length,filled:!0,$$slots:{default:[Ki]},$$scope:{ctx:e}}}),t.$on("click",e[17](e[33])),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};8192&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Ki(e){let t;return{c(){t=E("Bestätigen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Ji(e){let t,n,i,o,r;return n=new qe({props:{size:"20"}}),{c(){t=q("th"),ye(n.$$.fragment),A(t,"class","svelte-1m010ne")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[18](e[33])),o=!0)},p(t,n){e=t},i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Zi(e){let t,n,i=e[39]+"";return{c(){t=q("th"),n=E(i),A(t,"class","svelte-1m010ne")},m(e,i){C(e,t,i),_(t,n)},p:g,d(e){e&&S(t)}}}function Xi(e){let t,n,i,o,r,l,s,a=e[0],c=to(e),d=e[34],u=[];for(let t=0;t<d.length;t+=1)u[t]=no(Pi(e,d,t));return{c(){t=q("tr"),c.c(),n=L();for(let e=0;e<u.length;e+=1)u[e].c();i=L(),A(t,"style",o=e[1]?"cursor: default;":"cursor: zoom-in;"),A(t,"title","übernimmt den Wert direkt"),A(t,"class","svelte-1m010ne"),M(t,"active",e[0].includes(e[36]))},m(o,a){C(o,t,a),c.m(t,null),_(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);_(t,i),r=!0,l||(s=D(t,"click",e[19](e[36])),l=!0)},p(l,s){if(e=l,1&s[0]&&x(a,a=e[0])?(ue(),pe(c,1,1,g),me(),c=to(e),c.c(),fe(c),c.m(t,n)):c.p(e,s),8200&s[0]){let n;for(d=e[34],n=0;n<d.length;n+=1){const o=Pi(e,d,n);u[n]?u[n].p(o,s):(u[n]=no(o),u[n].c(),u[n].m(t,i))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!r||2&s[0]&&o!==(o=e[1]?"cursor: default;":"cursor: zoom-in;"))&&A(t,"style",o),8193&s[0]&&M(t,"active",e[0].includes(e[36]))},i(e){r||(fe(c),r=!0)},o(e){pe(c),r=!1},d(e){e&&S(t),c.d(e),j(u,e),l=!1,s()}}}function eo(e){let t,n,i;return n=new e[10]({props:{name:e[12],data:e[38],checked:e[0].includes(e[36]),round:!0}}),{c(){t=q("td"),ye(n.$$.fragment),A(t,"title","Wählt den Wert aus"),A(t,"class","svelte-1m010ne")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p(e,t){const i={};1&t[0]&&(i.checked=e[0].includes(e[36])),n.$set(i)},i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function to(e){let t,n,i=!e[1]&&eo(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[1]?i&&(ue(),pe(i,1,1,(()=>{i=null})),me()):i?(i.p(e,n),2&n[0]&&fe(i,1)):(i=eo(e),i.c(),fe(i,1),i.m(t.parentNode,t))},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function no(e){let t,n,i=(e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"";return{c(){t=q("td"),n=E(i),A(t,"class","svelte-1m010ne")},m(e,i){C(e,t,i),_(t,n)},p(e,t){8&t[0]&&i!==(i=(e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"")&&B(n,i)},d(e){e&&S(t)}}}function io(e){let t,n,i=e[15](e[36],e[2]),o=i&&Xi(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){4&n[0]&&(i=e[15](e[36],e[2])),i?o?(o.p(e,n),4&n[0]&&fe(o,1)):(o=Xi(e),o.c(),fe(o,1),o.m(t.parentNode,t)):o&&(ue(),pe(o,1,1,(()=>{o=null})),me())},i(e){n||(fe(o),n=!0)},o(e){pe(o),n=!1},d(e){o&&o.d(e),e&&S(t)}}}function oo(e){let t,n;return t=new e[5]({}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p:g,i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function ro(e){let t,n,i,o;t=new e[9]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:oo,then:Yi,catch:Qi,value:35,blocks:[,,,]};return $e(e[13](),r),{c(){ye(t.$$.fragment),n=L(),i=F(),r.block.c()},m(e,l){be(t,e,l),C(e,n,l),C(e,i,l),r.block.m(e,r.anchor=l),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){he(r,e=t,n)},i(e){o||(fe(t.$$.fragment,e),fe(r.block),o=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(r.blocks[e])}o=!1},d(e){we(t,e),e&&S(n),e&&S(i),r.block.d(e),r.token=null,r=null}}}function lo(e){let t,n;return t=new e[7]({props:{title:"Auswahl",class:"eList",$$slots:{default:[ro]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};15&n[0]|8192&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function so(e,n,i){const o=Y(),{Loading:r,TextField:l,Dialog:s,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=n,{id:f}=n,{selection:p}=n,{refDoc:$}=n,{tableName:h}=n,{idName:g}=n,{target:v}=n,{view:y}=n,{unique:b}=n,{uniqueView:w}=n,{status:x}=n,{single:k}=n;p||=[];let I="",_=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",C=[];const S=h+g+v+"checkbox",j=(e,t)=>e>t?1:t>e?-1:0;return e.$$set=e=>{"classId"in e&&i(21,m=e.classId),"id"in e&&i(22,f=e.id),"selection"in e&&i(0,p=e.selection),"refDoc"in e&&i(23,$=e.refDoc),"tableName"in e&&i(24,h=e.tableName),"idName"in e&&i(25,g=e.idName),"target"in e&&i(20,v=e.target),"view"in e&&i(26,y=e.view),"unique"in e&&i(27,b=e.unique),"uniqueView"in e&&i(28,w=e.uniqueView),"status"in e&&i(29,x=e.status),"single"in e&&i(1,k=e.single)},[p,k,I,C,o,r,l,s,a,d,u,_,S,async()=>{let e=[],n=[],o={};if(i(3,C=[]),g)if(y){const n=m.split("-")[1].slice(0,-4),i="input."+m+"[name='_id']",r=document.querySelector(i).value;o={[g]:f},x&&(o.$or=[{status:!0},{[n]:r}]),e=await t.getSectionView(h,o),e=e.sort(((e,t)=>{const i=e=>(e[n]||"z").toString()+e[v];return j(i(e),i(t))}))}else w?(o={[g]:f,status:!0},Object.entries(w).map((([e,t])=>{t?.length&&(o[e]={$in:t}),n.push(e)})),e=await t.getSectionView(h,o),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return j(n(e),n(t))})),i(3,C=e.map((e=>{const t=[e[v]];return n.map((n=>t.push(e[n]))),t})))):b?(e=await t.getSection(h,g,f,b),e=e.sort(((e,t)=>j(e,t)))):(e=await t.getSection(h,g,f),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return j(n(e),n(t))})));else o={},Array.isArray(f)||(o._id=f),e=await t.getSectionView(h,o);const r=await t.getSchemaByClass(h),l=[];if($){const t=r.items[0].name,n=r.items[1].name,o=r.list[0].name,l=e.find((e=>e[t]===$));e=l[o],i(20,v=n)}e.map((e=>{let t=e[v];if(t||h!==v||(i(20,v=r.items[0].name),t=e[v]),Array.isArray(t))for(const e of t){let t=e;"string"!=typeof e&&(t=Array.from(Object.values(e)).filter((e=>!!e&&24!==e?.length)).join(", ")),l.push(t||[])}else l.push(t||[])}));const s=r.items.find((e=>e.name===v))?.designation;return n=n.map((e=>r.items.find((t=>t.name===e))?.designation)),{list:l.flat(),items:[s,...n]}},({detail:{value:e}})=>{i(2,I=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{i(2,I="")},e=>()=>{const t=document.getElementsByName(S),n=[];t.forEach(((t,i)=>{t.checked&&n.push(e[+t.attributes.data.value])})),o("choose",{list:n})},e=>()=>{document.getElementsByName(S).forEach(((e,t)=>{e.checked=!e.checked}))},e=>t=>{"TD"===t.target?.nodeName&&(k?o("choose",{list:[].concat(e)}):(i(0,p=p.includes(e)?p.filter((t=>t!==e)):p.concat(e)),o("choose",{list:p})))},v,m,f,$,h,g,y,b,w,x,()=>o("back"),function(e){I=e,i(2,I)}]}class ao extends ke{constructor(e){var t;super(),Mi.getElementById("svelte-1m010ne-style")||((t=q("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}",_(Mi.head,t)),xe(this,e,so,lo,x,{classId:21,id:22,selection:0,refDoc:23,tableName:24,idName:25,target:20,view:26,unique:27,uniqueView:28,status:29,single:1},[-1,-1])}}const{document:co}=ge;function uo(e){let t,n,i,o,r,l=e[7].length+"";return{c(){t=q("span"),n=E("("),i=E(l),o=E(")"),A(t,"class",r=I(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,r){C(e,t,r),_(t,n),_(t,i),_(t,o)},p(e,n){128&n[0]&&l!==(l=e[7].length+"")&&B(i,l),2&n[0]&&r!==(r=I(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&A(t,"class",r)},d(e){e&&S(t)}}}function mo(e){let t;return{c(){t=q("div"),A(t,"class","load-more-options"),A(t,"slot","load-more-options-message slot")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function fo(e){let t,n,i,o;const r=[ho,$o,po],l=[];function s(e,t){return!e[16].single&&e[7].length?0:e[17]?1:e[14]&&e[16].view&&e[16].maxItem?2:-1}return~(t=s(e))&&(n=l[t]=r[t](e)),{c(){n&&n.c(),i=F()},m(e,n){~t&&l[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=s(e),t===a?~t&&l[t].p(e,o):(n&&(ue(),pe(l[a],1,1,(()=>{l[a]=null})),me()),~t?(n=l[t],n?n.p(e,o):(n=l[t]=r[t](e),n.c()),fe(n,1),n.m(i.parentNode,i)):n=null)},i(e){o||(fe(n),o=!0)},o(e){pe(n),o=!1},d(e){~t&&l[t].d(e),e&&S(i)}}}function po(e){let t,n,i,o,r;return n=new Ce({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"title","Übernehmen"),A(t,"class","feather pointer svelte-1rbaejz")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[26]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function $o(e){let t,n,i,o,r;return n=new Le({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"title",e[17].title||"Generieren"),A(t,"class","feather pointer svelte-1rbaejz")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[25]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function ho(e){let t,n,i,o,r;return n=new Be({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"title","Löschen"),A(t,"class","feather pointer svelte-1rbaejz")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[27]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function go(e){let t,n,i;function o(t){e[37](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[vo]},$$scope:{ctx:e}};return void 0!==e[10]&&(r.open=e[10]),t=new e[11]({props:r}),K.push((()=>ve(t,"open",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};53&i[0]|32768&i[1]&&(o.$$scope={dirty:i,ctx:e}),!n&&1024&i[0]&&(n=!0,o.open=e[10],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function vo(e){let t,n;return t=new ao({props:{classId:e[2],selection:e[0],refDoc:e[19],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[21]||e[20]],tableName:e[20],idName:e[21],target:e[4].name,single:e[16].single}}),t.$on("choose",e[24]),t.$on("back",e[23]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};4&n[0]&&(i.classId=e[2]),1&n[0]&&(i.selection=e[0]),16&n[0]&&(i.unique=e[16].unique&&e[4].name),32&n[0]&&(i.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(i.id=e[5][e[21]||e[20]]),16&n[0]&&(i.target=e[4].name),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function yo(e){let t,n,i,o,r,l,s,a,c,d=!e[16].single&&e[7].length&&uo(e);function u(t){e[35](t)}function m(t){e[36](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:bo,minSearchLength:"3",$$slots:{"load-more-options-message slot":[mo]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),i=new e[12]({props:f}),K.push((()=>ve(i,"selection",u))),K.push((()=>ve(i,"maxOptions",m))),i.$on("change",e[22]);let p=!e[1]&&fo(e),$=e[10]&&go(e);return{c(){t=q("div"),d&&d.c(),n=L(),ye(i.$$.fragment),l=L(),p&&p.c(),s=L(),$&&$.c(),a=F(),O(t,"position","relative")},m(e,o){C(e,t,o),d&&d.m(t,null),_(t,n),be(i,t,null),_(t,l),p&&p.m(t,null),C(e,s,o),$&&$.m(e,o),C(e,a,o),c=!0},p(e,l){!e[16].single&&e[7].length?d?d.p(e,l):(d=uo(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const s={};8&l[0]&&(s.id=e[3]),8&l[0]&&(s.name=e[3]),8&l[0]&&(s.class=e[3]),2&l[0]&&(s.disabled=e[1]),64&l[0]&&(s.required=e[6]),256&l[0]&&(s.placeholder=e[8]),32768&l[1]&&(s.$$scope={dirty:l,ctx:e}),!o&&128&l[0]&&(o=!0,s.selection=e[7],oe((()=>o=!1))),!r&&512&l[0]&&(r=!0,s.maxOptions=e[9],oe((()=>r=!1))),i.$set(s),e[1]?p&&(ue(),pe(p,1,1,(()=>{p=null})),me()):p?(p.p(e,l),2&l[0]&&fe(p,1)):(p=fo(e),p.c(),fe(p,1),p.m(t,null)),e[10]?$?($.p(e,l),1024&l[0]&&fe($,1)):($=go(e),$.c(),fe($,1),$.m(a.parentNode,a)):$&&(ue(),pe($,1,1,(()=>{$=null})),me())},i(e){c||(fe(i.$$.fragment,e),fe(p),fe($),c=!0)},o(e){pe(i.$$.fragment,e),pe(p),pe($),c=!1},d(e){e&&S(t),d&&d.d(),we(i),p&&p.d(),e&&S(s),$&&$.d(e),e&&S(a)}}}async function*bo(e){yield[{name:e}]}function wo(e,n,i){const o=Y(),{Modal:r,Autocomplete:l}=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,{toDelete:v}=n,{reqQuantity:y}=n,{notifyList:b}=n;const{properties:w={}}=d;let{placeholder:x,hint:k,readonly:I,required:_=!1,lookup:C="",view:S=!1,multi:j,max:q=1e3,generate:N=!1,status:E=!0,refDoc:L}=w;const[F,D]=C.split(":");let z=!1,T=m.map&&m.map((e=>({name:e})))||[];p||=I,p&&(x="");H((async()=>{const e=document.getElementById(a);e.classList.add(s),!I&&C&&e.addEventListener("focus",A)}));const A=()=>{if(C){document.getElementById(a).blur();const e=y||q;(j.unique||T.length<e)&&i(10,z=!0)}},B=()=>{i(10,z&&=!1)},V=({detail:e})=>{i(7,T=e.list.map((e=>({name:e})))),o("blur",{value:e.list}),o("multi",{view:j.view,lookup:C,name:d.name,value:e.list}),B()},O=async()=>{const e={[D]:u[D]},n=await t.getSectionView(F,e),i=Array.from({length:n.length},((e,t)=>n[t][d.name]));V({detail:{list:i}})},M=(e=!1)=>{if(p||!j.required)return;const t=j.maxItem;if(!t||j.unique)return;i(9,q=!1!==e?e:y||u[t]||0);const n=T.length!=q,r=document.getElementById(a);r?.classList?.toggle("invalid",n),o("invalid",{idx:g,value:n})};return e.$$set=e=>{"classId"in e&&i(2,s=e.classId),"id"in e&&i(3,a=e.id),"item"in e&&i(4,d=e.item),"record"in e&&i(5,u=e.record),"value"in e&&i(0,m=e.value),"noForm"in e&&i(28,f=e.noForm),"disabled"in e&&i(1,p=e.disabled),"formnovalidate"in e&&i(29,$=e.formnovalidate),"numberInput"in e&&i(30,h=e.numberInput),"praefix"in e&&i(31,g=e.praefix),"toDelete"in e&&i(32,v=e.toDelete),"reqQuantity"in e&&i(33,y=e.reqQuantity),"notifyList"in e&&i(34,b=e.notifyList)},e.$$.update=()=>{48&e.$$.dirty[0]&&u&&""===u[d.name]&&i(7,T=[]),48&e.$$.dirty[0]&&u&&Array.isArray(u[d.name])&&i(7,T=u[d.name].map((e=>({name:e})))),16&e.$$.dirty[0]|2&e.$$.dirty[1]&&v&&v===d.name&&i(7,T=[]),128&e.$$.dirty[0]&&T&&(i(0,m=T.map&&T.map((e=>e.name))||[]),M()),1073741824&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:i}=e;void 0!==g&&g!==i||t&&t.name===j.maxItem&&M(n)})(h),536870976&e.$$.dirty[0]&&i(6,_=_&&!$),8&e.$$.dirty[1]&&(async e=>{if(void 0===g)return;const{itemName:n,value:r}=e||{};if(!r)return;if(d.refItem?.split(".")[0]!==n)return;const[l,s]=d.refItem.split("."),a=await t.getTask(l,r);if(!a||!a[s])return;const c=a[s];if(!Array.isArray(c)&&!c.length)return;const u=c[g][d.name];o("record",{itemName:"quantity",value:u?.length||0}),i(7,T=u&&u.map((e=>({name:e})))),setTimeout(M,250)})(b)},[m,p,s,a,d,u,_,T,x,q,z,r,l,I,C,S,j,N,E,L,F,D,({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),i(7,T=t.map((e=>({name:e.trim()})))),o("blur",{value:T.map((e=>e.name))}),o("multi",{view:j.view,lookup:C,value:T.map((e=>e.name))})},B,V,()=>{const e=u[N.itemQuantity]||y;if(!e)return;const t=N.prefix||"",n=u[N.variable]||"",i=N.len||5,o=Array.from({length:e},((e,o)=>t+n+"-"+o.toString().padStart(i,"0")));V({detail:{list:o}})},async()=>{if(!0===S)return O();const e=y||u[j.maxItem];if(!e)return;const n={[D]:u[D],status:!0},i=[].concat(u[j.view]||[]);i.length&&(n[j.view]={$in:i});const o=await t.getSectionView(F,n),r=Array.from({length:e<o.length?e:o.length},((e,t)=>o[t][d.name]));V({detail:{list:r}})},()=>{V({detail:{list:[]}})},f,$,h,g,v,y,b,function(e){T=e,i(7,T),i(5,u),i(4,d),i(32,v)},function(e){q=e,i(9,q)},function(e){z=e,i(10,z)}]}class xo extends ke{constructor(e){var t;super(),co.getElementById("svelte-1rbaejz-style")||((t=q("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}",_(co.head,t)),xe(this,e,wo,yo,x,{classId:2,id:3,item:4,record:5,value:0,noForm:28,disabled:1,formnovalidate:29,numberInput:30,praefix:31,toDelete:32,reqQuantity:33,notifyList:34},[-1,-1])}}const{document:ko}=ge;function Io(e){e[26]=e[28].list,e[27]=e[28].items}function _o(e,t,n){const i=e.slice();return i[29]=t[n],i}function Co(e,t,n){const i=e.slice();return i[32]=t[n],i}function So(e,t,n){const i=e.slice();return i[32]=t[n],i}function jo(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function qo(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p,$,h,g,v;function y(t){e[23](t)}Io(e),n=new e[7]({props:{outline:!0,$$slots:{default:[No]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let b={id:e[8]};void 0!==e[1]&&(b.value=e[1]),l=new e[6]({props:b}),K.push((()=>ve(l,"value",y))),l.$on("input",e[12]),d=new Be({props:{size:"18"}});let w=e[27]?.length&&function(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=Eo(So(e,i,t));return{c(){t=q("thead"),n=q("tr");for(let e=0;e<o.length;e+=1)o[e].c();A(n,"class","svelte-14hcfjl"),A(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),_(t,n);for(let e=0;e<o.length;e+=1)o[e].m(n,null)},p(e,t){if(2048&t[0]){let r;for(i=e[27],r=0;r<i.length;r+=1){const l=So(e,i,r);o[r]?o[r].p(l,t):(o[r]=Eo(l),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(e){e&&S(t),j(o,e)}}}(e),x=e[26]?.length&&function(e){let t,n=e[26],i=[];for(let t=0;t<n.length;t+=1)i[t]=Do(_o(e,n,t));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=F()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);C(e,t,n)},p(e,o){if(11779&o[0]){let r;for(n=e[26],r=0;r<n.length;r+=1){const l=_o(e,n,r);i[r]?i[r].p(l,o):(i[r]=Do(l),i[r].c(),i[r].m(t.parentNode,t))}for(;r<i.length;r+=1)i[r].d(1);i.length=n.length}},d(e){j(i,e),e&&S(t)}}}(e);return{c(){t=q("div"),ye(n.$$.fragment),i=L(),o=q("div"),r=E("Suchen: "),ye(l.$$.fragment),a=L(),c=q("span"),ye(d.$$.fragment),u=L(),m=q("div"),f=q("table"),w&&w.c(),p=L(),$=q("tbody"),x&&x.c(),A(t,"class","form--buttons svelte-14hcfjl"),A(c,"class","feather pointer svelte-14hcfjl"),O(o,"margin-bottom","1em"),O(o,"position","relative"),A(f,"striped",""),A(f,"class","svelte-14hcfjl"),A(m,"class","eList svelte-14hcfjl")},m(s,y){C(s,t,y),be(n,t,null),C(s,i,y),C(s,o,y),_(o,r),be(l,o,null),_(o,a),_(o,c),be(d,c,null),C(s,u,y),C(s,m,y),_(m,f),w&&w.m(f,null),_(f,p),_(f,$),x&&x.m($,null),h=!0,g||(v=D(c,"click",e[14]),g=!0)},p(e,t){Io(e);const i={};64&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!s&&2&t[0]&&(s=!0,o.value=e[1],oe((()=>s=!1))),l.$set(o),e[27]?.length&&w.p(e,t),e[26]?.length&&x.p(e,t)},i(e){h||(fe(n.$$.fragment,e),fe(l.$$.fragment,e),fe(d.$$.fragment,e),h=!0)},o(e){pe(n.$$.fragment,e),pe(l.$$.fragment,e),pe(d.$$.fragment,e),h=!1},d(e){e&&S(t),we(n),e&&S(i),e&&S(o),we(l),we(d),e&&S(u),e&&S(m),w&&w.d(),x&&x.d(),g=!1,v()}}}function No(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Eo(e){let t,n,i=e[32]?.designation+"";return{c(){t=q("th"),n=E(i),A(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),_(t,n)},p:g,d(e){e&&S(t)}}}function Lo(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=Fo(Co(e,i,t));return{c(){t=q("tr");for(let e=0;e<o.length;e+=1)o[e].c();n=L(),A(t,"class","pointer svelte-14hcfjl"),M(t,"active",e[29]._id===e[0])},m(e,i){C(e,t,i);for(let e=0;e<o.length;e+=1)o[e].m(t,null);_(t,n)},p(e,r){if(3584&r[0]){let l;for(i=e[27],l=0;l<i.length;l+=1){const s=Co(e,i,l);o[l]?o[l].p(s,r):(o[l]=Fo(s),o[l].c(),o[l].m(t,n))}for(;l<o.length;l+=1)o[l].d(1);o.length=i.length}2049&r[0]&&M(t,"active",e[29]._id===e[0])},d(e){e&&S(t),j(o,e)}}}function Fo(e){let t,n,i,o,r=e[9](e[29],e[32])+"";return{c(){t=q("td"),n=E(r),A(t,"class","svelte-14hcfjl")},m(r,l){C(r,t,l),_(t,n),i||(o=D(t,"click",T(e[10](e[29]))),i=!0)},p(t,n){e=t},d(e){e&&S(t),i=!1,o()}}}function Do(e){let t,n=e[13](e[29],e[27],e[1]),i=n&&Lo(e);return{c(){i&&i.c(),t=F()},m(e,n){i&&i.m(e,n),C(e,t,n)},p(e,o){2&o[0]&&(n=e[13](e[29],e[27],e[1])),n?i?i.p(e,o):(i=Lo(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&S(t)}}}function zo(e){let t,n;return t=new e[5]({}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p:g,i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function To(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:zo,then:qo,catch:jo,value:28,blocks:[,,,]};return $e(e[11](),r),{c(){ye(t.$$.fragment),n=L(),i=F(),r.block.c()},m(e,l){be(t,e,l),C(e,n,l),C(e,i,l),r.block.m(e,r.anchor=l),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){he(r,e=t,n)},i(e){o||(fe(t.$$.fragment,e),fe(r.block),o=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(r.blocks[e])}o=!1},d(e){we(t,e),e&&S(n),e&&S(i),r.block.d(e),r.token=null,r=null}}}function Ao(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[To]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};3&n[0]|64&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Bo(e,i,o){const r=Y(),{Dialog:l,Divider:s,Loading:a,TextField:d,Button:u}=c;let{item:m}=i,{className:p}=i,{classId:h}=i,{rowId:g}=i,{viewName:v}=i,{viewValue:y}=i,{recordId:b}=i,{filter:w}=i,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?$(n):f(e[`_${t.name}`]||e[t.name]||"")},_=t.getSchemaByClass(p);H((()=>{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&&Xs(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&o(15,m=e.item),"className"in e&&o(16,p=e.className),"classId"in e&&o(17,h=e.classId),"rowId"in e&&o(0,g=e.rowId),"viewName"in e&&o(18,v=e.viewName),"viewValue"in e&&o(19,y=e.viewValue),"recordId"in e&&o(20,b=e.recordId),"filter"in e&&o(21,w=e.filter)},[g,x,r,l,s,a,d,u,k,I,e=>()=>r("choose",{row:e}),async()=>{const e=await _,n="."+h+"#"+v;document.querySelector(n);let i={[v]:y},o=[];i[v]&&(o=await t.getSectionView(e.class,i,!0)),w&&(o=o.filter((e=>e._id!=w)));let r=[],l=e.display;return l&&l.length?l.map((t=>{const[n,i]=t.split(".");let l=e.list?.find((e=>e.name===n))?.item.find((e=>e.name===i));l&&(l={...l},l.name=`${n}_${i}`,o=o.map((e=>(e[n]&&(e[l.name]=e["_"+n]?e["_"+n][i]:e[n][i]),e)))),l||(l=e.items.find((e=>e.name===n))),r.find((e=>e?.name===n))||r.push(l)})):r=e.items,{list:o,items:r}},({detail:{value:e}})=>{o(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(I(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{o(1,x="")},m,p,h,v,y,b,w,()=>r("back"),function(e){x=e,o(1,x)}]}class Vo extends ke{constructor(e){var t;super(),ko.getElementById("svelte-14hcfjl-style")||((t=q("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}",_(ko.head,t)),xe(this,e,Bo,Ao,x,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function Oo(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Mo(e){let t,n,i,o,r;function l(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}),K.push((()=>ve(n,"value",l)));let a=!e[6]&&Wo(e);return{c(){t=q("div"),ye(n.$$.fragment),o=L(),a&&a.c(),O(t,"position","relative")},m(e,i){C(e,t,i),be(n,t,null),_(t,o),a&&a.m(t,null),r=!0},p(e,o){const r={};4&o&&(r.id=e[2]),8&o&&(r.name=e[3].name),34&o&&(r.inputClass=e[5]||e[1]),64&o&&(r.disabled=e[6]),128&o&&(r.formnovalidate=e[7]),!i&&1&o&&(i=!0,r.value=e[0],oe((()=>i=!1))),n.$set(r),e[6]?a&&(ue(),pe(a,1,1,(()=>{a=null})),me()):a?(a.p(e,o),64&o&&fe(a,1)):(a=Wo(e),a.c(),fe(a,1),a.m(t,null))},i(e){r||(fe(n.$$.fragment,e),fe(a),r=!0)},o(e){pe(n.$$.fragment,e),pe(a),r=!1},d(e){e&&S(t),we(n),a&&a.d()}}}function Wo(e){let t,n,i,o,r;return n=new rt({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-wbrqzu")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[17]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Ro(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Po(e){let t,n,i;function o(t){e[22](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[Ho]},$$scope:{ctx:e}};return void 0!==e[8]&&(r.open=e[8]),t=new e[11]({props:r}),K.push((()=>ve(t,"open",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};268435994&i&&(o.$$scope={dirty:i,ctx:e}),!n&&256&i&&(n=!0,o.open=e[8],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function Ho(e){let t,n;return t=new Vo({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(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};8&n&&(i.item=e[3]),8&n&&(i.className=e[3].refClass),2&n&&(i.classId=e[1]),16&n&&(i.recordId=e[4]._id),512&n&&(i.viewValue=e[9]),16&n&&(i.filter=e[4]._id),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Qo(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Ro,then:Mo,catch:Oo,value:27,blocks:[,,,]};$e(e[16](),o);let r=e[8]&&Po(e);return{c(){o.block.c(),t=L(),r&&r.c(),n=F()},m(e,l){o.block.m(e,o.anchor=l),o.mount=()=>t.parentNode,o.anchor=t,C(e,t,l),r&&r.m(e,l),C(e,n,l),i=!0},p(t,[i]){he(o,e=t,i),e[8]?r?(r.p(e,i),256&i&&fe(r,1)):(r=Po(e),r.c(),fe(r,1),r.m(n.parentNode,n)):r&&(ue(),pe(r,1,1,(()=>{r=null})),me())},i(e){i||(fe(o.block),fe(r),i=!0)},o(e){for(let e=0;e<3;e+=1){pe(o.blocks[e])}pe(r),i=!1},d(e){o.block.d(e),o.token=null,o=null,e&&S(t),r&&r.d(e),e&&S(n)}}}function Yo(e,t,n){const{TextField:i,Modal:o}=c;let{classId:r}=t,{id:l}=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:y,required:b=!1,view:w}=$,x=!1;const k=()=>{n(8,x=!1)};return e.$$set=e=>{"classId"in e&&n(1,r=e.classId),"id"in e&&n(2,l=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,r,l,s,a,u,m,f,x,h,i,o,g,y,b,w,async()=>(n(9,h=a[w.selection]),!0),()=>{n(8,x=!0)},({detail:e})=>{n(0,d=e.row[w.value?w.value:"_id"]),k()},k,p,function(e){d=e,n(0,d)},function(e){x=e,n(8,x)}]}class Go extends ke{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=q("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",_(document.head,t)),xe(this,e,Yo,Qo,x,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function Uo(e,t,n){const i=e.slice();return i[12]=t[n][0],i[13]=t[n][1],i}function Ko(e){let t;return{c(){t=q("option"),t.textContent="- ",t.selected=!0,t.__value="",t.value=t.__value},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Jo(e){let t;return{c(){t=q("option"),t.textContent="-- Bitte wählen -- ",t.disabled=!0,t.selected=!0,t.__value="",t.value=t.__value},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Zo(e){let t,n,i,o,r=e[12]+"";return{c(){t=q("option"),n=E(r),t.__value=i=e[13],t.value=t.__value,t.selected=o=e[0]==e[13]},m(e,i){C(e,t,i),_(t,n)},p(e,l){64&l&&r!==(r=e[12]+"")&&B(n,r),64&l&&i!==(i=e[13])&&(t.__value=i,t.value=t.__value),65&l&&o!==(o=e[0]==e[13])&&(t.selected=o)},d(e){e&&S(t)}}}function Xo(e){let t,n,i,o,r,l=!e[7]&&function(e){let t;function n(e,t){return e[5]&&!0!==e[8]?Jo:Ko}let i=n(e),o=i(e);return{c(){o.c(),t=F()},m(e,n){o.m(e,n),C(e,t,n)},p(e,r){i!==(i=n(e))&&(o.d(1),o=i(e),o&&(o.c(),o.m(t.parentNode,t)))},d(e){o.d(e),e&&S(t)}}}(e),s=e[6],a=[];for(let t=0;t<s.length;t+=1)a[t]=Zo(Uo(e,s,t));return{c(){t=q("select"),l&&l.c(),n=F();for(let e=0;e<a.length;e+=1)a[e].c();A(t,"class",i=I(e[3]||e[4])+" svelte-5xpzvo"),A(t,"id",e[2]),A(t,"name",e[2]),t.disabled=e[1],t.required=e[5]},m(i,s){C(i,t,s),l&&l.m(t,null),_(t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null);o||(r=D(t,"change",e[9]),o=!0)},p(e,[n]){if(e[7]||l.p(e,n),65&n){let i;for(s=e[6],i=0;i<s.length;i+=1){const o=Uo(e,s,i);a[i]?a[i].p(o,n):(a[i]=Zo(o),a[i].c(),a[i].m(t,null))}for(;i<a.length;i+=1)a[i].d(1);a.length=s.length}24&n&&i!==(i=I(e[3]||e[4])+" svelte-5xpzvo")&&A(t,"class",i),4&n&&A(t,"id",e[2]),4&n&&A(t,"name",e[2]),2&n&&(t.disabled=e[1]),32&n&&(t.required=e[5])},i:g,o:g,d(e){e&&S(t),l&&l.d(),j(a,e),o=!1,r()}}}function er(e,t,n){const i=Y();let{id:o}=t,{item:r}=t,{value:l}=t,{noForm:s=!1}=t,{classId:a}=t,{disabled:c}=t,{required:d}=t,{enum:u,regulation:m,readonly:f}=r.properties;u&&(u=u.map((e=>[e,e]))),"valueAddedTax"===m&&(l||=0,u=[["0% Steuerbefreit",0],["8.1% Normalsatz",.081],["2.6% Reduzierter Satz",.026],["3.8% Beherbergung",.038]]),c||=!!f,c||(c=void 0);return e.$$set=e=>{"id"in e&&n(2,o=e.id),"item"in e&&n(10,r=e.item),"value"in e&&n(0,l=e.value),"noForm"in e&&n(3,s=e.noForm),"classId"in e&&n(4,a=e.classId),"disabled"in e&&n(1,c=e.disabled),"required"in e&&n(5,d=e.required)},[l,c,o,s,a,d,u,m,f,e=>i("blur",{value:e.srcElement.value}),r]}class tr extends ke{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=q("style")).id="svelte-5xpzvo-style",t.textContent="select.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:focus{border:none;border-bottom:2px solid #4300b0}",_(document.head,t)),xe(this,e,er,Xo,x,{id:2,item:10,value:0,noForm:3,classId:4,disabled:1,required:5})}}function nr(e){let t;return{c(){t=E("Stunden")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function ir(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[nr]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function or(e){let t;return{c(){t=E("Minuten")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function rr(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[or]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function lr(e){let t;return{c(){t=E("Jetzt")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function sr(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[lr]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function ar(e){let t,n,i,o,r,l,s,a,c;return o=new e[5]({props:{value:e[0],closeOnSelection:!0}}),o.$on("change",e[8]),l=new e[6]({props:{value:e[0],$$slots:{"now-label":[sr],"minutes-label":[rr],"hours-label":[ir]},$$scope:{ctx:e}}}),l.$on("change",e[7]),{c(){t=q("input"),i=L(),ye(o.$$.fragment),r=L(),ye(l.$$.fragment),A(t,"type","string"),A(t,"class",n=e[2]||e[3]),A(t,"id",e[1]),A(t,"name",e[1]),t.hidden=!0},m(n,d){C(n,t,d),V(t,e[0]),C(n,i,d),be(o,n,d),C(n,r,d),be(l,n,d),s=!0,a||(c=D(t,"input",e[9]),a=!0)},p(e,[i]){(!s||12&i&&n!==(n=e[2]||e[3]))&&A(t,"class",n),(!s||2&i)&&A(t,"id",e[1]),(!s||2&i)&&A(t,"name",e[1]),1&i&&V(t,e[0]);const r={};1&i&&(r.value=e[0]),o.$set(r);const a={};1&i&&(a.value=e[0]),4096&i&&(a.$$scope={dirty:i,ctx:e}),l.$set(a)},i(e){s||(fe(o.$$.fragment,e),fe(l.$$.fragment,e),s=!0)},o(e){pe(o.$$.fragment,e),pe(l.$$.fragment,e),s=!1},d(e){e&&S(t),e&&S(i),we(o,e),e&&S(r),we(l,e),a=!1,c()}}}function cr(e,t,n){const i=Y(),{Label:o,DatePicker:r,TimePicker:l}=c;let{value:s}=t,{id:a}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>i("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,o,r,l,({detail:e})=>{var t,i;n(0,(t=e.value,i=s,s=null==t||null==i?t:(i.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),i))),m(s)},({detail:e})=>{n(0,s=jn(e.value,s)),m(s)},function(){s=this.value,n(0,s)}]}class dr extends ke{constructor(e){super(),xe(this,e,cr,ar,x,{value:0,id:1,noForm:2,classId:3})}}function ur(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p,$,h;return u=new e[9]({props:{format:e[5],required:e[3],disabled:e[4],value:e[7],closeOnSelection:!0}}),u.$on("change",e[10]),f=new e[9]({props:{format:e[6],required:e[3],disabled:e[4],value:e[8],class:"moveLeft",closeOnSelection:!0}}),f.$on("change",e[11]),{c(){t=q("input"),r=L(),l=q("input"),d=L(),ye(u.$$.fragment),m=E(" /\n"),ye(f.$$.fragment),A(t,"type","string"),A(t,"class",n=e[1]||e[2]),A(t,"id",i=e[0]+"_from"),A(t,"name",o=e[0]+"_from"),t.hidden=!0,A(l,"type","string"),A(l,"class",s=e[1]||e[2]),A(l,"id",a=e[0]+"_to"),A(l,"name",c=e[0]+"_to"),l.hidden=!0},m(n,i){C(n,t,i),V(t,e[7]),C(n,r,i),C(n,l,i),V(l,e[8]),C(n,d,i),be(u,n,i),C(n,m,i),be(f,n,i),p=!0,$||(h=[D(t,"input",e[13]),D(l,"input",e[14])],$=!0)},p(e,[r]){(!p||6&r&&n!==(n=e[1]||e[2]))&&A(t,"class",n),(!p||1&r&&i!==(i=e[0]+"_from"))&&A(t,"id",i),(!p||1&r&&o!==(o=e[0]+"_from"))&&A(t,"name",o),128&r&&V(t,e[7]),(!p||6&r&&s!==(s=e[1]||e[2]))&&A(l,"class",s),(!p||1&r&&a!==(a=e[0]+"_to"))&&A(l,"id",a),(!p||1&r&&c!==(c=e[0]+"_to"))&&A(l,"name",c),256&r&&V(l,e[8]);const d={};32&r&&(d.format=e[5]),8&r&&(d.required=e[3]),16&r&&(d.disabled=e[4]),128&r&&(d.value=e[7]),u.$set(d);const m={};64&r&&(m.format=e[6]),8&r&&(m.required=e[3]),16&r&&(m.disabled=e[4]),256&r&&(m.value=e[8]),f.$set(m)},i(e){p||(fe(u.$$.fragment,e),fe(f.$$.fragment,e),p=!0)},o(e){pe(u.$$.fragment,e),pe(f.$$.fragment,e),p=!1},d(e){e&&S(t),e&&S(r),e&&S(l),e&&S(d),we(u,e),e&&S(m),we(f,e),$=!1,b(h)}}}function mr(e,t,n){const i=Y(),{DatePicker:o}=c;let{value:r}=t,{id:l}=t,{noForm:s=!1}=t,{classId:a}=t,{required:d}=t,{disabled:u}=t,m="%d.%m.%Y",f="%d.%m.%Y",p=r?.from,$=r?.to;"Invalid Date"===p?.toString()&&(p=void 0),"Invalid Date"===$?.toString()&&($=void 0),u&&(void 0===p&&(m=""),void 0===$&&(f=""));return e.$$set=e=>{"value"in e&&n(12,r=e.value),"id"in e&&n(0,l=e.id),"noForm"in e&&n(1,s=e.noForm),"classId"in e&&n(2,a=e.classId),"required"in e&&n(3,d=e.required),"disabled"in e&&n(4,u=e.disabled)},[l,s,a,d,u,m,f,p,$,o,({detail:e})=>{n(7,p=jn(e.value,p)),$&&p&&$.valueOf()-p.valueOf()<0&&n(7,p=void 0),i("change",{value:p,range:"_from"})},({detail:e})=>{n(8,$=jn(e.value,$)),$&&p&&$.valueOf()-p.valueOf()<0&&n(8,$=void 0),i("change",{value:$,range:"_to"})},r,function(){p=this.value,n(7,p)},function(){$=this.value,n(8,$)}]}class fr extends ke{constructor(e){var t;super(),document.getElementById("svelte-7itxk4-style")||((t=q("style")).id="svelte-7itxk4-style",t.textContent="div.date-picker.moveLeft div.dropdown.calendar{left:-3em !important}",_(document.head,t)),xe(this,e,mr,ur,x,{value:12,id:0,noForm:1,classId:2,required:3,disabled:4})}}function pr(e){let t,n,i;return n=new e[5]({props:{type:"string",inputClass:e[2],id:e[0],name:e[0],value:e[1],pattern:$r,placeholder:hr,readonly:e[3],disabled:e[4]}}),n.$on("change",e[6]),{c(){t=q("div"),ye(n.$$.fragment),O(t,"max-width","4em")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p(e,[t]){const i={};4&t&&(i.inputClass=e[2]),1&t&&(i.id=e[0]),1&t&&(i.name=e[0]),2&t&&(i.value=e[1]),8&t&&(i.readonly=e[3]),16&t&&(i.disabled=e[4]),n.$set(i)},i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}const $r="([01][0-9]|2[0-3]):([0-5][0-9])",hr="";function gr(e,t,n){const i=Y(),{TextField:o}=c;let{id:r}=t,{item:l}=t,{value:s}=t,{inputClass:a}=t,{readonly:d}=t,{disabled:u}=t,{praefix:m}=t;const f=e=>{if(!e)return"";const[t,n]=e.split(":");return 4===t.length?`${t.substr(0,2)}:${t.substring(2,4)}`:3===t.length?t.substring(0,2)>23?`0${t.substring(0,1)}:${t.substring(1,3)}`:`${t.substring(0,2)}:${t.substring(2,3)}0`:2===t.length?t>23?`0${t.substring(0,1)}:${t.substring(1,2)}0`:`${t}:${(n||"0").padStart(2,"0")}`:`0${t}:${(n||"0").padStart(2,"0")}`};return e.$$set=e=>{"id"in e&&n(0,r=e.id),"item"in e&&n(7,l=e.item),"value"in e&&n(1,s=e.value),"inputClass"in e&&n(2,a=e.inputClass),"readonly"in e&&n(3,d=e.readonly),"disabled"in e&&n(4,u=e.disabled),"praefix"in e&&n(8,m=e.praefix)},[r,s,a,d,u,o,({detail:e})=>{i("blur",{value:f(e.value)}),i("checkRange",{idx:m,fieldId:r,value:e.value})},l,m]}class vr extends ke{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=q("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",_(document.head,t)),xe(this,e,gr,pr,x,{id:0,item:7,value:1,inputClass:2,readonly:3,disabled:4,praefix:8})}}const{document:yr}=ge;function br(e,t,n){const i=e.slice();return i[0]=t[n],i}function wr(e,t,n){const i=e.slice();return i[17]=t[n],i[19]=n,i}function xr(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function kr(e){let t,n,i=e[14],o=[];for(let t=0;t<i.length;t+=1)o[t]=_r(br(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(14&n){let l;for(i=e[14],l=0;l<i.length;l+=1){const r=br(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=_r(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}function Ir(e){let t,n,i=(e[0]["_"+e[17]]||e[0][e[17]])+"",o=e[19]&&function(e){let t;return{c(){t=E(", ")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}();return{c(){t=q("span"),o&&o.c(),n=E(i),A(t,"class","lookupValue")},m(e,i){C(e,t,i),o&&o.m(t,null),_(t,n)},p(e,t){2&t&&i!==(i=(e[0]["_"+e[17]]||e[0][e[17]])+"")&&B(n,i)},d(e){e&&S(t),o&&o.d()}}}function _r(e){let t,n,i,o,r,l,s,a,c=e[1],d=[];for(let t=0;t<c.length;t+=1)d[t]=Ir(wr(e,c,t));return o=new Me({props:{size:"18"}}),{c(){t=q("div");for(let e=0;e<d.length;e+=1)d[e].c();n=L(),i=q("span"),ye(o.$$.fragment),r=L(),A(i,"class","feather pointer svelte-1u646ni"),A(t,"class","lookupItem svelte-1u646ni")},m(c,u){C(c,t,u);for(let e=0;e<d.length;e+=1)d[e].m(t,null);_(t,n),_(t,i),be(o,i,null),_(t,r),l=!0,s||(a=D(i,"click",e[3](e[0]._id)),s=!0)},p(i,o){if(e=i,6&o){let i;for(c=e[1],i=0;i<c.length;i+=1){const r=wr(e,c,i);d[i]?d[i].p(r,o):(d[i]=Ir(r),d[i].c(),d[i].m(t,n))}for(;i<d.length;i+=1)d[i].d(1);d.length=c.length}},i(e){l||(fe(o.$$.fragment,e),l=!0)},o(e){pe(o.$$.fragment,e),l=!1},d(e){e&&S(t),j(d,e),we(o),s=!1,a()}}}function Cr(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Sr(e){let t,n,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Cr,then:kr,catch:xr,value:14,blocks:[,,,]};return $e(e[2](),i),{c(){t=q("div"),i.block.c(),A(t,"class","lookup svelte-1u646ni")},m(e,o){C(e,t,o),i.block.m(t,i.anchor=null),i.mount=()=>t,i.anchor=null,n=!0},p(t,[n]){he(i,e=t,n)},i(e){n||(fe(i.block),n=!0)},o(e){for(let e=0;e<3;e+=1){pe(i.blocks[e])}n=!1},d(e){e&&S(t),i.block.d(),i.token=null,i=null}}}function jr(e,n,i){let{id:o}=n,{item:r}=n,{praefix:l}=n,{record:s}=n;const{refItem:a,view:c}=r.properties;let d=c.split(","),[u,m]=a.split(":");const[f,p]=m.split("."),$=()=>{ne().then((()=>{const e=document.querySelector("div.form-field."+r.name);e&&(e.style.display="none")}))};return e.$$set=e=>{"id"in e&&i(4,o=e.id),"item"in e&&i(0,r=e.item),"praefix"in e&&i(5,l=e.praefix),"record"in e&&i(6,s=e.record)},[r,d,async()=>{let e=[];if(s._id){const n=!d.some((e=>e.includes(":")));p&&(u=p+"."+u);const o={[u]:s[u]||s._id};if(e=await t.getSectionView(f,o,n),!n){const t=d.find((e=>e.includes(":"))).split(":")[0];e=e.map((e=>{const n=e[t].find((e=>e[t]===s._id));return n._id=e._id,n})),i(1,d=d.map((e=>e.split(":")[1])))}}return e.length||$(),e},e=>async()=>{const n=await t.getTaskByDocId(e);if(!n)return;const i=n._id,o=`/task/${n.event}/${i}/task?view=standalone`;window.open(o)},o,l,s]}class qr extends ke{constructor(e){var t;super(),yr.getElementById("svelte-1u646ni-style")||((t=q("style")).id="svelte-1u646ni-style",t.textContent=".feather.svelte-1u646ni{position:absolute;top:0;left:-1.5em;color:#4300b0}div.lookup.svelte-1u646ni{margin-top:0.75em;color:#aaa}div.lookupItem.svelte-1u646ni{position:relative;margin-left:2em}div.form-field:has(div.lookup){margin-bottom:0.5em !important}div.field:has(div.lookupItem){background-color:#f5f5f5 !important}",_(yr.head,t)),xe(this,e,jr,Sr,x,{id:4,item:0,praefix:5,record:6})}}function Nr(e){let t,n,i;return n=new Ke({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Er(e){let t,n,i,o,r;return n=new Ke({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-9up2nn")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[9]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Lr(e){let t,n,i,o,r,l;n=new e[8]({props:{inputClass:e[0],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[12]);const s=[Er,Nr],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=s[o](e),{c(){t=q("div"),ye(n.$$.fragment),i=L(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),be(n,t,null),_(t,i),a[o].m(t,null),l=!0},p(e,[i]){const l={};1&i&&(l.inputClass=e[0]),2&i&&(l.disabled=e[1]),4&i&&(l.formnovalidate=e[2]),8&i&&(l.readonly=e[3]),16&i&&(l.required=e[4]),32&i&&(l.id=e[5]),64&i&&(l.name=e[6]),128&i&&(l.value=e[7]),n.$set(l);let d=o;o=c(e),o===d?a[o].p(e,i):(ue(),pe(a[d],1,1,(()=>{a[d]=null})),me(),r=a[o],r?r.p(e,i):(r=a[o]=s[o](e),r.c()),fe(r,1),r.m(t,null))},i(e){l||(fe(n.$$.fragment,e),fe(r),l=!0)},o(e){pe(n.$$.fragment,e),pe(r),l=!1},d(e){e&&S(t),we(n),a[o].d()}}}function Fr(e,n,i){const{TextField:o}=c;let{inputClass:r}=n,{disabled:l}=n,{formnovalidate:s}=n,{readonly:a}=n,{required:d}=n,{id:u}=n,{name:m}=n,{value:f}=n,{record:p}=n,{item:$}=n;return e.$$set=e=>{"inputClass"in e&&i(0,r=e.inputClass),"disabled"in e&&i(1,l=e.disabled),"formnovalidate"in e&&i(2,s=e.formnovalidate),"readonly"in e&&i(3,a=e.readonly),"required"in e&&i(4,d=e.required),"id"in e&&i(5,u=e.id),"name"in e&&i(6,m=e.name),"value"in e&&i(7,f=e.value),"record"in e&&i(10,p=e.record),"item"in e&&i(11,$=e.item)},[r,l,s,a,d,u,m,f,o,async()=>{if(!f)return;const e=m.includes(".")?p[m.split(".")[0]]:p,{street:n,houseNo:i,postcode:o,location:r,country:l}=e,s=[n&&i?n+" "+i:n,o&&r?o+" "+r:o||r||"",l&&(await t.getTask("country",l)).designation].filter((e=>!!e)).join(", "),a="https://bing.com/maps/default.aspx?where1="+encodeURIComponent(s);window.open(a,"_blank")},p,$,function(t){G(e,t)}]}class Dr extends ke{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=q("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",_(document.head,t)),xe(this,e,Fr,Lr,x,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,record:10,item:11})}}function zr(e){let t,n,i;return n=new Pe({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Tr(e){let t,n,i,o,r;return n=new Pe({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-9up2nn")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[9]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Ar(e){let t,n,i,o,r,l;n=new e[8]({props:{inputClass:e[0],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[10]);const s=[Tr,zr],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=s[o](e),{c(){t=q("div"),ye(n.$$.fragment),i=L(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),be(n,t,null),_(t,i),a[o].m(t,null),l=!0},p(e,[i]){const l={};1&i&&(l.inputClass=e[0]),2&i&&(l.disabled=e[1]),4&i&&(l.formnovalidate=e[2]),8&i&&(l.readonly=e[3]),16&i&&(l.required=e[4]),32&i&&(l.id=e[5]),64&i&&(l.name=e[6]),128&i&&(l.value=e[7]),n.$set(l);let d=o;o=c(e),o===d?a[o].p(e,i):(ue(),pe(a[d],1,1,(()=>{a[d]=null})),me(),r=a[o],r?r.p(e,i):(r=a[o]=s[o](e),r.c()),fe(r,1),r.m(t,null))},i(e){l||(fe(n.$$.fragment,e),fe(r),l=!0)},o(e){pe(n.$$.fragment,e),pe(r),l=!1},d(e){e&&S(t),we(n),a[o].d()}}}function Br(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:l}=t,{readonly:s}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t;return e.$$set=e=>{"inputClass"in e&&n(0,o=e.inputClass),"disabled"in e&&n(1,r=e.disabled),"formnovalidate"in e&&n(2,l=e.formnovalidate),"readonly"in e&&n(3,s=e.readonly),"required"in e&&n(4,a=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,m=e.value)},[o,r,l,s,a,d,u,m,i,async()=>{if(!m)return;let e=m;e.includes("//")||(e="//"+e),window.open(e,"_blank")},function(t){G(e,t)}]}class Vr extends ke{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=q("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",_(document.head,t)),xe(this,e,Br,Ar,x,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7})}}function Or(e){let t,n,i;return n=new Xe({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Mr(e){let t,n,i,o,r;return n=new Xe({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-9up2nn")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[11]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Wr(e){let t,n,i,o,r,l;n=new e[10]({props:{inputClass:e[2],pattern:e[0],placeholder:e[1],disabled:e[3],formnovalidate:e[4],readonly:e[5],required:e[6],id:e[7],name:e[8],value:e[9]}}),n.$on("change",e[12]);const s=[Mr,Or],a=[];function c(e,t){return e[9]?0:1}return o=c(e),r=a[o]=s[o](e),{c(){t=q("div"),ye(n.$$.fragment),i=L(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),be(n,t,null),_(t,i),a[o].m(t,null),l=!0},p(e,[i]){const l={};4&i&&(l.inputClass=e[2]),1&i&&(l.pattern=e[0]),2&i&&(l.placeholder=e[1]),8&i&&(l.disabled=e[3]),16&i&&(l.formnovalidate=e[4]),32&i&&(l.readonly=e[5]),64&i&&(l.required=e[6]),128&i&&(l.id=e[7]),256&i&&(l.name=e[8]),512&i&&(l.value=e[9]),n.$set(l);let d=o;o=c(e),o===d?a[o].p(e,i):(ue(),pe(a[d],1,1,(()=>{a[d]=null})),me(),r=a[o],r?r.p(e,i):(r=a[o]=s[o](e),r.c()),fe(r,1),r.m(t,null))},i(e){l||(fe(n.$$.fragment,e),fe(r),l=!0)},o(e){pe(n.$$.fragment,e),pe(r),l=!1},d(e){e&&S(t),we(n),a[o].d()}}}function Rr(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:l}=t,{readonly:s}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t,{pattern:f}=t,{placeholder:p}=t;f||="(\\+4[1-9]\\s?)([1-9]{2}\\s?\\d{3}\\s?\\d{2}\\s?\\d{2})|(\\d{2,4}\\s?\\d{3}\\s?\\d{2}\\s?\\d{2})",p||="+41 58 234 56 78";return e.$$set=e=>{"inputClass"in e&&n(2,o=e.inputClass),"disabled"in e&&n(3,r=e.disabled),"formnovalidate"in e&&n(4,l=e.formnovalidate),"readonly"in e&&n(5,s=e.readonly),"required"in e&&n(6,a=e.required),"id"in e&&n(7,d=e.id),"name"in e&&n(8,u=e.name),"value"in e&&n(9,m=e.value),"pattern"in e&&n(0,f=e.pattern),"placeholder"in e&&n(1,p=e.placeholder)},[f,p,o,r,l,s,a,d,u,m,i,async()=>{if(!m)return;let e="tel:"+m;window.open(e,"_self")},function(t){G(e,t)}]}class Pr extends ke{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=q("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",_(document.head,t)),xe(this,e,Rr,Wr,x,{inputClass:2,disabled:3,formnovalidate:4,readonly:5,required:6,id:7,name:8,value:9,pattern:0,placeholder:1})}}function Hr(e){let t,n,i;return n=new Ye({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),be(n,t,null),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n)}}}function Qr(e){let t,n,i,o,r;return n=new Ye({props:{size:"18"}}),{c(){t=q("span"),ye(n.$$.fragment),A(t,"class","feather pointer svelte-9up2nn")},m(l,s){C(l,t,s),be(n,t,null),i=!0,o||(r=D(t,"click",e[11]),o=!0)},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n),o=!1,r()}}}function Yr(e){let t,n,i,o,r,l;n=new e[10]({props:{type:"email",inputClass:e[0],pattern:e[8],placeholder:e[9],disabled:e[1],formnovalidate:e[2],readonly:e[3],required:e[4],id:e[5],name:e[6],value:e[7]}}),n.$on("change",e[12]);const s=[Qr,Hr],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=s[o](e),{c(){t=q("div"),ye(n.$$.fragment),i=L(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),be(n,t,null),_(t,i),a[o].m(t,null),l=!0},p(e,[i]){const l={};1&i&&(l.inputClass=e[0]),256&i&&(l.pattern=e[8]),512&i&&(l.placeholder=e[9]),2&i&&(l.disabled=e[1]),4&i&&(l.formnovalidate=e[2]),8&i&&(l.readonly=e[3]),16&i&&(l.required=e[4]),32&i&&(l.id=e[5]),64&i&&(l.name=e[6]),128&i&&(l.value=e[7]),n.$set(l);let d=o;o=c(e),o===d?a[o].p(e,i):(ue(),pe(a[d],1,1,(()=>{a[d]=null})),me(),r=a[o],r?r.p(e,i):(r=a[o]=s[o](e),r.c()),fe(r,1),r.m(t,null))},i(e){l||(fe(n.$$.fragment,e),fe(r),l=!0)},o(e){pe(n.$$.fragment,e),pe(r),l=!1},d(e){e&&S(t),we(n),a[o].d()}}}function Gr(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:l}=t,{readonly:s}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t,{pattern:f}=t,{placeholder:p}=t;return e.$$set=e=>{"inputClass"in e&&n(0,o=e.inputClass),"disabled"in e&&n(1,r=e.disabled),"formnovalidate"in e&&n(2,l=e.formnovalidate),"readonly"in e&&n(3,s=e.readonly),"required"in e&&n(4,a=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,m=e.value),"pattern"in e&&n(8,f=e.pattern),"placeholder"in e&&n(9,p=e.placeholder)},[o,r,l,s,a,d,u,m,f,p,i,async()=>{if(!m)return;let e="mailto:"+m;window.open(e,"_self")},function(t){G(e,t)}]}class Ur extends ke{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=q("style")).id="svelte-9up2nn-style",t.textContent=".feather.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:#4300b0;margin-left:-2em}.feather2.svelte-9up2nn{position:absolute;top:0.75em;left:0.5em;color:light-gray;margin-left:-2em}",_(document.head,t)),xe(this,e,Gr,Yr,x,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,pattern:8,placeholder:9})}}const Kr=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"];function Jr(e){let t;return{c(){t=q("textarea"),A(t,"id",e[0]),O(t,"visibility","hidden")},m(n,i){C(n,t,i),e[18](t)},p(e,n){1&n&&A(t,"id",e[0])},d(n){n&&S(t),e[18](null)}}}function Zr(e){let t;return{c(){t=q("div"),A(t,"id",e[0])},m(n,i){C(n,t,i),e[17](t)},p(e,n){1&n&&A(t,"id",e[0])},d(n){n&&S(t),e[17](null)}}}function Xr(e){let t;function n(e,t){return e[1]?Zr:Jr}let i=n(e),o=i(e);return{c(){t=q("div"),o.c(),A(t,"class",e[2])},m(n,i){C(n,t,i),o.m(t,null),e[19](t)},p(e,[r]){i===(i=n(e))&&o?o.p(e,r):(o.d(1),o=i(e),o&&(o.c(),o.m(t,null))),4&r&&A(t,"class",e[2])},i:g,o:g,d(n){n&&S(t),o.d(),e[19](null)}}}const el=e=>e+"_"+Math.floor(1e9*Math.random())+String(Date.now());let tl=(()=>{let e={listeners:[],scriptId:el("tiny-script"),scriptLoaded:!1,injected:!1};return{load:(t,n,i)=>{e.scriptLoaded?i():(e.listeners.push(i),e.injected||((t,n,i,o)=>{e.injected=!0;const r=n.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=i,r.onload=()=>{o()},n.head&&n.head.appendChild(r)})(e.scriptId,t,n,(()=>{e.listeners.forEach((e=>e())),e.scriptLoaded=!0})))}}})();function nl(e,t,n){var i;let o,r,l,{id:s=el("tinymce-svelte")}=t,{inline:a}=t,{disabled:c=!1}=t,{apiKey:d="no-api-key"}=t,{channel:u="6"}=t,{scriptSrc:m}=t,{conf:f={}}=t,{modelEvents:p="change input undo redo"}=t,{value:$=""}=t,{text:h=""}=t,{cssClass:g="tinymce-wrapper"}=t,v=$,y=c;const b=Y(),w=()=>{const e="undefined"!=typeof window?window:global;return e&&e.tinymce?e.tinymce:null},x=()=>{const e=Object.assign(Object.assign({},f),{target:r,inline:void 0!==a?a:void 0!==f.inline&&f.inline,readonly:c,setup:e=>{n(14,l=e),e.on("init",(()=>{e.setContent($),e.on(p,(()=>{n(15,v=e.getContent()),v!==$&&(n(5,$=v),n(6,h=e.getContent({format:"text"})))}))})),((e,t)=>{Kr.forEach((n=>{e.on(n,(i=>{t(n.toLowerCase(),{eventName:n,event:i,editor:e})}))}))})(e,b),"function"==typeof f.setup&&f.setup(e)}});n(4,r.style.visibility="",r),w().init(e)};return H((()=>{if(null!==w())x();else{const e=m||`https://cdn.tiny.cloud/1/${d}/tinymce/${u}/tinymce.min.js`;tl.load(o.ownerDocument,e,(()=>{x()}))}})),Q((()=>{var e;l&&(null===(e=w())||void 0===e||e.remove(l))})),e.$$set=e=>{"id"in e&&n(0,s=e.id),"inline"in e&&n(1,a=e.inline),"disabled"in e&&n(7,c=e.disabled),"apiKey"in e&&n(8,d=e.apiKey),"channel"in e&&n(9,u=e.channel),"scriptSrc"in e&&n(10,m=e.scriptSrc),"conf"in e&&n(11,f=e.conf),"modelEvents"in e&&n(12,p=e.modelEvents),"value"in e&&n(5,$=e.value),"text"in e&&n(6,h=e.text),"cssClass"in e&&n(2,g=e.cssClass)},e.$$.update=()=>{123040&e.$$.dirty&&(l&&v!==$&&(l.setContent($),n(6,h=l.getContent({format:"text"}))),l&&c!==y&&(n(16,y=c),"function"==typeof(null===n(13,i=l.mode)||void 0===i?void 0:i.set)?l.mode.set(c?"readonly":"design"):l.setMode(c?"readonly":"design")))},[s,a,g,o,r,$,h,c,d,u,m,f,p,i,l,v,y,function(e){K[e?"unshift":"push"]((()=>{r=e,n(4,r)}))},function(e){K[e?"unshift":"push"]((()=>{r=e,n(4,r)}))},function(e){K[e?"unshift":"push"]((()=>{o=e,n(3,o)}))}]}class il extends ke{constructor(e){super(),xe(this,e,nl,Xr,x,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function ol(e){let t,n,i,o,r,l,s;function a(t){e[7](t)}let c={apiKey:"fdzr5donqxlwonl0pkqm8pcogxwbbrjco9jzw0suy9mxu17n",conf:e[6],disabled:e[4],readonly:e[5]};return void 0!==e[0]&&(c.value=e[0]),n=new il({props:c}),K.push((()=>ve(n,"value",a))),{c(){t=q("div"),ye(n.$$.fragment),o=L(),r=q("input"),A(r,"class",l=e[1]||e[2]),A(r,"id",e[3]),A(r,"name",e[3]),r.value=e[0],r.hidden=!0,O(t,"min-height","10em"),O(t,"margin-top","-1em")},m(e,i){C(e,t,i),be(n,t,null),_(t,o),_(t,r),s=!0},p(e,[t]){const o={};16&t&&(o.disabled=e[4]),32&t&&(o.readonly=e[5]),!i&&1&t&&(i=!0,o.value=e[0],oe((()=>i=!1))),n.$set(o),(!s||6&t&&l!==(l=e[1]||e[2]))&&A(r,"class",l),(!s||8&t)&&A(r,"id",e[3]),(!s||8&t)&&A(r,"name",e[3]),(!s||1&t&&r.value!==e[0])&&(r.value=e[0])},i(e){s||(fe(n.$$.fragment,e),s=!0)},o(e){pe(n.$$.fragment,e),s=!1},d(e){e&&S(t),we(n)}}}function rl(e,t,n){let i=JSON.parse(r.getItem("Locale")).id;i=i.startsWith("fr")?"fr_FR":i.split("-")[0];let{value:o}=t,{noForm:l}=t,{classId:s}=t,{id:a}=t,{disabled:c}=t,{readonly:d}=t;const u={plugins:"advlist numlist link image lists table preview emoticons fullscreen",menu:{file:{title:"File",items:"preview"}},menubar:"edit view insert format table",toolbar:"undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | fullscreen",height:600,language:i};return e.$$set=e=>{"value"in e&&n(0,o=e.value),"noForm"in e&&n(1,l=e.noForm),"classId"in e&&n(2,s=e.classId),"id"in e&&n(3,a=e.id),"disabled"in e&&n(4,c=e.disabled),"readonly"in e&&n(5,d=e.readonly)},[o,l,s,a,c,d,u,function(e){o=e,n(0,o)}]}class ll extends ke{constructor(e){var t;super(),document.getElementById("svelte-z42kzx-style")||((t=q("style")).id="svelte-z42kzx-style",t.textContent="div.tox-statusbar{display:none !important}div.tox.tox-tinymce{border:1px #808080 solid}.tox-edit-area__iframe{background-color:#f9f3f6 !important}",_(document.head,t)),xe(this,e,rl,ol,x,{value:0,noForm:1,classId:2,id:3,disabled:4,readonly:5})}}function sl(e){let t,n;return t=new e[24]({props:{id:e[39](e[32]),class:e[1].name+(e[20]?" hidden ":""),name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[jl,({notifyList:e})=>({18:e}),({notifyList:e})=>[e?262144:0]]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};1048578&n[0]&&(i.class=e[1].name+(e[20]?" hidden ":"")),2&n[0]&&(i.name=e[1].designation),2&n[0]&&(i.help=e[1].properties?.hint),13631487&n[0]|33554432&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function al(e){let t,n;return t=new e[28]({props:{text:e[1].designation}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};2&n[0]&&(i.text=e[1].designation),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function cl(e){let t,n,i,o;return t=new e[24]({props:{id:e[39](e[32]),class:e[1].name+(e[20]?" hidden ":""),name:e[1].designation,help:e[1].properties?.hint}}),i=new ll({props:{classId:e[7],disabled:e[3],readonly:e[19],id:e[32],name:e[1].name,value:e[22](),noForm:e[6]}}),i.$on("blur",e[35]()),{c(){ye(t.$$.fragment),n=L(),ye(i.$$.fragment)},m(e,r){be(t,e,r),C(e,n,r),be(i,e,r),o=!0},p(e,n){const o={};1048578&n[0]&&(o.class=e[1].name+(e[20]?" hidden ":"")),2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),t.$set(o);const r={};128&n[0]&&(r.classId=e[7]),8&n[0]&&(r.disabled=e[3]),524288&n[0]&&(r.readonly=e[19]),2&n[0]&&(r.name=e[1].name),4194304&n[0]&&(r.value=e[22]()),64&n[0]&&(r.noForm=e[6]),i.$set(r)},i(e){o||(fe(t.$$.fragment,e),fe(i.$$.fragment,e),o=!0)},o(e){pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!1},d(e){we(t,e),e&&S(n),we(i,e)}}}function dl(e){let t,n,i,o,r,l;return t=new e[24]({props:{id:e[39](e[32]),class:e[1].name+" hidden",name:e[1].designation,help:e[1].properties?.hint,$$slots:{default:[ql]},$$scope:{ctx:e}}}),i=new e[28]({props:{text:e[23]}}),r=new Ti({props:{required:e[4],disabled:e[3],readonly:e[19],id:e[32],item:e[1],value:e[22]()}}),r.$on("setRefValue",e[40]),r.$on("safeReference",e[44]),{c(){ye(t.$$.fragment),n=L(),ye(i.$$.fragment),o=L(),ye(r.$$.fragment)},m(e,s){be(t,e,s),C(e,n,s),be(i,e,s),C(e,o,s),be(r,e,s),l=!0},p(e,n){const o={};2&n[0]&&(o.class=e[1].name+" hidden"),2&n[0]&&(o.name=e[1].designation),2&n[0]&&(o.help=e[1].properties?.hint),6291842&n[0]|33554432&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o);const l={};8388608&n[0]&&(l.text=e[23]),i.$set(l);const s={};16&n[0]&&(s.required=e[4]),8&n[0]&&(s.disabled=e[3]),524288&n[0]&&(s.readonly=e[19]),2&n[0]&&(s.item=e[1]),4194304&n[0]&&(s.value=e[22]()),r.$set(s)},i(e){l||(fe(t.$$.fragment,e),fe(i.$$.fragment,e),fe(r.$$.fragment,e),l=!0)},o(e){pe(t.$$.fragment,e),pe(i.$$.fragment,e),pe(r.$$.fragment,e),l=!1},d(e){we(t,e),e&&S(n),we(i,e),e&&S(o),we(r,e)}}}function ul(e){let t,n;return t=new e[25]({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],pattern:e[29],required:!0===e[4],placeholder:e[30],id:e[32],name:e[31],value:e[22]()}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=!0===e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function ml(e){let t,n;return t=new Pr({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],pattern:e[29],placeholder:e[30],value:e[22]()}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function fl(e){let t,n;return t=new Vr({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],value:e[22]()}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function pl(e){let t,n;return t=new Ur({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],pattern:e[29],placeholder:e[30],value:e[22]()}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function $l(e){let t,n;return t=new vr({props:{inputClass:e[6]||e[7],disabled:e[3],readonly:e[19],required:e[4],id:e[32],item:e[1],value:e[22](),praefix:e[5]}}),t.$on("blur",e[35]()),t.$on("checkRange",e[49]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),2&n[0]&&(i.item=e[1]),4194304&n[0]&&(i.value=e[22]()),32&n[0]&&(i.praefix=e[5]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function hl(e){let t,n;return t=new qr({props:{id:e[32],item:e[1],praefix:e[5],record:e[0]}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};2&n[0]&&(i.item=e[1]),32&n[0]&&(i.praefix=e[5]),1&n[0]&&(i.record=e[0]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function gl(e){let t,n;return t=new Dr({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],value:e[22](),record:e[0],item:e[1]}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),1&n[0]&&(i.record=e[0]),2&n[0]&&(i.item=e[1]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function vl(e){let t,n;return t=new dr({props:{classId:e[7],id:e[32],disabled:e[3],required:e[4],value:e[33](),noForm:e[6]}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function yl(e){let t,n;return t=new fr({props:{classId:e[7],id:e[32],disabled:e[3],required:e[4],value:e[34](),noForm:e[6]}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function bl(e){let t,n;return t=new e[26]({props:{inputClass:e[6]||e[7],required:e[4],disabled:e[3],id:e[32],name:e[31],value:e[33](),closeOnSelection:!0}}),t.$on("change",e[35](!0)),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),16&n[0]&&(i.required=e[4]),8&n[0]&&(i.disabled=e[3]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function wl(e){let t,n;return t=new e[27]({props:{round:!0,inputClass:e[6]||e[7],disabled:e[3]||e[19],required:e[4],id:e[32],name:e[31],checked:e[22]()}}),t.$on("change",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),524296&n[0]&&(i.disabled=e[3]||e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.checked=e[22]()),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function xl(e){let t,n;return t=new Go({props:{classId:e[7],disabled:e[3],required:e[4],id:e[32],item:e[1],record:e[0],value:e[22](),noForm:e[6],view:e[1].properties.view,praefix:e[5]}}),t.$on("blur",e[35]()),t.$on("invalid",e[48]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),2&n[0]&&(i.item=e[1]),1&n[0]&&(i.record=e[0]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),2&n[0]&&(i.view=e[1].properties.view),32&n[0]&&(i.praefix=e[5]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function kl(e){let t,n;return t=new xo({props:{classId:e[7],disabled:e[3],required:e[4],id:e[32],item:e[1],record:e[0],value:e[22](),noForm:e[6],multi:e[1].properties.multi,numberInput:e[12],praefix:e[5],toDelete:e[15],reqQuantity:e[16],notifyList:e[18]}}),t.$on("blur",e[35]()),t.$on("invalid",e[47]),t.$on("record",e[36]),t.$on("multi",e[37]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),2&n[0]&&(i.item=e[1]),1&n[0]&&(i.record=e[0]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),2&n[0]&&(i.multi=e[1].properties.multi),4096&n[0]&&(i.numberInput=e[12]),32&n[0]&&(i.praefix=e[5]),32768&n[0]&&(i.toDelete=e[15]),65536&n[0]&&(i.reqQuantity=e[16]),262144&n[0]&&(i.notifyList=e[18]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Il(e){let t,n;return t=new Oi({props:{classId:e[7],disabled:e[3],formnovalidate:e[10],required:e[4],readonly:e[19],id:e[32],item:e[1],currency:e[17],value:e[22](),noForm:e[6]}}),t.$on("blur",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),16&n[0]&&(i.required=e[4]),524288&n[0]&&(i.readonly=e[19]),2&n[0]&&(i.item=e[1]),131072&n[0]&&(i.currency=e[17]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function _l(e){let t,n;return t=new tr({props:{classId:e[7],disabled:e[3],required:e[4],id:e[32],item:e[1],value:e[22](),noForm:e[6]}}),t.$on("blur",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),2&n[0]&&(i.item=e[1]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Cl(e){let t,n;return t=new o({props:{classId:e[7],disabled:e[3],readonly:e[19],id:e[32],name:e[1].name,value:e[22](),noForm:e[6],placeholder:e[1].properties?.placeholder}}),t.$on("blur",e[35]()),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),524288&n[0]&&(i.readonly=e[19]),2&n[0]&&(i.name=e[1].name),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),2&n[0]&&(i.placeholder=e[1].properties?.placeholder),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Sl(e){let t,n;return t=new In({props:{classId:e[7],eventId:e[8],required:e[4],disabled:e[3],formnovalidate:e[10],readonly:e[19],id:e[32],item:e[1],desc:e[23],value:e[22](),noForm:e[6],praefix:e[5],selectionFields:e[9],selection:e[11],deList:e[13],recordId:e[2],isTemplate:e[14]}}),t.$on("task",e[45]),t.$on("change",e[35]()),t.$on("initFail",e[38]),t.$on("defPrep",e[46]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),256&n[0]&&(i.eventId=e[8]),16&n[0]&&(i.required=e[4]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),2&n[0]&&(i.item=e[1]),8388608&n[0]&&(i.desc=e[23]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),32&n[0]&&(i.praefix=e[5]),512&n[0]&&(i.selectionFields=e[9]),2048&n[0]&&(i.selection=e[11]),8192&n[0]&&(i.deList=e[13]),4&n[0]&&(i.recordId=e[2]),16384&n[0]&&(i.isTemplate=e[14]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function jl(e){let t,n,i,o;const r=[Sl,Cl,_l,Il,kl,xl,wl,bl,yl,vl,gl,hl,$l,pl,fl,ml,ul],l=[];function s(e,t){return"object"===e[1].type?0:"textarea"===e[1].type||e[1].properties&&"textarea"===e[1].properties.format?1:e[1].properties&&(e[1].properties.enum||e[1].properties.regulation)?2:"number"===e[1].type?3:e[1].properties&&e[1].properties.multi?4:e[1].properties&&e[1].properties.view&&"lookup"===!e[1].properties.format?5:"boolean"===e[1].type?6:"date"===e[1].type?7:"dateRange"===e[1].type?8:"datetime"===e[1].type?9:"map"===e[1].properties?.format?10:"lookup"===e[1].properties?.format?11:"time"===e[1].properties?.format?12:"email"===e[1].type||"email"===e[1].properties?.format?13:"url"===e[1].properties?.format?14:"tel"===e[1].properties?.format?15:16}return t=s(e),n=l[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){l[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=s(e),t===a?l[t].p(e,o):(ue(),pe(l[a],1,1,(()=>{l[a]=null})),me(),n=l[t],n?n.p(e,o):(n=l[t]=r[t](e),n.c()),fe(n,1),n.m(i.parentNode,i))},i(e){o||(fe(n),o=!0)},o(e){pe(n),o=!1},d(e){l[t].d(e),e&&S(i)}}}function ql(e){let t,n;return t=new In({props:{classId:e[7],eventId:e[8],disabled:!0,readonly:!0,id:e[32],item:e[1],value:e[22](),withRefValue:!0,refValue:e[21]}}),t.$on("setRefDesc",e[41]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),256&n[0]&&(i.eventId=e[8]),2&n[0]&&(i.item=e[1]),4194304&n[0]&&(i.value=e[22]()),2097152&n[0]&&(i.refValue=e[21]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Nl(e){let t,n,i,o;const r=[dl,cl,al,sl],l=[];function s(e,t){return e[5]||"reference"!==e[1].saveAs||"object"!==e[1].type?"html"===e[1].properties?.format?1:"divider"===e[1].type?2:3:0}return t=s(e),n=l[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){l[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=s(e),t===a?l[t].p(e,o):(ue(),pe(l[a],1,1,(()=>{l[a]=null})),me(),n=l[t],n?n.p(e,o):(n=l[t]=r[t](e),n.c()),fe(n,1),n.m(i.parentNode,i))},i(e){o||(fe(n),o=!0)},o(e){pe(n),o=!1},d(e){l[t].d(e),e&&S(i)}}}function El(e,t,n){let i,o,r;const l=Y(),{FormField:s,TextField:a,DatePicker:d,TimePicker:u,Checkbox:m,Divider:p}=c;let{praefix:$=""}=t,{item:h}=t,{listName:g=""}=t,{record:v}=t,{recordId:y}=t,{noForm:b=!1}=t,{classId:w}=t,{eventId:x}=t,{disabled:k}=t,{selectionFields:I}=t,{formnovalidate:_}=t,{selection:C=!1}=t,{notifyList:S}=t,{numberInput:j}=t,{deList:q}=t,{required:N}=t,{isTemplate:E}=t,{toDelete:L}=t,{reqQuantity:F}=t,{currency:D}=t,{changeValue:z}=t;y||=v._id;let{required:T,readonly:A,hidden:B,pattern:V,placeholder:O}=h.properties||{};if(B=!0===B,void 0!==A&&(A=!0===A),void 0===N&&(N=T),k=k||!!A,"string"==typeof h.name){const[e,t]=h.name.split("_");t&&(h.name=t)}const M=(g?g+".":"")+h.name,W=M+(""!==$?"-"+$:""),R=(e,t=M)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};let P=R(v);return e.$$set=e=>{"praefix"in e&&n(5,$=e.praefix),"item"in e&&n(1,h=e.item),"listName"in e&&n(42,g=e.listName),"record"in e&&n(0,v=e.record),"recordId"in e&&n(2,y=e.recordId),"noForm"in e&&n(6,b=e.noForm),"classId"in e&&n(7,w=e.classId),"eventId"in e&&n(8,x=e.eventId),"disabled"in e&&n(3,k=e.disabled),"selectionFields"in e&&n(9,I=e.selectionFields),"formnovalidate"in e&&n(10,_=e.formnovalidate),"selection"in e&&n(11,C=e.selection),"notifyList"in e&&n(18,S=e.notifyList),"numberInput"in e&&n(12,j=e.numberInput),"deList"in e&&n(13,q=e.deList),"required"in e&&n(4,N=e.required),"isTemplate"in e&&n(14,E=e.isTemplate),"toDelete"in e&&n(15,L=e.toDelete),"reqQuantity"in e&&n(16,F=e.reqQuantity),"currency"in e&&n(17,D=e.currency),"changeValue"in e&&n(43,z=e.changeValue)},e.$$.update=()=>{if(4096&e.$$.dirty[1])for(const e in z)e===M&&n(0,v[M]=z[e],v);1&e.$$.dirty[0]&&n(22,i=(e=M)=>{let t=R(v);return void 0===t?"":t}),1&e.$$.dirty[0]&&(r=R(v))},n(23,o=((e=M)=>{let t=v["_"+e];return t=f(t),void 0===t?"":t})()),[v,h,y,k,N,$,b,w,x,I,_,C,j,q,E,L,F,D,S,A,B,P,i,o,s,a,d,m,p,V,O,M,W,(e=M)=>{let t=R(v);return t?new Date(t):new Date},(e=M)=>{const t=R(v,e+"_from"),n=R(v,e+"_to");return{from:void 0===t?t:new Date(t),to:void 0===n?n:new Date(n)}},e=>({detail:t})=>{let{value:i,checked:o,range:s}=t;void 0!==o&&(i=o);const a=M+(s||"");n(0,v[a]=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("%%","%")}(i,"%d.%m.%Y"):i,v);const c=Object.values(v).every((e=>!e))&&i;l("notify",{oldValue:r,value:i,add:c,itemName:a,desc:t.description})},({detail:e})=>{l("record",e)},({detail:e})=>{l("multi",e)},()=>n(20,B=!0),()=>"object"===h.type?"comment_"+W:W,({detail:e})=>{n(21,P=e)},({detail:e})=>{const{designation:t}=h;n(23,o=t+": "+(e||"(Neu)"))},g,z,function(t){G(e,t)},function(t){G(e,t)},function(t){G(e,t)},function(t){G(e,t)},function(t){G(e,t)},function(t){G(e,t)}]}class Ll extends ke{constructor(e){var t;super(),document.getElementById("svelte-zmu4lk-style")||((t=q("style")).id="svelte-zmu4lk-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em;color:black}.form-field div.field > label.checkbox{padding-top:0.5em}",_(document.head,t)),xe(this,e,El,Nl,x,{praefix:5,item:1,listName:42,record:0,recordId:2,noForm:6,classId:7,eventId:8,disabled:3,selectionFields:9,formnovalidate:10,selection:11,notifyList:18,numberInput:12,deList:13,required:4,isTemplate:14,toDelete:15,reqQuantity:16,currency:17,changeValue:43},[-1,-1])}}const{document:Fl}=ge;function Dl(e,t,n){const i=e.slice();return i[83]=t[n],i[85]=n,i}function zl(e,t,n){const i=e.slice();return i[92]=t[n],i}function Tl(e,t,n){const i=e.slice();return i[87]=t[n].title,i[88]=t[n].toDelete,i[89]=t[n].icon,i}function Al(e){let t,n;return t=new e[18]({props:{name:"Total Wochen",nameClass:"formField_italic",$$slots:{default:[Bl]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};2048&n[0]|4&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Bl(e){let t,n,i;function o(t){e[46](t)}let r={item:e[28],disabled:!0};return void 0!==e[11]&&(r.value=e[11]),t=new Oi({props:r}),K.push((()=>ve(t,"value",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};!n&&2048&i[0]&&(n=!0,o.value=e[11],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function Vl(e){let t,n;return t=new e[18]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[Ol]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};16384&n[0]|4&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Ol(e){let t,n,i;function o(t){e[47](t)}let r={item:e[26],disabled:!0};return void 0!==e[14]&&(r.value=e[14]),t=new Oi({props:r}),K.push((()=>ve(t,"value",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};!n&&16384&i[0]&&(n=!0,o.value=e[14],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function Ml(e){let t,n;return t=new e[18]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[Wl]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};1152&n[0]|4&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Wl(e){let t,n,i;function o(t){e[48](t)}let r={item:e[24],disabled:!0,currency:e[7]};return void 0!==e[10]&&(r.value=e[10]),t=new Oi({props:r}),K.push((()=>ve(t,"value",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};128&i[0]&&(o.currency=e[7]),!n&&1024&i[0]&&(n=!0,o.value=e[10],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function Rl(e){let t,n;return t=new e[21]({props:{class:e[15][e[85]],open:e[9]&&!e[1]&&0===e[85],$$slots:{handle:[Jl,({toggle:e,open:t})=>({86:e,9:t}),({toggle:e,open:t})=>[t?512:0,0,e?16777216:0]],default:[Yl,({toggle:e,open:t})=>({86:e,9:t}),({toggle:e,open:t})=>[t?512:0,0,e?16777216:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){w(e[42](e[85],e[82]))&&e[42](e[85],e[82]).apply(this,arguments)})),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(n,i){e=n;const o={};32768&i[0]&&(o.class=e[15][e[85]]),514&i[0]&&(o.open=e[9]&&!e[1]&&0===e[85]),209917&i[0]|16777216&i[2]|4&i[3]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Pl(e){let t,n;return t=new Ll({props:{praefix:e[85],item:e[92],eventId:e[6],record:e[83],recordId:e[4]._id,reqQuantity:e[2],notifyList:e[8],noForm:ns,classId:e[5],disabled:e[0],required:e[22],selectionFields:e[29],numberInput:e[17],currency:e[7],formnovalidate:e[85]===e[12].length-1||e[12][e[85]]._delete}}),t.$on("notify",(function(){w(e[31](e[92],e[85]))&&e[31](e[92],e[85]).apply(this,arguments)})),t.$on("task",e[49]),t.$on("invalid",e[32]),t.$on("defPrep",e[33]),t.$on("checkRange",e[34]),t.$on("record",e[50]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(n,i){e=n;const o={};8&i[0]&&(o.item=e[92]),64&i[0]&&(o.eventId=e[6]),4096&i[0]&&(o.record=e[83]),16&i[0]&&(o.recordId=e[4]._id),4&i[0]&&(o.reqQuantity=e[2]),256&i[0]&&(o.notifyList=e[8]),32&i[0]&&(o.classId=e[5]),1&i[0]&&(o.disabled=e[0]),131072&i[0]&&(o.numberInput=e[17]),128&i[0]&&(o.currency=e[7]),4096&i[0]&&(o.formnovalidate=e[85]===e[12].length-1||e[12][e[85]]._delete),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Hl(e){let t,n,i=e[3].item,o=[];for(let t=0;t<i.length;t+=1)o[t]=Pl(zl(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(541200893&n[0]|15&n[1]){let l;for(i=e[3].item,l=0;l<i.length;l+=1){const r=zl(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=Pl(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}function Ql(e){let t,n,i=e[12][e[85]]._delete,o=Hl(e);return{c(){o.c(),t=F()},m(e,i){o.m(e,i),C(e,t,i),n=!0},p(e,n){4096&n[0]&&x(i,i=e[12][e[85]]._delete)?(ue(),pe(o,1,1,g),me(),o=Hl(e),o.c(),fe(o),o.m(t.parentNode,t)):o.p(e,n)},i(e){n||(fe(o),n=!0)},o(e){pe(o),n=!1},d(e){e&&S(t),o.d(e)}}}function Yl(e){let t,n,i,o,r=e[12].length,l=Ql(e);return{c(){t=q("div"),l.c(),i=L(),A(t,"id",n=`accordion-content-${e[5]}-${e[3].name}-${e[85]}`)},m(e,n){C(e,t,n),l.m(t,null),C(e,i,n),o=!0},p(e,i){4096&i[0]&&x(r,r=e[12].length)?(ue(),pe(l,1,1,g),me(),l=Ql(e),l.c(),fe(l),l.m(t,null)):l.p(e,i),(!o||40&i[0]&&n!==(n=`accordion-content-${e[5]}-${e[3].name}-${e[85]}`))&&A(t,"id",n)},i(e){o||(fe(l),o=!0)},o(e){pe(l),o=!1},d(e){e&&S(t),l.d(e),e&&S(i)}}}function Gl(e){let t,n,i,o,r,l=e[30](e[13],e[85])+"";return{c(){t=q("div"),n=E(l),A(t,"class",i=I("draggableListItem "+e[3].name)+" svelte-1es1ap1"),A(t,"draggable",!0),M(t,"delete",e[83]._delete),M(t,"is-active-top",e[16]?.top===e[85]),M(t,"is-active-bottom",e[16]?.bottom===e[85])},m(i,l){C(i,t,l),_(t,n),o||(r=[D(t,"dragover",e[40]),D(t,"dragleave",e[41](e[85])),D(t,"dragstart",e[38](e[85])),D(t,"drop",z(e[37](e[85]))),D(t,"dragenter",e[39](e[85]))],o=!0)},p(o,r){e=o,8192&r[0]&&l!==(l=e[30](e[13],e[85])+"")&&B(n,l),8&r[0]&&i!==(i=I("draggableListItem "+e[3].name)+" svelte-1es1ap1")&&A(t,"class",i),4104&r[0]&&M(t,"delete",e[83]._delete),65544&r[0]&&M(t,"is-active-top",e[16]?.top===e[85]),65544&r[0]&&M(t,"is-active-bottom",e[16]?.bottom===e[85])},d(e){e&&S(t),o=!1,b(r)}}}function Ul(e){let t,n,i;var o=e[89];return o&&(t=new o({props:{size:"20"}})),{c(){t&&ye(t.$$.fragment),n=F()},m(e,o){t&&be(t,e,o),C(e,n,o),i=!0},p(e,i){if(o!==(o=e[89])){if(t){ue();const e=t;pe(e.$$.fragment,1,0,(()=>{we(e,1)})),me()}o?(t=new o({props:{size:"20"}}),ye(t.$$.fragment),fe(t.$$.fragment,1),be(t,n.parentNode,n)):t=null}},i(e){i||(t&&fe(t.$$.fragment,e),i=!0)},o(e){t&&pe(t.$$.fragment,e),i=!1},d(e){e&&S(n),t&&we(t,e)}}}function Kl(e){let t,n,i,o,r,l=!e[0]&&!e[3].readonly&&Ul(e);return{c(){t=q("span"),l&&l.c(),A(t,"class","pointer icon svelte-1es1ap1"),A(t,"title",e[87]),t.hidden=n=e[85]===e[12].length-1||!(e[83]._delete^e[88])},m(n,s){C(n,t,s),l&&l.m(t,null),i=!0,o||(r=D(t,"click",(function(){w(e[36](e[85],e[9],e[86]))&&e[36](e[85],e[9],e[86]).apply(this,arguments)})),o=!0)},p(o,r){(e=o)[0]||e[3].readonly?l&&(ue(),pe(l,1,1,(()=>{l=null})),me()):l?(l.p(e,r),9&r[0]&&fe(l,1)):(l=Ul(e),l.c(),fe(l,1),l.m(t,null)),(!i||4096&r[0]&&n!==(n=e[85]===e[12].length-1||!(e[83]._delete^e[88])))&&(t.hidden=n)},i(e){i||(fe(l),i=!0)},o(e){pe(l),i=!1},d(e){e&&S(t),l&&l.d(),o=!1,r()}}}function Jl(e){let t,n,i,o,r,l;n=new e[19]({props:{$$slots:{default:[Gl]},$$scope:{ctx:e}}}),n.$on("click",(function(){w(e[35](e[86],e[85],e[9]))&&e[35](e[86],e[85],e[9]).apply(this,arguments)}));let s=[{title:"löschen",toDelete:!0,icon:Be},{title:"undo",toDelete:!1,icon:ze}],a=[];for(let t=0;t<2;t+=1)a[t]=Kl(Tl(e,s,t));const c=e=>pe(a[e],1,1,(()=>{a[e]=null}));return{c(){t=q("div"),ye(n.$$.fragment),i=L();for(let e=0;e<2;e+=1)a[e].c();o=L(),A(t,"class",r=I("accordion "+e[3].name)+" svelte-1es1ap1"),A(t,"slot","handle")},m(e,r){C(e,t,r),be(n,t,null),_(t,i);for(let e=0;e<2;e+=1)a[e].m(t,null);_(t,o),l=!0},p(i,d){e=i;const u={};if(77832&d[0]|4&d[3]&&(u.$$scope={dirty:d,ctx:e}),n.$set(u),4617&d[0]|32&d[1]|16777216&d[2]){let n;for(s=[{title:"löschen",toDelete:!0,icon:Be},{title:"undo",toDelete:!1,icon:ze}],n=0;n<2;n+=1){const i=Tl(e,s,n);a[n]?(a[n].p(i,d),fe(a[n],1)):(a[n]=Kl(i),a[n].c(),fe(a[n],1),a[n].m(t,o))}for(ue(),n=2;n<2;n+=1)c(n);me()}(!l||8&d[0]&&r!==(r=I("accordion "+e[3].name)+" svelte-1es1ap1"))&&A(t,"class",r)},i(e){if(!l){fe(n.$$.fragment,e);for(let e=0;e<2;e+=1)fe(a[e]);l=!0}},o(e){pe(n.$$.fragment,e),a=a.filter(Boolean);for(let e=0;e<2;e+=1)pe(a[e]);l=!1},d(e){e&&S(t),we(n),j(a,e)}}}function Zl(e){let t,n,i=(!e[1]&&!e[0]||e[85]<e[12].length-1)&&Rl(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){!e[1]&&!e[0]||e[85]<e[12].length-1?i?(i.p(e,n),4099&n[0]&&fe(i,1)):(i=Rl(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function Xl(e){let t,n,i=e[12],o=[];for(let t=0;t<i.length;t+=1)o[t]=Zl(Dl(e,i,t));const r=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(1615049727&n[0]|4095&n[1]|17825792&n[2]){let l;for(i=e[12],l=0;l<i.length;l+=1){const r=Dl(e,i,l);o[l]?(o[l].p(r,n),fe(o[l],1)):(o[l]=Zl(r),o[l].c(),fe(o[l],1),o[l].m(t.parentNode,t))}for(ue(),l=i.length;l<o.length;l+=1)r(l);me()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)fe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);n=!1},d(e){j(o,e),e&&S(t)}}}function es(e){let t,n,i,o,r,l,s=e[27]&&e[11]&&0!=e[11]&&Al(e),a=e[25]&&e[14]&&0!=e[14]&&Vl(e),c=e[23]&&e[10]&&0!=e[10]&&Ml(e);return r=new e[20]({props:{class:e[5]+e[3].name,$$slots:{default:[Xl,({closeOtherPanels:e})=>({82:e}),({closeOtherPanels:e})=>[0,0,e?1048576:0]]},$$scope:{ctx:e}}}),{c(){t=q("div"),s&&s.c(),n=L(),a&&a.c(),i=L(),c&&c.c(),o=L(),ye(r.$$.fragment),A(t,"class","formList")},m(e,d){C(e,t,d),s&&s.m(t,null),_(t,n),a&&a.m(t,null),_(t,i),c&&c.m(t,null),_(t,o),be(r,t,null),l=!0},p(e,l){e[27]&&e[11]&&0!=e[11]?s?(s.p(e,l),2048&l[0]&&fe(s,1)):(s=Al(e),s.c(),fe(s,1),s.m(t,n)):s&&(ue(),pe(s,1,1,(()=>{s=null})),me()),e[25]&&e[14]&&0!=e[14]?a?(a.p(e,l),16384&l[0]&&fe(a,1)):(a=Vl(e),a.c(),fe(a,1),a.m(t,i)):a&&(ue(),pe(a,1,1,(()=>{a=null})),me()),e[23]&&e[10]&&0!=e[10]?c?(c.p(e,l),1024&l[0]&&fe(c,1)):(c=Ml(e),c.c(),fe(c,1),c.m(t,o)):c&&(ue(),pe(c,1,1,(()=>{c=null})),me());const d={};40&l[0]&&(d.class=e[5]+e[3].name),242687&l[0]|1048576&l[2]|4&l[3]&&(d.$$scope={dirty:l,ctx:e}),r.$set(d)},i(e){l||(fe(s),fe(a),fe(c),fe(r.$$.fragment,e),l=!0)},o(e){pe(s),pe(a),pe(c),pe(r.$$.fragment,e),l=!1},d(e){e&&S(t),s&&s.d(),a&&a.d(),c&&c.d(),we(r)}}}let ts=new Map;const ns=!0,is="pos/target";function os(e,n,i){let o,r;const{FormField:l,TextField:s,Button:a,Accordion:d,AccordionSection:u,Divider:m}=c,h=Y();let{list:g}=n,{schema:v}=n,{record:y}=n,{classId:b}=n,{eventId:w}=n,{disabled:x}=n,{fixed:k}=n,{template:I={}}=n,{reqQuantity:_}=n,{open:C=!1}=n,{currency:S}=n,{notifyList:j}=n;const q=v.find((e=>("price"===e.name||"amount"===e.name)&&!e.properties?.hidden)),N=q&&v.find((e=>"quantity"===e.name));let E=0;const L=v.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let F=0;const D=v.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name||"",z=!!D;let T=0;const A={};let B=v.properties?.readonly,V=b.split("form-")[1].slice(0,-4),O=new Map;g.group&&(k=!0);const M={};x||=B;let W,R,P=[],H=[],Q=!1,U={},K=[];v.filter((e=>e.selection)).map((e=>P.push({className:V,parentClass:v,refClass:e.selection,value:""}))),v.filter((e=>e.refClass)).forEach((e=>{}));["readonly","hidden","required"].map((e=>{v.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"";let[i,o]=n.split(".");o||(o=i,i=void 0),K.push({action:e,itemName:t.name,refObj:i,refName:o,op:t.properties[e].invert?"!":""})}))}));const J=async(e,t,n)=>{const i=y[n];if(!i?.length)return;const o=i[0][n];if(!o)return;const r=await Zs(n,o);return r?r[g.name]:void 0},Z=async(e,t)=>{const n=K.filter((e=>(e.refObj||V)===t||e.refName===t));if(n?.length)for(const t of n){const{itemName:n,refObj:o,refName:r,op:l}=t;let s,a,{action:c}=t,d=!1,u=!1;if(o){const t=W[e][o];o===V&&r?d=y:t&&(d=await Zs(o,t))}!o&&r&&(d=W[e]),d&&(u=d[r],Array.isArray(u)&&0===u.length&&(u=!1)),"!"===l&&(u=!u),"required"!==c&&"readonly"!==c||(c="required"===c?c:"disabled",setTimeout((()=>{s=`#accordion-content-${b}-${g.name}-${e} .form-field.${n} .field textarea`,a=document.querySelector(s),a||(s=`#accordion-content-${b}-${g.name}-${e} .form-field.${n} .field input`,a=document.querySelector(s)),a&&u&&a.setAttribute(c,""),a&&!u&&a.removeAttribute(c)}),0)),"hidden"===c&&(s=`#accordion-content-${b}-${g.name}-${e} .form-field.${n}`,a=document.querySelector(s),a?.classList?.toggle("hidden",u),u&&i(12,W[e][n]="",W))}},X=(e,t)=>{let n=`#accordion-content-${b}-${g.name}-${e} .form-field:not(.hidden) .field :required:not(:disabled)`;const o=document.querySelectorAll(n);let r=!1;o.forEach((e=>{e.required&&""===e.value&&(r=!0)})),void 0===t&&(n=`#accordion-content-${b}-${g.name}-${e} :not(.form-field.hidden) .field input.invalid`,document.querySelector(n)&&(t=!0)),i(15,H[e]=r||t?"invalid":"",H)},ee=e=>{if(!e)return 0;const[t,n=0]=e.split(":");return 60*t+parseInt(n)},te=(e,t)=>{if(!t)return;const n=v.find((e=>e.name===t)),o=n.properties.value.formula,{operator:r,argument:l}=o,s=l.map((t=>W[e][t.refItem]));let a=0;"$add"===r&&(a=s.reduce(((e,t)=>e+ +t))),"$subtract"===r&&(a=s.reduce(((e,t)=>{if(!e)return 0;if(!t)return 0;const[n,i]=e.split(":");e=i?(+n+ +i/60).toFixed(2):+n;const[o,r]=t.split(":");return o?e-=r?(+o+ +r/60).toFixed(2):+o:0})));const c=`#accordion-content-${b}-${g.name}-${e} .form-field.${t} .field input`,d=document.querySelector(c),u=d?.disabled;i(12,W[e][t]=(a||0).toFixed(n.properties.decimals||0),W),i(17,U={item:n,value:a,idx:e}),setTimeout((()=>{const e=document.querySelector(c);u&&e&&e.setAttribute("disabled","")}),0)};R=v.filter((e=>e.refClass)).reduce(((e,t)=>{const n=v.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,i]=t.selection.split(":"),[o]=i?.split(".")||[];o&&e.push({refClass:o,items:[n],selection:t.selection})}const i={refClass:t.refClass,items:[]};return n.forEach((e=>{i.items.push(e.name)})),e.push(i),e}),[]);const ie=async(e,t,n,o)=>{const r=(await R).find((e=>e.refClass===t.refClass));if(!r)return;const{refClass:l,items:s,selection:a}=r,c=t.name;if(K.find((e=>e.itemName===c))){const t=`#accordion-content-${b}-${g.name}-${e} .form-field.${l}.hidden`;if(document.querySelector(t))return}return n?Promise.all(s.map((async r=>{const c=v.find((e=>e.name===r));if(c.properties?.readonly&&!t.refInput){const n=W[e][t.refClass];return Promise.resolve(Zs(t.refClass,n,!0)).then((t=>{let n=t[r];Array.isArray(n)&&(n=n.length?n[0][r]:""),i(12,W[e][r]=n,W)}))}let d="";const{refInput:u}=t;if(u&&W[e]){const[t,n]=u.split(".");d=n?W[e][n]:y[t]}if(a&&n!==o)s.map((t=>{i(12,W[e][t]="",W)}));else if(u&&!d||oe(e,r)||o!==n){const n=v.find((e=>e.refClass===l)),o=W[e][n.name];if(t.selection){const n=Js(t.selection+o.toString());if(n)return Promise.resolve(n).then((t=>i(12,W[e][r]=t[r],W)))}return Promise.resolve(Zs(n.refClass,o)).then((t=>i(12,W[e][r]=t[r],W)))}}))):Promise.resolve(s.map((t=>{i(12,W[e][t]="",W)})))},oe=(e,t)=>{let n=W[e][t];return"number"===v.find((e=>e.name===t)).type&&(n=Number(n||0)),!n},re=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};let le=!1;const se=e=>!(!k&&e>=W.length-1),ae=(e,t=!1)=>{const[n,i]=e.split(";");return g.name===i&&(!!se(t)&&((!1===t||t!=n)&&parseInt(n)))};v.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=v.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))}));const ce=(e,t=!1)=>{const n=`#accordion-content-${b}-${g.name}-${e} > div.form-field:not(.hidden)`,i=document.querySelectorAll(n);if(!i?.length)return;const o=i[i.length-1];ne().then((()=>{const t=`#accordion-content-${b}-${g.name}-${e} textarea`;Array.from(document.querySelectorAll(t)).forEach(re)})).then((()=>{t&&o.scrollIntoView({behavior:"smooth",block:"end"})}))};return e.$$set=e=>{"list"in e&&i(3,g=e.list),"schema"in e&&i(43,v=e.schema),"record"in e&&i(4,y=e.record),"classId"in e&&i(5,b=e.classId),"eventId"in e&&i(6,w=e.eventId),"disabled"in e&&i(0,x=e.disabled),"fixed"in e&&i(1,k=e.fixed),"template"in e&&i(44,I=e.template),"reqQuantity"in e&&i(2,_=e.reqQuantity),"open"in e&&i(9,C=e.open),"currency"in e&&i(7,S=e.currency),"notifyList"in e&&i(8,j=e.notifyList)},e.$$.update=()=>{24&e.$$.dirty[0]&&y&&(i(2,_=y.quantity),i(12,W=(y[g.name]||[]).concat({}))),4096&e.$$.dirty[0]&&i(13,o=W),15368&e.$$.dirty[0]&&o&&((()=>{if(L)i(14,F=W?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(z)i(11,T=W?.reduce(((e,t)=>e+(t._delete?0:+(t[D]||0))),0)||0)})(),(()=>{if(q)i(10,E=W?.reduce(((e,t)=>{if(t.amount){const n=t.amount??0;e+=t._delete?0:+n}if(t.price){const n=(N?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),ne().then((()=>h("save",{listName:g.name,value:W,amountValue:E,weeksValue:T})))),16384&e.$$.dirty[1]&&(r=e=>A[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[x,k,_,g,y,b,w,S,j,C,E,T,W,o,F,H,Q,U,l,a,d,u,undefined,q,{name:"amountValue",properties:{decimals:2}},L,{name:"hoursValue",properties:{decimals:2}},z,{name:"weeksValue",properties:{decimals:1}},P,(e,t)=>{let n=e[t];return M["pos"+t]&&(n=M["pos"+t]),n&&v.filter((e=>!0!==e.properties?.hidden&&void 0!==n[e.name]&&"textarea"!==e.properties?.format)).map((e=>""===n[e.name]?"":"object"===e.type?r(n[e.name]):Array.isArray(n[e.name])?n[e.name][0]||"":"boolean"===e.type?$(n[e.name]):"date"===e.type?f(n[e.name]):"datetime"===e.type?p(n[e.name]):e.properties?.multi?"":n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>async({detail:n})=>{const{oldValue:r,value:l,add:s,desc:a}=n;if(g.refItem){const n=await J(t,e,g.refItem);n&&i(12,W=n)}te(t,e._formulaActor);const c=P?.find((t=>t.refClass.split(":")[1]?.split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,l)),l&&W.length===t+1&&i(12,W=W.concat({})),a&&i(45,A[l]=a,A),await ie(t,e,l,r),await Z(t,e.name),i(13,o=W),"number"===e.type&&i(17,U={item:e,value:l,idx:t}),X(t)},({detail:e})=>{const{idx:t,value:n}=e;X(t,n)},async({detail:{className:e,itemName:n,value:i}})=>{if(O.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===V+"."+g.name))),!i)return;const o={[n]:!0},r=await t.getSectionView(e,o);r?.length&&O.set(e,r[0])},({detail:e})=>{const{idx:t,fieldId:n,value:i}=e;if(!i)return;const o=ee(i);let r=!1;W.forEach(((e,n)=>{if(t===n)return;const{start:i,end:l}=W[n];i&&l&&o>ee(i)&&o<ee(l)&&(r=!0)}));const l=document.getElementById(n);l?.classList?.toggle("invalid",r)},(e,t,n)=>n=>{W[t]._delete||(e(n),ce(t,!0))},(e,t,n)=>o=>{if(i(12,W[e]._delete=!W[e]._delete,W),W[e]._delete){M["pos"+e]={...W[e]};for(const t of v)i(12,W[e][t.name]="",W);t&&n(o)}else{if(M["pos"+e]){const t={};for(const n of v)t[n.name]=M["pos"+e][n.name];i(12,W[e]=t,W)}M["pos"+e]=void 0,t||n(o)}},e=>t=>{t.preventDefault(),i(16,Q=!1);const n=ae(t.dataTransfer.getData(is),e);if(!1===n)return;t.dataTransfer.dropEffect="move";const o=[...W].map(((e,t)=>(e._index=t,e)));n<e?(o.splice(e+1,0,o[n]),o.splice(n,1)):(o.splice(e,0,o[n]),o.splice(n+1,1)),o.map(((e,t)=>{return n=e._index,i=t,void ts.set(i,n);var n,i}));let r=[];H.map(((e,t)=>{r[t]=H[(e=>{const t=ts.get(e);return void 0===t?e:t})(t)]})),i(15,H=r),i(12,W=o.map(((e,t)=>(delete e._index,e)))),le=!1},e=>t=>{if(!se(e))return!1;t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move",t.dataTransfer.setData(is,e+";"+g.name),le=e},e=>t=>{const n=ae(t.dataTransfer.getData(is),e)||le;return!1===n||n===e?i(16,Q=!1):void i(16,Q={top:n>e&&e,bottom:n<e&&e})},e=>e.preventDefault(),e=>e=>{i(16,Q=!1)},(e,t)=>n=>{setTimeout((()=>{Array.from(O).forEach((([t,n])=>{W[e][t]||i(12,W[e][t]=n._id,W)}))}),500);const o=new Set;for(const e of K)o.add(e.refObj||V);for(const t of Array.from(o))Z(e,t);t(n),ce(e)},v,I,A,function(e){T=e,i(11,T)},function(e){F=e,i(14,F)},function(e){E=e,i(10,E)},function(t){G(e,t)},function(t){G(e,t)}]}class rs extends ke{constructor(e){var t;super(),Fl.getElementById("svelte-1es1ap1-style")||((t=q("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}",_(Fl.head,t)),xe(this,e,os,es,x,{list:3,schema:43,record:4,classId:5,eventId:6,disabled:0,fixed:1,template:44,reqQuantity:2,open:9,currency:7,notifyList:8},[-1,-1,-1,-1])}}const{Boolean:ls,document:ss}=ge;function as(e,t,n){const i=e.slice();return i[125]=t[n],i}function cs(e,t,n){const i=e.slice();return i[128]=t[n],i}function ds(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function us(e){let t,n,i=e[124]&&function(e){let t,n,i,o,r,l,s,a,c,d,u,m,f,p,$,h,g=e[1].items,v=[];for(let t=0;t<g.length;t+=1)v[t]=fs(cs(e,g,t));const y=e=>pe(v[e],1,1,(()=>{v[e]=null}));let w=e[1].list&&ps(e),x=!e[2]&&e[39]&&e[3]&&!e[21]&&Is(e);d=new e[24]({props:{outline:!0,$$slots:{default:[Cs]},$$scope:{ctx:e}}}),d.$on("click",e[42]);const k=[js,Ss],N=[];function E(e,t){return e[5]?0:e[39]?1:-1}~(m=E(e))&&(f=N[m]=k[m](e));return{c(){t=q("section"),n=q("form"),i=q("input"),r=L();for(let e=0;e<v.length;e+=1)v[e].c();l=L(),w&&w.c(),s=L(),x&&x.c(),a=L(),c=q("div"),ye(d.$$.fragment),u=L(),f&&f.c(),A(i,"class",I(e[29])+" svelte-9xiaib"),A(i,"name","_id"),A(i,"type","hidden"),i.value=o=e[4]._id||"",A(n,"class",I(e[30])+" svelte-9xiaib"),A(n,"id",e[29]),A(c,"class","form--buttons svelte-9xiaib"),A(t,"class",I(e[31])+" svelte-9xiaib")},m(o,f){C(o,t,f),_(t,n),_(n,i),_(n,r);for(let e=0;e<v.length;e+=1)v[e].m(n,null);_(n,l),w&&w.m(n,null),_(t,s),x&&x.m(t,null),_(t,a),_(t,c),be(d,c,null),_(c,u),~m&&N[m].m(c,null),p=!0,$||(h=[D(n,"keydown",e[47]),D(n,"submit",z(e[41]))],$=!0)},p(e,r){if((!p||16&r[0]&&o!==(o=e[4]._id||""))&&(i.value=o),539003026&r[0]|14708864&r[1]){let t;for(g=e[1].items,t=0;t<g.length;t+=1){const i=cs(e,g,t);v[t]?(v[t].p(i,r),fe(v[t],1)):(v[t]=fs(i),v[t].c(),fe(v[t],1),v[t].m(n,l))}for(ue(),t=g.length;t<v.length;t+=1)y(t);me()}e[1].list?w?(w.p(e,r),2&r[0]&&fe(w,1)):(w=ps(e),w.c(),fe(w,1),w.m(n,null)):w&&(ue(),pe(w,1,1,(()=>{w=null})),me()),!e[2]&&e[39]&&e[3]&&!e[21]?x?(x.p(e,r),2097164&r[0]&&fe(x,1)):(x=Is(e),x.c(),fe(x,1),x.m(t,a)):x&&(ue(),pe(x,1,1,(()=>{x=null})),me());const s={};128&r[4]&&(s.$$scope={dirty:r,ctx:e}),d.$set(s);let u=m;m=E(e),m===u?~m&&N[m].p(e,r):(f&&(ue(),pe(N[u],1,1,(()=>{N[u]=null})),me()),~m?(f=N[m],f?f.p(e,r):(f=N[m]=k[m](e),f.c()),fe(f,1),f.m(c,null)):f=null)},i(e){if(!p){for(let e=0;e<g.length;e+=1)fe(v[e]);fe(w),fe(x),fe(d.$$.fragment,e),fe(f),p=!0}},o(e){v=v.filter(ls);for(let e=0;e<v.length;e+=1)pe(v[e]);pe(w),pe(x),pe(d.$$.fragment,e),pe(f),p=!1},d(e){e&&S(t),j(v,e),w&&w.d(),x&&x.d(),we(d),~m&&N[m].d(),$=!1,b(h)}}}(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,t){e[124]&&i.p(e,t)},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function ms(e){let t,n;return t=new Ll({props:{classId:e[29],item:e[128],selection:e[128].selection,record:e[4],disabled:e[21],eventId:e[38],toDelete:e[11],currency:e[7],changeValue:e[15]}}),t.$on("task",e[43]),t.$on("notify",e[44]),t.$on("safeReference",e[53]),t.$on("multi",e[45]),t.$on("defPrep",e[52]),t.$on("record",e[54]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};2&n[0]&&(i.item=e[128]),2&n[0]&&(i.selection=e[128].selection),16&n[0]&&(i.record=e[4]),2097152&n[0]&&(i.disabled=e[21]),2048&n[0]&&(i.toDelete=e[11]),128&n[0]&&(i.currency=e[7]),32768&n[0]&&(i.changeValue=e[15]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function fs(e){let t,n,i="list"!==e[128].type&&ms(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){"list"!==e[128].type?i?(i.p(e,n),2&n[0]&&fe(i,1)):(i=ms(e),i.c(),fe(i,1),i.m(t.parentNode,t)):i&&(ue(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(fe(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&S(t)}}}function ps(e){let t,n,i,o,r,l=e[34]&&e[8]&&0!=e[8]&&$s(e),s=e[9]&&gs(e),a=e[35]&&e[14]&&0!=e[14]&&ys(e),c=e[1].list,d=[];for(let t=0;t<c.length;t+=1)d[t]=ks(as(e,c,t));const u=e=>pe(d[e],1,1,(()=>{d[e]=null}));return{c(){l&&l.c(),t=L(),s&&s.c(),n=L(),a&&a.c(),i=L();for(let e=0;e<d.length;e+=1)d[e].c();o=F()},m(e,c){l&&l.m(e,c),C(e,t,c),s&&s.m(e,c),C(e,n,c),a&&a.m(e,c),C(e,i,c);for(let t=0;t<d.length;t+=1)d[t].m(e,c);C(e,o,c),r=!0},p(e,r){if(e[34]&&e[8]&&0!=e[8]?l?(l.p(e,r),256&r[0]&&fe(l,1)):(l=$s(e),l.c(),fe(l,1),l.m(t.parentNode,t)):l&&(ue(),pe(l,1,1,(()=>{l=null})),me()),e[9]?s?(s.p(e,r),512&r[0]&&fe(s,1)):(s=gs(e),s.c(),fe(s,1),s.m(n.parentNode,n)):s&&(ue(),pe(s,1,1,(()=>{s=null})),me()),e[35]&&e[14]&&0!=e[14]?a?(a.p(e,r),16384&r[0]&&fe(a,1)):(a=ys(e),a.c(),fe(a,1),a.m(i.parentNode,i)):a&&(ue(),pe(a,1,1,(()=>{a=null})),me()),539177174&r[0]|8421504&r[1]){let t;for(c=e[1].list,t=0;t<c.length;t+=1){const n=as(e,c,t);d[t]?(d[t].p(n,r),fe(d[t],1)):(d[t]=ks(n),d[t].c(),fe(d[t],1),d[t].m(o.parentNode,o))}for(ue(),t=c.length;t<d.length;t+=1)u(t);me()}},i(e){if(!r){fe(l),fe(s),fe(a);for(let e=0;e<c.length;e+=1)fe(d[e]);r=!0}},o(e){pe(l),pe(s),pe(a),d=d.filter(ls);for(let e=0;e<d.length;e+=1)pe(d[e]);r=!1},d(e){l&&l.d(e),e&&S(t),s&&s.d(e),e&&S(n),a&&a.d(e),e&&S(i),j(d,e),e&&S(o)}}}function $s(e){let t,n;return t=new e[25]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[hs]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};384&n[0]|128&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function hs(e){let t,n,i;function o(t){e[63](t)}let r={item:e[32],disabled:!0,currency:e[7]};return void 0!==e[8]&&(r.value=e[8]),t=new Oi({props:r}),K.push((()=>ve(t,"value",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};128&i[0]&&(o.currency=e[7]),!n&&256&i[0]&&(n=!0,o.value=e[8],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function gs(e){let t,n;return t=new e[25]({props:{name:"Total MWSt "+(e[10]?"("+e[10]+"%)":""),nameClass:"formField_italic",$$slots:{default:[vs]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};1024&n[0]&&(i.name="Total MWSt "+(e[10]?"("+e[10]+"%)":"")),640&n[0]|128&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function vs(e){let t,n,i;function o(t){e[64](t)}let r={item:e[33],disabled:!0,currency:e[7]};return void 0!==e[9]&&(r.value=e[9]),t=new Oi({props:r}),K.push((()=>ve(t,"value",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};128&i[0]&&(o.currency=e[7]),!n&&512&i[0]&&(n=!0,o.value=e[9],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function ys(e){let t,n;return t=new e[25]({props:{name:"Gesamtzeit in Wochen",nameClass:"formField_italic",$$slots:{default:[bs]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};16384&n[0]|128&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function bs(e){let t,n,i;function o(t){e[65](t)}let r={item:e[36],disabled:!0};return void 0!==e[14]&&(r.value=e[14]),t=new Oi({props:r}),K.push((()=>ve(t,"value",o))),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};!n&&16384&i[0]&&(n=!0,o.value=e[14],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function ws(e){let t,n;return t=new ei({props:{classId:e[29],open:!e[2]&&1===e[1].list.length,list:e[125],template:e[16],eventId:e[38],schema:e[125].item,record:e[4],disabled:e[21],currency:e[7]}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};6&n[0]&&(i.open=!e[2]&&1===e[1].list.length),2&n[0]&&(i.list=e[125]),65536&n[0]&&(i.template=e[16]),2&n[0]&&(i.schema=e[125].item),16&n[0]&&(i.record=e[4]),2097152&n[0]&&(i.disabled=e[21]),128&n[0]&&(i.currency=e[7]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function xs(e){let t,n;return t=new rs({props:{classId:e[29],open:e[13],list:e[125],template:e[17],eventId:e[38],schema:e[125].item,record:e[4],disabled:e[21],fixed:e[125].fixed,reqQuantity:e[12],currency:e[7],notifyList:e[6]}}),t.$on("save",e[46]),t.$on("record",e[54]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};8192&n[0]&&(i.open=e[13]),2&n[0]&&(i.list=e[125]),131072&n[0]&&(i.template=e[17]),2&n[0]&&(i.schema=e[125].item),16&n[0]&&(i.record=e[4]),2097152&n[0]&&(i.disabled=e[21]),2&n[0]&&(i.fixed=e[125].fixed),4096&n[0]&&(i.reqQuantity=e[12]),128&n[0]&&(i.currency=e[7]),64&n[0]&&(i.notifyList=e[6]),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function ks(e){let t,n,i,o,r,l;t=new e[23]({props:{text:e[125].designation}});const s=[xs,ws],a=[];function c(e,t){return"array"===e[125].type?0:1}return i=c(e),o=a[i]=s[i](e),{c(){ye(t.$$.fragment),n=L(),o.c(),r=F()},m(e,o){be(t,e,o),C(e,n,o),a[i].m(e,o),C(e,r,o),l=!0},p(e,n){const l={};2&n[0]&&(l.text=e[125].designation),t.$set(l);let d=i;i=c(e),i===d?a[i].p(e,n):(ue(),pe(a[d],1,1,(()=>{a[d]=null})),me(),o=a[i],o?o.p(e,n):(o=a[i]=s[i](e),o.c()),fe(o,1),o.m(r.parentNode,r))},i(e){l||(fe(t.$$.fragment,e),fe(o),l=!0)},o(e){pe(t.$$.fragment,e),pe(o),l=!1},d(e){we(t,e),e&&S(n),a[i].d(e),e&&S(r)}}}function Is(e){let t,n,i,o;function r(t){e[66](t)}let l={title:"",$$slots:{default:[_s]},$$scope:{ctx:e}};return void 0!==e[20]&&(l.checked=e[20]),n=new e[26]({props:l}),K.push((()=>ve(n,"checked",r))),{c(){t=q("div"),ye(n.$$.fragment),A(t,"class","askNext"),O(t,"margin-top","1em"),O(t,"margin-left","23em")},m(e,i){C(e,t,i),be(n,t,null),o=!0},p(e,t){const o={};128&t[4]&&(o.$$scope={dirty:t,ctx:e}),!i&&1048576&t[0]&&(i=!0,o.checked=e[20],oe((()=>i=!1))),n.$set(o)},i(e){o||(fe(n.$$.fragment,e),o=!0)},o(e){pe(n.$$.fragment,e),o=!1},d(e){e&&S(t),we(n)}}}function _s(e){let t;return{c(){t=q("span"),t.textContent="Weiter erfassen",O(t,"margin-left",".75em")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Cs(e){let t;return{c(){t=E("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Ss(e){let t,n,i,o,r;t=new e[24]({props:{class:"close",disabled:e[21],form:e[29],filled:!0,type:"submit",$$slots:{default:[qs]},$$scope:{ctx:e}}});let l=e[3]&&!e[21]&&Ns(e),s=e[18]&&Ls(e);return{c(){ye(t.$$.fragment),n=L(),l&&l.c(),i=L(),s&&s.c(),o=F()},m(e,a){be(t,e,a),C(e,n,a),l&&l.m(e,a),C(e,i,a),s&&s.m(e,a),C(e,o,a),r=!0},p(e,n){const r={};2097152&n[0]&&(r.disabled=e[21]),128&n[4]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r),e[3]&&!e[21]?l?(l.p(e,n),2097160&n[0]&&fe(l,1)):(l=Ns(e),l.c(),fe(l,1),l.m(i.parentNode,i)):l&&(ue(),pe(l,1,1,(()=>{l=null})),me()),e[18]?s?(s.p(e,n),262144&n[0]&&fe(s,1)):(s=Ls(e),s.c(),fe(s,1),s.m(o.parentNode,o)):s&&(ue(),pe(s,1,1,(()=>{s=null})),me())},i(e){r||(fe(t.$$.fragment,e),fe(l),fe(s),r=!0)},o(e){pe(t.$$.fragment,e),pe(l),pe(s),r=!1},d(e){we(t,e),e&&S(n),l&&l.d(e),e&&S(i),s&&s.d(e),e&&S(o)}}}function js(e){let t,n,i,o;t=new e[24]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[Os]},$$scope:{ctx:e}}}),t.$on("click",e[50]);let r=e[19]&&Ms(e);return{c(){ye(t.$$.fragment),n=L(),r&&r.c(),i=F()},m(e,l){be(t,e,l),C(e,n,l),r&&r.m(e,l),C(e,i,l),o=!0},p(e,n){const o={};128&n[4]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o),e[19]?r?(r.p(e,n),524288&n[0]&&fe(r,1)):(r=Ms(e),r.c(),fe(r,1),r.m(i.parentNode,i)):r&&(ue(),pe(r,1,1,(()=>{r=null})),me())},i(e){o||(fe(t.$$.fragment,e),fe(r),o=!0)},o(e){pe(t.$$.fragment,e),pe(r),o=!1},d(e){we(t,e),e&&S(n),r&&r.d(e),e&&S(i)}}}function qs(e){let t;return{c(){t=E("Speichern und schliessen")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Ns(e){let t,n;return t=new e[24]({props:{form:e[29],filled:!0,type:"submit",style:"opacity: 0.75;",$$slots:{default:[Es]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Es(e){let t;return{c(){t=E("Speichern")},m(e,n){C(e,t,n)},d(e){e&&S(t)}}}function Ls(e){let t,n,i,o,r;const l=[Ds,Fs],s=[];t=function(e,t){return e[37]?0:1}(e),n=s[t]=l[t](e);let a=e[19]&&Bs(e);return{c(){n.c(),i=L(),a&&a.c(),o=F()},m(e,n){s[t].m(e,n),C(e,i,n),a&&a.m(e,n),C(e,o,n),r=!0},p(e,t){n.p(e,t),e[19]?a?(a.p(e,t),524288&t[0]&&fe(a,1)):(a=Bs(e),a.c(),fe(a,1),a.m(o.parentNode,o)):a&&(ue(),pe(a,1,1,(()=>{a=null})),me())},i(e){r||(fe(n),fe(a),r=!0)},o(e){pe(n),pe(a),r=!1},d(e){s[t].d(e),e&&S(i),a&&a.d(e),e&&S(o)}}}function Fs(e){let t,n;return t=new e[24]({props:{filled:!0,style:"opacity: 0.6;",$$slots:{default:[zs]},$$scope:{ctx:e}}}),t.$on("click",(function(){w(e[48](e[0]))&&e[48](e[0]).apply(this,arguments)})),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(n,i){e=n;const o={};128&i[4]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Ds(e){let t,n;return t=new d({props:{text:e[37],extended:!0,$$slots:{default:[As]},$$scope:{ctx:e}}}),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};1&n[0]|128&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function zs(e){let t,n,i;return n=new nt({props:{size:"18"}}),{c(){t=q("span"),t.textContent=`${e[55]()}`,ye(n.$$.fragment),O(t,"margin-right",".75em")},m(e,o){C(e,t,o),be(n,e,o),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n,e)}}}function Ts(e){let t,n,i;return n=new nt({props:{size:"18"}}),{c(){t=q("span"),t.textContent=`${e[55]()}`,ye(n.$$.fragment),O(t,"margin-right",".75em")},m(e,o){C(e,t,o),be(n,e,o),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n,e)}}}function As(e){let t,n;return t=new e[24]({props:{filled:!0,style:"opacity: 0.6;",$$slots:{default:[Ts]},$$scope:{ctx:e}}}),t.$on("click",(function(){w(e[48](e[0]))&&e[48](e[0]).apply(this,arguments)})),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(n,i){e=n;const o={};128&i[4]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Bs(e){let t,n;return t=new e[24]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[Vs]},$$scope:{ctx:e}}}),t.$on("click",(function(){w(e[49](e[0]))&&e[49](e[0]).apply(this,arguments)})),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(n,i){e=n;const o={};128&i[4]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Vs(e){let t,n,i;return n=new rt({props:{size:"18"}}),{c(){t=q("span"),t.textContent="Daten",ye(n.$$.fragment),O(t,"margin-right",".75em")},m(e,o){C(e,t,o),be(n,e,o),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n,e)}}}function Os(e){let t,n,i;return n=new nt({props:{size:"18"}}),{c(){t=q("span"),t.textContent="Erstellen",ye(n.$$.fragment),O(t,"margin-right",".75em")},m(e,o){C(e,t,o),be(n,e,o),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n,e)}}}function Ms(e){let t,n;return t=new e[24]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[Ws]},$$scope:{ctx:e}}}),t.$on("click",e[51]),{c(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,n){const i={};128&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function Ws(e){let t,n,i;return n=new rt({props:{size:"18"}}),{c(){t=q("span"),t.textContent="Daten",ye(n.$$.fragment),O(t,"margin-right",".75em")},m(e,o){C(e,t,o),be(n,e,o),i=!0},p:g,i(e){i||(fe(n.$$.fragment,e),i=!0)},o(e){pe(n.$$.fragment,e),i=!1},d(e){e&&S(t),we(n,e)}}}function Rs(e){return{c:g,m:g,p:g,i:g,o:g,d:g}}function Ps(e){let t,n,i,o;ss.title=t=e[22];let r={ctx:e,current:null,token:null,hasCatch:!1,pending:Rs,then:us,catch:ds,value:124,blocks:[,,,]};return $e(e[40](),r),{c(){n=L(),i=F(),r.block.c()},m(e,t){C(e,n,t),C(e,i,t),r.block.m(e,r.anchor=t),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(n,i){e=n,(!o||4194304&i[0])&&t!==(t=e[22])&&(ss.title=t),he(r,e,i)},i(e){o||(fe(r.block),o=!0)},o(e){for(let e=0;e<3;e+=1){pe(r.blocks[e])}o=!1},d(e){e&&S(n),e&&S(i),r.block.d(e),r.token=null,r=null}}}let Hs=new Map,Qs=new Map,Ys=new Map;const Gs=(e,n)=>{const i=n;return Hs.has(i)||Hs.set(i,t.getTasksList(n).then((({data:e})=>e))),Hs.get(i)},Us=(e,n,i,o=!1)=>Qs.get(i)||o?t.getTaskList(e,i).then((e=>(Qs.set(i,e),e))):Gs(e,n).then((n=>n.find((({_id:e})=>e===i))||t.getTaskList(e,i))).then((e=>(Qs.set(i,e),e))),Ks=(e,t)=>{Ys.set(e,t)},Js=e=>Ys.get(e),Zs=(e,n,i=!1)=>!i&&Ys.get(n)||t.getTask(e,n).then((e=>(Ys.set(n,e),e))),Xs=(e,n)=>{if(!Hs.get(n))return;const i=n;Hs.set(i,t.getTasksList(n).then((({data:e})=>e)))};function ea(e,o,a){let d,f,p,$,g,v,y;k(e,m,(e=>a(76,$=e))),k(e,s,(e=>a(77,g=e))),k(e,i,(e=>a(78,v=e)));const{Divider:b,Button:w,FormField:x,Checkbox:I}=c,{loggedIn:_,currentTasks:C}=u;k(e,_,(e=>a(79,y=e))),k(e,C,(e=>a(75,p=e)));const S=JSON.parse(r.getItem("Locale")),j=Y();let q,N,E,L,F,{schema:D}=o,{recID:z}=o,{prevEventID:T=!1}=o,{prev:A=!1}=o,{taskId:B=!1}=o,{description:V=""}=o,{root:O=!1}=o,{readonly:M}=o,{isStandalone:W}=o,R={},P={},G="form-"+D.class+Math.floor(9e3*Math.random()+1e3).toString();const U=O?"fEmbedded":"fTask",K=O?"sEmbedded":"sTask";let J="CHF";let Z,X,ee=0,te=0,ie=0,oe=0,re=1,le=!z&&D.list&&1===D.list.length;const se={},ae=D.items.find((e=>"price"===e.name&&!e.properties?.hidden)),ce=D.items.find((e=>"quantity"===e.name&&!e.properties?.hidden)),de=D.items.find((e=>"amount"===e.name&&!e.properties?.hidden)),ue=!!ae||!!de,me=D.list?.filter((e=>"array"===e.type))?.length>1||ue,fe=D.items.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name,pe=!!fe,$e=D.list?.filter((e=>"array"===e.type))?.length>1||pe,he={},ge=D.result?.resultDef[0].button?.description;let ve,ye,be,we,xe=0,ke=0,Ie=[],_e=[],Ce=[],Se={},je=new Map,qe=D.class,Ne=D.id,Ee=!1,Le=-1!==window.location.search.indexOf("next=");const Fe=!p?.length||p.find((e=>e===Ne));["readonly","hidden","required"].map((e=>{D.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[i,o]=n.split(".");Ie.push({action:e,itemName:t.name,refObj:i,refName:o,op:t.properties[e].invert?"!":""})}))}));D.items.filter((e=>e.selection&&e.constraint)).map((e=>{_e.push({name:e.name,selection:e.selection,constraint:e.constraint})}));D.items.filter((e=>e.lookup)).forEach((e=>{Ce.push({name:e.name,lookup:e.lookup})})),D.items.filter((e=>e.properties?.lookup)).forEach((e=>{Ce.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}));const De=async e=>{if(e?.length)for(const n of e){if(!n.lookup)break;const{name:e}=n;if(R[e])break;const{domain:i,value:o}=n.lookup;if("user"===i&&o){const n=y.user,i={[o]:n},r=await t.getSectionView(e,i);if(r?.length){const[{_id:t}]=r;t&&a(4,R[e]=t,R)}}}},ze=async e=>{if(!D.input)return;if(!D.input.length)return;if(D.input.length<2)return;const n=!e.input.class[0].name&&e.input.class[0].selection;if(!n)return;const i=e.input.class[1].name,o=e.input.class[1].destination?.split(".")[0];if(!i||!o)return;const r=D.list?.find((e=>e.name===i));if(!r)return;const l=await t.getSchemaByClass(n),s=(await t.getTasks(l.id)).data;if(!s?.length)return;const c=[];for(const e of s){const t={};for(const n of r.item)n.name===o?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);c.push(t)}c.length&&a(4,R[i]=c,R)},Te=()=>{for(const e of D.items)e.properties?.value?.concatenation&&Ae(e)},Ae=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 Ve(e.refItemNext));a(4,R[e.name]=n,R)},Be=async e=>{const t=Ie.filter((t=>t.refObj===e));if(t?.length){a(15,Se={});for(const e of t){const{itemName:t,refObj:n,refName:i,op:o}=e;let{action:r}=e;if(!n)break;let l,s,c=!i&&R[n];const d=R[n];d&&i&&(c=(await Zs(n,d))[i]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===o&&(c=!c),"required"!==r&&"readonly"!==r||(r="required"===r?r:"disabled",setTimeout((()=>{l=`#${G} .form-field.${t} .field #${t}`,s=document.querySelector(l),s&&c&&s.setAttribute(r,""),s&&!c&&s.removeAttribute(r)}),0)),"hidden"===r&&(l=`#${G} .form-field.${t}`,s=document.querySelector(l),s?.classList?.toggle("hidden",!!c),c&&a(15,Se[t]="",Se))}}},Ve=async e=>{const[n,i]=e.offset?.split(",")||[0,0],o=+e.base||0,r=+e.step||1;e.type;const l=e.refItem,s=await t.getLastId(D.class,l);if(!s?.length)return(o+r).toString().padStart(i,"0");const a=s[0][l];return((+a?.substring(n,n+i)||o)+r).toString().padStart(i,"0")},Oe=(e,t,n,i=!1)=>{const o=n||t.name,r=o.startsWith("_")?o:o.split("_")[0],l=e.find((e=>e.name===r));let s=t.value;if(!i&&l&&l.properties?.multi&&(s=R[o]),s&&l&&"dateRange"===l.type){let e=new Date(s);return"Invalid Date"==e?"":(e=`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}T00:00:00.000Z`,new Date(e).toISOString())}if(s&&l&&l.type.startsWith("date"))try{return Sn(s,"%d.%m.%Y").toISOString()}catch{return new Date(s).toISOString()}if(l&&"boolean"===l.type&&(s=!!t.checked),l&&"number"===l.type){const e=Number("1.1").toLocaleString(S.id).substring(1,2);try{s=Number(s.replace(e,".")).toString()}catch{}}return s},Me=()=>W?window.close():O?window.singleSpaNavigate("/"):j("back"),We=async(e,n)=>{if(D.input&&D.input.length>1){if(D.input[0]!==e)return;const{recursive:i}=be.input.class[1];if(n){const o=await t.getTaskOptions(`${e}:${n}`,Ne,i);a(4,R={...R,...o})}else{const e=D.input.slice(1);for(const t of e)a(4,R[t]=[],R)}}},Re=()=>{let e=0;if(ae){let t=1;ce&&(t=re),e=oe*t}de&&(e=oe);let t=0;for(const e in se)t+=se[e];a(8,ee=t+e)},Pe=()=>{let e=0;for(const t in he)e+=he[t];a(14,xe=e+ +ke)};n.subscribe((async e=>{if(!e)return;if(!z)return;const n=await t.getSchema(e.eventId);if(!n)return;const i=D.list?.find((e=>e.name===n.class));if(!i)return;const o=await t.getTaskById(e.taskId);((e,t,n)=>{if(!Hs.get(e))return;const i=t;Qs.set(i,n)})(o.event,o.docId,o.data);const r=await t.getTask(n.class,o.docId),l=R[n.class].filter((e=>e[n.class]==r._id));l?.length&&l.map((e=>{e[n.class]=o.docId})),a(4,R),a(62,N),a(61,q),a(1,D)})),H((()=>{Hs=new Map,Qs=new Map,Ys=new Map,He()}));const He=async()=>{const e=e=>new Promise((t=>setTimeout(t,e)));let t,n=0;for(;!(t=document.getElementById(G))&&++n<20;)await e(50);t&&(()=>{if(z)return;const e=new Set;for(const t of Ie)e.add(t.refObj||qe);Array.from(e).forEach((e=>Be(e)))})(),Qe()},Qe=()=>{setTimeout((()=>{Array.from(je).forEach((([e,t])=>{R[e]||a(4,R[e]=t._id,R)}))}),350)};Q((()=>{z&&function(e,t,n=t){e.set(n)}(m,$={[z]:{record:R,lists:P}},$)}));const Ye=()=>{const e={};Array.from(document.querySelectorAll("form#"+G+" ."+G)).map((t=>{if(t.name)if(t.name.includes(".")){const[n,i]=t.name.split("."),o=D.list.find((e=>e.name===n));e[t.name]=Oe(o.item,t)}else e[t.name]=Oe(D.items,t,t.name.split("_")[0])})),D.list&&D.list.map((t=>{"array"===t.type&&P[t.name]&&(e[t.name]=P[t.name].reduce(((e,n)=>n._delete||!Object.values(n).some(Boolean)?e:e.concat(Object.entries(n).reduce(((e,[n,i])=>("_delete"!==n&&(e[n]=Oe(t.item,{name:n,value:i,checked:i},"",!0)),e)),{}))),[]))}));let t=!0;return Object.entries(e).map((([e,n])=>{e=e.split("_")[0];const i=D.items.find((t=>t.name===e));i?.properties?.required&&!n&&(t=!1)})),t&&e},Ge=e=>{const t="/api/report/list/"+e;window.open(t,"_self","width=1 height=1")};return e.$$set=e=>{"schema"in e&&a(1,D=e.schema),"recID"in e&&a(2,z=e.recID),"prevEventID"in e&&a(58,T=e.prevEventID),"prev"in e&&a(59,A=e.prev),"taskId"in e&&a(0,B=e.taskId),"description"in e&&a(56,V=e.description),"root"in e&&a(3,O=e.root),"readonly"in e&&a(57,M=e.readonly),"isStandalone"in e&&a(60,W=e.isStandalone)},e.$$.update=()=>{67108864&e.$$.dirty[1]&&a(21,d=M),2&e.$$.dirty[0]|1073741824&e.$$.dirty[1]|1&e.$$.dirty[2]&&N&&q&&D.items.map((({name:e,type:t,refItem:n})=>{if(!1===n)return;const i=q.items.find((t=>t.name===e));if(!i)return;if(t!==i.type)return;const o="_"+e;N[e]?a(4,R[e]=N[e],R):a(4,R[e]="",R),N[o]&&a(4,R[o]=N[o],R),a(13,le=!1)})),8&e.$$.dirty[0]|33554432&e.$$.dirty[1]&&a(22,f=O?V||"enablerr - Form":document.title)},[B,D,z,O,R,E,F,J,ee,te,ie,Z,X,le,xe,Se,ve,ye,Ee,we,Le,d,f,b,w,x,I,_,C,G,U,K,{name:"amountValue",properties:{decimals:2}},{name:"taxValue",properties:{decimals:2}},me,$e,{name:"weekValue",properties:{decimals:1}},ge,Ne,Fe,async()=>{a(17,ye=await t.getTemplate(D.class));const e=await t.getSectionView("owner",{});if(e?.length&&e[0].currency){const n=await t.getSectionView("currency",{_id:e[0].currency});n?.length&&n[0].designation&&a(7,J=n[0].designation)}if(be=await t.getEvent(Ne),z||(a(16,ve=ye),De(be.input?.class),Te(),ze(be)),z){if($&&$[z]){const e=$[z].record;D.items.map((t=>{e[t.name]=Oe(D.items,{name:t.name,value:e[t.name],checked:e[t.name]})})),a(4,R=e),D.list&&D.list.map((e=>{"array"===e.type&&$[z].lists[e.name]&&a(4,R[e.name]=$[z].lists[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,i])=>("_delete"!==n&&(t[n]=Oe(e.item,{name:n,value:i,checked:i},"",!0)),t)),{}))),[]),R)}))}else a(4,R=await t.getTask(D.class,z));a(56,V=h(D,R)),a(18,Ee=!!D.result?.resultDef),a(9,te=R._tax?._amount),a(10,ie=100*R._tax?._rate||"")}if(T){a(57,M=!1),a(61,q=await t.getSchema(T)),"string"==typeof A&&a(62,N=await t.getTask(q.class,A));const e=D.items.find((e=>e.refClass===q.class));a(4,R[e.name]=N._id,R)}if($e&&(ke=R[fe]||0),be.trigger?.startOn&&!be.trigger.startOn.some((e=>e.type.indexOf("Manual")>=0))&&a(57,M=!0),g.role?.length&&D.authorization?.length){const e=D.authorization.some((e=>v?.find((t=>t===e.role&&"edit"===e.activity))));a(57,M||=!e)}return a(5,E="report"===be.output.type),t.getUserSettings().then((e=>{if(a(19,we=e.isAdmin),!we){const e=y.tenants.find((e=>e._id===y.tenant));e&&a(19,we=e.admin?.find((e=>e===y.user)))}})),!0},async e=>{z||a(21,d=!0);const n=e.submitter?.className?.includes("close"),i={};if(Array.from(document.querySelectorAll("form#"+G+" ."+G)).map((e=>{if(e.name)if(e.name.includes(".")){const[t,n]=e.name.split("."),o=D.list.find((e=>e.name===t));i[e.name]=Oe(o.item,e)}else i[e.name]=Oe(D.items,e)})),D.list&&D.list.map((e=>{"array"===e.type&&P[e.name]&&(i[e.name]=P[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,i])=>("_delete"!==n&&(t[n]=Oe(e.item,{name:n,value:i,checked:i},"",!0)),t)),{}))),[]))})),i._event=Ne,i._prevEventId=T,i._taskId=B,L){const e=L.record;for(const t in e)t.includes(".")&&delete e[t];e._event=L.event,e._taskId=L.taskId;const{id:n}=await t.saveData(L.class,e);i[L.class]||(i[L.class]=n)}const{id:o,task:r,tax:s,error:c}=await t.saveData(D.class,i);if(c?.text){const e=c.field?" in "+c.field+": "+c.value:"";return l.failed(`${c.text} ${e}`,3e3),void a(21,d=!1)}l.success("Die Daten wurden gespeichert.",2e3),a(9,te=s?._amount||0),a(10,ie=100*(s?._rate||0)||""),i._id=o;const u=await t.getTaskList(D.class,o);if(j("choose",{row:u}),n)return Me();if(!z){if(Le){const e=Math.floor(9e3*Math.random()+1e3).toString();return window.singleSpaNavigate(`/task/${Ne}/${Ne}/task?next=${e}`)}return window.singleSpaNavigate(`/task/${Ne}/${r}/task`)}},()=>!E&&T?window.history.back():Me(),async({detail:e})=>{const{row:n}=e;let{eventId:i}=e;if((()=>{if(z)for(const e of Ie)e.refName||Be(e.itemName)})(),z)return;if(await(async()=>{const e={...R};for(const n of D.items)if(n.refItem&&R[n.refItem]){const i=await t.getTask(n.refItem,R[n.refItem]);i&&(e[n.name]=i[n.name])}for(const n of D.list||[])if(n.refItem&&R[n.refItem]){const i=await t.getTask(n.refItem,R[n.refItem]),o=[];for(const e of i[n.name]){const t={};for(const i of n.item)e[i.name]&&(t[i.name]=e[i.name]);o.push(t)}e[n.name]=o}a(4,R=e)})(),i||=n._task?.event,(async(e,t)=>{if(!e)return;const n=be.output.class[0].name,i=Ce.filter((e=>e.lookup===n));if(i?.length)for(const e of i){const{lookup:n,name:i}=e;let o="";if(t){let e=await Zs(n,t);e&&e[i]?.length&&(o=e[i][0][i])}a(4,R[i]=o,R)}})(i,n._id),i&&D.items.filter((e=>e.properties?.lookup)).forEach((async e=>{const n=await t.getEvent(i);n.output.class[0]?.name===e.properties.lookup&&a(4,R[e.name]="",R)})),!n._task)return;const o=n._task.event,r=await t.getEvent(o);if(!be.output?.class?.length)return;const l=be.output.class[0]?.item.find((e=>(e.refClass||e.name)===r.output.class[0]?.name));(be.input?.class?.length&&be.input.class[0].name===r.output.class[0]?.name||l?.asInput)&&(a(61,q=await t.getSchema(o)),a(58,T=o),a(0,B=n._task._id),a(62,N=B?await t.getTask(q.class,n._task.docId):{}),We(q.class,n?._task?.docId))},async({detail:e})=>{if(a(6,F=e),"quantity"===e.itemName&&a(12,X=R.quantity),(async(e,t)=>{const n=_e.filter((t=>t.selection===e||t.constraint===e));if(n?.length){a(11,Z=!1);for(const i of n){const{selection:n,constraint:o,name:r}=i;if(t)break;a(4,R[r]="",R),e===n&&a(11,Z=o);const l=R[n];if(l&&e===o){let e=await Zs(n,l);const t=R[o];if(t?.length){const n=t[0].split(", ");e=e[o];let i="";for(const t of e)Object.values(t).map((e=>{n.includes(e)&&(i=t[r])}));a(4,R[r]=i,R)}}}}})(e.itemName,e.oldValue===e.value),Be(e.itemName),$e&&fe&&(e.itemName===fe&&(ke=+e.value),Pe()),ue&&me){if(e.itemName===ae?.name)oe=e.value;else if(e.itemName===ce?.name)re=e.value;else{if(e.itemName!==de?.name)return;oe=e.value}Re()}},async({detail:e})=>{if(!(D.input?.length&&D.input.length>1))return;if(q?.class!==D.input[0])return;const{value:n,lookup:i,view:o}=e;if(!i)return;const[r]=i.split(":"),l=(await t.getSectionView(r,{[o]:{$in:n}})).map((e=>e._id));for(const e of D.input.slice(1)){a(4,R[e]=[],R);const n=await t.getSchemaByClass(e);n.id;let i=await t.getTasks(n.id);if(i=i.data.filter((e=>"Ready"===e._task?.status&&l.includes(e[r]))),i?.length){const n=i.map((e=>e._id)),o=await t.getSectionView(e,{_id:{$in:n}});for(const t of o)t[e]=t._id;a(4,R[e]=o,R)}}},({detail:e})=>{P[e.listName]=e.value,me&&(se[e.listName]=e.amountValue,Re()),$e&&(he[e.listName]=e.weeksValue||0,Pe())},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},e=>async()=>{const n=await t.getReportDoc(e)||{},{userReportId:i,type:o}=n;if(!i)return;const r="/api/userreport/"+i;if("ics"===o)return window.open(r,"_self","width=1 height=1");const l="/viewer/doc/index.html?file="+r+"&type="+o;window.open(l,"","popup=yes toolbar=no width=624 height=900")},e=>async()=>{const e=await t.getDocData(B);(async(e,t)=>{const n=window.screen.height,i=window.open("","_blank","width=800,height="+n+",location=no");await ne(),i?.document.write("<title>Report Daten für '"+D.identity.designation+"'</title>"),i?.document.write("<textarea readonly style='resize: none; width: 100%; height: 100%;'>"+e+"</textarea>")})(JSON.stringify(e,null,4),D.identity.designation)},async()=>{const e=Ye();if(!e)return;const n=be.result?.resultDef[0]?.addToReports;if(n){const i=e[n];if(i){const n={docId:i},o=(await t.getSectionView("_task",n))[0];e._taskId=o._id}}const{reportId:i,type:o}=await t.createReport(Ne,e);Ge(i),setTimeout(Me,2e3)},async()=>{const e=Ye();if(!e)return;const n=await t.getReportData(Ne,e),i=window.screen.height,o=window.open("","_blank","width=800,height="+i+",location=no");await ne(),o?.document.write("<title>Report Daten für '"+D.identity.designation+"'</title>"),o?.document.write("<textarea readonly style='resize: none; width: 100%; height: 100%;'>"+JSON.stringify(n,null,4)+"</textarea>")},async({detail:{className:e,itemName:n,value:i}})=>{if(qe!==i)return;if(je.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===qe))),!i)return;const o={[n]:!0},r=await t.getSectionView(e,o);r?.length&&je.set(e,r[0])},({detail:e})=>{L=e},({detail:e})=>{setTimeout((()=>{a(4,R[e.itemName]=e.value,R)}),200)},()=>D.result.resultDef[0].button?.designation||"Dokument erstellen",V,M,T,A,W,q,N,function(e){ee=e,a(8,ee)},function(e){te=e,a(9,te)},function(e){xe=e,a(14,xe)},function(e){Le=e,a(20,Le)}]}class ta extends ke{constructor(e){var t;super(),ss.getElementById("svelte-9xiaib-style")||((t=q("style")).id="svelte-9xiaib-style",t.textContent="form.disabled.svelte-9xiaib input.svelte-9xiaib{background-color:red !important}input:placeholder-shown{font-style:italic}form.svelte-9xiaib.svelte-9xiaib{min-width:25em}hr[data-text]{margin-bottom:1em !important}@media only screen and (min-width: 600px){form.svelte-9xiaib.svelte-9xiaib{min-width:30em}}.fEmbedded.svelte-9xiaib.svelte-9xiaib,.fTask.svelte-9xiaib.svelte-9xiaib{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-9xiaib.svelte-9xiaib{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-9xiaib.svelte-9xiaib{height:fit-content;max-height:70vh}.sTask.svelte-9xiaib.svelte-9xiaib{height:95%;display:inline-grid}.sTask.svelte-9xiaib .btn.svelte-9xiaib{display:initial !important}.form--buttons.svelte-9xiaib.svelte-9xiaib{display:flex;gap:1em;padding-top:0.75em}section.sTask div.date-picker div.dropdown-shell div.dropdown.calendar{position:fixed !important;left:auto !important}form.fTask div.form-field{min-width:49vw}",_(ss.head,t)),xe(this,e,ea,Ps,x,{schema:1,recID:2,prevEventID:58,prev:59,taskId:0,description:56,root:3,readonly:57,isStandalone:60},[-1,-1,-1,-1,-1])}}function na(e){let t,n,i;function o(t){e[4](t)}let r={schema:e[5],recID:e[6]};return void 0!==e[0]&&(r.description=e[0]),t=new ta({props:r}),K.push((()=>ve(t,"description",o))),t.$on("back",e[2]),{c(){ye(t.$$.fragment)},m(e,n){be(t,e,n),i=!0},p(e,i){const o={};32&i&&(o.schema=e[5]),64&i&&(o.recID=e[6]),!n&&1&i&&(n=!0,o.description=e[0],oe((()=>n=!1))),t.$set(o)},i(e){i||(fe(t.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),i=!1},d(e){we(t,e)}}}function ia(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[na,({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(){ye(t.$$.fragment)},m(e,i){be(t,e,i),n=!0},p(e,[n]){const i={};1&n&&(i.description=e[0]),353&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(fe(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){we(t,e)}}}function oa(e,n,i){let o,{refresh:r}=n;return e.$$set=e=>{"refresh"in e&&i(3,r=e.refresh)},[o,(e,n)=>t.getSchema(e).then((t=>({schema:t,recID:n,eventID:e,title:t.identity.designation}))),e=>{},r,function(e){o=e,i(0,o)}]}function ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var la,sa,aa=(la=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==r(e))throw new Error("single-spa-svelte requires a configuration object");var t=i(i({},l),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 l={component:null,domElementGetter:null,props:{}};function s(e){return Promise.resolve()}function a(e,t,n){var o=Object.keys(l),r=Object.keys(e).reduce((function(t,n){return o.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var o=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),l=o();t.instance=new e.component(i(i({},r),{},{target:l,props:Object.assign({},n,e.props)}))}))}function c(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function d(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},la(sa={exports:{}},sa.exports),sa.exports);const ca=ra(aa)({component:class extends ke{constructor(e){super(),xe(this,e,oa,ia,x,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:da,mount:ua,unmount:ma}=ca;e({bootstrap:da,mount:ua,unmount:ma});e("Form",ta),e("List",Ct),e("Template",class extends ke{constructor(e){var t;super(),qn.getElementById("svelte-1phofh5-style")||((t=q("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}",_(qn.head,t)),xe(this,e,Rn,Mn,x,{schema:0,record:1})}})}}}));