import"./svelte/svelte_internal_flags_async.js";import*as e from"./svelte/svelte_internal_client.js";import{B as g}from"./ScrollFade-B34EcSMi.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_svelte.js";import"./i18n-CeTBXmsd.js";import{G as b}from"./utils.svelte-D2llzkGs.js";import{S as x}from"./StreamingBar-m3Ywvutz.js";import{B as y}from"./Index.svelte_svelte_type_style_lang-l5w5VPA-.js";import"./MarkdownCode-CEyGWpPm.js";import"./index-xGeN4i2A.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_store.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";import"./prism-python-BSSAvU0Z.js";var $=e.from_html('<button><span class="svelte-e5lyqv"> </span> <span class="icon svelte-e5lyqv">▼</span></button> <div><!></div>',1);function k(c,r){e.push(r,!0);let s=e.prop(r,"open",15,!0),u=e.prop(r,"label",3,"");var t=$(),a=e.first_child(t);a.__click=()=>{s(!s()),s()?r.onexpand?.():r.oncollapse?.()};let i;var l=e.child(a),p=e.child(l,!0);e.reset(l);var d=e.sibling(l,2);let m;e.reset(a);var n=e.sibling(a,2);let o;var _=e.child(n);e.slot(_,r,"default",{},null),e.reset(n),e.template_effect(()=>{i=e.set_class(a,1,"label-wrap svelte-e5lyqv",null,i,{open:s()}),e.set_text(p,u()),m=e.set_style(d,"",m,{transform:s()?"rotate(0)":"rotate(90deg)"}),o=e.set_style(n,"",o,{display:s()?"block":"none"})}),e.append(c,t),e.pop()}e.delegate(["click"]);var B=e.from_html("<!> <!>",1);function W(c,r){e.push(r,!0);let s=e.rest_props(r,["$$slots","$$events","$$legacy"]);class u extends b{set_data(l){"open"in l&&l.open&&this.dispatch("gradio_expand"),super.set_data(l),this.shared.loading_status.status="complete"}}const t=new u(s);let a=e.derived(()=>t.shared.label||"");g(c,{get elem_id(){return t.shared.elem_id},get elem_classes(){return t.shared.elem_classes},get visible(){return t.shared.visible},children:(i,l)=>{var p=B(),d=e.first_child(p);{var m=o=>{x(o,e.spread_props({get autoscroll(){return t.shared.autoscroll},get i18n(){return t.i18n}},()=>t.shared.loading_status))};e.if(d,o=>{t.shared.loading_status&&o(m)})}var n=e.sibling(d,2);k(n,{get label(){return e.get(a)},get open(){return t.props.open},onexpand:()=>{t.dispatch("expand"),t.dispatch("gradio_expand")},oncollapse:()=>t.dispatch("collapse"),children:(o,_)=>{y(o,{children:(v,q)=>{var f=e.comment(),h=e.first_child(f);e.slot(h,r,"default",{},null),e.append(v,f)},$$slots:{default:!0}})},$$slots:{default:!0}}),e.append(i,p)},$$slots:{default:!0}}),e.pop()}export{W as default};
