1import { g as spread_props, d as bind_this, r as rest_props, b as set_class } from './i18n-CMo5lpzy.js'; 2import { R as push, y as user_effect, M as tick, S as first_child, w as get, t as template_effect, a as append, X as sibling, V as child, a5 as user_derived, T as pop, u as state, x as set, W as from_html, Y as reset } from './index-BvBk1Iap.js'; 3import { G as Gradio, s as should_show_scroll_fade } from './utils.svelte-CYLB_jIA.js'; 4import { M as Markdown } from './Index.svelte_svelte_type_style_lang-BiKot9ba.js'; 5import { S as Static } from './index-Lz7fsHFt.js'; 6import './StreamingBar.svelte_svelte_type_style_lang-CdFIGsJa.js'; 7import { B as Block } from './Block-Bx3BikCN.js'; 8import './ScrollFade.svelte_svelte_type_style_lang-Xm-PLg9E.js'; 9import { S as ScrollFade } from './ScrollFade-BJkuhu7T.js'; 10export { default as BaseExample } from './Example-YwgBtWi1.js'; 11import './clone-DaB-S2nH.js'; 12import './actions-Cit_UA5S.js'; 13import './Check-BlnBgjLT.js'; 14import './Copy-DFFray7x.js'; 15import './IconButtonWrapper-Ba0GidgU.js'; 16import './snippet-Bl5YVoCg.js'; 17import './MarkdownCode-Cg7CjFvQ.js'; 18import './html-CdUEtR5E.js'; 19import './prism-python-CbXMXbdR.js'; 20import './index-C7e-J7CF.js'; 21import './Clear-Dgs5UhTO.js'; 22/* empty css */ 23 24var root_1 = from_html(`<!> <div><!></div> <!>`, 1); 25 26function Index($$anchor, $$props) { 27 push($$props, true); 28 29 let props = rest_props($$props, ['$$slots', '$$events', '$$legacy']); 30 const gradio = new Gradio(props); 31 let wrapper; 32 let show_fade = state(false); 33 34 function update_fade() { 35 if (!gradio.props.height) return; 36 37 set(show_fade, should_show_scroll_fade(wrapper?.closest(".block")), true); 38 } 39 40 user_effect(() => { 41 const container = wrapper?.closest(".block"); 42 43 if (!container || !gradio.props.height) return; 44 45 container.addEventListener("scroll", update_fade); 46 tick().then(update_fade); 47 48 return () => container.removeEventListener("scroll", update_fade); 49 }); 50 51 user_effect(() => { 52 if (gradio.props.value !== undefined) tick().then(update_fade); 53 }); 54 55 Block($$anchor, { 56 get visible() { 57 return gradio.shared.visible; 58 }, 59 60 get elem_id() { 61 return gradio.shared.elem_id; 62 }, 63 64 get elem_classes() { 65 return gradio.shared.elem_classes; 66 }, 67 68 get container() { 69 return gradio.shared.container; 70 }, 71 allow_overflow: true, 72 overflow_behavior: 'auto', 73 get height() { 74 return gradio.props.height; 75 }, 76 77 get min_height() { 78 return gradio.props.min_height; 79 }, 80 81 get max_height() { 82 return gradio.props.max_height; 83 }, 84 85 get rtl() { 86 return gradio.props.rtl; 87 }, 88 89 children: ($$anchor, $$slotProps) => { 90 var fragment_1 = root_1(); 91 var node = first_child(fragment_1); 92 93 Static(node, spread_props( 94 { 95 get autoscroll() { 96 return gradio.shared.autoscroll; 97 }, 98 99 get i18n() { 100 return gradio.i18n; 101 } 102 }, 103 () => gradio.shared.loading_status, 104 { 105 variant: 'center', 106 on_clear_status: () => gradio.dispatch("clear_status", gradio.shared.loading_status) 107 } 108 )); 109 110 var div = sibling(node, 2); 111 let classes; 112 var node_1 = child(div); 113 114 { 115 let $0 = user_derived(() => gradio.props.buttons?.includes("copy")); 116 117 Markdown(node_1, { 118 get value() { 119 return gradio.props.value; 120 }, 121 122 get elem_classes() { 123 return gradio.shared.elem_classes; 124 }, 125 126 get visible() { 127 return gradio.shared.visible; 128 }, 129 130 get rtl() { 131 return gradio.props.rtl; 132 }, 133 onchange: () => gradio.dispatch("change"), 134 oncopy: (e) => gradio.dispatch("copy", e.detail), 135 get latex_delimiters() { 136 return gradio.props.latex_delimiters; 137 }, 138 139 get sanitize_html() { 140 return gradio.props.sanitize_html; 141 }, 142 143 get line_breaks() { 144 return gradio.props.line_breaks; 145 }, 146 147 get header_links() { 148 return gradio.props.header_links; 149 }, 150 151 get show_copy_button() { 152 return get($0); 153 }, 154 155 get loading_status() { 156 return gradio.shared.loading_status; 157 }, 158 159 get theme_mode() { 160 return gradio.shared.theme_mode; 161 } 162 }); 163 } 164 165 reset(div); 166 bind_this(div, ($$value) => wrapper = $$value, () => wrapper); 167 168 var node_2 = sibling(div, 2); 169 170 ScrollFade(node_2, { 171 get visible() { 172 return get(show_fade); 173 } 174 }); 175 176 template_effect(() => classes = set_class(div, 1, 'svelte-16ln60g', null, classes, { 177 padding: gradio.props.padding, 178 pending: gradio.shared.loading_status?.status === "pending" && gradio.shared.loading_status?.show_progress !== "hidden" 179 })); 180 181 append($$anchor, fragment_1); 182 }, 183 $$slots: { default: true } 184 }); 185 186 pop(); 187} 188 189export { Markdown as BaseMarkdown, Index as default }; 190//# sourceMappingURL=Index-TKDXb_h_.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.