PageSourceSearch

https://1keep.com/_app/immutable/entry/(app)-layout.svelte.4837a781.js

js 1keep.com collected 2026-09-28 06:36:53 UTC 65,992 bytes, 1,890 lines download raw bytes

1import { S as SvelteComponent, i as init, s as safe_not_equal, k as element, y as create_component, a as space, l as claim_element, m as children, z as claim_component, h as detach, c as claim_space, n as attr, M as src_url_equal, b as insert_hydration, K as append_hydration, A as mount_component, C as noop, g as transition_in, d as transition_out, B as destroy_component, q as text, r as claim_text, p as set_style, u as set_data, L as component_subscribe, N as listen, F as is_function, E as run_all, O as getContext, w as binding_callbacks, v as group_outros, f as check_outros, P as destroy_each, o as onMount, Q as toggle_class, R as svg_element, T as claim_svg_element, U as handle_promise, V as head_selector, W as action_destroyer, X as update_await_block_branch, Y as setContext, e as empty, G as create_slot, H as update_slot_base, I as get_all_dirty_from_scope, J as get_slot_changes } from '../chunks/index.ce768326.js';
2import { a as afterNavigate, g as goto } from '../chunks/navigation.3e146b75.js';
3/* empty css                                  */import { I as Icon } from '../chunks/Icon.5e812b5c.js';
4import { g as getActiveDIDHash, s as settings } from '../chunks/settings.a15c9dc4.js';
5import { _ as __vitePreload } from '../chunks/preload-helper.6910039e.js';
6import { r as registerPlugin } from '../chunks/index.4eb3fa34.js';
7import { s as sidebarOpen, u as userMenuOpen, t as title, v as views, c as cameraOpen } from '../chunks/ui.1afa56b4.js';
8import { g as getVCs, w as wallet, f as findTheMagic } from '../chunks/wallet.f9c29244.js';
9import { c as chat } from '../chunks/chat.d539b8dc.js';
10import { C as ContactCard } from '../chunks/ContactCard.95686d6f.js';
11import '../chunks/singletons.997466d3.js';
12import { L as Loading } from '../chunks/Loading.f65422fb.js';
13import '../chunks/sha256.4d501cbe.js';
14import { d as deriveKeyFromSeed, E as Ed25519VerificationKey2020, a as deriveKeyFromHd, s as sha256 } from '../chunks/pbkdf2.2a33b8e7.js';
15import { m as mnemonicToSeed } from '../chunks/didcomm.33129029.js';
16import '../chunks/MiniCollectible.svelte_svelte_type_style_lang.6e7fac41.js';
17import { w as writable } from '../chunks/index.ebf84420.js';
18import { A as Avatar } from '../chunks/Avatar.888a4cfb.js';
19import { i as installCHAPI, e as env } from '../chunks/chapi.0438a6c2.js';
20import { b as background } from '../chunks/background.c9e925ff.js';
21import { c as commonjsGlobal } from '../chunks/_commonjsHelpers.24198af3.js';
22import { M as Miner } from '../chunks/miner.6f21ce53.js';
23
24/* src/lib/components/Footer.svelte generated by Svelte v3.58.0 */
25
26function create_fragment$5(ctx) {
27	let div;
28	let a0;
29	let icon0;
30	let t0;
31	let a1;
32	let icon1;
33	let t1;
34	let a2;
35	let img;
36	let img_src_value;
37	let current;
38
39	icon0 = new Icon({
40			props: { icon: "clarity-house-solid", width: "30" }
41		});
42
43	icon1 = new Icon({
44			props: { icon: "lucide-qr-code", width: "36" }
45		});
46
47	return {
48		c() {
49			div = element("div");
50			a0 = element("a");
51			create_component(icon0.$$.fragment);
52			t0 = space();
53			a1 = element("a");
54			create_component(icon1.$$.fragment);
55			t1 = space();
56			a2 = element("a");
57			img = element("img");
58			this.h();
59		},
60		l(nodes) {
61			div = claim_element(nodes, "DIV", { class: true });
62			var div_nodes = children(div);
63			a0 = claim_element(div_nodes, "A", { href: true, class: true });
64			var a0_nodes = children(a0);
65			claim_component(icon0.$$.fragment, a0_nodes);
66			a0_nodes.forEach(detach);
67			t0 = claim_space(div_nodes);
68			a1 = claim_element(div_nodes, "A", { href: true, class: true });
69			var a1_nodes = children(a1);
70			claim_component(icon1.$$.fragment, a1_nodes);
71			a1_nodes.forEach(detach);
72			t1 = claim_space(div_nodes);
73			a2 = claim_element(div_nodes, "A", { href: true, class: true });
74			var a2_nodes = children(a2);
75			img = claim_element(a2_nodes, "IMG", { src: true, alt: true, class: true });
76			a2_nodes.forEach(detach);
77			div_nodes.forEach(detach);
78			this.h();
79		},
80		h() {
81			attr(a0, "href", "/");
82			attr(a0, "class", "px-6 text-amber-300");
83			attr(a1, "href", "/invite/scan");
84			attr(a1, "class", "-mt-7 p-4 text-white border-2 border-amber-300 rounded-full bg-stone-800");
85			if (!src_url_equal(img.src, img_src_value = "/1keep-pixel.png")) attr(img, "src", img_src_value);
86			attr(img, "alt", "1keep");
87			attr(img, "class", "w-[30px]");
88			attr(a2, "href", "/credentials");
89			attr(a2, "class", "px-6");
90			attr(div, "class", "flex justify-between items-center m-auto bg-stone-800 p-5 pb-10 h-20 border-t border-amber-300");
91		},
92		m(target, anchor) {
93			insert_hydration(target, div, anchor);
94			append_hydration(div, a0);
95			mount_component(icon0, a0, null);
96			append_hydration(div, t0);
97			append_hydration(div, a1);
98			mount_component(icon1, a1, null);
99			append_hydration(div, t1);
100			append_hydration(div, a2);
101			append_hydration(a2, img);
102			current = true;
103		},
104		p: noop,
105		i(local) {
106			if (current) return;
107			transition_in(icon0.$$.fragment, local);
108			transition_in(icon1.$$.fragment, local);
109			current = true;
110		},
111		o(local) {
112			transition_out(icon0.$$.fragment, local);
113			transition_out(icon1.$$.fragment, local);
114			current = false;
115		},
116		d(detaching) {
117			if (detaching) detach(div);
118			destroy_component(icon0);
119			destroy_component(icon1);
120		}
121	};
122}
123
124function instance$5($$self) {
125	getActiveDIDHash(settings);
126	return [];
127}
128
129class Footer extends SvelteComponent {
130	constructor(options) {
131		super();
132		init(this, options, instance$5, create_fragment$5, safe_not_equal, {});
133	}
134}
135
136const App = registerPlugin('App', {
137    web: () => __vitePreload(() => import('../chunks/web.98532ed6.js'),true?["../chunks/web.98532ed6.js","../chunks/index.4eb3fa34.js"]:void 0,import.meta.url).then(m => new m.AppWeb()),
138});
139
140/* src/lib/components/Header.svelte generated by Svelte v3.58.0 */
141
142function create_fragment$4(ctx) {
143	let div6;
144	let div2;
145	let div1;
146	let div0;
147	let t0;
148	let t1;
149	let div3;
150	let t2;
151	let t3;
152	let a;
153	let t4_value = (/*$title*/ ctx[1] ?? '') + "";
154	let t4;
155	let t5;
156	let div5;
157	let div4;
158	let contactcard;
159	let current;
160
161	contactcard = new ContactCard({
162			props: {
163				href: "/settings",
164				hash: /*$activeHash*/ ctx[2],
165				name: /*$settings*/ ctx[0].expiryMinutes
166				? /*$settings*/ ctx[0].expiryMinutes.toString()
167				: '?',
168				profileImage: /*$settings*/ ctx[0].pfp?.credentialSubject?.image,
169				compact: true,
170				size: "md"
171			}
172		});
173
174	return {
175		c() {
176			div6 = element("div");
177			div2 = element("div");
178			div1 = element("div");
179			div0 = element("div");
180			t0 = text("DEMO");
181			t1 = space();
182			div3 = element("div");
183			t2 = text(" ");
184			t3 = space();
185			a = element("a");
186			t4 = text(t4_value);
187			t5 = space();
188			div5 = element("div");
189			div4 = element("div");
190			create_component(contactcard.$$.fragment);
191			this.h();
192		},
193		l(nodes) {
194			div6 = claim_element(nodes, "DIV", { class: true });
195			var div6_nodes = children(div6);
196			div2 = claim_element(div6_nodes, "DIV", { class: true });
197			var div2_nodes = children(div2);
198			div1 = claim_element(div2_nodes, "DIV", { class: true, style: true });
199			var div1_nodes = children(div1);
200			div0 = claim_element(div1_nodes, "DIV", { class: true });
201			var div0_nodes = children(div0);
202			t0 = claim_text(div0_nodes, "DEMO");
203			div0_nodes.forEach(detach);
204			div1_nodes.forEach(detach);
205			div2_nodes.forEach(detach);
206			t1 = claim_space(div6_nodes);
207			div3 = claim_element(div6_nodes, "DIV", { class: true });
208			var div3_nodes = children(div3);
209			t2 = claim_text(div3_nodes, " ");
210			div3_nodes.forEach(detach);
211			t3 = claim_space(div6_nodes);
212			a = claim_element(div6_nodes, "A", { href: true, class: true });
213			var a_nodes = children(a);
214			t4 = claim_text(a_nodes, t4_value);
215			a_nodes.forEach(detach);
216			t5 = claim_space(div6_nodes);
217			div5 = claim_element(div6_nodes, "DIV", { class: true });
218			var div5_nodes = children(div5);
219			div4 = claim_element(div5_nodes, "DIV", { class: true });
220			var div4_nodes = children(div4);
221			claim_component(contactcard.$$.fragment, div4_nodes);
222			div4_nodes.forEach(detach);
223			div5_nodes.forEach(detach);
224			div6_nodes.forEach(detach);
225			this.h();
226		},
227		h() {
228			attr(div0, "class", "text-stone-800");
229			attr(div1, "class", "bg-amber-300 origin-top mt-6 mr-9 w-48 text-center text-white font-bold");
230			set_style(div1, "transform", "translateX(-38%) rotate(-45deg)");
231			attr(div2, "class", "absolute top-0 bottom-0 left-0 z-10 overflow-hidden");
232			attr(div3, "class", "w-16");
233			attr(a, "href", "/");
234			attr(a, "class", "flex-grow text-center text-amber-300 text-xl satoshi font-bold py-1");
235			attr(div4, "class", "px-3 relative inline-block text-left");
236			attr(div5, "class", "w-16 my-auto text-right");
237			attr(div6, "class", "bg-stone-800/5 w-full backdrop-blur-xl py-2 flex items-center justify-between h-20");
238		},
239		m(target, anchor) {
240			insert_hydration(target, div6, anchor);
241			append_hydration(div6, div2);
242			append_hydration(div2, div1);
243			append_hydration(div1, div0);
244			append_hydration(div0, t0);
245			append_hydration(div6, t1);
246			append_hydration(div6, div3);
247			append_hydration(div3, t2);
248			append_hydration(div6, t3);
249			append_hydration(div6, a);
250			append_hydration(a, t4);
251			append_hydration(div6, t5);
252			append_hydration(div6, div5);
253			append_hydration(div5, div4);
254			mount_component(contactcard, div4, null);
255			current = true;
256		},
257		p(ctx, [dirty]) {
258			if ((!current || dirty & /*$title*/ 2) && t4_value !== (t4_value = (/*$title*/ ctx[1] ?? '') + "")) set_data(t4, t4_value);
259			const contactcard_changes = {};
260			if (dirty & /*$activeHash*/ 4) contactcard_changes.hash = /*$activeHash*/ ctx[2];
261
262			if (dirty & /*$settings*/ 1) contactcard_changes.name = /*$settings*/ ctx[0].expiryMinutes
263			? /*$settings*/ ctx[0].expiryMinutes.toString()
264			: '?';
265
266			if (dirty & /*$settings*/ 1) contactcard_changes.profileImage = /*$settings*/ ctx[0].pfp?.credentialSubject?.image;
267			contactcard.$set(contactcard_changes);
268		},
269		i(local) {
270			if (current) return;
271			transition_in(contactcard.$$.fragment, local);
272			current = true;
273		},
274		o(local) {
275			transition_out(contactcard.$$.fragment, local);
276			current = false;
277		},
278		d(detaching) {
279			if (detaching) detach(div6);
280			destroy_component(contactcard);
281		}
282	};
283}
284
285function instance$4($$self, $$props, $$invalidate) {
286	let $settings;
287	let $vcs;
288	let $title;
289	let $activeHash;
290	component_subscribe($$self, sidebarOpen, $$value => $$invalidate(7, $$value));
291	component_subscribe($$self, userMenuOpen, $$value => $$invalidate(8, $$value));
292	component_subscribe($$self, settings, $$value => $$invalidate(0, $settings = $$value));
293	component_subscribe($$self, title, $$value => $$invalidate(1, $title = $$value));
294	let activeHash = getActiveDIDHash(settings);
295	component_subscribe($$self, activeHash, value => $$invalidate(2, $activeHash = value));
296	let vcs = getVCs(wallet);
297	component_subscribe($$self, vcs, value => $$invalidate(5, $vcs = value));
298
299	const interval = setInterval(
300		() => {
301			if ($settings.expiryMinutes < 0) {
302				clearInterval(interval);
303				Promise.all([wallet.reset(), chat.reset(), settings.reset()]);
304			} else {
305				settings.update(s => ({ ...s, expiryMinutes: s.expiryMinutes - 1 }));
306			}
307		},
308		60 * 1000
309	);
310
311	$$self.$$.update = () => {
312		if ($$self.$$.dirty & /*$vcs*/ 32) {
313			$vcs.find(vc => typeof vc.credentialSubject.name !== 'undefined');
314		}
315	};
316
317	return [$settings, $title, $activeHash, activeHash, vcs, $vcs];
318}
319
320class Header extends SvelteComponent {
321	constructor(options) {
322		super();
323		init(this, options, instance$4, create_fragment$4, safe_not_equal, {});
324	}
325}
326
327const possibleDIDs = writable([]);
328
329/* src/lib/components/Onboarding/Start.svelte generated by Svelte v3.58.0 */
330
331function create_fragment$3(ctx) {
332	let div;
333	let button0;
334	let t0;
335	let t1;
336	let button1;
337	let t2;
338	let t3;
339	let input;
340	let mounted;
341	let dispose;
342
343	return {
344		c() {
345			div = element("div");
346			button0 = element("button");
347			t0 = text("Create New Wallet");
348			t1 = space();
349			button1 = element("button");
350			t2 = text("Restore Backup");
351			t3 = space();
352			input = element("input");
353			this.h();
354		},
355		l(nodes) {
356			div = claim_element(nodes, "DIV", { class: true });
357			var div_nodes = children(div);
358			button0 = claim_element(div_nodes, "BUTTON", { class: true });
359			var button0_nodes = children(button0);
360			t0 = claim_text(button0_nodes, "Create New Wallet");
361			button0_nodes.forEach(detach);
362			t1 = claim_space(div_nodes);
363			button1 = claim_element(div_nodes, "BUTTON", { class: true });
364			var button1_nodes = children(button1);
365			t2 = claim_text(button1_nodes, "Restore Backup");
366			button1_nodes.forEach(detach);
367			t3 = claim_space(div_nodes);
368			input = claim_element(div_nodes, "INPUT", { style: true, type: true, accept: true });
369			div_nodes.forEach(detach);
370			this.h();
371		},
372		h() {
373			attr(button0, "class", "text-center inline-flex items-center px-4 py-2 shadow-sm text-lg rounded-md text-stone-800 font-bold bg-amber-300 font hover:backdrop-blur-xl hover:opacity-70 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-yellow-300 sm:order-0 sm:ml-0 satoshi");
374			attr(button1, "class", "order-1 inline-flex items-center justify-center px-4 py-2 border border-amber-300 w-full text-lg rounded-md bg-stone-800 text-amber-300 font hover:backdrop-blur-xl hover:opacity-70 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-yellow-300 sm:order-0 sm:ml-0 satoshi");
375			set_style(input, "display", "none");
376			attr(input, "type", "file");
377			attr(input, "accept", ".json");
378			attr(div, "class", "flex items-center flex-col gap-6 my-20");
379		},
380		m(target, anchor) {
381			insert_hydration(target, div, anchor);
382			append_hydration(div, button0);
383			append_hydration(button0, t0);
384			append_hydration(div, t1);
385			append_hydration(div, button1);
386			append_hydration(button1, t2);
387			append_hydration(div, t3);
388			append_hydration(div, input);
389			/*input_binding*/ ctx[6](input);
390
391			if (!mounted) {
392				dispose = [
393					listen(button0, "click", function () {
394						if (is_function(/*begin*/ ctx[0])) /*begin*/ ctx[0].apply(this, arguments);
395					}),
396					listen(button1, "click", /*click_handler*/ ctx[4]),
397					listen(input, "change", /*change_handler*/ ctx[5])
398				];
399
400				mounted = true;
401			}
402		},
403		p(new_ctx, [dirty]) {
404			ctx = new_ctx;
405		},
406		i: noop,
407		o: noop,
408		d(detaching) {
409			if (detaching) detach(div);
410			/*input_binding*/ ctx[6](null);
411			mounted = false;
412			run_all(dispose);
413		}
414	};
415}
416
417function instance$3($$self, $$props, $$invalidate) {
418	let { difficulty = 3 } = $$props;
419	let { begin } = $$props;
420	getContext('miner');
421	let fileinput;
422
423	// const generate = async () => {
424	// 	generateClicked = true;
425	// 	possibleDIDs.set([]);
426	// 	await mine(difficulty);
427	// };
428	// const mine = async (zeros: number) => {
429	// 	begin();
430	// 	difficulty = zeros;
431	// 	mining = true;
432	// 	await findD1D();
433	// };
434	// const findD1D = async () => {
435	// 	while ($possibleDIDs.length < 6) {
436	// 		const mnemonic = entropyToMnemonic(randomBytes(32));
437	// 		const seed = mnemonicToSeed(mnemonic);
438	// 		const hd = deriveKeyFromSeed(seed, 'm');
439	// 		const rootDID = Ed25519VerificationKey2020.fromHD(hd);
440	// 		await wallet.addDID(rootDID.controller);
441	// 		await wallet.addKey(rootDID.controller, {
442	// 			id: rootDID.id,
443	// 			controller: rootDID.controller,
444	// 			publicKeyMultibase: rootDID.publicKeyMultibase,
445	// 			privateKeyMultibase: rootDID.privateKeyMultibase
446	// 		});
447	// 		possibleDIDs.update((dids) => [...dids, rootDID.controller]);
448	// 	}
449	// };
450	const restore = e => {
451		let backupFile = e.target.files[0];
452		let reader = new FileReader();
453		reader.readAsText(backupFile);
454
455		reader.onload = async e => {
456			const vcs = JSON.parse(e.target.result);
457			let activeDID = null;
458			let path = null;
459			let mnemonic = null;
460			let master = null;
461
462			for (const vc of vcs) {
463				const magic = await findTheMagic(vc);
464				wallet.addVC(magic, vc);
465
466				if (vc.type.indexOf('AccountSeed') >= 0) {
467					path = vc.credentialSubject.path;
468					mnemonic = vc.credentialSubject.seed;
469					const seed = mnemonicToSeed(vc.credentialSubject.seed);
470					master = deriveKeyFromSeed(seed, 'm');
471					const root = Ed25519VerificationKey2020.fromHD(master);
472
473					wallet.addKey(root.controller, {
474						id: root.id,
475						controller: root.controller,
476						publicKeyMultibase: root.publicKeyMultibase,
477						privateKeyMultibase: root.privateKeyMultibase
478					});
479
480					wallet.addDID(root.controller);
481					const account = deriveKeyFromHd(master, path);
482					const accountDID = Ed25519VerificationKey2020.fromHD(account);
483
484					wallet.addKey(accountDID.controller, {
485						id: accountDID.id,
486						controller: accountDID.controller,
487						publicKeyMultibase: accountDID.publicKeyMultibase,
488						privateKeyMultibase: accountDID.privateKeyMultibase
489					});
490
491					wallet.addDID(accountDID.controller);
492					activeDID = accountDID.controller;
493				}
494			}
495
496			if (!activeDID || !path || !mnemonic) {
497				console.error('No Account Seed VC found');
498				return;
499			}
500
501			let unused = false;
502			let i = 0;
503			let nextPath;
504
505			while (!unused) {
506				nextPath = `${path}/${i}'`;
507				const newKey = deriveKeyFromHd(master, nextPath);
508				const newDID = Ed25519VerificationKey2020.fromHD(newKey);
509
510				if (vcs.filter(vc => vc.credentialSubject.id === newDID.controller).length > 0) {
511					wallet.addKey(newDID.controller, {
512						id: newDID.id,
513						controller: newDID.controller,
514						publicKeyMultibase: newDID.publicKeyMultibase,
515						privateKeyMultibase: newDID.privateKeyMultibase
516					});
517
518					wallet.addDID(newDID.controller);
519				} else {
520					unused = true;
521				}
522
523				i++;
524			}
525
526			settings.set('seed', mnemonic);
527			settings.set('activeDID', activeDID);
528			settings.set('nextKeyPath', nextPath);
529		};
530	};
531
532	const click_handler = () => {
533		fileinput.click();
534	};
535
536	const change_handler = e => restore(e);
537
538	function input_binding($$value) {
539		binding_callbacks[$$value ? 'unshift' : 'push'](() => {
540			fileinput = $$value;
541			$$invalidate(1, fileinput);
542		});
543	}
544
545	$$self.$$set = $$props => {
546		if ('difficulty' in $$props) $$invalidate(3, difficulty = $$props.difficulty);
547		if ('begin' in $$props) $$invalidate(0, begin = $$props.begin);
548	};
549
550	return [
551		begin,
552		fileinput,
553		restore,
554		difficulty,
555		click_handler,
556		change_handler,
557		input_binding
558	];
559}
560
561class Start extends SvelteComponent {
562	constructor(options) {
563		super();
564		init(this, options, instance$3, create_fragment$3, safe_not_equal, { difficulty: 3, begin: 0 });
565	}
566}
567
568/* src/lib/components/Onboarding/OnboardingDID.svelte generated by Svelte v3.58.0 */
569
570function get_each_context(ctx, list, i) {
571	const child_ctx = ctx.slice();
572	child_ctx[4] = list[i];
573	return child_ctx;
574}
575
576// (58:1) {#each $possibleDIDs as did}
577function create_each_block(ctx) {
578	let button;
579	let contactcard;
580	let t;
581	let current;
582	let mounted;
583	let dispose;
584
585	contactcard = new ContactCard({
586			props: {
587				compact: true,
588				hash: sha256(/*did*/ ctx[4].did)
589			}
590		});
591
592	function click_handler() {
593		return /*click_handler*/ ctx[3](/*did*/ ctx[4]);
594	}
595
596	return {
597		c() {
598			button = element("button");
599			create_component(contactcard.$$.fragment);
600			t = space();
601		},
602		l(nodes) {
603			button = claim_element(nodes, "BUTTON", {});
604			var button_nodes = children(button);
605			claim_component(contactcard.$$.fragment, button_nodes);
606			t = claim_space(button_nodes);
607			button_nodes.forEach(detach);
608		},
609		m(target, anchor) {
610			insert_hydration(target, button, anchor);
611			mount_component(contactcard, button, null);
612			append_hydration(button, t);
613			current = true;
614
615			if (!mounted) {
616				dispose = listen(button, "click", click_handler);
617				mounted = true;
618			}
619		},
620		p(new_ctx, dirty) {
621			ctx = new_ctx;
622			const contactcard_changes = {};
623			if (dirty & /*$possibleDIDs*/ 1) contactcard_changes.hash = sha256(/*did*/ ctx[4].did);
624			contactcard.$set(contactcard_changes);
625		},
626		i(local) {
627			if (current) return;
628			transition_in(contactcard.$$.fragment, local);
629			current = true;
630		},
631		o(local) {
632			transition_out(contactcard.$$.fragment, local);
633			current = false;
634		},
635		d(detaching) {
636			if (detaching) detach(button);
637			destroy_component(contactcard);
638			mounted = false;
639			dispose();
640		}
641	};
642}
643
644function create_fragment$2(ctx) {
645	let h1;
646	let t0;
647	let t1;
648	let div;
649	let current;
650	let each_value = /*$possibleDIDs*/ ctx[0];
651	let each_blocks = [];
652
653	for (let i = 0; i < each_value.length; i += 1) {
654		each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
655	}
656
657	const out = i => transition_out(each_blocks[i], 1, 1, () => {
658		each_blocks[i] = null;
659	});
660
661	return {
662		c() {
663			h1 = element("h1");
664			t0 = text("What is your favourite color?");
665			t1 = space();
666			div = element("div");
667
668			for (let i = 0; i < each_blocks.length; i += 1) {
669				each_blocks[i].c();
670			}
671
672			this.h();
673		},
674		l(nodes) {
675			h1 = claim_element(nodes, "H1", { class: true });
676			var h1_nodes = children(h1);
677			t0 = claim_text(h1_nodes, "What is your favourite color?");
678			h1_nodes.forEach(detach);
679			t1 = claim_space(nodes);
680			div = claim_element(nodes, "DIV", { class: true });
681			var div_nodes = children(div);
682
683			for (let i = 0; i < each_blocks.length; i += 1) {
684				each_blocks[i].l(div_nodes);
685			}
686
687			div_nodes.forEach(detach);
688			this.h();
689		},
690		h() {
691			attr(h1, "class", "text-center satoshi text-amber-300 text-lg");
692			attr(div, "class", "m-5 satoshi grid grid-cols-3 gap-10");
693		},
694		m(target, anchor) {
695			insert_hydration(target, h1, anchor);
696			append_hydration(h1, t0);
697			insert_hydration(target, t1, anchor);
698			insert_hydration(target, div, anchor);
699
700			for (let i = 0; i < each_blocks.length; i += 1) {
701				if (each_blocks[i]) {
702					each_blocks[i].m(div, null);
703				}
704			}
705
706			current = true;
707		},
708		p(ctx, [dirty]) {
709			if (dirty & /*selectDID, $possibleDIDs, sha256*/ 3) {
710				each_value = /*$possibleDIDs*/ ctx[0];
711				let i;
712
713				for (i = 0; i < each_value.length; i += 1) {
714					const child_ctx = get_each_context(ctx, each_value, i);
715
716					if (each_blocks[i]) {
717						each_blocks[i].p(child_ctx, dirty);
718						transition_in(each_blocks[i], 1);
719					} else {
720						each_blocks[i] = create_each_block(child_ctx);
721						each_blocks[i].c();
722						transition_in(each_blocks[i], 1);
723						each_blocks[i].m(div, null);
724					}
725				}
726
727				group_outros();
728
729				for (i = each_value.length; i < each_blocks.length; i += 1) {
730					out(i);
731				}
732
733				check_outros();
734			}
735		},
736		i(local) {
737			if (current) return;
738
739			for (let i = 0; i < each_value.length; i += 1) {
740				transition_in(each_blocks[i]);
741			}
742
743			current = true;
744		},
745		o(local) {
746			each_blocks = each_blocks.filter(Boolean);
747
748			for (let i = 0; i < each_blocks.length; i += 1) {
749				transition_out(each_blocks[i]);
750			}
751
752			current = false;
753		},
754		d(detaching) {
755			if (detaching) detach(h1);
756			if (detaching) detach(t1);
757			if (detaching) detach(div);
758			destroy_each(each_blocks, detaching);
759		}
760	};
761}
762
763function instance$2($$self, $$props, $$invalidate) {
764	let $possibleDIDs;
765	component_subscribe($$self, possibleDIDs, $$value => $$invalidate(0, $possibleDIDs = $$value));
766	let { begin } = $$props;
767
768	const selectDID = async did => {
769		const selectedOptions = $possibleDIDs.find(d => d.did === did);
770		await settings.set('expiryMinutes', 60);
771		await wallet.addDID(did);
772		console.log('selecting account DID:', did);
773		console.log('selected key ', selectedOptions.key);
774
775		await wallet.addKey(did, {
776			id: selectedOptions.key.id,
777			controller: selectedOptions.key.controller,
778			type: selectedOptions.key.type,
779			publicKeyMultibase: selectedOptions.key.publicKeyMultibase,
780			privateKeyMultibase: selectedOptions.key.privateKeyMultibase
781		});
782
783		begin(did);
784	};
785
786	onMount(async () => {
787		let i = 0;
788
789		if ($possibleDIDs.length === 0) {
790			while (i < 9) {
791				// const mnemonic = entropyToMnemonic(randomBytes(32));
792				// const seed = mnemonicToSeed(mnemonic);
793				// const hd = deriveKeyFromSeed(seed, 'm');
794				// const rootDID = Ed25519VerificationKey2020.fromHD(hd);
795				const rootDID = await Ed25519VerificationKey2020.generate();
796
797				possibleDIDs.update(dids => [
798					...dids,
799					{
800						did: rootDID.controller,
801						// mnemonic,
802						// seed,
803						// hd,
804						key: {
805							id: rootDID.id,
806							controller: rootDID.controller,
807							publicKeyMultibase: rootDID.publicKeyMultibase,
808							privateKeyMultibase: rootDID.privateKeyMultibase,
809							type: rootDID.type
810						}
811					}
812				]);
813
814				i++;
815			}
816		}
817	});
818
819	const click_handler = did => selectDID(did.did);
820
821	$$self.$$set = $$props => {
822		if ('begin' in $$props) $$invalidate(2, begin = $$props.begin);
823	};
824
825	return [$possibleDIDs, selectDID, begin, click_handler];
826}
827
828class OnboardingDID extends SvelteComponent {
829	constructor(options) {
830		super();
831		init(this, options, instance$2, create_fragment$2, safe_not_equal, { begin: 2 });
832	}
833}
834
835/* src/lib/components/Onboarding/Onboarding.svelte generated by Svelte v3.58.0 */
836
837function create_else_block$1(ctx) {
838	let button;
839	let t;
840	let mounted;
841	let dispose;
842
843	return {
844		c() {
845			button = element("button");
846			t = text("Enable CHAPI");
847			this.h();
848		},
849		l(nodes) {
850			button = claim_element(nodes, "BUTTON", { class: true });
851			var button_nodes = children(button);
852			t = claim_text(button_nodes, "Enable CHAPI");
853			button_nodes.forEach(detach);
854			this.h();
855		},
856		h() {
857			attr(button, "class", "min-w-0 p-2 backdrop-blur-xl flex-1 flex gap-3 items-center justify-center font-medium text-amber-300 border-2 border-amber-300 rounded-md text-lg");
858		},
859		m(target, anchor) {
860			insert_hydration(target, button, anchor);
861			append_hydration(button, t);
862
863			if (!mounted) {
864				dispose = listen(button, "click", installCHAPI);
865				mounted = true;
866			}
867		},
868		p: noop,
869		d(detaching) {
870			if (detaching) detach(button);
871			mounted = false;
872			dispose();
873		}
874	};
875}
876
877// (69:3) {#if $settings.chapiInstalled}
878function create_if_block$1(ctx) {
879	let button;
880	let t;
881	let svg;
882	let path;
883	let mounted;
884	let dispose;
885
886	return {
887		c() {
888			button = element("button");
889			t = text("CHAPI Enabled");
890			svg = svg_element("svg");
891			path = svg_element("path");
892			this.h();
893		},
894		l(nodes) {
895			button = claim_element(nodes, "BUTTON", { class: true });
896			var button_nodes = children(button);
897			t = claim_text(button_nodes, "CHAPI Enabled");
898
899			svg = claim_svg_element(button_nodes, "svg", {
900				xmlns: true,
901				viewBox: true,
902				fill: true,
903				class: true
904			});
905
906			var svg_nodes = children(svg);
907
908			path = claim_svg_element(svg_nodes, "path", {
909				"fill-rule": true,
910				d: true,
911				"clip-rule": true
912			});
913
914			children(path).forEach(detach);
915			svg_nodes.forEach(detach);
916			button_nodes.forEach(detach);
917			this.h();
918		},
919		h() {
920			attr(path, "fill-rule", "evenodd");
921			attr(path, "d", "M8.603 3.799A4.49 4.49 0 0112 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 013.498 1.307 4.491 4.491 0 011.307 3.497A4.49 4.49 0 0121.75 12a4.49 4.49 0 01-1.549 3.397 4.491 4.491 0 01-1.307 3.497 4.491 4.491 0 01-3.497 1.307A4.49 4.49 0 0112 21.75a4.49 4.49 0 01-3.397-1.549 4.49 4.49 0 01-3.498-1.306 4.491 4.491 0 01-1.307-3.498A4.49 4.49 0 012.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 011.307-3.497 4.49 4.49 0 013.497-1.307zm7.007 6.387a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z");
922			attr(path, "clip-rule", "evenodd");
923			attr(svg, "xmlns", "http://www.w3.org/2000/svg");
924			attr(svg, "viewBox", "0 0 24 24");
925			attr(svg, "fill", "currentColor");
926			attr(svg, "class", "ml-2 w-6 h-6 fill-green-400");
927			attr(button, "class", "min-w-0 p-2 backdrop-blur-xl flex-1 flex gap-3 items-center justify-center font-medium text-amber-300 border-2 border-amber-300 rounded-md text-lg");
928		},
929		m(target, anchor) {
930			insert_hydration(target, button, anchor);
931			append_hydration(button, t);
932			append_hydration(button, svg);
933			append_hydration(svg, path);
934
935			if (!mounted) {
936				dispose = listen(button, "click", installCHAPI);
937				mounted = true;
938			}
939		},
940		p: noop,
941		d(detaching) {
942			if (detaching) detach(button);
943			mounted = false;
944			dispose();
945		}
946	};
947}
948
949function create_fragment$1(ctx) {
950	let div9;
951	let div0;
952	let img;
953	let img_src_value;
954	let t0;
955	let div1;
956	let start;
957	let t1;
958	let div2;
959	let onboardingdid;
960	let t2;
961	let div5;
962	let span0;
963	let t3;
964	let t4;
965	let span1;
966	let t5;
967	let t6;
968	let div4;
969	let avatar;
970	let t7;
971	let div3;
972	let t8;
973
974	let t9_value = (/*$settings*/ ctx[2].expiryMinutes && /*$settings*/ ctx[2].expiryMinutes >= 0
975	? /*$settings*/ ctx[2].expiryMinutes
976	: '?') + "";
977
978	let t9;
979	let t10;
980	let t11;
981	let button0;
982	let t12;
983	let t13;
984	let div8;
985	let div7;
986	let div6;
987	let t14;
988	let t15;
989	let t16;
990	let button1;
991	let t17;
992	let current;
993	let mounted;
994	let dispose;
995	start = new Start({ props: { begin: /*func*/ ctx[3] } });
996	onboardingdid = new OnboardingDID({ props: { begin: /*func_1*/ ctx[4] } });
997	avatar = new Avatar({ props: { account: /*newDID*/ ctx[1] } });
998
999	function select_block_type(ctx, dirty) {
1000		if (/*$settings*/ ctx[2].chapiInstalled) return create_if_block$1;
1001		return create_else_block$1;
1002	}
1003
1004	let current_block_type = select_block_type(ctx);
1005	let if_block = current_block_type(ctx);
1006
1007	return {
1008		c() {
1009			div9 = element("div");
1010			div0 = element("div");
1011			img = element("img");
1012			t0 = space();
1013			div1 = element("div");
1014			create_component(start.$$.fragment);
1015			t1 = space();
1016			div2 = element("div");
1017			create_component(onboardingdid.$$.fragment);
1018			t2 = space();
1019			div5 = element("div");
1020			span0 = element("span");
1021			t3 = text("Thank you for your interest in the 1Keep Demo.");
1022			t4 = space();
1023			span1 = element("span");
1024			t5 = text("Please send any feedback you may have to [email protected].");
1025			t6 = space();
1026			div4 = element("div");
1027			create_component(avatar.$$.fragment);
1028			t7 = space();
1029			div3 = element("div");
1030			t8 = text("This 1Keep demo will expire in ");
1031			t9 = text(t9_value);
1032			t10 = text(" minutes");
1033			t11 = space();
1034			button0 = element("button");
1035			t12 = text("Next");
1036			t13 = space();
1037			div8 = element("div");
1038			div7 = element("div");
1039			div6 = element("div");
1040			t14 = text("We recommend registering 1Keep as a credential handler on the web.");
1041			t15 = space();
1042			if_block.c();
1043			t16 = space();
1044			button1 = element("button");
1045			t17 = text("Enter");
1046			this.h();
1047		},
1048		l(nodes) {
1049			div9 = claim_element(nodes, "DIV", { class: true });
1050			var div9_nodes = children(div9);
1051			div0 = claim_element(div9_nodes, "DIV", { class: true });
1052			var div0_nodes = children(div0);
1053			img = claim_element(div0_nodes, "IMG", { src: true, alt: true, width: true });
1054			div0_nodes.forEach(detach);
1055			t0 = claim_space(div9_nodes);
1056			div1 = claim_element(div9_nodes, "DIV", {});
1057			var div1_nodes = children(div1);
1058			claim_component(start.$$.fragment, div1_nodes);
1059			div1_nodes.forEach(detach);
1060			t1 = claim_space(div9_nodes);
1061			div2 = claim_element(div9_nodes, "DIV", {});
1062			var div2_nodes = children(div2);
1063			claim_component(onboardingdid.$$.fragment, div2_nodes);
1064			div2_nodes.forEach(detach);
1065			t2 = claim_space(div9_nodes);
1066			div5 = claim_element(div9_nodes, "DIV", { class: true });
1067			var div5_nodes = children(div5);
1068			span0 = claim_element(div5_nodes, "SPAN", { class: true });
1069			var span0_nodes = children(span0);
1070			t3 = claim_text(span0_nodes, "Thank you for your interest in the 1Keep Demo.");
1071			span0_nodes.forEach(detach);
1072			t4 = claim_space(div5_nodes);
1073			span1 = claim_element(div5_nodes, "SPAN", { class: true });
1074			var span1_nodes = children(span1);
1075			t5 = claim_text(span1_nodes, "Please send any feedback you may have to [email protected].");
1076			span1_nodes.forEach(detach);
1077			t6 = claim_space(div5_nodes);
1078			div4 = claim_element(div5_nodes, "DIV", { class: true });
1079			var div4_nodes = children(div4);
1080			claim_component(avatar.$$.fragment, div4_nodes);
1081			t7 = claim_space(div4_nodes);
1082			div3 = claim_element(div4_nodes, "DIV", { class: true });
1083			var div3_nodes = children(div3);
1084			t8 = claim_text(div3_nodes, "This 1Keep demo will expire in ");
1085			t9 = claim_text(div3_nodes, t9_value);
1086			t10 = claim_text(div3_nodes, " minutes");
1087			div3_nodes.forEach(detach);
1088			div4_nodes.forEach(detach);
1089			t11 = claim_space(div5_nodes);
1090			button0 = claim_element(div5_nodes, "BUTTON", { class: true });
1091			var button0_nodes = children(button0);
1092			t12 = claim_text(button0_nodes, "Next");
1093			button0_nodes.forEach(detach);
1094			div5_nodes.forEach(detach);
1095			t13 = claim_space(div9_nodes);
1096			div8 = claim_element(div9_nodes, "DIV", {});
1097			var div8_nodes = children(div8);
1098			div7 = claim_element(div8_nodes, "DIV", { class: true });
1099			var div7_nodes = children(div7);
1100			div6 = claim_element(div7_nodes, "DIV", { class: true });
1101			var div6_nodes = children(div6);
1102			t14 = claim_text(div6_nodes, "We recommend registering 1Keep as a credential handler on the web.");
1103			div6_nodes.forEach(detach);
1104			t15 = claim_space(div7_nodes);
1105			if_block.l(div7_nodes);
1106			t16 = claim_space(div7_nodes);
1107			button1 = claim_element(div7_nodes, "BUTTON", { class: true });
1108			var button1_nodes = children(button1);
1109			t17 = claim_text(button1_nodes, "Enter");
1110			button1_nodes.forEach(detach);
1111			div7_nodes.forEach(detach);
1112			div8_nodes.forEach(detach);
1113			div9_nodes.forEach(detach);
1114			this.h();
1115		},
1116		h() {
1117			if (!src_url_equal(img.src, img_src_value = "/1keep.png")) attr(img, "src", img_src_value);
1118			attr(img, "alt", "1keep");
1119			attr(img, "width", "151");
1120			attr(div0, "class", "flex justify-center m-13");
1121			toggle_class(div1, "hidden", /*step*/ ctx[0] !== 0);
1122			toggle_class(div2, "hidden", /*step*/ ctx[0] !== 1);
1123			attr(span0, "class", "text-amber-300");
1124			attr(span1, "class", "text-amber-300");
1125			attr(div3, "class", "col-span-2 text-red-500 truncate font-bold");
1126			attr(div4, "class", "col-span-2 flex gap-3 items-center hover:bg-amber-300 transition-colors delay-200 p-2");
1127			attr(button0, "class", "p-2 backdrop-blur-xl font-medium text-amber-300 border-2 border-amber-300 rounded-md text-lg hover:bg-amber-300 hover:text-stone-800");
1128			attr(div5, "class", "max-w-md m-5 flex flex-col gap-3 items-center text-center");
1129			toggle_class(div5, "hidden", /*step*/ ctx[0] !== 2);
1130			attr(div6, "class", "text-amber-300 px-10");
1131			attr(button1, "class", "p-2 backdrop-blur-xl font-medium bg-amber-300 border-2 border-amber-300 rounded-md text-lg hover:backdrop-blur-xl hover:opacity-70 text-stone-800");
1132			attr(div7, "class", "flex items-center flex-col gap-6 max-w-md text-center m-5");
1133			toggle_class(div8, "hidden", /*step*/ ctx[0] !== 3);
1134			attr(div9, "class", "flex flex-col items-center justify-center gap-2 h-screen");
1135		},
1136		m(target, anchor) {
1137			insert_hydration(target, div9, anchor);
1138			append_hydration(div9, div0);
1139			append_hydration(div0, img);
1140			append_hydration(div9, t0);
1141			append_hydration(div9, div1);
1142			mount_component(start, div1, null);
1143			append_hydration(div9, t1);
1144			append_hydration(div9, div2);
1145			mount_component(onboardingdid, div2, null);
1146			append_hydration(div9, t2);
1147			append_hydration(div9, div5);
1148			append_hydration(div5, span0);
1149			append_hydration(span0, t3);
1150			append_hydration(div5, t4);
1151			append_hydration(div5, span1);
1152			append_hydration(span1, t5);
1153			append_hydration(div5, t6);
1154			append_hydration(div5, div4);
1155			mount_component(avatar, div4, null);
1156			append_hydration(div4, t7);
1157			append_hydration(div4, div3);
1158			append_hydration(div3, t8);
1159			append_hydration(div3, t9);
1160			append_hydration(div3, t10);
1161			append_hydration(div5, t11);
1162			append_hydration(div5, button0);
1163			append_hydration(button0, t12);
1164			append_hydration(div9, t13);
1165			append_hydration(div9, div8);
1166			append_hydration(div8, div7);
1167			append_hydration(div7, div6);
1168			append_hydration(div6, t14);
1169			append_hydration(div7, t15);
1170			if_block.m(div7, null);
1171			append_hydration(div7, t16);
1172			append_hydration(div7, button1);
1173			append_hydration(button1, t17);
1174			current = true;
1175
1176			if (!mounted) {
1177				dispose = [
1178					listen(button0, "click", /*click_handler*/ ctx[5]),
1179					listen(button1, "click", /*click_handler_1*/ ctx[6])
1180				];
1181
1182				mounted = true;
1183			}
1184		},
1185		p(ctx, [dirty]) {
1186			const start_changes = {};
1187			if (dirty & /*step*/ 1) start_changes.begin = /*func*/ ctx[3];
1188			start.$set(start_changes);
1189
1190			if (!current || dirty & /*step*/ 1) {
1191				toggle_class(div1, "hidden", /*step*/ ctx[0] !== 0);
1192			}
1193
1194			const onboardingdid_changes = {};
1195			if (dirty & /*step, newDID*/ 3) onboardingdid_changes.begin = /*func_1*/ ctx[4];
1196			onboardingdid.$set(onboardingdid_changes);
1197
1198			if (!current || dirty & /*step*/ 1) {
1199				toggle_class(div2, "hidden", /*step*/ ctx[0] !== 1);
1200			}
1201
1202			const avatar_changes = {};
1203			if (dirty & /*newDID*/ 2) avatar_changes.account = /*newDID*/ ctx[1];
1204			avatar.$set(avatar_changes);
1205
1206			if ((!current || dirty & /*$settings*/ 4) && t9_value !== (t9_value = (/*$settings*/ ctx[2].expiryMinutes && /*$settings*/ ctx[2].expiryMinutes >= 0
1207			? /*$settings*/ ctx[2].expiryMinutes
1208			: '?') + "")) set_data(t9, t9_value);
1209
1210			if (!current || dirty & /*step*/ 1) {
1211				toggle_class(div5, "hidden", /*step*/ ctx[0] !== 2);
1212			}
1213
1214			if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
1215				if_block.p(ctx, dirty);
1216			} else {
1217				if_block.d(1);
1218				if_block = current_block_type(ctx);
1219
1220				if (if_block) {
1221					if_block.c();
1222					if_block.m(div7, t16);
1223				}
1224			}
1225
1226			if (!current || dirty & /*step*/ 1) {
1227				toggle_class(div8, "hidden", /*step*/ ctx[0] !== 3);
1228			}
1229		},
1230		i(local) {
1231			if (current) return;
1232			transition_in(start.$$.fragment, local);
1233			transition_in(onboardingdid.$$.fragment, local);
1234			transition_in(avatar.$$.fragment, local);
1235			current = true;
1236		},
1237		o(local) {
1238			transition_out(start.$$.fragment, local);
1239			transition_out(onboardingdid.$$.fragment, local);
1240			transition_out(avatar.$$.fragment, local);
1241			current = false;
1242		},
1243		d(detaching) {
1244			if (detaching) detach(div9);
1245			destroy_component(start);
1246			destroy_component(onboardingdid);
1247			destroy_component(avatar);
1248			if_block.d();
1249			mounted = false;
1250			run_all(dispose);
1251		}
1252	};
1253}
1254
1255function instance$1($$self, $$props, $$invalidate) {
1256	let $settings;
1257	component_subscribe($$self, settings, $$value => $$invalidate(2, $settings = $$value));
1258	let step = 0;
1259	let newDID = null;
1260
1261	const func = () => {
1262		$$invalidate(0, step = 1);
1263	};
1264
1265	const func_1 = did => {
1266		$$invalidate(0, step = 2);
1267		$$invalidate(1, newDID = did);
1268	};
1269
1270	const click_handler = () => {
1271		$$invalidate(0, step = 3);
1272	};
1273
1274	const click_handler_1 = () => {
1275		settings.set('activeDID', newDID);
1276	};
1277
1278	return [step, newDID, $settings, func, func_1, click_handler, click_handler_1];
1279}
1280
1281class Onboarding extends SvelteComponent {
1282	constructor(options) {
1283		super();
1284		init(this, options, instance$1, create_fragment$1, safe_not_equal, {});
1285	}
1286}
1287
1288var durationExports = {};
1289var duration = {
1290  get exports(){ return durationExports; },
1291  set exports(v){ durationExports = v; },
1292};
1293
1294(function (module, exports) {
1295	!function(t,s){module.exports=s();}(commonjsGlobal,(function(){var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,h=2592e6,a=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,d={years:u,months:h,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof p},f=function(t,s,n){return new p(t,n,s.$l)},m=function(t){return s.p(t)+"s"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},g=function(t,s){return t?l(t)?{negative:!0,format:""+y(t)+s}:{negative:!1,format:""+t+s}:{negative:!1,format:""}},p=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*d[m(s)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s];})),this.calMilliseconds(),this;if("string"==typeof t){var e=t.match(a);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*d[n]}),0);},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/h),t%=h,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t;},y.toISOString=function(){var t=g(this.$d.years,"Y"),s=g(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=g(n,"D"),e=g(this.$d.hours,"H"),r=g(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var u=g(o,"S"),h=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?"T":"",d=(h?"-":"")+"P"+t.format+s.format+i.format+a+e.format+r.format+u.format;return "P"===d||"-P"===d?"P0D":d},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return n.replace(o,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/d[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return "milliseconds"===n?s%=1e3:s="weeks"===n?$(s/d[n]):this.$d[n],0===s?0:s},y.add=function(t,s,n){var i;return i=s?t*d[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!s)},y.milliseconds=function(){return this.get("milliseconds")},y.asMilliseconds=function(){return this.as("milliseconds")},y.seconds=function(){return this.get("seconds")},y.asSeconds=function(){return this.as("seconds")},y.minutes=function(){return this.get("minutes")},y.asMinutes=function(){return this.as("minutes")},y.hours=function(){return this.get("hours")},y.asHours=function(){return this.as("hours")},y.days=function(){return this.get("days")},y.asDays=function(){return this.as("days")},y.weeks=function(){return this.get("weeks")},y.asWeeks=function(){return this.as("weeks")},y.months=function(){return this.get("months")},y.asMonths=function(){return this.as("months")},y.years=function(){return this.get("years")},y.asYears=function(){return this.as("years")},l}();return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)&&(t=t.asMilliseconds()),r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)&&(t=t.asMilliseconds()),o.bind(this)(t,s)};}}));
1296} (duration));
1297
1298var utcExports = {};
1299var utc = {
1300  get exports(){ return utcExports; },
1301  set exports(v){ utcExports = v; },
1302};
1303
vendor: 4,408 bytes, lines 1304-1323
1304(function (module, exports) {
1305	!function(t,i){module.exports=i();}(commonjsGlobal,(function(){var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,e=/([+-]|\d\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t);};var r=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds();}else r.call(this);};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(i);if(!s)return null;var f=(""+s[0]).match(e)||["-",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:"+"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(f)return o.$offset=u,o.$u=0===s,o;if(0!==s){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+r,t)).$offset=u,o.$x.$localOffset=r;}else o=this.utc();return o};var h=u.format;u.format=function(t){var i=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return !!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return "s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)};}}));
1306} (utc));
1307
1308var timezoneExports = {};
1309var timezone = {
1310  get exports(){ return timezoneExports; },
1311  set exports(v){ timezoneExports = v; },
1312};
1313
1314(function (module, exports) {
1315	!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=t+"|"+i,r=e[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},u=function(e,n){for(var i=a(e,n),r=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(r[c]=parseInt(m,10));}var d=r[3],l=24===d?0:d,v=r[0]+"-"+r[1]+"-"+r[2]+" "+l+":"+r[4]+":"+r[5]+":000",h=+e;return (o.utc(v).valueOf()-(h-=h%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),a=i.toLocaleString("en-US",{timeZone:t}),u=Math.round((i-new Date(a))/1e3/60),f=o(a).$set("millisecond",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-u,!0);if(e){var s=f.utcOffset();f=f.add(n-s,"minute");}return f.$x.$timezone=t,f},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return "timezonename"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if("string"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return [i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t;};}}));
1316} (timezone));
1317
1318var customParseFormatExports = {};
1319var customParseFormat = {
1320  get exports(){ return customParseFormatExports; },
1321  set exports(v){ customParseFormatExports = v; },
1322};
1323
1324(function (module, exports) {
1325	!function(e,t){module.exports=t();}(commonjsGlobal,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return (e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e);}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[i,function(e){this.afternoon=u(e,!1);}],a:[i,function(e){this.afternoon=u(e,!0);}],S:[/\d/,function(e){this.milliseconds=100*+e;}],SS:[n,function(e){this.milliseconds=10*+e;}],SSS:[/\d{3}/,function(e){this.milliseconds=+e;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(e){var t=h("months"),n=(h("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(e){var t=h("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(e){this.year=s(e);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f<a;f+=1){var h=s[f],u=d[h],c=u&&u[0],l=u&&u[1];s[f]=l?{regex:c,parser:l}:h.replace(/^\[|\]$/g,"");}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else {var o=i.regex,f=i.parser,h=e.slice(r),u=o.exec(h)[0];f.call(t,u),e=e.replace(u,"");}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon;}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,s=e.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],h=!0===s[3],u=f||h,d=s[2];h&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(e,t,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date("")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,e);};}}));
1326} (customParseFormat));
1327
1328/* src/routes/(app)/+layout.svelte generated by Svelte v3.58.0 */
1329
1330function create_catch_block(ctx) {
1331	return {
1332		c: noop,
1333		l: noop,
1334		m: noop,
1335		p: noop,
1336		i: noop,
1337		o: noop,
1338		d: noop
1339	};
1340}
1341
1342// (71:1) {:then}
1343function create_then_block(ctx) {
1344	let current_block_type_index;
1345	let if_block;
1346	let if_block_anchor;
1347	let current;
1348	const if_block_creators = [create_if_block, create_else_block];
1349	const if_blocks = [];
1350
1351	function select_block_type(ctx, dirty) {
1352		if (/*$settings*/ ctx[3].activeDID) return 0;
1353		return 1;
1354	}
1355
1356	current_block_type_index = select_block_type(ctx);
1357	if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
1358
1359	return {
1360		c() {
1361			if_block.c();
1362			if_block_anchor = empty();
1363		},
1364		l(nodes) {
1365			if_block.l(nodes);
1366			if_block_anchor = empty();
1367		},
1368		m(target, anchor) {
1369			if_blocks[current_block_type_index].m(target, anchor);
1370			insert_hydration(target, if_block_anchor, anchor);
1371			current = true;
1372		},
1373		p(ctx, dirty) {
1374			let previous_block_index = current_block_type_index;
1375			current_block_type_index = select_block_type(ctx);
1376
1377			if (current_block_type_index === previous_block_index) {
1378				if_blocks[current_block_type_index].p(ctx, dirty);
1379			} else {
1380				group_outros();
1381
1382				transition_out(if_blocks[previous_block_index], 1, 1, () => {
1383					if_blocks[previous_block_index] = null;
1384				});
1385
1386				check_outros();
1387				if_block = if_blocks[current_block_type_index];
1388
1389				if (!if_block) {
1390					if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
1391					if_block.c();
1392				} else {
1393					if_block.p(ctx, dirty);
1394				}
1395
1396				transition_in(if_block, 1);
1397				if_block.m(if_block_anchor.parentNode, if_block_anchor);
1398			}
1399		},
1400		i(local) {
1401			if (current) return;
1402			transition_in(if_block);
1403			current = true;
1404		},
1405		o(local) {
1406			transition_out(if_block);
1407			current = false;
1408		},
1409		d(detaching) {
1410			if_blocks[current_block_type_index].d(detaching);
1411			if (detaching) detach(if_block_anchor);
1412		}
1413	};
1414}
1415
1416// (94:2) {:else}
1417function create_else_block(ctx) {
1418	let div1;
1419	let div0;
1420	let onboarding;
1421	let current;
1422	onboarding = new Onboarding({});
1423
1424	return {
1425		c() {
1426			div1 = element("div");
1427			div0 = element("div");
1428			create_component(onboarding.$$.fragment);
1429			this.h();
1430		},
1431		l(nodes) {
1432			div1 = claim_element(nodes, "DIV", { class: true });
1433			var div1_nodes = children(div1);
1434			div0 = claim_element(div1_nodes, "DIV", { id: true, class: true });
1435			var div0_nodes = children(div0);
1436			claim_component(onboarding.$$.fragment, div0_nodes);
1437			div0_nodes.forEach(detach);
1438			div1_nodes.forEach(detach);
1439			this.h();
1440		},
1441		h() {
1442			attr(div0, "id", "main-content");
1443			attr(div0, "class", "overflow-y-scroll scrollbar-hide flex-grow w-full max-w-lg");
1444			attr(div1, "class", "h-screen overflow-y-auto bg-stone-800 flex flex-col items-center");
1445		},
1446		m(target, anchor) {
1447			insert_hydration(target, div1, anchor);
1448			append_hydration(div1, div0);
1449			mount_component(onboarding, div0, null);
1450			current = true;
1451		},
1452		p: noop,
1453		i(local) {
1454			if (current) return;
1455			transition_in(onboarding.$$.fragment, local);
1456			current = true;
1457		},
1458		o(local) {
1459			transition_out(onboarding.$$.fragment, local);
1460			current = false;
1461		},
1462		d(detaching) {
1463			if (detaching) detach(div1);
1464			destroy_component(onboarding);
1465		}
1466	};
1467}
1468
1469// (72:2) {#if $settings.activeDID}
1470function create_if_block(ctx) {
1471	let if_block_anchor;
1472	let current;
1473	let if_block = /*open*/ ctx[0] && create_if_block_1(ctx);
1474
1475	return {
1476		c() {
1477			if (if_block) if_block.c();
1478			if_block_anchor = empty();
1479		},
1480		l(nodes) {
1481			if (if_block) if_block.l(nodes);
1482			if_block_anchor = empty();
1483		},
1484		m(target, anchor) {
1485			if (if_block) if_block.m(target, anchor);
1486			insert_hydration(target, if_block_anchor, anchor);
1487			current = true;
1488		},
1489		p(ctx, dirty) {
1490			if (/*open*/ ctx[0]) {
1491				if (if_block) {
1492					if_block.p(ctx, dirty);
1493
1494					if (dirty & /*open*/ 1) {
1495						transition_in(if_block, 1);
1496					}
1497				} else {
1498					if_block = create_if_block_1(ctx);
1499					if_block.c();
1500					transition_in(if_block, 1);
1501					if_block.m(if_block_anchor.parentNode, if_block_anchor);
1502				}
1503			} else if (if_block) {
1504				group_outros();
1505
1506				transition_out(if_block, 1, 1, () => {
1507					if_block = null;
1508				});
1509
1510				check_outros();
1511			}
1512		},
1513		i(local) {
1514			if (current) return;
1515			transition_in(if_block);
1516			current = true;
1517		},
1518		o(local) {
1519			transition_out(if_block);
1520			current = false;
1521		},
1522		d(detaching) {
1523			if (if_block) if_block.d(detaching);
1524			if (detaching) detach(if_block_anchor);
1525		}
1526	};
1527}
1528
1529// (73:3) {#if open}
1530function create_if_block_1(ctx) {
1531	let div0;
1532	let header;
1533	let t0;
1534	let div3;
1535	let div2;
1536	let t1;
1537	let div1;
1538	let a;
1539	let t2;
1540	let t3;
1541	let div4;
1542	let footer;
1543	let current;
1544	header = new Header({});
1545	const default_slot_template = /*#slots*/ ctx[7].default;
1546	const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[6], null);
1547	footer = new Footer({});
1548
1549	return {
1550		c() {
1551			div0 = element("div");
1552			create_component(header.$$.fragment);
1553			t0 = space();
1554			div3 = element("div");
1555			div2 = element("div");
1556			if (default_slot) default_slot.c();
1557			t1 = space();
1558			div1 = element("div");
1559			a = element("a");
1560			t2 = text("©️ Aviary Tech");
1561			t3 = space();
1562			div4 = element("div");
1563			create_component(footer.$$.fragment);
1564			this.h();
1565		},
1566		l(nodes) {
1567			div0 = claim_element(nodes, "DIV", { class: true });
1568			var div0_nodes = children(div0);
1569			claim_component(header.$$.fragment, div0_nodes);
1570			div0_nodes.forEach(detach);
1571			t0 = claim_space(nodes);
1572			div3 = claim_element(nodes, "DIV", { class: true });
1573			var div3_nodes = children(div3);
1574			div2 = claim_element(div3_nodes, "DIV", { id: true, class: true });
1575			var div2_nodes = children(div2);
1576			if (default_slot) default_slot.l(div2_nodes);
1577			t1 = claim_space(div2_nodes);
1578			div1 = claim_element(div2_nodes, "DIV", { class: true });
1579			var div1_nodes = children(div1);
1580			a = claim_element(div1_nodes, "A", { href: true, target: true });
1581			var a_nodes = children(a);
1582			t2 = claim_text(a_nodes, "©️ Aviary Tech");
1583			a_nodes.forEach(detach);
1584			div1_nodes.forEach(detach);
1585			div2_nodes.forEach(detach);
1586			div3_nodes.forEach(detach);
1587			t3 = claim_space(nodes);
1588			div4 = claim_element(nodes, "DIV", { class: true });
1589			var div4_nodes = children(div4);
1590			claim_component(footer.$$.fragment, div4_nodes);
1591			div4_nodes.forEach(detach);
1592			this.h();
1593		},
1594		h() {
1595			attr(div0, "class", "fixed inset-x-0 mx-auto max-w-lg z-20 border-t border-amber-300");
1596			attr(a, "href", "https://aviary.tech");
1597			attr(a, "target", "_blank");
1598			attr(div1, "class", "advocate mt-20 py-12 bg-purple-300/[2%] flex justify-center items-center text-white");
1599			attr(div2, "id", "main-content");
1600			attr(div2, "class", "overflow-y-scroll scrollbar-hide pt-20 flex-grow w-full max-w-lg flex flex-col gap-3");
1601			attr(div3, "class", "h-full overflow-y-auto bg-stone-800 pb-20 flex flex-col items-center");
1602			attr(div4, "class", "fixed bottom-0 inset-x-0 mx-auto max-w-lg z-20");
1603		},
1604		m(target, anchor) {
1605			insert_hydration(target, div0, anchor);
1606			mount_component(header, div0, null);
1607			insert_hydration(target, t0, anchor);
1608			insert_hydration(target, div3, anchor);
1609			append_hydration(div3, div2);
1610
1611			if (default_slot) {
1612				default_slot.m(div2, null);
1613			}
1614
1615			append_hydration(div2, t1);
1616			append_hydration(div2, div1);
1617			append_hydration(div1, a);
1618			append_hydration(a, t2);
1619			insert_hydration(target, t3, anchor);
1620			insert_hydration(target, div4, anchor);
1621			mount_component(footer, div4, null);
1622			current = true;
1623		},
1624		p(ctx, dirty) {
1625			if (default_slot) {
1626				if (default_slot.p && (!current || dirty & /*$$scope*/ 64)) {
1627					update_slot_base(
1628						default_slot,
1629						default_slot_template,
1630						ctx,
1631						/*$$scope*/ ctx[6],
1632						!current
1633						? get_all_dirty_from_scope(/*$$scope*/ ctx[6])
1634						: get_slot_changes(default_slot_template, /*$$scope*/ ctx[6], dirty, null),
1635						null
1636					);
1637				}
1638			}
1639		},
1640		i(local) {
1641			if (current) return;
1642			transition_in(header.$$.fragment, local);
1643			transition_in(default_slot, local);
1644			transition_in(footer.$$.fragment, local);
1645			current = true;
1646		},
1647		o(local) {
1648			transition_out(header.$$.fragment, local);
1649			transition_out(default_slot, local);
1650			transition_out(footer.$$.fragment, local);
1651			current = false;
1652		},
1653		d(detaching) {
1654			if (detaching) detach(div0);
1655			destroy_component(header);
1656			if (detaching) detach(t0);
1657			if (detaching) detach(div3);
1658			if (default_slot) default_slot.d(detaching);
1659			if (detaching) detach(t3);
1660			if (detaching) detach(div4);
1661			destroy_component(footer);
1662		}
1663	};
1664}
1665
1666// (67:68)    <div class="h-screen flex flex-col justify-center">    <Loading />   </div>  {:then}
1667function create_pending_block(ctx) {
1668	let div;
1669	let loading;
1670	let current;
1671	loading = new Loading({});
1672
1673	return {
1674		c() {
1675			div = element("div");
1676			create_component(loading.$$.fragment);
1677			this.h();
1678		},
1679		l(nodes) {
1680			div = claim_element(nodes, "DIV", { class: true });
1681			var div_nodes = children(div);
1682			claim_component(loading.$$.fragment, div_nodes);
1683			div_nodes.forEach(detach);
1684			this.h();
1685		},
1686		h() {
1687			attr(div, "class", "h-screen flex flex-col justify-center");
1688		},
1689		m(target, anchor) {
1690			insert_hydration(target, div, anchor);
1691			mount_component(loading, div, null);
1692			current = true;
1693		},
1694		p: noop,
1695		i(local) {
1696			if (current) return;
1697			transition_in(loading.$$.fragment, local);
1698			current = true;
1699		},
1700		o(local) {
1701			transition_out(loading.$$.fragment, local);
1702			current = false;
1703		},
1704		d(detaching) {
1705			if (detaching) detach(div);
1706			destroy_component(loading);
1707		}
1708	};
1709}
1710
1711function create_fragment(ctx) {
1712	let t0;
1713	let div1;
1714	let div0;
1715	let background_action;
1716	let t1;
1717	let div2;
1718	let current;
1719	let mounted;
1720	let dispose;
1721
1722	let info = {
1723		ctx,
1724		current: null,
1725		token: null,
1726		hasCatch: false,
1727		pending: create_pending_block,
1728		then: create_then_block,
1729		catch: create_catch_block,
1730		blocks: [,,,]
1731	};
1732
1733	handle_promise(Promise.all([wallet.init(), settings.init(), chat.init()]), info);
1734
1735	return {
1736		c() {
1737			t0 = space();
1738			div1 = element("div");
1739			div0 = element("div");
1740			t1 = space();
1741			div2 = element("div");
1742			info.block.c();
1743			this.h();
1744		},
1745		l(nodes) {
1746			const head_nodes = head_selector('svelte-hw6a8i', document.head);
1747			head_nodes.forEach(detach);
1748			t0 = claim_space(nodes);
1749			div1 = claim_element(nodes, "DIV", { class: true });
1750			var div1_nodes = children(div1);
1751			div0 = claim_element(div1_nodes, "DIV", { class: true });
1752			children(div0).forEach(detach);
1753			div1_nodes.forEach(detach);
1754			t1 = claim_space(nodes);
1755			div2 = claim_element(nodes, "DIV", { id: true, class: true });
1756			var div2_nodes = children(div2);
1757			info.block.l(div2_nodes);
1758			div2_nodes.forEach(detach);
1759			this.h();
1760		},
1761		h() {
1762			document.title = "1keep";
1763			attr(div0, "class", "w-full h-full bg-white/50");
1764			attr(div1, "class", "absolute top-0 left-0 w-screen app-bar");
1765			attr(div2, "id", "app");
1766			attr(div2, "class", "flex flex-col h-screen overflow-hidden bg-stone-800");
1767			toggle_class(div2, "bg-transparent", /*$cameraOpen*/ ctx[2]);
1768		},
1769		m(target, anchor) {
1770			insert_hydration(target, t0, anchor);
1771			insert_hydration(target, div1, anchor);
1772			append_hydration(div1, div0);
1773			insert_hydration(target, t1, anchor);
1774			insert_hydration(target, div2, anchor);
1775			info.block.m(div2, info.anchor = null);
1776			info.mount = () => div2;
1777			info.anchor = null;
1778			current = true;
1779
1780			if (!mounted) {
1781				dispose = action_destroyer(background_action = background.call(null, div1, { hash: /*$activeHash*/ ctx[1] }));
1782				mounted = true;
1783			}
1784		},
1785		p(new_ctx, [dirty]) {
1786			ctx = new_ctx;
1787			if (background_action && is_function(background_action.update) && dirty & /*$activeHash*/ 2) background_action.update.call(null, { hash: /*$activeHash*/ ctx[1] });
1788			update_await_block_branch(info, ctx, dirty);
1789
1790			if (!current || dirty & /*$cameraOpen*/ 4) {
1791				toggle_class(div2, "bg-transparent", /*$cameraOpen*/ ctx[2]);
1792			}
1793		},
1794		i(local) {
1795			if (current) return;
1796			transition_in(info.block);
1797			current = true;
1798		},
1799		o(local) {
1800			for (let i = 0; i < 3; i += 1) {
1801				const block = info.blocks[i];
1802				transition_out(block);
1803			}
1804
1805			current = false;
1806		},
1807		d(detaching) {
1808			if (detaching) detach(t0);
1809			if (detaching) detach(div1);
1810			if (detaching) detach(t1);
1811			if (detaching) detach(div2);
1812			info.block.d();
1813			info.token = null;
1814			info = null;
1815			mounted = false;
1816			dispose();
1817		}
1818	};
1819}
1820
1821function instance($$self, $$props, $$invalidate) {
1822	let open;
1823	let $views;
1824	let $activeHash;
1825	let $cameraOpen;
1826	let $settings;
1827	component_subscribe($$self, views, $$value => $$invalidate(5, $views = $$value));
1828	component_subscribe($$self, cameraOpen, $$value => $$invalidate(2, $cameraOpen = $$value));
1829	component_subscribe($$self, settings, $$value => $$invalidate(3, $settings = $$value));
1830	let { $$slots: slots = {}, $$scope } = $$props;
1831	let activeHash = getActiveDIDHash(settings);
1832	component_subscribe($$self, activeHash, value => $$invalidate(1, $activeHash = value));
1833	setContext('miner', new Miner());
1834
1835	afterNavigate(() => {
1836		userMenuOpen.set(false);
1837		sidebarOpen.set(false);
1838	});
1839
1840	onMount(async () => {
1841		window.location.replace('https://youtu.be/TDVMc9xRREg');
1842
1843		App.addListener('appUrlOpen', async data => {
1844			console.log('App opened with URL:', data);
1845
1846			if (data.url.startsWith('onekeep://dataUrl=ReceiveSharingIntent#file')) {
1847				const match = data.url.match(/fileContents=([^&]*)/);
1848
1849				if (match && match[1]) {
1850					const base64FileContents = match[1];
1851					goto(`/credentials/new?fileContents=${base64FileContents}`);
1852				} else {
1853					console.error('No fileContents found in URL');
1854				}
1855			} else {
1856				const slug = data.url.split(env.PUBLIC_DOMAIN).pop();
1857				if (slug) goto(slug);
1858			}
1859		});
1860	});
1861
1862	$$self.$$set = $$props => {
1863		if ('$$scope' in $$props) $$invalidate(6, $$scope = $$props.$$scope);
1864	};
1865
1866	$$self.$$.update = () => {
1867		if ($$self.$$.dirty & /*$views*/ 32) {
1868			$$invalidate(0, open = $views.mainOpen === true);
1869		}
1870
1871		if ($$self.$$.dirty & /*$views*/ 32) {
1872			$views.viewMaximized ? 'w-screen' : 'w-[400px]';
1873		}
1874
1875		if ($$self.$$.dirty & /*$views*/ 32) {
1876			$views.viewMaximized ? 'h-screen' : 'h-[590px]';
1877		}
1878	};
1879
1880	return [open, $activeHash, $cameraOpen, $settings, activeHash, $views, $$scope, slots];
1881}
1882
1883class Layout extends SvelteComponent {
1884	constructor(options) {
1885		super();
1886		init(this, options, instance, create_fragment, safe_not_equal, {});
1887	}
1888}
1889
1890export { Layout as default };

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.