@enablerr-ui/settings 0.2.21 → 0.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/auth"],(function(e){"use strict";var t,n,o,i,s;return{setters:[function(e){t=e.getAttractions},function(e){n=e.Request,o=e.settings,i=e.toasts},function(e){s=e.user}],execute:function(){e("version","0.2.21");function l(){}function r(e){return e()}function c(){return Object.create(null)}function a(e){e.forEach(r)}function u(e){return"function"==typeof e}function d(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function f(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return l;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function m(e,t){e.appendChild(t)}function g(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode.removeChild(e)}function h(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function $(e){return document.createElement(e)}function v(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function y(e){return document.createTextNode(e)}function x(){return y(" ")}function k(){return y("")}function w(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function b(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function z(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function C(e,t){e.value=null==t?"":t}function L(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function N(e,t,n){e.classList[n?"add":"remove"](t)}let j;function T(e){j=e}function M(){if(!j)throw new Error("Function called outside component initialization");return j}function S(e){M().$$.on_mount.push(e)}function E(){const e=M();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const i=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);o.slice().forEach((t=>{t.call(e,i)}))}}}const _=[],B=[],D=[],I=[],O=Promise.resolve();let A=!1;function W(){A||(A=!0,O.then(F))}function P(e){D.push(e)}function q(e){I.push(e)}let R=!1;const V=new Set;function F(){if(!R){R=!0;do{for(let e=0;e<_.length;e+=1){const t=_[e];T(t),H(t.$$)}for(T(null),_.length=0;B.length;)B.pop()();for(let e=0;e<D.length;e+=1){const t=D[e];V.has(t)||(V.add(t),t())}D.length=0}while(_.length);for(;I.length;)I.pop()();A=!1,R=!1,V.clear()}}function H(e){if(null!==e.fragment){e.update(),a(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(P)}}const J=new Set;let G;function K(){G={r:0,c:[],p:G}}function U(){G.r||a(G.c),G=G.p}function Z(e,t){e&&e.i&&(J.delete(e),e.i(t))}function Q(e,t,n,o){if(e&&e.o){if(J.has(e))return;J.add(e),G&&G.c.push((()=>{J.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function X(e,t){const n=t.token={};function o(e,o,i,s){if(t.token!==n)return;t.resolved=s;let l=t.ctx;void 0!==i&&(l=l.slice(),l[i]=s);const r=e&&(t.current=e)(l);let c=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(K(),Q(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),U())})):t.block.d(1),r.c(),Z(r,1),r.m(t.mount(),t.anchor),c=!0),t.block=r,t.blocks&&(t.blocks[o]=r),c&&F()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=M();if(e.then((e=>{T(n),o(t.then,1,t.value,e),T(null)}),(e=>{if(T(n),o(t.catch,2,t.error,e),T(null),!t.hasCatch)throw e})),t.current!==t.pending)return o(t.pending,0),!0}else{if(t.current!==t.then)return o(t.then,1,t.value,e),!0;t.resolved=e}var i}function Y(e,t,n){const o=t.slice(),{resolved:i}=e;e.current===e.then&&(o[e.value]=i),e.current===e.catch&&(o[e.error]=i),e.block.p(o,n)}const ee="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function te(e,t){Q(e,1,1,(()=>{t.delete(e.key)}))}function ne(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function oe(e){e&&e.c()}function ie(e,t,n,o){const{fragment:i,on_mount:s,on_destroy:l,after_update:c}=e.$$;i&&i.m(t,n),o||P((()=>{const t=s.map(r).filter(u);l?l.push(...t):a(t),e.$$.on_mount=[]})),c.forEach(P)}function se(e,t){const n=e.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function le(e,t,n,o,i,s,r=[-1]){const u=j;T(e);const d=e.$$={fragment:null,ctx:null,props:s,update:l,not_equal:i,bound:c(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:t.context||[]),callbacks:c(),dirty:r,skip_bound:!1};let f=!1;if(d.ctx=n?n(e,t.props||{},((t,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&i(d.ctx[t],d.ctx[t]=s)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](s),f&&function(e,t){-1===e.$$.dirty[0]&&(_.push(e),W(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],d.update(),f=!0,a(d.before_update),d.fragment=!!o&&o(d.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);d.fragment&&d.fragment.l(e),e.forEach(p)}else d.fragment&&d.fragment.c();t.intro&&Z(e.$$.fragment),ie(e,t.target,t.anchor,t.customElement),F()}T(u)}class re{$destroy(){se(this,1),this.$destroy=l}$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 ce(e){let t,n,o,i,s,l,r,c,u,d,f,h,v,y,k,z,C,L,N,j,T,M,S,E,_,D,I,O,A,W,P,R,V,F,H,J,G,K,U,X,Y,ee,te,le,re,ce,ue,de,fe,me;function ge(t){e[7](t)}let pe={placeholder:"Berufsbezeichnung"};function he(t){e[9](t)}void 0!==e[0].jobDescription&&(pe.value=e[0].jobDescription),l=new e[2]({props:pe}),B.push((()=>ne(l,"value",ge))),L=new e[2]({props:{placeholder:"E-Mail",disabled:!0,value:e[0].email}});let $e={placeholder:"Vorname"};function ve(t){e[10](t)}void 0!==e[0].firstName&&($e.value=e[0].firstName),E=new e[2]({props:$e}),B.push((()=>ne(E,"value",he)));let ye={placeholder:"Nachname"};function xe(t){e[11](t)}void 0!==e[0].lastName&&(ye.value=e[0].lastName),P=new e[2]({props:ye}),B.push((()=>ne(P,"value",ve)));let ke={placeholder:"Titel"};return void 0!==e[0].listTitle&&(ke.value=e[0].listTitle),K=new e[2]({props:ke}),B.push((()=>ne(K,"value",xe))),ue=new e[1]({props:{filled:!0,$$slots:{default:[ae]},$$scope:{ctx:e}}}),ue.$on("click",e[4]),{c(){t=$("form"),n=$("div"),o=$("div"),o.textContent="Berufsbezeichnung",i=x(),s=$("div"),oe(l.$$.fragment),c=x(),u=$("div"),d=$("input"),f=x(),h=$("label"),h.textContent="Meine Berufsbezeichnung in meinem Profil anzeigen.",v=x(),y=$("div"),k=$("div"),k.textContent="E-Mail",z=x(),C=$("div"),oe(L.$$.fragment),N=x(),j=$("div"),T=$("div"),T.textContent="Vorname",M=x(),S=$("div"),oe(E.$$.fragment),D=x(),I=$("div"),O=$("div"),O.textContent="Nachname",A=x(),W=$("div"),oe(P.$$.fragment),V=x(),F=$("div"),H=$("div"),H.textContent="Titel Aufgabenliste",J=x(),G=$("div"),oe(K.$$.fragment),X=x(),Y=$("div"),ee=$("div"),ee.textContent="Rollen nicht anzeigen",te=x(),le=$("div"),re=$("input"),ce=x(),oe(ue.$$.fragment),b(o,"class","form-field--label"),b(d,"type","checkbox"),b(d,"id","showJobDesc"),b(d,"name","shwoJobDescriptionInBio"),b(h,"for","showJobDesc"),b(u,"class","checkbox"),b(s,"class","form-field--content"),b(n,"class","form-field"),b(k,"class","form-field--label"),b(C,"class","form-field--content"),b(y,"class","form-field"),b(T,"class","form-field--label"),b(S,"class","form-field--content"),b(j,"class","form-field"),b(O,"class","form-field--label"),b(W,"class","form-field--content"),b(I,"class","form-field"),b(H,"class","form-field--label"),b(G,"class","form-field--content"),b(F,"class","form-field"),b(ee,"class","form-field--label svelte-c1yie6"),b(re,"type","checkbox"),b(re,"id","hideRoles"),b(re,"name","hideRoles"),b(le,"class","checkbox svelte-c1yie6"),b(Y,"class","form-field"),b(t,"class","form-setting")},m(r,a){g(r,t,a),m(t,n),m(n,o),m(n,i),m(n,s),ie(l,s,null),m(s,c),m(s,u),m(u,d),d.checked=e[0].showJobDescription,m(u,f),m(u,h),m(t,v),m(t,y),m(y,k),m(y,z),m(y,C),ie(L,C,null),m(t,N),m(t,j),m(j,T),m(j,M),m(j,S),ie(E,S,null),m(t,D),m(t,I),m(I,O),m(I,A),m(I,W),ie(P,W,null),m(t,V),m(t,F),m(F,H),m(F,J),m(F,G),ie(K,G,null),m(t,X),m(t,Y),m(Y,ee),m(Y,te),m(Y,le),m(le,re),re.checked=e[0].hideRoles,g(r,ce,a),ie(ue,r,a),de=!0,fe||(me=[w(d,"change",e[8]),w(re,"change",e[12])],fe=!0)},p(e,t){const n={};!r&&1&t&&(r=!0,n.value=e[0].jobDescription,q((()=>r=!1))),l.$set(n),1&t&&(d.checked=e[0].showJobDescription);const o={};1&t&&(o.value=e[0].email),L.$set(o);const i={};!_&&1&t&&(_=!0,i.value=e[0].firstName,q((()=>_=!1))),E.$set(i);const s={};!R&&1&t&&(R=!0,s.value=e[0].lastName,q((()=>R=!1))),P.$set(s);const c={};!U&&1&t&&(U=!0,c.value=e[0].listTitle,q((()=>U=!1))),K.$set(c),1&t&&(re.checked=e[0].hideRoles);const a={};524288&t&&(a.$$scope={dirty:t,ctx:e}),ue.$set(a)},i(e){de||(Z(l.$$.fragment,e),Z(L.$$.fragment,e),Z(E.$$.fragment,e),Z(P.$$.fragment,e),Z(K.$$.fragment,e),Z(ue.$$.fragment,e),de=!0)},o(e){Q(l.$$.fragment,e),Q(L.$$.fragment,e),Q(E.$$.fragment,e),Q(P.$$.fragment,e),Q(K.$$.fragment,e),Q(ue.$$.fragment,e),de=!1},d(e){e&&p(t),se(l),se(L),se(E),se(P),se(K),e&&p(ce),se(ue,e),fe=!1,a(me)}}}function ae(e){let t;return{c(){t=y("Speichern")},m(e,n){g(e,t,n)},d(e){e&&p(t)}}}function ue(e){let t,n,o,i,s,l,r,c=e[0]&&ce(e);return l=new e[3]({props:{headers:e[5],items:e[6]}}),{c(){t=$("div"),n=$("h2"),n.textContent="Mein Konto",o=x(),c&&c.c(),i=x(),s=$("div"),oe(l.$$.fragment),L(s,"margin-top","2em")},m(e,a){g(e,t,a),m(t,n),m(t,o),c&&c.m(t,null),m(t,i),m(t,s),ie(l,s,null),r=!0},p(e,[n]){e[0]?c?(c.p(e,n),1&n&&Z(c,1)):(c=ce(e),c.c(),Z(c,1),c.m(t,i)):c&&(K(),Q(c,1,1,(()=>{c=null})),U())},i(e){r||(Z(c),Z(l.$$.fragment,e),r=!0)},o(e){Q(c),Q(l.$$.fragment,e),r=!1},d(e){e&&p(t),c&&c.d(),se(l)}}}function de(e,n,o){const{Button:i,TextField:s,FormField:l,Table:r}=t;let{settings:c}=n;const a=E();const u=window.innerHeight,d=window.innerWidth,f=screen.height,m=[{resolution:"Bildschirm",width:screen.width,height:f},{resolution:"Browser",width:d,height:u}];return e.$$set=e=>{"settings"in e&&o(0,c=e.settings)},[c,i,s,r,function(){a("save")},[{type:"text",text:"Auflösung",value:"resolution"},{type:"text",text:"Breite",value:"width"},{type:"text",text:"Höhe",value:"height"}],m,function(t){e.$$.not_equal(c.jobDescription,t)&&(c.jobDescription=t,o(0,c))},function(){c.showJobDescription=this.checked,o(0,c)},function(t){e.$$.not_equal(c.firstName,t)&&(c.firstName=t,o(0,c))},function(t){e.$$.not_equal(c.lastName,t)&&(c.lastName=t,o(0,c))},function(t){e.$$.not_equal(c.listTitle,t)&&(c.listTitle=t,o(0,c))},function(){c.hideRoles=this.checked,o(0,c)}]}class fe extends re{constructor(e){var t;super(),document.getElementById("svelte-c1yie6-style")||((t=$("style")).id="svelte-c1yie6-style",t.textContent="div.form-field--label.svelte-c1yie6+div.checkbox.svelte-c1yie6{padding-left:.75em}",m(document.head,t)),le(this,e,de,ue,d,{settings:0})}}function me(e,t,n){const o=e.slice();return o[11]=t[n],o}function ge(e){let t,n,o,i,s,l,r,c,a,u,d,f,v,y,k,w,z,C,L,N,j,T,M,S,E,_,D,I,O;function A(t){e[6](t)}let W={};function P(t){e[7](t)}void 0!==e[0].notificationActivated&&(W.value=e[0].notificationActivated),l=new e[3]({props:W}),B.push((()=>ne(l,"value",A)));let R={};function V(t){e[8](t)}void 0!==e[0].showNotifications&&(R.value=e[0].showNotifications),v=new e[3]({props:R}),B.push((()=>ne(v,"value",P)));let F={};void 0!==e[0].notificationToMail&&(F.value=e[0].notificationToMail),N=new e[3]({props:F}),B.push((()=>ne(N,"value",V)));let H=e[1],J=[];for(let t=0;t<H.length;t+=1)J[t]=pe(me(e,H,t));return I=new e[2]({props:{filled:!0,$$slots:{default:[he]},$$scope:{ctx:e}}}),I.$on("click",e[4]),{c(){t=$("form"),n=$("div"),o=$("div"),o.textContent="Benachrichtigungen aktivieren",i=x(),s=$("div"),oe(l.$$.fragment),c=x(),a=$("div"),u=$("div"),u.innerHTML='Ungelesene Nachricht aktivieren \n <p class="helptext">Zeigt einen roten Kreis auf der Glocke an, wenn Sie ungelesene Nachrichten\n haben.</p>',d=x(),f=$("div"),oe(v.$$.fragment),k=x(),w=$("div"),z=$("div"),z.textContent="Benachrichtigungen an E-Mail senden",C=x(),L=$("div"),oe(N.$$.fragment),T=x(),M=$("div"),S=$("div"),S.innerHTML='Arten von Benachrichtigungen\n <p class="helptext">Wählen Sie aus, welche Arten von Benachrichtigungen Sie sehen\n möchten.</p>',E=x(),_=$("div");for(let e=0;e<J.length;e+=1)J[e].c();D=x(),oe(I.$$.fragment),b(o,"class","form-field--label switch"),b(s,"class","form-field--content"),b(n,"class","form-field"),b(u,"class","form-field--label switch"),b(f,"class","form-field--content"),b(a,"class","form-field"),b(z,"class","form-field--label switch"),b(L,"class","form-field--content"),b(w,"class","form-field"),b(S,"class","form-field--label"),b(_,"class","form-field--content"),b(M,"class","form-field"),b(t,"class","form-setting")},m(e,r){g(e,t,r),m(t,n),m(n,o),m(n,i),m(n,s),ie(l,s,null),m(t,c),m(t,a),m(a,u),m(a,d),m(a,f),ie(v,f,null),m(t,k),m(t,w),m(w,z),m(w,C),m(w,L),ie(N,L,null),m(t,T),m(t,M),m(M,S),m(M,E),m(M,_);for(let e=0;e<J.length;e+=1)J[e].m(_,null);g(e,D,r),ie(I,e,r),O=!0},p(e,t){const n={};!r&&1&t&&(r=!0,n.value=e[0].notificationActivated,q((()=>r=!1))),l.$set(n);const o={};!y&&1&t&&(y=!0,o.value=e[0].showNotifications,q((()=>y=!1))),v.$set(o);const i={};if(!j&&1&t&&(j=!0,i.value=e[0].notificationToMail,q((()=>j=!1))),N.$set(i),35&t){let n;for(H=e[1],n=0;n<H.length;n+=1){const o=me(e,H,n);J[n]?J[n].p(o,t):(J[n]=pe(o),J[n].c(),J[n].m(_,null))}for(;n<J.length;n+=1)J[n].d(1);J.length=H.length}const s={};16384&t&&(s.$$scope={dirty:t,ctx:e}),I.$set(s)},i(e){O||(Z(l.$$.fragment,e),Z(v.$$.fragment,e),Z(N.$$.fragment,e),Z(I.$$.fragment,e),O=!0)},o(e){Q(l.$$.fragment,e),Q(v.$$.fragment,e),Q(N.$$.fragment,e),Q(I.$$.fragment,e),O=!1},d(e){e&&p(t),se(l),se(v),se(N),h(J,e),e&&p(D),se(I,e)}}}function pe(e){let t,n,o,i,s,l,r,c,a,d,f,h=e[11].type+"";return{c(){t=$("div"),n=$("input"),s=x(),l=$("label"),r=y(h),a=x(),n.checked=o=e[0].typesOfNotification.includes(e[11].type),b(n,"type","checkbox"),b(n,"id",i=e[11].id),b(l,"for",c=e[11].id)},m(o,i){g(o,t,i),m(t,n),m(t,s),m(t,l),m(l,r),m(t,a),d||(f=w(n,"change",(function(){u(e[5](e[11].type))&&e[5](e[11].type).apply(this,arguments)})),d=!0)},p(t,s){e=t,3&s&&o!==(o=e[0].typesOfNotification.includes(e[11].type))&&(n.checked=o),2&s&&i!==(i=e[11].id)&&b(n,"id",i),2&s&&h!==(h=e[11].type+"")&&z(r,h),2&s&&c!==(c=e[11].id)&&b(l,"for",c)},d(e){e&&p(t),d=!1,f()}}}function he(e){let t;return{c(){t=y("Speichern")},m(e,n){g(e,t,n)},d(e){e&&p(t)}}}function $e(e){let t,n,o,i,s=e[0]&&ge(e);return{c(){t=$("div"),n=$("h2"),n.textContent="Meine Benachrichtigungen",o=x(),s&&s.c()},m(e,l){g(e,t,l),m(t,n),m(t,o),s&&s.m(t,null),i=!0},p(e,[n]){e[0]?s?(s.p(e,n),1&n&&Z(s,1)):(s=ge(e),s.c(),Z(s,1),s.m(t,null)):s&&(K(),Q(s,1,1,(()=>{s=null})),U())},i(e){i||(Z(s),i=!0)},o(e){Q(s),i=!1},d(e){e&&p(t),s&&s.d()}}}function ve(e,o,i){const{Button:s,TextField:l,Switch:r}=t;let{settings:c}=o,a=[];const u=E();return S((async()=>{i(1,a=(await n.getNotificationTypes()).filter((({active:e})=>e)))})),e.$$set=e=>{"settings"in e&&i(0,c=e.settings)},[c,a,s,r,function(){u("save")},function(e){const t=c.typesOfNotification.findIndex((t=>t===e));t>-1?c.typesOfNotification.splice(t,1):c.typesOfNotification.unshift(e)},function(t){e.$$.not_equal(c.notificationActivated,t)&&(c.notificationActivated=t,i(0,c))},function(t){e.$$.not_equal(c.showNotifications,t)&&(c.showNotifications=t,i(0,c))},function(t){e.$$.not_equal(c.notificationToMail,t)&&(c.notificationToMail=t,i(0,c))}]}class ye extends re{constructor(e){super(),le(this,e,ve,$e,d,{settings:0})}}function xe(e){let t,n,o,i,s;return{c(){t=v("svg"),n=v("path"),o=v("line"),i=v("line"),b(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"),b(o,"x1","12"),b(o,"y1","9"),b(o,"x2","12"),b(o,"y2","13"),b(i,"x1","12"),b(i,"y1","17"),b(i,"x2","12.01"),b(i,"y2","17"),b(t,"xmlns","http://www.w3.org/2000/svg"),b(t,"width",e[0]),b(t,"height",e[0]),b(t,"fill","none"),b(t,"viewBox","0 0 24 24"),b(t,"stroke","currentColor"),b(t,"stroke-width",e[1]),b(t,"stroke-linecap","round"),b(t,"stroke-linejoin","round"),b(t,"class",s="feather feather-alert-triangle "+e[2])},m(e,s){g(e,t,s),m(t,n),m(t,o),m(t,i)},p(e,[n]){1&n&&b(t,"width",e[0]),1&n&&b(t,"height",e[0]),2&n&&b(t,"stroke-width",e[1]),4&n&&s!==(s="feather feather-alert-triangle "+e[2])&&b(t,"class",s)},i:l,o:l,d(e){e&&p(t)}}}function ke(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,i,s]}class we extends re{constructor(e){super(),le(this,e,ke,xe,d,{size:0,strokeWidth:1,class:2})}}function be(e){let t,n,o,i;return{c(){t=v("svg"),n=v("line"),o=v("polyline"),b(n,"x1","19"),b(n,"y1","12"),b(n,"x2","5"),b(n,"y2","12"),b(o,"points","12 19 5 12 12 5"),b(t,"xmlns","http://www.w3.org/2000/svg"),b(t,"width",e[0]),b(t,"height",e[0]),b(t,"fill","none"),b(t,"viewBox","0 0 24 24"),b(t,"stroke","currentColor"),b(t,"stroke-width",e[1]),b(t,"stroke-linecap","round"),b(t,"stroke-linejoin","round"),b(t,"class",i="feather feather-arrow-left "+e[2])},m(e,i){g(e,t,i),m(t,n),m(t,o)},p(e,[n]){1&n&&b(t,"width",e[0]),1&n&&b(t,"height",e[0]),2&n&&b(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-arrow-left "+e[2])&&b(t,"class",i)},i:l,o:l,d(e){e&&p(t)}}}function ze(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,i,s]}class Ce extends re{constructor(e){super(),le(this,e,ze,be,d,{size:0,strokeWidth:1,class:2})}}function Le(e){let t,n,o,i;return{c(){t=v("svg"),n=v("path"),o=v("path"),b(n,"d","M12 20h9"),b(o,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"),b(t,"xmlns","http://www.w3.org/2000/svg"),b(t,"width",e[0]),b(t,"height",e[0]),b(t,"fill","none"),b(t,"viewBox","0 0 24 24"),b(t,"stroke","currentColor"),b(t,"stroke-width",e[1]),b(t,"stroke-linecap","round"),b(t,"stroke-linejoin","round"),b(t,"class",i="feather feather-edit-3 "+e[2])},m(e,i){g(e,t,i),m(t,n),m(t,o)},p(e,[n]){1&n&&b(t,"width",e[0]),1&n&&b(t,"height",e[0]),2&n&&b(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-edit-3 "+e[2])&&b(t,"class",i)},i:l,o:l,d(e){e&&p(t)}}}function Ne(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,i,s]}class je extends re{constructor(e){super(),le(this,e,Ne,Le,d,{size:0,strokeWidth:1,class:2})}}function Te(e){let t,n,o,i;return{c(){t=v("svg"),n=v("line"),o=v("line"),b(n,"x1","12"),b(n,"y1","5"),b(n,"x2","12"),b(n,"y2","19"),b(o,"x1","5"),b(o,"y1","12"),b(o,"x2","19"),b(o,"y2","12"),b(t,"xmlns","http://www.w3.org/2000/svg"),b(t,"width",e[0]),b(t,"height",e[0]),b(t,"fill","none"),b(t,"viewBox","0 0 24 24"),b(t,"stroke","currentColor"),b(t,"stroke-width",e[1]),b(t,"stroke-linecap","round"),b(t,"stroke-linejoin","round"),b(t,"class",i="feather feather-plus "+e[2])},m(e,i){g(e,t,i),m(t,n),m(t,o)},p(e,[n]){1&n&&b(t,"width",e[0]),1&n&&b(t,"height",e[0]),2&n&&b(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-plus "+e[2])&&b(t,"class",i)},i:l,o:l,d(e){e&&p(t)}}}function Me(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,i,s]}class Se extends re{constructor(e){super(),le(this,e,Me,Te,d,{size:0,strokeWidth:1,class:2})}}function Ee(e){let t,n,o,i,s,r;return{c(){t=v("svg"),n=v("polyline"),o=v("path"),i=v("line"),s=v("line"),b(n,"points","3 6 5 6 21 6"),b(o,"d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"),b(i,"x1","10"),b(i,"y1","11"),b(i,"x2","10"),b(i,"y2","17"),b(s,"x1","14"),b(s,"y1","11"),b(s,"x2","14"),b(s,"y2","17"),b(t,"xmlns","http://www.w3.org/2000/svg"),b(t,"width",e[0]),b(t,"height",e[0]),b(t,"fill","none"),b(t,"viewBox","0 0 24 24"),b(t,"stroke","currentColor"),b(t,"stroke-width",e[1]),b(t,"stroke-linecap","round"),b(t,"stroke-linejoin","round"),b(t,"class",r="feather feather-trash-2 "+e[2])},m(e,l){g(e,t,l),m(t,n),m(t,o),m(t,i),m(t,s)},p(e,[n]){1&n&&b(t,"width",e[0]),1&n&&b(t,"height",e[0]),2&n&&b(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-trash-2 "+e[2])&&b(t,"class",r)},i:l,o:l,d(e){e&&p(t)}}}function _e(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,i,s]}class Be extends re{constructor(e){super(),le(this,e,_e,Ee,d,{size:0,strokeWidth:1,class:2})}}const{Map:De}=ee;function Ie(e,t,n){const o=e.slice();return o[28]=t[n],o}function Oe(e,t,n){const o=e.slice();return o[32]=t[n],o[34]=n,o}function Ae(e){let t,n,o,i,s,l,r,c,u,d,f,v,y,k,z,L,N,j,T,M,S,E,_,D,I,O,A,W,P,R,V,F,H,J,G;function K(t){e[15](t)}let U={type:"text",placeholder:"Neuer Layout Name"};function ee(t){e[16](t)}void 0!==e[0].id&&(U.value=e[0].id),i=new e[5]({props:U}),B.push((()=>ne(i,"value",K)));let te={slotLeft:!0,$$slots:{default:[We]},$$scope:{ctx:e}};void 0!==e[0].activated&&(te.value=e[0].activated),c=new e[9]({props:te}),B.push((()=>ne(c,"value",ee))),f=new e[6]({});let le={ctx:e,current:null,token:null,hasCatch:!1,pending:He,then:qe,catch:Pe,value:31,blocks:[,,,]};X(T=e[2],le),S=new e[6]({});let re=e[10],ce=[];for(let t=0;t<re.length;t+=1)ce[t]=Je(Ie(e,re,t));let ae=e[4]&&Ge();return F=new e[8]({props:{filled:!0,class:"saveBtnLayout",$$slots:{default:[Ke]},$$scope:{ctx:e}}}),F.$on("click",e[23]),{c(){t=$("div"),n=$("p"),n.textContent="Name des Layouts",o=x(),oe(i.$$.fragment),l=x(),r=$("div"),oe(c.$$.fragment),d=x(),oe(f.$$.fragment),v=x(),y=$("div"),k=$("label"),k.textContent="Vorhandene Module",z=x(),L=$("input"),N=x(),j=$("div"),le.block.c(),M=x(),oe(S.$$.fragment),E=x(),_=$("div"),D=$("h1"),D.textContent="Wochentage",I=x(),O=$("p"),O.textContent="Wählen Sie die Tage, an denen die Vorlage angezeigt werden soll.",A=x(),W=$("div");for(let e=0;e<ce.length;e+=1)ce[e].c();P=x(),ae&&ae.c(),R=x(),V=$("div"),oe(F.$$.fragment),b(r,"class","layout-activated-switch svelte-1vkufz4"),b(k,"for","moduleSearch"),b(k,"id","textModule"),b(k,"class","svelte-1vkufz4"),b(L,"id","moduleSearch"),b(L,"type","search"),b(L,"placeholder","suche..."),b(L,"class","search_bar svelte-1vkufz4"),b(y,"class","module svelte-1vkufz4"),b(j,"class","moduleCards svelte-1vkufz4"),b(W,"class","weekdays svelte-1vkufz4"),b(V,"class","saveBtnDiv svelte-1vkufz4"),b(t,"class","newLayoutContent")},m(s,a){g(s,t,a),m(t,n),m(t,o),ie(i,t,null),m(t,l),m(t,r),ie(c,r,null),m(t,d),ie(f,t,null),m(t,v),m(t,y),m(y,k),m(y,z),m(y,L),C(L,e[3]),m(t,N),m(t,j),le.block.m(j,le.anchor=null),le.mount=()=>j,le.anchor=null,m(t,M),ie(S,t,null),m(t,E),m(t,_),m(_,D),m(_,I),m(_,O),m(_,A),m(_,W);for(let e=0;e<ce.length;e+=1)ce[e].m(W,null);m(t,P),ae&&ae.m(t,null),m(t,R),m(t,V),ie(F,V,null),H=!0,J||(G=[w(L,"input",e[17]),w(L,"input",e[18])],J=!0)},p(n,o){e=n;const l={};!s&&1&o[0]&&(s=!0,l.value=e[0].id,q((()=>s=!1))),i.$set(l);const r={};if(16&o[1]&&(r.$$scope={dirty:o,ctx:e}),!u&&1&o[0]&&(u=!0,r.value=e[0].activated,q((()=>u=!1))),c.$set(r),8&o[0]&&C(L,e[3]),le.ctx=e,4&o[0]&&T!==(T=e[2])&&X(T,le)||Y(le,e,o),17409&o[0]){let t;for(re=e[10],t=0;t<re.length;t+=1){const n=Ie(e,re,t);ce[t]?ce[t].p(n,o):(ce[t]=Je(n),ce[t].c(),ce[t].m(W,null))}for(;t<ce.length;t+=1)ce[t].d(1);ce.length=re.length}e[4]?ae||(ae=Ge(),ae.c(),ae.m(t,R)):ae&&(ae.d(1),ae=null);const a={};16&o[1]&&(a.$$scope={dirty:o,ctx:e}),F.$set(a)},i(e){H||(Z(i.$$.fragment,e),Z(c.$$.fragment,e),Z(f.$$.fragment,e),Z(le.block),Z(S.$$.fragment,e),Z(F.$$.fragment,e),H=!0)},o(e){Q(i.$$.fragment,e),Q(c.$$.fragment,e),Q(f.$$.fragment,e);for(let e=0;e<3;e+=1){Q(le.blocks[e])}Q(S.$$.fragment,e),Q(F.$$.fragment,e),H=!1},d(e){e&&p(t),se(i),se(c),se(f),le.block.d(),le.token=null,le=null,se(S),h(ce,e),ae&&ae.d(),se(F),J=!1,a(G)}}}function We(e){let t;return{c(){t=$("span"),t.textContent="Aktivieren Sie das Modul",b(t,"class","mr svelte-1vkufz4")},m(e,n){g(e,t,n)},d(e){e&&p(t)}}}function Pe(e){return{c:l,m:l,p:l,i:l,o:l,d:l}}function qe(e){let t,n,o=[],i=new De,s=e[31];const l=e=>e[34];for(let t=0;t<s.length;t+=1){let n=Oe(e,s,t),r=l(n);i.set(r,o[t]=Fe(r,n))}return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=k()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);g(e,t,i),n=!0},p(e,n){2053&n[0]&&(s=e[31],K(),o=function(e,t,n,o,i,s,l,r,c,a,u,d){let f=e.length,m=s.length,g=f;const p={};for(;g--;)p[e[g].key]=g;const h=[],$=new Map,v=new Map;for(g=m;g--;){const e=d(i,s,g),r=n(e);let c=l.get(r);c?o&&c.p(e,t):(c=a(r,e),c.c()),$.set(r,h[g]=c),r in p&&v.set(r,Math.abs(g-p[r]))}const y=new Set,x=new Set;function k(e){Z(e,1),e.m(r,u),l.set(e.key,e),u=e.first,m--}for(;f&&m;){const t=h[m-1],n=e[f-1],o=t.key,i=n.key;t===n?(u=t.first,f--,m--):$.has(i)?!l.has(o)||y.has(o)?k(t):x.has(i)?f--:v.get(o)>v.get(i)?(x.add(o),k(t)):(y.add(i),f--):(c(n,l),f--)}for(;f--;){const t=e[f];$.has(t.key)||c(t,l)}for(;m;)k(h[m-1]);return h}(o,n,l,1,e,s,i,t.parentNode,te,Fe,t,Oe),U())},i(e){if(!n){for(let e=0;e<s.length;e+=1)Z(o[e]);n=!0}},o(e){for(let e=0;e<o.length;e+=1)Q(o[e]);n=!1},d(e){for(let t=0;t<o.length;t+=1)o[t].d(e);e&&p(t)}}}function Re(e){let t,n,o=-1!=e[0].moduleList.findIndex(i)?"abwählen":"wählen";function i(...t){return e[19](e[32],...t)}return{c(){t=$("span"),n=y(o),b(t,"class","centerText svelte-1vkufz4")},m(e,o){g(e,t,o),m(t,n)},p(t,s){e=t,5&s[0]&&o!==(o=-1!=e[0].moduleList.findIndex(i)?"abwählen":"wählen")&&z(n,o)},d(e){e&&p(t)}}}function Ve(e){let t,n,o,i,s,l=e[32].name+"";function r(...t){return e[20](e[32],...t)}return o=new e[8]({props:{class:-1!=e[0].moduleList.findIndex(r)?"btn__selected":"",$$slots:{default:[Re]},$$scope:{ctx:e}}}),o.$on("click",(function(){return e[21](e[32])})),{c(){t=y(l),n=x(),oe(o.$$.fragment),i=x()},m(e,l){g(e,t,l),g(e,n,l),ie(o,e,l),g(e,i,l),s=!0},p(n,i){e=n,(!s||4&i[0])&&l!==(l=e[32].name+"")&&z(t,l);const c={};5&i[0]&&(c.class=-1!=e[0].moduleList.findIndex(r)?"btn__selected":""),5&i[0]|16&i[1]&&(c.$$scope={dirty:i,ctx:e}),o.$set(c)},i(e){s||(Z(o.$$.fragment,e),s=!0)},o(e){Q(o.$$.fragment,e),s=!1},d(e){e&&p(t),e&&p(n),se(o,e),e&&p(i)}}}function Fe(e,t){let n,o,i;return o=new t[7]({props:{style:"margin: 20px",$$slots:{default:[Ve]},$$scope:{ctx:t}}}),{key:e,first:null,c(){n=k(),oe(o.$$.fragment),this.first=n},m(e,t){g(e,n,t),ie(o,e,t),i=!0},p(e,n){t=e;const i={};5&n[0]|16&n[1]&&(i.$$scope={dirty:n,ctx:t}),o.$set(i)},i(e){i||(Z(o.$$.fragment,e),i=!0)},o(e){Q(o.$$.fragment,e),i=!1},d(e){e&&p(n),se(o,e)}}}function He(e){return{c:l,m:l,p:l,i:l,o:l,d:l}}function Je(e){let t,n,o,i,s,l,r,c,a,u=e[28].day+"";function d(...t){return e[22](e[28],...t)}return{c(){t=$("div"),n=$("input"),i=x(),s=$("label"),l=y(u),r=x(),n.checked=o=e[0].days.includes(e[28].value),b(n,"type","checkbox"),b(n,"id",e[28].value),b(n,"class","svelte-1vkufz4"),b(s,"for",e[28].value),b(t,"class","day svelte-1vkufz4")},m(e,o){g(e,t,o),m(t,n),m(t,i),m(t,s),m(s,l),m(t,r),c||(a=w(n,"change",d),c=!0)},p(t,i){e=t,1&i[0]&&o!==(o=e[0].days.includes(e[28].value))&&(n.checked=o)},d(e){e&&p(t),c=!1,a()}}}function Ge(e){let t;return{c(){t=$("div"),t.textContent="Achtung: Die ausgewählten Tage sind bereits in einem anderen Layout hinterlegt. Diese werden beim speichern in den bereits existierenden und aktiven Layouts überschrieben.",b(t,"class","errroWeekdaysOverlapping svelte-1vkufz4")},m(e,n){g(e,t,n)},d(e){e&&p(t)}}}function Ke(e){let t;return{c(){t=y("Layout speichern")},m(e,n){g(e,t,n)},d(e){e&&p(t)}}}function Ue(e){let t,n,o=e[0]&&e[1]&&Ae(e);return{c(){t=$("div"),o&&o.c(),b(t,"class","newLayoutContainer")},m(e,i){g(e,t,i),o&&o.m(t,null),n=!0},p(e,n){e[0]&&e[1]?o?(o.p(e,n),3&n[0]&&Z(o,1)):(o=Ae(e),o.c(),Z(o,1),o.m(t,null)):o&&(K(),Q(o,1,1,(()=>{o=null})),U())},i(e){n||(Z(o),n=!0)},o(e){Q(o),n=!1},d(e){e&&p(t),o&&o.d()}}}function Ze(e,o,i){let s;const{TextField:l,Divider:r,Card:c,Button:a,Switch:u}=t,d=E(),f=n.getAllModules().map((e=>({...e,isSelected:!1})));let m=f,{settings:g}=o,{layout:p}=o,h=new Map;S((async()=>{await g,await(W(),O)}));let $=[{day:"Montag",status:!1,value:"Mo"},{day:"Dienstag",status:!1,value:"Tu"},{day:"Mittwoch",status:!1,value:"We"},{day:"Donnerstag",status:!1,value:"Th"},{day:"Freitag",status:!1,value:"Fr"},{day:"Samstag",status:!1,value:"Sa"},{day:"Sonntag",status:!1,value:"Su"}];function v(e){const t=p.moduleList.findIndex((t=>t.moduleId==e.id));-1==t?p.moduleList.splice(p.moduleList.length-1,0,{moduleId:e.id.toString(),position:p.moduleList.length.toString()}):p.moduleList.splice(t,1),i(0,p)}let y="";function x(){i(2,m=f.filter((e=>e.name.toLowerCase().includes(y.toLowerCase()))))}function k(){if(""!=p.id&&0!=p.moduleList.length){for(let[e,t]of h){const n=g.dashboardLayout[e];t.forEach((e=>{const t=n.days.findIndex((t=>e==t));n.days.splice(t,1)})),i(1,g.dashboardLayout[e]=n,g)}d("save",p)}}function w(e,t){if(e.target.checked)p.days.unshift(t);else{const e=p.days.findIndex((e=>e==t));p.days.splice(e,1)}i(0,p.days=$.filter((e=>p.days.includes(e.value))).map((e=>e.value)),p)}return e.$$set=e=>{"settings"in e&&i(1,g=e.settings),"layout"in e&&i(0,p=e.layout)},e.$$.update=()=>{1&e.$$.dirty[0]&&i(4,s=function(e){h=new Map;let t=!1;return g.dashboardLayout.forEach(((n,o)=>{n.id!=p.id&&n.activated&&e.forEach(((e,i)=>{if(n.days.includes(e))return t=!0,h.has(o)?void h.get(o).push(e):void h.set(o,[e])}))})),t}(p.days))},[p,g,m,y,s,l,r,c,a,u,$,v,x,k,w,function(t){e.$$.not_equal(p.id,t)&&(p.id=t,i(0,p))},function(t){e.$$.not_equal(p.activated,t)&&(p.activated=t,i(0,p))},function(){y=this.value,i(3,y)},e=>x(),(e,t)=>t.moduleId.toString()==e.id.toString(),(e,t)=>t.moduleId.toString()==e.id.toString(),e=>v(e),(e,t)=>w(t,e.value),()=>k()]}class Qe extends re{constructor(e){var t;super(),document.getElementById("svelte-1vkufz4-style")||((t=$("style")).id="svelte-1vkufz4-style",t.textContent=".search_bar.svelte-1vkufz4.svelte-1vkufz4{padding:0.2em;min-width:40%;margin-left:113px;height:2em}.module.svelte-1vkufz4.svelte-1vkufz4{display:flex;flex-direction:row;font-weight:bold}.moduleCards.svelte-1vkufz4 .btn{border:none;border-radius:10px;height:23px;width:100px;float:right;cursor:pointer}.moduleCards.svelte-1vkufz4 .btn__selected{background-color:#71c23f !important;color:white !important}#textModule.svelte-1vkufz4.svelte-1vkufz4{margin-right:89px}.errroWeekdaysOverlapping.svelte-1vkufz4.svelte-1vkufz4{color:red;font-weight:600;font-size:0.9em}.centerText.svelte-1vkufz4.svelte-1vkufz4{display:block;width:100%;text-align:center}.weekdays.svelte-1vkufz4.svelte-1vkufz4{display:flex;gap:1em}.weekdays.svelte-1vkufz4 .day.svelte-1vkufz4{margin-top:1em;margin-bottom:1em}.mr.svelte-1vkufz4.svelte-1vkufz4{margin-right:1.5em}.layout-activated-switch.svelte-1vkufz4.svelte-1vkufz4{margin:1.5em 0}.saveBtnDiv.svelte-1vkufz4.svelte-1vkufz4{margin:2em 0}",m(document.head,t)),le(this,e,Ze,Ue,d,{settings:1,layout:0},[-1,-1])}}function Xe(e,t,n){const o=e.slice();return o[20]=t[n],o}function Ye(e,t,n){const o=e.slice();return o[23]=t[n],o}function et(e){let t;return{c(){t=y("Abbrechen")},m(e,n){g(e,t,n)},d(e){e&&p(t)}}}function tt(e){let t;return{c(){t=y("Löschen")},m(e,n){g(e,t,n)},d(e){e&&p(t)}}}function nt(e){let t,n,o,i,s,l,r;return i=new e[6]({props:{filled:!0,$$slots:{default:[et]},$$scope:{ctx:e}}}),i.$on("click",e[14]),l=new e[6]({props:{danger:!0,outline:!0,$$slots:{default:[tt]},$$scope:{ctx:e}}}),l.$on("click",e[13]),{c(){t=$("div"),t.textContent="Wollen Sie das Layout wirklich löschen?",n=x(),o=$("div"),oe(i.$$.fragment),s=x(),oe(l.$$.fragment),b(o,"class","btns-container svelte-1rgcwkg")},m(e,c){g(e,t,c),g(e,n,c),g(e,o,c),ie(i,o,null),m(o,s),ie(l,o,null),r=!0},p(e,t){const n={};134217728&t&&(n.$$scope={dirty:t,ctx:e}),i.$set(n);const o={};134217728&t&&(o.$$scope={dirty:t,ctx:e}),l.$set(o)},i(e){r||(Z(i.$$.fragment,e),Z(l.$$.fragment,e),r=!0)},o(e){Q(i.$$.fragment,e),Q(l.$$.fragment,e),r=!1},d(e){e&&p(t),e&&p(n),e&&p(o),se(i),se(l)}}}function ot(e){let t,n,o;return n=new we({props:{size:"25"}}),{c(){t=$("div"),oe(n.$$.fragment),b(t,"slot","title-icon")},m(e,i){g(e,t,i),ie(n,t,null),o=!0},p:l,i(e){o||(Z(n.$$.fragment,e),o=!0)},o(e){Q(n.$$.fragment,e),o=!1},d(e){e&&p(t),se(n)}}}function it(e){let t,n;return t=new e[5]({props:{title:"Bestätigung",closeCallback:e[26],danger:!0,$$slots:{"title-icon":[ot],default:[nt]},$$scope:{ctx:e}}}),{c(){oe(t.$$.fragment)},m(e,o){ie(t,e,o),n=!0},p(e,n){const o={};67108864&n&&(o.closeCallback=e[26]),134217728&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(Z(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){se(t,e)}}}function st(e){let t,n,o,i,s,l,r,c,a,u,d;function f(e,t){return e[1]?ct:rt}s=new Ce({props:{size:"24"}});let h=f(e),v=h(e);return c=new Qe({props:{layout:e[2],settings:e[0]}}),c.$on("save",e[17]),{c(){t=$("div"),n=$("div"),o=$("h2"),i=$("span"),oe(s.$$.fragment),l=x(),v.c(),r=x(),oe(c.$$.fragment),b(i,"class","btn-back svelte-1rgcwkg")},m(f,p){g(f,t,p),m(t,n),m(n,o),m(o,i),ie(s,i,null),m(o,l),v.m(o,null),m(t,r),ie(c,t,null),a=!0,u||(d=w(i,"click",e[10]),u=!0)},p(e,t){h===(h=f(e))&&v?v.p(e,t):(v.d(1),v=h(e),v&&(v.c(),v.m(o,null)));const n={};4&t&&(n.layout=e[2]),1&t&&(n.settings=e[0]),c.$set(n)},i(e){a||(Z(s.$$.fragment,e),Z(c.$$.fragment,e),a=!0)},o(e){Q(s.$$.fragment,e),Q(c.$$.fragment,e),a=!1},d(e){e&&p(t),se(s),v.d(),se(c),u=!1,d()}}}function lt(e){let t,n,o,i,s,l,r,c,a;o=new e[6]({props:{$$slots:{default:[at]},$$scope:{ctx:e}}}),o.$on("click",e[11]);let u=e[0].dashboardLayout,d=[];for(let t=0;t<u.length;t+=1)d[t]=gt(Xe(e,u,t));const f=e=>Q(d[e],1,1,(()=>{d[e]=null}));return{c(){t=$("h2"),t.textContent="Mein Layout",n=x(),oe(o.$$.fragment),i=x(),s=$("div"),l=$("p"),l.textContent="Dies sind Ihre vorhandenen Vorlagen.",r=x(),c=$("div");for(let e=0;e<d.length;e+=1)d[e].c();b(c,"class","layout-cards svelte-1rgcwkg"),b(s,"class","form-setting")},m(e,u){g(e,t,u),g(e,n,u),ie(o,e,u),g(e,i,u),g(e,s,u),m(s,l),m(s,r),m(s,c);for(let e=0;e<d.length;e+=1)d[e].m(c,null);a=!0},p(e,t){const n={};if(134217728&t&&(n.$$scope={dirty:t,ctx:e}),o.$set(n),37121&t){let n;for(u=e[0].dashboardLayout,n=0;n<u.length;n+=1){const o=Xe(e,u,n);d[n]?(d[n].p(o,t),Z(d[n],1)):(d[n]=gt(o),d[n].c(),Z(d[n],1),d[n].m(c,null))}for(K(),n=u.length;n<d.length;n+=1)f(n);U()}},i(e){if(!a){Z(o.$$.fragment,e);for(let e=0;e<u.length;e+=1)Z(d[e]);a=!0}},o(e){Q(o.$$.fragment,e),d=d.filter(Boolean);for(let e=0;e<d.length;e+=1)Q(d[e]);a=!1},d(e){e&&p(t),e&&p(n),se(o,e),e&&p(i),e&&p(s),h(d,e)}}}function rt(e){let t,n,o,i=e[2].id+"";return{c(){t=y("Layouts "),n=y(i),o=y(" bearbeiten")},m(e,i){g(e,t,i),g(e,n,i),g(e,o,i)},p(e,t){4&t&&i!==(i=e[2].id+"")&&z(n,i)},d(e){e&&p(t),e&&p(n),e&&p(o)}}}function ct(e){let t;return{c(){t=y("Neues Layout erstellen")},m(e,n){g(e,t,n)},p:l,d(e){e&&p(t)}}}function at(e){let t,n,o;return t=new Se({props:{size:"24"}}),{c(){oe(t.$$.fragment),n=y("\n Neues Layout hinzufügen")},m(e,i){ie(t,e,i),g(e,n,i),o=!0},p:l,i(e){o||(Z(t.$$.fragment,e),o=!0)},o(e){Q(t.$$.fragment,e),o=!1},d(e){se(t,e),e&&p(n)}}}function ut(e){let t,n;return t=new e[7]({props:{class:"layout-card",$$slots:{default:[mt]},$$scope:{ctx:e}}}),{c(){oe(t.$$.fragment)},m(e,o){ie(t,e,o),n=!0},p(e,n){const o={};134217729&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(Z(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){se(t,e)}}}function dt(e){let t,n=e[20].moduleList,o=[];for(let t=0;t<n.length;t+=1)o[t]=ft(Ye(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=k()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);g(e,t,n)},p(e,i){if(257&i){let s;for(n=e[20].moduleList,s=0;s<n.length;s+=1){const l=Ye(e,n,s);o[s]?o[s].p(l,i):(o[s]=ft(l),o[s].c(),o[s].m(t.parentNode,t))}for(;s<o.length;s+=1)o[s].d(1);o.length=n.length}},d(e){h(o,e),e&&p(t)}}}function ft(e){let t,n,o,i=e[8](e[23].moduleId)+"";return{c(){t=$("p"),n=y(i),o=x(),b(t,"class","svelte-1rgcwkg")},m(e,i){g(e,t,i),m(t,n),m(t,o)},p(e,t){1&t&&i!==(i=e[8](e[23].moduleId)+"")&&z(n,i)},d(e){e&&p(t)}}}function mt(e){let t,n,o,i,s,l,r,c,d,f,h,v,k,C,L,j,T,M,S,E,_,B,D,I,O=e[20].id+"",A=e[20].days+"";n=new je({props:{size:"18"}}),s=new Be({props:{size:"18"}});let W=e[20].moduleList&&dt(e);return{c(){t=$("div"),oe(n.$$.fragment),o=x(),i=$("div"),oe(s.$$.fragment),l=x(),r=$("div"),c=$("span"),d=x(),f=y(O),h=x(),v=$("div"),k=$("div"),k.textContent="Aktiv an den Tagen",C=x(),L=$("p"),j=y(A),T=x(),M=$("div"),S=$("div"),S.textContent="Aktive Module",E=x(),W&&W.c(),_=x(),b(t,"class","layout-card--icons edit svelte-1rgcwkg"),b(i,"class","layout-card--icons delete svelte-1rgcwkg"),b(c,"class","active-indicator svelte-1rgcwkg"),N(c,"active",e[20].activated),b(r,"class","layout-card--title svelte-1rgcwkg"),b(k,"class","layout-card--subtitle svelte-1rgcwkg"),b(L,"class","svelte-1rgcwkg"),b(v,"class","layout-card--section svelte-1rgcwkg"),b(S,"class","layout-card--subtitle svelte-1rgcwkg"),b(M,"class","layout-card--section svelte-1rgcwkg")},m(a,p){g(a,t,p),ie(n,t,null),g(a,o,p),g(a,i,p),ie(s,i,null),g(a,l,p),g(a,r,p),m(r,c),m(r,d),m(r,f),g(a,h,p),g(a,v,p),m(v,k),m(v,C),m(v,L),m(L,j),g(a,T,p),g(a,M,p),m(M,S),m(M,E),W&&W.m(M,null),g(a,_,p),B=!0,D||(I=[w(t,"click",(function(){u(e[12](e[20]))&&e[12](e[20]).apply(this,arguments)})),w(i,"click",(function(){u(e[15](e[20]))&&e[15](e[20]).apply(this,arguments)}))],D=!0)},p(t,n){e=t,1&n&&N(c,"active",e[20].activated),(!B||1&n)&&O!==(O=e[20].id+"")&&z(f,O),(!B||1&n)&&A!==(A=e[20].days+"")&&z(j,A),e[20].moduleList?W?W.p(e,n):(W=dt(e),W.c(),W.m(M,null)):W&&(W.d(1),W=null)},i(e){B||(Z(n.$$.fragment,e),Z(s.$$.fragment,e),B=!0)},o(e){Q(n.$$.fragment,e),Q(s.$$.fragment,e),B=!1},d(e){e&&p(t),se(n),e&&p(o),e&&p(i),se(s),e&&p(l),e&&p(r),e&&p(h),e&&p(v),e&&p(T),e&&p(M),W&&W.d(),e&&p(_),D=!1,a(I)}}}function gt(e){let t,n,o=null!=e[20].id&&ut(e);return{c(){o&&o.c(),t=k()},m(e,i){o&&o.m(e,i),g(e,t,i),n=!0},p(e,n){null!=e[20].id?o?(o.p(e,n),1&n&&Z(o,1)):(o=ut(e),o.c(),Z(o,1),o.m(t.parentNode,t)):o&&(K(),Q(o,1,1,(()=>{o=null})),U())},i(e){n||(Z(o),n=!0)},o(e){Q(o),n=!1},d(e){o&&o.d(e),e&&p(t)}}}function pt(e){let t,n,o,i,s,l,r;function c(t){e[16](t)}let a={$$slots:{default:[it,({closeCallback:e})=>({26:e}),({closeCallback:e})=>e?67108864:0]},$$scope:{ctx:e}};void 0!==e[3]&&(a.open=e[3]),n=new e[4]({props:a}),B.push((()=>ne(n,"open",c)));const u=[lt,st],d=[];function f(e,t){return!e[0]||e[1]||e[2]?e[0]&&(e[1]||null!=e[2])?1:-1:0}return~(s=f(e))&&(l=d[s]=u[s](e)),{c(){t=$("div"),oe(n.$$.fragment),i=x(),l&&l.c()},m(e,o){g(e,t,o),ie(n,t,null),m(t,i),~s&&d[s].m(t,null),r=!0},p(e,[i]){const r={};201326592&i&&(r.$$scope={dirty:i,ctx:e}),!o&&8&i&&(o=!0,r.open=e[3],q((()=>o=!1))),n.$set(r);let c=s;s=f(e),s===c?~s&&d[s].p(e,i):(l&&(K(),Q(d[c],1,1,(()=>{d[c]=null})),U()),~s?(l=d[s],l?l.p(e,i):(l=d[s]=u[s](e),l.c()),Z(l,1),l.m(t,null)):l=null)},i(e){r||(Z(n.$$.fragment,e),Z(l),r=!0)},o(e){Q(n.$$.fragment,e),Q(l),r=!1},d(e){e&&p(t),se(n),~s&&d[s].d()}}}function ht(e,o,i){const{Modal:s,Dialog:l,Button:r,Card:c}=t;let a,{settings:u}=o,d=!1;const f=E();function m(e){if(i(1,d=!1),i(2,a=void 0),!e.detail||!e.detail.id)return void console.error("Could not save Layout!");const t=u.dashboardLayout.findIndex((t=>t.id==e.detail.id));t>-1?i(0,u.dashboardLayout[t]=e.detail,u):u.dashboardLayout.unshift(e.detail),f("save")}let g,p=!1;return e.$$set=e=>{"settings"in e&&i(0,u=e.settings)},[u,d,a,p,s,l,r,c,function(e){return n.getModuleName(e)},m,function(){i(2,a=void 0),i(1,d=!1)},function(){i(2,a={id:"",activated:!0,days:[],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"9999",position:"1"}]}),i(1,d=!0)},function(e){i(2,a={id:e.id,activated:e.activated,days:[...e.days],moduleList:[...e.moduleList]})},function(){const e=u.dashboardLayout.findIndex((e=>e.id==g.id));-1!=e&&(u.dashboardLayout.splice(e,1),i(0,u),i(3,p=!1),f("save"))},function(){i(3,p=!1),g=void 0},function(e){g=e,i(3,p=!0)},function(e){p=e,i(3,p)},e=>m(e)]}class $t extends re{constructor(e){var t;super(),document.getElementById("svelte-1rgcwkg-style")||((t=$("style")).id="svelte-1rgcwkg-style",t.textContent=".btn-back.svelte-1rgcwkg.svelte-1rgcwkg{cursor:pointer;margin-right:1em}.btns-container.svelte-1rgcwkg.svelte-1rgcwkg{display:flex;justify-content:space-between;margin-top:1em}.layout-cards.svelte-1rgcwkg.svelte-1rgcwkg{display:flex;flex-flow:row wrap;gap:2em}.layout-cards.svelte-1rgcwkg .svelte-1rgcwkg{width:200px}.layout-cards.svelte-1rgcwkg .layout-card--icons.svelte-1rgcwkg{cursor:pointer;position:absolute;width:auto}.layout-cards.svelte-1rgcwkg .layout-card--icons.edit.svelte-1rgcwkg{right:45px;top:16px}.layout-cards.svelte-1rgcwkg .layout-card--icons.delete.svelte-1rgcwkg{right:21px;top:16px}.layout-cards.svelte-1rgcwkg .layout-card{position:relative;font-size:1em}.layout-cards.svelte-1rgcwkg .layout-card--title.svelte-1rgcwkg{font-weight:600;height:20px;display:flex;gap:0.5em;place-items:center;margin-bottom:1.5em;margin-top:1em}.layout-cards.svelte-1rgcwkg .layout-card--subtitle.svelte-1rgcwkg{font-weight:600;margin-bottom:0.5em}.layout-cards.svelte-1rgcwkg .layout-card--section.svelte-1rgcwkg{font-size:0.8em;margin-bottom:1.5em}.layout-cards.svelte-1rgcwkg p.svelte-1rgcwkg{margin:0.5 0 0 0}.active-indicator.svelte-1rgcwkg.svelte-1rgcwkg{height:15px;width:15px;border-radius:50%;display:inline-block;background-color:red}.active.svelte-1rgcwkg.svelte-1rgcwkg{background-color:green}",m(document.head,t)),le(this,e,ht,pt,d,{settings:0})}}function vt(e,t,n){const o=e.slice();return o[5]=t[n],o[7]=n,o}function yt(e){let t,n,o,i,s,l,r,c,a,u=e[5].name+"",d=e[5].version+"",f=0===e[7]&&function(e){let t,n,o;return{c(){t=$("td"),n=y("enablerr.ui"),b(t,"rowspan",o=2*e[0].length),b(t,"class","svelte-nkhwaj")},m(e,o){g(e,t,o),m(t,n)},p(e,n){1&n&&o!==(o=2*e[0].length)&&b(t,"rowspan",o)},d(e){e&&p(t)}}}(e);return{c(){t=$("tr"),f&&f.c(),n=x(),o=$("td"),i=y(u),s=x(),l=$("td"),r=y(d),c=x(),a=$("tr"),b(o,"class","svelte-nkhwaj"),b(l,"class","svelte-nkhwaj")},m(e,u){g(e,t,u),f&&f.m(t,null),m(t,n),m(t,o),m(o,i),m(t,s),m(t,l),m(l,r),m(t,c),g(e,a,u)},p(e,t){0===e[7]&&f.p(e,t)},d(e){e&&p(t),f&&f.d(),e&&p(a)}}}function xt(e){let t,n,o,i,s,r,c,a,u,d,f,v,k,w,C,L,N,j=e[4],T=[];for(let t=0;t<j.length;t+=1)T[t]=yt(vt(e,j,t));return{c(){t=$("h2"),t.textContent="Meine Versionen",n=x(),o=$("table"),i=$("tr"),i.innerHTML="<th>Komponente</th> \n <th>Modul</th> \n <th>Version</th>",s=x(),r=$("tr"),c=x(),a=$("tr"),u=$("td"),u.textContent="enablerr.mw",d=x(),f=$("td"),f.textContent="server",v=x(),k=$("td"),w=y(e[1]),C=x(),L=$("tr"),N=x();for(let e=0;e<T.length;e+=1)T[e].c();b(r,"class","filler svelte-nkhwaj"),b(u,"class","svelte-nkhwaj"),b(f,"class","svelte-nkhwaj"),b(k,"class","svelte-nkhwaj"),b(L,"class","filler svelte-nkhwaj"),b(o,"border","1"),b(o,"class","svelte-nkhwaj")},m(e,l){g(e,t,l),g(e,n,l),g(e,o,l),m(o,i),m(o,s),m(o,r),m(o,c),m(o,a),m(a,u),m(a,d),m(a,f),m(a,v),m(a,k),m(k,w),m(o,C),m(o,L),m(o,N);for(let e=0;e<T.length;e+=1)T[e].m(o,null)},p(e,[t]){if(2&t&&z(w,e[1]),17&t){let n;for(j=e[4],n=0;n<j.length;n+=1){const i=vt(e,j,n);T[n]?T[n].p(i,t):(T[n]=yt(i),T[n].c(),T[n].m(o,null))}for(;n<T.length;n+=1)T[n].d(1);T.length=j.length}},i:l,o:l,d(e){e&&p(t),e&&p(n),e&&p(o),h(T,e)}}}function kt(e,t,n){let o,i;const{serverVersion:l,uiVersions:r}=s;f(e,l,(e=>n(1,i=e))),f(e,r,(e=>n(0,o=e)));const c=o.sort(((e,t)=>e.name.localeCompare(t.name)));return[o,i,l,r,c]}class wt extends re{constructor(e){var t;super(),document.getElementById("svelte-nkhwaj-style")||((t=$("style")).id="svelte-nkhwaj-style",t.textContent="table.svelte-nkhwaj{border-collapse:collapse}td.svelte-nkhwaj{padding-left:10px;padding-top:3px;padding-bottom:3px}tr.filler.svelte-nkhwaj{height:1em}",m(document.head,t)),le(this,e,kt,xt,d,{})}}function bt(e){let t,n,o;function i(t){e[16](t)}let s={type:"email",error:!e[0]&&"Bitte Email eingeben!"};return void 0!==e[0]&&(s.value=e[0]),t=new e[6]({props:s}),B.push((()=>ne(t,"value",i))),{c(){oe(t.$$.fragment)},m(e,n){ie(t,e,n),o=!0},p(e,o){const i={};1&o&&(i.error=!e[0]&&"Bitte Email eingeben!"),!n&&1&o&&(n=!0,i.value=e[0],q((()=>n=!1))),t.$set(i)},i(e){o||(Z(t.$$.fragment,e),o=!0)},o(e){Q(t.$$.fragment,e),o=!1},d(e){se(t,e)}}}function zt(e){let t,n,o;function i(t){e[17](t)}let s={type:"number",noSpinner:!0};return void 0!==e[1]&&(s.value=e[1]),t=new e[6]({props:s}),B.push((()=>ne(t,"value",i))),{c(){oe(t.$$.fragment)},m(e,n){ie(t,e,n),o=!0},p(e,o){const i={};!n&&2&o&&(n=!0,i.value=e[1],q((()=>n=!1))),t.$set(i)},i(e){o||(Z(t.$$.fragment,e),o=!0)},o(e){Q(t.$$.fragment,e),o=!1},d(e){se(t,e)}}}function Ct(e){let t;return{c(){t=y("Ticket erstellen")},m(e,n){g(e,t,n)},d(e){e&&p(t)}}}function Lt(e){let t,n,o,i,s,l,r,c,a,u,d,f,h;return n=new e[5]({props:{name:"Benutzer",help:"Email-Adresse",$$slots:{default:[bt]},$$scope:{ctx:e}}}),i=new e[5]({props:{name:"Dauer",help:"in Stunden",class:"text-number",$$slots:{default:[zt]},$$scope:{ctx:e}}}),l=new e[8]({props:{text:"Rollen"}}),c=new e[9]({props:{name:"roleItems[]",items:e[11]}}),u=new e[4]({props:{form:e[10],filled:!0,type:"submit",$$slots:{default:[Ct]},$$scope:{ctx:e}}}),{c(){t=$("form"),oe(n.$$.fragment),o=x(),oe(i.$$.fragment),s=x(),oe(l.$$.fragment),r=x(),oe(c.$$.fragment),a=x(),oe(u.$$.fragment),b(t,"id",e[10]),b(t,"class","form-setting tickets svelte-17kglid")},m(p,$){var v;g(p,t,$),ie(n,t,null),m(t,o),ie(i,t,null),m(t,s),ie(l,t,null),m(t,r),ie(c,t,null),g(p,a,$),ie(u,p,$),d=!0,f||(h=w(t,"submit",(v=e[13],function(e){return e.preventDefault(),v.call(this,e)})),f=!0)},p(e,t){const o={};67108865&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o);const s={};67108866&t&&(s.$$scope={dirty:t,ctx:e}),i.$set(s);const l={};67108864&t&&(l.$$scope={dirty:t,ctx:e}),u.$set(l)},i(e){d||(Z(n.$$.fragment,e),Z(i.$$.fragment,e),Z(l.$$.fragment,e),Z(c.$$.fragment,e),Z(u.$$.fragment,e),d=!0)},o(e){Q(n.$$.fragment,e),Q(i.$$.fragment,e),Q(l.$$.fragment,e),Q(c.$$.fragment,e),Q(u.$$.fragment,e),d=!1},d(e){e&&p(t),se(n),se(i),se(l),se(c),e&&p(a),se(u,e),f=!1,h()}}}function Nt(e){return{c:l,m:l,p:l,i:l,o:l,d:l}}function jt(e){let t,n;return t=new e[7]({props:{headers:e[12],items:e[22],$$slots:{item:[_t,({header:e,item:t,index:n})=>({23:e,24:t,25:n}),({header:e,item:t,index:n})=>(e?8388608:0)|(t?16777216:0)|(n?33554432:0)]},$$scope:{ctx:e}}}),{c(){oe(t.$$.fragment)},m(e,o){ie(t,e,o),n=!0},p(e,n){const o={};4&n&&(o.items=e[22]),92274688&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(Z(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){se(t,e)}}}function Tt(e){let t,n,o=(e[24][e[23].value]||"")+"";return{c(){t=$("span"),n=y(o)},m(e,o){g(e,t,o),m(t,n)},p(e,t){25165824&t&&o!==(o=(e[24][e[23].value]||"")+"")&&z(n,o)},i:l,o:l,d(e){e&&p(t)}}}function Mt(e){let t,n,o,i,s;function l(){return e[18](e[24])}return n=new Be({props:{size:"20"}}),{c(){t=$("span"),oe(n.$$.fragment),b(t,"title","Löschen"),b(t,"class","pointer")},m(e,r){g(e,t,r),ie(n,t,null),o=!0,i||(s=w(t,"click",l),i=!0)},p(t,n){e=t},i(e){o||(Z(n.$$.fragment,e),o=!0)},o(e){Q(n.$$.fragment,e),o=!1},d(e){e&&p(t),se(n),i=!1,s()}}}function St(e){let t,n,o,i=e[24][e[23].value]+"";return{c(){t=$("a"),n=y(i),b(t,"href",o=e[24][e[23].value])},m(e,o){g(e,t,o),m(t,n)},p(e,s){25165824&s&&i!==(i=e[24][e[23].value]+"")&&z(n,i),25165824&s&&o!==(o=e[24][e[23].value])&&b(t,"href",o)},i:l,o:l,d(e){e&&p(t)}}}function Et(e){let t,n,o=e[14](e[24][e[23].value])+"";return{c(){t=$("span"),n=y(o)},m(e,o){g(e,t,o),m(t,n)},p(e,t){25165824&t&&o!==(o=e[14](e[24][e[23].value])+"")&&z(n,o)},i:l,o:l,d(e){e&&p(t)}}}function _t(e){let t,n,o,i;const s=[Et,St,Mt,Tt],l=[];function r(e,t){return"date"===e[23].type?0:"url"===e[23].type?1:"icon"===e[23].type?2:3}return t=r(e),n=l[t]=s[t](e),{c(){n.c(),o=k()},m(e,n){l[t].m(e,n),g(e,o,n),i=!0},p(e,i){let c=t;t=r(e),t===c?l[t].p(e,i):(K(),Q(l[c],1,1,(()=>{l[c]=null})),U(),n=l[t],n?n.p(e,i):(n=l[t]=s[t](e),n.c()),Z(n,1),n.m(o.parentNode,o))},i(e){i||(Z(n),i=!0)},o(e){Q(n),i=!1},d(e){l[t].d(e),e&&p(o)}}}function Bt(e){return{c:l,m:l,p:l,i:l,o:l,d:l}}function Dt(e){let t,n,o,i,s,l,r,c,a,u,d,f,h,v;a=new e[3]({props:{outline:!0,$$slots:{default:[Lt]},$$scope:{ctx:e}}}),d=new e[8]({props:{text:"Laufende Tickets"}});let k={ctx:e,current:null,token:null,hasCatch:!1,pending:Bt,then:jt,catch:Nt,value:22,blocks:[,,,]};return X(h=e[2],k),{c(){t=$("div"),n=$("h2"),n.textContent="Meine Tickets",o=x(),i=$("p"),i.textContent="Hier kannst du einem anderen enablerr Benutzer ein temporäres Ticket ausstellen, mit dem dieser enablerr\n ",s=$("ul"),s.innerHTML="<li>für diesen Mandanten,\n </li><li>die angegebene Dauer und\n </li><li>mit den angegebenen Rollen</li>",l=y(" benutzen kann.\n "),r=$("p"),r.innerHTML="Der Benutzer erhält dann eine Email mit dem Zugangslink.<br/>\n Sobald du das Ticket löscht, wird dem betroffenen Benutzer mit sofortiger Wirkung der Zugang entzogen.<br/>\n Ansonsten wird das Ticket nach dem Ablauf automatisch gelöscht.",c=x(),oe(a.$$.fragment),u=x(),oe(d.$$.fragment),f=x(),k.block.c(),L(s,"margin-top","-1em"),b(t,"class","mainTicket svelte-17kglid")},m(e,p){g(e,t,p),m(t,n),m(t,o),m(t,i),m(t,s),m(t,l),m(t,r),m(t,c),ie(a,t,null),m(t,u),ie(d,t,null),m(t,f),k.block.m(t,k.anchor=null),k.mount=()=>t,k.anchor=null,v=!0},p(t,[n]){e=t;const o={};67108867&n&&(o.$$scope={dirty:n,ctx:e}),a.$set(o),k.ctx=e,4&n&&h!==(h=e[2])&&X(h,k)||Y(k,e,n)},i(e){v||(Z(a.$$.fragment,e),Z(d.$$.fragment,e),Z(k.block),v=!0)},o(e){Q(a.$$.fragment,e),Q(d.$$.fragment,e);for(let e=0;e<3;e+=1){Q(k.blocks[e])}v=!1},d(e){e&&p(t),se(a),se(d),k.block.d(),k.token=null,k=null}}}function It(e,i,s){let l;f(e,o,(e=>s(19,l=e)));const{Card:r,Button:c,FormField:a,TextField:u,Switch:d,Table:m,Divider:g,CheckboxGroup:p}=t;let h,$=8;const v=(l.role||[]).map((e=>({label:e,value:e,checked:!0}))).sort(((e,t)=>e.value.localeCompare(t.value))),y=async e=>e||await n.getTickets(),x=async e=>{const t=await n.deleteTicket(e);s(2,k=y(t))};let k=y();return[h,$,k,r,c,a,u,m,g,p,"ticket20061962",v,[{type:"text",text:"ID",value:"ticketId"},{type:"text",text:"Email",value:"email"},{type:"text",text:"Rollen",value:"roles"},{type:"date",text:"Start",value:"start"},{type:"date",text:"Ende",value:"end"},{type:"icon",text:"",value:"delete"}],async()=>{if(!h)return;const e=v.filter((e=>e.checked)).map((e=>e.value)).join(",");if(!e)return;const t={email:h,duration:$,roles:e},o=await n.createTicket(t);s(2,k=y(o)),s(0,h=""),s(1,$=8)},e=>{if(!e)return"N/A";try{return(e=new Date(e)).toLocaleString()}catch{return""}},x,function(e){h=e,s(0,h)},function(e){$=e,s(1,$)},e=>x(e._id)]}class Ot extends re{constructor(e){var t;super(),document.getElementById("svelte-17kglid-style")||((t=$("style")).id="svelte-17kglid-style",t.textContent="form.tickets.svelte-17kglid .text-number .text-field{width:4em}.mainTicket.svelte-17kglid label.checkbox{margin-bottom:0.5em}",m(document.head,t)),le(this,e,It,Dt,d,{})}}function At(e){let t,n,o,i,s,l,r,c,u,d,f,h,v,y,k,z,C=e[0].isTicketAdmin&&Wt(e);var L=e[1];function j(e){return{props:{settings:e[2]}}}return L&&(v=new L(j(e)),v.$on("save",e[8])),{c(){t=$("section"),n=$("div"),o=$("div"),o.textContent="Mein Konto",i=x(),s=$("div"),s.textContent="Meine Benachrichtigungen",l=x(),r=$("div"),r.textContent="Mein Layout",c=x(),C&&C.c(),u=x(),d=$("div"),d.textContent="Meine Versionen",f=x(),h=$("div"),v&&oe(v.$$.fragment),b(o,"class","nav--item svelte-1x5ysxy"),N(o,"active",e[1]==fe),b(s,"class","nav--item svelte-1x5ysxy"),N(s,"active",e[1]==ye),b(r,"class","nav--item svelte-1x5ysxy"),N(r,"active",e[1]==$t),b(d,"class","nav--item svelte-1x5ysxy"),N(d,"active",e[1]==wt),b(n,"class","container-setting--nav svelte-1x5ysxy"),b(h,"class","container-setting--content svelte-1x5ysxy"),b(t,"class","container-setting svelte-1x5ysxy")},m(a,p){g(a,t,p),m(t,n),m(n,o),m(n,i),m(n,s),m(n,l),m(n,r),m(n,c),C&&C.m(n,null),m(n,u),m(n,d),m(t,f),m(t,h),v&&ie(v,h,null),y=!0,k||(z=[w(o,"click",e[3]),w(s,"click",e[4]),w(r,"click",e[5]),w(d,"click",e[6])],k=!0)},p(e,t){2&t&&N(o,"active",e[1]==fe),2&t&&N(s,"active",e[1]==ye),2&t&&N(r,"active",e[1]==$t),e[0].isTicketAdmin?C?C.p(e,t):(C=Wt(e),C.c(),C.m(n,u)):C&&(C.d(1),C=null),2&t&&N(d,"active",e[1]==wt);const i={};if(4&t&&(i.settings=e[2]),L!==(L=e[1])){if(v){K();const e=v;Q(e.$$.fragment,1,0,(()=>{se(e,1)})),U()}L?(v=new L(j(e)),v.$on("save",e[8]),oe(v.$$.fragment),Z(v.$$.fragment,1),ie(v,h,null)):v=null}else L&&v.$set(i)},i(e){y||(v&&Z(v.$$.fragment,e),y=!0)},o(e){v&&Q(v.$$.fragment,e),y=!1},d(e){e&&p(t),C&&C.d(),v&&se(v),k=!1,a(z)}}}function Wt(e){let t,n,o;return{c(){t=$("div"),t.textContent="Meine Tickets",b(t,"class","nav--item svelte-1x5ysxy"),N(t,"active",e[1]==Ot)},m(i,s){g(i,t,s),n||(o=w(t,"click",e[7]),n=!0)},p(e,n){2&n&&N(t,"active",e[1]==Ot)},d(e){e&&p(t),n=!1,o()}}}function Pt(e){let t,n,o=e[0]&&At(e);return{c(){o&&o.c(),t=k()},m(e,i){o&&o.m(e,i),g(e,t,i),n=!0},p(e,[n]){e[0]?o?(o.p(e,n),1&n&&Z(o,1)):(o=At(e),o.c(),Z(o,1),o.m(t.parentNode,t)):o&&(K(),Q(o,1,1,(()=>{o=null})),U())},i(e){n||(Z(o),n=!0)},o(e){Q(o),n=!1},d(e){o&&o.d(e),e&&p(t)}}}function qt(e,t,s){let l;f(e,o,(e=>s(12,l=e)));let r,c,a,u,d,{injectedSettings:m}=t;const g=()=>{s(2,d=p(m)),s(1,r=fe)};function p(e){return c={jobDescription:e.jobDescription,showJobDescription:e.setting.showJobDescription,email:e.email,firstName:e.firstName,lastName:e.lastName,listTitle:e.listTitle,hideRoles:e.hideRoles},c}async function h(){try{await n.saveUserSettings(m),s(0,m),function(e,t,n=t){e.set(n)}(o,l=m,l),i.success("Speichern erfolgreich",2e3)}catch(e){console.error(e),i.failed("Speichern nicht erfolgreich",2e3)}}return g(),e.$$set=e=>{"injectedSettings"in e&&s(0,m=e.injectedSettings)},[m,r,d,g,()=>{var e;s(2,(a={notificationActivated:(e=m).setting.notificationActivated,showNotifications:e.setting.showNotifications,notificationToMail:e.setting.notificationToMail,typesOfNotification:e.setting.typesOfNotification},d=a)),s(1,r=ye)},()=>{s(2,(u={dashboardLayout:m.setting.dashboardLayout},d=u)),s(1,r=$t)},()=>{s(2,d=p(m)),s(1,r=wt)},()=>{s(2,d=p(m)),s(1,r=Ot)},function(){r==fe?(s(0,m.jobDescription=c.jobDescription,m),s(0,m.setting.showJobDescription=c.showJobDescription,m),s(0,m.email=c.email,m),s(0,m.firstName=c.firstName,m),s(0,m.lastName=c.lastName,m),s(0,m.listTitle=c.listTitle,m),s(0,m.hideRoles=c.hideRoles,m),h()):r==ye?(s(0,m.setting.notificationActivated=a.notificationActivated,m),s(0,m.setting.showNotifications=a.showNotifications,m),s(0,m.setting.notificationToMail=a.notificationToMail,m),s(0,m.setting.typesOfNotification=a.typesOfNotification,m),h()):r==$t&&(s(0,m.setting.dashboardLayout=u.dashboardLayout,m),h())}]}class Rt extends re{constructor(e){var t;super(),document.getElementById("svelte-1x5ysxy-style")||((t=$("style")).id="svelte-1x5ysxy-style",t.textContent=".container-setting.svelte-1x5ysxy.svelte-1x5ysxy{display:grid;grid-template-columns:0.5fr 1fr;height:calc(100% - 120px)}.container-setting--nav.svelte-1x5ysxy.svelte-1x5ysxy{border-right:5px solid #ccc;cursor:pointer}.container-setting--nav.svelte-1x5ysxy .nav--item.svelte-1x5ysxy{padding:1.5em 1em;border-bottom:1px solid #ccc}.container-setting--nav.svelte-1x5ysxy .nav--item.svelte-1x5ysxy:hover{background-color:#ddd}.container-setting--nav.svelte-1x5ysxy .nav--item.active.svelte-1x5ysxy{font-weight:600;background-color:#ddd}.container-setting--content.svelte-1x5ysxy.svelte-1x5ysxy{padding:0 1em 0 1.5em;overflow:auto}.container-setting--content.svelte-1x5ysxy .form-setting{margin-bottom:2em}.container-setting--content.svelte-1x5ysxy .form-setting .form-field{display:flex;flex-direction:row;margin-bottom:2em}.container-setting--content.svelte-1x5ysxy .form-setting .form-field .helptext{font-size:0.9em;font-weight:400;margin-top:0.5em}.container-setting--content.svelte-1x5ysxy .form-setting .form-field .form-field--label{font-weight:600;flex-basis:30%;align-self:center}.container-setting--content.svelte-1x5ysxy .form-setting .form-field .switch{align-self:flex-start}.container-setting--content.svelte-1x5ysxy .form-setting .form-field .form-field--content{flex:1;margin-left:1em}.container-setting--content.svelte-1x5ysxy .form-setting .form-field .form-field--content .checkbox{margin-top:0.2em}",m(document.head,t)),le(this,e,qt,Pt,d,{injectedSettings:0})}}function Vt(e){return{c:l,m:l,p:l,i:l,o:l,d:l}}function Ft(e){let t,n;return t=new e[0]({props:{open:"true",noClickaway:"true",$$slots:{default:[Jt,({closeCallback:e})=>({9:e}),({closeCallback:e})=>e?512:0]},$$scope:{ctx:e}}}),{c(){oe(t.$$.fragment)},m(e,o){ie(t,e,o),n=!0},p(e,n){const o={};1024&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(Z(t.$$.fragment,e),n=!0)},o(e){Q(t.$$.fragment,e),n=!1},d(e){se(t,e)}}}function Ht(e){let t,n,o,i;return o=new Rt({props:{injectedSettings:e[8]}}),{c(){t=$("div"),t.innerHTML="<h2>Einstellungen</h2>",n=x(),oe(o.$$.fragment),b(t,"class","setting--title svelte-ltqsg7")},m(e,s){g(e,t,s),g(e,n,s),ie(o,e,s),i=!0},p:l,i(e){i||(Z(o.$$.fragment,e),i=!0)},o(e){Q(o.$$.fragment,e),i=!1},d(e){e&&p(t),e&&p(n),se(o,e)}}}function Jt(e){let t,n,o=e[8]&&function(e){let t,n,o;return n=new e[1]({props:{constrainWidth:!0,closeCallback:function(){return e[4](e[9])},class:"modal_class",$$slots:{default:[Ht]},$$scope:{ctx:e}}}),{c(){t=$("div"),oe(n.$$.fragment),b(t,"class","setting--modal svelte-ltqsg7")},m(e,i){g(e,t,i),ie(n,t,null),o=!0},p(t,o){e=t;const i={};1024&o&&(i.$$scope={dirty:o,ctx:e}),n.$set(i)},i(e){o||(Z(n.$$.fragment,e),o=!0)},o(e){Q(n.$$.fragment,e),o=!1},d(e){e&&p(t),se(n)}}}(e);return{c(){o&&o.c(),t=k()},m(e,i){o&&o.m(e,i),g(e,t,i),n=!0},p(e,t){e[8]&&o.p(e,t)},i(e){n||(Z(o),n=!0)},o(e){Q(o),n=!1},d(e){o&&o.d(e),e&&p(t)}}}function Gt(e){return{c:l,m:l,p:l,i:l,o:l,d:l}}function Kt(e){let t,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Gt,then:Ft,catch:Vt,value:8,blocks:[,,,]};return X(n.getUserSettings(),i),{c(){t=k(),i.block.c()},m(e,n){g(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,o=!0},p(t,[n]){Y(i,e=t,n)},i(e){o||(Z(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){Q(i.blocks[e])}o=!1},d(e){e&&p(t),i.block.d(e),i.token=null,i=null}}}function Ut(e,n,o){let i;const{Modal:l,Dialog:r}=t,{loggedIn:c,mainView:a}=s;f(e,a,(e=>o(5,i=e)));const u={Dashboard:"/dashboard",Auswerting:"/reporting"},d=()=>{window.singleSpaNavigate(u[i]||"/")};return[l,r,a,d,e=>(e(),d())]}function Zt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qt,Xt,Yt=(Qt=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){i(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==s(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},l),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:r.bind(null,t,n),mount:c.bind(null,t,n),unmount:a.bind(null,t,n),update:u.bind(null,t,n)}};var l={component:null,domElementGetter:null,props:{}};function r(e){return Promise.resolve()}function c(e,t,n){var i=Object.keys(l),s=Object.keys(e).reduce((function(t,n){return i.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var i=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),l=i();t.instance=new e.component(o(o({},s),{},{target:l,props:Object.assign({},n,e.props)}))}))}function a(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function u(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},Qt(Xt={exports:{}},Xt.exports),Xt.exports);const en=Zt(Yt)({component:class extends re{constructor(e){var t;super(),document.getElementById("svelte-ltqsg7-style")||((t=$("style")).id="svelte-ltqsg7-style",t.textContent=".setting--modal.svelte-ltqsg7 .modal_class{height:80vh;min-width:70vw;overflow:hidden}.setting--title.svelte-ltqsg7{border-bottom:2px solid #ccc}",m(document.head,t)),le(this,e,Ut,Kt,d,{})}},domElementGetter:()=>document.getElementById("view-app")}),{bootstrap:tn,mount:nn,unmount:on}=en;e({bootstrap:tn,mount:nn,unmount:on})}}}));
|
|
1
|
+
System.register(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/auth"],function(e){"use strict";var t,n,l,o,i;return{setters:[function(e){t=e.getAttractions},function(e){n=e.Request,l=e.settings,o=e.toasts},function(e){i=e.user}],execute:function(){e("version","0.2.23");function s(){}function c(e){return e()}function r(){return Object.create(null)}function a(e){e.forEach(c)}function u(e){return"function"==typeof e}function d(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function f(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return s;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function m(e){return null==e?"":e}function $(e,t){e.appendChild(t)}function p(e,t,n){e.insertBefore(t,n||null)}function h(e){e.parentNode.removeChild(e)}function g(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function v(e){return document.createElement(e)}function y(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function k(e){return document.createTextNode(e)}function x(){return k(" ")}function b(){return k("")}function w(e,t,n,l){return e.addEventListener(t,n,l),()=>e.removeEventListener(t,n,l)}function z(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function C(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function N(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function L(e,t){e.value=null==t?"":t}function _(e,t,n,l){e.style.setProperty(t,n,l?"important":"")}function S(e,t,n){e.classList[n?"add":"remove"](t)}let A;function M(e){A=e}function T(){if(!A)throw new Error("Function called outside component initialization");return A}function j(e){T().$$.on_mount.push(e)}function E(){const e=T();return(t,n)=>{const l=e.$$.callbacks[t];if(l){const o=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);l.slice().forEach(t=>{t.call(e,o)})}}}const D=[],B=[],O=[],I=[],q=Promise.resolve();let W=!1;function P(){W||(W=!0,q.then(H))}function F(e){O.push(e)}function R(e){I.push(e)}let V=!1;const U=new Set;function H(){if(!V){V=!0;do{for(let e=0;e<D.length;e+=1){const t=D[e];M(t),J(t.$$)}for(M(null),D.length=0;B.length;)B.pop()();for(let e=0;e<O.length;e+=1){const t=O[e];U.has(t)||(U.add(t),t())}O.length=0}while(D.length);for(;I.length;)I.pop()();W=!1,V=!1,U.clear()}}function J(e){if(null!==e.fragment){e.update(),a(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}const G=new Set;let K;function Z(){K={r:0,c:[],p:K}}function Q(){K.r||a(K.c),K=K.p}function X(e,t){e&&e.i&&(G.delete(e),e.i(t))}function Y(e,t,n,l){if(e&&e.o){if(G.has(e))return;G.add(e),K&&K.c.push(()=>{G.delete(e),l&&(n&&e.d(1),l())}),e.o(t)}}function ee(e,t){const n=t.token={};function l(e,l,o,i){if(t.token!==n)return;t.resolved=i;let s=t.ctx;void 0!==o&&(s=s.slice(),s[o]=i);const c=e&&(t.current=e)(s);let r=!1;t.block&&(t.blocks?t.blocks.forEach((e,n)=>{n!==l&&e&&(Z(),Y(e,1,1,()=>{t.blocks[n]===e&&(t.blocks[n]=null)}),Q())}):t.block.d(1),c.c(),X(c,1),c.m(t.mount(),t.anchor),r=!0),t.block=c,t.blocks&&(t.blocks[l]=c),r&&H()}if((o=e)&&"object"==typeof o&&"function"==typeof o.then){const n=T();if(e.then(e=>{M(n),l(t.then,1,t.value,e),M(null)},e=>{if(M(n),l(t.catch,2,t.error,e),M(null),!t.hasCatch)throw e}),t.current!==t.pending)return l(t.pending,0),!0}else{if(t.current!==t.then)return l(t.then,1,t.value,e),!0;t.resolved=e}var o}function te(e,t,n){const l=t.slice(),{resolved:o}=e;e.current===e.then&&(l[e.value]=o),e.current===e.catch&&(l[e.error]=o),e.block.p(l,n)}const ne="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function le(e,t){e.d(1),t.delete(e.key)}function oe(e,t){Y(e,1,1,()=>{t.delete(e.key)})}function ie(e,t,n,l,o,i,s,c,r,a,u,d){let f=e.length,m=i.length,$=f;const p={};for(;$--;)p[e[$].key]=$;const h=[],g=new Map,v=new Map;for($=m;$--;){const e=d(o,i,$),c=n(e);let r=s.get(c);r?l&&r.p(e,t):(r=a(c,e),r.c()),g.set(c,h[$]=r),c in p&&v.set(c,Math.abs($-p[c]))}const y=new Set,k=new Set;function x(e){X(e,1),e.m(c,u),s.set(e.key,e),u=e.first,m--}for(;f&&m;){const t=h[m-1],n=e[f-1],l=t.key,o=n.key;t===n?(u=t.first,f--,m--):g.has(o)?!s.has(l)||y.has(l)?x(t):k.has(o)?f--:v.get(l)>v.get(o)?(k.add(l),x(t)):(y.add(o),f--):(r(n,s),f--)}for(;f--;){const t=e[f];g.has(t.key)||r(t,s)}for(;m;)x(h[m-1]);return h}function se(e,t,n){const l=e.$$.props[t];void 0!==l&&(e.$$.bound[l]=n,n(e.$$.ctx[l]))}function ce(e){e&&e.c()}function re(e,t,n,l){const{fragment:o,on_mount:i,on_destroy:s,after_update:r}=e.$$;o&&o.m(t,n),l||F(()=>{const t=i.map(c).filter(u);s?s.push(...t):a(t),e.$$.on_mount=[]}),r.forEach(F)}function ae(e,t){const n=e.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ue(e,t,n,l,o,i,c=[-1]){const u=A;M(e);const d=e.$$={fragment:null,ctx:null,props:i,update:s,not_equal:o,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:t.context||[]),callbacks:r(),dirty:c,skip_bound:!1};let f=!1;if(d.ctx=n?n(e,t.props||{},(t,n,...l)=>{const i=l.length?l[0]:n;return d.ctx&&o(d.ctx[t],d.ctx[t]=i)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](i),f&&function(e,t){-1===e.$$.dirty[0]&&(D.push(e),P(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n}):[],d.update(),f=!0,a(d.before_update),d.fragment=!!l&&l(d.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);d.fragment&&d.fragment.l(e),e.forEach(h)}else d.fragment&&d.fragment.c();t.intro&&X(e.$$.fragment),re(e,t.target,t.anchor,t.customElement),H()}M(u)}class de{$destroy(){ae(this,1),this.$destroy=s}$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 fe(e){let t,n,l,o,i,s,c,r,u,d,f,m,g,y,k,b,z,N,L,_,S,A,M,T,j,E,D,O,I,q,W,P,F,V,U,H,J,G,K,Z,Q,ee,te,ne,le,oe,ie,ue,de,fe;function $e(t){e[7](t)}let pe={placeholder:"Berufsbezeichnung"};function he(t){e[9](t)}void 0!==e[0].jobDescription&&(pe.value=e[0].jobDescription),s=new e[2]({props:pe}),B.push(()=>se(s,"value",$e)),N=new e[2]({props:{placeholder:"E-Mail",disabled:!0,value:e[0].email}});let ge={placeholder:"Vorname"};function ve(t){e[10](t)}void 0!==e[0].firstName&&(ge.value=e[0].firstName),T=new e[2]({props:ge}),B.push(()=>se(T,"value",he));let ye={placeholder:"Nachname"};function ke(t){e[11](t)}void 0!==e[0].lastName&&(ye.value=e[0].lastName),W=new e[2]({props:ye}),B.push(()=>se(W,"value",ve));let xe={placeholder:"Titel"};return void 0!==e[0].listTitle&&(xe.value=e[0].listTitle),G=new e[2]({props:xe}),B.push(()=>se(G,"value",ke)),ie=new e[1]({props:{filled:!0,$$slots:{default:[me]},$$scope:{ctx:e}}}),ie.$on("click",e[4]),{c(){t=v("form"),n=v("div"),l=v("div"),l.textContent="Berufsbezeichnung",o=x(),i=v("div"),ce(s.$$.fragment),r=x(),u=v("div"),d=v("input"),f=x(),m=v("label"),m.textContent="Meine Berufsbezeichnung in meinem Profil anzeigen.",g=x(),y=v("div"),k=v("div"),k.textContent="E-Mail",b=x(),z=v("div"),ce(N.$$.fragment),L=x(),_=v("div"),S=v("div"),S.textContent="Vorname",A=x(),M=v("div"),ce(T.$$.fragment),E=x(),D=v("div"),O=v("div"),O.textContent="Nachname",I=x(),q=v("div"),ce(W.$$.fragment),F=x(),V=v("div"),U=v("div"),U.textContent="Titel Aufgabenliste",H=x(),J=v("div"),ce(G.$$.fragment),Z=x(),Q=v("div"),ee=v("div"),ee.textContent="Rollen nicht anzeigen",te=x(),ne=v("div"),le=v("input"),oe=x(),ce(ie.$$.fragment),C(l,"class","form-field--label"),C(d,"type","checkbox"),C(d,"id","showJobDesc"),C(d,"name","shwoJobDescriptionInBio"),C(m,"for","showJobDesc"),C(u,"class","checkbox"),C(i,"class","form-field--content"),C(n,"class","form-field"),C(k,"class","form-field--label"),C(z,"class","form-field--content"),C(y,"class","form-field"),C(S,"class","form-field--label"),C(M,"class","form-field--content"),C(_,"class","form-field"),C(O,"class","form-field--label"),C(q,"class","form-field--content"),C(D,"class","form-field"),C(U,"class","form-field--label"),C(J,"class","form-field--content"),C(V,"class","form-field"),C(ee,"class","form-field--label svelte-c1yie6"),C(le,"type","checkbox"),C(le,"id","hideRoles"),C(le,"name","hideRoles"),C(ne,"class","checkbox svelte-c1yie6"),C(Q,"class","form-field"),C(t,"class","form-setting")},m(c,a){p(c,t,a),$(t,n),$(n,l),$(n,o),$(n,i),re(s,i,null),$(i,r),$(i,u),$(u,d),d.checked=e[0].showJobDescription,$(u,f),$(u,m),$(t,g),$(t,y),$(y,k),$(y,b),$(y,z),re(N,z,null),$(t,L),$(t,_),$(_,S),$(_,A),$(_,M),re(T,M,null),$(t,E),$(t,D),$(D,O),$(D,I),$(D,q),re(W,q,null),$(t,F),$(t,V),$(V,U),$(V,H),$(V,J),re(G,J,null),$(t,Z),$(t,Q),$(Q,ee),$(Q,te),$(Q,ne),$(ne,le),le.checked=e[0].hideRoles,p(c,oe,a),re(ie,c,a),ue=!0,de||(fe=[w(d,"change",e[8]),w(le,"change",e[12])],de=!0)},p(e,t){const n={};!c&&1&t&&(c=!0,n.value=e[0].jobDescription,R(()=>c=!1)),s.$set(n),1&t&&(d.checked=e[0].showJobDescription);const l={};1&t&&(l.value=e[0].email),N.$set(l);const o={};!j&&1&t&&(j=!0,o.value=e[0].firstName,R(()=>j=!1)),T.$set(o);const i={};!P&&1&t&&(P=!0,i.value=e[0].lastName,R(()=>P=!1)),W.$set(i);const r={};!K&&1&t&&(K=!0,r.value=e[0].listTitle,R(()=>K=!1)),G.$set(r),1&t&&(le.checked=e[0].hideRoles);const a={};524288&t&&(a.$$scope={dirty:t,ctx:e}),ie.$set(a)},i(e){ue||(X(s.$$.fragment,e),X(N.$$.fragment,e),X(T.$$.fragment,e),X(W.$$.fragment,e),X(G.$$.fragment,e),X(ie.$$.fragment,e),ue=!0)},o(e){Y(s.$$.fragment,e),Y(N.$$.fragment,e),Y(T.$$.fragment,e),Y(W.$$.fragment,e),Y(G.$$.fragment,e),Y(ie.$$.fragment,e),ue=!1},d(e){e&&h(t),ae(s),ae(N),ae(T),ae(W),ae(G),e&&h(oe),ae(ie,e),de=!1,a(fe)}}}function me(e){let t;return{c(){t=k("Speichern")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function $e(e){let t,n,l,o,i,s,c,r=e[0]&&fe(e);return s=new e[3]({props:{headers:e[5],items:e[6]}}),{c(){t=v("div"),n=v("h2"),n.textContent="Mein Konto",l=x(),r&&r.c(),o=x(),i=v("div"),ce(s.$$.fragment),_(i,"margin-top","2em")},m(e,a){p(e,t,a),$(t,n),$(t,l),r&&r.m(t,null),$(t,o),$(t,i),re(s,i,null),c=!0},p(e,[n]){e[0]?r?(r.p(e,n),1&n&&X(r,1)):(r=fe(e),r.c(),X(r,1),r.m(t,o)):r&&(Z(),Y(r,1,1,()=>{r=null}),Q())},i(e){c||(X(r),X(s.$$.fragment,e),c=!0)},o(e){Y(r),Y(s.$$.fragment,e),c=!1},d(e){e&&h(t),r&&r.d(),ae(s)}}}function pe(e,n,l){const{Button:o,TextField:i,FormField:s,Table:c}=t;let{settings:r}=n;const a=E();const u=window.innerHeight,d=window.innerWidth,f=screen.height,m=[{resolution:"Bildschirm",width:screen.width,height:f},{resolution:"Browser",width:d,height:u}];return e.$$set=e=>{"settings"in e&&l(0,r=e.settings)},[r,o,i,c,function(){a("save")},[{type:"text",text:"Auflösung",value:"resolution"},{type:"text",text:"Breite",value:"width"},{type:"text",text:"Höhe",value:"height"}],m,function(t){e.$$.not_equal(r.jobDescription,t)&&(r.jobDescription=t,l(0,r))},function(){r.showJobDescription=this.checked,l(0,r)},function(t){e.$$.not_equal(r.firstName,t)&&(r.firstName=t,l(0,r))},function(t){e.$$.not_equal(r.lastName,t)&&(r.lastName=t,l(0,r))},function(t){e.$$.not_equal(r.listTitle,t)&&(r.listTitle=t,l(0,r))},function(){r.hideRoles=this.checked,l(0,r)}]}class he extends de{constructor(e){var t;super(),document.getElementById("svelte-c1yie6-style")||((t=v("style")).id="svelte-c1yie6-style",t.textContent="div.form-field--label.svelte-c1yie6+div.checkbox.svelte-c1yie6{padding-left:.75em}",$(document.head,t)),ue(this,e,pe,$e,d,{settings:0})}}function ge(e,t,n){const l=e.slice();return l[11]=t[n],l}function ve(e){let t,n,l,o,i,s,c,r,a,u,d,f,m,y,k,b,w,z,N,L,_,S,A,M,T,j,E,D,O;function I(t){e[6](t)}let q={};function W(t){e[7](t)}void 0!==e[0].notificationActivated&&(q.value=e[0].notificationActivated),s=new e[3]({props:q}),B.push(()=>se(s,"value",I));let P={};function F(t){e[8](t)}void 0!==e[0].showNotifications&&(P.value=e[0].showNotifications),m=new e[3]({props:P}),B.push(()=>se(m,"value",W));let V={};void 0!==e[0].notificationToMail&&(V.value=e[0].notificationToMail),L=new e[3]({props:V}),B.push(()=>se(L,"value",F));let U=e[1],H=[];for(let t=0;t<U.length;t+=1)H[t]=ye(ge(e,U,t));return D=new e[2]({props:{filled:!0,$$slots:{default:[ke]},$$scope:{ctx:e}}}),D.$on("click",e[4]),{c(){t=v("form"),n=v("div"),l=v("div"),l.textContent="Benachrichtigungen aktivieren",o=x(),i=v("div"),ce(s.$$.fragment),r=x(),a=v("div"),u=v("div"),u.innerHTML='Ungelesene Nachricht aktivieren \n <p class="helptext">Zeigt einen roten Kreis auf der Glocke an, wenn Sie ungelesene Nachrichten\n haben.</p>',d=x(),f=v("div"),ce(m.$$.fragment),k=x(),b=v("div"),w=v("div"),w.textContent="Benachrichtigungen an E-Mail senden",z=x(),N=v("div"),ce(L.$$.fragment),S=x(),A=v("div"),M=v("div"),M.innerHTML='Arten von Benachrichtigungen\n <p class="helptext">Wählen Sie aus, welche Arten von Benachrichtigungen Sie sehen\n möchten.</p>',T=x(),j=v("div");for(let e=0;e<H.length;e+=1)H[e].c();E=x(),ce(D.$$.fragment),C(l,"class","form-field--label switch"),C(i,"class","form-field--content"),C(n,"class","form-field"),C(u,"class","form-field--label switch"),C(f,"class","form-field--content"),C(a,"class","form-field"),C(w,"class","form-field--label switch"),C(N,"class","form-field--content"),C(b,"class","form-field"),C(M,"class","form-field--label"),C(j,"class","form-field--content"),C(A,"class","form-field"),C(t,"class","form-setting")},m(e,c){p(e,t,c),$(t,n),$(n,l),$(n,o),$(n,i),re(s,i,null),$(t,r),$(t,a),$(a,u),$(a,d),$(a,f),re(m,f,null),$(t,k),$(t,b),$(b,w),$(b,z),$(b,N),re(L,N,null),$(t,S),$(t,A),$(A,M),$(A,T),$(A,j);for(let e=0;e<H.length;e+=1)H[e].m(j,null);p(e,E,c),re(D,e,c),O=!0},p(e,t){const n={};!c&&1&t&&(c=!0,n.value=e[0].notificationActivated,R(()=>c=!1)),s.$set(n);const l={};!y&&1&t&&(y=!0,l.value=e[0].showNotifications,R(()=>y=!1)),m.$set(l);const o={};if(!_&&1&t&&(_=!0,o.value=e[0].notificationToMail,R(()=>_=!1)),L.$set(o),35&t){let n;for(U=e[1],n=0;n<U.length;n+=1){const l=ge(e,U,n);H[n]?H[n].p(l,t):(H[n]=ye(l),H[n].c(),H[n].m(j,null))}for(;n<H.length;n+=1)H[n].d(1);H.length=U.length}const i={};16384&t&&(i.$$scope={dirty:t,ctx:e}),D.$set(i)},i(e){O||(X(s.$$.fragment,e),X(m.$$.fragment,e),X(L.$$.fragment,e),X(D.$$.fragment,e),O=!0)},o(e){Y(s.$$.fragment,e),Y(m.$$.fragment,e),Y(L.$$.fragment,e),Y(D.$$.fragment,e),O=!1},d(e){e&&h(t),ae(s),ae(m),ae(L),g(H,e),e&&h(E),ae(D,e)}}}function ye(e){let t,n,l,o,i,s,c,r,a,d,f,m=e[11].type+"";return{c(){t=v("div"),n=v("input"),i=x(),s=v("label"),c=k(m),a=x(),n.checked=l=e[0].typesOfNotification.includes(e[11].type),C(n,"type","checkbox"),C(n,"id",o=e[11].id),C(s,"for",r=e[11].id)},m(l,o){p(l,t,o),$(t,n),$(t,i),$(t,s),$(s,c),$(t,a),d||(f=w(n,"change",function(){u(e[5](e[11].type))&&e[5](e[11].type).apply(this,arguments)}),d=!0)},p(t,i){e=t,3&i&&l!==(l=e[0].typesOfNotification.includes(e[11].type))&&(n.checked=l),2&i&&o!==(o=e[11].id)&&C(n,"id",o),2&i&&m!==(m=e[11].type+"")&&N(c,m),2&i&&r!==(r=e[11].id)&&C(s,"for",r)},d(e){e&&h(t),d=!1,f()}}}function ke(e){let t;return{c(){t=k("Speichern")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function xe(e){let t,n,l,o,i=e[0]&&ve(e);return{c(){t=v("div"),n=v("h2"),n.textContent="Meine Benachrichtigungen",l=x(),i&&i.c()},m(e,s){p(e,t,s),$(t,n),$(t,l),i&&i.m(t,null),o=!0},p(e,[n]){e[0]?i?(i.p(e,n),1&n&&X(i,1)):(i=ve(e),i.c(),X(i,1),i.m(t,null)):i&&(Z(),Y(i,1,1,()=>{i=null}),Q())},i(e){o||(X(i),o=!0)},o(e){Y(i),o=!1},d(e){e&&h(t),i&&i.d()}}}function be(e,l,o){const{Button:i,TextField:s,Switch:c}=t;let{settings:r}=l,a=[];const u=E();return j(async()=>{o(1,a=(await n.getNotificationTypes()).filter(({active:e})=>e))}),e.$$set=e=>{"settings"in e&&o(0,r=e.settings)},[r,a,i,c,function(){u("save")},function(e){const t=r.typesOfNotification.findIndex(t=>t===e);t>-1?r.typesOfNotification.splice(t,1):r.typesOfNotification.unshift(e)},function(t){e.$$.not_equal(r.notificationActivated,t)&&(r.notificationActivated=t,o(0,r))},function(t){e.$$.not_equal(r.showNotifications,t)&&(r.showNotifications=t,o(0,r))},function(t){e.$$.not_equal(r.notificationToMail,t)&&(r.notificationToMail=t,o(0,r))}]}class we extends de{constructor(e){super(),ue(this,e,be,xe,d,{settings:0})}}function ze(e){let t,n,l,o,i;return{c(){t=y("svg"),n=y("path"),l=y("line"),o=y("line"),C(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"),C(l,"x1","12"),C(l,"y1","9"),C(l,"x2","12"),C(l,"y2","13"),C(o,"x1","12"),C(o,"y1","17"),C(o,"x2","12.01"),C(o,"y2","17"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",i="feather feather-alert-triangle "+e[2])},m(e,i){p(e,t,i),$(t,n),$(t,l),$(t,o)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-alert-triangle "+e[2])&&C(t,"class",i)},i:s,o:s,d(e){e&&h(t)}}}function Ce(e,t,n){let{size:l="100%"}=t,{strokeWidth:o=2}=t,{class:i=""}=t;return"100%"!==l&&(l="x"===l.slice(-1)?l.slice(0,l.length-1)+"em":parseInt(l)+"px"),e.$$set=e=>{"size"in e&&n(0,l=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,i=e.class)},[l,o,i]}class Ne extends de{constructor(e){super(),ue(this,e,Ce,ze,d,{size:0,strokeWidth:1,class:2})}}function Le(e){let t,n,l,o;return{c(){t=y("svg"),n=y("line"),l=y("polyline"),C(n,"x1","19"),C(n,"y1","12"),C(n,"x2","5"),C(n,"y2","12"),C(l,"points","12 19 5 12 12 5"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",o="feather feather-arrow-left "+e[2])},m(e,o){p(e,t,o),$(t,n),$(t,l)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-arrow-left "+e[2])&&C(t,"class",o)},i:s,o:s,d(e){e&&h(t)}}}function _e(e,t,n){let{size:l="100%"}=t,{strokeWidth:o=2}=t,{class:i=""}=t;return"100%"!==l&&(l="x"===l.slice(-1)?l.slice(0,l.length-1)+"em":parseInt(l)+"px"),e.$$set=e=>{"size"in e&&n(0,l=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,i=e.class)},[l,o,i]}class Se extends de{constructor(e){super(),ue(this,e,_e,Le,d,{size:0,strokeWidth:1,class:2})}}function Ae(e){let t,n,l,o;return{c(){t=y("svg"),n=y("path"),l=y("path"),C(n,"d","M12 20h9"),C(l,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",o="feather feather-edit-3 "+e[2])},m(e,o){p(e,t,o),$(t,n),$(t,l)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-edit-3 "+e[2])&&C(t,"class",o)},i:s,o:s,d(e){e&&h(t)}}}function Me(e,t,n){let{size:l="100%"}=t,{strokeWidth:o=2}=t,{class:i=""}=t;return"100%"!==l&&(l="x"===l.slice(-1)?l.slice(0,l.length-1)+"em":parseInt(l)+"px"),e.$$set=e=>{"size"in e&&n(0,l=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,i=e.class)},[l,o,i]}class Te extends de{constructor(e){super(),ue(this,e,Me,Ae,d,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,l,o;return{c(){t=y("svg"),n=y("line"),l=y("line"),C(n,"x1","12"),C(n,"y1","5"),C(n,"x2","12"),C(n,"y2","19"),C(l,"x1","5"),C(l,"y1","12"),C(l,"x2","19"),C(l,"y2","12"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",o="feather feather-plus "+e[2])},m(e,o){p(e,t,o),$(t,n),$(t,l)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-plus "+e[2])&&C(t,"class",o)},i:s,o:s,d(e){e&&h(t)}}}function Ee(e,t,n){let{size:l="100%"}=t,{strokeWidth:o=2}=t,{class:i=""}=t;return"100%"!==l&&(l="x"===l.slice(-1)?l.slice(0,l.length-1)+"em":parseInt(l)+"px"),e.$$set=e=>{"size"in e&&n(0,l=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,i=e.class)},[l,o,i]}class De extends de{constructor(e){super(),ue(this,e,Ee,je,d,{size:0,strokeWidth:1,class:2})}}function Be(e){let t,n,l,o,i,c;return{c(){t=y("svg"),n=y("polyline"),l=y("path"),o=y("line"),i=y("line"),C(n,"points","3 6 5 6 21 6"),C(l,"d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"),C(o,"x1","10"),C(o,"y1","11"),C(o,"x2","10"),C(o,"y2","17"),C(i,"x1","14"),C(i,"y1","11"),C(i,"x2","14"),C(i,"y2","17"),C(t,"xmlns","http://www.w3.org/2000/svg"),C(t,"width",e[0]),C(t,"height",e[0]),C(t,"fill","none"),C(t,"viewBox","0 0 24 24"),C(t,"stroke","currentColor"),C(t,"stroke-width",e[1]),C(t,"stroke-linecap","round"),C(t,"stroke-linejoin","round"),C(t,"class",c="feather feather-trash-2 "+e[2])},m(e,s){p(e,t,s),$(t,n),$(t,l),$(t,o),$(t,i)},p(e,[n]){1&n&&C(t,"width",e[0]),1&n&&C(t,"height",e[0]),2&n&&C(t,"stroke-width",e[1]),4&n&&c!==(c="feather feather-trash-2 "+e[2])&&C(t,"class",c)},i:s,o:s,d(e){e&&h(t)}}}function Oe(e,t,n){let{size:l="100%"}=t,{strokeWidth:o=2}=t,{class:i=""}=t;return"100%"!==l&&(l="x"===l.slice(-1)?l.slice(0,l.length-1)+"em":parseInt(l)+"px"),e.$$set=e=>{"size"in e&&n(0,l=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,i=e.class)},[l,o,i]}class Ie extends de{constructor(e){super(),ue(this,e,Oe,Be,d,{size:0,strokeWidth:1,class:2})}}const{Map:qe}=ne;function We(e,t,n){const l=e.slice();return l[28]=t[n],l}function Pe(e,t,n){const l=e.slice();return l[32]=t[n],l[34]=n,l}function Fe(e){let t,n,l,o,i,s,c,r,u,d,f,m,y,k,b,z,N,_,S,A,M,T,j,E,D,O,I,q,W,P,F,V,U,H,J;function G(t){e[15](t)}let K={type:"text",placeholder:"Neuer Layout Name"};function Z(t){e[16](t)}void 0!==e[0].id&&(K.value=e[0].id),o=new e[5]({props:K}),B.push(()=>se(o,"value",G));let Q={slotLeft:!0,$$slots:{default:[Re]},$$scope:{ctx:e}};void 0!==e[0].activated&&(Q.value=e[0].activated),r=new e[9]({props:Q}),B.push(()=>se(r,"value",Z)),f=new e[6]({});let ne={ctx:e,current:null,token:null,hasCatch:!1,pending:Ke,then:Ue,catch:Ve,value:31,blocks:[,,,]};ee(S=e[2],ne),M=new e[6]({});let le=e[10],oe=[];for(let t=0;t<le.length;t+=1)oe[t]=Ze(We(e,le,t));let ie=e[4]&&Qe();return V=new e[8]({props:{filled:!0,class:"saveBtnLayout",$$slots:{default:[Xe]},$$scope:{ctx:e}}}),V.$on("click",e[23]),{c(){t=v("div"),n=v("p"),n.textContent="Name des Layouts",l=x(),ce(o.$$.fragment),s=x(),c=v("div"),ce(r.$$.fragment),d=x(),ce(f.$$.fragment),m=x(),y=v("div"),k=v("label"),k.textContent="Vorhandene Module",b=x(),z=v("input"),N=x(),_=v("div"),ne.block.c(),A=x(),ce(M.$$.fragment),T=x(),j=v("div"),E=v("h1"),E.textContent="Wochentage",D=x(),O=v("p"),O.textContent="Wählen Sie die Tage, an denen die Vorlage angezeigt werden soll.",I=x(),q=v("div");for(let e=0;e<oe.length;e+=1)oe[e].c();W=x(),ie&&ie.c(),P=x(),F=v("div"),ce(V.$$.fragment),C(c,"class","layout-activated-switch svelte-1vkufz4"),C(k,"for","moduleSearch"),C(k,"id","textModule"),C(k,"class","svelte-1vkufz4"),C(z,"id","moduleSearch"),C(z,"type","search"),C(z,"placeholder","suche..."),C(z,"class","search_bar svelte-1vkufz4"),C(y,"class","module svelte-1vkufz4"),C(_,"class","moduleCards svelte-1vkufz4"),C(q,"class","weekdays svelte-1vkufz4"),C(F,"class","saveBtnDiv svelte-1vkufz4"),C(t,"class","newLayoutContent")},m(i,a){p(i,t,a),$(t,n),$(t,l),re(o,t,null),$(t,s),$(t,c),re(r,c,null),$(t,d),re(f,t,null),$(t,m),$(t,y),$(y,k),$(y,b),$(y,z),L(z,e[3]),$(t,N),$(t,_),ne.block.m(_,ne.anchor=null),ne.mount=()=>_,ne.anchor=null,$(t,A),re(M,t,null),$(t,T),$(t,j),$(j,E),$(j,D),$(j,O),$(j,I),$(j,q);for(let e=0;e<oe.length;e+=1)oe[e].m(q,null);$(t,W),ie&&ie.m(t,null),$(t,P),$(t,F),re(V,F,null),U=!0,H||(J=[w(z,"input",e[17]),w(z,"input",e[18])],H=!0)},p(n,l){e=n;const s={};!i&&1&l[0]&&(i=!0,s.value=e[0].id,R(()=>i=!1)),o.$set(s);const c={};if(16&l[1]&&(c.$$scope={dirty:l,ctx:e}),!u&&1&l[0]&&(u=!0,c.value=e[0].activated,R(()=>u=!1)),r.$set(c),8&l[0]&&L(z,e[3]),ne.ctx=e,4&l[0]&&S!==(S=e[2])&&ee(S,ne)||te(ne,e,l),17409&l[0]){let t;for(le=e[10],t=0;t<le.length;t+=1){const n=We(e,le,t);oe[t]?oe[t].p(n,l):(oe[t]=Ze(n),oe[t].c(),oe[t].m(q,null))}for(;t<oe.length;t+=1)oe[t].d(1);oe.length=le.length}e[4]?ie||(ie=Qe(),ie.c(),ie.m(t,P)):ie&&(ie.d(1),ie=null);const a={};16&l[1]&&(a.$$scope={dirty:l,ctx:e}),V.$set(a)},i(e){U||(X(o.$$.fragment,e),X(r.$$.fragment,e),X(f.$$.fragment,e),X(ne.block),X(M.$$.fragment,e),X(V.$$.fragment,e),U=!0)},o(e){Y(o.$$.fragment,e),Y(r.$$.fragment,e),Y(f.$$.fragment,e);for(let e=0;e<3;e+=1){Y(ne.blocks[e])}Y(M.$$.fragment,e),Y(V.$$.fragment,e),U=!1},d(e){e&&h(t),ae(o),ae(r),ae(f),ne.block.d(),ne.token=null,ne=null,ae(M),g(oe,e),ie&&ie.d(),ae(V),H=!1,a(J)}}}function Re(e){let t;return{c(){t=v("span"),t.textContent="Aktivieren Sie das Modul",C(t,"class","mr svelte-1vkufz4")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function Ve(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function Ue(e){let t,n,l=[],o=new qe,i=e[31];const s=e=>e[34];for(let t=0;t<i.length;t+=1){let n=Pe(e,i,t),c=s(n);o.set(c,l[t]=Ge(c,n))}return{c(){for(let e=0;e<l.length;e+=1)l[e].c();t=b()},m(e,o){for(let t=0;t<l.length;t+=1)l[t].m(e,o);p(e,t,o),n=!0},p(e,n){2053&n[0]&&(i=e[31],Z(),l=ie(l,n,s,1,e,i,o,t.parentNode,oe,Ge,t,Pe),Q())},i(e){if(!n){for(let e=0;e<i.length;e+=1)X(l[e]);n=!0}},o(e){for(let e=0;e<l.length;e+=1)Y(l[e]);n=!1},d(e){for(let t=0;t<l.length;t+=1)l[t].d(e);e&&h(t)}}}function He(e){let t,n,l=-1!=e[0].moduleList.findIndex(o)?"abwählen":"wählen";function o(...t){return e[19](e[32],...t)}return{c(){t=v("span"),n=k(l),C(t,"class","centerText svelte-1vkufz4")},m(e,l){p(e,t,l),$(t,n)},p(t,i){e=t,5&i[0]&&l!==(l=-1!=e[0].moduleList.findIndex(o)?"abwählen":"wählen")&&N(n,l)},d(e){e&&h(t)}}}function Je(e){let t,n,l,o,i,s=e[32].name+"";function c(...t){return e[20](e[32],...t)}return l=new e[8]({props:{class:-1!=e[0].moduleList.findIndex(c)?"btn__selected":"",$$slots:{default:[He]},$$scope:{ctx:e}}}),l.$on("click",function(){return e[21](e[32])}),{c(){t=k(s),n=x(),ce(l.$$.fragment),o=x()},m(e,s){p(e,t,s),p(e,n,s),re(l,e,s),p(e,o,s),i=!0},p(n,o){e=n,(!i||4&o[0])&&s!==(s=e[32].name+"")&&N(t,s);const r={};5&o[0]&&(r.class=-1!=e[0].moduleList.findIndex(c)?"btn__selected":""),5&o[0]|16&o[1]&&(r.$$scope={dirty:o,ctx:e}),l.$set(r)},i(e){i||(X(l.$$.fragment,e),i=!0)},o(e){Y(l.$$.fragment,e),i=!1},d(e){e&&h(t),e&&h(n),ae(l,e),e&&h(o)}}}function Ge(e,t){let n,l,o;return l=new t[7]({props:{style:"margin: 20px",$$slots:{default:[Je]},$$scope:{ctx:t}}}),{key:e,first:null,c(){n=b(),ce(l.$$.fragment),this.first=n},m(e,t){p(e,n,t),re(l,e,t),o=!0},p(e,n){t=e;const o={};5&n[0]|16&n[1]&&(o.$$scope={dirty:n,ctx:t}),l.$set(o)},i(e){o||(X(l.$$.fragment,e),o=!0)},o(e){Y(l.$$.fragment,e),o=!1},d(e){e&&h(n),ae(l,e)}}}function Ke(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function Ze(e){let t,n,l,o,i,s,c,r,a,u=e[28].day+"";function d(...t){return e[22](e[28],...t)}return{c(){t=v("div"),n=v("input"),o=x(),i=v("label"),s=k(u),c=x(),n.checked=l=e[0].days.includes(e[28].value),C(n,"type","checkbox"),C(n,"id",e[28].value),C(n,"class","svelte-1vkufz4"),C(i,"for",e[28].value),C(t,"class","day svelte-1vkufz4")},m(e,l){p(e,t,l),$(t,n),$(t,o),$(t,i),$(i,s),$(t,c),r||(a=w(n,"change",d),r=!0)},p(t,o){e=t,1&o[0]&&l!==(l=e[0].days.includes(e[28].value))&&(n.checked=l)},d(e){e&&h(t),r=!1,a()}}}function Qe(e){let t;return{c(){t=v("div"),t.textContent="Achtung: Die ausgewählten Tage sind bereits in einem anderen Layout hinterlegt. Diese werden beim speichern in den bereits existierenden und aktiven Layouts überschrieben.",C(t,"class","errroWeekdaysOverlapping svelte-1vkufz4")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function Xe(e){let t;return{c(){t=k("Layout speichern")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function Ye(e){let t,n,l=e[0]&&e[1]&&Fe(e);return{c(){t=v("div"),l&&l.c(),C(t,"class","newLayoutContainer")},m(e,o){p(e,t,o),l&&l.m(t,null),n=!0},p(e,n){e[0]&&e[1]?l?(l.p(e,n),3&n[0]&&X(l,1)):(l=Fe(e),l.c(),X(l,1),l.m(t,null)):l&&(Z(),Y(l,1,1,()=>{l=null}),Q())},i(e){n||(X(l),n=!0)},o(e){Y(l),n=!1},d(e){e&&h(t),l&&l.d()}}}function et(e,l,o){let i;const{TextField:s,Divider:c,Card:r,Button:a,Switch:u}=t,d=E(),f=n.getAllModules().map(e=>({...e,isSelected:!1}));let m=f,{settings:$}=l,{layout:p}=l,h=new Map;j(async()=>{await $,await(P(),q)});let g=[{day:"Montag",status:!1,value:"Mo"},{day:"Dienstag",status:!1,value:"Tu"},{day:"Mittwoch",status:!1,value:"We"},{day:"Donnerstag",status:!1,value:"Th"},{day:"Freitag",status:!1,value:"Fr"},{day:"Samstag",status:!1,value:"Sa"},{day:"Sonntag",status:!1,value:"Su"}];function v(e){const t=p.moduleList.findIndex(t=>t.moduleId==e.id);-1==t?p.moduleList.splice(p.moduleList.length-1,0,{moduleId:e.id.toString(),position:p.moduleList.length.toString()}):p.moduleList.splice(t,1),o(0,p)}let y="";function k(){o(2,m=f.filter(e=>e.name.toLowerCase().includes(y.toLowerCase())))}function x(){if(""!=p.id&&0!=p.moduleList.length){for(let[e,t]of h){const n=$.dashboardLayout[e];t.forEach(e=>{const t=n.days.findIndex(t=>e==t);n.days.splice(t,1)}),o(1,$.dashboardLayout[e]=n,$)}d("save",p)}}function b(e,t){if(e.target.checked)p.days.unshift(t);else{const e=p.days.findIndex(e=>e==t);p.days.splice(e,1)}o(0,p.days=g.filter(e=>p.days.includes(e.value)).map(e=>e.value),p)}return e.$$set=e=>{"settings"in e&&o(1,$=e.settings),"layout"in e&&o(0,p=e.layout)},e.$$.update=()=>{1&e.$$.dirty[0]&&o(4,i=function(e){h=new Map;let t=!1;return $.dashboardLayout.forEach((n,l)=>{n.id!=p.id&&n.activated&&e.forEach((e,o)=>{if(n.days.includes(e))return t=!0,h.has(l)?void h.get(l).push(e):void h.set(l,[e])})}),t}(p.days))},[p,$,m,y,i,s,c,r,a,u,g,v,k,x,b,function(t){e.$$.not_equal(p.id,t)&&(p.id=t,o(0,p))},function(t){e.$$.not_equal(p.activated,t)&&(p.activated=t,o(0,p))},function(){y=this.value,o(3,y)},e=>k(),(e,t)=>t.moduleId.toString()==e.id.toString(),(e,t)=>t.moduleId.toString()==e.id.toString(),e=>v(e),(e,t)=>b(t,e.value),()=>x()]}class tt extends de{constructor(e){var t;super(),document.getElementById("svelte-1vkufz4-style")||((t=v("style")).id="svelte-1vkufz4-style",t.textContent=".search_bar.svelte-1vkufz4.svelte-1vkufz4{padding:0.2em;min-width:40%;margin-left:113px;height:2em}.module.svelte-1vkufz4.svelte-1vkufz4{display:flex;flex-direction:row;font-weight:bold}.moduleCards.svelte-1vkufz4 .btn{border:none;border-radius:10px;height:23px;width:100px;float:right;cursor:pointer}.moduleCards.svelte-1vkufz4 .btn__selected{background-color:#71c23f !important;color:white !important}#textModule.svelte-1vkufz4.svelte-1vkufz4{margin-right:89px}.errroWeekdaysOverlapping.svelte-1vkufz4.svelte-1vkufz4{color:red;font-weight:600;font-size:0.9em}.centerText.svelte-1vkufz4.svelte-1vkufz4{display:block;width:100%;text-align:center}.weekdays.svelte-1vkufz4.svelte-1vkufz4{display:flex;gap:1em}.weekdays.svelte-1vkufz4 .day.svelte-1vkufz4{margin-top:1em;margin-bottom:1em}.mr.svelte-1vkufz4.svelte-1vkufz4{margin-right:1.5em}.layout-activated-switch.svelte-1vkufz4.svelte-1vkufz4{margin:1.5em 0}.saveBtnDiv.svelte-1vkufz4.svelte-1vkufz4{margin:2em 0}",$(document.head,t)),ue(this,e,et,Ye,d,{settings:1,layout:0},[-1,-1])}}function nt(e,t,n){const l=e.slice();return l[20]=t[n],l}function lt(e,t,n){const l=e.slice();return l[23]=t[n],l}function ot(e){let t;return{c(){t=k("Abbrechen")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function it(e){let t;return{c(){t=k("Löschen")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function st(e){let t,n,l,o,i,s,c;return o=new e[6]({props:{filled:!0,$$slots:{default:[ot]},$$scope:{ctx:e}}}),o.$on("click",e[14]),s=new e[6]({props:{danger:!0,outline:!0,$$slots:{default:[it]},$$scope:{ctx:e}}}),s.$on("click",e[13]),{c(){t=v("div"),t.textContent="Wollen Sie das Layout wirklich löschen?",n=x(),l=v("div"),ce(o.$$.fragment),i=x(),ce(s.$$.fragment),C(l,"class","btns-container svelte-1rgcwkg")},m(e,r){p(e,t,r),p(e,n,r),p(e,l,r),re(o,l,null),$(l,i),re(s,l,null),c=!0},p(e,t){const n={};134217728&t&&(n.$$scope={dirty:t,ctx:e}),o.$set(n);const l={};134217728&t&&(l.$$scope={dirty:t,ctx:e}),s.$set(l)},i(e){c||(X(o.$$.fragment,e),X(s.$$.fragment,e),c=!0)},o(e){Y(o.$$.fragment,e),Y(s.$$.fragment,e),c=!1},d(e){e&&h(t),e&&h(n),e&&h(l),ae(o),ae(s)}}}function ct(e){let t,n,l;return n=new Ne({props:{size:"25"}}),{c(){t=v("div"),ce(n.$$.fragment),C(t,"slot","title-icon")},m(e,o){p(e,t,o),re(n,t,null),l=!0},p:s,i(e){l||(X(n.$$.fragment,e),l=!0)},o(e){Y(n.$$.fragment,e),l=!1},d(e){e&&h(t),ae(n)}}}function rt(e){let t,n;return t=new e[5]({props:{title:"Bestätigung",closeCallback:e[26],danger:!0,$$slots:{"title-icon":[ct],default:[st]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,l){re(t,e,l),n=!0},p(e,n){const l={};67108864&n&&(l.closeCallback=e[26]),134217728&n&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){n||(X(t.$$.fragment,e),n=!0)},o(e){Y(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function at(e){let t,n,l,o,i,s,c,r,a,u,d;function f(e,t){return e[1]?ft:dt}i=new Se({props:{size:"24"}});let m=f(e),g=m(e);return r=new tt({props:{layout:e[2],settings:e[0]}}),r.$on("save",e[17]),{c(){t=v("div"),n=v("div"),l=v("h2"),o=v("span"),ce(i.$$.fragment),s=x(),g.c(),c=x(),ce(r.$$.fragment),C(o,"class","btn-back svelte-1rgcwkg")},m(f,m){p(f,t,m),$(t,n),$(n,l),$(l,o),re(i,o,null),$(l,s),g.m(l,null),$(t,c),re(r,t,null),a=!0,u||(d=w(o,"click",e[10]),u=!0)},p(e,t){m===(m=f(e))&&g?g.p(e,t):(g.d(1),g=m(e),g&&(g.c(),g.m(l,null)));const n={};4&t&&(n.layout=e[2]),1&t&&(n.settings=e[0]),r.$set(n)},i(e){a||(X(i.$$.fragment,e),X(r.$$.fragment,e),a=!0)},o(e){Y(i.$$.fragment,e),Y(r.$$.fragment,e),a=!1},d(e){e&&h(t),ae(i),g.d(),ae(r),u=!1,d()}}}function ut(e){let t,n,l,o,i,s,c,r,a;l=new e[6]({props:{$$slots:{default:[mt]},$$scope:{ctx:e}}}),l.$on("click",e[11]);let u=e[0].dashboardLayout,d=[];for(let t=0;t<u.length;t+=1)d[t]=vt(nt(e,u,t));const f=e=>Y(d[e],1,1,()=>{d[e]=null});return{c(){t=v("h2"),t.textContent="Mein Layout",n=x(),ce(l.$$.fragment),o=x(),i=v("div"),s=v("p"),s.textContent="Dies sind Ihre vorhandenen Vorlagen.",c=x(),r=v("div");for(let e=0;e<d.length;e+=1)d[e].c();C(r,"class","layout-cards svelte-1rgcwkg"),C(i,"class","form-setting")},m(e,u){p(e,t,u),p(e,n,u),re(l,e,u),p(e,o,u),p(e,i,u),$(i,s),$(i,c),$(i,r);for(let e=0;e<d.length;e+=1)d[e].m(r,null);a=!0},p(e,t){const n={};if(134217728&t&&(n.$$scope={dirty:t,ctx:e}),l.$set(n),37121&t){let n;for(u=e[0].dashboardLayout,n=0;n<u.length;n+=1){const l=nt(e,u,n);d[n]?(d[n].p(l,t),X(d[n],1)):(d[n]=vt(l),d[n].c(),X(d[n],1),d[n].m(r,null))}for(Z(),n=u.length;n<d.length;n+=1)f(n);Q()}},i(e){if(!a){X(l.$$.fragment,e);for(let e=0;e<u.length;e+=1)X(d[e]);a=!0}},o(e){Y(l.$$.fragment,e),d=d.filter(Boolean);for(let e=0;e<d.length;e+=1)Y(d[e]);a=!1},d(e){e&&h(t),e&&h(n),ae(l,e),e&&h(o),e&&h(i),g(d,e)}}}function dt(e){let t,n,l,o=e[2].id+"";return{c(){t=k("Layouts "),n=k(o),l=k(" bearbeiten")},m(e,o){p(e,t,o),p(e,n,o),p(e,l,o)},p(e,t){4&t&&o!==(o=e[2].id+"")&&N(n,o)},d(e){e&&h(t),e&&h(n),e&&h(l)}}}function ft(e){let t;return{c(){t=k("Neues Layout erstellen")},m(e,n){p(e,t,n)},p:s,d(e){e&&h(t)}}}function mt(e){let t,n,l;return t=new De({props:{size:"24"}}),{c(){ce(t.$$.fragment),n=k("\n Neues Layout hinzufügen")},m(e,o){re(t,e,o),p(e,n,o),l=!0},p:s,i(e){l||(X(t.$$.fragment,e),l=!0)},o(e){Y(t.$$.fragment,e),l=!1},d(e){ae(t,e),e&&h(n)}}}function $t(e){let t,n;return t=new e[7]({props:{class:"layout-card",$$slots:{default:[gt]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,l){re(t,e,l),n=!0},p(e,n){const l={};134217729&n&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){n||(X(t.$$.fragment,e),n=!0)},o(e){Y(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function pt(e){let t,n=e[20].moduleList,l=[];for(let t=0;t<n.length;t+=1)l[t]=ht(lt(e,n,t));return{c(){for(let e=0;e<l.length;e+=1)l[e].c();t=b()},m(e,n){for(let t=0;t<l.length;t+=1)l[t].m(e,n);p(e,t,n)},p(e,o){if(257&o){let i;for(n=e[20].moduleList,i=0;i<n.length;i+=1){const s=lt(e,n,i);l[i]?l[i].p(s,o):(l[i]=ht(s),l[i].c(),l[i].m(t.parentNode,t))}for(;i<l.length;i+=1)l[i].d(1);l.length=n.length}},d(e){g(l,e),e&&h(t)}}}function ht(e){let t,n,l,o=e[8](e[23].moduleId)+"";return{c(){t=v("p"),n=k(o),l=x(),C(t,"class","svelte-1rgcwkg")},m(e,o){p(e,t,o),$(t,n),$(t,l)},p(e,t){1&t&&o!==(o=e[8](e[23].moduleId)+"")&&N(n,o)},d(e){e&&h(t)}}}function gt(e){let t,n,l,o,i,s,c,r,d,f,m,g,y,b,z,L,_,A,M,T,j,E,D,B,O=e[20].id+"",I=e[20].days+"";n=new Te({props:{size:"18"}}),i=new Ie({props:{size:"18"}});let q=e[20].moduleList&&pt(e);return{c(){t=v("div"),ce(n.$$.fragment),l=x(),o=v("div"),ce(i.$$.fragment),s=x(),c=v("div"),r=v("span"),d=x(),f=k(O),m=x(),g=v("div"),y=v("div"),y.textContent="Aktiv an den Tagen",b=x(),z=v("p"),L=k(I),_=x(),A=v("div"),M=v("div"),M.textContent="Aktive Module",T=x(),q&&q.c(),j=x(),C(t,"class","layout-card--icons edit svelte-1rgcwkg"),C(o,"class","layout-card--icons delete svelte-1rgcwkg"),C(r,"class","active-indicator svelte-1rgcwkg"),S(r,"active",e[20].activated),C(c,"class","layout-card--title svelte-1rgcwkg"),C(y,"class","layout-card--subtitle svelte-1rgcwkg"),C(z,"class","svelte-1rgcwkg"),C(g,"class","layout-card--section svelte-1rgcwkg"),C(M,"class","layout-card--subtitle svelte-1rgcwkg"),C(A,"class","layout-card--section svelte-1rgcwkg")},m(a,h){p(a,t,h),re(n,t,null),p(a,l,h),p(a,o,h),re(i,o,null),p(a,s,h),p(a,c,h),$(c,r),$(c,d),$(c,f),p(a,m,h),p(a,g,h),$(g,y),$(g,b),$(g,z),$(z,L),p(a,_,h),p(a,A,h),$(A,M),$(A,T),q&&q.m(A,null),p(a,j,h),E=!0,D||(B=[w(t,"click",function(){u(e[12](e[20]))&&e[12](e[20]).apply(this,arguments)}),w(o,"click",function(){u(e[15](e[20]))&&e[15](e[20]).apply(this,arguments)})],D=!0)},p(t,n){e=t,1&n&&S(r,"active",e[20].activated),(!E||1&n)&&O!==(O=e[20].id+"")&&N(f,O),(!E||1&n)&&I!==(I=e[20].days+"")&&N(L,I),e[20].moduleList?q?q.p(e,n):(q=pt(e),q.c(),q.m(A,null)):q&&(q.d(1),q=null)},i(e){E||(X(n.$$.fragment,e),X(i.$$.fragment,e),E=!0)},o(e){Y(n.$$.fragment,e),Y(i.$$.fragment,e),E=!1},d(e){e&&h(t),ae(n),e&&h(l),e&&h(o),ae(i),e&&h(s),e&&h(c),e&&h(m),e&&h(g),e&&h(_),e&&h(A),q&&q.d(),e&&h(j),D=!1,a(B)}}}function vt(e){let t,n,l=null!=e[20].id&&$t(e);return{c(){l&&l.c(),t=b()},m(e,o){l&&l.m(e,o),p(e,t,o),n=!0},p(e,n){null!=e[20].id?l?(l.p(e,n),1&n&&X(l,1)):(l=$t(e),l.c(),X(l,1),l.m(t.parentNode,t)):l&&(Z(),Y(l,1,1,()=>{l=null}),Q())},i(e){n||(X(l),n=!0)},o(e){Y(l),n=!1},d(e){l&&l.d(e),e&&h(t)}}}function yt(e){let t,n,l,o,i,s,c;function r(t){e[16](t)}let a={$$slots:{default:[rt,({closeCallback:e})=>({26:e}),({closeCallback:e})=>e?67108864:0]},$$scope:{ctx:e}};void 0!==e[3]&&(a.open=e[3]),n=new e[4]({props:a}),B.push(()=>se(n,"open",r));const u=[ut,at],d=[];function f(e,t){return!e[0]||e[1]||e[2]?e[0]&&(e[1]||null!=e[2])?1:-1:0}return~(i=f(e))&&(s=d[i]=u[i](e)),{c(){t=v("div"),ce(n.$$.fragment),o=x(),s&&s.c()},m(e,l){p(e,t,l),re(n,t,null),$(t,o),~i&&d[i].m(t,null),c=!0},p(e,[o]){const c={};201326592&o&&(c.$$scope={dirty:o,ctx:e}),!l&&8&o&&(l=!0,c.open=e[3],R(()=>l=!1)),n.$set(c);let r=i;i=f(e),i===r?~i&&d[i].p(e,o):(s&&(Z(),Y(d[r],1,1,()=>{d[r]=null}),Q()),~i?(s=d[i],s?s.p(e,o):(s=d[i]=u[i](e),s.c()),X(s,1),s.m(t,null)):s=null)},i(e){c||(X(n.$$.fragment,e),X(s),c=!0)},o(e){Y(n.$$.fragment,e),Y(s),c=!1},d(e){e&&h(t),ae(n),~i&&d[i].d()}}}function kt(e,l,o){const{Modal:i,Dialog:s,Button:c,Card:r}=t;let a,{settings:u}=l,d=!1;const f=E();function m(e){if(o(1,d=!1),o(2,a=void 0),!e.detail||!e.detail.id)return void console.error("Could not save Layout!");const t=u.dashboardLayout.findIndex(t=>t.id==e.detail.id);t>-1?o(0,u.dashboardLayout[t]=e.detail,u):u.dashboardLayout.unshift(e.detail),f("save")}let $,p=!1;return e.$$set=e=>{"settings"in e&&o(0,u=e.settings)},[u,d,a,p,i,s,c,r,function(e){return n.getModuleName(e)},m,function(){o(2,a=void 0),o(1,d=!1)},function(){o(2,a={id:"",activated:!0,days:[],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"9999",position:"1"}]}),o(1,d=!0)},function(e){o(2,a={id:e.id,activated:e.activated,days:[...e.days],moduleList:[...e.moduleList]})},function(){const e=u.dashboardLayout.findIndex(e=>e.id==$.id);-1!=e&&(u.dashboardLayout.splice(e,1),o(0,u),o(3,p=!1),f("save"))},function(){o(3,p=!1),$=void 0},function(e){$=e,o(3,p=!0)},function(e){p=e,o(3,p)},e=>m(e)]}class xt extends de{constructor(e){var t;super(),document.getElementById("svelte-1rgcwkg-style")||((t=v("style")).id="svelte-1rgcwkg-style",t.textContent=".btn-back.svelte-1rgcwkg.svelte-1rgcwkg{cursor:pointer;margin-right:1em}.btns-container.svelte-1rgcwkg.svelte-1rgcwkg{display:flex;justify-content:space-between;margin-top:1em}.layout-cards.svelte-1rgcwkg.svelte-1rgcwkg{display:flex;flex-flow:row wrap;gap:2em}.layout-cards.svelte-1rgcwkg .svelte-1rgcwkg{width:200px}.layout-cards.svelte-1rgcwkg .layout-card--icons.svelte-1rgcwkg{cursor:pointer;position:absolute;width:auto}.layout-cards.svelte-1rgcwkg .layout-card--icons.edit.svelte-1rgcwkg{right:45px;top:16px}.layout-cards.svelte-1rgcwkg .layout-card--icons.delete.svelte-1rgcwkg{right:21px;top:16px}.layout-cards.svelte-1rgcwkg .layout-card{position:relative;font-size:1em}.layout-cards.svelte-1rgcwkg .layout-card--title.svelte-1rgcwkg{font-weight:600;height:20px;display:flex;gap:0.5em;place-items:center;margin-bottom:1.5em;margin-top:1em}.layout-cards.svelte-1rgcwkg .layout-card--subtitle.svelte-1rgcwkg{font-weight:600;margin-bottom:0.5em}.layout-cards.svelte-1rgcwkg .layout-card--section.svelte-1rgcwkg{font-size:0.8em;margin-bottom:1.5em}.layout-cards.svelte-1rgcwkg p.svelte-1rgcwkg{margin:0.5 0 0 0}.active-indicator.svelte-1rgcwkg.svelte-1rgcwkg{height:15px;width:15px;border-radius:50%;display:inline-block;background-color:red}.active.svelte-1rgcwkg.svelte-1rgcwkg{background-color:green}",$(document.head,t)),ue(this,e,kt,yt,d,{settings:0})}}function bt(e,t,n){const l=e.slice();return l[5]=t[n],l[7]=n,l}function wt(e){let t,n,l,o,i,s,c,r,a,u=e[5].name+"",d=e[5].version+"",f=0===e[7]&&function(e){let t,n,l;return{c(){t=v("td"),n=k("enablerr.ui"),C(t,"rowspan",l=2*e[0].length),C(t,"class","svelte-nkhwaj")},m(e,l){p(e,t,l),$(t,n)},p(e,n){1&n&&l!==(l=2*e[0].length)&&C(t,"rowspan",l)},d(e){e&&h(t)}}}(e);return{c(){t=v("tr"),f&&f.c(),n=x(),l=v("td"),o=k(u),i=x(),s=v("td"),c=k(d),r=x(),a=v("tr"),C(l,"class","svelte-nkhwaj"),C(s,"class","svelte-nkhwaj")},m(e,u){p(e,t,u),f&&f.m(t,null),$(t,n),$(t,l),$(l,o),$(t,i),$(t,s),$(s,c),$(t,r),p(e,a,u)},p(e,t){0===e[7]&&f.p(e,t)},d(e){e&&h(t),f&&f.d(),e&&h(a)}}}function zt(e){let t,n,l,o,i,c,r,a,u,d,f,m,y,b,w,z,L,_=e[4],S=[];for(let t=0;t<_.length;t+=1)S[t]=wt(bt(e,_,t));return{c(){t=v("h2"),t.textContent="Meine Versionen",n=x(),l=v("table"),o=v("tr"),o.innerHTML="<th>Komponente</th> \n <th>Modul</th> \n <th>Version</th>",i=x(),c=v("tr"),r=x(),a=v("tr"),u=v("td"),u.textContent="enablerr.mw",d=x(),f=v("td"),f.textContent="server",m=x(),y=v("td"),b=k(e[1]),w=x(),z=v("tr"),L=x();for(let e=0;e<S.length;e+=1)S[e].c();C(c,"class","filler svelte-nkhwaj"),C(u,"class","svelte-nkhwaj"),C(f,"class","svelte-nkhwaj"),C(y,"class","svelte-nkhwaj"),C(z,"class","filler svelte-nkhwaj"),C(l,"border","1"),C(l,"class","svelte-nkhwaj")},m(e,s){p(e,t,s),p(e,n,s),p(e,l,s),$(l,o),$(l,i),$(l,c),$(l,r),$(l,a),$(a,u),$(a,d),$(a,f),$(a,m),$(a,y),$(y,b),$(l,w),$(l,z),$(l,L);for(let e=0;e<S.length;e+=1)S[e].m(l,null)},p(e,[t]){if(2&t&&N(b,e[1]),17&t){let n;for(_=e[4],n=0;n<_.length;n+=1){const o=bt(e,_,n);S[n]?S[n].p(o,t):(S[n]=wt(o),S[n].c(),S[n].m(l,null))}for(;n<S.length;n+=1)S[n].d(1);S.length=_.length}},i:s,o:s,d(e){e&&h(t),e&&h(n),e&&h(l),g(S,e)}}}function Ct(e,t,n){let l,o;const{serverVersion:s,uiVersions:c}=i;f(e,s,e=>n(1,o=e)),f(e,c,e=>n(0,l=e));const r=l.sort((e,t)=>e.name.localeCompare(t.name));return[l,o,s,c,r]}class Nt extends de{constructor(e){var t;super(),document.getElementById("svelte-nkhwaj-style")||((t=v("style")).id="svelte-nkhwaj-style",t.textContent="table.svelte-nkhwaj{border-collapse:collapse}td.svelte-nkhwaj{padding-left:10px;padding-top:3px;padding-bottom:3px}tr.filler.svelte-nkhwaj{height:1em}",$(document.head,t)),ue(this,e,Ct,zt,d,{})}}function Lt(e){let t,n,l;function o(t){e[16](t)}let i={type:"email",error:!e[0]&&"Bitte Email eingeben!"};return void 0!==e[0]&&(i.value=e[0]),t=new e[6]({props:i}),B.push(()=>se(t,"value",o)),{c(){ce(t.$$.fragment)},m(e,n){re(t,e,n),l=!0},p(e,l){const o={};1&l&&(o.error=!e[0]&&"Bitte Email eingeben!"),!n&&1&l&&(n=!0,o.value=e[0],R(()=>n=!1)),t.$set(o)},i(e){l||(X(t.$$.fragment,e),l=!0)},o(e){Y(t.$$.fragment,e),l=!1},d(e){ae(t,e)}}}function _t(e){let t,n,l;function o(t){e[17](t)}let i={type:"number",noSpinner:!0};return void 0!==e[1]&&(i.value=e[1]),t=new e[6]({props:i}),B.push(()=>se(t,"value",o)),{c(){ce(t.$$.fragment)},m(e,n){re(t,e,n),l=!0},p(e,l){const o={};!n&&2&l&&(n=!0,o.value=e[1],R(()=>n=!1)),t.$set(o)},i(e){l||(X(t.$$.fragment,e),l=!0)},o(e){Y(t.$$.fragment,e),l=!1},d(e){ae(t,e)}}}function St(e){let t;return{c(){t=k("Ticket erstellen")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function At(e){let t,n,l,o,i,s,c,r,a,u,d,f,m;return n=new e[5]({props:{name:"Benutzer",help:"Email-Adresse",$$slots:{default:[Lt]},$$scope:{ctx:e}}}),o=new e[5]({props:{name:"Dauer",help:"in Stunden",class:"text-number",$$slots:{default:[_t]},$$scope:{ctx:e}}}),s=new e[8]({props:{text:"Rollen"}}),r=new e[9]({props:{name:"roleItems[]",items:e[11]}}),u=new e[4]({props:{form:e[10],filled:!0,type:"submit",$$slots:{default:[St]},$$scope:{ctx:e}}}),{c(){t=v("form"),ce(n.$$.fragment),l=x(),ce(o.$$.fragment),i=x(),ce(s.$$.fragment),c=x(),ce(r.$$.fragment),a=x(),ce(u.$$.fragment),C(t,"id",e[10]),C(t,"class","form-setting tickets svelte-17kglid")},m(h,g){var v;p(h,t,g),re(n,t,null),$(t,l),re(o,t,null),$(t,i),re(s,t,null),$(t,c),re(r,t,null),p(h,a,g),re(u,h,g),d=!0,f||(m=w(t,"submit",(v=e[13],function(e){return e.preventDefault(),v.call(this,e)})),f=!0)},p(e,t){const l={};67108865&t&&(l.$$scope={dirty:t,ctx:e}),n.$set(l);const i={};67108866&t&&(i.$$scope={dirty:t,ctx:e}),o.$set(i);const s={};67108864&t&&(s.$$scope={dirty:t,ctx:e}),u.$set(s)},i(e){d||(X(n.$$.fragment,e),X(o.$$.fragment,e),X(s.$$.fragment,e),X(r.$$.fragment,e),X(u.$$.fragment,e),d=!0)},o(e){Y(n.$$.fragment,e),Y(o.$$.fragment,e),Y(s.$$.fragment,e),Y(r.$$.fragment,e),Y(u.$$.fragment,e),d=!1},d(e){e&&h(t),ae(n),ae(o),ae(s),ae(r),e&&h(a),ae(u,e),f=!1,m()}}}function Mt(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function Tt(e){let t,n;return t=new e[7]({props:{headers:e[12],items:e[22],$$slots:{item:[Ot,({header:e,item:t,index:n})=>({23:e,24:t,25:n}),({header:e,item:t,index:n})=>(e?8388608:0)|(t?16777216:0)|(n?33554432:0)]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,l){re(t,e,l),n=!0},p(e,n){const l={};4&n&&(l.items=e[22]),92274688&n&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){n||(X(t.$$.fragment,e),n=!0)},o(e){Y(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function jt(e){let t,n,l=(e[24][e[23].value]||"")+"";return{c(){t=v("span"),n=k(l)},m(e,l){p(e,t,l),$(t,n)},p(e,t){25165824&t&&l!==(l=(e[24][e[23].value]||"")+"")&&N(n,l)},i:s,o:s,d(e){e&&h(t)}}}function Et(e){let t,n,l,o,i;function s(){return e[18](e[24])}return n=new Ie({props:{size:"20"}}),{c(){t=v("span"),ce(n.$$.fragment),C(t,"title","Löschen"),C(t,"class","pointer")},m(e,c){p(e,t,c),re(n,t,null),l=!0,o||(i=w(t,"click",s),o=!0)},p(t,n){e=t},i(e){l||(X(n.$$.fragment,e),l=!0)},o(e){Y(n.$$.fragment,e),l=!1},d(e){e&&h(t),ae(n),o=!1,i()}}}function Dt(e){let t,n,l,o=e[24][e[23].value]+"";return{c(){t=v("a"),n=k(o),C(t,"href",l=e[24][e[23].value])},m(e,l){p(e,t,l),$(t,n)},p(e,i){25165824&i&&o!==(o=e[24][e[23].value]+"")&&N(n,o),25165824&i&&l!==(l=e[24][e[23].value])&&C(t,"href",l)},i:s,o:s,d(e){e&&h(t)}}}function Bt(e){let t,n,l=e[14](e[24][e[23].value])+"";return{c(){t=v("span"),n=k(l)},m(e,l){p(e,t,l),$(t,n)},p(e,t){25165824&t&&l!==(l=e[14](e[24][e[23].value])+"")&&N(n,l)},i:s,o:s,d(e){e&&h(t)}}}function Ot(e){let t,n,l,o;const i=[Bt,Dt,Et,jt],s=[];function c(e,t){return"date"===e[23].type?0:"url"===e[23].type?1:"icon"===e[23].type?2:3}return t=c(e),n=s[t]=i[t](e),{c(){n.c(),l=b()},m(e,n){s[t].m(e,n),p(e,l,n),o=!0},p(e,o){let r=t;t=c(e),t===r?s[t].p(e,o):(Z(),Y(s[r],1,1,()=>{s[r]=null}),Q(),n=s[t],n?n.p(e,o):(n=s[t]=i[t](e),n.c()),X(n,1),n.m(l.parentNode,l))},i(e){o||(X(n),o=!0)},o(e){Y(n),o=!1},d(e){s[t].d(e),e&&h(l)}}}function It(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function qt(e){let t,n,l,o,i,s,c,r,a,u,d,f,m,g;a=new e[3]({props:{outline:!0,$$slots:{default:[At]},$$scope:{ctx:e}}}),d=new e[8]({props:{text:"Laufende Tickets"}});let y={ctx:e,current:null,token:null,hasCatch:!1,pending:It,then:Tt,catch:Mt,value:22,blocks:[,,,]};return ee(m=e[2],y),{c(){t=v("div"),n=v("h2"),n.textContent="Meine Tickets",l=x(),o=v("p"),o.textContent="Hier kannst du einem anderen enablerr Benutzer ein temporäres Ticket ausstellen, mit dem dieser enablerr\n ",i=v("ul"),i.innerHTML="<li>für diesen Mandanten,\n </li><li>die angegebene Dauer und\n </li><li>mit den angegebenen Rollen</li>",s=k(" benutzen kann.\n "),c=v("p"),c.innerHTML="Der Benutzer erhält dann eine Email mit dem Zugangslink.<br/>\n Sobald du das Ticket löscht, wird dem betroffenen Benutzer mit sofortiger Wirkung der Zugang entzogen.<br/>\n Ansonsten wird das Ticket nach dem Ablauf automatisch gelöscht.",r=x(),ce(a.$$.fragment),u=x(),ce(d.$$.fragment),f=x(),y.block.c(),_(i,"margin-top","-1em"),C(t,"class","mainTicket svelte-17kglid")},m(e,m){p(e,t,m),$(t,n),$(t,l),$(t,o),$(t,i),$(t,s),$(t,c),$(t,r),re(a,t,null),$(t,u),re(d,t,null),$(t,f),y.block.m(t,y.anchor=null),y.mount=()=>t,y.anchor=null,g=!0},p(t,[n]){e=t;const l={};67108867&n&&(l.$$scope={dirty:n,ctx:e}),a.$set(l),y.ctx=e,4&n&&m!==(m=e[2])&&ee(m,y)||te(y,e,n)},i(e){g||(X(a.$$.fragment,e),X(d.$$.fragment,e),X(y.block),g=!0)},o(e){Y(a.$$.fragment,e),Y(d.$$.fragment,e);for(let e=0;e<3;e+=1){Y(y.blocks[e])}g=!1},d(e){e&&h(t),ae(a),ae(d),y.block.d(),y.token=null,y=null}}}function Wt(e,o,i){let s;f(e,l,e=>i(19,s=e));const{Card:c,Button:r,FormField:a,TextField:u,Switch:d,Table:m,Divider:$,CheckboxGroup:p}=t;let h,g=8;const v=(s.role||[]).map(e=>({label:e,value:e,checked:!0})).sort((e,t)=>e.value.localeCompare(t.value)),y=async e=>e||await n.getTickets(),k=async e=>{const t=await n.deleteTicket(e);i(2,x=y(t))};let x=y();return[h,g,x,c,r,a,u,m,$,p,"ticket20061962",v,[{type:"text",text:"ID",value:"ticketId"},{type:"text",text:"Email",value:"email"},{type:"text",text:"Rollen",value:"roles"},{type:"date",text:"Start",value:"start"},{type:"date",text:"Ende",value:"end"},{type:"icon",text:"",value:"delete"}],async()=>{if(!h)return;const e=v.filter(e=>e.checked).map(e=>e.value).join(",");if(!e)return;const t={email:h,duration:g,roles:e},l=await n.createTicket(t);i(2,x=y(l)),i(0,h=""),i(1,g=8)},e=>{if(!e)return"N/A";try{return(e=new Date(e)).toLocaleString()}catch{return""}},k,function(e){h=e,i(0,h)},function(e){g=e,i(1,g)},e=>k(e._id)]}class Pt extends de{constructor(e){var t;super(),document.getElementById("svelte-17kglid-style")||((t=v("style")).id="svelte-17kglid-style",t.textContent="form.tickets.svelte-17kglid .text-number .text-field{width:4em}.mainTicket.svelte-17kglid label.checkbox{margin-bottom:0.5em}",$(document.head,t)),ue(this,e,Wt,qt,d,{})}}const{document:Ft}=ne;function Rt(e,t,n){const l=e.slice();return l[61]=t[n],l[63]=n,l}function Vt(e,t,n){const l=e.slice();return l[61]=t[n],l[63]=n,l}function Ut(e,t,n){const l=e.slice();return l[66]=t[n],l}function Ht(e,t,n){const l=e.slice();return l[66]=t[n],l}function Jt(e,t,n){const l=e.slice();return l[61]=t[n],l[63]=n,l}function Gt(e,t,n){const l=e.slice();return l[66]=t[n],l}function Kt(e,t,n){const l=e.slice();return l[66]=t[n],l}function Zt(e){let t;return{c(){t=k("Neu")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function Qt(e){return{c:s,m:s,p:s,d:s}}function Xt(e){let t,n,l,o,i=e[15]?.length&&function(e){let t,n,l,o,i=e[15],s=[];for(let t=0;t<i.length;t+=1)s[t]=Yt(Kt(e,i,t));return{c(){t=v("thead"),n=v("tr");for(let e=0;e<s.length;e+=1)s[e].c();l=x(),o=v("th"),C(o,"class","svelte-7zehy8"),C(n,"class","svelte-7zehy8"),C(t,"class","svelte-7zehy8")},m(e,i){p(e,t,i),$(t,n);for(let e=0;e<s.length;e+=1)s[e].m(n,null);$(n,l),$(n,o)},p(e,t){if(32768&t[0]){let o;for(i=e[15],o=0;o<i.length;o+=1){const c=Kt(e,i,o);s[o]?s[o].p(c,t):(s[o]=Yt(c),s[o].c(),s[o].m(n,l))}for(;o<s.length;o+=1)s[o].d(1);s.length=i.length}},d(e){e&&h(t),g(s,e)}}}(e),s=e[64]?.length&&en(e);return{c(){t=v("div"),n=v("table"),i&&i.c(),l=x(),o=v("tbody"),s&&s.c(),C(n,"striped",""),C(n,"class","svelte-7zehy8"),C(t,"class","eList svelte-7zehy8")},m(e,c){p(e,t,c),$(t,n),i&&i.m(n,null),$(n,l),$(n,o),s&&s.m(o,null)},p(e,t){e[15]?.length&&i.p(e,t),e[64]?.length?s?s.p(e,t):(s=en(e),s.c(),s.m(o,null)):s&&(s.d(1),s=null)},d(e){e&&h(t),i&&i.d(),s&&s.d()}}}function Yt(e){let t,n,l=e[66].text+"";return{c(){t=v("th"),n=k(l),C(t,"class","svelte-7zehy8")},m(e,l){p(e,t,l),$(t,n)},p:s,d(e){e&&h(t)}}}function en(e){let t,n=[],l=new Map,o=e[64];const i=e=>e[61].index||e[61]?._id;for(let t=0;t<o.length;t+=1){let s=Jt(e,o,t),c=i(s);l.set(c,n[t]=ln(c,s))}return{c(){for(let e=0;e<n.length;e+=1)n[e].c();t=b()},m(e,l){for(let t=0;t<n.length;t+=1)n[t].m(e,l);p(e,t,l)},p(e,s){426240&s[0]&&(o=e[64],n=ie(n,s,i,1,e,o,l,t.parentNode,le,ln,t,Jt))},d(e){for(let t=0;t<n.length;t+=1)n[t].d(e);e&&h(t)}}}function tn(e){let t,n,l=e[18](e[61],e[66])+"";return{c(){t=v("td"),n=k(l),C(t,"class",m(e[66].type)+" svelte-7zehy8")},m(e,l){p(e,t,l),$(t,n)},p(e,t){256&t[0]&&l!==(l=e[18](e[61],e[66])+"")&&N(n,l)},d(e){e&&h(t)}}}function nn(e){let t;return{c(){t=v("button"),t.textContent="Löschen"},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function ln(e,t){let n,l,o,i,s,c,r=t[15],a=[];for(let e=0;e<r.length;e+=1)a[e]=tn(Gt(t,r,e));let d=!t[61].productionOnly&&nn();return{key:e,first:null,c(){n=v("tr");for(let e=0;e<a.length;e+=1)a[e].c();l=x(),o=v("td"),d&&d.c(),i=x(),C(o,"class","svelte-7zehy8"),C(n,"class","pointer svelte-7zehy8"),this.first=n},m(e,r){p(e,n,r);for(let e=0;e<a.length;e+=1)a[e].m(n,null);$(n,l),$(n,o),d&&d.m(o,null),$(n,i),s||(c=w(n,"click",z(function(){u(t[17](t[61],t[63]))&&t[17](t[61],t[63]).apply(this,arguments)})),s=!0)},p(e,i){if(t=e,295168&i[0]){let e;for(r=t[15],e=0;e<r.length;e+=1){const o=Gt(t,r,e);a[e]?a[e].p(o,i):(a[e]=tn(o),a[e].c(),a[e].m(n,l))}for(;e<a.length;e+=1)a[e].d(1);a.length=r.length}t[61].productionOnly?d&&(d.d(1),d=null):d||(d=nn(),d.c(),d.m(o,null))},d(e){e&&h(n),g(a,e),d&&d.d(),s=!1,c()}}}function on(e){return{c:s,m:s,p:s,d:s}}function sn(e){let t;return{c(){t=k("Neu")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function cn(e){return{c:s,m:s,p:s,d:s}}function rn(e){let t,n,l,o,i=e[16]?.length&&function(e){let t,n,l,o,i=e[16],s=[];for(let t=0;t<i.length;t+=1)s[t]=an(Ht(e,i,t));return{c(){t=v("thead"),n=v("tr");for(let e=0;e<s.length;e+=1)s[e].c();l=x(),o=v("th"),C(o,"class","svelte-7zehy8"),C(n,"class","svelte-7zehy8"),C(t,"class","svelte-7zehy8")},m(e,i){p(e,t,i),$(t,n);for(let e=0;e<s.length;e+=1)s[e].m(n,null);$(n,l),$(n,o)},p(e,t){if(65536&t[0]){let o;for(i=e[16],o=0;o<i.length;o+=1){const c=Ht(e,i,o);s[o]?s[o].p(c,t):(s[o]=an(c),s[o].c(),s[o].m(n,l))}for(;o<s.length;o+=1)s[o].d(1);s.length=i.length}},d(e){e&&h(t),g(s,e)}}}(e),s=e[64]?.length&&un(e);return{c(){t=v("div"),n=v("table"),i&&i.c(),l=x(),o=v("tbody"),s&&s.c(),C(n,"striped",""),C(n,"class","svelte-7zehy8"),C(t,"class","eList svelte-7zehy8")},m(e,c){p(e,t,c),$(t,n),i&&i.m(n,null),$(n,l),$(n,o),s&&s.m(o,null)},p(e,t){e[16]?.length&&i.p(e,t),e[64]?.length?s?s.p(e,t):(s=un(e),s.c(),s.m(o,null)):s&&(s.d(1),s=null)},d(e){e&&h(t),i&&i.d(),s&&s.d()}}}function an(e){let t,n,l=e[66].text+"";return{c(){t=v("th"),n=k(l),C(t,"class","svelte-7zehy8")},m(e,l){p(e,t,l),$(t,n)},p:s,d(e){e&&h(t)}}}function un(e){let t,n=[],l=new Map,o=e[64];const i=e=>e[61].index||e[61]?._id;for(let t=0;t<o.length;t+=1){let s=Vt(e,o,t),c=i(s);l.set(c,n[t]=fn(c,s))}return{c(){for(let e=0;e<n.length;e+=1)n[e].c();t=b()},m(e,l){for(let t=0;t<n.length;t+=1)n[t].m(e,l);p(e,t,l)},p(e,s){33882624&s[0]&&(o=e[64],n=ie(n,s,i,1,e,o,l,t.parentNode,le,fn,t,Vt))},d(e){for(let t=0;t<n.length;t+=1)n[t].d(e);e&&h(t)}}}function dn(e){let t,n,l=e[18](e[61],e[66])+"";return{c(){t=v("td"),n=k(l),C(t,"class",m(e[66].type)+" svelte-7zehy8")},m(e,l){p(e,t,l),$(t,n)},p(e,t){512&t[0]&&l!==(l=e[18](e[61],e[66])+"")&&N(n,l)},d(e){e&&h(t)}}}function fn(e,t){let n,l,o,i,s,c,r=t[16],a=[];for(let e=0;e<r.length;e+=1)a[e]=dn(Ut(t,r,e));return{key:e,first:null,c(){n=v("tr");for(let e=0;e<a.length;e+=1)a[e].c();l=x(),o=v("td"),o.innerHTML="<button>Löschen</button>",i=x(),C(o,"class","svelte-7zehy8"),C(n,"class","pointer svelte-7zehy8"),this.first=n},m(e,r){p(e,n,r);for(let e=0;e<a.length;e+=1)a[e].m(n,null);$(n,l),$(n,o),$(n,i),s||(c=w(n,"click",z(function(){u(t[25](t[61],t[63]))&&t[25](t[61],t[63]).apply(this,arguments)})),s=!0)},p(e,o){if(t=e,328192&o[0]){let e;for(r=t[16],e=0;e<r.length;e+=1){const i=Ut(t,r,e);a[e]?a[e].p(i,o):(a[e]=dn(i),a[e].c(),a[e].m(n,l))}for(;e<a.length;e+=1)a[e].d(1);a.length=r.length}},d(e){e&&h(n),g(a,e),s=!1,c()}}}function mn(e){return{c:s,m:s,p:s,d:s}}function $n(e){let t;return{c(){t=k("Abbrechen")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function pn(e){let t;return{c(){t=k("Speichern")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function hn(e){let t,n,l,o,i,s,c,r,u,d,f,m,g,y,k,b,z,N,L,_,S,A,M,T,j,E,D,O,I,q,W,P,F,V,U,H,J,G,K,Z,Q,ee,te,ne,le,oe,ie,ue,de,fe,me,$e,pe,he,ge,ve,ye,ke;function xe(t){e[33](t)}let be={required:!0,disabled:!!e[1]._id};function we(t){e[34](t)}void 0!==e[1].name&&(be.value=e[1].name),s=new e[13]({props:be}),B.push(()=>se(s,"value",xe));let ze={};function Ce(t){e[35](t)}void 0!==e[1].slogan&&(ze.value=e[1].slogan),g=new e[13]({props:ze}),B.push(()=>se(g,"value",we));let Ne={};function Le(t){e[36](t)}void 0!==e[1].url&&(Ne.value=e[1].url),_=new e[13]({props:Ne}),B.push(()=>se(_,"value",Ce));let _e={};function Se(t){e[37](t)}void 0!==e[1].favicon&&(_e.value=e[1].favicon),D=new e[13]({props:_e}),B.push(()=>se(D,"value",Le));let Ae={};return void 0!==e[1].admin&&(Ae.value=e[1].admin),V=new e[13]({props:Ae}),B.push(()=>se(V,"value",Se)),pe=new e[12]({props:{outline:!0,$$slots:{default:[$n]},$$scope:{ctx:e}}}),pe.$on("click",e[19]),ge=new e[12]({props:{filled:!0,$$slots:{default:[pn]},$$scope:{ctx:e}}}),ge.$on("click",e[20]),{c(){t=v("form"),n=v("div"),l=v("div"),l.textContent="Name",o=x(),i=v("div"),ce(s.$$.fragment),r=x(),u=v("div"),d=v("div"),d.textContent="Slogan",f=x(),m=v("div"),ce(g.$$.fragment),k=x(),b=v("div"),z=v("div"),z.textContent="URL",N=x(),L=v("div"),ce(_.$$.fragment),A=x(),M=v("div"),T=v("div"),T.textContent="FavIcon",j=x(),E=v("div"),ce(D.$$.fragment),I=x(),q=v("div"),W=v("div"),W.textContent="Admins",P=x(),F=v("div"),ce(V.$$.fragment),H=x(),J=v("div"),G=v("input"),K=x(),Z=v("label"),Z.textContent="In Produktion",Q=x(),ee=v("div"),te=v("input"),ne=x(),le=v("label"),le.textContent="Ticket-Admin",oe=x(),ie=v("div"),ue=v("input"),de=x(),fe=v("label"),fe.textContent="Snaphot erlaubt",me=x(),$e=v("div"),ce(pe.$$.fragment),he=x(),ce(ge.$$.fragment),C(l,"class","form-field--label"),C(i,"class","form-field--content"),C(n,"class","form-field"),C(d,"class","form-field--label"),C(m,"class","form-field--content"),C(u,"class","form-field"),C(z,"class","form-field--label"),C(L,"class","form-field--content"),C(b,"class","form-field"),C(T,"class","form-field--label"),C(E,"class","form-field--content"),C(M,"class","form-field"),C(W,"class","form-field--label"),C(F,"class","form-field--content"),C(q,"class","form-field"),C(G,"type","checkbox"),C(G,"id","productionOnly"),C(G,"name","productionOnly"),C(Z,"for","productionOnly"),C(J,"class","checkbox"),C(te,"type","checkbox"),C(te,"id","ticketAdmin"),C(te,"name","ticketAdmin"),C(le,"for","productionOnly"),C(ee,"class","checkbox"),C(ue,"type","checkbox"),C(ue,"id","allowSnapshot"),C(ue,"name","allowSnapshot"),C(fe,"for","allowSnapshot"),C(ie,"class","checkbox"),C(t,"class","form-setting"),C($e,"class","btns-container svelte-7zehy8")},m(c,a){p(c,t,a),$(t,n),$(n,l),$(n,o),$(n,i),re(s,i,null),$(t,r),$(t,u),$(u,d),$(u,f),$(u,m),re(g,m,null),$(t,k),$(t,b),$(b,z),$(b,N),$(b,L),re(_,L,null),$(t,A),$(t,M),$(M,T),$(M,j),$(M,E),re(D,E,null),$(t,I),$(t,q),$(q,W),$(q,P),$(q,F),re(V,F,null),$(t,H),$(t,J),$(J,G),G.checked=e[1].productionOnly,$(J,K),$(J,Z),$(t,Q),$(t,ee),$(ee,te),te.checked=e[1].ticketAdmin,$(ee,ne),$(ee,le),$(t,oe),$(t,ie),$(ie,ue),ue.checked=e[1].allowSnapshot,$(ie,de),$(ie,fe),p(c,me,a),p(c,$e,a),re(pe,$e,null),$($e,he),re(ge,$e,null),ve=!0,ye||(ke=[w(G,"change",e[38]),w(te,"change",e[39]),w(ue,"change",e[40])],ye=!0)},p(e,t){const n={};2&t[0]&&(n.disabled=!!e[1]._id),!c&&2&t[0]&&(c=!0,n.value=e[1].name,R(()=>c=!1)),s.$set(n);const l={};!y&&2&t[0]&&(y=!0,l.value=e[1].slogan,R(()=>y=!1)),g.$set(l);const o={};!S&&2&t[0]&&(S=!0,o.value=e[1].url,R(()=>S=!1)),_.$set(o);const i={};!O&&2&t[0]&&(O=!0,i.value=e[1].favicon,R(()=>O=!1)),D.$set(i);const r={};!U&&2&t[0]&&(U=!0,r.value=e[1].admin,R(()=>U=!1)),V.$set(r),2&t[0]&&(G.checked=e[1].productionOnly),2&t[0]&&(te.checked=e[1].ticketAdmin),2&t[0]&&(ue.checked=e[1].allowSnapshot);const a={};16384&t[2]&&(a.$$scope={dirty:t,ctx:e}),pe.$set(a);const u={};16384&t[2]&&(u.$$scope={dirty:t,ctx:e}),ge.$set(u)},i(e){ve||(X(s.$$.fragment,e),X(g.$$.fragment,e),X(_.$$.fragment,e),X(D.$$.fragment,e),X(V.$$.fragment,e),X(pe.$$.fragment,e),X(ge.$$.fragment,e),ve=!0)},o(e){Y(s.$$.fragment,e),Y(g.$$.fragment,e),Y(_.$$.fragment,e),Y(D.$$.fragment,e),Y(V.$$.fragment,e),Y(pe.$$.fragment,e),Y(ge.$$.fragment,e),ve=!1},d(e){e&&h(t),ae(s),ae(g),ae(_),ae(D),ae(V),e&&h(me),e&&h($e),ae(pe),ae(ge),ye=!1,a(ke)}}}function gn(e){let t,n;return t=new e[11]({props:{class:"adminDialog",title:"Mandant",closeCallback:e[59],$$slots:{default:[hn]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,l){re(t,e,l),n=!0},p(e,n){const l={};268435456&n[1]&&(l.closeCallback=e[59]),2&n[0]|16384&n[2]&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){n||(X(t.$$.fragment,e),n=!0)},o(e){Y(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function vn(e){let t,n;return t=new e[12]({props:{$$slots:{default:[yn]},$$scope:{ctx:e}}}),t.$on("click",function(){u(e[26](e[3]))&&e[26](e[3]).apply(this,arguments)}),{c(){ce(t.$$.fragment)},m(e,l){re(t,e,l),n=!0},p(n,l){e=n;const o={};16384&l[2]&&(o.$$scope={dirty:l,ctx:e}),t.$set(o)},i(e){n||(X(t.$$.fragment,e),n=!0)},o(e){Y(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function yn(e){let t;return{c(){t=k("Edit")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function kn(e){let t,n;return t=new e[12]({props:{$$slots:{default:[xn]},$$scope:{ctx:e}}}),t.$on("click",function(){u(e[29](e[3]))&&e[29](e[3]).apply(this,arguments)}),{c(){ce(t.$$.fragment)},m(e,l){re(t,e,l),n=!0},p(n,l){e=n;const o={};16384&l[2]&&(o.$$scope={dirty:l,ctx:e}),t.$set(o)},i(e){n||(X(t.$$.fragment,e),n=!0)},o(e){Y(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function xn(e){let t;return{c(){t=k("Edit")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function bn(e){let t;return{c(){t=k("Abbrechen")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function wn(e){let t;return{c(){t=k("Speichern")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function zn(e){let t,n,l,o,i,s,c,r,u,d,f,m,g,y,k,b,z,N,L,_,S,A,M,T,j,E,D,O,I,q,W,P,F,V,U,H,J,G,K,ee,te,ne,le,oe,ie,ue,de,fe,me,$e,pe,he;function ge(t){e[42](t)}let ve={disabled:!!e[3]._id,required:!0};function ye(t){e[43](t)}void 0!==e[3].identifikation&&(ve.value=e[3].identifikation),s=new e[13]({props:ve}),B.push(()=>se(s,"value",ge));let ke={};function xe(t){e[44](t)}void 0!==e[3].firstName&&(ke.value=e[3].firstName),g=new e[13]({props:ke}),B.push(()=>se(g,"value",ye));let be={};void 0!==e[3].lastName&&(be.value=e[3].lastName),_=new e[13]({props:be}),B.push(()=>se(_,"value",xe));let we=e[3]._id&&vn(e);function ze(t){e[45](t)}let Ce={disabled:!0};void 0!==e[3].auth2&&(Ce.value=e[3].auth2),O=new e[13]({props:Ce}),B.push(()=>se(O,"value",ze));let Ne=e[3]._id&&kn(e);return de=new e[12]({props:{outline:!0,$$slots:{default:[bn]},$$scope:{ctx:e}}}),de.$on("click",e[23]),me=new e[12]({props:{filled:!0,$$slots:{default:[wn]},$$scope:{ctx:e}}}),me.$on("click",e[24]),{c(){t=v("form"),n=v("div"),l=v("div"),l.textContent="Identifikation",o=x(),i=v("div"),ce(s.$$.fragment),r=x(),u=v("div"),d=v("div"),d.textContent="Vorname",f=x(),m=v("div"),ce(g.$$.fragment),k=x(),b=v("div"),z=v("div"),z.textContent="Nachname",N=x(),L=v("div"),ce(_.$$.fragment),A=x(),M=v("div"),T=v("div"),T.textContent="Authorisierung",j=x(),E=v("div"),we&&we.c(),D=x(),ce(O.$$.fragment),q=x(),W=v("div"),P=v("div"),P.textContent="Mandanten",F=x(),V=v("div"),Ne&&Ne.c(),U=x(),H=v("div"),J=v("input"),G=x(),K=v("label"),K.textContent="Admin",ee=x(),te=v("div"),ne=v("input"),le=x(),oe=v("label"),oe.textContent="SaaS-Admin",ie=x(),ue=v("div"),ce(de.$$.fragment),fe=x(),ce(me.$$.fragment),C(l,"class","form-field--label"),C(i,"class","form-field--content"),C(n,"class","form-field"),C(d,"class","form-field--label"),C(m,"class","form-field--content"),C(u,"class","form-field"),C(z,"class","form-field--label"),C(L,"class","form-field--content"),C(b,"class","form-field"),C(T,"class","form-field--label"),C(E,"class","form-field--content"),C(M,"class","form-field"),C(P,"class","form-field--label"),C(V,"class","form-field--content"),C(W,"class","form-field"),C(J,"type","checkbox"),C(J,"id","isAdmin"),C(J,"name","isAdmin"),C(K,"for","isAdmin"),C(H,"class","checkbox"),C(ne,"type","checkbox"),C(ne,"id","roleAdmin"),C(ne,"name","roleAdmin"),C(oe,"for","roleAdmin"),C(te,"class","checkbox"),C(t,"class","form-setting"),C(ue,"class","btns-container svelte-7zehy8")},m(c,a){p(c,t,a),$(t,n),$(n,l),$(n,o),$(n,i),re(s,i,null),$(t,r),$(t,u),$(u,d),$(u,f),$(u,m),re(g,m,null),$(t,k),$(t,b),$(b,z),$(b,N),$(b,L),re(_,L,null),$(t,A),$(t,M),$(M,T),$(M,j),$(M,E),we&&we.m(E,null),$(E,D),re(O,E,null),$(t,q),$(t,W),$(W,P),$(W,F),$(W,V),Ne&&Ne.m(V,null),$(t,U),$(t,H),$(H,J),J.checked=e[3].isAdmin,$(H,G),$(H,K),$(t,ee),$(t,te),$(te,ne),ne.checked=e[3].roleAdmin,$(te,le),$(te,oe),p(c,ie,a),p(c,ue,a),re(de,ue,null),$(ue,fe),re(me,ue,null),$e=!0,pe||(he=[w(J,"change",e[46]),w(ne,"change",e[47])],pe=!0)},p(e,t){const n={};8&t[0]&&(n.disabled=!!e[3]._id),!c&&8&t[0]&&(c=!0,n.value=e[3].identifikation,R(()=>c=!1)),s.$set(n);const l={};!y&&8&t[0]&&(y=!0,l.value=e[3].firstName,R(()=>y=!1)),g.$set(l);const o={};!S&&8&t[0]&&(S=!0,o.value=e[3].lastName,R(()=>S=!1)),_.$set(o),e[3]._id?we?(we.p(e,t),8&t[0]&&X(we,1)):(we=vn(e),we.c(),X(we,1),we.m(E,D)):we&&(Z(),Y(we,1,1,()=>{we=null}),Q());const i={};!I&&8&t[0]&&(I=!0,i.value=e[3].auth2,R(()=>I=!1)),O.$set(i),e[3]._id?Ne?(Ne.p(e,t),8&t[0]&&X(Ne,1)):(Ne=kn(e),Ne.c(),X(Ne,1),Ne.m(V,null)):Ne&&(Z(),Y(Ne,1,1,()=>{Ne=null}),Q()),8&t[0]&&(J.checked=e[3].isAdmin),8&t[0]&&(ne.checked=e[3].roleAdmin);const r={};16384&t[2]&&(r.$$scope={dirty:t,ctx:e}),de.$set(r);const a={};16384&t[2]&&(a.$$scope={dirty:t,ctx:e}),me.$set(a)},i(e){$e||(X(s.$$.fragment,e),X(g.$$.fragment,e),X(_.$$.fragment,e),X(we),X(O.$$.fragment,e),X(Ne),X(de.$$.fragment,e),X(me.$$.fragment,e),$e=!0)},o(e){Y(s.$$.fragment,e),Y(g.$$.fragment,e),Y(_.$$.fragment,e),Y(we),Y(O.$$.fragment,e),Y(Ne),Y(de.$$.fragment,e),Y(me.$$.fragment,e),$e=!1},d(e){e&&h(t),ae(s),ae(g),ae(_),we&&we.d(),ae(O),Ne&&Ne.d(),e&&h(ie),e&&h(ue),ae(de),ae(me),pe=!1,a(he)}}}function Cn(e){let t,n;return t=new e[11]({props:{class:"adminDialog",title:"Benutzer",closeCallback:e[59],$$slots:{default:[zn]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,l){re(t,e,l),n=!0},p(e,n){const l={};268435456&n[1]&&(l.closeCallback=e[59]),8&n[0]|16384&n[2]&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){n||(X(t.$$.fragment,e),n=!0)},o(e){Y(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function Nn(e){let t;return{c(){t=k("Abbrechen")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function Ln(e){let t;return{c(){t=k("Speichern")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function _n(e){let t,n,l,o,i,s,c,r,a,u,d,f,m,g,y,k,b,w,z,N;function L(t){e[49](t)}let _={};function S(t){e[50](t)}void 0!==e[5].tenant&&(_.value=e[5].tenant),s=new e[13]({props:_}),B.push(()=>se(s,"value",L));let A={};return void 0!==e[5].role2&&(A.value=e[5].role2),m=new e[13]({props:A}),B.push(()=>se(m,"value",S)),b=new e[12]({props:{outline:!0,$$slots:{default:[Nn]},$$scope:{ctx:e}}}),b.$on("click",e[27]),z=new e[12]({props:{filled:!0,$$slots:{default:[Ln]},$$scope:{ctx:e}}}),z.$on("click",e[28]),{c(){t=v("form"),n=v("div"),l=v("div"),l.textContent="Mandant",o=x(),i=v("div"),ce(s.$$.fragment),r=x(),a=v("div"),u=v("div"),u.textContent="Rollen",d=x(),f=v("div"),ce(m.$$.fragment),y=x(),k=v("div"),ce(b.$$.fragment),w=x(),ce(z.$$.fragment),C(l,"class","form-field--label"),C(i,"class","form-field--content"),C(n,"class","form-field"),C(u,"class","form-field--label"),C(f,"class","form-field--content"),C(a,"class","form-field"),C(t,"class","form-setting"),C(k,"class","btns-container svelte-7zehy8")},m(e,c){p(e,t,c),$(t,n),$(n,l),$(n,o),$(n,i),re(s,i,null),$(t,r),$(t,a),$(a,u),$(a,d),$(a,f),re(m,f,null),p(e,y,c),p(e,k,c),re(b,k,null),$(k,w),re(z,k,null),N=!0},p(e,t){const n={};!c&&32&t[0]&&(c=!0,n.value=e[5].tenant,R(()=>c=!1)),s.$set(n);const l={};!g&&32&t[0]&&(g=!0,l.value=e[5].role2,R(()=>g=!1)),m.$set(l);const o={};16384&t[2]&&(o.$$scope={dirty:t,ctx:e}),b.$set(o);const i={};16384&t[2]&&(i.$$scope={dirty:t,ctx:e}),z.$set(i)},i(e){N||(X(s.$$.fragment,e),X(m.$$.fragment,e),X(b.$$.fragment,e),X(z.$$.fragment,e),N=!0)},o(e){Y(s.$$.fragment,e),Y(m.$$.fragment,e),Y(b.$$.fragment,e),Y(z.$$.fragment,e),N=!1},d(e){e&&h(t),ae(s),ae(m),e&&h(y),e&&h(k),ae(b),ae(z)}}}function Sn(e){let t,n;return t=new e[11]({props:{class:"adminDialog",title:"Authorisierung",closeCallback:e[59],$$slots:{default:[_n]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,l){re(t,e,l),n=!0},p(e,n){const l={};268435456&n[1]&&(l.closeCallback=e[59]),32&n[0]|16384&n[2]&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){n||(X(t.$$.fragment,e),n=!0)},o(e){Y(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function An(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function Mn(e){let t,n,l=[],o=new Map,i=e[60];const s=e=>e[61].index||e[61]?._id;for(let t=0;t<i.length;t+=1){let n=Rt(e,i,t),c=s(n);o.set(c,l[t]=Tn(c,n))}return{c(){for(let e=0;e<l.length;e+=1)l[e].c();t=b()},m(e,o){for(let t=0;t<l.length;t+=1)l[t].m(e,o);p(e,t,o),n=!0},p(e,n){384&n[0]&&(i=e[60],Z(),l=ie(l,n,s,1,e,i,o,t.parentNode,oe,Tn,t,Rt),Q())},i(e){if(!n){for(let e=0;e<i.length;e+=1)X(l[e]);n=!0}},o(e){for(let e=0;e<l.length;e+=1)Y(l[e]);n=!1},d(e){for(let t=0;t<l.length;t+=1)l[t].d(e);e&&h(t)}}}function Tn(e,t){let n,l,o,i,s,c,r,a,u=t[61].name+"";function d(...e){return t[53](t[61],...e)}return o=new t[14]({props:{round:!0,id:t[61]._id,checked:!!t[7].tenant?.find(d)}}),{key:e,first:null,c(){n=v("tr"),l=v("td"),ce(o.$$.fragment),i=x(),s=v("td"),c=k(u),r=x(),C(l,"class","svelte-7zehy8"),C(s,"class","svelte-7zehy8"),C(n,"class","svelte-7zehy8"),this.first=n},m(e,t){p(e,n,t),$(n,l),re(o,l,null),$(n,i),$(n,s),$(s,c),$(n,r),a=!0},p(e,n){t=e;const l={};256&n[0]&&(l.id=t[61]._id),384&n[0]&&(l.checked=!!t[7].tenant?.find(d)),o.$set(l),(!a||256&n[0])&&u!==(u=t[61].name+"")&&N(c,u)},i(e){a||(X(o.$$.fragment,e),a=!0)},o(e){Y(o.$$.fragment,e),a=!1},d(e){e&&h(n),ae(o)}}}function jn(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function En(e){let t;return{c(){t=k("Abbrechen")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function Dn(e){let t;return{c(){t=k("Speichern")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function Bn(e){let t,n,l,o,i,s,c,r,a,u,d,f,m,g,y,k,b,w,z,N;function L(t){e[52](t)}let _={disabled:!0};void 0!==e[7].user_identifikation&&(_.value=e[7].user_identifikation),s=new e[13]({props:_}),B.push(()=>se(s,"value",L));let S={ctx:e,current:null,token:null,hasCatch:!1,pending:jn,then:Mn,catch:An,value:60,blocks:[,,,]};return ee(g=e[8],S),b=new e[12]({props:{outline:!0,$$slots:{default:[En]},$$scope:{ctx:e}}}),b.$on("click",e[30]),z=new e[12]({props:{type:"submit",filled:!0,$$slots:{default:[Dn]},$$scope:{ctx:e}}}),z.$on("click",e[31]),{c(){t=v("form"),n=v("div"),l=v("div"),l.textContent="Identifikation",o=x(),i=v("div"),ce(s.$$.fragment),r=x(),a=v("div"),u=v("table"),d=v("thead"),d.innerHTML='<tr class="svelte-7zehy8"><th class="svelte-7zehy8"></th> \n <th class="svelte-7zehy8">Mandant</th></tr>',f=x(),m=v("tbody"),S.block.c(),y=x(),k=v("div"),ce(b.$$.fragment),w=x(),ce(z.$$.fragment),C(l,"class","form-field--label"),C(i,"class","form-field--content"),C(n,"class","form-field"),C(d,"class","svelte-7zehy8"),C(u,"striped",""),C(u,"class","svelte-7zehy8"),C(a,"class","eList2 svelte-7zehy8"),C(t,"class","form-setting"),C(t,"id","formUserAuth"),C(k,"class","btns-container svelte-7zehy8")},m(e,c){p(e,t,c),$(t,n),$(n,l),$(n,o),$(n,i),re(s,i,null),$(t,r),$(t,a),$(a,u),$(u,d),$(u,f),$(u,m),S.block.m(m,S.anchor=null),S.mount=()=>m,S.anchor=null,p(e,y,c),p(e,k,c),re(b,k,null),$(k,w),re(z,k,null),N=!0},p(t,n){e=t;const l={};!c&&128&n[0]&&(c=!0,l.value=e[7].user_identifikation,R(()=>c=!1)),s.$set(l),S.ctx=e,256&n[0]&&g!==(g=e[8])&&ee(g,S)||te(S,e,n);const o={};16384&n[2]&&(o.$$scope={dirty:n,ctx:e}),b.$set(o);const i={};16384&n[2]&&(i.$$scope={dirty:n,ctx:e}),z.$set(i)},i(e){N||(X(s.$$.fragment,e),X(S.block),X(b.$$.fragment,e),X(z.$$.fragment,e),N=!0)},o(e){Y(s.$$.fragment,e);for(let e=0;e<3;e+=1){Y(S.blocks[e])}Y(b.$$.fragment,e),Y(z.$$.fragment,e),N=!1},d(e){e&&h(t),ae(s),S.block.d(),S.token=null,S=null,e&&h(y),e&&h(k),ae(b),ae(z)}}}function On(e){let t,n;return t=new e[11]({props:{class:"adminDialog",title:"Mandanten",closeCallback:e[59],$$slots:{default:[Bn]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,l){re(t,e,l),n=!0},p(e,n){const l={};268435456&n[1]&&(l.closeCallback=e[59]),384&n[0]|16384&n[2]&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){n||(X(t.$$.fragment,e),n=!0)},o(e){Y(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function In(e){let t,n,l,o,i,s,c,r,a,u,d,f,m,$,g,y,k,b,w,z,C,N,L,_;l=new e[12]({props:{filled:!0,$$slots:{default:[Zt]},$$scope:{ctx:e}}}),l.$on("click",e[21]);let S={ctx:e,current:null,token:null,hasCatch:!1,pending:on,then:Xt,catch:Qt,value:64};ee(i=e[8],S),a=new e[12]({props:{filled:!0,$$slots:{default:[sn]},$$scope:{ctx:e}}}),a.$on("click",e[22]);let A={ctx:e,current:null,token:null,hasCatch:!1,pending:mn,then:rn,catch:cn,value:64};function M(t){e[41](t)}ee(d=e[9],A);let T={noClickaway:!0,$$slots:{default:[gn,({closeCallback:e})=>({59:e}),({closeCallback:e})=>[0,e?268435456:0]]},$$scope:{ctx:e}};function j(t){e[48](t)}void 0!==e[0]&&(T.open=e[0]),m=new e[10]({props:T}),B.push(()=>se(m,"open",M));let E={noClickaway:!0,$$slots:{default:[Cn,({closeCallback:e})=>({59:e}),({closeCallback:e})=>[0,e?268435456:0]]},$$scope:{ctx:e}};function D(t){e[51](t)}void 0!==e[2]&&(E.open=e[2]),y=new e[10]({props:E}),B.push(()=>se(y,"open",j));let O={noClickaway:!0,$$slots:{default:[Sn,({closeCallback:e})=>({59:e}),({closeCallback:e})=>[0,e?268435456:0]]},$$scope:{ctx:e}};function I(t){e[54](t)}void 0!==e[4]&&(O.open=e[4]),w=new e[10]({props:O}),B.push(()=>se(w,"open",D));let q={noClickaway:!0,$$slots:{default:[On,({closeCallback:e})=>({59:e}),({closeCallback:e})=>[0,e?268435456:0]]},$$scope:{ctx:e}};return void 0!==e[6]&&(q.open=e[6]),N=new e[10]({props:q}),B.push(()=>se(N,"open",I)),{c(){t=v("h2"),t.textContent="Mandanten",n=x(),ce(l.$$.fragment),o=x(),S.block.c(),s=x(),c=v("h2"),c.textContent="Benutzer",r=x(),ce(a.$$.fragment),u=x(),A.block.c(),f=x(),ce(m.$$.fragment),g=x(),ce(y.$$.fragment),b=x(),ce(w.$$.fragment),C=x(),ce(N.$$.fragment)},m(e,i){p(e,t,i),p(e,n,i),re(l,e,i),p(e,o,i),S.block.m(e,S.anchor=i),S.mount=()=>s.parentNode,S.anchor=s,p(e,s,i),p(e,c,i),p(e,r,i),re(a,e,i),p(e,u,i),A.block.m(e,A.anchor=i),A.mount=()=>f.parentNode,A.anchor=f,p(e,f,i),re(m,e,i),p(e,g,i),re(y,e,i),p(e,b,i),re(w,e,i),p(e,C,i),re(N,e,i),_=!0},p(t,n){e=t;const o={};16384&n[2]&&(o.$$scope={dirty:n,ctx:e}),l.$set(o),S.ctx=e,256&n[0]&&i!==(i=e[8])&&ee(i,S)||te(S,e,n);const s={};16384&n[2]&&(s.$$scope={dirty:n,ctx:e}),a.$set(s),A.ctx=e,512&n[0]&&d!==(d=e[9])&&ee(d,A)||te(A,e,n);const c={};2&n[0]|268435456&n[1]|16384&n[2]&&(c.$$scope={dirty:n,ctx:e}),!$&&1&n[0]&&($=!0,c.open=e[0],R(()=>$=!1)),m.$set(c);const r={};8&n[0]|268435456&n[1]|16384&n[2]&&(r.$$scope={dirty:n,ctx:e}),!k&&4&n[0]&&(k=!0,r.open=e[2],R(()=>k=!1)),y.$set(r);const u={};32&n[0]|268435456&n[1]|16384&n[2]&&(u.$$scope={dirty:n,ctx:e}),!z&&16&n[0]&&(z=!0,u.open=e[4],R(()=>z=!1)),w.$set(u);const f={};384&n[0]|268435456&n[1]|16384&n[2]&&(f.$$scope={dirty:n,ctx:e}),!L&&64&n[0]&&(L=!0,f.open=e[6],R(()=>L=!1)),N.$set(f)},i(e){_||(X(l.$$.fragment,e),X(a.$$.fragment,e),X(m.$$.fragment,e),X(y.$$.fragment,e),X(w.$$.fragment,e),X(N.$$.fragment,e),_=!0)},o(e){Y(l.$$.fragment,e),Y(a.$$.fragment,e),Y(m.$$.fragment,e),Y(y.$$.fragment,e),Y(w.$$.fragment,e),Y(N.$$.fragment,e),_=!1},d(e){e&&h(t),e&&h(n),ae(l,e),e&&h(o),S.block.d(e),S.token=null,S=null,e&&h(s),e&&h(c),e&&h(r),ae(a,e),e&&h(u),A.block.d(e),A.token=null,A=null,e&&h(f),ae(m,e),e&&h(g),ae(y,e),e&&h(b),ae(w,e),e&&h(C),ae(N,e)}}}function qn(e,l,o){const{Modal:i,Dialog:s,Button:c,TextField:r,FormField:a,Table:u,Checkbox:d}=t;let{settings:f}=l,m=!1,$={},p=!1,h={},g=!1,v={},y=!1,k={};let x=n.getTenants().then(e=>e.map(e=>(e.admin?.length&&(e.admin=w(e.admin)),e))),b=n.getUsers().then(e=>e.map(e=>(e.auth?.length&&(e.auth2=z(e.auth)),e)));const w=e=>e?.length?e.join(", "):"",z=e=>e?.length?e.map(e=>e.tenant).join(", "):"";return e.$$set=e=>{"settings"in e&&o(32,f=e.settings)},[m,$,p,h,g,v,y,k,x,b,i,s,c,r,d,[{type:"text",text:"Nummer",name:"_id"},{type:"text",text:"Name",name:"name"},{type:"boolean",text:"in Produktion",name:"productionOnly"}],[{type:"text",text:"Identifikation",name:"identifikation"},{type:"text",text:"Vorname",name:"firstName"},{type:"text",text:"Nachname",name:"lastName"}],(e,t)=>()=>{o(1,$=e),o(0,m=!0)},(e,t)=>{if(!t)return;let n=e[t.name]||"";return"number"===t.type&&(n||(n=e[`_${t.name}`]),n=Number(n)?Number(n).toLocaleString(lang,{minimumFractionDigits:t.properties?.decimals||t.decimals||0,maximumFractionDigits:t.properties?.decimals||t.decimals||0}):""),"boolean"===t.type&&(n=!!n),n},()=>{o(0,m=!1)},async()=>{if(void 0!==$.admin){const e=$.admin.split(",").map(e=>e.replaceAll(" ",""));o(1,$.admin=e,$)}await n.saveTenant($),o(0,m=!1),o(8,x=n.getTenants())},async()=>{o(1,$={}),o(0,m=!0)},async()=>{o(3,h={}),o(2,p=!0)},()=>{o(2,p=!1)},async()=>{await n.saveUser(h),o(2,p=!1),o(9,b=n.getUsers())},(e,t)=>()=>{o(3,h=e),o(2,p=!0)},()=>{h._id&&(h.auth?.length||o(3,h.auth=[],h),o(5,v=h.auth[0]||{}),o(5,v.role2=v?.role?.join(", ")||"",v),o(4,g=!0))},()=>{o(4,g=!1)},async()=>{let e={_id:h._id,auth:[]};if(v.tenant&&v.role2?.length){const t=v.role2.split(",").map(e=>e.replaceAll(" ",""));o(5,v.role=t,v),delete v.role2,e.auth=[v],await n.saveUser(e),o(3,h.auth=e.auth,h),o(3,h.auth2=z(e.auth),h)}else await n.saveUser(e),o(3,h.auth=e.auth,h),o(3,h.auth2="",h);o(9,b=n.getUsers()),o(4,g=!1)},async()=>{h._id&&(o(7,k=await n.getUserAuth(h.identifikation)),k||o(7,k={user_identifikation:h.identifikation,tenant:[]}),o(6,y=!0))},()=>{o(6,y=!1)},async e=>{const t=Array.from(document.querySelectorAll("#formUserAuth input")).filter(e=>e.checked);o(7,k.tenant=t.map(e=>e.id),k),await n.saveUserAuth(k),o(6,y=!1)},f,function(t){e.$$.not_equal($.name,t)&&($.name=t,o(1,$))},function(t){e.$$.not_equal($.slogan,t)&&($.slogan=t,o(1,$))},function(t){e.$$.not_equal($.url,t)&&($.url=t,o(1,$))},function(t){e.$$.not_equal($.favicon,t)&&($.favicon=t,o(1,$))},function(t){e.$$.not_equal($.admin,t)&&($.admin=t,o(1,$))},function(){$.productionOnly=this.checked,o(1,$)},function(){$.ticketAdmin=this.checked,o(1,$)},function(){$.allowSnapshot=this.checked,o(1,$)},function(e){m=e,o(0,m)},function(t){e.$$.not_equal(h.identifikation,t)&&(h.identifikation=t,o(3,h))},function(t){e.$$.not_equal(h.firstName,t)&&(h.firstName=t,o(3,h))},function(t){e.$$.not_equal(h.lastName,t)&&(h.lastName=t,o(3,h))},function(t){e.$$.not_equal(h.auth2,t)&&(h.auth2=t,o(3,h))},function(){h.isAdmin=this.checked,o(3,h)},function(){h.roleAdmin=this.checked,o(3,h)},function(e){p=e,o(2,p)},function(t){e.$$.not_equal(v.tenant,t)&&(v.tenant=t,o(5,v))},function(t){e.$$.not_equal(v.role2,t)&&(v.role2=t,o(5,v))},function(e){g=e,o(4,g)},function(t){e.$$.not_equal(k.user_identifikation,t)&&(k.user_identifikation=t,o(7,k))},(e,t)=>t===e._id,function(e){y=e,o(6,y)}]}class Wn extends de{constructor(e){var t;super(),Ft.getElementById("svelte-7zehy8-style")||((t=v("style")).id="svelte-7zehy8-style",t.textContent=".eList.svelte-7zehy8.svelte-7zehy8.svelte-7zehy8{margin-top:1.5em;height:fit-content;max-height:25vh;overflow-y:scroll;overflow-x:auto}.eList.svelte-7zehy8 table.svelte-7zehy8.svelte-7zehy8{min-width:35vw;position:relative;width:max-content !important;max-width:60vw !important;border:1px solid black}.eList.svelte-7zehy8 table.svelte-7zehy8 thead.svelte-7zehy8{position:sticky;top:0;background:#326173;color:white}.eList.svelte-7zehy8 table.svelte-7zehy8 thead tr.svelte-7zehy8{height:2.3em}.eList.svelte-7zehy8 table.svelte-7zehy8 tbody tr.svelte-7zehy8{height:2.75em !important}.eList.svelte-7zehy8 table.svelte-7zehy8 th.svelte-7zehy8,.eList.svelte-7zehy8 table.svelte-7zehy8 td.svelte-7zehy8{padding:0.5em !important}.eList2.svelte-7zehy8 tr.svelte-7zehy8.svelte-7zehy8{height:1.5em}.btn-back.svelte-7zehy8.svelte-7zehy8.svelte-7zehy8{cursor:pointer;margin-right:1em}.btns-container.svelte-7zehy8.svelte-7zehy8.svelte-7zehy8{display:flex;justify-content:space-between;margin-top:1em}.adminDialog{min-width:40em}",$(Ft.head,t)),ue(this,e,qn,In,d,{settings:32},[-1,-1,-1])}}function Pn(e){let t,n,l,o,i,s,c,r,u,d,f,m,g,y,k,b,z,N=e[0].isTicketAdmin&&Fn(e),L=e[0].roleAdmin&&Rn(e);var _=e[1];function A(e){return{props:{settings:e[2]}}}return _&&(y=new _(A(e)),y.$on("save",e[9])),{c(){t=v("section"),n=v("div"),l=v("div"),l.textContent="Mein Konto",o=x(),i=v("div"),i.textContent="Meine Benachrichtigungen",s=x(),c=v("div"),c.textContent="Mein Layout",r=x(),N&&N.c(),u=x(),d=v("div"),d.textContent="Meine Versionen",f=x(),L&&L.c(),m=x(),g=v("div"),y&&ce(y.$$.fragment),C(l,"class","nav--item svelte-1x5ysxy"),S(l,"active",e[1]==he),C(i,"class","nav--item svelte-1x5ysxy"),S(i,"active",e[1]==we),C(c,"class","nav--item svelte-1x5ysxy"),S(c,"active",e[1]==xt),C(d,"class","nav--item svelte-1x5ysxy"),S(d,"active",e[1]==Nt),C(n,"class","container-setting--nav svelte-1x5ysxy"),C(g,"class","container-setting--content svelte-1x5ysxy"),C(t,"class","container-setting svelte-1x5ysxy")},m(a,h){p(a,t,h),$(t,n),$(n,l),$(n,o),$(n,i),$(n,s),$(n,c),$(n,r),N&&N.m(n,null),$(n,u),$(n,d),$(n,f),L&&L.m(n,null),$(t,m),$(t,g),y&&re(y,g,null),k=!0,b||(z=[w(l,"click",e[3]),w(i,"click",e[4]),w(c,"click",e[5]),w(d,"click",e[6])],b=!0)},p(e,t){2&t&&S(l,"active",e[1]==he),2&t&&S(i,"active",e[1]==we),2&t&&S(c,"active",e[1]==xt),e[0].isTicketAdmin?N?N.p(e,t):(N=Fn(e),N.c(),N.m(n,u)):N&&(N.d(1),N=null),2&t&&S(d,"active",e[1]==Nt),e[0].roleAdmin?L?L.p(e,t):(L=Rn(e),L.c(),L.m(n,null)):L&&(L.d(1),L=null);const o={};if(4&t&&(o.settings=e[2]),_!==(_=e[1])){if(y){Z();const e=y;Y(e.$$.fragment,1,0,()=>{ae(e,1)}),Q()}_?(y=new _(A(e)),y.$on("save",e[9]),ce(y.$$.fragment),X(y.$$.fragment,1),re(y,g,null)):y=null}else _&&y.$set(o)},i(e){k||(y&&X(y.$$.fragment,e),k=!0)},o(e){y&&Y(y.$$.fragment,e),k=!1},d(e){e&&h(t),N&&N.d(),L&&L.d(),y&&ae(y),b=!1,a(z)}}}function Fn(e){let t,n,l;return{c(){t=v("div"),t.textContent="Meine Tickets",C(t,"class","nav--item svelte-1x5ysxy"),S(t,"active",e[1]==Pt)},m(o,i){p(o,t,i),n||(l=w(t,"click",e[7]),n=!0)},p(e,n){2&n&&S(t,"active",e[1]==Pt)},d(e){e&&h(t),n=!1,l()}}}function Rn(e){let t,n,l;return{c(){t=v("div"),t.textContent="SaaS Admin",C(t,"class","nav--item svelte-1x5ysxy"),S(t,"active",e[1]==Wn)},m(o,i){p(o,t,i),n||(l=w(t,"click",e[8]),n=!0)},p(e,n){2&n&&S(t,"active",e[1]==Wn)},d(e){e&&h(t),n=!1,l()}}}function Vn(e){let t,n,l=e[0]&&Pn(e);return{c(){l&&l.c(),t=b()},m(e,o){l&&l.m(e,o),p(e,t,o),n=!0},p(e,[n]){e[0]?l?(l.p(e,n),1&n&&X(l,1)):(l=Pn(e),l.c(),X(l,1),l.m(t.parentNode,t)):l&&(Z(),Y(l,1,1,()=>{l=null}),Q())},i(e){n||(X(l),n=!0)},o(e){Y(l),n=!1},d(e){l&&l.d(e),e&&h(t)}}}function Un(e,t,i){let s;f(e,l,e=>i(13,s=e));let c,r,a,u,d,{injectedSettings:m}=t;const $=()=>{i(2,d=p(m)),i(1,c=he)};function p(e){return r={jobDescription:e.jobDescription,showJobDescription:e.setting.showJobDescription,email:e.email,firstName:e.firstName,lastName:e.lastName,listTitle:e.listTitle,hideRoles:e.hideRoles},r}async function h(){try{await n.saveUserSettings(m),i(0,m),function(e,t,n=t){e.set(n)}(l,s=m,s),o.success("Speichern erfolgreich",2e3)}catch(e){console.error(e),o.failed("Speichern nicht erfolgreich",2e3)}}return $(),e.$$set=e=>{"injectedSettings"in e&&i(0,m=e.injectedSettings)},[m,c,d,$,()=>{var e;i(2,(a={notificationActivated:(e=m).setting.notificationActivated,showNotifications:e.setting.showNotifications,notificationToMail:e.setting.notificationToMail,typesOfNotification:e.setting.typesOfNotification},d=a)),i(1,c=we)},()=>{i(2,(u={dashboardLayout:m.setting.dashboardLayout},d=u)),i(1,c=xt)},()=>{i(2,d=p(m)),i(1,c=Nt)},()=>{i(2,d=p(m)),i(1,c=Pt)},()=>{i(2,d=p(m)),i(1,c=Wn)},function(){c==he?(i(0,m.jobDescription=r.jobDescription,m),i(0,m.setting.showJobDescription=r.showJobDescription,m),i(0,m.email=r.email,m),i(0,m.firstName=r.firstName,m),i(0,m.lastName=r.lastName,m),i(0,m.listTitle=r.listTitle,m),i(0,m.hideRoles=r.hideRoles,m),h()):c==we?(i(0,m.setting.notificationActivated=a.notificationActivated,m),i(0,m.setting.showNotifications=a.showNotifications,m),i(0,m.setting.notificationToMail=a.notificationToMail,m),i(0,m.setting.typesOfNotification=a.typesOfNotification,m),h()):c==xt&&(i(0,m.setting.dashboardLayout=u.dashboardLayout,m),h())}]}class Hn extends de{constructor(e){var t;super(),document.getElementById("svelte-1x5ysxy-style")||((t=v("style")).id="svelte-1x5ysxy-style",t.textContent=".container-setting.svelte-1x5ysxy.svelte-1x5ysxy{display:grid;grid-template-columns:0.5fr 1fr;height:calc(100% - 120px)}.container-setting--nav.svelte-1x5ysxy.svelte-1x5ysxy{border-right:5px solid #ccc;cursor:pointer}.container-setting--nav.svelte-1x5ysxy .nav--item.svelte-1x5ysxy{padding:1.5em 1em;border-bottom:1px solid #ccc}.container-setting--nav.svelte-1x5ysxy .nav--item.svelte-1x5ysxy:hover{background-color:#ddd}.container-setting--nav.svelte-1x5ysxy .nav--item.active.svelte-1x5ysxy{font-weight:600;background-color:#ddd}.container-setting--content.svelte-1x5ysxy.svelte-1x5ysxy{padding:0 1em 0 1.5em;overflow:auto}.container-setting--content.svelte-1x5ysxy .form-setting{margin-bottom:2em}.container-setting--content.svelte-1x5ysxy .form-setting .form-field{display:flex;flex-direction:row;margin-bottom:2em}.container-setting--content.svelte-1x5ysxy .form-setting .form-field .helptext{font-size:0.9em;font-weight:400;margin-top:0.5em}.container-setting--content.svelte-1x5ysxy .form-setting .form-field .form-field--label{font-weight:600;flex-basis:30%;align-self:center}.container-setting--content.svelte-1x5ysxy .form-setting .form-field .switch{align-self:flex-start}.container-setting--content.svelte-1x5ysxy .form-setting .form-field .form-field--content{flex:1;margin-left:1em}.container-setting--content.svelte-1x5ysxy .form-setting .form-field .form-field--content .checkbox{margin-top:0.2em}",$(document.head,t)),ue(this,e,Un,Vn,d,{injectedSettings:0})}}function Jn(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function Gn(e){let t,n;return t=new e[0]({props:{open:"true",noClickaway:"true",$$slots:{default:[Zn,({closeCallback:e})=>({9:e}),({closeCallback:e})=>e?512:0]},$$scope:{ctx:e}}}),{c(){ce(t.$$.fragment)},m(e,l){re(t,e,l),n=!0},p(e,n){const l={};1024&n&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){n||(X(t.$$.fragment,e),n=!0)},o(e){Y(t.$$.fragment,e),n=!1},d(e){ae(t,e)}}}function Kn(e){let t,n,l,o;return l=new Hn({props:{injectedSettings:e[8]}}),{c(){t=v("div"),t.innerHTML="<h2>Einstellungen</h2>",n=x(),ce(l.$$.fragment),C(t,"class","setting--title svelte-ltqsg7")},m(e,i){p(e,t,i),p(e,n,i),re(l,e,i),o=!0},p:s,i(e){o||(X(l.$$.fragment,e),o=!0)},o(e){Y(l.$$.fragment,e),o=!1},d(e){e&&h(t),e&&h(n),ae(l,e)}}}function Zn(e){let t,n,l=e[8]&&function(e){let t,n,l;return n=new e[1]({props:{constrainWidth:!0,closeCallback:function(){return e[4](e[9])},class:"modal_class",$$slots:{default:[Kn]},$$scope:{ctx:e}}}),{c(){t=v("div"),ce(n.$$.fragment),C(t,"class","setting--modal svelte-ltqsg7")},m(e,o){p(e,t,o),re(n,t,null),l=!0},p(t,l){e=t;const o={};1024&l&&(o.$$scope={dirty:l,ctx:e}),n.$set(o)},i(e){l||(X(n.$$.fragment,e),l=!0)},o(e){Y(n.$$.fragment,e),l=!1},d(e){e&&h(t),ae(n)}}}(e);return{c(){l&&l.c(),t=b()},m(e,o){l&&l.m(e,o),p(e,t,o),n=!0},p(e,t){e[8]&&l.p(e,t)},i(e){n||(X(l),n=!0)},o(e){Y(l),n=!1},d(e){l&&l.d(e),e&&h(t)}}}function Qn(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function Xn(e){let t,l,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Qn,then:Gn,catch:Jn,value:8,blocks:[,,,]};return ee(n.getUserSettings(),o),{c(){t=b(),o.block.c()},m(e,n){p(e,t,n),o.block.m(e,o.anchor=n),o.mount=()=>t.parentNode,o.anchor=t,l=!0},p(t,[n]){te(o,e=t,n)},i(e){l||(X(o.block),l=!0)},o(e){for(let e=0;e<3;e+=1){Y(o.blocks[e])}l=!1},d(e){e&&h(t),o.block.d(e),o.token=null,o=null}}}function Yn(e,n,l){let o;const{Modal:s,Dialog:c}=t,{loggedIn:r,mainView:a}=i;f(e,a,e=>l(5,o=e));const u={Dashboard:"/dashboard",Auswerting:"/reporting"},d=()=>{window.singleSpaNavigate(u[o]||"/")};return[s,c,a,d,e=>(e(),d())]}function el(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tl,nl,ll=(tl=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,l)}return n}function l(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?n(Object(l),!0).forEach(function(t){o(e,t,l[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):n(Object(l)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))})}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==i(e))throw new Error("single-spa-svelte requires a configuration object");var t=l(l({},s),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:c.bind(null,t,n),mount:r.bind(null,t,n),unmount:a.bind(null,t,n),update:u.bind(null,t,n)}};var s={component:null,domElementGetter:null,props:{}};function c(e){return Promise.resolve()}function r(e,t,n){var o=Object.keys(s),i=Object.keys(e).reduce(function(t,n){return o.includes(n)||(t[n]=e[n]),t},{});return Promise.resolve().then(function(){var o=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),s=o();t.instance=new e.component(l(l({},i),{},{target:s,props:Object.assign({},n,e.props)}))})}function a(e,t){return Promise.resolve().then(function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()})}function u(e,t,n){return Promise.resolve().then(function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)})}},tl(nl={exports:{}},nl.exports),nl.exports);const ol=el(ll)({component:class extends de{constructor(e){var t;super(),document.getElementById("svelte-ltqsg7-style")||((t=v("style")).id="svelte-ltqsg7-style",t.textContent=".setting--modal.svelte-ltqsg7 .modal_class{height:80vh;min-width:70vw;overflow:hidden}.setting--title.svelte-ltqsg7{border-bottom:2px solid #ccc}",$(document.head,t)),ue(this,e,Yn,Xn,d,{})}},domElementGetter:()=>document.getElementById("view-app")}),{bootstrap:il,mount:sl,unmount:cl}=ol;e({bootstrap:il,mount:sl,unmount:cl})}}});
|