PageSourceSearch

https://nota-ai-compressed-stable-diffusion.hf.space/assets/Blocks-d58f6fa6.js

js nota-ai-compressed-stable-diffusion.hf.space collected 2026-10-03 10:20:43 UTC 187,361 bytes, 6,671 lines download raw bytes

1import { _ as __vitePreload } from './index-6d9f7a14.js';
2import { b as is_function, w as writable, L as Loader, d as get_store_value, $ as $format, e as setupi18n } from './Index-34f70ab5.js';
3import { d as cubicOut, f as fade, B as Block, a as Button } from './Button-20c14f3f.js';
4
5/**
6 * The flip function calculates the start and end position of an element and animates between them, translating the x and y values.
7 * `flip` stands for [First, Last, Invert, Play](https://aerotwist.com/blog/flip-your-animations/).
8 *
9 * https://svelte.dev/docs/svelte-animate#flip
10 * @param {Element} node
11 * @param {{ from: DOMRect; to: DOMRect }} fromTo
12 * @param {import('./public.js').FlipParams} params
13 * @returns {import('./public.js').AnimationConfig}
14 */
15function flip(node, { from, to }, params = {}) {
16	const style = getComputedStyle(node);
17	const transform = style.transform === 'none' ? '' : style.transform;
18	const [ox, oy] = style.transformOrigin.split(' ').map(parseFloat);
19	const dx = from.left + (from.width * ox) / to.width - (to.left + ox);
20	const dy = from.top + (from.height * oy) / to.height - (to.top + oy);
21	const { delay = 0, duration = (d) => Math.sqrt(d) * 120, easing = cubicOut } = params;
22	return {
23		delay,
24		duration: is_function(duration) ? duration(Math.sqrt(dx * dx + dy * dy)) : duration,
25		easing,
26		css: (t, u) => {
27			const x = u * dx;
28			const y = u * dy;
29			const sx = t + (u * from.width) / to.width;
30			const sy = t + (u * from.height) / to.height;
31			return `transform: ${transform} translate(${x}px, ${y}px) scale(${sx}, ${sy});`;
32		}
33	};
34}
35
36/* home/runner/work/gradio/gradio/js/icons/src/Error.svelte generated by Svelte v4.2.2 */
37const {
38	SvelteComponent: SvelteComponent$g,
39	append: append$d,
40	attr: attr$d,
41	detach: detach$f,
42	init: init$g,
43	insert: insert$f,
44	noop: noop$8,
45	safe_not_equal: safe_not_equal$g,
46	svg_element: svg_element$3
47} = window.__gradio__svelte__internal;
48function create_fragment$g(ctx) {
49	let svg;
50	let path;
51
52	return {
53		c() {
54			svg = svg_element$3("svg");
55			path = svg_element$3("path");
56			attr$d(path, "stroke-linecap", "round");
57			attr$d(path, "stroke-linejoin", "round");
58			attr$d(path, "d", "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z");
59			attr$d(svg, "fill", "none");
60			attr$d(svg, "stroke", "currentColor");
61			attr$d(svg, "viewBox", "0 0 24 24");
62			attr$d(svg, "width", "100%");
63			attr$d(svg, "height", "100%");
64			attr$d(svg, "xmlns", "http://www.w3.org/2000/svg");
65			attr$d(svg, "aria-hidden", "true");
66			attr$d(svg, "stroke-width", "2");
67			attr$d(svg, "stroke-linecap", "round");
68			attr$d(svg, "stroke-linejoin", "round");
69		},
70		m(target, anchor) {
71			insert$f(target, svg, anchor);
72			append$d(svg, path);
73		},
74		p: noop$8,
75		i: noop$8,
76		o: noop$8,
77		d(detaching) {
78			if (detaching) {
79				detach$f(svg);
80			}
81		}
82	};
83}
84
85let Error$1 = class Error extends SvelteComponent$g {
86	constructor(options) {
87		super();
88		init$g(this, options, null, create_fragment$g, safe_not_equal$g, {});
89	}
90};
91
92/* home/runner/work/gradio/gradio/js/icons/src/Info.svelte generated by Svelte v4.2.2 */
93const {
94	SvelteComponent: SvelteComponent$f,
95	append: append$c,
96	attr: attr$c,
97	detach: detach$e,
98	init: init$f,
99	insert: insert$e,
100	noop: noop$7,
101	safe_not_equal: safe_not_equal$f,
102	svg_element: svg_element$2
103} = window.__gradio__svelte__internal;
104function create_fragment$f(ctx) {
105	let svg;
106	let path;
107
108	return {
109		c() {
110			svg = svg_element$2("svg");
111			path = svg_element$2("path");
112			attr$c(path, "stroke-linecap", "round");
113			attr$c(path, "stroke-linejoin", "round");
114			attr$c(path, "d", "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z");
115			attr$c(svg, "fill", "none");
116			attr$c(svg, "stroke", "currentColor");
117			attr$c(svg, "viewBox", "0 0 24 24");
118			attr$c(svg, "width", "100%");
119			attr$c(svg, "height", "100%");
120			attr$c(svg, "xmlns", "http://www.w3.org/2000/svg");
121			attr$c(svg, "aria-hidden", "true");
122			attr$c(svg, "stroke-width", "2");
123			attr$c(svg, "stroke-linecap", "round");
124			attr$c(svg, "stroke-linejoin", "round");
125		},
126		m(target, anchor) {
127			insert$e(target, svg, anchor);
128			append$c(svg, path);
129		},
130		p: noop$7,
131		i: noop$7,
132		o: noop$7,
133		d(detaching) {
134			if (detaching) {
135				detach$e(svg);
136			}
137		}
138	};
139}
140
141class Info extends SvelteComponent$f {
142	constructor(options) {
143		super();
144		init$f(this, options, null, create_fragment$f, safe_not_equal$f, {});
145	}
146}
147
148/* home/runner/work/gradio/gradio/js/icons/src/Warning.svelte generated by Svelte v4.2.2 */
149const {
150	SvelteComponent: SvelteComponent$e,
151	append: append$b,
152	attr: attr$b,
153	detach: detach$d,
154	init: init$e,
155	insert: insert$d,
156	noop: noop$6,
157	safe_not_equal: safe_not_equal$e,
158	svg_element: svg_element$1
159} = window.__gradio__svelte__internal;
160function create_fragment$e(ctx) {
161	let svg;
162	let path;
163
164	return {
165		c() {
166			svg = svg_element$1("svg");
167			path = svg_element$1("path");
168			attr$b(path, "stroke-linecap", "round");
169			attr$b(path, "stroke-linejoin", "round");
170			attr$b(path, "d", "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z");
171			attr$b(svg, "fill", "none");
172			attr$b(svg, "stroke", "currentColor");
173			attr$b(svg, "stroke-width", "2");
174			attr$b(svg, "viewBox", "0 0 24 24");
175			attr$b(svg, "width", "100%");
176			attr$b(svg, "height", "100%");
177			attr$b(svg, "xmlns", "http://www.w3.org/2000/svg");
178			attr$b(svg, "aria-hidden", "true");
179			attr$b(svg, "stroke-linecap", "round");
180			attr$b(svg, "stroke-linejoin", "round");
181		},
182		m(target, anchor) {
183			insert$d(target, svg, anchor);
184			append$b(svg, path);
185		},
186		p: noop$6,
187		i: noop$6,
188		o: noop$6,
189		d(detaching) {
190			if (detaching) {
191				detach$d(svg);
192			}
193		}
194	};
195}
196
197class Warning extends SvelteComponent$e {
198	constructor(options) {
199		super();
200		init$e(this, options, null, create_fragment$e, safe_not_equal$e, {});
201	}
202}
203
204/* home/runner/work/gradio/gradio/js/statustracker/static/ToastContent.svelte generated by Svelte v4.2.2 */
205const {
206	SvelteComponent: SvelteComponent$d,
207	add_render_callback,
208	append: append$a,
209	attr: attr$a,
210	bubble: bubble$3,
211	check_outros: check_outros$7,
212	create_component: create_component$b,
213	create_in_transition,
214	create_out_transition,
215	destroy_component: destroy_component$b,
216	detach: detach$c,
217	element: element$9,
218	group_outros: group_outros$7,
219	init: init$d,
220	insert: insert$c,
221	listen: listen$4,
222	mount_component: mount_component$b,
223	run_all,
224	safe_not_equal: safe_not_equal$d,
225	set_data: set_data$7,
226	space: space$8,
227	stop_propagation,
228	text: text$8,
229	transition_in: transition_in$b,
230	transition_out: transition_out$b
231} = window.__gradio__svelte__internal;const { createEventDispatcher: createEventDispatcher$5, onMount: onMount$3 } = window.__gradio__svelte__internal;
232function create_if_block_2$4(ctx) {
233	let error;
234	let current;
235	error = new Error$1({});
236
237	return {
238		c() {
239			create_component$b(error.$$.fragment);
240		},
241		m(target, anchor) {
242			mount_component$b(error, target, anchor);
243			current = true;
244		},
245		i(local) {
246			if (current) return;
247			transition_in$b(error.$$.fragment, local);
248			current = true;
249		},
250		o(local) {
251			transition_out$b(error.$$.fragment, local);
252			current = false;
253		},
254		d(detaching) {
255			destroy_component$b(error, detaching);
256		}
257	};
258}
259
260// (32:28) 
261function create_if_block_1$5(ctx) {
262	let info;
263	let current;
264	info = new Info({});
265
266	return {
267		c() {
268			create_component$b(info.$$.fragment);
269		},
270		m(target, anchor) {
271			mount_component$b(info, target, anchor);
272			current = true;
273		},
274		i(local) {
275			if (current) return;
276			transition_in$b(info.$$.fragment, local);
277			current = true;
278		},
279		o(local) {
280			transition_out$b(info.$$.fragment, local);
281			current = false;
282		},
283		d(detaching) {
284			destroy_component$b(info, detaching);
285		}
286	};
287}
288
289// (30:2) {#if type === "warning"}
290function create_if_block$8(ctx) {
291	let warning;
292	let current;
293	warning = new Warning({});
294
295	return {
296		c() {
297			create_component$b(warning.$$.fragment);
298		},
299		m(target, anchor) {
300			mount_component$b(warning, target, anchor);
301			current = true;
302		},
303		i(local) {
304			if (current) return;
305			transition_in$b(warning.$$.fragment, local);
306			current = true;
307		},
308		o(local) {
309			transition_out$b(warning.$$.fragment, local);
310			current = false;
311		},
312		d(detaching) {
313			destroy_component$b(warning, detaching);
314		}
315	};
316}
317
318function create_fragment$d(ctx) {
319	let div5;
320	let div0;
321	let current_block_type_index;
322	let if_block;
323	let div0_class_value;
324	let t0;
325	let div3;
326	let div1;
327	let t1;
328	let div1_class_value;
329	let t2;
330	let div2;
331	let t3;
332	let div2_class_value;
333	let div3_class_value;
334	let t4;
335	let button;
336	let span;
337	let button_class_value;
338	let t6;
339	let div4;
340	let div4_class_value;
341	let div5_class_value;
342	let div5_intro;
343	let div5_outro;
344	let current;
345	let mounted;
346	let dispose;
347	const if_block_creators = [create_if_block$8, create_if_block_1$5, create_if_block_2$4];
348	const if_blocks = [];
349
350	function select_block_type(ctx, dirty) {
351		if (/*type*/ ctx[1] === "warning") return 0;
352		if (/*type*/ ctx[1] === "info") return 1;
353		if (/*type*/ ctx[1] === "error") return 2;
354		return -1;
355	}
356
357	if (~(current_block_type_index = select_block_type(ctx))) {
358		if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
359	}
360
361	return {
362		c() {
363			div5 = element$9("div");
364			div0 = element$9("div");
365			if (if_block) if_block.c();
366			t0 = space$8();
367			div3 = element$9("div");
368			div1 = element$9("div");
369			t1 = text$8(/*type*/ ctx[1]);
370			t2 = space$8();
371			div2 = element$9("div");
372			t3 = text$8(/*message*/ ctx[0]);
373			t4 = space$8();
374			button = element$9("button");
375			span = element$9("span");
376			span.textContent = "×";
377			t6 = space$8();
378			div4 = element$9("div");
379			attr$a(div0, "class", div0_class_value = "toast-icon " + /*type*/ ctx[1] + " svelte-z3l7qj");
380			attr$a(div1, "class", div1_class_value = "toast-title " + /*type*/ ctx[1] + " svelte-z3l7qj");
381			attr$a(div2, "class", div2_class_value = "toast-text " + /*type*/ ctx[1] + " svelte-z3l7qj");
382			attr$a(div3, "class", div3_class_value = "toast-details " + /*type*/ ctx[1] + " svelte-z3l7qj");
383			attr$a(span, "aria-hidden", "true");
384			attr$a(button, "class", button_class_value = "toast-close " + /*type*/ ctx[1] + " svelte-z3l7qj");
385			attr$a(button, "type", "button");
386			attr$a(button, "aria-label", "Close");
387			attr$a(button, "data-testid", "toast-close");
388			attr$a(div4, "class", div4_class_value = "timer " + /*type*/ ctx[1] + " svelte-z3l7qj");
389			attr$a(div5, "class", div5_class_value = "toast-body " + /*type*/ ctx[1] + " svelte-z3l7qj");
390			attr$a(div5, "role", "alert");
391			attr$a(div5, "data-testid", "toast-body");
392		},
393		m(target, anchor) {
394			insert$c(target, div5, anchor);
395			append$a(div5, div0);
396
397			if (~current_block_type_index) {
398				if_blocks[current_block_type_index].m(div0, null);
399			}
400
401			append$a(div5, t0);
402			append$a(div5, div3);
403			append$a(div3, div1);
404			append$a(div1, t1);
405			append$a(div3, t2);
406			append$a(div3, div2);
407			append$a(div2, t3);
408			append$a(div5, t4);
409			append$a(div5, button);
410			append$a(button, span);
411			append$a(div5, t6);
412			append$a(div5, div4);
413			current = true;
414
415			if (!mounted) {
416				dispose = [
417					listen$4(button, "click", /*close_message*/ ctx[2]),
418					listen$4(div5, "click", stop_propagation(/*click_handler*/ ctx[4])),
419					listen$4(div5, "keydown", stop_propagation(/*keydown_handler*/ ctx[5]))
420				];
421
422				mounted = true;
423			}
424		},
425		p(ctx, [dirty]) {
426			let previous_block_index = current_block_type_index;
427			current_block_type_index = select_block_type(ctx);
428
429			if (current_block_type_index !== previous_block_index) {
430				if (if_block) {
431					group_outros$7();
432
433					transition_out$b(if_blocks[previous_block_index], 1, 1, () => {
434						if_blocks[previous_block_index] = null;
435					});
436
437					check_outros$7();
438				}
439
440				if (~current_block_type_index) {
441					if_block = if_blocks[current_block_type_index];
442
443					if (!if_block) {
444						if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
445						if_block.c();
446					}
447
448					transition_in$b(if_block, 1);
449					if_block.m(div0, null);
450				} else {
451					if_block = null;
452				}
453			}
454
455			if (!current || dirty & /*type*/ 2 && div0_class_value !== (div0_class_value = "toast-icon " + /*type*/ ctx[1] + " svelte-z3l7qj")) {
456				attr$a(div0, "class", div0_class_value);
457			}
458
459			if (!current || dirty & /*type*/ 2) set_data$7(t1, /*type*/ ctx[1]);
460
461			if (!current || dirty & /*type*/ 2 && div1_class_value !== (div1_class_value = "toast-title " + /*type*/ ctx[1] + " svelte-z3l7qj")) {
462				attr$a(div1, "class", div1_class_value);
463			}
464
465			if (!current || dirty & /*message*/ 1) set_data$7(t3, /*message*/ ctx[0]);
466
467			if (!current || dirty & /*type*/ 2 && div2_class_value !== (div2_class_value = "toast-text " + /*type*/ ctx[1] + " svelte-z3l7qj")) {
468				attr$a(div2, "class", div2_class_value);
469			}
470
471			if (!current || dirty & /*type*/ 2 && div3_class_value !== (div3_class_value = "toast-details " + /*type*/ ctx[1] + " svelte-z3l7qj")) {
472				attr$a(div3, "class", div3_class_value);
473			}
474
475			if (!current || dirty & /*type*/ 2 && button_class_value !== (button_class_value = "toast-close " + /*type*/ ctx[1] + " svelte-z3l7qj")) {
476				attr$a(button, "class", button_class_value);
477			}
478
479			if (!current || dirty & /*type*/ 2 && div4_class_value !== (div4_class_value = "timer " + /*type*/ ctx[1] + " svelte-z3l7qj")) {
480				attr$a(div4, "class", div4_class_value);
481			}
482
483			if (!current || dirty & /*type*/ 2 && div5_class_value !== (div5_class_value = "toast-body " + /*type*/ ctx[1] + " svelte-z3l7qj")) {
484				attr$a(div5, "class", div5_class_value);
485			}
486		},
487		i(local) {
488			if (current) return;
489			transition_in$b(if_block);
490
491			if (local) {
492				add_render_callback(() => {
493					if (!current) return;
494					if (div5_outro) div5_outro.end(1);
495					div5_intro = create_in_transition(div5, fade, { duration: 200, delay: 100 });
496					div5_intro.start();
497				});
498			}
499
500			current = true;
501		},
502		o(local) {
503			transition_out$b(if_block);
504			if (div5_intro) div5_intro.invalidate();
505
506			if (local) {
507				div5_outro = create_out_transition(div5, fade, { duration: 200 });
508			}
509
510			current = false;
511		},
512		d(detaching) {
513			if (detaching) {
514				detach$c(div5);
515			}
516
517			if (~current_block_type_index) {
518				if_blocks[current_block_type_index].d();
519			}
520
521			if (detaching && div5_outro) div5_outro.end();
522			mounted = false;
523			run_all(dispose);
524		}
525	};
526}
527
528function instance$c($$self, $$props, $$invalidate) {
529	let { message = "" } = $$props;
530	let { type } = $$props;
531	let { id } = $$props;
532	const dispatch = createEventDispatcher$5();
533
534	function close_message() {
535		dispatch("close", id);
536	}
537
538	onMount$3(() => {
539		setTimeout(
540			() => {
541				close_message();
542			},
543			10000
544		);
545	});
546
547	function click_handler(event) {
548		bubble$3.call(this, $$self, event);
549	}
550
551	function keydown_handler(event) {
552		bubble$3.call(this, $$self, event);
553	}
554
555	$$self.$$set = $$props => {
556		if ('message' in $$props) $$invalidate(0, message = $$props.message);
557		if ('type' in $$props) $$invalidate(1, type = $$props.type);
558		if ('id' in $$props) $$invalidate(3, id = $$props.id);
559	};
560
561	return [message, type, close_message, id, click_handler, keydown_handler];
562}
563
564class ToastContent extends SvelteComponent$d {
565	constructor(options) {
566		super();
567		init$d(this, options, instance$c, create_fragment$d, safe_not_equal$d, { message: 0, type: 1, id: 3 });
568	}
569}
570
571/* home/runner/work/gradio/gradio/js/statustracker/static/Toast.svelte generated by Svelte v4.2.2 */
572const {
573	SvelteComponent: SvelteComponent$c,
574	append: append$9,
575	attr: attr$9,
576	bubble: bubble$2,
577	check_outros: check_outros$6,
578	create_animation,
579	create_component: create_component$a,
580	destroy_component: destroy_component$a,
581	detach: detach$b,
582	element: element$8,
583	ensure_array_like: ensure_array_like$4,
584	fix_and_outro_and_destroy_block,
585	fix_position,
586	group_outros: group_outros$6,
587	init: init$c,
588	insert: insert$b,
589	mount_component: mount_component$a,
590	noop: noop$5,
591	safe_not_equal: safe_not_equal$c,
592	set_style: set_style$2,
593	space: space$7,
594	transition_in: transition_in$a,
595	transition_out: transition_out$a,
596	update_keyed_each: update_keyed_each$1
597} = window.__gradio__svelte__internal;
598function get_each_context$4(ctx, list, i) {
599	const child_ctx = ctx.slice();
600	child_ctx[2] = list[i].type;
601	child_ctx[3] = list[i].message;
602	child_ctx[4] = list[i].id;
603	return child_ctx;
604}
605
606// (15:1) {#each messages as { type, message, id }
607function create_each_block$4(key_1, ctx) {
608	let div;
609	let toastcontent;
610	let t;
611	let rect;
612	let stop_animation = noop$5;
613	let current;
614
615	toastcontent = new ToastContent({
616			props: {
617				type: /*type*/ ctx[2],
618				message: /*message*/ ctx[3],
619				id: /*id*/ ctx[4]
620			}
621		});
622
623	toastcontent.$on("close", /*close_handler*/ ctx[1]);
624
625	return {
626		key: key_1,
627		first: null,
628		c() {
629			div = element$8("div");
630			create_component$a(toastcontent.$$.fragment);
631			t = space$7();
632			set_style$2(div, "width", `100%`);
633			this.first = div;
634		},
635		m(target, anchor) {
636			insert$b(target, div, anchor);
637			mount_component$a(toastcontent, div, null);
638			append$9(div, t);
639			current = true;
640		},
641		p(new_ctx, dirty) {
642			ctx = new_ctx;
643			const toastcontent_changes = {};
644			if (dirty & /*messages*/ 1) toastcontent_changes.type = /*type*/ ctx[2];
645			if (dirty & /*messages*/ 1) toastcontent_changes.message = /*message*/ ctx[3];
646			if (dirty & /*messages*/ 1) toastcontent_changes.id = /*id*/ ctx[4];
647			toastcontent.$set(toastcontent_changes);
648		},
649		r() {
650			rect = div.getBoundingClientRect();
651		},
652		f() {
653			fix_position(div);
654			stop_animation();
655		},
656		a() {
657			stop_animation();
658			stop_animation = create_animation(div, rect, flip, { duration: 300 });
659		},
660		i(local) {
661			if (current) return;
662			transition_in$a(toastcontent.$$.fragment, local);
663			current = true;
664		},
665		o(local) {
666			transition_out$a(toastcontent.$$.fragment, local);
667			current = false;
668		},
669		d(detaching) {
670			if (detaching) {
671				detach$b(div);
672			}
673
674			destroy_component$a(toastcontent);
675		}
676	};
677}
678
679function create_fragment$c(ctx) {
680	let div;
681	let each_blocks = [];
682	let each_1_lookup = new Map();
683	let current;
684	let each_value = ensure_array_like$4(/*messages*/ ctx[0]);
685	const get_key = ctx => /*id*/ ctx[4];
686
687	for (let i = 0; i < each_value.length; i += 1) {
688		let child_ctx = get_each_context$4(ctx, each_value, i);
689		let key = get_key(child_ctx);
690		each_1_lookup.set(key, each_blocks[i] = create_each_block$4(key, child_ctx));
691	}
692
693	return {
694		c() {
695			div = element$8("div");
696
697			for (let i = 0; i < each_blocks.length; i += 1) {
698				each_blocks[i].c();
699			}
700
701			attr$9(div, "class", "toast-wrap svelte-pu0yf1");
702		},
703		m(target, anchor) {
704			insert$b(target, div, anchor);
705
706			for (let i = 0; i < each_blocks.length; i += 1) {
707				if (each_blocks[i]) {
708					each_blocks[i].m(div, null);
709				}
710			}
711
712			current = true;
713		},
714		p(ctx, [dirty]) {
715			if (dirty & /*messages*/ 1) {
716				each_value = ensure_array_like$4(/*messages*/ ctx[0]);
717				group_outros$6();
718				for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].r();
719				each_blocks = update_keyed_each$1(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, fix_and_outro_and_destroy_block, create_each_block$4, null, get_each_context$4);
720				for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].a();
721				check_outros$6();
722			}
723		},
724		i(local) {
725			if (current) return;
726
727			for (let i = 0; i < each_value.length; i += 1) {
728				transition_in$a(each_blocks[i]);
729			}
730
731			current = true;
732		},
733		o(local) {
734			for (let i = 0; i < each_blocks.length; i += 1) {
735				transition_out$a(each_blocks[i]);
736			}
737
738			current = false;
739		},
740		d(detaching) {
741			if (detaching) {
742				detach$b(div);
743			}
744
745			for (let i = 0; i < each_blocks.length; i += 1) {
746				each_blocks[i].d();
747			}
748		}
749	};
750}
751
752function scroll_to_top(_messages) {
753	if (_messages.length > 0) {
754		if ("parentIFrame" in window) {
755			window.parentIFrame?.scrollTo(0, 0);
756		}
757	}
758}
759
760function instance$b($$self, $$props, $$invalidate) {
761	let { messages = [] } = $$props;
762
763	function close_handler(event) {
764		bubble$2.call(this, $$self, event);
765	}
766
767	$$self.$$set = $$props => {
768		if ('messages' in $$props) $$invalidate(0, messages = $$props.messages);
769	};
770
771	$$self.$$.update = () => {
772		if ($$self.$$.dirty & /*messages*/ 1) {
773			scroll_to_top(messages);
774		}
775	};
776
777	return [messages, close_handler];
778}
779
780class Toast extends SvelteComponent$c {
781	constructor(options) {
782		super();
783		init$c(this, options, instance$b, create_fragment$c, safe_not_equal$c, { messages: 0 });
784	}
785}
786
787const component_map = {
788	"accordion": {
789			
790			component: () => __vitePreload(() => import('./Index-9dee8e23.js'),true?["./Index-9dee8e23.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./Index-24a33ce1.js","./Index-2abed479.css","./Index-a90cda25.css"]:void 0,import.meta.url)
791			},
792"annotatedimage": {
793			
794			component: () => __vitePreload(() => import('./Index-26dabf15.js'),true?["./Index-26dabf15.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./BlockLabel-01d2e4bc.js","./Empty-513247fb.js","./Image-6cbf81d1.js","./file-url-9a71ec36.js","./Index-1454732f.css"]:void 0,import.meta.url)
795			},
796"audio": {
797			example: () => __vitePreload(() => import('./Example-01f23d62.js'),true?["./Example-01f23d62.js","./Example-55d94c71.css"]:void 0,import.meta.url),
798
799			component: () => __vitePreload(() => import('./index-5812c883.js'),true?["./index-5812c883.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./utils-8f25e669.js","./BlockLabel-01d2e4bc.js","./IconButton-7a2ae610.js","./Empty-513247fb.js","./ShareButton-4c59f811.js","./Download-ea83bae3.js","./Trim-7bd312df.js","./Undo-6c110254.js","./file-url-9a71ec36.js","./DownloadLink-9c980133.js","./Upload-dd644e1d.js","./ModifyUpload-968871a9.css","./ModifyUpload-21a3ee9d.js","./Clear-9760deed.js","./SelectSource-dae165df.js","./Upload-c5c1b405.js","./UploadText-1c7f46b2.js","./Example-01f23d62.js","./Example-55d94c71.css","./index-ffdd75d0.css"]:void 0,import.meta.url)
800			},
801"box": {
802			
803			component: () => __vitePreload(() => import('./Index-3ad5261a.js'),true?["./Index-3ad5261a.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css"]:void 0,import.meta.url)
804			},
805"button": {
806			
807			component: () => __vitePreload(() => import('./Index-85891d30.js'),true?["./Index-85891d30.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css"]:void 0,import.meta.url)
808			},
809"chatbot": {
810			
811			component: () => __vitePreload(() => import('./Index-2387e9bf.js'),true?["./Index-2387e9bf.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./utils-8f25e669.js","./index-21d69e4c.js","./ShareButton-4c59f811.js","./IconButton-7a2ae610.js","./file-url-9a71ec36.js","./Image-81c44f01.js","./Video-227d44f6.js","./Video-540eb7aa.css","./Index.svelte_svelte_type_style_lang-900e0c31.js","./Example.
811svelte_svelte_type_style_lang-0e22497a.js","./Example-75e59303.css","./Index-11e1685d.css","./Check-f7edb5d9.js","./Copy-a69620a8.js","./BlockLabel-01d2e4bc.js","./Index-14756216.css"]:void 0,import.meta.url)
812			},
813"checkbox": {
814			example: () => __vitePreload(() => import('./Example-c3dd8bb4.js'),true?["./Example-c3dd8bb4.js","./Example-55d94c71.css"]:void 0,import.meta.url),
815
816			component: () => __vitePreload(() => import('./Index-82c3c18a.js'),true?["./Index-82c3c18a.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./Info-222aa883.js","./Index-6224b77c.css"]:void 0,import.meta.url)
817			},
818"checkboxgroup": {
819			example: () => __vitePreload(() => import('./Example-5a888e08.js'),true?["./Example-5a888e08.js","./Example-55d94c71.css"]:void 0,import.meta.url),
820
821			component: () => __vitePreload(() => import('./Index-3014bbad.js'),true?["./Index-3014bbad.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./BlockTitle-1fab1ef7.js","./Info-222aa883.js","./Index-5676d3d3.css"]:void 0,import.meta.url)
822			},
823"code": {
824			example: () => __vitePreload(() => import('./Example-ef3222e9.js'),true?["./Example-ef3222e9.js","./Example-c56e7331.css"]:void 0,import.meta.url),
825
826			component: () => __vitePreload(() => import('./Index-028351b6.js').then(n => n.F),true?["./Index-028351b6.js","./index-6d9f7a14.js","./index-ec560a49.css","./Button-20c14f3f.js","./Index-34f70ab5.js","./Index-2497c410.css","./Button-2a9911a9.css","./Check-f7edb5d9.js","./Copy-a69620a8.js","./Download-ea83bae3.js","./DownloadLink-9c980133.js","./file-url-9a71ec36.js","./BlockLabel-01d2e4bc.js","./Empty-513247fb.js","./Example-ef3222e9.js","./Example-c56e7331.css","./Index-9369397e.css"]:void 0,import.meta.url)
827			},
828"colorpicker": {
829			example: () => __vitePreload(() => import('./Example-510d9c7e.js'),true?["./Example-510d9c7e.js","./Example-5be72496.css"]:void 0,import.meta.url),
830
831			component: () => __vitePreload(() => import('./Index-48cf32f8.js'),true?["./Index-48cf32f8.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./BlockTitle-1fab1ef7.js","./Info-222aa883.js","./Example-510d9c7e.js","./Example-5be72496.css","./Index-497c6364.css"]:void 0,import.meta.url)
832			},
833"column": {
834			
835			component: () => __vitePreload(() => import('./Index-24a33ce1.js'),true?["./Index-24a33ce1.js","./Index-2abed479.css"]:void 0,import.meta.url)
836			},
837"dataframe": {
838			example: () => __vitePreload(() => import('./Example-7d6bb9b6.js'),true?["./Example-7d6bb9b6.js","./dsv-a37bb3db.js","./Example-aca1592e.css"]:void 0,import.meta.url),
839
840			component: () => __vitePreload(() => import('./Index-ed8ab45e.js'),true?["./Index-ed8ab45e.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./index-21d69e4c.js","./utils-8f25e669.js","./Upload-dd644e1d.js","./ModifyUpload-968871a9.css","./Index.svelte_svelte_type_style_lang-900e0c31.js","./Example.
840svelte_svelte_type_style_lang-0e22497a.js","./Example-75e59303.css","./Index-11e1685d.css","./dsv-a37bb3db.js","./Example-7d6bb9b6.js","./Example-aca1592e.css","./Index-2584e216.css"]:void 0,import.meta.url)
841			},
842"dataset": {
843			
844			component: () => __vitePreload(() => import('./Index-a63029f3.js'),true?["./Index-a63029f3.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./Index-52db28fc.css"]:void 0,import.meta.url)
845			},
846"dropdown": {
847			example: () => __vitePreload(() => import('./Example-7b848c75.js'),true?["./Example-7b848c75.js","./Example-55d94c71.css"]:void 0,import.meta.url),
848
849			component: () => __vitePreload(() => import('./Index-e1743282.js'),true?["./Index-e1743282.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-20c14f3f.js","./Button-2a9911a9.css","./BlockTitle-1fab1ef7.js","./Info-222aa883.js","./DropdownArrow-1cc8aef9.js","./Example-7b848c75.js","./Example-55d94c71.css","./Index-4cf39c3f.css"]:void 0,import.meta.url)
850			},
851"file": {
852			example: () => __vitePreload(() => import('./Example-d9b38e6f.js'),true?["./Example-d9b38e6f.js","./Example-4f56d95a.css"]:void 0,import.meta.url),
853
854			component: () => __vitePreload(() => import('./Index-fb866e12.js'),true?["./Index-fb866e12.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./BlockLabel-01d2e4bc.js","./Empty-513247fb.js","./File-e96cd7d6.js","./DownloadLink-9c980133.js","./file-url-9a71ec36.js","./Upload-dd644e1d.js","./ModifyUpload-968871a9.css","./ModifyUpload-21a3ee9d.js","./IconButton-7a2ae610.js","./Clear-9760deed.js","./Undo-6c110254.js","./UploadText-1c7f46b2.js","./Upload-c5c1b405.js","./Example-d9b38e6f.js","./Example-4f56d95a.css","./Index-e08bb775.css"]:void 0,import.meta.url)
855			},
856"fileexplorer": {
857			example: () => __vitePreload(() => import('./Example-3e057617.js'),true?["./Example-3e057617.js","./Example-7cc47009.css"]:void 0,import.meta.url),
858
859			component: () => __vitePreload(() => import('./Index-d662aacd.js'),true?["./Index-d662aacd.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./File-e96cd7d6.js","./Button-20c14f3f.js","./Button-2a9911a9.css","./BlockLabel-01d2e4bc.js","./index-f38d9616.js","./Empty-513247fb.js","./Index-e18b14d2.css"]:void 0,import.meta.url)
860			},
861"form": {
862			
863			component: () => __vitePreload(() => import('./Index-0d7ad3de.js'),true?["./Index-0d7ad3de.js","./Index-7ab72019.css"]:void 0,import.meta.url)
864			},
865"gallery": {
866			
867			component: () => __vitePreload(() => import('./Index-67764c82.js'),true?["./Index-67764c82.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./BlockLabel-01d2e4bc.js","./IconButton-7a2ae610.js","./Empty-513247fb.js","./ShareButton-4c59f811.js","./utils-8f25e669.js","./Download-ea83bae3.js","./Image-6cbf81d1.js","./ModifyUpload-21a3ee9d.js","./Clear-9760deed.js","./Undo-6c110254.js","./ModifyUpload-968871a9.css","./index-f38d9616.js","./Index-d81484b7.css"]:void 0,import.meta.url)
868			},
869"group": {
870			
871			component: () => __vitePreload(() => import('./Index-a3ffbeb0.js'),true?["./Index-a3ffbeb0.js","./Index-e45a2b11.css"]:void 0,import.meta.url)
872			},
873"highlightedtext": {
874			
875			component: () => __vitePreload(() => import('./Index-0d44a665.js'),true?["./Index-0d44a665.js","./color-40abab5c.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./BlockLabel-01d2e4bc.js","./Empty-513247fb.js","./Index-a4c50cbd.css"]:void 0,import.meta.url)
876			},
877"html": {
878			example: () => __vitePreload(() => import('./Example-39f519bd.js'),true?["./Example-39f519bd.js","./Example-eac655f5.css"]:void 0,import.meta.url),
879
880			component: () => __vitePreload(() => import('./Index-b75145a1.js'),true?["./Index-b75145a1.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-20c14f3f.js","./Button-2a9911a9.css","./Index-5538a1d8.css"]:void 0,import.meta.url)
881			},
882"image": {
883			example: () => __vitePreload(() => import('./Example-9525fda4.js'),true?["./Example-9525fda4.js","./Image-81c44f01.js","./file-url-9a71ec36.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Example-0ce19e52.css"]:void 0,import.meta.url),
884
885			component: () => __vitePreload(() => import('./Index-d234233b.js'),true?["./Index-d234233b.js","./ImageUploader-c0805dd2.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./utils-8f25e669.js","./BlockLabel-01d2e4bc.js","./IconButton-7a2ae610.js","./Empty-513247fb.js","./ShareButton-4c59f811.js","./Download-ea83bae3.js","./Image-6cbf81d1.js","./Image-81c44f01.js","./file-url-9a71ec36.js","./DownloadLink-9c980133.js","./SelectSource-dae165df.js","./Upload-c5c1b405.js","./DropdownArrow-1cc8aef9.js","./Upload-dd644e1d.js","./ModifyUpload-968871a9.css","./Clear-9760deed.js","./ImageUploader-29d3a2c4.css","./UploadText-1c7f46b2.js","./Example-9525fda4.js","./Example-0ce19e52.css"]:void 0,import.meta.url)
886			},
887"imageeditor": {
888			example: () => __vitePreload(() => import('./Example-e75f3ff9.js'),true?["./Example-e75f3ff9.js","./ImageUploader-c0805dd2.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./utils-8f25e669.js","./BlockLabel-01d2e4bc.js","./IconButton-7a2ae610.js","./Empty-513247fb.js","./ShareButton-4c59f811.js","./Download-ea83bae3.js","./Image-6cbf81d1.js","./Image-81c44f01.js","./file-url-9a71ec36.js","./DownloadLink-9c980133.js","./SelectSource-dae165df.js","./Upload-c5c1b405.js","./DropdownArrow-1cc8aef9.js","./Upload-dd644e1d.js","./ModifyUpload-968871a9.css","./Clear-9760deed.js","./ImageUploader-29d3a2c4.css","./Example-2b10ae8c.css","./Example-0ce19e52.css"]:void 0,import.meta.url),
889
890			component: () => __vitePreload(() => import('./Index-1a227b38.js'),true?["./Index-1a227b38.js","./ImageUploader-c0805dd2.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./utils-8f25e669.js","./BlockLabel-01d2e4bc.js","./IconButton-7a2ae610.js","./Empty-513247fb.js","./ShareButton-4c59f811.js","./Download-ea83bae3.js","./Image-6cbf81d1.js","./Image-81c44f01.js","./file-url-9a71ec36.js","./DownloadLink-9c980133.js","./SelectSource-dae165df.js","./Upload-c5c1b405.js","./DropdownArrow-1cc8aef9.js","./Upload-dd644e1d.js","./ModifyUpload-968871a9.css","./Clear-9760deed.js","./ImageUploader-29d3a2c4.css","./__vite-browser-external-cb19bde2.js","./Check-f7edb5d9.js","./Undo-6c110254.js","./Index-272d55a6.css","./Example-0ce19e52.css"]:void 0,import.meta.url)
891			},
892"json": {
893			
894			component: () => __vitePreload(() => import('./Index-07876fe1.js'),true?["./Index-07876fe1.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./Check-f7edb5d9.js","./Copy-a69620a8.js","./Empty-513247fb.js","./BlockLabel-01d2e4bc.js","./Index-8659c753.css"]:void 0,import.meta.url)
895			},
896"label": {
897			
898			component: () => __vitePreload(() => import('./Index-228cfff1.js'),true?["./Index-228cfff1.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-20c14f3f.js","./Button-2a9911a9.css","./BlockLabel-01d2e4bc.js","./Empty-513247fb.js","./Index-d2e7a806.css"]:void 0,import.meta.url)
899			},
900"markdown": {
901			example: () => __vitePreload(() => import('./Example-2a6a37e1.js'),true?["./Example-2a6a37e1.js","./Example.
901svelte_svelte_type_style_lang-0e22497a.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Example-75e59303.css"]:void 0,import.meta.url),
902
903			component: () => __vitePreload(() => import('./Index-41ba1f3c.js'),true?["./Index-41ba1f3c.js","./Index.svelte_svelte_type_style_lang-900e0c31.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./utils-8f25e669.js","./Example.svelte_svelte_type_style_lang-0e22497a.js","./Example-75e59303.css","./Index-11e1685d.css","./Example-2a6a37e1.js"]:void 0,import.meta.url)
904			},
905"model3d": {
906			example: () => __vitePreload(() => import('./Example-b5441cb7.js'),true?["./Example-b5441cb7.js","./Example-55d94c71.css"]:void 0,import.meta.url),
907
908			component: () => __vitePreload(() => import('./Index-f88218e4.js'),true?["./Index-f88218e4.js","./index-6d9f7a14.js","./index-ec560a49.css","./Button-20c14f3f.js","./Index-34f70ab5.js","./Index-2497c410.css","./Button-2a9911a9.css","./BlockLabel-01d2e4bc.js","./IconButton-7a2ae610.js","./Download-ea83bae3.js","./File-e96cd7d6.js","./Undo-6c110254.js","./Upload-dd644e1d.js","./ModifyUpload-968871a9.css","./ModifyUpload-21a3ee9d.js","./Clear-9760deed.js","./Empty-513247fb.js","./UploadText-1c7f46b2.js","./Upload-c5c1b405.js","./Example-b5441cb7.js","./Example-55d94c71.css","./Index-6795bfc7.css"]:void 0,import.meta.url)
909			},
910"number": {
911			example: () => __vitePreload(() => import('./Example-8d59e00b.js'),true?["./Example-8d59e00b.js","./Example-55d94c71.css"]:void 0,import.meta.url),
912
913			component: () => __vitePreload(() => import('./Index-43ad7d01.js'),true?["./Index-43ad7d01.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./BlockTitle-1fab1ef7.js","./Info-222aa883.js","./Index-8bd4bdf3.css"]:void 0,import.meta.url)
914			},
915"plot": {
916			
917			component: () => __vitePreload(() => import('./Index-ba736390.js'),true?["./Index-ba736390.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-20c14f3f.js","./Button-2a9911a9.css","./color-40abab5c.js","./dsv-a37bb3db.js","./Empty-513247fb.js","./BlockLabel-01d2e4bc.js","./Index-31740b2a.css"]:void 0,import.meta.url)
918			},
919"radio": {
920			example: () => __vitePreload(() => import('./Example-0b753ad4.js'),true?["./Example-0b753ad4.js","./Example-55d94c71.css"]:void 0,import.meta.url),
921
922			component: () => __vitePreload(() => import('./Index-c1d1359f.js'),true?["./Index-c1d1359f.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./BlockTitle-1fab1ef7.js","./Info-222aa883.js","./Example-0b753ad4.js","./Example-55d94c71.css","./Index-f43ff834.css"]:void 0,import.meta.url)
923			},
924"row": {
925			
926			component: () => __vitePreload(() => import('./Index-7cbc3ec9.js'),true?["./Index-7cbc3ec9.js","./Index-815f98ca.css"]:void 0,import.meta.url)
927			},
928"slider": {
929			example: () => __vitePreload(() => import('./Example-94402048.js'),true?["./Example-94402048.js","./Example-55d94c71.css"]:void 0,import.meta.url),
930
931			component: () => __vitePreload(() => import('./Index-552eafe4.js'),true?["./Index-552eafe4.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./BlockTitle-1fab1ef7.js","./Info-222aa883.js","./Index-61d7d897.css"]:void 0,import.meta.url)
932			},
933"state": {
934			
935			component: () => __vitePreload(() => import('./Index-b2efa79d.js'),true?[]:void 0,import.meta.url)
936			},
937"statustracker": {
938			
939			component: () => __vitePreload(() => import('./index-b0f03989.js'),true?["./index-b0f03989.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-20c14f3f.js","./Button-2a9911a9.css"]:void 0,import.meta.url)
940			},
941"tabitem": {
942			
943			component: () => __vitePreload(() => import('./Index-5a4403bf.js'),true?["./Index-5a4403bf.js","./Tabs-c0309885.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Tabs-fd1bbe79.css","./Index-24a33ce1.js","./Index-2abed479.css","./Index-f5395e19.css"]:void 0,import.meta.url)
944			},
945"tabs": {
946			
947			component: () => __vitePreload(() => import('./Index-e7ad7d23.js'),true?["./Index-e7ad7d23.js","./Tabs-c0309885.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Tabs-fd1bbe79.css"]:void 0,import.meta.url)
948			},
949"textbox": {
950			example: () => __vitePreload(() =>
950 import('./Example-abcadb77.js'),true?["./Example-abcadb77.js","./Example-e8628e88.css"]:void 0,import.meta.url),
951
952			component: () => __vitePreload(() => import('./Index-790ba8d1.js'),true?["./Index-790ba8d1.js","./Textbox-1c255c5f.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./BlockTitle-1fab1ef7.js","./Info-222aa883.js","./Check-f7edb5d9.js","./Copy-a69620a8.js","./Textbox-4c6022f4.css","./Example-abcadb77.js","./Example-e8628e88.css"]:void 0,import.meta.url)
953			},
954"uploadbutton": {
955			
956			component: () => __vitePreload(() => import('./Index-1358ea4a.js'),true?["./Index-1358ea4a.js","./Button-20c14f3f.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Button-2a9911a9.css","./Index-dc08ef34.css"]:void 0,import.meta.url)
957			},
958"video": {
959			example: () => __vitePreload(() => import('./Example-4295692b.js'),true?["./Example-4295692b.js","./Video-227d44f6.js","./file-url-9a71ec36.js","./Index-34f70ab5.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-2497c410.css","./Video-540eb7aa.css","./Example-3390cfd5.css"]:void 0,import.meta.url),
960
961			component: () => __vitePreload(() => import('./index-d0b4b2ba.js'),true?["./index-d0b4b2ba.js","./Upload-dd644e1d.js","./index-6d9f7a14.js","./index-ec560a49.css","./Index-34f70ab5.js","./Index-2497c410.css","./ModifyUpload-968871a9.css","./ModifyUpload-21a3ee9d.js","./Button-20c14f3f.js","./Button-2a9911a9.css","./IconButton-7a2ae610.js","./Clear-9760deed.js","./Undo-6c110254.js","./BlockLabel-01d2e4bc.js","./SelectSource-dae165df.js","./Upload-c5c1b405.js","./ImageUploader-c0805dd2.js","./utils-8f25e669.js","./Empty-513247fb.js","./ShareButton-4c59f811.js","./Download-ea83bae3.js","./Image-6cbf81d1.js","./Image-81c44f01.js","./file-url-9a71ec36.js","./DownloadLink-9c980133.js","./DropdownArrow-1cc8aef9.js","./ImageUploader-29d3a2c4.css","./Video-227d44f6.js","./Video-540eb7aa.css","./Trim-7bd312df.js","./Example-4295692b.js","./Example-3390cfd5.css","./UploadText-1c7f46b2.js","./index-bea7352a.css","./Example-0ce19e52.css"]:void 0,import.meta.url)
962			},
963
964};
965
966
967// @ts-nocheck
968
969async function load_component({ api_url, name, id, variant }) {
970	const comps = window.__GRADIO__CC__;
971
972	const _component_map = {
973		// eslint-disable-next-line no-undef
974		...component_map,
975		...(!comps ? {} : comps)
976	};
977
978	try {
979		const c = await (
980			_component_map?.[id]?.[variant] || // for dev mode custom components
981			_component_map?.[name]?.[variant]
982		)();
983		return {
984			name,
985			component: c
986		};
987	} catch (e) {
988		console.error(e);
989		try {
990			await load_css(`${api_url}/custom_component/${id}/${variant}/style.css`);
991			const c = await __vitePreload(() => import(
992				/* @vite-ignore */ `${api_url}/custom_component/${id}/${variant}/index.js`
993			),true?[]:void 0,import.meta.url);
994			return {
995				name,
996				component: c
997			};
998		} catch (e) {
999			if (variant === "example") {
1000				return {
1001					name,
1002					component: await __vitePreload(() => import('./Example-b742dabd.js'),true?["./Example-b742dabd.js","./Example-55d94c71.css"]:void 0,import.meta.url)
1003				};
1004			}
1005			console.error(`failed to load: ${name}`);
1006			console.error(e);
1007			throw e;
1008		}
1009	}
1010}
1011
1012function load_css(url) {
1013	return new Promise((resolve, reject) => {
1014		const link = document.createElement("link");
1015		link.rel = "stylesheet";
1016		link.href = url;
1017		document.head.appendChild(link);
1018		link.onload = () => resolve();
1019		link.onerror = () => reject();
1020	});
1021}
1022
1023function create_loading_status_store() {
1024  const store = writable({});
1025  const fn_inputs = [];
1026  const fn_outputs = [];
1027  const pending_outputs = /* @__PURE__ */ new Map();
1028  const pending_inputs = /* @__PURE__ */ new Map();
1029  const inputs_to_update = /* @__PURE__ */ new Map();
1030  const fn_status = [];
1031  function update({
1032    fn_index,
1033    status,
1034    queue = true,
1035    size,
1036    position = null,
1037    eta = null,
1038    message = null,
1039    progress
1040  }) {
1041    const outputs = fn_outputs[fn_index];
1042    const inputs = fn_inputs[fn_index];
1043    const last_status = fn_status[fn_index];
1044    const outputs_to_update = outputs.map((id) => {
1045      let new_status;
1046      const pending_count = pending_outputs.get(id) || 0;
1047      if (last_status === "pending" && status !== "pending") {
1048        let new_count = pending_count - 1;
1049        pending_outputs.set(id, new_count < 0 ? 0 : new_count);
1050        new_status = new_count > 0 ? "pending" : status;
1051      } else if (last_status === "pending" && status === "pending") {
1052        new_status = "pending";
1053      } else if (last_status !== "pending" && status === "pending") {
1054        new_status = "pending";
1055        pending_outputs.set(id, pending_count + 1);
1056      } else {
1057        new_status = status;
1058      }
1059      return {
1060        id,
1061        queue_position: position,
1062        queue_size: size,
1063        eta,
1064        status: new_status,
1065        message,
1066        progress
1067      };
1068    });
1069    inputs.forEach((id) => {
1070      const pending_count = pending_inputs.get(id) || 0;
1071      if (last_status === "pending" && status !== "pending") {
1072        let new_count = pending_count - 1;
1073        pending_inputs.set(id, new_count < 0 ? 0 : new_count);
1074        inputs_to_update.set(id, status);
1075      } else if (last_status !== "pending" && status === "pending") {
1076        pending_inputs.set(id, pending_count + 1);
1077        inputs_to_update.set(id, status);
1078      } else {
1079        inputs_to_update.delete(id);
1080      }
1081    });
1082    store.update((outputs2) => {
1083      outputs_to_update.forEach(
1084        ({
1085          id,
1086          queue_position,
1087          queue_size,
1088          eta: eta2,
1089          status: status2,
1090          message: message2,
1091          progress: progress2
1092        }) => {
1093          outputs2[id] = {
1094            queue,
1095            queue_size,
1096            queue_position,
1097            eta: eta2,
1098            message: message2,
1099            progress: progress2,
1100            status: status2,
1101            fn_index
1102          };
1103        }
1104      );
1105      return outputs2;
1106    });
1107    fn_status[fn_index] = status;
1108  }
1109  function register(index, inputs, outputs) {
1110    fn_inputs[index] = inputs;
1111    fn_outputs[index] = outputs;
1112  }
1113  return {
1114    update,
1115    register,
1116    subscribe: store.subscribe,
1117    get_status_for_fn(i) {
1118      return fn_status[i];
1119    },
1120    get_inputs_to_update() {
1121      return inputs_to_update;
1122    }
1123  };
1124}
1125
1126/* src/api_docs/img/clear.svelte generated by Svelte v4.2.2 */
1127const {
1128	SvelteComponent: SvelteComponent$b,
1129	append: append$8,
1130	attr: attr$8,
1131	detach: detach$a,
1132	init: init$b,
1133	insert: insert$a,
1134	noop: noop$4,
1135	safe_not_equal: safe_not_equal$b,
1136	set_style: set_style$1,
1137	svg_element
1138} = window.__gradio__svelte__internal;
1139function create_fragment$b(ctx) {
1140	let svg;
1141	let g;
1142	let path0;
1143	let path1;
1144
1145	return {
1146		c() {
1147			svg = svg_element("svg");
1148			g = svg_element("g");
1149			path0 = svg_element("path");
1150			path1 = svg_element("path");
1151			attr$8(path0, "d", "M3.789,0.09C3.903,-0.024 4.088,-0.024 4.202,0.09L4.817,0.705C4.931,0.819 4.931,1.004 4.817,1.118L1.118,4.817C1.004,4.931 0.819,4.931 0.705,4.817L0.09,4.202C-0.024,4.088 -0.024,3.903 0.09,3.789L3.789,0.09Z");
1152			attr$8(path1, "d", "M4.825,3.797C4.934,3.907 4.934,4.084 4.825,4.193L4.193,4.825C4.084,4.934 3.907,4.934 3.797,4.825L0.082,1.11C-0.027,1.001 -0.027,0.823 0.082,0.714L0.714,0.082C0.823,-0.027 1.001,-0.027 1.11,0.082L4.825,3.797Z");
1153			attr$8(svg, "width", "100%");
1154			attr$8(svg, "height", "100%");
1155			attr$8(svg, "viewBox", "0 0 5 5");
1156			attr$8(svg, "version", "1.1");
1157			attr$8(svg, "xmlns", "http://www.w3.org/2000/svg");
1158			attr$8(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink");
1159			attr$8(svg, "xml:space", "preserve");
1160			set_style$1(svg, "fill", "currentColor");
1161			set_style$1(svg, "fill-rule", "evenodd");
1162			set_style$1(svg, "clip-rule", "evenodd");
1163			set_style$1(svg, "stroke-linejoin", "round");
1164			set_style$1(svg, "stroke-miterlimit", "2");
1165		},
1166		m(target, anchor) {
1167			insert$a(target, svg, anchor);
1168			append$8(svg, g);
1169			append$8(g, path0);
1170			append$8(g, path1);
1171		},
1172		p: noop$4,
1173		i: noop$4,
1174		o: noop$4,
1175		d(detaching) {
1176			if (detaching) {
1177				detach$a(svg);
1178			}
1179		}
1180	};
1181}
1182
1183class Clear extends SvelteComponent$b {
1184	constructor(options) {
1185		super();
1186		init$b(this, options, null, create_fragment$b, safe_not_equal$b, {});
1187	}
1188}
1189
1190const NoApi_svelte_svelte_type_style_lang = '';
1191
1192/* src/api_docs/NoApi.svelte generated by Svelte v4.2.2 */
1193const {
1194	SvelteComponent: SvelteComponent$a,
1195	append: append$7,
1196	attr: attr$7,
1197	create_component: create_component$9,
1198	destroy_component: destroy_component$9,
1199	detach: detach$9,
1200	element: element$7,
1201	init: init$a,
1202	insert: insert$9,
1203	listen: listen$3,
1204	mount_component: mount_component$9,
1205	safe_not_equal: safe_not_equal$a,
1206	set_data: set_data$6,
1207	space: space$6,
1208	text: text$7,
1209	transition_in: transition_in$9,
1210	transition_out: transition_out$9
1211} = window.__gradio__svelte__internal;
1212const { createEventDispatcher: createEventDispatcher$4 } = window.__gradio__svelte__internal;
1213function create_fragment$a(ctx) {
1214	let div;
1215	let h1;
1216	let t1;
1217	let p0;
1218	let t2;
1219	let code0;
1220	let t3;
1221	let t4;
1222	let p1;
1223	let t15;
1224	let button;
1225	let clear;
1226	let current;
1227	let mounted;
1228	let dispose;
1229	clear = new Clear({});
1230
1231	return {
1232		c() {
1233			div = element$7("div");
1234			h1 = element$7("h1");
1235			h1.textContent = "API Docs";
1236			t1 = space$6();
1237			p0 = element$7("p");
1238			t2 = text$7("No API Routes found for\n\t\t");
1239			code0 = element$7("code");
1240			t3 = text$7(/*root*/ ctx[0]);
1241			t4 = space$6();
1242			p1 = element$7("p");
1243
1244			p1.innerHTML = `To expose an API endpoint of your app in this page, set the <code>api_name</code>
1245		parameter of the event listener.
1246		<br/>
1247		For more information, visit the
1248		<a href="https://gradio.app/sharing_your_app/#api-page" target="_blank">API Page guide</a>
1249		. To hide the API documentation button and this page, set
1250		<code>show_api=False</code>
1251		in the
1252		<code>Blocks.launch()</code>
1253		method.`;
1254
1255			t15 = space$6();
1256			button = element$7("button");
1257			create_component$9(clear.$$.fragment);
1258			attr$7(code0, "class", "svelte-e1ha0f");
1259			attr$7(p0, "class", "attention svelte-e1ha0f");
1260			attr$7(div, "class", "wrap prose svelte-e1ha0f");
1261			attr$7(button, "class", "svelte-e1ha0f");
1262		},
1263		m(target, anchor) {
1264			insert$9(target, div, anchor);
1265			append$7(div, h1);
1266			append$7(div, t1);
1267			append$7(div, p0);
1268			append$7(p0, t2);
1269			append$7(p0, code0);
1270			append$7(code0, t3);
1271			append$7(div, t4);
1272			append$7(div, p1);
1273			insert$9(target, t15, anchor);
1274			insert$9(target, button, anchor);
1275			mount_component$9(clear, button, null);
1276			current = true;
1277
1278			if (!mounted) {
1279				dispose = listen$3(button, "click", /*click_handler*/ ctx[2]);
1280				mounted = true;
1281			}
1282		},
1283		p(ctx, [dirty]) {
1284			if (!current || dirty & /*root*/ 1) set_data$6(t3, /*root*/ ctx[0]);
1285		},
1286		i(local) {
1287			if (current) return;
1288			transition_in$9(clear.$$.fragment, local);
1289			current = true;
1290		},
1291		o(local) {
1292			transition_out$9(clear.$$.fragment, local);
1293			current = false;
1294		},
1295		d(detaching) {
1296			if (detaching) {
1297				detach$9(div);
1298				detach$9(t15);
1299				detach$9(button);
1300			}
1301
1302			destroy_component$9(clear);
1303			mounted = false;
1304			dispose();
1305		}
1306	};
1307}
1308
1309function instance$a($$self, $$props, $$invalidate) {
1310	const dispatch = createEventDispatcher$4();
1311	let { root } = $$props;
1312	const click_handler = () => dispatch("close");
1313
1314	$$self.$$set = $$props => {
1315		if ('root' in $$props) $$invalidate(0, root = $$props.root);
1316	};
1317
1318	return [root, dispatch, click_handler];
1319}
1320
1321class NoApi extends SvelteComponent$a {
1322	constructor(options) {
1323		super();
1324		init$a(this, options, instance$a, create_fragment$a, safe_not_equal$a, { root: 0 });
1325	}
1326}
1327
1328function represent_value(value, type, lang = null) {
1329  if (type === void 0) {
1330    return lang === "py" ? "None" : null;
1331  }
1332  if (type === "string" || type === "str" || type == "filepath") {
1333    return lang === null ? value : '"' + value + '"';
1334  } else if (type === "number") {
1335    return lang === null ? parseFloat(value) : value;
1336  } else if (type === "boolean" || type == "bool") {
1337    if (lang === "py") {
1338      value = String(value);
1339      return value === "true" ? "True" : "False";
1340    } else if (lang === "js") {
1341      return value;
1342    }
1343    return value === "true";
1344  } else if (type === "List[str]") {
1345    value = JSON.stringify(value);
1346    return value;
1347  } else if (type.startsWith("Literal['")) {
1348    return '"' + value + '"';
1349  }
1350  if (lang === null) {
1351    return value === "" ? null : JSON.parse(value);
1352  } else if (typeof value === "string") {
1353    if (value === "") {
1354      return lang === "py" ? "None" : "null";
1355    }
1356    return value;
1357  }
1358  return JSON.stringify(value);
1359}
1360
1361const api_logo = ""+new URL('api-logo-5346f193.svg', import.meta.url).href+"";
1362
1363const ApiBanner_svelte_svelte_type_style_lang = '';
1364
1365/* src/api_docs/ApiBanner.svelte generated by Svelte v4.2.2 */
1366const {
1367	SvelteComponent: SvelteComponent$9,
1368	append: append$6,
1369	attr: attr$6,
1370	create_component: create_component$8,
1371	destroy_component: destroy_component$8,
1372	detach: detach$8,
1373	element: element$6,
1374	init: init$9,
1375	insert: insert$8,
1376	listen: listen$2,
1377	mount_component: mount_component$8,
1378	safe_not_equal: safe_not_equal$9,
1379	set_data: set_data$5,
1380	space: space$5,
1381	src_url_equal: src_url_equal$2,
1382	text: text$6,
1383	transition_in: transition_in$8,
1384	transition_out: transition_out$8
1385} = window.__gradio__svelte__internal;
1386const { createEventDispatcher: createEventDispatcher$3 } = window.__gradio__svelte__internal;
1387function create_if_block$7(ctx) {
1388	let t;
1389
1390	return {
1391		c() {
1392			t = text$6("s");
1393		},
1394		m(target, anchor) {
1395			insert$8(target, t, anchor);
1396		},
1397		d(detaching) {
1398			if (detaching) {
1399				detach$8(t);
1400			}
1401		}
1402	};
1403}
1404
1405function create_fragment$9(ctx) {
1406	let h2;
1407	let img;
1408	let img_src_value;
1409	let t0;
1410	let div1;
1411	let t1;
1412	let div0;
1413	let t2;
1414	let t3;
1415	let span1;
1416	let span0;
1417	let t4;
1418	let t5;
1419	let t6;
1420	let button;
1421	let clear;
1422	let current;
1423	let mounted;
1424	let dispose;
1425	let if_block = /*api_count*/ ctx[1] > 1 && create_if_block$7();
1426	clear = new Clear({});
1427
1428	return {
1429		c() {
1430			h2 = element$6("h2");
1431			img = element$6("img");
1432			t0 = space$5();
1433			div1 = element$6("div");
1434			t1 = text$6("API documentation\n\t\t");
1435			div0 = element$6("div");
1436			t2 = text$6(/*root*/ ctx[0]);
1437			t3 = space$5();
1438			span1 = element$6("span");
1439			span0 = element$6("span");
1440			t4 = text$6(/*api_count*/ ctx[1]);
1441			t5 = text$6(" API endpoint");
1442			if (if_block) if_block.c();
1443			t6 = space$5();
1444			button = element$6("button");
1445			create_component$8(clear.$$.fragment);
1446			if (!src_url_equal$2(img.src, img_src_value = api_logo)) attr$6(img, "src", img_src_value);
1447			attr$6(img, "alt", "");
1448			attr$6(img, "class", "svelte-3n2nxs");
1449			attr$6(div0, "class", "url svelte-3n2nxs");
1450			attr$6(span0, "class", "url svelte-3n2nxs");
1451			attr$6(span1, "class", "counts svelte-3n2nxs");
1452			attr$6(h2, "class", "svelte-3n2nxs");
1453			attr$6(button, "class", "svelte-3n2nxs");
1454		},
1455		m(target, anchor) {
1456			insert$8(target, h2, anchor);
1457			append$6(h2, img);
1458			append$6(h2, t0);
1459			append$6(h2, div1);
1460			append$6(div1, t1);
1461			append$6(div1, div0);
1462			append$6(div0, t2);
1463			append$6(h2, t3);
1464			append$6(h2, span1);
1465			append$6(span1, span0);
1466			append$6(span0, t4);
1467			append$6(span1, t5);
1468			if (if_block) if_block.m(span1, null);
1469			insert$8(target, t6, anchor);
1470			insert$8(target, button, anchor);
1471			mount_component$8(clear, button, null);
1472			current = true;
1473
1474			if (!mounted) {
1475				dispose = listen$2(button, "click", /*click_handler*/ ctx[3]);
1476				mounted = true;
1477			}
1478		},
1479		p(ctx, [dirty]) {
1480			if (!current || dirty & /*root*/ 1) set_data$5(t2, /*root*/ ctx[0]);
1481			if (!current || dirty & /*api_count*/ 2) set_data$5(t4, /*api_count*/ ctx[1]);
1482
1483			if (/*api_count*/ ctx[1] > 1) {
1484				if (if_block) ; else {
1485					if_block = create_if_block$7();
1486					if_block.c();
1487					if_block.m(span1, null);
1488				}
1489			} else if (if_block) {
1490				if_block.d(1);
1491				if_block = null;
1492			}
1493		},
1494		i(local) {
1495			if (current) return;
1496			transition_in$8(clear.$$.fragment, local);
1497			current = true;
1498		},
1499		o(local) {
1500			transition_out$8(clear.$$.fragment, local);
1501			current = false;
1502		},
1503		d(detaching) {
1504			if (detaching) {
1505				detach$8(h2);
1506				detach$8(t6);
1507				detach$8(button);
1508			}
1509
1510			if (if_block) if_block.d();
1511			destroy_component$8(clear);
1512			mounted = false;
1513			dispose();
1514		}
1515	};
1516}
1517
1518function instance$9($$self, $$props, $$invalidate) {
1519	let { root } = $$props;
1520	let { api_count } = $$props;
1521	const dispatch = createEventDispatcher$3();
1522	const click_handler = () => dispatch("close");
1523
1524	$$self.$$set = $$props => {
1525		if ('root' in $$props) $$invalidate(0, root = $$props.root);
1526		if ('api_count' in $$props) $$invalidate(1, api_count = $$props.api_count);
1527	};
1528
1529	return [root, api_count, dispatch, click_handler];
1530}
1531
1532class ApiBanner extends SvelteComponent$9 {
1533	constructor(options) {
1534		super();
1535		init$9(this, options, instance$9, create_fragment$9, safe_not_equal$9, { root: 0, api_count: 1 });
1536	}
1537}
1538
1539const ResponseObject_svelte_svelte_type_style_lang = '';
1540
1541/* src/api_docs/ResponseObject.svelte generated by Svelte v4.2.2 */
1542const {
1543	SvelteComponent: SvelteComponent$8,
1544	append: append$5,
1545	attr: attr$5,
1546	check_outros: check_outros$5,
1547	create_component: create_component$7,
1548	destroy_component: destroy_component$7,
1549	destroy_each: destroy_each$2,
1550	detach: detach$7,
1551	element: element$5,
1552	empty: empty$5,
1553	ensure_array_like: ensure_array_like$3,
1554	group_outros: group_outros$5,
1555	init: init$8,
1556	insert: insert$7,
1557	mount_component: mount_component$7,
1558	safe_not_equal: safe_not_equal$8,
1559	set_data: set_data$4,
1560	space: space$4,
1561	text: text$5,
1562	toggle_class,
1563	transition_in: transition_in$7,
1564	transition_out: transition_out$7
1565} = window.__gradio__svelte__internal;
1566function get_each_context$3(ctx, list, i) {
1567	const child_ctx = ctx.slice();
1568	child_ctx[4] = list[i].label;
1569	child_ctx[5] = list[i].type;
1570	child_ctx[6] = list[i].python_type;
1571	child_ctx[7] = list[i].component;
1572	child_ctx[8] = list[i].serializer;
1573	child_ctx[10] = i;
1574	return child_ctx;
1575}
1576
1577// (18:3) {#if endpoint_returns.length > 1}
1578function create_if_block_6$2(ctx) {
1579	let t;
1580
1581	return {
1582		c() {
1583			t = text$5("(");
1584		},
1585		m(target, anchor) {
1586			insert$7(target, t, anchor);
1587		},
1588		d(detaching) {
1589			if (detaching) {
1590				detach$7(t);
1591			}
1592		}
1593	};
1594}
1595
1596// (23:132) {:else}
1597function create_else_block$3(ctx) {
1598	let t_value = /*js_returns*/ ctx[2][/*i*/ ctx[10]].type + "";
1599	let t;
1600	let if_block_anchor;
1601	let if_block = /*js_returns*/ ctx[2][/*i*/ ctx[10]].description && create_if_block_5$2(ctx);
1602
1603	return {
1604		c() {
1605			t = text$5(t_value);
1606			if (if_block) if_block.c();
1607			if_block_anchor = empty$5();
1608		},
1609		m(target, anchor) {
1610			insert$7(target, t, anchor);
1611			if (if_block) if_block.m(target, anchor);
1612			insert$7(target, if_block_anchor, anchor);
1613		},
1614		p(ctx, dirty) {
1615			if (dirty & /*js_returns*/ 4 && t_value !== (t_value = /*js_returns*/ ctx[2][/*i*/ ctx[10]].type + "")) set_data$4(t, t_value);
1616
1617			if (/*js_returns*/ ctx[2][/*i*/ ctx[10]].description) {
1618				if (if_block) {
1619					if_block.p(ctx, dirty);
1620				} else {
1621					if_block = create_if_block_5$2(ctx);
1622					if_block.c();
1623					if_block.m(if_block_anchor.parentNode, if_block_anchor);
1624				}
1625			} else if (if_block) {
1626				if_block.d(1);
1627				if_block = null;
1628			}
1629		},
1630		d(detaching) {
1631			if (detaching) {
1632				detach$7(t);
1633				detach$7(if_block_anchor);
1634			}
1635
1636			if (if_block) if_block.d(detaching);
1637		}
1638	};
1639}
1640
1641// (23:11) {#if current_language === "python"}
1642function create_if_block_3$3(ctx) {
1643	let t_value = /*python_type*/ ctx[6].type + "";
1644	let t;
1645	let if_block_anchor;
1646	let if_block = /*python_type*/ ctx[6]?.description && create_if_block_4$2(ctx);
1647
1648	return {
1649		c() {
1650			t = text$5(t_value);
1651			if (if_block) if_block.c();
1652			if_block_anchor = empty$5();
1653		},
1654		m(target, anchor) {
1655			insert$7(target, t, anchor);
1656			if (if_block) if_block.m(target, anchor);
1657			insert$7(target, if_block_anchor, anchor);
1658		},
1659		p(ctx, dirty) {
1660			if (dirty & /*endpoint_returns*/ 2 && t_value !== (t_value = /*python_type*/ ctx[6].type + "")) set_data$4(t, t_value);
1661
1662			if (/*python_type*/ ctx[6]?.description) {
1663				if (if_block) {
1664					if_block.p(ctx, dirty);
1665				} else {
1666					if_block = create_if_block_4$2(ctx);
1667					if_block.c();
1668					if_block.m(if_block_anchor.parentNode, if_block_anchor);
1669				}
1670			} else if (if_block) {
1671				if_block.d(1);
1672				if_block = null;
1673			}
1674		},
1675		d(detaching) {
1676			if (detaching) {
1677				detach$7(t);
1678				detach$7(if_block_anchor);
1679			}
1680
1681			if (if_block) if_block.d(detaching);
1682		}
1683	};
1684}
1685
1686// (25:14) {#if js_returns[i].description}
1687function create_if_block_5$2(ctx) {
1688	let t0;
1689	let t1_value = /*js_returns*/ ctx[2][/*i*/ ctx[10]].description + "";
1690	let t1;
1691	let t2;
1692
1693	return {
1694		c() {
1695			t0 = text$5(" (");
1696			t1 = text$5(t1_value);
1697			t2 = text$5(")");
1698		},
1699		m(target, anchor) {
1700			insert$7(target, t0, anchor);
1701			insert$7(target, t1, anchor);
1702			insert$7(target, t2, anchor);
1703		},
1704		p(ctx, dirty) {
1705			if (dirty & /*js_returns*/ 4 && t1_value !== (t1_value = /*js_returns*/ ctx[2][/*i*/ ctx[10]].description + "")) set_data$4(t1, t1_value);
1706		},
1707		d(detaching) {
1708			if (detaching) {
1709				detach$7(t0);
1710				detach$7(t1);
1711				detach$7(t2);
1712			}
1713		}
1714	};
1715}
1716
1717// (23:64) {#if python_type?.description}
1718function create_if_block_4$2(ctx) {
1719	let t0;
1720	let t1_value = /*python_type*/ ctx[6].description + "";
1721	let t1;
1722	let t2;
1723
1724	return {
1725		c() {
1726			t0 = text$5(" (");
1727			t1 = text$5(t1_value);
1728			t2 = text$5(")");
1729		},
1730		m(target, anchor) {
1731			insert$7(target, t0, anchor);
1732			insert$7(target, t1, anchor);
1733			insert$7(target, t2, anchor);
1734		},
1735		p(ctx, dirty) {
1736			if (dirty & /*endpoint_returns*/ 2 && t1_value !== (t1_value = /*python_type*/ ctx[6].description + "")) set_data$4(t1, t1_value);
1737		},
1738		d(detaching) {
1739			if (detaching) {
1740				detach$7(t0);
1741				detach$7(t1);
1742				detach$7(t2);
1743			}
1744		}
1745	};
1746}
1747
1748// (32:6) {#if endpoint_returns.length > 1}
1749function create_if_block_2$3(ctx) {
1750	let t;
1751
1752	return {
1753		c() {
1754			t = text$5(",");
1755		},
1756		m(target, anchor) {
1757			insert$7(target, t, anchor);
1758		},
1759		d(detaching) {
1760			if (detaching) {
1761				detach$7(t);
1762			}
1763		}
1764	};
1765}
1766
1767// (19:3) {#each endpoint_returns as { label, type, python_type, component, serializer }
1768function create_each_block$3(ctx) {
1769	let div;
1770	let span;
1771	let t0;
1772	let t1;
1773	let t2_value = /*label*/ ctx[4] + "";
1774	let t2;
1775	let t3;
1776	let t4_value = /*component*/ ctx[7] + "";
1777	let t4;
1778	let t5;
1779
1780	function select_block_type(ctx, dirty) {
1781		if (/*current_language*/ ctx[3] === "python") return create_if_block_3$3;
1782		return create_else_block$3;
1783	}
1784
1785	let current_block_type = select_block_type(ctx);
1786	let if_block0 = current_block_type(ctx);
1787	let if_block1 = /*endpoint_returns*/ ctx[1].length > 1 && create_if_block_2$3();
1788
1789	return {
1790		c() {
1791			div = element$5("div");
1792			span = element$5("span");
1793			t0 = text$5("# ");
1794			if_block0.c();
1795			t1 = text$5("\n\t\t\t\t\t\trepresenting output in '");
1796			t2 = text$5(t2_value);
1797			t3 = text$5("' ");
1798			t4 = text$5(t4_value);
1799			t5 = text$5("\n\t\t\t\t\t\tcomponent");
1800			if (if_block1) if_block1.c();
1801			attr$5(span, "class", "desc svelte-1c7hj3i");
1802			attr$5(div, "class", "svelte-1c7hj3i");
1803			toggle_class(div, "second-level", /*endpoint_returns*/ ctx[1].length > 1);
1804		},
1805		m(target, anchor) {
1806			insert$7(target, div, anchor);
1807			append$5(div, span);
1808			append$5(span, t0);
1809			if_block0.m(span, null);
1810			append$5(span, t1);
1811			append$5(span, t2);
1812			append$5(span, t3);
1813			append$5(span, t4);
1814			append$5(span, t5);
1815			if (if_block1) if_block1.m(div, null);
1816		},
1817		p(ctx, dirty) {
1818			if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block0) {
1819				if_block0.p(ctx, dirty);
1820			} else {
1821				if_block0.d(1);
1822				if_block0 = current_block_type(ctx);
1823
1824				if (if_block0) {
1825					if_block0.c();
1826					if_block0.m(span, t1);
1827				}
1828			}
1829
1830			if (dirty & /*endpoint_returns*/ 2 && t2_value !== (t2_value = /*label*/ ctx[4] + "")) set_data$4(t2, t2_value);
1831			if (dirty & /*endpoint_returns*/ 2 && t4_value !== (t4_value = /*component*/ ctx[7] + "")) set_data$4(t4, t4_value);
1832
1833			if (/*endpoint_returns*/ ctx[1].length > 1) {
1834				if (if_block1) ; else {
1835					if_block1 = create_if_block_2$3();
1836					if_block1.c();
1837					if_block1.m(div, null);
1838				}
1839			} else if (if_block1) {
1840				if_block1.d(1);
1841				if_block1 = null;
1842			}
1843
1844			if (dirty & /*endpoint_returns*/ 2) {
1845				toggle_class(div, "second-level", /*endpoint_returns*/ ctx[1].length > 1);
1846			}
1847		},
1848		d(detaching) {
1849			if (detaching) {
1850				detach$7(div);
1851			}
1852
1853			if_block0.d();
1854			if (if_block1) if_block1.d();
1855		}
1856	};
1857}
1858
1859// (35:3) {#if endpoint_returns.length > 1}
1860function create_if_block_1$4(ctx) {
1861	let t;
1862
1863	return {
1864		c() {
1865			t = text$5(")");
1866		},
1867		m(target, anchor) {
1868			insert$7(target, t, anchor);
1869		},
1870		d(detaching) {
1871			if (detaching) {
1872				detach$7(t);
1873			}
1874		}
1875	};
1876}
1877
1878// (37:2) {#if is_running}
1879function create_if_block$6(ctx) {
1880	let div;
1881	let loader;
1882	let current;
1883	loader = new Loader({ props: { margin: false } });
1884
1885	return {
1886		c() {
1887			div = element$5("div");
1888			create_component$7(loader.$$.fragment);
1889			attr$5(div, "class", "load-wrap svelte-1c7hj3i");
1890		},
1891		m(target, anchor) {
1892			insert$7(target, div, anchor);
1893			mount_component$7(loader, div, null);
1894			current = true;
1895		},
1896		i(local) {
1897			if (current) return;
1898			transition_in$7(loader.$$.fragment, local);
1899			current = true;
1900		},
1901		o(local) {
1902			transition_out$7(loader.$$.fragment, local);
1903			current = false;
1904		},
1905		d(detaching) {
1906			if (detaching) {
1907				detach$7(div);
1908			}
1909
1910			destroy_component$7(loader);
1911		}
1912	};
1913}
1914
1915// (15:0) <Block>
1916function create_default_slot$4(ctx) {
1917	let div1;
1918	let div0;
1919	let t0;
1920	let t1;
1921	let t2;
1922	let current;
1923	let if_block0 = /*endpoint_returns*/ ctx[1].length > 1 && create_if_block_6$2();
1924	let each_value = ensure_array_like$3(/*endpoint_returns*/ ctx[1]);
1925	let each_blocks = [];
1926
1927	for (let i = 0; i < each_value.length; i += 1) {
1928		each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i));
1929	}
1930
1931	let if_block1 = /*endpoint_returns*/ ctx[1].length > 1 && create_if_block_1$4();
1932	let if_block2 = /*is_running*/ ctx[0] && create_if_block$6();
1933
1934	return {
1935		c() {
1936			div1 = element$5("div");
1937			div0 = element$5("div");
1938			if (if_block0) if_block0.c();
1939			t0 = space$4();
1940
1941			for (let i = 0; i < each_blocks.length; i += 1) {
1942				each_blocks[i].c();
1943			}
1944
1945			t1 = space$4();
1946			if (if_block1) if_block1.c();
1947			t2 = space$4();
1948			if (if_block2) if_block2.c();
1949			attr$5(div0, "class", "svelte-1c7hj3i");
1950			toggle_class(div0, "hide", /*is_running*/ ctx[0]);
1951			attr$5(div1, "class", "response-wrap svelte-1c7hj3i");
1952		},
1953		m(target, anchor) {
1954			insert$7(target, div1, anchor);
1955			append$5(div1, div0);
1956			if (if_block0) if_block0.m(div0, null);
1957			append$5(div0, t0);
1958
1959			for (let i = 0; i < each_blocks.length; i += 1) {
1960				if (each_blocks[i]) {
1961					each_blocks[i].m(div0, null);
1962				}
1963			}
1964
1965			append$5(div0, t1);
1966			if (if_block1) if_block1.m(div0, null);
1967			append$5(div1, t2);
1968			if (if_block2) if_block2.m(div1, null);
1969			current = true;
1970		},
1971		p(ctx, dirty) {
1972			if (/*endpoint_returns*/ ctx[1].length > 1) {
1973				if (if_block0) ; else {
1974					if_block0 = create_if_block_6$2();
1975					if_block0.c();
1976					if_block0.m(div0, t0);
1977				}
1978			} else if (if_block0) {
1979				if_block0.d(1);
1980				if_block0 = null;
1981			}
1982
1983			if (dirty & /*endpoint_returns, current_language, js_returns*/ 14) {
1984				each_value = ensure_array_like$3(/*endpoint_returns*/ ctx[1]);
1985				let i;
1986
1987				for (i = 0; i < each_value.length; i += 1) {
1988					const child_ctx = get_each_context$3(ctx, each_value, i);
1989
1990					if (each_blocks[i]) {
1991						each_blocks[i].p(child_ctx, dirty);
1992					} else {
1993						each_blocks[i] = create_each_block$3(child_ctx);
1994						each_blocks[i].c();
1995						each_blocks[i].m(div0, t1);
1996					}
1997				}
1998
1999				for (; i < each_blocks.length; i += 1) {
2000					each_blocks[i].d(1);
2001				}
2002
2003				each_blocks.length = each_value.length;
2004			}
2005
2006			if (/*endpoint_returns*/ ctx[1].length > 1) {
2007				if (if_block1) ; else {
2008					if_block1 = create_if_block_1$4();
2009					if_block1.c();
2010					if_block1.m(div0, null);
2011				}
2012			} else if (if_block1) {
2013				if_block1.d(1);
2014				if_block1 = null;
2015			}
2016
2017			if (!current || dirty & /*is_running*/ 1) {
2018				toggle_class(div0, "hide", /*is_running*/ ctx[0]);
2019			}
2020
2021			if (/*is_running*/ ctx[0]) {
2022				if (if_block2) {
2023					if (dirty & /*is_running*/ 1) {
2024						transition_in$7(if_block2, 1);
2025					}
2026				} else {
2027					if_block2 = create_if_block$6();
2028					if_block2.c();
2029					transition_in$7(if_block2, 1);
2030					if_block2.m(div1, null);
2031				}
2032			} else if (if_block2) {
2033				group_outros$5();
2034
2035				transition_out$7(if_block2, 1, 1, () => {
2036					if_block2 = null;
2037				});
2038
2039				check_outros$5();
2040			}
2041		},
2042		i(local) {
2043			if (current) return;
2044			transition_in$7(if_block2);
2045			current = true;
2046		},
2047		o(local) {
2048			transition_out$7(if_block2);
2049			current = false;
2050		},
2051		d(detaching) {
2052			if (detaching) {
2053				detach$7(div1);
2054			}
2055
2056			if (if_block0) if_block0.d();
2057			destroy_each$2(each_blocks, detaching);
2058			if (if_block1) if_block1.d();
2059			if (if_block2) if_block2.d();
2060		}
2061	};
2062}
2063
2064function create_fragment$8(ctx) {
2065	let h4;
2066	let t1;
2067	let block;
2068	let current;
2069
2070	block = new Block({
2071			props: {
2072				$$slots: { default: [create_default_slot$4] },
2073				$$scope: { ctx }
2074			}
2075		});
2076
2077	return {
2078		c() {
2079			h4 = element$5("h4");
2080
2081			h4.innerHTML = `<div class="toggle-icon svelte-1c7hj3i"><div class="toggle-dot svelte-1c7hj3i"></div></div>
2082	Return Type(s)`;
2083
2084			t1 = space$4();
2085			create_component$7(block.$$.fragment);
2086			attr$5(h4, "class", "svelte-1c7hj3i");
2087		},
2088		m(target, anchor) {
2089			insert$7(target, h4, anchor);
2090			insert$7(target, t1, anchor);
2091			mount_component$7(block, target, anchor);
2092			current = true;
2093		},
2094		p(ctx, [dirty]) {
2095			const block_changes = {};
2096
2097			if (dirty & /*$$scope, is_running, endpoint_returns, current_language, js_returns*/ 2063) {
2098				block_changes.$$scope = { dirty, ctx };
2099			}
2100
2101			block.$set(block_changes);
2102		},
2103		i(local) {
2104			if (current) return;
2105			transition_in$7(block.$$.fragment, local);
2106			current = true;
2107		},
2108		o(local) {
2109			transition_out$7(block.$$.fragment, local);
2110			current = false;
2111		},
2112		d(detaching) {
2113			if (detaching) {
2114				detach$7(h4);
2115				detach$7(t1);
2116			}
2117
2118			destroy_component$7(block, detaching);
2119		}
2120	};
2121}
2122
2123function instance$8($$self, $$props, $$invalidate) {
2124	let { is_running } = $$props;
2125	let { endpoint_returns } = $$props;
2126	let { js_returns } = $$props;
2127	let { current_language } = $$props;
2128
2129	$$self.$$set = $$props => {
2130		if ('is_running' in $$props) $$invalidate(0, is_running = $$props.is_running);
2131		if ('endpoint_returns' in $$props) $$invalidate(1, endpoint_returns = $$props.endpoint_returns);
2132		if ('js_returns' in $$props) $$invalidate(2, js_returns = $$props.js_returns);
2133		if ('current_language' in $$props) $$invalidate(3, current_language = $$props.current_language);
2134	};
2135
2136	return [is_running, endpoint_returns, js_returns, current_language];
2137}
2138
2139class ResponseObject extends SvelteComponent$8 {
2140	constructor(options) {
2141		super();
2142
2143		init$8(this, options, instance$8, create_fragment$8, safe_not_equal$8, {
2144			is_running: 0,
2145			endpoint_returns: 1,
2146			js_returns: 2,
2147			current_language: 3
2148		});
2149	}
2150}
2151
2152/* src/api_docs/CopyButton.svelte generated by Svelte v4.2.2 */
2153const {
2154	SvelteComponent: SvelteComponent$7,
2155	create_component: create_component$6,
2156	destroy_component: destroy_component$6,
2157	detach: detach$6,
2158	init: init$7,
2159	insert: insert$6,
2160	mount_component: mount_component$6,
2161	safe_not_equal: safe_not_equal$7,
2162	set_data: set_data$3,
2163	text: text$4,
2164	transition_in: transition_in$6,
2165	transition_out: transition_out$6
2166} = window.__gradio__svelte__internal;
2167function create_default_slot$3(ctx) {
2168	let t;
2169
2170	return {
2171		c() {
2172			t = text$4(/*copy_text*/ ctx[0]);
2173		},
2174		m(target, anchor) {
2175			insert$6(target, t, anchor);
2176		},
2177		p(ctx, dirty) {
2178			if (dirty & /*copy_text*/ 1) set_data$3(t, /*copy_text*/ ctx[0]);
2179		},
2180		d(detaching) {
2181			if (detaching) {
2182				detach$6(t);
2183			}
2184		}
2185	};
2186}
2187
2188function create_fragment$7(ctx) {
2189	let basebutton;
2190	let current;
2191
2192	basebutton = new Button({
2193			props: {
2194				size: "sm",
2195				$$slots: { default: [create_default_slot$3] },
2196				$$scope: { ctx }
2197			}
2198		});
2199
2200	basebutton.$on("click", /*copy*/ ctx[1]);
2201
2202	return {
2203		c() {
2204			create_component$6(basebutton.$$.fragment);
2205		},
2206		m(target, anchor) {
2207			mount_component$6(basebutton, target, anchor);
2208			current = true;
2209		},
2210		p(ctx, [dirty]) {
2211			const basebutton_changes = {};
2212
2213			if (dirty & /*$$scope, copy_text*/ 9) {
2214				basebutton_changes.$$scope = { dirty, ctx };
2215			}
2216
2217			basebutton.$set(basebutton_changes);
2218		},
2219		i(local) {
2220			if (current) return;
2221			transition_in$6(basebutton.$$.fragment, local);
2222			current = true;
2223		},
2224		o(local) {
2225			transition_out$6(basebutton.$$.fragment, local);
2226			current = false;
2227		},
2228		d(detaching) {
2229			destroy_component$6(basebutton, detaching);
2230		}
2231	};
2232}
2233
2234function instance$7($$self, $$props, $$invalidate) {
2235	let { code } = $$props;
2236	let copy_text = "copy";
2237
2238	function copy() {
2239		navigator.clipboard.writeText(code);
2240		$$invalidate(0, copy_text = "copied!");
2241
2242		setTimeout(
2243			() => {
2244				$$invalidate(0, copy_text = "copy");
2245			},
2246			1500
2247		);
2248	}
2249
2250	$$self.$$set = $$props => {
2251		if ('code' in $$props) $$invalidate(2, code = $$props.code);
2252	};
2253
2254	return [copy_text, copy, code];
2255}
2256
2257class CopyButton extends SvelteComponent$7 {
2258	constructor(options) {
2259		super();
2260		init$7(this, options, instance$7, create_fragment$7, safe_not_equal$7, { code: 2 });
2261	}
2262}
2263
2264const InstallSnippet_svelte_svelte_type_style_lang = '';
2265
2266/* src/api_docs/InstallSnippet.svelte generated by Svelte v4.2.2 */
2267const {
2268	SvelteComponent: SvelteComponent$6,
2269	append: append$4,
2270	attr: attr$4,
2271	check_outros: check_outros$4,
2272	create_component: create_component$5,
2273	destroy_component: destroy_component$5,
2274	detach: detach$5,
2275	element: element$4,
2276	group_outros: group_outros$4,
2277	init: init$6,
2278	insert: insert$5,
2279	mount_component: mount_component$5,
2280	noop: noop$3,
2281	safe_not_equal: safe_not_equal$6,
2282	space: space$3,
2283	transition_in: transition_in$5,
2284	transition_out: transition_out$5
2285} = window.__gradio__svelte__internal;
2286function create_if_block_1$3(ctx) {
2287	let div0;
2288	let copybutton;
2289	let t0;
2290	let div1;
2291	let pre;
2292	let current;
2293	copybutton = new CopyButton({ props: { code: js_install } });
2294
2295	return {
2296		c() {
2297			div0 = element$4("div");
2298			create_component$5(copybutton.$$.fragment);
2299			t0 = space$3();
2300			div1 = element$4("div");
2301			pre = element$4("pre");
2302			pre.textContent = `\$ ${js_install}`;
2303			attr$4(div0, "class", "copy svelte-hq8ezf");
2304			attr$4(pre, "class", "svelte-hq8ezf");
2305		},
2306		m(target, anchor) {
2307			insert$5(target, div0, anchor);
2308			mount_component$5(copybutton, div0, null);
2309			insert$5(target, t0, anchor);
2310			insert$5(target, div1, anchor);
2311			append$4(div1, pre);
2312			current = true;
2313		},
2314		p: noop$3,
2315		i(local) {
2316			if (current) return;
2317			transition_in$5(copybutton.$$.fragment, local);
2318			current = true;
2319		},
2320		o(local) {
2321			transition_out$5(copybutton.$$.fragment, local);
2322			current = false;
2323		},
2324		d(detaching) {
2325			if (detaching) {
2326				detach$5(div0);
2327				detach$5(t0);
2328				detach$5(div1);
2329			}
2330
2331			destroy_component$5(copybutton);
2332		}
2333	};
2334}
2335
2336// (10:2) {#if current_language === "python"}
2337function create_if_block$5(ctx) {
2338	let div0;
2339	let copybutton;
2340	let t0;
2341	let div1;
2342	let pre;
2343	let current;
2344	copybutton = new CopyButton({ props: { code: py_install } });
2345
2346	return {
2347		c() {
2348			div0 = element$4("div");
2349			create_component$5(copybutton.$$.fragment);
2350			t0 = space$3();
2351			div1 = element$4("div");
2352			pre = element$4("pre");
2353			pre.textContent = `\$ ${py_install}`;
2354			attr$4(div0, "class", "copy svelte-hq8ezf");
2355			attr$4(pre, "class", "svelte-hq8ezf");
2356		},
2357		m(target, anchor) {
2358			insert$5(target, div0, anchor);
2359			mount_component$5(copybutton, div0, null);
2360			insert$5(target, t0, anchor);
2361			insert$5(target, div1, anchor);
2362			append$4(div1, pre);
2363			current = true;
2364		},
2365		p: noop$3,
2366		i(local) {
2367			if (current) return;
2368			transition_in$5(copybutton.$$.fragment, local);
2369			current = true;
2370		},
2371		o(local) {
2372			transition_out$5(copybutton.$$.fragment, local);
2373			current = false;
2374		},
2375		d(detaching) {
2376			if (detaching) {
2377				detach$5(div0);
2378				detach$5(t0);
2379				detach$5(div1);
2380			}
2381
2382			destroy_component$5(copybutton);
2383		}
2384	};
2385}
2386
2387// (8:0) <Block>
2388function create_default_slot$2(ctx) {
2389	let code;
2390	let current_block_type_index;
2391	let if_block;
2392	let current;
2393	const if_block_creators = [create_if_block$5, create_if_block_1$3];
2394	const if_blocks = [];
2395
2396	function select_block_type(ctx, dirty) {
2397		if (/*current_language*/ ctx[0] === "python") return 0;
2398		if (/*current_language*/ ctx[0] === "javascript") return 1;
2399		return -1;
2400	}
2401
2402	if (~(current_block_type_index = select_block_type(ctx))) {
2403		if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
2404	}
2405
2406	return {
2407		c() {
2408			code = element$4("code");
2409			if (if_block) if_block.c();
2410			attr$4(code, "class", "svelte-hq8ezf");
2411		},
2412		m(target, anchor) {
2413			insert$5(target, code, anchor);
2414
2415			if (~current_block_type_index) {
2416				if_blocks[current_block_type_index].m(code, null);
2417			}
2418
2419			current = true;
2420		},
2421		p(ctx, dirty) {
2422			let previous_block_index = current_block_type_index;
2423			current_block_type_index = select_block_type(ctx);
2424
2425			if (current_block_type_index === previous_block_index) {
2426				if (~current_block_type_index) {
2427					if_blocks[current_block_type_index].p(ctx, dirty);
2428				}
2429			} else {
2430				if (if_block) {
2431					group_outros$4();
2432
2433					transition_out$5(if_blocks[previous_block_index], 1, 1, () => {
2434						if_blocks[previous_block_index] = null;
2435					});
2436
2437					check_outros$4();
2438				}
2439
2440				if (~current_block_type_index) {
2441					if_block = if_blocks[current_block_type_index];
2442
2443					if (!if_block) {
2444						if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
2445						if_block.c();
2446					} else {
2447						if_block.p(ctx, dirty);
2448					}
2449
2450					transition_in$5(if_block, 1);
2451					if_block.m(code, null);
2452				} else {
2453					if_block = null;
2454				}
2455			}
2456		},
2457		i(local) {
2458			if (current) return;
2459			transition_in$5(if_block);
2460			current = true;
2461		},
2462		o(local) {
2463			transition_out$5(if_block);
2464			current = false;
2465		},
2466		d(detaching) {
2467			if (detaching) {
2468				detach$5(code);
2469			}
2470
2471			if (~current_block_type_index) {
2472				if_blocks[current_block_type_index].d();
2473			}
2474		}
2475	};
2476}
2477
2478function create_fragment$6(ctx) {
2479	let block;
2480	let current;
2481
2482	block = new Block({
2483			props: {
2484				$$slots: { default: [create_default_slot$2] },
2485				$$scope: { ctx }
2486			}
2487		});
2488
2489	return {
2490		c() {
2491			create_component$5(block.$$.fragment);
2492		},
2493		m(target, anchor) {
2494			mount_component$5(block, target, anchor);
2495			current = true;
2496		},
2497		p(ctx, [dirty]) {
2498			const block_changes = {};
2499
2500			if (dirty & /*$$scope, current_language*/ 3) {
2501				block_changes.$$scope = { dirty, ctx };
2502			}
2503
2504			block.$set(block_changes);
2505		},
2506		i(local) {
2507			if (current) return;
2508			transition_in$5(block.$$.fragment, local);
2509			current = true;
2510		},
2511		o(local) {
2512			transition_out$5(block.$$.fragment, local);
2513			current = false;
2514		},
2515		d(detaching) {
2516			destroy_component$5(block, detaching);
2517		}
2518	};
2519}
2520
2521let py_install = "pip install gradio_client";
2522let js_install = "npm i -D @gradio/client";
2523
2524function instance$6($$self, $$props, $$invalidate) {
2525	let { current_language } = $$props;
2526
2527	$$self.$$set = $$props => {
2528		if ('current_language' in $$props) $$invalidate(0, current_language = $$props.current_language);
2529	};
2530
2531	return [current_language];
2532}
2533
2534class InstallSnippet extends SvelteComponent$6 {
2535	constructor(options) {
2536		super();
2537		init$6(this, options, instance$6, create_fragment$6, safe_not_equal$6, { current_language: 0 });
2538	}
2539}
2540
2541const EndpointDetail_svelte_svelte_type_style_lang = '';
2542
2543/* src/api_docs/EndpointDetail.svelte generated by Svelte v4.2.2 */
2544const {
2545	SvelteComponent: SvelteComponent$5,
2546	append: append$3,
2547	attr: attr$3,
2548	detach: detach$4,
2549	element: element$3,
2550	empty: empty$4,
2551	init: init$5,
2552	insert: insert$4,
2553	noop: noop$2,
2554	safe_not_equal: safe_not_equal$5,
2555	set_data: set_data$2,
2556	text: text$3
2557} = window.__gradio__svelte__internal;
2558function create_else_block$2(ctx) {
2559	let h3;
2560	let t0;
2561	let span;
2562	let t1;
2563
2564	return {
2565		c() {
2566			h3 = element$3("h3");
2567			t0 = text$3("fn_index:\n\t\t");
2568			span = element$3("span");
2569			t1 = text$3(/*fn_index*/ ctx[1]);
2570			attr$3(span, "class", "post svelte-41kcm6");
2571			attr$3(h3, "class", "svelte-41kcm6");
2572		},
2573		m(target, anchor) {
2574			insert$4(target, h3, anchor);
2575			append$3(h3, t0);
2576			append$3(h3, span);
2577			append$3(span, t1);
2578		},
2579		p(ctx, dirty) {
2580			if (dirty & /*fn_index*/ 2) set_data$2(t1, /*fn_index*/ ctx[1]);
2581		},
2582		d(detaching) {
2583			if (detaching) {
2584				detach$4(h3);
2585			}
2586		}
2587	};
2588}
2589
2590// (6:0) {#if named}
2591function create_if_block$4(ctx) {
2592	let h3;
2593	let t0;
2594	let span;
2595	let t1_value = "/" + /*api_name*/ ctx[0] + "";
2596	let t1;
2597
2598	return {
2599		c() {
2600			h3 = element$3("h3");
2601			t0 = text$3("api_name:\n\t\t");
2602			span = element$3("span");
2603			t1 = text$3(t1_value);
2604			attr$3(span, "class", "post svelte-41kcm6");
2605			attr$3(h3, "class", "svelte-41kcm6");
2606		},
2607		m(target, anchor) {
2608			insert$4(target, h3, anchor);
2609			append$3(h3, t0);
2610			append$3(h3, span);
2611			append$3(span, t1);
2612		},
2613		p(ctx, dirty) {
2614			if (dirty & /*api_name*/ 1 && t1_value !== (t1_value = "/" + /*api_name*/ ctx[0] + "")) set_data$2(t1, t1_value);
2615		},
2616		d(detaching) {
2617			if (detaching) {
2618				detach$4(h3);
2619			}
2620		}
2621	};
2622}
2623
2624function create_fragment$5(ctx) {
2625	let if_block_anchor;
2626
2627	function select_block_type(ctx, dirty) {
2628		if (/*named*/ ctx[2]) return create_if_block$4;
2629		return create_else_block$2;
2630	}
2631
2632	let current_block_type = select_block_type(ctx);
2633	let if_block = current_block_type(ctx);
2634
2635	return {
2636		c() {
2637			if_block.c();
2638			if_block_anchor = empty$4();
2639		},
2640		m(target, anchor) {
2641			if_block.m(target, anchor);
2642			insert$4(target, if_block_anchor, anchor);
2643		},
2644		p(ctx, [dirty]) {
2645			if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
2646				if_block.p(ctx, dirty);
2647			} else {
2648				if_block.d(1);
2649				if_block = current_block_type(ctx);
2650
2651				if (if_block) {
2652					if_block.c();
2653					if_block.m(if_block_anchor.parentNode, if_block_anchor);
2654				}
2655			}
2656		},
2657		i: noop$2,
2658		o: noop$2,
2659		d(detaching) {
2660			if (detaching) {
2661				detach$4(if_block_anchor);
2662			}
2663
2664			if_block.d(detaching);
2665		}
2666	};
2667}
2668
2669function instance$5($$self, $$props, $$invalidate) {
2670	let { api_name = null } = $$props;
2671	let { fn_index = null } = $$props;
2672	let { named } = $$props;
2673
2674	$$self.$$set = $$props => {
2675		if ('api_name' in $$props) $$invalidate(0, api_name = $$props.api_name);
2676		if ('fn_index' in $$props) $$invalidate(1, fn_index = $$props.fn_index);
2677		if ('named' in $$props) $$invalidate(2, named = $$props.named);
2678	};
2679
2680	return [api_name, fn_index, named];
2681}
2682
2683class EndpointDetail extends SvelteComponent$5 {
2684	constructor(options) {
2685		super();
2686		init$5(this, options, instance$5, create_fragment$5, safe_not_equal$5, { api_name: 0, fn_index: 1, named: 2 });
2687	}
2688}
2689
2690const CodeSnippets_svelte_svelte_type_style_lang = '';
2691
2692/* src/api_docs/CodeSnippets.svelte generated by Svelte v4.2.2 */
2693const {
2694	SvelteComponent: SvelteComponent$4,
2695	append: append$2,
2696	attr: attr$2,
2697	binding_callbacks: binding_callbacks$1,
2698	check_outros: check_outros$3,
2699	create_component: create_component$4,
2700	destroy_component: destroy_component$4,
2701	destroy_each: destroy_each$1,
2702	detach: detach$3,
2703	element: element$2,
2704	empty: empty$3,
2705	ensure_array_like: ensure_array_like$2,
2706	group_outros: group_outros$3,
2707	init: init$4,
2708	insert: insert$3,
2709	mount_component: mount_component$4,
2710	noop: noop$1,
2711	safe_not_equal: safe_not_equal$4,
2712	set_data: set_data$1,
2713	space: space$2,
2714	text: text$2,
2715	transition_in: transition_in$4,
2716	transition_out: transition_out$4
2717} = window.__gradio__svelte__internal;
2718function get_each_context_1$1(ctx, list, i) {
2719	const child_ctx = ctx.slice();
2720	child_ctx[14] = list[i].label;
2721	child_ctx[15] = list[i].type;
2722	child_ctx[16] = list[i].python_type;
2723	child_ctx[17] = list[i].component;
2724	child_ctx[18] = list[i].example_input;
2725	child_ctx[19] = list[i].serializer;
2726	child_ctx[21] = i;
2727	return child_ctx;
2728}
2729
2730function get_each_context_2(ctx, list, i) {
2731	const child_ctx = ctx.slice();
2732	child_ctx[14] = list[i].label;
2733	child_ctx[15] = list[i].type;
2734	child_ctx[16] = list[i].python_type;
2735	child_ctx[17] = list[i].component;
2736	child_ctx[18] = list[i].example_input;
2737	child_ctx[19] = list[i].serializer;
2738	child_ctx[21] = i;
2739	return child_ctx;
2740}
2741
2742function get_each_context$2(ctx, list, i) {
2743	const child_ctx = ctx.slice();
2744	child_ctx[14] = list[i].label;
2745	child_ctx[15] = list[i].type;
2746	child_ctx[16] = list[i].python_type;
2747	child_ctx[17] = list[i].component;
2748	child_ctx[18] = list[i].example_input;
2749	child_ctx[19] = list[i].serializer;
2750	child_ctx[21] = i;
2751	return child_ctx;
2752}
2753
2754// (22:1) {:else}
2755function create_else_block_2(ctx) {
2756	let endpointdetail;
2757	let current;
2758
2759	endpointdetail = new EndpointDetail({
2760			props: {
2761				named: /*named*/ ctx[6],
2762				fn_index: /*dependency_index*/ ctx[1]
2763			}
2764		});
2765
2766	return {
2767		c() {
2768			create_component$4(endpointdetail.$$.fragment);
2769		},
2770		m(target, anchor) {
2771			mount_component$4(endpointdetail, target, anchor);
2772			current = true;
2773		},
2774		p(ctx, dirty) {
2775			const endpointdetail_changes = {};
2776			if (dirty & /*named*/ 64) endpointdetail_changes.named = /*named*/ ctx[6];
2777			if (dirty & /*dependency_index*/ 2) endpointdetail_changes.fn_index = /*dependency_index*/ ctx[1];
2778			endpointdetail.$set(endpointdetail_changes);
2779		},
2780		i(local) {
2781			if (current) return;
2782			transition_in$4(endpointdetail.$$.fragment, local);
2783			current = true;
2784		},
2785		o(local) {
2786			transition_out$4(endpointdetail.$$.fragment, local);
2787			current = false;
2788		},
2789		d(detaching) {
2790			destroy_component$4(endpointdetail, detaching);
2791		}
2792	};
2793}
2794
2795// (20:1) {#if named}
2796function create_if_block_7(ctx) {
2797	let endpointdetail;
2798	let current;
2799
2800	endpointdetail = new EndpointDetail({
2801			props: {
2802				named: /*named*/ ctx[6],
2803				api_name: /*dependency*/ ctx[0].api_name
2804			}
2805		});
2806
2807	return {
2808		c() {
2809			create_component$4(endpointdetail.$$.fragment);
2810		},
2811		m(target, anchor) {
2812			mount_component$4(endpointdetail, target, anchor);
2813			current = true;
2814		},
2815		p(ctx, dirty) {
2816			const endpointdetail_changes = {};
2817			if (dirty & /*named*/ 64) endpointdetail_changes.named = /*named*/ ctx[6];
2818			if (dirty & /*dependency*/ 1) endpointdetail_changes.api_name = /*dependency*/ ctx[0].api_name;
2819			endpointdetail.$set(endpointdetail_changes);
2820		},
2821		i(local) {
2822			if (current) return;
2823			transition_in$4(endpointdetail.$$.fragment, local);
2824			current = true;
2825		},
2826		o(local) {
2827			transition_out$4(endpointdetail.$$.fragment, local);
2828			current = false;
2829		},
2830		d(detaching) {
2831			destroy_component$4(endpointdetail, detaching);
2832		}
2833	};
2834}
2835
2836// (61:47) 
2837function create_if_block_3$2(ctx) {
2838	let div0;
2839	let copybutton;
2840	let t0;
2841	let div1;
2842	let pre;
2843	let t1;
2844	let t2;
2845	let span;
2846	let t3;
2847	let t4;
2848	let t5;
2849	let t6;
2850	let t7;
2851	let t8;
2852	let current;
2853
2854	copybutton = new CopyButton({
2855			props: { code: /*js_code*/ ctx[9]?.innerText }
2856		});
2857
2858	let each_value_2 = ensure_array_like$2(/*blob_examples*/ ctx[11]);
2859	let each_blocks_1 = [];
2860
2861	for (let i = 0; i < each_value_2.length; i += 1) {
2862		each_blocks_1[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i));
2863	}
2864
2865	function select_block_type_2(ctx, dirty) {
2866		if (/*named*/ ctx[6]) return create_if_block_6$1;
2867		return create_else_block_1;
2868	}
2869
2870	let current_block_type = select_block_type_2(ctx);
2871	let if_block = current_block_type(ctx);
2872	let each_value_1 = ensure_array_like$2(/*endpoint_parameters*/ ctx[4]);
2873	let each_blocks = [];
2874
2875	for (let i = 0; i < each_value_1.length; i += 1) {
2876		each_blocks[i] = create_each_block_1$1(get_each_context_1$1(ctx, each_value_1, i));
2877	}
2878
2879	return {
2880		c() {
2881			div0 = element$2("div");
2882			create_component$4(copybutton.$$.fragment);
2883			t0 = space$2();
2884			div1 = element$2("div");
2885			pre = element$2("pre");
2886			t1 = text$2("import { client } from \"@gradio/client\";\n");
2887
2888			for (let i = 0; i < each_blocks_1.length; i += 1) {
2889				each_blocks_1[i].c();
2890			}
2891
2892			t2 = text$2("\nconst app = await client(");
2893			span = element$2("span");
2894			t3 = text$2("\"");
2895			t4 = text$2(/*root*/ ctx[2]);
2896			t5 = text$2("\"");
2897			t6 = text$2(");\nconst result = await app.predict(");
2898			if_block.c();
2899			t7 = text$2(", [");
2900
2901			for (let i = 0; i < each_blocks.length; i += 1) {
2902				each_blocks[i].c();
2903			}
2904
2905			t8 = text$2("\n\t]);\n\nconsole.log(result.data);\n");
2906			attr$2(div0, "class", "copy svelte-1d98qmk");
2907			attr$2(span, "class", "token string svelte-1d98qmk");
2908			attr$2(pre, "class", "svelte-1d98qmk");
2909		},
2910		m(target, anchor) {
2911			insert$3(target, div0, anchor);
2912			mount_component$4(copybutton, div0, null);
2913			insert$3(target, t0, anchor);
2914			insert$3(target, div1, anchor);
2915			append$2(div1, pre);
2916			append$2(pre, t1);
2917
2918			for (let i = 0; i < each_blocks_1.length; i += 1) {
2919				if (each_blocks_1[i]) {
2920					each_blocks_1[i].m(pre, null);
2921				}
2922			}
2923
2924			append$2(pre, t2);
2925			append$2(pre, span);
2926			append$2(span, t3);
2927			append$2(span, t4);
2928			append$2(span, t5);
2929			append$2(pre, t6);
2930			if_block.m(pre, null);
2931			append$2(pre, t7);
2932
2933			for (let i = 0; i < each_blocks.length; i += 1) {
2934				if (each_blocks[i]) {
2935					each_blocks[i].m(pre, null);
2936				}
2937			}
2938
2939			append$2(pre, t8);
2940			/*div1_binding_1*/ ctx[13](div1);
2941			current = true;
2942		},
2943		p(ctx, dirty) {
2944			const copybutton_changes = {};
2945			if (dirty & /*js_code*/ 512) copybutton_changes.code = /*js_code*/ ctx[9]?.innerText;
2946			copybutton.$set(copybutton_changes);
2947
2948			if (dirty & /*blob_examples*/ 2048) {
2949				each_value_2 = ensure_array_like$2(/*blob_examples*/ ctx[11]);
2950				let i;
2951
2952				for (i = 0; i < each_value_2.length; i += 1) {
2953					const child_ctx = get_each_context_2(ctx, each_value_2, i);
2954
2955					if (each_blocks_1[i]) {
2956						each_blocks_1[i].p(child_ctx, dirty);
2957					} else {
2958						each_blocks_1[i] = create_each_block_2(child_ctx);
2959						each_blocks_1[i].c();
2960						each_blocks_1[i].m(pre, t2);
2961					}
2962				}
2963
2964				for (; i < each_blocks_1.length; i += 1) {
2965					each_blocks_1[i].d(1);
2966				}
2967
2968				each_blocks_1.length = each_value_2.length;
2969			}
2970
2971			if (!current || dirty & /*root*/ 4) set_data$1(t4, /*root*/ ctx[2]);
2972
2973			if (current_block_type === (current_block_type = select_block_type_2(ctx)) && if_block) {
2974				if_block.p(ctx, dirty);
2975			} else {
2976				if_block.d(1);
2977				if_block = current_block_type(ctx);
2978
2979				if (if_block) {
2980					if_block.c();
2981					if_block.m(pre, t7);
2982				}
2983			}
2984
2985			if (dirty & /*endpoint_parameters, blob_components, js_parameters*/ 1072) {
2986				each_value_1 = ensure_array_like$2(/*endpoint_parameters*/ ctx[4]);
2987				let i;
2988
2989				for (i = 0; i < each_value_1.length; i += 1) {
2990					const child_ctx = get_each_context_1$1(ctx, each_value_1, i);
2991
2992					if (each_blocks[i]) {
2993						each_blocks[i].p(child_ctx, dirty);
2994					} else {
2995						each_blocks[i] = create_each_block_1$1(child_ctx);
2996						each_blocks[i].c();
2997						each_blocks[i].m(pre, t8);
2998					}
2999				}
3000
3001				for (; i < each_blocks.length; i += 1) {
3002					each_blocks[i].d(1);
3003				}
3004
3005				each_blocks.length = each_value_1.length;
3006			}
3007		},
3008		i(local) {
3009			if (current) return;
3010			transition_in$4(copybutton.$$.fragment, local);
3011			current = true;
3012		},
3013		o(local) {
3014			transition_out$4(copybutton.$$.fragment, local);
3015			current = false;
3016		},
3017		d(detaching) {
3018			if (detaching) {
3019				detach$3(div0);
3020				detach$3(t0);
3021				detach$3(div1);
3022			}
3023
3024			destroy_component$4(copybutton);
3025			destroy_each$1(each_blocks_1, detaching);
3026			if_block.d();
3027			destroy_each$1(each_blocks, detaching);
3028			/*div1_binding_1*/ ctx[13](null);
3029		}
3030	};
3031}
3032
3033// (27:3) {#if current_language === "python"}
3034function create_if_block$3(ctx) {
3035	let div0;
3036	let copybutton;
3037	let t0;
3038	let div1;
3039	let pre;
3040	let t1;
3041	let span;
3042	let t2;
3043	let t3;
3044	let t4;
3045	let t5;
3046	let t6;
3047	let t7_value = /*dependency*/ ctx[0].api_name + "";
3048	let t7;
3049	let t8;
3050	let current;
3051
3052	copybutton = new CopyButton({
3053			props: { code: /*python_code*/ ctx[8]?.innerText }
3054		});
3055
3056	let each_value = ensure_array_like$2(/*endpoint_parameters*/ ctx[4]);
3057	let each_blocks = [];
3058
3059	for (let i = 0; i < each_value.length; i += 1) {
3060		each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i));
3061	}
3062
3063	return {
3064		c() {
3065			div0 = element$2("div");
3066			create_component$4(copybutton.$$.fragment);
3067			t0 = space$2();
3068			div1 = element$2("div");
3069			pre = element$2("pre");
3070			t1 = text$2("from gradio_client import Client\n\nclient = Client(");
3071			span = element$2("span");
3072			t2 = text$2("\"");
3073			t3 = text$2(/*root*/ ctx[2]);
3074			t4 = text$2("\"");
3075			t5 = text$2(")\nresult = client.predict(");
3076
3077			for (let i = 0; i < each_blocks.length; i += 1) {
3078				each_blocks[i].c();
3079			}
3080
3081			t6 = text$2("\n\t\tapi_name=\"/");
3082			t7 = text$2(t7_value);
3083			t8 = text$2("\"\n)\nprint(result)");
3084			attr$2(div0, "class", "copy svelte-1d98qmk");
3085			attr$2(span, "class", "token string svelte-1d98qmk");
3086			attr$2(pre, "class", "svelte-1d98qmk");
3087		},
3088		m(target, anchor) {
3089			insert$3(target, div0, anchor);
3090			mount_component$4(copybutton, div0, null);
3091			insert$3(target, t0, anchor);
3092			insert$3(target, div1, anchor);
3093			append$2(div1, pre);
3094			append$2(pre, t1);
3095			append$2(pre, span);
3096			append$2(span, t2);
3097			append$2(span, t3);
3098			append$2(span, t4);
3099			append$2(pre, t5);
3100
3101			for (let i = 0; i < each_blocks.length; i += 1) {
3102				if (each_blocks[i]) {
3103					each_blocks[i].m(pre, null);
3104				}
3105			}
3106
3107			append$2(pre, t6);
3108			append$2(pre, t7);
3109			append$2(pre, t8);
3110			/*div1_binding*/ ctx[12](div1);
3111			current = true;
3112		},
3113		p(ctx, dirty) {
3114			const copybutton_changes = {};
3115			if (dirty & /*python_code*/ 256) copybutton_changes.code = /*python_code*/ ctx[8]?.innerText;
3116			copybutton.$set(copybutton_changes);
3117			if (!current || dirty & /*root*/ 4) set_data$1(t3, /*root*/ ctx[2]);
3118
3119			if (dirty & /*endpoint_parameters, dependency_failures, dependency_index*/ 26) {
3120				each_value = ensure_array_like$2(/*endpoint_parameters*/ ctx[4]);
3121				let i;
3122
3123				for (i = 0; i < each_value.length; i += 1) {
3124					const child_ctx = get_each_context$2(ctx, each_value, i);
3125
3126					if (each_blocks[i]) {
3127						each_blocks[i].p(child_ctx, dirty);
3128					} else {
3129						each_blocks[i] = create_each_block$2(child_ctx);
3130						each_blocks[i].c();
3131						each_blocks[i].m(pre, t6);
3132					}
3133				}
3134
3135				for (; i < each_blocks.length; i += 1) {
3136					each_blocks[i].d(1);
3137				}
3138
3139				each_blocks.length = each_value.length;
3140			}
3141
3142			if ((!current || dirty & /*dependency*/ 1) && t7_value !== (t7_value = /*dependency*/ ctx[0].api_name + "")) set_data$1(t7, t7_value);
3143		},
3144		i(local) {
3145			if (current) return;
3146			transition_in$4(copybutton.$$.fragment, local);
3147			current = true;
3148		},
3149		o(local) {
3150			transition_out$4(copybutton.$$.fragment, local);
3151			current = false;
3152		},
3153		d(detaching) {
3154			if (detaching) {
3155				detach$3(div0);
3156				detach$3(t0);
3157				detach$3(div1);
3158			}
3159
3160			destroy_component$4(copybutton);
3161			destroy_each$1(each_blocks, detaching);
3162			/*div1_binding*/ ctx[12](null);
3163		}
3164	};
3165}
3166
3167// (67:0) {#each blob_examples as { label, type, python_type, component, example_input, serializer }
3168function create_each_block_2(ctx) {
3169	let t0;
3170	let t1;
3171	let t2;
3172	let t3_value = /*example_input*/ ctx[18] + "";
3173	let t3;
3174	let t4;
3175	let t5_value = /*component*/ ctx[17] + "";
3176	let t5;
3177	let t6;
3178	let t7;
3179	let t8;
3180
3181	return {
3182		c() {
3183			t0 = text$2("\nconst response_");
3184			t1 = text$2(/*i*/ ctx[21]);
3185			t2 = text$2(" = await fetch(\"");
3186			t3 = text$2(t3_value);
3187			t4 = text$2("\");\nconst example");
3188			t5 = text$2(t5_value);
3189			t6 = text$2(" = await response_");
3190			t7 = text$2(/*i*/ ctx[21]);
3191			t8 = text$2(".blob();\n\t\t\t\t\t\t");
3192		},
3193		m(target, anchor) {
3194			insert$3(target, t0, anchor);
3195			insert$3(target, t1, anchor);
3196			insert$3(target, t2, anchor);
3197			insert$3(target, t3, anchor);
3198			insert$3(target, t4, anchor);
3199			insert$3(target, t5, anchor);
3200			insert$3(target, t6, anchor);
3201			insert$3(target, t7, anchor);
3202			insert$3(target, t8, anchor);
3203		},
3204		p: noop$1,
3205		d(detaching) {
3206			if (detaching) {
3207				detach$3(t0);
3208				detach$3(t1);
3209				detach$3(t2);
3210				detach$3(t3);
3211				detach$3(t4);
3212				detach$3(t5);
3213				detach$3(t6);
3214				detach$3(t7);
3215				detach$3(t8);
3216			}
3217		}
3218	};
3219}
3220
3221// (74:68) {:else}
3222function create_else_block_1(ctx) {
3223	let t;
3224
3225	return {
3226		c() {
3227			t = text$2(/*dependency_index*/ ctx[1]);
3228		},
3229		m(target, anchor) {
3230			insert$3(target, t, anchor);
3231		},
3232		p(ctx, dirty) {
3233			if (dirty & /*dependency_index*/ 2) set_data$1(t, /*dependency_index*/ ctx[1]);
3234		},
3235		d(detaching) {
3236			if (detaching) {
3237				detach$3(t);
3238			}
3239		}
3240	};
3241}
3242
3243// (74:33) {#if named}
3244function create_if_block_6$1(ctx) {
3245	let t0;
3246	let t1_value = /*dependency*/ ctx[0].api_name + "";
3247	let t1;
3248	let t2;
3249
3250	return {
3251		c() {
3252			t0 = text$2("\"/");
3253			t1 = text$2(t1_value);
3254			t2 = text$2("\"");
3255		},
3256		m(target, anchor) {
3257			insert$3(target, t0, anchor);
3258			insert$3(target, t1, anchor);
3259			insert$3(target, t2, anchor);
3260		},
3261		p(ctx, dirty) {
3262			if (dirty & /*dependency*/ 1 && t1_value !== (t1_value = /*dependency*/ ctx[0].api_name + "")) set_data$1(t1, t1_value);
3263		},
3264		d(detaching) {
3265			if (detaching) {
3266				detach$3(t0);
3267				detach$3(t1);
3268				detach$3(t2);
3269			}
3270		}
3271	};
3272}
3273
3274// (88:5) {:else}
3275function create_else_block$1(ctx) {
3276	let t0;
3277	let span0;
3278	let t1_value = represent_value(/*example_input*/ ctx[18], /*python_type*/ ctx[16].type, "js") + "";
3279	let t1;
3280	let t2;
3281	let span1;
3282	let t3;
3283	let t4_value = /*js_parameters*/ ctx[5][/*i*/ ctx[21]].type + "";
3284	let t4;
3285	let t5;
3286	let t6;
3287	let t7_value = /*label*/ ctx[14] + "";
3288	let t7;
3289	let t8;
3290	let t9_value = /*component*/ ctx[17] + "";
3291	let t9;
3292	let t10;
3293	let if_block = /*js_parameters*/ ctx[5][/*i*/ ctx[21]].description && create_if_block_5$1(ctx);
3294
3295	return {
3296		c() {
3297			t0 = text$2("\t\t\n\t\t\t\t");
3298			span0 = element$2("span");
3299			t1 = text$2(t1_value);
3300			t2 = text$2(", ");
3301			span1 = element$2("span");
3302			t3 = text$2("// ");
3303			t4 = text$2(t4_value);
3304			t5 = text$2(" ");
3305			if (if_block) if_block.c();
3306			t6 = text$2(" in '");
3307			t7 = text$2(t7_value);
3308			t8 = text$2("' ");
3309			t9 = text$2(t9_value);
3310			t10 = text$2(" component");
3311			attr$2(span0, "class", "example-inputs svelte-1d98qmk");
3312			attr$2(span1, "class", "desc svelte-1d98qmk");
3313		},
3314		m(target, anchor) {
3315			insert$3(target, t0, anchor);
3316			insert$3(target, span0, anchor);
3317			append$2(span0, t1);
3318			insert$3(target, t2, anchor);
3319			insert$3(target, span1, anchor);
3320			append$2(span1, t3);
3321			append$2(span1, t4);
3322			append$2(span1, t5);
3323			if (if_block) if_block.m(span1, null);
3324			append$2(span1, t6);
3325			append$2(span1, t7);
3326			append$2(span1, t8);
3327			append$2(span1, t9);
3328			append$2(span1, t10);
3329		},
3330		p(ctx, dirty) {
3331			if (dirty & /*endpoint_parameters*/ 16 && t1_value !== (t1_value = represent_value(/*example_input*/ ctx[18], /*python_type*/ ctx[16].type, "js") + "")) set_data$1(t1, t1_value);
3332			if (dirty & /*js_parameters*/ 32 && t4_value !== (t4_value = /*js_parameters*/ ctx[5][/*i*/ ctx[21]].type + "")) set_data$1(t4, t4_value);
3333
3334			if (/*js_parameters*/ ctx[5][/*i*/ ctx[21]].description) {
3335				if (if_block) {
3336					if_block.p(ctx, dirty);
3337				} else {
3338					if_block = create_if_block_5$1(ctx);
3339					if_block.c();
3340					if_block.m(span1, t6);
3341				}
3342			} else if (if_block) {
3343				if_block.d(1);
3344				if_block = null;
3345			}
3346
3347			if (dirty & /*endpoint_parameters*/ 16 && t7_value !== (t7_value = /*label*/ ctx[14] + "")) set_data$1(t7, t7_value);
3348			if (dirty & /*endpoint_parameters*/ 16 && t9_value !== (t9_value = /*component*/ ctx[17] + "")) set_data$1(t9, t9_value);
3349		},
3350		d(detaching) {
3351			if (detaching) {
3352				detach$3(t0);
3353				detach$3(span0);
3354				detach$3(t2);
3355				detach$3(span1);
3356			}
3357
3358			if (if_block) if_block.d();
3359		}
3360	};
3361}
3362
3363// (76:5) {#if blob_components.includes(component)}
3364function create_if_block_4$1(ctx) {
3365	let t0;
3366	let span0;
3367	let t1;
3368	let t2_value = /*component*/ ctx[17] + "";
3369	let t2;
3370	let t3;
3371	let span1;
3372	let t4;
3373	let t5_value = /*label*/ ctx[14] + "";
3374	let t5;
3375	let t6;
3376	let t7_value = /*component*/ ctx[17] + "";
3377	let t7;
3378	let t8;
3379
3380	return {
3381		c() {
3382			t0 = text$2("\n\t\t\t\t");
3383			span0 = element$2("span");
3384			t1 = text$2("example");
3385			t2 = text$2(t2_value);
3386			t3 = text$2(", ");
3387			span1 = element$2("span");
3388			t4 = text$2("\t// blob in '");
3389			t5 = text$2(t5_value);
3390			t6 = text$2("' ");
3391			t7 = text$2(t7_value);
3392			t8 = text$2(" component");
3393			attr$2(span0, "class", "example-inputs svelte-1d98qmk");
3394			attr$2(span1, "class", "desc svelte-1d98qmk");
3395		},
3396		m(target, anchor) {
3397			insert$3(target, t0, anchor);
3398			insert$3(target, span0, anchor);
3399			append$2(span0, t1);
3400			append$2(span0, t2);
3401			insert$3(target, t3, anchor);
3402			insert$3(target, span1, anchor);
3403			append$2(span1, t4);
3404			append$2(span1, t5);
3405			append$2(span1, t6);
3406			append$2(span1, t7);
3407			append$2(span1, t8);
3408		},
3409		p(ctx, dirty) {
3410			if (dirty & /*endpoint_parameters*/ 16 && t2_value !== (t2_value = /*component*/ ctx[17] + "")) set_data$1(t2, t2_value);
3411			if (dirty & /*endpoint_parameters*/ 16 && t5_value !== (t5_value = /*label*/ ctx[14] + "")) set_data$1(t5, t5_value);
3412			if (dirty & /*endpoint_parameters*/ 16 && t7_value !== (t7_value = /*component*/ ctx[17] + "")) set_data$1(t7, t7_value);
3413		},
3414		d(detaching) {
3415			if (detaching) {
3416				detach$3(t0);
3417				detach$3(span0);
3418				detach$3(t3);
3419				detach$3(span1);
3420			}
3421		}
3422	};
3423}
3424
3425// (100:17) {#if js_parameters[i].description}
3426function create_if_block_5$1(ctx) {
3427	let t0;
3428	let t1_value = /*js_parameters*/ ctx[5][/*i*/ ctx[21]].description + "";
3429	let t1;
3430	let t2;
3431
3432	return {
3433		c() {
3434			t0 = text$2("(");
3435			t1 = text$2(t1_value);
3436			t2 = text$2(")");
3437		},
3438		m(target, anchor) {
3439			insert$3(target, t0, anchor);
3440			insert$3(target, t1, anchor);
3441			insert$3(target, t2, anchor);
3442		},
3443		p(ctx, dirty) {
3444			if (dirty & /*js_parameters*/ 32 && t1_value !== (t1_value = /*js_parameters*/ ctx[5][/*i*/ ctx[21]].description + "")) set_data$1(t1, t1_value);
3445		},
3446		d(detaching) {
3447			if (detaching) {
3448				detach$3(t0);
3449				detach$3(t1);
3450				detach$3(t2);
3451			}
3452		}
3453	};
3454}
3455
3456// (75:3) {#each endpoint_parameters as { label, type, python_type, component, example_input, serializer }
3457function create_each_block_1$1(ctx) {
3458	let show_if;
3459	let if_block_anchor;
3460
3461	function select_block_type_3(ctx, dirty) {
3462		if (dirty & /*endpoint_parameters*/ 16) show_if = null;
3463		if (show_if == null) show_if = !!/*blob_components*/ ctx[10].includes(/*component*/ ctx[17]);
3464		if (show_if) return create_if_block_4$1;
3465		return create_else_block$1;
3466	}
3467
3468	let current_block_type = select_block_type_3(ctx, -1);
3469	let if_block = current_block_type(ctx);
3470
3471	return {
3472		c() {
3473			if_block.c();
3474			if_block_anchor = empty$3();
3475		},
3476		m(target, anchor) {
3477			if_block.m(target, anchor);
3478			insert$3(target, if_block_anchor, anchor);
3479		},
3480		p(ctx, dirty) {
3481			if (current_block_type === (current_block_type = select_block_type_3(ctx, dirty)) && if_block) {
3482				if_block.p(ctx, dirty);
3483			} else {
3484				if_block.d(1);
3485				if_block = current_block_type(ctx);
3486
3487				if (if_block) {
3488					if_block.c();
3489					if_block.m(if_block_anchor.parentNode, if_block_anchor);
3490				}
3491			}
3492		},
3493		d(detaching) {
3494			if (detaching) {
3495				detach$3(if_block_anchor);
3496			}
3497
3498			if_block.d(detaching);
3499		}
3500	};
3501}
3502
3503// (42:6) {#if dependency_failures[dependency_index][i]}
3504function create_if_block_2$2(ctx) {
3505	let span;
3506
3507	return {
3508		c() {
3509			span = element$2("span");
3510			span.textContent = "ERROR";
3511			attr$2(span, "class", "error svelte-1d98qmk");
3512		},
3513		m(target, anchor) {
3514			insert$3(target, span, anchor);
3515		},
3516		d(detaching) {
3517			if (detaching) {
3518				detach$3(span);
3519			}
3520		}
3521	};
3522}
3523
3524// (49:28) {#if python_type.description}
3525function create_if_block_1$2(ctx) {
3526	let t0;
3527	let t1_value = /*python_type*/ ctx[16].description + "";
3528	let t1;
3529	let t2;
3530
3531	return {
3532		c() {
3533			t0 = text$2("(");
3534			t1 = text$2(t1_value);
3535			t2 = text$2(")");
3536		},
3537		m(target, anchor) {
3538			insert$3(target, t0, anchor);
3539			insert$3(target, t1, anchor);
3540			insert$3(target, t2, anchor);
3541		},
3542		p(ctx, dirty) {
3543			if (dirty & /*endpoint_parameters*/ 16 && t1_value !== (t1_value = /*python_type*/ ctx[16].description + "")) set_data$1(t1, t1_value);
3544		},
3545		d(detaching) {
3546			if (detaching) {
3547				detach$3(t0);
3548				detach$3(t1);
3549				detach$3(t2);
3550			}
3551		}
3552	};
3553}
3554
3555// (36:3) {#each endpoint_parameters as { label, type, python_type, component, example_input, serializer }
3556function create_each_block$2(ctx) {
3557	let t0;
3558	let span0;
3559	let t1_value = represent_value(/*example_input*/ ctx[18], /*python_type*/ ctx[16].type, "py") + "";
3560	let t1;
3561	let t2;
3562	let span1;
3563	let t3;
3564	let t4_value = /*python_type*/ ctx[16].type + "";
3565	let t4;
3566	let t5;
3567	let t6;
3568	let t7_value = /*label*/ ctx[14] + "";
3569	let t7;
3570	let t8;
3571	let t9_value = /*component*/ ctx[17] + "";
3572	let t9;
3573	let t10;
3574	let if_block0 = /*dependency_failures*/ ctx[3][/*dependency_index*/ ctx[1]][/*i*/ ctx[21]] && create_if_block_2$2();
3575	let if_block1 = /*python_type*/ ctx[16].description && create_if_block_1$2(ctx);
3576
3577	return {
3578		c() {
3579			t0 = text$2("\n\t\t");
3580			span0 = element$2("span");
3581			t1 = text$2(t1_value);
3582			t2 = text$2(",");
3583			if (if_block0) if_block0.c();
3584			span1 = element$2("span");
3585			t3 = text$2("\t# ");
3586			t4 = text$2(t4_value);
3587			t5 = text$2(" ");
3588			if (if_block1) if_block1.c();
3589			t6 = text$2(" in '");
3590			t7 = text$2(t7_value);
3591			t8 = text$2("' ");
3592			t9 = text$2(t9_value);
3593			t10 = text$2(" component");
3594			attr$2(span0, "class", "example-inputs svelte-1d98qmk");
3595			attr$2(span1, "class", "desc svelte-1d98qmk");
3596		},
3597		m(target, anchor) {
3598			insert$3(target, t0, anchor);
3599			insert$3(target, span0, anchor);
3600			append$2(span0, t1);
3601			insert$3(target, t2, anchor);
3602			if (if_block0) if_block0.m(target, anchor);
3603			insert$3(target, span1, anchor);
3604			append$2(span1, t3);
3605			append$2(span1, t4);
3606			append$2(span1, t5);
3607			if (if_block1) if_block1.m(span1, null);
3608			append$2(span1, t6);
3609			append$2(span1, t7);
3610			append$2(span1, t8);
3611			append$2(span1, t9);
3612			append$2(span1, t10);
3613		},
3614		p(ctx, dirty) {
3615			if (dirty & /*endpoint_parameters*/ 16 && t1_value !== (t1_value = represent_value(/*example_input*/ ctx[18], /*python_type*/ ctx[16].type, "py") + "")) set_data$1(t1, t1_value);
3616
3617			if (/*dependency_failures*/ ctx[3][/*dependency_index*/ ctx[1]][/*i*/ ctx[21]]) {
3618				if (if_block0) ; else {
3619					if_block0 = create_if_block_2$2();
3620					if_block0.c();
3621					if_block0.m(span1.parentNode, span1);
3622				}
3623			} else if (if_block0) {
3624				if_block0.d(1);
3625				if_block0 = null;
3626			}
3627
3628			if (dirty & /*endpoint_parameters*/ 16 && t4_value !== (t4_value = /*python_type*/ ctx[16].type + "")) set_data$1(t4, t4_value);
3629
3630			if (/*python_type*/ ctx[16].description) {
3631				if (if_block1) {
3632					if_block1.p(ctx, dirty);
3633				} else {
3634					if_block1 = create_if_block_1$2(ctx);
3635					if_block1.c();
3636					if_block1.m(span1, t6);
3637				}
3638			} else if (if_block1) {
3639				if_block1.d(1);
3640				if_block1 = null;
3641			}
3642
3643			if (dirty & /*endpoint_parameters*/ 16 && t7_value !== (t7_value = /*label*/ ctx[14] + "")) set_data$1(t7, t7_value);
3644			if (dirty & /*endpoint_parameters*/ 16 && t9_value !== (t9_value = /*component*/ ctx[17] + "")) set_data$1(t9, t9_value);
3645		},
3646		d(detaching) {
3647			if (detaching) {
3648				detach$3(t0);
3649				detach$3(span0);
3650				detach$3(t2);
3651				detach$3(span1);
3652			}
3653
3654			if (if_block0) if_block0.d(detaching);
3655			if (if_block1) if_block1.d();
3656		}
3657	};
3658}
3659
3660// (25:1) <Block>
3661function create_default_slot$1(ctx) {
3662	let code;
3663	let current_block_type_index;
3664	let if_block;
3665	let current;
3666	const if_block_creators = [create_if_block$3, create_if_block_3$2];
3667	const if_blocks = [];
3668
3669	function select_block_type_1(ctx, dirty) {
3670		if (/*current_language*/ ctx[7] === "python") return 0;
3671		if (/*current_language*/ ctx[7] === "javascript") return 1;
3672		return -1;
3673	}
3674
3675	if (~(current_block_type_index = select_block_type_1(ctx))) {
3676		if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
3677	}
3678
3679	return {
3680		c() {
3681			code = element$2("code");
3682			if (if_block) if_block.c();
3683			attr$2(code, "class", "svelte-1d98qmk");
3684		},
3685		m(target, anchor) {
3686			insert$3(target, code, anchor);
3687
3688			if (~current_block_type_index) {
3689				if_blocks[current_block_type_index].m(code, null);
3690			}
3691
3692			current = true;
3693		},
3694		p(ctx, dirty) {
3695			let previous_block_index = current_block_type_index;
3696			current_block_type_index = select_block_type_1(ctx);
3697
3698			if (current_block_type_index === previous_block_index) {
3699				if (~current_block_type_index) {
3700					if_blocks[current_block_type_index].p(ctx, dirty);
3701				}
3702			} else {
3703				if (if_block) {
3704					group_outros$3();
3705
3706					transition_out$4(if_blocks[previous_block_index], 1, 1, () => {
3707						if_blocks[previous_block_index] = null;
3708					});
3709
3710					check_outros$3();
3711				}
3712
3713				if (~current_block_type_index) {
3714					if_block = if_blocks[current_block_type_index];
3715
3716					if (!if_block) {
3717						if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
3718						if_block.c();
3719					} else {
3720						if_block.p(ctx, dirty);
3721					}
3722
3723					transition_in$4(if_block, 1);
3724					if_block.m(code, null);
3725				} else {
3726					if_block = null;
3727				}
3728			}
3729		},
3730		i(local) {
3731			if (current) return;
3732			transition_in$4(if_block);
3733			current = true;
3734		},
3735		o(local) {
3736			transition_out$4(if_block);
3737			current = false;
3738		},
3739		d(detaching) {
3740			if (detaching) {
3741				detach$3(code);
3742			}
3743
3744			if (~current_block_type_index) {
3745				if_blocks[current_block_type_index].d();
3746			}
3747		}
3748	};
3749}
3750
3751function create_fragment$4(ctx) {
3752	let div;
3753	let current_block_type_index;
3754	let if_block;
3755	let t;
3756	let block;
3757	let current;
3758	const if_block_creators = [create_if_block_7, create_else_block_2];
3759	const if_blocks = [];
3760
3761	function select_block_type(ctx, dirty) {
3762		if (/*named*/ ctx[6]) return 0;
3763		return 1;
3764	}
3765
3766	current_block_type_index = select_block_type(ctx);
3767	if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
3768
3769	block = new Block({
3770			props: {
3771				$$slots: { default: [create_default_slot$1] },
3772				$$scope: { ctx }
3773			}
3774		});
3775
3776	return {
3777		c() {
3778			div = element$2("div");
3779			if_block.c();
3780			t = space$2();
3781			create_component$4(block.$$.fragment);
3782			attr$2(div, "class", "container svelte-1d98qmk");
3783		},
3784		m(target, anchor) {
3785			insert$3(target, div, anchor);
3786			if_blocks[current_block_type_index].m(div, null);
3787			append$2(div, t);
3788			mount_component$4(block, div, null);
3789			current = true;
3790		},
3791		p(ctx, [dirty]) {
3792			let previous_block_index = current_block_type_index;
3793			current_block_type_index = select_block_type(ctx);
3794
3795			if (current_block_type_index === previous_block_index) {
3796				if_blocks[current_block_type_index].p(ctx, dirty);
3797			} else {
3798				group_outros$3();
3799
3800				transition_out$4(if_blocks[previous_block_index], 1, 1, () => {
3801					if_blocks[previous_block_index] = null;
3802				});
3803
3804				check_outros$3();
3805				if_block = if_blocks[current_block_type_index];
3806
3807				if (!if_block) {
3808					if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
3809					if_block.c();
3810				} else {
3811					if_block.p(ctx, dirty);
3812				}
3813
3814				transition_in$4(if_block, 1);
3815				if_block.m(div, t);
3816			}
3817
3818			const block_changes = {};
3819
3820			if (dirty & /*$$scope, python_code, dependency, endpoint_parameters, dependency_failures, dependency_index, root, current_language, js_code, js_parameters, named*/ 16778239) {
3821				block_changes.$$scope = { dirty, ctx };
3822			}
3823
3824			block.$set(block_changes);
3825		},
3826		i(local) {
3827			if (current) return;
3828			transition_in$4(if_block);
3829			transition_in$4(block.$$.fragment, local);
3830			current = true;
3831		},
3832		o(local) {
3833			transition_out$4(if_block);
3834			transition_out$4(block.$$.fragment, local);
3835			current = false;
3836		},
3837		d(detaching) {
3838			if (detaching) {
3839				detach$3(div);
3840			}
3841
3842			if_blocks[current_block_type_index].d();
3843			destroy_component$4(block);
3844		}
3845	};
3846}
3847
3848function instance$4($$self, $$props, $$invalidate) {
3849	let { dependency } = $$props;
3850	let { dependency_index } = $$props;
3851	let { root } = $$props;
3852	let { dependency_failures } = $$props;
3853	let { endpoint_parameters } = $$props;
3854	let { js_parameters } = $$props;
3855	let { named } = $$props;
3856	let { current_language } = $$props;
3857	let python_code;
3858	let js_code;
3859	let blob_components = ["Audio", "File", "Image", "Video"];
3860	let blob_examples = endpoint_parameters.filter(param => blob_components.includes(param.component));
3861
3862	function div1_binding($$value) {
3863		binding_callbacks$1[$$value ? 'unshift' : 'push'](() => {
3864			python_code = $$value;
3865			$$invalidate(8, python_code);
3866		});
3867	}
3868
3869	function div1_binding_1($$value) {
3870		binding_callbacks$1[$$value ? 'unshift' : 'push'](() => {
3871			js_code = $$value;
3872			$$invalidate(9, js_code);
3873		});
3874	}
3875
3876	$$self.$$set = $$props => {
3877		if ('dependency' in $$props) $$invali
3877date(0, dependency = $$props.dependency);
3878		if ('dependency_index' in $$props) $$invalidate(1, dependency_index = $$props.dependency_index);
3879		if ('root' in $$props) $$invalidate(2, root = $$props.root);
3880		if ('dependency_failures' in $$props) $$invalidate(3, dependency_failures = $$props.dependency_failures);
3881		if ('endpoint_parameters' in $$props) $$invalidate(4, endpoint_parameters = $$props.endpoint_parameters);
3882		if ('js_parameters' in $$props) $$invalidate(5, js_parameters = $$props.js_parameters);
3883		if ('named' in $$props) $$invalidate(6, named = $$props.named);
3884		if ('current_language' in $$props) $$invalidate(7, current_language = $$props.current_language);
3885	};
3886
3887	return [
3888		dependency,
3889		dependency_index,
3890		root,
3891		dependency_failures,
3892		endpoint_parameters,
3893		js_parameters,
3894		named,
3895		current_language,
3896		python_code,
3897		js_code,
3898		blob_components,
3899		blob_examples,
3900		div1_binding,
3901		div1_binding_1
3902	];
3903}
3904
3905class CodeSnippets extends SvelteComponent$4 {
3906	constructor(options) {
3907		super();
3908
3909		init$4(this, options, instance$4, create_fragment$4, safe_not_equal$4, {
3910			dependency: 0,
3911			dependency_index: 1,
3912			root: 2,
3913			dependency_failures: 3,
3914			endpoint_parameters: 4,
3915			js_parameters: 5,
3916			named: 6,
3917			current_language: 7
3918		});
3919	}
3920}
3921
3922const python = ""+new URL('python-20e39c92.svg', import.meta.url).href+"";
3923
3924const javascript = ""+new URL('javascript-850cf94b.svg', import.meta.url).href+"";
3925
3926const ApiDocs_svelte_svelte_type_style_lang = '';
3927
3928/* src/api_docs/ApiDocs.svelte generated by Svelte v4.2.2 */
3929const {
3930	SvelteComponent: SvelteComponent$3,
3931	append: append$1,
3932	attr: attr$1,
3933	bubble: bubble$1,
3934	check_outros: check_outros$2,
3935	create_component: create_component$3,
3936	destroy_component: destroy_component$3,
3937	destroy_each,
3938	detach: detach$2,
3939	element: element$1,
3940	empty: empty$2,
3941	ensure_array_like: ensure_array_like$1,
3942	group_outros: group_outros$2,
3943	init: init$3,
3944	insert: insert$2,
3945	listen: listen$1,
3946	mount_component: mount_component$3,
3947	safe_not_equal: safe_not_equal$3,
3948	space: space$1,
3949	src_url_equal: src_url_equal$1,
3950	text: text$1,
3951	transition_in: transition_in$3,
3952	transition_out: transition_out$3
3953} = window.__gradio__svelte__internal;
3954const { onMount: onMount$2, createEventDispatcher: createEventDispatcher$2 } = window.__gradio__svelte__internal;
3955function get_each_context$1(ctx, list, i) {
3956	const child_ctx = ctx.slice();
3957	child_ctx[18] = list[i];
3958	child_ctx[20] = i;
3959	return child_ctx;
3960}
3961
3962function get_each_context_1(ctx, list, i) {
3963	const child_ctx = ctx.slice();
3964	child_ctx[21] = list[i][0];
3965	child_ctx[22] = list[i][1];
3966	return child_ctx;
3967}
3968
3969// (103:0) {#if info}
3970function create_if_block$2(ctx) {
3971	let show_if;
3972	let current_block_type_index;
3973	let if_block;
3974	let if_block_anchor;
3975	let current;
3976	const if_block_creators = [create_if_block_1$1, create_else_block];
3977	const if_blocks = [];
3978
3979	function select_block_type(ctx, dirty) {
3980		if (dirty & /*dependencies*/ 2) show_if = null;
3981		if (show_if == null) show_if = !!/*dependencies*/ ctx[1].filter(func).length;
3982		if (show_if) return 0;
3983		return 1;
3984	}
3985
3986	current_block_type_index = select_block_type(ctx, -1);
3987	if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
3988
3989	return {
3990		c() {
3991			if_block.c();
3992			if_block_anchor = empty$2();
3993		},
3994		m(target, anchor) {
3995			if_blocks[current_block_type_index].m(target, anchor);
3996			insert$2(target, if_block_anchor, anchor);
3997			current = true;
3998		},
3999		p(ctx, dirty) {
4000			let previous_block_index = current_block_type_index;
4001			current_block_type_index = select_block_type(ctx, dirty);
4002
4003			if (current_block_type_index === previous_block_index) {
4004				if_blocks[current_block_type_index].p(ctx, dirty);
4005			} else {
4006				group_outros$2();
4007
4008				transition_out$3(if_blocks[previous_block_index], 1, 1, () => {
4009					if_blocks[previous_block_index] = null;
4010				});
4011
4012				check_outros$2();
4013				if_block = if_blocks[current_block_type_index];
4014
4015				if (!if_block) {
4016					if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
4017					if_block.c();
4018				} else {
4019					if_block.p(ctx, dirty);
4020				}
4021
4022				transition_in$3(if_block, 1);
4023				if_block.m(if_block_anchor.parentNode, if_block_anchor);
4024			}
4025		},
4026		i(local) {
4027			if (current) return;
4028			transition_in$3(if_block);
4029			current = true;
4030		},
4031		o(local) {
4032			transition_out$3(if_block);
4033			current = false;
4034		},
4035		d(detaching) {
4036			if (detaching) {
4037				detach$2(if_block_anchor);
4038			}
4039
4040			if_blocks[current_block_type_index].d(detaching);
4041		}
4042	};
4043}
4044
4045// (183:1) {:else}
4046function create_else_block(ctx) {
4047	let noapi;
4048	let current;
4049	noapi = new NoApi({ props: { root: /*root*/ ctx[0] } });
4050	noapi.$on("close", /*close_handler_1*/ ctx[12]);
4051
4052	return {
4053		c() {
4054			create_component$3(noapi.$$.fragment);
4055		},
4056		m(target, anchor) {
4057			mount_component$3(noapi, target, anchor);
4058			current = true;
4059		},
4060		p(ctx, dirty) {
4061			const noapi_changes = {};
4062			if (dirty & /*root*/ 1) noapi_changes.root = /*root*/ ctx[0];
4063			noapi.$set(noapi_changes);
4064		},
4065		i(local) {
4066			if (current) return;
4067			transition_in$3(noapi.$$.fragment, local);
4068			current = true;
4069		},
4070		o(local) {
4071			transition_out$3(noapi.$$.fragment, local);
4072			current = false;
4073		},
4074		d(detaching) {
4075			destroy_component$3(noapi, detaching);
4076		}
4077	};
4078}
4079
4080// (104:1) {#if dependencies.filter((dependency) => dependency.show_api).length}
4081function create_if_block_1$1(ctx) {
4082	let div0;
4083	let apibanner;
4084	let t0;
4085	let div4;
4086	let div1;
4087	let t6;
4088	let div3;
4089	let div2;
4090	let t7;
4091	let installsnippet;
4092	let t8;
4093	let show_if = Object.keys(/*info*/ ctx[5].named_endpoints).length;
4094	let t9;
4095	let current;
4096
4097	apibanner = new ApiBanner({
4098			props: {
4099				root: /*root*/ ctx[0],
4100				api_count: /*dependencies*/ ctx[1].filter(func_1).length
4101			}
4102		});
4103
4104	apibanner.$on("close", /*close_handler*/ ctx[10]);
4105	let each_value_1 = ensure_array_like$1(/*langs*/ ctx[7]);
4106	let each_blocks_1 = [];
4107
4108	for (let i = 0; i < each_value_1.length; i += 1) {
4109		each_blocks_1[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
4110	}
4111
4112	installsnippet = new InstallSnippet({
4113			props: {
4114				current_language: /*current_language*/ ctx[2]
4115			}
4116		});
4117
4118	let if_block = show_if && create_if_block_3$1();
4119	let each_value = ensure_array_like$1(/*dependencies*/ ctx[1]);
4120	let each_blocks = [];
4121
4122	for (let i = 0; i < each_value.length; i += 1) {
4123		each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
4124	}
4125
4126	const out = i => transition_out$3(each_blocks[i], 1, 1, () => {
4127		each_blocks[i] = null;
4128	});
4129
4130	return {
4131		c() {
4132			div0 = element$1("div");
4133			create_component$3(apibanner.$$.fragment);
4134			t0 = space$1();
4135			div4 = element$1("div");
4136			div1 = element$1("div");
4137
4138			div1.innerHTML = `<p>Use the <a href="https://gradio.app/docs/#python-client" target="_blank"><code class="library svelte-bdjvpc">gradio_client</code></a>
4139					Python library or the
4140					<a href="https://gradio.app/docs/#javascript-client" target="_blank"><code class="library svelte-bdjvpc">@gradio/client</code></a> Javascript package to query the demo via API.</p>`;
4141
4142			t6 = space$1();
4143			div3 = element$1("div");
4144			div2 = element$1("div");
4145
4146			for (let i = 0; i < each_blocks_1.length; i += 1) {
4147				each_blocks_1[i].c();
4148			}
4149
4150			t7 = space$1();
4151			create_component$3(installsnippet.$$.fragment);
4152			t8 = space$1();
4153			if (if_block) if_block.c();
4154			t9 = space$1();
4155
4156			for (let i = 0; i < each_blocks.length; i += 1) {
4157				each_blocks[i].c();
4158			}
4159
4160			attr$1(div0, "class", "banner-wrap svelte-bdjvpc");
4161			attr$1(div1, "class", "client-doc svelte-bdjvpc");
4162			attr$1(div2, "class", "snippets svelte-bdjvpc");
4163			attr$1(div3, "class", "endpoint svelte-bdjvpc");
4164			attr$1(div4, "class", "docs-wrap svelte-bdjvpc");
4165		},
4166		m(target, anchor) {
4167			insert$2(target, div0, anchor);
4168			mount_component$3(apibanner, div0, null);
4169			insert$2(target, t0, anchor);
4170			insert$2(target, div4, anchor);
4171			append$1(div4, div1);
4172			append$1(div4, t6);
4173			append$1(div4, div3);
4174			append$1(div3, div2);
4175
4176			for (let i = 0; i < each_blocks_1.length; i += 1) {
4177				if (each_blocks_1[i]) {
4178					each_blocks_1[i].m(div2, null);
4179				}
4180			}
4181
4182			append$1(div3, t7);
4183			mount_component$3(installsnippet, div3, null);
4184			append$1(div3, t8);
4185			if (if_block) if_block.m(div3, null);
4186			append$1(div3, t9);
4187
4188			for (let i = 0; i < each_blocks.length; i += 1) {
4189				if (each_blocks[i]) {
4190					each_blocks[i].m(div3, null);
4191				}
4192			}
4193
4194			current = true;
4195		},
4196		p(ctx, dirty) {
4197			const apibanner_changes = {};
4198			if (dirty & /*root*/ 1) apibanner_changes.root = /*root*/ ctx[0];
4199			if (dirty & /*dependencies*/ 2) apibanner_changes.api_count = /*dependencies*/ ctx[1].filter(func_1).length;
4200			apibanner.$set(apibanner_changes);
4201
4202			if (dirty & /*current_language, langs*/ 132) {
4203				each_value_1 = ensure_array_like$1(/*langs*/ ctx[7]);
4204				let i;
4205
4206				for (i = 0; i < each_value_1.length; i += 1) {
4207					const child_ctx = get_each_context_1(ctx, each_value_1, i);
4208
4209					if (each_blocks_1[i]) {
4210						each_blocks_1[i].p(child_ctx, dirty);
4211					} else {
4212						each_blocks_1[i] = create_each_block_1(child_ctx);
4213						each_blocks_1[i].c();
4214						each_blocks_1[i].m(div2, null);
4215					}
4216				}
4217
4218				for (; i < each_blocks_1.length; i += 1) {
4219					each_blocks_1[i].d(1);
4220				}
4221
4222				each_blocks_1.length = each_value_1.length;
4223			}
4224
4225			const installsnippet_changes = {};
4226			if (dirty & /*current_language*/ 4) installsnippet_changes.current_language = /*current_language*/ ctx[2];
4227			installsnippet.$set(installsnippet_changes);
4228			if (dirty & /*info*/ 32) show_if = Object.keys(/*info*/ ctx[5].named_endpoints).length;
4229
4230			if (show_if) {
4231				if (if_block) ; else {
4232					if_block = create_if_block_3$1();
4233					if_block.c();
4234					if_block.m(div3, t9);
4235				}
4236			} else if (if_block) {
4237				if_block.d(1);
4238				if_block = null;
4239			}
4240
4241			if (dirty & /*info, dependencies, js_info, is_running, current_language, root, dependency_failures*/ 127) {
4242				each_value = ensure_array_like$1(/*dependencies*/ ctx[1]);
4243				let i;
4244
4245				for (i = 0; i < each_value.length; i += 1) {
4246					const child_ctx = get_each_context$1(ctx, each_value, i);
4247
4248					if (each_blocks[i]) {
4249						each_blocks[i].p(child_ctx, dirty);
4250						transition_in$3(each_blocks[i], 1);
4251					} else {
4252						each_blocks[i] = create_each_block$1(child_ctx);
4253						each_blocks[i].c();
4254						transition_in$3(each_blocks[i], 1);
4255						each_blocks[i].m(div3, null);
4256					}
4257				}
4258
4259				group_outros$2();
4260
4261				for (i = each_value.length; i < each_blocks.length; i += 1) {
4262					out(i);
4263				}
4264
4265				check_outros$2();
4266			}
4267		},
4268		i(local) {
4269			if (current) return;
4270			transition_in$3(apibanner.$$.fragment, local);
4271			transition_in$3(installsnippet.$$.fragment, local);
4272
4273			for (let i = 0; i < each_value.length; i += 1) {
4274				transition_in$3(each_blocks[i]);
4275			}
4276
4277			current = true;
4278		},
4279		o(local) {
4280			transition_out$3(apibanner.$$.fragment, local);
4281			transition_out$3(installsnippet.$$.fragment, local);
4282			each_blocks = each_blocks.filter(Boolean);
4283
4284			for (let i = 0; i < each_blocks.length; i += 1) {
4285				transition_out$3(each_blocks[i]);
4286			}
4287
4288			current = false;
4289		},
4290		d(detaching) {
4291			if (detaching) {
4292				detach$2(div0);
4293				detach$2(t0);
4294				detach$2(div4);
4295			}
4296
4297			destroy_component$3(apibanner);
4298			destroy_each(each_blocks_1, detaching);
4299			destroy_component$3(installsnippet);
4300			if (if_block) if_block.d();
4301			destroy_each(each_blocks, detaching);
4302		}
4303	};
4304}
4305
4306// (128:5) {#each langs as [language, img]}
4307function create_each_block_1(ctx) {
4308	let li;
4309	let img_1;
4310	let img_1_src_value;
4311	let t0;
4312	let t1_value = /*language*/ ctx[21] + "";
4313	let t1;
4314	let t2;
4315	let li_class_value;
4316	let mounted;
4317	let dispose;
4318
4319	function click_handler() {
4320		return /*click_handler*/ ctx[11](/*language*/ ctx[21]);
4321	}
4322
4323	return {
4324		c() {
4325			li = element$1("li");
4326			img_1 = element$1("img");
4327			t0 = space$1();
4328			t1 = text$1(t1_value);
4329			t2 = space$1();
4330			if (!src_url_equal$1(img_1.src, img_1_src_value = /*img*/ ctx[22])) attr$1(img_1, "src", img_1_src_value);
4331			attr$1(img_1, "alt", "");
4332			attr$1(img_1, "class", "svelte-bdjvpc");
4333
4334			attr$1(li, "class", li_class_value = "snippet " + (/*current_language*/ ctx[2] === /*language*/ ctx[21]
4335			? 'current-lang'
4336			: 'inactive-lang') + " svelte-bdjvpc");
4337		},
4338		m(target, anchor) {
4339			insert$2(target, li, anchor);
4340			append$1(li, img_1);
4341			append$1(li, t0);
4342			append$1(li, t1);
4343			append$1(li, t2);
4344
4345			if (!mounted) {
4346				dispose = listen$1(li, "click", click_handler);
4347				mounted = true;
4348			}
4349		},
4350		p(new_ctx, dirty) {
4351			ctx = new_ctx;
4352
4353			if (dirty & /*current_language*/ 4 && li_class_value !== (li_class_value = "snippet " + (/*current_language*/ ctx[2] === /*language*/ ctx[21]
4354			? 'current-lang'
4355			: 'inactive-lang') + " svelte-bdjvpc")) {
4356				attr$1(li, "class", li_class_value);
4357			}
4358		},
4359		d(detaching) {
4360			if (detaching) {
4361				detach$2(li);
4362			}
4363
4364			mounted = false;
4365			dispose();
4366		}
4367	};
4368}
4369
4370// (141:4) {#if Object.keys(info.named_endpoints).length}
4371function create_if_block_3$1(ctx) {
4372	let h2;
4373
4374	return {
4375		c() {
4376			h2 = element$1("h2");
4377			h2.textContent = "Endpoints";
4378			attr$1(h2, "class", "header svelte-bdjvpc");
4379		},
4380		m(target, anchor) {
4381			insert$2(target, h2, anchor);
4382		},
4383		d(detaching) {
4384			if (detaching) {
4385				detach$2(h2);
4386			}
4387		}
4388	};
4389}
4390
4391// (146:5) {#if dependency.show_api}
4392function create_if_block_2$1(ctx) {
4393	let div;
4394	let codesnippets;
4395	let t0;
4396	let responseobject;
4397	let t1;
4398	let current;
4399
4400	codesnippets = new CodeSnippets({
4401			props: {
4402				named: true,
4403				endpoint_parameters: /*info*/ ctx[5].named_endpoints["/" + /*dependency*/ ctx[18].api_name].parameters,
4404				js_parameters: /*js_info*/ ctx[6].named_endpoints["/" + /*dependency*/ ctx[18].api_name].parameters,
4405				dependency: /*dependency*/ ctx[18],
4406				dependency_index: /*dependency_index*/ ctx[20],
4407				current_language: /*current_language*/ ctx[2],
4408				root: /*root*/ ctx[0],
4409				dependency_failures: /*dependency_failures*/ ctx[4]
4410			}
4411		});
4412
4413	responseobject = new ResponseObject({
4414			props: {
4415				endpoint_returns: /*info*/ ctx[5].named_endpoints["/" + /*dependency*/ ctx[18].api_name].returns,
4416				js_returns: /*js_info*/ ctx[6].named_endpoints["/" + /*dependency*/ ctx[18].api_name].returns,
4417				is_running: /*is_running*/ ctx[3],
4418				current_language: /*current_language*/ ctx[2]
4419			}
4420		});
4421
4422	return {
4423		c() {
4424			div = element$1("div");
4425			create_component$3(codesnippets.$$.fragment);
4426			t0 = space$1();
4427			create_component$3(responseobject.$$.fragment);
4428			t1 = space$1();
4429			attr$1(div, "class", "endpoint-container svelte-bdjvpc");
4430		},
4431		m(target, anchor) {
4432			insert$2(target, div, anchor);
4433			mount_component$3(codesnippets, div, null);
4434			append$1(div, t0);
4435			mount_component$3(responseobject, div, null);
4436			append$1(div, t1);
4437			current = true;
4438		},
4439		p(ctx, dirty) {
4440			const codesnippets_changes = {};
4441			if (dirty & /*info, dependencies*/ 34) codesnippets_changes.endpoint_parameters = /*info*/ ctx[5].named_endpoints["/" + /*dependency*/ ctx[18].api_name].parameters;
4442			if (dirty & /*js_info, dependencies*/ 66) codesnippets_changes.js_parameters = /*js_info*/ ctx[6].named_endpoints["/" + /*dependency*/ ctx[18].api_name].parameters;
4443			if (dirty & /*dependencies*/ 2) codesnippets_changes.dependency = /*dependency*/ ctx[18];
4444			if (dirty & /*current_language*/ 4) codesnippets_changes.current_language = /*current_language*/ ctx[2];
4445			if (dirty & /*root*/ 1) codesnippets_changes.root = /*root*/ ctx[0];
4446			if (dirty & /*dependency_failures*/ 16) codesnippets_changes.dependency_failures = /*dependency_failures*/ ctx[4];
4447			codesnippets.$set(codesnippets_changes);
4448			const responseobject_changes = {};
4449			if (dirty & /*info, dependencies*/ 34) responseobject_changes.endpoint_returns = /*info*/ ctx[5].named_endpoints["/" + /*dependency*/ ctx[18].api_name].returns;
4450			if (dirty & /*js_info, dependencies*/ 66) responseobject_changes.js_returns = /*js_info*/ ctx[6].named_endpoints["/" + /*dependency*/ ctx[18].api_name].returns;
4451			if (dirty & /*is_running*/ 8) responseobject_changes.is_running = /*is_running*/ ctx[3];
4452			if (dirty & /*current_language*/ 4) responseobject_changes.current_language = /*current_language*/ ctx[2];
4453			responseobject.$set(responseobject_changes);
4454		},
4455		i(local) {
4456			if (current) return;
4457			transition_in$3(codesnippets.$$.fragment, local);
4458			transition_in$3(responseobject.$$.fragment, local);
4459			current = true;
4460		},
4461		o(local) {
4462			transition_out$3(codesnippets.$$.fragment, local);
4463			transition_out$3(responseobject.$$.fragment, local);
4464			current = false;
4465		},
4466		d(detaching) {
4467			if (detaching) {
4468				detach$2(div);
4469			}
4470
4471			destroy_component$3(codesnippets);
4472			destroy_component$3(responseobject);
4473		}
4474	};
4475}
4476
4477// (145:4) {#each dependencies as dependency, dependency_index}
4478function create_each_block$1(ctx) {
4479	let if_block_anchor;
4480	let current;
4481	let if_block = /*dependency*/ ctx[18].show_api && create_if_block_2$1(ctx);
4482
4483	return {
4484		c() {
4485			if (if_block) if_block.c();
4486			if_block_anchor = empty$2();
4487		},
4488		m(target, anchor) {
4489			if (if_block) if_block.m(target, anchor);
4490			insert$2(target, if_block_anchor, anchor);
4491			current = true;
4492		},
4493		p(ctx, dirty) {
4494			if (/*dependency*/ ctx[18].show_api) {
4495				if (if_block) {
4496					if_block.p(ctx, dirty);
4497
4498					if (dirty & /*dependencies*/ 2) {
4499						transition_in$3(if_block, 1);
4500					}
4501				} else {
4502					if_block = create_if_block_2$1(ctx);
4503					if_block.c();
4504					transition_in$3(if_block, 1);
4505					if_block.m(if_block_anchor.parentNode, if_block_anchor);
4506				}
4507			} else if (if_block) {
4508				group_outros$2();
4509
4510				transition_out$3(if_block, 1, 1, () => {
4511					if_block = null;
4512				});
4513
4514				check_outros$2();
4515			}
4516		},
4517		i(local) {
4518			if (current) return;
4519			transition_in$3(if_block);
4520			current = true;
4521		},
4522		o(local) {
4523			transition_out$3(if_block);
4524			current = false;
4525		},
4526		d(detaching) {
4527			if (detaching) {
4528				detach$2(if_block_anchor);
4529			}
4530
4531			if (if_block) if_block.d(detaching);
4532		}
4533	};
4534}
4535
4536function create_fragment$3(ctx) {
4537	let if_block_anchor;
4538	let current;
4539	let if_block = /*info*/ ctx[5] && create_if_block$2(ctx);
4540
4541	return {
4542		c() {
4543			if (if_block) if_block.c();
4544			if_block_anchor = empty$2();
4545		},
4546		m(target, anchor) {
4547			if (if_block) if_block.m(target, anchor);
4548			insert$2(target, if_block_anchor, anchor);
4549			current = true;
4550		},
4551		p(ctx, [dirty]) {
4552			if (/*info*/ ctx[5]) {
4553				if (if_block) {
4554					if_block.p(ctx, dirty);
4555
4556					if (dirty & /*info*/ 32) {
4557						transition_in$3(if_block, 1);
4558					}
4559				} else {
4560					if_block = create_if_block$2(ctx);
4561					if_block.c();
4562					transition_in$3(if_block, 1);
4563					if_block.m(if_block_anchor.parentNode, if_block_anchor);
4564				}
4565			} else if (if_block) {
4566				group_outros$2();
4567
4568				transition_out$3(if_block, 1, 1, () => {
4569					if_block = null;
4570				});
4571
4572				check_outros$2();
4573			}
4574		},
4575		i(local) {
4576			if (current) return;
4577			transition_in$3(if_block);
4578			current = true;
4579		},
4580		o(local) {
4581			transition_out$3(if_block);
4582			current = false;
4583		},
4584		d(detaching) {
4585			if (detaching) {
4586				detach$2(if_block_anchor);
4587			}
4588
4589			if (if_block) if_block.d(detaching);
4590		}
4591	};
4592}
4593
4594const func = dependency => dependency.show_api;
4595const func_1 = dependency => dependency.show_api;
4596
4597function instance$3($$self, $$props, $$invalidate) {
4598	let { instance_map } = $$props;
4599	let { dependencies } = $$props;
4600	let { root } = $$props;
4601	let { app } = $$props;
4602
4603	if (root === "") {
4604		root = location.protocol + "//" + location.host + location.pathname;
4605	}
4606
4607	if (!root.endsWith("/")) {
4608		root += "/";
4609	}
4610
4611	let current_language = "python";
4612	const langs = [["python", python], ["javascript", javascript]];
4613	let is_running = false;
4614
4615	dependencies.map(dependency => dependency.inputs.map(_id => {
4616		let default_data = instance_map[_id].documentation?.example_data;
4617
4618		if (default_data === undefined) {
4619			default_data = "";
4620		} else if (typeof default_data === "object") {
4621			default_data = JSON.stringify(default_data);
4622		}
4623
4624		return default_data;
4625	}));
4626
4627	dependencies.map(dependency => new Array(dependency.outputs.length));
4628	let dependency_failures = dependencies.map(dependency => new Array(dependency.inputs.length).fill(false));
4629
4630	async function get_info() {
4631		let response = await fetch(root + "info");
4632		let data = await response.json();
4633		return data;
4634	}
4635
4636	async function get_js_info() {
4637		let js_api_info = await app.view_api();
4638		return js_api_info;
4639	}
4640
4641	let info;
4642	let js_info;
4643
4644	get_info().then(data => {
4645		$$invalidate(5, info = data);
4646	});
4647
4648	get_js_info().then(js_api_info => {
4649		$$invalidate(6, js_info = js_api_info);
4650	});
4651
4652	onMount$2(() => {
4653		document.body.style.overflow = "hidden";
4654
4655		if ("parentIFrame" in window) {
4656			window.parentIFrame?.scrollTo(0, 0);
4657		}
4658
4659		return () => {
4660			document.body.style.overflow = "auto";
4661		};
4662	});
4663
4664	function close_handler(event) {
4665		bubble$1.call(this, $$self, event);
4666	}
4667
4668	const click_handler = language => $$invalidate(2, current_language = language);
4669
4670	function close_handler_1(event) {
4671		bubble$1.call(this, $$self, event);
4672	}
4673
4674	$$self.$$set = $$props => {
4675		if ('instance_map' in $$props) $$invalidate(8, instance_map = $$props.instance_map);
4676		if ('dependencies' in $$props) $$invalidate(1, dependencies = $$props.dependencies);
4677		if ('root' in $$props) $$invalidate(0, root = $$props.root);
4678		if ('app' in $$props) $$invalidate(9, app = $$props.app);
4679	};
4680
4681	return [
4682		root,
4683		dependencies,
4684		current_language,
4685		is_running,
4686		dependency_failures,
4687		info,
4688		js_info,
4689		langs,
4690		instance_map,
4691		app,
4692		close_handler,
4693		click_handler,
4694		close_handler_1
4695	];
4696}
4697
4698class ApiDocs extends SvelteComponent$3 {
4699	constructor(options) {
4700		super();
4701
4702		init$3(this, options, instance$3, create_fragment$3, safe_not_equal$3, {
4703			instance_map: 8,
4704			dependencies: 1,
4705			root: 0,
4706			app: 9
4707		});
4708	}
4709}
4710
4711get_store_value($format);
4712class Gradio {
4713  #id;
4714  #el;
4715  constructor(id, el, theme, version, root, autoscroll) {
4716    this.#id = id;
4717    this.theme = theme;
4718    this.version = version;
4719    this.#el = el;
4720    this.i18n = get_store_value($format);
4721    this.root = root;
4722    this.autoscroll = autoscroll;
4723  }
4724  dispatch(event_name, data) {
4725    const e = new CustomEvent("gradio", {
4726      bubbles: true,
4727      detail: { data, id: this.#id, event: event_name }
4728    });
4729    this.#el.dispatchEvent(e);
4730  }
4731}
4732
4733/* src/Render.svelte generated by Svelte v4.2.2 */
4734const {
4735	SvelteComponent: SvelteComponent$2,
4736	add_flush_callback,
4737	assign,
4738	bind,
4739	binding_callbacks,
4740	bubble,
4741	check_outros: check_outros$1,
4742	construct_svelte_component,
4743	create_component: create_component$2,
4744	destroy_component: destroy_component$2,
4745	detach: detach$1,
4746	empty: empty$1,
4747	ensure_array_like,
4748	get_spread_object,
4749	get_spread_update,
4750	group_outros: group_outros$1,
4751	init: init$2,
4752	insert: insert$1,
4753	mount_component: mount_component$2,
4754	outro_and_destroy_block,
4755	safe_not_equal: safe_not_equal$2,
4756	transition_in: transition_in$2,
4757	transition_out: transition_out$2,
4758	update_keyed_each
4759} = window.__gradio__svelte__internal;const { onMount: onMount$1, createEventDispatcher: createEventDispatcher$1, setContext } = window.__gradio__svelte__internal;
4760function get_each_context(ctx, list, i) {
4761	const child_ctx = ctx.slice();
4762	child_ctx[10] = list[i].component;
4763	child_ctx[19] = list[i].id;
4764	child_ctx[2] = list[i].props;
4765	child_ctx[20] = list[i].children;
4766	child_ctx[21] = list[i].has_modes;
4767	return child_ctx;
4768}
4769
4770// (69:1) {#if children && children.length}
4771function create_if_block$1(ctx) {
4772	let each_blocks = [];
4773	let each_1_lookup = new Map();
4774	let each_1_anchor;
4775	let current;
4776	let each_value = ensure_array_like(/*children*/ ctx[1]);
4777	const get_key = ctx => /*each_id*/ ctx[19];
4778
4779	for (let i = 0; i < each_value.length; i += 1) {
4780		let child_ctx = get_each_context(ctx, each_value, i);
4781		let key = get_key(child_ctx);
4782		each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
4783	}
4784
4785	return {
4786		c() {
4787			for (let i = 0; i < each_blocks.length; i += 1) {
4788				each_blocks[i].c();
4789			}
4790
4791			each_1_anchor = empty$1();
4792		},
4793		m(target, anchor) {
4794			for (let i = 0; i < each_blocks.length; i += 1) {
4795				if (each_blocks[i]) {
4796					each_blocks[i].m(target, anchor);
4797				}
4798			}
4799
4800			insert$1(target, each_1_anchor, anchor);
4801			current = true;
4802		},
4803		p(ctx, dirty) {
4804			if (dirty & /*children, target, root, instance_map, dynamic_ids, theme_mode*/ 235) {
4805				each_value = ensure_array_like(/*children*/ ctx[1]);
4806				group_outros$1();
4807				each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, each_1_anchor.parentNode, outro_and_destroy_block, create_each_block, each_1_anchor, get_each_context);
4808				check_outros$1();
4809			}
4810		},
4811		i(local) {
4812			if (current) return;
4813
4814			for (let i = 0; i < each_value.length; i += 1) {
4815				transition_in$2(each_blocks[i]);
4816			}
4817
4818			current = true;
4819		},
4820		o(local) {
4821			for (let i = 0; i < each_blocks.length; i += 1) {
4822				transition_out$2(each_blocks[i]);
4823			}
4824
4825			current = false;
4826		},
4827		d(detaching) {
4828			if (detaching) {
4829				detach$1(each_1_anchor);
4830			}
4831
4832			for (let i = 0; i < each_blocks.length; i += 1) {
4833				each_blocks[i].d(detaching);
4834			}
4835		}
4836	};
4837}
4838
4839// (70:2) {#each children as { component, id: each_id, props, children: _children, has_modes }
4840function create_each_block(key_1, ctx) {
4841	let first;
4842	let render;
4843	let current;
4844
4845	render = new Render({
4846			props: {
4847				component: /*component*/ ctx[10],
4848				target: /*target*/ ctx[6],
4849				id: /*each_id*/ ctx[19],
4850				props: /*props*/ ctx[2],
4851				root: /*root*/ ctx[3],
4852				instance_map: /*instance_map*/ ctx[0],
4853				children: /*_children*/ ctx[20],
4854				dynamic_ids: /*dynamic_ids*/ ctx[5],
4855				has_modes: /*has_modes*/ ctx[21],
4856				theme_mode: /*theme_mode*/ ctx[7]
4857			}
4858		});
4859
4860	render.$on("destroy", /*destroy_handler*/ ctx[13]);
4861	render.$on("mount", /*mount_handler*/ ctx[14]);
4862
4863	return {
4864		key: key_1,
4865		first: null,
4866		c() {
4867			first = empty$1();
4868			create_component$2(render.$$.fragment);
4869			this.first = first;
4870		},
4871		m(target, anchor) {
4872			insert$1(target, first, anchor);
4873			mount_component$2(render, target, anchor);
4874			current = true;
4875		},
4876		p(new_ctx, dirty) {
4877			ctx = new_ctx;
4878			const render_changes = {};
4879			if (dirty & /*children*/ 2) render_changes.component = /*component*/ ctx[10];
4880			if (dirty & /*target*/ 64) render_changes.target = /*target*/ ctx[6];
4881			if (dirty & /*children*/ 2) render_changes.id = /*each_id*/ ctx[19];
4882			if (dirty & /*children*/ 2) render_changes.props = /*props*/ ctx[2];
4883			if (dirty & /*root*/ 8) render_changes.root = /*root*/ ctx[3];
4884			if (dirty & /*instance_map*/ 1) render_changes.instance_map = /*instance_map*/ ctx[0];
4885			if (dirty & /*children*/ 2) render_changes.children = /*_children*/ ctx[20];
4886			if (dirty & /*dynamic_ids*/ 32) render_changes.dynamic_ids = /*dynamic_ids*/ ctx[5];
4887			if (dirty & /*children*/ 2) render_changes.has_modes = /*has_modes*/ ctx[21];
4888			if (dirty & /*theme_mode*/ 128) render_changes.theme_mode = /*theme_mode*/ ctx[7];
4889			render.$set(render_changes);
4890		},
4891		i(local) {
4892			if (current) return;
4893			transition_in$2(render.$$.fragment, local);
4894			current = true;
4895		},
4896		o(local) {
4897			transition_out$2(render.$$.fragment, local);
4898			current = false;
4899		},
4900		d(detaching) {
4901			if (detaching) {
4902				detach$1(first);
4903			}
4904
4905			destroy_component$2(render, detaching);
4906		}
4907	};
4908}
4909
4910// (56:0) <svelte:component  this={component}  bind:this={instance_map[id].instance}  bind:value={instance_map[id].props.value}  elem_id={("elem_id" in props && props.elem_id) || `component-${id}`}  elem_classes={("elem_classes" in props && props.elem_classes) || []}  on:prop_change={handle_prop_change}  {target}  {...props}  {theme_mode}  {root}  gradio={new Gradio(id, target, theme_mode, version, root, autoscroll)} >
4911function create_default_slot(ctx) {
4912	let if_block_anchor;
4913	let current;
4914	let if_block = /*children*/ ctx[1] && /*children*/ ctx[1].length && create_if_block$1(ctx);
4915
4916	return {
4917		c() {
4918			if (if_block) if_block.c();
4919			if_block_anchor = empty$1();
4920		},
4921		m(target, anchor) {
4922			if (if_block) if_block.m(target, anchor);
4923			insert$1(target, if_block_anchor, anchor);
4924			current = true;
4925		},
4926		p(ctx, dirty) {
4927			if (/*children*/ ctx[1] && /*children*/ ctx[1].length) {
4928				if (if_block) {
4929					if_block.p(ctx, dirty);
4930
4931					if (dirty & /*children*/ 2) {
4932						transition_in$2(if_block, 1);
4933					}
4934				} else {
4935					if_block = create_if_block$1(ctx);
4936					if_block.c();
4937					transition_in$2(if_block, 1);
4938					if_block.m(if_block_anchor.parentNode, if_block_anchor);
4939				}
4940			} else if (if_block) {
4941				group_outros$1();
4942
4943				transition_out$2(if_block, 1, 1, () => {
4944					if_block = null;
4945				});
4946
4947				check_outros$1();
4948			}
4949		},
4950		i(local) {
4951			if (current) return;
4952			transition_in$2(if_block);
4953			current = true;
4954		},
4955		o(local) {
4956			transition_out$2(if_block);
4957			current = false;
4958		},
4959		d(detaching) {
4960			if (detaching) {
4961				detach$1(if_block_anchor);
4962			}
4963
4964			if (if_block) if_block.d(detaching);
4965		}
4966	};
4967}
4968
4969function create_fragment$2(ctx) {
4970	let switch_instance;
4971	let updating_value;
4972	let switch_instance_anchor;
4973	let current;
4974
4975	const switch_instance_spread_levels = [
4976		{
4977			elem_id: "elem_id" in /*props*/ ctx[2] && /*props*/ ctx[2].elem_id || `component-${/*id*/ ctx[4]}`
4978		},
4979		{
4980			elem_classes: "elem_classes" in /*props*/ ctx[2] && /*props*/ ctx[2].elem_classes || []
4981		},
4982		{ target: /*target*/ ctx[6] },
4983		/*props*/ ctx[2],
4984		{ theme_mode: /*theme_mode*/ ctx[7] },
4985		{ root: /*root*/ ctx[3] },
4986		{
4987			gradio: new Gradio(/*id*/ ctx[4], /*target*/ ctx[6], /*theme_mode*/ ctx[7], /*version*/ ctx[8], /*root*/ ctx[3], /*autoscroll*/ ctx[9])
4988		}
4989	];
4990
4991	function switch_instance_value_binding(value) {
4992		/*switch_instance_value_binding*/ ctx[16](value);
4993	}
4994
4995	var switch_value = /*component*/ ctx[10];
4996
4997	function switch_props(ctx, dirty) {
4998		let switch_instance_props = {
4999			$$slots: { default: [create_default_slot] },
5000			$$scope: { ctx }
5001		};
5002
5003		if (dirty !== undefined && dirty & /*props, id, target, theme_mode, root, version, autoscroll*/ 988) {
5004			switch_instance_props = get_spread_update(switch_instance_spread_levels, [
5005				dirty & /*props, id*/ 20 && {
5006					elem_id: "elem_id" in /*props*/ ctx[2] && /*props*/ ctx[2].elem_id || `component-${/*id*/ ctx[4]}`
5007				},
5008				dirty & /*props*/ 4 && {
5009					elem_classes: "elem_classes" in /*props*/ ctx[2] && /*props*/ ctx[2].elem_classes || []
5010				},
5011				dirty & /*target*/ 64 && { target: /*target*/ ctx[6] },
5012				dirty & /*props*/ 4 && get_spread_object(/*props*/ ctx[2]),
5013				dirty & /*theme_mode*/ 128 && { theme_mode: /*theme_mode*/ ctx[7] },
5014				dirty & /*root*/ 8 && { root: /*root*/ ctx[3] },
5015				dirty & /*id, target, theme_mode, version, root, autoscroll*/ 984 && {
5016					gradio: new Gradio(/*id*/ ctx[4], /*target*/ ctx[6], /*theme_mode*/ ctx[7], /*version*/ ctx[8], /*root*/ ctx[3], /*autoscroll*/ ctx[9])
5017				}
5018			]);
5019		} else {
5020			for (let i = 0; i < switch_instance_spread_levels.length; i += 1) {
5021				switch_instance_props = assign(switch_instance_props, switch_instance_spread_levels[i]);
5022			}
5023		}
5024
5025		if (/*instance_map*/ ctx[0][/*id*/ ctx[4]].props.value !== void 0) {
5026			switch_instance_props.value = /*instance_map*/ ctx[0][/*id*/ ctx[4]].props.value;
5027		}
5028
5029		return { props: switch_instance_props };
5030	}
5031
5032	if (switch_value) {
5033		switch_instance = construct_svelte_component(switch_value, switch_props(ctx));
5034		/*switch_instance_binding*/ ctx[15](switch_instance);
5035		binding_callbacks.push(() => bind(switch_instance, 'value', switch_instance_value_binding));
5036		switch_instance.$on("prop_change", /*handle_prop_change*/ ctx[11]);
5037	}
5038
5039	return {
5040		c() {
5041			if (switch_instance) create_component$2(switch_instance.$$.fragment);
5042			switch_instance_anchor = empty$1();
5043		},
5044		m(target, anchor) {
5045			if (switch_instance) mount_component$2(switch_instance, target, anchor);
5046			insert$1(target, switch_instance_anchor, anchor);
5047			current = true;
5048		},
5049		p(ctx, [dirty]) {
5050			if (dirty & /*component*/ 1024 && switch_value !== (switch_value = /*component*/ ctx[10])) {
5051				if (switch_instance) {
5052					group_outros$1();
5053					const old_component = switch_instance;
5054
5055					transition_out$2(old_component.$$.fragment, 1, 0, () => {
5056						destroy_component$2(old_component, 1);
5057					});
5058
5059					check_outros$1();
5060				}
5061
5062				if (switch_value) {
5063					switch_instance = construct_svelte_component(switch_value, switch_props(ctx, dirty));
5064					/*switch_instance_binding*/ ctx[15](switch_instance);
5065					binding_callbacks.push(() => bind(switch_instance, 'value', switch_instance_value_binding));
5066					switch_instance.$on("prop_change", /*handle_prop_change*/ ctx[11]);
5067					create_component$2(switch_instance.$$.fragment);
5068					transition_in$2(switch_instance.$$.fragment, 1);
5069					mount_component$2(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
5070				} else {
5071					switch_instance = null;
5072				}
5073			} else if (switch_value) {
5074				const switch_instance_changes = (dirty & /*props, id, target, theme_mode, root, version, autoscroll*/ 988)
5075				? get_spread_update(switch_instance_spread_levels, [
5076						dirty & /*props, id*/ 20 && {
5077							elem_id: "elem_id" in /*props*/ ctx[2] && /*props*/ ctx[2].elem_id || `component-${/*id*/ ctx[4]}`
5078						},
5079						dirty & /*props*/ 4 && {
5080							elem_classes: "elem_classes" in /*props*/ ctx[2] && /*props*/ ctx[2].elem_classes || []
5081						},
5082						dirty & /*target*/ 64 && { target: /*target*/ ctx[6] },
5083						dirty & /*props*/ 4 && get_spread_object(/*props*/ ctx[2]),
5084						dirty & /*theme_mode*/ 128 && { theme_mode: /*theme_mode*/ ctx[7] },
5085						dirty & /*root*/ 8 && { root: /*root*/ ctx[3] },
5086						dirty & /*id, target, theme_mode, version, root, autoscroll*/ 984 && {
5087							gradio: new Gradio(/*id*/ ctx[4], /*target*/ ctx[6], /*theme_mode*/ ctx[7], /*version*/ ctx[8], /*root*/ ctx[3], /*autoscroll*/ ctx[9])
5088						}
5089					])
5090				: {};
5091
5092				if (dirty & /*$$scope, children, target, root, instance_map, dynamic_ids, theme_mode*/ 16777451) {
5093					switch_instance_changes.$$scope = { dirty, ctx };
5094				}
5095
5096				if (!updating_value && dirty & /*instance_map, id*/ 17) {
5097					updating_value = true;
5098					switch_instance_changes.value = /*instance_map*/ ctx[0][/*id
5098*/ ctx[4]].props.value;
5099					add_flush_callback(() => updating_value = false);
5100				}
5101
5102				switch_instance.$set(switch_instance_changes);
5103			}
5104		},
5105		i(local) {
5106			if (current) return;
5107			if (switch_instance) transition_in$2(switch_instance.$$.fragment, local);
5108			current = true;
5109		},
5110		o(local) {
5111			if (switch_instance) transition_out$2(switch_instance.$$.fragment, local);
5112			current = false;
5113		},
5114		d(detaching) {
5115			if (detaching) {
5116				detach$1(switch_instance_anchor);
5117			}
5118
5119			/*switch_instance_binding*/ ctx[15](null);
5120			if (switch_instance) destroy_component$2(switch_instance, detaching);
5121		}
5122	};
5123}
5124
5125function instance$2($$self, $$props, $$invalidate) {
5126	let { root } = $$props;
5127	let { component } = $$props;
5128	let { instance_map } = $$props;
5129	let { id } = $$props;
5130	let { props } = $$props;
5131	let { children } = $$props;
5132	let { dynamic_ids } = $$props;
5133	let { parent = null } = $$props;
5134	let { target } = $$props;
5135	let { theme_mode } = $$props;
5136	let { version } = $$props;
5137	let { autoscroll } = $$props;
5138	const dispatch = createEventDispatcher$1();
5139	let filtered_children = [];
5140
5141	onMount$1(() => {
5142		dispatch("mount", id);
5143
5144		for (const child of filtered_children) {
5145			dispatch("mount", child.id);
5146		}
5147
5148		return () => {
5149			dispatch("destroy", id);
5150
5151			for (const child of filtered_children) {
5152				dispatch("mount", child.id);
5153			}
5154		};
5155	});
5156
5157	setContext("BLOCK_KEY", parent);
5158
5159	function handle_prop_change(e) {
5160		for (const k in e.detail) {
5161			$$invalidate(0, instance_map[id].props[k] = e.detail[k], instance_map);
5162		}
5163	}
5164
5165	function destroy_handler(event) {
5166		bubble.call(this, $$self, event);
5167	}
5168
5169	function mount_handler(event) {
5170		bubble.call(this, $$self, event);
5171	}
5172
5173	function switch_instance_binding($$value) {
5174		binding_callbacks[$$value ? 'unshift' : 'push'](() => {
5175			instance_map[id].instance = $$value;
5176			$$invalidate(0, instance_map);
5177		});
5178	}
5179
5180	function switch_instance_value_binding(value) {
5181		if ($$self.$$.not_equal(instance_map[id].props.value, value)) {
5182			instance_map[id].props.value = value;
5183			$$invalidate(0, instance_map);
5184		}
5185	}
5186
5187	$$self.$$set = $$props => {
5188		if ('root' in $$props) $$invalidate(3, root = $$props.root);
5189		if ('component' in $$props) $$invalidate(10, component = $$props.component);
5190		if ('instance_map' in $$props) $$invalidate(0, instance_map = $$props.instance_map);
5191		if ('id' in $$props) $$invalidate(4, id = $$props.id);
5192		if ('props' in $$props) $$invalidate(2, props = $$props.props);
5193		if ('children' in $$props) $$invalidate(1, children = $$props.children);
5194		if ('dynamic_ids' in $$props) $$invalidate(5, dynamic_ids = $$props.dynamic_ids);
5195		if ('parent' in $$props) $$invalidate(12, parent = $$props.parent);
5196		if ('target' in $$props) $$invalidate(6, target = $$props.target);
5197		if ('theme_mode' in $$props) $$invalidate(7, theme_mode = $$props.theme_mode);
5198		if ('version' in $$props) $$invalidate(8, version = $$props.version);
5199		if ('autoscroll' in $$props) $$invalidate(9, autoscroll = $$props.autoscroll);
5200	};
5201
5202	$$self.$$.update = () => {
5203		if ($$self.$$.dirty & /*children, instance_map*/ 3) {
5204			$$invalidate(1, children = children && children.filter(v => {
5205				const valid_node = instance_map[v.id].type !== "statustracker";
5206
5207				if (!valid_node) {
5208					filtered_children.push(v);
5209				}
5210
5211				return valid_node;
5212			}));
5213		}
5214
5215		if ($$self.$$.dirty & /*instance_map, id, children*/ 19) {
5216			{
5217				if (instance_map[id].type === "form") {
5218					if (children?.every(c => !c.props.visible)) {
5219						$$invalidate(2, props.visible = false, props);
5220					} else {
5221						$$invalidate(2, props.visible = true, props);
5222					}
5223				}
5224			}
5225		}
5226	};
5227
5228	return [
5229		instance_map,
5230		children,
5231		props,
5232		root,
5233		id,
5234		dynamic_ids,
5235		target,
5236		theme_mode,
5237		version,
5238		autoscroll,
5239		component,
5240		handle_prop_change,
5241		parent,
5242		destroy_handler,
5243		mount_handler,
5244		switch_instance_binding,
5245		switch_instance_value_binding
5246	];
5247}
5248
5249class Render extends SvelteComponent$2 {
5250	constructor(options) {
5251		super();
5252
5253		init$2(this, options, instance$2, create_fragment$2, safe_not_equal$2, {
5254			root: 3,
5255			component: 10,
5256			instance_map: 0,
5257			id: 4,
5258			props: 2,
5259			children: 1,
5260			dynamic_ids: 5,
5261			parent: 12,
5262			target: 6,
5263			theme_mode: 7,
5264			version: 8,
5265			autoscroll: 9
5266		});
5267	}
5268}
5269
5270/* src/MountComponents.svelte generated by Svelte v4.2.2 */
5271const {
5272	SvelteComponent: SvelteComponent$1,
5273	create_component: create_component$1,
5274	destroy_component: destroy_component$1,
5275	init: init$1,
5276	mount_component: mount_component$1,
5277	safe_not_equal: safe_not_equal$1,
5278	transition_in: transition_in$1,
5279	transition_out: transition_out$1
5280} = window.__gradio__svelte__internal;
5281const { onMount, createEventDispatcher } = window.__gradio__svelte__internal;
5282function create_fragment$1(ctx) {
5283	let render;
5284	let current;
5285
5286	render = new Render({
5287			props: {
5288				component: /*rootNode*/ ctx[0].component,
5289				id: /*rootNode*/ ctx[0].id,
5290				props: /*rootNode*/ ctx[0].props,
5291				children: /*rootNode*/ ctx[0].children,
5292				dynamic_ids: /*dynamic_ids*/ ctx[1],
5293				instance_map: /*instance_map*/ ctx[2],
5294				root: /*root*/ ctx[3],
5295				target: /*target*/ ctx[4],
5296				theme_mode: /*theme_mode*/ ctx[5],
5297				version: /*version*/ ctx[6],
5298				autoscroll: /*autoscroll*/ ctx[7]
5299			}
5300		});
5301
5302	return {
5303		c() {
5304			create_component$1(render.$$.fragment);
5305		},
5306		m(target, anchor) {
5307			mount_component$1(render, target, anchor);
5308			current = true;
5309		},
5310		p(ctx, [dirty]) {
5311			const render_changes = {};
5312			if (dirty & /*rootNode*/ 1) render_changes.component = /*rootNode*/ ctx[0].component;
5313			if (dirty & /*rootNode*/ 1) render_changes.id = /*rootNode*/ ctx[0].id;
5314			if (dirty & /*rootNode*/ 1) render_changes.props = /*rootNode*/ ctx[0].props;
5315			if (dirty & /*rootNode*/ 1) render_changes.children = /*rootNode*/ ctx[0].children;
5316			if (dirty & /*dynamic_ids*/ 2) render_changes.dynamic_ids = /*dynamic_ids*/ ctx[1];
5317			if (dirty & /*instance_map*/ 4) render_changes.instance_map = /*instance_map*/ ctx[2];
5318			if (dirty & /*root*/ 8) render_changes.root = /*root*/ ctx[3];
5319			if (dirty & /*target*/ 16) render_changes.target = /*target*/ ctx[4];
5320			if (dirty & /*theme_mode*/ 32) render_changes.theme_mode = /*theme_mode*/ ctx[5];
5321			if (dirty & /*version*/ 64) render_changes.version = /*version*/ ctx[6];
5322			if (dirty & /*autoscroll*/ 128) render_changes.autoscroll = /*autoscroll*/ ctx[7];
5323			render.$set(render_changes);
5324		},
5325		i(local) {
5326			if (current) return;
5327			transition_in$1(render.$$.fragment, local);
5328			current = true;
5329		},
5330		o(local) {
5331			transition_out$1(render.$$.fragment, local);
5332			current = false;
5333		},
5334		d(detaching) {
5335			destroy_component$1(render, detaching);
5336		}
5337	};
5338}
5339
5340function instance$1($$self, $$props, $$invalidate) {
5341	let { rootNode } = $$props;
5342	let { dynamic_ids } = $$props;
5343	let { instance_map } = $$props;
5344	let { root } = $$props;
5345	let { target } = $$props;
5346	let { theme_mode } = $$props;
5347	let { version } = $$props;
5348	let { autoscroll } = $$props;
5349	const dispatch = createEventDispatcher();
5350
5351	onMount(() => {
5352		dispatch("mount");
5353	});
5354
5355	$$self.$$set = $$props => {
5356		if ('rootNode' in $$props) $$invalidate(0, rootNode = $$props.rootNode);
5357		if ('dynamic_ids' in $$props) $$invalidate(1, dynamic_ids = $$props.dynamic_ids);
5358		if ('instance_map' in $$props) $$invalidate(2, instance_map = $$props.instance_map);
5359		if ('root' in $$props) $$invalidate(3, root = $$props.root);
5360		if ('target' in $$props) $$invalidate(4, target = $$props.target);
5361		if ('theme_mode' in $$props) $$invalidate(5, theme_mode = $$props.theme_mode);
5362		if ('version' in $$props) $$invalidate(6, version = $$props.version);
5363		if ('autoscroll' in $$props) $$invalidate(7, autoscroll = $$props.autoscroll);
5364	};
5365
5366	return [
5367		rootNode,
5368		dynamic_ids,
5369		instance_map,
5370		root,
5371		target,
5372		theme_mode,
5373		version,
5374		autoscroll
5375	];
5376}
5377
5378class MountComponents extends SvelteComponent$1 {
5379	constructor(options) {
5380		super();
5381
5382		init$1(this, options, instance$1, create_fragment$1, safe_not_equal$1, {
5383			rootNode: 0,
5384			dynamic_ids: 1,
5385			instance_map: 2,
5386			root: 3,
5387			target: 4,
5388			theme_mode: 5,
5389			version: 6,
5390			autoscroll: 7
5391		});
5392	}
5393}
5394
5395const logo = ""+new URL('logo-3707f936.svg', import.meta.url).href+"";
5396
5397const Blocks_svelte_svelte_type_style_lang = '';
5398
5399/* src/Blocks.svelte generated by Svelte v4.2.2 */
5400const {
5401	SvelteComponent,
5402	append,
5403	attr,
5404	check_outros,
5405	component_subscribe,
5406	create_component,
5407	destroy_component,
5408	detach,
5409	element,
5410	empty,
5411	globals,
5412	group_outros,
5413	init,
5414	insert,
5415	listen,
5416	mount_component,
5417	noop,
5418	safe_not_equal,
5419	set_data,
5420	set_style,
5421	space,
5422	src_url_equal,
5423	subscribe,
5424	text,
5425	transition_in,
5426	transition_out
5427} = window.__gradio__svelte__internal;
5428const { document: document_1 } = globals;
5429const { tick } = window.__gradio__svelte__internal;
5430function create_if_block_6(ctx) {
5431	document_1.title = /*title*/ ctx[3];
5432	return { c: noop, m: noop, d: noop };
5433}
5434
5435// (531:1) {#if analytics_enabled}
5436function create_if_block_5(ctx) {
5437	let script0;
5438	let script0_src_value;
5439	let t0;
5440	let script1;
5441
5442	return {
5443		c() {
5444			script0 = element("script");
5445			script0.innerHTML = ``;
5446			t0 = space();
5447			script1 = element("script");
5448			script1.textContent = "window.dataLayer = window.dataLayer || [];\n\t\t\tfunction gtag() {\n\t\t\t\tdataLayer.push(arguments);\n\t\t\t}\n\t\t\tgtag(\"js\", new Date());\n\t\t\tgtag(\"config\", \"UA-156449732-1\", {\n\t\t\t\tcookie_flags: \"samesite=none;secure\"\n\t\t\t});";
5449			script0.async = true;
5450			script0.defer = true;
5451			if (!src_url_equal(script0.src, script0_src_value = "https://www.googletagmanager.com/gtag/js?id=UA-156449732-1")) attr(script0, "src", script0_src_value);
5452		},
5453		m(target, anchor) {
5454			insert(target, script0, anchor);
5455			insert(target, t0, anchor);
5456			insert(target, script1, anchor);
5457		},
5458		d(detaching) {
5459			if (detaching) {
5460				detach(script0);
5461				detach(t0);
5462				detach(script1);
5463			}
5464		}
5465	};
5466}
5467
5468// (552:2) {#if ready}
5469function create_if_block_4(ctx) {
5470	let mountcomponents;
5471	let current;
5472
5473	mountcomponents = new MountComponents({
5474			props: {
5475				rootNode: /*rootNode*/ ctx[15],
5476				dynamic_ids: /*dynamic_ids*/ ctx[17],
5477				instance_map: /*instance_map*/ ctx[18],
5478				root: /*root*/ ctx[1],
5479				target: /*target*/ ctx[5],
5480				theme_mode: /*theme_mode*/ ctx[11],
5481				version: /*version*/ ctx[13],
5482				autoscroll: /*autoscroll*/ ctx[6]
5483			}
5484		});
5485
5486	mountcomponents.$on("mount", /*handle_mount*/ ctx[23]);
5487	mountcomponents.$on("destroy", /*destroy_handler*/ ctx[31]);
5488
5489	return {
5490		c() {
5491			create_component(mountcomponents.$$.fragment);
5492		},
5493		m(target, anchor) {
5494			mount_component(mountcomponents, target, anchor);
5495			current = true;
5496		},
5497		p(ctx, dirty) {
5498			const mountcomponents_changes = {};
5499			if (dirty[0] & /*rootNode*/ 32768) mountcomponents_changes.rootNode = /*rootNode*/ ctx[15];
5500			if (dirty[0] & /*dynamic_ids*/ 131072) mountcomponents_changes.dynamic_ids = /*dynamic_ids*/ ctx[17];
5501			if (dirty[0] & /*instance_map*/ 262144) mountcomponents_changes.instance_map = /*instance_map*/ ctx[18];
5502			if (dirty[0] & /*root*/ 2) mountcomponents_changes.root = /*root*/ ctx[1];
5503			if (dirty[0] & /*target*/ 32) mountcomponents_changes.target = /*target*/ ctx[5];
5504			if (dirty[0] & /*theme_mode*/ 2048) mountcomponents_changes.theme_mode = /*theme_mode*/ ctx[11];
5505			if (dirty[0] & /*version*/ 8192) mountcomponents_changes.version = /*version*/ ctx[13];
5506			if (dirty[0] & /*autoscroll*/ 64) mountcomponents_changes.autoscroll = /*autoscroll*/ ctx[6];
5507			mountcomponents.$set(mountcomponents_changes);
5508		},
5509		i(local) {
5510			if (current) return;
5511			transition_in(mountcomponents.$$.fragment, local);
5512			current = true;
5513		},
5514		o(local) {
5515			transition_out(mountcomponents.$$.fragment, local);
5516			current = false;
5517		},
5518		d(detaching) {
5519			destroy_component(mountcomponents, detaching);
5520		}
5521	};
5522}
5523
5524// (568:1) {#if show_footer}
5525function create_if_block_2(ctx) {
5526	let footer;
5527	let t0;
5528	let a;
5529	let t1_value = /*$_*/ ctx[20]("common.built_with_gradio") + "";
5530	let t1;
5531	let t2;
5532	let img;
5533	let img_src_value;
5534	let img_alt_value;
5535	let if_block = /*show_api*/ ctx[7] && create_if_block_3(ctx);
5536
5537	return {
5538		c() {
5539			footer = element("footer");
5540			if (if_block) if_block.c();
5541			t0 = space();
5542			a = element("a");
5543			t1 = text(t1_value);
5544			t2 = space();
5545			img = element("img");
5546			if (!src_url_equal(img.src, img_src_value = logo)) attr(img, "src", img_src_value);
5547			attr(img, "alt", img_alt_value = /*$_*/ ctx[20]("common.logo"));
5548			attr(img, "class", "svelte-mpyp5e");
5549			attr(a, "href", "https://gradio.app");
5550			attr(a, "class", "built-with svelte-mpyp5e");
5551			attr(a, "target", "_blank");
5552			attr(a, "rel", "noreferrer");
5553			attr(footer, "class", "svelte-mpyp5e");
5554		},
5555		m(target, anchor) {
5556			insert(target, footer, anchor);
5557			if (if_block) if_block.m(footer, null);
5558			append(footer, t0);
5559			append(footer, a);
5560			append(a, t1);
5561			append(a, t2);
5562			append(a, img);
5563		},
5564		p(ctx, dirty) {
5565			if (/*show_api*/ ctx[7]) {
5566				if (if_block) {
5567					if_block.p(ctx, dirty);
5568				} else {
5569					if_block = create_if_block_3(ctx);
5570					if_block.c();
5571					if_block.m(footer, t0);
5572				}
5573			} else if (if_block) {
5574				if_block.d(1);
5575				if_block = null;
5576			}
5577
5578			if (dirty[0] & /*$_*/ 1048576 && t1_value !== (t1_value = /*$_*/ ctx[20]("common.built_with_gradio") + "")) set_data(t1, t1_value);
5579
5580			if (dirty[0] & /*$_*/ 1048576 && img_alt_value !== (img_alt_value = /*$_*/ ctx[20]("common.logo"))) {
5581				attr(img, "alt", img_alt_value);
5582			}
5583		},
5584		d(detaching) {
5585			if (detaching) {
5586				detach(footer);
5587			}
5588
5589			if (if_block) if_block.d();
5590		}
5591	};
5592}
5593
5594// (570:3) {#if show_api}
5595function create_if_block_3(ctx) {
5596	let button;
5597	let t0_value = /*$_*/ ctx[20]("errors.use_via_api") + "";
5598	let t0;
5599	let t1;
5600	let img;
5601	let img_src_value;
5602	let img_alt_value;
5603	let t2;
5604	let div;
5605	let mounted;
5606	let dispose;
5607
5608	return {
5609		c() {
5610			button = element("button");
5611			t0 = text(t0_value);
5612			t1 = space();
5613			img = element("img");
5614			t2 = space();
5615			div = element("div");
5616			div.textContent = "·";
5617			if (!src_url_equal(img.src, img_src_value = api_logo)) attr(img, "src", img_src_value);
5618			attr(img, "alt", img_alt_value = /*$_*/ ctx[20]("common.logo"));
5619			attr(img, "class", "svelte-mpyp5e");
5620			attr(button, "class", "show-api svelte-mpyp5e");
5621			attr(div, "class", "svelte-mpyp5e");
5622		},
5623		m(target, anchor) {
5624			insert(target, button, anchor);
5625			append(button, t0);
5626			append(button, t1);
5627			append(button, img);
5628			insert(target, t2, anchor);
5629			insert(target, div, anchor);
5630
5631			if (!mounted) {
5632				dispose = listen(button, "click", /*click_handler*/ ctx[32]);
5633				mounted = true;
5634			}
5635		},
5636		p(ctx, dirty) {
5637			if (dirty[0] & /*$_*/ 1048576 && t0_value !== (t0_value = /*$_*/ ctx[20]("errors.use_via_api") + "")) set_data(t0, t0_value);
5638
5639			if (dirty[0] & /*$_*/ 1048576 && img_alt_value !== (img_alt_value = /*$_*/ ctx[20]("common.logo"))) {
5640				attr(img, "alt", img_alt_value);
5641			}
5642		},
5643		d(detaching) {
5644			if (detaching) {
5645				detach(button);
5646				detach(t2);
5647				detach(div);
5648			}
5649
5650			mounted = false;
5651			dispose();
5652		}
5653	};
5654}
5655
5656// (595:0) {#if api_docs_visible && ready}
5657function create_if_block_1(ctx) {
5658	let div2;
5659	let div0;
5660	let t;
5661	let div1;
5662	let apidocs;
5663	let current;
5664	let mounted;
5665	let dispose;
5666
5667	apidocs = new ApiDocs({
5668			props: {
5669				instance_map: /*instance_map*/ ctx[18],
5670				dependencies: /*dependencies*/ ctx[2],
5671				root: /*root*/ ctx[1],
5672				app: /*app*/ ctx[12]
5673			}
5674		});
5675
5676	apidocs.$on("close", /*close_handler*/ ctx[34]);
5677
5678	return {
5679		c() {
5680			div2 = element("div");
5681			div0 = element("div");
5682			t = space();
5683			div1 = element("div");
5684			create_component(apidocs.$$.fragment);
5685			attr(div0, "class", "backdrop svelte-mpyp5e");
5686			attr(div1, "class", "api-docs-wrap svelte-mpyp5e");
5687			attr(div2, "class", "api-docs svelte-mpyp5e");
5688		},
5689		m(target, anchor) {
5690			insert(target, div2, anchor);
5691			append(div2, div0);
5692			append(div2, t);
5693			append(div2, div1);
5694			mount_component(apidocs, div1, null);
5695			current = true;
5696
5697			if (!mounted) {
5698				dispose = listen(div0, "click", /*click_handler_1*/ ctx[33]);
5699				mounted = true;
5700			}
5701		},
5702		p(ctx, dirty) {
5703			const apidocs_changes = {};
5704			if (dirty[0] & /*instance_map*/ 262144) apidocs_changes.instance_map = /*instance_map*/ ctx[18];
5705			if (dirty[0] & /*dependencies*/ 4) apidocs_changes.dependencies = /*dependencies*/ ctx[2];
5706			if (dirty[0] & /*root*/ 2) apidocs_changes.root = /*root*/ ctx[1];
5707			if (dirty[0] & /*app*/ 4096) apidocs_changes.app = /*app*/ ctx[12];
5708			apidocs.$set(apidocs_changes);
5709		},
5710		i(local) {
5711			if (current) return;
5712			transition_in(apidocs.$$.fragment, local);
5713			current = true;
5714		},
5715		o(local) {
5716			transition_out(apidocs.$$.fragment, local);
5717			current = false;
5718		},
5719		d(detaching) {
5720			if (detaching) {
5721				detach(div2);
5722			}
5723
5724			destroy_component(apidocs);
5725			mounted = false;
5726			dispose();
5727		}
5728	};
5729}
5730
5731// (620:0) {#if messages}
5732function create_if_block(ctx) {
5733	let toast;
5734	let current;
5735
5736	toast = new Toast({
5737			props: { messages: /*messages*/ ctx[19] }
5738		});
5739
5740	toast.$on("close", /*handle_error_close*/ ctx[22]);
5741
5742	return {
5743		c() {
5744			create_component(toast.$$.fragment);
5745		},
5746		m(target, anchor) {
5747			mount_component(toast, target, anchor);
5748			current = true;
5749		},
5750		p(ctx, dirty) {
5751			const toast_changes = {};
5752			if (dirty[0] & /*messages*/ 524288) toast_changes.messages = /*messages*/ ctx[19];
5753			toast.$set(toast_changes);
5754		},
5755		i(local) {
5756			if (current) return;
5757			transition_in(toast.$$.fragment, local);
5758			current = true;
5759		},
5760		o(local) {
5761			transition_out(toast.$$.fragment, local);
5762			current = false;
5763		},
5764		d(detaching) {
5765			destroy_component(toast, detaching);
5766		}
5767	};
5768}
5769
5770function create_fragment(ctx) {
5771	let if_block0_anchor;
5772	let if_block1_anchor;
5773	let t0;
5774	let div1;
5775	let div0;
5776	let t1;
5777	let t2;
5778	let t3;
5779	let if_block5_anchor;
5780	let current;
5781	let if_block0 = /*control_page_title*/ ctx[9] && create_if_block_6(ctx);
5782	let if_block1 = /*analytics_enabled*/ ctx[4] && create_if_block_5();
5783	let if_block2 = /*ready*/ ctx[0] && create_if_block_4(ctx);
5784	let if_block3 = /*show_footer*/ ctx[8] && create_if_block_2(ctx);
5785	let if_block4 = /*api_docs_visible*/ ctx[16] && /*ready*/ ctx[0] && create_if_block_1(ctx);
5786	let if_block5 = /*messages*/ ctx[19] && create_if_block(ctx);
5787
5788	return {
5789		c() {
5790			if (if_block0) if_block0.c();
5791			if_block0_anchor = empty();
5792			if (if_block1) if_block1.c();
5793			if_block1_anchor = empty();
5794			t0 = space();
5795			div1 = element("div");
5796			div0 = element("div");
5797			if (if_block2) if_block2.c();
5798			t1 = space();
5799			if (if_block3) if_block3.c();
5800			t2 = space();
5801			if (if_block4) if_block4.c();
5802			t3 = space();
5803			if (if_block5) if_block5.c();
5804			if_block5_anchor = empty();
5805			attr(div0, "class", "contain");
5806			set_style(div0, "flex-grow", /*app_mode*/ ctx[10] ? "1" : "auto");
5807			attr(div1, "class", "wrap svelte-mpyp5e");
5808			set_style(div1, "min-height", /*app_mode*/ ctx[10] ? "100%" : "auto");
5809		},
5810		m(target, anchor) {
5811			if (if_block0) if_block0.m(document_1.head, null);
5812			append(document_1.head, if_block0_anchor);
5813			if (if_block1) if_block1.m(document_1.head, null);
5814			append(document_1.head, if_block1_anchor);
5815			insert(target, t0, anchor);
5816			insert(target, div1, anchor);
5817			append(div1, div0);
5818			if (if_block2) if_block2.m(div0, null);
5819			append(div1, t1);
5820			if (if_block3) if_block3.m(div1, null);
5821			insert(target, t2, anchor);
5822			if (if_block4) if_block4.m(target, anchor);
5823			insert(target, t3, anchor);
5824			if (if_block5) if_block5.m(target, anchor);
5825			insert(target, if_block5_anchor, anchor);
5826			current = true;
5827		},
5828		p(ctx, dirty) {
5829			if (/*control_page_title*/ ctx[9]) {
5830				if (if_block0) ; else {
5831					if_block0 = create_if_block_6(ctx);
5832					if_block0.c();
5833					if_block0.m(if_block0_anchor.parentNode, if_block0_anchor);
5834				}
5835			} else if (if_block0) {
5836				if_block0.d(1);
5837				if_block0 = null;
5838			}
5839
5840			if (/*analytics_enabled*/ ctx[4]) {
5841				if (if_block1) ; else {
5842					if_block1 = create_if_block_5();
5843					if_block1.c();
5844					if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
5845				}
5846			} else if (if_block1) {
5847				if_block1.d(1);
5848				if_block1 = null;
5849			}
5850
5851			if (/*ready*/ ctx[0]) {
5852				if (if_block2) {
5853					if_block2.p(ctx, dirty);
5854
5855					if (dirty[0] & /*ready*/ 1) {
5856						transition_in(if_block2, 1);
5857					}
5858				} else {
5859					if_block2 = create_if_block_4(ctx);
5860					if_block2.c();
5861					transition_in(if_block2, 1);
5862					if_block2.m(div0, null);
5863				}
5864			} else if (if_block2) {
5865				group_outros();
5866
5867				transition_out(if_block2, 1, 1, () => {
5868					if_block2 = null;
5869				});
5870
5871				check_outros();
5872			}
5873
5874			if (dirty[0] & /*app_mode*/ 1024) {
5875				set_style(div0, "flex-grow", /*app_mode*/ ctx[10] ? "1" : "auto");
5876			}
5877
5878			if (/*show_footer*/ ctx[8]) {
5879				if (if_block3) {
5880					if_block3.p(ctx, dirty);
5881				} else {
5882					if_block3 = create_if_block_2(ctx);
5883					if_block3.c();
5884					if_block3.m(div1, null);
5885				}
5886			} else if (if_block3) {
5887				if_block3.d(1);
5888				if_block3 = null;
5889			}
5890
5891			if (dirty[0] & /*app_mode*/ 1024) {
5892				set_style(div1, "min-height", /*app_mode*/ ctx[10] ? "100%" : "auto");
5893			}
5894
5895			if (/*api_docs_visible*/ ctx[16] && /*ready*/ ctx[0]) {
5896				if (if_block4) {
5897					if_block4.p(ctx, dirty);
5898
5899					if (dirty[0] & /*api_docs_visible, ready*/ 65537) {
5900						transition_in(if_block4, 1);
5901					}
5902				} else {
5903					if_block4 = create_if_block_1(ctx);
5904					if_block4.c();
5905					transition_in(if_block4, 1);
5906					if_block4.m(t3.parentNode, t3);
5907				}
5908			} else if (if_block4) {
5909				group_outros();
5910
5911				transition_out(if_block4, 1, 1, () => {
5912					if_block4 = null;
5913				});
5914
5915				check_outros();
5916			}
5917
5918			if (/*messages*/ ctx[19]) {
5919				if (if_block5) {
5920					if_block5.p(ctx, dirty);
5921
5922					if (dirty[0] & /*messages*/ 524288) {
5923						transition_in(if_block5, 1);
5924					}
5925				} else {
5926					if_block5 = create_if_block(ctx);
5927					if_block5.c();
5928					transition_in(if_block5, 1);
5929					if_block5.m(if_block5_anchor.parentNode, if_block5_anchor);
5930				}
5931			} else if (if_block5) {
5932				group_outros();
5933
5934				transition_out(if_block5, 1, 1, () => {
5935					if_block5 = null;
5936				});
5937
5938				check_outros();
5939			}
5940		},
5941		i(local) {
5942			if (current) return;
5943			transition_in(if_block2);
5944			transition_in(if_block4);
5945			transition_in(if_block5);
5946			current = true;
5947		},
5948		o(local) {
5949			transition_out(if_block2);
5950			transition_out(if_block4);
5951			transition_out(if_block5);
5952			current = false;
5953		},
5954		d(detaching) {
5955			if (detaching) {
5956				detach(t0);
5957				detach(div1);
5958				detach(t2);
5959				detach(t3);
5960				detach(if_block5_anchor);
5961			}
5962
5963			if (if_block0) if_block0.d(detaching);
5964			detach(if_block0_anchor);
5965			if (if_block1) if_block1.d(detaching);
5966			detach(if_block1_anchor);
5967			if (if_block2) if_block2.d();
5968			if (if_block3) if_block3.d();
5969			if (if_block4) if_block4.d(detaching);
5970			if (if_block5) if_block5.d(detaching);
5971		}
5972	};
5973}
5974
5975const MESSAGE_QUOTE_RE = /^'([^]+)'$/;
5976const SHOW_DUPLICATE_MESSAGE_ON_ETA = 15;
5977const SHOW_MOBILE_QUEUE_WARNING_ON_ETA = 10;
5978
5979function is_dep(id, type, deps) {
5980	for (const dep of deps) {
5981		for (const dep_item of dep[type]) {
5982			if (dep_item === id) return true;
5983		}
5984	}
5985
5986	return false;
5987}
5988
5989function has_no_default_value(value) {
5990	return Array.isArray(value) && value.length === 0 || value === "" || value === 0 || !value;
5991}
5992
5993function get_data(comp) {
5994	if (comp.instance.get_value) {
5995		return comp.instance.get_value();
5996	}
5997
5998	return comp.props.value;
5999}
6000
6001function isCustomEvent(event) {
6002	return "detail" in event;
6003}
6004
6005function instance($$self, $$props, $$invalidate) {
6006	let $loading_status,
6007		$$unsubscribe_loading_status = noop,
6008		$$subscribe_loading_status = () => ($$unsubscribe_loading_status(), $$unsubscribe_loading_status = subscribe(loading_status, $$value => $$invalidate(30, $loading_status = $$value)), loading_status);
6009
6010	let $_;
6011	component_subscribe($$self, $format, $$value => $$invalidate(20, $_ = $$value));
6012	$$self.$$.on_destroy.push(() => $$unsubscribe_loading_status());
6013	setupi18n();
6014	let { root } = $$props;
6015	let { components } = $$props;
6016	let { layout } = $$props;
6017	let { dependencies } = $$props;
6018	let { title = "Gradio" } = $$props;
6019	let { analytics_enabled = false } = $$props;
6020	let { target } = $$props;
6021	let { autoscroll } = $$props;
6022	let { show_api = true } = $$props;
6023	let { show_footer = true } = $$props;
6024	let { control_page_title = false } = $$props;
6025	let { app_mode } = $$props;
6026	let { theme_mode } = $$props;
6027	let { app } = $$props;
6028	let { space_id } = $$props;
6029	let { version } = $$props;
6030	let { js } = $$props;
6031	let loading_status = create_loading_status_store();
6032	$$subscribe_loading_status();
6033
6034	let rootNode = {
6035		id: layout.id,
6036		type: "column",
6037		props: { interactive: false },
6038		has_modes: false,
6039		instance: null,
6040		component: null,
6041		component_class_id: ""
6042	};
6043
6044	const AsyncFunction = Object.getPrototypeOf(async function () {
6045		
6046	}).constructor;
6047
6048	dependencies.forEach(d => {
6049		if (d.js) {
6050			const wrap = d.backend_fn
6051			? d.inputs.length === 1
6052			: d.outputs.length === 1;
6053
6054			try {
6055				d.frontend_fn = new AsyncFunction("__fn_args",
6056				`let result = await (${d.js})(...__fn_args);
6057					return (${wrap} && !Array.isArray(result)) ? [result] : result;`);
6058			} catch(e) {
6059				console.error("Could not parse custom js method.");
6060				console.error(e);
6061			}
6062		}
6063	});
6064
6065	let params = new URLSearchParams(window.location.search);
6066	let api_docs_visible = params.get("view") === "api" && show_api;
6067
6068	function set_api_docs_visible(visible) {
6069		$$invalidate(16, api_docs_visible = visible);
6070		let params = new URLSearchParams(window.location.search);
6071
6072		if (visible) {
6073			params.set("view", "api");
6074		} else {
6075			params.delete("view");
6076		}
6077
6078		history.replaceState(null, "", "?" + params.toString());
6079	}
6080
6081	let dynamic_ids = new Set();
6082	let instance_map;
6083
6084	async function walk_layout(node, type_map, instance_map, component_map) {
6085		$$invalidate(0, ready = false);
6086		let instance = instance_map[node.id];
6087		const _component = (await component_map.get(`${instance.type}_${type_map.get(node.id) || "false"}`)).component;
6088		instance.component = _component.default;
6089
6090		if (node.children) {
6091			instance.children = node.children.map(v => instance_map[v.id]);
6092			await Promise.all(node.children.map(v => walk_layout(v, type_map, instance_map, component_map)));
6093		}
6094	}
6095
6096	let { ready = false } = $$props;
6097	let { render_complete = false } = $$props;
6098	let target_map = {};
6099
6100	function prepare_components() {
6101		target_map = dependencies.reduce(
6102			(acc, dep, i) => {
6103				dep.targets.forEach(([id, trigger]) => {
6104					if (!acc[id]) {
6105						acc[id] = {};
6106					}
6107
6108					if (acc[id]?.[trigger]) {
6109						acc[id][trigger].push(i);
6110					} else {
6111						acc[id][trigger] = [i];
6112					}
6113				});
6114
6115				return acc;
6116			},
6117			{}
6118		);
6119
6120		$$subscribe_loading_status($$invalidate(14, loading_status = create_loading_status_store()));
6121
6122		dependencies.forEach((v, i) => {
6123			loading_status.register(i, v.inputs, v.outputs);
6124		});
6125
6126		const _dynamic_ids = new Set();
6127
6128		for (const comp of components) {
6129			const { id, props } = comp;
6130			const is_input = is_dep(id, "inputs", dependencies);
6131
6132			if (is_input || !is_dep(id, "outputs", dependencies) && has_no_default_value(props?.value)) {
6133				_dynamic_ids.add(id);
6134			}
6135		}
6136
6137		$$invalidate(17, dynamic_ids = _dynamic_ids);
6138
6139		const _rootNode = {
6140			id: layout.id,
6141			type: "column",
6142			props: { interactive: false },
6143			has_modes: false,
6144			instance: null,
6145			component: null,
6146			component_class_id: ""
6147		};
6148
6149		components.push(_rootNode);
6150		const _component_set = new Set();
6151		const __component_map = new Map();
6152		const __type_for_id = new Map();
6153
6154		const _instance_map = components.reduce(
6155			(acc, next) => {
6156				acc[next.id] = next;
6157				return acc;
6158			},
6159			{}
6160		);
6161
6162		components.forEach(c => {
6163			if (c.props.interactive === false) {
6164				c.props.interactive = false;
6165			} else if (c.props.interactive === true) {
6166				c.props.interactive = true;
6167			} else if (dynamic_ids.has(c.id)) {
6168				c.props.interactive = true;
6169			} else {
6170				c.props.interactive = false;
6171			}
6172
6173			if (c.props.server_fns) {
6174				let server = {};
6175
6176				c.props.server_fns.forEach(fn => {
6177					server[fn] = async (...args) => {
6178						if (args.length === 1) {
6179							args = args[0];
6180						}
6181
6182						const result = await app.component_server(c.id, fn, args);
6183						return result;
6184					};
6185				});
6186
6187				c.props.server = server;
6188			}
6189
6190			if (target_map[c.id]) {
6191				c.props.attached_events = Object.keys(target_map[c.id]);
6192			}
6193
6194			__type_for_id.set(c.id, c.props.interactive);
6195
6196			if (c.type === "dataset") {
6197				const example_component_map = new Map();
6198
6199				c.props.components.forEach(name => {
6200					if (example_component_map.has(name)) {
6201						return;
6202					}
6203
6204					let _c;
6205					const matching_component = components.find(c => c.type === name);
6206
6207					if (matching_component) {
6208						_c = load_component({
6209							api_url: root,
6210							name,
6211							id: matching_component.component_class_id,
6212							variant: "example"
6213						});
6214
6215						example_component_map.set(name, _c);
6216					}
6217				});
6218
6219				c.props.component_map = example_component_map;
6220			}
6221
6222			// maybe load custom
6223			const _c = load_component({
6224				api_url: root,
6225				name: c.type,
6226				id: c.component_class_id,
6227				variant: "component"
6228			});
6229
6230			_component_set.add(_c);
6231			__component_map.set(`${c.type}_${c.props.interactive}`, _c);
6232		});
6233
6234		Promise.all(Array.from(_component_set)).then(() => {
6235			walk_layout(layout, __type_for_id, _instance_map, __component_map).then(async () => {
6236				$$invalidate(0, ready = true);
6237				$$invalidate(18, instance_map = _instance_map);
6238				$$invalidate(15, rootNode = _rootNode);
6239			}).catch(e => {
6240				console.error(e);
6241			});
6242		});
6243	}
6244
6245	async function handle_update(data, fn_index, outputs_set_to_non_interactive) {
6246		const outputs = dependencies[fn_index].outputs;
6247
6248		data?.forEach((value, i) => {
6249			const output = instance_map[outputs[i]];
6250			output.props.value_is_output = true;
6251		});
6252
6253		$$invalidate(15, rootNode);
6254		await tick();
6255
6256		data?.forEach((value, i) => {
6257			const output = instance_map[outputs[i]];
6258
6259			if (typeof value === "object" && value !== null && value.__type__ === "update") {
6260				for (const [update_key, update_value] of Object.entries(value)) {
6261					if (update_key === "__type__") {
6262						continue;
6263					} else {
6264						output.props[update_key] = update_value;
6265
6266						if (update_key == "interactive" && !update_value) {
6267							outputs_set_to_non_interactive.push(outputs[i]);
6268						}
6269					}
6270				}
6271			} else {
6272				output.props.value = value;
6273			}
6274		});
6275
6276		$$invalidate(15, rootNode);
6277	}
6278
6279	let submit_map = new Map();
6280
6281	function set_prop(obj, prop, val) {
6282		if (!obj?.props) {
6283			// @ts-ignore
6284			obj.props = {};
6285		}
6286
6287		obj.props[prop] = val;
6288		$$invalidate(15, rootNode);
6289	}
6290
6291	let handled_dependencies = [];
6292	let messages = [];
6293
6294	function new_message(message, fn_index, type) {
6295		return { message, fn_index, type, id: ++_error_id };
6296	}
6297
6298	let _error_id = -1;
6299	let user_left_page = false;
6300
6301	document.addEventListener("visibilitychange", function () {
6302		if (document.visibilityState === "hidden") {
6303			user_left_page = true;
6304		}
6305	});
6306
6307	const DUPLICATE_MESSAGE = $_("blocks.long_requests_queue");
6308	const MOBILE_QUEUE_WARNING = $_("blocks.connection_can_break");
6309	const MOBILE_RECONNECT_MESSAGE = $_("blocks.lost_connection");
6310	const is_mobile_device = (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent);
6311	let showed_duplicate_message = false;
6312	let showed_mobile_warning = false;
6313
6314	async function trigger_api_call(dep_index, trigger_id = null, event_data = null) {
6315		let dep = dependencies[dep_index];
6316		const current_status = loading_status.get_status_for_fn(dep_index);
6317		$$invalidate(19, messages = messages.filter(({ fn_index }) => fn_index !== dep_index));
6318
6319		if (dep.cancels) {
6320			await Promise.all(dep.cancels.map(async fn_index => {
6321				const submission = submit_map.get(fn_index);
6322				submission?.cancel();
6323				return submission;
6324			}));
6325		}
6326
6327		if (current_status === "pending" || current_status === "generating") {
6328			dep.pending_request = true;
6329		}
6330
6331		let payload = {
6332			fn_index: dep_index,
6333			data: await Promise.all(dep.inputs.map(id => get_data(instance_map[id]))),
6334			event_data: dep.collects_event_data ? event_data : null,
6335			trigger_id
6336		};
6337
6338		if (dep.frontend_fn) {
6339			dep.frontend_fn(payload.data.concat(await Promise.all(dep.inputs.map(id => get_data(instance_map[id]))))).then(v => {
6340				if (dep.backend_fn) {
6341					payload.data = v;
6342					make_prediction(payload);
6343				} else {
6344					handle_update(v, dep_index, []);
6345				}
6346			});
6347		} else {
6348			if (dep.backend_fn) {
6349				if (dep.trigger_mode === "once") {
6350					if (!dep.pending_request) make_prediction(payload);
6351				} else if (dep.trigger_mode === "multiple") {
6352					make_prediction(payload);
6353				} else if (dep.trigger_mode === "always_last") {
6354					if (!dep.pending_request) {
6355						make_prediction(payload);
6356					} else {
6357						dep.final_event = payload;
6358					}
6359				}
6360			}
6361		}
6362
6363		function make_prediction(payload) {
6364			const pending_outputs = [];
6365			let outputs_set_to_non_interactive = [];
6366
6367			const submission = app.submit(payload.fn_index, payload.data, payload.event_data, payload.trigger_id).on("data", ({ data, fn_index }) => {
6368				if (dep.pending_request && dep.final_event) {
6369					dep.pending_request = false;
6370					make_prediction(dep.final_event);
6371				}
6372
6373				dep.pending_request = false;
6374				handle_update(data, fn_index, outputs_set_to_non_interactive);
6375			}).on("status", ({ fn_index, ...status }) => {
6376				tick().then(() => {
6377					const outputs = dependencies[fn_index].outputs;
6378
6379					outputs.forEach(id => {
6380						if (instance_map[id].props.interactive && status.stage === "pending" && dep.targets[0][1] !== "focus") {
6381							pending_outputs.push(id);
6382							$$invalidate(18, instance_map[id].props.interactive = false, instance_map);
6383						} else if (status.stage === "complete" && pending_outputs.includes(id) && !outputs_set_to_non_interactive.includes(id)) {
6384							$$invalidate(18, instance_map[id].props.interactive = true, instance_map);
6385						}
6386					});
6387
6388					//@ts-ignore
6389					loading_status.update({
6390						...status,
6391						status: status.stage,
6392						progress: status.progress_data,
6393						fn_index
6394					});
6395
6396					if (!showed_duplicate_message && space_id !== null && status.position !== undefined && status.position >= 2 && status.eta !== undefined && status.eta > SHOW_DUPLICATE_MESSAGE_ON_ETA) {
6397						showed_duplicate_message = true;
6398						$$invalidate(19, messages = [new_message(DUPLICATE_MESSAGE, fn_index, "warning"), ...messages]);
6399					}
6400
6401					if (!showed_mobile_warning && is_mobile_device && status.eta !== undefined && status.eta > SHOW_MOBILE_QUEUE_WARNING_ON_ETA) {
6402						showed_mobile_warning = true;
6403						$$invalidate(19, messages = [new_message(MOBILE_QUEUE_WARNING, fn_index, "warning"), ...messages]);
6404					}
6405
6406					if (status.stage === "complete") {
6407						dependencies.map(async (dep, i) => {
6408							if (dep.trigger_after === fn_index) {
6409								trigger_api_call(i, payload.trigger_id);
6410							}
6411						});
6412
6413						submission.destroy();
6414					}
6415
6416					if (status.broken && is_mobile_device && user_left_page) {
6417						window.setTimeout(
6418							() => {
6419								$$invalidate(19, messages = [
6420									new_message(MOBILE_RECONNECT_MESSAGE, fn_index, "error"),
6421									...messages
6422								]);
6423							},
6424							0
6425						);
6426
6427						trigger_api_call(dep_index, payload.trigger_id, event_data);
6428						user_left_page = false;
6429					} else if (status.stage === "error") {
6430						if (status.message) {
6431							const _message = status.message.replace(MESSAGE_QUOTE_RE, (_, b) => b);
6432							$$invalidate(19, messages = [new_message(_message, fn_index, "error"), ...messages]);
6433						}
6434
6435						dependencies.map(async (dep, i) => {
6436							if (dep.trigger_after === fn_index && !dep.trigger_only_on_success) {
6437								trigger_api_call(i, payload.trigger_id);
6438							}
6439						});
6440
6441						submission.destroy();
6442					}
6443				});
6444			}).on("log", ({ log, fn_index, level }) => {
6445				$$invalidate(19, messages = [new_message(log, fn_index, level), ...messages]);
6446			});
6447
6448			submit_map.set(dep_index, submission);
6449		}
6450	}
6451
6452	function trigger_share(title, description) {
6453		if (space_id === null) {
6454			return;
6455		}
6456
6457		const discussion_url = new URL(`https://huggingface.co/spaces/${space_id}/discussions/new`);
6458
6459		if (title !== undefined && title.length > 0) {
6460			discussion_url.searchParams.set("title", title);
6461		}
6462
6463		discussion_url.searchParams.set("description", description);
6464		window.open(discussion_url.toString(), "_blank");
6465	}
6466
6467	function handle_error_close(e) {
6468		const _id = e.detail;
6469		$$invalidate(19, messages = messages.filter(m => m.id !== _id));
6470	}
6471
6472	const is_external_url = link => !!(link && new URL(link, location.href).origin !== location.origin);
6473
6474	async function handle_mount() {
6475		if (js) {
6476			let blocks_frontend_fn = new AsyncFunction(`let result = await (${js})();
6477					return (!Array.isArray(result)) ? [result] : result;`);
6478
6479			blocks_frontend_fn();
6480		}
6481
6482		await tick();
6483		var a = target.getElementsByTagName("a");
6484
6485		for (var i = 0; i < a.length; i++) {
6486			const _target = a[i].getAttribute("target");
6487			const _link = a[i].getAttribute("href");
6488
6489			// only target anchor tags with external links
6490			if (is_external_url(_link) && _target !== "_blank") a[i].setAttribute("target", "_blank");
6491		}
6492
6493		// handle load triggers
6494		dependencies.forEach((dep, i) => {
6495			if (dep.targets[0][1] === "load") {
6496				trigger_api_call(i);
6497			}
6498		});
6499
6500		target.addEventListener("gradio", e => {
6501			if (!isCustomEvent(e)) throw new Error("not a custom event");
6502			const { id, event, data } = e.detail;
6503
6504			if (event === "share") {
6505				const { title, description } = data;
6506				trigger_share(title, description);
6507			} else if (event === "error" || event === "warning") {
6508				$$invalidate(19, messages = [new_message(data, -1, event), ...messages]);
6509			} else {
6510				const deps = target_map[id]?.[event];
6511
6512				deps?.forEach(dep_id => {
6513					trigger_api_call(dep_id, id, data);
6514				});
6515			}
6516		});
6517
6518		$$invalidate(25, render_complete = true);
6519	}
6520
6521	function handle_destroy(id) {
6522		handled_dependencies = handled_dependencies.map(dep => {
6523			return dep.filter(_id => _id !== id);
6524		});
6525	}
6526
6527	function set_status(statuses) {
6528		for (const id in statuses) {
6529			let loading_status = statuses[id];
6530			let dependency = dependencies[loading_status.fn_index];
6531			loading_status.scroll_to_output = dependency.scroll_to_output;
6532			loading_status.show_progress = dependency.show_progress;
6533			set_prop(instance_map[id], "loading_status", loading_status);
6534		}
6535
6536		const inputs_to_update = loading_status.get_inputs_to_update();
6537
6538		for (const [id, pending_status] of inputs_to_update) {
6539			set_prop(instance_map[id], "pending", pending_status === "pending");
6540		}
6541	}
6542
6543	const destroy_handler = ({ detail }) => handle_destroy(detail);
6544
6545	const click_handler = () => {
6546		set_api_docs_visible(!api_docs_visible);
6547	};
6548
6549	const click_handler_1 = () => {
6550		set_api_docs_visible(false);
6551	};
6552
6553	const close_handler = () => {
6554		set_api_docs_visible(false);
6555	};
6556
6557	$$self.$$set = $$props => {
6558		if ('root' in $$props) $$invalidate(1, root = $$props.root);
6559		if ('components' in $$props) $$invalidate(26, components = $$props.components);
6560		if ('layout' in $$props) $$invalidate(27, layout = $$props.layout);
6561		if ('dependencies' in $$props) $$invalidate(2, dependencies = $$props.dependencies);
6562		if ('title' in $$props) $$invalidate(3, title = $$props.title);
6563		if ('analytics_enabled' in $$props) $$invalidate(4, analytics_enabled = $$props.analytics_enabled);
6564		if ('target' in $$props) $$invalidate(5, target = $$props.target);
6565		if ('autoscroll' in $$props) $$invalidate(6, autoscroll = $$props.autoscroll);
6566		if ('show_api' in $$props) $$invalidate(7, show_api = $$props.show_api);
6567		if ('show_footer' in $$props) $$invalidate(8, show_footer = $$props.show_footer);
6568		if ('control_page_title' in $$props) $$invalidate(9, control_page_title = $$props.control_page_title);
6569		if ('app_mode' in $$props) $$invalidate(10, app_mode = $$props.app_mode);
6570		if ('theme_mode' in $$props) $$invalidate(11, theme_mode = $$props.theme_mode);
6571		if ('app' in $$props) $$invalidate(12, app = $$props.app);
6572		if ('space_id' in $$props) $$invalidate(28, space_id = $$props.space_id);
6573		if ('version' in $$props) $$invalidate(13, version = $$props.version);
6574		if ('js' in $$props) $$invalidate(29, js = $$props.js);
6575		if ('ready' in $$props) $$invalidate(0, ready = $$props.ready);
6576		if ('render_complete' in $$props) $$invalidate(25, render_complete = $$props.render_complete);
6577	};
6578
6579	$$self.$$.update = () => {
6580		if ($$self.$$.dirty[0] & /*components, layout*/ 201326592) {
6581			(prepare_components());
6582		}
6583
6584		if ($$self.$$.dirty[0] & /*$loading_status*/ 1073741824) {
6585			set_status($loading_status);
6586		}
6587	};
6588
6589	return [
6590		ready,
6591		root,
6592		dependencies,
6593		title,
6594		analytics_enabled,
6595		target,
6596		autoscroll,
6597		show_api,
6598		show_footer,
6599		control_page_title,
6600		app_mode,
6601		theme_mode,
6602		app,
6603		version,
6604		loading_status,
6605		rootNode,
6606		api_docs_visible,
6607		dynamic_ids,
6608		instance_map,
6609		messages,
6610		$_,
6611		set_api_docs_visible,
6612		handle_error_close,
6613		handle_mount,
6614		handle_destroy,
6615		render_complete,
6616		components,
6617		layout,
6618		space_id,
6619		js,
6620		$loading_status,
6621		destroy_handler,
6622		click_handler,
6623		click_handler_1,
6624		close_handler
6625	];
6626}
6627
6628class Blocks extends SvelteComponent {
6629	constructor(options) {
6630		super();
6631
6632		init(
6633			this,
6634			options,
6635			instance,
6636			create_fragment,
6637			safe_not_equal,
6638			{
6639				root: 1,
6640				components: 26,
6641				layout: 27,
6642				dependencies: 2,
6643				title: 3,
6644				analytics_enabled: 4,
6645				target: 5,
6646				autoscroll: 6,
6647				show_api: 7,
6648				show_footer: 8,
6649				control_page_title: 9,
6650				app_mode: 10,
6651				theme_mode: 11,
6652				app: 12,
6653				space_id: 28,
6654				version: 13,
6655				js: 29,
6656				ready: 0,
6657				render_complete: 25
6658			},
6659			null,
6660			[-1, -1]
6661		);
6662	}
6663}
6664
6665const Blocks$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
6666	__proto__: null,
6667	default: Blocks
6668}, Symbol.toStringTag, { value: 'Module' }));
6669
6670export { Blocks$1 as B, Toast as T };
6671//# sourceMappingURL=Blocks-d58f6fa6.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.