@enablerr-ui/detail 0.2.668 → 0.2.669

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,4 +1,4 @@
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,s,l,a,c,d,u,m;return{setters:[function(e){t=e.Storage,n=e.Request,i=e.task_notification,o=e.currentRoles,r=e.TextArea,s=e.toasts,l=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.668");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}},h=e=>e?"(ja)":"(nein)",$=(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]?h(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]&&h(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")},g=(e,t)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)??""}catch{return""}};function v(){}function y(e){return e()}function w(){return Object.create(null)}function b(e){e.forEach(y)}function x(e){return"function"==typeof e}function k(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function I(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return v;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function _(e){return null==e?"":e}function S(e,t){e.appendChild(t)}function C(e,t,n){e.insertBefore(t,n||null)}function E(e){e.parentNode.removeChild(e)}function N(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function L(e){return document.createElement(e)}function q(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function j(e){return document.createTextNode(e)}function D(){return j(" ")}function F(){return j("")}function T(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 A(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function V(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function M(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function B(e,t){e.value=null==t?"":t}function O(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function P(e,t,n){e.classList[n?"add":"remove"](t)}let W;function R(e){W=e}function U(){if(!W)throw new Error("Function called outside component initialization");return W}function H(e){U().$$.on_mount.push(e)}function G(e){U().$$.on_destroy.push(e)}function Q(){const e=U();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 Y(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const J=[],K=[],Z=[],X=[],ee=Promise.resolve();let te=!1;function ne(){te||(te=!0,ee.then(ae))}function ie(){return ne(),ee}function oe(e){Z.push(e)}function re(e){X.push(e)}let se=!1;const le=new Set;function ae(){if(!se){se=!0;do{for(let e=0;e<J.length;e+=1){const t=J[e];R(t),ce(t.$$)}for(R(null),J.length=0;K.length;)K.pop()();for(let e=0;e<Z.length;e+=1){const t=Z[e];le.has(t)||(le.add(t),t())}Z.length=0}while(J.length);for(;X.length;)X.pop()();te=!1,se=!1,le.clear()}}function ce(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(oe)}}const de=new Set;let ue;function me(){ue={r:0,c:[],p:ue}}function fe(){ue.r||b(ue.c),ue=ue.p}function pe(e,t){e&&e.i&&(de.delete(e),e.i(t))}function he(e,t,n,i){if(e&&e.o){if(de.has(e))return;de.add(e),ue&&ue.c.push((()=>{de.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 s=t.ctx;void 0!==o&&(s=s.slice(),s[o]=r);const l=e&&(t.current=e)(s);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==i&&e&&(me(),he(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),fe())})):t.block.d(1),l.c(),pe(l,1),l.m(t.mount(),t.anchor),a=!0),t.block=l,t.blocks&&(t.blocks[i]=l),a&&ae()}if((o=e)&&"object"==typeof o&&"function"==typeof o.then){const n=U();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 ge(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 ve="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ye(e,t){he(e,1,1,(()=>{t.delete(e.key)}))}function we(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function be(e){e&&e.c()}function xe(e,t,n,i){const{fragment:o,on_mount:r,on_destroy:s,after_update:l}=e.$$;o&&o.m(t,n),i||oe((()=>{const t=r.map(y).filter(x);s?s.push(...t):b(t),e.$$.on_mount=[]})),l.forEach(oe)}function ke(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 Ie(e,t,n,i,o,r,s=[-1]){const l=W;R(e);const a=e.$$={fragment:null,ctx:null,props:r,update:v,not_equal:o,bound:w(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:w(),dirty:s,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]&&(J.push(e),ne(),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(E)}else a.fragment&&a.fragment.c();t.intro&&pe(e.$$.fragment),xe(e,t.target,t.anchor,t.customElement),ae()}R(l)}class _e{$destroy(){ke(this,1),this.$destroy=v}$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 Se(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("path"),i=q("line"),o=q("line"),V(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),V(i,"x1","12"),V(i,"y1","9"),V(i,"x2","12"),V(i,"y2","13"),V(o,"x1","12"),V(o,"y1","17"),V(o,"x2","12.01"),V(o,"y2","17"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-alert-triangle "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-alert-triangle "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Ce(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 Ee extends _e{constructor(e){super(),Ie(this,e,Ce,Se,k,{size:0,strokeWidth:1,class:2})}}function Ne(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("circle"),i=q("polyline"),o=q("line"),V(n,"cx","12"),V(n,"cy","12"),V(n,"r","10"),V(i,"points","8 12 12 16 16 12"),V(o,"x1","12"),V(o,"y1","8"),V(o,"x2","12"),V(o,"y2","16"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-arrow-down-circle "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-arrow-down-circle "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Le(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 _e{constructor(e){super(),Ie(this,e,Le,Ne,k,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,i,o;return{c(){t=q("svg"),n=q("path"),i=q("polyline"),V(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),V(i,"points","22 4 12 14.01 9 11.01"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-check-circle "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-check-circle "+e[2])&&V(t,"class",o)},i:v,o:v,d(e){e&&E(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 Fe extends _e{constructor(e){super(),Ie(this,e,De,je,k,{size:0,strokeWidth:1,class:2})}}function Te(e){let t,n,i;return{c(){t=q("svg"),n=q("path"),V(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"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-command "+e[2])},m(e,i){C(e,t,i),S(t,n)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-command "+e[2])&&V(t,"class",i)},i:v,o:v,d(e){e&&E(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 Ae extends _e{constructor(e){super(),Ie(this,e,ze,Te,k,{size:0,strokeWidth:1,class:2})}}function Ve(e){let t,n,i,o;return{c(){t=q("svg"),n=q("polyline"),i=q("path"),V(n,"points","9 10 4 15 9 20"),V(i,"d","M20 4v7a4 4 0 0 1-4 4H4"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-corner-down-left "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-corner-down-left "+e[2])&&V(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function Me(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 _e{constructor(e){super(),Ie(this,e,Me,Ve,k,{size:0,strokeWidth:1,class:2})}}function Oe(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("path"),i=q("line"),o=q("line"),V(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),V(i,"x1","18"),V(i,"y1","9"),V(i,"x2","12"),V(i,"y2","15"),V(o,"x1","12"),V(o,"y1","9"),V(o,"x2","18"),V(o,"y2","15"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-delete "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-delete "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Pe(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 We extends _e{constructor(e){super(),Ie(this,e,Pe,Oe,k,{size:0,strokeWidth:1,class:2})}}function Re(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("path"),i=q("polyline"),o=q("line"),V(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),V(i,"points","15 3 21 3 21 9"),V(o,"x1","10"),V(o,"y1","14"),V(o,"x2","21"),V(o,"y2","3"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-external-link "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-external-link "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(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 He extends _e{constructor(e){super(),Ie(this,e,Ue,Re,k,{size:0,strokeWidth:1,class:2})}}function Ge(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("circle"),i=q("line"),o=q("path"),V(n,"cx","12"),V(n,"cy","12"),V(n,"r","10"),V(i,"x1","2"),V(i,"y1","12"),V(i,"x2","22"),V(i,"y2","12"),V(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"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-globe "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-globe "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(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 _e{constructor(e){super(),Ie(this,e,Qe,Ge,k,{size:0,strokeWidth:1,class:2})}}function Je(e){let t,n,i,o,r,s,l,a;return{c(){t=q("svg"),n=q("line"),i=q("line"),o=q("line"),r=q("line"),s=q("line"),l=q("line"),V(n,"x1","8"),V(n,"y1","6"),V(n,"x2","21"),V(n,"y2","6"),V(i,"x1","8"),V(i,"y1","12"),V(i,"x2","21"),V(i,"y2","12"),V(o,"x1","8"),V(o,"y1","18"),V(o,"x2","21"),V(o,"y2","18"),V(r,"x1","3"),V(r,"y1","6"),V(r,"x2","3.01"),V(r,"y2","6"),V(s,"x1","3"),V(s,"y1","12"),V(s,"x2","3.01"),V(s,"y2","12"),V(l,"x1","3"),V(l,"y1","18"),V(l,"x2","3.01"),V(l,"y2","18"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",a="feather feather-list "+e[2])},m(e,a){C(e,t,a),S(t,n),S(t,i),S(t,o),S(t,r),S(t,s),S(t,l)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&a!==(a="feather feather-list "+e[2])&&V(t,"class",a)},i:v,o:v,d(e){e&&E(t)}}}function Ke(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 _e{constructor(e){super(),Ie(this,e,Ke,Je,k,{size:0,strokeWidth:1,class:2})}}function Xe(e){let t,n,i,o;return{c(){t=q("svg"),n=q("path"),i=q("polyline"),V(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"),V(i,"points","22,6 12,13 2,6"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-mail "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-mail "+e[2])&&V(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function et(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 tt extends _e{constructor(e){super(),Ie(this,e,et,Xe,k,{size:0,strokeWidth:1,class:2})}}function nt(e){let t,n,i,o;return{c(){t=q("svg"),n=q("path"),i=q("circle"),V(n,"d","M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"),V(i,"cx","12"),V(i,"cy","10"),V(i,"r","3"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-map-pin "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-map-pin "+e[2])&&V(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function it(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 ot extends _e{constructor(e){super(),Ie(this,e,it,nt,k,{size:0,strokeWidth:1,class:2})}}function rt(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("polyline"),i=q("line"),o=q("path"),V(n,"points","23 7 23 1 17 1"),V(i,"x1","16"),V(i,"y1","8"),V(i,"x2","23"),V(i,"y2","1"),V(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"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-phone-outgoing "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-phone-outgoing "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function st(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 lt extends _e{constructor(e){super(),Ie(this,e,st,rt,k,{size:0,strokeWidth:1,class:2})}}function at(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("polyline"),i=q("path"),o=q("rect"),V(n,"points","6 9 6 2 18 2 18 9"),V(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"),V(o,"x","6"),V(o,"y","14"),V(o,"width","12"),V(o,"height","8"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-printer "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-printer "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function ct(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 dt extends _e{constructor(e){super(),Ie(this,e,ct,at,k,{size:0,strokeWidth:1,class:2})}}function ut(e){let t,n,i,o;return{c(){t=q("svg"),n=q("circle"),i=q("line"),V(n,"cx","11"),V(n,"cy","11"),V(n,"r","8"),V(i,"x1","21"),V(i,"y1","21"),V(i,"x2","16.65"),V(i,"y2","16.65"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-search "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-search "+e[2])&&V(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function mt(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 ft extends _e{constructor(e){super(),Ie(this,e,mt,ut,k,{size:0,strokeWidth:1,class:2})}}const{document:pt}=ve;function ht(e){e[45]=e[46].items}function $t(e,t,n){const i=e.slice();return i[47]=t[n],i[49]=n,i}function gt(e,t,n){const i=e.slice();return i[50]=t[n],i}function vt(e,t,n){const i=e.slice();return i[50]=t[n],i}function yt(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function wt(e){let t,n,i,o,r,s;ht(e);let l=e[5]?.length&&bt(e),a=e[45]?.length&&kt(e),c=e[5]?.length&&St(e);return{c(){l&&l.c(),t=D(),n=L("div"),i=L("table"),a&&a.c(),o=D(),r=L("tbody"),c&&c.c(),V(i,"striped",""),V(i,"class","svelte-v0ogws"),V(n,"class","eList svelte-v0ogws")},m(e,d){l&&l.m(e,d),C(e,t,d),C(e,n,d),S(n,i),a&&a.m(i,null),S(i,o),S(i,r),c&&c.m(r,null),s=!0},p(e,n){ht(e),e[5]?.length?l?(l.p(e,n),32&n[0]&&pe(l,1)):(l=bt(e),l.c(),pe(l,1),l.m(t.parentNode,t)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),e[45]?.length?a?a.p(e,n):(a=kt(e),a.c(),a.m(i,o)):a&&(a.d(1),a=null),e[5]?.length?c?(c.p(e,n),32&n[0]&&pe(c,1)):(c=St(e),c.c(),pe(c,1),c.m(r,null)):c&&(me(),he(c,1,1,(()=>{c=null})),fe())},i(e){s||(pe(l),pe(c),s=!0)},o(e){he(l),he(c),s=!1},d(e){l&&l.d(e),e&&E(t),e&&E(n),a&&a.d(),c&&c.d()}}}function bt(e){let t,n,i,o,r,s,l,a,c,d,u,m=e[6]&&xt(e);function f(t){e[29](t)}let p={id:e[10]};return void 0!==e[3]&&(p.value=e[3]),o=new e[8]({props:p}),K.push((()=>we(o,"value",f))),o.$on("input",e[14]),a=new We({props:{size:"18"}}),{c(){m&&m.c(),t=D(),n=L("div"),i=j("Suchen: "),be(o.$$.fragment),s=D(),l=L("span"),be(a.$$.fragment),V(l,"class","feather pointer svelte-v0ogws"),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),S(n,i),xe(o,n,null),S(n,s),S(n,l),xe(a,l,null),c=!0,d||(u=T(l,"click",e[16]),d=!0)},p(e,n){e[6]?m?64&n[0]&&pe(m,1):(m=xt(e),m.c(),pe(m,1),m.m(t.parentNode,t)):m&&(me(),he(m,1,1,(()=>{m=null})),fe());const i={};!r&&8&n[0]&&(r=!0,i.value=e[3],re((()=>r=!1))),o.$set(i)},i(e){c||(pe(m),pe(o.$$.fragment,e),pe(a.$$.fragment,e),c=!0)},o(e){he(m),he(o.$$.fragment,e),he(a.$$.fragment,e),c=!1},d(e){m&&m.d(e),e&&E(t),e&&E(n),ke(o),ke(a),d=!1,u()}}}function xt(e){let t,n;return t=new e[7]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function kt(e){let t,n,i,o=e[4]&&e[0]&&It(),r=e[45],s=[];for(let t=0;t<r.length;t+=1)s[t]=_t(vt(e,r,t));return{c(){t=L("thead"),n=L("tr"),o&&o.c(),i=D();for(let e=0;e<s.length;e+=1)s[e].c();V(n,"class","svelte-v0ogws"),V(t,"class","svelte-v0ogws")},m(e,r){C(e,t,r),S(t,n),o&&o.m(n,null),S(n,i);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(e[4]&&e[0]?o||(o=It(),o.c(),o.m(n,i)):o&&(o.d(1),o=null),8196&t[0]){let i;for(r=e[45],i=0;i<r.length;i+=1){const o=vt(e,r,i);s[i]?s[i].p(o,t):(s[i]=_t(o),s[i].c(),s[i].m(n,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=r.length}},d(e){e&&E(t),o&&o.d(),N(s,e)}}}function It(e){let t;return{c(){t=L("th"),V(t,"class","svelte-v0ogws")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function _t(e){let t,n,i=e[50]?.designation+"";return{c(){t=L("th"),n=j(i),V(t,"class","svelte-v0ogws")},m(e,i){C(e,t,i),S(t,n)},p(e,t){4&t[0]&&i!==(i=e[50]?.designation+"")&&M(n,i)},d(e){e&&E(t)}}}function St(e){let t,n,i=[],o=new Map,r=e[5];const s=e=>e[47]._id;for(let t=0;t<r.length;t+=1){let n=$t(e,r,t),l=s(n);o.set(l,i[t]=Lt(l,n))}return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=F()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);C(e,t,o),n=!0},p(e,n){178239&n[0]&&(r=e[5],me(),i=function(e,t,n,i,o,r,s,l,a,c,d,u){let m=e.length,f=r.length,p=m;const h={};for(;p--;)h[e[p].key]=p;const $=[],g=new Map,v=new Map;for(p=f;p--;){const e=u(o,r,p),l=n(e);let a=s.get(l);a?i&&a.p(e,t):(a=c(l,e),a.c()),g.set(l,$[p]=a),l in h&&v.set(l,Math.abs(p-h[l]))}const y=new Set,w=new Set;function b(e){pe(e,1),e.m(l,d),s.set(e.key,e),d=e.first,f--}for(;m&&f;){const t=$[f-1],n=e[m-1],i=t.key,o=n.key;t===n?(d=t.first,m--,f--):g.has(o)?!s.has(i)||y.has(i)?b(t):w.has(o)?m--:v.get(i)>v.get(o)?(w.add(i),b(t)):(y.add(o),m--):(a(n,s),m--)}for(;m--;){const t=e[m];g.has(t.key)||a(t,s)}for(;f;)b($[f-1]);return $}(i,n,s,1,e,r,o,t.parentNode,ye,Lt,t,$t),fe())},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){for(let e=0;e<i.length;e+=1)he(i[e]);n=!1},d(e){for(let t=0;t<i.length;t+=1)i[t].d(e);e&&E(t)}}}function Ct(e){let t,n,i,o,r,s,l=e[4]&&e[0]&&Et(e),a=e[45],c=[];for(let t=0;t<a.length;t+=1)c[t]=Nt(gt(e,a,t));return{c(){t=L("tr"),l&&l.c(),n=D();for(let e=0;e<c.length;e+=1)c[e].c();i=D(),V(t,"class","pointer svelte-v0ogws"),P(t,"active",e[47]._id===e[1])},m(a,d){C(a,t,d),l&&l.m(t,null),S(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);S(t,i),o=!0,r||(s=T(t,"click",A((function(){x(e[12](e[47],e[49]))&&e[12](e[47],e[49]).apply(this,arguments)}))),r=!0)},p(o,r){if((e=o)[4]&&e[0]?l?(l.p(e,r),17&r[0]&&pe(l,1)):(l=Et(e),l.c(),pe(l,1),l.m(t,n)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),10276&r[0]){let n;for(a=e[45],n=0;n<a.length;n+=1){const o=gt(e,a,n);c[n]?c[n].p(o,r):(c[n]=Nt(o),c[n].c(),c[n].m(t,i))}for(;n<c.length;n+=1)c[n].d(1);c.length=a.length}34&r[0]&&P(t,"active",e[47]._id===e[1])},i(e){o||(pe(l),o=!0)},o(e){he(l),o=!1},d(e){e&&E(t),l&&l.d(),N(c,e),r=!1,s()}}}function Et(e){let t,n,i,o,r;return n=new He({props:{size:"18"}}),{c(){t=L("td"),be(n.$$.fragment),V(t,"class","editRow svelte-v0ogws"),O(t,"color","#326173")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",A((function(){x(e[17](e[47]))&&e[17](e[47]).apply(this,arguments)}))),o=!0)},p(t,n){e=t},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Nt(e){let t,n,i,o=e[11](e[47],e[50])+"";return{c(){t=L("td"),n=j(o),V(t,"class",i=_(e[50].type)+" svelte-v0ogws")},m(e,i){C(e,t,i),S(t,n)},p(e,r){36&r[0]&&o!==(o=e[11](e[47],e[50])+"")&&M(n,o),4&r[0]&&i!==(i=_(e[50].type)+" svelte-v0ogws")&&V(t,"class",i)},d(e){e&&E(t)}}}function Lt(e,t){let n,i,o,r=t[15](t[47],t[45],t[3]),s=r&&Ct(t);return{key:e,first:null,c(){n=F(),s&&s.c(),i=F(),this.first=n},m(e,t){C(e,n,t),s&&s.m(e,t),C(e,i,t),o=!0},p(e,n){t=e,44&n[0]&&(r=t[15](t[47],t[45],t[3])),r?s?(s.p(t,n),44&n[0]&&pe(s,1)):(s=Ct(t),s.c(),pe(s,1),s.m(i.parentNode,i)):s&&(me(),he(s,1,1,(()=>{s=null})),fe())},i(e){o||(pe(s),o=!0)},o(e){he(s),o=!1},d(e){e&&E(n),s&&s.d(e),e&&E(i)}}}function qt(e){let t,n;return t=new e[7]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function jt(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:qt,then:wt,catch:yt,value:46,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)||ge(o,e,i)},i(e){i||(pe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}i=!1},d(e){e&&E(t),o.block.d(e),o.token=null,o=null}}}const Dt=e("getDisplayItems",((e,t,n)=>{if(!e)return;let i=[];return e.forEach((e=>{if("_total"===e)return void i.push({name:"_total",designation:"Betrag",type:"number"});const[o,r]=e.split(".");let s=t.list?.find((e=>e.name===o))?.item.find((e=>e.name===r));s&&(s={...s},s.name=`${o}_${r}`,n=n.map((e=>(e[o]&&(e[s.name]=e["_"+o]?e["_"+o][r]:e[o][r]),e)))),s||(s=t.items.find((e=>e.name===o))),i.find((e=>e?.name===o))||i.push(s)})),i.length?i:t.items}));function Ft(e,o,r){let s;let l=JSON.parse(t.getItem("Locale")).id;const a=Q(),{Loading:d,TextField:m}=c,{currentTasks:p}=u;I(e,p,(e=>r(33,s=e)));let $,g,v,y,{inputList:w}=o,{eventId:b}=o,{prevEventId:x}=o,{className:k}=o,{rowId:_}=o,{filterForReady:S=!1}=o,{refStatus:C}=o,{showEdit:E=!1}=o,{praefix:N=""}=o,{selectionFields:L=!1}=o,{deList:q}=o,{stopAggregation:j=!1}=o,{inputSearch:D=""}=o,F=!0,T=D,z=k+Math.floor(9e3*Math.random()+1e3).toString()+"search",A=!1,V=!0;const M=(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(", ")}if(!n&&t.name.split("_").length>1){const[i,o]=t.name.split("_");try{n=e[i][0][o],Array.isArray(n)&&(n=n.join(", "))}catch{}}return"number"===t.type&&(n=Number(n)?n.toLocaleString(l,{minimumFractionDigits:t.properties?.decimals||0,maximumFractionDigits:t.decimals||0}):""),"number"===t.type?n:"boolean"==typeof n?h(n):f(e[`_${t.name}`]||n||"")},B=n.getSchemaByClass(k),O=async(e,t)=>{if(C)return r(18,C=[].concat(C)),e.filter((e=>!!C.find((t=>e._task.status===t))));if("Information"===t.state.task)return e;if(x){const t=await n.getEvent(x);if("report"===t?.output?.type)return e;if(t?.input?.class?.length&&t.input.class[0].name===k)return"Information"===t.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))},P=(e,t)=>{if(e){const n="string"==typeof e?e:Object.keys(e)[0],i=new Intl.Collator(l,{numeric:!0});return t.sort(((e,t)=>i.compare(e[n],t[n])))}return t},W=async e=>{let t,i=0;V=!1;const o=e=>new Promise((t=>setTimeout(t,e)));for(;i++<200&&!j&&!(t=await R(e));)await o(500);r(6,A=!1),j&&n.readTasksByAggregationId(e,!0),t&&(r(5,v=P(g.displaySort,t.data)),window.setTimeout((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"}),V=!0}),100))},R=async e=>await n.readTasksByAggregationId(e),U=async(e,t,n,i)=>{const{value:o,refClass:r}=i,[s,l]=n.split("."),a=o?.get(N),c=a&&await Oa(s,a);if(!c)return e;const d=c[l];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 Ma(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(z)?.focus()}),200)})),i.subscribe((async e=>{if(!e)return;const t=await B;e.eventId===t.id&&(Pa(t.class,e.eventId),r(2,F=!r(2,F=!1)))}));return e.$$set=e=>{"inputList"in e&&r(20,w=e.inputList),"eventId"in e&&r(21,b=e.eventId),"prevEventId"in e&&r(22,x=e.prevEventId),"className"in e&&r(23,k=e.className),"rowId"in e&&r(1,_=e.rowId),"filterForReady"in e&&r(24,S=e.filterForReady),"refStatus"in e&&r(18,C=e.refStatus),"showEdit"in e&&r(0,E=e.showEdit),"praefix"in e&&r(25,N=e.praefix),"selectionFields"in e&&r(26,L=e.selectionFields),"deList"in e&&r(27,q=e.deList),"stopAggregation"in e&&r(19,j=e.stopAggregation),"inputSearch"in e&&r(28,D=e.inputSearch)},[E,_,F,T,$,v,A,d,m,p,z,M,(e,t)=>n=>{r(19,j=!0);const i=V?e:y[t];a("choose",{row:i})},async()=>{g=await B,r(4,$=(e=>!s?.length||!!s.find((t=>t===e)))(g.id)),r(5,v=y=P(g.displaySort,await w||await Aa(g.class,g.id))),500===v?.length&&(r(6,A=!0),n.getTasksList(g.id,!1,!0).then((({aggregationId:e})=>W(e))));let e,t=!1,i="";const o=L&&L?.find((e=>g.class===e.refClass.split(":")[0])),l=o?.value?.get&&o.value.get(N);if(l){const[s,a]=o.refClass.split(":");g.class===s&&r(5,v=await U(v,s,a,o)),t=o.parentClass?.find((e=>"quantity"===e.name)),i=o.className,e=await n.getCountedSection(i,a.split(".")[0],l,s,"quantity")}r(0,E&&=!o),o||!S&&!C||r(5,v=await O(v,g));const{display:c}=g;let d=Dt(c,g,v);return!E&&t?(d=d.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),r(5,v=v.map((t=>{const n=e.find((e=>e._id===t._id));return n&&(t.ist=n.quantity.$numberDecimal),t}))),e.map((e=>{if(!v.find((t=>t._id===e._id))){const t=y.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,v.push(t)}})),a("init",v)):q&&r(5,v=v.filter((e=>!q.find((t=>t._id===e._id))))),{items:d}},({detail:{value:e}})=>{r(3,T=e)},(e,t,n)=>{if(!n)return!0;"string"!=typeof n&&(n=n.toString()),n=n.toLowerCase();let i=!1;for(const o of t){const t=M(e,o).toLowerCase();!i&&t.includes(n)&&(i=!0)}return i},()=>{r(3,T="")},e=>{window.open(`/task/${e._task.event}/${e._task._id}/task?view=standalone`,"_blank")},C,j,w,b,x,k,S,N,L,q,D,function(e){T=e,r(3,T)}]}class Tt extends _e{constructor(e){var t;super(),pt.getElementById("svelte-v0ogws-style")||((t=L("style")).id="svelte-v0ogws-style",t.textContent=".feather.svelte-v0ogws.svelte-v0ogws{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-v0ogws.svelte-v0ogws{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-v0ogws .editRow.svelte-v0ogws{width:1em}.eList.svelte-v0ogws table.svelte-v0ogws{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-v0ogws table thead.svelte-v0ogws{position:sticky;top:0;background:#326173;color:white}.eList.svelte-v0ogws table thead tr.svelte-v0ogws{height:2.3em}.eList.svelte-v0ogws table tbody tr.svelte-v0ogws{height:2.75em !important}th.svelte-v0ogws.svelte-v0ogws,td.svelte-v0ogws.svelte-v0ogws{padding-left:0.4em;padding-right:0.4em}td.number.svelte-v0ogws.svelte-v0ogws{text-align:end}tr.pointer.svelte-v0ogws.svelte-v0ogws:hover{background-color:#DAE1E5}tr.active.svelte-v0ogws.svelte-v0ogws{color:#326173;background-color:#fcebd5}",S(pt.head,t)),Ie(this,e,Ft,jt,k,{inputList:20,eventId:21,prevEventId:22,className:23,rowId:1,filterForReady:24,refStatus:18,showEdit:0,praefix:25,selectionFields:26,deList:27,stopAggregation:19,inputSearch:28},[-1,-1])}}function zt(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function At(e){let t,n,i=e[41]&&Vt(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[41]?i?(i.p(e,n),8&n[0]&&pe(i,1)):(i=Vt(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Vt(e){let t,n;return t=new e[21]({props:{title:e[16]?"Auswahl":e[0],class:"eList "+(e[14]?"form":""),$$slots:{default:[Qt]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};65537&n[0]&&(i.title=e[16]?"Auswahl":e[0]),16384&n[0]&&(i.class="eList "+(e[14]?"form":"")),2097150&n[0]|2048&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Mt(e){let t,n;return t=new Ra({props:{schema:e[2],recID:e[1],readonly:e[15]}}),t.$on("choose",(function(){x(e[30](e[41]))&&e[30](e[41]).apply(this,arguments)})),t.$on("back",e[27]),{c(){be(t.$$.fragment)},m(e,i){xe(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]),32768&i[0]&&(o.readonly=e[15]),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Bt(e){let t,n,i,o,r,s,l;t=new e[22]({props:{text:e[16]?"Zusätzliche Auswahl":""}});const a=[Pt,Ot],c=[];function d(e,t){return e[16]?0:1}return i=d(e),o=c[i]=a[i](e),s=new Tt({props:{inputSearch:e[12],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],stopAggregation:e[20],showEdit:e[8]}}),s.$on("edit",e[31]),s.$on("choose",e[34]),s.$on("init",e[32]),{c(){be(t.$$.fragment),n=D(),o.c(),r=D(),be(s.$$.fragment)},m(e,o){xe(t,e,o),C(e,n,o),c[i].m(e,o),C(e,r,o),xe(s,e,o),l=!0},p(e,n){const l={};65536&n[0]&&(l.text=e[16]?"Zusätzliche Auswahl":""),t.$set(l);let u=i;i=d(e),i===u?c[i].p(e,n):(me(),he(c[u],1,1,(()=>{c[u]=null})),fe(),o=c[i],o?o.p(e,n):(o=c[i]=a[i](e),o.c()),pe(o,1),o.m(r.parentNode,r));const m={};4096&n[0]&&(m.inputSearch=e[12]),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]),1048576&n[0]&&(m.stopAggregation=e[20]),256&n[0]&&(m.showEdit=e[8]),s.$set(m)},i(e){l||(pe(t.$$.fragment,e),pe(o),pe(s.$$.fragment,e),l=!0)},o(e){he(t.$$.fragment,e),he(o),he(s.$$.fragment,e),l=!1},d(e){ke(t,e),e&&E(n),c[i].d(e),e&&E(r),ke(s,e)}}}function Ot(e){let t,n,i,o;n=new e[23]({props:{outline:!0,$$slots:{default:[Wt]},$$scope:{ctx:e}}}),n.$on("click",e[28]);let r=e[25]&&e[10]&&Rt(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),r&&r.c(),V(t,"class","form--buttons svelte-jb5mrh")},m(e,s){C(e,t,s),xe(n,t,null),S(t,i),r&&r.m(t,null),o=!0},p(e,i){const o={};2048&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o),e[25]&&e[10]?r?(r.p(e,i),1024&i[0]&&pe(r,1)):(r=Rt(e),r.c(),pe(r,1),r.m(t,null)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){o||(pe(n.$$.fragment,e),pe(r),o=!0)},o(e){he(n.$$.fragment,e),he(r),o=!1},d(e){e&&E(t),ke(n),r&&r.d()}}}function Pt(e){let t,n,i,o,r,s,l=e[19]&&Ht(e);return i=new e[23]({props:{outline:!0,$$slots:{default:[Gt]},$$scope:{ctx:e}}}),i.$on("click",e[28]),r=new e[22]({props:{text:"Liste aus "+e[13]}}),{c(){l&&l.c(),t=D(),n=L("div"),be(i.$$.fragment),o=D(),be(r.$$.fragment),V(n,"class","form--buttons svelte-jb5mrh")},m(e,a){l&&l.m(e,a),C(e,t,a),C(e,n,a),xe(i,n,null),C(e,o,a),xe(r,e,a),s=!0},p(e,n){e[19]?l?(l.p(e,n),524288&n[0]&&pe(l,1)):(l=Ht(e),l.c(),pe(l,1),l.m(t.parentNode,t)):l&&(me(),he(l,1,1,(()=>{l=null})),fe());const o={};2048&n[1]&&(o.$$scope={dirty:n,ctx:e}),i.$set(o);const s={};8192&n[0]&&(s.text="Liste aus "+e[13]),r.$set(s)},i(e){s||(pe(l),pe(i.$$.fragment,e),pe(r.$$.fragment,e),s=!0)},o(e){he(l),he(i.$$.fragment,e),he(r.$$.fragment,e),s=!1},d(e){l&&l.d(e),e&&E(t),e&&E(n),ke(i),e&&E(o),ke(r,e)}}}function Wt(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Rt(e){let t,n;return t=new e[23]({props:{filled:!0,$$slots:{default:[Ut]},$$scope:{ctx:e}}}),t.$on("click",e[29]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};2048&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ut(e){let t;return{c(){t=j("Neu")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Ht(e){let t,n;return t=new pl({props:{item:e[17],record:{_id:"",[e[17].name]:""},noForm:"true",classId:"sel_"+e[17].name,eventId:e[18],required:!1,hidden:!1,readonly:!1,deList:e[19]}}),t.$on("notify",e[33]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};131072&n[0]&&(i.item=e[17]),131072&n[0]&&(i.record={_id:"",[e[17].name]:""}),131072&n[0]&&(i.classId="sel_"+e[17].name),262144&n[0]&&(i.eventId=e[18]),524288&n[0]&&(i.deList=e[19]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Gt(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Qt(e){let t,n,i,o;const r=[Bt,Mt],s=[];function l(e,t){return e[41].length&&!e[14]?0:1}return t=l(e),n=s[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?s[t].p(e,o):(me(),he(s[a],1,1,(()=>{s[a]=null})),fe(),n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i))},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){s[t].d(e),e&&E(i)}}}function Yt(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Jt(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Yt,then:At,catch:zt,value:41,blocks:[,,,]};return $e(n=e[26](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[26](e[3]))&&$e(n,o)||ge(o,e,i)},i(e){i||(pe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}i=!1},d(e){e&&E(t),o.block.d(e),o.token=null,o=null}}}function Kt(e,t,i){let o;const{Dialog:r,Divider:s,Button:l}=c,a=Q(),{currentTasks:d}=u;I(e,d,(e=>i(37,o=e)));let{title:m}=t,{schema:f}=t,{recID:p}=t,{isOpening:h=!0}=t,{filterForReady:$=!1}=t,{refStatus:g}=t,{praefix:v=""}=t,{selectionFields:y=!1}=t,{showEdit:w=!0}=t,{deList:b}=t,{newAllowed:x=!0}=t,{prevEventId:k}=t,{inputSearch:_}=t,S=f.id;f.class;let C,E,N,L,q,j,D,F="",T=!1,z=!1;m??=f.identity.designation;const A=!o?.length||o.find((e=>e===S));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,h=e.isOpening),"filterForReady"in e&&i(4,$=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,w=e.showEdit),"deList"in e&&i(9,b=e.deList),"newAllowed"in e&&i(10,x=e.newAllowed),"prevEventId"in e&&i(11,k=e.prevEventId),"inputSearch"in e&&i(12,_=e.inputSearch)},[m,p,f,h,$,g,v,y,w,b,x,k,_,F,T,C,N,q,j,D,z,r,s,l,d,A,async e=>{if(!e)return!1;const t=await Aa(f.class,f.id);if(E=y&&y?.find((e=>f.class===e.refClass.split(":")[0])),i(16,N=E?.value?.get&&E.value.get(v)),N){L=E.refClass;const[e,t]=L.split(":"),[o]=t.split(".");i(17,q=E.parentClass.find((t=>t.name===e)));const r=await n.getSchemaByClass(q.refClass);i(18,j=r.id),i(13,F=E.parentClass.find((e=>e.name===o)).designation)}return t},()=>{i(14,T=!1),p||a("back"),w||a("back")},()=>{i(20,z=!0),i(14,T=!1),a("back")},()=>{i(20,z=!0),i(1,p=!1),i(15,C=!1),i(14,T=!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(15,C=!!e._task.visum||"Closed"===e._task.status),i(1,p=e._docId),i(14,T=!0)},({detail:e})=>{N&&i(19,D=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};a("choose",{row:t})},function(t){Y(e,t)}]}class Zt extends _e{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=L("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}",S(document.head,t)),Ie(this,e,Kt,Jt,k,{title:0,schema:2,recID:1,isOpening:3,filterForReady:4,refStatus:5,praefix:6,selectionFields:7,showEdit:8,deList:9,newAllowed:10,prevEventId:11,inputSearch:12},[-1,-1])}}const{document:Xt}=ve;function en(e){e[28]=e[30].list,e[29]=e[30].items}function tn(e,t,n){const i=e.slice();return i[31]=t[n],i}function nn(e,t,n){const i=e.slice();return i[34]=t[n],i}function on(e,t,n){const i=e.slice();return i[34]=t[n],i}function rn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function sn(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v;function y(t){e[25](t)}en(e),n=new e[7]({props:{outline:!0,$$slots:{default:[ln]},$$scope:{ctx:e}}}),n.$on("click",e[24]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),K.push((()=>we(s,"value",y))),s.$on("input",e[12]),d=new We({props:{size:"18"}});let b=e[29]?.length&&function(e){let t,n,i,o,r=e[29],s=[];for(let t=0;t<r.length;t+=1)s[t]=an(on(e,r,t));return{c(){t=L("thead"),n=L("tr"),i=L("th"),o=D();for(let e=0;e<s.length;e+=1)s[e].c();V(i,"class","svelte-14hcfjl"),V(n,"class","svelte-14hcfjl"),V(t,"class","svelte-14hcfjl")},m(e,r){C(e,t,r),S(t,n),S(n,i),S(n,o);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(2048&t[0]){let i;for(r=e[29],i=0;i<r.length;i+=1){const o=on(e,r,i);s[i]?s[i].p(o,t):(s[i]=an(o),s[i].c(),s[i].m(n,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=r.length}},d(e){e&&E(t),N(s,e)}}}(e),x=e[28]?.length&&function(e){let t,n,i=e[28],o=[];for(let t=0;t<i.length;t+=1)o[t]=un(tn(e,i,t));const r=e=>he(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 s;for(i=e[28],s=0;s<i.length;s+=1){const r=tn(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=un(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),o=L("div"),r=j("Suchen: "),be(s.$$.fragment),a=D(),c=L("span"),be(d.$$.fragment),u=D(),m=L("div"),f=L("table"),b&&b.c(),p=D(),h=L("tbody"),x&&x.c(),V(t,"class","form--buttons svelte-14hcfjl"),V(c,"class","feather pointer svelte-14hcfjl"),O(o,"margin-bottom","1em"),O(o,"position","relative"),V(f,"striped",""),V(f,"class","svelte-14hcfjl"),V(m,"class","eList svelte-14hcfjl")},m(l,y){C(l,t,y),xe(n,t,null),C(l,i,y),C(l,o,y),S(o,r),xe(s,o,null),S(o,a),S(o,c),xe(d,c,null),C(l,u,y),C(l,m,y),S(m,f),b&&b.m(f,null),S(f,p),S(f,h),x&&x.m(h,null),$=!0,g||(v=T(c,"click",e[14]),g=!0)},p(e,t){en(e);const i={};256&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!l&&2&t[0]&&(l=!0,o.value=e[1],re((()=>l=!1))),s.$set(o),e[29]?.length&&b.p(e,t),e[28]?.length&&x.p(e,t)},i(e){$||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),pe(x),$=!0)},o(e){he(n.$$.fragment,e),he(s.$$.fragment,e),he(d.$$.fragment,e),he(x),$=!1},d(e){e&&E(t),ke(n),e&&E(i),e&&E(o),ke(s),ke(d),e&&E(u),e&&E(m),b&&b.d(),x&&x.d(),g=!1,v()}}}function ln(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function an(e){let t,n,i=e[34]?.designation+"";return{c(){t=L("th"),n=j(i),V(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function cn(e){let t,n,i,o,r,s,l,a;i=new He({props:{size:"18"}});let c=e[29],d=[];for(let t=0;t<c.length;t+=1)d[t]=dn(nn(e,c,t));return{c(){t=L("tr"),n=L("td"),be(i.$$.fragment),o=D();for(let e=0;e<d.length;e+=1)d[e].c();r=D(),V(n,"class","editRow svelte-14hcfjl"),V(t,"class","pointer svelte-14hcfjl"),P(t,"active",e[31]._id===e[0])},m(c,u){C(c,t,u),S(t,n),xe(i,n,null),S(t,o);for(let e=0;e<d.length;e+=1)d[e].m(t,null);S(t,r),s=!0,l||(a=T(n,"click",e[15](e[31])),l=!0)},p(n,i){if(e=n,3584&i[0]){let n;for(c=e[29],n=0;n<c.length;n+=1){const o=nn(e,c,n);d[n]?d[n].p(o,i):(d[n]=dn(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]&&P(t,"active",e[31]._id===e[0])},i(e){s||(pe(i.$$.fragment,e),s=!0)},o(e){he(i.$$.fragment,e),s=!1},d(e){e&&E(t),ke(i),N(d,e),l=!1,a()}}}function dn(e){let t,n,i,o,r=e[9](e[31],e[34])+"";return{c(){t=L("td"),n=j(r),V(t,"class","svelte-14hcfjl")},m(r,s){C(r,t,s),S(t,n),i||(o=T(t,"click",A(e[10](e[31]))),i=!0)},p(t,n){e=t},d(e){e&&E(t),i=!1,o()}}}function un(e){let t,n,i=e[13](e[31],e[29],e[1]),o=i&&cn(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[31],e[29],e[1])),i?o?(o.p(e,n),2&n[0]&&pe(o,1)):(o=cn(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function mn(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function fn(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:mn,then:sn,catch:rn,value:30,blocks:[,,,]};return $e(e[11](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function pn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[fn]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};3&n[0]|256&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function hn(e,t,o){const r=Q(),{Dialog:s,Divider:l,Loading:a,TextField:d,Button:u}=c;let{item:m}=t,{classId:p}=t,{className:$}=t,{rowId:g}=t,{viewName:v}=t,{viewValue:y}=t,{recordId:w}=t,{filter:b}=t,{multiValues:x}=t,k="",I=p+Math.floor(9e3*Math.random()+1e3).toString()+"search";const _=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?h(n):f(e[`_${t.name}`]||e[t.name]||"")},S=n.getSchemaByClass($);H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(I)?.focus()}),200)})),i.subscribe((async e=>{if(!e)return;const t=await S;e.eventId===t.id&&Pa(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,$=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,w=e.recordId),"filter"in e&&o(22,b=e.filter),"multiValues"in e&&o(23,x=e.multiValues)},[g,k,r,s,l,a,d,u,I,_,e=>()=>r("choose",{row:e}),async()=>{const e=await S;let t=[];if(m.lookup){const e="."+p+"#"+m.lookup,i=document.querySelector(e);let o=i?.value||w;if(o){if(24===o.toString().length){const e=await Oa(m.lookup,o);if(e){const i=e[m.name]?.map((e=>e[m.name]));i&&(t=await n.getSectionView(m.name,{_id:{$in:i}},!0))}}}else if(x.has(m.lookup)){const e=x.get(m.lookup)[0];e&&(t=await n.getSectionView(m.name,{[m.lookup]:e},!0))}}else{const i="."+p+"#"+v.split(":")[0],o=document.querySelector(i);let r={[v]:o?.value||w};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]&&(t=await n.getSectionView(e.class,r,!0)),b&&(t=t.filter((e=>e._id!=b)))}const i=e.display;return{list:t,items:Dt(i,e,t)}},({detail:{value:e}})=>{o(1,k=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(_(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{o(1,k="")},e=>async()=>{const t=await n.getTaskByDocId(e._id),i=`/task/${t.event}/${t._id}/task?view=standalone`;window.open(i)},m,p,$,v,y,w,b,x,()=>r("back"),function(e){k=e,o(1,k)}]}class $n extends _e{constructor(e){var t;super(),Xt.getElementById("svelte-14hcfjl-style")||((t=L("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}",S(Xt.head,t)),Ie(this,e,hn,pn,k,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22,multiValues:23},[-1,-1])}}const{document:gn}=ve;function vn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function yn(e){let t,n,i=e[59]&&function(e){let t,n,i,o,s,l,a,c,d,u,m,f,p,h,$,g,v,y,w;function b(t){e[46](t)}function x(t){e[47](t)}let k={class:"full-width",id:e[29],rows:"1",required:e[1],disabled:e[3],placeholder:e[30],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"};void 0!==e[2]&&(k.value=e[2]);void 0!==e[24]&&(k.overwrite=e[24]);n=new r({props:k}),K.push((()=>we(n,"value",b))),K.push((()=>we(n,"overwrite",x))),n.$on("click",e[32]()),n.$on("onFocus",e[32](e[29]));const I=[bn,wn],N=[];function q(e,t){return!e[3]||e[15]?0:e[21]&&e[0]?1:-1}~(l=q(e))&&(a=N[l]=I[l](e));let j=(!e[3]||e[15]||e[16])&&xn(e);function z(t){e[48](t)}let A={class:"tModal",noClickaway:!0,$$slots:{default:[Sn]},$$scope:{ctx:e}};void 0!==e[18]&&(A.open=e[18]);p=new e[26]({props:A}),K.push((()=>we(p,"open",z)));let M=e[19]&&Cn(e);return{c(){t=L("div"),be(n.$$.fragment),s=D(),a&&a.c(),c=D(),d=L("input"),m=D(),j&&j.c(),f=D(),be(p.$$.fragment),$=D(),M&&M.c(),g=F(),V(d,"class",u=_(e[8]||e[9])+" svelte-jox15l"),V(d,"id",e[5]),V(d,"name",e[5]),d.value=e[0],d.hidden=!0,O(t,"position","relative")},m(i,o){C(i,t,o),xe(n,t,null),S(t,s),~l&&N[l].m(t,null),S(t,c),S(t,d),S(t,m),j&&j.m(t,null),C(i,f,o),xe(p,i,o),C(i,$,o),M&&M.m(i,o),C(i,g,o),v=!0,y||(w=T(t,"keydown",e[33]),y=!0)},p(e,r){const s={};2&r[0]&&(s.required=e[1]),8&r[0]&&(s.disabled=e[3]),!i&&4&r[0]&&(i=!0,s.value=e[2],re((()=>i=!1))),!o&&16777216&r[0]&&(o=!0,s.overwrite=e[24],re((()=>o=!1))),n.$set(s);let m=l;l=q(e),l===m?~l&&N[l].p(e,r):(a&&(me(),he(N[m],1,1,(()=>{N[m]=null})),fe()),~l?(a=N[l],a?a.p(e,r):(a=N[l]=I[l](e),a.c()),pe(a,1),a.m(t,c)):a=null),(!v||768&r[0]&&u!==(u=_(e[8]||e[9])+" svelte-jox15l"))&&V(d,"class",u),(!v||32&r[0])&&V(d,"id",e[5]),(!v||32&r[0])&&V(d,"name",e[5]),(!v||1&r[0]&&d.value!==e[0])&&(d.value=e[0]),!e[3]||e[15]||e[16]?j?(j.p(e,r),98312&r[0]&&pe(j,1)):(j=xn(e),j.c(),pe(j,1),j.m(t,null)):j&&(me(),he(j,1,1,(()=>{j=null})),fe());const f={};13008593&r[0]|536870912&r[1]&&(f.$$scope={dirty:r,ctx:e}),!h&&262144&r[0]&&(h=!0,f.open=e[18],re((()=>h=!1))),p.$set(f),e[19]?M?(M.p(e,r),524288&r[0]&&pe(M,1)):(M=Cn(e),M.c(),pe(M,1),M.m(g.parentNode,g)):M&&(me(),he(M,1,1,(()=>{M=null})),fe())},i(e){v||(pe(n.$$.fragment,e),pe(a),pe(j),pe(p.$$.fragment,e),pe(M),v=!0)},o(e){he(n.$$.fragment,e),he(a),he(j),he(p.$$.fragment,e),he(M),v=!1},d(e){e&&E(t),ke(n),~l&&N[l].d(),j&&j.d(),e&&E(f),ke(p,e),e&&E($),M&&M.d(e),e&&E(g),y=!1,w()}}}(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[59]&&i.p(e,t)},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function wn(e){let t,n,i,o,r;return n=new He({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-jox15l")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[38]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function bn(e){let t,n,i,o,r;return n=new ft({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-jox15l")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=[T(t,"click",e[32](!0)),T(t,"choose",e[35])],o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,b(r)}}}function xn(e){let t,n,i,o,r;return n=new We({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather2 pointer svelte-jox15l")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[37]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function kn(e){let t,n,i,o;const r=[_n,In],s=[];function l(e,t){return e[6].lookup||e[4]&&!e[6].constraint?0:1}return t=l(e),n=s[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?s[t].p(e,o):(me(),he(s[a],1,1,(()=>{s[a]=null})),fe(),n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i))},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){s[t].d(e),e&&E(i)}}}function In(e){let t,n;return t=new Zt({props:{title:e[6].designation,newAllowed:e[22],prevEventId:e[10],schema:e[17],recID:e[0],isOpening:e[18],filterForReady:e[23],refStatus:e[6].refStatus,selectionFields:e[13],deList:e[14],praefix:e[12],inputSearch:e[34]()}}),t.$on("choose",e[35]),t.$on("back",e[36]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.title=e[6].designation),4194304&n[0]&&(i.newAllowed=e[22]),1024&n[0]&&(i.prevEventId=e[10]),131072&n[0]&&(i.schema=e[17]),1&n[0]&&(i.recID=e[0]),262144&n[0]&&(i.isOpening=e[18]),8388608&n[0]&&(i.filterForReady=e[23]),64&n[0]&&(i.refStatus=e[6].refStatus),8192&n[0]&&(i.selectionFields=e[13]),16384&n[0]&&(i.deList=e[14]),4096&n[0]&&(i.praefix=e[12]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function _n(e){let t,n;return t=new $n({props:{item:e[6],className:e[17].class,classId:e[9],rowId:e[0],recordId:e[11],viewName:e[4],viewValue:"",multiValues:e[7]}}),t.$on("choose",e[35]),t.$on("back",e[36]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.item=e[6]),131072&n[0]&&(i.className=e[17].class),512&n[0]&&(i.classId=e[9]),1&n[0]&&(i.rowId=e[0]),2048&n[0]&&(i.recordId=e[11]),16&n[0]&&(i.viewName=e[4]),128&n[0]&&(i.multiValues=e[7]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Sn(e){let t,n,i=e[18]&&kn(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[18]?i?(i.p(e,n),262144&n[0]&&pe(i,1)):(i=kn(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Cn(e){let t,n,i;function o(t){e[49](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[Nn]},$$scope:{ctx:e}};return void 0!==e[19]&&(r.open=e[19]),t=new e[26]({props:r}),K.push((()=>we(t,"open",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};1179649&i[0]|536870912&i[1]&&(o.$$scope={dirty:i,ctx:e}),!n&&524288&i[0]&&(n=!0,o.open=e[19],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function En(e){let t,n;return t=new Ra({props:{schema:e[17],recID:e[0],readonly:!0}}),t.$on("back",e[36]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};131072&n[0]&&(i.schema=e[17]),1&n[0]&&(i.recID=e[0]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Nn(e){let t,n;return t=new e[25]({props:{title:e[20],$$slots:{default:[En]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1048576&n[0]&&(i.title=e[20]),131073&n[0]|536870912&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ln(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function qn(e){let t,n,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Ln,then:yn,catch:vn,value:59,blocks:[,,,]};return $e(e[31](),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){ge(i,e=t,n)},i(e){n||(pe(i.block),n=!0)},o(e){for(let e=0;e<3;e+=1){he(i.blocks[e])}n=!1},d(e){e&&E(t),i.block.d(e),i.token=null,i=null}}}function jn(e,t,i){let r,s,l;I(e,o,(e=>i(45,r=e)));const a=Q(),{Dialog:d,Modal:m}=c,{currentTasks:f,loggedIn:p}=u;I(e,f,(e=>i(51,s=e))),I(e,p,(e=>i(52,l=e)));let{id:h}=t,{item:g}=t,{value:v=""}=t,{multiValues:y}=t,{desc:w=""}=t,{noForm:b=!1}=t,{classId:x}=t,{eventId:k}=t,{recordId:_}=t,{withRefValue:S=!1}=t,{refValue:C=""}=t,{required:E}=t,{disabled:N}=t,{readonly:L}=t,{praefix:q}=t,{selectionFields:j}=t,{formnovalidate:D}=t,{selection:F}=t,{deList:T}=t,{isTemplate:z}=t,{noList:A=!1}=t,{multi:V=!1}=t;const M="comment_"+h;let B,O,P,W,R,U,H=!1,G=!0,Y=!0,J=!0;L||=_&&g.asInput,N||=L,!F&&g.selection&&1===g.selection.split(":").length&&(F=g.selection);const K=L||N||g.lookup||F&&!g.constraint?"":"Suchbegriff ⏎",Z=async e=>{e.items.filter((e=>e.properties?.default)).forEach((t=>{a("defPrep",{className:e.class,itemName:t.name,value:t.properties.default})}))},X=e=>{e&&(i(2,w=$(P,e)),a("setRefDesc",w.split(" •")[0]),a("change",{value:v,description:w}),a("task",{row:e,eventId:P.id}))},ee=()=>{i(18,H=!1),i(19,B=!1)};return e.$$set=e=>{"id"in e&&i(5,h=e.id),"item"in e&&i(6,g=e.item),"value"in e&&i(0,v=e.value),"multiValues"in e&&i(7,y=e.multiValues),"desc"in e&&i(2,w=e.desc),"noForm"in e&&i(8,b=e.noForm),"classId"in e&&i(9,x=e.classId),"eventId"in e&&i(10,k=e.eventId),"recordId"in e&&i(11,_=e.recordId),"withRefValue"in e&&i(39,S=e.withRefValue),"refValue"in e&&i(40,C=e.refValue),"required"in e&&i(1,E=e.required),"disabled"in e&&i(3,N=e.disabled),"readonly"in e&&i(41,L=e.readonly),"praefix"in e&&i(12,q=e.praefix),"selectionFields"in e&&i(13,j=e.selectionFields),"formnovalidate"in e&&i(42,D=e.formnovalidate),"selection"in e&&i(4,F=e.selection),"deList"in e&&i(14,T=e.deList),"isTemplate"in e&&i(15,z=e.isTemplate),"noList"in e&&i(43,A=e.noList),"multi"in e&&i(16,V=e.multi)},e.$$.update=()=>{if(2&e.$$.dirty[0]|2048&e.$$.dirty[1]&&i(1,E=E&&!D),768&e.$$.dirty[1]&&S&&i(0,v=C),131137&e.$$.dirty[0]|4096&e.$$.dirty[1]&&v&&P&&Promise.resolve(Va(g.refClass,P.id,v,!!g.lookup||A)).then(X),65&e.$$.dirty[0]|24576&e.$$.dirty[1]&&v&&W&&g.name===W.input?.at(0)&&W.inputLookup?.length){const{domain:e}=W.inputLookup[0]||{};"user"===e&&(r.some((e=>W.authorization?.find((t=>t.role===e&&!t.constraint))))||i(3,N=!0))}131073&e.$$.dirty[0]&&!v&&P&&X({})},[v,E,w,N,F,h,g,y,b,x,k,_,q,j,T,z,V,P,H,B,O,R,G,Y,J,d,m,f,p,M,K,async()=>{try{const e=await n.getEvent(k);if(U="report"===e.output.type,i(23,Y=!g.asInput),i(22,G=e.output?.class[0].name!==g.refClass),i(17,P=await n.getSchemaByClass(g.refClass)),Z(P),i(21,R=(e=>!s?.length||!!s.find((t=>t===e)))(P.id)),i(44,W=await n.getSchema(k)),k&&_&&v&&!N&&W.input?.find((e=>e===g.refClass))&&i(3,N=!0),g.properties?.query?.lookup){const{domain:e,value:t}=g.properties.query.lookup;if("user"===e){const e=l.user,o={[t]:e},s=await n.getSectionView(g.refClass,o);if(s?.length){const[{_id:e}]=s;e&&(i(40,C=e),i(39,S=!0))}r.some((e=>P.authorization?.find((t=>t.role===e&&!t.constraint))))||i(3,N=!0)}}return i(20,O=P.identity.designation),!0}catch{return a("initFail",!0),!1}},e=>t=>{if(!0===e&&i(18,H=!0),e&&"BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}(g.lookup||F&&!g.constraint||v)&&i(18,H=!0)},e=>{13==e.which&&(e.preventDefault(),i(18,H=!0))},()=>{if(v)return"";const e=document.getElementById(M);return e?.value||""},({detail:e})=>{i(0,v=e.row._id),ee()},ee,()=>{(U||R)&&(V?a("change",{value:v,delete:!0}):(i(0,v=""),i(2,w=""),i(24,J=!0),a("change",{value:v,description:w}),a("task",{row:{_task:{event:P.id,_id:!1}}})))},async()=>{if(!v)return;const e=await Va(g.refClass,P.id,v);if(!e._task)return;const t=e._task.task_id,n=`/task/${e._task.event}/${t}/task?view=standalone`;window.open(n)},S,C,L,D,A,W,r,function(e){w=e,i(2,w)},function(e){J=e,i(24,J)},function(e){H=e,i(18,H)},function(e){B=e,i(19,B)}]}class Dn extends _e{constructor(e){var t;super(),gn.getElementById("svelte-jox15l-style")||((t=L("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}",S(gn.head,t)),Ie(this,e,jn,qn,k,{id:5,item:6,value:0,multiValues:7,desc:2,noForm:8,classId:9,eventId:10,recordId:11,withRefValue:39,refValue:40,required:1,disabled:3,readonly:41,praefix:12,selectionFields:13,formnovalidate:42,selection:4,deList:14,isTemplate:15,noList:43,multi:16},[-1,-1])}}function Fn(e,t,n){const i=e.slice();return i[37]=t[n],i[39]=n,i}function Tn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function zn(e){let t,n;return t=new e[16]({props:{outline:!0,$$slots:{default:[Vn]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8191&n[0]|512&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function An(e){let t,n;return t=new Dn({props:{classId:e[6],eventId:e[7],required:e[9],disabled:e[1],formnovalidate:e[12],readonly:e[10],id:e[2]+"."+e[39],item:e[3],desc:e[4],value:e[37],noForm:e[5],praefix:e[11],recordId:e[8],multi:!0}}),t.$on("change",e[24]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.classId=e[6]),128&n[0]&&(i.eventId=e[7]),512&n[0]&&(i.required=e[9]),2&n[0]&&(i.disabled=e[1]),4096&n[0]&&(i.formnovalidate=e[12]),1024&n[0]&&(i.readonly=e[10]),4&n[0]&&(i.id=e[2]+"."+e[39]),8&n[0]&&(i.item=e[3]),16&n[0]&&(i.desc=e[4]),1&n[0]&&(i.value=e[37]),32&n[0]&&(i.noForm=e[5]),2048&n[0]&&(i.praefix=e[11]),256&n[0]&&(i.recordId=e[8]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Vn(e){let t,n,i,o,r,s,l;n=new Ze({props:{size:"18"}});let a=e[0],c=[];for(let t=0;t<a.length;t+=1)c[t]=An(Fn(e,a,t));const d=e=>he(c[e],1,1,(()=>{c[e]=null}));return{c(){t=L("span"),be(n.$$.fragment),i=D();for(let e=0;e<c.length;e+=1)c[e].c();o=F(),V(t,"class","feather pointer")},m(a,d){C(a,t,d),xe(n,t,null),C(a,i,d);for(let e=0;e<c.length;e+=1)c[e].m(a,d);C(a,o,d),r=!0,s||(l=T(t,"click",(function(){x(e[22](e[0]))&&e[22](e[0]).apply(this,arguments)})),s=!0)},p(t,n){if(e=t,16785407&n[0]){let t;for(a=e[0],t=0;t<a.length;t+=1){const i=Fn(e,a,t);c[t]?(c[t].p(i,n),pe(c[t],1)):(c[t]=An(i),c[t].c(),pe(c[t],1),c[t].m(o.parentNode,o))}for(me(),t=a.length;t<c.length;t+=1)d(t);fe()}},i(e){if(!r){pe(n.$$.fragment,e);for(let e=0;e<a.length;e+=1)pe(c[e]);r=!0}},o(e){he(n.$$.fragment,e),c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)he(c[e]);r=!1},d(e){e&&E(t),ke(n),e&&E(i),N(c,e),e&&E(o),s=!1,l()}}}function Mn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Bn(e){let t,n;return t=new e[18]({props:{title:e[14].designation,class:"eList",$$slots:{default:[Pn]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};16384&n[0]&&(i.title=e[14].designation),49480&n[0]|512&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function On(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Pn(e){let t,n,i,o,r;return n=new e[19]({props:{outline:!0,$$slots:{default:[On]},$$scope:{ctx:e}}}),n.$on("click",e[25]),o=new Tt({props:{item:e[3],className:e[14].class,classId:e[6],rowId:e[15],recordId:e[8],inputList:e[21]()}}),o.$on("choose",e[23]),o.$on("back",e[25]),{c(){t=L("div"),be(n.$$.fragment),i=D(),be(o.$$.fragment),V(t,"class","form--buttons")},m(e,s){C(e,t,s),xe(n,t,null),C(e,i,s),xe(o,e,s),r=!0},p(e,t){const i={};512&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const r={};8&t[0]&&(r.item=e[3]),16384&t[0]&&(r.className=e[14].class),64&t[0]&&(r.classId=e[6]),32768&t[0]&&(r.rowId=e[15]),256&t[0]&&(r.recordId=e[8]),o.$set(r)},i(e){r||(pe(n.$$.fragment,e),pe(o.$$.fragment,e),r=!0)},o(e){he(n.$$.fragment,e),he(o.$$.fragment,e),r=!1},d(e){e&&E(t),ke(n),e&&E(i),ke(o,e)}}}function Wn(e){let t,n,i=e[13]&&Bn(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[13]?i?(i.p(e,n),8192&n[0]&&pe(i,1)):(i=Bn(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Rn(e){let t,n,i,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Mn,then:zn,catch:Tn,value:36,blocks:[,,,]};function s(t){e[33](t)}$e(e[20](),r);let l={class:"tModal",noClickaway:!0,$$slots:{default:[Wn]},$$scope:{ctx:e}};return void 0!==e[13]&&(l.open=e[13]),n=new e[17]({props:l}),K.push((()=>we(n,"open",s))),{c(){r.block.c(),t=D(),be(n.$$.fragment)},m(e,i){r.block.m(e,r.anchor=i),r.mount=()=>t.parentNode,r.anchor=t,C(e,t,i),xe(n,e,i),o=!0},p(t,o){ge(r,e=t,o);const s={};57672&o[0]|512&o[1]&&(s.$$scope={dirty:o,ctx:e}),!i&&8192&o[0]&&(i=!0,s.open=e[13],re((()=>i=!1))),n.$set(s)},i(e){o||(pe(r.block),pe(n.$$.fragment,e),o=!0)},o(e){for(let e=0;e<3;e+=1){he(r.blocks[e])}he(n.$$.fragment,e),o=!1},d(e){r.block.d(e),r.token=null,r=null,e&&E(t),ke(n,e)}}}function Un(e,t,i){const o=Q(),{Card:r,Modal:s,Dialog:l,Button:a}=c;let d,u,{id:m}=t,{item:f}=t,{values:p=[]}=t,{desc:h=""}=t,{noForm:$=!1}=t,{classId:g}=t,{eventId:v}=t,{recordId:y}=t,{withRefValue:w=!1}=t,{refValue:b=""}=t,{required:x}=t,{disabled:k}=t,{readonly:I}=t,{praefix:_}=t,{selectionFields:S}=t,{formnovalidate:C}=t,{selection:E}=t,{deList:N}=t,{isTemplate:L}=t,{noList:q=!1}=t,j=!1;const D=f.properties.multi.filter;k=!0;const F=()=>{i(13,j=!1)};return e.$$set=e=>{"id"in e&&i(2,m=e.id),"item"in e&&i(3,f=e.item),"values"in e&&i(0,p=e.values),"desc"in e&&i(4,h=e.desc),"noForm"in e&&i(5,$=e.noForm),"classId"in e&&i(6,g=e.classId),"eventId"in e&&i(7,v=e.eventId),"recordId"in e&&i(8,y=e.recordId),"withRefValue"in e&&i(26,w=e.withRefValue),"refValue"in e&&i(27,b=e.refValue),"required"in e&&i(9,x=e.required),"disabled"in e&&i(1,k=e.disabled),"readonly"in e&&i(10,I=e.readonly),"praefix"in e&&i(11,_=e.praefix),"selectionFields"in e&&i(28,S=e.selectionFields),"formnovalidate"in e&&i(12,C=e.formnovalidate),"selection"in e&&i(29,E=e.selection),"deList"in e&&i(30,N=e.deList),"isTemplate"in e&&i(31,L=e.isTemplate),"noList"in e&&i(32,q=e.noList)},[p,k,m,f,h,$,g,v,y,x,I,_,C,j,d,u,r,s,l,a,async()=>{i(14,d=await n.getSchemaByClass(f.refClass))},async()=>{let e=await Aa(d.class,d.id);if(D)for(const t in D)e=e.filter((e=>{const[n,i]=t.split(".");if(i||(i=n,n=""),n){if(e[n][0]&&e[n][0][i].length)return!0}else if(e[i])return!0;return!1}));return e},e=>()=>{i(13,j=!0),i(15,u=e)},({detail:e})=>{const t=e.row._id;p.find((e=>e===t))||i(0,p=p.concat(e.row._id)),F()},({detail:e})=>{e.delete&&i(0,p=p.filter((t=>t!==e.value))),e.value=p,o("change",e)},F,w,b,S,E,N,L,q,function(e){j=e,i(13,j)}]}class Hn extends _e{constructor(e){var t;super(),document.getElementById("svelte-1m792ni-style")||((t=L("style")).id="svelte-1m792ni-style",t.textContent=".field .card{padding:1em !important;margin-bottom:1em !important}",S(document.head,t)),Ie(this,e,Un,Rn,k,{id:2,item:3,values:0,desc:4,noForm:5,classId:6,eventId:7,recordId:8,withRefValue:26,refValue:27,required:9,disabled:1,readonly:10,praefix:11,selectionFields:28,formnovalidate:12,selection:29,deList:30,isTemplate:31,noList:32},[-1,-1])}}const Gn=/\d+/g,Qn=/%[HMSpPdmyY%]/g;function Yn(e,t,n){const i=Math.floor((new Date).getFullYear()/100);let o=!1;if(""===e)return null;const r=t.split(Qn);let s=0,l=0;const a=new Date(0);for(const c of r){if(!e.startsWith(c,s))return n;if(s+=c.length,s===e.length){if(l!==t.length)return n;break}if("%"!==t[l+c.length])break;if(l+=c.length+1,"%"===t[l]){if("%"!==e[s])return n;s++}else if("p"===t[l].toLowerCase()){const t=e.substr(s,2).toUpperCase();if("AM"===t)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{Gn.lastIndex=s;const r=Gn.exec(e);if(null==r)return n;switch(t[l]){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])}s+=r[0].length}l++}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:Kn}=ve;function Zn(e,t,n){const i=e.slice();return i[17]=t[n],i}function Xn(e,t,n){const i=e.slice();return i[20]=t[n],i}function ei(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ti(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p=e[0].items,h=[];for(let t=0;t<p.length;t+=1)h[t]=ii(Xn(e,p,t));const $=e=>he(h[e],1,1,(()=>{h[e]=null}));let g=e[0].list&&oi(e);return a=new e[5]({props:{outline:!0,$$slots:{default:[si]},$$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:[li]},$$scope:{ctx:e}}}),{c(){t=L("form"),n=L("input"),o=D();for(let e=0;e<h.length;e+=1)h[e].c();r=D(),g&&g.c(),s=D(),l=L("div"),be(a.$$.fragment),c=D(),be(d.$$.fragment),V(n,"class",_(e[6])+" svelte-1phofh5"),V(n,"name","_id"),V(n,"type","hidden"),n.value=i=e[1]._id||"",V(t,"class","fTask svelte-1phofh5"),V(t,"id",e[6]),V(l,"class","form--buttons svelte-1phofh5")},m(i,p){C(i,t,p),S(t,n),S(t,o);for(let e=0;e<h.length;e+=1)h[e].m(t,null);S(t,r),g&&g.m(t,null),C(i,s,p),C(i,l,p),xe(a,l,null),S(l,c),xe(d,l,null),u=!0,m||(f=[T(t,"keydown",e[8]),T(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=Xn(e,p,n);h[n]?(h[n].p(i,o),pe(h[n],1)):(h[n]=ii(i),h[n].c(),pe(h[n],1),h[n].m(t,r))}for(me(),n=p.length;n<h.length;n+=1)$(n);fe()}e[0].list?g?(g.p(e,o),1&o&&pe(g,1)):(g=oi(e),g.c(),pe(g,1),g.m(t,null)):g&&(me(),he(g,1,1,(()=>{g=null})),fe());const s={};8388608&o&&(s.$$scope={dirty:o,ctx:e}),a.$set(s);const l={};4&o&&(l.disabled=e[2]),8388608&o&&(l.$$scope={dirty:o,ctx:e}),d.$set(l)},i(e){if(!u){for(let e=0;e<p.length;e+=1)pe(h[e]);pe(g),pe(a.$$.fragment,e),pe(d.$$.fragment,e),u=!0}},o(e){h=h.filter(Boolean);for(let e=0;e<h.length;e+=1)he(h[e]);he(g),he(a.$$.fragment,e),he(d.$$.fragment,e),u=!1},d(e){e&&E(t),N(h,e),g&&g.d(),e&&E(s),e&&E(l),ke(a),ke(d),m=!1,b(f)}}}function ni(e){let t,n;return t=new pl({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(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ii(e){let t,n,i=di(!0,e[20]),o=i&&ni(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=di(!0,e[20])),i?o?(o.p(e,n),1&n&&pe(o,1)):(o=ni(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function oi(e){let t,n,i=e[0].list,o=[];for(let t=0;t<i.length;t+=1)o[t]=ri(Zn(e,i,t));const r=e=>he(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 s;for(i=e[0].list,s=0;s<i.length;s+=1){const r=Zn(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=ri(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function ri(e){let t,n,i,o;return t=new e[4]({props:{text:e[17].designation}}),i=new xi({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(){be(t.$$.fragment),n=D(),be(i.$$.fragment)},m(e,r){xe(t,e,r),C(e,n,r),xe(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||(pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!0)},o(e){he(t.$$.fragment,e),he(i.$$.fragment,e),o=!1},d(e){ke(t,e),e&&E(n),ke(i,e)}}}function si(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function li(e){let t;return{c(){t=j("Speichern")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function ai(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ci(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ai,then:ti,catch:ei,value:16,blocks:[,,,]};return $e(e[7](),o),{c(){t=D(),n=L("section"),o.block.c(),Kn.title="Vorgaben",V(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]){ge(o,e=t,n)},i(e){i||(pe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}i=!1},d(e){e&&E(t),e&&E(n),o.block.d(),o.token=null,o=null}}}const di=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function ui(e,i,r){let a,d,u;I(e,l,(e=>r(11,d=e))),I(e,o,(e=>r(12,u=e)));const{Divider:m,Button:f,FormField:p}=c,h=JSON.parse(t.getItem("Locale"));let{schema:$}=i,{record:g}=i,v="template-"+$.class+Math.floor(9e3*Math.random()+1e3).toString(),y=!1;const w=()=>window.history.back(),b=(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 Yn(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(h.id).substring(1,2);try{r=Number(r.replace(e,".")).toString()}catch{}}return r};return e.$$set=e=>{"schema"in e&&r(0,$=e.schema),"record"in e&&r(1,g=e.record)},e.$$.update=()=>{4&e.$$.dirty&&r(3,a=y)},[$,g,y,a,m,f,v,async()=>{const e=await n.getEvent($.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&r(2,y=!0),d.role?.length&&$.authorization?.length){const e=$.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));r(2,y||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},w,async e=>{const t={};Array.from(document.querySelectorAll("form#"+v+" ."+v)).map((e=>{const n=e.id||e.name;if(n)if(n.includes(".")){const[i,o]=n.split("."),r=$.list.find((e=>e.name===i));t[n]=b(r.item,e)}else t[n]=b($.items,e)})),await n.saveTemplate($.class,t),s.success("Die Vorgaben wurden gespeichert.",2e3),w()}]}const{document:mi}=ve;function fi(e,t,n){const i=e.slice();return i[28]=t[n],i}function pi(e){let t,n;return t=new pl({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(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function hi(e){let t,n,i=di(e[7],e[28]),o=i&&pi(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=di(e[7],e[28])),i?o?(o.p(e,n),130&n[0]&&pe(o,1)):(o=pi(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function $i(e){let t,n,i,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=hi(fi(e,o,t));const s=e=>he(r[e],1,1,(()=>{r[e]=null}));return{c(){t=L("div");for(let e=0;e<r.length;e+=1)r[e].c();V(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,l){if(82367&l[0]){let n;for(o=e[1].item,n=0;n<o.length;n+=1){const i=fi(e,o,n);r[n]?(r[n].p(i,l),pe(r[n],1)):(r[n]=hi(i),r[n].c(),pe(r[n],1),r[n].m(t,null))}for(me(),n=o.length;n<r.length;n+=1)s(n);fe()}(!i||6&l[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&V(t,"id",n)},i(e){if(!i){for(let e=0;e<o.length;e+=1)pe(r[e]);i=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)he(r[e]);i=!1},d(e){e&&E(t),N(r,e)}}}function gi(e){let t,n,i=e[13](e[9])+"";return{c(){t=L("span"),n=j(i)},m(e,i){C(e,t,i),S(t,n)},p(e,t){512&t[0]&&i!==(i=e[13](e[9])+"")&&M(n,i)},d(e){e&&E(t)}}}function vi(e){let t,n,i;return n=new e[10]({props:{$$slots:{default:[gi]},$$scope:{ctx:e}}}),n.$on("click",(function(){x(e[15](e[27]))&&e[15](e[27]).apply(this,arguments)})),{c(){t=L("div"),be(n.$$.fragment),V(t,"class","accordion svelte-148ktt9"),V(t,"slot","handle")},m(e,o){C(e,t,o),xe(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||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function yi(e){let t,n;return t=new e[12]({props:{open:e[6],$$slots:{handle:[vi,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]],default:[$i,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",e[17]),{c(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function wi(e){let t,n,i;return n=new e[11]({props:{$$slots:{default:[yi]},$$scope:{ctx:e}}}),{c(){t=L("div"),be(n.$$.fragment),V(t,"class","formList")},m(e,o){C(e,t,o),xe(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||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function bi(e,t,i){const{Button:o,Accordion:r,AccordionSection:s}=c;let{list:l}=t,{schema:a}=t,{record:d}=t,{classId:u}=t,{eventId:m}=t,{disabled:$}=t,{required:g}=t,{open:v=!1}=t,{template:y={}}=t,{isTemplate:w=!1}=t,{currency:b}=t,{update:x=!1}=t,k=new Map;const I={};let _=d[l.name]||{};d[l.name]=_;const S=e=>I[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "),C=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};return e.$$set=e=>{"list"in e&&i(1,l=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,$=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,w=e.isTemplate),"currency"in e&&i(8,b=e.currency),"update"in e&&i(20,x=e.update)},e.$$.update=()=>{1048579&e.$$.dirty[0]&&x&&d&&i(9,_=d[l.name]||{})},[d,l,u,m,$,g,v,w,b,_,o,r,s,e=>a.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format&&"html"!==t.properties?.format)).map((t=>"object"===t.type?S(t.name):"boolean"===t.type?h(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[l.name]||{};for(const t in e)y[l.name][t]&&!d[l.name][t]&&i(0,d[l.name][t]=y[l.name][t],d)})(),e(t);const n=`#accordion-content-${u}-${l.name} > div.form-field:last-child`,o=document.querySelector(n);ie().then((()=>{const e=`#accordion-content-${u}-${l.name} textarea`;Array.from(document.querySelectorAll(e)).forEach(C)})).then((()=>o.scrollIntoView({behavior:"smooth",block:"end"})))},async({detail:{className:e,itemName:t,value:i}})=>{if(k.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===className+"."+l.name))),!i)return;const o={[t]:!0},r=await n.getSectionView(e,o);r?.length&&k.set(e,r[0])},()=>{setTimeout((()=>{Array.from(k).forEach((([e,t])=>{d[l.name][e]||i(0,d[l.name][e]=t._id,d)}))}),500)},a,y,x,function(t){Y(e,t)}]}class xi extends _e{constructor(e){var t;super(),mi.getElementById("svelte-148ktt9-style")||((t=L("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}}",S(mi.head,t)),Ie(this,e,bi,wi,k,{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:ki}=ve;function Ii(e){e[0]=e[23].list,e[22]=e[23].items}function _i(e,t,n){const i=e.slice();return i[24]=t[n],i}function Si(e,t,n){const i=e.slice();return i[27]=t[n],i}function Ci(e,t,n){const i=e.slice();return i[27]=t[n],i}function Ei(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ni(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v;function y(t){e[19](t)}Ii(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Li]},$$scope:{ctx:e}}}),n.$on("click",e[18]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),K.push((()=>we(s,"value",y))),s.$on("input",e[12]),d=new We({props:{size:"18"}});let b=e[22]?.length&&function(e){let t,n,i=e[22],o=[];for(let t=0;t<i.length;t+=1)o[t]=qi(Ci(e,i,t));return{c(){t=L("thead"),n=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();V(n,"class","svelte-14hcfjl"),V(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(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 s=Ci(e,i,r);o[r]?o[r].p(s,t):(o[r]=qi(s),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&&E(t),N(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]=Fi(_i(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 s=_i(e,n,r);i[r]?i[r].p(s,o):(i[r]=Fi(s),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){N(i,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),o=L("div"),r=j("Suchen: "),be(s.$$.fragment),a=D(),c=L("span"),be(d.$$.fragment),u=D(),m=L("div"),f=L("table"),b&&b.c(),p=D(),h=L("tbody"),x&&x.c(),V(t,"class","form--buttons svelte-14hcfjl"),V(c,"class","feather pointer svelte-14hcfjl"),O(o,"margin-bottom","1em"),O(o,"position","relative"),V(f,"striped",""),V(f,"class","svelte-14hcfjl"),V(m,"class","eList svelte-14hcfjl")},m(l,y){C(l,t,y),xe(n,t,null),C(l,i,y),C(l,o,y),S(o,r),xe(s,o,null),S(o,a),S(o,c),xe(d,c,null),C(l,u,y),C(l,m,y),S(m,f),b&&b.m(f,null),S(f,p),S(f,h),x&&x.m(h,null),$=!0,g||(v=T(c,"click",e[14]),g=!0)},p(e,t){Ii(e);const i={};2&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!l&&2&t[0]&&(l=!0,o.value=e[1],re((()=>l=!1))),s.$set(o),e[22]?.length&&b.p(e,t),e[0]?.length&&x.p(e,t)},i(e){$||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),$=!0)},o(e){he(n.$$.fragment,e),he(s.$$.fragment,e),he(d.$$.fragment,e),$=!1},d(e){e&&E(t),ke(n),e&&E(i),e&&E(o),ke(s),ke(d),e&&E(u),e&&E(m),b&&b.d(),x&&x.d(),g=!1,v()}}}function Li(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function qi(e){let t,n,i=e[27]?.designation+"";return{c(){t=L("th"),n=j(i),V(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function ji(e){let t,n,i=e[22],o=[];for(let t=0;t<i.length;t+=1)o[t]=Di(Si(e,i,t));return{c(){t=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();n=D(),V(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);S(t,n)},p(e,r){if(3584&r[0]){let s;for(i=e[22],s=0;s<i.length;s+=1){const l=Si(e,i,s);o[s]?o[s].p(l,r):(o[s]=Di(l),o[s].c(),o[s].m(t,n))}for(;s<o.length;s+=1)o[s].d(1);o.length=i.length}},d(e){e&&E(t),N(o,e)}}}function Di(e){let t,n,i,o,r=e[9](e[24],e[27])+"";return{c(){t=L("td"),n=j(r),V(t,"class","svelte-14hcfjl")},m(r,s){C(r,t,s),S(t,n),i||(o=T(t,"click",A(e[10](e[24]))),i=!0)},p(t,n){e=t},d(e){e&&E(t),i=!1,o()}}}function Fi(e){let t,n=e[13](e[24],e[22],e[1]),i=n&&ji(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=ji(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&E(t)}}}function Ti(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function zi(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:Ti,then:Ni,catch:Ei,value:23,blocks:[,,,]};return $e(e[11](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function Ai(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[zi]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Vi(e,t,i){const o=Q(),{Dialog:r,Divider:s,Loading:l,TextField:a,Button:d}=c;let{item:u}=t,{className:m}=t,{classId:p}=t,{list:$}=t,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?h(n):f(e[`_${t.name}`]||e[t.name]||"")},w=n.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,$=e.list)},[$,g,o,r,s,l,a,d,v,y,e=>()=>o("choose",{row:e}),async()=>{const e=await w,t=e.display;let n=Dt(t,e,$);return{list:$,items:n}},({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 Mi extends _e{constructor(e){var t;super(),ki.getElementById("svelte-14hcfjl-style")||((t=L("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}",S(ki.head,t)),Ie(this,e,Vi,Ai,k,{item:15,className:16,classId:17,list:0},[-1,-1])}}const{document:Bi}=ve;function Oi(e,t,n){const i=e.slice();return i[11]=t[n],i}function Pi(e,t,n){const i=e.slice();return i[3]=t[n],i}function Wi(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ri(e){let t,n,i,o=e[7].items,r=[];for(let t=0;t<o.length;t+=1)r[t]=Yi(Pi(e,o,t));const s=e=>he(r[e],1,1,(()=>{r[e]=null}));let l=e[7].list&&Ji(e);return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=D(),l&&l.c(),n=F()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);C(e,t,o),l&&l.m(e,o),C(e,n,o),i=!0},p(e,i){if(5161959&i[0]){let n;for(o=e[7].items,n=0;n<o.length;n+=1){const s=Pi(e,o,n);r[n]?(r[n].p(s,i),pe(r[n],1)):(r[n]=Yi(s),r[n].c(),pe(r[n],1),r[n].m(t.parentNode,t))}for(me(),n=o.length;n<r.length;n+=1)s(n);fe()}e[7].list?l?(l.p(e,i),128&i[0]&&pe(l,1)):(l=Ji(e),l.c(),pe(l,1),l.m(n.parentNode,n)):l&&(me(),he(l,1,1,(()=>{l=null})),fe())},i(e){if(!i){for(let e=0;e<o.length;e+=1)pe(r[e]);pe(l),i=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)he(r[e]);he(l),i=!1},d(e){N(r,e),e&&E(t),l&&l.d(e),e&&E(n)}}}function Ui(e){let t,n,i,o;const r=[Gi,Hi],s=[];function l(e,t){return e[3].name!==e[14]||e[15]?"lookup"!==e[3].properties?.format?1:-1:0}return~(t=l(e))&&(n=s[t]=r[t](e)),{c(){n&&n.c(),i=F()},m(e,n){~t&&s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?~t&&s[t].p(e,o):(n&&(me(),he(s[a],1,1,(()=>{s[a]=null})),fe()),~t?(n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i)):n=null)},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){~t&&s[t].d(e),e&&E(i)}}}function Hi(e){let t,n;return t=new pl({props:{classId:e[8],item:e[3],record:e[6],disabled:e[3].name===e[14]&&e[15]||e[0],eventId:e[5],currency:e[2],changeValue:e[9]}}),t.$on("notify",e[17]),t.$on("multi",e[18]),t.$on("defPrep",e[19]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};256&n[0]&&(i.classId=e[8]),128&n[0]&&(i.item=e[3]),64&n[0]&&(i.record=e[6]),129&n[0]&&(i.disabled=e[3].name===e[14]&&e[15]||e[0]),32&n[0]&&(i.eventId=e[5]),4&n[0]&&(i.currency=e[2]),512&n[0]&&(i.changeValue=e[9]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Gi(e){let t,n,i,o;n=new pl({props:{classId:e[8],item:e[3],record:e[6],disabled:e[0]||!!e[1],required:!0,eventId:e[5],currency:e[2],changeValue:e[9]}}),n.$on("notify",e[17]),n.$on("multi",e[18]),n.$on("defPrep",e[19]);let r=e[1]&&Qi(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),r&&r.c(),O(t,"padding-top",".25em"),O(t,"background-color","lightyellow"),O(t,"position","relative")},m(e,s){C(e,t,s),xe(n,t,null),S(t,i),r&&r.m(t,null),o=!0},p(e,i){const o={};256&i[0]&&(o.classId=e[8]),128&i[0]&&(o.item=e[3]),64&i[0]&&(o.record=e[6]),3&i[0]&&(o.disabled=e[0]||!!e[1]),32&i[0]&&(o.eventId=e[5]),4&i[0]&&(o.currency=e[2]),512&i[0]&&(o.changeValue=e[9]),n.$set(o),e[1]?r?(r.p(e,i),2&i[0]&&pe(r,1)):(r=Qi(e),r.c(),pe(r,1),r.m(t,null)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){o||(pe(n.$$.fragment,e),pe(r),o=!0)},o(e){he(n.$$.fragment,e),he(r),o=!1},d(e){e&&E(t),ke(n),r&&r.d()}}}function Qi(e){let t,n,i,o,r;return n=new We({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather2 pointer svelte-16mo2c")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[22]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Yi(e){let t,n,i="list"!==e[3].type&&Ui(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[3].type?i?(i.p(e,n),128&n[0]&&pe(i,1)):(i=Ui(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Ji(e){let t,n,i=e[7].list,o=[];for(let t=0;t<i.length;t+=1)o[t]=Zi(Oi(e,i,t));const r=e=>he(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(485&n[0]){let s;for(i=e[7].list,s=0;s<i.length;s+=1){const r=Oi(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=Zi(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function Ki(e){let t,n,i,o;return t=new e[12]({props:{text:e[11].designation}}),i=new xi({props:{classId:e[8],list:e[11],eventId:e[5],schema:e[11].item,record:e[6],disabled:e[0],currency:e[2],update:!0}}),{c(){be(t.$$.fragment),n=D(),be(i.$$.fragment)},m(e,r){xe(t,e,r),C(e,n,r),xe(i,e,r),o=!0},p(e,n){const o={};128&n[0]&&(o.text=e[11].designation),t.$set(o);const r={};256&n[0]&&(r.classId=e[8]),128&n[0]&&(r.list=e[11]),32&n[0]&&(r.eventId=e[5]),128&n[0]&&(r.schema=e[11].item),64&n[0]&&(r.record=e[6]),1&n[0]&&(r.disabled=e[0]),4&n[0]&&(r.currency=e[2]),i.$set(r)},i(e){o||(pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!0)},o(e){he(t.$$.fragment,e),he(i.$$.fragment,e),o=!1},d(e){ke(t,e),e&&E(n),ke(i,e)}}}function Zi(e){let t,n,i="array"!==e[11].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){"array"!==e[11].type?i?(i.p(e,n),128&n[0]&&pe(i,1)):(i=Ki(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Xi(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function eo(e){let t,n;return t=new Mi({props:{item:e[3],className:e[4],classId:e[8],list:e[11]}}),t.$on("choose",e[20]),t.$on("back",e[21]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8&n[0]&&(i.item=e[3]),16&n[0]&&(i.className=e[4]),256&n[0]&&(i.classId=e[8]),2048&n[0]&&(i.list=e[11]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function to(e){let t,n,i=e[10]&&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[10]?i?(i.p(e,n),1024&n[0]&&pe(i,1)):(i=eo(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function no(e){let t,n,i,o,r,s,l={ctx:e,current:null,token:null,hasCatch:!1,pending:Xi,then:Ri,catch:Wi,value:52,blocks:[,,,]};function a(t){e[28](t)}$e(e[16](),l),n=new e[12]({});let c={class:"tModal",noClickaway:!0,$$slots:{default:[to]},$$scope:{ctx:e}};return void 0!==e[10]&&(c.open=e[10]),o=new e[13]({props:c}),K.push((()=>we(o,"open",a))),{c(){l.block.c(),t=D(),be(n.$$.fragment),i=D(),be(o.$$.fragment)},m(e,r){l.block.m(e,l.anchor=r),l.mount=()=>t.parentNode,l.anchor=t,C(e,t,r),xe(n,e,r),C(e,i,r),xe(o,e,r),s=!0},p(t,n){ge(l,e=t,n);const i={};3352&n[0]|67108864&n[1]&&(i.$$scope={dirty:n,ctx:e}),!r&&1024&n[0]&&(r=!0,i.open=e[10],re((()=>r=!1))),o.$set(i)},i(e){s||(pe(l.block),pe(n.$$.fragment,e),pe(o.$$.fragment,e),s=!0)},o(e){for(let e=0;e<3;e+=1){he(l.blocks[e])}he(n.$$.fragment,e),he(o.$$.fragment,e),s=!1},d(e){l.block.d(e),l.token=null,l=null,e&&E(t),ke(n,e),e&&E(i),ke(o,e)}}}function io(e,t,i){const{Divider:o,FormField:r,Modal:s}=c,l=Q();let a,d,u,m,f,{required:p}=t,{disabled:h}=t,{readonly:$}=t,{id:g}=t,{item:v}=t,{value:y}=t,{refValue:w}=t,{currency:b}=t,x={},k=[],I=[],_={},S=new Map,C=!1,E="";const N=v.checkOn,L=y,q=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?"!":""})}))},j=()=>{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)})}))},D=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:s}=e;if(!n)break;let l,a,c=!o&&x[n];const u=x[n];u&&o&&(c=(await Oa(n,u))[o]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===r&&(c=!c),"required"!==s&&"readonly"!==s||(s="required"===s?s:"disabled",setTimeout((()=>{l=`#${d} .form-field.${t} .field textarea`,a=document.querySelector(l),a||(l=`#${d} .form-field.${t} .field input`,a=document.querySelector(l)),a&&c&&a.setAttribute(s,""),a&&!c&&a.removeAttribute(s)}),0)),"hidden"===s&&(l=`#${d} .form-field.${t}`,a=document.querySelector(l),a?.classList?.toggle("hidden",!!c),c&&i(9,_[t]="",_))}}};H((()=>{F()}));const F=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=>D(e)))})(),T())},T=()=>{setTimeout((()=>{Array.from(S).forEach((([e,t])=>{x[e]||i(6,x[e]=t._id,x)}))}),250)},z=async e=>{if(!e.value)return void V();const t={[e.itemName]:{$regex:`(?i)${e.value}`}},o=await n.getSectionView(u,t);o?.length?(i(11,E=o),i(10,C=!0)):(i(1,y=""),i(23,w=""),l("setRefValue",w))},A=()=>{i(10,C=!1)},V=()=>{i(1,y=""),i(23,w=y),i(6,x={}),l("setRefValue",w)};return e.$$set=e=>{"required"in e&&i(24,p=e.required),"disabled"in e&&i(0,h=e.disabled),"readonly"in e&&i(25,$=e.readonly),"id"in e&&i(26,g=e.id),"item"in e&&i(3,v=e.item),"value"in e&&i(1,y=e.value),"refValue"in e&&i(23,w=e.refValue),"currency"in e&&i(2,b=e.currency)},e.$$.update=()=>{33554433&e.$$.dirty[0]&&i(0,h=h||$),134217840&e.$$.dirty[0]&&x&&l("safeReference",{record:x,class:u,event:m,taskId:f})},[h,y,b,v,u,m,x,a,d,_,C,E,o,s,N,L,async()=>{try{if(y){const e=await n.getTask(v.refClass,y);delete e._task,i(6,x=e),i(27,f=(await n.getTaskByDocId(e._id))._id)}else i(6,x={})}catch{}return i(7,a=await n.getSchemaByClass(v.refClass)),i(8,d="form-"+a.class+Math.floor(9e3*Math.random()+1e3).toString()),i(4,u=a.class),a.identity.designation,i(5,m=a.id),["readonly","hidden","required"].map(q),j(),!0},async({detail:e})=>{const{itemName:t,value:n}=e;if(i(6,x[t]=n,x),t===N)return z(e);D(t)},async({detail:e})=>{if(!(a.input?.length&&a.input.length>1))return;if(prevSchema?.class!==a.input[0])return;const{value:t,lookup:o,view:r}=e,[s]=o.split(":"),l=(await n.getSectionView(s,{[r]:{$in:t}})).map((e=>e._id));for(const e of a.input.slice(1)){i(6,x[e]=[],x);const t=await n.getSchemaByClass(e);t.id;let o=await n.getTasks(t.id);if(o=o.data.filter((e=>"Ready"===e._task?.status&&l.includes(e[s]))),o?.length){const t=o.map((e=>e._id)),r=await n.getSectionView(e,{_id:{$in:t}});for(const t of r)t[e]=t._id;i(6,x[e]=r,x)}}},async({detail:{className:e,itemName:t,value:i}})=>{if(S.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===u))),!i)return;const o={[t]:!0},r=await n.getSectionView(e,o);r?.length&&S.set(e,r[0])},async({detail:e})=>{const t=await n.getSectionView(u,{_id:e.row._id});t?.length&&(i(1,y=t[0]._id),i(23,w=y),l("setRefValue",w),i(6,x=t[0])),A()},A,V,w,p,$,g,f,function(e){C=e,i(10,C)}]}class oo extends _e{constructor(e){var t;super(),Bi.getElementById("svelte-16mo2c-style")||((t=L("style")).id="svelte-16mo2c-style",t.textContent=".feather2.svelte-16mo2c{position:absolute;top:1em;right:0.5em;color:#4300b0}",S(Bi.head,t)),Ie(this,e,io,no,k,{required:24,disabled:0,readonly:25,id:26,item:3,value:1,refValue:23,currency:2},[-1,-1])}}function ro(e){let t,n=e[11]&&function(e){let t,n;return{c(){t=L("span"),n=j(e[4]),V(t,"class","item")},m(e,i){C(e,t,i),S(t,n)},p(e,t){16&t[0]&&M(n,e[4])},d(e){e&&E(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&&E(t)}}}function so(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:[ro]},$$scope:{ctx:e}}}),n.$on("change",e[14]),n.$on("focus",e[15]),{c(){t=L("div"),be(n.$$.fragment),O(t,"position","relative"),O(t,"max-width","10em")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p(e,t){const i={};6&t[0]&&(i.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t[0]&&(i.id=e[0]),1&t[0]&&(i.name=e[0]),256&t[0]&&(i.value=e[8]),64&t[0]&&(i.pattern=e[6]),128&t[0]&&(i.readonly=e[7]),8&t[0]&&(i.disabled=e[3]),32&t[0]&&(i.required=e[5]),16&t[0]|2&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i)},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function lo(e,n,i){let o;const r=Q(),{TextField:s}=c;let{id:l}=n,{item:a}=n,{value:d}=n,{noForm:u=!1}=n,{classId:m}=n,{disabled:f}=n,{formnovalidate:p}=n,{currency:h}=n,{praefix:$}=n,{notifyList:g}=n;const v=JSON.parse(t.getItem("Locale")),y=["price","amount","amountValue","taxValue","__total"].find((e=>e===a.name?.split("-")[0])),w=Number("1.1").toLocaleString(v.id).substring(1,2),{properties:b={}}=a;let{min:x,max:k,step:I,pattern:_,decimals:S=0,unit:C="",placeholder:E,hint:N,readonly:L,negative:q,required:j=!1}=b;L=!0===L||void 0;_||(_=S?`[0-9]+([${w}][0-9]{1,${S}})?`:"[0-9]*"),q&&(_="-?"+_);return e.$$set=e=>{"id"in e&&i(0,l=e.id),"item"in e&&i(16,a=e.item),"value"in e&&i(17,d=e.value),"noForm"in e&&i(1,u=e.noForm),"classId"in e&&i(2,m=e.classId),"disabled"in e&&i(3,f=e.disabled),"formnovalidate"in e&&i(18,p=e.formnovalidate),"currency"in e&&i(4,h=e.currency),"praefix"in e&&i(19,$=e.praefix),"notifyList"in e&&i(20,g=e.notifyList)},e.$$.update=()=>{262176&e.$$.dirty[0]&&i(5,j=j&&!p),131072&e.$$.dirty[0]&&i(8,o=Number(d.toString().replace(w,".")).toFixed(S).toString().replace(".",w)),1048576&e.$$.dirty[0]&&(async()=>{if(void 0===$)return;const e=a.properties?.value?.formula;"$multiply"===e?.operator&&r("formula",{item:a})})()},[l,u,m,f,h,j,_,L,o,s,v,y,I,E,({detail:e})=>r("blur",{value:e.value}),({detail:e})=>{L||Number(d.toString().replace(w,"."))||i(8,o="")},a,d,p,$,g]}class ao extends _e{constructor(e){super(),Ie(this,e,lo,so,k,{id:0,item:16,value:17,noForm:1,classId:2,disabled:3,formnovalidate:18,currency:4,praefix:19,notifyList:20},[-1,-1])}}const{document:co}=ve;function uo(e){e[33]=e[35].list,e[34]=e[35].items}function mo(e,t,n){const i=e.slice();return i[36]=t[n],i[38]=n,i}function fo(e,t,n){const i=e.slice();return i[39]=t[n],i[41]=n,i}function po(e,t,n){const i=e.slice();return i[39]=t[n],i}function ho(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function $o(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v,y;uo(e),n=new e[8]({props:{outline:!0,$$slots:{default:[go]},$$scope:{ctx:e}}}),n.$on("click",e[30]);let w=!e[1]&&vo(e);function b(t){e[31](t)}let x={id:e[11]};void 0!==e[2]&&(x.value=e[2]),l=new e[6]({props:x}),K.push((()=>we(l,"value",b))),l.$on("input",e[14]),u=new We({props:{size:"18"}});let k=e[34]?.length&&function(e){let t,n,i,o,r=!e[1]&&wo(e),s=e[34],l=[];for(let t=0;t<s.length;t+=1)l[t]=bo(po(e,s,t));return{c(){t=L("thead"),n=L("tr"),r&&r.c(),i=D();for(let e=0;e<l.length;e+=1)l[e].c();V(n,"class","svelte-1m010ne"),V(t,"class","svelte-1m010ne")},m(e,s){C(e,t,s),S(t,n),r&&r.m(n,null),S(n,i);for(let e=0;e<l.length;e+=1)l[e].m(n,null);o=!0},p(e,t){if(e[1]?r&&(me(),he(r,1,1,(()=>{r=null})),fe()):r?(r.p(e,t),2&t[0]&&pe(r,1)):(r=wo(e),r.c(),pe(r,1),r.m(n,i)),8192&t[0]){let i;for(s=e[34],i=0;i<s.length;i+=1){const o=po(e,s,i);l[i]?l[i].p(o,t):(l[i]=bo(o),l[i].c(),l[i].m(n,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=s.length}},i(e){o||(pe(r),o=!0)},o(e){he(r),o=!1},d(e){e&&E(t),r&&r.d(),N(l,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]=So(mo(e,i,t));const r=e=>he(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 s;for(i=e[33],s=0;s<i.length;s+=1){const r=mo(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=So(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),w&&w.c(),o=D(),r=L("div"),s=j("Suchen: "),be(l.$$.fragment),c=D(),d=L("span"),be(u.$$.fragment),m=D(),f=L("div"),p=L("table"),k&&k.c(),h=D(),$=L("tbody"),I&&I.c(),V(t,"class","form--buttons svelte-1m010ne"),V(d,"class","feather pointer svelte-1m010ne"),O(r,"margin-bottom","1em"),O(r,"position","relative"),V(p,"striped",""),V(p,"class","svelte-1m010ne"),V(f,"class","eList svelte-1m010ne")},m(a,b){C(a,t,b),xe(n,t,null),S(t,i),w&&w.m(t,null),C(a,o,b),C(a,r,b),S(r,s),xe(l,r,null),S(r,c),S(r,d),xe(u,d,null),C(a,m,b),C(a,f,b),S(f,p),k&&k.m(p,null),S(p,h),S(p,$),I&&I.m($,null),g=!0,v||(y=T(d,"click",e[16]),v=!0)},p(e,i){uo(e);const o={};8192&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o),e[1]?w&&(me(),he(w,1,1,(()=>{w=null})),fe()):w?(w.p(e,i),2&i[0]&&pe(w,1)):(w=vo(e),w.c(),pe(w,1),w.m(t,null));const r={};!a&&4&i[0]&&(a=!0,r.value=e[2],re((()=>a=!1))),l.$set(r),e[34]?.length&&k.p(e,i),e[33]?.length&&I.p(e,i)},i(e){g||(pe(n.$$.fragment,e),pe(w),pe(l.$$.fragment,e),pe(u.$$.fragment,e),pe(k),pe(I),g=!0)},o(e){he(n.$$.fragment,e),he(w),he(l.$$.fragment,e),he(u.$$.fragment,e),he(k),he(I),g=!1},d(e){e&&E(t),ke(n),w&&w.d(),e&&E(o),e&&E(r),ke(l),ke(u),e&&E(m),e&&E(f),k&&k.d(),I&&I.d(),v=!1,y()}}}function go(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function vo(e){let t,n;return t=new e[8]({props:{disabled:!e[33].length,filled:!0,$$slots:{default:[yo]},$$scope:{ctx:e}}}),t.$on("click",e[17](e[33])),{c(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function yo(e){let t;return{c(){t=j("Bestätigen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function wo(e){let t,n,i,o,r;return n=new Fe({props:{size:"20"}}),{c(){t=L("th"),be(n.$$.fragment),V(t,"class","svelte-1m010ne")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[18](e[33])),o=!0)},p(t,n){e=t},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function bo(e){let t,n,i=e[39]+"";return{c(){t=L("th"),n=j(i),V(t,"class","svelte-1m010ne")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function xo(e){let t,n,i,o,r,s,l,a=e[0],c=Io(e),d=e[34],u=[];for(let t=0;t<d.length;t+=1)u[t]=_o(fo(e,d,t));return{c(){t=L("tr"),c.c(),n=D();for(let e=0;e<u.length;e+=1)u[e].c();i=D(),V(t,"style",o=e[1]?"cursor: default;":"cursor: zoom-in;"),V(t,"title","übernimmt den Wert direkt"),V(t,"class","svelte-1m010ne"),P(t,"active",e[0].includes(e[36]))},m(o,a){C(o,t,a),c.m(t,null),S(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);S(t,i),r=!0,s||(l=T(t,"click",e[19](e[36])),s=!0)},p(s,l){if(e=s,1&l[0]&&k(a,a=e[0])?(me(),he(c,1,1,v),fe(),c=Io(e),c.c(),pe(c),c.m(t,n)):c.p(e,l),8200&l[0]){let n;for(d=e[34],n=0;n<d.length;n+=1){const o=fo(e,d,n);u[n]?u[n].p(o,l):(u[n]=_o(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&l[0]&&o!==(o=e[1]?"cursor: default;":"cursor: zoom-in;"))&&V(t,"style",o),8193&l[0]&&P(t,"active",e[0].includes(e[36]))},i(e){r||(pe(c),r=!0)},o(e){he(c),r=!1},d(e){e&&E(t),c.d(e),N(u,e),s=!1,l()}}}function ko(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=L("td"),be(n.$$.fragment),V(t,"title","Wählt den Wert aus"),V(t,"class","svelte-1m010ne")},m(e,o){C(e,t,o),xe(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||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function Io(e){let t,n,i=!e[1]&&ko(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&&(me(),he(i,1,1,(()=>{i=null})),fe()):i?(i.p(e,n),2&n[0]&&pe(i,1)):(i=ko(e),i.c(),pe(i,1),i.m(t.parentNode,t))},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function _o(e){let t,n,i=(e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"";return{c(){t=L("td"),n=j(i),V(t,"class","svelte-1m010ne")},m(e,i){C(e,t,i),S(t,n)},p(e,t){8&t[0]&&i!==(i=(e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"")&&M(n,i)},d(e){e&&E(t)}}}function So(e){let t,n,i=e[15](e[36],e[2]),o=i&&xo(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]&&pe(o,1)):(o=xo(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function Co(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Eo(e){let t,n,i,o;t=new e[9]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:Co,then:$o,catch:ho,value:35,blocks:[,,,]};return $e(e[13](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function No(e){let t,n;return t=new e[7]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Eo]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Lo(e,t,i){const o=Q(),{Loading:r,TextField:s,Dialog:l,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=t,{id:f}=t,{selection:p}=t,{refDoc:h}=t,{tableName:$}=t,{idName:g}=t,{target:v}=t,{view:y}=t,{unique:w}=t,{uniqueView:b}=t,{status:x}=t,{single:k}=t;p||=[];let I="",_=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",S=[];const C=$+g+v+"checkbox",E=(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,h=e.refDoc),"tableName"in e&&i(24,$=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,w=e.unique),"uniqueView"in e&&i(28,b=e.uniqueView),"status"in e&&i(29,x=e.status),"single"in e&&i(1,k=e.single)},[p,k,I,S,o,r,s,l,a,d,u,_,C,async()=>{let e=[],t=[],o={};if(i(3,S=[]),g)if(y){if(f){const t=m.split("-")[1].slice(0,-4),i="input."+m+"[name='_id']",r=document.querySelector(i).value;o={[g]:f},x&&(o.$or=[{status:!0},{[t]:r}]),e=await n.getSectionView($,o),e=e.sort(((e,n)=>{const i=e=>(e[t]||"z").toString()+e[v];return E(i(e),i(n))}))}}else b?f&&(o={[g]:f,status:!0},Object.entries(b).map((([e,n])=>{n?.length&&(o[e]={$in:n}),t.push(e)})),e=await n.getSectionView($,o),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return E(n(e),n(t))})),i(3,S=e.map((e=>{const n=[e[v]];return t.map((t=>n.push(e[t]))),n})))):w?(e=await n.getSection($,g,f,w),e=e.sort(((e,t)=>E(e,t)))):(e=await n.getSection($,g,f,!1,x),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return E(n(e),n(t))})));else o={},f&&!Array.isArray(f)&&(o._id=f),e=await n.getSectionView($,o);const r=await n.getSchemaByClass($),s=[];if(h){const t=r.items[0].name,n=r.items[1].name,o=r.list[0].name,s=e.find((e=>e[t]===h));e=s?s[o]:[],i(20,v=n)}e.map((e=>{let t=e[v];if(t||$!==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(", ")),s.push(t||[])}else s.push(t||[])}));const l=r.items.find((e=>e.name===v))?.designation;return t=t.map((e=>r.items.find((t=>t.name===e))?.designation)),{list:s.flat(),items:[l,...t]}},({detail:{value:e}})=>{i(2,I=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{i(2,I="")},e=>()=>{const t=document.getElementsByName(C),n=[];t.forEach(((t,i)=>{t.checked&&n.push(e[+t.attributes.data.value])})),o("choose",{list:n})},e=>()=>{document.getElementsByName(C).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,w,b,x,()=>o("back"),function(e){I=e,i(2,I)}]}class qo extends _e{constructor(e){var t;super(),co.getElementById("svelte-1m010ne-style")||((t=L("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}",S(co.head,t)),Ie(this,e,Lo,No,k,{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:jo}=ve;function Do(e){let t,n,i,o,r,s=e[7].length+"";return{c(){t=L("span"),n=j("("),i=j(s),o=j(")"),V(t,"class",r=_(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,n){128&n[0]&&s!==(s=e[7].length+"")&&M(i,s),2&n[0]&&r!==(r=_(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&V(t,"class",r)},d(e){e&&E(t)}}}function Fo(e){let t;return{c(){t=L("div"),V(t,"class","load-more-options"),V(t,"slot","load-more-options-message")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function To(e){let t,n,i,o;const r=[Vo,Ao,zo],s=[];function l(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=l(e))&&(n=s[t]=r[t](e)),{c(){n&&n.c(),i=F()},m(e,n){~t&&s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?~t&&s[t].p(e,o):(n&&(me(),he(s[a],1,1,(()=>{s[a]=null})),fe()),~t?(n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i)):n=null)},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){~t&&s[t].d(e),e&&E(i)}}}function zo(e){let t,n,i,o,r;return n=new qe({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"title","Übernehmen"),V(t,"class","feather pointer svelte-1rbaejz")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[26]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Ao(e){let t,n,i,o,r;return n=new Ae({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"title",e[17].title||"Generieren"),V(t,"class","feather pointer svelte-1rbaejz")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[25]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Vo(e){let t,n,i,o,r;return n=new We({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"title","Löschen"),V(t,"class","feather pointer svelte-1rbaejz")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[27]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Mo(e){let t,n,i;function o(t){e[37](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[Bo]},$$scope:{ctx:e}};return void 0!==e[10]&&(r.open=e[10]),t=new e[11]({props:r}),K.push((()=>we(t,"open",o))),{c(){be(t.$$.fragment)},m(e,n){xe(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],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function Bo(e){let t,n;return t=new qo({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(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Oo(e){let t,n,i,o,r,s,l,a,c,d=!e[16].single&&e[7]?.length&&Do(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:Po,minSearchLength:"3",$$slots:{"load-more-options-message":[Fo]},$$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((()=>we(i,"selection",u))),K.push((()=>we(i,"maxOptions",m))),i.$on("change",e[22]);let p=!e[1]&&To(e),h=e[10]&&Mo(e);return{c(){t=L("div"),d&&d.c(),n=D(),be(i.$$.fragment),s=D(),p&&p.c(),l=D(),h&&h.c(),a=F(),O(t,"position","relative")},m(e,o){C(e,t,o),d&&d.m(t,null),S(t,n),xe(i,t,null),S(t,s),p&&p.m(t,null),C(e,l,o),h&&h.m(e,o),C(e,a,o),c=!0},p(e,s){!e[16].single&&e[7]?.length?d?d.p(e,s):(d=Do(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const l={};8&s[0]&&(l.id=e[3]),8&s[0]&&(l.name=e[3]),8&s[0]&&(l.class=e[3]),2&s[0]&&(l.disabled=e[1]),64&s[0]&&(l.required=e[6]),256&s[0]&&(l.placeholder=e[8]),32768&s[1]&&(l.$$scope={dirty:s,ctx:e}),!o&&128&s[0]&&(o=!0,l.selection=e[7],re((()=>o=!1))),!r&&512&s[0]&&(r=!0,l.maxOptions=e[9],re((()=>r=!1))),i.$set(l),e[1]?p&&(me(),he(p,1,1,(()=>{p=null})),fe()):p?(p.p(e,s),2&s[0]&&pe(p,1)):(p=To(e),p.c(),pe(p,1),p.m(t,null)),e[10]?h?(h.p(e,s),1024&s[0]&&pe(h,1)):(h=Mo(e),h.c(),pe(h,1),h.m(a.parentNode,a)):h&&(me(),he(h,1,1,(()=>{h=null})),fe())},i(e){c||(pe(i.$$.fragment,e),pe(p),pe(h),c=!0)},o(e){he(i.$$.fragment,e),he(p),he(h),c=!1},d(e){e&&E(t),d&&d.d(),ke(i),p&&p.d(),e&&E(l),h&&h.d(e),e&&E(a)}}}async function*Po(e){yield[{name:e}]}function Wo(e,t,i){const o=Q(),{Modal:r,Autocomplete:s}=c;let{classId:l}=t,{id:a}=t,{item:d}=t,{record:u}=t,{value:m}=t,{noForm:f=!1}=t,{disabled:p}=t,{formnovalidate:h}=t,{numberInput:$}=t,{praefix:g}=t,{toDelete:v}=t,{reqQuantity:y}=t,{notifyList:w}=t;const{properties:b={}}=d;let{placeholder:x,hint:k,readonly:I,required:_=!1,lookup:S="",view:C=!1,multi:E,max:N=1e3,generate:L=!1,status:q=!0,refDoc:j}=b;const[D,F]=S.split(":");let T=!1,z=m.map&&m.map((e=>({name:e})))||[];p||=I,p&&(x="");const A=({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),i(7,z=t.map((e=>({name:e.trim()})))),o("blur",{value:z.map((e=>e.name))}),o("multi",{view:E.view,lookup:S,name:d.name,value:z.map((e=>e.name))})};H((async()=>{const e=document.getElementById(a);e.classList.add(l),!I&&S&&e.addEventListener("focus",V)}));const V=()=>{if(S){document.getElementById(a).blur();const e=y||N;(E.unique||z.length<e)&&i(10,T=!0)}},M=()=>{i(10,T&&=!1)},B=({detail:e})=>{i(7,z=e.list.map((e=>({name:e})))),o("blur",{value:e.list}),o("multi",{view:E.view,lookup:S,name:d.name,value:e.list}),M()},O=async()=>{const e={[F]:u[F]},t=await n.getSectionView(D,e),i=Array.from({length:t.length},((e,n)=>t[n][d.name]));B({detail:{name:d.name,list:i}})},P=(e=!1)=>{if(p||!E.required)return;const t=E.maxItem;if(!t||E.unique)return;i(9,N=!1!==e?e:y||u[t]||0);const n=z?.length!=N,r=document.getElementById(a);r?.classList?.toggle("invalid",n),o("invalid",{idx:g,value:n})};return e.$$set=e=>{"classId"in e&&i(2,l=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,h=e.formnovalidate),"numberInput"in e&&i(30,$=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,w=e.notifyList)},e.$$.update=()=>{48&e.$$.dirty[0]&&u&&""===u[d.name]&&i(7,z=[]),48&e.$$.dirty[0]&&u&&Array.isArray(u[d.name])&&i(7,z=u[d.name].map((e=>({name:e})))),16&e.$$.dirty[0]|2&e.$$.dirty[1]&&v&&v===d.name&&i(7,z=[]),128&e.$$.dirty[0]&&z&&(i(0,m=z.map&&z.map((e=>e.name))||[]),P()),1073741824&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:i}=e;void 0!==g&&g!==i||t&&t.name===E.maxItem&&P(n)})($),536870976&e.$$.dirty[0]&&i(6,_=_&&!h),8&e.$$.dirty[1]&&(async e=>{if(void 0===g)return;const{itemName:t,value:r}=e||{};if(!r)return;if(d.refItem?.split(".")[0]!==t)return;let[s,l]=d.refItem.split(".");if(Array.isArray(r)){if(s=s.slice(0,-1),!r.length)return o("record",{itemName:"quantity",value:0}),void i(7,z=[]);const e={_id:{$in:r}},t=await n.getSectionView(s,e);let a=[];for(const e of t)e[l]&&(a=a.concat(e[l][0][d.name]));if(!a.length)return;o("record",{itemName:"quantity",value:a.length}),i(7,z=a.map((e=>({name:e})))),A({detail:{value:z}})}else{const e=await n.getTask(s,r);if(!e||!e[l])return;const t=e[l];if(!Array.isArray(t)&&!t.length)return;const a=t[g][d.name];o("record",{itemName:"quantity",value:a?.length||0}),i(7,z=a&&a.map((e=>({name:e}))))}setTimeout(P,250)})(w)},[m,p,l,a,d,u,_,z,x,N,T,r,s,I,S,C,E,L,q,j,D,F,A,M,B,()=>{const e=u[L.itemQuantity]||y;if(!e)return;const t=L.prefix||"",n=u[L.variable]||"",i=L.len||5,o=Array.from({length:e},((e,o)=>t+n+"-"+o.toString().padStart(i,"0")));B({detail:{name:d.name,list:o}})},async()=>{if(!0===C)return O();const e=y||u[E.maxItem];if(!e)return;let t={};F&&(t={[F]:u[F]}),q&&(t.status=!0);const i=[].concat(u[E.view]||[]);i.length&&(t[E.view]={$in:i});const o=await n.getSectionView(D,t),r=Array.from({length:e<o.length?e:o.length},((e,t)=>o[t][d.name]));B({detail:{name:d.name,list:r}})},()=>{B({detail:{name:d.name,list:[]}})},f,h,$,g,v,y,w,function(e){z=e,i(7,z),i(5,u),i(4,d),i(32,v)},function(e){N=e,i(9,N)},function(e){T=e,i(10,T)}]}class Ro extends _e{constructor(e){var t;super(),jo.getElementById("svelte-1rbaejz-style")||((t=L("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}",S(jo.head,t)),Ie(this,e,Wo,Oo,k,{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:Uo}=ve;function Ho(e){e[26]=e[28].list,e[27]=e[28].items}function Go(e,t,n){const i=e.slice();return i[29]=t[n],i}function Qo(e,t,n){const i=e.slice();return i[32]=t[n],i}function Yo(e,t,n){const i=e.slice();return i[32]=t[n],i}function Jo(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ko(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v;function y(t){e[23](t)}Ho(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Zo]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),K.push((()=>we(s,"value",y))),s.$on("input",e[12]),d=new We({props:{size:"18"}});let b=e[27]?.length&&function(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=Xo(Yo(e,i,t));return{c(){t=L("thead"),n=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();V(n,"class","svelte-14hcfjl"),V(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(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 s=Yo(e,i,r);o[r]?o[r].p(s,t):(o[r]=Xo(s),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&&E(t),N(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]=nr(Go(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 s=Go(e,n,r);i[r]?i[r].p(s,o):(i[r]=nr(s),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){N(i,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),o=L("div"),r=j("Suchen: "),be(s.$$.fragment),a=D(),c=L("span"),be(d.$$.fragment),u=D(),m=L("div"),f=L("table"),b&&b.c(),p=D(),h=L("tbody"),x&&x.c(),V(t,"class","form--buttons svelte-14hcfjl"),V(c,"class","feather pointer svelte-14hcfjl"),O(o,"margin-bottom","1em"),O(o,"position","relative"),V(f,"striped",""),V(f,"class","svelte-14hcfjl"),V(m,"class","eList svelte-14hcfjl")},m(l,y){C(l,t,y),xe(n,t,null),C(l,i,y),C(l,o,y),S(o,r),xe(s,o,null),S(o,a),S(o,c),xe(d,c,null),C(l,u,y),C(l,m,y),S(m,f),b&&b.m(f,null),S(f,p),S(f,h),x&&x.m(h,null),$=!0,g||(v=T(c,"click",e[14]),g=!0)},p(e,t){Ho(e);const i={};64&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!l&&2&t[0]&&(l=!0,o.value=e[1],re((()=>l=!1))),s.$set(o),e[27]?.length&&b.p(e,t),e[26]?.length&&x.p(e,t)},i(e){$||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),$=!0)},o(e){he(n.$$.fragment,e),he(s.$$.fragment,e),he(d.$$.fragment,e),$=!1},d(e){e&&E(t),ke(n),e&&E(i),e&&E(o),ke(s),ke(d),e&&E(u),e&&E(m),b&&b.d(),x&&x.d(),g=!1,v()}}}function Zo(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Xo(e){let t,n,i=e[32]?.designation+"";return{c(){t=L("th"),n=j(i),V(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function er(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=tr(Qo(e,i,t));return{c(){t=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();n=D(),V(t,"class","pointer svelte-14hcfjl"),P(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);S(t,n)},p(e,r){if(3584&r[0]){let s;for(i=e[27],s=0;s<i.length;s+=1){const l=Qo(e,i,s);o[s]?o[s].p(l,r):(o[s]=tr(l),o[s].c(),o[s].m(t,n))}for(;s<o.length;s+=1)o[s].d(1);o.length=i.length}2049&r[0]&&P(t,"active",e[29]._id===e[0])},d(e){e&&E(t),N(o,e)}}}function tr(e){let t,n,i,o,r=e[9](e[29],e[32])+"";return{c(){t=L("td"),n=j(r),V(t,"class","svelte-14hcfjl")},m(r,s){C(r,t,s),S(t,n),i||(o=T(t,"click",A(e[10](e[29]))),i=!0)},p(t,n){e=t},d(e){e&&E(t),i=!1,o()}}}function nr(e){let t,n=e[13](e[29],e[27],e[1]),i=n&&er(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=er(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&E(t)}}}function ir(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function or(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:ir,then:Ko,catch:Jo,value:28,blocks:[,,,]};return $e(e[11](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function rr(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[or]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function sr(e,t,o){const r=Q(),{Dialog:s,Divider:l,Loading:a,TextField:d,Button:u}=c;let{item:m}=t,{className:p}=t,{classId:$}=t,{rowId:g}=t,{viewName:v}=t,{viewValue:y}=t,{recordId:w}=t,{filter:b}=t,x="",k=$+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?h(n):f(e[`_${t.name}`]||e[t.name]||"")},_=n.getSchemaByClass(p);H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),i.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&Pa(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,$=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,w=e.recordId),"filter"in e&&o(21,b=e.filter)},[g,x,r,s,l,a,d,u,k,I,e=>()=>r("choose",{row:e}),async()=>{const e=await _,t="."+$+"#"+v;document.querySelector(t);let i={[v]:y},o=[];i[v]&&(o=await n.getSectionView(e.class,i,!0)),b&&(o=o.filter((e=>e._id!=b)));const r=e.display;return{list:o,items:Dt(r,e,o)}},({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,$,v,y,w,b,()=>r("back"),function(e){x=e,o(1,x)}]}class lr extends _e{constructor(e){var t;super(),Uo.getElementById("svelte-14hcfjl-style")||((t=L("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}",S(Uo.head,t)),Ie(this,e,sr,rr,k,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function ar(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function cr(e){let t,n,i,o,r;function s(t){e[21](t)}let l={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]&&(l.value=e[0]),n=new e[10]({props:l}),K.push((()=>we(n,"value",s)));let a=!e[6]&&dr(e);return{c(){t=L("div"),be(n.$$.fragment),o=D(),a&&a.c(),O(t,"position","relative")},m(e,i){C(e,t,i),xe(n,t,null),S(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],re((()=>i=!1))),n.$set(r),e[6]?a&&(me(),he(a,1,1,(()=>{a=null})),fe()):a?(a.p(e,o),64&o&&pe(a,1)):(a=dr(e),a.c(),pe(a,1),a.m(t,null))},i(e){r||(pe(n.$$.fragment,e),pe(a),r=!0)},o(e){he(n.$$.fragment,e),he(a),r=!1},d(e){e&&E(t),ke(n),a&&a.d()}}}function dr(e){let t,n,i,o,r;return n=new ft({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-wbrqzu")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[17]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function ur(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function mr(e){let t,n,i;function o(t){e[22](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[fr]},$$scope:{ctx:e}};return void 0!==e[8]&&(r.open=e[8]),t=new e[11]({props:r}),K.push((()=>we(t,"open",o))),{c(){be(t.$$.fragment)},m(e,n){xe(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],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function fr(e){let t,n;return t=new lr({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(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function pr(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ur,then:cr,catch:ar,value:27,blocks:[,,,]};$e(e[16](),o);let r=e[8]&&mr(e);return{c(){o.block.c(),t=D(),r&&r.c(),n=F()},m(e,s){o.block.m(e,o.anchor=s),o.mount=()=>t.parentNode,o.anchor=t,C(e,t,s),r&&r.m(e,s),C(e,n,s),i=!0},p(t,[i]){ge(o,e=t,i),e[8]?r?(r.p(e,i),256&i&&pe(r,1)):(r=mr(e),r.c(),pe(r,1),r.m(n.parentNode,n)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){i||(pe(o.block),pe(r),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}he(r),i=!1},d(e){o.block.d(e),o.token=null,o=null,e&&E(t),r&&r.d(e),e&&E(n)}}}function hr(e,t,n){const{TextField:i,Modal:o}=c;let{classId:r}=t,{id:s}=t,{item:l}=t,{record:a}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:m}=t,{formnovalidate:f}=t,{praefix:p}=t;const{properties:h={}}=l;let $,{pattern:g,placeholder:v,readonly:y,required:w=!1,view:b}=h,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,s=e.id),"item"in e&&n(3,l=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,s,l,a,u,m,f,x,$,i,o,g,y,w,b,async()=>(n(9,$=a[b.selection]),!0),()=>{n(8,x=!0)},({detail:e})=>{n(0,d=e.row[b.value?b.value:"_id"]),k()},k,p,function(e){d=e,n(0,d)},function(e){x=e,n(8,x)}]}class $r extends _e{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=L("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",S(document.head,t)),Ie(this,e,hr,pr,k,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function gr(e,t,n){const i=e.slice();return i[12]=t[n][0],i[13]=t[n][1],i}function vr(e){let t;return{c(){t=L("option"),t.textContent="- ",t.selected=!0,t.__value="",t.value=t.__value},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function yr(e){let t;return{c(){t=L("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&&E(t)}}}function wr(e){let t,n,i,o,r=e[12]+"";return{c(){t=L("option"),n=j(r),t.__value=i=e[13],t.value=t.__value,t.selected=o=e[0]==e[13]},m(e,i){C(e,t,i),S(t,n)},p(e,s){64&s&&r!==(r=e[12]+"")&&M(n,r),64&s&&i!==(i=e[13])&&(t.__value=i,t.value=t.__value),65&s&&o!==(o=e[0]==e[13])&&(t.selected=o)},d(e){e&&E(t)}}}function br(e){let t,n,i,o,r,s=!e[7]&&function(e){let t;function n(e,t){return e[5]&&!0!==e[8]?yr:vr}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&&E(t)}}}(e),l=e[6],a=[];for(let t=0;t<l.length;t+=1)a[t]=wr(gr(e,l,t));return{c(){t=L("select"),s&&s.c(),n=F();for(let e=0;e<a.length;e+=1)a[e].c();V(t,"class",i=_(e[3]||e[4])+" svelte-5xpzvo"),V(t,"id",e[2]),V(t,"name",e[2]),t.disabled=e[1],t.required=e[5]},m(i,l){C(i,t,l),s&&s.m(t,null),S(t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null);o||(r=T(t,"change",e[9]),o=!0)},p(e,[n]){if(e[7]||s.p(e,n),65&n){let i;for(l=e[6],i=0;i<l.length;i+=1){const o=gr(e,l,i);a[i]?a[i].p(o,n):(a[i]=wr(o),a[i].c(),a[i].m(t,null))}for(;i<a.length;i+=1)a[i].d(1);a.length=l.length}24&n&&i!==(i=_(e[3]||e[4])+" svelte-5xpzvo")&&V(t,"class",i),4&n&&V(t,"id",e[2]),4&n&&V(t,"name",e[2]),2&n&&(t.disabled=e[1]),32&n&&(t.required=e[5])},i:v,o:v,d(e){e&&E(t),s&&s.d(),N(a,e),o=!1,r()}}}function xr(e,t,n){const i=Q();let{id:o}=t,{item:r}=t,{value:s}=t,{noForm:l=!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&&(s||=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,s=e.value),"noForm"in e&&n(3,l=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)},[s,c,o,l,a,d,u,m,f,e=>i("blur",{value:e.srcElement.value}),r]}class kr extends _e{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=L("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}",S(document.head,t)),Ie(this,e,xr,br,k,{id:2,item:10,value:0,noForm:3,classId:4,disabled:1,required:5})}}function Ir(e){let t;return{c(){t=j("Stunden")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function _r(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Ir]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Sr(e){let t;return{c(){t=j("Minuten")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Cr(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Sr]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Er(e){let t;return{c(){t=j("Jetzt")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Nr(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[Er]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Lr(e){let t,n,i,o,r,s,l,a,c;return o=new e[5]({props:{value:e[0],closeOnSelection:!0}}),o.$on("change",e[8]),s=new e[6]({props:{value:e[0],$$slots:{"now-label":[Nr],"minutes-label":[Cr],"hours-label":[_r]},$$scope:{ctx:e}}}),s.$on("change",e[7]),{c(){t=L("input"),i=D(),be(o.$$.fragment),r=D(),be(s.$$.fragment),V(t,"type","string"),V(t,"class",n=e[2]||e[3]),V(t,"id",e[1]),V(t,"name",e[1]),t.hidden=!0},m(n,d){C(n,t,d),B(t,e[0]),C(n,i,d),xe(o,n,d),C(n,r,d),xe(s,n,d),l=!0,a||(c=T(t,"input",e[9]),a=!0)},p(e,[i]){(!l||12&i&&n!==(n=e[2]||e[3]))&&V(t,"class",n),(!l||2&i)&&V(t,"id",e[1]),(!l||2&i)&&V(t,"name",e[1]),1&i&&B(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}),s.$set(a)},i(e){l||(pe(o.$$.fragment,e),pe(s.$$.fragment,e),l=!0)},o(e){he(o.$$.fragment,e),he(s.$$.fragment,e),l=!1},d(e){e&&E(t),e&&E(i),ke(o,e),e&&E(r),ke(s,e),a=!1,c()}}}function qr(e,t,n){const i=Q(),{Label:o,DatePicker:r,TimePicker:s}=c;let{value:l}=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,l=e.value),"id"in e&&n(1,a=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[l,a,d,u,o,r,s,({detail:e})=>{var t,i;n(0,(t=e.value,i=l,l=null==t||null==i?t:(i.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),i))),m(l)},({detail:e})=>{n(0,l=Jn(e.value,l)),m(l)},function(){l=this.value,n(0,l)}]}class jr extends _e{constructor(e){super(),Ie(this,e,qr,Lr,k,{value:0,id:1,noForm:2,classId:3})}}function Dr(e){let t,n,i,o,r,s,l,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=L("input"),r=D(),s=L("input"),d=D(),be(u.$$.fragment),m=j(" /\n"),be(f.$$.fragment),V(t,"type","string"),V(t,"class",n=e[1]||e[2]),V(t,"id",i=e[0]+"_from"),V(t,"name",o=e[0]+"_from"),t.hidden=!0,V(s,"type","string"),V(s,"class",l=e[1]||e[2]),V(s,"id",a=e[0]+"_to"),V(s,"name",c=e[0]+"_to"),s.hidden=!0},m(n,i){C(n,t,i),B(t,e[7]),C(n,r,i),C(n,s,i),B(s,e[8]),C(n,d,i),xe(u,n,i),C(n,m,i),xe(f,n,i),p=!0,h||($=[T(t,"input",e[13]),T(s,"input",e[14])],h=!0)},p(e,[r]){(!p||6&r&&n!==(n=e[1]||e[2]))&&V(t,"class",n),(!p||1&r&&i!==(i=e[0]+"_from"))&&V(t,"id",i),(!p||1&r&&o!==(o=e[0]+"_from"))&&V(t,"name",o),128&r&&B(t,e[7]),(!p||6&r&&l!==(l=e[1]||e[2]))&&V(s,"class",l),(!p||1&r&&a!==(a=e[0]+"_to"))&&V(s,"id",a),(!p||1&r&&c!==(c=e[0]+"_to"))&&V(s,"name",c),256&r&&B(s,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||(pe(u.$$.fragment,e),pe(f.$$.fragment,e),p=!0)},o(e){he(u.$$.fragment,e),he(f.$$.fragment,e),p=!1},d(e){e&&E(t),e&&E(r),e&&E(s),e&&E(d),ke(u,e),e&&E(m),ke(f,e),h=!1,b($)}}}function Fr(e,t,n){const i=Q(),{DatePicker:o}=c;let{value:r}=t,{id:s}=t,{noForm:l=!1}=t,{classId:a}=t,{required:d}=t,{disabled:u}=t,m="%d.%m.%Y",f="%d.%m.%Y",p=r?.from,h=r?.to;"Invalid Date"===p?.toString()&&(p=void 0),"Invalid Date"===h?.toString()&&(h=void 0),u&&(void 0===p&&(m=""),void 0===h&&(f=""));return e.$$set=e=>{"value"in e&&n(12,r=e.value),"id"in e&&n(0,s=e.id),"noForm"in e&&n(1,l=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)},[s,l,a,d,u,m,f,p,h,o,({detail:e})=>{n(7,p=Jn(e.value,p)),h&&p&&h.valueOf()-p.valueOf()<0&&n(7,p=void 0),i("change",{value:p,range:"_from"})},({detail:e})=>{n(8,h=Jn(e.value,h)),h&&p&&h.valueOf()-p.valueOf()<0&&n(8,h=void 0),i("change",{value:h,range:"_to"})},r,function(){p=this.value,n(7,p)},function(){h=this.value,n(8,h)}]}class Tr extends _e{constructor(e){var t;super(),document.getElementById("svelte-7itxk4-style")||((t=L("style")).id="svelte-7itxk4-style",t.textContent="div.date-picker.moveLeft div.dropdown.calendar{left:-3em !important}",S(document.head,t)),Ie(this,e,Fr,Dr,k,{value:12,id:0,noForm:1,classId:2,required:3,disabled:4})}}function zr(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:Ar,placeholder:Vr,readonly:e[3],disabled:e[4]}}),n.$on("change",e[6]),{c(){t=L("div"),be(n.$$.fragment),O(t,"max-width","4em")},m(e,o){C(e,t,o),xe(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||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}const Ar="([01][0-9]|2[0-3]):([0-5][0-9])",Vr="";function Mr(e,t,n){const i=Q(),{TextField:o}=c;let{id:r}=t,{item:s}=t,{value:l}=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,s=e.item),"value"in e&&n(1,l=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,l,a,d,u,o,({detail:e})=>{i("blur",{value:f(e.value)}),i("checkRange",{idx:m,fieldId:r,value:e.value})},s,m]}class Br extends _e{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=L("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",S(document.head,t)),Ie(this,e,Mr,zr,k,{id:0,item:7,value:1,inputClass:2,readonly:3,disabled:4,praefix:8})}}const{document:Or}=ve;function Pr(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 Rr(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ur(e){let t,n,i=e[14],o=[];for(let t=0;t<i.length;t+=1)o[t]=Gr(Pr(e,i,t));const r=e=>he(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 s;for(i=e[14],s=0;s<i.length;s+=1){const r=Pr(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=Gr(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function Hr(e){let t,n,i=(e[0]["_"+e[17]]||e[0][e[17]]||"(ja)")+"",o=e[19]&&function(){let e;return{c(){e=j(", ")},m(t,n){C(t,e,n)},d(t){t&&E(e)}}}();return{c(){t=L("span"),o&&o.c(),n=j(i),V(t,"class","lookupValue")},m(e,i){C(e,t,i),o&&o.m(t,null),S(t,n)},p(e,t){2&t&&i!==(i=(e[0]["_"+e[17]]||e[0][e[17]]||"(ja)")+"")&&M(n,i)},d(e){e&&E(t),o&&o.d()}}}function Gr(e){let t,n,i,o,r,s,l,a,c=e[1],d=[];for(let t=0;t<c.length;t+=1)d[t]=Hr(Wr(e,c,t));return o=new He({props:{size:"18"}}),{c(){t=L("div");for(let e=0;e<d.length;e+=1)d[e].c();n=D(),i=L("span"),be(o.$$.fragment),r=D(),V(i,"class","feather pointer svelte-1u646ni"),V(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);S(t,n),S(t,i),xe(o,i,null),S(t,r),s=!0,l||(a=T(i,"click",e[3](e[0]._id)),l=!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]=Hr(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){s||(pe(o.$$.fragment,e),s=!0)},o(e){he(o.$$.fragment,e),s=!1},d(e){e&&E(t),N(d,e),ke(o),l=!1,a()}}}function Qr(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Yr(e){let t,n,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Qr,then:Ur,catch:Rr,value:14,blocks:[,,,]};return $e(e[2](),i),{c(){t=L("div"),i.block.c(),V(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]){ge(i,e=t,n)},i(e){n||(pe(i.block),n=!0)},o(e){for(let e=0;e<3;e+=1){he(i.blocks[e])}n=!1},d(e){e&&E(t),i.block.d(),i.token=null,i=null}}}function Jr(e,t,i){let{id:o}=t,{item:r}=t,{praefix:s}=t,{record:l}=t;const{refItem:a,view:c}=r.properties;let d=c.split(","),[u,m]=a.split(":");const[f,p]=m.split("."),h=()=>{ie().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,s=e.praefix),"record"in e&&i(6,l=e.record)},[r,d,async()=>{let e=[];if(l._id){const t=!d.some((e=>e.includes(":")));p&&(u=p+"."+u);const o={[u]:l[u]||l._id};if(e=await n.getSectionView(f,o,t),!t){const t=d.find((e=>e.includes(":"))).split(":")[0];e=e.map((e=>{const n=e[t].find((e=>e[t]===l._id));return n._id=e._id,n})),i(1,d=d.map((e=>e.split(":")[1])))}}return e.length||h(),e},e=>async()=>{const t=await n.getTaskByDocId(e);if(!t)return;const i=t._id,o=`/task/${t.event}/${i}/task?view=standalone`;window.open(o)},o,s,l]}class Kr extends _e{constructor(e){var t;super(),Or.getElementById("svelte-1u646ni-style")||((t=L("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}",S(Or.head,t)),Ie(this,e,Jr,Yr,k,{id:4,item:0,praefix:5,record:6})}}function Zr(e){let t,n,i;return n=new ot({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function Xr(e){let t,n,i,o,r;return n=new ot({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[9]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function es(e){let t,n,i,o,r,s;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 l=[Xr,Zr],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};1&i&&(s.inputClass=e[0]),2&i&&(s.disabled=e[1]),4&i&&(s.formnovalidate=e[2]),8&i&&(s.readonly=e[3]),16&i&&(s.required=e[4]),32&i&&(s.id=e[5]),64&i&&(s.name=e[6]),128&i&&(s.value=e[7]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}const ts=e("getMapLink",(async e=>{const{street:t,houseNo:i,postcode:o,location:r,country:s}=e,l=[t&&i?t+" "+i:t,o&&r?o+" "+r:o||r||"",s&&(await n.getTask("country",s)).designation].filter((e=>!!e)).join(", ");return"https://bing.com/maps/default.aspx?where1="+encodeURIComponent(l)}));function ns(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t,{record:f}=t,{item: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,s=e.formnovalidate),"readonly"in e&&n(3,l=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),"record"in e&&n(10,f=e.record),"item"in e&&n(11,p=e.item)},[o,r,s,l,a,d,u,m,i,async()=>{if(!m)return;const e=u.includes(".")?f[u.split(".")[0]]:f,t=await ts(e);window.open(t,"_blank")},f,p,function(t){Y(e,t)}]}class is extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,ns,es,k,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,record:10,item:11})}}function os(e){let t,n,i;return n=new Ye({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function rs(e){let t,n,i,o,r;return n=new Ye({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[9]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function ss(e){let t,n,i,o,r,s;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 l=[rs,os],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};1&i&&(s.inputClass=e[0]),2&i&&(s.disabled=e[1]),4&i&&(s.formnovalidate=e[2]),8&i&&(s.readonly=e[3]),16&i&&(s.required=e[4]),32&i&&(s.id=e[5]),64&i&&(s.name=e[6]),128&i&&(s.value=e[7]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function ls(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=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,s=e.formnovalidate),"readonly"in e&&n(3,l=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,s,l,a,d,u,m,i,async()=>{if(!m)return;let e=m;e.includes("//")||(e="//"+e),window.open(e,"_blank")},function(t){Y(e,t)}]}class as extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,ls,ss,k,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7})}}function cs(e){let t,n,i;return n=new lt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function ds(e){let t,n,i,o,r;return n=new lt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[11]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function us(e){let t,n,i,o,r,s;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 l=[ds,cs],a=[];function c(e,t){return e[9]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};4&i&&(s.inputClass=e[2]),1&i&&(s.pattern=e[0]),2&i&&(s.placeholder=e[1]),8&i&&(s.disabled=e[3]),16&i&&(s.formnovalidate=e[4]),32&i&&(s.readonly=e[5]),64&i&&(s.required=e[6]),128&i&&(s.id=e[7]),256&i&&(s.name=e[8]),512&i&&(s.value=e[9]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function ms(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=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,s=e.formnovalidate),"readonly"in e&&n(5,l=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,s,l,a,d,u,m,i,async()=>{if(!m)return;let e="tel:"+m;window.open(e,"_self")},function(t){Y(e,t)}]}class fs extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,ms,us,k,{inputClass:2,disabled:3,formnovalidate:4,readonly:5,required:6,id:7,name:8,value:9,pattern:0,placeholder:1})}}function ps(e){let t,n,i;return n=new tt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function hs(e){let t,n,i,o,r;return n=new tt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[11]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function $s(e){let t,n,i,o,r,s;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 l=[hs,ps],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};1&i&&(s.inputClass=e[0]),256&i&&(s.pattern=e[8]),512&i&&(s.placeholder=e[9]),2&i&&(s.disabled=e[1]),4&i&&(s.formnovalidate=e[2]),8&i&&(s.readonly=e[3]),16&i&&(s.required=e[4]),32&i&&(s.id=e[5]),64&i&&(s.name=e[6]),128&i&&(s.value=e[7]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function gs(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=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,s=e.formnovalidate),"readonly"in e&&n(3,l=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,s,l,a,d,u,m,f,p,i,async()=>{if(!m)return;let e="mailto:"+m;window.open(e,"_self")},function(t){Y(e,t)}]}class vs extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,gs,$s,k,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,pattern:8,placeholder:9})}}const ys=["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 ws(e){let t;return{c(){t=L("textarea"),V(t,"id",e[0]),O(t,"visibility","hidden")},m(n,i){C(n,t,i),e[18](t)},p(e,n){1&n&&V(t,"id",e[0])},d(n){n&&E(t),e[18](null)}}}function bs(e){let t;return{c(){t=L("div"),V(t,"id",e[0])},m(n,i){C(n,t,i),e[17](t)},p(e,n){1&n&&V(t,"id",e[0])},d(n){n&&E(t),e[17](null)}}}function xs(e){let t;function n(e,t){return e[1]?bs:ws}let i=n(e),o=i(e);return{c(){t=L("div"),o.c(),V(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&&V(t,"class",e[2])},i:v,o:v,d(n){n&&E(t),o.d(),e[19](null)}}}const ks=e=>e+"_"+Math.floor(1e9*Math.random())+String(Date.now());let Is=(()=>{let e={listeners:[],scriptId:ks("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 _s(e,t,n){var i;let o,r,s,{id:l=ks("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:h=""}=t,{text:$=""}=t,{cssClass:g="tinymce-wrapper"}=t,v=h,y=c;const w=Q(),b=()=>{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,s=e),e.on("init",(()=>{e.setContent(h),e.on(p,(()=>{n(15,v=e.getContent()),v!==h&&(n(5,h=v),n(6,$=e.getContent({format:"text"})))}))})),((e,t)=>{ys.forEach((n=>{e.on(n,(i=>{t(n.toLowerCase(),{eventName:n,event:i,editor:e})}))}))})(e,w),"function"==typeof f.setup&&f.setup(e)}});n(4,r.style.visibility="",r),b().init(e)};return H((()=>{if(null!==b())x();else{const e=m||`https://cdn.tiny.cloud/1/${d}/tinymce/${u}/tinymce.min.js`;Is.load(o.ownerDocument,e,(()=>{x()}))}})),G((()=>{var e;s&&(null===(e=b())||void 0===e||e.remove(s))})),e.$$set=e=>{"id"in e&&n(0,l=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,h=e.value),"text"in e&&n(6,$=e.text),"cssClass"in e&&n(2,g=e.cssClass)},e.$$.update=()=>{123040&e.$$.dirty&&(s&&v!==h&&(s.setContent(h),n(6,$=s.getContent({format:"text"}))),s&&c!==y&&(n(16,y=c),"function"==typeof(null===n(13,i=s.mode)||void 0===i?void 0:i.set)?s.mode.set(c?"readonly":"design"):s.setMode(c?"readonly":"design")))},[l,a,g,o,r,h,$,c,d,u,m,f,p,i,s,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 Ss extends _e{constructor(e){super(),Ie(this,e,_s,xs,k,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function Cs(e){let t,n,i,o,r,s,l;function a(t){e[7](t)}let c={scriptSrc:"/tinymce/tinymce.min.js",conf:e[6],disabled:e[4],readonly:e[5]};return void 0!==e[0]&&(c.value=e[0]),n=new Ss({props:c}),K.push((()=>we(n,"value",a))),{c(){t=L("div"),be(n.$$.fragment),o=D(),r=L("input"),V(r,"class",s=e[1]||e[2]),V(r,"id",e[3]),V(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),xe(n,t,null),S(t,o),S(t,r),l=!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],re((()=>i=!1))),n.$set(o),(!l||6&t&&s!==(s=e[1]||e[2]))&&V(r,"class",s),(!l||8&t)&&V(r,"id",e[3]),(!l||8&t)&&V(r,"name",e[3]),(!l||1&t&&r.value!==e[0])&&(r.value=e[0])},i(e){l||(pe(n.$$.fragment,e),l=!0)},o(e){he(n.$$.fragment,e),l=!1},d(e){e&&E(t),ke(n)}}}function Es(e,n,i){let o=JSON.parse(t.getItem("Locale")).id;o=o.startsWith("fr")?"fr_FR":o.split("-")[0];let{value:r}=n,{noForm:s}=n,{classId:l}=n,{id:a}=n,{disabled:c}=n,{readonly:d}=n;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:o};return e.$$set=e=>{"value"in e&&i(0,r=e.value),"noForm"in e&&i(1,s=e.noForm),"classId"in e&&i(2,l=e.classId),"id"in e&&i(3,a=e.id),"disabled"in e&&i(4,c=e.disabled),"readonly"in e&&i(5,d=e.readonly)},[r,s,l,a,c,d,u,function(e){r=e,i(0,r)}]}class Ns extends _e{constructor(e){var t;super(),document.getElementById("svelte-zemw0w-style")||((t=L("style")).id="svelte-zemw0w-style",t.textContent="div.tox-statusbar__text-container{display:none !important}div.tox.tox-tinymce{border:1px #808080 solid}.tox-edit-area__iframe{background-color:#f9f3f6 !important}",S(document.head,t)),Ie(this,e,Es,Cs,k,{value:0,noForm:1,classId:2,id:3,disabled:4,readonly:5})}}
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,s,l,a,c,d,u,m;return{setters:[function(e){t=e.Storage,n=e.Request,i=e.task_notification,o=e.currentRoles,r=e.TextArea,s=e.toasts,l=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.669");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}},h=e=>e?"(ja)":"(nein)",$=(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]?h(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]&&h(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")},g=(e,t)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)??""}catch{return""}};function v(){}function y(e){return e()}function w(){return Object.create(null)}function b(e){e.forEach(y)}function x(e){return"function"==typeof e}function k(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function I(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return v;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function _(e){return null==e?"":e}function S(e,t){e.appendChild(t)}function C(e,t,n){e.insertBefore(t,n||null)}function E(e){e.parentNode.removeChild(e)}function N(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function L(e){return document.createElement(e)}function q(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function j(e){return document.createTextNode(e)}function D(){return j(" ")}function F(){return j("")}function T(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 A(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function V(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function M(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function B(e,t){e.value=null==t?"":t}function O(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function P(e,t,n){e.classList[n?"add":"remove"](t)}let W;function R(e){W=e}function U(){if(!W)throw new Error("Function called outside component initialization");return W}function H(e){U().$$.on_mount.push(e)}function G(e){U().$$.on_destroy.push(e)}function Q(){const e=U();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 Y(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const J=[],K=[],Z=[],X=[],ee=Promise.resolve();let te=!1;function ne(){te||(te=!0,ee.then(ae))}function ie(){return ne(),ee}function oe(e){Z.push(e)}function re(e){X.push(e)}let se=!1;const le=new Set;function ae(){if(!se){se=!0;do{for(let e=0;e<J.length;e+=1){const t=J[e];R(t),ce(t.$$)}for(R(null),J.length=0;K.length;)K.pop()();for(let e=0;e<Z.length;e+=1){const t=Z[e];le.has(t)||(le.add(t),t())}Z.length=0}while(J.length);for(;X.length;)X.pop()();te=!1,se=!1,le.clear()}}function ce(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(oe)}}const de=new Set;let ue;function me(){ue={r:0,c:[],p:ue}}function fe(){ue.r||b(ue.c),ue=ue.p}function pe(e,t){e&&e.i&&(de.delete(e),e.i(t))}function he(e,t,n,i){if(e&&e.o){if(de.has(e))return;de.add(e),ue&&ue.c.push((()=>{de.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 s=t.ctx;void 0!==o&&(s=s.slice(),s[o]=r);const l=e&&(t.current=e)(s);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==i&&e&&(me(),he(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),fe())})):t.block.d(1),l.c(),pe(l,1),l.m(t.mount(),t.anchor),a=!0),t.block=l,t.blocks&&(t.blocks[i]=l),a&&ae()}if((o=e)&&"object"==typeof o&&"function"==typeof o.then){const n=U();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 ge(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 ve="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ye(e,t){he(e,1,1,(()=>{t.delete(e.key)}))}function we(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function be(e){e&&e.c()}function xe(e,t,n,i){const{fragment:o,on_mount:r,on_destroy:s,after_update:l}=e.$$;o&&o.m(t,n),i||oe((()=>{const t=r.map(y).filter(x);s?s.push(...t):b(t),e.$$.on_mount=[]})),l.forEach(oe)}function ke(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 Ie(e,t,n,i,o,r,s=[-1]){const l=W;R(e);const a=e.$$={fragment:null,ctx:null,props:r,update:v,not_equal:o,bound:w(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:w(),dirty:s,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]&&(J.push(e),ne(),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(E)}else a.fragment&&a.fragment.c();t.intro&&pe(e.$$.fragment),xe(e,t.target,t.anchor,t.customElement),ae()}R(l)}class _e{$destroy(){ke(this,1),this.$destroy=v}$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 Se(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("path"),i=q("line"),o=q("line"),V(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),V(i,"x1","12"),V(i,"y1","9"),V(i,"x2","12"),V(i,"y2","13"),V(o,"x1","12"),V(o,"y1","17"),V(o,"x2","12.01"),V(o,"y2","17"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-alert-triangle "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-alert-triangle "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Ce(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 Ee extends _e{constructor(e){super(),Ie(this,e,Ce,Se,k,{size:0,strokeWidth:1,class:2})}}function Ne(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("circle"),i=q("polyline"),o=q("line"),V(n,"cx","12"),V(n,"cy","12"),V(n,"r","10"),V(i,"points","8 12 12 16 16 12"),V(o,"x1","12"),V(o,"y1","8"),V(o,"x2","12"),V(o,"y2","16"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-arrow-down-circle "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-arrow-down-circle "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Le(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 _e{constructor(e){super(),Ie(this,e,Le,Ne,k,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,i,o;return{c(){t=q("svg"),n=q("path"),i=q("polyline"),V(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),V(i,"points","22 4 12 14.01 9 11.01"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-check-circle "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-check-circle "+e[2])&&V(t,"class",o)},i:v,o:v,d(e){e&&E(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 Fe extends _e{constructor(e){super(),Ie(this,e,De,je,k,{size:0,strokeWidth:1,class:2})}}function Te(e){let t,n,i;return{c(){t=q("svg"),n=q("path"),V(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"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",i="feather feather-command "+e[2])},m(e,i){C(e,t,i),S(t,n)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-command "+e[2])&&V(t,"class",i)},i:v,o:v,d(e){e&&E(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 Ae extends _e{constructor(e){super(),Ie(this,e,ze,Te,k,{size:0,strokeWidth:1,class:2})}}function Ve(e){let t,n,i,o;return{c(){t=q("svg"),n=q("polyline"),i=q("path"),V(n,"points","9 10 4 15 9 20"),V(i,"d","M20 4v7a4 4 0 0 1-4 4H4"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-corner-down-left "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-corner-down-left "+e[2])&&V(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function Me(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 _e{constructor(e){super(),Ie(this,e,Me,Ve,k,{size:0,strokeWidth:1,class:2})}}function Oe(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("path"),i=q("line"),o=q("line"),V(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),V(i,"x1","18"),V(i,"y1","9"),V(i,"x2","12"),V(i,"y2","15"),V(o,"x1","12"),V(o,"y1","9"),V(o,"x2","18"),V(o,"y2","15"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-delete "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-delete "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Pe(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 We extends _e{constructor(e){super(),Ie(this,e,Pe,Oe,k,{size:0,strokeWidth:1,class:2})}}function Re(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("path"),i=q("polyline"),o=q("line"),V(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),V(i,"points","15 3 21 3 21 9"),V(o,"x1","10"),V(o,"y1","14"),V(o,"x2","21"),V(o,"y2","3"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-external-link "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-external-link "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(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 He extends _e{constructor(e){super(),Ie(this,e,Ue,Re,k,{size:0,strokeWidth:1,class:2})}}function Ge(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("circle"),i=q("line"),o=q("path"),V(n,"cx","12"),V(n,"cy","12"),V(n,"r","10"),V(i,"x1","2"),V(i,"y1","12"),V(i,"x2","22"),V(i,"y2","12"),V(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"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-globe "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-globe "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(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 _e{constructor(e){super(),Ie(this,e,Qe,Ge,k,{size:0,strokeWidth:1,class:2})}}function Je(e){let t,n,i,o,r,s,l,a;return{c(){t=q("svg"),n=q("line"),i=q("line"),o=q("line"),r=q("line"),s=q("line"),l=q("line"),V(n,"x1","8"),V(n,"y1","6"),V(n,"x2","21"),V(n,"y2","6"),V(i,"x1","8"),V(i,"y1","12"),V(i,"x2","21"),V(i,"y2","12"),V(o,"x1","8"),V(o,"y1","18"),V(o,"x2","21"),V(o,"y2","18"),V(r,"x1","3"),V(r,"y1","6"),V(r,"x2","3.01"),V(r,"y2","6"),V(s,"x1","3"),V(s,"y1","12"),V(s,"x2","3.01"),V(s,"y2","12"),V(l,"x1","3"),V(l,"y1","18"),V(l,"x2","3.01"),V(l,"y2","18"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",a="feather feather-list "+e[2])},m(e,a){C(e,t,a),S(t,n),S(t,i),S(t,o),S(t,r),S(t,s),S(t,l)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&a!==(a="feather feather-list "+e[2])&&V(t,"class",a)},i:v,o:v,d(e){e&&E(t)}}}function Ke(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 _e{constructor(e){super(),Ie(this,e,Ke,Je,k,{size:0,strokeWidth:1,class:2})}}function Xe(e){let t,n,i,o;return{c(){t=q("svg"),n=q("path"),i=q("polyline"),V(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"),V(i,"points","22,6 12,13 2,6"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-mail "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-mail "+e[2])&&V(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function et(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 tt extends _e{constructor(e){super(),Ie(this,e,et,Xe,k,{size:0,strokeWidth:1,class:2})}}function nt(e){let t,n,i,o;return{c(){t=q("svg"),n=q("path"),i=q("circle"),V(n,"d","M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"),V(i,"cx","12"),V(i,"cy","10"),V(i,"r","3"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-map-pin "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-map-pin "+e[2])&&V(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function it(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 ot extends _e{constructor(e){super(),Ie(this,e,it,nt,k,{size:0,strokeWidth:1,class:2})}}function rt(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("polyline"),i=q("line"),o=q("path"),V(n,"points","23 7 23 1 17 1"),V(i,"x1","16"),V(i,"y1","8"),V(i,"x2","23"),V(i,"y2","1"),V(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"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-phone-outgoing "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-phone-outgoing "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function st(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 lt extends _e{constructor(e){super(),Ie(this,e,st,rt,k,{size:0,strokeWidth:1,class:2})}}function at(e){let t,n,i,o,r;return{c(){t=q("svg"),n=q("polyline"),i=q("path"),o=q("rect"),V(n,"points","6 9 6 2 18 2 18 9"),V(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"),V(o,"x","6"),V(o,"y","14"),V(o,"width","12"),V(o,"height","8"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",r="feather feather-printer "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-printer "+e[2])&&V(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function ct(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 dt extends _e{constructor(e){super(),Ie(this,e,ct,at,k,{size:0,strokeWidth:1,class:2})}}function ut(e){let t,n,i,o;return{c(){t=q("svg"),n=q("circle"),i=q("line"),V(n,"cx","11"),V(n,"cy","11"),V(n,"r","8"),V(i,"x1","21"),V(i,"y1","21"),V(i,"x2","16.65"),V(i,"y2","16.65"),V(t,"xmlns","http://www.w3.org/2000/svg"),V(t,"width",e[0]),V(t,"height",e[0]),V(t,"fill","none"),V(t,"viewBox","0 0 24 24"),V(t,"stroke","currentColor"),V(t,"stroke-width",e[1]),V(t,"stroke-linecap","round"),V(t,"stroke-linejoin","round"),V(t,"class",o="feather feather-search "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&V(t,"width",e[0]),1&n&&V(t,"height",e[0]),2&n&&V(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-search "+e[2])&&V(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function mt(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 ft extends _e{constructor(e){super(),Ie(this,e,mt,ut,k,{size:0,strokeWidth:1,class:2})}}const{document:pt}=ve;function ht(e){e[45]=e[46].items}function $t(e,t,n){const i=e.slice();return i[47]=t[n],i[49]=n,i}function gt(e,t,n){const i=e.slice();return i[50]=t[n],i}function vt(e,t,n){const i=e.slice();return i[50]=t[n],i}function yt(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function wt(e){let t,n,i,o,r,s;ht(e);let l=e[5]?.length&&bt(e),a=e[45]?.length&&kt(e),c=e[5]?.length&&St(e);return{c(){l&&l.c(),t=D(),n=L("div"),i=L("table"),a&&a.c(),o=D(),r=L("tbody"),c&&c.c(),V(i,"striped",""),V(i,"class","svelte-v0ogws"),V(n,"class","eList svelte-v0ogws")},m(e,d){l&&l.m(e,d),C(e,t,d),C(e,n,d),S(n,i),a&&a.m(i,null),S(i,o),S(i,r),c&&c.m(r,null),s=!0},p(e,n){ht(e),e[5]?.length?l?(l.p(e,n),32&n[0]&&pe(l,1)):(l=bt(e),l.c(),pe(l,1),l.m(t.parentNode,t)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),e[45]?.length?a?a.p(e,n):(a=kt(e),a.c(),a.m(i,o)):a&&(a.d(1),a=null),e[5]?.length?c?(c.p(e,n),32&n[0]&&pe(c,1)):(c=St(e),c.c(),pe(c,1),c.m(r,null)):c&&(me(),he(c,1,1,(()=>{c=null})),fe())},i(e){s||(pe(l),pe(c),s=!0)},o(e){he(l),he(c),s=!1},d(e){l&&l.d(e),e&&E(t),e&&E(n),a&&a.d(),c&&c.d()}}}function bt(e){let t,n,i,o,r,s,l,a,c,d,u,m=e[6]&&xt(e);function f(t){e[29](t)}let p={id:e[10]};return void 0!==e[3]&&(p.value=e[3]),o=new e[8]({props:p}),K.push((()=>we(o,"value",f))),o.$on("input",e[14]),a=new We({props:{size:"18"}}),{c(){m&&m.c(),t=D(),n=L("div"),i=j("Suchen: "),be(o.$$.fragment),s=D(),l=L("span"),be(a.$$.fragment),V(l,"class","feather pointer svelte-v0ogws"),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),S(n,i),xe(o,n,null),S(n,s),S(n,l),xe(a,l,null),c=!0,d||(u=T(l,"click",e[16]),d=!0)},p(e,n){e[6]?m?64&n[0]&&pe(m,1):(m=xt(e),m.c(),pe(m,1),m.m(t.parentNode,t)):m&&(me(),he(m,1,1,(()=>{m=null})),fe());const i={};!r&&8&n[0]&&(r=!0,i.value=e[3],re((()=>r=!1))),o.$set(i)},i(e){c||(pe(m),pe(o.$$.fragment,e),pe(a.$$.fragment,e),c=!0)},o(e){he(m),he(o.$$.fragment,e),he(a.$$.fragment,e),c=!1},d(e){m&&m.d(e),e&&E(t),e&&E(n),ke(o),ke(a),d=!1,u()}}}function xt(e){let t,n;return t=new e[7]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function kt(e){let t,n,i,o=e[4]&&e[0]&&It(),r=e[45],s=[];for(let t=0;t<r.length;t+=1)s[t]=_t(vt(e,r,t));return{c(){t=L("thead"),n=L("tr"),o&&o.c(),i=D();for(let e=0;e<s.length;e+=1)s[e].c();V(n,"class","svelte-v0ogws"),V(t,"class","svelte-v0ogws")},m(e,r){C(e,t,r),S(t,n),o&&o.m(n,null),S(n,i);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(e[4]&&e[0]?o||(o=It(),o.c(),o.m(n,i)):o&&(o.d(1),o=null),8196&t[0]){let i;for(r=e[45],i=0;i<r.length;i+=1){const o=vt(e,r,i);s[i]?s[i].p(o,t):(s[i]=_t(o),s[i].c(),s[i].m(n,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=r.length}},d(e){e&&E(t),o&&o.d(),N(s,e)}}}function It(e){let t;return{c(){t=L("th"),V(t,"class","svelte-v0ogws")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function _t(e){let t,n,i=e[50]?.designation+"";return{c(){t=L("th"),n=j(i),V(t,"class","svelte-v0ogws")},m(e,i){C(e,t,i),S(t,n)},p(e,t){4&t[0]&&i!==(i=e[50]?.designation+"")&&M(n,i)},d(e){e&&E(t)}}}function St(e){let t,n,i=[],o=new Map,r=e[5];const s=e=>e[47]._id;for(let t=0;t<r.length;t+=1){let n=$t(e,r,t),l=s(n);o.set(l,i[t]=Lt(l,n))}return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=F()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);C(e,t,o),n=!0},p(e,n){178239&n[0]&&(r=e[5],me(),i=function(e,t,n,i,o,r,s,l,a,c,d,u){let m=e.length,f=r.length,p=m;const h={};for(;p--;)h[e[p].key]=p;const $=[],g=new Map,v=new Map;for(p=f;p--;){const e=u(o,r,p),l=n(e);let a=s.get(l);a?i&&a.p(e,t):(a=c(l,e),a.c()),g.set(l,$[p]=a),l in h&&v.set(l,Math.abs(p-h[l]))}const y=new Set,w=new Set;function b(e){pe(e,1),e.m(l,d),s.set(e.key,e),d=e.first,f--}for(;m&&f;){const t=$[f-1],n=e[m-1],i=t.key,o=n.key;t===n?(d=t.first,m--,f--):g.has(o)?!s.has(i)||y.has(i)?b(t):w.has(o)?m--:v.get(i)>v.get(o)?(w.add(i),b(t)):(y.add(o),m--):(a(n,s),m--)}for(;m--;){const t=e[m];g.has(t.key)||a(t,s)}for(;f;)b($[f-1]);return $}(i,n,s,1,e,r,o,t.parentNode,ye,Lt,t,$t),fe())},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){for(let e=0;e<i.length;e+=1)he(i[e]);n=!1},d(e){for(let t=0;t<i.length;t+=1)i[t].d(e);e&&E(t)}}}function Ct(e){let t,n,i,o,r,s,l=e[4]&&e[0]&&Et(e),a=e[45],c=[];for(let t=0;t<a.length;t+=1)c[t]=Nt(gt(e,a,t));return{c(){t=L("tr"),l&&l.c(),n=D();for(let e=0;e<c.length;e+=1)c[e].c();i=D(),V(t,"class","pointer svelte-v0ogws"),P(t,"active",e[47]._id===e[1])},m(a,d){C(a,t,d),l&&l.m(t,null),S(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);S(t,i),o=!0,r||(s=T(t,"click",A((function(){x(e[12](e[47],e[49]))&&e[12](e[47],e[49]).apply(this,arguments)}))),r=!0)},p(o,r){if((e=o)[4]&&e[0]?l?(l.p(e,r),17&r[0]&&pe(l,1)):(l=Et(e),l.c(),pe(l,1),l.m(t,n)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),10276&r[0]){let n;for(a=e[45],n=0;n<a.length;n+=1){const o=gt(e,a,n);c[n]?c[n].p(o,r):(c[n]=Nt(o),c[n].c(),c[n].m(t,i))}for(;n<c.length;n+=1)c[n].d(1);c.length=a.length}34&r[0]&&P(t,"active",e[47]._id===e[1])},i(e){o||(pe(l),o=!0)},o(e){he(l),o=!1},d(e){e&&E(t),l&&l.d(),N(c,e),r=!1,s()}}}function Et(e){let t,n,i,o,r;return n=new He({props:{size:"18"}}),{c(){t=L("td"),be(n.$$.fragment),V(t,"class","editRow svelte-v0ogws"),O(t,"color","#326173")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",A((function(){x(e[17](e[47]))&&e[17](e[47]).apply(this,arguments)}))),o=!0)},p(t,n){e=t},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Nt(e){let t,n,i,o=e[11](e[47],e[50])+"";return{c(){t=L("td"),n=j(o),V(t,"class",i=_(e[50].type)+" svelte-v0ogws")},m(e,i){C(e,t,i),S(t,n)},p(e,r){36&r[0]&&o!==(o=e[11](e[47],e[50])+"")&&M(n,o),4&r[0]&&i!==(i=_(e[50].type)+" svelte-v0ogws")&&V(t,"class",i)},d(e){e&&E(t)}}}function Lt(e,t){let n,i,o,r=t[15](t[47],t[45],t[3]),s=r&&Ct(t);return{key:e,first:null,c(){n=F(),s&&s.c(),i=F(),this.first=n},m(e,t){C(e,n,t),s&&s.m(e,t),C(e,i,t),o=!0},p(e,n){t=e,44&n[0]&&(r=t[15](t[47],t[45],t[3])),r?s?(s.p(t,n),44&n[0]&&pe(s,1)):(s=Ct(t),s.c(),pe(s,1),s.m(i.parentNode,i)):s&&(me(),he(s,1,1,(()=>{s=null})),fe())},i(e){o||(pe(s),o=!0)},o(e){he(s),o=!1},d(e){e&&E(n),s&&s.d(e),e&&E(i)}}}function qt(e){let t,n;return t=new e[7]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function jt(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:qt,then:wt,catch:yt,value:46,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)||ge(o,e,i)},i(e){i||(pe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}i=!1},d(e){e&&E(t),o.block.d(e),o.token=null,o=null}}}const Dt=e("getDisplayItems",((e,t,n)=>{if(!e)return;let i=[];return e.forEach((e=>{if("_total"===e)return void i.push({name:"_total",designation:"Betrag",type:"number"});const[o,r]=e.split(".");let s=t.list?.find((e=>e.name===o))?.item.find((e=>e.name===r));s&&(s={...s},s.name=`${o}_${r}`,n=n.map((e=>(e[o]&&(e[s.name]=e["_"+o]?e["_"+o][r]:e[o][r]),e)))),s||(s=t.items.find((e=>e.name===o))),i.find((e=>e?.name===o))||i.push(s)})),i.length?i:t.items}));function Ft(e,o,r){let s;let l=JSON.parse(t.getItem("Locale")).id;const a=Q(),{Loading:d,TextField:m}=c,{currentTasks:p}=u;I(e,p,(e=>r(33,s=e)));let $,g,v,y,{inputList:w}=o,{eventId:b}=o,{prevEventId:x}=o,{className:k}=o,{rowId:_}=o,{filterForReady:S=!1}=o,{refStatus:C}=o,{showEdit:E=!1}=o,{praefix:N=""}=o,{selectionFields:L=!1}=o,{deList:q}=o,{stopAggregation:j=!1}=o,{inputSearch:D=""}=o,F=!0,T=D,z=k+Math.floor(9e3*Math.random()+1e3).toString()+"search",A=!1,V=!0;const M=(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(", ")}if(!n&&t.name.split("_").length>1){const[i,o]=t.name.split("_");try{n=e[i][0][o],Array.isArray(n)&&(n=n.join(", "))}catch{}}return"number"===t.type&&(n=Number(n)?n.toLocaleString(l,{minimumFractionDigits:t.properties?.decimals||0,maximumFractionDigits:t.decimals||0}):""),"number"===t.type?n:"boolean"==typeof n?h(n):f(e[`_${t.name}`]||n||"")},B=n.getSchemaByClass(k),O=async(e,t)=>{if(C)return r(18,C=[].concat(C)),e.filter((e=>!!C.find((t=>e._task.status===t))));if("Information"===t.state.task)return e;if(x){const t=await n.getEvent(x);if("report"===t?.output?.type)return e;if(t?.input?.class?.length&&t.input.class[0].name===k)return"Information"===t.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))},P=(e,t)=>{if(e){const n="string"==typeof e?e:Object.keys(e)[0],i=new Intl.Collator(l,{numeric:!0});return t.sort(((e,t)=>i.compare(e[n],t[n])))}return t},W=async e=>{let t,i=0;V=!1;const o=e=>new Promise((t=>setTimeout(t,e)));for(;i++<200&&!j&&!(t=await R(e));)await o(500);r(6,A=!1),j&&n.readTasksByAggregationId(e,!0),t&&(r(5,v=P(g.displaySort,t.data)),window.setTimeout((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"}),V=!0}),100))},R=async e=>await n.readTasksByAggregationId(e),U=async(e,t,n,i)=>{const{value:o,refClass:r}=i,[s,l]=n.split("."),a=o?.get(N),c=a&&await Oa(s,a);if(!c)return e;const d=c[l];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 Ma(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(z)?.focus()}),200)})),i.subscribe((async e=>{if(!e)return;const t=await B;e.eventId===t.id&&(Pa(t.class,e.eventId),r(2,F=!r(2,F=!1)))}));return e.$$set=e=>{"inputList"in e&&r(20,w=e.inputList),"eventId"in e&&r(21,b=e.eventId),"prevEventId"in e&&r(22,x=e.prevEventId),"className"in e&&r(23,k=e.className),"rowId"in e&&r(1,_=e.rowId),"filterForReady"in e&&r(24,S=e.filterForReady),"refStatus"in e&&r(18,C=e.refStatus),"showEdit"in e&&r(0,E=e.showEdit),"praefix"in e&&r(25,N=e.praefix),"selectionFields"in e&&r(26,L=e.selectionFields),"deList"in e&&r(27,q=e.deList),"stopAggregation"in e&&r(19,j=e.stopAggregation),"inputSearch"in e&&r(28,D=e.inputSearch)},[E,_,F,T,$,v,A,d,m,p,z,M,(e,t)=>n=>{r(19,j=!0);const i=V?e:y[t];a("choose",{row:i})},async()=>{g=await B,r(4,$=(e=>!s?.length||!!s.find((t=>t===e)))(g.id)),r(5,v=y=P(g.displaySort,await w||await Aa(g.class,g.id))),500===v?.length&&(r(6,A=!0),n.getTasksList(g.id,!1,!0).then((({aggregationId:e})=>W(e))));let e,t=!1,i="";const o=L&&L?.find((e=>g.class===e.refClass.split(":")[0])),l=o?.value?.get&&o.value.get(N);if(l){const[s,a]=o.refClass.split(":");g.class===s&&r(5,v=await U(v,s,a,o)),t=o.parentClass?.find((e=>"quantity"===e.name)),i=o.className,e=await n.getCountedSection(i,a.split(".")[0],l,s,"quantity")}r(0,E&&=!o),o||!S&&!C||r(5,v=await O(v,g));const{display:c}=g;let d=Dt(c,g,v);return!E&&t?(d=d.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),r(5,v=v.map((t=>{const n=e.find((e=>e._id===t._id));return n&&(t.ist=n.quantity.$numberDecimal),t}))),e.map((e=>{if(!v.find((t=>t._id===e._id))){const t=y.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,v.push(t)}})),a("init",v)):q&&r(5,v=v.filter((e=>!q.find((t=>t._id===e._id))))),{items:d}},({detail:{value:e}})=>{r(3,T=e)},(e,t,n)=>{if(!n)return!0;"string"!=typeof n&&(n=n.toString()),n=n.toLowerCase();let i=!1;for(const o of t){const t=M(e,o).toLowerCase();!i&&t.includes(n)&&(i=!0)}return i},()=>{r(3,T="")},e=>{window.open(`/task/${e._task.event}/${e._task._id}/task?view=standalone`,"_blank")},C,j,w,b,x,k,S,N,L,q,D,function(e){T=e,r(3,T)}]}class Tt extends _e{constructor(e){var t;super(),pt.getElementById("svelte-v0ogws-style")||((t=L("style")).id="svelte-v0ogws-style",t.textContent=".feather.svelte-v0ogws.svelte-v0ogws{position:absolute;top:2em;right:0.5em;color:#326173}.eList.svelte-v0ogws.svelte-v0ogws{height:fit-content;max-height:65vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-v0ogws .editRow.svelte-v0ogws{width:1em}.eList.svelte-v0ogws table.svelte-v0ogws{min-width:30vw;position:relative;width:max-content !important;max-width:50vh !important}.eList.svelte-v0ogws table thead.svelte-v0ogws{position:sticky;top:0;background:#326173;color:white}.eList.svelte-v0ogws table thead tr.svelte-v0ogws{height:2.3em}.eList.svelte-v0ogws table tbody tr.svelte-v0ogws{height:2.75em !important}th.svelte-v0ogws.svelte-v0ogws,td.svelte-v0ogws.svelte-v0ogws{padding-left:0.4em;padding-right:0.4em}td.number.svelte-v0ogws.svelte-v0ogws{text-align:end}tr.pointer.svelte-v0ogws.svelte-v0ogws:hover{background-color:#DAE1E5}tr.active.svelte-v0ogws.svelte-v0ogws{color:#326173;background-color:#fcebd5}",S(pt.head,t)),Ie(this,e,Ft,jt,k,{inputList:20,eventId:21,prevEventId:22,className:23,rowId:1,filterForReady:24,refStatus:18,showEdit:0,praefix:25,selectionFields:26,deList:27,stopAggregation:19,inputSearch:28},[-1,-1])}}function zt(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function At(e){let t,n,i=e[41]&&Vt(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[41]?i?(i.p(e,n),8&n[0]&&pe(i,1)):(i=Vt(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Vt(e){let t,n;return t=new e[21]({props:{title:e[16]?"Auswahl":e[0],class:"eList "+(e[14]?"form":""),$$slots:{default:[Qt]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};65537&n[0]&&(i.title=e[16]?"Auswahl":e[0]),16384&n[0]&&(i.class="eList "+(e[14]?"form":"")),2097150&n[0]|2048&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Mt(e){let t,n;return t=new Ra({props:{schema:e[2],recID:e[1],readonly:e[15]}}),t.$on("choose",(function(){x(e[30](e[41]))&&e[30](e[41]).apply(this,arguments)})),t.$on("back",e[27]),{c(){be(t.$$.fragment)},m(e,i){xe(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]),32768&i[0]&&(o.readonly=e[15]),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Bt(e){let t,n,i,o,r,s,l;t=new e[22]({props:{text:e[16]?"Zusätzliche Auswahl":""}});const a=[Pt,Ot],c=[];function d(e,t){return e[16]?0:1}return i=d(e),o=c[i]=a[i](e),s=new Tt({props:{inputSearch:e[12],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],stopAggregation:e[20],showEdit:e[8]}}),s.$on("edit",e[31]),s.$on("choose",e[34]),s.$on("init",e[32]),{c(){be(t.$$.fragment),n=D(),o.c(),r=D(),be(s.$$.fragment)},m(e,o){xe(t,e,o),C(e,n,o),c[i].m(e,o),C(e,r,o),xe(s,e,o),l=!0},p(e,n){const l={};65536&n[0]&&(l.text=e[16]?"Zusätzliche Auswahl":""),t.$set(l);let u=i;i=d(e),i===u?c[i].p(e,n):(me(),he(c[u],1,1,(()=>{c[u]=null})),fe(),o=c[i],o?o.p(e,n):(o=c[i]=a[i](e),o.c()),pe(o,1),o.m(r.parentNode,r));const m={};4096&n[0]&&(m.inputSearch=e[12]),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]),1048576&n[0]&&(m.stopAggregation=e[20]),256&n[0]&&(m.showEdit=e[8]),s.$set(m)},i(e){l||(pe(t.$$.fragment,e),pe(o),pe(s.$$.fragment,e),l=!0)},o(e){he(t.$$.fragment,e),he(o),he(s.$$.fragment,e),l=!1},d(e){ke(t,e),e&&E(n),c[i].d(e),e&&E(r),ke(s,e)}}}function Ot(e){let t,n,i,o;n=new e[23]({props:{outline:!0,$$slots:{default:[Wt]},$$scope:{ctx:e}}}),n.$on("click",e[28]);let r=e[25]&&e[10]&&Rt(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),r&&r.c(),V(t,"class","form--buttons svelte-jb5mrh")},m(e,s){C(e,t,s),xe(n,t,null),S(t,i),r&&r.m(t,null),o=!0},p(e,i){const o={};2048&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o),e[25]&&e[10]?r?(r.p(e,i),1024&i[0]&&pe(r,1)):(r=Rt(e),r.c(),pe(r,1),r.m(t,null)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){o||(pe(n.$$.fragment,e),pe(r),o=!0)},o(e){he(n.$$.fragment,e),he(r),o=!1},d(e){e&&E(t),ke(n),r&&r.d()}}}function Pt(e){let t,n,i,o,r,s,l=e[19]&&Ht(e);return i=new e[23]({props:{outline:!0,$$slots:{default:[Gt]},$$scope:{ctx:e}}}),i.$on("click",e[28]),r=new e[22]({props:{text:"Liste aus "+e[13]}}),{c(){l&&l.c(),t=D(),n=L("div"),be(i.$$.fragment),o=D(),be(r.$$.fragment),V(n,"class","form--buttons svelte-jb5mrh")},m(e,a){l&&l.m(e,a),C(e,t,a),C(e,n,a),xe(i,n,null),C(e,o,a),xe(r,e,a),s=!0},p(e,n){e[19]?l?(l.p(e,n),524288&n[0]&&pe(l,1)):(l=Ht(e),l.c(),pe(l,1),l.m(t.parentNode,t)):l&&(me(),he(l,1,1,(()=>{l=null})),fe());const o={};2048&n[1]&&(o.$$scope={dirty:n,ctx:e}),i.$set(o);const s={};8192&n[0]&&(s.text="Liste aus "+e[13]),r.$set(s)},i(e){s||(pe(l),pe(i.$$.fragment,e),pe(r.$$.fragment,e),s=!0)},o(e){he(l),he(i.$$.fragment,e),he(r.$$.fragment,e),s=!1},d(e){l&&l.d(e),e&&E(t),e&&E(n),ke(i),e&&E(o),ke(r,e)}}}function Wt(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Rt(e){let t,n;return t=new e[23]({props:{filled:!0,$$slots:{default:[Ut]},$$scope:{ctx:e}}}),t.$on("click",e[29]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};2048&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ut(e){let t;return{c(){t=j("Neu")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Ht(e){let t,n;return t=new pl({props:{item:e[17],record:{_id:"",[e[17].name]:""},noForm:"true",classId:"sel_"+e[17].name,eventId:e[18],required:!1,hidden:!1,readonly:!1,deList:e[19]}}),t.$on("notify",e[33]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};131072&n[0]&&(i.item=e[17]),131072&n[0]&&(i.record={_id:"",[e[17].name]:""}),131072&n[0]&&(i.classId="sel_"+e[17].name),262144&n[0]&&(i.eventId=e[18]),524288&n[0]&&(i.deList=e[19]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Gt(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Qt(e){let t,n,i,o;const r=[Bt,Mt],s=[];function l(e,t){return e[41].length&&!e[14]?0:1}return t=l(e),n=s[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?s[t].p(e,o):(me(),he(s[a],1,1,(()=>{s[a]=null})),fe(),n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i))},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){s[t].d(e),e&&E(i)}}}function Yt(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Jt(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Yt,then:At,catch:zt,value:41,blocks:[,,,]};return $e(n=e[26](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[26](e[3]))&&$e(n,o)||ge(o,e,i)},i(e){i||(pe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}i=!1},d(e){e&&E(t),o.block.d(e),o.token=null,o=null}}}function Kt(e,t,i){let o;const{Dialog:r,Divider:s,Button:l}=c,a=Q(),{currentTasks:d}=u;I(e,d,(e=>i(37,o=e)));let{title:m}=t,{schema:f}=t,{recID:p}=t,{isOpening:h=!0}=t,{filterForReady:$=!1}=t,{refStatus:g}=t,{praefix:v=""}=t,{selectionFields:y=!1}=t,{showEdit:w=!0}=t,{deList:b}=t,{newAllowed:x=!0}=t,{prevEventId:k}=t,{inputSearch:_}=t,S=f.id;f.class;let C,E,N,L,q,j,D,F="",T=!1,z=!1;m??=f.identity.designation;const A=!o?.length||o.find((e=>e===S));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,h=e.isOpening),"filterForReady"in e&&i(4,$=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,w=e.showEdit),"deList"in e&&i(9,b=e.deList),"newAllowed"in e&&i(10,x=e.newAllowed),"prevEventId"in e&&i(11,k=e.prevEventId),"inputSearch"in e&&i(12,_=e.inputSearch)},[m,p,f,h,$,g,v,y,w,b,x,k,_,F,T,C,N,q,j,D,z,r,s,l,d,A,async e=>{if(!e)return!1;const t=await Aa(f.class,f.id);if(E=y&&y?.find((e=>f.class===e.refClass.split(":")[0])),i(16,N=E?.value?.get&&E.value.get(v)),N){L=E.refClass;const[e,t]=L.split(":"),[o]=t.split(".");i(17,q=E.parentClass.find((t=>t.name===e)));const r=await n.getSchemaByClass(q.refClass);i(18,j=r.id),i(13,F=E.parentClass.find((e=>e.name===o)).designation)}return t},()=>{i(14,T=!1),p||a("back"),w||a("back")},()=>{i(20,z=!0),i(14,T=!1),a("back")},()=>{i(20,z=!0),i(1,p=!1),i(15,C=!1),i(14,T=!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(15,C=!!e._task.visum||"Closed"===e._task.status),i(1,p=e._docId),i(14,T=!0)},({detail:e})=>{N&&i(19,D=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};a("choose",{row:t})},function(t){Y(e,t)}]}class Zt extends _e{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=L("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}",S(document.head,t)),Ie(this,e,Kt,Jt,k,{title:0,schema:2,recID:1,isOpening:3,filterForReady:4,refStatus:5,praefix:6,selectionFields:7,showEdit:8,deList:9,newAllowed:10,prevEventId:11,inputSearch:12},[-1,-1])}}const{document:Xt}=ve;function en(e){e[28]=e[30].list,e[29]=e[30].items}function tn(e,t,n){const i=e.slice();return i[31]=t[n],i}function nn(e,t,n){const i=e.slice();return i[34]=t[n],i}function on(e,t,n){const i=e.slice();return i[34]=t[n],i}function rn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function sn(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v;function y(t){e[25](t)}en(e),n=new e[7]({props:{outline:!0,$$slots:{default:[ln]},$$scope:{ctx:e}}}),n.$on("click",e[24]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),K.push((()=>we(s,"value",y))),s.$on("input",e[12]),d=new We({props:{size:"18"}});let b=e[29]?.length&&function(e){let t,n,i,o,r=e[29],s=[];for(let t=0;t<r.length;t+=1)s[t]=an(on(e,r,t));return{c(){t=L("thead"),n=L("tr"),i=L("th"),o=D();for(let e=0;e<s.length;e+=1)s[e].c();V(i,"class","svelte-14hcfjl"),V(n,"class","svelte-14hcfjl"),V(t,"class","svelte-14hcfjl")},m(e,r){C(e,t,r),S(t,n),S(n,i),S(n,o);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(2048&t[0]){let i;for(r=e[29],i=0;i<r.length;i+=1){const o=on(e,r,i);s[i]?s[i].p(o,t):(s[i]=an(o),s[i].c(),s[i].m(n,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=r.length}},d(e){e&&E(t),N(s,e)}}}(e),x=e[28]?.length&&function(e){let t,n,i=e[28],o=[];for(let t=0;t<i.length;t+=1)o[t]=un(tn(e,i,t));const r=e=>he(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 s;for(i=e[28],s=0;s<i.length;s+=1){const r=tn(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=un(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),o=L("div"),r=j("Suchen: "),be(s.$$.fragment),a=D(),c=L("span"),be(d.$$.fragment),u=D(),m=L("div"),f=L("table"),b&&b.c(),p=D(),h=L("tbody"),x&&x.c(),V(t,"class","form--buttons svelte-14hcfjl"),V(c,"class","feather pointer svelte-14hcfjl"),O(o,"margin-bottom","1em"),O(o,"position","relative"),V(f,"striped",""),V(f,"class","svelte-14hcfjl"),V(m,"class","eList svelte-14hcfjl")},m(l,y){C(l,t,y),xe(n,t,null),C(l,i,y),C(l,o,y),S(o,r),xe(s,o,null),S(o,a),S(o,c),xe(d,c,null),C(l,u,y),C(l,m,y),S(m,f),b&&b.m(f,null),S(f,p),S(f,h),x&&x.m(h,null),$=!0,g||(v=T(c,"click",e[14]),g=!0)},p(e,t){en(e);const i={};256&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!l&&2&t[0]&&(l=!0,o.value=e[1],re((()=>l=!1))),s.$set(o),e[29]?.length&&b.p(e,t),e[28]?.length&&x.p(e,t)},i(e){$||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),pe(x),$=!0)},o(e){he(n.$$.fragment,e),he(s.$$.fragment,e),he(d.$$.fragment,e),he(x),$=!1},d(e){e&&E(t),ke(n),e&&E(i),e&&E(o),ke(s),ke(d),e&&E(u),e&&E(m),b&&b.d(),x&&x.d(),g=!1,v()}}}function ln(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function an(e){let t,n,i=e[34]?.designation+"";return{c(){t=L("th"),n=j(i),V(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function cn(e){let t,n,i,o,r,s,l,a;i=new He({props:{size:"18"}});let c=e[29],d=[];for(let t=0;t<c.length;t+=1)d[t]=dn(nn(e,c,t));return{c(){t=L("tr"),n=L("td"),be(i.$$.fragment),o=D();for(let e=0;e<d.length;e+=1)d[e].c();r=D(),V(n,"class","editRow svelte-14hcfjl"),V(t,"class","pointer svelte-14hcfjl"),P(t,"active",e[31]._id===e[0])},m(c,u){C(c,t,u),S(t,n),xe(i,n,null),S(t,o);for(let e=0;e<d.length;e+=1)d[e].m(t,null);S(t,r),s=!0,l||(a=T(n,"click",e[15](e[31])),l=!0)},p(n,i){if(e=n,3584&i[0]){let n;for(c=e[29],n=0;n<c.length;n+=1){const o=nn(e,c,n);d[n]?d[n].p(o,i):(d[n]=dn(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]&&P(t,"active",e[31]._id===e[0])},i(e){s||(pe(i.$$.fragment,e),s=!0)},o(e){he(i.$$.fragment,e),s=!1},d(e){e&&E(t),ke(i),N(d,e),l=!1,a()}}}function dn(e){let t,n,i,o,r=e[9](e[31],e[34])+"";return{c(){t=L("td"),n=j(r),V(t,"class","svelte-14hcfjl")},m(r,s){C(r,t,s),S(t,n),i||(o=T(t,"click",A(e[10](e[31]))),i=!0)},p(t,n){e=t},d(e){e&&E(t),i=!1,o()}}}function un(e){let t,n,i=e[13](e[31],e[29],e[1]),o=i&&cn(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[31],e[29],e[1])),i?o?(o.p(e,n),2&n[0]&&pe(o,1)):(o=cn(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function mn(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function fn(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:mn,then:sn,catch:rn,value:30,blocks:[,,,]};return $e(e[11](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function pn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[fn]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};3&n[0]|256&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function hn(e,t,o){const r=Q(),{Dialog:s,Divider:l,Loading:a,TextField:d,Button:u}=c;let{item:m}=t,{classId:p}=t,{className:$}=t,{rowId:g}=t,{viewName:v}=t,{viewValue:y}=t,{recordId:w}=t,{filter:b}=t,{multiValues:x}=t,k="",I=p+Math.floor(9e3*Math.random()+1e3).toString()+"search";const _=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?h(n):f(e[`_${t.name}`]||e[t.name]||"")},S=n.getSchemaByClass($);H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(I)?.focus()}),200)})),i.subscribe((async e=>{if(!e)return;const t=await S;e.eventId===t.id&&Pa(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,$=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,w=e.recordId),"filter"in e&&o(22,b=e.filter),"multiValues"in e&&o(23,x=e.multiValues)},[g,k,r,s,l,a,d,u,I,_,e=>()=>r("choose",{row:e}),async()=>{const e=await S;let t=[];if(m.lookup){const e="."+p+"#"+m.lookup,i=document.querySelector(e);let o=i?.value||w;if(o){if(24===o.toString().length){const e=await Oa(m.lookup,o);if(e){const i=e[m.name]?.map((e=>e[m.name]));i&&(t=await n.getSectionView(m.name,{_id:{$in:i}},!0))}}}else if(x.has(m.lookup)){const e=x.get(m.lookup)[0];e&&(t=await n.getSectionView(m.name,{[m.lookup]:e},!0))}}else{const i="."+p+"#"+v.split(":")[0],o=document.querySelector(i);let r={[v]:o?.value||w};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]&&(t=await n.getSectionView(e.class,r,!0)),b&&(t=t.filter((e=>e._id!=b)))}const i=e.display;return{list:t,items:Dt(i,e,t)}},({detail:{value:e}})=>{o(1,k=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(_(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{o(1,k="")},e=>async()=>{const t=await n.getTaskByDocId(e._id),i=`/task/${t.event}/${t._id}/task?view=standalone`;window.open(i)},m,p,$,v,y,w,b,x,()=>r("back"),function(e){k=e,o(1,k)}]}class $n extends _e{constructor(e){var t;super(),Xt.getElementById("svelte-14hcfjl-style")||((t=L("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}",S(Xt.head,t)),Ie(this,e,hn,pn,k,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22,multiValues:23},[-1,-1])}}const{document:gn}=ve;function vn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function yn(e){let t,n,i=e[59]&&function(e){let t,n,i,o,s,l,a,c,d,u,m,f,p,h,$,g,v,y,w;function b(t){e[46](t)}function x(t){e[47](t)}let k={class:"full-width",id:e[29],rows:"1",required:e[1],disabled:e[3],placeholder:e[30],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"};void 0!==e[2]&&(k.value=e[2]);void 0!==e[24]&&(k.overwrite=e[24]);n=new r({props:k}),K.push((()=>we(n,"value",b))),K.push((()=>we(n,"overwrite",x))),n.$on("click",e[32]()),n.$on("onFocus",e[32](e[29]));const I=[bn,wn],N=[];function q(e,t){return!e[3]||e[15]?0:e[21]&&e[0]?1:-1}~(l=q(e))&&(a=N[l]=I[l](e));let j=(!e[3]||e[15]||e[16])&&xn(e);function z(t){e[48](t)}let A={class:"tModal",noClickaway:!0,$$slots:{default:[Sn]},$$scope:{ctx:e}};void 0!==e[18]&&(A.open=e[18]);p=new e[26]({props:A}),K.push((()=>we(p,"open",z)));let M=e[19]&&Cn(e);return{c(){t=L("div"),be(n.$$.fragment),s=D(),a&&a.c(),c=D(),d=L("input"),m=D(),j&&j.c(),f=D(),be(p.$$.fragment),$=D(),M&&M.c(),g=F(),V(d,"class",u=_(e[8]||e[9])+" svelte-jox15l"),V(d,"id",e[5]),V(d,"name",e[5]),d.value=e[0],d.hidden=!0,O(t,"position","relative")},m(i,o){C(i,t,o),xe(n,t,null),S(t,s),~l&&N[l].m(t,null),S(t,c),S(t,d),S(t,m),j&&j.m(t,null),C(i,f,o),xe(p,i,o),C(i,$,o),M&&M.m(i,o),C(i,g,o),v=!0,y||(w=T(t,"keydown",e[33]),y=!0)},p(e,r){const s={};2&r[0]&&(s.required=e[1]),8&r[0]&&(s.disabled=e[3]),!i&&4&r[0]&&(i=!0,s.value=e[2],re((()=>i=!1))),!o&&16777216&r[0]&&(o=!0,s.overwrite=e[24],re((()=>o=!1))),n.$set(s);let m=l;l=q(e),l===m?~l&&N[l].p(e,r):(a&&(me(),he(N[m],1,1,(()=>{N[m]=null})),fe()),~l?(a=N[l],a?a.p(e,r):(a=N[l]=I[l](e),a.c()),pe(a,1),a.m(t,c)):a=null),(!v||768&r[0]&&u!==(u=_(e[8]||e[9])+" svelte-jox15l"))&&V(d,"class",u),(!v||32&r[0])&&V(d,"id",e[5]),(!v||32&r[0])&&V(d,"name",e[5]),(!v||1&r[0]&&d.value!==e[0])&&(d.value=e[0]),!e[3]||e[15]||e[16]?j?(j.p(e,r),98312&r[0]&&pe(j,1)):(j=xn(e),j.c(),pe(j,1),j.m(t,null)):j&&(me(),he(j,1,1,(()=>{j=null})),fe());const f={};13008593&r[0]|536870912&r[1]&&(f.$$scope={dirty:r,ctx:e}),!h&&262144&r[0]&&(h=!0,f.open=e[18],re((()=>h=!1))),p.$set(f),e[19]?M?(M.p(e,r),524288&r[0]&&pe(M,1)):(M=Cn(e),M.c(),pe(M,1),M.m(g.parentNode,g)):M&&(me(),he(M,1,1,(()=>{M=null})),fe())},i(e){v||(pe(n.$$.fragment,e),pe(a),pe(j),pe(p.$$.fragment,e),pe(M),v=!0)},o(e){he(n.$$.fragment,e),he(a),he(j),he(p.$$.fragment,e),he(M),v=!1},d(e){e&&E(t),ke(n),~l&&N[l].d(),j&&j.d(),e&&E(f),ke(p,e),e&&E($),M&&M.d(e),e&&E(g),y=!1,w()}}}(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[59]&&i.p(e,t)},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function wn(e){let t,n,i,o,r;return n=new He({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-jox15l")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[38]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function bn(e){let t,n,i,o,r;return n=new ft({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-jox15l")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=[T(t,"click",e[32](!0)),T(t,"choose",e[35])],o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,b(r)}}}function xn(e){let t,n,i,o,r;return n=new We({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather2 pointer svelte-jox15l")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[37]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function kn(e){let t,n,i,o;const r=[_n,In],s=[];function l(e,t){return e[6].lookup||e[4]&&!e[6].constraint?0:1}return t=l(e),n=s[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?s[t].p(e,o):(me(),he(s[a],1,1,(()=>{s[a]=null})),fe(),n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i))},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){s[t].d(e),e&&E(i)}}}function In(e){let t,n;return t=new Zt({props:{title:e[6].designation,newAllowed:e[22],prevEventId:e[10],schema:e[17],recID:e[0],isOpening:e[18],filterForReady:e[23],refStatus:e[6].refStatus,selectionFields:e[13],deList:e[14],praefix:e[12],inputSearch:e[34]()}}),t.$on("choose",e[35]),t.$on("back",e[36]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.title=e[6].designation),4194304&n[0]&&(i.newAllowed=e[22]),1024&n[0]&&(i.prevEventId=e[10]),131072&n[0]&&(i.schema=e[17]),1&n[0]&&(i.recID=e[0]),262144&n[0]&&(i.isOpening=e[18]),8388608&n[0]&&(i.filterForReady=e[23]),64&n[0]&&(i.refStatus=e[6].refStatus),8192&n[0]&&(i.selectionFields=e[13]),16384&n[0]&&(i.deList=e[14]),4096&n[0]&&(i.praefix=e[12]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function _n(e){let t,n;return t=new $n({props:{item:e[6],className:e[17].class,classId:e[9],rowId:e[0],recordId:e[11],viewName:e[4],viewValue:"",multiValues:e[7]}}),t.$on("choose",e[35]),t.$on("back",e[36]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.item=e[6]),131072&n[0]&&(i.className=e[17].class),512&n[0]&&(i.classId=e[9]),1&n[0]&&(i.rowId=e[0]),2048&n[0]&&(i.recordId=e[11]),16&n[0]&&(i.viewName=e[4]),128&n[0]&&(i.multiValues=e[7]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Sn(e){let t,n,i=e[18]&&kn(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[18]?i?(i.p(e,n),262144&n[0]&&pe(i,1)):(i=kn(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Cn(e){let t,n,i;function o(t){e[49](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[Nn]},$$scope:{ctx:e}};return void 0!==e[19]&&(r.open=e[19]),t=new e[26]({props:r}),K.push((()=>we(t,"open",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};1179649&i[0]|536870912&i[1]&&(o.$$scope={dirty:i,ctx:e}),!n&&524288&i[0]&&(n=!0,o.open=e[19],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function En(e){let t,n;return t=new Ra({props:{schema:e[17],recID:e[0],readonly:!0}}),t.$on("back",e[36]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};131072&n[0]&&(i.schema=e[17]),1&n[0]&&(i.recID=e[0]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Nn(e){let t,n;return t=new e[25]({props:{title:e[20],$$slots:{default:[En]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1048576&n[0]&&(i.title=e[20]),131073&n[0]|536870912&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ln(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function qn(e){let t,n,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Ln,then:yn,catch:vn,value:59,blocks:[,,,]};return $e(e[31](),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){ge(i,e=t,n)},i(e){n||(pe(i.block),n=!0)},o(e){for(let e=0;e<3;e+=1){he(i.blocks[e])}n=!1},d(e){e&&E(t),i.block.d(e),i.token=null,i=null}}}function jn(e,t,i){let r,s,l;I(e,o,(e=>i(45,r=e)));const a=Q(),{Dialog:d,Modal:m}=c,{currentTasks:f,loggedIn:p}=u;I(e,f,(e=>i(51,s=e))),I(e,p,(e=>i(52,l=e)));let{id:h}=t,{item:g}=t,{value:v=""}=t,{multiValues:y}=t,{desc:w=""}=t,{noForm:b=!1}=t,{classId:x}=t,{eventId:k}=t,{recordId:_}=t,{withRefValue:S=!1}=t,{refValue:C=""}=t,{required:E}=t,{disabled:N}=t,{readonly:L}=t,{praefix:q}=t,{selectionFields:j}=t,{formnovalidate:D}=t,{selection:F}=t,{deList:T}=t,{isTemplate:z}=t,{noList:A=!1}=t,{multi:V=!1}=t;const M="comment_"+h;let B,O,P,W,R,U,H=!1,G=!0,Y=!0,J=!0;L||=_&&g.asInput,N||=L,!F&&g.selection&&1===g.selection.split(":").length&&(F=g.selection);const K=L||N||g.lookup||F&&!g.constraint?"":"Suchbegriff ⏎",Z=async e=>{e.items.filter((e=>e.properties?.default)).forEach((t=>{a("defPrep",{className:e.class,itemName:t.name,value:t.properties.default})}))},X=e=>{e&&(i(2,w=$(P,e)),a("setRefDesc",w.split(" •")[0]),a("change",{value:v,description:w}),a("task",{row:e,eventId:P.id}))},ee=()=>{i(18,H=!1),i(19,B=!1)};return e.$$set=e=>{"id"in e&&i(5,h=e.id),"item"in e&&i(6,g=e.item),"value"in e&&i(0,v=e.value),"multiValues"in e&&i(7,y=e.multiValues),"desc"in e&&i(2,w=e.desc),"noForm"in e&&i(8,b=e.noForm),"classId"in e&&i(9,x=e.classId),"eventId"in e&&i(10,k=e.eventId),"recordId"in e&&i(11,_=e.recordId),"withRefValue"in e&&i(39,S=e.withRefValue),"refValue"in e&&i(40,C=e.refValue),"required"in e&&i(1,E=e.required),"disabled"in e&&i(3,N=e.disabled),"readonly"in e&&i(41,L=e.readonly),"praefix"in e&&i(12,q=e.praefix),"selectionFields"in e&&i(13,j=e.selectionFields),"formnovalidate"in e&&i(42,D=e.formnovalidate),"selection"in e&&i(4,F=e.selection),"deList"in e&&i(14,T=e.deList),"isTemplate"in e&&i(15,z=e.isTemplate),"noList"in e&&i(43,A=e.noList),"multi"in e&&i(16,V=e.multi)},e.$$.update=()=>{if(2&e.$$.dirty[0]|2048&e.$$.dirty[1]&&i(1,E=E&&!D),768&e.$$.dirty[1]&&S&&i(0,v=C),131137&e.$$.dirty[0]|4096&e.$$.dirty[1]&&v&&P&&Promise.resolve(Va(g.refClass,P.id,v,!!g.lookup||A)).then(X),65&e.$$.dirty[0]|24576&e.$$.dirty[1]&&v&&W&&g.name===W.input?.at(0)&&W.inputLookup?.length){const{domain:e}=W.inputLookup[0]||{};"user"===e&&(r.some((e=>W.authorization?.find((t=>t.role===e&&!t.constraint))))||i(3,N=!0))}131073&e.$$.dirty[0]&&!v&&P&&X({})},[v,E,w,N,F,h,g,y,b,x,k,_,q,j,T,z,V,P,H,B,O,R,G,Y,J,d,m,f,p,M,K,async()=>{try{const e=await n.getEvent(k);if(U="report"===e.output.type,i(23,Y=!g.asInput),i(22,G=e.output?.class[0].name!==g.refClass),i(17,P=await n.getSchemaByClass(g.refClass)),Z(P),i(21,R=(e=>!s?.length||!!s.find((t=>t===e)))(P.id)),i(44,W=await n.getSchema(k)),k&&_&&v&&!N&&W.input?.find((e=>e===g.refClass))&&i(3,N=!0),g.properties?.query?.lookup){const{domain:e,value:t}=g.properties.query.lookup;if("user"===e){const e=l.user,o={[t]:e},s=await n.getSectionView(g.refClass,o);if(s?.length){const[{_id:e}]=s;e&&(i(40,C=e),i(39,S=!0))}r.some((e=>P.authorization?.find((t=>t.role===e&&!t.constraint))))||i(3,N=!0)}}return i(20,O=P.identity.designation),!0}catch{return a("initFail",!0),!1}},e=>t=>{if(!0===e&&i(18,H=!0),e&&"BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}(g.lookup||F&&!g.constraint||v)&&i(18,H=!0)},e=>{13==e.which&&(e.preventDefault(),i(18,H=!0))},()=>{if(v)return"";const e=document.getElementById(M);return e?.value||""},({detail:e})=>{i(0,v=e.row._id),ee()},ee,()=>{(U||R)&&(V?a("change",{value:v,delete:!0}):(i(0,v=""),i(2,w=""),i(24,J=!0),a("change",{value:v,description:w}),a("task",{row:{_task:{event:P.id,_id:!1}}})))},async()=>{if(!v)return;const e=await Va(g.refClass,P.id,v);if(!e._task)return;const t=e._task.task_id,n=`/task/${e._task.event}/${t}/task?view=standalone`;window.open(n)},S,C,L,D,A,W,r,function(e){w=e,i(2,w)},function(e){J=e,i(24,J)},function(e){H=e,i(18,H)},function(e){B=e,i(19,B)}]}class Dn extends _e{constructor(e){var t;super(),gn.getElementById("svelte-jox15l-style")||((t=L("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}",S(gn.head,t)),Ie(this,e,jn,qn,k,{id:5,item:6,value:0,multiValues:7,desc:2,noForm:8,classId:9,eventId:10,recordId:11,withRefValue:39,refValue:40,required:1,disabled:3,readonly:41,praefix:12,selectionFields:13,formnovalidate:42,selection:4,deList:14,isTemplate:15,noList:43,multi:16},[-1,-1])}}function Fn(e,t,n){const i=e.slice();return i[37]=t[n],i[39]=n,i}function Tn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function zn(e){let t,n;return t=new e[16]({props:{outline:!0,$$slots:{default:[Vn]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8191&n[0]|512&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function An(e){let t,n;return t=new Dn({props:{classId:e[6],eventId:e[7],required:e[9],disabled:e[1],formnovalidate:e[12],readonly:e[10],id:e[2]+"."+e[39],item:e[3],desc:e[4],value:e[37],noForm:e[5],praefix:e[11],recordId:e[8],multi:!0}}),t.$on("change",e[24]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.classId=e[6]),128&n[0]&&(i.eventId=e[7]),512&n[0]&&(i.required=e[9]),2&n[0]&&(i.disabled=e[1]),4096&n[0]&&(i.formnovalidate=e[12]),1024&n[0]&&(i.readonly=e[10]),4&n[0]&&(i.id=e[2]+"."+e[39]),8&n[0]&&(i.item=e[3]),16&n[0]&&(i.desc=e[4]),1&n[0]&&(i.value=e[37]),32&n[0]&&(i.noForm=e[5]),2048&n[0]&&(i.praefix=e[11]),256&n[0]&&(i.recordId=e[8]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Vn(e){let t,n,i,o,r,s,l;n=new Ze({props:{size:"18"}});let a=e[0],c=[];for(let t=0;t<a.length;t+=1)c[t]=An(Fn(e,a,t));const d=e=>he(c[e],1,1,(()=>{c[e]=null}));return{c(){t=L("span"),be(n.$$.fragment),i=D();for(let e=0;e<c.length;e+=1)c[e].c();o=F(),V(t,"class","feather pointer")},m(a,d){C(a,t,d),xe(n,t,null),C(a,i,d);for(let e=0;e<c.length;e+=1)c[e].m(a,d);C(a,o,d),r=!0,s||(l=T(t,"click",(function(){x(e[22](e[0]))&&e[22](e[0]).apply(this,arguments)})),s=!0)},p(t,n){if(e=t,16785407&n[0]){let t;for(a=e[0],t=0;t<a.length;t+=1){const i=Fn(e,a,t);c[t]?(c[t].p(i,n),pe(c[t],1)):(c[t]=An(i),c[t].c(),pe(c[t],1),c[t].m(o.parentNode,o))}for(me(),t=a.length;t<c.length;t+=1)d(t);fe()}},i(e){if(!r){pe(n.$$.fragment,e);for(let e=0;e<a.length;e+=1)pe(c[e]);r=!0}},o(e){he(n.$$.fragment,e),c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)he(c[e]);r=!1},d(e){e&&E(t),ke(n),e&&E(i),N(c,e),e&&E(o),s=!1,l()}}}function Mn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Bn(e){let t,n;return t=new e[18]({props:{title:e[14].designation,class:"eList",$$slots:{default:[Pn]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};16384&n[0]&&(i.title=e[14].designation),49480&n[0]|512&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function On(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Pn(e){let t,n,i,o,r;return n=new e[19]({props:{outline:!0,$$slots:{default:[On]},$$scope:{ctx:e}}}),n.$on("click",e[25]),o=new Tt({props:{item:e[3],className:e[14].class,classId:e[6],rowId:e[15],recordId:e[8],inputList:e[21]()}}),o.$on("choose",e[23]),o.$on("back",e[25]),{c(){t=L("div"),be(n.$$.fragment),i=D(),be(o.$$.fragment),V(t,"class","form--buttons")},m(e,s){C(e,t,s),xe(n,t,null),C(e,i,s),xe(o,e,s),r=!0},p(e,t){const i={};512&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const r={};8&t[0]&&(r.item=e[3]),16384&t[0]&&(r.className=e[14].class),64&t[0]&&(r.classId=e[6]),32768&t[0]&&(r.rowId=e[15]),256&t[0]&&(r.recordId=e[8]),o.$set(r)},i(e){r||(pe(n.$$.fragment,e),pe(o.$$.fragment,e),r=!0)},o(e){he(n.$$.fragment,e),he(o.$$.fragment,e),r=!1},d(e){e&&E(t),ke(n),e&&E(i),ke(o,e)}}}function Wn(e){let t,n,i=e[13]&&Bn(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[13]?i?(i.p(e,n),8192&n[0]&&pe(i,1)):(i=Bn(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Rn(e){let t,n,i,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Mn,then:zn,catch:Tn,value:36,blocks:[,,,]};function s(t){e[33](t)}$e(e[20](),r);let l={class:"tModal",noClickaway:!0,$$slots:{default:[Wn]},$$scope:{ctx:e}};return void 0!==e[13]&&(l.open=e[13]),n=new e[17]({props:l}),K.push((()=>we(n,"open",s))),{c(){r.block.c(),t=D(),be(n.$$.fragment)},m(e,i){r.block.m(e,r.anchor=i),r.mount=()=>t.parentNode,r.anchor=t,C(e,t,i),xe(n,e,i),o=!0},p(t,o){ge(r,e=t,o);const s={};57672&o[0]|512&o[1]&&(s.$$scope={dirty:o,ctx:e}),!i&&8192&o[0]&&(i=!0,s.open=e[13],re((()=>i=!1))),n.$set(s)},i(e){o||(pe(r.block),pe(n.$$.fragment,e),o=!0)},o(e){for(let e=0;e<3;e+=1){he(r.blocks[e])}he(n.$$.fragment,e),o=!1},d(e){r.block.d(e),r.token=null,r=null,e&&E(t),ke(n,e)}}}function Un(e,t,i){const o=Q(),{Card:r,Modal:s,Dialog:l,Button:a}=c;let d,u,{id:m}=t,{item:f}=t,{values:p=[]}=t,{desc:h=""}=t,{noForm:$=!1}=t,{classId:g}=t,{eventId:v}=t,{recordId:y}=t,{withRefValue:w=!1}=t,{refValue:b=""}=t,{required:x}=t,{disabled:k}=t,{readonly:I}=t,{praefix:_}=t,{selectionFields:S}=t,{formnovalidate:C}=t,{selection:E}=t,{deList:N}=t,{isTemplate:L}=t,{noList:q=!1}=t,j=!1;const D=f.properties.multi.filter;k=!0;const F=()=>{i(13,j=!1)};return e.$$set=e=>{"id"in e&&i(2,m=e.id),"item"in e&&i(3,f=e.item),"values"in e&&i(0,p=e.values),"desc"in e&&i(4,h=e.desc),"noForm"in e&&i(5,$=e.noForm),"classId"in e&&i(6,g=e.classId),"eventId"in e&&i(7,v=e.eventId),"recordId"in e&&i(8,y=e.recordId),"withRefValue"in e&&i(26,w=e.withRefValue),"refValue"in e&&i(27,b=e.refValue),"required"in e&&i(9,x=e.required),"disabled"in e&&i(1,k=e.disabled),"readonly"in e&&i(10,I=e.readonly),"praefix"in e&&i(11,_=e.praefix),"selectionFields"in e&&i(28,S=e.selectionFields),"formnovalidate"in e&&i(12,C=e.formnovalidate),"selection"in e&&i(29,E=e.selection),"deList"in e&&i(30,N=e.deList),"isTemplate"in e&&i(31,L=e.isTemplate),"noList"in e&&i(32,q=e.noList)},[p,k,m,f,h,$,g,v,y,x,I,_,C,j,d,u,r,s,l,a,async()=>{i(14,d=await n.getSchemaByClass(f.refClass))},async()=>{let e=await Aa(d.class,d.id);if(D)for(const t in D)e=e.filter((e=>{const[n,i]=t.split(".");if(i||(i=n,n=""),n){if(e[n][0]&&e[n][0][i].length)return!0}else if(e[i])return!0;return!1}));return e},e=>()=>{i(13,j=!0),i(15,u=e)},({detail:e})=>{const t=e.row._id;p.find((e=>e===t))||i(0,p=p.concat(e.row._id)),F()},({detail:e})=>{e.delete&&i(0,p=p.filter((t=>t!==e.value))),e.value=p,o("change",e)},F,w,b,S,E,N,L,q,function(e){j=e,i(13,j)}]}class Hn extends _e{constructor(e){var t;super(),document.getElementById("svelte-1m792ni-style")||((t=L("style")).id="svelte-1m792ni-style",t.textContent=".field .card{padding:1em !important;margin-bottom:1em !important}",S(document.head,t)),Ie(this,e,Un,Rn,k,{id:2,item:3,values:0,desc:4,noForm:5,classId:6,eventId:7,recordId:8,withRefValue:26,refValue:27,required:9,disabled:1,readonly:10,praefix:11,selectionFields:28,formnovalidate:12,selection:29,deList:30,isTemplate:31,noList:32},[-1,-1])}}const Gn=/\d+/g,Qn=/%[HMSpPdmyY%]/g;function Yn(e,t,n){const i=Math.floor((new Date).getFullYear()/100);let o=!1;if(""===e)return null;const r=t.split(Qn);let s=0,l=0;const a=new Date(0);for(const c of r){if(!e.startsWith(c,s))return n;if(s+=c.length,s===e.length){if(l!==t.length)return n;break}if("%"!==t[l+c.length])break;if(l+=c.length+1,"%"===t[l]){if("%"!==e[s])return n;s++}else if("p"===t[l].toLowerCase()){const t=e.substr(s,2).toUpperCase();if("AM"===t)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{Gn.lastIndex=s;const r=Gn.exec(e);if(null==r)return n;switch(t[l]){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])}s+=r[0].length}l++}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:Kn}=ve;function Zn(e,t,n){const i=e.slice();return i[17]=t[n],i}function Xn(e,t,n){const i=e.slice();return i[20]=t[n],i}function ei(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ti(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p=e[0].items,h=[];for(let t=0;t<p.length;t+=1)h[t]=ii(Xn(e,p,t));const $=e=>he(h[e],1,1,(()=>{h[e]=null}));let g=e[0].list&&oi(e);return a=new e[5]({props:{outline:!0,$$slots:{default:[si]},$$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:[li]},$$scope:{ctx:e}}}),{c(){t=L("form"),n=L("input"),o=D();for(let e=0;e<h.length;e+=1)h[e].c();r=D(),g&&g.c(),s=D(),l=L("div"),be(a.$$.fragment),c=D(),be(d.$$.fragment),V(n,"class",_(e[6])+" svelte-1phofh5"),V(n,"name","_id"),V(n,"type","hidden"),n.value=i=e[1]._id||"",V(t,"class","fTask svelte-1phofh5"),V(t,"id",e[6]),V(l,"class","form--buttons svelte-1phofh5")},m(i,p){C(i,t,p),S(t,n),S(t,o);for(let e=0;e<h.length;e+=1)h[e].m(t,null);S(t,r),g&&g.m(t,null),C(i,s,p),C(i,l,p),xe(a,l,null),S(l,c),xe(d,l,null),u=!0,m||(f=[T(t,"keydown",e[8]),T(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=Xn(e,p,n);h[n]?(h[n].p(i,o),pe(h[n],1)):(h[n]=ii(i),h[n].c(),pe(h[n],1),h[n].m(t,r))}for(me(),n=p.length;n<h.length;n+=1)$(n);fe()}e[0].list?g?(g.p(e,o),1&o&&pe(g,1)):(g=oi(e),g.c(),pe(g,1),g.m(t,null)):g&&(me(),he(g,1,1,(()=>{g=null})),fe());const s={};8388608&o&&(s.$$scope={dirty:o,ctx:e}),a.$set(s);const l={};4&o&&(l.disabled=e[2]),8388608&o&&(l.$$scope={dirty:o,ctx:e}),d.$set(l)},i(e){if(!u){for(let e=0;e<p.length;e+=1)pe(h[e]);pe(g),pe(a.$$.fragment,e),pe(d.$$.fragment,e),u=!0}},o(e){h=h.filter(Boolean);for(let e=0;e<h.length;e+=1)he(h[e]);he(g),he(a.$$.fragment,e),he(d.$$.fragment,e),u=!1},d(e){e&&E(t),N(h,e),g&&g.d(),e&&E(s),e&&E(l),ke(a),ke(d),m=!1,b(f)}}}function ni(e){let t,n;return t=new pl({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(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ii(e){let t,n,i=di(!0,e[20]),o=i&&ni(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=di(!0,e[20])),i?o?(o.p(e,n),1&n&&pe(o,1)):(o=ni(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function oi(e){let t,n,i=e[0].list,o=[];for(let t=0;t<i.length;t+=1)o[t]=ri(Zn(e,i,t));const r=e=>he(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 s;for(i=e[0].list,s=0;s<i.length;s+=1){const r=Zn(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=ri(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function ri(e){let t,n,i,o;return t=new e[4]({props:{text:e[17].designation}}),i=new xi({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(){be(t.$$.fragment),n=D(),be(i.$$.fragment)},m(e,r){xe(t,e,r),C(e,n,r),xe(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||(pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!0)},o(e){he(t.$$.fragment,e),he(i.$$.fragment,e),o=!1},d(e){ke(t,e),e&&E(n),ke(i,e)}}}function si(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function li(e){let t;return{c(){t=j("Speichern")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function ai(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ci(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ai,then:ti,catch:ei,value:16,blocks:[,,,]};return $e(e[7](),o),{c(){t=D(),n=L("section"),o.block.c(),Kn.title="Vorgaben",V(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]){ge(o,e=t,n)},i(e){i||(pe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}i=!1},d(e){e&&E(t),e&&E(n),o.block.d(),o.token=null,o=null}}}const di=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function ui(e,i,r){let a,d,u;I(e,l,(e=>r(11,d=e))),I(e,o,(e=>r(12,u=e)));const{Divider:m,Button:f,FormField:p}=c,h=JSON.parse(t.getItem("Locale"));let{schema:$}=i,{record:g}=i,v="template-"+$.class+Math.floor(9e3*Math.random()+1e3).toString(),y=!1;const w=()=>window.history.back(),b=(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 Yn(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(h.id).substring(1,2);try{r=Number(r.replace(e,".")).toString()}catch{}}return r};return e.$$set=e=>{"schema"in e&&r(0,$=e.schema),"record"in e&&r(1,g=e.record)},e.$$.update=()=>{4&e.$$.dirty&&r(3,a=y)},[$,g,y,a,m,f,v,async()=>{const e=await n.getEvent($.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&r(2,y=!0),d.role?.length&&$.authorization?.length){const e=$.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));r(2,y||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},w,async e=>{const t={};Array.from(document.querySelectorAll("form#"+v+" ."+v)).map((e=>{const n=e.id||e.name;if(n)if(n.includes(".")){const[i,o]=n.split("."),r=$.list.find((e=>e.name===i));t[n]=b(r.item,e)}else t[n]=b($.items,e)})),await n.saveTemplate($.class,t),s.success("Die Vorgaben wurden gespeichert.",2e3),w()}]}const{document:mi}=ve;function fi(e,t,n){const i=e.slice();return i[28]=t[n],i}function pi(e){let t,n;return t=new pl({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(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function hi(e){let t,n,i=di(e[7],e[28]),o=i&&pi(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=di(e[7],e[28])),i?o?(o.p(e,n),130&n[0]&&pe(o,1)):(o=pi(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function $i(e){let t,n,i,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=hi(fi(e,o,t));const s=e=>he(r[e],1,1,(()=>{r[e]=null}));return{c(){t=L("div");for(let e=0;e<r.length;e+=1)r[e].c();V(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,l){if(82367&l[0]){let n;for(o=e[1].item,n=0;n<o.length;n+=1){const i=fi(e,o,n);r[n]?(r[n].p(i,l),pe(r[n],1)):(r[n]=hi(i),r[n].c(),pe(r[n],1),r[n].m(t,null))}for(me(),n=o.length;n<r.length;n+=1)s(n);fe()}(!i||6&l[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&V(t,"id",n)},i(e){if(!i){for(let e=0;e<o.length;e+=1)pe(r[e]);i=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)he(r[e]);i=!1},d(e){e&&E(t),N(r,e)}}}function gi(e){let t,n,i=e[13](e[9])+"";return{c(){t=L("span"),n=j(i)},m(e,i){C(e,t,i),S(t,n)},p(e,t){512&t[0]&&i!==(i=e[13](e[9])+"")&&M(n,i)},d(e){e&&E(t)}}}function vi(e){let t,n,i;return n=new e[10]({props:{$$slots:{default:[gi]},$$scope:{ctx:e}}}),n.$on("click",(function(){x(e[15](e[27]))&&e[15](e[27]).apply(this,arguments)})),{c(){t=L("div"),be(n.$$.fragment),V(t,"class","accordion svelte-148ktt9"),V(t,"slot","handle")},m(e,o){C(e,t,o),xe(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||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function yi(e){let t,n;return t=new e[12]({props:{open:e[6],$$slots:{handle:[vi,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]],default:[$i,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",e[17]),{c(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function wi(e){let t,n,i;return n=new e[11]({props:{$$slots:{default:[yi]},$$scope:{ctx:e}}}),{c(){t=L("div"),be(n.$$.fragment),V(t,"class","formList")},m(e,o){C(e,t,o),xe(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||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function bi(e,t,i){const{Button:o,Accordion:r,AccordionSection:s}=c;let{list:l}=t,{schema:a}=t,{record:d}=t,{classId:u}=t,{eventId:m}=t,{disabled:$}=t,{required:g}=t,{open:v=!1}=t,{template:y={}}=t,{isTemplate:w=!1}=t,{currency:b}=t,{update:x=!1}=t,k=new Map;const I={};let _=d[l.name]||{};d[l.name]=_;const S=e=>I[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "),C=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};return e.$$set=e=>{"list"in e&&i(1,l=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,$=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,w=e.isTemplate),"currency"in e&&i(8,b=e.currency),"update"in e&&i(20,x=e.update)},e.$$.update=()=>{1048579&e.$$.dirty[0]&&x&&d&&i(9,_=d[l.name]||{})},[d,l,u,m,$,g,v,w,b,_,o,r,s,e=>a.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format&&"html"!==t.properties?.format)).map((t=>"object"===t.type?S(t.name):"boolean"===t.type?h(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[l.name]||{};for(const t in e)y[l.name][t]&&!d[l.name][t]&&i(0,d[l.name][t]=y[l.name][t],d)})(),e(t);const n=`#accordion-content-${u}-${l.name} > div.form-field:last-child`,o=document.querySelector(n);ie().then((()=>{const e=`#accordion-content-${u}-${l.name} textarea`;Array.from(document.querySelectorAll(e)).forEach(C)})).then((()=>o.scrollIntoView({behavior:"smooth",block:"end"})))},async({detail:{className:e,itemName:t,value:i}})=>{if(k.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===className+"."+l.name))),!i)return;const o={[t]:!0},r=await n.getSectionView(e,o);r?.length&&k.set(e,r[0])},()=>{setTimeout((()=>{Array.from(k).forEach((([e,t])=>{d[l.name][e]||i(0,d[l.name][e]=t._id,d)}))}),500)},a,y,x,function(t){Y(e,t)}]}class xi extends _e{constructor(e){var t;super(),mi.getElementById("svelte-148ktt9-style")||((t=L("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}}",S(mi.head,t)),Ie(this,e,bi,wi,k,{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:ki}=ve;function Ii(e){e[0]=e[23].list,e[22]=e[23].items}function _i(e,t,n){const i=e.slice();return i[24]=t[n],i}function Si(e,t,n){const i=e.slice();return i[27]=t[n],i}function Ci(e,t,n){const i=e.slice();return i[27]=t[n],i}function Ei(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ni(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v;function y(t){e[19](t)}Ii(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Li]},$$scope:{ctx:e}}}),n.$on("click",e[18]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),K.push((()=>we(s,"value",y))),s.$on("input",e[12]),d=new We({props:{size:"18"}});let b=e[22]?.length&&function(e){let t,n,i=e[22],o=[];for(let t=0;t<i.length;t+=1)o[t]=qi(Ci(e,i,t));return{c(){t=L("thead"),n=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();V(n,"class","svelte-14hcfjl"),V(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(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 s=Ci(e,i,r);o[r]?o[r].p(s,t):(o[r]=qi(s),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&&E(t),N(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]=Fi(_i(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 s=_i(e,n,r);i[r]?i[r].p(s,o):(i[r]=Fi(s),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){N(i,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),o=L("div"),r=j("Suchen: "),be(s.$$.fragment),a=D(),c=L("span"),be(d.$$.fragment),u=D(),m=L("div"),f=L("table"),b&&b.c(),p=D(),h=L("tbody"),x&&x.c(),V(t,"class","form--buttons svelte-14hcfjl"),V(c,"class","feather pointer svelte-14hcfjl"),O(o,"margin-bottom","1em"),O(o,"position","relative"),V(f,"striped",""),V(f,"class","svelte-14hcfjl"),V(m,"class","eList svelte-14hcfjl")},m(l,y){C(l,t,y),xe(n,t,null),C(l,i,y),C(l,o,y),S(o,r),xe(s,o,null),S(o,a),S(o,c),xe(d,c,null),C(l,u,y),C(l,m,y),S(m,f),b&&b.m(f,null),S(f,p),S(f,h),x&&x.m(h,null),$=!0,g||(v=T(c,"click",e[14]),g=!0)},p(e,t){Ii(e);const i={};2&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!l&&2&t[0]&&(l=!0,o.value=e[1],re((()=>l=!1))),s.$set(o),e[22]?.length&&b.p(e,t),e[0]?.length&&x.p(e,t)},i(e){$||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),$=!0)},o(e){he(n.$$.fragment,e),he(s.$$.fragment,e),he(d.$$.fragment,e),$=!1},d(e){e&&E(t),ke(n),e&&E(i),e&&E(o),ke(s),ke(d),e&&E(u),e&&E(m),b&&b.d(),x&&x.d(),g=!1,v()}}}function Li(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function qi(e){let t,n,i=e[27]?.designation+"";return{c(){t=L("th"),n=j(i),V(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function ji(e){let t,n,i=e[22],o=[];for(let t=0;t<i.length;t+=1)o[t]=Di(Si(e,i,t));return{c(){t=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();n=D(),V(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);S(t,n)},p(e,r){if(3584&r[0]){let s;for(i=e[22],s=0;s<i.length;s+=1){const l=Si(e,i,s);o[s]?o[s].p(l,r):(o[s]=Di(l),o[s].c(),o[s].m(t,n))}for(;s<o.length;s+=1)o[s].d(1);o.length=i.length}},d(e){e&&E(t),N(o,e)}}}function Di(e){let t,n,i,o,r=e[9](e[24],e[27])+"";return{c(){t=L("td"),n=j(r),V(t,"class","svelte-14hcfjl")},m(r,s){C(r,t,s),S(t,n),i||(o=T(t,"click",A(e[10](e[24]))),i=!0)},p(t,n){e=t},d(e){e&&E(t),i=!1,o()}}}function Fi(e){let t,n=e[13](e[24],e[22],e[1]),i=n&&ji(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=ji(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&E(t)}}}function Ti(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function zi(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:Ti,then:Ni,catch:Ei,value:23,blocks:[,,,]};return $e(e[11](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function Ai(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[zi]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Vi(e,t,i){const o=Q(),{Dialog:r,Divider:s,Loading:l,TextField:a,Button:d}=c;let{item:u}=t,{className:m}=t,{classId:p}=t,{list:$}=t,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?h(n):f(e[`_${t.name}`]||e[t.name]||"")},w=n.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,$=e.list)},[$,g,o,r,s,l,a,d,v,y,e=>()=>o("choose",{row:e}),async()=>{const e=await w,t=e.display;let n=Dt(t,e,$);return{list:$,items:n}},({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 Mi extends _e{constructor(e){var t;super(),ki.getElementById("svelte-14hcfjl-style")||((t=L("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}",S(ki.head,t)),Ie(this,e,Vi,Ai,k,{item:15,className:16,classId:17,list:0},[-1,-1])}}const{document:Bi}=ve;function Oi(e,t,n){const i=e.slice();return i[11]=t[n],i}function Pi(e,t,n){const i=e.slice();return i[3]=t[n],i}function Wi(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ri(e){let t,n,i,o=e[7].items,r=[];for(let t=0;t<o.length;t+=1)r[t]=Yi(Pi(e,o,t));const s=e=>he(r[e],1,1,(()=>{r[e]=null}));let l=e[7].list&&Ji(e);return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=D(),l&&l.c(),n=F()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);C(e,t,o),l&&l.m(e,o),C(e,n,o),i=!0},p(e,i){if(5161959&i[0]){let n;for(o=e[7].items,n=0;n<o.length;n+=1){const s=Pi(e,o,n);r[n]?(r[n].p(s,i),pe(r[n],1)):(r[n]=Yi(s),r[n].c(),pe(r[n],1),r[n].m(t.parentNode,t))}for(me(),n=o.length;n<r.length;n+=1)s(n);fe()}e[7].list?l?(l.p(e,i),128&i[0]&&pe(l,1)):(l=Ji(e),l.c(),pe(l,1),l.m(n.parentNode,n)):l&&(me(),he(l,1,1,(()=>{l=null})),fe())},i(e){if(!i){for(let e=0;e<o.length;e+=1)pe(r[e]);pe(l),i=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)he(r[e]);he(l),i=!1},d(e){N(r,e),e&&E(t),l&&l.d(e),e&&E(n)}}}function Ui(e){let t,n,i,o;const r=[Gi,Hi],s=[];function l(e,t){return e[3].name!==e[14]||e[15]?"lookup"!==e[3].properties?.format?1:-1:0}return~(t=l(e))&&(n=s[t]=r[t](e)),{c(){n&&n.c(),i=F()},m(e,n){~t&&s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?~t&&s[t].p(e,o):(n&&(me(),he(s[a],1,1,(()=>{s[a]=null})),fe()),~t?(n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i)):n=null)},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){~t&&s[t].d(e),e&&E(i)}}}function Hi(e){let t,n;return t=new pl({props:{classId:e[8],item:e[3],record:e[6],disabled:e[3].name===e[14]&&e[15]||e[0],eventId:e[5],currency:e[2],changeValue:e[9]}}),t.$on("notify",e[17]),t.$on("multi",e[18]),t.$on("defPrep",e[19]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};256&n[0]&&(i.classId=e[8]),128&n[0]&&(i.item=e[3]),64&n[0]&&(i.record=e[6]),129&n[0]&&(i.disabled=e[3].name===e[14]&&e[15]||e[0]),32&n[0]&&(i.eventId=e[5]),4&n[0]&&(i.currency=e[2]),512&n[0]&&(i.changeValue=e[9]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Gi(e){let t,n,i,o;n=new pl({props:{classId:e[8],item:e[3],record:e[6],disabled:e[0]||!!e[1],required:!0,eventId:e[5],currency:e[2],changeValue:e[9]}}),n.$on("notify",e[17]),n.$on("multi",e[18]),n.$on("defPrep",e[19]);let r=e[1]&&Qi(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),r&&r.c(),O(t,"padding-top",".25em"),O(t,"background-color","lightyellow"),O(t,"position","relative")},m(e,s){C(e,t,s),xe(n,t,null),S(t,i),r&&r.m(t,null),o=!0},p(e,i){const o={};256&i[0]&&(o.classId=e[8]),128&i[0]&&(o.item=e[3]),64&i[0]&&(o.record=e[6]),3&i[0]&&(o.disabled=e[0]||!!e[1]),32&i[0]&&(o.eventId=e[5]),4&i[0]&&(o.currency=e[2]),512&i[0]&&(o.changeValue=e[9]),n.$set(o),e[1]?r?(r.p(e,i),2&i[0]&&pe(r,1)):(r=Qi(e),r.c(),pe(r,1),r.m(t,null)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){o||(pe(n.$$.fragment,e),pe(r),o=!0)},o(e){he(n.$$.fragment,e),he(r),o=!1},d(e){e&&E(t),ke(n),r&&r.d()}}}function Qi(e){let t,n,i,o,r;return n=new We({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather2 pointer svelte-16mo2c")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[22]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Yi(e){let t,n,i="list"!==e[3].type&&Ui(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[3].type?i?(i.p(e,n),128&n[0]&&pe(i,1)):(i=Ui(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Ji(e){let t,n,i=e[7].list,o=[];for(let t=0;t<i.length;t+=1)o[t]=Zi(Oi(e,i,t));const r=e=>he(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(485&n[0]){let s;for(i=e[7].list,s=0;s<i.length;s+=1){const r=Oi(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=Zi(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function Ki(e){let t,n,i,o;return t=new e[12]({props:{text:e[11].designation}}),i=new xi({props:{classId:e[8],list:e[11],eventId:e[5],schema:e[11].item,record:e[6],disabled:e[0],currency:e[2],update:!0}}),{c(){be(t.$$.fragment),n=D(),be(i.$$.fragment)},m(e,r){xe(t,e,r),C(e,n,r),xe(i,e,r),o=!0},p(e,n){const o={};128&n[0]&&(o.text=e[11].designation),t.$set(o);const r={};256&n[0]&&(r.classId=e[8]),128&n[0]&&(r.list=e[11]),32&n[0]&&(r.eventId=e[5]),128&n[0]&&(r.schema=e[11].item),64&n[0]&&(r.record=e[6]),1&n[0]&&(r.disabled=e[0]),4&n[0]&&(r.currency=e[2]),i.$set(r)},i(e){o||(pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!0)},o(e){he(t.$$.fragment,e),he(i.$$.fragment,e),o=!1},d(e){ke(t,e),e&&E(n),ke(i,e)}}}function Zi(e){let t,n,i="array"!==e[11].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){"array"!==e[11].type?i?(i.p(e,n),128&n[0]&&pe(i,1)):(i=Ki(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Xi(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function eo(e){let t,n;return t=new Mi({props:{item:e[3],className:e[4],classId:e[8],list:e[11]}}),t.$on("choose",e[20]),t.$on("back",e[21]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8&n[0]&&(i.item=e[3]),16&n[0]&&(i.className=e[4]),256&n[0]&&(i.classId=e[8]),2048&n[0]&&(i.list=e[11]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function to(e){let t,n,i=e[10]&&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[10]?i?(i.p(e,n),1024&n[0]&&pe(i,1)):(i=eo(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function no(e){let t,n,i,o,r,s,l={ctx:e,current:null,token:null,hasCatch:!1,pending:Xi,then:Ri,catch:Wi,value:52,blocks:[,,,]};function a(t){e[28](t)}$e(e[16](),l),n=new e[12]({});let c={class:"tModal",noClickaway:!0,$$slots:{default:[to]},$$scope:{ctx:e}};return void 0!==e[10]&&(c.open=e[10]),o=new e[13]({props:c}),K.push((()=>we(o,"open",a))),{c(){l.block.c(),t=D(),be(n.$$.fragment),i=D(),be(o.$$.fragment)},m(e,r){l.block.m(e,l.anchor=r),l.mount=()=>t.parentNode,l.anchor=t,C(e,t,r),xe(n,e,r),C(e,i,r),xe(o,e,r),s=!0},p(t,n){ge(l,e=t,n);const i={};3352&n[0]|67108864&n[1]&&(i.$$scope={dirty:n,ctx:e}),!r&&1024&n[0]&&(r=!0,i.open=e[10],re((()=>r=!1))),o.$set(i)},i(e){s||(pe(l.block),pe(n.$$.fragment,e),pe(o.$$.fragment,e),s=!0)},o(e){for(let e=0;e<3;e+=1){he(l.blocks[e])}he(n.$$.fragment,e),he(o.$$.fragment,e),s=!1},d(e){l.block.d(e),l.token=null,l=null,e&&E(t),ke(n,e),e&&E(i),ke(o,e)}}}function io(e,t,i){const{Divider:o,FormField:r,Modal:s}=c,l=Q();let a,d,u,m,f,{required:p}=t,{disabled:h}=t,{readonly:$}=t,{id:g}=t,{item:v}=t,{value:y}=t,{refValue:w}=t,{currency:b}=t,x={},k=[],I=[],_={},S=new Map,C=!1,E="";const N=v.checkOn,L=y,q=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?"!":""})}))},j=()=>{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)})}))},D=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:s}=e;if(!n)break;let l,a,c=!o&&x[n];const u=x[n];u&&o&&(c=(await Oa(n,u))[o]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===r&&(c=!c),"required"!==s&&"readonly"!==s||(s="required"===s?s:"disabled",setTimeout((()=>{l=`#${d} .form-field.${t} .field textarea`,a=document.querySelector(l),a||(l=`#${d} .form-field.${t} .field input`,a=document.querySelector(l)),a&&c&&a.setAttribute(s,""),a&&!c&&a.removeAttribute(s)}),0)),"hidden"===s&&(l=`#${d} .form-field.${t}`,a=document.querySelector(l),a?.classList?.toggle("hidden",!!c),c&&i(9,_[t]="",_))}}};H((()=>{F()}));const F=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=>D(e)))})(),T())},T=()=>{setTimeout((()=>{Array.from(S).forEach((([e,t])=>{x[e]||i(6,x[e]=t._id,x)}))}),250)},z=async e=>{if(!e.value)return void V();const t={[e.itemName]:{$regex:`(?i)${e.value}`}},o=await n.getSectionView(u,t);o?.length?(i(11,E=o),i(10,C=!0)):(i(1,y=""),i(23,w=""),l("setRefValue",w))},A=()=>{i(10,C=!1)},V=()=>{i(1,y=""),i(23,w=y),i(6,x={}),l("setRefValue",w)};return e.$$set=e=>{"required"in e&&i(24,p=e.required),"disabled"in e&&i(0,h=e.disabled),"readonly"in e&&i(25,$=e.readonly),"id"in e&&i(26,g=e.id),"item"in e&&i(3,v=e.item),"value"in e&&i(1,y=e.value),"refValue"in e&&i(23,w=e.refValue),"currency"in e&&i(2,b=e.currency)},e.$$.update=()=>{33554433&e.$$.dirty[0]&&i(0,h=h||$),134217840&e.$$.dirty[0]&&x&&l("safeReference",{record:x,class:u,event:m,taskId:f})},[h,y,b,v,u,m,x,a,d,_,C,E,o,s,N,L,async()=>{try{if(y){const e=await n.getTask(v.refClass,y);delete e._task,i(6,x=e),i(27,f=(await n.getTaskByDocId(e._id))._id)}else i(6,x={})}catch{}return i(7,a=await n.getSchemaByClass(v.refClass)),i(8,d="form-"+a.class+Math.floor(9e3*Math.random()+1e3).toString()),i(4,u=a.class),a.identity.designation,i(5,m=a.id),["readonly","hidden","required"].map(q),j(),!0},async({detail:e})=>{const{itemName:t,value:n}=e;if(i(6,x[t]=n,x),t===N)return z(e);D(t)},async({detail:e})=>{if(!(a.input?.length&&a.input.length>1))return;if(prevSchema?.class!==a.input[0])return;const{value:t,lookup:o,view:r}=e,[s]=o.split(":"),l=(await n.getSectionView(s,{[r]:{$in:t}})).map((e=>e._id));for(const e of a.input.slice(1)){i(6,x[e]=[],x);const t=await n.getSchemaByClass(e);t.id;let o=await n.getTasks(t.id);if(o=o.data.filter((e=>"Ready"===e._task?.status&&l.includes(e[s]))),o?.length){const t=o.map((e=>e._id)),r=await n.getSectionView(e,{_id:{$in:t}});for(const t of r)t[e]=t._id;i(6,x[e]=r,x)}}},async({detail:{className:e,itemName:t,value:i}})=>{if(S.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===u))),!i)return;const o={[t]:!0},r=await n.getSectionView(e,o);r?.length&&S.set(e,r[0])},async({detail:e})=>{const t=await n.getSectionView(u,{_id:e.row._id});t?.length&&(i(1,y=t[0]._id),i(23,w=y),l("setRefValue",w),i(6,x=t[0])),A()},A,V,w,p,$,g,f,function(e){C=e,i(10,C)}]}class oo extends _e{constructor(e){var t;super(),Bi.getElementById("svelte-16mo2c-style")||((t=L("style")).id="svelte-16mo2c-style",t.textContent=".feather2.svelte-16mo2c{position:absolute;top:1em;right:0.5em;color:#4300b0}",S(Bi.head,t)),Ie(this,e,io,no,k,{required:24,disabled:0,readonly:25,id:26,item:3,value:1,refValue:23,currency:2},[-1,-1])}}function ro(e){let t,n=e[11]&&function(e){let t,n;return{c(){t=L("span"),n=j(e[4]),V(t,"class","item")},m(e,i){C(e,t,i),S(t,n)},p(e,t){16&t[0]&&M(n,e[4])},d(e){e&&E(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&&E(t)}}}function so(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:[ro]},$$scope:{ctx:e}}}),n.$on("change",e[14]),n.$on("focus",e[15]),{c(){t=L("div"),be(n.$$.fragment),O(t,"position","relative"),O(t,"max-width","10em")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p(e,t){const i={};6&t[0]&&(i.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t[0]&&(i.id=e[0]),1&t[0]&&(i.name=e[0]),256&t[0]&&(i.value=e[8]),64&t[0]&&(i.pattern=e[6]),128&t[0]&&(i.readonly=e[7]),8&t[0]&&(i.disabled=e[3]),32&t[0]&&(i.required=e[5]),16&t[0]|2&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i)},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function lo(e,n,i){let o;const r=Q(),{TextField:s}=c;let{id:l}=n,{item:a}=n,{value:d}=n,{noForm:u=!1}=n,{classId:m}=n,{disabled:f}=n,{formnovalidate:p}=n,{currency:h}=n,{praefix:$}=n,{notifyList:g}=n;const v=JSON.parse(t.getItem("Locale")),y=["price","amount","amountValue","taxValue","__total"].find((e=>e===a.name?.split("-")[0])),w=Number("1.1").toLocaleString(v.id).substring(1,2),{properties:b={}}=a;let{min:x,max:k,step:I,pattern:_,decimals:S=0,unit:C="",placeholder:E,hint:N,readonly:L,negative:q,required:j=!1}=b;L=!0===L||void 0;_||(_=S?`[0-9]+([${w}][0-9]{1,${S}})?`:"[0-9]*"),q&&(_="-?"+_);return e.$$set=e=>{"id"in e&&i(0,l=e.id),"item"in e&&i(16,a=e.item),"value"in e&&i(17,d=e.value),"noForm"in e&&i(1,u=e.noForm),"classId"in e&&i(2,m=e.classId),"disabled"in e&&i(3,f=e.disabled),"formnovalidate"in e&&i(18,p=e.formnovalidate),"currency"in e&&i(4,h=e.currency),"praefix"in e&&i(19,$=e.praefix),"notifyList"in e&&i(20,g=e.notifyList)},e.$$.update=()=>{262176&e.$$.dirty[0]&&i(5,j=j&&!p),131072&e.$$.dirty[0]&&i(8,o=Number(d.toString().replace(w,".")).toFixed(S).toString().replace(".",w)),1048576&e.$$.dirty[0]&&(async()=>{if(void 0===$)return;const e=a.properties?.value?.formula;"$multiply"===e?.operator&&r("formula",{item:a})})()},[l,u,m,f,h,j,_,L,o,s,v,y,I,E,({detail:e})=>r("blur",{value:e.value}),({detail:e})=>{L||Number(d.toString().replace(w,"."))||i(8,o="")},a,d,p,$,g]}class ao extends _e{constructor(e){super(),Ie(this,e,lo,so,k,{id:0,item:16,value:17,noForm:1,classId:2,disabled:3,formnovalidate:18,currency:4,praefix:19,notifyList:20},[-1,-1])}}const{document:co}=ve;function uo(e){e[33]=e[35].list,e[34]=e[35].items}function mo(e,t,n){const i=e.slice();return i[36]=t[n],i[38]=n,i}function fo(e,t,n){const i=e.slice();return i[39]=t[n],i[41]=n,i}function po(e,t,n){const i=e.slice();return i[39]=t[n],i}function ho(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function $o(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v,y;uo(e),n=new e[8]({props:{outline:!0,$$slots:{default:[go]},$$scope:{ctx:e}}}),n.$on("click",e[30]);let w=!e[1]&&vo(e);function b(t){e[31](t)}let x={id:e[11]};void 0!==e[2]&&(x.value=e[2]),l=new e[6]({props:x}),K.push((()=>we(l,"value",b))),l.$on("input",e[14]),u=new We({props:{size:"18"}});let k=e[34]?.length&&function(e){let t,n,i,o,r=!e[1]&&wo(e),s=e[34],l=[];for(let t=0;t<s.length;t+=1)l[t]=bo(po(e,s,t));return{c(){t=L("thead"),n=L("tr"),r&&r.c(),i=D();for(let e=0;e<l.length;e+=1)l[e].c();V(n,"class","svelte-1m010ne"),V(t,"class","svelte-1m010ne")},m(e,s){C(e,t,s),S(t,n),r&&r.m(n,null),S(n,i);for(let e=0;e<l.length;e+=1)l[e].m(n,null);o=!0},p(e,t){if(e[1]?r&&(me(),he(r,1,1,(()=>{r=null})),fe()):r?(r.p(e,t),2&t[0]&&pe(r,1)):(r=wo(e),r.c(),pe(r,1),r.m(n,i)),8192&t[0]){let i;for(s=e[34],i=0;i<s.length;i+=1){const o=po(e,s,i);l[i]?l[i].p(o,t):(l[i]=bo(o),l[i].c(),l[i].m(n,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=s.length}},i(e){o||(pe(r),o=!0)},o(e){he(r),o=!1},d(e){e&&E(t),r&&r.d(),N(l,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]=So(mo(e,i,t));const r=e=>he(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 s;for(i=e[33],s=0;s<i.length;s+=1){const r=mo(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=So(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),w&&w.c(),o=D(),r=L("div"),s=j("Suchen: "),be(l.$$.fragment),c=D(),d=L("span"),be(u.$$.fragment),m=D(),f=L("div"),p=L("table"),k&&k.c(),h=D(),$=L("tbody"),I&&I.c(),V(t,"class","form--buttons svelte-1m010ne"),V(d,"class","feather pointer svelte-1m010ne"),O(r,"margin-bottom","1em"),O(r,"position","relative"),V(p,"striped",""),V(p,"class","svelte-1m010ne"),V(f,"class","eList svelte-1m010ne")},m(a,b){C(a,t,b),xe(n,t,null),S(t,i),w&&w.m(t,null),C(a,o,b),C(a,r,b),S(r,s),xe(l,r,null),S(r,c),S(r,d),xe(u,d,null),C(a,m,b),C(a,f,b),S(f,p),k&&k.m(p,null),S(p,h),S(p,$),I&&I.m($,null),g=!0,v||(y=T(d,"click",e[16]),v=!0)},p(e,i){uo(e);const o={};8192&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o),e[1]?w&&(me(),he(w,1,1,(()=>{w=null})),fe()):w?(w.p(e,i),2&i[0]&&pe(w,1)):(w=vo(e),w.c(),pe(w,1),w.m(t,null));const r={};!a&&4&i[0]&&(a=!0,r.value=e[2],re((()=>a=!1))),l.$set(r),e[34]?.length&&k.p(e,i),e[33]?.length&&I.p(e,i)},i(e){g||(pe(n.$$.fragment,e),pe(w),pe(l.$$.fragment,e),pe(u.$$.fragment,e),pe(k),pe(I),g=!0)},o(e){he(n.$$.fragment,e),he(w),he(l.$$.fragment,e),he(u.$$.fragment,e),he(k),he(I),g=!1},d(e){e&&E(t),ke(n),w&&w.d(),e&&E(o),e&&E(r),ke(l),ke(u),e&&E(m),e&&E(f),k&&k.d(),I&&I.d(),v=!1,y()}}}function go(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function vo(e){let t,n;return t=new e[8]({props:{disabled:!e[33].length,filled:!0,$$slots:{default:[yo]},$$scope:{ctx:e}}}),t.$on("click",e[17](e[33])),{c(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function yo(e){let t;return{c(){t=j("Bestätigen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function wo(e){let t,n,i,o,r;return n=new Fe({props:{size:"20"}}),{c(){t=L("th"),be(n.$$.fragment),V(t,"class","svelte-1m010ne")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[18](e[33])),o=!0)},p(t,n){e=t},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function bo(e){let t,n,i=e[39]+"";return{c(){t=L("th"),n=j(i),V(t,"class","svelte-1m010ne")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function xo(e){let t,n,i,o,r,s,l,a=e[0],c=Io(e),d=e[34],u=[];for(let t=0;t<d.length;t+=1)u[t]=_o(fo(e,d,t));return{c(){t=L("tr"),c.c(),n=D();for(let e=0;e<u.length;e+=1)u[e].c();i=D(),V(t,"style",o=e[1]?"cursor: default;":"cursor: zoom-in;"),V(t,"title","übernimmt den Wert direkt"),V(t,"class","svelte-1m010ne"),P(t,"active",e[0].includes(e[36]))},m(o,a){C(o,t,a),c.m(t,null),S(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);S(t,i),r=!0,s||(l=T(t,"click",e[19](e[36])),s=!0)},p(s,l){if(e=s,1&l[0]&&k(a,a=e[0])?(me(),he(c,1,1,v),fe(),c=Io(e),c.c(),pe(c),c.m(t,n)):c.p(e,l),8200&l[0]){let n;for(d=e[34],n=0;n<d.length;n+=1){const o=fo(e,d,n);u[n]?u[n].p(o,l):(u[n]=_o(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&l[0]&&o!==(o=e[1]?"cursor: default;":"cursor: zoom-in;"))&&V(t,"style",o),8193&l[0]&&P(t,"active",e[0].includes(e[36]))},i(e){r||(pe(c),r=!0)},o(e){he(c),r=!1},d(e){e&&E(t),c.d(e),N(u,e),s=!1,l()}}}function ko(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=L("td"),be(n.$$.fragment),V(t,"title","Wählt den Wert aus"),V(t,"class","svelte-1m010ne")},m(e,o){C(e,t,o),xe(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||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function Io(e){let t,n,i=!e[1]&&ko(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&&(me(),he(i,1,1,(()=>{i=null})),fe()):i?(i.p(e,n),2&n[0]&&pe(i,1)):(i=ko(e),i.c(),pe(i,1),i.m(t.parentNode,t))},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function _o(e){let t,n,i=(e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"";return{c(){t=L("td"),n=j(i),V(t,"class","svelte-1m010ne")},m(e,i){C(e,t,i),S(t,n)},p(e,t){8&t[0]&&i!==(i=(e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"")&&M(n,i)},d(e){e&&E(t)}}}function So(e){let t,n,i=e[15](e[36],e[2]),o=i&&xo(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]&&pe(o,1)):(o=xo(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function Co(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Eo(e){let t,n,i,o;t=new e[9]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:Co,then:$o,catch:ho,value:35,blocks:[,,,]};return $e(e[13](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function No(e){let t,n;return t=new e[7]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Eo]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Lo(e,t,i){const o=Q(),{Loading:r,TextField:s,Dialog:l,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=t,{id:f}=t,{selection:p}=t,{refDoc:h}=t,{tableName:$}=t,{idName:g}=t,{target:v}=t,{view:y}=t,{unique:w}=t,{uniqueView:b}=t,{status:x}=t,{single:k}=t;p||=[];let I="",_=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",S=[];const C=$+g+v+"checkbox",E=(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,h=e.refDoc),"tableName"in e&&i(24,$=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,w=e.unique),"uniqueView"in e&&i(28,b=e.uniqueView),"status"in e&&i(29,x=e.status),"single"in e&&i(1,k=e.single)},[p,k,I,S,o,r,s,l,a,d,u,_,C,async()=>{let e=[],t=[],o={};if(i(3,S=[]),g)if(y){if(f){const t=m.split("-")[1].slice(0,-4),i="input."+m+"[name='_id']",r=document.querySelector(i).value;o={[g]:f},x&&(o.$or=[{status:!0},{[t]:r}]),e=await n.getSectionView($,o),e=e.sort(((e,n)=>{const i=e=>(e[t]||"z").toString()+e[v];return E(i(e),i(n))}))}}else b?f&&(o={[g]:f,status:!0},Object.entries(b).map((([e,n])=>{n?.length&&(o[e]={$in:n}),t.push(e)})),e=await n.getSectionView($,o),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return E(n(e),n(t))})),i(3,S=e.map((e=>{const n=[e[v]];return t.map((t=>n.push(e[t]))),n})))):w?(e=await n.getSection($,g,f,w),e=e.sort(((e,t)=>E(e,t)))):(e=await n.getSection($,g,f,!1,x),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return E(n(e),n(t))})));else o={},f&&!Array.isArray(f)&&(o._id=f),e=await n.getSectionView($,o);const r=await n.getSchemaByClass($),s=[];if(h){const t=r.items[0].name,n=r.items[1].name,o=r.list[0].name,s=e.find((e=>e[t]===h));e=s?s[o]:[],i(20,v=n)}e.map((e=>{let t=e[v];if(t||$!==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(", ")),s.push(t||[])}else s.push(t||[])}));const l=r.items.find((e=>e.name===v))?.designation;return t=t.map((e=>r.items.find((t=>t.name===e))?.designation)),{list:s.flat(),items:[l,...t]}},({detail:{value:e}})=>{i(2,I=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{i(2,I="")},e=>()=>{const t=document.getElementsByName(C),n=[];t.forEach(((t,i)=>{t.checked&&n.push(e[+t.attributes.data.value])})),o("choose",{list:n})},e=>()=>{document.getElementsByName(C).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,w,b,x,()=>o("back"),function(e){I=e,i(2,I)}]}class qo extends _e{constructor(e){var t;super(),co.getElementById("svelte-1m010ne-style")||((t=L("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}",S(co.head,t)),Ie(this,e,Lo,No,k,{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:jo}=ve;function Do(e){let t,n,i,o,r,s=e[7].length+"";return{c(){t=L("span"),n=j("("),i=j(s),o=j(")"),V(t,"class",r=_(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,n){128&n[0]&&s!==(s=e[7].length+"")&&M(i,s),2&n[0]&&r!==(r=_(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&V(t,"class",r)},d(e){e&&E(t)}}}function Fo(e){let t;return{c(){t=L("div"),V(t,"class","load-more-options"),V(t,"slot","load-more-options-message")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function To(e){let t,n,i,o;const r=[Vo,Ao,zo],s=[];function l(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=l(e))&&(n=s[t]=r[t](e)),{c(){n&&n.c(),i=F()},m(e,n){~t&&s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?~t&&s[t].p(e,o):(n&&(me(),he(s[a],1,1,(()=>{s[a]=null})),fe()),~t?(n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i)):n=null)},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){~t&&s[t].d(e),e&&E(i)}}}function zo(e){let t,n,i,o,r;return n=new qe({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"title","Übernehmen"),V(t,"class","feather pointer svelte-1rbaejz")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[26]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Ao(e){let t,n,i,o,r;return n=new Ae({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"title",e[17].title||"Generieren"),V(t,"class","feather pointer svelte-1rbaejz")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[25]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Vo(e){let t,n,i,o,r;return n=new We({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"title","Löschen"),V(t,"class","feather pointer svelte-1rbaejz")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[27]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Mo(e){let t,n,i;function o(t){e[37](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[Bo]},$$scope:{ctx:e}};return void 0!==e[10]&&(r.open=e[10]),t=new e[11]({props:r}),K.push((()=>we(t,"open",o))),{c(){be(t.$$.fragment)},m(e,n){xe(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],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function Bo(e){let t,n;return t=new qo({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(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Oo(e){let t,n,i,o,r,s,l,a,c,d=!e[16].single&&e[7]?.length&&Do(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:Po,minSearchLength:"3",$$slots:{"load-more-options-message":[Fo]},$$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((()=>we(i,"selection",u))),K.push((()=>we(i,"maxOptions",m))),i.$on("change",e[22]);let p=!e[1]&&To(e),h=e[10]&&Mo(e);return{c(){t=L("div"),d&&d.c(),n=D(),be(i.$$.fragment),s=D(),p&&p.c(),l=D(),h&&h.c(),a=F(),O(t,"position","relative")},m(e,o){C(e,t,o),d&&d.m(t,null),S(t,n),xe(i,t,null),S(t,s),p&&p.m(t,null),C(e,l,o),h&&h.m(e,o),C(e,a,o),c=!0},p(e,s){!e[16].single&&e[7]?.length?d?d.p(e,s):(d=Do(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const l={};8&s[0]&&(l.id=e[3]),8&s[0]&&(l.name=e[3]),8&s[0]&&(l.class=e[3]),2&s[0]&&(l.disabled=e[1]),64&s[0]&&(l.required=e[6]),256&s[0]&&(l.placeholder=e[8]),32768&s[1]&&(l.$$scope={dirty:s,ctx:e}),!o&&128&s[0]&&(o=!0,l.selection=e[7],re((()=>o=!1))),!r&&512&s[0]&&(r=!0,l.maxOptions=e[9],re((()=>r=!1))),i.$set(l),e[1]?p&&(me(),he(p,1,1,(()=>{p=null})),fe()):p?(p.p(e,s),2&s[0]&&pe(p,1)):(p=To(e),p.c(),pe(p,1),p.m(t,null)),e[10]?h?(h.p(e,s),1024&s[0]&&pe(h,1)):(h=Mo(e),h.c(),pe(h,1),h.m(a.parentNode,a)):h&&(me(),he(h,1,1,(()=>{h=null})),fe())},i(e){c||(pe(i.$$.fragment,e),pe(p),pe(h),c=!0)},o(e){he(i.$$.fragment,e),he(p),he(h),c=!1},d(e){e&&E(t),d&&d.d(),ke(i),p&&p.d(),e&&E(l),h&&h.d(e),e&&E(a)}}}async function*Po(e){yield[{name:e}]}function Wo(e,t,i){const o=Q(),{Modal:r,Autocomplete:s}=c;let{classId:l}=t,{id:a}=t,{item:d}=t,{record:u}=t,{value:m}=t,{noForm:f=!1}=t,{disabled:p}=t,{formnovalidate:h}=t,{numberInput:$}=t,{praefix:g}=t,{toDelete:v}=t,{reqQuantity:y}=t,{notifyList:w}=t;const{properties:b={}}=d;let{placeholder:x,hint:k,readonly:I,required:_=!1,lookup:S="",view:C=!1,multi:E,max:N=1e3,generate:L=!1,status:q=!0,refDoc:j}=b;const[D,F]=S.split(":");let T=!1,z=m.map&&m.map((e=>({name:e})))||[];p||=I,p&&(x="");const A=({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),i(7,z=t.map((e=>({name:e.trim()})))),o("blur",{value:z.map((e=>e.name))}),o("multi",{view:E.view,lookup:S,name:d.name,value:z.map((e=>e.name))})};H((async()=>{const e=document.getElementById(a);e.classList.add(l),!I&&S&&e.addEventListener("focus",V)}));const V=()=>{if(S){document.getElementById(a).blur();const e=y||N;(E.unique||z.length<e)&&i(10,T=!0)}},M=()=>{i(10,T&&=!1)},B=({detail:e})=>{i(7,z=e.list.map((e=>({name:e})))),o("blur",{value:e.list}),o("multi",{view:E.view,lookup:S,name:d.name,value:e.list}),M()},O=async()=>{const e={[F]:u[F]},t=await n.getSectionView(D,e),i=Array.from({length:t.length},((e,n)=>t[n][d.name]));B({detail:{name:d.name,list:i}})},P=(e=!1)=>{if(p||!E.required)return;const t=E.maxItem;if(!t||E.unique)return;i(9,N=!1!==e?e:y||u[t]||0);const n=z?.length!=N,r=document.getElementById(a);r?.classList?.toggle("invalid",n),o("invalid",{idx:g,value:n})};return e.$$set=e=>{"classId"in e&&i(2,l=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,h=e.formnovalidate),"numberInput"in e&&i(30,$=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,w=e.notifyList)},e.$$.update=()=>{48&e.$$.dirty[0]&&u&&""===u[d.name]&&i(7,z=[]),48&e.$$.dirty[0]&&u&&Array.isArray(u[d.name])&&i(7,z=u[d.name].map((e=>({name:e})))),16&e.$$.dirty[0]|2&e.$$.dirty[1]&&v&&v===d.name&&i(7,z=[]),128&e.$$.dirty[0]&&z&&(i(0,m=z.map&&z.map((e=>e.name))||[]),P()),1073741824&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:i}=e;void 0!==g&&g!==i||t&&t.name===E.maxItem&&P(n)})($),536870976&e.$$.dirty[0]&&i(6,_=_&&!h),8&e.$$.dirty[1]&&(async e=>{if(void 0===g)return;const{itemName:t,value:r}=e||{};if(!r)return;if(d.refItem?.split(".")[0]!==t)return;let[s,l]=d.refItem.split(".");if(Array.isArray(r)){if(s=s.slice(0,-1),!r.length)return o("record",{itemName:"quantity",value:0}),void i(7,z=[]);const e={_id:{$in:r}},t=await n.getSectionView(s,e);let a=[];for(const e of t)e[l]&&(a=a.concat(e[l][0][d.name]));if(!a.length)return;o("record",{itemName:"quantity",value:a.length}),i(7,z=a.map((e=>({name:e})))),A({detail:{value:z}})}else{const e=await n.getTask(s,r);if(!e||!e[l])return;const t=e[l];if(!Array.isArray(t)&&!t.length)return;const a=t[g][d.name];o("record",{itemName:"quantity",value:a?.length||0}),i(7,z=a&&a.map((e=>({name:e}))))}setTimeout(P,250)})(w)},[m,p,l,a,d,u,_,z,x,N,T,r,s,I,S,C,E,L,q,j,D,F,A,M,B,()=>{const e=u[L.itemQuantity]||y;if(!e)return;const t=L.prefix||"",n=u[L.variable]||"",i=L.len||5,o=Array.from({length:e},((e,o)=>t+n+"-"+o.toString().padStart(i,"0")));B({detail:{name:d.name,list:o}})},async()=>{if(!0===C)return O();const e=y||u[E.maxItem];if(!e)return;let t={};F&&(t={[F]:u[F]}),q&&(t.status=!0);const i=[].concat(u[E.view]||[]);i.length&&(t[E.view]={$in:i});const o=await n.getSectionView(D,t),r=Array.from({length:e<o.length?e:o.length},((e,t)=>o[t][d.name]));B({detail:{name:d.name,list:r}})},()=>{B({detail:{name:d.name,list:[]}})},f,h,$,g,v,y,w,function(e){z=e,i(7,z),i(5,u),i(4,d),i(32,v)},function(e){N=e,i(9,N)},function(e){T=e,i(10,T)}]}class Ro extends _e{constructor(e){var t;super(),jo.getElementById("svelte-1rbaejz-style")||((t=L("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}",S(jo.head,t)),Ie(this,e,Wo,Oo,k,{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:Uo}=ve;function Ho(e){e[26]=e[28].list,e[27]=e[28].items}function Go(e,t,n){const i=e.slice();return i[29]=t[n],i}function Qo(e,t,n){const i=e.slice();return i[32]=t[n],i}function Yo(e,t,n){const i=e.slice();return i[32]=t[n],i}function Jo(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ko(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v;function y(t){e[23](t)}Ho(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Zo]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),K.push((()=>we(s,"value",y))),s.$on("input",e[12]),d=new We({props:{size:"18"}});let b=e[27]?.length&&function(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=Xo(Yo(e,i,t));return{c(){t=L("thead"),n=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();V(n,"class","svelte-14hcfjl"),V(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(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 s=Yo(e,i,r);o[r]?o[r].p(s,t):(o[r]=Xo(s),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&&E(t),N(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]=nr(Go(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 s=Go(e,n,r);i[r]?i[r].p(s,o):(i[r]=nr(s),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){N(i,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),o=L("div"),r=j("Suchen: "),be(s.$$.fragment),a=D(),c=L("span"),be(d.$$.fragment),u=D(),m=L("div"),f=L("table"),b&&b.c(),p=D(),h=L("tbody"),x&&x.c(),V(t,"class","form--buttons svelte-14hcfjl"),V(c,"class","feather pointer svelte-14hcfjl"),O(o,"margin-bottom","1em"),O(o,"position","relative"),V(f,"striped",""),V(f,"class","svelte-14hcfjl"),V(m,"class","eList svelte-14hcfjl")},m(l,y){C(l,t,y),xe(n,t,null),C(l,i,y),C(l,o,y),S(o,r),xe(s,o,null),S(o,a),S(o,c),xe(d,c,null),C(l,u,y),C(l,m,y),S(m,f),b&&b.m(f,null),S(f,p),S(f,h),x&&x.m(h,null),$=!0,g||(v=T(c,"click",e[14]),g=!0)},p(e,t){Ho(e);const i={};64&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!l&&2&t[0]&&(l=!0,o.value=e[1],re((()=>l=!1))),s.$set(o),e[27]?.length&&b.p(e,t),e[26]?.length&&x.p(e,t)},i(e){$||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),$=!0)},o(e){he(n.$$.fragment,e),he(s.$$.fragment,e),he(d.$$.fragment,e),$=!1},d(e){e&&E(t),ke(n),e&&E(i),e&&E(o),ke(s),ke(d),e&&E(u),e&&E(m),b&&b.d(),x&&x.d(),g=!1,v()}}}function Zo(e){let t;return{c(){t=j("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Xo(e){let t,n,i=e[32]?.designation+"";return{c(){t=L("th"),n=j(i),V(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function er(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=tr(Qo(e,i,t));return{c(){t=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();n=D(),V(t,"class","pointer svelte-14hcfjl"),P(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);S(t,n)},p(e,r){if(3584&r[0]){let s;for(i=e[27],s=0;s<i.length;s+=1){const l=Qo(e,i,s);o[s]?o[s].p(l,r):(o[s]=tr(l),o[s].c(),o[s].m(t,n))}for(;s<o.length;s+=1)o[s].d(1);o.length=i.length}2049&r[0]&&P(t,"active",e[29]._id===e[0])},d(e){e&&E(t),N(o,e)}}}function tr(e){let t,n,i,o,r=e[9](e[29],e[32])+"";return{c(){t=L("td"),n=j(r),V(t,"class","svelte-14hcfjl")},m(r,s){C(r,t,s),S(t,n),i||(o=T(t,"click",A(e[10](e[29]))),i=!0)},p(t,n){e=t},d(e){e&&E(t),i=!1,o()}}}function nr(e){let t,n=e[13](e[29],e[27],e[1]),i=n&&er(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=er(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&E(t)}}}function ir(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function or(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:ir,then:Ko,catch:Jo,value:28,blocks:[,,,]};return $e(e[11](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function rr(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[or]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function sr(e,t,o){const r=Q(),{Dialog:s,Divider:l,Loading:a,TextField:d,Button:u}=c;let{item:m}=t,{className:p}=t,{classId:$}=t,{rowId:g}=t,{viewName:v}=t,{viewValue:y}=t,{recordId:w}=t,{filter:b}=t,x="",k=$+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?h(n):f(e[`_${t.name}`]||e[t.name]||"")},_=n.getSchemaByClass(p);H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),i.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&Pa(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,$=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,w=e.recordId),"filter"in e&&o(21,b=e.filter)},[g,x,r,s,l,a,d,u,k,I,e=>()=>r("choose",{row:e}),async()=>{const e=await _,t="."+$+"#"+v;document.querySelector(t);let i={[v]:y},o=[];i[v]&&(o=await n.getSectionView(e.class,i,!0)),b&&(o=o.filter((e=>e._id!=b)));const r=e.display;return{list:o,items:Dt(r,e,o)}},({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,$,v,y,w,b,()=>r("back"),function(e){x=e,o(1,x)}]}class lr extends _e{constructor(e){var t;super(),Uo.getElementById("svelte-14hcfjl-style")||((t=L("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}",S(Uo.head,t)),Ie(this,e,sr,rr,k,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function ar(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function cr(e){let t,n,i,o,r;function s(t){e[21](t)}let l={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]&&(l.value=e[0]),n=new e[10]({props:l}),K.push((()=>we(n,"value",s)));let a=!e[6]&&dr(e);return{c(){t=L("div"),be(n.$$.fragment),o=D(),a&&a.c(),O(t,"position","relative")},m(e,i){C(e,t,i),xe(n,t,null),S(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],re((()=>i=!1))),n.$set(r),e[6]?a&&(me(),he(a,1,1,(()=>{a=null})),fe()):a?(a.p(e,o),64&o&&pe(a,1)):(a=dr(e),a.c(),pe(a,1),a.m(t,null))},i(e){r||(pe(n.$$.fragment,e),pe(a),r=!0)},o(e){he(n.$$.fragment,e),he(a),r=!1},d(e){e&&E(t),ke(n),a&&a.d()}}}function dr(e){let t,n,i,o,r;return n=new ft({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-wbrqzu")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[17]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function ur(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function mr(e){let t,n,i;function o(t){e[22](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[fr]},$$scope:{ctx:e}};return void 0!==e[8]&&(r.open=e[8]),t=new e[11]({props:r}),K.push((()=>we(t,"open",o))),{c(){be(t.$$.fragment)},m(e,n){xe(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],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function fr(e){let t,n;return t=new lr({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(){be(t.$$.fragment)},m(e,i){xe(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||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function pr(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ur,then:cr,catch:ar,value:27,blocks:[,,,]};$e(e[16](),o);let r=e[8]&&mr(e);return{c(){o.block.c(),t=D(),r&&r.c(),n=F()},m(e,s){o.block.m(e,o.anchor=s),o.mount=()=>t.parentNode,o.anchor=t,C(e,t,s),r&&r.m(e,s),C(e,n,s),i=!0},p(t,[i]){ge(o,e=t,i),e[8]?r?(r.p(e,i),256&i&&pe(r,1)):(r=mr(e),r.c(),pe(r,1),r.m(n.parentNode,n)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){i||(pe(o.block),pe(r),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}he(r),i=!1},d(e){o.block.d(e),o.token=null,o=null,e&&E(t),r&&r.d(e),e&&E(n)}}}function hr(e,t,n){const{TextField:i,Modal:o}=c;let{classId:r}=t,{id:s}=t,{item:l}=t,{record:a}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:m}=t,{formnovalidate:f}=t,{praefix:p}=t;const{properties:h={}}=l;let $,{pattern:g,placeholder:v,readonly:y,required:w=!1,view:b}=h,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,s=e.id),"item"in e&&n(3,l=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,s,l,a,u,m,f,x,$,i,o,g,y,w,b,async()=>(n(9,$=a[b.selection]),!0),()=>{n(8,x=!0)},({detail:e})=>{n(0,d=e.row[b.value?b.value:"_id"]),k()},k,p,function(e){d=e,n(0,d)},function(e){x=e,n(8,x)}]}class $r extends _e{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=L("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",S(document.head,t)),Ie(this,e,hr,pr,k,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function gr(e,t,n){const i=e.slice();return i[12]=t[n][0],i[13]=t[n][1],i}function vr(e){let t;return{c(){t=L("option"),t.textContent="- ",t.selected=!0,t.__value="",t.value=t.__value},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function yr(e){let t;return{c(){t=L("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&&E(t)}}}function wr(e){let t,n,i,o,r=e[12]+"";return{c(){t=L("option"),n=j(r),t.__value=i=e[13],t.value=t.__value,t.selected=o=e[0]==e[13]},m(e,i){C(e,t,i),S(t,n)},p(e,s){64&s&&r!==(r=e[12]+"")&&M(n,r),64&s&&i!==(i=e[13])&&(t.__value=i,t.value=t.__value),65&s&&o!==(o=e[0]==e[13])&&(t.selected=o)},d(e){e&&E(t)}}}function br(e){let t,n,i,o,r,s=!e[7]&&function(e){let t;function n(e,t){return e[5]&&!0!==e[8]?yr:vr}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&&E(t)}}}(e),l=e[6],a=[];for(let t=0;t<l.length;t+=1)a[t]=wr(gr(e,l,t));return{c(){t=L("select"),s&&s.c(),n=F();for(let e=0;e<a.length;e+=1)a[e].c();V(t,"class",i=_(e[3]||e[4])+" svelte-5xpzvo"),V(t,"id",e[2]),V(t,"name",e[2]),t.disabled=e[1],t.required=e[5]},m(i,l){C(i,t,l),s&&s.m(t,null),S(t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null);o||(r=T(t,"change",e[9]),o=!0)},p(e,[n]){if(e[7]||s.p(e,n),65&n){let i;for(l=e[6],i=0;i<l.length;i+=1){const o=gr(e,l,i);a[i]?a[i].p(o,n):(a[i]=wr(o),a[i].c(),a[i].m(t,null))}for(;i<a.length;i+=1)a[i].d(1);a.length=l.length}24&n&&i!==(i=_(e[3]||e[4])+" svelte-5xpzvo")&&V(t,"class",i),4&n&&V(t,"id",e[2]),4&n&&V(t,"name",e[2]),2&n&&(t.disabled=e[1]),32&n&&(t.required=e[5])},i:v,o:v,d(e){e&&E(t),s&&s.d(),N(a,e),o=!1,r()}}}function xr(e,t,n){const i=Q();let{id:o}=t,{item:r}=t,{value:s}=t,{noForm:l=!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&&(s||=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,s=e.value),"noForm"in e&&n(3,l=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)},[s,c,o,l,a,d,u,m,f,e=>i("blur",{value:e.srcElement.value}),r]}class kr extends _e{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=L("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}",S(document.head,t)),Ie(this,e,xr,br,k,{id:2,item:10,value:0,noForm:3,classId:4,disabled:1,required:5})}}function Ir(e){let t;return{c(){t=j("Stunden")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function _r(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Ir]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Sr(e){let t;return{c(){t=j("Minuten")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Cr(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Sr]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Er(e){let t;return{c(){t=j("Jetzt")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Nr(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[Er]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Lr(e){let t,n,i,o,r,s,l,a,c;return o=new e[5]({props:{value:e[0],closeOnSelection:!0}}),o.$on("change",e[8]),s=new e[6]({props:{value:e[0],$$slots:{"now-label":[Nr],"minutes-label":[Cr],"hours-label":[_r]},$$scope:{ctx:e}}}),s.$on("change",e[7]),{c(){t=L("input"),i=D(),be(o.$$.fragment),r=D(),be(s.$$.fragment),V(t,"type","string"),V(t,"class",n=e[2]||e[3]),V(t,"id",e[1]),V(t,"name",e[1]),t.hidden=!0},m(n,d){C(n,t,d),B(t,e[0]),C(n,i,d),xe(o,n,d),C(n,r,d),xe(s,n,d),l=!0,a||(c=T(t,"input",e[9]),a=!0)},p(e,[i]){(!l||12&i&&n!==(n=e[2]||e[3]))&&V(t,"class",n),(!l||2&i)&&V(t,"id",e[1]),(!l||2&i)&&V(t,"name",e[1]),1&i&&B(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}),s.$set(a)},i(e){l||(pe(o.$$.fragment,e),pe(s.$$.fragment,e),l=!0)},o(e){he(o.$$.fragment,e),he(s.$$.fragment,e),l=!1},d(e){e&&E(t),e&&E(i),ke(o,e),e&&E(r),ke(s,e),a=!1,c()}}}function qr(e,t,n){const i=Q(),{Label:o,DatePicker:r,TimePicker:s}=c;let{value:l}=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,l=e.value),"id"in e&&n(1,a=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[l,a,d,u,o,r,s,({detail:e})=>{var t,i;n(0,(t=e.value,i=l,l=null==t||null==i?t:(i.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),i))),m(l)},({detail:e})=>{n(0,l=Jn(e.value,l)),m(l)},function(){l=this.value,n(0,l)}]}class jr extends _e{constructor(e){super(),Ie(this,e,qr,Lr,k,{value:0,id:1,noForm:2,classId:3})}}function Dr(e){let t,n,i,o,r,s,l,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=L("input"),r=D(),s=L("input"),d=D(),be(u.$$.fragment),m=j(" /\n"),be(f.$$.fragment),V(t,"type","string"),V(t,"class",n=e[1]||e[2]),V(t,"id",i=e[0]+"_from"),V(t,"name",o=e[0]+"_from"),t.hidden=!0,V(s,"type","string"),V(s,"class",l=e[1]||e[2]),V(s,"id",a=e[0]+"_to"),V(s,"name",c=e[0]+"_to"),s.hidden=!0},m(n,i){C(n,t,i),B(t,e[7]),C(n,r,i),C(n,s,i),B(s,e[8]),C(n,d,i),xe(u,n,i),C(n,m,i),xe(f,n,i),p=!0,h||($=[T(t,"input",e[13]),T(s,"input",e[14])],h=!0)},p(e,[r]){(!p||6&r&&n!==(n=e[1]||e[2]))&&V(t,"class",n),(!p||1&r&&i!==(i=e[0]+"_from"))&&V(t,"id",i),(!p||1&r&&o!==(o=e[0]+"_from"))&&V(t,"name",o),128&r&&B(t,e[7]),(!p||6&r&&l!==(l=e[1]||e[2]))&&V(s,"class",l),(!p||1&r&&a!==(a=e[0]+"_to"))&&V(s,"id",a),(!p||1&r&&c!==(c=e[0]+"_to"))&&V(s,"name",c),256&r&&B(s,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||(pe(u.$$.fragment,e),pe(f.$$.fragment,e),p=!0)},o(e){he(u.$$.fragment,e),he(f.$$.fragment,e),p=!1},d(e){e&&E(t),e&&E(r),e&&E(s),e&&E(d),ke(u,e),e&&E(m),ke(f,e),h=!1,b($)}}}function Fr(e,t,n){const i=Q(),{DatePicker:o}=c;let{value:r}=t,{id:s}=t,{noForm:l=!1}=t,{classId:a}=t,{required:d}=t,{disabled:u}=t,m="%d.%m.%Y",f="%d.%m.%Y",p=r?.from,h=r?.to;"Invalid Date"===p?.toString()&&(p=void 0),"Invalid Date"===h?.toString()&&(h=void 0),u&&(void 0===p&&(m=""),void 0===h&&(f=""));return e.$$set=e=>{"value"in e&&n(12,r=e.value),"id"in e&&n(0,s=e.id),"noForm"in e&&n(1,l=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)},[s,l,a,d,u,m,f,p,h,o,({detail:e})=>{n(7,p=Jn(e.value,p)),h&&p&&h.valueOf()-p.valueOf()<0&&n(7,p=void 0),i("change",{value:p,range:"_from"})},({detail:e})=>{n(8,h=Jn(e.value,h)),h&&p&&h.valueOf()-p.valueOf()<0&&n(8,h=void 0),i("change",{value:h,range:"_to"})},r,function(){p=this.value,n(7,p)},function(){h=this.value,n(8,h)}]}class Tr extends _e{constructor(e){var t;super(),document.getElementById("svelte-7itxk4-style")||((t=L("style")).id="svelte-7itxk4-style",t.textContent="div.date-picker.moveLeft div.dropdown.calendar{left:-3em !important}",S(document.head,t)),Ie(this,e,Fr,Dr,k,{value:12,id:0,noForm:1,classId:2,required:3,disabled:4})}}function zr(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:Ar,placeholder:Vr,readonly:e[3],disabled:e[4]}}),n.$on("change",e[6]),{c(){t=L("div"),be(n.$$.fragment),O(t,"max-width","4em")},m(e,o){C(e,t,o),xe(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||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}const Ar="([01][0-9]|2[0-3]):([0-5][0-9])",Vr="";function Mr(e,t,n){const i=Q(),{TextField:o}=c;let{id:r}=t,{item:s}=t,{value:l}=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,s=e.item),"value"in e&&n(1,l=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,l,a,d,u,o,({detail:e})=>{i("blur",{value:f(e.value)}),i("checkRange",{idx:m,fieldId:r,value:e.value})},s,m]}class Br extends _e{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=L("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",S(document.head,t)),Ie(this,e,Mr,zr,k,{id:0,item:7,value:1,inputClass:2,readonly:3,disabled:4,praefix:8})}}const{document:Or}=ve;function Pr(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 Rr(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ur(e){let t,n,i=e[14],o=[];for(let t=0;t<i.length;t+=1)o[t]=Gr(Pr(e,i,t));const r=e=>he(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 s;for(i=e[14],s=0;s<i.length;s+=1){const r=Pr(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=Gr(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function Hr(e){let t,n,i=(e[0]["_"+e[17]]||e[0][e[17]]||"(ja)")+"",o=e[19]&&function(){let e;return{c(){e=j(", ")},m(t,n){C(t,e,n)},d(t){t&&E(e)}}}();return{c(){t=L("span"),o&&o.c(),n=j(i),V(t,"class","lookupValue")},m(e,i){C(e,t,i),o&&o.m(t,null),S(t,n)},p(e,t){2&t&&i!==(i=(e[0]["_"+e[17]]||e[0][e[17]]||"(ja)")+"")&&M(n,i)},d(e){e&&E(t),o&&o.d()}}}function Gr(e){let t,n,i,o,r,s,l,a,c=e[1],d=[];for(let t=0;t<c.length;t+=1)d[t]=Hr(Wr(e,c,t));return o=new He({props:{size:"18"}}),{c(){t=L("div");for(let e=0;e<d.length;e+=1)d[e].c();n=D(),i=L("span"),be(o.$$.fragment),r=D(),V(i,"class","feather pointer svelte-1u646ni"),V(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);S(t,n),S(t,i),xe(o,i,null),S(t,r),s=!0,l||(a=T(i,"click",e[3](e[0]._id)),l=!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]=Hr(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){s||(pe(o.$$.fragment,e),s=!0)},o(e){he(o.$$.fragment,e),s=!1},d(e){e&&E(t),N(d,e),ke(o),l=!1,a()}}}function Qr(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Yr(e){let t,n,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Qr,then:Ur,catch:Rr,value:14,blocks:[,,,]};return $e(e[2](),i),{c(){t=L("div"),i.block.c(),V(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]){ge(i,e=t,n)},i(e){n||(pe(i.block),n=!0)},o(e){for(let e=0;e<3;e+=1){he(i.blocks[e])}n=!1},d(e){e&&E(t),i.block.d(),i.token=null,i=null}}}function Jr(e,t,i){let{id:o}=t,{item:r}=t,{praefix:s}=t,{record:l}=t;const{refItem:a,view:c}=r.properties;let d=c.split(","),[u,m]=a.split(":");const[f,p]=m.split("."),h=()=>{ie().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,s=e.praefix),"record"in e&&i(6,l=e.record)},[r,d,async()=>{let e=[];if(l._id){const t=!d.some((e=>e.includes(":")));p&&(u=p+"."+u);const o={[u]:l[u]||l._id};if(e=await n.getSectionView(f,o,t),!t){const t=d.find((e=>e.includes(":"))).split(":")[0];e=e.map((e=>{const n=e[t].find((e=>e[t]===l._id));return n._id=e._id,n})),i(1,d=d.map((e=>e.split(":")[1])))}}return e.length||h(),e},e=>async()=>{const t=await n.getTaskByDocId(e);if(!t)return;const i=t._id,o=`/task/${t.event}/${i}/task?view=standalone`;window.open(o)},o,s,l]}class Kr extends _e{constructor(e){var t;super(),Or.getElementById("svelte-1u646ni-style")||((t=L("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}",S(Or.head,t)),Ie(this,e,Jr,Yr,k,{id:4,item:0,praefix:5,record:6})}}function Zr(e){let t,n,i;return n=new ot({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function Xr(e){let t,n,i,o,r;return n=new ot({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[9]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function es(e){let t,n,i,o,r,s;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 l=[Xr,Zr],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};1&i&&(s.inputClass=e[0]),2&i&&(s.disabled=e[1]),4&i&&(s.formnovalidate=e[2]),8&i&&(s.readonly=e[3]),16&i&&(s.required=e[4]),32&i&&(s.id=e[5]),64&i&&(s.name=e[6]),128&i&&(s.value=e[7]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}const ts=e("getMapLink",(async e=>{const{street:t,houseNo:i,postcode:o,location:r,country:s}=e,l=[t&&i?t+" "+i:t,o&&r?o+" "+r:o||r||"",s&&(await n.getTask("country",s)).designation].filter((e=>!!e)).join(", ");return"https://bing.com/maps/default.aspx?where1="+encodeURIComponent(l)}));function ns(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t,{record:f}=t,{item: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,s=e.formnovalidate),"readonly"in e&&n(3,l=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),"record"in e&&n(10,f=e.record),"item"in e&&n(11,p=e.item)},[o,r,s,l,a,d,u,m,i,async()=>{if(!m)return;const e=u.includes(".")?f[u.split(".")[0]]:f,t=await ts(e);window.open(t,"_blank")},f,p,function(t){Y(e,t)}]}class is extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,ns,es,k,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,record:10,item:11})}}function os(e){let t,n,i;return n=new Ye({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function rs(e){let t,n,i,o,r;return n=new Ye({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[9]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function ss(e){let t,n,i,o,r,s;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 l=[rs,os],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};1&i&&(s.inputClass=e[0]),2&i&&(s.disabled=e[1]),4&i&&(s.formnovalidate=e[2]),8&i&&(s.readonly=e[3]),16&i&&(s.required=e[4]),32&i&&(s.id=e[5]),64&i&&(s.name=e[6]),128&i&&(s.value=e[7]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function ls(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=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,s=e.formnovalidate),"readonly"in e&&n(3,l=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,s,l,a,d,u,m,i,async()=>{if(!m)return;let e=m;e.includes("//")||(e="//"+e),window.open(e,"_blank")},function(t){Y(e,t)}]}class as extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,ls,ss,k,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7})}}function cs(e){let t,n,i;return n=new lt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function ds(e){let t,n,i,o,r;return n=new lt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[11]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function us(e){let t,n,i,o,r,s;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 l=[ds,cs],a=[];function c(e,t){return e[9]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};4&i&&(s.inputClass=e[2]),1&i&&(s.pattern=e[0]),2&i&&(s.placeholder=e[1]),8&i&&(s.disabled=e[3]),16&i&&(s.formnovalidate=e[4]),32&i&&(s.readonly=e[5]),64&i&&(s.required=e[6]),128&i&&(s.id=e[7]),256&i&&(s.name=e[8]),512&i&&(s.value=e[9]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function ms(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=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,s=e.formnovalidate),"readonly"in e&&n(5,l=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,s,l,a,d,u,m,i,async()=>{if(!m)return;let e="tel:"+m;window.open(e,"_self")},function(t){Y(e,t)}]}class fs extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,ms,us,k,{inputClass:2,disabled:3,formnovalidate:4,readonly:5,required:6,id:7,name:8,value:9,pattern:0,placeholder:1})}}function ps(e){let t,n,i;return n=new tt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function hs(e){let t,n,i,o,r;return n=new tt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),V(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[11]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function $s(e){let t,n,i,o,r,s;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 l=[hs,ps],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),O(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};1&i&&(s.inputClass=e[0]),256&i&&(s.pattern=e[8]),512&i&&(s.placeholder=e[9]),2&i&&(s.disabled=e[1]),4&i&&(s.formnovalidate=e[2]),8&i&&(s.readonly=e[3]),16&i&&(s.required=e[4]),32&i&&(s.id=e[5]),64&i&&(s.name=e[6]),128&i&&(s.value=e[7]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function gs(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=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,s=e.formnovalidate),"readonly"in e&&n(3,l=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,s,l,a,d,u,m,f,p,i,async()=>{if(!m)return;let e="mailto:"+m;window.open(e,"_self")},function(t){Y(e,t)}]}class vs extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,gs,$s,k,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,pattern:8,placeholder:9})}}const ys=["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 ws(e){let t;return{c(){t=L("textarea"),V(t,"id",e[0]),O(t,"visibility","hidden")},m(n,i){C(n,t,i),e[18](t)},p(e,n){1&n&&V(t,"id",e[0])},d(n){n&&E(t),e[18](null)}}}function bs(e){let t;return{c(){t=L("div"),V(t,"id",e[0])},m(n,i){C(n,t,i),e[17](t)},p(e,n){1&n&&V(t,"id",e[0])},d(n){n&&E(t),e[17](null)}}}function xs(e){let t;function n(e,t){return e[1]?bs:ws}let i=n(e),o=i(e);return{c(){t=L("div"),o.c(),V(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&&V(t,"class",e[2])},i:v,o:v,d(n){n&&E(t),o.d(),e[19](null)}}}const ks=e=>e+"_"+Math.floor(1e9*Math.random())+String(Date.now());let Is=(()=>{let e={listeners:[],scriptId:ks("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 _s(e,t,n){var i;let o,r,s,{id:l=ks("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:h=""}=t,{text:$=""}=t,{cssClass:g="tinymce-wrapper"}=t,v=h,y=c;const w=Q(),b=()=>{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,s=e),e.on("init",(()=>{e.setContent(h),e.on(p,(()=>{n(15,v=e.getContent()),v!==h&&(n(5,h=v),n(6,$=e.getContent({format:"text"})))}))})),((e,t)=>{ys.forEach((n=>{e.on(n,(i=>{t(n.toLowerCase(),{eventName:n,event:i,editor:e})}))}))})(e,w),"function"==typeof f.setup&&f.setup(e)}});n(4,r.style.visibility="",r),b().init(e)};return H((()=>{if(null!==b())x();else{const e=m||`https://cdn.tiny.cloud/1/${d}/tinymce/${u}/tinymce.min.js`;Is.load(o.ownerDocument,e,(()=>{x()}))}})),G((()=>{var e;s&&(null===(e=b())||void 0===e||e.remove(s))})),e.$$set=e=>{"id"in e&&n(0,l=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,h=e.value),"text"in e&&n(6,$=e.text),"cssClass"in e&&n(2,g=e.cssClass)},e.$$.update=()=>{123040&e.$$.dirty&&(s&&v!==h&&(s.setContent(h),n(6,$=s.getContent({format:"text"}))),s&&c!==y&&(n(16,y=c),"function"==typeof(null===n(13,i=s.mode)||void 0===i?void 0:i.set)?s.mode.set(c?"readonly":"design"):s.setMode(c?"readonly":"design")))},[l,a,g,o,r,h,$,c,d,u,m,f,p,i,s,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 Ss extends _e{constructor(e){super(),Ie(this,e,_s,xs,k,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function Cs(e){let t,n,i,o,r,s,l;function a(t){e[7](t)}let c={scriptSrc:"/tinymce/tinymce.min.js",conf:e[6],disabled:e[4],readonly:e[5]};return void 0!==e[0]&&(c.value=e[0]),n=new Ss({props:c}),K.push((()=>we(n,"value",a))),{c(){t=L("div"),be(n.$$.fragment),o=D(),r=L("input"),V(r,"class",s=e[1]||e[2]),V(r,"id",e[3]),V(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),xe(n,t,null),S(t,o),S(t,r),l=!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],re((()=>i=!1))),n.$set(o),(!l||6&t&&s!==(s=e[1]||e[2]))&&V(r,"class",s),(!l||8&t)&&V(r,"id",e[3]),(!l||8&t)&&V(r,"name",e[3]),(!l||1&t&&r.value!==e[0])&&(r.value=e[0])},i(e){l||(pe(n.$$.fragment,e),l=!0)},o(e){he(n.$$.fragment,e),l=!1},d(e){e&&E(t),ke(n)}}}function Es(e,n,i){let o=JSON.parse(t.getItem("Locale")).id;o=o.startsWith("fr")?"fr_FR":o.split("-")[0];let{value:r}=n,{noForm:s}=n,{classId:l}=n,{id:a}=n,{disabled:c}=n,{readonly:d}=n;const u={plugins:"advlist 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:o};return e.$$set=e=>{"value"in e&&i(0,r=e.value),"noForm"in e&&i(1,s=e.noForm),"classId"in e&&i(2,l=e.classId),"id"in e&&i(3,a=e.id),"disabled"in e&&i(4,c=e.disabled),"readonly"in e&&i(5,d=e.readonly)},[r,s,l,a,c,d,u,function(e){r=e,i(0,r)}]}class Ns extends _e{constructor(e){var t;super(),document.getElementById("svelte-zemw0w-style")||((t=L("style")).id="svelte-zemw0w-style",t.textContent="div.tox-statusbar__text-container{display:none !important}div.tox.tox-tinymce{border:1px #808080 solid}.tox-edit-area__iframe{background-color:#f9f3f6 !important}",S(document.head,t)),Ie(this,e,Es,Cs,k,{value:0,noForm:1,classId:2,id:3,disabled:4,readonly:5})}}
2
2
  /*!
3
3
  * Signature Pad v5.0.2 | https://github.com/szimek/signature_pad
4
4
  * (c) 2024 Szymon Nowak | Released under the MIT license
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enablerr-ui/detail",
3
3
  "description": "enablerr - the Next Enterprise Solution",
4
- "version": "0.2.668",
4
+ "version": "0.2.669",
5
5
  "os": [
6
6
  "darwin",
7
7
  "linux"