import"./svelte/svelte_internal_flags_async.js";import*as t from"./svelte/svelte_internal_client.js";import"./i18n-BldJSFLV.js";import{G as c}from"./utils.svelte-Ceck75cM.js";import{J as v}from"./JSON-DH989FIX.js";import{B as f,b,J as w}from"./IconButtonWrapper-Cljb5D-5.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_svelte.js";import{S as $}from"./StreamingBar-b2qVLPYU.js";import"./svelte/svelte_store.js";import"./index-Ds2meNS5.js";import"./svelte/svelte_animate.js";import"./svelte/svelte_attachments.js";import"./svelte/svelte_easing.js";import"./svelte/svelte_internal_flags_tracing.js";import"./svelte/svelte_internal_server.js";import"./svelte/svelte_legacy.js";import"./svelte/svelte_motion.js";import"./svelte/svelte_reactivity.js";import"./svelte/svelte_reactivity_window.js";import"./svelte/svelte_server.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";import"./MarkdownCode-C2b9iIxl.js";import"./prism-python-CpYAgONt.js";var x=t.from_html("<div><!></div> <!> <!>",1);function U(u,i){t.push(i,!0);const d=t.rest_props(i,["$$slots","$$events","$$legacy"]),e=new c(d);let a=t.state(t.proxy(e.props.value));t.user_effect(()=>{t.get(a)!==e.props.value&&(t.set(a,e.props.value,!0),e.dispatch("change"))});let l=t.state(0);f(u,{get visible(){return e.shared.visible},test_id:"json",get elem_id(){return e.shared.elem_id},get elem_classes(){return e.shared.elem_classes},get container(){return e.shared.container},get scale(){return e.shared.scale},get min_width(){return e.shared.min_width},padding:!1,allow_overflow:!0,overflow_behavior:"auto",get height(){return e.props.height},get min_height(){return e.props.min_height},get max_height(){return e.props.max_height},children:(m,y)=>{var p=x(),s=t.first_child(p),h=t.child(s);{var _=r=>{{let o=t.derived(()=>e.shared.container===!1);b(r,{get Icon(){return w},get show_label(){return e.shared.show_label},get label(){return e.shared.label},float:!1,get disable(){return t.get(o)}})}};t.if(h,r=>{e.shared.label&&r(_)})}t.reset(s);var n=t.sibling(s,2);$(n,t.spread_props({get autoscroll(){return e.shared.autoscroll},get i18n(){return e.i18n}},()=>e.shared.loading_status,{on_clear_status:()=>e.dispatch("clear_status",e.shared.loading_status)}));var g=t.sibling(n,2);{let r=t.derived(()=>e.props.buttons==null?!0:e.props.buttons.some(o=>typeof o=="string"&&o==="copy"));v(g,{get value(){return e.props.value},get open(){return e.props.open},get theme_mode(){return e.props.theme_mode},get show_indices(){return e.props.show_indices},get show_copy_button(){return t.get(r)},get buttons(){return e.props.buttons},on_custom_button_click:o=>{e.dispatch("custom_button_click",{id:o})},get label_height(){return t.get(l)}})}t.bind_element_size(s,"clientHeight",r=>t.set(l,r)),t.append(m,p)},$$slots:{default:!0}}),t.pop()}export{v as BaseJSON,U as default};
