@enablerr-ui/settings 0.2.6 → 0.2.7
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;return{setters:[function(e){t=e.getAttractions},function(e){n=e.Request,o=e.settings}],execute:function(){e("version","0.2.7");function i(){}function s(e){return e()}function l(){return Object.create(null)}function r(e){e.forEach(s)}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 i;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 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 S=[],_=[],E=[],O=[],T=Promise.resolve();let D=!1;function I(){D||(D=!0,T.then(q))}function B(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()();D=!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(B)}}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,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&&(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((i=e)&&"object"==typeof i&&"function"==typeof i.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 i}function Z(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 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:i,on_mount:l,on_destroy:a,after_update:u}=e.$$;i&&i.m(t,n),o||B((()=>{const t=l.map(s).filter(c);a?a.push(...t):r(t),e.$$.on_mount=[]})),u.forEach(B)}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,s,c,a=[-1]){const u=z;L(e);const d=e.$$={fragment:null,ctx:null,props:c,update:i,not_equal:s,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 i=o.length?o[0]:n;return d.ctx&&s(d.ctx[t],d.ctx[t]=i)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](i),f&&function(e,t){-1===e.$$.dirty[0]&&(S.push(e),I(),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 ie{$destroy(){ne(this,1),this.$destroy=i}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function se(e){let t,n,o,i,s,l,r,c,a,u,p,v,h,y,w,k,j,z,L,N,C,M,S,E,O,T,D,I,B,A,P,q,J,F,G,V,H,R,Z,Q,X,oe,ie,se;function re(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}),_.push((()=>Y(l,"value",re))),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),E=new e[2]({props:ue}),_.push((()=>Y(E,"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}),_.push((()=>Y(P,"value",de)));let pe={placeholder:"Titel"};return void 0!==e[0].listTitle&&(pe.value=e[0].listTitle),R=new e[2]({props:pe}),_.push((()=>Y(R,"value",me))),X=new e[1]({props:{filled:!0,$$slots:{default:[le]},$$scope:{ctx:e}}}),X.$on("click",e[3]),{c(){t=g("form"),n=g("div"),o=g("div"),o.textContent="Berufsbezeichnung",i=$(),s=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),T=$(),D=g("div"),I=g("div"),I.textContent="Nachname",B=$(),A=g("div"),ee(P.$$.fragment),J=$(),F=g("div"),G=g("div"),G.textContent="Titel Aufgabenliste",V=$(),H=g("div"),ee(R.$$.fragment),Q=$(),ee(X.$$.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(s,"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(I,"class","form-field--label"),b(A,"class","form-field--content"),b(D,"class","form-field"),b(G,"class","form-field--label"),b(H,"class","form-field--content"),b(F,"class","form-field"),b(t,"class","form-setting")},m(r,m){f(r,t,m),d(t,n),d(n,o),d(n,i),d(n,s),te(l,s,null),d(s,c),d(s,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,T),d(t,D),d(D,I),d(D,B),d(D,A),te(P,A,null),d(t,J),d(t,F),d(F,G),d(F,V),d(F,H),te(R,H,null),f(r,Q,m),te(X,r,m),oe=!0,ie||(se=x(u,"change",e[5]),ie=!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 i={};!O&&1&t&&(O=!0,i.value=e[0].firstName,W((()=>O=!1))),E.$set(i);const s={};!q&&1&t&&(q=!0,s.value=e[0].lastName,W((()=>q=!1))),P.$set(s);const c={};!Z&&1&t&&(Z=!0,c.value=e[0].listTitle,W((()=>Z=!1))),R.$set(c);const a={};2048&t&&(a.$$scope={dirty:t,ctx:e}),X.$set(a)},i(e){oe||(U(l.$$.fragment,e),U(z.$$.fragment,e),U(E.$$.fragment,e),U(P.$$.fragment,e),U(R.$$.fragment,e),U(X.$$.fragment,e),oe=!0)},o(e){K(l.$$.fragment,e),K(z.$$.fragment,e),K(E.$$.fragment,e),K(P.$$.fragment,e),K(R.$$.fragment,e),K(X.$$.fragment,e),oe=!1},d(e){e&&m(t),ne(l),ne(z),ne(E),ne(P),ne(R),e&&m(Q),ne(X,e),ie=!1,se()}}}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,i,s=e[0]&&se(e);return{c(){t=g("div"),n=g("h2"),n.textContent="Mein Profil",o=$(),s&&s.c()},m(e,l){f(e,t,l),d(t,n),d(t,o),s&&s.m(t,null),i=!0},p(e,[n]){e[0]?s?(s.p(e,n),1&n&&U(s,1)):(s=se(e),s.c(),U(s,1),s.m(t,null)):s&&(V(),K(s,1,1,(()=>{s=null})),H())},i(e){i||(U(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d()}}}function ce(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 ae extends ie{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,i,s,l,r,c,a,u,v,h,y,x,w,k,j,z,L,N,C,M,S,E,O,T,D,I,B;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 I=new e[2]({props:{filled:!0,$$slots:{default:[me]},$$scope:{ctx:e}}}),I.$on("click",e[4]),{c(){t=g("form"),n=g("div"),o=g("div"),o.textContent="Benachrichtigungen aktivieren",i=$(),s=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=$(),T=g("div");for(let e=0;e<H.length;e+=1)H[e].c();D=$(),ee(I.$$.fragment),b(o,"class","form-field--label switch"),b(s,"class","form-field--content"),b(n,"class","form-field"),b(u,"class","form-field--label switch"),b(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(T,"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,i),d(n,s),te(l,s,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,T);for(let e=0;e<H.length;e+=1)H[e].m(T,null);f(e,D,r),te(I,e,r),B=!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 i={};if(!C&&1&t&&(C=!0,i.value=e[0].notificationToMail,W((()=>C=!1))),N.$set(i),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(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||(U(l.$$.fragment,e),U(y.$$.fragment,e),U(N.$$.fragment,e),U(I.$$.fragment,e),B=!0)},o(e){K(l.$$.fragment,e),K(y.$$.fragment,e),K(N.$$.fragment,e),K(I.$$.fragment,e),B=!1},d(e){e&&m(t),ne(l),ne(y),ne(N),p(H,e),e&&m(D),ne(I,e)}}}function fe(e){let t,n,o,i,s,l,r,a,u,p,v,y=e[11].type+"";return{c(){t=g("div"),n=g("input"),s=$(),l=g("label"),r=h(y),u=$(),n.checked=o=e[0].typesOfNotification.includes(e[11].type),b(n,"type","checkbox"),b(n,"id",i=e[11].id),b(l,"for",a=e[11].id)},m(o,i){f(o,t,i),d(t,n),d(t,s),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,s){e=t,3&s&&o!==(o=e[0].typesOfNotification.includes(e[11].type))&&(n.checked=o),2&s&&i!==(i=e[11].id)&&b(n,"id",i),2&s&&y!==(y=e[11].type+"")&&w(r,y),2&s&&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,i,s=e[0]&&de(e);return{c(){t=g("div"),n=g("h2"),n.textContent="Meine Benachrichtigungen",o=$(),s&&s.c()},m(e,l){f(e,t,l),d(t,n),d(t,o),s&&s.m(t,null),i=!0},p(e,[n]){e[0]?s?(s.p(e,n),1&n&&U(s,1)):(s=de(e),s.c(),U(s,1),s.m(t,null)):s&&(V(),K(s,1,1,(()=>{s=null})),H())},i(e){i||(U(s),i=!0)},o(e){K(s),i=!1},d(e){e&&m(t),s&&s.d()}}}function ge(e,o,i){const{Button:s,TextField:l,Switch:r}=t;let{settings:c}=o,a=[];const u=M();return C((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 ve extends ie{constructor(e){super(),oe(this,e,ge,pe,a,{settings:0})}}function he(e){let t,n,o,s;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",s="feather feather-arrow-left "+e[2])},m(e,i){f(e,t,i),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&&s!==(s="feather feather-arrow-left "+e[2])&&b(t,"class",s)},i:i,o:i,d(e){e&&m(t)}}}function $e(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,i,s]}class ye extends ie{constructor(e){super(),oe(this,e,$e,he,a,{size:0,strokeWidth:1,class:2})}}function xe(e){let t,n,o,s;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",s="feather feather-edit-3 "+e[2])},m(e,i){f(e,t,i),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&&s!==(s="feather feather-edit-3 "+e[2])&&b(t,"class",s)},i:i,o:i,d(e){e&&m(t)}}}function be(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,i,s]}class we extends ie{constructor(e){super(),oe(this,e,be,xe,a,{size:0,strokeWidth:1,class:2})}}function ke(e){let t,n,o,s;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",s="feather feather-plus "+e[2])},m(e,i){f(e,t,i),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&&s!==(s="feather feather-plus "+e[2])&&b(t,"class",s)},i:i,o:i,d(e){e&&m(t)}}}function je(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 ze extends ie{constructor(e){super(),oe(this,e,je,ke,a,{size:0,strokeWidth:1,class:2})}}function Le(e){let t,n,o,s,l,r;return{c(){t=v("svg"),n=v("polyline"),o=v("path"),s=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(s,"x1","10"),b(s,"y1","11"),b(s,"x2","10"),b(s,"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,i){f(e,t,i),d(t,n),d(t,o),d(t,s),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:i,o:i,d(e){e&&m(t)}}}function Ne(e,t,n){let{size:o="100%"}=t,{strokeWidth:i=2}=t,{class:s=""}=t;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),e.$$set=e=>{"size"in e&&n(0,o=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,s=e.class)},[o,i,s]}class Ce extends ie{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,i,s,l,c,a,u,v,h,y,w,j,z,L,N,C,M,S,E,O,T,D,I,B,A,P,q,J,F,G,V,H,Q;function X(t){e[15](t)}let oe={type:"text",placeholder:"Neuer Layout Name"};function ie(t){e[16](t)}void 0!==e[0].id&&(oe.value=e[0].id),i=new e[5]({props:oe}),_.push((()=>Y(i,"value",X)));let se={slotLeft:!0,$$slots:{default:[Oe]},$$scope:{ctx:e}};void 0!==e[0].activated&&(se.value=e[0].activated),a=new e[9]({props:se}),_.push((()=>Y(a,"value",ie))),h=new e[6]({});let le={ctx:e,current:null,token:null,hasCatch:!1,pending:Ae,then:De,catch:Te,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(i.$$.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=$(),T=g("div"),D=g("h1"),D.textContent="Wochentage",I=$(),B=g("p"),B.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(s,r){f(s,t,r),d(t,n),d(t,o),te(i,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,T),d(T,D),d(T,I),d(T,B),d(T,A),d(T,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={};!s&&1&o[0]&&(s=!0,l.value=e[0].id,W((()=>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,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(i.$$.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(i.$$.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(i),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 Te(e){return{c:i,m:i,p:i,i:i,o:i,d:i}}function De(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=_e(e,s,t),r=l(n);i.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,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);f(e,t,i),n=!0},p(e,n){2053&n[0]&&(s=e[31],V(),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){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,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,X,We,t,_e),H())},i(e){if(!n){for(let e=0;e<s.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 Ie(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=g("span"),n=h(o),b(t,"class","centerText svelte-1vkufz4")},m(e,o){f(e,t,o),d(t,n)},p(t,s){e=t,5&s[0]&&o!==(o=-1!=e[0].moduleList.findIndex(i)?"abwählen":"wählen")&&w(n,o)},d(e){e&&m(t)}}}function Be(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:[Ie]},$$scope:{ctx:e}}}),o.$on("click",(function(){return e[21](e[32])})),{c(){t=h(l),n=$(),ee(o.$$.fragment),i=$()},m(e,l){f(e,t,l),f(e,n,l),te(o,e,l),f(e,i,l),s=!0},p(n,i){e=n,(!s||4&i[0])&&l!==(l=e[32].name+"")&&w(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||(U(o.$$.fragment,e),s=!0)},o(e){K(o.$$.fragment,e),s=!1},d(e){e&&m(t),e&&m(n),ne(o,e),e&&m(i)}}}function We(e,t){let n,o,i;return o=new t[7]({props:{style:"margin: 20px",$$slots:{default:[Be]},$$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),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||(U(o.$$.fragment,e),i=!0)},o(e){K(o.$$.fragment,e),i=!1},d(e){e&&m(n),ne(o,e)}}}function Ae(e){return{c:i,m:i,p:i,i:i,o:i,d:i}}function Pe(e){let t,n,o,i,s,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"),i=$(),s=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(s,"for",e[28].value),b(t,"class","day svelte-1vkufz4")},m(e,o){f(e,t,o),d(t,n),d(t,i),d(t,s),d(s,l),d(t,r),c||(a=x(n,"change",p),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&&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,i){f(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]&&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,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;C((async()=>{await p,await(I(),T)}));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 Ve extends ie{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,i,s,l,r;return i=new e[6]({props:{filled:!0,$$slots:{default:[Ke]},$$scope:{ctx:e}}}),i.$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(i.$$.fragment),s=$(),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(i,o,null),d(o,s),te(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||(U(i.$$.fragment,e),U(l.$$.fragment,e),r=!0)},o(e){K(i.$$.fragment,e),K(l.$$.fragment,e),r=!1},d(e){e&&m(t),e&&m(n),e&&m(o),ne(i),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,i,s,l,r,c,a,u,p;function v(e,t){return e[1]?tt:et}s=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"),i=g("span"),ee(s.$$.fragment),l=$(),y.c(),r=$(),ee(c.$$.fragment),b(i,"class","btn-back svelte-1jv7ege")},m(m,g){f(m,t,g),d(t,n),d(n,o),d(o,i),te(s,i,null),d(o,l),y.m(o,null),d(t,r),te(c,t,null),a=!0,u||(p=x(i,"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(s.$$.fragment,e),U(c.$$.fragment,e),a=!0)},o(e){K(s.$$.fragment,e),K(c.$$.fragment,e),a=!1},d(e){e&&m(t),ne(s),y.d(),ne(c),u=!1,p()}}}function Ye(e){let t,n,o,i,s,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),i=$(),s=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(s,"class","form-setting")},m(e,u){f(e,t,u),f(e,n,u),te(o,e,u),f(e,i,u),f(e,s,u),d(s,l),d(s,r),d(s,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(i),e&&m(s),p(v,e)}}}function et(e){let t,n,o,i=e[2].id+"";return{c(){t=h("Layouts "),n=h(i),o=h(" bearbeiten")},m(e,i){f(e,t,i),f(e,n,i),f(e,o,i)},p(e,t){4&t&&i!==(i=e[2].id+"")&&w(n,i)},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:i,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,i){te(t,e,i),f(e,n,i),o=!0},p:i,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 it(e){let t,n=e[20].moduleList,o=[];for(let t=0;t<n.length;t+=1)o[t]=st(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,i){if(257&i){let s;for(n=e[20].moduleList,s=0;s<n.length;s+=1){const l=Ue(e,n,s);o[s]?o[s].p(l,i):(o[s]=st(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){p(o,e),e&&m(t)}}}function st(e){let t,n,o,i=e[8](e[23].moduleId)+"";return{c(){t=g("p"),n=h(i),o=$(),b(t,"class","svelte-1jv7ege")},m(e,i){f(e,t,i),d(t,n),d(t,o)},p(e,t){1&t&&i!==(i=e[8](e[23].moduleId)+"")&&w(n,i)},d(e){e&&m(t)}}}function lt(e){let t,n,o,i,s,l,a,u,p,v,y,k,z,L,N,C,M,S,_,E,O,T,D,I,B=e[20].id+"",W=e[20].days+"";n=new we({props:{size:"18"}}),s=new Ce({props:{size:"18"}});let A=e[20].moduleList&&it(e);return{c(){t=g("div"),ee(n.$$.fragment),o=$(),i=g("div"),ee(s.$$.fragment),l=$(),a=g("div"),u=g("span"),p=$(),v=h(B),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(i,"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,i,m),te(s,i,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),T=!0,D||(I=[x(t,"click",(function(){c(e[12](e[20]))&&e[12](e[20]).apply(this,arguments)})),x(i,"click",(function(){c(e[15](e[20]))&&e[15](e[20]).apply(this,arguments)}))],D=!0)},p(t,n){e=t,1&n&&j(u,"active",e[20].activated),(!T||1&n)&&B!==(B=e[20].id+"")&&w(v,B),(!T||1&n)&&W!==(W=e[20].days+"")&&w(C,W),e[20].moduleList?A?A.p(e,n):(A=it(e),A.c(),A.m(S,null)):A&&(A.d(1),A=null)},i(e){T||(U(n.$$.fragment,e),U(s.$$.fragment,e),T=!0)},o(e){K(n.$$.fragment,e),K(s.$$.fragment,e),T=!1},d(e){e&&m(t),ne(n),e&&m(o),e&&m(i),ne(s),e&&m(l),e&&m(a),e&&m(y),e&&m(k),e&&m(M),e&&m(S),A&&A.d(),e&&m(O),D=!1,r(I)}}}function rt(e){let t,n,o=null!=e[20].id&&ot(e);return{c(){o&&o.c(),t=y()},m(e,i){o&&o.m(e,i),f(e,t,i),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,i,s,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~(s=v(e))&&(l=p[s]=u[s](e)),{c(){t=g("div"),ee(n.$$.fragment),i=$(),l&&l.c()},m(e,o){f(e,t,o),te(n,t,null),d(t,i),~s&&p[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],W((()=>o=!1))),n.$set(r);let c=s;s=v(e),s===c?~s&&p[s].p(e,i):(l&&(V(),K(p[c],1,1,(()=>{p[c]=null})),H()),~s?(l=p[s],l?l.p(e,i):(l=p[s]=u[s](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),~s&&p[s].d()}}}function at(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 ut extends ie{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,i,s,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",i=$(),s=g("div"),s.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(s,"class","nav--item svelte-1x5ysxy"),j(s,"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,i),d(n,s),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(s,"click",e[4]),x(c,"click",e[5])],h=!0)},p(e,t){2&t&&j(o,"active",e[1]==ae),2&t&&j(s,"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,i){o&&o.m(e,i),f(e,t,i),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,i){let s;u(e,o,(e=>i(10,s=e)));let l,r,c,a,d,{injectedSettings:f}=t;const m=()=>{var e;i(2,(r={jobDescription:(e=f).jobDescription,showJobDescription:e.setting.showJobDescription,email:e.email,firstName:e.firstName,lastName:e.lastName,listTitle:e.listTitle},d=r)),i(1,l=ae)};async function p(){try{await n.saveUserSettings(f),i(0,f),function(e,t,n=t){e.set(n)}(o,s=f,s)}catch(e){console.log("settings could not be saved"),console.error(e)}}return m(),e.$$set=e=>{"injectedSettings"in e&&i(0,f=e.injectedSettings)},[f,l,d,m,()=>{var e;i(2,(c={notificationActivated:(e=f).setting.notificationActivated,showNotifications:e.setting.showNotifications,notificationToMail:e.setting.notificationToMail,typesOfNotification:e.setting.typesOfNotification},d=c)),i(1,l=ve)},()=>{i(2,(a={dashboardLayout:f.setting.dashboardLayout},d=a)),i(1,l=ut)},function(){l==ae?(i(0,f.jobDescription=r.jobDescription,f),i(0,f.setting.showJobDescription=r.showJobDescription,f),i(0,f.email=r.email,f),i(0,f.firstName=r.firstName,f),i(0,f.lastName=r.lastName,f),i(0,f.listTitle=r.listTitle,f),p()):l==ve?(i(0,f.setting.notificationActivated=c.notificationActivated,f),i(0,f.setting.showNotifications=c.showNotifications,f),i(0,f.setting.notificationToMail=c.notificationToMail,f),i(0,f.setting.typesOfNotification=c.typesOfNotification,f),p()):l==ut&&(i(0,f.setting.dashboardLayout=a.dashboardLayout,f),p())}]}class pt extends ie{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:i,m:i,p:i,i:i,o:i,d:i}}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,s;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,i){f(e,t,i),f(e,n,i),te(o,e,i),s=!0},p:i,i(e){s||(U(o.$$.fragment,e),s=!0)},o(e){K(o.$$.fragment,e),s=!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,i){f(e,t,i),te(n,t,null),o=!0},p(t,o){e=t;const i={};128&o&&(i.$$scope={dirty:o,ctx:e}),n.$set(i)},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,i){o&&o.m(e,i),f(e,t,i),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:i,m:i,p:i,i:i,o:i,d:i}}function xt(e){let t,o,i={ctx:e,current:null,token:null,hasCatch:!1,pending:yt,then:vt,catch:gt,value:5,blocks:[,,,]};return R(n.getUserSettings(),i),{c(){t=y(),i.block.c()},m(e,n){f(e,t,n),i.block.m(e,i.anchor=n),i.mount=()=>t.parentNode,i.anchor=t,o=!0},p(t,[n]){Z(i,e=t,n)},i(e){o||(U(i.block),o=!0)},o(e){for(let e=0;e<3;e+=1){K(i.blocks[e])}o=!1},d(e){e&&m(t),i.block.d(e),i.token=null,i=null}}}function bt(e,i,s){let l;u(e,o,(e=>s(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){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)}))}},kt(jt={exports:{}},jt.exports),jt.exports);const Lt=wt(zt)({component:class extends ie{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})}}}));
|