1import { i as if_block, s as slot, a as set_attribute, b as set_class, f as set_style, r as rest_props, g as spread_props } from './i18n-CGlVUOvE.js'; 2import { M as push, t as template_effect, a as append, O as pop, S as sibling, R as from_html, Q as child, Z as get, T as reset, a2 as user_derived } from './index-Bq2njFOY.js'; 3import { S as Static } from './index-1GCmrSlD.js'; 4import './StreamingBar.svelte_svelte_type_style_lang-DWGn5tT_.js'; 5import { G as Gradio } from './utils.svelte-Bi9ASwv9.js'; 6import './ScrollFade.svelte_svelte_type_style_lang-D0JPkGar.js'; 7import './snippet-BG7qkY_1.js'; 8import './MarkdownCode.svelte_svelte_type_style_lang-B29zDiob.js'; 9import './prism-python-NrKIQnfs.js'; 10import './Clear-C8Tfa7QP.js'; 11import './html-Bwif0JPw.js'; 12 13var root = from_html(`<div><!> <!></div>`); 14 15function Index($$anchor, $$props) { 16 push($$props, true); 17 18 // export let equal_height = true; 19 // export let elem_id: string; 20 // export let elem_classes: string[] = []; 21 // export let visible: boolean | "hidden" = true; 22 // export let variant: "default" | "panel" | "compact" = "default"; 23 // export let loading_status: LoadingStatus | undefined = undefined; 24 // export let gradio: Gradio | undefined = undefined; 25 // export let show_progress = false; 26 // export let height: number | string | undefined; 27 // export let min_height: number | string | undefined; 28 // export let max_height: number | string | undefined; 29 // export let scale: number | null = null; 30 const get_dimension = (dimension_value) => { 31 if (dimension_value === undefined) { 32 return undefined; 33 } 34 35 if (typeof dimension_value === "number") { 36 return dimension_value + "px"; 37 } else if (typeof dimension_value === "string") { 38 return dimension_value; 39 } 40 }; 41 42 let props = rest_props($$props, ['$$slots', '$$events', '$$legacy']); 43 let gradio = new Gradio(props); 44 var div = root(); 45 let classes; 46 let styles; 47 var node = child(div); 48 49 { 50 var consequent = ($$anchor) => { 51 { 52 let $0 = user_derived(() => gradio.shared.loading_status 53 ? gradio.shared.loading_status.status == "pending" ? "generating" : gradio.shared.loading_status.status 54 : null); 55 56 Static($$anchor, spread_props( 57 { 58 get autoscroll() { 59 return gradio.shared.autoscroll; 60 }, 61 62 get i18n() { 63 return gradio.i18n; 64 } 65 }, 66 () => gradio.shared.loading_status, 67 { 68 get status() { 69 return get($0); 70 } 71 } 72 )); 73 } 74 }; 75 76 if_block(node, ($$render) => { 77 if (gradio.shared.loading_status && gradio.shared.loading_status.show_progress && gradio) $$render(consequent); 78 }); 79 } 80 81 var node_1 = sibling(node, 2); 82 83 slot(node_1, $$props, 'default', {}, null); 84 reset(div); 85 86 template_effect( 87 ($0, $1) => { 88 set_attribute(div, 'id', gradio.shared.elem_id); 89 90 classes = set_class(div, 1, `row ${$0 ?? ''}`, 'svelte-7xavid', classes, { 91 compact: gradio.props.variant === "compact", 92 panel: gradio.props.variant === "panel", 93 'unequal-height': gradio.props.equal_height === false, 94 stretch: gradio.props.equal_height, 95 hide: !gradio.shared.visible, 96 'grow-children': gradio.shared.scale && gradio.shared.scale >= 1 97 }); 98 99 styles = set_style(div, '', styles, $1); 100 }, 101 [ 102 () => gradio.shared.elem_classes?.join(' '), 103 () => ({ 104 height: get_dimension(gradio.props.height), 105 'max-height': get_dimension(gradio.props.max_height), 106 'min-height': get_dimension(gradio.props.min_height), 107 'flex-grow': gradio.shared.scale 108 }) 109 ] 110 ); 111 112 append($$anchor, div); 113 pop(); 114} 115 116export { Index as default }; 117//# sourceMappingURL=Index-Cyy7LoUW.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.