1const Index_svelte_svelte_type_style_lang = ''; 2 3/* home/runner/work/gradio/gradio/js/column/Index.svelte generated by Svelte v4.2.2 */ 4const { 5 SvelteComponent, 6 attr, 7 create_slot, 8 detach, 9 element, 10 get_all_dirty_from_scope, 11 get_slot_changes, 12 init, 13 insert, 14 null_to_empty, 15 safe_not_equal, 16 set_style, 17 toggle_class, 18 transition_in, 19 transition_out, 20 update_slot_base 21} = window.__gradio__svelte__internal; 22function create_fragment(ctx) { 23 let div; 24 let div_class_value; 25 let style_min_width = `calc(min(${/*min_width*/ ctx[2]}px, 100%))`; 26 let current; 27 const default_slot_template = /*#slots*/ ctx[8].default; 28 const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[7], null); 29 30 return { 31 c() { 32 div = element("div"); 33 if (default_slot) default_slot.c(); 34 attr(div, "id", /*elem_id*/ ctx[3]); 35 attr(div, "class", div_class_value = "" + (null_to_empty(/*elem_classes*/ ctx[4].join(" ")) + " svelte-vt1mxs")); 36 toggle_class(div, "gap", /*gap*/ ctx[1]); 37 toggle_class(div, "compact", /*variant*/ ctx[6] === "compact"); 38 toggle_class(div, "panel", /*variant*/ ctx[6] === "panel"); 39 toggle_class(div, "hide", !/*visible*/ ctx[5]); 40 set_style(div, "flex-grow", /*scale*/ ctx[0]); 41 set_style(div, "min-width", style_min_width); 42 }, 43 m(target, anchor) { 44 insert(target, div, anchor); 45 46 if (default_slot) { 47 default_slot.m(div, null); 48 } 49 50 current = true; 51 }, 52 p(ctx, [dirty]) { 53 if (default_slot) { 54 if (default_slot.p && (!current || dirty & /*$$scope*/ 128)) { 55 update_slot_base( 56 default_slot, 57 default_slot_template, 58 ctx, 59 /*$$scope*/ ctx[7], 60 !current 61 ? get_all_dirty_from_scope(/*$$scope*/ ctx[7]) 62 : get_slot_changes(default_slot_template, /*$$scope*/ ctx[7], dirty, null), 63 null 64 ); 65 } 66 } 67 68 if (!current || dirty & /*elem_id*/ 8) { 69 attr(div, "id", /*elem_id*/ ctx[3]); 70 } 71 72 if (!current || dirty & /*elem_classes*/ 16 && div_class_value !== (div_class_value = "" + (null_to_empty(/*elem_classes*/ ctx[4].join(" ")) + " svelte-vt1mxs"))) { 73 attr(div, "class", div_class_value); 74 } 75 76 if (!current || dirty & /*elem_classes, gap*/ 18) { 77 toggle_class(div, "gap", /*gap*/ ctx[1]); 78 } 79 80 if (!current || dirty & /*elem_classes, variant*/ 80) { 81 toggle_class(div, "compact", /*variant*/ ctx[6] === "compact"); 82 } 83 84 if (!current || dirty & /*elem_classes, variant*/ 80) { 85 toggle_class(div, "panel", /*variant*/ ctx[6] === "panel"); 86 } 87 88 if (!current || dirty & /*elem_classes, visible*/ 48) { 89 toggle_class(div, "hide", !/*visible*/ ctx[5]); 90 } 91 92 if (dirty & /*scale*/ 1) { 93 set_style(div, "flex-grow", /*scale*/ ctx[0]); 94 } 95 96 if (dirty & /*min_width*/ 4 && style_min_width !== (style_min_width = `calc(min(${/*min_width*/ ctx[2]}px, 100%))`)) { 97 set_style(div, "min-width", style_min_width); 98 } 99 }, 100 i(local) { 101 if (current) return; 102 transition_in(default_slot, local); 103 current = true; 104 }, 105 o(local) { 106 transition_out(default_slot, local); 107 current = false; 108 }, 109 d(detaching) { 110 if (detaching) { 111 detach(div); 112 } 113 114 if (default_slot) default_slot.d(detaching); 115 } 116 }; 117} 118 119function instance($$self, $$props, $$invalidate) { 120 let { $$slots: slots = {}, $$scope } = $$props; 121 let { scale = null } = $$props; 122 let { gap = true } = $$props; 123 let { min_width = 0 } = $$props; 124 let { elem_id = "" } = $$props; 125 let { elem_classes = [] } = $$props; 126 let { visible = true } = $$props; 127 let { variant = "default" } = $$props; 128 129 $$self.$$set = $$props => {
130 if ('scale' in $$props) $$invalidate(0, scale = $$props.scale); 131 if ('gap' in $$props) $$invalidate(1, gap = $$props.gap); 132 if ('min_width' in $$props) $$invalidate(2, min_width = $$props.min_width); 133 if ('elem_id' in $$props) $$invalidate(3, elem_id = $$props.elem_id); 134 if ('elem_classes' in $$props) $$invalidate(4, elem_classes = $$props.elem_classes); 135 if ('visible' in $$props) $$invalidate(5, visible = $$props.visible); 136 if ('variant' in $$props) $$invalidate(6, variant = $$props.variant); 137 if ('$$scope' in $$props) $$invalidate(7, $$scope = $$props.$$scope); 138 }; 139 140 return [scale, gap, min_width, elem_id, elem_classes, visible, variant, $$scope, slots]; 141} 142 143class Index extends SvelteComponent { 144 constructor(options) { 145 super(); 146 147 init(this, options, instance, create_fragment, safe_not_equal, { 148 scale: 0, 149 gap: 1, 150 min_width: 2, 151 elem_id: 3, 152 elem_classes: 4, 153 visible: 5, 154 variant: 6 155 }); 156 } 157} 158 159export { Index as default }; 160//# sourceMappingURL=Index-24a33ce1.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.