text: import{S as t,i as e,s as $,aI as n,ad as r,ae as s,$ as a,a0 as c,k as o,e as f,t as l,j as m,M as i,d as p,n as g,c as d,a as u,g as h,m as x,b as v,f as w,D as y,o as E,af as D,x as I,u as S,v as b,a1 as k,a2 as C,a3 as H,h as N,ag as P,l as V,r as j,w as A,J as T,a6 as B,aK as F,a7 as G,a8 as J,F as K,G as M}from"../../chunks/vendor-2c2bd768.js";import{i as R}from"../../chunks/items-34670d13.js";function U(t,e,$){const n=t.slice();return n[5]=e[$],n}function q(t){let e,$,n,r,s,a,c,m=t[5].name+"",i=t[5].text+"";return{c(){e=f("div"),$=f("h4"),n=l(m),r=o(),s=f("p"),a=l(i),c=o(),this.h()},l(t){e=d(t,"DIV",{class:!0});var o=u(e);$=d(o,"H4",{});var f=u($);n=h(f,m),f.forEach(p),r=g(o),s=d(o,"P",{});var l=u(s);a=h(l,i),l.forEach(p),o.forEach(p),c=g(t),this.h()},h(){v(e,"class","inner-panel")},m(t,o){w(t,e,o),y(e,$),y($,n),y(e,r),y(e,s),y(s,a),w(t,c,o)},p(t,e){4&e&&m!==(m=t[5].name+"")&&N(n,m),4&e&&i!==(i=t[5].text+"")&&N(a,i)},d(t){t&&p(e),t&&p(c)}}}function z(t){let e,$;return e=new F({props:{$$slots:{default:[q]},$$scope:{ctx:t}}}),{c(){m(e.$$.fragment)},l(t){x(e.$$.fragment,t)},m(t,n){E(e,t,n),$=!0},p(t,$){const n={};260&$&&(n.$$scope={dirty:$,ctx:t}),e.$set(n)},i(t){$||(I(e.$$.fragment,t),$=!0)},o(t){S(e.$$.fragment,t),$=!1},d(t){b(e,t)}}}function L(t){let e,$,n=t[2],r=[];for(let a=0;a<n.length;a+=1)r[a]=z(U(t,n,a));const s=t=>S(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=V()},l(t){for(let e=0;e<r.length;e+=1)r[e].l(t);e=V()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);w(t,e,n),$=!0},p(t,$){if(4&$){let a;for(n=t[2],a=0;a<n.length;a+=1){const s=U(t,n,a);r[a]?(r[a].p(s,$),I(r[a],1)):(r[a]=z(s),r[a].c(),I(r[a],1),r[a].m(e.parentNode,e))}for(j(),a=n.length;a<r.length;a+=1)s(a);A()}},i(t){if(!$){for(let t=0;t<n.length;t+=1)I(r[t]);$=!0}},o(t){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)S(r[e]);$=!1},d(t){T(r,t),t&&p(e)}}}function O(t){let e;return{c(){e=l("Name")},l(t){e=h(t,"Name")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function Q(t){let e;return{c(){e=l("Default")},l(t){e=h(t,"Default")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function W(t){let e;return{c(){e=l("Description")},l(t){e=h(t,"Description")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function X(t){let e;return{c(){e=l("Change")},l(t){e=h(t,"Change")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function Y(t){let e,$,n,r,s,a,c,f;return e=new G({props:{$$slots:{default:[O]},$$scope:{ctx:t}}}),n=new G({props:{$$slots:{default:[Q]},$$scope:{ctx:t}}}),s=new G({props:{$$slots:{default:[W]},$$scope:{ctx:t}}}),c=new G({props:{$$slots:{default:[X]},$$scope:{ctx:t}}}),{c(){m(e.$$.fragment),$=o(),m(n.$$.fragment),r=o(),m(s.$$.fragment),a=o(),m(c.$$.fragment)},l(t){x(e.$$.fragment,t),$=g(t),x(n.$$.fragment,t),r=g(t),x(s.$$.fragment,t),a=g(t),x(c.$$.fragment,t)},m(t,o){E(e,t,o),w(t,$,o),E(n,t,o),w(t,r,o),E(s,t,o),w(t,a,o),E(c,t,o),f=!0},p(t,$){const r={};256&$&&(r.$$scope={dirty:$,ctx:t}),e.$set(r);const a={};256&$&&(a.$$scope={dirty:$,ctx:t}),n.$set(a);const o={};256&$&&(o.$$scope={dirty:$,ctx:t}),s.$set(o);const f={};256&$&&(f.$$scope={dirty:$,ctx:t}),c.$set(f)},i(t){f||(I(e.$$.fragment,t),I(n.$$.fragment,t),I(s.$$.fragment,t),I(c.$$.fragment,t),f=!0)},o(t){S(e.$$.fragment,t),S(n.$$.fragment,t),S(s.$$.fragment,t),S(c.$$.fragment,t),f=!1},d(t){b(e,t),t&&p($),b(n,t),t&&p(r),b(s,t),t&&p(a),b(c,t)}}}function Z(t){let e,$;return e=new B({props:{$$slots:{default:[Y]},$$scope:{ctx:t}}}),{c(){m(e.$$.fragment)},l(t){x(e.$$.fragment,t)},m(t,n){E(e,t,n),$=!0},p(t,$){const n={};256&$&&(n.$$scope={dirty:$,ctx:t}),e.$set(n)},i(t){$||(I(e.$$.fragment,t),$=!0)},o(t){S(e.$$.fragment,t),$=!1},d(t){b(e,t)}}}function _(t){let e;return{c(){e=l("index")},l(t){e=h(t,"index")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function tt(t){let e;return{c(){e=l("0")},l(t){e=h(t,"0")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function et(t){let e;return{c(){e=l("the index of the active item")},l(t){e=h(t,"the index of the active item")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function $t(t){let e,$,n;return{c(){e=f("input"),this.h()},l(t){e=d(t,"INPUT",{type:!0}),this.h()},h(){v(e,"type","number")},m(r,s){w(r,e,s),K(e,t[0]),$||(n=M(e,"input",t[4]),$=!0)},p(t,$){1&$&&P(e.value)!==t[0]&&K(e,t[0])},d(t){t&&p(e),$=!1,n()}}}function nt(t){let e,$,n,r,s,a,c,f;return e=new J({props:{$$slots:{default:[_]},$$scope:{ctx:t}}}),n=new J({props:{$$slots:{default:[tt]},$$scope:{ctx:t}}}),s=new J({props:{$$slots:{default:[et]},$$scope:{ctx:t}}}),c=new J({props:{$$slots:{default:[$t]},$$scope:{ctx:t}}}),{c(){m(e.$$.fragment),$=o(),m(n.$$.fragment),r=o(),m(s.$$.fragment),a=o(),m(c.$$.fragment)},l(t){x(e.$$.fragment,t),$=g(t),x(n.$$.fragment,t),r=g(t),x(s.$$.fragment,t),a=g(t),x(c.$$.fragment,t)},m(t,o){E(e,t,o),w(t,$,o),E(n,t,o),w(t,r,o),E(s,t,o),w(t,a,o),E(c,t,o),f=!0},p(t,$){const r={};256&$&&(r.$$scope={dirty:$,ctx:t}),e.$set(r);const a={};256&$&&(a.$$scope={dirty:$,ctx:t}),n.$set(a);const o={};256&$&&(o.$$scope={dirty:$,ctx:t}),s.$set(o);const f={};257&$&&(f.$$scope={dirty:$,ctx:t}),c.$set(f)},i(t){f||(I(e.$$.fragment,t),I(n.$$.fragment,t),I(s.$$.fragment,t),I(c.$$.fragment,t),f=!0)},o(t){S(e.$$.fragment,t),S(n.$$.fragment,t),S(s.$$.fragment,t),S(c.$$.fragment,t),f=!1},d(t){b(e,t),t&&p($),b(n,t),t&&p(r),b(s,t),t&&p(a),b(c,t)}}}function rt(t){let e,$;return e=new B({props:{$$slots:{default:[nt]},$$scope:{ctx:t}}}),{c(){m(e.$$.fragment)},l(t){x(e.$$.fragment,t)},m(t,n){E(e,t,n),$=!0},p(t,$){const n={};257&$&&(n.$$scope={dirty:$,ctx:t}),e.$set(n)},i(t){$||(I(e.$$.fragment,t),$=!0)},o(t){S(e.$$.fragment,t),$=!1},d(t){b(e,t)}}}function st(t){let e,$,n,r;return e=new C({props:{$$slots:{default:[Z]},$$scope:{ctx:t}}}),n=new H({props:{$$slots:{default:[rt]},$$scope:{ctx:t}}}),{c(){m(e.$$.fragment),$=o(),m(n.$$.fragment)},l(t){x(e.$$.fragment,t),$=g(t),x(n.$$.fragment,t)},m(t,s){E(e,t,s),w(t,$,s),E(n,t,s),r=!0},p(t,$){const r={};256&$&&(r.$$scope={dirty:$,ctx:t}),e.$set(r);const s={};257&$&&(s.$$scope={dirty:$,ctx:t}),n.$set(s)},i(t){r||(I(e.$$.fragment,t),I(n.$$.fragment,t),r=!0)},o(t){S(e.$$.fragment,t),S(n.$$.fragment,t),r=!1},d(t){b(e,t),t&&p($),b(n,t)}}}function at(t){let e;return{c(){e=l("Name")},l(t){e=h(t,"Name")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function ct(t){let e;return{c(){e=l("Args")},l(t){e=h(t,"Args")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function ot(t){let e,$,n,r;return e=new G({props:{$$slots:{default:[at]},$$scope:{ctx:t}}}),n=new G({props:{$$slots:{default:[ct]},$$scope:{ctx:t}}}),{c(){m(e.$$.fragment),$=o(),m(n.$$.fragment)},l(t){x(e.$$.fragment,t),$=g(t),x(n.$$.fragment,t)},m(t,s){E(e,t,s),w(t,$,s),E(n,t,s),r=!0},p(t,$){const r={};256&$&&(r.$$scope={dirty:$,ctx:t}),e.$set(r);const s={};256&$&&(s.$$scope={dirty:$,ctx:t}),n.$set(s)},i(t){r||(I(e.$$.fragment,t),I(n.$$.fragment,t),r=!0)},o(t){S(e.$$.fragment,t),S(n.$$.fragment,t),r=!1},d(t){b(e,t),t&&p($),b(n,t)}}}function ft(t){let e,$;return e=new B({props:{$$slots:{default:[ot]},$$scope:{ctx:t}}}),{c(){m(e.$$.fragment)},l(t){x(e.$$.fragment,t)},m(t,n){E(e,t,n),$=!0},p(t,$){const n={};256&$&&(n.$$scope={dirty:$,ctx:t}),e.$set(n)},i(t){$||(I(e.$$.fragment,t),$=!0)},o(t){S(e.$$.fragment,t),$=!1},d(t){b(e,t)}}}function lt(t){let e;return{c(){e=l("changed")},l(t){e=h(t,"changed")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function mt(t){let e;return{c(){e=l("index: the index of the active item")},l(t){e=h(t,"index: the index of the active item")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function it(t){let e,$,n,r;return e=new J({props:{$$slots:{default:[lt]},$$scope:{ctx:t}}}),n=new J({props:{$$slots:{default:[mt]},$$scope:{ctx:t}}}),{c(){m(e.$$.fragment),$=o(),m(n.$$.fragment)},l(t){x(e.$$.fragment,t),$=g(t),x(n.$$.fragment,t)},m(t,s){E(e,t,s),w(t,$,s),E(n,t,s),r=!0},p(t,$){const r={};256&$&&(r.$$scope={dirty:$,ctx:t}),e.$set(r);const s={};256&$&&(s.$$scope={dirty:$,ctx:t}),n.$set(s)},i(t){r||(I(e.$$.fragment,t),I(n.$$.fragment,t),r=!0)},o(t){S(e.$$.fragment,t),S(n.$$.fragment,t),r=!1},d(t){b(e,t),t&&p($),b(n,t)}}}function pt(t){let e;return{c(){e=l("activeChange (SwitcherItem)")},l(t){e=h(t,"activeChange (SwitcherItem)")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function gt(t){let e;return{c(){e=l("active: whether the changed item is active")},l(t){e=h(t,"active: whether the changed item is active")},m(t,$){w(t,e,$)},d(t){t&&p(e)}}}function dt(t){let e,$,n,r;return e=new J({props:{$$slots:{default:[pt]},$$scope:{ctx:t}}}),n=new J({props:{$$slots:{default:[gt]},$$scope:{ctx:t}}}),{c(){m(e.$$.fragment),$=o(),m(n.$$.fragment)},l(t){x(e.$$.fragment,t),$=g(t),x(n.$$.fragment,t)},m(t,s){E(e,t,s),w(t,$,s),E(n,t,s),r=!0},p(t,$){const r={};256&$&&(r.$$scope={dirty:$,ctx:t}),e.$set(r);const s={};256&$&&(s.$$scope={dirty:$,ctx:t}),n.$set(s)},i(t){r||(I(e.$$.fragment,t),I(n.$$.fragment,t),r=!0)},o(t){S(e.$$.fragment,t),S(n.$$.fragment,t),r=!1},d(t){b(e,t),t&&p($),b(n,t)}}}function ut(t){let e,$,n,r;return e=new B({props:{$$slots:{default:[it]},$$scope:{ctx:t}}}),n=new B({props:{$$slots:{default:[dt]},$$scope:{ctx:t}}}),{c(){m(e.$$.fragment),$=o(),m(n.$$.fragment)},l(t){x(e.$$.fragment,t),$=g(t),x(n.$$.fragment,t)},m(t,s){E(e,t,s),w(t,$,s),E(n,t,s),r=!0},p(t,$){const r={};256&$&&(r.$$scope={dirty:$,ctx:t}),e.$set(r);const s={};256&$&&(s.$$scope={dirty:$,ctx:t}),n.$set(s)},i(t){r||(I(e.$$.fragment,t),I(n.$$.fragment,t),r=!0)},o(t){S(e.$$.fragment,t),S(n.$$.fragment,t),r=!1},d(t){b(e,t),t&&p($),b(n,t)}}}function ht(t){let e,$,n,r;return e=new C({props:{$$slots:{default:[ft]},$$scope:{ctx:t}}}),n=new H({props:{$$slots:{default:[ut]},$$scope:{ctx:t}}}),{c(){m(e.$$.fragment),$=o(),m(n.$$.fragment)},l(t){x(e.$$.fragment,t),$=g(t),x(n.$$.fragment,t)},m(t,s){E(e,t,s),w(t,$,s),E(n,t,s),r=!0},p(t,$){const r={};256&$&&(r.$$scope={dirty:$,ctx:t}),e.$set(r);const s={};256&$&&(s.$$scope={dirty:$,ctx:t}),n.$set(s)},i(t){r||(I(e.$$.fragment,t),I(n.$$.fragment,t),r=!0)},o(t){S(e.$$.fragment,t),S(n.$$.fragment,t),r=!1},d(t){b(e,t),t&&p($),b(n,t)}}}function xt(t){let e,$;return{c(){e=f("pre"),$=l(t[1])},l(n){e=d(n,"PRE",{});var r=u(e);$=h(r,t[1]),r.forEach(p)},m(t,n){w(t,e,n),y(e,$)},p(t,e){2&e&&N($,t[1])},d(t){t&&p(e)}}}function vt(t){let e,$,k,C,H,N,P,V,j,A,T,B,F,G,J,K,M,R,U,q,z,O,Q,W,X,Y,Z,_,tt,et,$t,nt,rt;function at(e){t[3](e)}let ct={$$slots:{default:[L]},$$scope:{ctx:t}};return void 0!==t[0]&&(ct.index=t[0]),F=new n({props:ct}),r.push((()=>s(F,"index",at))),q=new a({props:{$$slots:{default:[st]},$$scope:{ctx:t}}}),Y=new a({props:{$$slots:{default:[ht]},$$scope:{ctx:t}}}),nt=new c({props:{$$slots:{default:[xt]},$$scope:{ctx:t}}}),{c(){e=o(),$=f("div"),k=f("h1"),C=l("Switcher"),H=o(),N=f("p"),P=l("A set of panels that can be switched between, either programmatically or\r\n    using one of the navigation components."),V=o(),j=f("h2"),A=l("Demo"),T=o(),B=f("div"),m(F.$$.fragment),J=o(),K=f("h2"),M=l("Properties"),R=o(),U=f("div"),m(q.$$.fragment),z=o(),O=f("h2"),Q=l("Events"),W=o(),X=f("div"),m(Y.$$.fragment),Z=o(),_=f("h2"),tt=l("Code"),et=o(),$t=f("div"),m(nt.$$.fragment),this.h()},l(t){i('[data-svelte="svelte-rgj2al"]',document.head).forEach(p),e=g(t),$=d(t,"DIV",{class:!0});var n=u($);k=d(n,"H1",{});var r=u(k);C=h(r,"Switcher"),r.forEach(p),H=g(n),N=d(n,"P",{});var s=u(N);P=h(s,"A set of panels that can be switched between, either programmatically or\r\n    using one of the navigation components."),s.forEach(p),V=g(n),j=d(n,"H2",{});var a=u(j);A=h(a,"Demo"),a.forEach(p),T=g(n),B=d(n,"DIV",{class:!0});var c=u(B);x(F.$$.fragment,c),c.forEach(p),J=g(n),K=d(n,"H2",{});var o=u(K);M=h(o,"Properties"),o.forEach(p),R=g(n),U=d(n,"DIV",{class:!0});var f=u(U);x(q.$$.fragment,f),f.forEach(p),z=g(n),O=d(n,"H2",{});var l=u(O);Q=h(l,"Events"),l.forEach(p),W=g(n),X=d(n,"DIV",{class:!0});var m=u(X);x(Y.$$.fragment,m),m.forEach(p),Z=g(n),_=d(n,"H2",{});var v=u(_);tt=h(v,"Code"),v.forEach(p),et=g(n),$t=d(n,"DIV",{class:!0});var w=u($t);x(nt.$$.fragment,w),w.forEach(p),n.forEach(p),this.h()},h(){document.title="Switcher | Svelte Toolkit",v(B,"class","block"),v(U,"class","block"),v(X,"class","block"),v($t,"class","block"),v($,"class","container")},m(t,n){w(t,e,n),w(t,$,n),y($,k),y(k,C),y($,H),y($,N),y(N,P),y($,V),y($,j),y(j,A),y($,T),y($,B),E(F,B,null),y($,J),y($,K),y(K,M),y($,R),y($,U),E(q,U,null),y($,z),y($,O),y(O,Q),y($,W),y($,X),E(Y,X,null),y($,Z),y($,_),y(_,tt),y($,et),y($,$t),E(nt,$t,null),rt=!0},p(t,[e]){const $={};260&e&&($.$$scope={dirty:e,ctx:t}),!G&&1&e&&(G=!0,$.index=t[0],D((()=>G=!1))),F.$set($);const n={};257&e&&(n.$$scope={dirty:e,ctx:t}),q.$set(n);const r={};256&e&&(r.$$scope={dirty:e,ctx:t}),Y.$set(r);const s={};258&e&&(s.$$scope={dirty:e,ctx:t}),nt.$set(s)},i(t){rt||(I(F.$$.fragment,t),I(q.$$.fragment,t),I(Y.$$.fragment,t),I(nt.$$.fragment,t),rt=!0)},o(t){S(F.$$.fragment,t),S(q.$$.fragment,t),S(Y.$$.fragment,t),S(nt.$$.fragment,t),rt=!1},d(t){t&&p(e),t&&p($),b(F),b(q),b(Y),b(nt)}}}function wt(t,e,$){let n,r;k(t,R,(t=>$(2,r=t)));let s=0;return t.$$.update=()=>{1&t.$$.dirty&&$(1,n=`\nimport { Switcher, SwitcherItem } from "svelte-toolkit";\n\n<Switcher index={${s}}>\n  {#each $items as item}\n    <SwitcherItem>\n      <div class="inner-panel">\n        <h4>{item.header}</h4>\n        <p>{item.text}</p>\n      </div>\n    </SwitcherItem>\n  {/each}\n</Switcher>`.trim())},[s,n,r,function(t){s=t,$(0,s)},function(){s=P(this.value),$(0,s)}]}class yt extends t{constructor(t){super(),e(this,t,wt,vt,$,{})}}export{yt as default};
  