import{S as A,i as B,s as L,b as p,g as d,a as _,o as y,p as g,r as O,t as k,k as m,c as a,h,j,C as v,e as M,f as N,d as q,m as J,q as C,x as P,u as Q,H as R,A as E,a6 as H}from"./vendor.906e418a.js";function w(s,e,l){const n=s.slice();return n[6]=e[l],n[8]=l,n}function z(s,e,l){const n=s.slice();return n[6]=e[l],n[8]=l,n}function T(s){let e,l;return{c(){e=p("div"),l=a(s[1]),d(e,"class","json-item inline"),d(e,"item-type","other")},m(n,f){_(n,e,f),h(e,l)},p(n,f){f&2&&j(l,n[1])},i:v,o:v,d(n){n&&m(e)}}}function U(s){let e,l;return{c(){e=p("div"),l=a(s[1]),d(e,"class","json-item inline text-blue-500"),d(e,"item-type","number")},m(n,f){_(n,e,f),h(e,l)},p(n,f){f&2&&j(l,n[1])},i:v,o:v,d(n){n&&m(e)}}}function V(s){let e,l=s[1].toLocaleString()+"",n;return{c(){e=p("div"),n=a(l),d(e,"class","json-item inline text-red-500"),d(e,"item-type","boolean")},m(f,r){_(f,e,r),h(e,n)},p(f,r){r&2&&l!==(l=f[1].toLocaleString()+"")&&j(n,l)},i:v,o:v,d(f){f&&m(e)}}}function W(s){let e,l,n,f;return{c(){e=p("div"),l=a('"'),n=a(s[1]),f=a('"'),d(e,"class","json-item inline text-green-500"),d(e,"item-type","string")},m(r,i){_(r,e,i),h(e,l),h(e,n),h(e,f)},p(r,i){i&2&&j(n,r[1])},i:v,o:v,d(r){r&&m(e)}}}function X(s){let e;return{c(){e=p("div"),e.textContent="null",d(e,"class","json-item inline text-gray-500 dark:text-gray-400"),d(e,"item-type","null")},m(l,n){_(l,e,n)},p:v,i:v,o:v,d(l){l&&m(e)}}}function Y(s){let e,l,n,f;const r=[$,x],i=[];function u(t,o){return t[0]?0:1}return e=u(s),l=i[e]=r[e](s),{c(){l.c(),n=M()},m(t,o){i[e].m(t,o),_(t,n,o),f=!0},p(t,o){let c=e;e=u(t),e===c?i[e].p(t,o):(y(),g(i[c],1,1,()=>{i[c]=null}),O(),l=i[e],l?l.p(t,o):(l=i[e]=r[e](t),l.c()),k(l,1),l.m(n.parentNode,n))},i(t){f||(k(l),f=!0)},o(t){g(l),f=!1},d(t){i[e].d(t),t&&m(n)}}}function Z(s){let e,l,n,f;const r=[te,ee],i=[];function u(t,o){return t[0]?0:1}return e=u(s),l=i[e]=r[e](s),{c(){l.c(),n=M()},m(t,o){i[e].m(t,o),_(t,n,o),f=!0},p(t,o){let c=e;e=u(t),e===c?i[e].p(t,o):(y(),g(i[c],1,1,()=>{i[c]=null}),O(),l=i[e],l?l.p(t,o):(l=i[e]=r[e](t),l.c()),k(l,1),l.m(n.parentNode,n))},i(t){f||(k(l),f=!0)},o(t){g(l),f=!1},d(t){i[e].d(t),t&&m(n)}}}function x(s){let e,l,n,f,r=Object.entries(s[1]),i=[];for(let t=0;t<r.length;t+=1)i[t]=G(w(s,r,t));const u=t=>g(i[t],1,1,()=>{i[t]=null});return{c(){e=a(`{
			`),l=p("div");for(let t=0;t<i.length;t+=1)i[t].c();n=a(`
			}`),d(l,"class","json-children pl-4")},m(t,o){_(t,e,o),_(t,l,o);for(let c=0;c<i.length;c+=1)i[c].m(l,null);_(t,n,o),f=!0},p(t,o){if(o&14){r=Object.entries(t[1]);let c;for(c=0;c<r.length;c+=1){const b=w(t,r,c);i[c]?(i[c].p(b,o),k(i[c],1)):(i[c]=G(b),i[c].c(),k(i[c],1),i[c].m(l,null))}for(y(),c=r.length;c<i.length;c+=1)u(c);O()}},i(t){if(!f){for(let o=0;o<r.length;o+=1)k(i[o]);f=!0}},o(t){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)g(i[o]);f=!1},d(t){t&&m(e),t&&m(l),P(i,t),t&&m(n)}}}function $(s){let e,l,n=Object.keys(s[1]).length+"",f,r,i,u;return{c(){e=p("button"),l=a("{+"),f=a(n),r=a(" items}")},m(t,o){_(t,e,o),h(e,l),h(e,f),h(e,r),i||(u=Q(e,"click",s[5]),i=!0)},p(t,o){o&2&&n!==(n=Object.keys(t[1]).length+"")&&j(f,n)},i:v,o:v,d(t){t&&m(e),i=!1,u()}}}function F(s){let e;return{c(){e=a(",")},m(l,n){_(l,e,n)},d(l){l&&m(e)}}}function G(s){let e,l=s[6][0]+"",n,f,r,i=s[8]!==Object.keys(s[1]).length-1,u,t;r=new D({props:{value:s[6][1],depth:s[3]+1,key:s[8],theme:s[2]}});let o=i&&F();return{c(){e=p("div"),n=a(l),f=a(": "),N(r.$$.fragment),o&&o.c(),u=q(),d(e,"class","json-item")},m(c,b){_(c,e,b),h(e,n),h(e,f),J(r,e,null),o&&o.m(e,null),h(e,u),t=!0},p(c,b){(!t||b&2)&&l!==(l=c[6][0]+"")&&j(n,l);const S={};b&2&&(S.value=c[6][1]),b&8&&(S.depth=c[3]+1),b&4&&(S.theme=c[2]),r.$set(S),b&2&&(i=c[8]!==Object.keys(c[1]).length-1),i?o||(o=F(),o.c(),o.m(e,u)):o&&(o.d(1),o=null)},i(c){t||(k(r.$$.fragment,c),t=!0)},o(c){g(r.$$.fragment,c),t=!1},d(c){c&&m(e),C(r),o&&o.d()}}}function ee(s){let e,l,n,f,r=s[1],i=[];for(let t=0;t<r.length;t+=1)i[t]=K(z(s,r,t));const u=t=>g(i[t],1,1,()=>{i[t]=null});return{c(){e=a(`[
			`),l=p("div");for(let t=0;t<i.length;t+=1)i[t].c();n=a(`
			]`),d(l,"class","json-children pl-4")},m(t,o){_(t,e,o),_(t,l,o);for(let c=0;c<i.length;c+=1)i[c].m(l,null);_(t,n,o),f=!0},p(t,o){if(o&14){r=t[1];let c;for(c=0;c<r.length;c+=1){const b=z(t,r,c);i[c]?(i[c].p(b,o),k(i[c],1)):(i[c]=K(b),i[c].c(),k(i[c],1),i[c].m(l,null))}for(y(),c=r.length;c<i.length;c+=1)u(c);O()}},i(t){if(!f){for(let o=0;o<r.length;o+=1)k(i[o]);f=!0}},o(t){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)g(i[o]);f=!1},d(t){t&&m(e),t&&m(l),P(i,t),t&&m(n)}}}function te(s){let e,l,n=s[1].length+"",f,r,i,u;return{c(){e=p("button"),l=a("[+"),f=a(n),r=a(" children]")},m(t,o){_(t,e,o),h(e,l),h(e,f),h(e,r),i||(u=Q(e,"click",s[4]),i=!0)},p(t,o){o&2&&n!==(n=t[1].length+"")&&j(f,n)},i:v,o:v,d(t){t&&m(e),i=!1,u()}}}function I(s){let e;return{c(){e=a(",")},m(l,n){_(l,e,n)},d(l){l&&m(e)}}}function K(s){let e,l,n,f,r,i,u;f=new D({props:{value:s[6],depth:s[3]+1,theme:s[2]}});let t=s[8]!==s[1].length-1&&I();return{c(){e=p("div"),l=a(s[8]),n=a(": "),N(f.$$.fragment),r=q(),t&&t.c(),i=q(),d(e,"class","json-item")},m(o,c){_(o,e,c),h(e,l),h(e,n),J(f,e,null),h(e,r),t&&t.m(e,null),h(e,i),u=!0},p(o,c){const b={};c&2&&(b.value=o[6]),c&8&&(b.depth=o[3]+1),c&4&&(b.theme=o[2]),f.$set(b),o[8]!==o[1].length-1?t||(t=I(),t.c(),t.m(e,i)):t&&(t.d(1),t=null)},i(o){u||(k(f.$$.fragment,o),u=!0)},o(o){g(f.$$.fragment,o),u=!1},d(o){o&&m(e),C(f),t&&t.d()}}}function le(s){let e,l,n,f;const r=[Z,Y,X,W,V,U,T],i=[];function u(t,o){return t[1]instanceof Array?0:t[1]instanceof Object?1:t[1]===null?2:typeof t[1]=="string"?3:typeof t[1]=="boolean"?4:typeof t[1]=="number"?5:6}return l=u(s),n=i[l]=r[l](s),{c(){e=p("div"),n.c(),d(e,"class","json-node inline"),d(e,"theme",s[2])},m(t,o){_(t,e,o),i[l].m(e,null),f=!0},p(t,[o]){let c=l;l=u(t),l===c?i[l].p(t,o):(y(),g(i[c],1,1,()=>{i[c]=null}),O(),n=i[l],n?n.p(t,o):(n=i[l]=r[l](t),n.c()),k(n,1),n.m(e,null)),(!f||o&4)&&d(e,"theme",t[2])},i(t){f||(k(n),f=!0)},o(t){g(n),f=!1},d(t){t&&m(e),i[l].d()}}}function ne(s,e,l){let{value:n}=e,{theme:f="default"}=e,{depth:r}=e,{collapsed:i=r>4}=e;const u=()=>{l(0,i=!1)},t=()=>{l(0,i=!1)};return s.$$set=o=>{"value"in o&&l(1,n=o.value),"theme"in o&&l(2,f=o.theme),"depth"in o&&l(3,r=o.depth),"collapsed"in o&&l(0,i=o.collapsed)},[i,n,f,r,u,t]}class D extends A{constructor(e){super();B(this,e,ne,le,L,{value:1,theme:2,depth:3,collapsed:0})}}function ie(s){let e,l,n;return l=new D({props:{value:s[0],depth:0,theme:s[1]}}),{c(){e=p("div"),N(l.$$.fragment),d(e,"class","output-json font-mono leading-relaxed w-full svelte-7lqb9h"),d(e,"theme",s[1])},m(f,r){_(f,e,r),J(l,e,null),n=!0},p(f,[r]){const i={};r&1&&(i.value=f[0]),r&2&&(i.theme=f[1]),l.$set(i),(!n||r&2)&&d(e,"theme",f[1])},i(f){n||(k(l.$$.fragment,f),n=!0)},o(f){g(l.$$.fragment,f),n=!1},d(f){f&&m(e),C(l)}}}function oe(s,e,l){let{value:n={}}=e,{theme:f="default"}=e;return s.$$set=r=>{"value"in r&&l(0,n=r.value),"theme"in r&&l(1,f=r.theme)},[n,f]}class fe extends A{constructor(e){super();B(this,e,oe,ie,L,{value:0,theme:1})}}function re(s){let e,l;return e=new fe({props:{theme:s[1],style:s[2],value:s[0]}}),{c(){N(e.$$.fragment)},m(n,f){J(e,n,f),l=!0},p(n,[f]){const r={};f&2&&(r.theme=n[1]),f&4&&(r.style=n[2]),f&1&&(r.value=n[0]),e.$set(r)},i(n){l||(k(e.$$.fragment,n),l=!0)},o(n){g(e.$$.fragment,n),l=!1},d(n){C(e,n)}}}function ce(s,e,l){let{value:n}=e,{theme:f}=e,{style:r}=e;const i=R();return e.default&&(n=e.default),s.$$set=u=>{l(4,e=E(E({},e),H(u))),"value"in u&&l(0,n=u.value),"theme"in u&&l(1,f=u.theme),"style"in u&&l(2,r=u.style)},s.$$.update=()=>{s.$$.dirty&1&&i("change")},e=H(e),[n,f,r]}class se extends A{constructor(e){super();B(this,e,ce,re,L,{value:0,theme:1,style:2})}}var ae=se;const _e=["static"];export{ae as Component,_e as modes};
