PageSourceSearch

https://swc2-target-speaker-extraction.hf.space/assets/Example-b79eee1b.js

js swc2-target-speaker-extraction.hf.space collected 2026-10-03 17:26:34 UTC 2,212 bytes, 98 lines download raw bytes

1const Example_svelte_svelte_type_style_lang = '';
2
3/* home/runner/work/gradio/gradio/js/radio/Example.svelte generated by Svelte v4.2.2 */
4const {
5	SvelteComponent,
6	append,
7	attr,
8	detach,
9	element,
10	init,
11	insert,
12	noop,
13	safe_not_equal,
14	set_data,
15	text,
16	toggle_class
17} = window.__gradio__svelte__internal;
18function create_fragment(ctx) {
19	let div;
20	let t;
21
22	return {
23		c() {
24			div = element("div");
25			t = text(/*name_string*/ ctx[2]);
26			attr(div, "class", "svelte-1ayixqk");
27			toggle_class(div, "table", /*type*/ ctx[0] === "table");
28			toggle_class(div, "gallery", /*type*/ ctx[0] === "gallery");
29			toggle_class(div, "selected", /*selected*/ ctx[1]);
30		},
31		m(target, anchor) {
32			insert(target, div, anchor);
33			append(div, t);
34		},
35		p(ctx, [dirty]) {
36			if (dirty & /*name_string*/ 4) set_data(t, /*name_string*/ ctx[2]);
37
38			if (dirty & /*type*/ 1) {
39				toggle_class(div, "table", /*type*/ ctx[0] === "table");
40			}
41
42			if (dirty & /*type*/ 1) {
43				toggle_class(div, "gallery", /*type*/ ctx[0] === "gallery");
44			}
45
46			if (dirty & /*selected*/ 2) {
47				toggle_class(div, "selected", /*selected*/ ctx[1]);
48			}
49		},
50		i: noop,
51		o: noop,
52		d(detaching) {
53			if (detaching) {
54				detach(div);
55			}
56		}
57	};
58}
59
60function instance($$self, $$props, $$invalidate) {
61	let { value } = $$props;
62	let { type } = $$props;
63	let { selected = false } = $$props;
64	let { choices } = $$props;
65	let name_string;
66
67	if (value === null) {
68		name_string = "";
69	} else {
70		let name = choices.find(pair => pair[1] === value);
71		name_string = name ? name[0] : "";
72	}
73
74	$$self.$$set = $$props => {
75		if ('value' in $$props) $$invalidate(3, value = $$props.value);
76		if ('type' in $$props) $$invalidate(0, type = $$props.type);
77		if ('selected' in $$props) $$invalidate(1, selected = $$props.selected);
78		if ('choices' in $$props) $$invalidate(4, choices = $$props.choices);
79	};
80
81	return [type, selected, name_string, value, choices];
82}
83
84class Example extends SvelteComponent {
85	constructor(options) {
86		super();
87
88		init(this, options, instance, create_fragment, safe_not_equal, {
89			value: 3,
90			type: 0,
91			selected: 1,
92			choices: 4
93		});
94	}
95}
96
97export { Example as default };
98//# sourceMappingURL=Example-b79eee1b.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.