Anvil/assets/SettingsSidebar.stories-DBlX62GM.js
André Jaenisch e545bd2756
Updates
2024-07-22 13:59:31 +02:00

1 line
11 KiB
JavaScript

import{S as ge,i as me,s as de,c as d,a as b,m as h,t as v,b as w,d as k,e as X,p as I,q as z,u as H,v as be,n as K}from"./index-7XOhh2kt.js";import{a as T,d as F,k as g,h as u,p as te,e as R,c as B,b as q,j as he,v as ae,m as ve,r as we,w as ke,t as A,f as E,l as M,n as D,u as le,i as Se}from"./lifecycle-Dpe71s4v.js";import{e as re}from"./each-iA4Nym3y.js";import{D as Ce,a as Le,b as Pe,c as G,d as Z}from"./XPro-R6-17FUT.js";import{b as ne,c as Ae,$ as Ee}from"./runtime-BQCs4yl7.js";import{P as Ne,G as Te,K as Fe,o as Re,B as Be}from"./ZoomOut24-Cmc7Jjj8.js";import"./index-CGCTTfAD.js";import"./spread-CgU5AtxT.js";import"./globals-D0QH3NT1.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./tslib.es6-pJfR_DrR.js";function se(n,e,a){const t=n.slice();return t[13]=e[a],t}function De(n){let e=n[1].id+"",a;return{c(){a=A(e)},l(t){a=E(t,e)},m(t,l){g(t,a,l)},p(t,l){l&2&&e!==(e=t[1].id+"")&&D(a,e)},d(t){t&&u(a)}}}function Oe(n){let e,a="Profile settings go here";return{c(){e=R("b"),e.textContent=a},l(t){e=B(t,"B",{"data-svelte-h":!0}),Se(e)!=="svelte-1gm6esm"&&(e.textContent=a)},m(t,l){g(t,e,l)},p:K,d(t){t&&u(e)}}}function qe(n){let e;function a(r,i){return r[1].id==="profile"?Oe:De}let t=a(n),l=t(n);return{c(){l.c(),e=te()},l(r){l.l(r),e=te()},m(r,i){l.m(r,i),g(r,e,i)},p(r,i){t===(t=a(r))&&l?l.p(r,i):(l.d(1),l=t(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&u(e),l.d(r)}}}function Ge(n){let e,a=n[4]("settings.profile.label")+"",t;return{c(){e=R("span"),t=A(a)},l(l){e=B(l,"SPAN",{});var r=q(e);t=E(r,a),r.forEach(u)},m(l,r){g(l,e,r),M(e,t)},p(l,r){r&16&&a!==(a=l[4]("settings.profile.label")+"")&&D(t,a)},d(l){l&&u(e)}}}function Ke(n){let e,a;return e=new Ne({props:{fill:"currentColor",class:"inline"}}),{c(){d(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,l){h(e,t,l),a=!0},p:K,i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function Me(n){let e,a=n[4]("settings.account.label")+"",t;return{c(){e=R("span"),t=A(a)},l(l){e=B(l,"SPAN",{});var r=q(e);t=E(r,a),r.forEach(u)},m(l,r){g(l,e,r),M(e,t)},p(l,r){r&16&&a!==(a=l[4]("settings.account.label")+"")&&D(t,a)},d(l){l&&u(e)}}}function je(n){let e,a;return e=new Te({props:{fill:"currentColor",class:"inline"}}),{c(){d(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,l){h(e,t,l),a=!0},p:K,i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function Ie(n){let e,a=n[4]("settings.ssh_gpg_keys.label")+"",t;return{c(){e=R("span"),t=A(a)},l(l){e=B(l,"SPAN",{});var r=q(e);t=E(r,a),r.forEach(u)},m(l,r){g(l,e,r),M(e,t)},p(l,r){r&16&&a!==(a=l[4]("settings.ssh_gpg_keys.label")+"")&&D(t,a)},d(l){l&&u(e)}}}function ze(n){let e,a;return e=new Fe({props:{fill:"currentColor",class:"inline"}}),{c(){d(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,l){h(e,t,l),a=!0},p:K,i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function He(n){let e,a=n[4]("settings.appearance.label")+"",t;return{c(){e=R("span"),t=A(a)},l(l){e=B(l,"SPAN",{});var r=q(e);t=E(r,a),r.forEach(u)},m(l,r){g(l,e,r),M(e,t)},p(l,r){r&16&&a!==(a=l[4]("settings.appearance.label")+"")&&D(t,a)},d(l){l&&u(e)}}}function Je(n){let e,a;return e=new Re({props:{fill:"currentColor",class:"inline"}}),{c(){d(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,l){h(e,t,l),a=!0},p:K,i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function Qe(n){let e,a=n[4]("settings.notifications.label")+"",t;return{c(){e=R("span"),t=A(a)},l(l){e=B(l,"SPAN",{});var r=q(e);t=E(r,a),r.forEach(u)},m(l,r){g(l,e,r),M(e,t)},p(l,r){r&16&&a!==(a=l[4]("settings.notifications.label")+"")&&D(t,a)},d(l){l&&u(e)}}}function Ue(n){let e,a;return e=new Be({props:{fill:"currentColor",class:"inline"}}),{c(){d(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,l){h(e,t,l),a=!0},p:K,i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function Ve(n){let e,a,t,l,r,i,p,S,N,C,P,c,o,$,m;function _(s){n[8](s)}let O={name:"profile",value:"profile",regionLabel:"float-start ps-2 py-1 text-surface-500",regionLead:"float-start ps-8 text-surface-500",title:n[4]("settings.profile.label"),$$slots:{lead:[Ke],default:[Ge]},$$scope:{ctx:n}};n[0]!==void 0&&(O.group=n[0]),e=new G({props:O}),I.push(()=>z(e,"group",_)),e.$on("change",n[6]);function L(s){n[9](s)}let j={name:"account",value:"account",regionLabel:"float-start ps-2 py-1 text-surface-500",regionLead:"float-start ps-8 text-surface-500",title:n[4]("settings.account.label"),$$slots:{lead:[je],default:[Me]},$$scope:{ctx:n}};n[0]!==void 0&&(j.group=n[0]),l=new G({props:j}),I.push(()=>z(l,"group",L)),l.$on("change",n[6]);function $e(s){n[10](s)}let y={name:"ssh_gpg_keys",value:"ssh_gpg_keys",regionLabel:"float-start ps-2 py-1 text-surface-500",regionLead:"float-start ps-8 text-surface-500",title:n[4]("settings.ssh_gpg_keys.label"),$$slots:{lead:[ze],default:[Ie]},$$scope:{ctx:n}};n[0]!==void 0&&(y.group=n[0]),p=new G({props:y}),I.push(()=>z(p,"group",$e)),p.$on("change",n[6]);function ce(s){n[11](s)}let x={name:"appearance",value:"appearance",regionLabel:"float-start ps-2 py-1 text-surface-500",regionLead:"float-start ps-8 text-surface-500",title:n[4]("settings.appearance.label"),$$slots:{lead:[Je],default:[He]},$$scope:{ctx:n}};n[0]!==void 0&&(x.group=n[0]),C=new G({props:x}),I.push(()=>z(C,"group",ce)),C.$on("change",n[6]);function _e(s){n[12](s)}let ee={name:"notifications",value:"notifications",regionLabel:"float-start ps-2 py-1 text-surface-500",regionLead:"float-start ps-8 text-surface-500",title:n[4]("settings.notifications.label"),$$slots:{lead:[Ue],default:[Qe]},$$scope:{ctx:n}};return n[0]!==void 0&&(ee.group=n[0]),o=new G({props:ee}),I.push(()=>z(o,"group",_e)),o.$on("change",n[6]),{c(){d(e.$$.fragment),t=T(),d(l.$$.fragment),i=T(),d(p.$$.fragment),N=T(),d(C.$$.fragment),c=T(),d(o.$$.fragment)},l(s){b(e.$$.fragment,s),t=F(s),b(l.$$.fragment,s),i=F(s),b(p.$$.fragment,s),N=F(s),b(C.$$.fragment,s),c=F(s),b(o.$$.fragment,s)},m(s,f){h(e,s,f),g(s,t,f),h(l,s,f),g(s,i,f),h(p,s,f),g(s,N,f),h(C,s,f),g(s,c,f),h(o,s,f),m=!0},p(s,f){const J={};f&16&&(J.title=s[4]("settings.profile.label")),f&65552&&(J.$$scope={dirty:f,ctx:s}),!a&&f&1&&(a=!0,J.group=s[0],H(()=>a=!1)),e.$set(J);const Q={};f&16&&(Q.title=s[4]("settings.account.label")),f&65552&&(Q.$$scope={dirty:f,ctx:s}),!r&&f&1&&(r=!0,Q.group=s[0],H(()=>r=!1)),l.$set(Q);const U={};f&16&&(U.title=s[4]("settings.ssh_gpg_keys.label")),f&65552&&(U.$$scope={dirty:f,ctx:s}),!S&&f&1&&(S=!0,U.group=s[0],H(()=>S=!1)),p.$set(U);const V={};f&16&&(V.title=s[4]("settings.appearance.label")),f&65552&&(V.$$scope={dirty:f,ctx:s}),!P&&f&1&&(P=!0,V.group=s[0],H(()=>P=!1)),C.$set(V);const W={};f&16&&(W.title=s[4]("settings.notifications.label")),f&65552&&(W.$$scope={dirty:f,ctx:s}),!$&&f&1&&($=!0,W.group=s[0],H(()=>$=!1)),o.$set(W)},i(s){m||(v(e.$$.fragment,s),v(l.$$.fragment,s),v(p.$$.fragment,s),v(C.$$.fragment,s),v(o.$$.fragment,s),m=!0)},o(s){w(e.$$.fragment,s),w(l.$$.fragment,s),w(p.$$.fragment,s),w(C.$$.fragment,s),w(o.$$.fragment,s),m=!1},d(s){s&&(u(t),u(i),u(N),u(c)),k(e,s),k(l,s),k(p,s),k(C,s),k(o,s)}}}function We(n){let e=n[4]("settings.headline")+"",a;return{c(){a=A(e)},l(t){a=E(t,e)},m(t,l){g(t,a,l)},p(t,l){l&16&&e!==(e=t[4]("settings.headline")+"")&&D(a,e)},d(t){t&&u(a)}}}function Xe(n){let e,a;return e=new G({props:{regionLabel:"!text-3xl text-surface-500 bg-surface-100 float-start w-full text-start ps-8 pt-8 -my-2",$$slots:{default:[We]},$$scope:{ctx:n}}}),{c(){d(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,l){h(e,t,l),a=!0},p(t,l){const r={};l&65552&&(r.$$scope={dirty:l,ctx:t}),e.$set(r)},i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function oe(n){let e,a=n[13]+"",t,l;return{c(){e=R("option"),t=A(a),this.h()},l(r){e=B(r,"OPTION",{});var i=q(e);t=E(i,a),i.forEach(u),this.h()},h(){e.__value=l=n[13],le(e,e.__value)},m(r,i){g(r,e,i),M(e,t)},p(r,i){i&8&&a!==(a=r[13]+"")&&D(t,a),i&8&&l!==(l=r[13])&&(e.__value=l,le(e,e.__value))},d(r){r&&u(e)}}}function Ye(n){let e;return{c(){e=A("Matrix")},l(a){e=E(a,"Matrix")},m(a,t){g(a,e,t)},d(a){a&&u(e)}}}function Ze(n){let e;return{c(){e=A("ForgeFed")},l(a){e=E(a,"ForgeFed")},m(a,t){g(a,e,t)},d(a){a&&u(e)}}}function ye(n){let e;return{c(){e=A("Code")},l(a){e=E(a,"Code")},m(a,t){g(a,e,t)},d(a){a&&u(e)}}}function xe(n){let e,a,t,l,r,i,p,S,N,C,P=re(n[3]),c=[];for(let o=0;o<P.length;o+=1)c[o]=oe(se(n,P,o));return t=new Z({props:{href:"https://matrix.to/#/#general-forgefed:matrix.batsense.net",target:"_blank",rel:"noreferrer",$$slots:{default:[Ye]},$$scope:{ctx:n}}}),r=new Z({props:{href:"https://forgefed.org",target:"_blank",rel:"noreferrer",$$slots:{default:[Ze]},$$scope:{ctx:n}}}),p=new Z({props:{href:"https://codeberg.org/anvil/anvil",target:"_blank",rel:"noreferrer",$$slots:{default:[ye]},$$scope:{ctx:n}}}),{c(){e=R("select");for(let o=0;o<c.length;o+=1)c[o].c();a=T(),d(t.$$.fragment),l=T(),d(r.$$.fragment),i=T(),d(p.$$.fragment),this.h()},l(o){e=B(o,"SELECT",{class:!0});var $=q(e);for(let m=0;m<c.length;m+=1)c[m].l($);$.forEach(u),a=F(o),b(t.$$.fragment,o),l=F(o),b(r.$$.fragment,o),i=F(o),b(p.$$.fragment,o),this.h()},h(){he(e,"class","select"),n[2]===void 0&&be(()=>n[7].call(e))},m(o,$){g(o,e,$);for(let m=0;m<c.length;m+=1)c[m]&&c[m].m(e,null);ae(e,n[2],!0),g(o,a,$),h(t,o,$),g(o,l,$),h(r,o,$),g(o,i,$),h(p,o,$),S=!0,N||(C=ve(e,"change",n[7]),N=!0)},p(o,$){if($&8){P=re(o[3]);let L;for(L=0;L<P.length;L+=1){const j=se(o,P,L);c[L]?c[L].p(j,$):(c[L]=oe(j),c[L].c(),c[L].m(e,null))}for(;L<c.length;L+=1)c[L].d(1);c.length=P.length}$&12&&ae(e,o[2]);const m={};$&65536&&(m.$$scope={dirty:$,ctx:o}),t.$set(m);const _={};$&65536&&(_.$$scope={dirty:$,ctx:o}),r.$set(_);const O={};$&65536&&(O.$$scope={dirty:$,ctx:o}),p.$set(O)},i(o){S||(v(t.$$.fragment,o),v(r.$$.fragment,o),v(p.$$.fragment,o),S=!0)},o(o){w(t.$$.fragment,o),w(r.$$.fragment,o),w(p.$$.fragment,o),S=!1},d(o){o&&(u(e),u(a),u(l),u(i)),we(c,o),k(t,o),k(r,o),k(p,o),N=!1,C()}}}function et(n){let e,a,t,l;return e=new Ce({props:{$$slots:{default:[qe]},$$scope:{ctx:n}}}),t=new Le({props:{aspectRatio:"auto",gap:"gap-8",height:"h-auto",width:"w-[230px]",spacing:"my-2",$$slots:{trail:[xe],lead:[Xe],default:[Ve]},$$scope:{ctx:n}}}),{c(){d(e.$$.fragment),a=T(),d(t.$$.fragment)},l(r){b(e.$$.fragment,r),a=F(r),b(t.$$.fragment,r)},m(r,i){h(e,r,i),g(r,a,i),h(t,r,i),l=!0},p(r,[i]){const p={};i&65538&&(p.$$scope={dirty:i,ctx:r}),e.$set(p);const S={};i&65565&&(S.$$scope={dirty:i,ctx:r}),t.$set(S)},i(r){l||(v(e.$$.fragment,r),v(t.$$.fragment,r),l=!0)},o(r){w(e.$$.fragment,r),w(t.$$.fragment,r),l=!1},d(r){r&&u(a),k(e,r),k(t,r)}}}function tt(n,e,a){let t,l,r,i;X(n,ne,_=>a(2,l=_)),X(n,Ae,_=>a(3,r=_)),X(n,Ee,_=>a(4,i=_));let p=0;const S=Pe();X(n,S,_=>a(1,t=_));function N(_){const O={id:_.target.value};S.open(O)}function C(){l=ke(this),ne.set(l)}function P(_){p=_,a(0,p)}function c(_){p=_,a(0,p)}function o(_){p=_,a(0,p)}function $(_){p=_,a(0,p)}function m(_){p=_,a(0,p)}return[p,t,l,r,i,S,N,C,P,c,o,$,m]}class ue extends ge{constructor(e){super(),me(this,e,tt,et,de,{})}}ue.__docgen={version:3,name:"SettingsSidebar.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const ct={title:"Atoms/SettingsSidebar",component:ue,tags:["autodocs"]},Y={};var ie,pe,fe;Y.parameters={...Y.parameters,docs:{...(ie=Y.parameters)==null?void 0:ie.docs,source:{originalSource:"{}",...(fe=(pe=Y.parameters)==null?void 0:pe.docs)==null?void 0:fe.source}}};const _t=["Plain"];export{Y as Plain,_t as __namedExportsOrder,ct as default};