PageSourceSearch

https://toootiz-mikutts.hf.space/assets/Example-Ciz_10jH.js

js toootiz-mikutts.hf.space collected 2026-10-03 17:29:16 UTC 4,049 bytes, 148 lines download raw bytes

1import { p as prop, k as each, d as bind_this, u as index, i as if_block, b as set_class, a as set_attribute } from './i18n-CGlVUOvE.js';
2import { M as push, ad as user_effect, t as template_effect, a as append, O as pop, S as sibling, $ as set, R as from_html, Q as child, ab as state, a3 as comment, N as first_child, Z as get, X as set_text, T as reset, a4 as text } from './index-Bq2njFOY.js';
3import { b as bind_element_size } from './size-CWi277d_.js';
4import { I as Image } from './Image-XuMqTTwB.js';
5import './ScrollFade.svelte_svelte_type_style_lang-D0JPkGar.js';
6import './MarkdownCode.svelte_svelte_type_style_lang-B29zDiob.js';
7/* empty css                                                    */
8import { V as Video } from './Video-e9Pn2mbW.js';
9import './misc-D8a4ZbMA.js';
10/* empty css                                             */
11import './snippet-BG7qkY_1.js';
12import './prism-python-NrKIQnfs.js';
13import './actions-CgRQ2lHA.js';
14
15var root_6 = from_html(`<audio controls></audio>`);
16var root = from_html(`<div><p> </p> <!></div>`);
17
18function Example($$anchor, $$props) {
19	push($$props, true);
20
21	let value = prop($$props, 'value', 19, () => ({ text: "", files: [] })),
22		selected = prop($$props, 'selected', 3, false);
23
24	let size = state(0);
25	let el;
26
27	function set_styles(element, el_width) {
28		element.style.setProperty("--local-text-width", `${el_width && el_width < 150 ? el_width : 200}px`);
29		element.style.whiteSpace = "unset";
30	}
31
32	user_effect(() => {
33		if (el && get(size)) {
34			set_styles(el, get(size));
35		}
36	});
37
38	var div = root();
39	let classes;
40	var p = child(div);
41	var text$1 = child(p, true);
42
43	reset(p);
44
45	var node = sibling(p, 2);
46
47	each(node, 17, () => value().files, index, ($$anchor, file) => {
48		var fragment = comment();
49		var node_1 = first_child(fragment);
50
51		{
52			var consequent = ($$anchor) => {
53				Image($$anchor, {
54					get src() {
55						return get(file).url;
56					},
57					alt: ''
58				});
59			};
60
61			var alternate_2 = ($$anchor) => {
62				var fragment_2 = comment();
63				var node_2 = first_child(fragment_2);
64
65				{
66					var consequent_1 = ($$anchor) => {
67						Video($$anchor, {
68							get src() {
69								return get(file).url;
70							},
71							alt: '',
72							loop: true,
73							is_stream: false
74						});
75					};
76
77					var alternate_1 = ($$anchor) => {
78						var fragment_4 = comment();
79						var node_3 = first_child(fragment_4);
80
81						{
82							var consequent_2 = ($$anchor) => {
83								var audio = root_6();
84
85								template_effect(() => set_attribute(audio, 'src', get(file).url));
86								append($$anchor, audio);
87							};
88
89							var alternate = ($$anchor) => {
90								var text_1 = text();
91
92								template_effect(() => set_text(text_1, get(file).orig_name));
93								append($$anchor, text_1);
94							};
95
96							if_block(
97								node_3,
98								($$render) => {
99									if (get(file).mime_type && get(file).mime_type.includes("audio")) $$render(consequent_2); else $$render(alternate, false);
100								},
101								true
102							);
103						}
104
105						append($$anchor, fragment_4);
106					};
107
108					if_block(
109						node_2,
110						($$render) => {
111							if (get(file).mime_type && get(file).mime_type.includes("video")) $$render(consequent_1); else $$render(alternate_1, false);
112						},
113						true
114					);
115				}
116
117				append($$anchor, fragment_2);
118			};
119
120			if_block(node_1, ($$render) => {
121				if (get(file).mime_type && get(file).mime_type.includes("image")) $$render(consequent); else $$render(alternate_2, false);
122			});
123		}
124
125		append($$anchor, fragment);
126	});
127
128	reset(div);
129	bind_this(div, ($$value) => el = $$value, () => el);
130
131	template_effect(() => {
132		classes = set_class(div, 1, 'container svelte-xz0m7l', null, classes, {
133			table: $$props.type === "table",
134			gallery: $$props.type === "gallery",
135			selected: selected(),
136			border: value()
137		});
138
139		set_text(text$1, value().text ? value().text : "");
140	});
141
142	bind_element_size(div, 'clientWidth', ($$value) => set(size, $$value));
143	append($$anchor, div);
144	pop();
145}
146
147export { Example as default };
148//# sourceMappingURL=Example-Ciz_10jH.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.