@enablerr-ui/settings 0.2.6 → 0.2.8
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"],(function(e){"use strict";var t,n,o;return{setters:[function(e){t=e.getAttractions},function(e){n=e.Request,o=e.settings}],execute:function(){e("version","0.2.6");function s(){}function i(e){return e()}function l(){return Object.create(null)}function r(e){e.forEach(i)}function c(e){return"function"==typeof e}function a(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function u(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 d(e,t){e.appendChild(t)}function f(e,t,n){e.insertBefore(t,n||null)}function m(e){e.parentNode.removeChild(e)}function p(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function g(e){return document.createElement(e)}function v(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function h(e){return document.createTextNode(e)}function $(){return h(" ")}function y(){return h("")}function x(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 w(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function k(e,t){e.value=null==t?"":t}function j(e,t,n){e.classList[n?"add":"remove"](t)}let z;function L(e){z=e}function N(){if(!z)throw new Error("Function called outside component initialization");return z}function C(e){N().$$.on_mount.push(e)}function M(){const e=N();return(t,n)=>{const o=e.$$.callbacks[t];if(o){const s=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,s)}))}}}const S=[],_=[],E=[],O=[],D=Promise.resolve();let I=!1;function B(){I||(I=!0,D.then(q))}function T(e){E.push(e)}function W(e){O.push(e)}let A=!1;const P=new Set;function q(){if(!A){A=!0;do{for(let e=0;e<S.length;e+=1){const t=S[e];L(t),J(t.$$)}for(L(null),S.length=0;_.length;)_.pop()();for(let e=0;e<E.length;e+=1){const t=E[e];P.has(t)||(P.add(t),t())}E.length=0}while(S.length);for(;O.length;)O.pop()();I=!1,A=!1,P.clear()}}function J(e){if(null!==e.fragment){e.update(),r(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(T)}}const F=new Set;let G;function V(){G={r:0,c:[],p:G}}function H(){G.r||r(G.c),G=G.p}function U(e,t){e&&e.i&&(F.delete(e),e.i(t))}function K(e,t,n,o){if(e&&e.o){if(F.has(e))return;F.add(e),G&&G.c.push((()=>{F.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function R(e,t){const n=t.token={};function o(e,o,s,i){if(t.token!==n)return;t.resolved=i;let l=t.ctx;void 0!==s&&(l=l.slice(),l[s]=i);const r=e&&(t.current=e)(l);let c=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==o&&e&&(V(),K(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),H())})):t.block.d(1),r.c(),U(r,1),r.m(t.mount(),t.anchor),c=!0),t.block=r,t.blocks&&(t.blocks[o]=r),c&&q()}if((s=e)&&"object"==typeof s&&"function"==typeof s.then){const n=N();if(e.then((e=>{L(n),o(t.then,1,t.value,e),L(null)}),(e=>{if(L(n),o(t.catch,2,t.error,e),L(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 s}function Z(e,t,n){const o=t.slice(),{resolved:s}=e;e.current===e.then&&(o[e.value]=s),e.current===e.catch&&(o[e.error]=s),e.block.p(o,n)}const Q="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function X(e,t){K(e,1,1,(()=>{t.delete(e.key)}))}function Y(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function ee(e){e&&e.c()}function te(e,t,n,o){const{fragment:s,on_mount:l,on_destroy:a,after_update:u}=e.$$;s&&s.m(t,n),o||T((()=>{const t=l.map(i).filter(c);a?a.push(...t):r(t),e.$$.on_mount=[]})),u.forEach(T)}function ne(e,t){const n=e.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function oe(e,t,n,o,i,c,a=[-1]){const u=z;L(e);const d=e.$$={fragment:null,ctx:null,props:c,update:s,not_equal:i,bound:l(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:t.context||[]),callbacks:l(),dirty:a,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]&&(S.push(e),B(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],d.update(),f=!0,r(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(m)}else d.fragment&&d.fragment.c();t.intro&&U(e.$$.fragment),te(e,t.target,t.anchor,t.customElement),q()}L(u)}class se{$destroy(){ne(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 ie(e){let t,n,o,s,i,l,r,c,a,u,p,v,h,y,w,k,j,z,L,N,C,M,S,E,O,D,I,B,T,A,P,q,J,F,G,V,H;function R(t){e[4](t)}let Z={placeholder:"Berufsbezeichnung"};function Q(t){e[6](t)}void 0!==e[0].jobDescription&&(Z.value=e[0].jobDescription),l=new e[2]({props:Z}),_.push((()=>Y(l,"value",R))),z=new e[2]({props:{placeholder:"E-Mail",disabled:!0,value:e[0].email}});let X={placeholder:"Vorname"};function oe(t){e[7](t)}void 0!==e[0].firstName&&(X.value=e[0].firstName),E=new e[2]({props:X}),_.push((()=>Y(E,"value",Q)));let se={placeholder:"Nachname"};return void 0!==e[0].lastName&&(se.value=e[0].lastName),P=new e[2]({props:se}),_.push((()=>Y(P,"value",oe))),F=new e[1]({props:{filled:!0,$$slots:{default:[le]},$$scope:{ctx:e}}}),F.$on("click",e[3]),{c(){t=g("form"),n=g("div"),o=g("div"),o.textContent="Berufsbezeichnung",s=$(),i=g("div"),ee(l.$$.fragment),c=$(),a=g("div"),u=g("input"),p=$(),v=g("label"),v.textContent="Meine Berufsbezeichnung in meinem Profil anzeigen.",h=$(),y=g("div"),w=g("div"),w.textContent="E-Mail",k=$(),j=g("div"),ee(z.$$.fragment),L=$(),N=g("div"),C=g("div"),C.textContent="Vorname",M=$(),S=g("div"),ee(E.$$.fragment),D=$(),I=g("div"),B=g("div"),B.textContent="Nachname",T=$(),A=g("div"),ee(P.$$.fragment),J=$(),ee(F.$$.fragment),b(o,"class","form-field--label"),b(u,"type","checkbox"),b(u,"id","showJobDesc"),b(u,"name","shwoJobDescriptionInBio"),b(v,"for","showJobDesc"),b(a,"class","checkbox"),b(i,"class","form-field--content"),b(n,"class","form-field"),b(w,"class","form-field--label"),b(j,"class","form-field--content"),b(y,"class","form-field"),b(C,"class","form-field--label"),b(S,"class","form-field--content"),b(N,"class","form-field"),b(B,"class","form-field--label"),b(A,"class","form-field--content"),b(I,"class","form-field"),b(t,"class","form-setting")},m(r,m){f(r,t,m),d(t,n),d(n,o),d(n,s),d(n,i),te(l,i,null),d(i,c),d(i,a),d(a,u),u.checked=e[0].showJobDescription,d(a,p),d(a,v),d(t,h),d(t,y),d(y,w),d(y,k),d(y,j),te(z,j,null),d(t,L),d(t,N),d(N,C),d(N,M),d(N,S),te(E,S,null),d(t,D),d(t,I),d(I,B),d(I,T),d(I,A),te(P,A,null),f(r,J,m),te(F,r,m),G=!0,V||(H=x(u,"change",e[5]),V=!0)},p(e,t){const n={};!r&&1&t&&(r=!0,n.value=e[0].jobDescription,W((()=>r=!1))),l.$set(n),1&t&&(u.checked=e[0].showJobDescription);const o={};1&t&&(o.value=e[0].email),z.$set(o);const s={};!O&&1&t&&(O=!0,s.value=e[0].firstName,W((()=>O=!1))),E.$set(s);const i={};!q&&1&t&&(q=!0,i.value=e[0].lastName,W((()=>q=!1))),P.$set(i);const c={};1024&t&&(c.$$scope={dirty:t,ctx:e}),F.$set(c)},i(e){G||(U(l.$$.fragment,e),U(z.$$.fragment,e),U(E.$$.fragment,e),U(P.$$.fragment,e),U(F.$$.fragment,e),G=!0)},o(e){K(l.$$.fragment,e),K(z.$$.fragment,e),K(E.$$.fragment,e),K(P.$$.fragment,e),K(F.$$.fragment,e),G=!1},d(e){e&&m(t),ne(l),ne(z),ne(E),ne(P),e&&m(J),ne(F,e),V=!1,H()}}}function le(e){let t;return{c(){t=h("Speichern")},m(e,n){f(e,t,n)},d(e){e&&m(t)}}}function re(e){let t,n,o,s,i=e[0]&&ie(e);return{c(){t=g("div"),n=g("h2"),n.textContent="Mein Profil",o=$(),i&&i.c()},m(e,l){f(e,t,l),d(t,n),d(t,o),i&&i.m(t,null),s=!0},p(e,[n]){e[0]?i?(i.p(e,n),1&n&&U(i,1)):(i=ie(e),i.c(),U(i,1),i.m(t,null)):i&&(V(),K(i,1,1,(()=>{i=null})),H())},i(e){s||(U(i),s=!0)},o(e){K(i),s=!1},d(e){e&&m(t),i&&i.d()}}}function ce(e,n,o){const{Button:s,TextField:i,FormField:l}=t;let{settings:r}=n;const c=M();return e.$$set=e=>{"settings"in e&&o(0,r=e.settings)},[r,s,i,function(){c("save")},function(t){e.$$.not_equal(r.jobDescription,t)&&(r.jobDescription=t,o(0,r))},function(){r.showJobDescription=this.checked,o(0,r)},function(t){e.$$.not_equal(r.firstName,t)&&(r.firstName=t,o(0,r))},function(t){e.$$.not_equal(r.lastName,t)&&(r.lastName=t,o(0,r))}]}class ae extends se{constructor(e){super(),oe(this,e,ce,re,a,{settings:0})}}function ue(e,t,n){const o=e.slice();return o[11]=t[n],o}function de(e){let t,n,o,s,i,l,r,c,a,u,v,h,y,x,w,k,j,z,L,N,C,M,S,E,O,D,I,B,T;function A(t){e[6](t)}let P={};function q(t){e[7](t)}void 0!==e[0].notificationActivated&&(P.value=e[0].notificationActivated),l=new e[3]({props:P}),_.push((()=>Y(l,"value",A)));let J={};function F(t){e[8](t)}void 0!==e[0].showNotifications&&(J.value=e[0].showNotifications),y=new e[3]({props:J}),_.push((()=>Y(y,"value",q)));let G={};void 0!==e[0].notificationToMail&&(G.value=e[0].notificationToMail),N=new e[3]({props:G}),_.push((()=>Y(N,"value",F)));let V=e[1],H=[];for(let t=0;t<V.length;t+=1)H[t]=fe(ue(e,V,t));return B=new e[2]({props:{filled:!0,$$slots:{default:[me]},$$scope:{ctx:e}}}),B.$on("click",e[4]),{c(){t=g("form"),n=g("div"),o=g("div"),o.textContent="Benachrichtigungen aktivieren",s=$(),i=g("div"),ee(l.$$.fragment),c=$(),a=g("div"),u=g("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>',v=$(),h=g("div"),ee(y.$$.fragment),w=$(),k=g("div"),j=g("div"),j.textContent="Benachrichtigungen an E-Mail senden",z=$(),L=g("div"),ee(N.$$.fragment),M=$(),S=g("div"),E=g("div"),E.innerHTML='Arten von Benachrichtigungen\n <p class="helptext">Wählen Sie aus, welche Arten von Benachrichtigungen Sie sehen\n möchten.</p>',O=$(),D=g("div");for(let e=0;e<H.length;e+=1)H[e].c();I=$(),ee(B.$$.fragment),b(o,"class","form-field--label switch"),b(i,"class","form-field--content"),b(n,"class","form-field"),b(u,"class","form-field--label switch"),b(h,"class","form-field--content"),b(a,"class","form-field"),b(j,"class","form-field--label switch"),b(L,"class","form-field--content"),b(k,"class","form-field"),b(E,"class","form-field--label"),b(D,"class","form-field--content"),b(S,"class","form-field"),b(t,"class","form-setting")},m(e,r){f(e,t,r),d(t,n),d(n,o),d(n,s),d(n,i),te(l,i,null),d(t,c),d(t,a),d(a,u),d(a,v),d(a,h),te(y,h,null),d(t,w),d(t,k),d(k,j),d(k,z),d(k,L),te(N,L,null),d(t,M),d(t,S),d(S,E),d(S,O),d(S,D);for(let e=0;e<H.length;e+=1)H[e].m(D,null);f(e,I,r),te(B,e,r),T=!0},p(e,t){const n={};!r&&1&t&&(r=!0,n.value=e[0].notificationActivated,W((()=>r=!1))),l.$set(n);const o={};!x&&1&t&&(x=!0,o.value=e[0].showNotifications,W((()=>x=!1))),y.$set(o);const s={};if(!C&&1&t&&(C=!0,s.value=e[0].notificationToMail,W((()=>C=!1))),N.$set(s),35&t){let n;for(V=e[1],n=0;n<V.length;n+=1){const o=ue(e,V,n);H[n]?H[n].p(o,t):(H[n]=fe(o),H[n].c(),H[n].m(D,null))}for(;n<H.length;n+=1)H[n].d(1);H.length=V.length}const i={};16384&t&&(i.$$scope={dirty:t,ctx:e}),B.$set(i)},i(e){T||(U(l.$$.fragment,e),U(y.$$.fragment,e),U(N.$$.fragment,e),U(B.$$.fragment,e),T=!0)},o(e){K(l.$$.fragment,e),K(y.$$.fragment,e),K(N.$$.fragment,e),K(B.$$.fragment,e),T=!1},d(e){e&&m(t),ne(l),ne(y),ne(N),p(H,e),e&&m(I),ne(B,e)}}}function fe(e){let t,n,o,s,i,l,r,a,u,p,v,y=e[11].type+"";return{c(){t=g("div"),n=g("input"),i=$(),l=g("label"),r=h(y),u=$(),n.checked=o=e[0].typesOfNotification.includes(e[11].type),b(n,"type","checkbox"),b(n,"id",s=e[11].id),b(l,"for",a=e[11].id)},m(o,s){f(o,t,s),d(t,n),d(t,i),d(t,l),d(l,r),d(t,u),p||(v=x(n,"change",(function(){c(e[5](e[11].type))&&e[5](e[11].type).apply(this,arguments)})),p=!0)},p(t,i){e=t,3&i&&o!==(o=e[0].typesOfNotification.includes(e[11].type))&&(n.checked=o),2&i&&s!==(s=e[11].id)&&b(n,"id",s),2&i&&y!==(y=e[11].type+"")&&w(r,y),2&i&&a!==(a=e[11].id)&&b(l,"for",a)},d(e){e&&m(t),p=!1,v()}}}function me(e){let t;return{c(){t=h("Speichern")},m(e,n){f(e,t,n)},d(e){e&&m(t)}}}function pe(e){let t,n,o,s,i=e[0]&&de(e);return{c(){t=g("div"),n=g("h2"),n.textContent="Meine Benachrichtigungen",o=$(),i&&i.c()},m(e,l){f(e,t,l),d(t,n),d(t,o),i&&i.m(t,null),s=!0},p(e,[n]){e[0]?i?(i.p(e,n),1&n&&U(i,1)):(i=de(e),i.c(),U(i,1),i.m(t,null)):i&&(V(),K(i,1,1,(()=>{i=null})),H())},i(e){s||(U(i),s=!0)},o(e){K(i),s=!1},d(e){e&&m(t),i&&i.d()}}}function ge(e,o,s){const{Button:i,TextField:l,Switch:r}=t;let{settings:c}=o,a=[];const u=M();return C((async()=>{s(1,a=(await n.getNotificationTypes()).filter((({active:e})=>e)))})),e.$$set=e=>{"settings"in e&&s(0,c=e.settings)},[c,a,i,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,s(0,c))},function(t){e.$$.not_equal(c.showNotifications,t)&&(c.showNotifications=t,s(0,c))},function(t){e.$$.not_equal(c.notificationToMail,t)&&(c.notificationToMail=t,s(0,c))}]}class ve extends se{constructor(e){super(),oe(this,e,ge,pe,a,{settings:0})}}function he(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,s){f(e,t,s),d(t,n),d(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:s,o:s,d(e){e&&m(t)}}}function $e(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,s=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,s,i]}class ye extends se{constructor(e){super(),oe(this,e,$e,he,a,{size:0,strokeWidth:1,class:2})}}function xe(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,s){f(e,t,s),d(t,n),d(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:s,o:s,d(e){e&&m(t)}}}function be(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,s=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,s,i]}class we extends se{constructor(e){super(),oe(this,e,be,xe,a,{size:0,strokeWidth:1,class:2})}}function ke(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,s){f(e,t,s),d(t,n),d(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:s,o:s,d(e){e&&m(t)}}}function je(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,s=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,s,i]}class ze extends se{constructor(e){super(),oe(this,e,je,ke,a,{size:0,strokeWidth:1,class:2})}}function Le(e){let t,n,o,i,l,r;return{c(){t=v("svg"),n=v("polyline"),o=v("path"),i=v("line"),l=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(l,"x1","14"),b(l,"y1","11"),b(l,"x2","14"),b(l,"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,s){f(e,t,s),d(t,n),d(t,o),d(t,i),d(t,l)},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:s,o:s,d(e){e&&m(t)}}}function Ne(e,t,n){let{size:o="100%"}=t,{strokeWidth:s=2}=t,{class:i=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,s=e.strokeWidth),"class"in e&&n(2,i=e.class)},[o,s,i]}class Ce extends se{constructor(e){super(),oe(this,e,Ne,Le,a,{size:0,strokeWidth:1,class:2})}}const{Map:Me}=Q;function Se(e,t,n){const o=e.slice();return o[28]=t[n],o}function _e(e,t,n){const o=e.slice();return o[32]=t[n],o[34]=n,o}function Ee(e){let t,n,o,s,i,l,c,a,u,v,h,y,w,j,z,L,N,C,M,S,E,O,D,I,B,T,A,P,q,J,F,G,V,H,Q;function X(t){e[15](t)}let oe={type:"text",placeholder:"Neuer Layout Name"};function se(t){e[16](t)}void 0!==e[0].id&&(oe.value=e[0].id),s=new e[5]({props:oe}),_.push((()=>Y(s,"value",X)));let ie={slotLeft:!0,$$slots:{default:[Oe]},$$scope:{ctx:e}};void 0!==e[0].activated&&(ie.value=e[0].activated),a=new e[9]({props:ie}),_.push((()=>Y(a,"value",se))),h=new e[6]({});let le={ctx:e,current:null,token:null,hasCatch:!1,pending:Ae,then:Ie,catch:De,value:31,blocks:[,,,]};R(M=e[2],le),E=new e[6]({});let re=e[10],ce=[];for(let t=0;t<re.length;t+=1)ce[t]=Pe(Se(e,re,t));let ae=e[4]&&qe();return G=new e[8]({props:{filled:!0,class:"saveBtnLayout",$$slots:{default:[Je]},$$scope:{ctx:e}}}),G.$on("click",e[23]),{c(){t=g("div"),n=g("p"),n.textContent="Name des Layouts",o=$(),ee(s.$$.fragment),l=$(),c=g("div"),ee(a.$$.fragment),v=$(),ee(h.$$.fragment),y=$(),w=g("div"),j=g("label"),j.textContent="Vorhandene Module",z=$(),L=g("input"),N=$(),C=g("div"),le.block.c(),S=$(),ee(E.$$.fragment),O=$(),D=g("div"),I=g("h1"),I.textContent="Wochentage",B=$(),T=g("p"),T.textContent="Wählen Sie die Tage, an denen die Vorlage angezeigt werden soll.",A=$(),P=g("div");for(let e=0;e<ce.length;e+=1)ce[e].c();q=$(),ae&&ae.c(),J=$(),F=g("div"),ee(G.$$.fragment),b(c,"class","layout-activated-switch svelte-1vkufz4"),b(j,"for","moduleSearch"),b(j,"id","textModule"),b(j,"class","svelte-1vkufz4"),b(L,"id","moduleSearch"),b(L,"type","search"),b(L,"placeholder","suche..."),b(L,"class","search_bar svelte-1vkufz4"),b(w,"class","module svelte-1vkufz4"),b(C,"class","moduleCards svelte-1vkufz4"),b(P,"class","weekdays svelte-1vkufz4"),b(F,"class","saveBtnDiv svelte-1vkufz4"),b(t,"class","newLayoutContent")},m(i,r){f(i,t,r),d(t,n),d(t,o),te(s,t,null),d(t,l),d(t,c),te(a,c,null),d(t,v),te(h,t,null),d(t,y),d(t,w),d(w,j),d(w,z),d(w,L),k(L,e[3]),d(t,N),d(t,C),le.block.m(C,le.anchor=null),le.mount=()=>C,le.anchor=null,d(t,S),te(E,t,null),d(t,O),d(t,D),d(D,I),d(D,B),d(D,T),d(D,A),d(D,P);for(let e=0;e<ce.length;e+=1)ce[e].m(P,null);d(t,q),ae&&ae.m(t,null),d(t,J),d(t,F),te(G,F,null),V=!0,H||(Q=[x(L,"input",e[17]),x(L,"input",e[18])],H=!0)},p(n,o){e=n;const l={};!i&&1&o[0]&&(i=!0,l.value=e[0].id,W((()=>i=!1))),s.$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,W((()=>u=!1))),a.$set(r),8&o[0]&&k(L,e[3]),le.ctx=e,4&o[0]&&M!==(M=e[2])&&R(M,le)||Z(le,e,o),17409&o[0]){let t;for(re=e[10],t=0;t<re.length;t+=1){const n=Se(e,re,t);ce[t]?ce[t].p(n,o):(ce[t]=Pe(n),ce[t].c(),ce[t].m(P,null))}for(;t<ce.length;t+=1)ce[t].d(1);ce.length=re.length}e[4]?ae||(ae=qe(),ae.c(),ae.m(t,J)):ae&&(ae.d(1),ae=null);const c={};16&o[1]&&(c.$$scope={dirty:o,ctx:e}),G.$set(c)},i(e){V||(U(s.$$.fragment,e),U(a.$$.fragment,e),U(h.$$.fragment,e),U(le.block),U(E.$$.fragment,e),U(G.$$.fragment,e),V=!0)},o(e){K(s.$$.fragment,e),K(a.$$.fragment,e),K(h.$$.fragment,e);for(let e=0;e<3;e+=1){K(le.blocks[e])}K(E.$$.fragment,e),K(G.$$.fragment,e),V=!1},d(e){e&&m(t),ne(s),ne(a),ne(h),le.block.d(),le.token=null,le=null,ne(E),p(ce,e),ae&&ae.d(),ne(G),H=!1,r(Q)}}}function Oe(e){let t;return{c(){t=g("span"),t.textContent="Aktivieren Sie das Modul",b(t,"class","mr svelte-1vkufz4")},m(e,n){f(e,t,n)},d(e){e&&m(t)}}}function De(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function Ie(e){let t,n,o=[],s=new Me,i=e[31];const l=e=>e[34];for(let t=0;t<i.length;t+=1){let n=_e(e,i,t),r=l(n);s.set(r,o[t]=We(r,n))}return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=y()},m(e,s){for(let t=0;t<o.length;t+=1)o[t].m(e,s);f(e,t,s),n=!0},p(e,n){2053&n[0]&&(i=e[31],V(),o=function(e,t,n,o,s,i,l,r,c,a,u,d){let f=e.length,m=i.length,p=f;const g={};for(;p--;)g[e[p].key]=p;const v=[],h=new Map,$=new Map;for(p=m;p--;){const e=d(s,i,p),r=n(e);let c=l.get(r);c?o&&c.p(e,t):(c=a(r,e),c.c()),h.set(r,v[p]=c),r in g&&$.set(r,Math.abs(p-g[r]))}const y=new Set,x=new Set;function b(e){U(e,1),e.m(r,u),l.set(e.key,e),u=e.first,m--}for(;f&&m;){const t=v[m-1],n=e[f-1],o=t.key,s=n.key;t===n?(u=t.first,f--,m--):h.has(s)?!l.has(o)||y.has(o)?b(t):x.has(s)?f--:$.get(o)>$.get(s)?(x.add(o),b(t)):(y.add(s),f--):(c(n,l),f--)}for(;f--;){const t=e[f];h.has(t.key)||c(t,l)}for(;m;)b(v[m-1]);return v}(o,n,l,1,e,i,s,t.parentNode,X,We,t,_e),H())},i(e){if(!n){for(let e=0;e<i.length;e+=1)U(o[e]);n=!0}},o(e){for(let e=0;e<o.length;e+=1)K(o[e]);n=!1},d(e){for(let t=0;t<o.length;t+=1)o[t].d(e);e&&m(t)}}}function Be(e){let t,n,o=-1!=e[0].moduleList.findIndex(s)?"abwählen":"wählen";function s(...t){return e[19](e[32],...t)}return{c(){t=g("span"),n=h(o),b(t,"class","centerText svelte-1vkufz4")},m(e,o){f(e,t,o),d(t,n)},p(t,i){e=t,5&i[0]&&o!==(o=-1!=e[0].moduleList.findIndex(s)?"abwählen":"wählen")&&w(n,o)},d(e){e&&m(t)}}}function Te(e){let t,n,o,s,i,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:[Be]},$$scope:{ctx:e}}}),o.$on("click",(function(){return e[21](e[32])})),{c(){t=h(l),n=$(),ee(o.$$.fragment),s=$()},m(e,l){f(e,t,l),f(e,n,l),te(o,e,l),f(e,s,l),i=!0},p(n,s){e=n,(!i||4&s[0])&&l!==(l=e[32].name+"")&&w(t,l);const c={};5&s[0]&&(c.class=-1!=e[0].moduleList.findIndex(r)?"btn__selected":""),5&s[0]|16&s[1]&&(c.$$scope={dirty:s,ctx:e}),o.$set(c)},i(e){i||(U(o.$$.fragment,e),i=!0)},o(e){K(o.$$.fragment,e),i=!1},d(e){e&&m(t),e&&m(n),ne(o,e),e&&m(s)}}}function We(e,t){let n,o,s;return o=new t[7]({props:{style:"margin: 20px",$$slots:{default:[Te]},$$scope:{ctx:t}}}),{key:e,first:null,c(){n=y(),ee(o.$$.fragment),this.first=n},m(e,t){f(e,n,t),te(o,e,t),s=!0},p(e,n){t=e;const s={};5&n[0]|16&n[1]&&(s.$$scope={dirty:n,ctx:t}),o.$set(s)},i(e){s||(U(o.$$.fragment,e),s=!0)},o(e){K(o.$$.fragment,e),s=!1},d(e){e&&m(n),ne(o,e)}}}function Ae(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function Pe(e){let t,n,o,s,i,l,r,c,a,u=e[28].day+"";function p(...t){return e[22](e[28],...t)}return{c(){t=g("div"),n=g("input"),s=$(),i=g("label"),l=h(u),r=$(),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(i,"for",e[28].value),b(t,"class","day svelte-1vkufz4")},m(e,o){f(e,t,o),d(t,n),d(t,s),d(t,i),d(i,l),d(t,r),c||(a=x(n,"change",p),c=!0)},p(t,s){e=t,1&s[0]&&o!==(o=e[0].days.includes(e[28].value))&&(n.checked=o)},d(e){e&&m(t),c=!1,a()}}}function qe(e){let t;return{c(){t=g("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){f(e,t,n)},d(e){e&&m(t)}}}function Je(e){let t;return{c(){t=h("Layout speichern")},m(e,n){f(e,t,n)},d(e){e&&m(t)}}}function Fe(e){let t,n,o=e[0]&&e[1]&&Ee(e);return{c(){t=g("div"),o&&o.c(),b(t,"class","newLayoutContainer")},m(e,s){f(e,t,s),o&&o.m(t,null),n=!0},p(e,n){e[0]&&e[1]?o?(o.p(e,n),3&n[0]&&U(o,1)):(o=Ee(e),o.c(),U(o,1),o.m(t,null)):o&&(V(),K(o,1,1,(()=>{o=null})),H())},i(e){n||(U(o),n=!0)},o(e){K(o),n=!1},d(e){e&&m(t),o&&o.d()}}}function Ge(e,o,s){let i;const{TextField:l,Divider:r,Card:c,Button:a,Switch:u}=t,d=M(),f=n.getAllModules().map((e=>({...e,isSelected:!1})));let m=f,{settings:p}=o,{layout:g}=o,v=new Map;C((async()=>{await p,await(B(),D)}));let h=[{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 $(e){const t=g.moduleList.findIndex((t=>t.moduleId==e.id));-1==t?g.moduleList.splice(g.moduleList.length-1,0,{moduleId:e.id.toString(),position:g.moduleList.length.toString()}):g.moduleList.splice(t,1),s(0,g)}let y="";function x(){s(2,m=f.filter((e=>e.name.toLowerCase().includes(y.toLowerCase()))))}function b(){if(""!=g.id&&0!=g.moduleList.length){for(let[e,t]of v){const n=p.dashboardLayout[e];t.forEach((e=>{const t=n.days.findIndex((t=>e==t));n.days.splice(t,1)})),s(1,p.dashboardLayout[e]=n,p)}d("save",g)}}function w(e,t){if(e.target.checked)g.days.unshift(t);else{const e=g.days.findIndex((e=>e==t));g.days.splice(e,1)}s(0,g.days=h.filter((e=>g.days.includes(e.value))).map((e=>e.value)),g)}return e.$$set=e=>{"settings"in e&&s(1,p=e.settings),"layout"in e&&s(0,g=e.layout)},e.$$.update=()=>{1&e.$$.dirty[0]&&s(4,i=function(e){v=new Map;let t=!1;return p.dashboardLayout.forEach(((n,o)=>{n.id!=g.id&&n.activated&&e.forEach(((e,s)=>{if(n.days.includes(e))return t=!0,v.has(o)?void v.get(o).push(e):void v.set(o,[e])}))})),t}(g.days))},[g,p,m,y,i,l,r,c,a,u,h,$,x,b,w,function(t){e.$$.not_equal(g.id,t)&&(g.id=t,s(0,g))},function(t){e.$$.not_equal(g.activated,t)&&(g.activated=t,s(0,g))},function(){y=this.value,s(3,y)},e=>x(),(e,t)=>t.moduleId.toString()==e.id.toString(),(e,t)=>t.moduleId.toString()==e.id.toString(),e=>$(e),(e,t)=>w(t,e.value),()=>b()]}class Ve extends se{constructor(e){var t;super(),document.getElementById("svelte-1vkufz4-style")||((t=g("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}",d(document.head,t)),oe(this,e,Ge,Fe,a,{settings:1,layout:0},[-1,-1])}}function He(e,t,n){const o=e.slice();return o[20]=t[n],o}function Ue(e,t,n){const o=e.slice();return o[23]=t[n],o}function Ke(e){let t;return{c(){t=h("Abbrechen")},m(e,n){f(e,t,n)},d(e){e&&m(t)}}}function Re(e){let t;return{c(){t=h("Layout löschen")},m(e,n){f(e,t,n)},d(e){e&&m(t)}}}function Ze(e){let t,n,o,s,i,l,r;return s=new e[6]({props:{filled:!0,$$slots:{default:[Ke]},$$scope:{ctx:e}}}),s.$on("click",e[14]),l=new e[6]({props:{filled:!0,$$slots:{default:[Re]},$$scope:{ctx:e}}}),l.$on("click",e[13]),{c(){t=g("div"),t.textContent="Wollen Sie das Layout wirklich löschen?",n=$(),o=g("div"),ee(s.$$.fragment),i=$(),ee(l.$$.fragment),b(o,"class","btns-container svelte-1jv7ege")},m(e,c){f(e,t,c),f(e,n,c),f(e,o,c),te(s,o,null),d(o,i),te(l,o,null),r=!0},p(e,t){const n={};67108864&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n);const o={};67108864&t&&(o.$$scope={dirty:t,ctx:e}),l.$set(o)},i(e){r||(U(s.$$.fragment,e),U(l.$$.fragment,e),r=!0)},o(e){K(s.$$.fragment,e),K(l.$$.fragment,e),r=!1},d(e){e&&m(t),e&&m(n),e&&m(o),ne(s),ne(l)}}}function Qe(e){let t,n;return t=new e[5]({props:{title:"Delete of Modal",$$slots:{default:[Ze]},$$scope:{ctx:e}}}),{c(){ee(t.$$.fragment)},m(e,o){te(t,e,o),n=!0},p(e,n){const o={};67108864&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(U(t.$$.fragment,e),n=!0)},o(e){K(t.$$.fragment,e),n=!1},d(e){ne(t,e)}}}function Xe(e){let t,n,o,s,i,l,r,c,a,u,p;function v(e,t){return e[1]?tt:et}i=new ye({props:{size:"24"}});let h=v(e),y=h(e);return c=new Ve({props:{layout:e[2],settings:e[0]}}),c.$on("save",e[17]),{c(){t=g("div"),n=g("div"),o=g("h2"),s=g("span"),ee(i.$$.fragment),l=$(),y.c(),r=$(),ee(c.$$.fragment),b(s,"class","btn-back svelte-1jv7ege")},m(m,g){f(m,t,g),d(t,n),d(n,o),d(o,s),te(i,s,null),d(o,l),y.m(o,null),d(t,r),te(c,t,null),a=!0,u||(p=x(s,"click",e[10]),u=!0)},p(e,t){h===(h=v(e))&&y?y.p(e,t):(y.d(1),y=h(e),y&&(y.c(),y.m(o,null)));const n={};4&t&&(n.layout=e[2]),1&t&&(n.settings=e[0]),c.$set(n)},i(e){a||(U(i.$$.fragment,e),U(c.$$.fragment,e),a=!0)},o(e){K(i.$$.fragment,e),K(c.$$.fragment,e),a=!1},d(e){e&&m(t),ne(i),y.d(),ne(c),u=!1,p()}}}function Ye(e){let t,n,o,s,i,l,r,c,a;o=new e[6]({props:{$$slots:{default:[nt]},$$scope:{ctx:e}}}),o.$on("click",e[11]);let u=e[0].dashboardLayout,v=[];for(let t=0;t<u.length;t+=1)v[t]=rt(He(e,u,t));const h=e=>K(v[e],1,1,(()=>{v[e]=null}));return{c(){t=g("h2"),t.textContent="Mein Layout",n=$(),ee(o.$$.fragment),s=$(),i=g("div"),l=g("p"),l.textContent="Dies sind Ihre vorhandenen Vorlagen.",r=$(),c=g("div");for(let e=0;e<v.length;e+=1)v[e].c();b(c,"class","layout-cards svelte-1jv7ege"),b(i,"class","form-setting")},m(e,u){f(e,t,u),f(e,n,u),te(o,e,u),f(e,s,u),f(e,i,u),d(i,l),d(i,r),d(i,c);for(let e=0;e<v.length;e+=1)v[e].m(c,null);a=!0},p(e,t){const n={};if(67108864&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=He(e,u,n);v[n]?(v[n].p(o,t),U(v[n],1)):(v[n]=rt(o),v[n].c(),U(v[n],1),v[n].m(c,null))}for(V(),n=u.length;n<v.length;n+=1)h(n);H()}},i(e){if(!a){U(o.$$.fragment,e);for(let e=0;e<u.length;e+=1)U(v[e]);a=!0}},o(e){K(o.$$.fragment,e),v=v.filter(Boolean);for(let e=0;e<v.length;e+=1)K(v[e]);a=!1},d(e){e&&m(t),e&&m(n),ne(o,e),e&&m(s),e&&m(i),p(v,e)}}}function et(e){let t,n,o,s=e[2].id+"";return{c(){t=h("Layouts "),n=h(s),o=h(" bearbeiten")},m(e,s){f(e,t,s),f(e,n,s),f(e,o,s)},p(e,t){4&t&&s!==(s=e[2].id+"")&&w(n,s)},d(e){e&&m(t),e&&m(n),e&&m(o)}}}function tt(e){let t;return{c(){t=h("Neues Layout erstellen")},m(e,n){f(e,t,n)},p:s,d(e){e&&m(t)}}}function nt(e){let t,n,o;return t=new ze({props:{size:"24"}}),{c(){ee(t.$$.fragment),n=h(" Neues Layout hinzufügen")},m(e,s){te(t,e,s),f(e,n,s),o=!0},p:s,i(e){o||(U(t.$$.fragment,e),o=!0)},o(e){K(t.$$.fragment,e),o=!1},d(e){ne(t,e),e&&m(n)}}}function ot(e){let t,n;return t=new e[7]({props:{class:"layout-card",$$slots:{default:[lt]},$$scope:{ctx:e}}}),{c(){ee(t.$$.fragment)},m(e,o){te(t,e,o),n=!0},p(e,n){const o={};67108865&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(U(t.$$.fragment,e),n=!0)},o(e){K(t.$$.fragment,e),n=!1},d(e){ne(t,e)}}}function st(e){let t,n=e[20].moduleList,o=[];for(let t=0;t<n.length;t+=1)o[t]=it(Ue(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=y()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);f(e,t,n)},p(e,s){if(257&s){let i;for(n=e[20].moduleList,i=0;i<n.length;i+=1){const l=Ue(e,n,i);o[i]?o[i].p(l,s):(o[i]=it(l),o[i].c(),o[i].m(t.parentNode,t))}for(;i<o.length;i+=1)o[i].d(1);o.length=n.length}},d(e){p(o,e),e&&m(t)}}}function it(e){let t,n,o,s=e[8](e[23].moduleId)+"";return{c(){t=g("p"),n=h(s),o=$(),b(t,"class","svelte-1jv7ege")},m(e,s){f(e,t,s),d(t,n),d(t,o)},p(e,t){1&t&&s!==(s=e[8](e[23].moduleId)+"")&&w(n,s)},d(e){e&&m(t)}}}function lt(e){let t,n,o,s,i,l,a,u,p,v,y,k,z,L,N,C,M,S,_,E,O,D,I,B,T=e[20].id+"",W=e[20].days+"";n=new we({props:{size:"18"}}),i=new Ce({props:{size:"18"}});let A=e[20].moduleList&&st(e);return{c(){t=g("div"),ee(n.$$.fragment),o=$(),s=g("div"),ee(i.$$.fragment),l=$(),a=g("div"),u=g("span"),p=$(),v=h(T),y=$(),k=g("div"),z=g("div"),z.textContent="Aktiv an den Tagen",L=$(),N=g("p"),C=h(W),M=$(),S=g("div"),_=g("div"),_.textContent="Aktive Module",E=$(),A&&A.c(),O=$(),b(t,"class","layout-card--icons edit svelte-1jv7ege"),b(s,"class","layout-card--icons delete svelte-1jv7ege"),b(u,"class","active-indicator svelte-1jv7ege"),j(u,"active",e[20].activated),b(a,"class","layout-card--title svelte-1jv7ege"),b(z,"class","layout-card--subtitle svelte-1jv7ege"),b(N,"class","svelte-1jv7ege"),b(k,"class","layout-card--section svelte-1jv7ege"),b(_,"class","layout-card--subtitle svelte-1jv7ege"),b(S,"class","layout-card--section svelte-1jv7ege")},m(r,m){f(r,t,m),te(n,t,null),f(r,o,m),f(r,s,m),te(i,s,null),f(r,l,m),f(r,a,m),d(a,u),d(a,p),d(a,v),f(r,y,m),f(r,k,m),d(k,z),d(k,L),d(k,N),d(N,C),f(r,M,m),f(r,S,m),d(S,_),d(S,E),A&&A.m(S,null),f(r,O,m),D=!0,I||(B=[x(t,"click",(function(){c(e[12](e[20]))&&e[12](e[20]).apply(this,arguments)})),x(s,"click",(function(){c(e[15](e[20]))&&e[15](e[20]).apply(this,arguments)}))],I=!0)},p(t,n){e=t,1&n&&j(u,"active",e[20].activated),(!D||1&n)&&T!==(T=e[20].id+"")&&w(v,T),(!D||1&n)&&W!==(W=e[20].days+"")&&w(C,W),e[20].moduleList?A?A.p(e,n):(A=st(e),A.c(),A.m(S,null)):A&&(A.d(1),A=null)},i(e){D||(U(n.$$.fragment,e),U(i.$$.fragment,e),D=!0)},o(e){K(n.$$.fragment,e),K(i.$$.fragment,e),D=!1},d(e){e&&m(t),ne(n),e&&m(o),e&&m(s),ne(i),e&&m(l),e&&m(a),e&&m(y),e&&m(k),e&&m(M),e&&m(S),A&&A.d(),e&&m(O),I=!1,r(B)}}}function rt(e){let t,n,o=null!=e[20].id&&ot(e);return{c(){o&&o.c(),t=y()},m(e,s){o&&o.m(e,s),f(e,t,s),n=!0},p(e,n){null!=e[20].id?o?(o.p(e,n),1&n&&U(o,1)):(o=ot(e),o.c(),U(o,1),o.m(t.parentNode,t)):o&&(V(),K(o,1,1,(()=>{o=null})),H())},i(e){n||(U(o),n=!0)},o(e){K(o),n=!1},d(e){o&&o.d(e),e&&m(t)}}}function ct(e){let t,n,o,s,i,l,r;function c(t){e[16](t)}let a={noClickaway:!0,$$slots:{default:[Qe]},$$scope:{ctx:e}};void 0!==e[3]&&(a.open=e[3]),n=new e[4]({props:a}),_.push((()=>Y(n,"open",c)));const u=[Ye,Xe],p=[];function v(e,t){return!e[0]||e[1]||e[2]?e[0]&&(e[1]||null!=e[2])?1:-1:0}return~(i=v(e))&&(l=p[i]=u[i](e)),{c(){t=g("div"),ee(n.$$.fragment),s=$(),l&&l.c()},m(e,o){f(e,t,o),te(n,t,null),d(t,s),~i&&p[i].m(t,null),r=!0},p(e,[s]){const r={};67108864&s&&(r.$$scope={dirty:s,ctx:e}),!o&&8&s&&(o=!0,r.open=e[3],W((()=>o=!1))),n.$set(r);let c=i;i=v(e),i===c?~i&&p[i].p(e,s):(l&&(V(),K(p[c],1,1,(()=>{p[c]=null})),H()),~i?(l=p[i],l?l.p(e,s):(l=p[i]=u[i](e),l.c()),U(l,1),l.m(t,null)):l=null)},i(e){r||(U(n.$$.fragment,e),U(l),r=!0)},o(e){K(n.$$.fragment,e),K(l),r=!1},d(e){e&&m(t),ne(n),~i&&p[i].d()}}}function at(e,o,s){const{Modal:i,Dialog:l,Button:r,Card:c}=t;let a,{settings:u}=o,d=!1;const f=M();function m(e){if(s(1,d=!1),s(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?s(0,u.dashboardLayout[t]=e.detail,u):u.dashboardLayout.unshift(e.detail),f("save")}let p,g=!1;return e.$$set=e=>{"settings"in e&&s(0,u=e.settings)},[u,d,a,g,i,l,r,c,function(e){return n.getModuleName(e)},m,function(){s(2,a=void 0),s(1,d=!1)},function(){s(2,a={id:"",activated:!0,days:[],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"9999",position:"1"}]}),s(1,d=!0)},function(e){s(2,a={id:e.id,activated:e.activated,days:[...e.days],moduleList:[...e.moduleList]})},function(){const e=u.dashboardLayout.findIndex((e=>e.id==p.id));-1!=e&&(u.dashboardLayout.splice(e,1),s(0,u),s(3,g=!1),f("save"))},function(){s(3,g=!1),p=void 0},function(e){p=e,s(3,g=!0)},function(e){g=e,s(3,g)},e=>m(e)]}class ut extends se{constructor(e){var t;super(),document.getElementById("svelte-1jv7ege-style")||((t=g("style")).id="svelte-1jv7ege-style",t.textContent=".btn-back.svelte-1jv7ege.svelte-1jv7ege{cursor:pointer;margin-right:1em}.btns-container.svelte-1jv7ege.svelte-1jv7ege{display:flex;gap:1em;margin-top:1em}.layout-cards.svelte-1jv7ege.svelte-1jv7ege{display:flex;flex-flow:row wrap;gap:2em}.layout-cards.svelte-1jv7ege .svelte-1jv7ege{width:200px}.layout-cards.svelte-1jv7ege .layout-card--icons.svelte-1jv7ege{cursor:pointer;position:absolute;width:auto}.layout-cards.svelte-1jv7ege .layout-card--icons.edit.svelte-1jv7ege{right:45px;top:16px}.layout-cards.svelte-1jv7ege .layout-card--icons.delete.svelte-1jv7ege{right:21px;top:16px}.layout-cards.svelte-1jv7ege .layout-card{position:relative;font-size:1em}.layout-cards.svelte-1jv7ege .layout-card--title.svelte-1jv7ege{font-weight:600;height:20px;display:flex;gap:0.5em;place-items:center;margin-bottom:1.5em;margin-top:1em}.layout-cards.svelte-1jv7ege .layout-card--subtitle.svelte-1jv7ege{font-weight:600;margin-bottom:0.5em}.layout-cards.svelte-1jv7ege .layout-card--section.svelte-1jv7ege{font-size:0.8em;margin-bottom:1.5em}.layout-cards.svelte-1jv7ege p.svelte-1jv7ege{margin:0.5 0 0 0}.active-indicator.svelte-1jv7ege.svelte-1jv7ege{height:15px;width:15px;border-radius:50%;display:inline-block;background-color:red}.active.svelte-1jv7ege.svelte-1jv7ege{background-color:green}",d(document.head,t)),oe(this,e,at,ct,a,{settings:0})}}function dt(e){let t,n,o,s,i,l,c,a,u,p,v,h,y;var w=e[1];function k(e){return{props:{settings:e[2]}}}return w&&(p=new w(k(e)),p.$on("save",e[6])),{c(){t=g("section"),n=g("div"),o=g("div"),o.textContent="Mein Konto",s=$(),i=g("div"),i.textContent="Benachrichtigungen",l=$(),c=g("div"),c.textContent="Layout",a=$(),u=g("div"),p&&ee(p.$$.fragment),b(o,"class","nav--item svelte-1x5ysxy"),j(o,"active",e[1]==ae),b(i,"class","nav--item svelte-1x5ysxy"),j(i,"active",e[1]==ve),b(c,"class","nav--item svelte-1x5ysxy"),j(c,"active",e[1]==ut),b(n,"class","container-setting--nav svelte-1x5ysxy"),b(u,"class","container-setting--content svelte-1x5ysxy"),b(t,"class","container-setting svelte-1x5ysxy")},m(r,m){f(r,t,m),d(t,n),d(n,o),d(n,s),d(n,i),d(n,l),d(n,c),d(t,a),d(t,u),p&&te(p,u,null),v=!0,h||(y=[x(o,"click",e[3]),x(i,"click",e[4]),x(c,"click",e[5])],h=!0)},p(e,t){2&t&&j(o,"active",e[1]==ae),2&t&&j(i,"active",e[1]==ve),2&t&&j(c,"active",e[1]==ut);const n={};if(4&t&&(n.settings=e[2]),w!==(w=e[1])){if(p){V();const e=p;K(e.$$.fragment,1,0,(()=>{ne(e,1)})),H()}w?(p=new w(k(e)),p.$on("save",e[6]),ee(p.$$.fragment),U(p.$$.fragment,1),te(p,u,null)):p=null}else w&&p.$set(n)},i(e){v||(p&&U(p.$$.fragment,e),v=!0)},o(e){p&&K(p.$$.fragment,e),v=!1},d(e){e&&m(t),p&&ne(p),h=!1,r(y)}}}function ft(e){let t,n,o=e[0]&&dt(e);return{c(){o&&o.c(),t=y()},m(e,s){o&&o.m(e,s),f(e,t,s),n=!0},p(e,[n]){e[0]?o?(o.p(e,n),1&n&&U(o,1)):(o=dt(e),o.c(),U(o,1),o.m(t.parentNode,t)):o&&(V(),K(o,1,1,(()=>{o=null})),H())},i(e){n||(U(o),n=!0)},o(e){K(o),n=!1},d(e){o&&o.d(e),e&&m(t)}}}function mt(e,t,s){let i;u(e,o,(e=>s(10,i=e)));let l,r,c,a,d,{injectedSettings:f}=t;const m=()=>{var e;s(2,(r={jobDescription:(e=f).jobDescription,showJobDescription:e.setting.showJobDescription,email:e.email,firstName:e.firstName,lastName:e.lastName},d=r)),s(1,l=ae)};async function p(){try{await n.saveUserSettings(f),s(0,f),function(e,t,n=t){e.set(n)}(o,i=f,i)}catch(e){console.log("settings could not be saved"),console.error(e)}}return m(),e.$$set=e=>{"injectedSettings"in e&&s(0,f=e.injectedSettings)},[f,l,d,m,()=>{var e;s(2,(c={notificationActivated:(e=f).setting.notificationActivated,showNotifications:e.setting.showNotifications,notificationToMail:e.setting.notificationToMail,typesOfNotification:e.setting.typesOfNotification},d=c)),s(1,l=ve)},()=>{s(2,(a={dashboardLayout:f.setting.dashboardLayout},d=a)),s(1,l=ut)},function(){l==ae?(s(0,f.jobDescription=r.jobDescription,f),s(0,f.setting.showJobDescription=r.showJobDescription,f),s(0,f.email=r.email,f),s(0,f.firstName=r.firstName,f),s(0,f.lastName=r.lastName,f),p()):l==ve?(s(0,f.setting.notificationActivated=c.notificationActivated,f),s(0,f.setting.showNotifications=c.showNotifications,f),s(0,f.setting.notificationToMail=c.notificationToMail,f),s(0,f.setting.typesOfNotification=c.typesOfNotification,f),p()):l==ut&&(s(0,f.setting.dashboardLayout=a.dashboardLayout,f),p())}]}class pt extends se{constructor(e){var t;super(),document.getElementById("svelte-1x5ysxy-style")||((t=g("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}",d(document.head,t)),oe(this,e,mt,ft,a,{injectedSettings:0})}}function gt(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function vt(e){let t,n;return t=new e[0]({props:{open:"true",noClickaway:"true",$$slots:{default:[$t,({closeCallback:e})=>({6:e}),({closeCallback:e})=>e?64:0]},$$scope:{ctx:e}}}),{c(){ee(t.$$.fragment)},m(e,o){te(t,e,o),n=!0},p(e,n){const o={};128&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(U(t.$$.fragment,e),n=!0)},o(e){K(t.$$.fragment,e),n=!1},d(e){ne(t,e)}}}function ht(e){let t,n,o,i;return o=new pt({props:{injectedSettings:e[5]}}),{c(){t=g("div"),t.innerHTML="<h2>Einstellungen</h2>",n=$(),ee(o.$$.fragment),b(t,"class","setting--title svelte-ltqsg7")},m(e,s){f(e,t,s),f(e,n,s),te(o,e,s),i=!0},p:s,i(e){i||(U(o.$$.fragment,e),i=!0)},o(e){K(o.$$.fragment,e),i=!1},d(e){e&&m(t),e&&m(n),ne(o,e)}}}function $t(e){let t,n,o=e[5]&&function(e){let t,n,o;return n=new e[1]({props:{constrainWidth:!0,closeCallback:function(){return e[2](e[6])},class:"modal_class",$$slots:{default:[ht]},$$scope:{ctx:e}}}),{c(){t=g("div"),ee(n.$$.fragment),b(t,"class","setting--modal svelte-ltqsg7")},m(e,s){f(e,t,s),te(n,t,null),o=!0},p(t,o){e=t;const s={};128&o&&(s.$$scope={dirty:o,ctx:e}),n.$set(s)},i(e){o||(U(n.$$.fragment,e),o=!0)},o(e){K(n.$$.fragment,e),o=!1},d(e){e&&m(t),ne(n)}}}(e);return{c(){o&&o.c(),t=y()},m(e,s){o&&o.m(e,s),f(e,t,s),n=!0},p(e,t){e[5]&&o.p(e,t)},i(e){n||(U(o),n=!0)},o(e){K(o),n=!1},d(e){o&&o.d(e),e&&m(t)}}}function yt(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function xt(e){let t,o,s={ctx:e,current:null,token:null,hasCatch:!1,pending:yt,then:vt,catch:gt,value:5,blocks:[,,,]};return R(n.getUserSettings(),s),{c(){t=y(),s.block.c()},m(e,n){f(e,t,n),s.block.m(e,s.anchor=n),s.mount=()=>t.parentNode,s.anchor=t,o=!0},p(t,[n]){Z(s,e=t,n)},i(e){o||(U(s.block),o=!0)},o(e){for(let e=0;e<3;e+=1){K(s.blocks[e])}o=!1},d(e){e&&m(t),s.block.d(e),s.token=null,s=null}}}function bt(e,s,i){let l;u(e,o,(e=>i(4,l=e))),C((async()=>{await n.getUserSettings(),console.log("settings :----------------\x3e ",l)}));const{Modal:r,Dialog:c}=t;return[r,c,e=>(window.singleSpaNavigate("/"),e())]}function wt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kt,jt,zt=(kt=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){s(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 s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==i(e))throw new Error("single-spa-svelte requires a configuration object");var t=o(o({},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 s=Object.keys(l),i=Object.keys(e).reduce((function(t,n){return s.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var s=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=s();t.instance=new e.component(o(o({},i),{},{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)}))}},kt(jt={exports:{}},jt.exports),jt.exports);const Lt=wt(zt)({component:class extends se{constructor(e){var t;super(),document.getElementById("svelte-ltqsg7-style")||((t=g("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}",d(document.head,t)),oe(this,e,bt,xt,a,{})}},domElementGetter:()=>document.getElementById("view-app")}),{bootstrap:Nt,mount:Ct,unmount:Mt}=Lt;e({bootstrap:Nt,mount:Ct,unmount:Mt})}}}));
|
|
1
|
+
System.register(["@enablerr-ui/layout","@enablerr-ui/form"],(function(e){"use strict";var t,n,o,i;return{setters:[function(e){t=e.getAttractions},function(e){n=e.Request,o=e.settings,i=e.toasts}],execute:function(){e("version","0.2.8");function s(){}function l(e){return e()}function r(){return Object.create(null)}function c(e){e.forEach(l)}function a(e){return"function"==typeof e}function u(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function d(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 f(e,t){e.appendChild(t)}function m(e,t,n){e.insertBefore(t,n||null)}function p(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 h(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function $(e){return document.createTextNode(e)}function y(){return $(" ")}function x(){return $("")}function b(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function w(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function k(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function j(e,t){e.value=null==t?"":t}function z(e,t,n){e.classList[n?"add":"remove"](t)}let L;function N(e){L=e}function C(){if(!L)throw new Error("Function called outside component initialization");return L}function S(e){C().$$.on_mount.push(e)}function M(){const e=C();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 _=[],E=[],O=[],T=[],D=Promise.resolve();let I=!1;function B(){I||(I=!0,D.then(J))}function W(e){O.push(e)}function A(e){T.push(e)}let P=!1;const q=new Set;function J(){if(!P){P=!0;do{for(let e=0;e<_.length;e+=1){const t=_[e];N(t),F(t.$$)}for(N(null),_.length=0;E.length;)E.pop()();for(let e=0;e<O.length;e+=1){const t=O[e];q.has(t)||(q.add(t),t())}O.length=0}while(_.length);for(;T.length;)T.pop()();I=!1,P=!1,q.clear()}}function F(e){if(null!==e.fragment){e.update(),c(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(W)}}const G=new Set;let V;function H(){V={r:0,c:[],p:V}}function U(){V.r||c(V.c),V=V.p}function K(e,t){e&&e.i&&(G.delete(e),e.i(t))}function R(e,t,n,o){if(e&&e.o){if(G.has(e))return;G.add(e),V&&V.c.push((()=>{G.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function Z(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&&(H(),R(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),U())})):t.block.d(1),r.c(),K(r,1),r.m(t.mount(),t.anchor),c=!0),t.block=r,t.blocks&&(t.blocks[o]=r),c&&J()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=C();if(e.then((e=>{N(n),o(t.then,1,t.value,e),N(null)}),(e=>{if(N(n),o(t.catch,2,t.error,e),N(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 Q(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 X="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Y(e,t){R(e,1,1,(()=>{t.delete(e.key)}))}function ee(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function te(e){e&&e.c()}function ne(e,t,n,o){const{fragment:i,on_mount:s,on_destroy:r,after_update:u}=e.$$;i&&i.m(t,n),o||W((()=>{const t=s.map(l).filter(a);r?r.push(...t):c(t),e.$$.on_mount=[]})),u.forEach(W)}function oe(e,t){const n=e.$$;null!==n.fragment&&(c(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ie(e,t,n,o,i,l,a=[-1]){const u=L;N(e);const d=e.$$={fragment:null,ctx:null,props:l,update:s,not_equal:i,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:t.context||[]),callbacks:r(),dirty:a,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),B(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],d.update(),f=!0,c(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&&K(e.$$.fragment),ne(e,t.target,t.anchor,t.customElement),J()}N(u)}class se{$destroy(){oe(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 le(e){let t,n,o,i,s,l,r,c,a,u,d,g,h,$,x,k,j,z,L,N,C,S,M,_,O,T,D,I,B,W,P,q,J,F,G,V,H,U,Z,Q,X,Y,ie,se;function le(t){e[4](t)}let ce={placeholder:"Berufsbezeichnung"};function ae(t){e[6](t)}void 0!==e[0].jobDescription&&(ce.value=e[0].jobDescription),l=new e[2]({props:ce}),E.push((()=>ee(l,"value",le))),z=new e[2]({props:{placeholder:"E-Mail",disabled:!0,value:e[0].email}});let ue={placeholder:"Vorname"};function de(t){e[7](t)}void 0!==e[0].firstName&&(ue.value=e[0].firstName),_=new e[2]({props:ue}),E.push((()=>ee(_,"value",ae)));let fe={placeholder:"Nachname"};function me(t){e[8](t)}void 0!==e[0].lastName&&(fe.value=e[0].lastName),P=new e[2]({props:fe}),E.push((()=>ee(P,"value",de)));let pe={placeholder:"Titel"};return void 0!==e[0].listTitle&&(pe.value=e[0].listTitle),U=new e[2]({props:pe}),E.push((()=>ee(U,"value",me))),X=new e[1]({props:{filled:!0,$$slots:{default:[re]},$$scope:{ctx:e}}}),X.$on("click",e[3]),{c(){t=v("form"),n=v("div"),o=v("div"),o.textContent="Berufsbezeichnung",i=y(),s=v("div"),te(l.$$.fragment),c=y(),a=v("div"),u=v("input"),d=y(),g=v("label"),g.textContent="Meine Berufsbezeichnung in meinem Profil anzeigen.",h=y(),$=v("div"),x=v("div"),x.textContent="E-Mail",k=y(),j=v("div"),te(z.$$.fragment),L=y(),N=v("div"),C=v("div"),C.textContent="Vorname",S=y(),M=v("div"),te(_.$$.fragment),T=y(),D=v("div"),I=v("div"),I.textContent="Nachname",B=y(),W=v("div"),te(P.$$.fragment),J=y(),F=v("div"),G=v("div"),G.textContent="Titel Aufgabenliste",V=y(),H=v("div"),te(U.$$.fragment),Q=y(),te(X.$$.fragment),w(o,"class","form-field--label"),w(u,"type","checkbox"),w(u,"id","showJobDesc"),w(u,"name","shwoJobDescriptionInBio"),w(g,"for","showJobDesc"),w(a,"class","checkbox"),w(s,"class","form-field--content"),w(n,"class","form-field"),w(x,"class","form-field--label"),w(j,"class","form-field--content"),w($,"class","form-field"),w(C,"class","form-field--label"),w(M,"class","form-field--content"),w(N,"class","form-field"),w(I,"class","form-field--label"),w(W,"class","form-field--content"),w(D,"class","form-field"),w(G,"class","form-field--label"),w(H,"class","form-field--content"),w(F,"class","form-field"),w(t,"class","form-setting")},m(r,p){m(r,t,p),f(t,n),f(n,o),f(n,i),f(n,s),ne(l,s,null),f(s,c),f(s,a),f(a,u),u.checked=e[0].showJobDescription,f(a,d),f(a,g),f(t,h),f(t,$),f($,x),f($,k),f($,j),ne(z,j,null),f(t,L),f(t,N),f(N,C),f(N,S),f(N,M),ne(_,M,null),f(t,T),f(t,D),f(D,I),f(D,B),f(D,W),ne(P,W,null),f(t,J),f(t,F),f(F,G),f(F,V),f(F,H),ne(U,H,null),m(r,Q,p),ne(X,r,p),Y=!0,ie||(se=b(u,"change",e[5]),ie=!0)},p(e,t){const n={};!r&&1&t&&(r=!0,n.value=e[0].jobDescription,A((()=>r=!1))),l.$set(n),1&t&&(u.checked=e[0].showJobDescription);const o={};1&t&&(o.value=e[0].email),z.$set(o);const i={};!O&&1&t&&(O=!0,i.value=e[0].firstName,A((()=>O=!1))),_.$set(i);const s={};!q&&1&t&&(q=!0,s.value=e[0].lastName,A((()=>q=!1))),P.$set(s);const c={};!Z&&1&t&&(Z=!0,c.value=e[0].listTitle,A((()=>Z=!1))),U.$set(c);const a={};2048&t&&(a.$$scope={dirty:t,ctx:e}),X.$set(a)},i(e){Y||(K(l.$$.fragment,e),K(z.$$.fragment,e),K(_.$$.fragment,e),K(P.$$.fragment,e),K(U.$$.fragment,e),K(X.$$.fragment,e),Y=!0)},o(e){R(l.$$.fragment,e),R(z.$$.fragment,e),R(_.$$.fragment,e),R(P.$$.fragment,e),R(U.$$.fragment,e),R(X.$$.fragment,e),Y=!1},d(e){e&&p(t),oe(l),oe(z),oe(_),oe(P),oe(U),e&&p(Q),oe(X,e),ie=!1,se()}}}function re(e){let t;return{c(){t=$("Speichern")},m(e,n){m(e,t,n)},d(e){e&&p(t)}}}function ce(e){let t,n,o,i,s=e[0]&&le(e);return{c(){t=v("div"),n=v("h2"),n.textContent="Mein Profil",o=y(),s&&s.c()},m(e,l){m(e,t,l),f(t,n),f(t,o),s&&s.m(t,null),i=!0},p(e,[n]){e[0]?s?(s.p(e,n),1&n&&K(s,1)):(s=le(e),s.c(),K(s,1),s.m(t,null)):s&&(H(),R(s,1,1,(()=>{s=null})),U())},i(e){i||(K(s),i=!0)},o(e){R(s),i=!1},d(e){e&&p(t),s&&s.d()}}}function ae(e,n,o){const{Button:i,TextField:s,FormField:l}=t;let{settings:r}=n;const c=M();return e.$$set=e=>{"settings"in e&&o(0,r=e.settings)},[r,i,s,function(){c("save")},function(t){e.$$.not_equal(r.jobDescription,t)&&(r.jobDescription=t,o(0,r))},function(){r.showJobDescription=this.checked,o(0,r)},function(t){e.$$.not_equal(r.firstName,t)&&(r.firstName=t,o(0,r))},function(t){e.$$.not_equal(r.lastName,t)&&(r.lastName=t,o(0,r))},function(t){e.$$.not_equal(r.listTitle,t)&&(r.listTitle=t,o(0,r))}]}class ue extends se{constructor(e){super(),ie(this,e,ae,ce,u,{settings:0})}}function de(e,t,n){const o=e.slice();return o[11]=t[n],o}function fe(e){let t,n,o,i,s,l,r,c,a,u,d,h,$,x,b,k,j,z,L,N,C,S,M,_,O,T,D,I,B;function W(t){e[6](t)}let P={};function q(t){e[7](t)}void 0!==e[0].notificationActivated&&(P.value=e[0].notificationActivated),l=new e[3]({props:P}),E.push((()=>ee(l,"value",W)));let J={};function F(t){e[8](t)}void 0!==e[0].showNotifications&&(J.value=e[0].showNotifications),$=new e[3]({props:J}),E.push((()=>ee($,"value",q)));let G={};void 0!==e[0].notificationToMail&&(G.value=e[0].notificationToMail),N=new e[3]({props:G}),E.push((()=>ee(N,"value",F)));let V=e[1],H=[];for(let t=0;t<V.length;t+=1)H[t]=me(de(e,V,t));return I=new e[2]({props:{filled:!0,$$slots:{default:[pe]},$$scope:{ctx:e}}}),I.$on("click",e[4]),{c(){t=v("form"),n=v("div"),o=v("div"),o.textContent="Benachrichtigungen aktivieren",i=y(),s=v("div"),te(l.$$.fragment),c=y(),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=y(),h=v("div"),te($.$$.fragment),b=y(),k=v("div"),j=v("div"),j.textContent="Benachrichtigungen an E-Mail senden",z=y(),L=v("div"),te(N.$$.fragment),S=y(),M=v("div"),_=v("div"),_.innerHTML='Arten von Benachrichtigungen\n <p class="helptext">Wählen Sie aus, welche Arten von Benachrichtigungen Sie sehen\n möchten.</p>',O=y(),T=v("div");for(let e=0;e<H.length;e+=1)H[e].c();D=y(),te(I.$$.fragment),w(o,"class","form-field--label switch"),w(s,"class","form-field--content"),w(n,"class","form-field"),w(u,"class","form-field--label switch"),w(h,"class","form-field--content"),w(a,"class","form-field"),w(j,"class","form-field--label switch"),w(L,"class","form-field--content"),w(k,"class","form-field"),w(_,"class","form-field--label"),w(T,"class","form-field--content"),w(M,"class","form-field"),w(t,"class","form-setting")},m(e,r){m(e,t,r),f(t,n),f(n,o),f(n,i),f(n,s),ne(l,s,null),f(t,c),f(t,a),f(a,u),f(a,d),f(a,h),ne($,h,null),f(t,b),f(t,k),f(k,j),f(k,z),f(k,L),ne(N,L,null),f(t,S),f(t,M),f(M,_),f(M,O),f(M,T);for(let e=0;e<H.length;e+=1)H[e].m(T,null);m(e,D,r),ne(I,e,r),B=!0},p(e,t){const n={};!r&&1&t&&(r=!0,n.value=e[0].notificationActivated,A((()=>r=!1))),l.$set(n);const o={};!x&&1&t&&(x=!0,o.value=e[0].showNotifications,A((()=>x=!1))),$.$set(o);const i={};if(!C&&1&t&&(C=!0,i.value=e[0].notificationToMail,A((()=>C=!1))),N.$set(i),35&t){let n;for(V=e[1],n=0;n<V.length;n+=1){const o=de(e,V,n);H[n]?H[n].p(o,t):(H[n]=me(o),H[n].c(),H[n].m(T,null))}for(;n<H.length;n+=1)H[n].d(1);H.length=V.length}const s={};16384&t&&(s.$$scope={dirty:t,ctx:e}),I.$set(s)},i(e){B||(K(l.$$.fragment,e),K($.$$.fragment,e),K(N.$$.fragment,e),K(I.$$.fragment,e),B=!0)},o(e){R(l.$$.fragment,e),R($.$$.fragment,e),R(N.$$.fragment,e),R(I.$$.fragment,e),B=!1},d(e){e&&p(t),oe(l),oe($),oe(N),g(H,e),e&&p(D),oe(I,e)}}}function me(e){let t,n,o,i,s,l,r,c,u,d,g,h=e[11].type+"";return{c(){t=v("div"),n=v("input"),s=y(),l=v("label"),r=$(h),u=y(),n.checked=o=e[0].typesOfNotification.includes(e[11].type),w(n,"type","checkbox"),w(n,"id",i=e[11].id),w(l,"for",c=e[11].id)},m(o,i){m(o,t,i),f(t,n),f(t,s),f(t,l),f(l,r),f(t,u),d||(g=b(n,"change",(function(){a(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)&&w(n,"id",i),2&s&&h!==(h=e[11].type+"")&&k(r,h),2&s&&c!==(c=e[11].id)&&w(l,"for",c)},d(e){e&&p(t),d=!1,g()}}}function pe(e){let t;return{c(){t=$("Speichern")},m(e,n){m(e,t,n)},d(e){e&&p(t)}}}function ge(e){let t,n,o,i,s=e[0]&&fe(e);return{c(){t=v("div"),n=v("h2"),n.textContent="Meine Benachrichtigungen",o=y(),s&&s.c()},m(e,l){m(e,t,l),f(t,n),f(t,o),s&&s.m(t,null),i=!0},p(e,[n]){e[0]?s?(s.p(e,n),1&n&&K(s,1)):(s=fe(e),s.c(),K(s,1),s.m(t,null)):s&&(H(),R(s,1,1,(()=>{s=null})),U())},i(e){i||(K(s),i=!0)},o(e){R(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=M();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 he extends se{constructor(e){super(),ie(this,e,ve,ge,u,{settings:0})}}function $e(e){let t,n,o,i;return{c(){t=h("svg"),n=h("line"),o=h("polyline"),w(n,"x1","19"),w(n,"y1","12"),w(n,"x2","5"),w(n,"y2","12"),w(o,"points","12 19 5 12 12 5"),w(t,"xmlns","http://www.w3.org/2000/svg"),w(t,"width",e[0]),w(t,"height",e[0]),w(t,"fill","none"),w(t,"viewBox","0 0 24 24"),w(t,"stroke","currentColor"),w(t,"stroke-width",e[1]),w(t,"stroke-linecap","round"),w(t,"stroke-linejoin","round"),w(t,"class",i="feather feather-arrow-left "+e[2])},m(e,i){m(e,t,i),f(t,n),f(t,o)},p(e,[n]){1&n&&w(t,"width",e[0]),1&n&&w(t,"height",e[0]),2&n&&w(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-arrow-left "+e[2])&&w(t,"class",i)},i:s,o:s,d(e){e&&p(t)}}}function ye(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 xe extends se{constructor(e){super(),ie(this,e,ye,$e,u,{size:0,strokeWidth:1,class:2})}}function be(e){let t,n,o,i;return{c(){t=h("svg"),n=h("path"),o=h("path"),w(n,"d","M12 20h9"),w(o,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"),w(t,"xmlns","http://www.w3.org/2000/svg"),w(t,"width",e[0]),w(t,"height",e[0]),w(t,"fill","none"),w(t,"viewBox","0 0 24 24"),w(t,"stroke","currentColor"),w(t,"stroke-width",e[1]),w(t,"stroke-linecap","round"),w(t,"stroke-linejoin","round"),w(t,"class",i="feather feather-edit-3 "+e[2])},m(e,i){m(e,t,i),f(t,n),f(t,o)},p(e,[n]){1&n&&w(t,"width",e[0]),1&n&&w(t,"height",e[0]),2&n&&w(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-edit-3 "+e[2])&&w(t,"class",i)},i:s,o:s,d(e){e&&p(t)}}}function we(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 ke extends se{constructor(e){super(),ie(this,e,we,be,u,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,o,i;return{c(){t=h("svg"),n=h("line"),o=h("line"),w(n,"x1","12"),w(n,"y1","5"),w(n,"x2","12"),w(n,"y2","19"),w(o,"x1","5"),w(o,"y1","12"),w(o,"x2","19"),w(o,"y2","12"),w(t,"xmlns","http://www.w3.org/2000/svg"),w(t,"width",e[0]),w(t,"height",e[0]),w(t,"fill","none"),w(t,"viewBox","0 0 24 24"),w(t,"stroke","currentColor"),w(t,"stroke-width",e[1]),w(t,"stroke-linecap","round"),w(t,"stroke-linejoin","round"),w(t,"class",i="feather feather-plus "+e[2])},m(e,i){m(e,t,i),f(t,n),f(t,o)},p(e,[n]){1&n&&w(t,"width",e[0]),1&n&&w(t,"height",e[0]),2&n&&w(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-plus "+e[2])&&w(t,"class",i)},i:s,o:s,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 Le extends se{constructor(e){super(),ie(this,e,ze,je,u,{size:0,strokeWidth:1,class:2})}}function Ne(e){let t,n,o,i,l,r;return{c(){t=h("svg"),n=h("polyline"),o=h("path"),i=h("line"),l=h("line"),w(n,"points","3 6 5 6 21 6"),w(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"),w(i,"x1","10"),w(i,"y1","11"),w(i,"x2","10"),w(i,"y2","17"),w(l,"x1","14"),w(l,"y1","11"),w(l,"x2","14"),w(l,"y2","17"),w(t,"xmlns","http://www.w3.org/2000/svg"),w(t,"width",e[0]),w(t,"height",e[0]),w(t,"fill","none"),w(t,"viewBox","0 0 24 24"),w(t,"stroke","currentColor"),w(t,"stroke-width",e[1]),w(t,"stroke-linecap","round"),w(t,"stroke-linejoin","round"),w(t,"class",r="feather feather-trash-2 "+e[2])},m(e,s){m(e,t,s),f(t,n),f(t,o),f(t,i),f(t,l)},p(e,[n]){1&n&&w(t,"width",e[0]),1&n&&w(t,"height",e[0]),2&n&&w(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-trash-2 "+e[2])&&w(t,"class",r)},i:s,o:s,d(e){e&&p(t)}}}function Ce(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 se{constructor(e){super(),ie(this,e,Ce,Ne,u,{size:0,strokeWidth:1,class:2})}}const{Map:Me}=X;function _e(e,t,n){const o=e.slice();return o[28]=t[n],o}function Ee(e,t,n){const o=e.slice();return o[32]=t[n],o[34]=n,o}function Oe(e){let t,n,o,i,s,l,r,a,u,d,h,$,x,k,z,L,N,C,S,M,_,O,T,D,I,B,W,P,q,J,F,G,V,H,U;function X(t){e[15](t)}let Y={type:"text",placeholder:"Neuer Layout Name"};function ie(t){e[16](t)}void 0!==e[0].id&&(Y.value=e[0].id),i=new e[5]({props:Y}),E.push((()=>ee(i,"value",X)));let se={slotLeft:!0,$$slots:{default:[Te]},$$scope:{ctx:e}};void 0!==e[0].activated&&(se.value=e[0].activated),a=new e[9]({props:se}),E.push((()=>ee(a,"value",ie))),h=new e[6]({});let le={ctx:e,current:null,token:null,hasCatch:!1,pending:Pe,then:Ie,catch:De,value:31,blocks:[,,,]};Z(S=e[2],le),_=new e[6]({});let re=e[10],ce=[];for(let t=0;t<re.length;t+=1)ce[t]=qe(_e(e,re,t));let ae=e[4]&&Je();return G=new e[8]({props:{filled:!0,class:"saveBtnLayout",$$slots:{default:[Fe]},$$scope:{ctx:e}}}),G.$on("click",e[23]),{c(){t=v("div"),n=v("p"),n.textContent="Name des Layouts",o=y(),te(i.$$.fragment),l=y(),r=v("div"),te(a.$$.fragment),d=y(),te(h.$$.fragment),$=y(),x=v("div"),k=v("label"),k.textContent="Vorhandene Module",z=y(),L=v("input"),N=y(),C=v("div"),le.block.c(),M=y(),te(_.$$.fragment),O=y(),T=v("div"),D=v("h1"),D.textContent="Wochentage",I=y(),B=v("p"),B.textContent="Wählen Sie die Tage, an denen die Vorlage angezeigt werden soll.",W=y(),P=v("div");for(let e=0;e<ce.length;e+=1)ce[e].c();q=y(),ae&&ae.c(),J=y(),F=v("div"),te(G.$$.fragment),w(r,"class","layout-activated-switch svelte-1vkufz4"),w(k,"for","moduleSearch"),w(k,"id","textModule"),w(k,"class","svelte-1vkufz4"),w(L,"id","moduleSearch"),w(L,"type","search"),w(L,"placeholder","suche..."),w(L,"class","search_bar svelte-1vkufz4"),w(x,"class","module svelte-1vkufz4"),w(C,"class","moduleCards svelte-1vkufz4"),w(P,"class","weekdays svelte-1vkufz4"),w(F,"class","saveBtnDiv svelte-1vkufz4"),w(t,"class","newLayoutContent")},m(s,c){m(s,t,c),f(t,n),f(t,o),ne(i,t,null),f(t,l),f(t,r),ne(a,r,null),f(t,d),ne(h,t,null),f(t,$),f(t,x),f(x,k),f(x,z),f(x,L),j(L,e[3]),f(t,N),f(t,C),le.block.m(C,le.anchor=null),le.mount=()=>C,le.anchor=null,f(t,M),ne(_,t,null),f(t,O),f(t,T),f(T,D),f(T,I),f(T,B),f(T,W),f(T,P);for(let e=0;e<ce.length;e+=1)ce[e].m(P,null);f(t,q),ae&&ae.m(t,null),f(t,J),f(t,F),ne(G,F,null),V=!0,H||(U=[b(L,"input",e[17]),b(L,"input",e[18])],H=!0)},p(n,o){e=n;const l={};!s&&1&o[0]&&(s=!0,l.value=e[0].id,A((()=>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,A((()=>u=!1))),a.$set(r),8&o[0]&&j(L,e[3]),le.ctx=e,4&o[0]&&S!==(S=e[2])&&Z(S,le)||Q(le,e,o),17409&o[0]){let t;for(re=e[10],t=0;t<re.length;t+=1){const n=_e(e,re,t);ce[t]?ce[t].p(n,o):(ce[t]=qe(n),ce[t].c(),ce[t].m(P,null))}for(;t<ce.length;t+=1)ce[t].d(1);ce.length=re.length}e[4]?ae||(ae=Je(),ae.c(),ae.m(t,J)):ae&&(ae.d(1),ae=null);const c={};16&o[1]&&(c.$$scope={dirty:o,ctx:e}),G.$set(c)},i(e){V||(K(i.$$.fragment,e),K(a.$$.fragment,e),K(h.$$.fragment,e),K(le.block),K(_.$$.fragment,e),K(G.$$.fragment,e),V=!0)},o(e){R(i.$$.fragment,e),R(a.$$.fragment,e),R(h.$$.fragment,e);for(let e=0;e<3;e+=1){R(le.blocks[e])}R(_.$$.fragment,e),R(G.$$.fragment,e),V=!1},d(e){e&&p(t),oe(i),oe(a),oe(h),le.block.d(),le.token=null,le=null,oe(_),g(ce,e),ae&&ae.d(),oe(G),H=!1,c(U)}}}function Te(e){let t;return{c(){t=v("span"),t.textContent="Aktivieren Sie das Modul",w(t,"class","mr svelte-1vkufz4")},m(e,n){m(e,t,n)},d(e){e&&p(t)}}}function De(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function Ie(e){let t,n,o=[],i=new Me,s=e[31];const l=e=>e[34];for(let t=0;t<s.length;t+=1){let n=Ee(e,s,t),r=l(n);i.set(r,o[t]=Ae(r,n))}return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=x()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);m(e,t,i),n=!0},p(e,n){2053&n[0]&&(s=e[31],H(),o=function(e,t,n,o,i,s,l,r,c,a,u,d){let f=e.length,m=s.length,p=f;const g={};for(;p--;)g[e[p].key]=p;const v=[],h=new Map,$=new Map;for(p=m;p--;){const e=d(i,s,p),r=n(e);let c=l.get(r);c?o&&c.p(e,t):(c=a(r,e),c.c()),h.set(r,v[p]=c),r in g&&$.set(r,Math.abs(p-g[r]))}const y=new Set,x=new Set;function b(e){K(e,1),e.m(r,u),l.set(e.key,e),u=e.first,m--}for(;f&&m;){const t=v[m-1],n=e[f-1],o=t.key,i=n.key;t===n?(u=t.first,f--,m--):h.has(i)?!l.has(o)||y.has(o)?b(t):x.has(i)?f--:$.get(o)>$.get(i)?(x.add(o),b(t)):(y.add(i),f--):(c(n,l),f--)}for(;f--;){const t=e[f];h.has(t.key)||c(t,l)}for(;m;)b(v[m-1]);return v}(o,n,l,1,e,s,i,t.parentNode,Y,Ae,t,Ee),U())},i(e){if(!n){for(let e=0;e<s.length;e+=1)K(o[e]);n=!0}},o(e){for(let e=0;e<o.length;e+=1)R(o[e]);n=!1},d(e){for(let t=0;t<o.length;t+=1)o[t].d(e);e&&p(t)}}}function Be(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=v("span"),n=$(o),w(t,"class","centerText svelte-1vkufz4")},m(e,o){m(e,t,o),f(t,n)},p(t,s){e=t,5&s[0]&&o!==(o=-1!=e[0].moduleList.findIndex(i)?"abwählen":"wählen")&&k(n,o)},d(e){e&&p(t)}}}function We(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:[Be]},$$scope:{ctx:e}}}),o.$on("click",(function(){return e[21](e[32])})),{c(){t=$(l),n=y(),te(o.$$.fragment),i=y()},m(e,l){m(e,t,l),m(e,n,l),ne(o,e,l),m(e,i,l),s=!0},p(n,i){e=n,(!s||4&i[0])&&l!==(l=e[32].name+"")&&k(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||(K(o.$$.fragment,e),s=!0)},o(e){R(o.$$.fragment,e),s=!1},d(e){e&&p(t),e&&p(n),oe(o,e),e&&p(i)}}}function Ae(e,t){let n,o,i;return o=new t[7]({props:{style:"margin: 20px",$$slots:{default:[We]},$$scope:{ctx:t}}}),{key:e,first:null,c(){n=x(),te(o.$$.fragment),this.first=n},m(e,t){m(e,n,t),ne(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||(K(o.$$.fragment,e),i=!0)},o(e){R(o.$$.fragment,e),i=!1},d(e){e&&p(n),oe(o,e)}}}function Pe(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function qe(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=v("div"),n=v("input"),i=y(),s=v("label"),l=$(u),r=y(),n.checked=o=e[0].days.includes(e[28].value),w(n,"type","checkbox"),w(n,"id",e[28].value),w(n,"class","svelte-1vkufz4"),w(s,"for",e[28].value),w(t,"class","day svelte-1vkufz4")},m(e,o){m(e,t,o),f(t,n),f(t,i),f(t,s),f(s,l),f(t,r),c||(a=b(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 Je(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.",w(t,"class","errroWeekdaysOverlapping svelte-1vkufz4")},m(e,n){m(e,t,n)},d(e){e&&p(t)}}}function Fe(e){let t;return{c(){t=$("Layout speichern")},m(e,n){m(e,t,n)},d(e){e&&p(t)}}}function Ge(e){let t,n,o=e[0]&&e[1]&&Oe(e);return{c(){t=v("div"),o&&o.c(),w(t,"class","newLayoutContainer")},m(e,i){m(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]&&K(o,1)):(o=Oe(e),o.c(),K(o,1),o.m(t,null)):o&&(H(),R(o,1,1,(()=>{o=null})),U())},i(e){n||(K(o),n=!0)},o(e){R(o),n=!1},d(e){e&&p(t),o&&o.d()}}}function Ve(e,o,i){let s;const{TextField:l,Divider:r,Card:c,Button:a,Switch:u}=t,d=M(),f=n.getAllModules().map((e=>({...e,isSelected:!1})));let m=f,{settings:p}=o,{layout:g}=o,v=new Map;S((async()=>{await p,await(B(),D)}));let h=[{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 $(e){const t=g.moduleList.findIndex((t=>t.moduleId==e.id));-1==t?g.moduleList.splice(g.moduleList.length-1,0,{moduleId:e.id.toString(),position:g.moduleList.length.toString()}):g.moduleList.splice(t,1),i(0,g)}let y="";function x(){i(2,m=f.filter((e=>e.name.toLowerCase().includes(y.toLowerCase()))))}function b(){if(""!=g.id&&0!=g.moduleList.length){for(let[e,t]of v){const n=p.dashboardLayout[e];t.forEach((e=>{const t=n.days.findIndex((t=>e==t));n.days.splice(t,1)})),i(1,p.dashboardLayout[e]=n,p)}d("save",g)}}function w(e,t){if(e.target.checked)g.days.unshift(t);else{const e=g.days.findIndex((e=>e==t));g.days.splice(e,1)}i(0,g.days=h.filter((e=>g.days.includes(e.value))).map((e=>e.value)),g)}return e.$$set=e=>{"settings"in e&&i(1,p=e.settings),"layout"in e&&i(0,g=e.layout)},e.$$.update=()=>{1&e.$$.dirty[0]&&i(4,s=function(e){v=new Map;let t=!1;return p.dashboardLayout.forEach(((n,o)=>{n.id!=g.id&&n.activated&&e.forEach(((e,i)=>{if(n.days.includes(e))return t=!0,v.has(o)?void v.get(o).push(e):void v.set(o,[e])}))})),t}(g.days))},[g,p,m,y,s,l,r,c,a,u,h,$,x,b,w,function(t){e.$$.not_equal(g.id,t)&&(g.id=t,i(0,g))},function(t){e.$$.not_equal(g.activated,t)&&(g.activated=t,i(0,g))},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=>$(e),(e,t)=>w(t,e.value),()=>b()]}class He extends se{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}",f(document.head,t)),ie(this,e,Ve,Ge,u,{settings:1,layout:0},[-1,-1])}}function Ue(e,t,n){const o=e.slice();return o[20]=t[n],o}function Ke(e,t,n){const o=e.slice();return o[23]=t[n],o}function Re(e){let t;return{c(){t=$("Abbrechen")},m(e,n){m(e,t,n)},d(e){e&&p(t)}}}function Ze(e){let t;return{c(){t=$("Layout löschen")},m(e,n){m(e,t,n)},d(e){e&&p(t)}}}function Qe(e){let t,n,o,i,s,l,r;return i=new e[6]({props:{filled:!0,$$slots:{default:[Re]},$$scope:{ctx:e}}}),i.$on("click",e[14]),l=new e[6]({props:{filled:!0,$$slots:{default:[Ze]},$$scope:{ctx:e}}}),l.$on("click",e[13]),{c(){t=v("div"),t.textContent="Wollen Sie das Layout wirklich löschen?",n=y(),o=v("div"),te(i.$$.fragment),s=y(),te(l.$$.fragment),w(o,"class","btns-container svelte-1jv7ege")},m(e,c){m(e,t,c),m(e,n,c),m(e,o,c),ne(i,o,null),f(o,s),ne(l,o,null),r=!0},p(e,t){const n={};67108864&t&&(n.$$scope={dirty:t,ctx:e}),i.$set(n);const o={};67108864&t&&(o.$$scope={dirty:t,ctx:e}),l.$set(o)},i(e){r||(K(i.$$.fragment,e),K(l.$$.fragment,e),r=!0)},o(e){R(i.$$.fragment,e),R(l.$$.fragment,e),r=!1},d(e){e&&p(t),e&&p(n),e&&p(o),oe(i),oe(l)}}}function Xe(e){let t,n;return t=new e[5]({props:{title:"Delete of Modal",$$slots:{default:[Qe]},$$scope:{ctx:e}}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};67108864&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(K(t.$$.fragment,e),n=!0)},o(e){R(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function Ye(e){let t,n,o,i,s,l,r,c,a,u,d;function g(e,t){return e[1]?nt:tt}s=new xe({props:{size:"24"}});let h=g(e),$=h(e);return c=new He({props:{layout:e[2],settings:e[0]}}),c.$on("save",e[17]),{c(){t=v("div"),n=v("div"),o=v("h2"),i=v("span"),te(s.$$.fragment),l=y(),$.c(),r=y(),te(c.$$.fragment),w(i,"class","btn-back svelte-1jv7ege")},m(p,g){m(p,t,g),f(t,n),f(n,o),f(o,i),ne(s,i,null),f(o,l),$.m(o,null),f(t,r),ne(c,t,null),a=!0,u||(d=b(i,"click",e[10]),u=!0)},p(e,t){h===(h=g(e))&&$?$.p(e,t):($.d(1),$=h(e),$&&($.c(),$.m(o,null)));const n={};4&t&&(n.layout=e[2]),1&t&&(n.settings=e[0]),c.$set(n)},i(e){a||(K(s.$$.fragment,e),K(c.$$.fragment,e),a=!0)},o(e){R(s.$$.fragment,e),R(c.$$.fragment,e),a=!1},d(e){e&&p(t),oe(s),$.d(),oe(c),u=!1,d()}}}function et(e){let t,n,o,i,s,l,r,c,a;o=new e[6]({props:{$$slots:{default:[ot]},$$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]=ct(Ue(e,u,t));const h=e=>R(d[e],1,1,(()=>{d[e]=null}));return{c(){t=v("h2"),t.textContent="Mein Layout",n=y(),te(o.$$.fragment),i=y(),s=v("div"),l=v("p"),l.textContent="Dies sind Ihre vorhandenen Vorlagen.",r=y(),c=v("div");for(let e=0;e<d.length;e+=1)d[e].c();w(c,"class","layout-cards svelte-1jv7ege"),w(s,"class","form-setting")},m(e,u){m(e,t,u),m(e,n,u),ne(o,e,u),m(e,i,u),m(e,s,u),f(s,l),f(s,r),f(s,c);for(let e=0;e<d.length;e+=1)d[e].m(c,null);a=!0},p(e,t){const n={};if(67108864&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=Ue(e,u,n);d[n]?(d[n].p(o,t),K(d[n],1)):(d[n]=ct(o),d[n].c(),K(d[n],1),d[n].m(c,null))}for(H(),n=u.length;n<d.length;n+=1)h(n);U()}},i(e){if(!a){K(o.$$.fragment,e);for(let e=0;e<u.length;e+=1)K(d[e]);a=!0}},o(e){R(o.$$.fragment,e),d=d.filter(Boolean);for(let e=0;e<d.length;e+=1)R(d[e]);a=!1},d(e){e&&p(t),e&&p(n),oe(o,e),e&&p(i),e&&p(s),g(d,e)}}}function tt(e){let t,n,o,i=e[2].id+"";return{c(){t=$("Layouts "),n=$(i),o=$(" bearbeiten")},m(e,i){m(e,t,i),m(e,n,i),m(e,o,i)},p(e,t){4&t&&i!==(i=e[2].id+"")&&k(n,i)},d(e){e&&p(t),e&&p(n),e&&p(o)}}}function nt(e){let t;return{c(){t=$("Neues Layout erstellen")},m(e,n){m(e,t,n)},p:s,d(e){e&&p(t)}}}function ot(e){let t,n,o;return t=new Le({props:{size:"24"}}),{c(){te(t.$$.fragment),n=$(" Neues Layout hinzufügen")},m(e,i){ne(t,e,i),m(e,n,i),o=!0},p:s,i(e){o||(K(t.$$.fragment,e),o=!0)},o(e){R(t.$$.fragment,e),o=!1},d(e){oe(t,e),e&&p(n)}}}function it(e){let t,n;return t=new e[7]({props:{class:"layout-card",$$slots:{default:[rt]},$$scope:{ctx:e}}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};67108865&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(K(t.$$.fragment,e),n=!0)},o(e){R(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function st(e){let t,n=e[20].moduleList,o=[];for(let t=0;t<n.length;t+=1)o[t]=lt(Ke(e,n,t));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=x()},m(e,n){for(let t=0;t<o.length;t+=1)o[t].m(e,n);m(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=Ke(e,n,s);o[s]?o[s].p(l,i):(o[s]=lt(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){g(o,e),e&&p(t)}}}function lt(e){let t,n,o,i=e[8](e[23].moduleId)+"";return{c(){t=v("p"),n=$(i),o=y(),w(t,"class","svelte-1jv7ege")},m(e,i){m(e,t,i),f(t,n),f(t,o)},p(e,t){1&t&&i!==(i=e[8](e[23].moduleId)+"")&&k(n,i)},d(e){e&&p(t)}}}function rt(e){let t,n,o,i,s,l,r,u,d,g,h,x,j,L,N,C,S,M,_,E,O,T,D,I,B=e[20].id+"",W=e[20].days+"";n=new ke({props:{size:"18"}}),s=new Se({props:{size:"18"}});let A=e[20].moduleList&&st(e);return{c(){t=v("div"),te(n.$$.fragment),o=y(),i=v("div"),te(s.$$.fragment),l=y(),r=v("div"),u=v("span"),d=y(),g=$(B),h=y(),x=v("div"),j=v("div"),j.textContent="Aktiv an den Tagen",L=y(),N=v("p"),C=$(W),S=y(),M=v("div"),_=v("div"),_.textContent="Aktive Module",E=y(),A&&A.c(),O=y(),w(t,"class","layout-card--icons edit svelte-1jv7ege"),w(i,"class","layout-card--icons delete svelte-1jv7ege"),w(u,"class","active-indicator svelte-1jv7ege"),z(u,"active",e[20].activated),w(r,"class","layout-card--title svelte-1jv7ege"),w(j,"class","layout-card--subtitle svelte-1jv7ege"),w(N,"class","svelte-1jv7ege"),w(x,"class","layout-card--section svelte-1jv7ege"),w(_,"class","layout-card--subtitle svelte-1jv7ege"),w(M,"class","layout-card--section svelte-1jv7ege")},m(c,p){m(c,t,p),ne(n,t,null),m(c,o,p),m(c,i,p),ne(s,i,null),m(c,l,p),m(c,r,p),f(r,u),f(r,d),f(r,g),m(c,h,p),m(c,x,p),f(x,j),f(x,L),f(x,N),f(N,C),m(c,S,p),m(c,M,p),f(M,_),f(M,E),A&&A.m(M,null),m(c,O,p),T=!0,D||(I=[b(t,"click",(function(){a(e[12](e[20]))&&e[12](e[20]).apply(this,arguments)})),b(i,"click",(function(){a(e[15](e[20]))&&e[15](e[20]).apply(this,arguments)}))],D=!0)},p(t,n){e=t,1&n&&z(u,"active",e[20].activated),(!T||1&n)&&B!==(B=e[20].id+"")&&k(g,B),(!T||1&n)&&W!==(W=e[20].days+"")&&k(C,W),e[20].moduleList?A?A.p(e,n):(A=st(e),A.c(),A.m(M,null)):A&&(A.d(1),A=null)},i(e){T||(K(n.$$.fragment,e),K(s.$$.fragment,e),T=!0)},o(e){R(n.$$.fragment,e),R(s.$$.fragment,e),T=!1},d(e){e&&p(t),oe(n),e&&p(o),e&&p(i),oe(s),e&&p(l),e&&p(r),e&&p(h),e&&p(x),e&&p(S),e&&p(M),A&&A.d(),e&&p(O),D=!1,c(I)}}}function ct(e){let t,n,o=null!=e[20].id&&it(e);return{c(){o&&o.c(),t=x()},m(e,i){o&&o.m(e,i),m(e,t,i),n=!0},p(e,n){null!=e[20].id?o?(o.p(e,n),1&n&&K(o,1)):(o=it(e),o.c(),K(o,1),o.m(t.parentNode,t)):o&&(H(),R(o,1,1,(()=>{o=null})),U())},i(e){n||(K(o),n=!0)},o(e){R(o),n=!1},d(e){o&&o.d(e),e&&p(t)}}}function at(e){let t,n,o,i,s,l,r;function c(t){e[16](t)}let a={noClickaway:!0,$$slots:{default:[Xe]},$$scope:{ctx:e}};void 0!==e[3]&&(a.open=e[3]),n=new e[4]({props:a}),E.push((()=>ee(n,"open",c)));const u=[et,Ye],d=[];function g(e,t){return!e[0]||e[1]||e[2]?e[0]&&(e[1]||null!=e[2])?1:-1:0}return~(s=g(e))&&(l=d[s]=u[s](e)),{c(){t=v("div"),te(n.$$.fragment),i=y(),l&&l.c()},m(e,o){m(e,t,o),ne(n,t,null),f(t,i),~s&&d[s].m(t,null),r=!0},p(e,[i]){const r={};67108864&i&&(r.$$scope={dirty:i,ctx:e}),!o&&8&i&&(o=!0,r.open=e[3],A((()=>o=!1))),n.$set(r);let c=s;s=g(e),s===c?~s&&d[s].p(e,i):(l&&(H(),R(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()),K(l,1),l.m(t,null)):l=null)},i(e){r||(K(n.$$.fragment,e),K(l),r=!0)},o(e){R(n.$$.fragment,e),R(l),r=!1},d(e){e&&p(t),oe(n),~s&&d[s].d()}}}function ut(e,o,i){const{Modal:s,Dialog:l,Button:r,Card:c}=t;let a,{settings:u}=o,d=!1;const f=M();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 p,g=!1;return e.$$set=e=>{"settings"in e&&i(0,u=e.settings)},[u,d,a,g,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==p.id));-1!=e&&(u.dashboardLayout.splice(e,1),i(0,u),i(3,g=!1),f("save"))},function(){i(3,g=!1),p=void 0},function(e){p=e,i(3,g=!0)},function(e){g=e,i(3,g)},e=>m(e)]}class dt extends se{constructor(e){var t;super(),document.getElementById("svelte-1jv7ege-style")||((t=v("style")).id="svelte-1jv7ege-style",t.textContent=".btn-back.svelte-1jv7ege.svelte-1jv7ege{cursor:pointer;margin-right:1em}.btns-container.svelte-1jv7ege.svelte-1jv7ege{display:flex;gap:1em;margin-top:1em}.layout-cards.svelte-1jv7ege.svelte-1jv7ege{display:flex;flex-flow:row wrap;gap:2em}.layout-cards.svelte-1jv7ege .svelte-1jv7ege{width:200px}.layout-cards.svelte-1jv7ege .layout-card--icons.svelte-1jv7ege{cursor:pointer;position:absolute;width:auto}.layout-cards.svelte-1jv7ege .layout-card--icons.edit.svelte-1jv7ege{right:45px;top:16px}.layout-cards.svelte-1jv7ege .layout-card--icons.delete.svelte-1jv7ege{right:21px;top:16px}.layout-cards.svelte-1jv7ege .layout-card{position:relative;font-size:1em}.layout-cards.svelte-1jv7ege .layout-card--title.svelte-1jv7ege{font-weight:600;height:20px;display:flex;gap:0.5em;place-items:center;margin-bottom:1.5em;margin-top:1em}.layout-cards.svelte-1jv7ege .layout-card--subtitle.svelte-1jv7ege{font-weight:600;margin-bottom:0.5em}.layout-cards.svelte-1jv7ege .layout-card--section.svelte-1jv7ege{font-size:0.8em;margin-bottom:1.5em}.layout-cards.svelte-1jv7ege p.svelte-1jv7ege{margin:0.5 0 0 0}.active-indicator.svelte-1jv7ege.svelte-1jv7ege{height:15px;width:15px;border-radius:50%;display:inline-block;background-color:red}.active.svelte-1jv7ege.svelte-1jv7ege{background-color:green}",f(document.head,t)),ie(this,e,ut,at,u,{settings:0})}}function ft(e){let t,n,o,i,s,l,r,a,u,d,g,h,$;var x=e[1];function k(e){return{props:{settings:e[2]}}}return x&&(d=new x(k(e)),d.$on("save",e[6])),{c(){t=v("section"),n=v("div"),o=v("div"),o.textContent="Mein Konto",i=y(),s=v("div"),s.textContent="Benachrichtigungen",l=y(),r=v("div"),r.textContent="Layout",a=y(),u=v("div"),d&&te(d.$$.fragment),w(o,"class","nav--item svelte-1x5ysxy"),z(o,"active",e[1]==ue),w(s,"class","nav--item svelte-1x5ysxy"),z(s,"active",e[1]==he),w(r,"class","nav--item svelte-1x5ysxy"),z(r,"active",e[1]==dt),w(n,"class","container-setting--nav svelte-1x5ysxy"),w(u,"class","container-setting--content svelte-1x5ysxy"),w(t,"class","container-setting svelte-1x5ysxy")},m(c,p){m(c,t,p),f(t,n),f(n,o),f(n,i),f(n,s),f(n,l),f(n,r),f(t,a),f(t,u),d&&ne(d,u,null),g=!0,h||($=[b(o,"click",e[3]),b(s,"click",e[4]),b(r,"click",e[5])],h=!0)},p(e,t){2&t&&z(o,"active",e[1]==ue),2&t&&z(s,"active",e[1]==he),2&t&&z(r,"active",e[1]==dt);const n={};if(4&t&&(n.settings=e[2]),x!==(x=e[1])){if(d){H();const e=d;R(e.$$.fragment,1,0,(()=>{oe(e,1)})),U()}x?(d=new x(k(e)),d.$on("save",e[6]),te(d.$$.fragment),K(d.$$.fragment,1),ne(d,u,null)):d=null}else x&&d.$set(n)},i(e){g||(d&&K(d.$$.fragment,e),g=!0)},o(e){d&&R(d.$$.fragment,e),g=!1},d(e){e&&p(t),d&&oe(d),h=!1,c($)}}}function mt(e){let t,n,o=e[0]&&ft(e);return{c(){o&&o.c(),t=x()},m(e,i){o&&o.m(e,i),m(e,t,i),n=!0},p(e,[n]){e[0]?o?(o.p(e,n),1&n&&K(o,1)):(o=ft(e),o.c(),K(o,1),o.m(t.parentNode,t)):o&&(H(),R(o,1,1,(()=>{o=null})),U())},i(e){n||(K(o),n=!0)},o(e){R(o),n=!1},d(e){o&&o.d(e),e&&p(t)}}}function pt(e,t,s){let l;d(e,o,(e=>s(10,l=e)));let r,c,a,u,f,{injectedSettings:m}=t;const p=()=>{var e;s(2,(c={jobDescription:(e=m).jobDescription,showJobDescription:e.setting.showJobDescription,email:e.email,firstName:e.firstName,lastName:e.lastName,listTitle:e.listTitle},f=c)),s(1,r=ue)};async function g(){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.log("settings could not be saved"),console.error(e),i.failed("Speichern nicht erfolgreich",2e3)}}return p(),e.$$set=e=>{"injectedSettings"in e&&s(0,m=e.injectedSettings)},[m,r,f,p,()=>{var e;s(2,(a={notificationActivated:(e=m).setting.notificationActivated,showNotifications:e.setting.showNotifications,notificationToMail:e.setting.notificationToMail,typesOfNotification:e.setting.typesOfNotification},f=a)),s(1,r=he)},()=>{s(2,(u={dashboardLayout:m.setting.dashboardLayout},f=u)),s(1,r=dt)},function(){r==ue?(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),g()):r==he?(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),g()):r==dt&&(s(0,m.setting.dashboardLayout=u.dashboardLayout,m),g())}]}class gt extends se{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}",f(document.head,t)),ie(this,e,pt,mt,u,{injectedSettings:0})}}function vt(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function ht(e){let t,n;return t=new e[0]({props:{open:"true",noClickaway:"true",$$slots:{default:[yt,({closeCallback:e})=>({5:e}),({closeCallback:e})=>e?32:0]},$$scope:{ctx:e}}}),{c(){te(t.$$.fragment)},m(e,o){ne(t,e,o),n=!0},p(e,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(K(t.$$.fragment,e),n=!0)},o(e){R(t.$$.fragment,e),n=!1},d(e){oe(t,e)}}}function $t(e){let t,n,o,i;return o=new gt({props:{injectedSettings:e[4]}}),{c(){t=v("div"),t.innerHTML="<h2>Einstellungen</h2>",n=y(),te(o.$$.fragment),w(t,"class","setting--title svelte-ltqsg7")},m(e,s){m(e,t,s),m(e,n,s),ne(o,e,s),i=!0},p:s,i(e){i||(K(o.$$.fragment,e),i=!0)},o(e){R(o.$$.fragment,e),i=!1},d(e){e&&p(t),e&&p(n),oe(o,e)}}}function yt(e){let t,n,o=e[4]&&function(e){let t,n,o;return n=new e[1]({props:{constrainWidth:!0,closeCallback:function(){return e[2](e[5])},class:"modal_class",$$slots:{default:[$t]},$$scope:{ctx:e}}}),{c(){t=v("div"),te(n.$$.fragment),w(t,"class","setting--modal svelte-ltqsg7")},m(e,i){m(e,t,i),ne(n,t,null),o=!0},p(t,o){e=t;const i={};64&o&&(i.$$scope={dirty:o,ctx:e}),n.$set(i)},i(e){o||(K(n.$$.fragment,e),o=!0)},o(e){R(n.$$.fragment,e),o=!1},d(e){e&&p(t),oe(n)}}}(e);return{c(){o&&o.c(),t=x()},m(e,i){o&&o.m(e,i),m(e,t,i),n=!0},p(e,t){e[4]&&o.p(e,t)},i(e){n||(K(o),n=!0)},o(e){R(o),n=!1},d(e){o&&o.d(e),e&&p(t)}}}function xt(e){return{c:s,m:s,p:s,i:s,o:s,d:s}}function bt(e){let t,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:xt,then:ht,catch:vt,value:4,blocks:[,,,]};return Z(n.getUserSettings(),i),{c(){t=x(),i.block.c()},m(e,n){m(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,o=!0},p(t,[n]){Q(i,e=t,n)},i(e){o||(K(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){R(i.blocks[e])}o=!1},d(e){e&&p(t),i.block.d(e),i.token=null,i=null}}}function wt(e){S((async()=>{await n.getUserSettings()}));const{Modal:o,Dialog:i}=t;return[o,i,e=>(window.singleSpaNavigate("/"),e())]}function kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jt,zt,Lt=(jt=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)}))}},jt(zt={exports:{}},zt.exports),zt.exports);const Nt=kt(Lt)({component:class extends se{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}",f(document.head,t)),ie(this,e,wt,bt,u,{})}},domElementGetter:()=>document.getElementById("view-app")}),{bootstrap:Ct,mount:St,unmount:Mt}=Nt;e({bootstrap:Ct,mount:St,unmount:Mt})}}}));
|