import{n as g}from"./number-rE36t967.js";import{b as h,r as j,D as V,h as a,t as l,x as m,E as t,F as r,G as f,K as d,l as y,u as p,H as b}from"./vue-y3KLWBaS.js";import{n as _}from"./app-JmgyQoR0.js";const A=h({name:"XValue",props:{value:{required:!0}},setup(e){const u=j({});if(n(e.value))for(const s in e.value)u[s]=v(e.value[s]);function n(s){return typeof s=="object"&&!Array.isArray(s)&&s!==null}function i(s){return Array.isArray(s)}function c(s){return i(s)&&s.length===0||n(s)&&Object.keys(s).length===0}function v(s){return(n(s)||i(s))&&!c(s)}return{number:g,collapsed:u,isObject:n,isArray:i,isEmpty:c,collapsable:v}}}),C={class:"igpposuu _monospace"},O={key:0,class:"null"},$={key:2,class:"string"},E={key:3,class:"number"},N={key:4,class:"array empty"},X={key:5,class:"array"},B={class:"element"},M={key:6,class:"object empty"},w={key:7,class:"object"},z={class:"kv"},D=["onClick"],F={class:"k"},I={key:0,class:"v"},q=["onClick"],G={key:1,class:"v"};function H(e,u,n,i,c,v){const s=V("XValue");return a(),l("div",C,[e.value===null?(a(),l("div",O,"null")):typeof e.value=="boolean"?(a(),l("div",{key:1,class:m(["boolean",{true:e.value,false:!e.value}])},t(e.value?"true":"false"),3)):typeof e.value=="string"?(a(),l("div",$,' "'+t(e.value)+'" ',1)):typeof e.value=="number"?(a(),l("div",E,t(e.number(e.value)),1)):e.isArray(e.value)&&e.isEmpty(e.value)?(a(),l("div",N," [] ")):e.isArray(e.value)?(a(),l("div",X,[(a(!0),l(r,null,f(e.value.length,o=>(a(),l("div",B,[d(t(o)+": ",1),y(s,{value:e.value[o-1],collapsed:""},null,8,["value"])]))),256))])):e.isObject(e.value)&&e.isEmpty(e.value)?(a(),l("div",M," {} ")):e.isObject(e.value)?(a(),l("div",w,[(a(!0),l(r,null,f(Object.keys(e.value),o=>(a(),l("div",z,[p("button",{class:m(["toggle _button",{visible:e.collapsable(e.value[o])}]),onClick:k=>e.collapsed[o]=!e.collapsed[o]},t(e.collapsed[o]?"+":"-"),11,D),p("div",F,t(o)+":",1),e.collapsed[o]?(a(),l("div",I,[p("button",{class:"_button",onClick:k=>e.collapsed[o]=!e.collapsed[o]},[typeof e.value[o]=="string"?(a(),l(r,{key:0},[d('"..."')],64)):e.isArray(e.value[o])?(a(),l(r,{key:1},[d("[...]")],64)):e.isObject(e.value[o])?(a(),l(r,{key:2},[d("{...}")],64)):b("",!0)],8,q)])):(a(),l("div",G,[y(s,{value:e.value[o]},null,8,["value"])]))]))),256))])):b("",!0)])}const K=_(A,[["render",H],["__scopeId","data-v-ec8fa01e"]]),L={class:"zhyxdalp"},S=h({__name:"MkObjectView",props:{value:{}},setup(e){return(u,n)=>(a(),l("div",L,[y(K,{value:u.value,collapsed:!1},null,8,["value"])]))}}),Q=_(S,[["__scopeId","data-v-f1630df8"]]);export{Q as M};
