1import { M as MarkdownCode } from './Example.svelte_svelte_type_style_lang-2a987044.js'; 2import './Index-4c82ea7b.js'; 3import './index-7f1ea29b.js'; 4import './svelte/svelte.js'; 5import './prism-python-b1f36560.js'; 6 7/* home/runner/work/gradio/gradio/js/markdown/Example.svelte generated by Svelte v4.2.2 */ 8const { 9 SvelteComponent, 10 attr, 11 create_component, 12 destroy_component, 13 detach, 14 element, 15 init, 16 insert, 17 mount_component, 18 safe_not_equal, 19 toggle_class, 20 transition_in, 21 transition_out 22} = window.__gradio__svelte__internal; 23function create_fragment(ctx) { 24 let div; 25 let markdowncode; 26 let current; 27 28 markdowncode = new MarkdownCode({ 29 props: { 30 message: /*value*/ ctx[0] ? /*value*/ ctx[0] : "", 31 latex_delimiters: /*latex_delimiters*/ ctx[5], 32 sanitize_html: /*sanitize_html*/ ctx[3], 33 line_breaks: /*line_breaks*/ ctx[4], 34 chatbot: false 35 } 36 }); 37 38 return { 39 c() { 40 div = element("div"); 41 create_component(markdowncode.$$.fragment); 42 attr(div, "class", "prose svelte-1ayixqk"); 43 toggle_class(div, "table", /*type*/ ctx[1] === "table"); 44 toggle_class(div, "gallery", /*type*/ ctx[1] === "gallery"); 45 toggle_class(div, "selected", /*selected*/ ctx[2]); 46 }, 47 m(target, anchor) { 48 insert(target, div, anchor); 49 mount_component(markdowncode, div, null); 50 current = true; 51 }, 52 p(ctx, [dirty]) { 53 const markdowncode_changes = {}; 54 if (dirty & /*value*/ 1) markdowncode_changes.message = /*value*/ ctx[0] ? /*value*/ ctx[0] : ""; 55 if (dirty & /*latex_delimiters*/ 32) markdowncode_changes.latex_delimiters = /*latex_delimiters*/ ctx[5]; 56 if (dirty & /*sanitize_html*/ 8) markdowncode_changes.sanitize_html = /*sanitize_html*/ ctx[3]; 57 if (dirty & /*line_breaks*/ 16) markdowncode_changes.line_breaks = /*line_breaks*/ ctx[4]; 58 markdowncode.$set(markdowncode_changes); 59 60 if (!current || dirty & /*type*/ 2) { 61 toggle_class(div, "table", /*type*/ ctx[1] === "table"); 62 } 63 64 if (!current || dirty & /*type*/ 2) { 65 toggle_class(div, "gallery", /*type*/ ctx[1] === "gallery"); 66 } 67 68 if (!current || dirty & /*selected*/ 4) { 69 toggle_class(div, "selected", /*selected*/ ctx[2]); 70 } 71 }, 72 i(local) { 73 if (current) return; 74 transition_in(markdowncode.$$.fragment, local); 75 current = true; 76 }, 77 o(local) { 78 transition_out(markdowncode.$$.fragment, local); 79 current = false; 80 }, 81 d(detaching) { 82 if (detaching) { 83 detach(div); 84 } 85 86 destroy_component(markdowncode); 87 } 88 }; 89} 90 91function instance($$self, $$props, $$invalidate) { 92 let { value } = $$props; 93 let { type } = $$props; 94 let { selected = false } = $$props; 95 let { sanitize_html } = $$props; 96 let { line_breaks } = $$props; 97 let { latex_delimiters } = $$props; 98 99 $$self.$$set = $$props => {
100 if ('value' in $$props) $$invalidate(0, value = $$props.value); 101 if ('type' in $$props) $$invalidate(1, type = $$props.type); 102 if ('selected' in $$props) $$invalidate(2, selected = $$props.selected); 103 if ('sanitize_html' in $$props) $$invalidate(3, sanitize_html = $$props.sanitize_html); 104 if ('line_breaks' in $$props) $$invalidate(4, line_breaks = $$props.line_breaks); 105 if ('latex_delimiters' in $$props) $$invalidate(5, latex_delimiters = $$props.latex_delimiters); 106 }; 107 108 return [value, type, selected, sanitize_html, line_breaks, latex_delimiters]; 109} 110 111class Example extends SvelteComponent { 112 constructor(options) { 113 super(); 114 115 init(this, options, instance, create_fragment, safe_not_equal, { 116 value: 0, 117 type: 1, 118 selected: 2, 119 sanitize_html: 3, 120 line_breaks: 4, 121 latex_delimiters: 5 122 }); 123 } 124} 125 126export { Example as default }; 127//# sourceMappingURL=Example-12cdceb2.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.