// @svizzle/time_region_value v0.5.0 - © 2021 nestauk (https://www.nesta.org.uk/)
'use strict';

var format = require('./format-a62f401a.js');
var POIs = require('./POIs-d486721b.js');
var indicator = require('./indicator-34e8d898.js');
var url = require('./url-66447f7e.js');

const truthynessTo =
	([valueIfTruthy, valueIfFalsy]) => x => x ? valueIfTruthy : valueIfFalsy;

/* src/node_modules/components/Sidebar.svelte generated by Svelte v3.44.2 */

function add_css$3(target) {
	format.append_styles(target, "svelte-13lnbxn", "nav.svelte-13lnbxn.svelte-13lnbxn{height:100%;width:100%;padding:var(--dimPadding);overflow-y:auto;background-color:var(--colorMain);color:var(--colorWhite);font-weight:var(--dimFontWeight)}nav.svelte-13lnbxn .group.svelte-13lnbxn:not(:last-child){margin-bottom:1rem}nav.svelte-13lnbxn .group.svelte-13lnbxn:not(:first-child){margin-top:1rem}nav.svelte-13lnbxn header.svelte-13lnbxn{font-size:1.2em;font-weight:bold;margin-bottom:1rem}nav.svelte-13lnbxn p.svelte-13lnbxn{display:flex;align-items:center;padding:0.4rem;margin-bottom:0.5rem}nav.svelte-13lnbxn p.selected.svelte-13lnbxn{background-color:var(--colorMainDesat) !important}nav.svelte-13lnbxn p.svelte-13lnbxn:hover{cursor:pointer;background-color:var(--colorSelectedDesat)}");
}

function get_each_context$1(ctx, list, i) {
	const child_ctx = ctx.slice();
	child_ctx[11] = list[i].label;
	child_ctx[12] = list[i].indicators;
	return child_ctx;
}

function get_each_context_1$1(ctx, list, i) {
	const child_ctx = ctx.slice();
	child_ctx[15] = list[i].title;
	child_ctx[16] = list[i].schema;
	return child_ctx;
}

// (60:4) <Link      href={makeURL($_hrefBase, schema.value.id)}      rel='prefetch'      theme={{color: $_theme.colorWhite}}     >
function create_default_slot(ctx) {
	let p;
	let t_value = /*title*/ ctx[15] + "";
	let t;
	let keepOnScreen_action;
	let mounted;
	let dispose;

	return {
		c() {
			p = format.element("p");
			t = format.text(t_value);
			format.attr(p, "class", "svelte-13lnbxn");
			format.toggle_class(p, "selected", /*schema*/ ctx[16].value.id === /*currentId*/ ctx[1]);
		},
		m(target, anchor) {
			format.insert(target, p, anchor);
			format.append(p, t);

			if (!mounted) {
				dispose = format.action_destroyer(keepOnScreen_action = /*keepOnScreen*/ ctx[7].call(null, p, {
					id: /*schema*/ ctx[16].value.id,
					currentId: /*currentId*/ ctx[1],
					scrollableHeight: /*scrollableHeight*/ ctx[4]
				}));

				mounted = true;
			}
		},
		p(new_ctx, dirty) {
			ctx = new_ctx;
			if (dirty & /*$_groups*/ 4 && t_value !== (t_value = /*title*/ ctx[15] + "")) format.set_data(t, t_value);

			if (keepOnScreen_action && format.is_function(keepOnScreen_action.update) && dirty & /*$_groups, currentId, scrollableHeight*/ 22) keepOnScreen_action.update.call(null, {
				id: /*schema*/ ctx[16].value.id,
				currentId: /*currentId*/ ctx[1],
				scrollableHeight: /*scrollableHeight*/ ctx[4]
			});

			if (dirty & /*$_groups, currentId*/ 6) {
				format.toggle_class(p, "selected", /*schema*/ ctx[16].value.id === /*currentId*/ ctx[1]);
			}
		},
		d(detaching) {
			if (detaching) format.detach(p);
			mounted = false;
			dispose();
		}
	};
}

// (59:3) {#each indicators as {title, schema}}
function create_each_block_1$1(ctx) {
	let link;
	let current;

	link = new indicator.Link({
			props: {
				href: url.makeURL(/*$_hrefBase*/ ctx[5], /*schema*/ ctx[16].value.id),
				rel: "prefetch",
				theme: { color: /*$_theme*/ ctx[6].colorWhite },
				$$slots: { default: [create_default_slot] },
				$$scope: { ctx }
			}
		});

	return {
		c() {
			format.create_component(link.$$.fragment);
		},
		m(target, anchor) {
			format.mount_component(link, target, anchor);
			current = true;
		},
		p(ctx, dirty) {
			const link_changes = {};
			if (dirty & /*$_hrefBase, $_groups*/ 36) link_changes.href = url.makeURL(/*$_hrefBase*/ ctx[5], /*schema*/ ctx[16].value.id);
			if (dirty & /*$_theme*/ 64) link_changes.theme = { color: /*$_theme*/ ctx[6].colorWhite };

			if (dirty & /*$$scope, $_groups, currentId, scrollableHeight*/ 524310) {
				link_changes.$$scope = { dirty, ctx };
			}

			link.$set(link_changes);
		},
		i(local) {
			if (current) return;
			format.transition_in(link.$$.fragment, local);
			current = true;
		},
		o(local) {
			format.transition_out(link.$$.fragment, local);
			current = false;
		},
		d(detaching) {
			format.destroy_component(link, detaching);
		}
	};
}

// (56:1) {#each $_groups as {label, indicators}}
function create_each_block$1(ctx) {
	let div;
	let header;
	let t0_value = /*label*/ ctx[11] + "";
	let t0;
	let t1;
	let t2;
	let current;
	let each_value_1 = /*indicators*/ ctx[12];
	let each_blocks = [];

	for (let i = 0; i < each_value_1.length; i += 1) {
		each_blocks[i] = create_each_block_1$1(get_each_context_1$1(ctx, each_value_1, i));
	}

	const out = i => format.transition_out(each_blocks[i], 1, 1, () => {
		each_blocks[i] = null;
	});

	return {
		c() {
			div = format.element("div");
			header = format.element("header");
			t0 = format.text(t0_value);
			t1 = format.space();

			for (let i = 0; i < each_blocks.length; i += 1) {
				each_blocks[i].c();
			}

			t2 = format.space();
			format.attr(header, "class", "svelte-13lnbxn");
			format.attr(div, "class", "group svelte-13lnbxn");
		},
		m(target, anchor) {
			format.insert(target, div, anchor);
			format.append(div, header);
			format.append(header, t0);
			format.append(div, t1);

			for (let i = 0; i < each_blocks.length; i += 1) {
				each_blocks[i].m(div, null);
			}

			format.append(div, t2);
			current = true;
		},
		p(ctx, dirty) {
			if ((!current || dirty & /*$_groups*/ 4) && t0_value !== (t0_value = /*label*/ ctx[11] + "")) format.set_data(t0, t0_value);

			if (dirty & /*makeURL, $_hrefBase, $_groups, $_theme, currentId, scrollableHeight*/ 118) {
				each_value_1 = /*indicators*/ ctx[12];
				let i;

				for (i = 0; i < each_value_1.length; i += 1) {
					const child_ctx = get_each_context_1$1(ctx, each_value_1, i);

					if (each_blocks[i]) {
						each_blocks[i].p(child_ctx, dirty);
						format.transition_in(each_blocks[i], 1);
					} else {
						each_blocks[i] = create_each_block_1$1(child_ctx);
						each_blocks[i].c();
						format.transition_in(each_blocks[i], 1);
						each_blocks[i].m(div, t2);
					}
				}

				format.group_outros();

				for (i = each_value_1.length; i < each_blocks.length; i += 1) {
					out(i);
				}

				format.check_outros();
			}
		},
		i(local) {
			if (current) return;

			for (let i = 0; i < each_value_1.length; i += 1) {
				format.transition_in(each_blocks[i]);
			}

			current = true;
		},
		o(local) {
			each_blocks = each_blocks.filter(Boolean);

			for (let i = 0; i < each_blocks.length; i += 1) {
				format.transition_out(each_blocks[i]);
			}

			current = false;
		},
		d(detaching) {
			if (detaching) format.detach(div);
			format.destroy_each(each_blocks, detaching);
		}
	};
}

function create_fragment$9(ctx) {
	let nav;
	let nav_resize_listener;
	let current;
	let each_value = /*$_groups*/ ctx[2];
	let each_blocks = [];

	for (let i = 0; i < each_value.length; i += 1) {
		each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
	}

	const out = i => format.transition_out(each_blocks[i], 1, 1, () => {
		each_blocks[i] = null;
	});

	return {
		c() {
			nav = format.element("nav");

			for (let i = 0; i < each_blocks.length; i += 1) {
				each_blocks[i].c();
			}

			format.attr(nav, "class", "svelte-13lnbxn");
			format.add_render_callback(() => /*nav_elementresize_handler*/ ctx[8].call(nav));
		},
		m(target, anchor) {
			format.insert(target, nav, anchor);

			for (let i = 0; i < each_blocks.length; i += 1) {
				each_blocks[i].m(nav, null);
			}

			nav_resize_listener = format.add_resize_listener(nav, /*nav_elementresize_handler*/ ctx[8].bind(nav));
			/*nav_binding*/ ctx[9](nav);
			current = true;
		},
		p(ctx, [dirty]) {
			if (dirty & /*$_groups, makeURL, $_hrefBase, $_theme, currentId, scrollableHeight*/ 118) {
				each_value = /*$_groups*/ ctx[2];
				let i;

				for (i = 0; i < each_value.length; i += 1) {
					const child_ctx = get_each_context$1(ctx, each_value, i);

					if (each_blocks[i]) {
						each_blocks[i].p(child_ctx, dirty);
						format.transition_in(each_blocks[i], 1);
					} else {
						each_blocks[i] = create_each_block$1(child_ctx);
						each_blocks[i].c();
						format.transition_in(each_blocks[i], 1);
						each_blocks[i].m(nav, null);
					}
				}

				format.group_outros();

				for (i = each_value.length; i < each_blocks.length; i += 1) {
					out(i);
				}

				format.check_outros();
			}
		},
		i(local) {
			if (current) return;

			for (let i = 0; i < each_value.length; i += 1) {
				format.transition_in(each_blocks[i]);
			}

			current = true;
		},
		o(local) {
			each_blocks = each_blocks.filter(Boolean);

			for (let i = 0; i < each_blocks.length; i += 1) {
				format.transition_out(each_blocks[i]);
			}

			current = false;
		},
		d(detaching) {
			if (detaching) format.detach(nav);
			format.destroy_each(each_blocks, detaching);
			nav_resize_listener();
			/*nav_binding*/ ctx[9](null);
		}
	};
}

function instance$3($$self, $$props, $$invalidate) {
	let $_groups,
		$$unsubscribe__groups = format.noop,
		$$subscribe__groups = () => ($$unsubscribe__groups(), $$unsubscribe__groups = format.subscribe(_groups, $$value => $$invalidate(2, $_groups = $$value)), _groups);

	let $_hrefBase;
	let $_theme;
	format.component_subscribe($$self, format._hrefBase, $$value => $$invalidate(5, $_hrefBase = $$value));
	format.component_subscribe($$self, indicator._theme, $$value => $$invalidate(6, $_theme = $$value));
	$$self.$$.on_destroy.push(() => $$unsubscribe__groups());
	let { _groups = null } = $$props;
	$$subscribe__groups();
	let { currentId = null } = $$props;
	let currentNode;
	let scrollable;
	let scrollableHeight;

	format.onMount(() => {
		currentNode && currentNode.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
	});

	// eslint-disable-next-line no-shadow,no-unused-vars
	function keepOnScreen(node, { id, currentId, scrollableHeight }) {
		if (id === currentId) {
			currentNode = node;
		}

		return {
			// eslint-disable-next-line no-shadow,no-unused-vars
			update({ id, currentId, scrollableHeight }) {
				if (id === currentId) {
					const { y: Y } = scrollable.getBoundingClientRect();
					const { y } = node.getBoundingClientRect();
					const yRel = y - Y;

					if (yRel < 0 || yRel > scrollableHeight) {
						scrollable.scrollTo({ top: yRel, behavior: 'smooth' });
					}
				}
			}
		};
	}

	function nav_elementresize_handler() {
		scrollableHeight = this.clientHeight;
		$$invalidate(4, scrollableHeight);
	}

	function nav_binding($$value) {
		format.binding_callbacks[$$value ? 'unshift' : 'push'](() => {
			scrollable = $$value;
			$$invalidate(3, scrollable);
		});
	}

	$$self.$$set = $$props => {
		if ('_groups' in $$props) $$subscribe__groups($$invalidate(0, _groups = $$props._groups));
		if ('currentId' in $$props) $$invalidate(1, currentId = $$props.currentId);
	};

	$$self.$$.update = () => {
		if ($$self.$$.dirty & /*_groups, $_groups*/ 5) {
			_groups && format.setGroups($_groups);
		}
	};

	return [
		_groups,
		currentId,
		$_groups,
		scrollable,
		scrollableHeight,
		$_hrefBase,
		$_theme,
		keepOnScreen,
		nav_elementresize_handler,
		nav_binding
	];
}

class Sidebar extends format.SvelteComponent {
	constructor(options) {
		super();
		format.init(this, options, instance$3, create_fragment$9, format.safe_not_equal, { _groups: 0, currentId: 1 }, add_css$3);
	}
}

/* src/node_modules/components/Timeline.svelte generated by Svelte v3.44.2 */

function add_css$2(target) {
	format.append_styles(target, "svelte-rmsnzm", ".Timeline.svelte-rmsnzm.svelte-rmsnzm{height:100%;user-select:none;width:100%}svg.svelte-rmsnzm text.svelte-rmsnzm{dominant-baseline:middle;fill:var(--colorRef);pointer-events:none;stroke:none;text-anchor:middle}svg.svelte-rmsnzm line.svelte-rmsnzm{pointer-events:none;stroke-width:0.75;stroke:var(--colorRef)}svg.svelte-rmsnzm circle.svelte-rmsnzm{cursor:pointer;fill-opacity:1;fill:var(--colorWhite);stroke-width:1.5;stroke:var(--colorRef)}svg.svelte-rmsnzm circle.selected.svelte-rmsnzm{fill:var(--colorSelected)}rect.svelte-rmsnzm.svelte-rmsnzm{fill:var(--colorWhite)}polyline.svelte-rmsnzm.svelte-rmsnzm{fill:none;pointer-events:none;stroke-width:2}rect.svelte-rmsnzm.svelte-rmsnzm,polyline.svelte-rmsnzm.svelte-rmsnzm{stroke:var(--colorRefLight)}.active.svelte-rmsnzm.svelte-rmsnzm{cursor:pointer}.active.svelte-rmsnzm rect.svelte-rmsnzm,.active.svelte-rmsnzm polyline.svelte-rmsnzm{stroke:var(--colorRef)}");
}

function get_each_context(ctx, list, i) {
	const child_ctx = ctx.slice();
	child_ctx[30] = list[i];
	return child_ctx;
}

function get_each_context_1(ctx, list, i) {
	const child_ctx = ctx.slice();
	child_ctx[30] = list[i];
	return child_ctx;
}

// (51:1) {#if width && height && $_layout || isServerSide}
function create_if_block$2(ctx) {
	let svg;
	let if_block0_anchor;
	let if_block0 = /*selectedYear*/ ctx[3] && create_if_block_4(ctx);

	function select_block_type_2(ctx, dirty) {
		if (/*showLess*/ ctx[4] && /*selectedYear*/ ctx[3]) return create_if_block_1$2;
		return create_else_block;
	}

	let current_block_type = select_block_type_2(ctx);
	let if_block1 = current_block_type(ctx);

	return {
		c() {
			svg = format.svg_element("svg");
			if (if_block0) if_block0.c();
			if_block0_anchor = format.empty();
			if_block1.c();
			format.attr(svg, "width", /*width*/ ctx[5]);
			format.attr(svg, "height", /*height*/ ctx[1]);
			format.attr(svg, "class", "svelte-rmsnzm");
		},
		m(target, anchor) {
			format.insert(target, svg, anchor);
			if (if_block0) if_block0.m(svg, null);
			format.append(svg, if_block0_anchor);
			if_block1.m(svg, null);
		},
		p(ctx, dirty) {
			if (/*selectedYear*/ ctx[3]) {
				if (if_block0) {
					if_block0.p(ctx, dirty);
				} else {
					if_block0 = create_if_block_4(ctx);
					if_block0.c();
					if_block0.m(svg, if_block0_anchor);
				}
			} else if (if_block0) {
				if_block0.d(1);
				if_block0 = null;
			}

			if (current_block_type === (current_block_type = select_block_type_2(ctx)) && if_block1) {
				if_block1.p(ctx, dirty);
			} else {
				if_block1.d(1);
				if_block1 = current_block_type(ctx);

				if (if_block1) {
					if_block1.c();
					if_block1.m(svg, null);
				}
			}

			if (dirty[0] & /*width*/ 32) {
				format.attr(svg, "width", /*width*/ ctx[5]);
			}

			if (dirty[0] & /*height*/ 2) {
				format.attr(svg, "height", /*height*/ ctx[1]);
			}
		},
		d(detaching) {
			if (detaching) format.detach(svg);
			if (if_block0) if_block0.d();
			if_block1.d();
		}
	};
}

// (57:3) {#if selectedYear}
function create_if_block_4(ctx) {
	let g0;
	let g0_transform_value;
	let g1;
	let g1_transform_value;

	function select_block_type(ctx, dirty) {
		if (/*hrefPrev*/ ctx[16]) return create_if_block_6;
		return create_else_block_2;
	}

	let current_block_type = select_block_type(ctx);
	let if_block0 = current_block_type(ctx);

	function select_block_type_1(ctx, dirty) {
		if (/*hrefNext*/ ctx[15]) return create_if_block_5;
		return create_else_block_1;
	}

	let current_block_type_1 = select_block_type_1(ctx);
	let if_block1 = current_block_type_1(ctx);

	return {
		c() {
			g0 = format.svg_element("g");
			if_block0.c();
			g1 = format.svg_element("g");
			if_block1.c();
			format.attr(g0, "transform", g0_transform_value = "translate(" + /*prevX*/ ctx[22] + "," + /*buttonY*/ ctx[12] + ")");
			format.attr(g0, "class", "svelte-rmsnzm");
			format.toggle_class(g0, "active", /*isPrevYearActive*/ ctx[9]);
			format.attr(g1, "transform", g1_transform_value = "translate(" + /*nextX*/ ctx[11] + "," + /*buttonY*/ ctx[12] + ")");
			format.attr(g1, "class", "svelte-rmsnzm");
			format.toggle_class(g1, "active", /*isNextYearActive*/ ctx[7]);
		},
		m(target, anchor) {
			format.insert(target, g0, anchor);
			if_block0.m(g0, null);
			format.insert(target, g1, anchor);
			if_block1.m(g1, null);
		},
		p(ctx, dirty) {
			if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block0) {
				if_block0.p(ctx, dirty);
			} else {
				if_block0.d(1);
				if_block0 = current_block_type(ctx);

				if (if_block0) {
					if_block0.c();
					if_block0.m(g0, null);
				}
			}

			if (dirty[0] & /*prevX, buttonY*/ 4198400 && g0_transform_value !== (g0_transform_value = "translate(" + /*prevX*/ ctx[22] + "," + /*buttonY*/ ctx[12] + ")")) {
				format.attr(g0, "transform", g0_transform_value);
			}

			if (dirty[0] & /*isPrevYearActive*/ 512) {
				format.toggle_class(g0, "active", /*isPrevYearActive*/ ctx[9]);
			}

			if (current_block_type_1 === (current_block_type_1 = select_block_type_1(ctx)) && if_block1) {
				if_block1.p(ctx, dirty);
			} else {
				if_block1.d(1);
				if_block1 = current_block_type_1(ctx);

				if (if_block1) {
					if_block1.c();
					if_block1.m(g1, null);
				}
			}

			if (dirty[0] & /*nextX, buttonY*/ 6144 && g1_transform_value !== (g1_transform_value = "translate(" + /*nextX*/ ctx[11] + "," + /*buttonY*/ ctx[12] + ")")) {
				format.attr(g1, "transform", g1_transform_value);
			}

			if (dirty[0] & /*isNextYearActive*/ 128) {
				format.toggle_class(g1, "active", /*isNextYearActive*/ ctx[7]);
			}
		},
		d(detaching) {
			if (detaching) format.detach(g0);
			if_block0.d();
			if (detaching) format.detach(g1);
			if_block1.d();
		}
	};
}

// (76:5) {:else}
function create_else_block_2(ctx) {
	let g;
	let rect;
	let polyline;

	return {
		c() {
			g = format.svg_element("g");
			rect = format.svg_element("rect");
			polyline = format.svg_element("polyline");
			format.attr(rect, "height", /*halfHeight*/ ctx[10]);
			format.attr(rect, "width", /*halfHeight*/ ctx[10]);
			format.attr(rect, "class", "svelte-rmsnzm");
			format.attr(polyline, "points", /*chevronLeftPath*/ ctx[18]);
			format.attr(polyline, "class", "svelte-rmsnzm");
			format.attr(g, "aria-label", "Previous year not available");
		},
		m(target, anchor) {
			format.insert(target, g, anchor);
			format.append(g, rect);
			format.append(g, polyline);
		},
		p(ctx, dirty) {
			if (dirty[0] & /*halfHeight*/ 1024) {
				format.attr(rect, "height", /*halfHeight*/ ctx[10]);
			}

			if (dirty[0] & /*halfHeight*/ 1024) {
				format.attr(rect, "width", /*halfHeight*/ ctx[10]);
			}

			if (dirty[0] & /*chevronLeftPath*/ 262144) {
				format.attr(polyline, "points", /*chevronLeftPath*/ ctx[18]);
			}
		},
		d(detaching) {
			if (detaching) format.detach(g);
		}
	};
}

// (64:5) {#if hrefPrev}
function create_if_block_6(ctx) {
	let a;
	let rect;
	let polyline;
	let a_aria_label_value;

	return {
		c() {
			a = format.svg_element("a");
			rect = format.svg_element("rect");
			polyline = format.svg_element("polyline");
			format.attr(rect, "height", /*halfHeight*/ ctx[10]);
			format.attr(rect, "width", /*halfHeight*/ ctx[10]);
			format.attr(rect, "class", "svelte-rmsnzm");
			format.attr(polyline, "points", /*chevronLeftPath*/ ctx[18]);
			format.attr(polyline, "class", "svelte-rmsnzm");
			format.attr(a, "aria-label", a_aria_label_value = "Show the previous year (" + /*prevYear*/ ctx[8] + ")");
			format.attr(a, "href", /*hrefPrev*/ ctx[16]);
			format.attr(a, "rel", "prefetch");
		},
		m(target, anchor) {
			format.insert(target, a, anchor);
			format.append(a, rect);
			format.append(a, polyline);
		},
		p(ctx, dirty) {
			if (dirty[0] & /*halfHeight*/ 1024) {
				format.attr(rect, "height", /*halfHeight*/ ctx[10]);
			}

			if (dirty[0] & /*halfHeight*/ 1024) {
				format.attr(rect, "width", /*halfHeight*/ ctx[10]);
			}

			if (dirty[0] & /*chevronLeftPath*/ 262144) {
				format.attr(polyline, "points", /*chevronLeftPath*/ ctx[18]);
			}

			if (dirty[0] & /*prevYear*/ 256 && a_aria_label_value !== (a_aria_label_value = "Show the previous year (" + /*prevYear*/ ctx[8] + ")")) {
				format.attr(a, "aria-label", a_aria_label_value);
			}

			if (dirty[0] & /*hrefPrev*/ 65536) {
				format.attr(a, "href", /*hrefPrev*/ ctx[16]);
			}
		},
		d(detaching) {
			if (detaching) format.detach(a);
		}
	};
}

// (104:5) {:else}
function create_else_block_1(ctx) {
	let g;
	let rect;
	let polyline;

	return {
		c() {
			g = format.svg_element("g");
			rect = format.svg_element("rect");
			polyline = format.svg_element("polyline");
			format.attr(rect, "height", /*halfHeight*/ ctx[10]);
			format.attr(rect, "width", /*halfHeight*/ ctx[10]);
			format.attr(rect, "class", "svelte-rmsnzm");
			format.attr(polyline, "points", /*chevronRightPath*/ ctx[17]);
			format.attr(polyline, "class", "svelte-rmsnzm");
			format.attr(g, "aria-label", "Next year not available");
		},
		m(target, anchor) {
			format.insert(target, g, anchor);
			format.append(g, rect);
			format.append(g, polyline);
		},
		p(ctx, dirty) {
			if (dirty[0] & /*halfHeight*/ 1024) {
				format.attr(rect, "height", /*halfHeight*/ ctx[10]);
			}

			if (dirty[0] & /*halfHeight*/ 1024) {
				format.attr(rect, "width", /*halfHeight*/ ctx[10]);
			}

			if (dirty[0] & /*chevronRightPath*/ 131072) {
				format.attr(polyline, "points", /*chevronRightPath*/ ctx[17]);
			}
		},
		d(detaching) {
			if (detaching) format.detach(g);
		}
	};
}

// (92:5) {#if hrefNext}
function create_if_block_5(ctx) {
	let a;
	let rect;
	let polyline;
	let a_aria_label_value;

	return {
		c() {
			a = format.svg_element("a");
			rect = format.svg_element("rect");
			polyline = format.svg_element("polyline");
			format.attr(rect, "height", /*halfHeight*/ ctx[10]);
			format.attr(rect, "width", /*halfHeight*/ ctx[10]);
			format.attr(rect, "class", "svelte-rmsnzm");
			format.attr(polyline, "points", /*chevronRightPath*/ ctx[17]);
			format.attr(polyline, "class", "svelte-rmsnzm");
			format.attr(a, "aria-label", a_aria_label_value = "Show the next year (" + /*nextYear*/ ctx[6] + ")");
			format.attr(a, "href", /*hrefNext*/ ctx[15]);
			format.attr(a, "rel", "prefetch");
		},
		m(target, anchor) {
			format.insert(target, a, anchor);
			format.append(a, rect);
			format.append(a, polyline);
		},
		p(ctx, dirty) {
			if (dirty[0] & /*halfHeight*/ 1024) {
				format.attr(rect, "height", /*halfHeight*/ ctx[10]);
			}

			if (dirty[0] & /*halfHeight*/ 1024) {
				format.attr(rect, "width", /*halfHeight*/ ctx[10]);
			}

			if (dirty[0] & /*chevronRightPath*/ 131072) {
				format.attr(polyline, "points", /*chevronRightPath*/ ctx[17]);
			}

			if (dirty[0] & /*nextYear*/ 64 && a_aria_label_value !== (a_aria_label_value = "Show the next year (" + /*nextYear*/ ctx[6] + ")")) {
				format.attr(a, "aria-label", a_aria_label_value);
			}

			if (dirty[0] & /*hrefNext*/ 32768) {
				format.attr(a, "href", /*hrefNext*/ ctx[15]);
			}
		},
		d(detaching) {
			if (detaching) format.detach(a);
		}
	};
}

// (124:3) {:else}
function create_else_block(ctx) {
	let if_block0_anchor;
	let if_block1_anchor;
	let if_block0 = /*availableYears*/ ctx[0] && create_if_block_3$2(ctx);
	let if_block1 = /*$_yearRange*/ ctx[24] && create_if_block_2$2(ctx);

	return {
		c() {
			if (if_block0) if_block0.c();
			if_block0_anchor = format.empty();
			if (if_block1) if_block1.c();
			if_block1_anchor = format.empty();
		},
		m(target, anchor) {
			if (if_block0) if_block0.m(target, anchor);
			format.insert(target, if_block0_anchor, anchor);
			if (if_block1) if_block1.m(target, anchor);
			format.insert(target, if_block1_anchor, anchor);
		},
		p(ctx, dirty) {
			if (/*availableYears*/ ctx[0]) {
				if (if_block0) {
					if_block0.p(ctx, dirty);
				} else {
					if_block0 = create_if_block_3$2(ctx);
					if_block0.c();
					if_block0.m(if_block0_anchor.parentNode, if_block0_anchor);
				}
			} else if (if_block0) {
				if_block0.d(1);
				if_block0 = null;
			}

			if (/*$_yearRange*/ ctx[24]) {
				if (if_block1) {
					if_block1.p(ctx, dirty);
				} else {
					if_block1 = create_if_block_2$2(ctx);
					if_block1.c();
					if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
				}
			} else if (if_block1) {
				if_block1.d(1);
				if_block1 = null;
			}
		},
		d(detaching) {
			if (if_block0) if_block0.d(detaching);
			if (detaching) format.detach(if_block0_anchor);
			if (if_block1) if_block1.d(detaching);
			if (detaching) format.detach(if_block1_anchor);
		}
	};
}

// (117:3) {#if showLess && selectedYear}
function create_if_block_1$2(ctx) {
	let text_1;
	let t;

	return {
		c() {
			text_1 = format.svg_element("text");
			t = format.text(/*selectedYear*/ ctx[3]);
			format.attr(text_1, "x", /*yearsCenterX*/ ctx[21]);
			format.attr(text_1, "y", /*halfHeight*/ ctx[10]);
			format.attr(text_1, "class", "svelte-rmsnzm");
		},
		m(target, anchor) {
			format.insert(target, text_1, anchor);
			format.append(text_1, t);
		},
		p(ctx, dirty) {
			if (dirty[0] & /*selectedYear*/ 8) format.set_data(t, /*selectedYear*/ ctx[3]);

			if (dirty[0] & /*yearsCenterX*/ 2097152) {
				format.attr(text_1, "x", /*yearsCenterX*/ ctx[21]);
			}

			if (dirty[0] & /*halfHeight*/ 1024) {
				format.attr(text_1, "y", /*halfHeight*/ ctx[10]);
			}
		},
		d(detaching) {
			if (detaching) format.detach(text_1);
		}
	};
}

// (128:4) {#if availableYears}
function create_if_block_3$2(ctx) {
	let g;
	let line;
	let g_transform_value;
	let each_value_1 = /*availableYears*/ ctx[0];
	let each_blocks = [];

	for (let i = 0; i < each_value_1.length; i += 1) {
		each_blocks[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
	}

	return {
		c() {
			g = format.svg_element("g");
			line = format.svg_element("line");

			for (let i = 0; i < each_blocks.length; i += 1) {
				each_blocks[i].c();
			}

			format.attr(line, "x1", /*lineX1*/ ctx[20]);
			format.attr(line, "x2", /*lineX2*/ ctx[19]);
			format.attr(line, "class", "svelte-rmsnzm");
			format.attr(g, "transform", g_transform_value = "translate(0," + /*$_layout*/ ctx[14].y1 + ")");
		},
		m(target, anchor) {
			format.insert(target, g, anchor);
			format.append(g, line);

			for (let i = 0; i < each_blocks.length; i += 1) {
				each_blocks[i].m(g, null);
			}
		},
		p(ctx, dirty) {
			if (dirty[0] & /*lineX1*/ 1048576) {
				format.attr(line, "x1", /*lineX1*/ ctx[20]);
			}

			if (dirty[0] & /*lineX2*/ 524288) {
				format.attr(line, "x2", /*lineX2*/ ctx[19]);
			}

			if (dirty[0] & /*availableYears, $_hrefBase, indicatorId, $_layout, selectedYear*/ 24589) {
				each_value_1 = /*availableYears*/ ctx[0];
				let i;

				for (i = 0; i < each_value_1.length; i += 1) {
					const child_ctx = get_each_context_1(ctx, each_value_1, i);

					if (each_blocks[i]) {
						each_blocks[i].p(child_ctx, dirty);
					} else {
						each_blocks[i] = create_each_block_1(child_ctx);
						each_blocks[i].c();
						each_blocks[i].m(g, null);
					}
				}

				for (; i < each_blocks.length; i += 1) {
					each_blocks[i].d(1);
				}

				each_blocks.length = each_value_1.length;
			}

			if (dirty[0] & /*$_layout*/ 16384 && g_transform_value !== (g_transform_value = "translate(0," + /*$_layout*/ ctx[14].y1 + ")")) {
				format.attr(g, "transform", g_transform_value);
			}
		},
		d(detaching) {
			if (detaching) format.detach(g);
			format.destroy_each(each_blocks, detaching);
		}
	};
}

// (134:6) {#each availableYears as year}
function create_each_block_1(ctx) {
	let a;
	let circle;
	let circle_cx_value;
	let circle_r_value;
	let a_aria_label_value;
	let a_href_value;

	return {
		c() {
			a = format.svg_element("a");
			circle = format.svg_element("circle");
			format.attr(circle, "cx", circle_cx_value = /*$_layout*/ ctx[14].scaleX(/*year*/ ctx[30]));
			format.attr(circle, "r", circle_r_value = /*$_layout*/ ctx[14].radius);
			format.attr(circle, "class", "svelte-rmsnzm");
			format.toggle_class(circle, "selected", /*selectedYear*/ ctx[3] && /*selectedYear*/ ctx[3] === /*year*/ ctx[30]);
			format.attr(a, "aria-label", a_aria_label_value = /*year*/ ctx[30]);
			format.attr(a, "href", a_href_value = url.makeURL(/*$_hrefBase*/ ctx[13], /*indicatorId*/ ctx[2], /*year*/ ctx[30]));
			format.attr(a, "rel", "prefetch");
		},
		m(target, anchor) {
			format.insert(target, a, anchor);
			format.append(a, circle);
		},
		p(ctx, dirty) {
			if (dirty[0] & /*$_layout, availableYears*/ 16385 && circle_cx_value !== (circle_cx_value = /*$_layout*/ ctx[14].scaleX(/*year*/ ctx[30]))) {
				format.attr(circle, "cx", circle_cx_value);
			}

			if (dirty[0] & /*$_layout*/ 16384 && circle_r_value !== (circle_r_value = /*$_layout*/ ctx[14].radius)) {
				format.attr(circle, "r", circle_r_value);
			}

			if (dirty[0] & /*selectedYear, availableYears*/ 9) {
				format.toggle_class(circle, "selected", /*selectedYear*/ ctx[3] && /*selectedYear*/ ctx[3] === /*year*/ ctx[30]);
			}

			if (dirty[0] & /*availableYears*/ 1 && a_aria_label_value !== (a_aria_label_value = /*year*/ ctx[30])) {
				format.attr(a, "aria-label", a_aria_label_value);
			}

			if (dirty[0] & /*$_hrefBase, indicatorId, availableYears*/ 8197 && a_href_value !== (a_href_value = url.makeURL(/*$_hrefBase*/ ctx[13], /*indicatorId*/ ctx[2], /*year*/ ctx[30]))) {
				format.attr(a, "href", a_href_value);
			}
		},
		d(detaching) {
			if (detaching) format.detach(a);
		}
	};
}

// (152:4) {#if $_yearRange}
function create_if_block_2$2(ctx) {
	let each_1_anchor;
	let each_value = /*$_yearRange*/ ctx[24];
	let each_blocks = [];

	for (let i = 0; i < each_value.length; i += 1) {
		each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
	}

	return {
		c() {
			for (let i = 0; i < each_blocks.length; i += 1) {
				each_blocks[i].c();
			}

			each_1_anchor = format.empty();
		},
		m(target, anchor) {
			for (let i = 0; i < each_blocks.length; i += 1) {
				each_blocks[i].m(target, anchor);
			}

			format.insert(target, each_1_anchor, anchor);
		},
		p(ctx, dirty) {
			if (dirty[0] & /*$_layout, $_yearRange, yearsY*/ 25182208) {
				each_value = /*$_yearRange*/ ctx[24];
				let i;

				for (i = 0; i < each_value.length; i += 1) {
					const child_ctx = get_each_context(ctx, each_value, i);

					if (each_blocks[i]) {
						each_blocks[i].p(child_ctx, dirty);
					} else {
						each_blocks[i] = create_each_block(child_ctx);
						each_blocks[i].c();
						each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
					}
				}

				for (; i < each_blocks.length; i += 1) {
					each_blocks[i].d(1);
				}

				each_blocks.length = each_value.length;
			}
		},
		d(detaching) {
			format.destroy_each(each_blocks, detaching);
			if (detaching) format.detach(each_1_anchor);
		}
	};
}

// (153:5) {#each $_yearRange as year}
function create_each_block(ctx) {
	let text_1;

	let t_value = (/*$_layout*/ ctx[14].doShortenYears
	? format.shortenYear(/*year*/ ctx[30])
	: /*year*/ ctx[30]) + "";

	let t;
	let text_1_font_size_value;
	let text_1_x_value;

	return {
		c() {
			text_1 = format.svg_element("text");
			t = format.text(t_value);
			format.attr(text_1, "font-size", text_1_font_size_value = /*$_layout*/ ctx[14].fontSize);
			format.attr(text_1, "x", text_1_x_value = /*$_layout*/ ctx[14].scaleX(/*year*/ ctx[30]));
			format.attr(text_1, "y", /*yearsY*/ ctx[23]);
			format.attr(text_1, "class", "svelte-rmsnzm");
		},
		m(target, anchor) {
			format.insert(target, text_1, anchor);
			format.append(text_1, t);
		},
		p(ctx, dirty) {
			if (dirty[0] & /*$_layout, $_yearRange*/ 16793600 && t_value !== (t_value = (/*$_layout*/ ctx[14].doShortenYears
			? format.shortenYear(/*year*/ ctx[30])
			: /*year*/ ctx[30]) + "")) format.set_data(t, t_value);

			if (dirty[0] & /*$_layout*/ 16384 && text_1_font_size_value !== (text_1_font_size_value = /*$_layout*/ ctx[14].fontSize)) {
				format.attr(text_1, "font-size", text_1_font_size_value);
			}

			if (dirty[0] & /*$_layout, $_yearRange*/ 16793600 && text_1_x_value !== (text_1_x_value = /*$_layout*/ ctx[14].scaleX(/*year*/ ctx[30]))) {
				format.attr(text_1, "x", text_1_x_value);
			}

			if (dirty[0] & /*yearsY*/ 8388608) {
				format.attr(text_1, "y", /*yearsY*/ ctx[23]);
			}
		},
		d(detaching) {
			if (detaching) format.detach(text_1);
		}
	};
}

function create_fragment$8(ctx) {
	let div;
	let if_block = (/*width*/ ctx[5] && /*height*/ ctx[1] && /*$_layout*/ ctx[14] || format.isServerSide) && create_if_block$2(ctx);

	return {
		c() {
			div = format.element("div");
			if (if_block) if_block.c();
			format.attr(div, "class", "Timeline svelte-rmsnzm");
		},
		m(target, anchor) {
			format.insert(target, div, anchor);
			if (if_block) if_block.m(div, null);
		},
		p(ctx, dirty) {
			if (/*width*/ ctx[5] && /*height*/ ctx[1] && /*$_layout*/ ctx[14] || format.isServerSide) {
				if (if_block) {
					if_block.p(ctx, dirty);
				} else {
					if_block = create_if_block$2(ctx);
					if_block.c();
					if_block.m(div, null);
				}
			} else if (if_block) {
				if_block.d(1);
				if_block = null;
			}
		},
		i: format.noop,
		o: format.noop,
		d(detaching) {
			if (detaching) format.detach(div);
			if (if_block) if_block.d();
		}
	};
}

function instance$2($$self, $$props, $$invalidate) {
	let yearsY;
	let halfHeight;
	let buttonY;
	let prevX;
	let nextX;
	let yearsCenterX;
	let min;
	let max;
	let med;
	let lineX1;
	let lineX2;
	let chevronLeftPath;
	let chevronRightPath;
	let selectedYearIndex;
	let prevYear;
	let isPrevYearActive;
	let nextYear;
	let isNextYearActive;
	let hrefPrev;
	let hrefNext;
	let $_hrefBase;
	let $_layout;
	let $_yearRange;
	format.component_subscribe($$self, format._hrefBase, $$value => $$invalidate(13, $_hrefBase = $$value));
	format.component_subscribe($$self, format._timelineLayout, $$value => $$invalidate(14, $_layout = $$value));
	format.component_subscribe($$self, format._yearRange, $$value => $$invalidate(24, $_yearRange = $$value));
	const zeroIfNaN = format.when(isNaN, format.always(0));
	let { availableYears = null } = $$props;
	let { height = null } = $$props;
	let { indicatorId = null } = $$props;
	let { selectedYear = null } = $$props;
	let { showLess = false } = $$props;
	let { width } = $$props;

	$$self.$$set = $$props => {
		if ('availableYears' in $$props) $$invalidate(0, availableYears = $$props.availableYears);
		if ('height' in $$props) $$invalidate(1, height = $$props.height);
		if ('indicatorId' in $$props) $$invalidate(2, indicatorId = $$props.indicatorId);
		if ('selectedYear' in $$props) $$invalidate(3, selectedYear = $$props.selectedYear);
		if ('showLess' in $$props) $$invalidate(4, showLess = $$props.showLess);
		if ('width' in $$props) $$invalidate(5, width = $$props.width);
	};

	$$self.$$.update = () => {
		if ($$self.$$.dirty[0] & /*availableYears, $_layout*/ 16385) {
			$$invalidate(23, yearsY = availableYears?.length > 0 ? $_layout.y2 : $_layout.ym);
		}

		if ($$self.$$.dirty[0] & /*$_layout*/ 16384) {
			/* buttons */
			$$invalidate(10, halfHeight = $_layout.height / 2);
		}

		if ($$self.$$.dirty[0] & /*halfHeight*/ 1024) {
			$$invalidate(12, buttonY = halfHeight / 2);
		}

		if ($$self.$$.dirty[0] & /*buttonY*/ 4096) {
			$$invalidate(22, prevX = buttonY);
		}

		if ($$self.$$.dirty[0] & /*buttonY, halfHeight*/ 5120) {
			$$invalidate(11, nextX = buttonY + halfHeight + 0.25 * buttonY);
		}

		if ($$self.$$.dirty[0] & /*nextX, halfHeight, width*/ 3104) {
			$$invalidate(21, yearsCenterX = (nextX + halfHeight + width) / 2);
		}

		if ($$self.$$.dirty[0] & /*halfHeight*/ 1024) {
			$$invalidate(27, min = halfHeight / 3);
		}

		if ($$self.$$.dirty[0] & /*min*/ 134217728) {
			$$invalidate(26, max = 2 * min);
		}

		if ($$self.$$.dirty[0] & /*halfHeight*/ 1024) {
			$$invalidate(28, med = halfHeight / 2);
		}

		if ($$self.$$.dirty[0] & /*$_layout, availableYears*/ 16385) {
			$$invalidate(20, lineX1 = zeroIfNaN($_layout.scaleX(availableYears[0]) + $_layout.radius));
		}

		if ($$self.$$.dirty[0] & /*$_layout, availableYears*/ 16385) {
			$$invalidate(19, lineX2 = zeroIfNaN($_layout.scaleX(format.last(availableYears)) - $_layout.radius));
		}

		if ($$self.$$.dirty[0] & /*max, min, med*/ 469762048) {
			$$invalidate(18, chevronLeftPath = `${max} ${min} ${min} ${med} ${max} ${max}`);
		}

		if ($$self.$$.dirty[0] & /*min, max, med*/ 469762048) {
			$$invalidate(17, chevronRightPath = `${min} ${min} ${max} ${med} ${min} ${max}`);
		}

		if ($$self.$$.dirty[0] & /*availableYears, selectedYear*/ 9) {
			$$invalidate(25, selectedYearIndex = format.findIndex(availableYears, format.is(selectedYear)));
		}

		if ($$self.$$.dirty[0] & /*availableYears, selectedYearIndex*/ 33554433) {
			$$invalidate(8, prevYear = availableYears[selectedYearIndex - 1]);
		}

		if ($$self.$$.dirty[0] & /*prevYear*/ 256) {
			$$invalidate(9, isPrevYearActive = format.isNotNil(prevYear));
		}

		if ($$self.$$.dirty[0] & /*availableYears, selectedYearIndex*/ 33554433) {
			$$invalidate(6, nextYear = availableYears[selectedYearIndex + 1]);
		}

		if ($$self.$$.dirty[0] & /*nextYear*/ 64) {
			$$invalidate(7, isNextYearActive = format.isNotNil(nextYear));
		}

		if ($$self.$$.dirty[0] & /*isPrevYearActive, $_hrefBase, indicatorId, prevYear*/ 8964) {
			$$invalidate(16, hrefPrev = isPrevYearActive
			? url.makeURL($_hrefBase, indicatorId, prevYear)
			: null);
		}

		if ($$self.$$.dirty[0] & /*isNextYearActive, $_hrefBase, indicatorId, nextYear*/ 8388) {
			$$invalidate(15, hrefNext = isNextYearActive
			? url.makeURL($_hrefBase, indicatorId, nextYear)
			: null);
		}
	};

	return [
		availableYears,
		height,
		indicatorId,
		selectedYear,
		showLess,
		width,
		nextYear,
		isNextYearActive,
		prevYear,
		isPrevYearActive,
		halfHeight,
		nextX,
		buttonY,
		$_hrefBase,
		$_layout,
		hrefNext,
		hrefPrev,
		chevronRightPath,
		chevronLeftPath,
		lineX2,
		lineX1,
		yearsCenterX,
		prevX,
		yearsY,
		$_yearRange,
		selectedYearIndex,
		max,
		min,
		med
	];
}

class Timeline extends format.SvelteComponent {
	constructor(options) {
		super();

		format.init(
			this,
			options,
			instance$2,
			create_fragment$8,
			format.safe_not_equal,
			{
				availableYears: 0,
				height: 1,
				indicatorId: 2,
				selectedYear: 3,
				showLess: 4,
				width: 5
			},
			add_css$2,
			[-1, -1]
		);
	}
}

/* ../ui/src/icons/feather/Activity.svelte generated by Svelte v3.44.2 */

function create_fragment$7(ctx) {
	let polyline;

	return {
		c() {
			polyline = format.svg_element("polyline");
			format.attr(polyline, "points", "22 12 18 12 15 21 9 3 6 12 2 12");
		},
		m(target, anchor) {
			format.insert(target, polyline, anchor);
		},
		p: format.noop,
		i: format.noop,
		o: format.noop,
		d(detaching) {
			if (detaching) format.detach(polyline);
		}
	};
}

class Activity extends format.SvelteComponent {
	constructor(options) {
		super();
		format.init(this, options, null, create_fragment$7, format.safe_not_equal, {});
	}
}

var Activity$1 = Activity;

/* ../ui/src/icons/feather/BarChart.svelte generated by Svelte v3.44.2 */

function create_fragment$6(ctx) {
	let line0;
	let line1;
	let line2;

	return {
		c() {
			line0 = format.svg_element("line");
			line1 = format.svg_element("line");
			line2 = format.svg_element("line");
			format.attr(line0, "x1", "12");
			format.attr(line0, "y1", "20");
			format.attr(line0, "x2", "12");
			format.attr(line0, "y2", "10");
			format.attr(line1, "x1", "18");
			format.attr(line1, "y1", "20");
			format.attr(line1, "x2", "18");
			format.attr(line1, "y2", "4");
			format.attr(line2, "x1", "6");
			format.attr(line2, "y1", "20");
			format.attr(line2, "x2", "6");
			format.attr(line2, "y2", "16");
		},
		m(target, anchor) {
			format.insert(target, line0, anchor);
			format.insert(target, line1, anchor);
			format.insert(target, line2, anchor);
		},
		p: format.noop,
		i: format.noop,
		o: format.noop,
		d(detaching) {
			if (detaching) format.detach(line0);
			if (detaching) format.detach(line1);
			if (detaching) format.detach(line2);
		}
	};
}

class BarChart extends format.SvelteComponent {
	constructor(options) {
		super();
		format.init(this, options, null, create_fragment$6, format.safe_not_equal, {});
	}
}

var BarChart$1 = BarChart;

/* ../ui/src/icons/feather/Clock.svelte generated by Svelte v3.44.2 */

function create_fragment$5(ctx) {
	let circle;
	let polyline;

	return {
		c() {
			circle = format.svg_element("circle");
			polyline = format.svg_element("polyline");
			format.attr(circle, "cx", "12");
			format.attr(circle, "cy", "12");
			format.attr(circle, "r", "10");
			format.attr(polyline, "points", "12 6 12 12 16 14");
		},
		m(target, anchor) {
			format.insert(target, circle, anchor);
			format.insert(target, polyline, anchor);
		},
		p: format.noop,
		i: format.noop,
		o: format.noop,
		d(detaching) {
			if (detaching) format.detach(circle);
			if (detaching) format.detach(polyline);
		}
	};
}

class Clock extends format.SvelteComponent {
	constructor(options) {
		super();
		format.init(this, options, null, create_fragment$5, format.safe_not_equal, {});
	}
}

var Clock$1 = Clock;

/* ../ui/src/icons/feather/List.svelte generated by Svelte v3.44.2 */

function create_fragment$4(ctx) {
	let line0;
	let line1;
	let line2;
	let line3;
	let line4;
	let line5;

	return {
		c() {
			line0 = format.svg_element("line");
			line1 = format.svg_element("line");
			line2 = format.svg_element("line");
			line3 = format.svg_element("line");
			line4 = format.svg_element("line");
			line5 = format.svg_element("line");
			format.attr(line0, "x1", "8");
			format.attr(line0, "y1", "6");
			format.attr(line0, "x2", "21");
			format.attr(line0, "y2", "6");
			format.attr(line1, "x1", "8");
			format.attr(line1, "y1", "12");
			format.attr(line1, "x2", "21");
			format.attr(line1, "y2", "12");
			format.attr(line2, "x1", "8");
			format.attr(line2, "y1", "18");
			format.attr(line2, "x2", "21");
			format.attr(line2, "y2", "18");
			format.attr(line3, "x1", "3");
			format.attr(line3, "y1", "6");
			format.attr(line3, "x2", "3.01");
			format.attr(line3, "y2", "6");
			format.attr(line4, "x1", "3");
			format.attr(line4, "y1", "12");
			format.attr(line4, "x2", "3.01");
			format.attr(line4, "y2", "12");
			format.attr(line5, "x1", "3");
			format.attr(line5, "y1", "18");
			format.attr(line5, "x2", "3.01");
			format.attr(line5, "y2", "18");
		},
		m(target, anchor) {
			format.insert(target, line0, anchor);
			format.insert(target, line1, anchor);
			format.insert(target, line2, anchor);
			format.insert(target, line3, anchor);
			format.insert(target, line4, anchor);
			format.insert(target, line5, anchor);
		},
		p: format.noop,
		i: format.noop,
		o: format.noop,
		d(detaching) {
			if (detaching) format.detach(line0);
			if (detaching) format.detach(line1);
			if (detaching) format.detach(line2);
			if (detaching) format.detach(line3);
			if (detaching) format.detach(line4);
			if (detaching) format.detach(line5);
		}
	};
}

class List extends format.SvelteComponent {
	constructor(options) {
		super();
		format.init(this, options, null, create_fragment$4, format.safe_not_equal, {});
	}
}

var List$1 = List;

/* ../ui/src/icons/feather/MapPin.svelte generated by Svelte v3.44.2 */

function create_fragment$3(ctx) {
	let path;
	let circle;

	return {
		c() {
			path = format.svg_element("path");
			circle = format.svg_element("circle");
			format.attr(path, "d", "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z");
			format.attr(circle, "cx", "12");
			format.attr(circle, "cy", "10");
			format.attr(circle, "r", "3");
		},
		m(target, anchor) {
			format.insert(target, path, anchor);
			format.insert(target, circle, anchor);
		},
		p: format.noop,
		i: format.noop,
		o: format.noop,
		d(detaching) {
			if (detaching) format.detach(path);
			if (detaching) format.detach(circle);
		}
	};
}

class MapPin extends format.SvelteComponent {
	constructor(options) {
		super();
		format.init(this, options, null, create_fragment$3, format.safe_not_equal, {});
	}
}

var MapPin$1 = MapPin;

/* ../ui/src/icons/feather/Settings.svelte generated by Svelte v3.44.2 */

function create_fragment$2(ctx) {
	let circle;
	let path;

	return {
		c() {
			circle = format.svg_element("circle");
			path = format.svg_element("path");
			format.attr(circle, "cx", "12");
			format.attr(circle, "cy", "12");
			format.attr(circle, "r", "3");
			format.attr(path, "d", "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z");
		},
		m(target, anchor) {
			format.insert(target, circle, anchor);
			format.insert(target, path, anchor);
		},
		p: format.noop,
		i: format.noop,
		o: format.noop,
		d(detaching) {
			if (detaching) format.detach(circle);
			if (detaching) format.detach(path);
		}
	};
}

class Settings extends format.SvelteComponent {
	constructor(options) {
		super();
		format.init(this, options, null, create_fragment$2, format.safe_not_equal, {});
	}
}

var Settings$1 = Settings;

/* src/node_modules/components/ViewSelector.svelte generated by Svelte v3.44.2 */

function add_css$1(target) {
	format.append_styles(target, "svelte-ghla19", ".ViewSelector.svelte-ghla19{background-color:white;border-top:1px solid var(--colorMain);display:grid;grid-template-columns:1fr 1fr;grid-template-rows:100%;height:100%;width:100%}.ViewSelector.id.svelte-ghla19{grid-template-columns:1fr 1fr 1fr 1fr}.ViewSelector.year.svelte-ghla19{grid-template-columns:1fr 1fr 1fr 1fr 1fr}.button.svelte-ghla19{align-self:center;justify-self:center;cursor:pointer}.rotated.svelte-ghla19{transform:scaleX(-1) rotate(-90deg)}.clickable.svelte-ghla19{cursor:pointer}");
}

// (57:27) 
function create_if_block_3$1(ctx) {
	let div0;
	let icon0;
	let t;
	let div1;
	let icon1;
	let current;
	let mounted;
	let dispose;

	icon0 = new indicator.Icon({
			props: {
				glyph: MapPin$1,
				stroke: /*strokes*/ ctx[3].map
			}
		});

	icon1 = new indicator.Icon({
			props: {
				glyph: BarChart$1,
				stroke: /*strokes*/ ctx[3].barchart
			}
		});

	return {
		c() {
			div0 = format.element("div");
			format.create_component(icon0.$$.fragment);
			t = format.space();
			div1 = format.element("div");
			format.create_component(icon1.$$.fragment);
			format.attr(div0, "class", "button clickable svelte-ghla19");
			format.attr(div1, "class", "button clickable rotated svelte-ghla19");
		},
		m(target, anchor) {
			format.insert(target, div0, anchor);
			format.mount_component(icon0, div0, null);
			format.insert(target, t, anchor);
			format.insert(target, div1, anchor);
			format.mount_component(icon1, div1, null);
			current = true;

			if (!mounted) {
				dispose = [
					format.listen(div0, "click", function () {
						if (format.is_function(/*showView*/ ctx[2]('map'))) /*showView*/ ctx[2]('map').apply(this, arguments);
					}),
					format.listen(div1, "click", function () {
						if (format.is_function(/*showView*/ ctx[2]('barchart'))) /*showView*/ ctx[2]('barchart').apply(this, arguments);
					})
				];

				mounted = true;
			}
		},
		p(new_ctx, dirty) {
			ctx = new_ctx;
			const icon0_changes = {};
			if (dirty & /*strokes*/ 8) icon0_changes.stroke = /*strokes*/ ctx[3].map;
			icon0.$set(icon0_changes);
			const icon1_changes = {};
			if (dirty & /*strokes*/ 8) icon1_changes.stroke = /*strokes*/ ctx[3].barchart;
			icon1.$set(icon1_changes);
		},
		i(local) {
			if (current) return;
			format.transition_in(icon0.$$.fragment, local);
			format.transition_in(icon1.$$.fragment, local);
			current = true;
		},
		o(local) {
			format.transition_out(icon0.$$.fragment, local);
			format.transition_out(icon1.$$.fragment, local);
			current = false;
		},
		d(detaching) {
			if (detaching) format.detach(div0);
			format.destroy_component(icon0);
			if (detaching) format.detach(t);
			if (detaching) format.detach(div1);
			format.destroy_component(icon1);
			mounted = false;
			format.run_all(dispose);
		}
	};
}

// (47:23) 
function create_if_block_2$1(ctx) {
	let div;
	let icon;
	let current;
	let mounted;
	let dispose;

	icon = new indicator.Icon({
			props: {
				glyph: Activity$1,
				stroke: /*strokes*/ ctx[3].trends
			}
		});

	return {
		c() {
			div = format.element("div");
			format.create_component(icon.$$.fragment);
			format.attr(div, "class", "button clickable svelte-ghla19");
		},
		m(target, anchor) {
			format.insert(target, div, anchor);
			format.mount_component(icon, div, null);
			current = true;

			if (!mounted) {
				dispose = format.listen(div, "click", function () {
					if (format.is_function(/*showView*/ ctx[2]('trends'))) /*showView*/ ctx[2]('trends').apply(this, arguments);
				});

				mounted = true;
			}
		},
		p(new_ctx, dirty) {
			ctx = new_ctx;
			const icon_changes = {};
			if (dirty & /*strokes*/ 8) icon_changes.stroke = /*strokes*/ ctx[3].trends;
			icon.$set(icon_changes);
		},
		i(local) {
			if (current) return;
			format.transition_in(icon.$$.fragment, local);
			current = true;
		},
		o(local) {
			format.transition_out(icon.$$.fragment, local);
			current = false;
		},
		d(detaching) {
			if (detaching) format.detach(div);
			format.destroy_component(icon);
			mounted = false;
			dispose();
		}
	};
}

// (37:1) {#if $_routes.Index}
function create_if_block_1$1(ctx) {
	let div;
	let icon;
	let current;
	let mounted;
	let dispose;

	icon = new indicator.Icon({
			props: {
				glyph: Clock$1,
				stroke: /*strokes*/ ctx[3].distribution
			}
		});

	return {
		c() {
			div = format.element("div");
			format.create_component(icon.$$.fragment);
			format.attr(div, "class", "button clickable svelte-ghla19");
		},
		m(target, anchor) {
			format.insert(target, div, anchor);
			format.mount_component(icon, div, null);
			current = true;

			if (!mounted) {
				dispose = format.listen(div, "click", function () {
					if (format.is_function(/*showView*/ ctx[2]('distribution'))) /*showView*/ ctx[2]('distribution').apply(this, arguments);
				});

				mounted = true;
			}
		},
		p(new_ctx, dirty) {
			ctx = new_ctx;
			const icon_changes = {};
			if (dirty & /*strokes*/ 8) icon_changes.stroke = /*strokes*/ ctx[3].distribution;
			icon.$set(icon_changes);
		},
		i(local) {
			if (current) return;
			format.transition_in(icon.$$.fragment, local);
			current = true;
		},
		o(local) {
			format.transition_out(icon.$$.fragment, local);
			current = false;
		},
		d(detaching) {
			if (detaching) format.detach(div);
			format.destroy_component(icon);
			mounted = false;
			dispose();
		}
	};
}

// (78:1) {#if $_routes.Id || $_routes.IdYear}
function create_if_block$1(ctx) {
	let div0;
	let icon0;
	let t;
	let div1;
	let icon1;
	let current;
	let mounted;
	let dispose;

	icon0 = new indicator.Icon({
			props: {
				glyph: indicator.Info,
				stroke: /*strokes*/ ctx[3].info
			}
		});

	icon1 = new indicator.Icon({
			props: {
				glyph: Settings$1,
				stroke: /*strokes*/ ctx[3].settings
			}
		});

	return {
		c() {
			div0 = format.element("div");
			format.create_component(icon0.$$.fragment);
			t = format.space();
			div1 = format.element("div");
			format.create_component(icon1.$$.fragment);
			format.attr(div0, "class", "button clickable svelte-ghla19");
			format.attr(div1, "class", "button clickable svelte-ghla19");
		},
		m(target, anchor) {
			format.insert(target, div0, anchor);
			format.mount_component(icon0, div0, null);
			format.insert(target, t, anchor);
			format.insert(target, div1, anchor);
			format.mount_component(icon1, div1, null);
			current = true;

			if (!mounted) {
				dispose = [
					format.listen(div0, "click", function () {
						if (format.is_function(/*showView*/ ctx[2]('info'))) /*showView*/ ctx[2]('info').apply(this, arguments);
					}),
					format.listen(div1, "click", function () {
						if (format.is_function(/*showView*/ ctx[2]('settings'))) /*showView*/ ctx[2]('settings').apply(this, arguments);
					})
				];

				mounted = true;
			}
		},
		p(new_ctx, dirty) {
			ctx = new_ctx;
			const icon0_changes = {};
			if (dirty & /*strokes*/ 8) icon0_changes.stroke = /*strokes*/ ctx[3].info;
			icon0.$set(icon0_changes);
			const icon1_changes = {};
			if (dirty & /*strokes*/ 8) icon1_changes.stroke = /*strokes*/ ctx[3].settings;
			icon1.$set(icon1_changes);
		},
		i(local) {
			if (current) return;
			format.transition_in(icon0.$$.fragment, local);
			format.transition_in(icon1.$$.fragment, local);
			current = true;
		},
		o(local) {
			format.transition_out(icon0.$$.fragment, local);
			format.transition_out(icon1.$$.fragment, local);
			current = false;
		},
		d(detaching) {
			if (detaching) format.detach(div0);
			format.destroy_component(icon0);
			if (detaching) format.detach(t);
			if (detaching) format.detach(div1);
			format.destroy_component(icon1);
			mounted = false;
			format.run_all(dispose);
		}
	};
}

function create_fragment$1(ctx) {
	let nav;
	let div;
	let icon;
	let t0;
	let current_block_type_index;
	let if_block0;
	let t1;
	let current;
	let mounted;
	let dispose;

	icon = new indicator.Icon({
			props: {
				glyph: List$1,
				stroke: /*strokes*/ ctx[3].sidebar
			}
		});

	const if_block_creators = [create_if_block_1$1, create_if_block_2$1, create_if_block_3$1];
	const if_blocks = [];

	function select_block_type(ctx, dirty) {
		if (/*$_routes*/ ctx[4].Index) return 0;
		if (/*$_routes*/ ctx[4].Id) return 1;
		if (/*$_routes*/ ctx[4].IdYear) return 2;
		return -1;
	}

	if (~(current_block_type_index = select_block_type(ctx))) {
		if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
	}

	let if_block1 = (/*$_routes*/ ctx[4].Id || /*$_routes*/ ctx[4].IdYear) && create_if_block$1(ctx);

	return {
		c() {
			nav = format.element("nav");
			div = format.element("div");
			format.create_component(icon.$$.fragment);
			t0 = format.space();
			if (if_block0) if_block0.c();
			t1 = format.space();
			if (if_block1) if_block1.c();
			format.attr(div, "class", "button clickable svelte-ghla19");
			format.attr(nav, "class", "ViewSelector svelte-ghla19");
			format.toggle_class(nav, "id", /*$_routes*/ ctx[4].Id);
			format.toggle_class(nav, "year", /*$_routes*/ ctx[4].IdYear);
		},
		m(target, anchor) {
			format.insert(target, nav, anchor);
			format.append(nav, div);
			format.mount_component(icon, div, null);
			format.append(nav, t0);

			if (~current_block_type_index) {
				if_blocks[current_block_type_index].m(nav, null);
			}

			format.append(nav, t1);
			if (if_block1) if_block1.m(nav, null);
			current = true;

			if (!mounted) {
				dispose = format.listen(div, "click", function () {
					if (format.is_function(/*showView*/ ctx[2]('sidebar'))) /*showView*/ ctx[2]('sidebar').apply(this, arguments);
				});

				mounted = true;
			}
		},
		p(new_ctx, [dirty]) {
			ctx = new_ctx;
			const icon_changes = {};
			if (dirty & /*strokes*/ 8) icon_changes.stroke = /*strokes*/ ctx[3].sidebar;
			icon.$set(icon_changes);
			let previous_block_index = current_block_type_index;
			current_block_type_index = select_block_type(ctx);

			if (current_block_type_index === previous_block_index) {
				if (~current_block_type_index) {
					if_blocks[current_block_type_index].p(ctx, dirty);
				}
			} else {
				if (if_block0) {
					format.group_outros();

					format.transition_out(if_blocks[previous_block_index], 1, 1, () => {
						if_blocks[previous_block_index] = null;
					});

					format.check_outros();
				}

				if (~current_block_type_index) {
					if_block0 = if_blocks[current_block_type_index];

					if (!if_block0) {
						if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
						if_block0.c();
					} else {
						if_block0.p(ctx, dirty);
					}

					format.transition_in(if_block0, 1);
					if_block0.m(nav, t1);
				} else {
					if_block0 = null;
				}
			}

			if (/*$_routes*/ ctx[4].Id || /*$_routes*/ ctx[4].IdYear) {
				if (if_block1) {
					if_block1.p(ctx, dirty);

					if (dirty & /*$_routes*/ 16) {
						format.transition_in(if_block1, 1);
					}
				} else {
					if_block1 = create_if_block$1(ctx);
					if_block1.c();
					format.transition_in(if_block1, 1);
					if_block1.m(nav, null);
				}
			} else if (if_block1) {
				format.group_outros();

				format.transition_out(if_block1, 1, 1, () => {
					if_block1 = null;
				});

				format.check_outros();
			}

			if (dirty & /*$_routes*/ 16) {
				format.toggle_class(nav, "id", /*$_routes*/ ctx[4].Id);
			}

			if (dirty & /*$_routes*/ 16) {
				format.toggle_class(nav, "year", /*$_routes*/ ctx[4].IdYear);
			}
		},
		i(local) {
			if (current) return;
			format.transition_in(icon.$$.fragment, local);
			format.transition_in(if_block0);
			format.transition_in(if_block1);
			current = true;
		},
		o(local) {
			format.transition_out(icon.$$.fragment, local);
			format.transition_out(if_block0);
			format.transition_out(if_block1);
			current = false;
		},
		d(detaching) {
			if (detaching) format.detach(nav);
			format.destroy_component(icon);

			if (~current_block_type_index) {
				if_blocks[current_block_type_index].d();
			}

			if (if_block1) if_block1.d();
			mounted = false;
			dispose();
		}
	};
}

function instance$1($$self, $$props, $$invalidate) {
	let strokes;

	let $_views,
		$$unsubscribe__views = format.noop,
		$$subscribe__views = () => ($$unsubscribe__views(), $$unsubscribe__views = format.subscribe(_views, $$value => $$invalidate(5, $_views = $$value)), _views);

	let $_routes,
		$$unsubscribe__routes = format.noop,
		$$subscribe__routes = () => ($$unsubscribe__routes(), $$unsubscribe__routes = format.subscribe(_routes, $$value => $$invalidate(4, $_routes = $$value)), _routes);

	$$self.$$.on_destroy.push(() => $$unsubscribe__views());
	$$self.$$.on_destroy.push(() => $$unsubscribe__routes());
	const makeStrokes = format.mapValuesWith(truthynessTo(['black', 'grey']));
	let { _routes = null } = $$props;
	$$subscribe__routes();
	let { _views = null } = $$props;
	$$subscribe__views();
	let { showView = null } = $$props;

	$$self.$$set = $$props => {
		if ('_routes' in $$props) $$subscribe__routes($$invalidate(0, _routes = $$props._routes));
		if ('_views' in $$props) $$subscribe__views($$invalidate(1, _views = $$props._views));
		if ('showView' in $$props) $$invalidate(2, showView = $$props.showView);
	};

	$$self.$$.update = () => {
		if ($$self.$$.dirty & /*$_views*/ 32) {
			$$invalidate(3, strokes = makeStrokes($_views));
		}
	};

	return [_routes, _views, showView, strokes, $_routes, $_views];
}

class ViewSelector extends format.SvelteComponent {
	constructor(options) {
		super();
		format.init(this, options, instance$1, create_fragment$1, format.safe_not_equal, { _routes: 0, _views: 1, showView: 2 }, add_css$1);
	}
}

/* src/routes/_layout.svelte generated by Svelte v3.44.2 */

function add_css(target) {
	format.append_styles(target, "svelte-dclfdu", ".time_region_value_layout.svelte-dclfdu.svelte-dclfdu{background-color:var(--colorWhite);display:grid;grid-template-columns:100%;height:100%;overflow:hidden;width:100%}.small.time_region_value_layout.svelte-dclfdu.svelte-dclfdu{grid-template-rows:calc(100% - var(--dimSmallSelectorHeight))\n\t\t\tvar(--dimSmallSelectorHeight)}.medium.time_region_value_layout.svelte-dclfdu.svelte-dclfdu{grid-template-rows:100%}.viewport.svelte-dclfdu.svelte-dclfdu{display:grid;grid-template-rows:100%;height:100%;width:100%}.small.svelte-dclfdu .viewport.svelte-dclfdu{transition:transform\n\t\t\tvar(--transDuration)\n\t\t\tvar(--transFunction);grid-template-columns:50% 50%;width:200%}.small.svelte-dclfdu .viewport.sidebar.svelte-dclfdu{transform:translate(0%, 0px)}.small.svelte-dclfdu .viewport.distribution.svelte-dclfdu,.small.svelte-dclfdu .viewport.trends.svelte-dclfdu,.small.svelte-dclfdu .viewport.map.svelte-dclfdu,.small.svelte-dclfdu .viewport.barchart.svelte-dclfdu,.small.svelte-dclfdu .viewport.settings.svelte-dclfdu,.small.svelte-dclfdu .viewport.info.svelte-dclfdu{transform:translate(-50%, 0px)}.medium.svelte-dclfdu .viewport.svelte-dclfdu,.medium.svelte-dclfdu .viewport.sidebar.svelte-dclfdu,.medium.svelte-dclfdu .viewport.distribution.svelte-dclfdu,.medium.svelte-dclfdu .viewport.trends.svelte-dclfdu,.medium.svelte-dclfdu .viewport.map.svelte-dclfdu,.medium.svelte-dclfdu .viewport.barchart.svelte-dclfdu,.medium.svelte-dclfdu .viewport.settings.svelte-dclfdu,.medium.svelte-dclfdu .viewport.info.svelte-dclfdu{grid-template-columns:var(--dimSidebarWidth)\n\t\t\tcalc(100% - var(--dimSidebarWidth));transform:translate(0%, 0px);transition:null;width:100%}.sidebar.svelte-dclfdu.svelte-dclfdu{height:100%;width:100%}.content.svelte-dclfdu.svelte-dclfdu{--dimTimelineHeight:60px;display:grid;grid-template-columns:100%;height:100%;width:100%}.content.svelte-dclfdu.svelte-dclfdu{grid-template-areas:'slot' 'nav';grid-template-rows:calc(100% - var(--dimTimelineHeight))\n\t\t\tvar(--dimTimelineHeight)}.content.svelte-dclfdu section.svelte-dclfdu{grid-area:slot;height:100%;width:100%}.content.svelte-dclfdu nav.svelte-dclfdu{background-color:var(--colorNav) !important;grid-area:nav;height:100%;padding:0 var(--dimPadding);width:100%}.content.isTimelineHidden.svelte-dclfdu.svelte-dclfdu{grid-template-areas:'slot';grid-template-rows:100%}.hidden.svelte-dclfdu.svelte-dclfdu{display:none !important}");
}

// (68:0) {#if $_screenClasses || isServerSide}
function create_if_block_1(ctx) {
	let section1;
	let div2;
	let div0;
	let sidebar;
	let t0;
	let div1;
	let section0;
	let t1;
	let div1_resize_listener;
	let div2_class_value;
	let t2;
	let section1_class_value;
	let current;

	sidebar = new Sidebar({
			props: {
				_groups: /*_groups*/ ctx[0],
				currentId: /*segment*/ ctx[1]
			}
		});

	const default_slot_template = /*#slots*/ ctx[22].default;
	const default_slot = format.create_slot(default_slot_template, ctx, /*$$scope*/ ctx[21], null);
	let if_block0 = !/*$_isTimelineHidden*/ ctx[8] && create_if_block_3(ctx);
	let if_block1 = /*$_isSmallScreen*/ ctx[2] && create_if_block_2();

	return {
		c() {
			section1 = format.element("section");
			div2 = format.element("div");
			div0 = format.element("div");
			format.create_component(sidebar.$$.fragment);
			t0 = format.space();
			div1 = format.element("div");
			section0 = format.element("section");
			if (default_slot) default_slot.c();
			t1 = format.space();
			if (if_block0) if_block0.c();
			t2 = format.space();
			if (if_block1) if_block1.c();
			format.attr(div0, "class", "sidebar svelte-dclfdu");
			format.attr(section0, "class", "svelte-dclfdu");
			format.attr(div1, "class", "content svelte-dclfdu");
			format.add_render_callback(() => /*div1_elementresize_handler*/ ctx[24].call(div1));
			format.toggle_class(div1, "isTimelineHidden", /*$_isTimelineHidden*/ ctx[8]);
			format.attr(div2, "class", div2_class_value = "viewport " + /*$_viewsClasses*/ ctx[7] + " svelte-dclfdu");
			format.toggle_class(div2, "routeId", /*routeId*/ ctx[4]);
			format.toggle_class(div2, "routeIdYear", /*routeIdYear*/ ctx[3]);
			format.attr(section1, "class", section1_class_value = "time_region_value_layout " + /*$_screenClasses*/ ctx[5] + " svelte-dclfdu");
			format.attr(section1, "style", /*$_style*/ ctx[6]);
			format.toggle_class(section1, "hidden", !/*$_screenClasses*/ ctx[5]);
		},
		m(target, anchor) {
			format.insert(target, section1, anchor);
			format.append(section1, div2);
			format.append(div2, div0);
			format.mount_component(sidebar, div0, null);
			format.append(div2, t0);
			format.append(div2, div1);
			format.append(div1, section0);

			if (default_slot) {
				default_slot.m(section0, null);
			}

			format.append(div1, t1);
			if (if_block0) if_block0.m(div1, null);
			div1_resize_listener = format.add_resize_listener(div1, /*div1_elementresize_handler*/ ctx[24].bind(div1));
			format.append(section1, t2);
			if (if_block1) if_block1.m(section1, null);
			current = true;
		},
		p(ctx, dirty) {
			const sidebar_changes = {};
			if (dirty & /*_groups*/ 1) sidebar_changes._groups = /*_groups*/ ctx[0];
			if (dirty & /*segment*/ 2) sidebar_changes.currentId = /*segment*/ ctx[1];
			sidebar.$set(sidebar_changes);

			if (default_slot) {
				if (default_slot.p && (!current || dirty & /*$$scope*/ 2097152)) {
					format.update_slot_base(
						default_slot,
						default_slot_template,
						ctx,
						/*$$scope*/ ctx[21],
						!current
						? format.get_all_dirty_from_scope(/*$$scope*/ ctx[21])
						: format.get_slot_changes(default_slot_template, /*$$scope*/ ctx[21], dirty, null),
						null
					);
				}
			}

			if (!/*$_isTimelineHidden*/ ctx[8]) {
				if (if_block0) {
					if_block0.p(ctx, dirty);

					if (dirty & /*$_isTimelineHidden*/ 256) {
						format.transition_in(if_block0, 1);
					}
				} else {
					if_block0 = create_if_block_3(ctx);
					if_block0.c();
					format.transition_in(if_block0, 1);
					if_block0.m(div1, null);
				}
			} else if (if_block0) {
				format.group_outros();

				format.transition_out(if_block0, 1, 1, () => {
					if_block0 = null;
				});

				format.check_outros();
			}

			if (dirty & /*$_isTimelineHidden*/ 256) {
				format.toggle_class(div1, "isTimelineHidden", /*$_isTimelineHidden*/ ctx[8]);
			}

			if (!current || dirty & /*$_viewsClasses*/ 128 && div2_class_value !== (div2_class_value = "viewport " + /*$_viewsClasses*/ ctx[7] + " svelte-dclfdu")) {
				format.attr(div2, "class", div2_class_value);
			}

			if (dirty & /*$_viewsClasses, routeId*/ 144) {
				format.toggle_class(div2, "routeId", /*routeId*/ ctx[4]);
			}

			if (dirty & /*$_viewsClasses, routeIdYear*/ 136) {
				format.toggle_class(div2, "routeIdYear", /*routeIdYear*/ ctx[3]);
			}

			if (/*$_isSmallScreen*/ ctx[2]) {
				if (if_block1) {
					if_block1.p(ctx, dirty);

					if (dirty & /*$_isSmallScreen*/ 4) {
						format.transition_in(if_block1, 1);
					}
				} else {
					if_block1 = create_if_block_2();
					if_block1.c();
					format.transition_in(if_block1, 1);
					if_block1.m(section1, null);
				}
			} else if (if_block1) {
				format.group_outros();

				format.transition_out(if_block1, 1, 1, () => {
					if_block1 = null;
				});

				format.check_outros();
			}

			if (!current || dirty & /*$_screenClasses*/ 32 && section1_class_value !== (section1_class_value = "time_region_value_layout " + /*$_screenClasses*/ ctx[5] + " svelte-dclfdu")) {
				format.attr(section1, "class", section1_class_value);
			}

			if (!current || dirty & /*$_style*/ 64) {
				format.attr(section1, "style", /*$_style*/ ctx[6]);
			}

			if (dirty & /*$_screenClasses, $_screenClasses*/ 32) {
				format.toggle_class(section1, "hidden", !/*$_screenClasses*/ ctx[5]);
			}
		},
		i(local) {
			if (current) return;
			format.transition_in(sidebar.$$.fragment, local);
			format.transition_in(default_slot, local);
			format.transition_in(if_block0);
			format.transition_in(if_block1);
			current = true;
		},
		o(local) {
			format.transition_out(sidebar.$$.fragment, local);
			format.transition_out(default_slot, local);
			format.transition_out(if_block0);
			format.transition_out(if_block1);
			current = false;
		},
		d(detaching) {
			if (detaching) format.detach(section1);
			format.destroy_component(sidebar);
			if (default_slot) default_slot.d(detaching);
			if (if_block0) if_block0.d();
			div1_resize_listener();
			if (if_block1) if_block1.d();
		}
	};
}

// (93:4) {#if !$_isTimelineHidden}
function create_if_block_3(ctx) {
	let nav;
	let timeline;
	let nav_resize_listener;
	let current;

	timeline = new Timeline({
			props: {
				availableYears: /*$_availableYears*/ ctx[11],
				height: /*$_timelineHeight*/ ctx[10],
				indicatorId: /*segment*/ ctx[1],
				selectedYear: /*$_selectedYear*/ ctx[12],
				showLess: /*$_isSmallScreen*/ ctx[2],
				width: /*$_timelineWidth*/ ctx[9]
			}
		});

	return {
		c() {
			nav = format.element("nav");
			format.create_component(timeline.$$.fragment);
			format.attr(nav, "class", "svelte-dclfdu");
			format.add_render_callback(() => /*nav_elementresize_handler*/ ctx[23].call(nav));
		},
		m(target, anchor) {
			format.insert(target, nav, anchor);
			format.mount_component(timeline, nav, null);
			nav_resize_listener = format.add_resize_listener(nav, /*nav_elementresize_handler*/ ctx[23].bind(nav));
			current = true;
		},
		p(ctx, dirty) {
			const timeline_changes = {};
			if (dirty & /*$_availableYears*/ 2048) timeline_changes.availableYears = /*$_availableYears*/ ctx[11];
			if (dirty & /*$_timelineHeight*/ 1024) timeline_changes.height = /*$_timelineHeight*/ ctx[10];
			if (dirty & /*segment*/ 2) timeline_changes.indicatorId = /*segment*/ ctx[1];
			if (dirty & /*$_selectedYear*/ 4096) timeline_changes.selectedYear = /*$_selectedYear*/ ctx[12];
			if (dirty & /*$_isSmallScreen*/ 4) timeline_changes.showLess = /*$_isSmallScreen*/ ctx[2];
			if (dirty & /*$_timelineWidth*/ 512) timeline_changes.width = /*$_timelineWidth*/ ctx[9];
			timeline.$set(timeline_changes);
		},
		i(local) {
			if (current) return;
			format.transition_in(timeline.$$.fragment, local);
			current = true;
		},
		o(local) {
			format.transition_out(timeline.$$.fragment, local);
			current = false;
		},
		d(detaching) {
			if (detaching) format.detach(nav);
			format.destroy_component(timeline);
			nav_resize_listener();
		}
	};
}

// (110:2) {#if $_isSmallScreen}
function create_if_block_2(ctx) {
	let viewselector;
	let current;
	viewselector = new ViewSelector({ props: { _routes: format._routes, _views: format._views, showView: format.showView } });

	return {
		c() {
			format.create_component(viewselector.$$.fragment);
		},
		m(target, anchor) {
			format.mount_component(viewselector, target, anchor);
			current = true;
		},
		p: format.noop,
		i(local) {
			if (current) return;
			format.transition_in(viewselector.$$.fragment, local);
			current = true;
		},
		o(local) {
			format.transition_out(viewselector.$$.fragment, local);
			current = false;
		},
		d(detaching) {
			format.destroy_component(viewselector, detaching);
		}
	};
}

// (120:0) {#if !$_screenClasses}
function create_if_block(ctx) {
	let loadingview;
	let current;

	loadingview = new POIs.LoadingView({
			props: { stroke: /*$_theme*/ ctx[13].colorMain }
		});

	return {
		c() {
			format.create_component(loadingview.$$.fragment);
		},
		m(target, anchor) {
			format.mount_component(loadingview, target, anchor);
			current = true;
		},
		p(ctx, dirty) {
			const loadingview_changes = {};
			if (dirty & /*$_theme*/ 8192) loadingview_changes.stroke = /*$_theme*/ ctx[13].colorMain;
			loadingview.$set(loadingview_changes);
		},
		i(local) {
			if (current) return;
			format.transition_in(loadingview.$$.fragment, local);
			current = true;
		},
		o(local) {
			format.transition_out(loadingview.$$.fragment, local);
			current = false;
		},
		d(detaching) {
			format.destroy_component(loadingview, detaching);
		}
	};
}

function create_fragment(ctx) {
	let screensensor;
	let t0;
	let t1;
	let if_block1_anchor;
	let current;
	screensensor = new format.ScreenSensor({});
	let if_block0 = (/*$_screenClasses*/ ctx[5] || format.isServerSide) && create_if_block_1(ctx);
	let if_block1 = !/*$_screenClasses*/ ctx[5] && create_if_block(ctx);

	return {
		c() {
			format.create_component(screensensor.$$.fragment);
			t0 = format.space();
			if (if_block0) if_block0.c();
			t1 = format.space();
			if (if_block1) if_block1.c();
			if_block1_anchor = format.empty();
		},
		m(target, anchor) {
			format.mount_component(screensensor, target, anchor);
			format.insert(target, t0, anchor);
			if (if_block0) if_block0.m(target, anchor);
			format.insert(target, t1, anchor);
			if (if_block1) if_block1.m(target, anchor);
			format.insert(target, if_block1_anchor, anchor);
			current = true;
		},
		p(ctx, [dirty]) {
			if (/*$_screenClasses*/ ctx[5] || format.isServerSide) {
				if (if_block0) {
					if_block0.p(ctx, dirty);

					if (dirty & /*$_screenClasses*/ 32) {
						format.transition_in(if_block0, 1);
					}
				} else {
					if_block0 = create_if_block_1(ctx);
					if_block0.c();
					format.transition_in(if_block0, 1);
					if_block0.m(t1.parentNode, t1);
				}
			} else if (if_block0) {
				format.group_outros();

				format.transition_out(if_block0, 1, 1, () => {
					if_block0 = null;
				});

				format.check_outros();
			}

			if (!/*$_screenClasses*/ ctx[5]) {
				if (if_block1) {
					if_block1.p(ctx, dirty);

					if (dirty & /*$_screenClasses*/ 32) {
						format.transition_in(if_block1, 1);
					}
				} else {
					if_block1 = create_if_block(ctx);
					if_block1.c();
					format.transition_in(if_block1, 1);
					if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
				}
			} else if (if_block1) {
				format.group_outros();

				format.transition_out(if_block1, 1, 1, () => {
					if_block1 = null;
				});

				format.check_outros();
			}
		},
		i(local) {
			if (current) return;
			format.transition_in(screensensor.$$.fragment, local);
			format.transition_in(if_block0);
			format.transition_in(if_block1);
			current = true;
		},
		o(local) {
			format.transition_out(screensensor.$$.fragment, local);
			format.transition_out(if_block0);
			format.transition_out(if_block1);
			current = false;
		},
		d(detaching) {
			format.destroy_component(screensensor, detaching);
			if (detaching) format.detach(t0);
			if (if_block0) if_block0.d(detaching);
			if (detaching) format.detach(t1);
			if (if_block1) if_block1.d(detaching);
			if (detaching) format.detach(if_block1_anchor);
		}
	};
}

function instance($$self, $$props, $$invalidate) {
	let routeId;
	let routeIdYear;
	let $_routes;
	let $_isSmallScreen;

	let $_groups,
		$$unsubscribe__groups = format.noop,
		$$subscribe__groups = () => ($$unsubscribe__groups(), $$unsubscribe__groups = format.subscribe(_groups, $$value => $$invalidate(20, $_groups = $$value)), _groups);

	let $_screenClasses;
	let $_style;
	let $_viewsClasses;
	let $_isTimelineHidden;
	let $_timelineWidth;
	let $_timelineHeight;
	let $_availableYears;
	let $_selectedYear;
	let $_theme;
	format.component_subscribe($$self, format._routes, $$value => $$invalidate(19, $_routes = $$value));
	format.component_subscribe($$self, format._isSmallScreen, $$value => $$invalidate(2, $_isSmallScreen = $$value));
	format.component_subscribe($$self, format._screenClasses, $$value => $$invalidate(5, $_screenClasses = $$value));
	format.component_subscribe($$self, indicator._style, $$value => $$invalidate(6, $_style = $$value));
	format.component_subscribe($$self, format._viewsClasses, $$value => $$invalidate(7, $_viewsClasses = $$value));
	format.component_subscribe($$self, format._isTimelineHidden, $$value => $$invalidate(8, $_isTimelineHidden = $$value));
	format.component_subscribe($$self, format._timelineWidth, $$value => $$invalidate(9, $_timelineWidth = $$value));
	format.component_subscribe($$self, format._timelineHeight, $$value => $$invalidate(10, $_timelineHeight = $$value));
	format.component_subscribe($$self, indicator._availableYears, $$value => $$invalidate(11, $_availableYears = $$value));
	format.component_subscribe($$self, format._selectedYear, $$value => $$invalidate(12, $_selectedYear = $$value));
	format.component_subscribe($$self, indicator._theme, $$value => $$invalidate(13, $_theme = $$value));
	$$self.$$.on_destroy.push(() => $$unsubscribe__groups());
	let { $$slots: slots = {}, $$scope } = $$props;
	let { _groups = null } = $$props;
	$$subscribe__groups();
	let { flags = null } = $$props;
	let { hrefBase = '' } = $$props;
	let { POIs: POIs$1 = null } = $$props;
	let { regionSettings = null } = $$props;
	let { segment = null } = $$props;
	let { theme = null } = $$props;

	function nav_elementresize_handler() {
		$_timelineHeight = this.clientHeight;
		format._timelineHeight.set($_timelineHeight);
	}

	function div1_elementresize_handler() {
		$_timelineWidth = this.clientWidth;
		format._timelineWidth.set($_timelineWidth);
	}

	$$self.$$set = $$props => {
		if ('_groups' in $$props) $$subscribe__groups($$invalidate(0, _groups = $$props._groups));
		if ('flags' in $$props) $$invalidate(14, flags = $$props.flags);
		if ('hrefBase' in $$props) $$invalidate(15, hrefBase = $$props.hrefBase);
		if ('POIs' in $$props) $$invalidate(16, POIs$1 = $$props.POIs);
		if ('regionSettings' in $$props) $$invalidate(17, regionSettings = $$props.regionSettings);
		if ('segment' in $$props) $$invalidate(1, segment = $$props.segment);
		if ('theme' in $$props) $$invalidate(18, theme = $$props.theme);
		if ('$$scope' in $$props) $$invalidate(21, $$scope = $$props.$$scope);
	};

	$$self.$$.update = () => {
		if ($$self.$$.dirty & /*_groups, $_groups*/ 1048577) {
			_groups && format.setGroups($_groups);
		}

		if ($$self.$$.dirty & /*flags*/ 16384) {
			flags && format._navFlags.set(flags);
		}

		if ($$self.$$.dirty & /*hrefBase*/ 32768) {
			hrefBase && format._hrefBase.set(hrefBase);
		}

		if ($$self.$$.dirty & /*POIs*/ 65536) {
			POIs$1 && POIs._POIs.set(POIs$1);
		}

		if ($$self.$$.dirty & /*regionSettings*/ 131072) {
			regionSettings && indicator._regionSettings.set(regionSettings);
		}

		if ($$self.$$.dirty & /*theme*/ 262144) {
			theme && indicator.customizeTheme(theme);
		}

		if ($$self.$$.dirty & /*$_isSmallScreen, $_routes*/ 524292) {
			$$invalidate(4, routeId = $_isSmallScreen && $_routes.Id);
		}

		if ($$self.$$.dirty & /*$_isSmallScreen, $_routes*/ 524292) {
			$$invalidate(3, routeIdYear = $_isSmallScreen && $_routes.IdYear);
		}
	};

	return [
		_groups,
		segment,
		$_isSmallScreen,
		routeIdYear,
		routeId,
		$_screenClasses,
		$_style,
		$_viewsClasses,
		$_isTimelineHidden,
		$_timelineWidth,
		$_timelineHeight,
		$_availableYears,
		$_selectedYear,
		$_theme,
		flags,
		hrefBase,
		POIs$1,
		regionSettings,
		theme,
		$_routes,
		$_groups,
		$$scope,
		slots,
		nav_elementresize_handler,
		div1_elementresize_handler
	];
}

class Layout extends format.SvelteComponent {
	constructor(options) {
		super();

		format.init(
			this,
			options,
			instance,
			create_fragment,
			format.safe_not_equal,
			{
				_groups: 0,
				flags: 14,
				hrefBase: 15,
				POIs: 16,
				regionSettings: 17,
				segment: 1,
				theme: 18
			},
			add_css
		);
	}
}

module.exports = Layout;
