PageSourceSearch

https://merve-chatgpt-prompt-generator.hf.space/assets/Index-5ce61445.js

js merve-chatgpt-prompt-generator.hf.space collected 2026-10-03 10:22:04 UTC 30,076 bytes, 1,109 lines download raw bytes

1import { I as ImageUploader, S as StaticImage } from './ImageUploader-1337d0c5.js';
2export { W as Webcam } from './ImageUploader-1337d0c5.js';
3import { B as Block } from './Button-f2ef1e3f.js';
4import { E as Empty } from './Empty-27f3e442.js';
5import { S as Static } from './Index-f4e7a341.js';
6import { I as Image } from './Image-6cbf81d1.js';
7import { U as UploadText } from './UploadText-78b5a93a.js';
8import { n as normalise_file } from './index-546f83db.js';
9export { I as BaseImage } from './Image-5414ffe6.js';
10export { default as BaseExample } from './Example-1767698a.js';
11import './utils-8f25e669.js';
12import './BlockLabel-b0ab52e0.js';
13import './IconButton-b1f250d1.js';
14import './ShareButton-c254ab08.js';
15import './DownloadLink-3c2b99a1.js';
16import './file-url-c18a1f7c.js';
17import './SelectSource-85b10638.js';
18import './Upload-96564545.js';
19import './DropdownArrow-04b836e1.js';
20import './ModifyUpload.svelte_svelte_type_style_lang-6f675b46.js';
21import './svelte/svelte.js';
22/* empty css                                                */
23/* home/runner/work/gradio/gradio/js/image/Index.svelte generated by Svelte v4.2.2 */
24const {
25	SvelteComponent,
26	add_flush_callback,
27	assign,
28	bind,
29	binding_callbacks,
30	check_outros,
31	create_component,
32	destroy_component,
33	detach,
34	empty,
35	flush,
36	get_spread_object,
37	get_spread_update,
38	group_outros,
39	init,
40	insert,
41	mount_component,
42	safe_not_equal,
43	space,
44	transition_in,
45	transition_out
46} = window.__gradio__svelte__internal;
47function create_else_block(ctx) {
48	let block;
49	let current;
50
51	block = new Block({
52			props: {
53				visible: /*visible*/ ctx[4],
54				variant: /*_value*/ ctx[22] === null ? "dashed" : "solid",
55				border_mode: /*dragging*/ ctx[23] ? "focus" : "base",
56				padding: false,
57				elem_id: /*elem_id*/ ctx[2],
58				elem_classes: /*elem_classes*/ ctx[3],
59				height: /*height*/ ctx[9] || undefined,
60				width: /*width*/ ctx[10],
61				allow_overflow: false,
62				container: /*container*/ ctx[12],
63				scale: /*scale*/ ctx[13],
64				min_width: /*min_width*/ ctx[14],
65				$$slots: { default: [create_default_slot_1] },
66				$$scope: { ctx }
67			}
68		});
69
70	return {
71		c() {
72			create_component(block.$$.fragment);
73		},
74		m(target, anchor) {
75			mount_component(block, target, anchor);
76			current = true;
77		},
78		p(ctx, dirty) {
79			const block_changes = {};
80			if (dirty[0] & /*visible*/ 16) block_changes.visible = /*visible*/ ctx[4];
81			if (dirty[0] & /*_value*/ 4194304) block_changes.variant = /*_value*/ ctx[22] === null ? "dashed" : "solid";
82			if (dirty[0] & /*dragging*/ 8388608) block_changes.border_mode = /*dragging*/ ctx[23] ? "focus" : "base";
83			if (dirty[0] & /*elem_id*/ 4) block_changes.elem_id = /*elem_id*/ ctx[2];
84			if (dirty[0] & /*elem_classes*/ 8) block_changes.elem_classes = /*elem_classes*/ ctx[3];
85			if (dirty[0] & /*height*/ 512) block_changes.height = /*height*/ ctx[9] || undefined;
86			if (dirty[0] & /*width*/ 1024) block_changes.width = /*width*/ ctx[10];
87			if (dirty[0] & /*container*/ 4096) block_changes.container = /*container*/ ctx[12];
88			if (dirty[0] & /*scale*/ 8192) block_changes.scale = /*scale*/ ctx[13];
89			if (dirty[0] & /*min_width*/ 16384) block_changes.min_width = /*min_width*/ ctx[14];
90
91			if (dirty[0] & /*_selectable, root, sources, label, show_label, pending, streaming, mirror_webcam, gradio, active_source, value, dragging, loading_status*/ 29165923 | dirty[1] & /*$$scope*/ 512) {
92				block_changes.$$scope = { dirty, ctx };
93			}
94
95			block.$set(block_changes);
96		},
97		i(local) {
98			if (current) return;
99			transition_in(block.$$.fragment, local);
100			current = true;
101		},
102		o(local) {
103			transition_out(block.$$.fragment, local);
104			current = false;
105		},
106		d(detaching) {
107			destroy_component(block, detaching);
108		}
109	};
110}
111
112// (50:0) {#if !interactive}
113function create_if_block(ctx) {
114	let block;
115	let current;
116
117	block = new Block({
118			props: {
119				visible: /*visible*/ ctx[4],
120				variant: "solid",
121				border_mode: /*dragging*/ ctx[23] ? "focus" : "base",
122				padding: false,
123				elem_id: /*elem_id*/ ctx[2],
124				elem_classes: /*elem_classes*/ ctx[3],
125				height: /*height*/ ctx[9] || undefined,
126				width: /*width*/ ctx[10],
127				allow_overflow: false,
128				container: /*container*/ ctx[12],
129				scale: /*scale*/ ctx[13],
130				min_width: /*min_width*/ ctx[14],
131				$$slots: { default: [create_default_slot] },
132				$$scope: { ctx }
133			}
134		});
135
136	return {
137		c() {
138			create_component(block.$$.fragment);
139		},
140		m(target, anchor) {
141			mount_component(block, target, anchor);
142			current = true;
143		},
144		p(ctx, dirty) {
145			const block_changes = {};
146			if (dirty[0] & /*visible*/ 16) block_changes.visible = /*visible*/ ctx[4];
147			if (dirty[0] & /*dragging*/ 8388608) block_changes.border_mode = /*dragging*/ ctx[23] ? "focus" : "base";
148			if (dirty[0] & /*elem_id*/ 4) block_changes.elem_id = /*elem_id*/ ctx[2];
149			if (dirty[0] & /*elem_classes*/ 8) block_changes.elem_classes = /*elem_classes*/ ctx[3];
150			if (dirty[0] & /*height*/ 512) block_changes.height = /*height*/ ctx[9] || undefined;
151			if (dirty[0] & /*width*/ 1024) block_changes.width = /*width*/ ctx[10];
152			if (dirty[0] & /*container*/ 4096) block_changes.container = /*container*/ ctx[12];
153			if (dirty[0] & /*scale*/ 8192) block_changes.scale = /*scale*/ ctx[13];
154			if (dirty[0] & /*min_width*/ 16384) block_changes.min_width = /*min_width*/ ctx[14];
155
156			if (dirty[0] & /*_value, label, show_label, show_download_button, _selectable, show_share_button, gradio, loading_status*/ 6326498 | dirty[1] & /*$$scope*/ 512) {
157				block_changes.$$scope = { dirty, ctx };
158			}
159
160			block.$set(block_changes);
161		},
162		i(local) {
163			if (current) return;
164			transition_in(block.$$.fragment, local);
165			current = true;
166		},
167		o(local) {
168			transition_out(block.$$.fragment, local);
169			current = false;
170		},
171		d(detaching) {
172			destroy_component(block, detaching);
173		}
174	};
175}
176
177// (135:3) {:else}
178function create_else_block_1(ctx) {
179	let empty_1;
180	let current;
181
182	empty_1 = new Empty({
183			props: {
184				unpadded_box: true,
185				size: "large",
186				$$slots: { default: [create_default_slot_3] },
187				$$scope: { ctx }
188			}
189		});
190
191	return {
192		c() {
193			create_component(empty_1.$$.fragment);
194		},
195		m(target, anchor) {
196			mount_component(empty_1, target, anchor);
197			current = true;
198		},
199		p(ctx, dirty) {
200			const empty_1_changes = {};
201
202			if (dirty[1] & /*$$scope*/ 512) {
203				empty_1_changes.$$scope = { dirty, ctx };
204			}
205
206			empty_1.$set(empty_1_changes);
207		},
208		i(local) {
209			if (current) return;
210			transition_in(empty_1.$$.fragment, local);
211			current = true;
212		},
213		o(local) {
214			transition_out(empty_1.$$.fragment, local);
215			current = false;
216		},
217		d(detaching) {
218			destroy_component(empty_1, detaching);
219		}
220	};
221}
222
223// (133:43) 
224function create_if_block_2(ctx) {
225	let uploadtext;
226	let current;
227
228	uploadtext = new UploadText({
229			props: {
230				i18n: /*gradio*/ ctx[21].i18n,
231				type: "clipboard",
232				mode: "short"
233			}
234		});
235
236	return {
237		c() {
238			create_component(uploadtext.$$.fragment);
239		},
240		m(target, anchor) {
241			mount_component(uploadtext, target, anchor);
242			current = true;
243		},
244		p(ctx, dirty) {
245			const uploadtext_changes = {};
246			if (dirty[0] & /*gradio*/ 2097152) uploadtext_changes.i18n = /*gradio*/ ctx[21].i18n;
247			uploadtext.$set(uploadtext_changes);
248		},
249		i(local) {
250			if (current) return;
251			transition_in(uploadtext.$$.fragment, local);
252			current = true;
253		},
254		o(local) {
255			transition_out(uploadtext.$$.fragment, local);
256			current = false;
257		},
258		d(detaching) {
259			destroy_component(uploadtext, detaching);
260		}
261	};
262}
263
264// (131:3) {#if active_source === "upload" || !active_source}
265function create_if_block_1(ctx) {
266	let uploadtext;
267	let current;
268
269	uploadtext = new UploadText({
270			props: {
271				i18n: /*gradio*/ ctx[21].i18n,
272				type: "image"
273			}
274		});
275
276	return {
277		c() {
278			create_component(uploadtext.$$.fragment);
279		},
280		m(target, anchor) {
281			mount_component(uploadtext, target, anchor);
282			current = true;
283		},
284		p(ctx, dirty) {
285			const uploadtext_changes = {};
286			if (dirty[0] & /*gradio*/ 2097152) uploadtext_changes.i18n = /*gradio*/ ctx[21].i18n;
287			uploadtext.$set(uploadtext_changes);
288		},
289		i(local) {
290			if (current) return;
291			transition_in(uploadtext.$$.fragment, local);
292			current = true;
293		},
294		o(local) {
295			transition_out(uploadtext.$$.fragment, local);
296			current = false;
297		},
298		d(detaching) {
299			destroy_component(uploadtext, detaching);
300		}
301	};
302}
303
304// (136:4) <Empty unpadded_box={true} size="large">
305function create_default_slot_3(ctx) {
306	let image;
307	let current;
308	image = new Image({});
309
310	return {
311		c() {
312			create_component(image.$$.fragment);
313		},
314		m(target, anchor) {
315			mount_component(image, target, anchor);
316			current = true;
317		},
318		i(local) {
319			if (current) return;
320			transition_in(image.$$.fragment, local);
321			current = true;
322		},
323		o(local) {
324			transition_out(image.$$.fragment, local);
325			current = false;
326		},
327		d(detaching) {
328			destroy_component(image, detaching);
329		}
330	};
331}
332
333// (104:2) <ImageUploader    bind:active_source    bind:value    selectable={_selectable}    {root}    {sources}    on:edit={() => gradio.dispatch("edit")}    on:clear={() => {     gradio.dispatch("clear");    }}    on:stream={() => gradio.dispatch("stream")}    on:drag={({ detail }) => (dragging = detail)}    on:upload={() => gradio.dispatch("upload")}    on:select={({ detail }) => gradio.dispatch("select", detail)}    on:share={({ detail }) => gradio.dispatch("share", detail)}    on:error={({ detail }) => {     loading_status = loading_status || {};     loading_status.status = "error";     gradio.dispatch("error", detail);    }}    {label}    {show_label}    {pending}    {streaming}    {mirror_webcam}    i18n={gradio.i18n}   >
334function create_default_slot_2(ctx) {
335	let current_block_type_index;
336	let if_block;
337	let if_block_anchor;
338	let current;
339	const if_block_creators = [create_if_block_1, create_if_block_2, create_else_block_1];
340	const if_blocks = [];
341
342	function select_block_type_1(ctx, dirty) {
343		if (/*active_source*/ ctx[24] === "upload" || !/*active_source*/ ctx[24]) return 0;
344		if (/*active_source*/ ctx[24] === "clipboard") return 1;
345		return 2;
346	}
347
348	current_block_type_index = select_block_type_1(ctx);
349	if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
350
351	return {
352		c() {
353			if_block.c();
354			if_block_anchor = empty();
355		},
356		m(target, anchor) {
357			if_blocks[current_block_type_index].m(target, anchor);
358			insert(target, if_block_anchor, anchor);
359			current = true;
360		},
361		p(ctx, dirty) {
362			let previous_block_index = current_block_type_index;
363			current_block_type_index = select_block_type_1(ctx);
364
365			if (current_block_type_index === previous_block_index) {
366				if_blocks[current_block_type_index].p(ctx, dirty);
367			} else {
368				group_outros();
369
370				transition_out(if_blocks[previous_block_index], 1, 1, () => {
371					if_blocks[previous_block_index] = null;
372				});
373
374				check_outros();
375				if_block = if_blocks[current_block_type_index];
376
377				if (!if_block) {
378					if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
379					if_block.c();
380				} else {
381					if_block.p(ctx, dirty);
382				}
383
384				transition_in(if_block, 1);
385				if_block.m(if_block_anchor.parentNode, if_block_anchor);
386			}
387		},
388		i(local) {
389			if (current) return;
390			transition_in(if_block);
391			current = true;
392		},
393		o(local) {
394			transition_out(if_block);
395			current = false;
396		},
397		d(detaching) {
398			if (detaching) {
399				detach(if_block_anchor);
400			}
401
402			if_blocks[current_block_type_index].d(detaching);
403		}
404	};
405}
406
407// (84:1) <Block   {visible}   variant={_value === null ? "dashed" : "solid"}   border_mode={dragging ? "focus" : "base"}   padding={false}   {elem_id}   {elem_classes}   height={height || undefined}   {width}   allow_overflow={false}   {container}   {scale}   {min_width}  >
408function create_default_slot_1(ctx) {
409	let statustracker;
410	let t;
411	let imageuploader;
412	let updating_active_source;
413	let updating_value;
414	let current;
415
416	const statustracker_spread_levels = [
417		{
418			autoscroll: /*gradio*/ ctx[21].autoscroll
419		},
420		{ i18n: /*gradio*/ ctx[21].i18n },
421		/*loading_status*/ ctx[1]
422	];
423
424	let statustracker_props = {};
425
426	for (let i = 0; i < statustracker_spread_levels.length; i += 1) {
427		statustracker_props = assign(statustracker_props, statustracker_spread_levels[i]);
428	}
429
430	statustracker = new Static({ props: statustracker_props });
431
432	function imageuploader_active_source_binding(value) {
433		/*imageuploader_active_source_binding*/ ctx[30](value);
434	}
435
436	function imageuploader_value_binding(value) {
437		/*imageuploader_value_binding*/ ctx[31](value);
438	}
439
440	let imageuploader_props = {
441		selectable: /*_selectable*/ ctx[11],
442		root: /*root*/ ctx[8],
443		sources: /*sources*/ ctx[16],
444		label: /*label*/ ctx[5],
445		show_label: /*show_label*/ ctx[6],
446		pending: /*pending*/ ctx[19],
447		streaming: /*streaming*/ ctx[18],
448		mirror_webcam: /*mirror_webcam*/ ctx[20],
449		i18n: /*gradio*/ ctx[21].i18n,
450		$$slots: { default: [create_default_slot_2] },
451		$$scope: { ctx }
452	};
453
454	if (/*active_source*/ ctx[24] !== void 0) {
455		imageuploader_props.active_source = /*active_source*/ ctx[24];
456	}
457
458	if (/*value*/ ctx[0] !== void 0) {
459		imageuploader_props.value = /*value*/ ctx[0];
460	}
461
462	imageuploader = new ImageUploader({ props: imageuploader_props });
463	binding_callbacks.push(() => bind(imageuploader, 'active_source', imageuploader_active_source_binding));
464	binding_callbacks.push(() => bind(imageuploader, 'value', imageuploader_value_binding));
465	imageuploader.$on("edit", /*edit_handler*/ ctx[32]);
466	imageuploader.$on("clear", /*clear_handler*/ ctx[33]);
467	imageuploader.$on("stream", /*stream_handler*/ ctx[34]);
468	imageuploader.$on("drag", /*drag_handler*/ ctx[35]);
469	imageuploader.$on("upload", /*upload_handler*/ ctx[36]);
470	imageuploader.$on("select", /*select_handler_1*/ ctx[37]);
471	imageuploader.$on("share", /*share_handler_1*/ ctx[38]);
472	imageuploader.$on("error", /*error_handler_1*/ ctx[39]);
473
474	return {
475		c() {
476			create_component(statustracker.$$.fragment);
477			t = space();
478			create_component(imageuploader.$$.fragment);
479		},
480		m(target, anchor) {
481			mount_component(statustracker, target, anchor);
482			insert(target, t, anchor);
483			mount_component(imageuploader, target, anchor);
484			current = true;
485		},
486		p(ctx, dirty) {
487			const statustracker_changes = (dirty[0] & /*gradio, loading_status*/ 2097154)
488			? get_spread_update(statustracker_spread_levels, [
489					dirty[0] & /*gradio*/ 2097152 && {
490						autoscroll: /*gradio*/ ctx[21].autoscroll
491					},
492					dirty[0] & /*gradio*/ 2097152 && { i18n: /*gradio*/ ctx[21].i18n },
493					dirty[0] & /*loading_status*/ 2 && get_spread_object(/*loading_status*/ ctx[1])
494				])
495			: {};
496
497			statustracker.$set(statustracker_changes);
498			const imageuploader_changes = {};
499			if (dirty[0] & /*_selectable*/ 2048) imageuploader_changes.selectable = /*_selectable*/ ctx[11];
500			if (dirty[0] & /*root*/ 256) imageuploader_changes.root = /*root*/ ctx[8];
501			if (dirty[0] & /*sources*/ 65536) imageuploader_changes.sources = /*sources*/ ctx[16];
502			if (dirty[0] & /*label*/ 32) imageuploader_changes.label = /*label*/ ctx[5];
503			if (dirty[0] & /*show_label*/ 64) imageuploader_changes.show_label = /*show_label*/ ctx[6];
504			if (dirty[0] & /*pending*/ 524288) imageuploader_changes.pending = /*pending*/ ctx[19];
505			if (dirty[0] & /*streaming*/ 262144) imageuploader_changes.streaming = /*streaming*/ ctx[18];
506			if (dirty[0] & /*mirror_webcam*/ 1048576) imageuploader_changes.mirror_webcam = /*mirror_webcam*/ ctx[20];
507			if (dirty[0] & /*gradio*/ 2097152) imageuploader_changes.i18n = /*gradio*/ ctx[21].i18n;
508
509			if (dirty[0] & /*gradio, active_source*/ 18874368 | dirty[1] & /*$$scope*/ 512) {
510				imageuploader_changes.$$scope = { dirty, ctx };
511			}
512
513			if (!updating_active_source && dirty[0] & /*active_source*/ 16777216) {
514				updating_active_source = true;
515				imageuploader_changes.active_source = /*active_source*/ ctx[24];
516				add_flush_callback(() => updating_active_source = false);
517			}
518
519			if (!updating_value && dirty[0] & /*value*/ 1) {
520				updating_value = true;
521				imageuploader_changes.value = /*value*/ ctx[0];
522				add_flush_callback(() => updating_value = false);
523			}
524
525			imageuploader.$set(imageuploader_changes);
526		},
527		i(local) {
528			if (current) return;
529			transition_in(statustracker.$$.fragment, local);
530			transition_in(imageuploader.$$.fragment, local);
531			current = true;
532		},
533		o(local) {
534			transition_out(statustracker.$$.fragment, local);
535			transition_out(imageuploader.$$.fragment, local);
536			current = false;
537		},
538		d(detaching) {
539			if (detaching) {
540				detach(t);
541			}
542
543			destroy_component(statustracker, detaching);
544			destroy_component(imageuploader, detaching);
545		}
546	};
547}
548
549// (51:1) <Block   {visible}   variant={"solid"}   border_mode={dragging ? "focus" : "base"}   padding={false}   {elem_id}   {elem_classes}   height={height || undefined}   {width}   allow_overflow={false}   {container}   {scale}   {min_width}  >
550function create_default_slot(ctx) {
551	let statustracker;
552	let t;
553	let staticimage;
554	let current;
555
556	const statustracker_spread_levels = [
557		{
558			autoscroll: /*gradio*/ ctx[21].autoscroll
559		},
560		{ i18n: /*gradio*/ ctx[21].i18n },
561		/*loading_status*/ ctx[1]
562	];
563
564	let statustracker_props = {};
565
566	for (let i = 0; i < statustracker_spread_levels.length; i += 1) {
567		statustracker_props = assign(statustracker_props, statustracker_spread_levels[i]);
568	}
569
570	statustracker = new Static({ props: statustracker_props });
571
572	staticimage = new StaticImage({
573			props: {
574				value: /*_value*/ ctx[22],
575				label: /*label*/ ctx[5],
576				show_label: /*show_label*/ ctx[6],
577				show_download_button: /*show_download_button*/ ctx[7],
578				selectable: /*_selectable*/ ctx[11],
579				show_share_button: /*show_share_button*/ ctx[15],
580				i18n: /*gradio*/ ctx[21].i18n
581			}
582		});
583
584	staticimage.$on("select", /*select_handler*/ ctx[27]);
585	staticimage.$on("share", /*share_handler*/ ctx[28]);
586	staticimage.$on("error", /*error_handler*/ ctx[29]);
587
588	return {
589		c() {
590			create_component(statustracker.$$.fragment);
591			t = space();
592			create_component(staticimage.$$.fragment);
593		},
594		m(target, anchor) {
595			mount_component(statustracker, target, anchor);
596			insert(target, t, anchor);
597			mount_component(staticimage, target, anchor);
598			current = true;
599		},
600		p(ctx, dirty) {
601			const statustracker_changes = (dirty[0] & /*gradio, loading_status*/ 2097154)
602			? get_spread_update(statustracker_spread_levels, [
603					dirty[0] & /*gradio*/ 2097152 && {
604						autoscroll: /*gradio*/ ctx[21].autoscroll
605					},
606					dirty[0] & /*gradio*/ 2097152 && { i18n: /*gradio*/ ctx[21].i18n },
607					dirty[0] & /*loading_status*/ 2 && get_spread_object(/*loading_status*/ ctx[1])
608				])
609			: {};
610
611			statustracker.$set(statustracker_changes);
612			const staticimage_changes = {};
613			if (dirty[0] & /*_value*/ 4194304) staticimage_changes.value = /*_value*/ ctx[22];
614			if (dirty[0] & /*label*/ 32) staticimage_changes.label = /*label*/ ctx[5];
615			if (dirty[0] & /*show_label*/ 64) staticimage_changes.show_label = /*show_label*/ ctx[6];
616			if (dirty[0] & /*show_download_button*/ 128) staticimage_changes.show_download_button = /*show_download_button*/ ctx[7];
617			if (dirty[0] & /*_selectable*/ 2048) staticimage_changes.selectable = /*_selectable*/ ctx[11];
618			if (dirty[0] & /*show_share_button*/ 32768) staticimage_changes.show_share_button = /*show_share_button*/ ctx[15];
619			if (dirty[0] & /*gradio*/ 2097152) staticimage_changes.i18n = /*gradio*/ ctx[21].i18n;
620			staticimage.$set(staticimage_changes);
621		},
622		i(local) {
623			if (current) return;
624			transition_in(statustracker.$$.fragment, local);
625			transition_in(staticimage.$$.fragment, local);
626			current = true;
627		},
628		o(local) {
629			transition_out(statustracker.$$.fragment, local);
630			transition_out(staticimage.$$.fragment, local);
631			current = false;
632		},
633		d(detaching) {
634			if (detaching) {
635				detach(t);
636			}
637
638			destroy_component(statustracker, detaching);
639			destroy_component(staticimage, detaching);
640		}
641	};
642}
643
644function create_fragment(ctx) {
645	let current_block_type_index;
646	let if_block;
647	let if_block_anchor;
648	let current;
649	const if_block_creators = [create_if_block, create_else_block];
650	const if_blocks = [];
651
652	function select_block_type(ctx, dirty) {
653		if (!/*interactive*/ ctx[17]) return 0;
654		return 1;
655	}
656
657	current_block_type_index = select_block_type(ctx);
658	if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
659
660	return {
661		c() {
662			if_block.c();
663			if_block_anchor = empty();
664		},
665		m(target, anchor) {
666			if_blocks[current_block_type_index].m(target, anchor);
667			insert(target, if_block_anchor, anchor);
668			current = true;
669		},
670		p(ctx, dirty) {
671			let previous_block_index = current_block_type_index;
672			current_block_type_index = select_block_type(ctx);
673
674			if (current_block_type_index === previous_block_index) {
675				if_blocks[current_block_type_index].p(ctx, dirty);
676			} else {
677				group_outros();
678
679				transition_out(if_blocks[previous_block_index], 1, 1, () => {
680					if_blocks[previous_block_index] = null;
681				});
682
683				check_outros();
684				if_block = if_blocks[current_block_type_index];
685
686				if (!if_block) {
687					if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
688					if_block.c();
689				} else {
690					if_block.p(ctx, dirty);
691				}
692
693				transition_in(if_block, 1);
694				if_block.m(if_block_anchor.parentNode, if_block_anchor);
695			}
696		},
697		i(local) {
698			if (current) return;
699			transition_in(if_block);
700			current = true;
701		},
702		o(local) {
703			transition_out(if_block);
704			current = false;
705		},
706		d(detaching) {
707			if (detaching) {
708				detach(if_block_anchor);
709			}
710
711			if_blocks[current_block_type_index].d(detaching);
712		}
713	};
714}
715
716function instance($$self, $$props, $$invalidate) {
717	let _value;
718	let url;
719	let { elem_id = "" } = $$props;
720	let { elem_classes = [] } = $$props;
721	let { visible = true } = $$props;
722	let { value = null } = $$props;
723	let { label } = $$props;
724	let { show_label } = $$props;
725	let { show_download_button } = $$props;
726	let { root } = $$props;
727	let { proxy_url } = $$props;
728	let { height } = $$props;
729	let { width } = $$props;
730	let { _selectable = false } = $$props;
731	let { container = true } = $$props;
732	let { scale = null } = $$props;
733	let { min_width = undefined } = $$props;
734	let { loading_status } = $$props;
735	let { show_share_button = false } = $$props;
736	let { sources = ["upload", "clipboard", "webcam"] } = $$props;
737	let { interactive } = $$props;
738	let { streaming } = $$props;
739	let { pending } = $$props;
740	let { mirror_webcam } = $$props;
741	let { gradio } = $$props;
742	let dragging;
743	let active_source = null;
744	const select_handler = ({ detail }) => gradio.dispatch("select", detail);
745	const share_handler = ({ detail }) => gradio.dispatch("share", detail);
746	const error_handler = ({ detail }) => gradio.dispatch("error", detail);
747
748	function imageuploader_active_source_binding(value) {
749		active_source = value;
750		$$invalidate(24, active_source);
751	}
752
753	function imageuploader_value_binding(value$1) {
754		value = value$1;
755		$$invalidate(0, value);
756	}
757
758	const edit_handler = () => gradio.dispatch("edit");
759
760	const clear_handler = () => {
761		gradio.dispatch("clear");
762	};
763
764	const stream_handler = () => gradio.dispatch("stream");
765	const drag_handler = ({ detail }) => $$invalidate(23, dragging = detail);
766	const upload_handler = () => gradio.dispatch("upload");
767	const select_handler_1 = ({ detail }) => gradio.dispatch("select", detail);
768	const share_handler_1 = ({ detail }) => gradio.dispatch("share", detail);
769
770	const error_handler_1 = ({ detail }) => {
771		$$invalidate(1, loading_status = loading_status || {});
772		$$invalidate(1, loading_status.status = "error", loading_status);
773		gradio.dispatch("error", detail);
774	};
775
776	$$self.$$set = $$props => {
777		if ('elem_id' in $$props) $$invalidate(2, elem_id = $$props.elem_id);
778		if ('elem_classes' in $$props) $$invalidate(3, elem_classes = $$props.elem_classes);
779		if ('visible' in $$props) $$invalidate(4, visible = $$props.visible);
780		if ('value' in $$props) $$invalidate(0, value = $$props.value);
781		if ('label' in $$props) $$invalidate(5, label = $$props.label);
782		if ('show_label' in $$props) $$invalidate(6, show_label = $$props.show_label);
783		if ('show_download_button' in $$props) $$invalidate(7, show_download_button = $$props.show_download_button);
784		if ('root' in $$props) $$invalidate(8, root = $$props.root);
785		if ('proxy_url' in $$props) $$invalidate(25, proxy_url = $$props.proxy_url);
786		if ('height' in $$props) $$invalidate(9, height = $$props.height);
787		if ('width' in $$props) $$invalidate(10, width = $$props.width);
788		if ('_selectable' in $$props) $$invalidate(11, _selectable = $$props._selectable);
789		if ('container' in $$props) $$invalidate(12, container = $$props.container);
790		if ('scale' in $$props) $$invalidate(13, scale = $$props.scale);
791		if ('min_width' in $$props) $$invalidate(14, min_width = $$props.min_width);
792		if ('loading_status' in $$props) $$invalidate(1, loading_status = $$props.loading_status);
793		if ('show_share_button' in $$props) $$invali
793date(15, show_share_button = $$props.show_share_button);
794		if ('sources' in $$props) $$invalidate(16, sources = $$props.sources);
795		if ('interactive' in $$props) $$invalidate(17, interactive = $$props.interactive);
796		if ('streaming' in $$props) $$invalidate(18, streaming = $$props.streaming);
797		if ('pending' in $$props) $$invalidate(19, pending = $$props.pending);
798		if ('mirror_webcam' in $$props) $$invalidate(20, mirror_webcam = $$props.mirror_webcam);
799		if ('gradio' in $$props) $$invalidate(21, gradio = $$props.gradio);
800	};
801
802	$$self.$$.update = () => {
803		if ($$self.$$.dirty[0] & /*value, root, proxy_url*/ 33554689) {
804			$$invalidate(22, _value = normalise_file(value, root, proxy_url));
805		}
806
807		if ($$self.$$.dirty[0] & /*_value*/ 4194304) {
808			$$invalidate(26, url = _value?.url);
809		}
810
811		if ($$self.$$.dirty[0] & /*url, gradio*/ 69206016) {
812			(gradio.dispatch("change"));
813		}
814	};
815
816	return [
817		value,
818		loading_status,
819		elem_id,
820		elem_classes,
821		visible,
822		label,
823		show_label,
824		show_download_button,
825		root,
826		height,
827		width,
828		_selectable,
829		container,
830		scale,
831		min_width,
832		show_share_button,
833		sources,
834		interactive,
835		streaming,
836		pending,
837		mirror_webcam,
838		gradio,
839		_value,
840		dragging,
841		active_source,
842		proxy_url,
843		url,
844		select_handler,
845		share_handler,
846		error_handler,
847		imageuploader_active_source_binding,
848		imageuploader_value_binding,
849		edit_handler,
850		clear_handler,
851		stream_handler,
852		drag_handler,
853		upload_handler,
854		select_handler_1,
855		share_handler_1,
856		error_handler_1
857	];
858}
859
860class Index extends SvelteComponent {
861	constructor(options) {
862		super();
863
864		init(
865			this,
866			options,
867			instance,
868			create_fragment,
869			safe_not_equal,
870			{
871				elem_id: 2,
872				elem_classes: 3,
873				visible: 4,
874				value: 0,
875				label: 5,
876				show_label: 6,
877				show_download_button: 7,
878				root: 8,
879				proxy_url: 25,
880				height: 9,
881				width: 10,
882				_selectable: 11,
883				container: 12,
884				scale: 13,
885				min_width: 14,
886				loading_status: 1,
887				show_share_button: 15,
888				sources: 16,
889				interactive: 17,
890				streaming: 18,
891				pending: 19,
892				mirror_webcam: 20,
893				gradio: 21
894			},
895			null,
896			[-1, -1]
897		);
898	}
899
900	get elem_id() {
901		return this.$$.ctx[2];
902	}
903
904	set elem_id(elem_id) {
905		this.$$set({ elem_id });
906		flush();
907	}
908
909	get elem_classes() {
910		return this.$$.ctx[3];
911	}
912
913	set elem_classes(elem_classes) {
914		this.$$set({ elem_classes });
915		flush();
916	}
917
918	get visible() {
919		return this.$$.ctx[4];
920	}
921
922	set visible(visible) {
923		this.$$set({ visible });
924		flush();
925	}
926
927	get value() {
928		return this.$$.ctx[0];
929	}
930
931	set value(value) {
932		this.$$set({ value });
933		flush();
934	}
935
936	get label() {
937		return this.$$.ctx[5];
938	}
939
940	set label(label) {
941		this.$$set({ label });
942		flush();
943	}
944
945	get show_label() {
946		return this.$$.ctx[6];
947	}
948
949	set show_label(show_label) {
950		this.$$set({ show_label });
951		flush();
952	}
953
954	get show_download_button() {
955		return this.$$.ctx[7];
956	}
957
958	set show_download_button(show_download_button) {
959		this.$$set({ show_download_button });
960		flush();
961	}
962
963	get root() {
964		return this.$$.ctx[8];
965	}
966
967	set root(root) {
968		this.$$set({ root });
969		flush();
970	}
971
972	get proxy_url() {
973		return this.$$.ctx[25];
974	}
975
976	set proxy_url(proxy_url) {
977		this.$$set({ proxy_url });
978		flush();
979	}
980
981	get height() {
982		return this.$$.ctx[9];
983	}
984
985	set height(height) {
986		this.$$set({ height });
987		flush();
988	}
989
990	get width() {
991		return this.$$.ctx[10];
992	}
993
994	set width(width) {
995		this.$$set({ width });
996		flush();
997	}
998
999	get _selectable() {
1000		return this.$$.ctx[11];
1001	}
1002
1003	set _selectable(_selectable) {
1004		this.$$set({ _selectable });
1005		flush();
1006	}
1007
1008	get container() {
1009		return this.$$.ctx[12];
1010	}
1011
1012	set container(container) {
1013		this.$$set({ container });
1014		flush();
1015	}
1016
1017	get scale() {
1018		return this.$$.ctx[13];
1019	}
1020
1021	set scale(scale) {
1022		this.$$set({ scale });
1023		flush();
1024	}
1025
1026	get min_width() {
1027		return this.$$.ctx[14];
1028	}
1029
1030	set min_width(min_width) {
1031		this.$$set({ min_width });
1032		flush();
1033	}
1034
1035	get loading_status() {
1036		return this.$$.ctx[1];
1037	}
1038
1039	set loading_status(loading_status) {
1040		this.$$set({ loading_status });
1041		flush();
1042	}
1043
1044	get show_share_button() {
1045		return this.$$.ctx[15];
1046	}
1047
1048	set show_share_button(show_share_button) {
1049		this.$$set({ show_share_button });
1050		flush();
1051	}
1052
1053	get sources() {
1054		return this.$$.ctx[16];
1055	}
1056
1057	set sources(sources) {
1058		this.$$set({ sources });
1059		flush();
1060	}
1061
1062	get interactive() {
1063		return this.$$.ctx[17];
1064	}
1065
1066	set interactive(interactive) {
1067		this.$$set({ interactive });
1068		flush();
1069	}
1070
1071	get streaming() {
1072		return this.$$.ctx[18];
1073	}
1074
1075	set streaming(streaming) {
1076		this.$$set({ streaming });
1077		flush();
1078	}
1079
1080	get pending() {
1081		return this.$$.ctx[19];
1082	}
1083
1084	set pending(pending) {
1085		this.$$set({ pending });
1086		flush();
1087	}
1088
1089	get mirror_webcam() {
1090		return this.$$.ctx[20];
1091	}
1092
1093	set mirror_webcam(mirror_webcam) {
1094		this.$$set({ mirror_webcam });
1095		flush();
1096	}
1097
1098	get gradio() {
1099		return this.$$.ctx[21];
1100	}
1101
1102	set gradio(gradio) {
1103		this.$$set({ gradio });
1104		flush();
1105	}
1106}
1107
1108export { ImageUploader as BaseImageUploader, StaticImage as BaseStaticImage, Index as default };
1109//# sourceMappingURL=Index-5ce61445.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.