
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
var app = (function () {
    'use strict';

    function noop() { }
    function assign(tar, src) {
        // @ts-ignore
        for (const k in src)
            tar[k] = src[k];
        return tar;
    }
    function is_promise(value) {
        return value && typeof value === 'object' && typeof value.then === 'function';
    }
    function add_location(element, file, line, column, char) {
        element.__svelte_meta = {
            loc: { file, line, column, char }
        };
    }
    function run(fn) {
        return fn();
    }
    function blank_object() {
        return Object.create(null);
    }
    function run_all(fns) {
        fns.forEach(run);
    }
    function is_function(thing) {
        return typeof thing === 'function';
    }
    function safe_not_equal(a, b) {
        return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
    }
    let src_url_equal_anchor;
    function src_url_equal(element_src, url) {
        if (!src_url_equal_anchor) {
            src_url_equal_anchor = document.createElement('a');
        }
        src_url_equal_anchor.href = url;
        return element_src === src_url_equal_anchor.href;
    }
    function is_empty(obj) {
        return Object.keys(obj).length === 0;
    }
    function validate_store(store, name) {
        if (store != null && typeof store.subscribe !== 'function') {
            throw new Error(`'${name}' is not a store with a 'subscribe' method`);
        }
    }
    function subscribe(store, ...callbacks) {
        if (store == null) {
            return noop;
        }
        const unsub = store.subscribe(...callbacks);
        return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
    }
    function component_subscribe(component, store, callback) {
        component.$$.on_destroy.push(subscribe(store, callback));
    }
    function create_slot(definition, ctx, $$scope, fn) {
        if (definition) {
            const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);
            return definition[0](slot_ctx);
        }
    }
    function get_slot_context(definition, ctx, $$scope, fn) {
        return definition[1] && fn
            ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))
            : $$scope.ctx;
    }
    function get_slot_changes(definition, $$scope, dirty, fn) {
        if (definition[2] && fn) {
            const lets = definition[2](fn(dirty));
            if ($$scope.dirty === undefined) {
                return lets;
            }
            if (typeof lets === 'object') {
                const merged = [];
                const len = Math.max($$scope.dirty.length, lets.length);
                for (let i = 0; i < len; i += 1) {
                    merged[i] = $$scope.dirty[i] | lets[i];
                }
                return merged;
            }
            return $$scope.dirty | lets;
        }
        return $$scope.dirty;
    }
    function update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {
        if (slot_changes) {
            const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);
            slot.p(slot_context, slot_changes);
        }
    }
    function get_all_dirty_from_scope($$scope) {
        if ($$scope.ctx.length > 32) {
            const dirty = [];
            const length = $$scope.ctx.length / 32;
            for (let i = 0; i < length; i++) {
                dirty[i] = -1;
            }
            return dirty;
        }
        return -1;
    }
    function null_to_empty(value) {
        return value == null ? '' : value;
    }
    function action_destroyer(action_result) {
        return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;
    }
    function append(target, node) {
        target.appendChild(node);
    }
    function insert(target, node, anchor) {
        target.insertBefore(node, anchor || null);
    }
    function detach(node) {
        if (node.parentNode) {
            node.parentNode.removeChild(node);
        }
    }
    function destroy_each(iterations, detaching) {
        for (let i = 0; i < iterations.length; i += 1) {
            if (iterations[i])
                iterations[i].d(detaching);
        }
    }
    function element(name) {
        return document.createElement(name);
    }
    function svg_element(name) {
        return document.createElementNS('http://www.w3.org/2000/svg', name);
    }
    function text(data) {
        return document.createTextNode(data);
    }
    function space() {
        return text(' ');
    }
    function empty() {
        return text('');
    }
    function listen(node, event, handler, options) {
        node.addEventListener(event, handler, options);
        return () => node.removeEventListener(event, handler, options);
    }
    function prevent_default(fn) {
        return function (event) {
            event.preventDefault();
            // @ts-ignore
            return fn.call(this, event);
        };
    }
    function attr(node, attribute, value) {
        if (value == null)
            node.removeAttribute(attribute);
        else if (node.getAttribute(attribute) !== value)
            node.setAttribute(attribute, value);
    }
    function children(element) {
        return Array.from(element.childNodes);
    }
    function set_input_value(input, value) {
        input.value = value == null ? '' : value;
    }
    function set_style(node, key, value, important) {
        if (value === null) {
            node.style.removeProperty(key);
        }
        else {
            node.style.setProperty(key, value, important ? 'important' : '');
        }
    }
    function toggle_class(element, name, toggle) {
        element.classList[toggle ? 'add' : 'remove'](name);
    }
    function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {
        const e = document.createEvent('CustomEvent');
        e.initCustomEvent(type, bubbles, cancelable, detail);
        return e;
    }

    let current_component;
    function set_current_component(component) {
        current_component = component;
    }
    function get_current_component() {
        if (!current_component)
            throw new Error('Function called outside component initialization');
        return current_component;
    }
    /**
     * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
     * It must be called during the component's initialisation (but doesn't need to live *inside* the component;
     * it can be called from an external module).
     *
     * `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).
     *
     * https://svelte.dev/docs#run-time-svelte-onmount
     */
    function onMount(fn) {
        get_current_component().$$.on_mount.push(fn);
    }
    /**
     * Schedules a callback to run immediately after the component has been updated.
     *
     * The first time the callback runs will be after the initial `onMount`
     */
    function afterUpdate(fn) {
        get_current_component().$$.after_update.push(fn);
    }
    /**
     * Schedules a callback to run immediately before the component is unmounted.
     *
     * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the
     * only one that runs inside a server-side component.
     *
     * https://svelte.dev/docs#run-time-svelte-ondestroy
     */
    function onDestroy(fn) {
        get_current_component().$$.on_destroy.push(fn);
    }
    /**
     * Creates an event dispatcher that can be used to dispatch [component events](/docs#template-syntax-component-directives-on-eventname).
     * Event dispatchers are functions that can take two arguments: `name` and `detail`.
     *
     * Component events created with `createEventDispatcher` create a
     * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).
     * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).
     * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)
     * property and can contain any type of data.
     *
     * https://svelte.dev/docs#run-time-svelte-createeventdispatcher
     */
    function createEventDispatcher() {
        const component = get_current_component();
        return (type, detail, { cancelable = false } = {}) => {
            const callbacks = component.$$.callbacks[type];
            if (callbacks) {
                // TODO are there situations where events could be dispatched
                // in a server (non-DOM) environment?
                const event = custom_event(type, detail, { cancelable });
                callbacks.slice().forEach(fn => {
                    fn.call(component, event);
                });
                return !event.defaultPrevented;
            }
            return true;
        };
    }
    // TODO figure out if we still want to support
    // shorthand events, or if we want to implement
    // a real bubbling mechanism
    function bubble(component, event) {
        const callbacks = component.$$.callbacks[event.type];
        if (callbacks) {
            // @ts-ignore
            callbacks.slice().forEach(fn => fn.call(this, event));
        }
    }

    const dirty_components = [];
    const binding_callbacks = [];
    const render_callbacks = [];
    const flush_callbacks = [];
    const resolved_promise = Promise.resolve();
    let update_scheduled = false;
    function schedule_update() {
        if (!update_scheduled) {
            update_scheduled = true;
            resolved_promise.then(flush);
        }
    }
    function tick() {
        schedule_update();
        return resolved_promise;
    }
    function add_render_callback(fn) {
        render_callbacks.push(fn);
    }
    function add_flush_callback(fn) {
        flush_callbacks.push(fn);
    }
    // flush() calls callbacks in this order:
    // 1. All beforeUpdate callbacks, in order: parents before children
    // 2. All bind:this callbacks, in reverse order: children before parents.
    // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
    //    for afterUpdates called during the initial onMount, which are called in
    //    reverse order: children before parents.
    // Since callbacks might update component values, which could trigger another
    // call to flush(), the following steps guard against this:
    // 1. During beforeUpdate, any updated components will be added to the
    //    dirty_components array and will cause a reentrant call to flush(). Because
    //    the flush index is kept outside the function, the reentrant call will pick
    //    up where the earlier call left off and go through all dirty components. The
    //    current_component value is saved and restored so that the reentrant call will
    //    not interfere with the "parent" flush() call.
    // 2. bind:this callbacks cannot trigger new flush() calls.
    // 3. During afterUpdate, any updated components will NOT have their afterUpdate
    //    callback called a second time; the seen_callbacks set, outside the flush()
    //    function, guarantees this behavior.
    const seen_callbacks = new Set();
    let flushidx = 0; // Do *not* move this inside the flush() function
    function flush() {
        const saved_component = current_component;
        do {
            // first, call beforeUpdate functions
            // and update components
            while (flushidx < dirty_components.length) {
                const component = dirty_components[flushidx];
                flushidx++;
                set_current_component(component);
                update(component.$$);
            }
            set_current_component(null);
            dirty_components.length = 0;
            flushidx = 0;
            while (binding_callbacks.length)
                binding_callbacks.pop()();
            // then, once components are updated, call
            // afterUpdate functions. This may cause
            // subsequent updates...
            for (let i = 0; i < render_callbacks.length; i += 1) {
                const callback = render_callbacks[i];
                if (!seen_callbacks.has(callback)) {
                    // ...so guard against infinite loops
                    seen_callbacks.add(callback);
                    callback();
                }
            }
            render_callbacks.length = 0;
        } while (dirty_components.length);
        while (flush_callbacks.length) {
            flush_callbacks.pop()();
        }
        update_scheduled = false;
        seen_callbacks.clear();
        set_current_component(saved_component);
    }
    function update($$) {
        if ($$.fragment !== null) {
            $$.update();
            run_all($$.before_update);
            const dirty = $$.dirty;
            $$.dirty = [-1];
            $$.fragment && $$.fragment.p($$.ctx, dirty);
            $$.after_update.forEach(add_render_callback);
        }
    }
    const outroing = new Set();
    let outros;
    function group_outros() {
        outros = {
            r: 0,
            c: [],
            p: outros // parent group
        };
    }
    function check_outros() {
        if (!outros.r) {
            run_all(outros.c);
        }
        outros = outros.p;
    }
    function transition_in(block, local) {
        if (block && block.i) {
            outroing.delete(block);
            block.i(local);
        }
    }
    function transition_out(block, local, detach, callback) {
        if (block && block.o) {
            if (outroing.has(block))
                return;
            outroing.add(block);
            outros.c.push(() => {
                outroing.delete(block);
                if (callback) {
                    if (detach)
                        block.d(1);
                    callback();
                }
            });
            block.o(local);
        }
        else if (callback) {
            callback();
        }
    }

    function handle_promise(promise, info) {
        const token = info.token = {};
        function update(type, index, key, value) {
            if (info.token !== token)
                return;
            info.resolved = value;
            let child_ctx = info.ctx;
            if (key !== undefined) {
                child_ctx = child_ctx.slice();
                child_ctx[key] = value;
            }
            const block = type && (info.current = type)(child_ctx);
            let needs_flush = false;
            if (info.block) {
                if (info.blocks) {
                    info.blocks.forEach((block, i) => {
                        if (i !== index && block) {
                            group_outros();
                            transition_out(block, 1, 1, () => {
                                if (info.blocks[i] === block) {
                                    info.blocks[i] = null;
                                }
                            });
                            check_outros();
                        }
                    });
                }
                else {
                    info.block.d(1);
                }
                block.c();
                transition_in(block, 1);
                block.m(info.mount(), info.anchor);
                needs_flush = true;
            }
            info.block = block;
            if (info.blocks)
                info.blocks[index] = block;
            if (needs_flush) {
                flush();
            }
        }
        if (is_promise(promise)) {
            const current_component = get_current_component();
            promise.then(value => {
                set_current_component(current_component);
                update(info.then, 1, info.value, value);
                set_current_component(null);
            }, error => {
                set_current_component(current_component);
                update(info.catch, 2, info.error, error);
                set_current_component(null);
                if (!info.hasCatch) {
                    throw error;
                }
            });
            // if we previously had a then/catch block, destroy it
            if (info.current !== info.pending) {
                update(info.pending, 0);
                return true;
            }
        }
        else {
            if (info.current !== info.then) {
                update(info.then, 1, info.value, promise);
                return true;
            }
            info.resolved = promise;
        }
    }
    function update_await_block_branch(info, ctx, dirty) {
        const child_ctx = ctx.slice();
        const { resolved } = info;
        if (info.current === info.then) {
            child_ctx[info.value] = resolved;
        }
        if (info.current === info.catch) {
            child_ctx[info.error] = resolved;
        }
        info.block.p(child_ctx, dirty);
    }

    const globals = (typeof window !== 'undefined'
        ? window
        : typeof globalThis !== 'undefined'
            ? globalThis
            : global);

    function get_spread_update(levels, updates) {
        const update = {};
        const to_null_out = {};
        const accounted_for = { $$scope: 1 };
        let i = levels.length;
        while (i--) {
            const o = levels[i];
            const n = updates[i];
            if (n) {
                for (const key in o) {
                    if (!(key in n))
                        to_null_out[key] = 1;
                }
                for (const key in n) {
                    if (!accounted_for[key]) {
                        update[key] = n[key];
                        accounted_for[key] = 1;
                    }
                }
                levels[i] = n;
            }
            else {
                for (const key in o) {
                    accounted_for[key] = 1;
                }
            }
        }
        for (const key in to_null_out) {
            if (!(key in update))
                update[key] = undefined;
        }
        return update;
    }
    function get_spread_object(spread_props) {
        return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};
    }

    function bind(component, name, callback) {
        const index = component.$$.props[name];
        if (index !== undefined) {
            component.$$.bound[index] = callback;
            callback(component.$$.ctx[index]);
        }
    }
    function create_component(block) {
        block && block.c();
    }
    function mount_component(component, target, anchor, customElement) {
        const { fragment, after_update } = component.$$;
        fragment && fragment.m(target, anchor);
        if (!customElement) {
            // onMount happens before the initial afterUpdate
            add_render_callback(() => {
                const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
                // if the component was destroyed immediately
                // it will update the `$$.on_destroy` reference to `null`.
                // the destructured on_destroy may still reference to the old array
                if (component.$$.on_destroy) {
                    component.$$.on_destroy.push(...new_on_destroy);
                }
                else {
                    // Edge case - component was destroyed immediately,
                    // most likely as a result of a binding initialising
                    run_all(new_on_destroy);
                }
                component.$$.on_mount = [];
            });
        }
        after_update.forEach(add_render_callback);
    }
    function destroy_component(component, detaching) {
        const $$ = component.$$;
        if ($$.fragment !== null) {
            run_all($$.on_destroy);
            $$.fragment && $$.fragment.d(detaching);
            // TODO null out other refs, including component.$$ (but need to
            // preserve final state?)
            $$.on_destroy = $$.fragment = null;
            $$.ctx = [];
        }
    }
    function make_dirty(component, i) {
        if (component.$$.dirty[0] === -1) {
            dirty_components.push(component);
            schedule_update();
            component.$$.dirty.fill(0);
        }
        component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
    }
    function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {
        const parent_component = current_component;
        set_current_component(component);
        const $$ = component.$$ = {
            fragment: null,
            ctx: [],
            // state
            props,
            update: noop,
            not_equal,
            bound: blank_object(),
            // lifecycle
            on_mount: [],
            on_destroy: [],
            on_disconnect: [],
            before_update: [],
            after_update: [],
            context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
            // everything else
            callbacks: blank_object(),
            dirty,
            skip_bound: false,
            root: options.target || parent_component.$$.root
        };
        append_styles && append_styles($$.root);
        let ready = false;
        $$.ctx = instance
            ? instance(component, options.props || {}, (i, ret, ...rest) => {
                const value = rest.length ? rest[0] : ret;
                if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
                    if (!$$.skip_bound && $$.bound[i])
                        $$.bound[i](value);
                    if (ready)
                        make_dirty(component, i);
                }
                return ret;
            })
            : [];
        $$.update();
        ready = true;
        run_all($$.before_update);
        // `false` as a special case of no DOM component
        $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
        if (options.target) {
            if (options.hydrate) {
                const nodes = children(options.target);
                // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
                $$.fragment && $$.fragment.l(nodes);
                nodes.forEach(detach);
            }
            else {
                // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
                $$.fragment && $$.fragment.c();
            }
            if (options.intro)
                transition_in(component.$$.fragment);
            mount_component(component, options.target, options.anchor, options.customElement);
            flush();
        }
        set_current_component(parent_component);
    }
    /**
     * Base class for Svelte components. Used when dev=false.
     */
    class SvelteComponent {
        $destroy() {
            destroy_component(this, 1);
            this.$destroy = noop;
        }
        $on(type, callback) {
            if (!is_function(callback)) {
                return noop;
            }
            const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
            callbacks.push(callback);
            return () => {
                const index = callbacks.indexOf(callback);
                if (index !== -1)
                    callbacks.splice(index, 1);
            };
        }
        $set($$props) {
            if (this.$$set && !is_empty($$props)) {
                this.$$.skip_bound = true;
                this.$$set($$props);
                this.$$.skip_bound = false;
            }
        }
    }

    function dispatch_dev(type, detail) {
        document.dispatchEvent(custom_event(type, Object.assign({ version: '3.53.1' }, detail), { bubbles: true }));
    }
    function append_dev(target, node) {
        dispatch_dev('SvelteDOMInsert', { target, node });
        append(target, node);
    }
    function insert_dev(target, node, anchor) {
        dispatch_dev('SvelteDOMInsert', { target, node, anchor });
        insert(target, node, anchor);
    }
    function detach_dev(node) {
        dispatch_dev('SvelteDOMRemove', { node });
        detach(node);
    }
    function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {
        const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];
        if (has_prevent_default)
            modifiers.push('preventDefault');
        if (has_stop_propagation)
            modifiers.push('stopPropagation');
        dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });
        const dispose = listen(node, event, handler, options);
        return () => {
            dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });
            dispose();
        };
    }
    function attr_dev(node, attribute, value) {
        attr(node, attribute, value);
        if (value == null)
            dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });
        else
            dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
    }
    function set_data_dev(text, data) {
        data = '' + data;
        if (text.wholeText === data)
            return;
        dispatch_dev('SvelteDOMSetData', { node: text, data });
        text.data = data;
    }
    function validate_each_argument(arg) {
        if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {
            let msg = '{#each} only iterates over array-like objects.';
            if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {
                msg += ' You can use a spread to convert this iterable into an array.';
            }
            throw new Error(msg);
        }
    }
    function validate_slots(name, slot, keys) {
        for (const slot_key of Object.keys(slot)) {
            if (!~keys.indexOf(slot_key)) {
                console.warn(`<${name}> received an unexpected slot "${slot_key}".`);
            }
        }
    }
    function construct_svelte_component_dev(component, props) {
        const error_message = 'this={...} of <svelte:component> should specify a Svelte component.';
        try {
            const instance = new component(props);
            if (!instance.$$ || !instance.$set || !instance.$on || !instance.$destroy) {
                throw new Error(error_message);
            }
            return instance;
        }
        catch (err) {
            const { message } = err;
            if (typeof message === 'string' && message.indexOf('is not a constructor') !== -1) {
                throw new Error(error_message);
            }
            else {
                throw err;
            }
        }
    }
    /**
     * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.
     */
    class SvelteComponentDev extends SvelteComponent {
        constructor(options) {
            if (!options || (!options.target && !options.$$inline)) {
                throw new Error("'target' is a required option");
            }
            super();
        }
        $destroy() {
            super.$destroy();
            this.$destroy = () => {
                console.warn('Component was already destroyed'); // eslint-disable-line no-console
            };
        }
        $capture_state() { }
        $inject_state() { }
    }

    /**
     * @typedef {Object} WrappedComponent Object returned by the `wrap` method
     * @property {SvelteComponent} component - Component to load (this is always asynchronous)
     * @property {RoutePrecondition[]} [conditions] - Route pre-conditions to validate
     * @property {Object} [props] - Optional dictionary of static props
     * @property {Object} [userData] - Optional user data dictionary
     * @property {bool} _sveltesparouter - Internal flag; always set to true
     */

    /**
     * @callback AsyncSvelteComponent
     * @returns {Promise<SvelteComponent>} Returns a Promise that resolves with a Svelte component
     */

    /**
     * @callback RoutePrecondition
     * @param {RouteDetail} detail - Route detail object
     * @returns {boolean|Promise<boolean>} If the callback returns a false-y value, it's interpreted as the precondition failed, so it aborts loading the component (and won't process other pre-condition callbacks)
     */

    /**
     * @typedef {Object} WrapOptions Options object for the call to `wrap`
     * @property {SvelteComponent} [component] - Svelte component to load (this is incompatible with `asyncComponent`)
     * @property {AsyncSvelteComponent} [asyncComponent] - Function that returns a Promise that fulfills with a Svelte component (e.g. `{asyncComponent: () => import('Foo.svelte')}`)
     * @property {SvelteComponent} [loadingComponent] - Svelte component to be displayed while the async route is loading (as a placeholder); when unset or false-y, no component is shown while component
     * @property {object} [loadingParams] - Optional dictionary passed to the `loadingComponent` component as params (for an exported prop called `params`)
     * @property {object} [userData] - Optional object that will be passed to events such as `routeLoading`, `routeLoaded`, `conditionsFailed`
     * @property {object} [props] - Optional key-value dictionary of static props that will be passed to the component. The props are expanded with {...props}, so the key in the dictionary becomes the name of the prop.
     * @property {RoutePrecondition[]|RoutePrecondition} [conditions] - Route pre-conditions to add, which will be executed in order
     */

    /**
     * Wraps a component to enable multiple capabilities:
     * 1. Using dynamically-imported component, with (e.g. `{asyncComponent: () => import('Foo.svelte')}`), which also allows bundlers to do code-splitting.
     * 2. Adding route pre-conditions (e.g. `{conditions: [...]}`)
     * 3. Adding static props that are passed to the component
     * 4. Adding custom userData, which is passed to route events (e.g. route loaded events) or to route pre-conditions (e.g. `{userData: {foo: 'bar}}`)
     * 
     * @param {WrapOptions} args - Arguments object
     * @returns {WrappedComponent} Wrapped component
     */
    function wrap$1(args) {
        if (!args) {
            throw Error('Parameter args is required')
        }

        // We need to have one and only one of component and asyncComponent
        // This does a "XNOR"
        if (!args.component == !args.asyncComponent) {
            throw Error('One and only one of component and asyncComponent is required')
        }

        // If the component is not async, wrap it into a function returning a Promise
        if (args.component) {
            args.asyncComponent = () => Promise.resolve(args.component);
        }

        // Parameter asyncComponent and each item of conditions must be functions
        if (typeof args.asyncComponent != 'function') {
            throw Error('Parameter asyncComponent must be a function')
        }
        if (args.conditions) {
            // Ensure it's an array
            if (!Array.isArray(args.conditions)) {
                args.conditions = [args.conditions];
            }
            for (let i = 0; i < args.conditions.length; i++) {
                if (!args.conditions[i] || typeof args.conditions[i] != 'function') {
                    throw Error('Invalid parameter conditions[' + i + ']')
                }
            }
        }

        // Check if we have a placeholder component
        if (args.loadingComponent) {
            args.asyncComponent.loading = args.loadingComponent;
            args.asyncComponent.loadingParams = args.loadingParams || undefined;
        }

        // Returns an object that contains all the functions to execute too
        // The _sveltesparouter flag is to confirm the object was created by this router
        const obj = {
            component: args.asyncComponent,
            userData: args.userData,
            conditions: (args.conditions && args.conditions.length) ? args.conditions : undefined,
            props: (args.props && Object.keys(args.props).length) ? args.props : {},
            _sveltesparouter: true
        };

        return obj
    }

    const subscriber_queue = [];
    /**
     * Creates a `Readable` store that allows reading by subscription.
     * @param value initial value
     * @param {StartStopNotifier}start start and stop notifications for subscriptions
     */
    function readable(value, start) {
        return {
            subscribe: writable(value, start).subscribe
        };
    }
    /**
     * Create a `Writable` store that allows both updating and reading by subscription.
     * @param {*=}value initial value
     * @param {StartStopNotifier=}start start and stop notifications for subscriptions
     */
    function writable(value, start = noop) {
        let stop;
        const subscribers = new Set();
        function set(new_value) {
            if (safe_not_equal(value, new_value)) {
                value = new_value;
                if (stop) { // store is ready
                    const run_queue = !subscriber_queue.length;
                    for (const subscriber of subscribers) {
                        subscriber[1]();
                        subscriber_queue.push(subscriber, value);
                    }
                    if (run_queue) {
                        for (let i = 0; i < subscriber_queue.length; i += 2) {
                            subscriber_queue[i][0](subscriber_queue[i + 1]);
                        }
                        subscriber_queue.length = 0;
                    }
                }
            }
        }
        function update(fn) {
            set(fn(value));
        }
        function subscribe(run, invalidate = noop) {
            const subscriber = [run, invalidate];
            subscribers.add(subscriber);
            if (subscribers.size === 1) {
                stop = start(set) || noop;
            }
            run(value);
            return () => {
                subscribers.delete(subscriber);
                if (subscribers.size === 0) {
                    stop();
                    stop = null;
                }
            };
        }
        return { set, update, subscribe };
    }
    function derived(stores, fn, initial_value) {
        const single = !Array.isArray(stores);
        const stores_array = single
            ? [stores]
            : stores;
        const auto = fn.length < 2;
        return readable(initial_value, (set) => {
            let inited = false;
            const values = [];
            let pending = 0;
            let cleanup = noop;
            const sync = () => {
                if (pending) {
                    return;
                }
                cleanup();
                const result = fn(single ? values[0] : values, set);
                if (auto) {
                    set(result);
                }
                else {
                    cleanup = is_function(result) ? result : noop;
                }
            };
            const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {
                values[i] = value;
                pending &= ~(1 << i);
                if (inited) {
                    sync();
                }
            }, () => {
                pending |= (1 << i);
            }));
            inited = true;
            sync();
            return function stop() {
                run_all(unsubscribers);
                cleanup();
            };
        });
    }

    function parse(str, loose) {
    	if (str instanceof RegExp) return { keys:false, pattern:str };
    	var c, o, tmp, ext, keys=[], pattern='', arr = str.split('/');
    	arr[0] || arr.shift();

    	while (tmp = arr.shift()) {
    		c = tmp[0];
    		if (c === '*') {
    			keys.push('wild');
    			pattern += '/(.*)';
    		} else if (c === ':') {
    			o = tmp.indexOf('?', 1);
    			ext = tmp.indexOf('.', 1);
    			keys.push( tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length) );
    			pattern += !!~o && !~ext ? '(?:/([^/]+?))?' : '/([^/]+?)';
    			if (!!~ext) pattern += (!!~o ? '?' : '') + '\\' + tmp.substring(ext);
    		} else {
    			pattern += '/' + tmp;
    		}
    	}

    	return {
    		keys: keys,
    		pattern: new RegExp('^' + pattern + (loose ? '(?=$|\/)' : '\/?$'), 'i')
    	};
    }

    /* node_modules/svelte-spa-router/Router.svelte generated by Svelte v3.53.1 */

    const { Error: Error_1, Object: Object_1, console: console_1$8 } = globals;

    // (267:0) {:else}
    function create_else_block$5(ctx) {
    	let switch_instance;
    	let switch_instance_anchor;
    	let current;
    	const switch_instance_spread_levels = [/*props*/ ctx[2]];
    	var switch_value = /*component*/ ctx[0];

    	function switch_props(ctx) {
    		let switch_instance_props = {};

    		for (let i = 0; i < switch_instance_spread_levels.length; i += 1) {
    			switch_instance_props = assign(switch_instance_props, switch_instance_spread_levels[i]);
    		}

    		return {
    			props: switch_instance_props,
    			$$inline: true
    		};
    	}

    	if (switch_value) {
    		switch_instance = construct_svelte_component_dev(switch_value, switch_props());
    		switch_instance.$on("routeEvent", /*routeEvent_handler_1*/ ctx[7]);
    	}

    	const block = {
    		c: function create() {
    			if (switch_instance) create_component(switch_instance.$$.fragment);
    			switch_instance_anchor = empty();
    		},
    		m: function mount(target, anchor) {
    			if (switch_instance) mount_component(switch_instance, target, anchor);
    			insert_dev(target, switch_instance_anchor, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const switch_instance_changes = (dirty & /*props*/ 4)
    			? get_spread_update(switch_instance_spread_levels, [get_spread_object(/*props*/ ctx[2])])
    			: {};

    			if (switch_value !== (switch_value = /*component*/ ctx[0])) {
    				if (switch_instance) {
    					group_outros();
    					const old_component = switch_instance;

    					transition_out(old_component.$$.fragment, 1, 0, () => {
    						destroy_component(old_component, 1);
    					});

    					check_outros();
    				}

    				if (switch_value) {
    					switch_instance = construct_svelte_component_dev(switch_value, switch_props());
    					switch_instance.$on("routeEvent", /*routeEvent_handler_1*/ ctx[7]);
    					create_component(switch_instance.$$.fragment);
    					transition_in(switch_instance.$$.fragment, 1);
    					mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
    				} else {
    					switch_instance = null;
    				}
    			} else if (switch_value) {
    				switch_instance.$set(switch_instance_changes);
    			}
    		},
    		i: function intro(local) {
    			if (current) return;
    			if (switch_instance) transition_in(switch_instance.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			if (switch_instance) transition_out(switch_instance.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(switch_instance_anchor);
    			if (switch_instance) destroy_component(switch_instance, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_else_block$5.name,
    		type: "else",
    		source: "(267:0) {:else}",
    		ctx
    	});

    	return block;
    }

    // (260:0) {#if componentParams}
    function create_if_block$a(ctx) {
    	let switch_instance;
    	let switch_instance_anchor;
    	let current;
    	const switch_instance_spread_levels = [{ params: /*componentParams*/ ctx[1] }, /*props*/ ctx[2]];
    	var switch_value = /*component*/ ctx[0];

    	function switch_props(ctx) {
    		let switch_instance_props = {};

    		for (let i = 0; i < switch_instance_spread_levels.length; i += 1) {
    			switch_instance_props = assign(switch_instance_props, switch_instance_spread_levels[i]);
    		}

    		return {
    			props: switch_instance_props,
    			$$inline: true
    		};
    	}

    	if (switch_value) {
    		switch_instance = construct_svelte_component_dev(switch_value, switch_props());
    		switch_instance.$on("routeEvent", /*routeEvent_handler*/ ctx[6]);
    	}

    	const block = {
    		c: function create() {
    			if (switch_instance) create_component(switch_instance.$$.fragment);
    			switch_instance_anchor = empty();
    		},
    		m: function mount(target, anchor) {
    			if (switch_instance) mount_component(switch_instance, target, anchor);
    			insert_dev(target, switch_instance_anchor, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const switch_instance_changes = (dirty & /*componentParams, props*/ 6)
    			? get_spread_update(switch_instance_spread_levels, [
    					dirty & /*componentParams*/ 2 && { params: /*componentParams*/ ctx[1] },
    					dirty & /*props*/ 4 && get_spread_object(/*props*/ ctx[2])
    				])
    			: {};

    			if (switch_value !== (switch_value = /*component*/ ctx[0])) {
    				if (switch_instance) {
    					group_outros();
    					const old_component = switch_instance;

    					transition_out(old_component.$$.fragment, 1, 0, () => {
    						destroy_component(old_component, 1);
    					});

    					check_outros();
    				}

    				if (switch_value) {
    					switch_instance = construct_svelte_component_dev(switch_value, switch_props());
    					switch_instance.$on("routeEvent", /*routeEvent_handler*/ ctx[6]);
    					create_component(switch_instance.$$.fragment);
    					transition_in(switch_instance.$$.fragment, 1);
    					mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor);
    				} else {
    					switch_instance = null;
    				}
    			} else if (switch_value) {
    				switch_instance.$set(switch_instance_changes);
    			}
    		},
    		i: function intro(local) {
    			if (current) return;
    			if (switch_instance) transition_in(switch_instance.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			if (switch_instance) transition_out(switch_instance.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(switch_instance_anchor);
    			if (switch_instance) destroy_component(switch_instance, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block$a.name,
    		type: "if",
    		source: "(260:0) {#if componentParams}",
    		ctx
    	});

    	return block;
    }

    function create_fragment$s(ctx) {
    	let current_block_type_index;
    	let if_block;
    	let if_block_anchor;
    	let current;
    	const if_block_creators = [create_if_block$a, create_else_block$5];
    	const if_blocks = [];

    	function select_block_type(ctx, dirty) {
    		if (/*componentParams*/ ctx[1]) return 0;
    		return 1;
    	}

    	current_block_type_index = select_block_type(ctx);
    	if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);

    	const block = {
    		c: function create() {
    			if_block.c();
    			if_block_anchor = empty();
    		},
    		l: function claim(nodes) {
    			throw new Error_1("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			if_blocks[current_block_type_index].m(target, anchor);
    			insert_dev(target, if_block_anchor, anchor);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			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_blocks[current_block_type_index].p(ctx, dirty);
    			} else {
    				group_outros();

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

    				check_outros();
    				if_block = if_blocks[current_block_type_index];

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

    				transition_in(if_block, 1);
    				if_block.m(if_block_anchor.parentNode, if_block_anchor);
    			}
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(if_block);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(if_block);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if_blocks[current_block_type_index].d(detaching);
    			if (detaching) detach_dev(if_block_anchor);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$s.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function wrap(component, userData, ...conditions) {
    	// Use the new wrap method and show a deprecation warning
    	// eslint-disable-next-line no-console
    	console.warn('Method `wrap` from `svelte-spa-router` is deprecated and will be removed in a future version. Please use `svelte-spa-router/wrap` instead. See http://bit.ly/svelte-spa-router-upgrading');

    	return wrap$1({ component, userData, conditions });
    }

    /**
     * @typedef {Object} Location
     * @property {string} location - Location (page/view), for example `/book`
     * @property {string} [querystring] - Querystring from the hash, as a string not parsed
     */
    /**
     * Returns the current location from the hash.
     *
     * @returns {Location} Location object
     * @private
     */
    function getLocation() {
    	const hashPosition = window.location.href.indexOf('#/');

    	let location = hashPosition > -1
    	? window.location.href.substr(hashPosition + 1)
    	: '/';

    	// Check if there's a querystring
    	const qsPosition = location.indexOf('?');

    	let querystring = '';

    	if (qsPosition > -1) {
    		querystring = location.substr(qsPosition + 1);
    		location = location.substr(0, qsPosition);
    	}

    	return { location, querystring };
    }

    const loc = readable(null, // eslint-disable-next-line prefer-arrow-callback
    function start(set) {
    	set(getLocation());

    	const update = () => {
    		set(getLocation());
    	};

    	window.addEventListener('hashchange', update, false);

    	return function stop() {
    		window.removeEventListener('hashchange', update, false);
    	};
    });

    const location$1 = derived(loc, $loc => $loc.location);
    const querystring = derived(loc, $loc => $loc.querystring);
    const params = writable(undefined);

    async function push(location) {
    	if (!location || location.length < 1 || location.charAt(0) != '/' && location.indexOf('#/') !== 0) {
    		throw Error('Invalid parameter location');
    	}

    	// Execute this code when the current call stack is complete
    	await tick();

    	// Note: this will include scroll state in history even when restoreScrollState is false
    	history.replaceState(
    		{
    			...history.state,
    			__svelte_spa_router_scrollX: window.scrollX,
    			__svelte_spa_router_scrollY: window.scrollY
    		},
    		undefined
    	);

    	window.location.hash = (location.charAt(0) == '#' ? '' : '#') + location;
    }

    async function pop() {
    	// Execute this code when the current call stack is complete
    	await tick();

    	window.history.back();
    }

    async function replace(location) {
    	if (!location || location.length < 1 || location.charAt(0) != '/' && location.indexOf('#/') !== 0) {
    		throw Error('Invalid parameter location');
    	}

    	// Execute this code when the current call stack is complete
    	await tick();

    	const dest = (location.charAt(0) == '#' ? '' : '#') + location;

    	try {
    		const newState = { ...history.state };
    		delete newState['__svelte_spa_router_scrollX'];
    		delete newState['__svelte_spa_router_scrollY'];
    		window.history.replaceState(newState, undefined, dest);
    	} catch(e) {
    		// eslint-disable-next-line no-console
    		console.warn('Caught exception while replacing the current page. If you\'re running this in the Svelte REPL, please note that the `replace` method might not work in this environment.');
    	}

    	// The method above doesn't trigger the hashchange event, so let's do that manually
    	window.dispatchEvent(new Event('hashchange'));
    }

    function link(node, opts) {
    	opts = linkOpts(opts);

    	// Only apply to <a> tags
    	if (!node || !node.tagName || node.tagName.toLowerCase() != 'a') {
    		throw Error('Action "link" can only be used with <a> tags');
    	}

    	updateLink(node, opts);

    	return {
    		update(updated) {
    			updated = linkOpts(updated);
    			updateLink(node, updated);
    		}
    	};
    }

    function restoreScroll(state) {
    	// If this exists, then this is a back navigation: restore the scroll position
    	if (state) {
    		window.scrollTo(state.__svelte_spa_router_scrollX, state.__svelte_spa_router_scrollY);
    	} else {
    		// Otherwise this is a forward navigation: scroll to top
    		window.scrollTo(0, 0);
    	}
    }

    // Internal function used by the link function
    function updateLink(node, opts) {
    	let href = opts.href || node.getAttribute('href');

    	// Destination must start with '/' or '#/'
    	if (href && href.charAt(0) == '/') {
    		// Add # to the href attribute
    		href = '#' + href;
    	} else if (!href || href.length < 2 || href.slice(0, 2) != '#/') {
    		throw Error('Invalid value for "href" attribute: ' + href);
    	}

    	node.setAttribute('href', href);

    	node.addEventListener('click', event => {
    		// Prevent default anchor onclick behaviour
    		event.preventDefault();

    		if (!opts.disabled) {
    			scrollstateHistoryHandler(event.currentTarget.getAttribute('href'));
    		}
    	});
    }

    // Internal function that ensures the argument of the link action is always an object
    function linkOpts(val) {
    	if (val && typeof val == 'string') {
    		return { href: val };
    	} else {
    		return val || {};
    	}
    }

    /**
     * The handler attached to an anchor tag responsible for updating the
     * current history state with the current scroll state
     *
     * @param {string} href - Destination
     */
    function scrollstateHistoryHandler(href) {
    	// Setting the url (3rd arg) to href will break clicking for reasons, so don't try to do that
    	history.replaceState(
    		{
    			...history.state,
    			__svelte_spa_router_scrollX: window.scrollX,
    			__svelte_spa_router_scrollY: window.scrollY
    		},
    		undefined
    	);

    	// This will force an update as desired, but this time our scroll state will be attached
    	window.location.hash = href;
    }

    function instance$s($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Router', slots, []);
    	let { routes = {} } = $$props;
    	let { prefix = '' } = $$props;
    	let { restoreScrollState = false } = $$props;

    	/**
     * Container for a route: path, component
     */
    	class RouteItem {
    		/**
     * Initializes the object and creates a regular expression from the path, using regexparam.
     *
     * @param {string} path - Path to the route (must start with '/' or '*')
     * @param {SvelteComponent|WrappedComponent} component - Svelte component for the route, optionally wrapped
     */
    		constructor(path, component) {
    			if (!component || typeof component != 'function' && (typeof component != 'object' || component._sveltesparouter !== true)) {
    				throw Error('Invalid component object');
    			}

    			// Path must be a regular or expression, or a string starting with '/' or '*'
    			if (!path || typeof path == 'string' && (path.length < 1 || path.charAt(0) != '/' && path.charAt(0) != '*') || typeof path == 'object' && !(path instanceof RegExp)) {
    				throw Error('Invalid value for "path" argument - strings must start with / or *');
    			}

    			const { pattern, keys } = parse(path);
    			this.path = path;

    			// Check if the component is wrapped and we have conditions
    			if (typeof component == 'object' && component._sveltesparouter === true) {
    				this.component = component.component;
    				this.conditions = component.conditions || [];
    				this.userData = component.userData;
    				this.props = component.props || {};
    			} else {
    				// Convert the component to a function that returns a Promise, to normalize it
    				this.component = () => Promise.resolve(component);

    				this.conditions = [];
    				this.props = {};
    			}

    			this._pattern = pattern;
    			this._keys = keys;
    		}

    		/**
     * Checks if `path` matches the current route.
     * If there's a match, will return the list of parameters from the URL (if any).
     * In case of no match, the method will return `null`.
     *
     * @param {string} path - Path to test
     * @returns {null|Object.<string, string>} List of paramters from the URL if there's a match, or `null` otherwise.
     */
    		match(path) {
    			// If there's a prefix, check if it matches the start of the path.
    			// If not, bail early, else remove it before we run the matching.
    			if (prefix) {
    				if (typeof prefix == 'string') {
    					if (path.startsWith(prefix)) {
    						path = path.substr(prefix.length) || '/';
    					} else {
    						return null;
    					}
    				} else if (prefix instanceof RegExp) {
    					const match = path.match(prefix);

    					if (match && match[0]) {
    						path = path.substr(match[0].length) || '/';
    					} else {
    						return null;
    					}
    				}
    			}

    			// Check if the pattern matches
    			const matches = this._pattern.exec(path);

    			if (matches === null) {
    				return null;
    			}

    			// If the input was a regular expression, this._keys would be false, so return matches as is
    			if (this._keys === false) {
    				return matches;
    			}

    			const out = {};
    			let i = 0;

    			while (i < this._keys.length) {
    				// In the match parameters, URL-decode all values
    				try {
    					out[this._keys[i]] = decodeURIComponent(matches[i + 1] || '') || null;
    				} catch(e) {
    					out[this._keys[i]] = null;
    				}

    				i++;
    			}

    			return out;
    		}

    		/**
     * Dictionary with route details passed to the pre-conditions functions, as well as the `routeLoading`, `routeLoaded` and `conditionsFailed` events
     * @typedef {Object} RouteDetail
     * @property {string|RegExp} route - Route matched as defined in the route definition (could be a string or a reguar expression object)
     * @property {string} location - Location path
     * @property {string} querystring - Querystring from the hash
     * @property {object} [userData] - Custom data passed by the user
     * @property {SvelteComponent} [component] - Svelte component (only in `routeLoaded` events)
     * @property {string} [name] - Name of the Svelte component (only in `routeLoaded` events)
     */
    		/**
     * Executes all conditions (if any) to control whether the route can be shown. Conditions are executed in the order they are defined, and if a condition fails, the following ones aren't executed.
     * 
     * @param {RouteDetail} detail - Route detail
     * @returns {boolean} Returns true if all the conditions succeeded
     */
    		async checkConditions(detail) {
    			for (let i = 0; i < this.conditions.length; i++) {
    				if (!await this.conditions[i](detail)) {
    					return false;
    				}
    			}

    			return true;
    		}
    	}

    	// Set up all routes
    	const routesList = [];

    	if (routes instanceof Map) {
    		// If it's a map, iterate on it right away
    		routes.forEach((route, path) => {
    			routesList.push(new RouteItem(path, route));
    		});
    	} else {
    		// We have an object, so iterate on its own properties
    		Object.keys(routes).forEach(path => {
    			routesList.push(new RouteItem(path, routes[path]));
    		});
    	}

    	// Props for the component to render
    	let component = null;

    	let componentParams = null;
    	let props = {};

    	// Event dispatcher from Svelte
    	const dispatch = createEventDispatcher();

    	// Just like dispatch, but executes on the next iteration of the event loop
    	async function dispatchNextTick(name, detail) {
    		// Execute this code when the current call stack is complete
    		await tick();

    		dispatch(name, detail);
    	}

    	// If this is set, then that means we have popped into this var the state of our last scroll position
    	let previousScrollState = null;

    	let popStateChanged = null;

    	if (restoreScrollState) {
    		popStateChanged = event => {
    			// If this event was from our history.replaceState, event.state will contain
    			// our scroll history. Otherwise, event.state will be null (like on forward
    			// navigation)
    			if (event.state && (event.state.__svelte_spa_router_scrollY || event.state.__svelte_spa_router_scrollX)) {
    				previousScrollState = event.state;
    			} else {
    				previousScrollState = null;
    			}
    		};

    		// This is removed in the destroy() invocation below
    		window.addEventListener('popstate', popStateChanged);

    		afterUpdate(() => {
    			restoreScroll(previousScrollState);
    		});
    	}

    	// Always have the latest value of loc
    	let lastLoc = null;

    	// Current object of the component loaded
    	let componentObj = null;

    	// Handle hash change events
    	// Listen to changes in the $loc store and update the page
    	// Do not use the $: syntax because it gets triggered by too many things
    	const unsubscribeLoc = loc.subscribe(async newLoc => {
    		lastLoc = newLoc;

    		// Find a route matching the location
    		let i = 0;

    		while (i < routesList.length) {
    			const match = routesList[i].match(newLoc.location);

    			if (!match) {
    				i++;
    				continue;
    			}

    			const detail = {
    				route: routesList[i].path,
    				location: newLoc.location,
    				querystring: newLoc.querystring,
    				userData: routesList[i].userData,
    				params: match && typeof match == 'object' && Object.keys(match).length
    				? match
    				: null
    			};

    			// Check if the route can be loaded - if all conditions succeed
    			if (!await routesList[i].checkConditions(detail)) {
    				// Don't display anything
    				$$invalidate(0, component = null);

    				componentObj = null;

    				// Trigger an event to notify the user, then exit
    				dispatchNextTick('conditionsFailed', detail);

    				return;
    			}

    			// Trigger an event to alert that we're loading the route
    			// We need to clone the object on every event invocation so we don't risk the object to be modified in the next tick
    			dispatchNextTick('routeLoading', Object.assign({}, detail));

    			// If there's a component to show while we're loading the route, display it
    			const obj = routesList[i].component;

    			// Do not replace the component if we're loading the same one as before, to avoid the route being unmounted and re-mounted
    			if (componentObj != obj) {
    				if (obj.loading) {
    					$$invalidate(0, component = obj.loading);
    					componentObj = obj;
    					$$invalidate(1, componentParams = obj.loadingParams);
    					$$invalidate(2, props = {});

    					// Trigger the routeLoaded event for the loading component
    					// Create a copy of detail so we don't modify the object for the dynamic route (and the dynamic route doesn't modify our object too)
    					dispatchNextTick('routeLoaded', Object.assign({}, detail, {
    						component,
    						name: component.name,
    						params: componentParams
    					}));
    				} else {
    					$$invalidate(0, component = null);
    					componentObj = null;
    				}

    				// Invoke the Promise
    				const loaded = await obj();

    				// Now that we're here, after the promise resolved, check if we still want this component, as the user might have navigated to another page in the meanwhile
    				if (newLoc != lastLoc) {
    					// Don't update the component, just exit
    					return;
    				}

    				// If there is a "default" property, which is used by async routes, then pick that
    				$$invalidate(0, component = loaded && loaded.default || loaded);

    				componentObj = obj;
    			}

    			// Set componentParams only if we have a match, to avoid a warning similar to `<Component> was created with unknown prop 'params'`
    			// Of course, this assumes that developers always add a "params" prop when they are expecting parameters
    			if (match && typeof match == 'object' && Object.keys(match).length) {
    				$$invalidate(1, componentParams = match);
    			} else {
    				$$invalidate(1, componentParams = null);
    			}

    			// Set static props, if any
    			$$invalidate(2, props = routesList[i].props);

    			// Dispatch the routeLoaded event then exit
    			// We need to clone the object on every event invocation so we don't risk the object to be modified in the next tick
    			dispatchNextTick('routeLoaded', Object.assign({}, detail, {
    				component,
    				name: component.name,
    				params: componentParams
    			})).then(() => {
    				params.set(componentParams);
    			});

    			return;
    		}

    		// If we're still here, there was no match, so show the empty component
    		$$invalidate(0, component = null);

    		componentObj = null;
    		params.set(undefined);
    	});

    	onDestroy(() => {
    		unsubscribeLoc();
    		popStateChanged && window.removeEventListener('popstate', popStateChanged);
    	});

    	const writable_props = ['routes', 'prefix', 'restoreScrollState'];

    	Object_1.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$8.warn(`<Router> was created with unknown prop '${key}'`);
    	});

    	function routeEvent_handler(event) {
    		bubble.call(this, $$self, event);
    	}

    	function routeEvent_handler_1(event) {
    		bubble.call(this, $$self, event);
    	}

    	$$self.$$set = $$props => {
    		if ('routes' in $$props) $$invalidate(3, routes = $$props.routes);
    		if ('prefix' in $$props) $$invalidate(4, prefix = $$props.prefix);
    		if ('restoreScrollState' in $$props) $$invalidate(5, restoreScrollState = $$props.restoreScrollState);
    	};

    	$$self.$capture_state = () => ({
    		readable,
    		writable,
    		derived,
    		tick,
    		_wrap: wrap$1,
    		wrap,
    		getLocation,
    		loc,
    		location: location$1,
    		querystring,
    		params,
    		push,
    		pop,
    		replace,
    		link,
    		restoreScroll,
    		updateLink,
    		linkOpts,
    		scrollstateHistoryHandler,
    		onDestroy,
    		createEventDispatcher,
    		afterUpdate,
    		parse,
    		routes,
    		prefix,
    		restoreScrollState,
    		RouteItem,
    		routesList,
    		component,
    		componentParams,
    		props,
    		dispatch,
    		dispatchNextTick,
    		previousScrollState,
    		popStateChanged,
    		lastLoc,
    		componentObj,
    		unsubscribeLoc
    	});

    	$$self.$inject_state = $$props => {
    		if ('routes' in $$props) $$invalidate(3, routes = $$props.routes);
    		if ('prefix' in $$props) $$invalidate(4, prefix = $$props.prefix);
    		if ('restoreScrollState' in $$props) $$invalidate(5, restoreScrollState = $$props.restoreScrollState);
    		if ('component' in $$props) $$invalidate(0, component = $$props.component);
    		if ('componentParams' in $$props) $$invalidate(1, componentParams = $$props.componentParams);
    		if ('props' in $$props) $$invalidate(2, props = $$props.props);
    		if ('previousScrollState' in $$props) previousScrollState = $$props.previousScrollState;
    		if ('popStateChanged' in $$props) popStateChanged = $$props.popStateChanged;
    		if ('lastLoc' in $$props) lastLoc = $$props.lastLoc;
    		if ('componentObj' in $$props) componentObj = $$props.componentObj;
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	$$self.$$.update = () => {
    		if ($$self.$$.dirty & /*restoreScrollState*/ 32) {
    			// Update history.scrollRestoration depending on restoreScrollState
    			history.scrollRestoration = restoreScrollState ? 'manual' : 'auto';
    		}
    	};

    	return [
    		component,
    		componentParams,
    		props,
    		routes,
    		prefix,
    		restoreScrollState,
    		routeEvent_handler,
    		routeEvent_handler_1
    	];
    }

    class Router extends SvelteComponentDev {
    	constructor(options) {
    		super(options);

    		init(this, options, instance$s, create_fragment$s, safe_not_equal, {
    			routes: 3,
    			prefix: 4,
    			restoreScrollState: 5
    		});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Router",
    			options,
    			id: create_fragment$s.name
    		});
    	}

    	get routes() {
    		throw new Error_1("<Router>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set routes(value) {
    		throw new Error_1("<Router>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get prefix() {
    		throw new Error_1("<Router>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set prefix(value) {
    		throw new Error_1("<Router>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get restoreScrollState() {
    		throw new Error_1("<Router>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set restoreScrollState(value) {
    		throw new Error_1("<Router>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pages/NotFound.svelte generated by Svelte v3.53.1 */
    const file$q = "src/pages/NotFound.svelte";

    function create_fragment$r(ctx) {
    	let h1;
    	let t1;
    	let p0;
    	let t3;
    	let p1;
    	let t5;
    	let a;
    	let h2;
    	let mounted;
    	let dispose;

    	const block = {
    		c: function create() {
    			h1 = element("h1");
    			h1.textContent = "We are sorry!";
    			t1 = space();
    			p0 = element("p");
    			p0.textContent = "This isn't a url that we use.";
    			t3 = space();
    			p1 = element("p");
    			p1.textContent = "Go home you're drunk.";
    			t5 = space();
    			a = element("a");
    			h2 = element("h2");
    			h2.textContent = "Take me home →";
    			add_location(h1, file$q, 4, 0, 64);
    			add_location(p0, file$q, 5, 0, 87);
    			add_location(p1, file$q, 7, 0, 192);
    			add_location(h2, file$q, 9, 4, 247);
    			attr_dev(a, "href", "/");
    			add_location(a, file$q, 8, 0, 221);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, h1, anchor);
    			insert_dev(target, t1, anchor);
    			insert_dev(target, p0, anchor);
    			insert_dev(target, t3, anchor);
    			insert_dev(target, p1, anchor);
    			insert_dev(target, t5, anchor);
    			insert_dev(target, a, anchor);
    			append_dev(a, h2);

    			if (!mounted) {
    				dispose = action_destroyer(link.call(null, a));
    				mounted = true;
    			}
    		},
    		p: noop,
    		i: noop,
    		o: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(h1);
    			if (detaching) detach_dev(t1);
    			if (detaching) detach_dev(p0);
    			if (detaching) detach_dev(t3);
    			if (detaching) detach_dev(p1);
    			if (detaching) detach_dev(t5);
    			if (detaching) detach_dev(a);
    			mounted = false;
    			dispose();
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$r.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$r($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('NotFound', slots, []);
    	const writable_props = [];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<NotFound> was created with unknown prop '${key}'`);
    	});

    	$$self.$capture_state = () => ({ link });
    	return [];
    }

    class NotFound extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$r, create_fragment$r, safe_not_equal, {});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "NotFound",
    			options,
    			id: create_fragment$r.name
    		});
    	}
    }

    // List of nodes to update
    const nodes = [];

    // Current location
    let location;

    // Function that updates all nodes marking the active ones
    function checkActive(el) {
        const matchesLocation = el.pattern.test(location);
        toggleClasses(el, el.className, matchesLocation);
        toggleClasses(el, el.inactiveClassName, !matchesLocation);
    }

    function toggleClasses(el, className, shouldAdd) {
        (className || '').split(' ').forEach((cls) => {
            if (!cls) {
                return
            }
            // Remove the class firsts
            el.node.classList.remove(cls);

            // If the pattern doesn't match, then set the class
            if (shouldAdd) {
                el.node.classList.add(cls);
            }
        });
    }

    // Listen to changes in the location
    loc.subscribe((value) => {
        // Update the location
        location = value.location + (value.querystring ? '?' + value.querystring : '');

        // Update all nodes
        nodes.map(checkActive);
    });

    /* src/pieces/Header.svelte generated by Svelte v3.53.1 */

    const { console: console_1$7 } = globals;
    const file$p = "src/pieces/Header.svelte";

    // (24:39) 
    function create_if_block_1$3(ctx) {
    	let button;
    	let mounted;
    	let dispose;

    	const block = {
    		c: function create() {
    			button = element("button");
    			button.textContent = "Settings";
    			attr_dev(button, "class", "svelte-1gjmpio");
    			add_location(button, file$p, 24, 6, 927);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, button, anchor);

    			if (!mounted) {
    				dispose = listen_dev(button, "click", /*click_handler_2*/ ctx[4], false, false, false);
    				mounted = true;
    			}
    		},
    		p: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(button);
    			mounted = false;
    			dispose();
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block_1$3.name,
    		type: "if",
    		source: "(24:39) ",
    		ctx
    	});

    	return block;
    }

    // (22:4) {#if $location !== '/profile'}
    function create_if_block$9(ctx) {
    	let button;
    	let mounted;
    	let dispose;

    	const block = {
    		c: function create() {
    			button = element("button");
    			button.textContent = "My Profile";
    			attr_dev(button, "class", "svelte-1gjmpio");
    			add_location(button, file$p, 22, 6, 817);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, button, anchor);

    			if (!mounted) {
    				dispose = listen_dev(button, "click", /*click_handler_1*/ ctx[3], false, false, false);
    				mounted = true;
    			}
    		},
    		p: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(button);
    			mounted = false;
    			dispose();
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block$9.name,
    		type: "if",
    		source: "(22:4) {#if $location !== '/profile'}",
    		ctx
    	});

    	return block;
    }

    function create_fragment$q(ctx) {
    	let header;
    	let img;
    	let img_src_value;
    	let t0;
    	let h1;
    	let t2;
    	let nav;
    	let t3;
    	let button0;
    	let t5;
    	let button1;
    	let t7;
    	let button2;
    	let mounted;
    	let dispose;

    	function select_block_type(ctx, dirty) {
    		if (/*$location*/ ctx[0] !== '/profile') return create_if_block$9;
    		if (/*$location*/ ctx[0] === '/profile') return create_if_block_1$3;
    	}

    	let current_block_type = select_block_type(ctx);
    	let if_block = current_block_type && current_block_type(ctx);

    	const block = {
    		c: function create() {
    			header = element("header");
    			img = element("img");
    			t0 = space();
    			h1 = element("h1");
    			h1.textContent = "Potato Pong";
    			t2 = space();
    			nav = element("nav");
    			if (if_block) if_block.c();
    			t3 = space();
    			button0 = element("button");
    			button0.textContent = "Friends";
    			t5 = space();
    			button1 = element("button");
    			button1.textContent = "test";
    			t7 = space();
    			button2 = element("button");
    			button2.textContent = "Log Out";
    			if (!src_url_equal(img.src, img_src_value = "/img/potato_logo.png")) attr_dev(img, "src", img_src_value);
    			attr_dev(img, "alt", "Potato Pong Logo");
    			attr_dev(img, "class", "svelte-1gjmpio");
    			add_location(img, file$p, 18, 2, 660);
    			attr_dev(h1, "class", "svelte-1gjmpio");
    			add_location(h1, file$p, 19, 2, 747);
    			attr_dev(button0, "class", "svelte-1gjmpio");
    			add_location(button0, file$p, 31, 4, 1171);
    			attr_dev(button1, "class", "svelte-1gjmpio");
    			add_location(button1, file$p, 32, 4, 1244);
    			attr_dev(button2, "class", "svelte-1gjmpio");
    			add_location(button2, file$p, 33, 4, 1303);
    			attr_dev(nav, "class", "svelte-1gjmpio");
    			add_location(nav, file$p, 20, 2, 770);
    			attr_dev(header, "class", "svelte-1gjmpio");
    			add_location(header, file$p, 17, 0, 649);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, header, anchor);
    			append_dev(header, img);
    			append_dev(header, t0);
    			append_dev(header, h1);
    			append_dev(header, t2);
    			append_dev(header, nav);
    			if (if_block) if_block.m(nav, null);
    			append_dev(nav, t3);
    			append_dev(nav, button0);
    			append_dev(nav, t5);
    			append_dev(nav, button1);
    			append_dev(nav, t7);
    			append_dev(nav, button2);

    			if (!mounted) {
    				dispose = [
    					listen_dev(img, "click", /*click_handler*/ ctx[2], false, false, false),
    					listen_dev(button0, "click", /*click_handler_3*/ ctx[5], false, false, false),
    					listen_dev(button1, "click", /*click_handler_4*/ ctx[6], false, false, false),
    					listen_dev(button2, "click", /*handleClickLogout*/ ctx[1], false, false, false)
    				];

    				mounted = true;
    			}
    		},
    		p: function update(ctx, [dirty]) {
    			if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
    				if_block.p(ctx, dirty);
    			} else {
    				if (if_block) if_block.d(1);
    				if_block = current_block_type && current_block_type(ctx);

    				if (if_block) {
    					if_block.c();
    					if_block.m(nav, t3);
    				}
    			}
    		},
    		i: noop,
    		o: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(header);

    			if (if_block) {
    				if_block.d();
    			}

    			mounted = false;
    			run_all(dispose);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$q.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$q($$self, $$props, $$invalidate) {
    	let $location;
    	validate_store(location$1, 'location');
    	component_subscribe($$self, location$1, $$value => $$invalidate(0, $location = $$value));
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Header', slots, []);

    	let handleClickLogout = async () => {
    		await fetch('http://transcendance:8080/api/v2/auth/logout', { method: 'POST' }).// .then(resp => resp.json)
    		// .then((resp) => console.log(resp))
    		then(() => push('/')); // i think for TS reasons it has to be a func not direclty push('/') or whatever

    		console.log('clicked logout header');
    	};

    	const writable_props = [];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$7.warn(`<Header> was created with unknown prop '${key}'`);
    	});

    	const click_handler = () => push('/');
    	const click_handler_1 = () => push('/profile');
    	const click_handler_2 = () => push('/profile/settings');
    	const click_handler_3 = () => push('/profile/friends');
    	const click_handler_4 = () => push('/test');

    	$$self.$capture_state = () => ({
    		push,
    		location: location$1,
    		handleClickLogout,
    		$location
    	});

    	$$self.$inject_state = $$props => {
    		if ('handleClickLogout' in $$props) $$invalidate(1, handleClickLogout = $$props.handleClickLogout);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [
    		$location,
    		handleClickLogout,
    		click_handler,
    		click_handler_1,
    		click_handler_2,
    		click_handler_3,
    		click_handler_4
    	];
    }

    class Header extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$q, create_fragment$q, safe_not_equal, {});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Header",
    			options,
    			id: create_fragment$q.name
    		});
    	}
    }

    /* src/pieces/GenerateUserDisplay.svelte generated by Svelte v3.53.1 */
    const file$o = "src/pieces/GenerateUserDisplay.svelte";

    // (58:2) {#if user !== undefined}
    function create_if_block$8(ctx) {
    	let main;
    	let img;
    	let img_src_value;
    	let t0;
    	let div0;
    	let t1_value = /*user*/ ctx[0].username + "";
    	let t1;
    	let t2;
    	let div1;
    	let t3;
    	let span4;
    	let span0;
    	let svg0;
    	let path0;
    	let t4;
    	let span1;
    	let svg1;
    	let path1;
    	let t5;
    	let span2;
    	let svg2;
    	let path2;
    	let t6;
    	let span3;
    	let t7;
    	let t8;
    	let section;
    	let h4;
    	let t10;
    	let p0;
    	let t11;
    	let t12_value = /*user*/ ctx[0].stats.totalGame + "";
    	let t12;
    	let t13;
    	let p1;
    	let t14;
    	let t15_value = /*user*/ ctx[0].stats.winGame + "";
    	let t15;
    	let t16;
    	let p2;
    	let t17;
    	let t18_value = /*user*/ ctx[0].stats.loseGame + "";
    	let t18;
    	let t19;
    	let p3;
    	let t20;
    	let t21_value = /*user*/ ctx[0].stats.drawGame + "";
    	let t21;

    	const block = {
    		c: function create() {
    			main = element("main");
    			img = element("img");
    			t0 = space();
    			div0 = element("div");
    			t1 = text(t1_value);
    			t2 = space();
    			div1 = element("div");
    			t3 = text("Rank: \n      ");
    			span4 = element("span");
    			span0 = element("span");
    			svg0 = svg_element("svg");
    			path0 = svg_element("path");
    			t4 = space();
    			span1 = element("span");
    			svg1 = svg_element("svg");
    			path1 = svg_element("path");
    			t5 = space();
    			span2 = element("span");
    			svg2 = svg_element("svg");
    			path2 = svg_element("path");
    			t6 = space();
    			span3 = element("span");
    			t7 = text(/*rank*/ ctx[1]);
    			t8 = space();
    			section = element("section");
    			h4 = element("h4");
    			h4.textContent = "Match Statistics";
    			t10 = space();
    			p0 = element("p");
    			t11 = text("Total: ");
    			t12 = text(t12_value);
    			t13 = space();
    			p1 = element("p");
    			t14 = text("Victories: ");
    			t15 = text(t15_value);
    			t16 = space();
    			p2 = element("p");
    			t17 = text("Losses: ");
    			t18 = text(t18_value);
    			t19 = space();
    			p3 = element("p");
    			t20 = text("Draws: ");
    			t21 = text(t21_value);
    			attr_dev(img, "class", "avatar svelte-16aefqu");
    			if (!src_url_equal(img.src, img_src_value = /*avatar*/ ctx[2])) attr_dev(img, "src", img_src_value);
    			attr_dev(img, "alt", "default user icon");
    			add_location(img, file$o, 61, 4, 1964);
    			attr_dev(div0, "class", "username svelte-16aefqu");
    			add_location(div0, file$o, 62, 4, 2028);
    			attr_dev(path0, "d", "M512 255.1c0 11.34-7.406 20.86-18.44 23.64l-171.3 42.78l-42.78 171.1C276.7 504.6 267.2 512 255.9 512s-20.84-7.406-23.62-18.44l-42.66-171.2L18.47 279.6C7.406 276.8 0 267.3 0 255.1c0-11.34 7.406-20.83 18.44-23.61l171.2-42.78l42.78-171.1C235.2 7.406 244.7 0 256 0s20.84 7.406 23.62 18.44l42.78 171.2l171.2 42.78C504.6 235.2 512 244.6 512 255.1z");
    			attr_dev(path0, "class", "svelte-16aefqu");
    			add_location(path0, file$o, 67, 10, 2235);
    			attr_dev(svg0, "viewBox", "0 0 512 512");
    			attr_dev(svg0, "class", "svelte-16aefqu");
    			add_location(svg0, file$o, 66, 10, 2197);
    			attr_dev(span0, "class", "glitter-star svelte-16aefqu");
    			add_location(span0, file$o, 65, 8, 2138);
    			attr_dev(path1, "d", "M512 255.1c0 11.34-7.406 20.86-18.44 23.64l-171.3 42.78l-42.78 171.1C276.7 504.6 267.2 512 255.9 512s-20.84-7.406-23.62-18.44l-42.66-171.2L18.47 279.6C7.406 276.8 0 267.3 0 255.1c0-11.34 7.406-20.83 18.44-23.61l171.2-42.78l42.78-171.1C235.2 7.406 244.7 0 256 0s20.84 7.406 23.62 18.44l42.78 171.2l171.2 42.78C504.6 235.2 512 244.6 512 255.1z");
    			attr_dev(path1, "class", "svelte-16aefqu");
    			add_location(path1, file$o, 72, 10, 2728);
    			attr_dev(svg1, "viewBox", "0 0 512 512");
    			attr_dev(svg1, "class", "svelte-16aefqu");
    			add_location(svg1, file$o, 71, 10, 2690);
    			attr_dev(span1, "class", "glitter-star svelte-16aefqu");
    			add_location(span1, file$o, 70, 8, 2631);
    			attr_dev(path2, "d", "M512 255.1c0 11.34-7.406 20.86-18.44 23.64l-171.3 42.78l-42.78 171.1C276.7 504.6 267.2 512 255.9 512s-20.84-7.406-23.62-18.44l-42.66-171.2L18.47 279.6C7.406 276.8 0 267.3 0 255.1c0-11.34 7.406-20.83 18.44-23.61l171.2-42.78l42.78-171.1C235.2 7.406 244.7 0 256 0s20.84 7.406 23.62 18.44l42.78 171.2l171.2 42.78C504.6 235.2 512 244.6 512 255.1z");
    			attr_dev(path2, "class", "svelte-16aefqu");
    			add_location(path2, file$o, 77, 10, 3221);
    			attr_dev(svg2, "viewBox", "0 0 512 512");
    			attr_dev(svg2, "class", "svelte-16aefqu");
    			add_location(svg2, file$o, 76, 10, 3183);
    			attr_dev(span2, "class", "glitter-star svelte-16aefqu");
    			add_location(span2, file$o, 75, 8, 3124);
    			attr_dev(span3, "class", "glitter-text svelte-16aefqu");
    			add_location(span3, file$o, 80, 8, 3617);
    			attr_dev(span4, "class", "glitter svelte-16aefqu");
    			add_location(span4, file$o, 64, 6, 2107);
    			attr_dev(div1, "class", "rank svelte-16aefqu");
    			add_location(div1, file$o, 63, 4, 2076);
    			attr_dev(h4, "class", "svelte-16aefqu");
    			add_location(h4, file$o, 84, 6, 3722);
    			add_location(p0, file$o, 85, 6, 3754);
    			add_location(p1, file$o, 86, 6, 3797);
    			add_location(p2, file$o, 87, 6, 3842);
    			add_location(p3, file$o, 88, 6, 3885);
    			attr_dev(section, "class", "main-stats svelte-16aefqu");
    			add_location(section, file$o, 83, 4, 3687);
    			attr_dev(main, "class", "svelte-16aefqu");
    			add_location(main, file$o, 58, 2, 1786);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, main, anchor);
    			append_dev(main, img);
    			append_dev(main, t0);
    			append_dev(main, div0);
    			append_dev(div0, t1);
    			append_dev(main, t2);
    			append_dev(main, div1);
    			append_dev(div1, t3);
    			append_dev(div1, span4);
    			append_dev(span4, span0);
    			append_dev(span0, svg0);
    			append_dev(svg0, path0);
    			/*span0_binding*/ ctx[5](span0);
    			append_dev(span4, t4);
    			append_dev(span4, span1);
    			append_dev(span1, svg1);
    			append_dev(svg1, path1);
    			/*span1_binding*/ ctx[6](span1);
    			append_dev(span4, t5);
    			append_dev(span4, span2);
    			append_dev(span2, svg2);
    			append_dev(svg2, path2);
    			/*span2_binding*/ ctx[7](span2);
    			append_dev(span4, t6);
    			append_dev(span4, span3);
    			append_dev(span3, t7);
    			append_dev(main, t8);
    			append_dev(main, section);
    			append_dev(section, h4);
    			append_dev(section, t10);
    			append_dev(section, p0);
    			append_dev(p0, t11);
    			append_dev(p0, t12);
    			append_dev(section, t13);
    			append_dev(section, p1);
    			append_dev(p1, t14);
    			append_dev(p1, t15);
    			append_dev(section, t16);
    			append_dev(section, p2);
    			append_dev(p2, t17);
    			append_dev(p2, t18);
    			append_dev(section, t19);
    			append_dev(section, p3);
    			append_dev(p3, t20);
    			append_dev(p3, t21);
    		},
    		p: function update(ctx, dirty) {
    			if (dirty & /*avatar*/ 4 && !src_url_equal(img.src, img_src_value = /*avatar*/ ctx[2])) {
    				attr_dev(img, "src", img_src_value);
    			}

    			if (dirty & /*user*/ 1 && t1_value !== (t1_value = /*user*/ ctx[0].username + "")) set_data_dev(t1, t1_value);
    			if (dirty & /*rank*/ 2) set_data_dev(t7, /*rank*/ ctx[1]);
    			if (dirty & /*user*/ 1 && t12_value !== (t12_value = /*user*/ ctx[0].stats.totalGame + "")) set_data_dev(t12, t12_value);
    			if (dirty & /*user*/ 1 && t15_value !== (t15_value = /*user*/ ctx[0].stats.winGame + "")) set_data_dev(t15, t15_value);
    			if (dirty & /*user*/ 1 && t18_value !== (t18_value = /*user*/ ctx[0].stats.loseGame + "")) set_data_dev(t18, t18_value);
    			if (dirty & /*user*/ 1 && t21_value !== (t21_value = /*user*/ ctx[0].stats.drawGame + "")) set_data_dev(t21, t21_value);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(main);
    			/*span0_binding*/ ctx[5](null);
    			/*span1_binding*/ ctx[6](null);
    			/*span2_binding*/ ctx[7](null);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block$8.name,
    		type: "if",
    		source: "(58:2) {#if user !== undefined}",
    		ctx
    	});

    	return block;
    }

    function create_fragment$p(ctx) {
    	let div;
    	let if_block = /*user*/ ctx[0] !== undefined && create_if_block$8(ctx);

    	const block = {
    		c: function create() {
    			div = element("div");
    			if (if_block) if_block.c();
    			attr_dev(div, "class", "outer svelte-16aefqu");
    			add_location(div, file$o, 56, 0, 1737);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div, anchor);
    			if (if_block) if_block.m(div, null);
    		},
    		p: function update(ctx, [dirty]) {
    			if (/*user*/ ctx[0] !== undefined) {
    				if (if_block) {
    					if_block.p(ctx, dirty);
    				} else {
    					if_block = create_if_block$8(ctx);
    					if_block.c();
    					if_block.m(div, null);
    				}
    			} else if (if_block) {
    				if_block.d(1);
    				if_block = null;
    			}
    		},
    		i: noop,
    		o: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div);
    			if (if_block) if_block.d();
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$p.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$p($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('GenerateUserDisplay', slots, []);
    	let { user } = $$props;
    	let { primary } = $$props;
    	let rank = '';
    	let avatar;

    	onMount(async () => {
    		// using this for now cuz for some reason there is yet to be a way to fet another person's avatar
    		if (primary) {
    			await fetch("http://transcendance:8080/api/v2/user/avatar", { method: "GET" }).then(response => {
    				return response.blob();
    			}).then(data => {
    				const url = URL.createObjectURL(data);
    				$$invalidate(2, avatar = url);
    			});
    		}
    	}); // tmp
    	// console.log('mounted Profile Display')
    	// console.log(user);

    	// export function updateGeneratedUser(updatedUser) {
    	//   user = updatedUser;
    	// };
    	if (user.loseGame > user.winGame) {
    		rank = 'Bitch Ass Loser!';
    	} else if (user.loseGame === user.winGame) {
    		rank = 'Fine i guess...';
    	} else {
    		rank = 'Yea you da Boss!';
    	}

    	// Glittery Stars and such for Rank
    	let index = 0, interval = 1000;

    	const rand = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;

    	// it's unhappy that "star" isn't typeset, no idea what to do about it...
    	const animate = star => {
    		// the if seems to have fixed the type issue
    		if (star) {
    			star.style.setProperty("--star-left", `${rand(-10, 100)}%`);
    			star.style.setProperty("--star-top", `${rand(-40, 80)}%`);
    			star.style.animation = "none";
    			star.offsetHeight;
    			star.style.animation = "";
    		}
    	};

    	// This is the part i invented, it was kinda a fucking nightmare...
    	let stars = [];

    	for (let i = 0; i < 3; i++) {
    		setTimeout(
    			() => {
    				animate(stars[i]);
    				setInterval(() => animate(stars[i]), 1000);
    			},
    			index++ * (interval / 3)
    		);
    	}

    	$$self.$$.on_mount.push(function () {
    		if (user === undefined && !('user' in $$props || $$self.$$.bound[$$self.$$.props['user']])) {
    			console.warn("<GenerateUserDisplay> was created without expected prop 'user'");
    		}

    		if (primary === undefined && !('primary' in $$props || $$self.$$.bound[$$self.$$.props['primary']])) {
    			console.warn("<GenerateUserDisplay> was created without expected prop 'primary'");
    		}
    	});

    	const writable_props = ['user', 'primary'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<GenerateUserDisplay> was created with unknown prop '${key}'`);
    	});

    	function span0_binding($$value) {
    		binding_callbacks[$$value ? 'unshift' : 'push'](() => {
    			stars[0] = $$value;
    			$$invalidate(3, stars);
    		});
    	}

    	function span1_binding($$value) {
    		binding_callbacks[$$value ? 'unshift' : 'push'](() => {
    			stars[1] = $$value;
    			$$invalidate(3, stars);
    		});
    	}

    	function span2_binding($$value) {
    		binding_callbacks[$$value ? 'unshift' : 'push'](() => {
    			stars[2] = $$value;
    			$$invalidate(3, stars);
    		});
    	}

    	$$self.$$set = $$props => {
    		if ('user' in $$props) $$invalidate(0, user = $$props.user);
    		if ('primary' in $$props) $$invalidate(4, primary = $$props.primary);
    	};

    	$$self.$capture_state = () => ({
    		onMount,
    		user,
    		primary,
    		rank,
    		avatar,
    		index,
    		interval,
    		rand,
    		animate,
    		stars
    	});

    	$$self.$inject_state = $$props => {
    		if ('user' in $$props) $$invalidate(0, user = $$props.user);
    		if ('primary' in $$props) $$invalidate(4, primary = $$props.primary);
    		if ('rank' in $$props) $$invalidate(1, rank = $$props.rank);
    		if ('avatar' in $$props) $$invalidate(2, avatar = $$props.avatar);
    		if ('index' in $$props) index = $$props.index;
    		if ('interval' in $$props) interval = $$props.interval;
    		if ('stars' in $$props) $$invalidate(3, stars = $$props.stars);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [
    		user,
    		rank,
    		avatar,
    		stars,
    		primary,
    		span0_binding,
    		span1_binding,
    		span2_binding
    	];
    }

    class GenerateUserDisplay extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$p, create_fragment$p, safe_not_equal, { user: 0, primary: 4 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "GenerateUserDisplay",
    			options,
    			id: create_fragment$p.name
    		});
    	}

    	get user() {
    		throw new Error("<GenerateUserDisplay>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set user(value) {
    		throw new Error("<GenerateUserDisplay>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get primary() {
    		throw new Error("<GenerateUserDisplay>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set primary(value) {
    		throw new Error("<GenerateUserDisplay>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pieces/chat/Chat_button.svelte generated by Svelte v3.53.1 */

    const { console: console_1$6 } = globals;
    const file$n = "src/pieces/chat/Chat_button.svelte";

    function create_fragment$o(ctx) {
    	let button;
    	let p;
    	let button_class_value;
    	let current;
    	let mounted;
    	let dispose;
    	const default_slot_template = /*#slots*/ ctx[7].default;
    	const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[6], null);

    	const block = {
    		c: function create() {
    			button = element("button");
    			p = element("p");
    			if (default_slot) default_slot.c();
    			attr_dev(p, "class", "svelte-j5z24r");
    			add_location(p, file$n, 25, 1, 441);
    			attr_dev(button, "title", /*my_title*/ ctx[1]);
    			attr_dev(button, "class", button_class_value = "" + (null_to_empty(/*my_class*/ ctx[0]) + " svelte-j5z24r"));
    			add_location(button, file$n, 24, 0, 352);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, button, anchor);
    			append_dev(button, p);

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

    			current = true;

    			if (!mounted) {
    				dispose = [
    					listen_dev(button, "click", /*update_layout*/ ctx[3], false, false, false),
    					listen_dev(
    						button,
    						"click",
    						function () {
    							if (is_function(/*on_click*/ ctx[2])) /*on_click*/ ctx[2].apply(this, arguments);
    						},
    						false,
    						false,
    						false
    					)
    				];

    				mounted = true;
    			}
    		},
    		p: function update(new_ctx, [dirty]) {
    			ctx = new_ctx;

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

    			if (!current || dirty & /*my_title*/ 2) {
    				attr_dev(button, "title", /*my_title*/ ctx[1]);
    			}

    			if (!current || dirty & /*my_class*/ 1 && button_class_value !== (button_class_value = "" + (null_to_empty(/*my_class*/ ctx[0]) + " svelte-j5z24r"))) {
    				attr_dev(button, "class", button_class_value);
    			}
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(default_slot, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(default_slot, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(button);
    			if (default_slot) default_slot.d(detaching);
    			mounted = false;
    			run_all(dispose);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$o.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$o($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Chat_button', slots, ['default']);
    	let { my_class = "" } = $$props;
    	let { my_title = "" } = $$props;
    	let { layout = "" } = $$props;
    	let { new_layout = "" } = $$props;
    	let { on_click = "" } = $$props;

    	function update_layout() {
    		$$invalidate(4, layout = new_layout);
    		console.log(layout);
    	}

    	const writable_props = ['my_class', 'my_title', 'layout', 'new_layout', 'on_click'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$6.warn(`<Chat_button> was created with unknown prop '${key}'`);
    	});

    	$$self.$$set = $$props => {
    		if ('my_class' in $$props) $$invalidate(0, my_class = $$props.my_class);
    		if ('my_title' in $$props) $$invalidate(1, my_title = $$props.my_title);
    		if ('layout' in $$props) $$invalidate(4, layout = $$props.layout);
    		if ('new_layout' in $$props) $$invalidate(5, new_layout = $$props.new_layout);
    		if ('on_click' in $$props) $$invalidate(2, on_click = $$props.on_click);
    		if ('$$scope' in $$props) $$invalidate(6, $$scope = $$props.$$scope);
    	};

    	$$self.$capture_state = () => ({
    		my_class,
    		my_title,
    		layout,
    		new_layout,
    		on_click,
    		update_layout
    	});

    	$$self.$inject_state = $$props => {
    		if ('my_class' in $$props) $$invalidate(0, my_class = $$props.my_class);
    		if ('my_title' in $$props) $$invalidate(1, my_title = $$props.my_title);
    		if ('layout' in $$props) $$invalidate(4, layout = $$props.layout);
    		if ('new_layout' in $$props) $$invalidate(5, new_layout = $$props.new_layout);
    		if ('on_click' in $$props) $$invalidate(2, on_click = $$props.on_click);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [
    		my_class,
    		my_title,
    		on_click,
    		update_layout,
    		layout,
    		new_layout,
    		$$scope,
    		slots
    	];
    }

    class Chat_button extends SvelteComponentDev {
    	constructor(options) {
    		super(options);

    		init(this, options, instance$o, create_fragment$o, safe_not_equal, {
    			my_class: 0,
    			my_title: 1,
    			layout: 4,
    			new_layout: 5,
    			on_click: 2
    		});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Chat_button",
    			options,
    			id: create_fragment$o.name
    		});
    	}

    	get my_class() {
    		throw new Error("<Chat_button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set my_class(value) {
    		throw new Error("<Chat_button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get my_title() {
    		throw new Error("<Chat_button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set my_title(value) {
    		throw new Error("<Chat_button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get layout() {
    		throw new Error("<Chat_button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set layout(value) {
    		throw new Error("<Chat_button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get new_layout() {
    		throw new Error("<Chat_button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set new_layout(value) {
    		throw new Error("<Chat_button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get on_click() {
    		throw new Error("<Chat_button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set on_click(value) {
    		throw new Error("<Chat_button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pieces/chat/Layout_home.svelte generated by Svelte v3.53.1 */
    const file$m = "src/pieces/chat/Layout_home.svelte";

    // (12:1) <Button bind:layout new_layout="settings" my_class="settings dots icon">
    function create_default_slot_2$9(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("settings");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_2$9.name,
    		type: "slot",
    		source: "(12:1) <Button bind:layout new_layout=\\\"settings\\\" my_class=\\\"settings dots icon\\\">",
    		ctx
    	});

    	return block;
    }

    // (17:1) <Button bind:layout new_layout="new" my_class="new transparent">
    function create_default_slot_1$9(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("new");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_1$9.name,
    		type: "slot",
    		source: "(17:1) <Button bind:layout new_layout=\\\"new\\\" my_class=\\\"new transparent\\\">",
    		ctx
    	});

    	return block;
    }

    // (22:1) <Button bind:layout new_layout="close" my_class="close icon">
    function create_default_slot$b(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("close");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot$b.name,
    		type: "slot",
    		source: "(22:1) <Button bind:layout new_layout=\\\"close\\\" my_class=\\\"close icon\\\">",
    		ctx
    	});

    	return block;
    }

    function create_fragment$n(ctx) {
    	let div3;
    	let button0;
    	let updating_layout;
    	let t0;
    	let button1;
    	let updating_layout_1;
    	let t1;
    	let button2;
    	let updating_layout_2;
    	let t2;
    	let div2;
    	let p0;
    	let t4;
    	let div1;
    	let div0;
    	let p1;
    	let current;

    	function button0_layout_binding(value) {
    		/*button0_layout_binding*/ ctx[1](value);
    	}

    	let button0_props = {
    		new_layout: "settings",
    		my_class: "settings dots icon",
    		$$slots: { default: [create_default_slot_2$9] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button0_props.layout = /*layout*/ ctx[0];
    	}

    	button0 = new Chat_button({ props: button0_props, $$inline: true });
    	binding_callbacks.push(() => bind(button0, 'layout', button0_layout_binding));

    	function button1_layout_binding(value) {
    		/*button1_layout_binding*/ ctx[2](value);
    	}

    	let button1_props = {
    		new_layout: "new",
    		my_class: "new transparent",
    		$$slots: { default: [create_default_slot_1$9] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button1_props.layout = /*layout*/ ctx[0];
    	}

    	button1 = new Chat_button({ props: button1_props, $$inline: true });
    	binding_callbacks.push(() => bind(button1, 'layout', button1_layout_binding));

    	function button2_layout_binding(value) {
    		/*button2_layout_binding*/ ctx[3](value);
    	}

    	let button2_props = {
    		new_layout: "close",
    		my_class: "close icon",
    		$$slots: { default: [create_default_slot$b] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button2_props.layout = /*layout*/ ctx[0];
    	}

    	button2 = new Chat_button({ props: button2_props, $$inline: true });
    	binding_callbacks.push(() => bind(button2, 'layout', button2_layout_binding));

    	const block = {
    		c: function create() {
    			div3 = element("div");
    			create_component(button0.$$.fragment);
    			t0 = space();
    			create_component(button1.$$.fragment);
    			t1 = space();
    			create_component(button2.$$.fragment);
    			t2 = space();
    			div2 = element("div");
    			p0 = element("p");
    			p0.textContent = "list of your rooms :";
    			t4 = space();
    			div1 = element("div");
    			div0 = element("div");
    			p1 = element("p");
    			p1.textContent = "/ you have no chat room yet /";
    			attr_dev(p0, "class", "title svelte-1jygwt2");
    			add_location(p0, file$m, 27, 2, 492);
    			attr_dev(p1, "class", "__center");
    			add_location(p1, file$m, 30, 4, 602);
    			attr_dev(div0, "class", "__show_if_only_child");
    			add_location(div0, file$m, 29, 3, 563);
    			attr_dev(div1, "class", "room_list");
    			add_location(div1, file$m, 28, 2, 536);
    			attr_dev(div2, "class", "panel panel_home __border_top svelte-1jygwt2");
    			add_location(div2, file$m, 26, 1, 446);
    			attr_dev(div3, "class", "grid_box svelte-1jygwt2");
    			add_location(div3, file$m, 8, 0, 87);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div3, anchor);
    			mount_component(button0, div3, null);
    			append_dev(div3, t0);
    			mount_component(button1, div3, null);
    			append_dev(div3, t1);
    			mount_component(button2, div3, null);
    			append_dev(div3, t2);
    			append_dev(div3, div2);
    			append_dev(div2, p0);
    			append_dev(div2, t4);
    			append_dev(div2, div1);
    			append_dev(div1, div0);
    			append_dev(div0, p1);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			const button0_changes = {};

    			if (dirty & /*$$scope*/ 16) {
    				button0_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout && dirty & /*layout*/ 1) {
    				updating_layout = true;
    				button0_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout = false);
    			}

    			button0.$set(button0_changes);
    			const button1_changes = {};

    			if (dirty & /*$$scope*/ 16) {
    				button1_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_1 && dirty & /*layout*/ 1) {
    				updating_layout_1 = true;
    				button1_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_1 = false);
    			}

    			button1.$set(button1_changes);
    			const button2_changes = {};

    			if (dirty & /*$$scope*/ 16) {
    				button2_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_2 && dirty & /*layout*/ 1) {
    				updating_layout_2 = true;
    				button2_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_2 = false);
    			}

    			button2.$set(button2_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button0.$$.fragment, local);
    			transition_in(button1.$$.fragment, local);
    			transition_in(button2.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button0.$$.fragment, local);
    			transition_out(button1.$$.fragment, local);
    			transition_out(button2.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div3);
    			destroy_component(button0);
    			destroy_component(button1);
    			destroy_component(button2);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$n.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$n($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Layout_home', slots, []);
    	let { layout } = $$props;

    	$$self.$$.on_mount.push(function () {
    		if (layout === undefined && !('layout' in $$props || $$self.$$.bound[$$self.$$.props['layout']])) {
    			console.warn("<Layout_home> was created without expected prop 'layout'");
    		}
    	});

    	const writable_props = ['layout'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Layout_home> was created with unknown prop '${key}'`);
    	});

    	function button0_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button1_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button2_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	$$self.$$set = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    	};

    	$$self.$capture_state = () => ({ Button: Chat_button, layout });

    	$$self.$inject_state = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [layout, button0_layout_binding, button1_layout_binding, button2_layout_binding];
    }

    class Layout_home extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$n, create_fragment$n, safe_not_equal, { layout: 0 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Layout_home",
    			options,
    			id: create_fragment$n.name
    		});
    	}

    	get layout() {
    		throw new Error("<Layout_home>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set layout(value) {
    		throw new Error("<Layout_home>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pieces/chat/Chat_msg.svelte generated by Svelte v3.53.1 */

    const file$l = "src/pieces/chat/Chat_msg.svelte";

    function create_fragment$m(ctx) {
    	let div;
    	let p0;
    	let t0;
    	let t1;
    	let p1;
    	let t2;
    	let div_class_value;

    	const block = {
    		c: function create() {
    			div = element("div");
    			p0 = element("p");
    			t0 = text(/*name*/ ctx[1]);
    			t1 = space();
    			p1 = element("p");
    			t2 = text(/*content*/ ctx[0]);
    			attr_dev(p0, "class", "name svelte-jmr7oa");
    			add_location(p0, file$l, 8, 1, 92);
    			attr_dev(p1, "class", "msg svelte-jmr7oa");
    			add_location(p1, file$l, 9, 1, 120);
    			attr_dev(div, "class", div_class_value = "chat_msg " + /*name*/ ctx[1] + " svelte-jmr7oa");
    			add_location(div, file$l, 7, 0, 61);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div, anchor);
    			append_dev(div, p0);
    			append_dev(p0, t0);
    			append_dev(div, t1);
    			append_dev(div, p1);
    			append_dev(p1, t2);
    		},
    		p: function update(ctx, [dirty]) {
    			if (dirty & /*name*/ 2) set_data_dev(t0, /*name*/ ctx[1]);
    			if (dirty & /*content*/ 1) set_data_dev(t2, /*content*/ ctx[0]);

    			if (dirty & /*name*/ 2 && div_class_value !== (div_class_value = "chat_msg " + /*name*/ ctx[1] + " svelte-jmr7oa")) {
    				attr_dev(div, "class", div_class_value);
    			}
    		},
    		i: noop,
    		o: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$m.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$m($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Chat_msg', slots, []);
    	let { content } = $$props;
    	let { name } = $$props;

    	$$self.$$.on_mount.push(function () {
    		if (content === undefined && !('content' in $$props || $$self.$$.bound[$$self.$$.props['content']])) {
    			console.warn("<Chat_msg> was created without expected prop 'content'");
    		}

    		if (name === undefined && !('name' in $$props || $$self.$$.bound[$$self.$$.props['name']])) {
    			console.warn("<Chat_msg> was created without expected prop 'name'");
    		}
    	});

    	const writable_props = ['content', 'name'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Chat_msg> was created with unknown prop '${key}'`);
    	});

    	$$self.$$set = $$props => {
    		if ('content' in $$props) $$invalidate(0, content = $$props.content);
    		if ('name' in $$props) $$invalidate(1, name = $$props.name);
    	};

    	$$self.$capture_state = () => ({ content, name });

    	$$self.$inject_state = $$props => {
    		if ('content' in $$props) $$invalidate(0, content = $$props.content);
    		if ('name' in $$props) $$invalidate(1, name = $$props.name);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [content, name];
    }

    class Chat_msg extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$m, create_fragment$m, safe_not_equal, { content: 0, name: 1 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Chat_msg",
    			options,
    			id: create_fragment$m.name
    		});
    	}

    	get content() {
    		throw new Error("<Chat_msg>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set content(value) {
    		throw new Error("<Chat_msg>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get name() {
    		throw new Error("<Chat_msg>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set name(value) {
    		throw new Error("<Chat_msg>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pieces/chat/Layout_room.svelte generated by Svelte v3.53.1 */
    const file$k = "src/pieces/chat/Layout_room.svelte";

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

    // (48:1) <Button bind:layout new_layout={back} my_class="back icon" my_title="go back {back}">
    function create_default_slot_3$4(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("back");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_3$4.name,
    		type: "slot",
    		source: "(48:1) <Button bind:layout new_layout={back} my_class=\\\"back icon\\\" my_title=\\\"go back {back}\\\">",
    		ctx
    	});

    	return block;
    }

    // (53:1) <Button bind:layout new_layout="room_set" my_class="room_name transparent">
    function create_default_slot_2$8(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("<room_name>");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_2$8.name,
    		type: "slot",
    		source: "(53:1) <Button bind:layout new_layout=\\\"room_set\\\" my_class=\\\"room_name transparent\\\">",
    		ctx
    	});

    	return block;
    }

    // (58:1) <Button bind:layout new_layout="close" my_class="close icon">
    function create_default_slot_1$8(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("close");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_1$8.name,
    		type: "slot",
    		source: "(58:1) <Button bind:layout new_layout=\\\"close\\\" my_class=\\\"close icon\\\">",
    		ctx
    	});

    	return block;
    }

    // (65:3) {#each msgs as msg}
    function create_each_block$1(ctx) {
    	let msg_1;
    	let current;

    	msg_1 = new Chat_msg({
    			props: {
    				name: /*msg*/ ctx[4].name,
    				content: /*msg*/ ctx[4].content
    			},
    			$$inline: true
    		});

    	const block = {
    		c: function create() {
    			create_component(msg_1.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(msg_1, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const msg_1_changes = {};
    			if (dirty & /*msgs*/ 8) msg_1_changes.name = /*msg*/ ctx[4].name;
    			if (dirty & /*msgs*/ 8) msg_1_changes.content = /*msg*/ ctx[4].content;
    			msg_1.$set(msg_1_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(msg_1.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(msg_1.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(msg_1, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_each_block$1.name,
    		type: "each",
    		source: "(65:3) {#each msgs as msg}",
    		ctx
    	});

    	return block;
    }

    // (84:1) <Button my_class="send" on_click={send_msg}>
    function create_default_slot$a(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("send");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot$a.name,
    		type: "slot",
    		source: "(84:1) <Button my_class=\\\"send\\\" on_click={send_msg}>",
    		ctx
    	});

    	return block;
    }

    function create_fragment$l(ctx) {
    	let div4;
    	let button0;
    	let updating_layout;
    	let t0;
    	let button1;
    	let updating_layout_1;
    	let t1;
    	let button2;
    	let updating_layout_2;
    	let t2;
    	let div1;
    	let div0;
    	let t3;
    	let div3;
    	let div2;
    	let t4;
    	let button3;
    	let current;
    	let mounted;
    	let dispose;

    	function button0_layout_binding(value) {
    		/*button0_layout_binding*/ ctx[7](value);
    	}

    	let button0_props = {
    		new_layout: /*back*/ ctx[1],
    		my_class: "back icon",
    		my_title: "go back " + /*back*/ ctx[1],
    		$$slots: { default: [create_default_slot_3$4] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button0_props.layout = /*layout*/ ctx[0];
    	}

    	button0 = new Chat_button({ props: button0_props, $$inline: true });
    	binding_callbacks.push(() => bind(button0, 'layout', button0_layout_binding));

    	function button1_layout_binding(value) {
    		/*button1_layout_binding*/ ctx[8](value);
    	}

    	let button1_props = {
    		new_layout: "room_set",
    		my_class: "room_name transparent",
    		$$slots: { default: [create_default_slot_2$8] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button1_props.layout = /*layout*/ ctx[0];
    	}

    	button1 = new Chat_button({ props: button1_props, $$inline: true });
    	binding_callbacks.push(() => bind(button1, 'layout', button1_layout_binding));

    	function button2_layout_binding(value) {
    		/*button2_layout_binding*/ ctx[9](value);
    	}

    	let button2_props = {
    		new_layout: "close",
    		my_class: "close icon",
    		$$slots: { default: [create_default_slot_1$8] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button2_props.layout = /*layout*/ ctx[0];
    	}

    	button2 = new Chat_button({ props: button2_props, $$inline: true });
    	binding_callbacks.push(() => bind(button2, 'layout', button2_layout_binding));
    	let each_value = /*msgs*/ ctx[3];
    	validate_each_argument(each_value);
    	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 => transition_out(each_blocks[i], 1, 1, () => {
    		each_blocks[i] = null;
    	});

    	button3 = new Chat_button({
    			props: {
    				my_class: "send",
    				on_click: /*send_msg*/ ctx[5],
    				$$slots: { default: [create_default_slot$a] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	const block = {
    		c: function create() {
    			div4 = element("div");
    			create_component(button0.$$.fragment);
    			t0 = space();
    			create_component(button1.$$.fragment);
    			t1 = space();
    			create_component(button2.$$.fragment);
    			t2 = space();
    			div1 = element("div");
    			div0 = element("div");

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

    			t3 = space();
    			div3 = element("div");
    			div2 = element("div");
    			t4 = space();
    			create_component(button3.$$.fragment);
    			attr_dev(div0, "class", "msg_thread svelte-rmdfjs");
    			add_location(div0, file$k, 63, 2, 1047);
    			attr_dev(div1, "class", "panel panel_msg svelte-rmdfjs");
    			add_location(div1, file$k, 62, 1, 1015);
    			attr_dev(div2, "class", "text_area svelte-rmdfjs");
    			attr_dev(div2, "contenteditable", "true");
    			if (/*msg*/ ctx[4] === void 0) add_render_callback(() => /*div2_input_handler*/ ctx[10].call(div2));
    			add_location(div2, file$k, 72, 2, 1219);
    			attr_dev(div3, "class", "panel_write svelte-rmdfjs");
    			add_location(div3, file$k, 71, 1, 1191);
    			attr_dev(div4, "class", "grid_box svelte-rmdfjs");
    			add_location(div4, file$k, 44, 0, 627);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div4, anchor);
    			mount_component(button0, div4, null);
    			append_dev(div4, t0);
    			mount_component(button1, div4, null);
    			append_dev(div4, t1);
    			mount_component(button2, div4, null);
    			append_dev(div4, t2);
    			append_dev(div4, div1);
    			append_dev(div1, div0);

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

    			append_dev(div4, t3);
    			append_dev(div4, div3);
    			append_dev(div3, div2);

    			if (/*msg*/ ctx[4] !== void 0) {
    				div2.innerHTML = /*msg*/ ctx[4];
    			}

    			/*div2_binding*/ ctx[11](div2);
    			append_dev(div4, t4);
    			mount_component(button3, div4, null);
    			current = true;

    			if (!mounted) {
    				dispose = [
    					listen_dev(div2, "input", /*div2_input_handler*/ ctx[10]),
    					listen_dev(div2, "keypress", /*send_msg_if*/ ctx[6], false, false, false)
    				];

    				mounted = true;
    			}
    		},
    		p: function update(ctx, [dirty]) {
    			const button0_changes = {};
    			if (dirty & /*back*/ 2) button0_changes.new_layout = /*back*/ ctx[1];
    			if (dirty & /*back*/ 2) button0_changes.my_title = "go back " + /*back*/ ctx[1];

    			if (dirty & /*$$scope*/ 65536) {
    				button0_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout && dirty & /*layout*/ 1) {
    				updating_layout = true;
    				button0_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout = false);
    			}

    			button0.$set(button0_changes);
    			const button1_changes = {};

    			if (dirty & /*$$scope*/ 65536) {
    				button1_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_1 && dirty & /*layout*/ 1) {
    				updating_layout_1 = true;
    				button1_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_1 = false);
    			}

    			button1.$set(button1_changes);
    			const button2_changes = {};

    			if (dirty & /*$$scope*/ 65536) {
    				button2_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_2 && dirty & /*layout*/ 1) {
    				updating_layout_2 = true;
    				button2_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_2 = false);
    			}

    			button2.$set(button2_changes);

    			if (dirty & /*msgs*/ 8) {
    				each_value = /*msgs*/ ctx[3];
    				validate_each_argument(each_value);
    				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);
    						transition_in(each_blocks[i], 1);
    					} else {
    						each_blocks[i] = create_each_block$1(child_ctx);
    						each_blocks[i].c();
    						transition_in(each_blocks[i], 1);
    						each_blocks[i].m(div0, null);
    					}
    				}

    				group_outros();

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

    				check_outros();
    			}

    			if (dirty & /*msg*/ 16 && /*msg*/ ctx[4] !== div2.innerHTML) {
    				div2.innerHTML = /*msg*/ ctx[4];
    			}

    			const button3_changes = {};

    			if (dirty & /*$$scope*/ 65536) {
    				button3_changes.$$scope = { dirty, ctx };
    			}

    			button3.$set(button3_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button0.$$.fragment, local);
    			transition_in(button1.$$.fragment, local);
    			transition_in(button2.$$.fragment, local);

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

    			transition_in(button3.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button0.$$.fragment, local);
    			transition_out(button1.$$.fragment, local);
    			transition_out(button2.$$.fragment, local);
    			each_blocks = each_blocks.filter(Boolean);

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

    			transition_out(button3.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div4);
    			destroy_component(button0);
    			destroy_component(button1);
    			destroy_component(button2);
    			destroy_each(each_blocks, detaching);
    			/*div2_binding*/ ctx[11](null);
    			destroy_component(button3);
    			mounted = false;
    			run_all(dispose);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$l.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$l($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Layout_room', slots, []);
    	let { layout = "" } = $$props;
    	let { back = "" } = $$props;
    	let msg = "";
    	let text_area;
    	let index = 0;
    	let msgs = [];

    	function add_msg(from, the_msg) {
    		$$invalidate(3, msgs = [...msgs, { id: index, content: the_msg, name: from }]);
    		index++;
    	}

    	function send_msg() {
    		$$invalidate(4, msg = msg.trim());

    		if (msg.length > 0) {
    			//socket.emit('sendmsg', msg);
    			add_msg("me", msg);
    		}

    		$$invalidate(4, msg = "");
    		text_area.focus();
    	}

    	function send_msg_if(evt) {
    		if (evt.shiftKey && evt.key === "Enter") {
    			evt.preventDefault();
    			send_msg();
    		}
    	}

    	const writable_props = ['layout', 'back'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Layout_room> was created with unknown prop '${key}'`);
    	});

    	function button0_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button1_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button2_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function div2_input_handler() {
    		msg = this.innerHTML;
    		$$invalidate(4, msg);
    	}

    	function div2_binding($$value) {
    		binding_callbacks[$$value ? 'unshift' : 'push'](() => {
    			text_area = $$value;
    			$$invalidate(2, text_area);
    		});
    	}

    	$$self.$$set = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	$$self.$capture_state = () => ({
    		Button: Chat_button,
    		Msg: Chat_msg,
    		layout,
    		back,
    		msg,
    		text_area,
    		index,
    		msgs,
    		add_msg,
    		send_msg,
    		send_msg_if
    	});

    	$$self.$inject_state = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    		if ('msg' in $$props) $$invalidate(4, msg = $$props.msg);
    		if ('text_area' in $$props) $$invalidate(2, text_area = $$props.text_area);
    		if ('index' in $$props) index = $$props.index;
    		if ('msgs' in $$props) $$invalidate(3, msgs = $$props.msgs);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [
    		layout,
    		back,
    		text_area,
    		msgs,
    		msg,
    		send_msg,
    		send_msg_if,
    		button0_layout_binding,
    		button1_layout_binding,
    		button2_layout_binding,
    		div2_input_handler,
    		div2_binding
    	];
    }

    class Layout_room extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$l, create_fragment$l, safe_not_equal, { layout: 0, back: 1 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Layout_room",
    			options,
    			id: create_fragment$l.name
    		});
    	}

    	get layout() {
    		throw new Error("<Layout_room>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set layout(value) {
    		throw new Error("<Layout_room>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get back() {
    		throw new Error("<Layout_room>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set back(value) {
    		throw new Error("<Layout_room>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pieces/chat/Layout_new.svelte generated by Svelte v3.53.1 */
    const file$j = "src/pieces/chat/Layout_new.svelte";

    // (13:1) <Button bind:layout new_layout={back} my_class="back icon" my_title="go back {back}">
    function create_default_slot_3$3(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("back");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_3$3.name,
    		type: "slot",
    		source: "(13:1) <Button bind:layout new_layout={back} my_class=\\\"back icon\\\" my_title=\\\"go back {back}\\\">",
    		ctx
    	});

    	return block;
    }

    // (18:1) <Button my_class="new deactivate">
    function create_default_slot_2$7(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("new");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_2$7.name,
    		type: "slot",
    		source: "(18:1) <Button my_class=\\\"new deactivate\\\">",
    		ctx
    	});

    	return block;
    }

    // (23:1) <Button bind:layout new_layout="close" my_class="close icon">
    function create_default_slot_1$7(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("close");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_1$7.name,
    		type: "slot",
    		source: "(23:1) <Button bind:layout new_layout=\\\"close\\\" my_class=\\\"close icon\\\">",
    		ctx
    	});

    	return block;
    }

    // (29:2) <Button bind:layout new_layout="create" my_class="create">
    function create_default_slot$9(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("create");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot$9.name,
    		type: "slot",
    		source: "(29:2) <Button bind:layout new_layout=\\\"create\\\" my_class=\\\"create\\\">",
    		ctx
    	});

    	return block;
    }

    function create_fragment$k(ctx) {
    	let div3;
    	let button0;
    	let updating_layout;
    	let t0;
    	let button1;
    	let t1;
    	let button2;
    	let updating_layout_1;
    	let t2;
    	let div2;
    	let button3;
    	let updating_layout_2;
    	let t3;
    	let p0;
    	let t5;
    	let div1;
    	let div0;
    	let p1;
    	let current;

    	function button0_layout_binding(value) {
    		/*button0_layout_binding*/ ctx[2](value);
    	}

    	let button0_props = {
    		new_layout: /*back*/ ctx[1],
    		my_class: "back icon",
    		my_title: "go back " + /*back*/ ctx[1],
    		$$slots: { default: [create_default_slot_3$3] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button0_props.layout = /*layout*/ ctx[0];
    	}

    	button0 = new Chat_button({ props: button0_props, $$inline: true });
    	binding_callbacks.push(() => bind(button0, 'layout', button0_layout_binding));

    	button1 = new Chat_button({
    			props: {
    				my_class: "new deactivate",
    				$$slots: { default: [create_default_slot_2$7] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	function button2_layout_binding(value) {
    		/*button2_layout_binding*/ ctx[3](value);
    	}

    	let button2_props = {
    		new_layout: "close",
    		my_class: "close icon",
    		$$slots: { default: [create_default_slot_1$7] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button2_props.layout = /*layout*/ ctx[0];
    	}

    	button2 = new Chat_button({ props: button2_props, $$inline: true });
    	binding_callbacks.push(() => bind(button2, 'layout', button2_layout_binding));

    	function button3_layout_binding(value) {
    		/*button3_layout_binding*/ ctx[4](value);
    	}

    	let button3_props = {
    		new_layout: "create",
    		my_class: "create",
    		$$slots: { default: [create_default_slot$9] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button3_props.layout = /*layout*/ ctx[0];
    	}

    	button3 = new Chat_button({ props: button3_props, $$inline: true });
    	binding_callbacks.push(() => bind(button3, 'layout', button3_layout_binding));

    	const block = {
    		c: function create() {
    			div3 = element("div");
    			create_component(button0.$$.fragment);
    			t0 = space();
    			create_component(button1.$$.fragment);
    			t1 = space();
    			create_component(button2.$$.fragment);
    			t2 = space();
    			div2 = element("div");
    			create_component(button3.$$.fragment);
    			t3 = space();
    			p0 = element("p");
    			p0.textContent = "join room :";
    			t5 = space();
    			div1 = element("div");
    			div0 = element("div");
    			p1 = element("p");
    			p1.textContent = "/ there are no public rooms yet /";
    			add_location(p0, file$j, 31, 2, 576);
    			attr_dev(p1, "class", "__center");
    			add_location(p1, file$j, 34, 4, 666);
    			attr_dev(div0, "class", "__show_if_only_child");
    			add_location(div0, file$j, 33, 3, 627);
    			attr_dev(div1, "class", "public_rooms");
    			add_location(div1, file$j, 32, 2, 597);
    			attr_dev(div2, "class", "panel panel_new __border_top");
    			add_location(div2, file$j, 27, 1, 448);
    			attr_dev(div3, "class", "grid_box svelte-4f5gf1");
    			add_location(div3, file$j, 9, 0, 115);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div3, anchor);
    			mount_component(button0, div3, null);
    			append_dev(div3, t0);
    			mount_component(button1, div3, null);
    			append_dev(div3, t1);
    			mount_component(button2, div3, null);
    			append_dev(div3, t2);
    			append_dev(div3, div2);
    			mount_component(button3, div2, null);
    			append_dev(div2, t3);
    			append_dev(div2, p0);
    			append_dev(div2, t5);
    			append_dev(div2, div1);
    			append_dev(div1, div0);
    			append_dev(div0, p1);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			const button0_changes = {};
    			if (dirty & /*back*/ 2) button0_changes.new_layout = /*back*/ ctx[1];
    			if (dirty & /*back*/ 2) button0_changes.my_title = "go back " + /*back*/ ctx[1];

    			if (dirty & /*$$scope*/ 32) {
    				button0_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout && dirty & /*layout*/ 1) {
    				updating_layout = true;
    				button0_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout = false);
    			}

    			button0.$set(button0_changes);
    			const button1_changes = {};

    			if (dirty & /*$$scope*/ 32) {
    				button1_changes.$$scope = { dirty, ctx };
    			}

    			button1.$set(button1_changes);
    			const button2_changes = {};

    			if (dirty & /*$$scope*/ 32) {
    				button2_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_1 && dirty & /*layout*/ 1) {
    				updating_layout_1 = true;
    				button2_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_1 = false);
    			}

    			button2.$set(button2_changes);
    			const button3_changes = {};

    			if (dirty & /*$$scope*/ 32) {
    				button3_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_2 && dirty & /*layout*/ 1) {
    				updating_layout_2 = true;
    				button3_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_2 = false);
    			}

    			button3.$set(button3_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button0.$$.fragment, local);
    			transition_in(button1.$$.fragment, local);
    			transition_in(button2.$$.fragment, local);
    			transition_in(button3.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button0.$$.fragment, local);
    			transition_out(button1.$$.fragment, local);
    			transition_out(button2.$$.fragment, local);
    			transition_out(button3.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div3);
    			destroy_component(button0);
    			destroy_component(button1);
    			destroy_component(button2);
    			destroy_component(button3);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$k.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$k($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Layout_new', slots, []);
    	let { layout = "" } = $$props;
    	let { back = "" } = $$props;
    	const writable_props = ['layout', 'back'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Layout_new> was created with unknown prop '${key}'`);
    	});

    	function button0_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button2_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button3_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	$$self.$$set = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	$$self.$capture_state = () => ({ Button: Chat_button, layout, back });

    	$$self.$inject_state = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [
    		layout,
    		back,
    		button0_layout_binding,
    		button2_layout_binding,
    		button3_layout_binding
    	];
    }

    class Layout_new extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$k, create_fragment$k, safe_not_equal, { layout: 0, back: 1 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Layout_new",
    			options,
    			id: create_fragment$k.name
    		});
    	}

    	get layout() {
    		throw new Error("<Layout_new>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set layout(value) {
    		throw new Error("<Layout_new>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get back() {
    		throw new Error("<Layout_new>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set back(value) {
    		throw new Error("<Layout_new>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pieces/chat/Layout_settings.svelte generated by Svelte v3.53.1 */
    const file$i = "src/pieces/chat/Layout_settings.svelte";

    // (13:1) <Button bind:layout new_layout={back} my_class="back icon" my_title="go back {back}">
    function create_default_slot_2$6(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("back");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_2$6.name,
    		type: "slot",
    		source: "(13:1) <Button bind:layout new_layout={back} my_class=\\\"back icon\\\" my_title=\\\"go back {back}\\\">",
    		ctx
    	});

    	return block;
    }

    // (18:1) <Button my_class="room_name deactivate">
    function create_default_slot_1$6(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("settings");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_1$6.name,
    		type: "slot",
    		source: "(18:1) <Button my_class=\\\"room_name deactivate\\\">",
    		ctx
    	});

    	return block;
    }

    // (23:1) <Button bind:layout new_layout="close" my_class="close icon">
    function create_default_slot$8(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("close");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot$8.name,
    		type: "slot",
    		source: "(23:1) <Button bind:layout new_layout=\\\"close\\\" my_class=\\\"close icon\\\">",
    		ctx
    	});

    	return block;
    }

    function create_fragment$j(ctx) {
    	let div3;
    	let button0;
    	let updating_layout;
    	let t0;
    	let button1;
    	let t1;
    	let button2;
    	let updating_layout_1;
    	let t2;
    	let div2;
    	let p0;
    	let t4;
    	let div1;
    	let div0;
    	let p1;
    	let current;

    	function button0_layout_binding(value) {
    		/*button0_layout_binding*/ ctx[2](value);
    	}

    	let button0_props = {
    		new_layout: /*back*/ ctx[1],
    		my_class: "back icon",
    		my_title: "go back " + /*back*/ ctx[1],
    		$$slots: { default: [create_default_slot_2$6] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button0_props.layout = /*layout*/ ctx[0];
    	}

    	button0 = new Chat_button({ props: button0_props, $$inline: true });
    	binding_callbacks.push(() => bind(button0, 'layout', button0_layout_binding));

    	button1 = new Chat_button({
    			props: {
    				my_class: "room_name deactivate",
    				$$slots: { default: [create_default_slot_1$6] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	function button2_layout_binding(value) {
    		/*button2_layout_binding*/ ctx[3](value);
    	}

    	let button2_props = {
    		new_layout: "close",
    		my_class: "close icon",
    		$$slots: { default: [create_default_slot$8] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button2_props.layout = /*layout*/ ctx[0];
    	}

    	button2 = new Chat_button({ props: button2_props, $$inline: true });
    	binding_callbacks.push(() => bind(button2, 'layout', button2_layout_binding));

    	const block = {
    		c: function create() {
    			div3 = element("div");
    			create_component(button0.$$.fragment);
    			t0 = space();
    			create_component(button1.$$.fragment);
    			t1 = space();
    			create_component(button2.$$.fragment);
    			t2 = space();
    			div2 = element("div");
    			p0 = element("p");
    			p0.textContent = "blocked users :";
    			t4 = space();
    			div1 = element("div");
    			div0 = element("div");
    			p1 = element("p");
    			p1.textContent = "/ you have blocked no one /";
    			add_location(p0, file$i, 28, 2, 519);
    			attr_dev(p1, "class", "__center");
    			add_location(p1, file$i, 31, 4, 614);
    			attr_dev(div0, "class", "__show_if_only_child");
    			add_location(div0, file$i, 30, 3, 575);
    			attr_dev(div1, "class", "blocked_users");
    			add_location(div1, file$i, 29, 2, 544);
    			attr_dev(div2, "class", "panel panel_settings __border_top");
    			add_location(div2, file$i, 27, 1, 469);
    			attr_dev(div3, "class", "grid_box svelte-1lfmc2m");
    			add_location(div3, file$i, 9, 0, 115);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div3, anchor);
    			mount_component(button0, div3, null);
    			append_dev(div3, t0);
    			mount_component(button1, div3, null);
    			append_dev(div3, t1);
    			mount_component(button2, div3, null);
    			append_dev(div3, t2);
    			append_dev(div3, div2);
    			append_dev(div2, p0);
    			append_dev(div2, t4);
    			append_dev(div2, div1);
    			append_dev(div1, div0);
    			append_dev(div0, p1);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			const button0_changes = {};
    			if (dirty & /*back*/ 2) button0_changes.new_layout = /*back*/ ctx[1];
    			if (dirty & /*back*/ 2) button0_changes.my_title = "go back " + /*back*/ ctx[1];

    			if (dirty & /*$$scope*/ 16) {
    				button0_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout && dirty & /*layout*/ 1) {
    				updating_layout = true;
    				button0_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout = false);
    			}

    			button0.$set(button0_changes);
    			const button1_changes = {};

    			if (dirty & /*$$scope*/ 16) {
    				button1_changes.$$scope = { dirty, ctx };
    			}

    			button1.$set(button1_changes);
    			const button2_changes = {};

    			if (dirty & /*$$scope*/ 16) {
    				button2_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_1 && dirty & /*layout*/ 1) {
    				updating_layout_1 = true;
    				button2_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_1 = false);
    			}

    			button2.$set(button2_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button0.$$.fragment, local);
    			transition_in(button1.$$.fragment, local);
    			transition_in(button2.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button0.$$.fragment, local);
    			transition_out(button1.$$.fragment, local);
    			transition_out(button2.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div3);
    			destroy_component(button0);
    			destroy_component(button1);
    			destroy_component(button2);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$j.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$j($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Layout_settings', slots, []);
    	let { layout = "" } = $$props;
    	let { back = "" } = $$props;
    	const writable_props = ['layout', 'back'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Layout_settings> was created with unknown prop '${key}'`);
    	});

    	function button0_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button2_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	$$self.$$set = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	$$self.$capture_state = () => ({ Button: Chat_button, layout, back });

    	$$self.$inject_state = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [layout, back, button0_layout_binding, button2_layout_binding];
    }

    class Layout_settings extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$j, create_fragment$j, safe_not_equal, { layout: 0, back: 1 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Layout_settings",
    			options,
    			id: create_fragment$j.name
    		});
    	}

    	get layout() {
    		throw new Error("<Layout_settings>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set layout(value) {
    		throw new Error("<Layout_settings>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get back() {
    		throw new Error("<Layout_settings>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set back(value) {
    		throw new Error("<Layout_settings>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pieces/chat/Layout_room_set.svelte generated by Svelte v3.53.1 */
    const file$h = "src/pieces/chat/Layout_room_set.svelte";

    // (13:1) <Button bind:layout new_layout={back} my_class="back icon" my_title="go back {back}">
    function create_default_slot_7$1(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("back");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_7$1.name,
    		type: "slot",
    		source: "(13:1) <Button bind:layout new_layout={back} my_class=\\\"back icon\\\" my_title=\\\"go back {back}\\\">",
    		ctx
    	});

    	return block;
    }

    // (18:1) <Button my_class="room_name deactivate">
    function create_default_slot_6$1(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("<room_name>");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_6$1.name,
    		type: "slot",
    		source: "(18:1) <Button my_class=\\\"room_name deactivate\\\">",
    		ctx
    	});

    	return block;
    }

    // (23:1) <Button bind:layout new_layout="close" my_class="close icon">
    function create_default_slot_5$1(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("close");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_5$1.name,
    		type: "slot",
    		source: "(23:1) <Button bind:layout new_layout=\\\"close\\\" my_class=\\\"close icon\\\">",
    		ctx
    	});

    	return block;
    }

    // (29:2) <Button bind:layout new_layout="create" my_class="create">
    function create_default_slot_4$1(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("leave");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_4$1.name,
    		type: "slot",
    		source: "(29:2) <Button bind:layout new_layout=\\\"create\\\" my_class=\\\"create\\\">",
    		ctx
    	});

    	return block;
    }

    // (39:3) <Button bind:layout new_layout="user" my_class="list">
    function create_default_slot_3$2(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("user 1");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_3$2.name,
    		type: "slot",
    		source: "(39:3) <Button bind:layout new_layout=\\\"user\\\" my_class=\\\"list\\\">",
    		ctx
    	});

    	return block;
    }

    // (42:3) <Button bind:layout new_layout="user" my_class="list blocked">
    function create_default_slot_2$5(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("user 2");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_2$5.name,
    		type: "slot",
    		source: "(42:3) <Button bind:layout new_layout=\\\"user\\\" my_class=\\\"list blocked\\\">",
    		ctx
    	});

    	return block;
    }

    // (45:3) <Button bind:layout new_layout="user" my_class="list">
    function create_default_slot_1$5(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("user 3");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_1$5.name,
    		type: "slot",
    		source: "(45:3) <Button bind:layout new_layout=\\\"user\\\" my_class=\\\"list\\\">",
    		ctx
    	});

    	return block;
    }

    // (48:3) <Button bind:layout new_layout="user" my_class="list">
    function create_default_slot$7(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("user 4");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot$7.name,
    		type: "slot",
    		source: "(48:3) <Button bind:layout new_layout=\\\"user\\\" my_class=\\\"list\\\">",
    		ctx
    	});

    	return block;
    }

    function create_fragment$i(ctx) {
    	let div3;
    	let button0;
    	let updating_layout;
    	let t0;
    	let button1;
    	let t1;
    	let button2;
    	let updating_layout_1;
    	let t2;
    	let div2;
    	let button3;
    	let updating_layout_2;
    	let t3;
    	let p0;
    	let t5;
    	let div1;
    	let div0;
    	let p1;
    	let t7;
    	let button4;
    	let updating_layout_3;
    	let t8;
    	let button5;
    	let updating_layout_4;
    	let t9;
    	let button6;
    	let updating_layout_5;
    	let t10;
    	let button7;
    	let updating_layout_6;
    	let current;

    	function button0_layout_binding(value) {
    		/*button0_layout_binding*/ ctx[2](value);
    	}

    	let button0_props = {
    		new_layout: /*back*/ ctx[1],
    		my_class: "back icon",
    		my_title: "go back " + /*back*/ ctx[1],
    		$$slots: { default: [create_default_slot_7$1] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button0_props.layout = /*layout*/ ctx[0];
    	}

    	button0 = new Chat_button({ props: button0_props, $$inline: true });
    	binding_callbacks.push(() => bind(button0, 'layout', button0_layout_binding));

    	button1 = new Chat_button({
    			props: {
    				my_class: "room_name deactivate",
    				$$slots: { default: [create_default_slot_6$1] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	function button2_layout_binding(value) {
    		/*button2_layout_binding*/ ctx[3](value);
    	}

    	let button2_props = {
    		new_layout: "close",
    		my_class: "close icon",
    		$$slots: { default: [create_default_slot_5$1] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button2_props.layout = /*layout*/ ctx[0];
    	}

    	button2 = new Chat_button({ props: button2_props, $$inline: true });
    	binding_callbacks.push(() => bind(button2, 'layout', button2_layout_binding));

    	function button3_layout_binding(value) {
    		/*button3_layout_binding*/ ctx[4](value);
    	}

    	let button3_props = {
    		new_layout: "create",
    		my_class: "create",
    		$$slots: { default: [create_default_slot_4$1] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button3_props.layout = /*layout*/ ctx[0];
    	}

    	button3 = new Chat_button({ props: button3_props, $$inline: true });
    	binding_callbacks.push(() => bind(button3, 'layout', button3_layout_binding));

    	function button4_layout_binding(value) {
    		/*button4_layout_binding*/ ctx[5](value);
    	}

    	let button4_props = {
    		new_layout: "user",
    		my_class: "list",
    		$$slots: { default: [create_default_slot_3$2] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button4_props.layout = /*layout*/ ctx[0];
    	}

    	button4 = new Chat_button({ props: button4_props, $$inline: true });
    	binding_callbacks.push(() => bind(button4, 'layout', button4_layout_binding));

    	function button5_layout_binding(value) {
    		/*button5_layout_binding*/ ctx[6](value);
    	}

    	let button5_props = {
    		new_layout: "user",
    		my_class: "list blocked",
    		$$slots: { default: [create_default_slot_2$5] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button5_props.layout = /*layout*/ ctx[0];
    	}

    	button5 = new Chat_button({ props: button5_props, $$inline: true });
    	binding_callbacks.push(() => bind(button5, 'layout', button5_layout_binding));

    	function button6_layout_binding(value) {
    		/*button6_layout_binding*/ ctx[7](value);
    	}

    	let button6_props = {
    		new_layout: "user",
    		my_class: "list",
    		$$slots: { default: [create_default_slot_1$5] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button6_props.layout = /*layout*/ ctx[0];
    	}

    	button6 = new Chat_button({ props: button6_props, $$inline: true });
    	binding_callbacks.push(() => bind(button6, 'layout', button6_layout_binding));

    	function button7_layout_binding(value) {
    		/*button7_layout_binding*/ ctx[8](value);
    	}

    	let button7_props = {
    		new_layout: "user",
    		my_class: "list",
    		$$slots: { default: [create_default_slot$7] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button7_props.layout = /*layout*/ ctx[0];
    	}

    	button7 = new Chat_button({ props: button7_props, $$inline: true });
    	binding_callbacks.push(() => bind(button7, 'layout', button7_layout_binding));

    	const block = {
    		c: function create() {
    			div3 = element("div");
    			create_component(button0.$$.fragment);
    			t0 = space();
    			create_component(button1.$$.fragment);
    			t1 = space();
    			create_component(button2.$$.fragment);
    			t2 = space();
    			div2 = element("div");
    			create_component(button3.$$.fragment);
    			t3 = space();
    			p0 = element("p");
    			p0.textContent = "room users :";
    			t5 = space();
    			div1 = element("div");
    			div0 = element("div");
    			p1 = element("p");
    			p1.textContent = "/ there are no public rooms yet /";
    			t7 = space();
    			create_component(button4.$$.fragment);
    			t8 = space();
    			create_component(button5.$$.fragment);
    			t9 = space();
    			create_component(button6.$$.fragment);
    			t10 = space();
    			create_component(button7.$$.fragment);
    			add_location(p0, file$h, 31, 2, 611);
    			attr_dev(p1, "class", "__center");
    			add_location(p1, file$h, 34, 4, 700);
    			attr_dev(div0, "class", "__show_if_only_child");
    			add_location(div0, file$h, 33, 3, 661);
    			attr_dev(div1, "class", "room_users");
    			add_location(div1, file$h, 32, 2, 633);
    			attr_dev(div2, "class", "panel panel_room_set __border_top");
    			add_location(div2, file$h, 27, 1, 479);
    			attr_dev(div3, "class", "grid_box svelte-1sv7l8q");
    			add_location(div3, file$h, 9, 0, 115);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div3, anchor);
    			mount_component(button0, div3, null);
    			append_dev(div3, t0);
    			mount_component(button1, div3, null);
    			append_dev(div3, t1);
    			mount_component(button2, div3, null);
    			append_dev(div3, t2);
    			append_dev(div3, div2);
    			mount_component(button3, div2, null);
    			append_dev(div2, t3);
    			append_dev(div2, p0);
    			append_dev(div2, t5);
    			append_dev(div2, div1);
    			append_dev(div1, div0);
    			append_dev(div0, p1);
    			append_dev(div1, t7);
    			mount_component(button4, div1, null);
    			append_dev(div1, t8);
    			mount_component(button5, div1, null);
    			append_dev(div1, t9);
    			mount_component(button6, div1, null);
    			append_dev(div1, t10);
    			mount_component(button7, div1, null);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			const button0_changes = {};
    			if (dirty & /*back*/ 2) button0_changes.new_layout = /*back*/ ctx[1];
    			if (dirty & /*back*/ 2) button0_changes.my_title = "go back " + /*back*/ ctx[1];

    			if (dirty & /*$$scope*/ 512) {
    				button0_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout && dirty & /*layout*/ 1) {
    				updating_layout = true;
    				button0_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout = false);
    			}

    			button0.$set(button0_changes);
    			const button1_changes = {};

    			if (dirty & /*$$scope*/ 512) {
    				button1_changes.$$scope = { dirty, ctx };
    			}

    			button1.$set(button1_changes);
    			const button2_changes = {};

    			if (dirty & /*$$scope*/ 512) {
    				button2_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_1 && dirty & /*layout*/ 1) {
    				updating_layout_1 = true;
    				button2_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_1 = false);
    			}

    			button2.$set(button2_changes);
    			const button3_changes = {};

    			if (dirty & /*$$scope*/ 512) {
    				button3_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_2 && dirty & /*layout*/ 1) {
    				updating_layout_2 = true;
    				button3_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_2 = false);
    			}

    			button3.$set(button3_changes);
    			const button4_changes = {};

    			if (dirty & /*$$scope*/ 512) {
    				button4_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_3 && dirty & /*layout*/ 1) {
    				updating_layout_3 = true;
    				button4_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_3 = false);
    			}

    			button4.$set(button4_changes);
    			const button5_changes = {};

    			if (dirty & /*$$scope*/ 512) {
    				button5_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_4 && dirty & /*layout*/ 1) {
    				updating_layout_4 = true;
    				button5_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_4 = false);
    			}

    			button5.$set(button5_changes);
    			const button6_changes = {};

    			if (dirty & /*$$scope*/ 512) {
    				button6_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_5 && dirty & /*layout*/ 1) {
    				updating_layout_5 = true;
    				button6_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_5 = false);
    			}

    			button6.$set(button6_changes);
    			const button7_changes = {};

    			if (dirty & /*$$scope*/ 512) {
    				button7_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_6 && dirty & /*layout*/ 1) {
    				updating_layout_6 = true;
    				button7_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_6 = false);
    			}

    			button7.$set(button7_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button0.$$.fragment, local);
    			transition_in(button1.$$.fragment, local);
    			transition_in(button2.$$.fragment, local);
    			transition_in(button3.$$.fragment, local);
    			transition_in(button4.$$.fragment, local);
    			transition_in(button5.$$.fragment, local);
    			transition_in(button6.$$.fragment, local);
    			transition_in(button7.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button0.$$.fragment, local);
    			transition_out(button1.$$.fragment, local);
    			transition_out(button2.$$.fragment, local);
    			transition_out(button3.$$.fragment, local);
    			transition_out(button4.$$.fragment, local);
    			transition_out(button5.$$.fragment, local);
    			transition_out(button6.$$.fragment, local);
    			transition_out(button7.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div3);
    			destroy_component(button0);
    			destroy_component(button1);
    			destroy_component(button2);
    			destroy_component(button3);
    			destroy_component(button4);
    			destroy_component(button5);
    			destroy_component(button6);
    			destroy_component(button7);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$i.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$i($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Layout_room_set', slots, []);
    	let { layout = "" } = $$props;
    	let { back = "" } = $$props;
    	const writable_props = ['layout', 'back'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Layout_room_set> was created with unknown prop '${key}'`);
    	});

    	function button0_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button2_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button3_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button4_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button5_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button6_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button7_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	$$self.$$set = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	$$self.$capture_state = () => ({ Button: Chat_button, layout, back });

    	$$self.$inject_state = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [
    		layout,
    		back,
    		button0_layout_binding,
    		button2_layout_binding,
    		button3_layout_binding,
    		button4_layout_binding,
    		button5_layout_binding,
    		button6_layout_binding,
    		button7_layout_binding
    	];
    }

    class Layout_room_set extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$i, create_fragment$i, safe_not_equal, { layout: 0, back: 1 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Layout_room_set",
    			options,
    			id: create_fragment$i.name
    		});
    	}

    	get layout() {
    		throw new Error("<Layout_room_set>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set layout(value) {
    		throw new Error("<Layout_room_set>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get back() {
    		throw new Error("<Layout_room_set>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set back(value) {
    		throw new Error("<Layout_room_set>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pieces/chat/Layout_protected.svelte generated by Svelte v3.53.1 */
    const file$g = "src/pieces/chat/Layout_protected.svelte";

    // (13:1) <Button bind:layout new_layout={back} my_class="back icon" my_title="go back {back}">
    function create_default_slot_2$4(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("back");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_2$4.name,
    		type: "slot",
    		source: "(13:1) <Button bind:layout new_layout={back} my_class=\\\"back icon\\\" my_title=\\\"go back {back}\\\">",
    		ctx
    	});

    	return block;
    }

    // (18:1) <Button my_class="room_name deactivate">
    function create_default_slot_1$4(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("<room_name>");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_1$4.name,
    		type: "slot",
    		source: "(18:1) <Button my_class=\\\"room_name deactivate\\\">",
    		ctx
    	});

    	return block;
    }

    // (23:1) <Button bind:layout new_layout="close" my_class="close icon">
    function create_default_slot$6(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("close");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot$6.name,
    		type: "slot",
    		source: "(23:1) <Button bind:layout new_layout=\\\"close\\\" my_class=\\\"close icon\\\">",
    		ctx
    	});

    	return block;
    }

    function create_fragment$h(ctx) {
    	let div1;
    	let button0;
    	let updating_layout;
    	let t0;
    	let button1;
    	let t1;
    	let button2;
    	let updating_layout_1;
    	let t2;
    	let div0;
    	let p0;
    	let t4;
    	let form;
    	let label;
    	let p1;
    	let t6;
    	let input0;
    	let t7;
    	let input1;
    	let current;

    	function button0_layout_binding(value) {
    		/*button0_layout_binding*/ ctx[2](value);
    	}

    	let button0_props = {
    		new_layout: /*back*/ ctx[1],
    		my_class: "back icon",
    		my_title: "go back " + /*back*/ ctx[1],
    		$$slots: { default: [create_default_slot_2$4] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button0_props.layout = /*layout*/ ctx[0];
    	}

    	button0 = new Chat_button({ props: button0_props, $$inline: true });
    	binding_callbacks.push(() => bind(button0, 'layout', button0_layout_binding));

    	button1 = new Chat_button({
    			props: {
    				my_class: "room_name deactivate",
    				$$slots: { default: [create_default_slot_1$4] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	function button2_layout_binding(value) {
    		/*button2_layout_binding*/ ctx[3](value);
    	}

    	let button2_props = {
    		new_layout: "close",
    		my_class: "close icon",
    		$$slots: { default: [create_default_slot$6] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button2_props.layout = /*layout*/ ctx[0];
    	}

    	button2 = new Chat_button({ props: button2_props, $$inline: true });
    	binding_callbacks.push(() => bind(button2, 'layout', button2_layout_binding));

    	const block = {
    		c: function create() {
    			div1 = element("div");
    			create_component(button0.$$.fragment);
    			t0 = space();
    			create_component(button1.$$.fragment);
    			t1 = space();
    			create_component(button2.$$.fragment);
    			t2 = space();
    			div0 = element("div");
    			p0 = element("p");
    			p0.textContent = "this room is protected";
    			t4 = space();
    			form = element("form");
    			label = element("label");
    			p1 = element("p");
    			p1.textContent = "password :";
    			t6 = space();
    			input0 = element("input");
    			t7 = space();
    			input1 = element("input");
    			attr_dev(p0, "class", "title __center");
    			add_location(p0, file$g, 28, 2, 531);
    			add_location(p1, file$g, 30, 26, 619);
    			attr_dev(label, "for", "chat_pswd");
    			add_location(label, file$g, 30, 3, 596);
    			attr_dev(input0, "id", "chat_pswd");
    			attr_dev(input0, "type", "password");
    			input0.required = true;
    			add_location(input0, file$g, 31, 3, 648);
    			attr_dev(input1, "type", "submit");
    			input1.value = "⮡";
    			attr_dev(input1, "class", "svelte-2tekts");
    			add_location(input1, file$g, 32, 3, 700);
    			attr_dev(form, "class", "svelte-2tekts");
    			add_location(form, file$g, 29, 2, 586);
    			attr_dev(div0, "class", "panel panel_protected __border_top");
    			add_location(div0, file$g, 27, 1, 480);
    			attr_dev(div1, "class", "grid_box svelte-2tekts");
    			add_location(div1, file$g, 9, 0, 115);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div1, anchor);
    			mount_component(button0, div1, null);
    			append_dev(div1, t0);
    			mount_component(button1, div1, null);
    			append_dev(div1, t1);
    			mount_component(button2, div1, null);
    			append_dev(div1, t2);
    			append_dev(div1, div0);
    			append_dev(div0, p0);
    			append_dev(div0, t4);
    			append_dev(div0, form);
    			append_dev(form, label);
    			append_dev(label, p1);
    			append_dev(form, t6);
    			append_dev(form, input0);
    			append_dev(form, t7);
    			append_dev(form, input1);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			const button0_changes = {};
    			if (dirty & /*back*/ 2) button0_changes.new_layout = /*back*/ ctx[1];
    			if (dirty & /*back*/ 2) button0_changes.my_title = "go back " + /*back*/ ctx[1];

    			if (dirty & /*$$scope*/ 16) {
    				button0_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout && dirty & /*layout*/ 1) {
    				updating_layout = true;
    				button0_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout = false);
    			}

    			button0.$set(button0_changes);
    			const button1_changes = {};

    			if (dirty & /*$$scope*/ 16) {
    				button1_changes.$$scope = { dirty, ctx };
    			}

    			button1.$set(button1_changes);
    			const button2_changes = {};

    			if (dirty & /*$$scope*/ 16) {
    				button2_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_1 && dirty & /*layout*/ 1) {
    				updating_layout_1 = true;
    				button2_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_1 = false);
    			}

    			button2.$set(button2_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button0.$$.fragment, local);
    			transition_in(button1.$$.fragment, local);
    			transition_in(button2.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button0.$$.fragment, local);
    			transition_out(button1.$$.fragment, local);
    			transition_out(button2.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div1);
    			destroy_component(button0);
    			destroy_component(button1);
    			destroy_component(button2);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$h.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$h($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Layout_protected', slots, []);
    	let { layout = "" } = $$props;
    	let { back = "" } = $$props;
    	const writable_props = ['layout', 'back'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Layout_protected> was created with unknown prop '${key}'`);
    	});

    	function button0_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button2_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	$$self.$$set = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	$$self.$capture_state = () => ({ Button: Chat_button, layout, back });

    	$$self.$inject_state = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [layout, back, button0_layout_binding, button2_layout_binding];
    }

    class Layout_protected extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$h, create_fragment$h, safe_not_equal, { layout: 0, back: 1 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Layout_protected",
    			options,
    			id: create_fragment$h.name
    		});
    	}

    	get layout() {
    		throw new Error("<Layout_protected>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set layout(value) {
    		throw new Error("<Layout_protected>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get back() {
    		throw new Error("<Layout_protected>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set back(value) {
    		throw new Error("<Layout_protected>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pieces/chat/Layout_create.svelte generated by Svelte v3.53.1 */
    const file$f = "src/pieces/chat/Layout_create.svelte";

    // (13:1) <Button bind:layout new_layout={back} my_class="back icon" my_title="go back {back}">
    function create_default_slot_2$3(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("back");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_2$3.name,
    		type: "slot",
    		source: "(13:1) <Button bind:layout new_layout={back} my_class=\\\"back icon\\\" my_title=\\\"go back {back}\\\">",
    		ctx
    	});

    	return block;
    }

    // (18:1) <Button my_class="create deactivate">
    function create_default_slot_1$3(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("create");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_1$3.name,
    		type: "slot",
    		source: "(18:1) <Button my_class=\\\"create deactivate\\\">",
    		ctx
    	});

    	return block;
    }

    // (23:1) <Button bind:layout new_layout="close" my_class="close icon">
    function create_default_slot$5(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("close");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot$5.name,
    		type: "slot",
    		source: "(23:1) <Button bind:layout new_layout=\\\"close\\\" my_class=\\\"close icon\\\">",
    		ctx
    	});

    	return block;
    }

    function create_fragment$g(ctx) {
    	let div2;
    	let button0;
    	let updating_layout;
    	let t0;
    	let button1;
    	let t1;
    	let button2;
    	let updating_layout_1;
    	let t2;
    	let div1;
    	let form;
    	let label0;
    	let p0;
    	let t4;
    	let input0;
    	let t5;
    	let input1;
    	let t6;
    	let label1;
    	let p1;
    	let t8;
    	let input2;
    	let t9;
    	let label2;
    	let p2;
    	let t11;
    	let input3;
    	let t12;
    	let label3;
    	let p3;
    	let t14;
    	let div0;
    	let label4;
    	let p4;
    	let t16;
    	let input4;
    	let t17;
    	let p5;
    	let t19;
    	let input5;
    	let t20;
    	let input6;
    	let current;

    	function button0_layout_binding(value) {
    		/*button0_layout_binding*/ ctx[2](value);
    	}

    	let button0_props = {
    		new_layout: /*back*/ ctx[1],
    		my_class: "back icon",
    		my_title: "go back " + /*back*/ ctx[1],
    		$$slots: { default: [create_default_slot_2$3] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button0_props.layout = /*layout*/ ctx[0];
    	}

    	button0 = new Chat_button({ props: button0_props, $$inline: true });
    	binding_callbacks.push(() => bind(button0, 'layout', button0_layout_binding));

    	button1 = new Chat_button({
    			props: {
    				my_class: "create deactivate",
    				$$slots: { default: [create_default_slot_1$3] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	function button2_layout_binding(value) {
    		/*button2_layout_binding*/ ctx[3](value);
    	}

    	let button2_props = {
    		new_layout: "close",
    		my_class: "close icon",
    		$$slots: { default: [create_default_slot$5] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button2_props.layout = /*layout*/ ctx[0];
    	}

    	button2 = new Chat_button({ props: button2_props, $$inline: true });
    	binding_callbacks.push(() => bind(button2, 'layout', button2_layout_binding));

    	const block = {
    		c: function create() {
    			div2 = element("div");
    			create_component(button0.$$.fragment);
    			t0 = space();
    			create_component(button1.$$.fragment);
    			t1 = space();
    			create_component(button2.$$.fragment);
    			t2 = space();
    			div1 = element("div");
    			form = element("form");
    			label0 = element("label");
    			p0 = element("p");
    			p0.textContent = "new room name :";
    			t4 = space();
    			input0 = element("input");
    			t5 = space();
    			input1 = element("input");
    			t6 = space();
    			label1 = element("label");
    			p1 = element("p");
    			p1.textContent = "public";
    			t8 = space();
    			input2 = element("input");
    			t9 = space();
    			label2 = element("label");
    			p2 = element("p");
    			p2.textContent = "private";
    			t11 = space();
    			input3 = element("input");
    			t12 = space();
    			label3 = element("label");
    			p3 = element("p");
    			p3.textContent = "protected";
    			t14 = space();
    			div0 = element("div");
    			label4 = element("label");
    			p4 = element("p");
    			p4.textContent = "choose a password :";
    			t16 = space();
    			input4 = element("input");
    			t17 = space();
    			p5 = element("p");
    			p5.textContent = "confirm password :";
    			t19 = space();
    			input5 = element("input");
    			t20 = space();
    			input6 = element("input");
    			attr_dev(p0, "class", "svelte-1cmnkcw");
    			add_location(p0, file$f, 30, 26, 546);
    			attr_dev(label0, "for", "chat_name");
    			add_location(label0, file$f, 30, 3, 523);
    			attr_dev(input0, "id", "chat_name");
    			input0.required = true;
    			add_location(input0, file$f, 31, 3, 580);
    			attr_dev(input1, "id", "chat_public");
    			attr_dev(input1, "type", "radio");
    			attr_dev(input1, "name", "chat_create_type");
    			input1.checked = true;
    			attr_dev(input1, "class", "svelte-1cmnkcw");
    			add_location(input1, file$f, 33, 3, 638);
    			attr_dev(p1, "class", "svelte-1cmnkcw");
    			add_location(p1, file$f, 34, 43, 752);
    			attr_dev(label1, "for", "chat_public");
    			attr_dev(label1, "class", "_radio svelte-1cmnkcw");
    			add_location(label1, file$f, 34, 3, 712);
    			attr_dev(input2, "id", "chat_private");
    			attr_dev(input2, "type", "radio");
    			attr_dev(input2, "name", "chat_create_type");
    			attr_dev(input2, "class", "svelte-1cmnkcw");
    			add_location(input2, file$f, 36, 3, 801);
    			attr_dev(p2, "class", "svelte-1cmnkcw");
    			add_location(p2, file$f, 37, 44, 909);
    			attr_dev(label2, "for", "chat_private");
    			attr_dev(label2, "class", "_radio svelte-1cmnkcw");
    			add_location(label2, file$f, 37, 3, 868);
    			attr_dev(input3, "id", "chat_protected");
    			attr_dev(input3, "class", "__check_change_next svelte-1cmnkcw");
    			attr_dev(input3, "type", "radio");
    			attr_dev(input3, "name", "chat_create_type");
    			add_location(input3, file$f, 39, 3, 961);
    			attr_dev(p3, "class", "svelte-1cmnkcw");
    			add_location(p3, file$f, 40, 46, 1101);
    			attr_dev(label3, "for", "chat_protected");
    			attr_dev(label3, "class", "_radio svelte-1cmnkcw");
    			add_location(label3, file$f, 40, 3, 1058);
    			attr_dev(p4, "class", "svelte-1cmnkcw");
    			add_location(p4, file$f, 43, 27, 1206);
    			attr_dev(label4, "for", "chat_pswd");
    			add_location(label4, file$f, 43, 4, 1183);
    			attr_dev(input4, "id", "chat_pswd");
    			attr_dev(input4, "type", "password");
    			attr_dev(input4, "placeholder", "minimum 8 characters");
    			attr_dev(input4, "minlength", "8");
    			add_location(input4, file$f, 44, 4, 1245);
    			attr_dev(p5, "class", "svelte-1cmnkcw");
    			add_location(p5, file$f, 45, 4, 1338);
    			attr_dev(input5, "type", "password");
    			add_location(input5, file$f, 46, 4, 1368);
    			attr_dev(div0, "class", "__to_show");
    			add_location(div0, file$f, 42, 3, 1155);
    			attr_dev(input6, "type", "submit");
    			input6.value = "⮡";
    			attr_dev(input6, "class", "svelte-1cmnkcw");
    			add_location(input6, file$f, 48, 3, 1405);
    			attr_dev(form, "class", "svelte-1cmnkcw");
    			add_location(form, file$f, 28, 2, 495);
    			attr_dev(div1, "class", "panel panel_create");
    			add_location(div1, file$f, 27, 1, 460);
    			attr_dev(div2, "class", "grid_box svelte-1cmnkcw");
    			add_location(div2, file$f, 9, 0, 115);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div2, anchor);
    			mount_component(button0, div2, null);
    			append_dev(div2, t0);
    			mount_component(button1, div2, null);
    			append_dev(div2, t1);
    			mount_component(button2, div2, null);
    			append_dev(div2, t2);
    			append_dev(div2, div1);
    			append_dev(div1, form);
    			append_dev(form, label0);
    			append_dev(label0, p0);
    			append_dev(form, t4);
    			append_dev(form, input0);
    			append_dev(form, t5);
    			append_dev(form, input1);
    			append_dev(form, t6);
    			append_dev(form, label1);
    			append_dev(label1, p1);
    			append_dev(form, t8);
    			append_dev(form, input2);
    			append_dev(form, t9);
    			append_dev(form, label2);
    			append_dev(label2, p2);
    			append_dev(form, t11);
    			append_dev(form, input3);
    			append_dev(form, t12);
    			append_dev(form, label3);
    			append_dev(label3, p3);
    			append_dev(form, t14);
    			append_dev(form, div0);
    			append_dev(div0, label4);
    			append_dev(label4, p4);
    			append_dev(div0, t16);
    			append_dev(div0, input4);
    			append_dev(div0, t17);
    			append_dev(div0, p5);
    			append_dev(div0, t19);
    			append_dev(div0, input5);
    			append_dev(form, t20);
    			append_dev(form, input6);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			const button0_changes = {};
    			if (dirty & /*back*/ 2) button0_changes.new_layout = /*back*/ ctx[1];
    			if (dirty & /*back*/ 2) button0_changes.my_title = "go back " + /*back*/ ctx[1];

    			if (dirty & /*$$scope*/ 16) {
    				button0_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout && dirty & /*layout*/ 1) {
    				updating_layout = true;
    				button0_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout = false);
    			}

    			button0.$set(button0_changes);
    			const button1_changes = {};

    			if (dirty & /*$$scope*/ 16) {
    				button1_changes.$$scope = { dirty, ctx };
    			}

    			button1.$set(button1_changes);
    			const button2_changes = {};

    			if (dirty & /*$$scope*/ 16) {
    				button2_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_1 && dirty & /*layout*/ 1) {
    				updating_layout_1 = true;
    				button2_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_1 = false);
    			}

    			button2.$set(button2_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button0.$$.fragment, local);
    			transition_in(button1.$$.fragment, local);
    			transition_in(button2.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button0.$$.fragment, local);
    			transition_out(button1.$$.fragment, local);
    			transition_out(button2.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div2);
    			destroy_component(button0);
    			destroy_component(button1);
    			destroy_component(button2);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$g.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$g($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Layout_create', slots, []);
    	let { layout = "" } = $$props;
    	let { back = "" } = $$props;
    	const writable_props = ['layout', 'back'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Layout_create> was created with unknown prop '${key}'`);
    	});

    	function button0_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button2_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	$$self.$$set = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	$$self.$capture_state = () => ({ Button: Chat_button, layout, back });

    	$$self.$inject_state = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [layout, back, button0_layout_binding, button2_layout_binding];
    }

    class Layout_create extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$g, create_fragment$g, safe_not_equal, { layout: 0, back: 1 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Layout_create",
    			options,
    			id: create_fragment$g.name
    		});
    	}

    	get layout() {
    		throw new Error("<Layout_create>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set layout(value) {
    		throw new Error("<Layout_create>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get back() {
    		throw new Error("<Layout_create>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set back(value) {
    		throw new Error("<Layout_create>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pieces/chat/Layout_mute.svelte generated by Svelte v3.53.1 */
    const file$e = "src/pieces/chat/Layout_mute.svelte";

    // (13:1) <Button bind:layout new_layout={back} my_class="back icon" my_title="go back {back}">
    function create_default_slot_2$2(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("back");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_2$2.name,
    		type: "slot",
    		source: "(13:1) <Button bind:layout new_layout={back} my_class=\\\"back icon\\\" my_title=\\\"go back {back}\\\">",
    		ctx
    	});

    	return block;
    }

    // (18:1) <Button my_class="user deactivate">
    function create_default_slot_1$2(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("<user>");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_1$2.name,
    		type: "slot",
    		source: "(18:1) <Button my_class=\\\"user deactivate\\\">",
    		ctx
    	});

    	return block;
    }

    // (23:1) <Button bind:layout new_layout="close" my_class="close icon">
    function create_default_slot$4(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("close");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot$4.name,
    		type: "slot",
    		source: "(23:1) <Button bind:layout new_layout=\\\"close\\\" my_class=\\\"close icon\\\">",
    		ctx
    	});

    	return block;
    }

    function create_fragment$f(ctx) {
    	let div2;
    	let button0;
    	let updating_layout;
    	let t0;
    	let button1;
    	let t1;
    	let button2;
    	let updating_layout_1;
    	let t2;
    	let div1;
    	let p0;
    	let t4;
    	let form;
    	let input0;
    	let t5;
    	let label0;
    	let p1;
    	let t7;
    	let div0;
    	let label1;
    	let p2;
    	let t9;
    	let select0;
    	let option0;
    	let option1;
    	let option2;
    	let option3;
    	let option4;
    	let option5;
    	let option6;
    	let option7;
    	let option8;
    	let option9;
    	let option10;
    	let option11;
    	let option12;
    	let option13;
    	let option14;
    	let option15;
    	let option16;
    	let option17;
    	let option18;
    	let option19;
    	let option20;
    	let option21;
    	let option22;
    	let option23;
    	let option24;
    	let option25;
    	let option26;
    	let option27;
    	let option28;
    	let option29;
    	let option30;
    	let option31;
    	let option32;
    	let option33;
    	let option34;
    	let option35;
    	let option36;
    	let option37;
    	let option38;
    	let option39;
    	let option40;
    	let option41;
    	let option42;
    	let option43;
    	let option44;
    	let option45;
    	let option46;
    	let option47;
    	let option48;
    	let t59;
    	let label2;
    	let p3;
    	let t61;
    	let select1;
    	let option49;
    	let option50;
    	let option51;
    	let option52;
    	let option53;
    	let option54;
    	let option55;
    	let option56;
    	let option57;
    	let option58;
    	let option59;
    	let option60;
    	let option61;
    	let option62;
    	let option63;
    	let option64;
    	let option65;
    	let option66;
    	let option67;
    	let option68;
    	let option69;
    	let option70;
    	let option71;
    	let option72;
    	let option73;
    	let option74;
    	let option75;
    	let option76;
    	let option77;
    	let option78;
    	let option79;
    	let option80;
    	let option81;
    	let option82;
    	let option83;
    	let option84;
    	let option85;
    	let option86;
    	let option87;
    	let option88;
    	let option89;
    	let option90;
    	let option91;
    	let option92;
    	let option93;
    	let option94;
    	let option95;
    	let option96;
    	let option97;
    	let t111;
    	let label3;
    	let p4;
    	let t113;
    	let select2;
    	let option98;
    	let option99;
    	let option100;
    	let option101;
    	let option102;
    	let option103;
    	let option104;
    	let option105;
    	let option106;
    	let option107;
    	let option108;
    	let option109;
    	let option110;
    	let option111;
    	let option112;
    	let option113;
    	let option114;
    	let option115;
    	let option116;
    	let option117;
    	let option118;
    	let option119;
    	let option120;
    	let option121;
    	let option122;
    	let option123;
    	let t140;
    	let input1;
    	let current;

    	function button0_layout_binding(value) {
    		/*button0_layout_binding*/ ctx[2](value);
    	}

    	let button0_props = {
    		new_layout: /*back*/ ctx[1],
    		my_class: "back icon",
    		my_title: "go back " + /*back*/ ctx[1],
    		$$slots: { default: [create_default_slot_2$2] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button0_props.layout = /*layout*/ ctx[0];
    	}

    	button0 = new Chat_button({ props: button0_props, $$inline: true });
    	binding_callbacks.push(() => bind(button0, 'layout', button0_layout_binding));

    	button1 = new Chat_button({
    			props: {
    				my_class: "user deactivate",
    				$$slots: { default: [create_default_slot_1$2] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	function button2_layout_binding(value) {
    		/*button2_layout_binding*/ ctx[3](value);
    	}

    	let button2_props = {
    		new_layout: "close",
    		my_class: "close icon",
    		$$slots: { default: [create_default_slot$4] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button2_props.layout = /*layout*/ ctx[0];
    	}

    	button2 = new Chat_button({ props: button2_props, $$inline: true });
    	binding_callbacks.push(() => bind(button2, 'layout', button2_layout_binding));

    	const block = {
    		c: function create() {
    			div2 = element("div");
    			create_component(button0.$$.fragment);
    			t0 = space();
    			create_component(button1.$$.fragment);
    			t1 = space();
    			create_component(button2.$$.fragment);
    			t2 = space();
    			div1 = element("div");
    			p0 = element("p");
    			p0.textContent = "mute this user for a time :";
    			t4 = space();
    			form = element("form");
    			input0 = element("input");
    			t5 = space();
    			label0 = element("label");
    			p1 = element("p");
    			p1.textContent = "forever";
    			t7 = space();
    			div0 = element("div");
    			label1 = element("label");
    			p2 = element("p");
    			p2.textContent = "minutes :";
    			t9 = space();
    			select0 = element("select");
    			option0 = element("option");
    			option0.textContent = "00";
    			option1 = element("option");
    			option1.textContent = "01";
    			option2 = element("option");
    			option2.textContent = "02";
    			option3 = element("option");
    			option3.textContent = "03";
    			option4 = element("option");
    			option4.textContent = "04";
    			option5 = element("option");
    			option5.textContent = "05";
    			option6 = element("option");
    			option6.textContent = "06";
    			option7 = element("option");
    			option7.textContent = "07";
    			option8 = element("option");
    			option8.textContent = "10";
    			option9 = element("option");
    			option9.textContent = "11";
    			option10 = element("option");
    			option10.textContent = "12";
    			option11 = element("option");
    			option11.textContent = "13";
    			option12 = element("option");
    			option12.textContent = "14";
    			option13 = element("option");
    			option13.textContent = "15";
    			option14 = element("option");
    			option14.textContent = "16";
    			option15 = element("option");
    			option15.textContent = "17";
    			option16 = element("option");
    			option16.textContent = "20";
    			option17 = element("option");
    			option17.textContent = "21";
    			option18 = element("option");
    			option18.textContent = "22";
    			option19 = element("option");
    			option19.textContent = "23";
    			option20 = element("option");
    			option20.textContent = "24";
    			option21 = element("option");
    			option21.textContent = "25";
    			option22 = element("option");
    			option22.textContent = "26";
    			option23 = element("option");
    			option23.textContent = "27";
    			option24 = element("option");
    			option24.textContent = "30";
    			option25 = element("option");
    			option25.textContent = "31";
    			option26 = element("option");
    			option26.textContent = "32";
    			option27 = element("option");
    			option27.textContent = "33";
    			option28 = element("option");
    			option28.textContent = "34";
    			option29 = element("option");
    			option29.textContent = "35";
    			option30 = element("option");
    			option30.textContent = "36";
    			option31 = element("option");
    			option31.textContent = "37";
    			option32 = element("option");
    			option32.textContent = "40";
    			option33 = element("option");
    			option33.textContent = "41";
    			option34 = element("option");
    			option34.textContent = "42";
    			option35 = element("option");
    			option35.textContent = "43";
    			option36 = element("option");
    			option36.textContent = "44";
    			option37 = element("option");
    			option37.textContent = "45";
    			option38 = element("option");
    			option38.textContent = "46";
    			option39 = element("option");
    			option39.textContent = "47";
    			option40 = element("option");
    			option40.textContent = "50";
    			option41 = element("option");
    			option41.textContent = "51";
    			option42 = element("option");
    			option42.textContent = "52";
    			option43 = element("option");
    			option43.textContent = "53";
    			option44 = element("option");
    			option44.textContent = "54";
    			option45 = element("option");
    			option45.textContent = "55";
    			option46 = element("option");
    			option46.textContent = "56";
    			option47 = element("option");
    			option47.textContent = "57";
    			option48 = element("option");
    			option48.textContent = "60";
    			t59 = space();
    			label2 = element("label");
    			p3 = element("p");
    			p3.textContent = "hours :";
    			t61 = space();
    			select1 = element("select");
    			option49 = element("option");
    			option49.textContent = "00";
    			option50 = element("option");
    			option50.textContent = "01";
    			option51 = element("option");
    			option51.textContent = "02";
    			option52 = element("option");
    			option52.textContent = "03";
    			option53 = element("option");
    			option53.textContent = "04";
    			option54 = element("option");
    			option54.textContent = "05";
    			option55 = element("option");
    			option55.textContent = "06";
    			option56 = element("option");
    			option56.textContent = "07";
    			option57 = element("option");
    			option57.textContent = "10";
    			option58 = element("option");
    			option58.textContent = "11";
    			option59 = element("option");
    			option59.textContent = "12";
    			option60 = element("option");
    			option60.textContent = "13";
    			option61 = element("option");
    			option61.textContent = "14";
    			option62 = element("option");
    			option62.textContent = "15";
    			option63 = element("option");
    			option63.textContent = "16";
    			option64 = element("option");
    			option64.textContent = "17";
    			option65 = element("option");
    			option65.textContent = "20";
    			option66 = element("option");
    			option66.textContent = "21";
    			option67 = element("option");
    			option67.textContent = "22";
    			option68 = element("option");
    			option68.textContent = "23";
    			option69 = element("option");
    			option69.textContent = "24";
    			option70 = element("option");
    			option70.textContent = "25";
    			option71 = element("option");
    			option71.textContent = "26";
    			option72 = element("option");
    			option72.textContent = "27";
    			option73 = element("option");
    			option73.textContent = "30";
    			option74 = element("option");
    			option74.textContent = "31";
    			option75 = element("option");
    			option75.textContent = "32";
    			option76 = element("option");
    			option76.textContent = "33";
    			option77 = element("option");
    			option77.textContent = "34";
    			option78 = element("option");
    			option78.textContent = "35";
    			option79 = element("option");
    			option79.textContent = "36";
    			option80 = element("option");
    			option80.textContent = "37";
    			option81 = element("option");
    			option81.textContent = "40";
    			option82 = element("option");
    			option82.textContent = "41";
    			option83 = element("option");
    			option83.textContent = "42";
    			option84 = element("option");
    			option84.textContent = "43";
    			option85 = element("option");
    			option85.textContent = "44";
    			option86 = element("option");
    			option86.textContent = "45";
    			option87 = element("option");
    			option87.textContent = "46";
    			option88 = element("option");
    			option88.textContent = "47";
    			option89 = element("option");
    			option89.textContent = "50";
    			option90 = element("option");
    			option90.textContent = "51";
    			option91 = element("option");
    			option91.textContent = "52";
    			option92 = element("option");
    			option92.textContent = "53";
    			option93 = element("option");
    			option93.textContent = "54";
    			option94 = element("option");
    			option94.textContent = "55";
    			option95 = element("option");
    			option95.textContent = "56";
    			option96 = element("option");
    			option96.textContent = "57";
    			option97 = element("option");
    			option97.textContent = "60";
    			t111 = space();
    			label3 = element("label");
    			p4 = element("p");
    			p4.textContent = "days :";
    			t113 = space();
    			select2 = element("select");
    			option98 = element("option");
    			option98.textContent = "00";
    			option99 = element("option");
    			option99.textContent = "01";
    			option100 = element("option");
    			option100.textContent = "02";
    			option101 = element("option");
    			option101.textContent = "03";
    			option102 = element("option");
    			option102.textContent = "04";
    			option103 = element("option");
    			option103.textContent = "05";
    			option104 = element("option");
    			option104.textContent = "06";
    			option105 = element("option");
    			option105.textContent = "07";
    			option106 = element("option");
    			option106.textContent = "10";
    			option107 = element("option");
    			option107.textContent = "11";
    			option108 = element("option");
    			option108.textContent = "12";
    			option109 = element("option");
    			option109.textContent = "13";
    			option110 = element("option");
    			option110.textContent = "14";
    			option111 = element("option");
    			option111.textContent = "15";
    			option112 = element("option");
    			option112.textContent = "16";
    			option113 = element("option");
    			option113.textContent = "17";
    			option114 = element("option");
    			option114.textContent = "20";
    			option115 = element("option");
    			option115.textContent = "21";
    			option116 = element("option");
    			option116.textContent = "22";
    			option117 = element("option");
    			option117.textContent = "23";
    			option118 = element("option");
    			option118.textContent = "24";
    			option119 = element("option");
    			option119.textContent = "25";
    			option120 = element("option");
    			option120.textContent = "26";
    			option121 = element("option");
    			option121.textContent = "27";
    			option122 = element("option");
    			option122.textContent = "30";
    			option123 = element("option");
    			option123.textContent = "31";
    			t140 = space();
    			input1 = element("input");
    			attr_dev(p0, "class", "__center");
    			add_location(p0, file$e, 30, 2, 522);
    			attr_dev(input0, "id", "chat_mute_forever");
    			attr_dev(input0, "class", "__check_change_next svelte-yo0any");
    			attr_dev(input0, "type", "checkbox");
    			add_location(input0, file$e, 33, 3, 606);
    			attr_dev(p1, "class", "svelte-yo0any");
    			add_location(p1, file$e, 34, 52, 734);
    			attr_dev(label0, "for", "chat_mute_forever");
    			attr_dev(label0, "class", "_checkbox svelte-yo0any");
    			add_location(label0, file$e, 34, 3, 685);
    			attr_dev(p2, "class", "svelte-yo0any");
    			add_location(p2, file$e, 38, 5, 863);
    			option0.__value = "01";
    			option0.value = option0.__value;
    			add_location(option0, file$e, 40, 6, 923);
    			option1.__value = "01";
    			option1.value = option1.__value;
    			add_location(option1, file$e, 41, 6, 960);
    			option2.__value = "02";
    			option2.value = option2.__value;
    			add_location(option2, file$e, 42, 6, 997);
    			option3.__value = "03";
    			option3.value = option3.__value;
    			add_location(option3, file$e, 43, 6, 1034);
    			option4.__value = "04";
    			option4.value = option4.__value;
    			add_location(option4, file$e, 44, 6, 1071);
    			option5.__value = "05";
    			option5.value = option5.__value;
    			add_location(option5, file$e, 45, 6, 1108);
    			option6.__value = "06";
    			option6.value = option6.__value;
    			add_location(option6, file$e, 46, 6, 1145);
    			option7.__value = "07";
    			option7.value = option7.__value;
    			add_location(option7, file$e, 47, 6, 1182);
    			option8.__value = "10";
    			option8.value = option8.__value;
    			add_location(option8, file$e, 48, 6, 1219);
    			option9.__value = "11";
    			option9.value = option9.__value;
    			add_location(option9, file$e, 49, 6, 1256);
    			option10.__value = "12";
    			option10.value = option10.__value;
    			add_location(option10, file$e, 50, 6, 1293);
    			option11.__value = "13";
    			option11.value = option11.__value;
    			add_location(option11, file$e, 51, 6, 1330);
    			option12.__value = "14";
    			option12.value = option12.__value;
    			add_location(option12, file$e, 52, 6, 1367);
    			option13.__value = "15";
    			option13.value = option13.__value;
    			add_location(option13, file$e, 53, 6, 1404);
    			option14.__value = "16";
    			option14.value = option14.__value;
    			add_location(option14, file$e, 54, 6, 1441);
    			option15.__value = "17";
    			option15.value = option15.__value;
    			add_location(option15, file$e, 55, 6, 1478);
    			option16.__value = "20";
    			option16.value = option16.__value;
    			add_location(option16, file$e, 56, 6, 1515);
    			option17.__value = "21";
    			option17.value = option17.__value;
    			add_location(option17, file$e, 57, 6, 1552);
    			option18.__value = "22";
    			option18.value = option18.__value;
    			add_location(option18, file$e, 58, 6, 1589);
    			option19.__value = "23";
    			option19.value = option19.__value;
    			add_location(option19, file$e, 59, 6, 1626);
    			option20.__value = "24";
    			option20.value = option20.__value;
    			add_location(option20, file$e, 60, 6, 1663);
    			option21.__value = "25";
    			option21.value = option21.__value;
    			add_location(option21, file$e, 61, 6, 1700);
    			option22.__value = "26";
    			option22.value = option22.__value;
    			add_location(option22, file$e, 62, 6, 1737);
    			option23.__value = "27";
    			option23.value = option23.__value;
    			add_location(option23, file$e, 63, 6, 1774);
    			option24.__value = "30";
    			option24.value = option24.__value;
    			add_location(option24, file$e, 64, 6, 1811);
    			option25.__value = "31";
    			option25.value = option25.__value;
    			add_location(option25, file$e, 65, 6, 1848);
    			option26.__value = "32";
    			option26.value = option26.__value;
    			add_location(option26, file$e, 66, 6, 1885);
    			option27.__value = "33";
    			option27.value = option27.__value;
    			add_location(option27, file$e, 67, 6, 1922);
    			option28.__value = "34";
    			option28.value = option28.__value;
    			add_location(option28, file$e, 68, 6, 1959);
    			option29.__value = "35";
    			option29.value = option29.__value;
    			add_location(option29, file$e, 69, 6, 1996);
    			option30.__value = "36";
    			option30.value = option30.__value;
    			add_location(option30, file$e, 70, 6, 2033);
    			option31.__value = "37";
    			option31.value = option31.__value;
    			add_location(option31, file$e, 71, 6, 2070);
    			option32.__value = "40";
    			option32.value = option32.__value;
    			add_location(option32, file$e, 72, 6, 2107);
    			option33.__value = "41";
    			option33.value = option33.__value;
    			add_location(option33, file$e, 73, 6, 2144);
    			option34.__value = "42";
    			option34.value = option34.__value;
    			add_location(option34, file$e, 74, 6, 2181);
    			option35.__value = "43";
    			option35.value = option35.__value;
    			add_location(option35, file$e, 75, 6, 2218);
    			option36.__value = "44";
    			option36.value = option36.__value;
    			add_location(option36, file$e, 76, 6, 2255);
    			option37.__value = "45";
    			option37.value = option37.__value;
    			add_location(option37, file$e, 77, 6, 2292);
    			option38.__value = "46";
    			option38.value = option38.__value;
    			add_location(option38, file$e, 78, 6, 2329);
    			option39.__value = "47";
    			option39.value = option39.__value;
    			add_location(option39, file$e, 79, 6, 2366);
    			option40.__value = "50";
    			option40.value = option40.__value;
    			add_location(option40, file$e, 80, 6, 2403);
    			option41.__value = "51";
    			option41.value = option41.__value;
    			add_location(option41, file$e, 81, 6, 2440);
    			option42.__value = "52";
    			option42.value = option42.__value;
    			add_location(option42, file$e, 82, 6, 2477);
    			option43.__value = "53";
    			option43.value = option43.__value;
    			add_location(option43, file$e, 83, 6, 2514);
    			option44.__value = "54";
    			option44.value = option44.__value;
    			add_location(option44, file$e, 84, 6, 2551);
    			option45.__value = "55";
    			option45.value = option45.__value;
    			add_location(option45, file$e, 85, 6, 2588);
    			option46.__value = "56";
    			option46.value = option46.__value;
    			add_location(option46, file$e, 86, 6, 2625);
    			option47.__value = "57";
    			option47.value = option47.__value;
    			add_location(option47, file$e, 87, 6, 2662);
    			option48.__value = "60";
    			option48.value = option48.__value;
    			add_location(option48, file$e, 88, 6, 2699);
    			attr_dev(select0, "id", "chat_mute_minutes");
    			attr_dev(select0, "class", "svelte-yo0any");
    			add_location(select0, file$e, 39, 5, 885);
    			attr_dev(label1, "for", "chat_mute_minutes");
    			attr_dev(label1, "class", "_select svelte-yo0any");
    			add_location(label1, file$e, 37, 4, 810);
    			attr_dev(p3, "class", "svelte-yo0any");
    			add_location(p3, file$e, 93, 5, 2832);
    			option49.__value = "01";
    			option49.value = option49.__value;
    			add_location(option49, file$e, 95, 6, 2888);
    			option50.__value = "01";
    			option50.value = option50.__value;
    			add_location(option50, file$e, 96, 6, 2925);
    			option51.__value = "02";
    			option51.value = option51.__value;
    			add_location(option51, file$e, 97, 6, 2962);
    			option52.__value = "03";
    			option52.value = option52.__value;
    			add_location(option52, file$e, 98, 6, 2999);
    			option53.__value = "04";
    			option53.value = option53.__value;
    			add_location(option53, file$e, 99, 6, 3036);
    			option54.__value = "05";
    			option54.value = option54.__value;
    			add_location(option54, file$e, 100, 6, 3073);
    			option55.__value = "06";
    			option55.value = option55.__value;
    			add_location(option55, file$e, 101, 6, 3110);
    			option56.__value = "07";
    			option56.value = option56.__value;
    			add_location(option56, file$e, 102, 6, 3147);
    			option57.__value = "10";
    			option57.value = option57.__value;
    			add_location(option57, file$e, 103, 6, 3184);
    			option58.__value = "11";
    			option58.value = option58.__value;
    			add_location(option58, file$e, 104, 6, 3221);
    			option59.__value = "12";
    			option59.value = option59.__value;
    			add_location(option59, file$e, 105, 6, 3258);
    			option60.__value = "13";
    			option60.value = option60.__value;
    			add_location(option60, file$e, 106, 6, 3295);
    			option61.__value = "14";
    			option61.value = option61.__value;
    			add_location(option61, file$e, 107, 6, 3332);
    			option62.__value = "15";
    			option62.value = option62.__value;
    			add_location(option62, file$e, 108, 6, 3369);
    			option63.__value = "16";
    			option63.value = option63.__value;
    			add_location(option63, file$e, 109, 6, 3406);
    			option64.__value = "17";
    			option64.value = option64.__value;
    			add_location(option64, file$e, 110, 6, 3443);
    			option65.__value = "20";
    			option65.value = option65.__value;
    			add_location(option65, file$e, 111, 6, 3480);
    			option66.__value = "21";
    			option66.value = option66.__value;
    			add_location(option66, file$e, 112, 6, 3517);
    			option67.__value = "22";
    			option67.value = option67.__value;
    			add_location(option67, file$e, 113, 6, 3554);
    			option68.__value = "23";
    			option68.value = option68.__value;
    			add_location(option68, file$e, 114, 6, 3591);
    			option69.__value = "24";
    			option69.value = option69.__value;
    			add_location(option69, file$e, 115, 6, 3628);
    			option70.__value = "25";
    			option70.value = option70.__value;
    			add_location(option70, file$e, 116, 6, 3665);
    			option71.__value = "26";
    			option71.value = option71.__value;
    			add_location(option71, file$e, 117, 6, 3702);
    			option72.__value = "27";
    			option72.value = option72.__value;
    			add_location(option72, file$e, 118, 6, 3739);
    			option73.__value = "30";
    			option73.value = option73.__value;
    			add_location(option73, file$e, 119, 6, 3776);
    			option74.__value = "31";
    			option74.value = option74.__value;
    			add_location(option74, file$e, 120, 6, 3813);
    			option75.__value = "32";
    			option75.value = option75.__value;
    			add_location(option75, file$e, 121, 6, 3850);
    			option76.__value = "33";
    			option76.value = option76.__value;
    			add_location(option76, file$e, 122, 6, 3887);
    			option77.__value = "34";
    			option77.value = option77.__value;
    			add_location(option77, file$e, 123, 6, 3924);
    			option78.__value = "35";
    			option78.value = option78.__value;
    			add_location(option78, file$e, 124, 6, 3961);
    			option79.__value = "36";
    			option79.value = option79.__value;
    			add_location(option79, file$e, 125, 6, 3998);
    			option80.__value = "37";
    			option80.value = option80.__value;
    			add_location(option80, file$e, 126, 6, 4035);
    			option81.__value = "40";
    			option81.value = option81.__value;
    			add_location(option81, file$e, 127, 6, 4072);
    			option82.__value = "41";
    			option82.value = option82.__value;
    			add_location(option82, file$e, 128, 6, 4109);
    			option83.__value = "42";
    			option83.value = option83.__value;
    			add_location(option83, file$e, 129, 6, 4146);
    			option84.__value = "43";
    			option84.value = option84.__value;
    			add_location(option84, file$e, 130, 6, 4183);
    			option85.__value = "44";
    			option85.value = option85.__value;
    			add_location(option85, file$e, 131, 6, 4220);
    			option86.__value = "45";
    			option86.value = option86.__value;
    			add_location(option86, file$e, 132, 6, 4257);
    			option87.__value = "46";
    			option87.value = option87.__value;
    			add_location(option87, file$e, 133, 6, 4294);
    			option88.__value = "47";
    			option88.value = option88.__value;
    			add_location(option88, file$e, 134, 6, 4331);
    			option89.__value = "50";
    			option89.value = option89.__value;
    			add_location(option89, file$e, 135, 6, 4368);
    			option90.__value = "51";
    			option90.value = option90.__value;
    			add_location(option90, file$e, 136, 6, 4405);
    			option91.__value = "52";
    			option91.value = option91.__value;
    			add_location(option91, file$e, 137, 6, 4442);
    			option92.__value = "53";
    			option92.value = option92.__value;
    			add_location(option92, file$e, 138, 6, 4479);
    			option93.__value = "54";
    			option93.value = option93.__value;
    			add_location(option93, file$e, 139, 6, 4516);
    			option94.__value = "55";
    			option94.value = option94.__value;
    			add_location(option94, file$e, 140, 6, 4553);
    			option95.__value = "56";
    			option95.value = option95.__value;
    			add_location(option95, file$e, 141, 6, 4590);
    			option96.__value = "57";
    			option96.value = option96.__value;
    			add_location(option96, file$e, 142, 6, 4627);
    			option97.__value = "60";
    			option97.value = option97.__value;
    			add_location(option97, file$e, 143, 6, 4664);
    			attr_dev(select1, "id", "chat_mute_hours");
    			attr_dev(select1, "class", "svelte-yo0any");
    			add_location(select1, file$e, 94, 5, 2852);
    			attr_dev(label2, "for", "chat_mute_hours");
    			attr_dev(label2, "class", "_select svelte-yo0any");
    			add_location(label2, file$e, 92, 4, 2781);
    			attr_dev(p4, "class", "svelte-yo0any");
    			add_location(p4, file$e, 148, 5, 4795);
    			option98.__value = "00";
    			option98.value = option98.__value;
    			add_location(option98, file$e, 150, 6, 4849);
    			option99.__value = "01";
    			option99.value = option99.__value;
    			add_location(option99, file$e, 151, 6, 4886);
    			option100.__value = "02";
    			option100.value = option100.__value;
    			add_location(option100, file$e, 152, 6, 4923);
    			option101.__value = "03";
    			option101.value = option101.__value;
    			add_location(option101, file$e, 153, 6, 4960);
    			option102.__value = "04";
    			option102.value = option102.__value;
    			add_location(option102, file$e, 154, 6, 4997);
    			option103.__value = "05";
    			option103.value = option103.__value;
    			add_location(option103, file$e, 155, 6, 5034);
    			option104.__value = "06";
    			option104.value = option104.__value;
    			add_location(option104, file$e, 156, 6, 5071);
    			option105.__value = "07";
    			option105.value = option105.__value;
    			add_location(option105, file$e, 157, 6, 5108);
    			option106.__value = "10";
    			option106.value = option106.__value;
    			add_location(option106, file$e, 158, 6, 5145);
    			option107.__value = "11";
    			option107.value = option107.__value;
    			add_location(option107, file$e, 159, 6, 5182);
    			option108.__value = "12";
    			option108.value = option108.__value;
    			add_location(option108, file$e, 160, 6, 5219);
    			option109.__value = "13";
    			option109.value = option109.__value;
    			add_location(option109, file$e, 161, 6, 5256);
    			option110.__value = "14";
    			option110.value = option110.__value;
    			add_location(option110, file$e, 162, 6, 5293);
    			option111.__value = "15";
    			option111.value = option111.__value;
    			add_location(option111, file$e, 163, 6, 5330);
    			option112.__value = "16";
    			option112.value = option112.__value;
    			add_location(option112, file$e, 164, 6, 5367);
    			option113.__value = "17";
    			option113.value = option113.__value;
    			add_location(option113, file$e, 165, 6, 5404);
    			option114.__value = "20";
    			option114.value = option114.__value;
    			add_location(option114, file$e, 166, 6, 5441);
    			option115.__value = "21";
    			option115.value = option115.__value;
    			add_location(option115, file$e, 167, 6, 5478);
    			option116.__value = "22";
    			option116.value = option116.__value;
    			add_location(option116, file$e, 168, 6, 5515);
    			option117.__value = "23";
    			option117.value = option117.__value;
    			add_location(option117, file$e, 169, 6, 5552);
    			option118.__value = "24";
    			option118.value = option118.__value;
    			add_location(option118, file$e, 170, 6, 5589);
    			option119.__value = "25";
    			option119.value = option119.__value;
    			add_location(option119, file$e, 171, 6, 5626);
    			option120.__value = "26";
    			option120.value = option120.__value;
    			add_location(option120, file$e, 172, 6, 5663);
    			option121.__value = "27";
    			option121.value = option121.__value;
    			add_location(option121, file$e, 173, 6, 5700);
    			option122.__value = "30";
    			option122.value = option122.__value;
    			add_location(option122, file$e, 174, 6, 5737);
    			option123.__value = "31";
    			option123.value = option123.__value;
    			add_location(option123, file$e, 175, 6, 5774);
    			attr_dev(select2, "id", "chat_mute_days");
    			attr_dev(select2, "class", "svelte-yo0any");
    			add_location(select2, file$e, 149, 5, 4814);
    			attr_dev(label3, "for", "chat_mute_days");
    			attr_dev(label3, "class", "_select svelte-yo0any");
    			add_location(label3, file$e, 147, 4, 4745);
    			attr_dev(div0, "class", "__to_block");
    			add_location(div0, file$e, 35, 3, 760);
    			attr_dev(input1, "type", "submit");
    			input1.value = "⮡";
    			attr_dev(input1, "class", "svelte-yo0any");
    			add_location(input1, file$e, 179, 3, 5846);
    			attr_dev(form, "class", "svelte-yo0any");
    			add_location(form, file$e, 31, 2, 576);
    			attr_dev(div1, "class", "panel panel_mute __border_top");
    			add_location(div1, file$e, 29, 1, 476);
    			attr_dev(div2, "class", "grid_box svelte-yo0any");
    			add_location(div2, file$e, 9, 0, 115);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div2, anchor);
    			mount_component(button0, div2, null);
    			append_dev(div2, t0);
    			mount_component(button1, div2, null);
    			append_dev(div2, t1);
    			mount_component(button2, div2, null);
    			append_dev(div2, t2);
    			append_dev(div2, div1);
    			append_dev(div1, p0);
    			append_dev(div1, t4);
    			append_dev(div1, form);
    			append_dev(form, input0);
    			append_dev(form, t5);
    			append_dev(form, label0);
    			append_dev(label0, p1);
    			append_dev(form, t7);
    			append_dev(form, div0);
    			append_dev(div0, label1);
    			append_dev(label1, p2);
    			append_dev(label1, t9);
    			append_dev(label1, select0);
    			append_dev(select0, option0);
    			append_dev(select0, option1);
    			append_dev(select0, option2);
    			append_dev(select0, option3);
    			append_dev(select0, option4);
    			append_dev(select0, option5);
    			append_dev(select0, option6);
    			append_dev(select0, option7);
    			append_dev(select0, option8);
    			append_dev(select0, option9);
    			append_dev(select0, option10);
    			append_dev(select0, option11);
    			append_dev(select0, option12);
    			append_dev(select0, option13);
    			append_dev(select0, option14);
    			append_dev(select0, option15);
    			append_dev(select0, option16);
    			append_dev(select0, option17);
    			append_dev(select0, option18);
    			append_dev(select0, option19);
    			append_dev(select0, option20);
    			append_dev(select0, option21);
    			append_dev(select0, option22);
    			append_dev(select0, option23);
    			append_dev(select0, option24);
    			append_dev(select0, option25);
    			append_dev(select0, option26);
    			append_dev(select0, option27);
    			append_dev(select0, option28);
    			append_dev(select0, option29);
    			append_dev(select0, option30);
    			append_dev(select0, option31);
    			append_dev(select0, option32);
    			append_dev(select0, option33);
    			append_dev(select0, option34);
    			append_dev(select0, option35);
    			append_dev(select0, option36);
    			append_dev(select0, option37);
    			append_dev(select0, option38);
    			append_dev(select0, option39);
    			append_dev(select0, option40);
    			append_dev(select0, option41);
    			append_dev(select0, option42);
    			append_dev(select0, option43);
    			append_dev(select0, option44);
    			append_dev(select0, option45);
    			append_dev(select0, option46);
    			append_dev(select0, option47);
    			append_dev(select0, option48);
    			append_dev(div0, t59);
    			append_dev(div0, label2);
    			append_dev(label2, p3);
    			append_dev(label2, t61);
    			append_dev(label2, select1);
    			append_dev(select1, option49);
    			append_dev(select1, option50);
    			append_dev(select1, option51);
    			append_dev(select1, option52);
    			append_dev(select1, option53);
    			append_dev(select1, option54);
    			append_dev(select1, option55);
    			append_dev(select1, option56);
    			append_dev(select1, option57);
    			append_dev(select1, option58);
    			append_dev(select1, option59);
    			append_dev(select1, option60);
    			append_dev(select1, option61);
    			append_dev(select1, option62);
    			append_dev(select1, option63);
    			append_dev(select1, option64);
    			append_dev(select1, option65);
    			append_dev(select1, option66);
    			append_dev(select1, option67);
    			append_dev(select1, option68);
    			append_dev(select1, option69);
    			append_dev(select1, option70);
    			append_dev(select1, option71);
    			append_dev(select1, option72);
    			append_dev(select1, option73);
    			append_dev(select1, option74);
    			append_dev(select1, option75);
    			append_dev(select1, option76);
    			append_dev(select1, option77);
    			append_dev(select1, option78);
    			append_dev(select1, option79);
    			append_dev(select1, option80);
    			append_dev(select1, option81);
    			append_dev(select1, option82);
    			append_dev(select1, option83);
    			append_dev(select1, option84);
    			append_dev(select1, option85);
    			append_dev(select1, option86);
    			append_dev(select1, option87);
    			append_dev(select1, option88);
    			append_dev(select1, option89);
    			append_dev(select1, option90);
    			append_dev(select1, option91);
    			append_dev(select1, option92);
    			append_dev(select1, option93);
    			append_dev(select1, option94);
    			append_dev(select1, option95);
    			append_dev(select1, option96);
    			append_dev(select1, option97);
    			append_dev(div0, t111);
    			append_dev(div0, label3);
    			append_dev(label3, p4);
    			append_dev(label3, t113);
    			append_dev(label3, select2);
    			append_dev(select2, option98);
    			append_dev(select2, option99);
    			append_dev(select2, option100);
    			append_dev(select2, option101);
    			append_dev(select2, option102);
    			append_dev(select2, option103);
    			append_dev(select2, option104);
    			append_dev(select2, option105);
    			append_dev(select2, option106);
    			append_dev(select2, option107);
    			append_dev(select2, option108);
    			append_dev(select2, option109);
    			append_dev(select2, option110);
    			append_dev(select2, option111);
    			append_dev(select2, option112);
    			append_dev(select2, option113);
    			append_dev(select2, option114);
    			append_dev(select2, option115);
    			append_dev(select2, option116);
    			append_dev(select2, option117);
    			append_dev(select2, option118);
    			append_dev(select2, option119);
    			append_dev(select2, option120);
    			append_dev(select2, option121);
    			append_dev(select2, option122);
    			append_dev(select2, option123);
    			append_dev(form, t140);
    			append_dev(form, input1);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			const button0_changes = {};
    			if (dirty & /*back*/ 2) button0_changes.new_layout = /*back*/ ctx[1];
    			if (dirty & /*back*/ 2) button0_changes.my_title = "go back " + /*back*/ ctx[1];

    			if (dirty & /*$$scope*/ 16) {
    				button0_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout && dirty & /*layout*/ 1) {
    				updating_layout = true;
    				button0_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout = false);
    			}

    			button0.$set(button0_changes);
    			const button1_changes = {};

    			if (dirty & /*$$scope*/ 16) {
    				button1_changes.$$scope = { dirty, ctx };
    			}

    			button1.$set(button1_changes);
    			const button2_changes = {};

    			if (dirty & /*$$scope*/ 16) {
    				button2_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_1 && dirty & /*layout*/ 1) {
    				updating_layout_1 = true;
    				button2_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_1 = false);
    			}

    			button2.$set(button2_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button0.$$.fragment, local);
    			transition_in(button1.$$.fragment, local);
    			transition_in(button2.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button0.$$.fragment, local);
    			transition_out(button1.$$.fragment, local);
    			transition_out(button2.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div2);
    			destroy_component(button0);
    			destroy_component(button1);
    			destroy_component(button2);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$f.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$f($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Layout_mute', slots, []);
    	let { layout = "" } = $$props;
    	let { back = "" } = $$props;
    	const writable_props = ['layout', 'back'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Layout_mute> was created with unknown prop '${key}'`);
    	});

    	function button0_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button2_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	$$self.$$set = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	$$self.$capture_state = () => ({ Button: Chat_button, layout, back });

    	$$self.$inject_state = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [layout, back, button0_layout_binding, button2_layout_binding];
    }

    class Layout_mute extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$f, create_fragment$f, safe_not_equal, { layout: 0, back: 1 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Layout_mute",
    			options,
    			id: create_fragment$f.name
    		});
    	}

    	get layout() {
    		throw new Error("<Layout_mute>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set layout(value) {
    		throw new Error("<Layout_mute>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get back() {
    		throw new Error("<Layout_mute>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set back(value) {
    		throw new Error("<Layout_mute>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pieces/chat/Layout_user.svelte generated by Svelte v3.53.1 */
    const file$d = "src/pieces/chat/Layout_user.svelte";

    // (17:1) <Button bind:layout new_layout={back} my_class="back icon" my_title="go back {back}">
    function create_default_slot_8(ctx) {
    	let t;

    	const block_1 = {
    		c: function create() {
    			t = text("back");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block: block_1,
    		id: create_default_slot_8.name,
    		type: "slot",
    		source: "(17:1) <Button bind:layout new_layout={back} my_class=\\\"back icon\\\" my_title=\\\"go back {back}\\\">",
    		ctx
    	});

    	return block_1;
    }

    // (22:1) <Button my_class="user deactivate">
    function create_default_slot_7(ctx) {
    	let t;

    	const block_1 = {
    		c: function create() {
    			t = text("<user>");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block: block_1,
    		id: create_default_slot_7.name,
    		type: "slot",
    		source: "(22:1) <Button my_class=\\\"user deactivate\\\">",
    		ctx
    	});

    	return block_1;
    }

    // (27:1) <Button bind:layout new_layout="close" my_class="close icon">
    function create_default_slot_6(ctx) {
    	let t;

    	const block_1 = {
    		c: function create() {
    			t = text("close");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block: block_1,
    		id: create_default_slot_6.name,
    		type: "slot",
    		source: "(27:1) <Button bind:layout new_layout=\\\"close\\\" my_class=\\\"close icon\\\">",
    		ctx
    	});

    	return block_1;
    }

    // (32:1) {#if back === "room_set"}
    function create_if_block_1$2(ctx) {
    	let button;
    	let current;

    	button = new Chat_button({
    			props: {
    				my_class: "room_name deactivate __border_top",
    				$$slots: { default: [create_default_slot_5] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	const block_1 = {
    		c: function create() {
    			create_component(button.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(button, target, anchor);
    			current = true;
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(button, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block: block_1,
    		id: create_if_block_1$2.name,
    		type: "if",
    		source: "(32:1) {#if back === \\\"room_set\\\"}",
    		ctx
    	});

    	return block_1;
    }

    // (33:2) <Button my_class="room_name deactivate __border_top">
    function create_default_slot_5(ctx) {
    	let t;

    	const block_1 = {
    		c: function create() {
    			t = text("<room_name>");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block: block_1,
    		id: create_default_slot_5.name,
    		type: "slot",
    		source: "(33:2) <Button my_class=\\\"room_name deactivate __border_top\\\">",
    		ctx
    	});

    	return block_1;
    }

    // (41:2) <Button>
    function create_default_slot_4(ctx) {
    	let t;

    	const block_1 = {
    		c: function create() {
    			t = text("view profile");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block: block_1,
    		id: create_default_slot_4.name,
    		type: "slot",
    		source: "(41:2) <Button>",
    		ctx
    	});

    	return block_1;
    }

    // (44:2) <Button>
    function create_default_slot_3$1(ctx) {
    	let t;

    	const block_1 = {
    		c: function create() {
    			t = text("game invitation");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block: block_1,
    		id: create_default_slot_3$1.name,
    		type: "slot",
    		source: "(44:2) <Button>",
    		ctx
    	});

    	return block_1;
    }

    // (47:2) <Button>
    function create_default_slot_2$1(ctx) {
    	let t;

    	const block_1 = {
    		c: function create() {
    			t = text(/*block*/ ctx[3]);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		p: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block: block_1,
    		id: create_default_slot_2$1.name,
    		type: "slot",
    		source: "(47:2) <Button>",
    		ctx
    	});

    	return block_1;
    }

    // (51:2) {#if back === "room_set"}
    function create_if_block$7(ctx) {
    	let button0;
    	let t;
    	let button1;
    	let current;

    	button0 = new Chat_button({
    			props: {
    				$$slots: { default: [create_default_slot_1$1] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	button1 = new Chat_button({
    			props: {
    				$$slots: { default: [create_default_slot$3] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	const block_1 = {
    		c: function create() {
    			create_component(button0.$$.fragment);
    			t = space();
    			create_component(button1.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(button0, target, anchor);
    			insert_dev(target, t, anchor);
    			mount_component(button1, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const button0_changes = {};

    			if (dirty & /*$$scope*/ 64) {
    				button0_changes.$$scope = { dirty, ctx };
    			}

    			button0.$set(button0_changes);
    			const button1_changes = {};

    			if (dirty & /*$$scope*/ 64) {
    				button1_changes.$$scope = { dirty, ctx };
    			}

    			button1.$set(button1_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button0.$$.fragment, local);
    			transition_in(button1.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button0.$$.fragment, local);
    			transition_out(button1.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(button0, detaching);
    			if (detaching) detach_dev(t);
    			destroy_component(button1, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block: block_1,
    		id: create_if_block$7.name,
    		type: "if",
    		source: "(51:2) {#if back === \\\"room_set\\\"}",
    		ctx
    	});

    	return block_1;
    }

    // (52:3) <Button>
    function create_default_slot_1$1(ctx) {
    	let t;

    	const block_1 = {
    		c: function create() {
    			t = text("make admin");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block: block_1,
    		id: create_default_slot_1$1.name,
    		type: "slot",
    		source: "(52:3) <Button>",
    		ctx
    	});

    	return block_1;
    }

    // (55:3) <Button>
    function create_default_slot$3(ctx) {
    	let t;

    	const block_1 = {
    		c: function create() {
    			t = text(/*mute*/ ctx[2]);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		p: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block: block_1,
    		id: create_default_slot$3.name,
    		type: "slot",
    		source: "(55:3) <Button>",
    		ctx
    	});

    	return block_1;
    }

    function create_fragment$e(ctx) {
    	let div1;
    	let button0;
    	let updating_layout;
    	let t0;
    	let button1;
    	let t1;
    	let button2;
    	let updating_layout_1;
    	let t2;
    	let t3;
    	let div0;
    	let p;
    	let t5;
    	let button3;
    	let t6;
    	let button4;
    	let t7;
    	let button5;
    	let t8;
    	let current;

    	function button0_layout_binding(value) {
    		/*button0_layout_binding*/ ctx[4](value);
    	}

    	let button0_props = {
    		new_layout: /*back*/ ctx[1],
    		my_class: "back icon",
    		my_title: "go back " + /*back*/ ctx[1],
    		$$slots: { default: [create_default_slot_8] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button0_props.layout = /*layout*/ ctx[0];
    	}

    	button0 = new Chat_button({ props: button0_props, $$inline: true });
    	binding_callbacks.push(() => bind(button0, 'layout', button0_layout_binding));

    	button1 = new Chat_button({
    			props: {
    				my_class: "user deactivate",
    				$$slots: { default: [create_default_slot_7] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	function button2_layout_binding(value) {
    		/*button2_layout_binding*/ ctx[5](value);
    	}

    	let button2_props = {
    		new_layout: "close",
    		my_class: "close icon",
    		$$slots: { default: [create_default_slot_6] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[0] !== void 0) {
    		button2_props.layout = /*layout*/ ctx[0];
    	}

    	button2 = new Chat_button({ props: button2_props, $$inline: true });
    	binding_callbacks.push(() => bind(button2, 'layout', button2_layout_binding));
    	let if_block0 = /*back*/ ctx[1] === "room_set" && create_if_block_1$2(ctx);

    	button3 = new Chat_button({
    			props: {
    				$$slots: { default: [create_default_slot_4] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	button4 = new Chat_button({
    			props: {
    				$$slots: { default: [create_default_slot_3$1] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	button5 = new Chat_button({
    			props: {
    				$$slots: { default: [create_default_slot_2$1] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	let if_block1 = /*back*/ ctx[1] === "room_set" && create_if_block$7(ctx);

    	const block_1 = {
    		c: function create() {
    			div1 = element("div");
    			create_component(button0.$$.fragment);
    			t0 = space();
    			create_component(button1.$$.fragment);
    			t1 = space();
    			create_component(button2.$$.fragment);
    			t2 = space();
    			if (if_block0) if_block0.c();
    			t3 = space();
    			div0 = element("div");
    			p = element("p");
    			p.textContent = "user options :";
    			t5 = space();
    			create_component(button3.$$.fragment);
    			t6 = space();
    			create_component(button4.$$.fragment);
    			t7 = space();
    			create_component(button5.$$.fragment);
    			t8 = space();
    			if (if_block1) if_block1.c();
    			attr_dev(p, "class", "__center");
    			add_location(p, file$d, 39, 2, 694);
    			attr_dev(div0, "class", "panel panel_user __border_top svelte-1fj8iha");
    			add_location(div0, file$d, 38, 1, 648);
    			attr_dev(div1, "class", "grid_box svelte-1fj8iha");
    			add_location(div1, file$d, 13, 0, 159);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div1, anchor);
    			mount_component(button0, div1, null);
    			append_dev(div1, t0);
    			mount_component(button1, div1, null);
    			append_dev(div1, t1);
    			mount_component(button2, div1, null);
    			append_dev(div1, t2);
    			if (if_block0) if_block0.m(div1, null);
    			append_dev(div1, t3);
    			append_dev(div1, div0);
    			append_dev(div0, p);
    			append_dev(div0, t5);
    			mount_component(button3, div0, null);
    			append_dev(div0, t6);
    			mount_component(button4, div0, null);
    			append_dev(div0, t7);
    			mount_component(button5, div0, null);
    			append_dev(div0, t8);
    			if (if_block1) if_block1.m(div0, null);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			const button0_changes = {};
    			if (dirty & /*back*/ 2) button0_changes.new_layout = /*back*/ ctx[1];
    			if (dirty & /*back*/ 2) button0_changes.my_title = "go back " + /*back*/ ctx[1];

    			if (dirty & /*$$scope*/ 64) {
    				button0_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout && dirty & /*layout*/ 1) {
    				updating_layout = true;
    				button0_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout = false);
    			}

    			button0.$set(button0_changes);
    			const button1_changes = {};

    			if (dirty & /*$$scope*/ 64) {
    				button1_changes.$$scope = { dirty, ctx };
    			}

    			button1.$set(button1_changes);
    			const button2_changes = {};

    			if (dirty & /*$$scope*/ 64) {
    				button2_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout_1 && dirty & /*layout*/ 1) {
    				updating_layout_1 = true;
    				button2_changes.layout = /*layout*/ ctx[0];
    				add_flush_callback(() => updating_layout_1 = false);
    			}

    			button2.$set(button2_changes);

    			if (/*back*/ ctx[1] === "room_set") {
    				if (if_block0) {
    					if (dirty & /*back*/ 2) {
    						transition_in(if_block0, 1);
    					}
    				} else {
    					if_block0 = create_if_block_1$2(ctx);
    					if_block0.c();
    					transition_in(if_block0, 1);
    					if_block0.m(div1, t3);
    				}
    			} else if (if_block0) {
    				group_outros();

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

    				check_outros();
    			}

    			const button3_changes = {};

    			if (dirty & /*$$scope*/ 64) {
    				button3_changes.$$scope = { dirty, ctx };
    			}

    			button3.$set(button3_changes);
    			const button4_changes = {};

    			if (dirty & /*$$scope*/ 64) {
    				button4_changes.$$scope = { dirty, ctx };
    			}

    			button4.$set(button4_changes);
    			const button5_changes = {};

    			if (dirty & /*$$scope*/ 64) {
    				button5_changes.$$scope = { dirty, ctx };
    			}

    			button5.$set(button5_changes);

    			if (/*back*/ ctx[1] === "room_set") {
    				if (if_block1) {
    					if_block1.p(ctx, dirty);

    					if (dirty & /*back*/ 2) {
    						transition_in(if_block1, 1);
    					}
    				} else {
    					if_block1 = create_if_block$7(ctx);
    					if_block1.c();
    					transition_in(if_block1, 1);
    					if_block1.m(div0, null);
    				}
    			} else if (if_block1) {
    				group_outros();

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

    				check_outros();
    			}
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button0.$$.fragment, local);
    			transition_in(button1.$$.fragment, local);
    			transition_in(button2.$$.fragment, local);
    			transition_in(if_block0);
    			transition_in(button3.$$.fragment, local);
    			transition_in(button4.$$.fragment, local);
    			transition_in(button5.$$.fragment, local);
    			transition_in(if_block1);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button0.$$.fragment, local);
    			transition_out(button1.$$.fragment, local);
    			transition_out(button2.$$.fragment, local);
    			transition_out(if_block0);
    			transition_out(button3.$$.fragment, local);
    			transition_out(button4.$$.fragment, local);
    			transition_out(button5.$$.fragment, local);
    			transition_out(if_block1);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div1);
    			destroy_component(button0);
    			destroy_component(button1);
    			destroy_component(button2);
    			if (if_block0) if_block0.d();
    			destroy_component(button3);
    			destroy_component(button4);
    			destroy_component(button5);
    			if (if_block1) if_block1.d();
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block: block_1,
    		id: create_fragment$e.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block_1;
    }

    function instance$e($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Layout_user', slots, []);
    	let { layout = "" } = $$props;
    	let { back = "" } = $$props;
    	let mute = "mute";
    	let block = "block";
    	const writable_props = ['layout', 'back'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Layout_user> was created with unknown prop '${key}'`);
    	});

    	function button0_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	function button2_layout_binding(value) {
    		layout = value;
    		$$invalidate(0, layout);
    	}

    	$$self.$$set = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    	};

    	$$self.$capture_state = () => ({ Button: Chat_button, layout, back, mute, block });

    	$$self.$inject_state = $$props => {
    		if ('layout' in $$props) $$invalidate(0, layout = $$props.layout);
    		if ('back' in $$props) $$invalidate(1, back = $$props.back);
    		if ('mute' in $$props) $$invalidate(2, mute = $$props.mute);
    		if ('block' in $$props) $$invalidate(3, block = $$props.block);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [layout, back, mute, block, button0_layout_binding, button2_layout_binding];
    }

    class Layout_user extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$e, create_fragment$e, safe_not_equal, { layout: 0, back: 1 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Layout_user",
    			options,
    			id: create_fragment$e.name
    		});
    	}

    	get layout() {
    		throw new Error("<Layout_user>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set layout(value) {
    		throw new Error("<Layout_user>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get back() {
    		throw new Error("<Layout_user>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set back(value) {
    		throw new Error("<Layout_user>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pieces/chat/Chat.svelte generated by Svelte v3.53.1 */

    const { console: console_1$5 } = globals;
    const file$c = "src/pieces/chat/Chat.svelte";

    // (61:1) {:else}
    function create_else_block$4(ctx) {
    	let div;
    	let button;
    	let updating_layout;
    	let current;

    	function button_layout_binding(value) {
    		/*button_layout_binding*/ ctx[12](value);
    	}

    	let button_props = {
    		new_layout: /*layouts*/ ctx[2][0],
    		my_class: "chat",
    		$$slots: { default: [create_default_slot$2] },
    		$$scope: { ctx }
    	};

    	if (/*layout*/ ctx[1] !== void 0) {
    		button_props.layout = /*layout*/ ctx[1];
    	}

    	button = new Chat_button({ props: button_props, $$inline: true });
    	binding_callbacks.push(() => bind(button, 'layout', button_layout_binding));

    	const block = {
    		c: function create() {
    			div = element("div");
    			create_component(button.$$.fragment);
    			attr_dev(div, "class", "grid_box svelte-vnkqnh");
    			add_location(div, file$c, 61, 2, 1767);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div, anchor);
    			mount_component(button, div, null);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const button_changes = {};
    			if (dirty & /*layouts*/ 4) button_changes.new_layout = /*layouts*/ ctx[2][0];

    			if (dirty & /*$$scope*/ 134217728) {
    				button_changes.$$scope = { dirty, ctx };
    			}

    			if (!updating_layout && dirty & /*layout*/ 2) {
    				updating_layout = true;
    				button_changes.layout = /*layout*/ ctx[1];
    				add_flush_callback(() => updating_layout = false);
    			}

    			button.$set(button_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div);
    			destroy_component(button);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_else_block$4.name,
    		type: "else",
    		source: "(61:1) {:else}",
    		ctx
    	});

    	return block;
    }

    // (58:29) 
    function create_if_block_8(ctx) {
    	let userlayout;
    	let updating_layout;
    	let current;

    	function userlayout_layout_binding(value) {
    		/*userlayout_layout_binding*/ ctx[11](value);
    	}

    	let userlayout_props = { back: /*layouts*/ ctx[2][1] };

    	if (/*layout*/ ctx[1] !== void 0) {
    		userlayout_props.layout = /*layout*/ ctx[1];
    	}

    	userlayout = new Layout_user({ props: userlayout_props, $$inline: true });
    	binding_callbacks.push(() => bind(userlayout, 'layout', userlayout_layout_binding));

    	const block = {
    		c: function create() {
    			create_component(userlayout.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(userlayout, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const userlayout_changes = {};
    			if (dirty & /*layouts*/ 4) userlayout_changes.back = /*layouts*/ ctx[2][1];

    			if (!updating_layout && dirty & /*layout*/ 2) {
    				updating_layout = true;
    				userlayout_changes.layout = /*layout*/ ctx[1];
    				add_flush_callback(() => updating_layout = false);
    			}

    			userlayout.$set(userlayout_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(userlayout.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(userlayout.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(userlayout, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block_8.name,
    		type: "if",
    		source: "(58:29) ",
    		ctx
    	});

    	return block;
    }

    // (55:29) 
    function create_if_block_7(ctx) {
    	let mutelayout;
    	let updating_layout;
    	let current;

    	function mutelayout_layout_binding(value) {
    		/*mutelayout_layout_binding*/ ctx[10](value);
    	}

    	let mutelayout_props = { back: /*layouts*/ ctx[2][1] };

    	if (/*layout*/ ctx[1] !== void 0) {
    		mutelayout_props.layout = /*layout*/ ctx[1];
    	}

    	mutelayout = new Layout_mute({ props: mutelayout_props, $$inline: true });
    	binding_callbacks.push(() => bind(mutelayout, 'layout', mutelayout_layout_binding));

    	const block = {
    		c: function create() {
    			create_component(mutelayout.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(mutelayout, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const mutelayout_changes = {};
    			if (dirty & /*layouts*/ 4) mutelayout_changes.back = /*layouts*/ ctx[2][1];

    			if (!updating_layout && dirty & /*layout*/ 2) {
    				updating_layout = true;
    				mutelayout_changes.layout = /*layout*/ ctx[1];
    				add_flush_callback(() => updating_layout = false);
    			}

    			mutelayout.$set(mutelayout_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(mutelayout.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(mutelayout.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(mutelayout, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block_7.name,
    		type: "if",
    		source: "(55:29) ",
    		ctx
    	});

    	return block;
    }

    // (52:31) 
    function create_if_block_6(ctx) {
    	let createlayout;
    	let updating_layout;
    	let current;

    	function createlayout_layout_binding(value) {
    		/*createlayout_layout_binding*/ ctx[9](value);
    	}

    	let createlayout_props = { back: /*layouts*/ ctx[2][1] };

    	if (/*layout*/ ctx[1] !== void 0) {
    		createlayout_props.layout = /*layout*/ ctx[1];
    	}

    	createlayout = new Layout_create({
    			props: createlayout_props,
    			$$inline: true
    		});

    	binding_callbacks.push(() => bind(createlayout, 'layout', createlayout_layout_binding));

    	const block = {
    		c: function create() {
    			create_component(createlayout.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(createlayout, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const createlayout_changes = {};
    			if (dirty & /*layouts*/ 4) createlayout_changes.back = /*layouts*/ ctx[2][1];

    			if (!updating_layout && dirty & /*layout*/ 2) {
    				updating_layout = true;
    				createlayout_changes.layout = /*layout*/ ctx[1];
    				add_flush_callback(() => updating_layout = false);
    			}

    			createlayout.$set(createlayout_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(createlayout.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(createlayout.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(createlayout, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block_6.name,
    		type: "if",
    		source: "(52:31) ",
    		ctx
    	});

    	return block;
    }

    // (49:34) 
    function create_if_block_5(ctx) {
    	let protectedlayout;
    	let updating_layout;
    	let current;

    	function protectedlayout_layout_binding(value) {
    		/*protectedlayout_layout_binding*/ ctx[8](value);
    	}

    	let protectedlayout_props = { back: /*layouts*/ ctx[2][1] };

    	if (/*layout*/ ctx[1] !== void 0) {
    		protectedlayout_props.layout = /*layout*/ ctx[1];
    	}

    	protectedlayout = new Layout_protected({
    			props: protectedlayout_props,
    			$$inline: true
    		});

    	binding_callbacks.push(() => bind(protectedlayout, 'layout', protectedlayout_layout_binding));

    	const block = {
    		c: function create() {
    			create_component(protectedlayout.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(protectedlayout, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const protectedlayout_changes = {};
    			if (dirty & /*layouts*/ 4) protectedlayout_changes.back = /*layouts*/ ctx[2][1];

    			if (!updating_layout && dirty & /*layout*/ 2) {
    				updating_layout = true;
    				protectedlayout_changes.layout = /*layout*/ ctx[1];
    				add_flush_callback(() => updating_layout = false);
    			}

    			protectedlayout.$set(protectedlayout_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(protectedlayout.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(protectedlayout.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(protectedlayout, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block_5.name,
    		type: "if",
    		source: "(49:34) ",
    		ctx
    	});

    	return block;
    }

    // (46:33) 
    function create_if_block_4(ctx) {
    	let roomsetlayout;
    	let updating_layout;
    	let current;

    	function roomsetlayout_layout_binding(value) {
    		/*roomsetlayout_layout_binding*/ ctx[7](value);
    	}

    	let roomsetlayout_props = { back: /*layouts*/ ctx[2][1] };

    	if (/*layout*/ ctx[1] !== void 0) {
    		roomsetlayout_props.layout = /*layout*/ ctx[1];
    	}

    	roomsetlayout = new Layout_room_set({
    			props: roomsetlayout_props,
    			$$inline: true
    		});

    	binding_callbacks.push(() => bind(roomsetlayout, 'layout', roomsetlayout_layout_binding));

    	const block = {
    		c: function create() {
    			create_component(roomsetlayout.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(roomsetlayout, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const roomsetlayout_changes = {};
    			if (dirty & /*layouts*/ 4) roomsetlayout_changes.back = /*layouts*/ ctx[2][1];

    			if (!updating_layout && dirty & /*layout*/ 2) {
    				updating_layout = true;
    				roomsetlayout_changes.layout = /*layout*/ ctx[1];
    				add_flush_callback(() => updating_layout = false);
    			}

    			roomsetlayout.$set(roomsetlayout_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(roomsetlayout.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(roomsetlayout.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(roomsetlayout, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block_4.name,
    		type: "if",
    		source: "(46:33) ",
    		ctx
    	});

    	return block;
    }

    // (43:33) 
    function create_if_block_3(ctx) {
    	let settingslayout;
    	let updating_layout;
    	let current;

    	function settingslayout_layout_binding(value) {
    		/*settingslayout_layout_binding*/ ctx[6](value);
    	}

    	let settingslayout_props = { back: /*layouts*/ ctx[2][1] };

    	if (/*layout*/ ctx[1] !== void 0) {
    		settingslayout_props.layout = /*layout*/ ctx[1];
    	}

    	settingslayout = new Layout_settings({
    			props: settingslayout_props,
    			$$inline: true
    		});

    	binding_callbacks.push(() => bind(settingslayout, 'layout', settingslayout_layout_binding));

    	const block = {
    		c: function create() {
    			create_component(settingslayout.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(settingslayout, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const settingslayout_changes = {};
    			if (dirty & /*layouts*/ 4) settingslayout_changes.back = /*layouts*/ ctx[2][1];

    			if (!updating_layout && dirty & /*layout*/ 2) {
    				updating_layout = true;
    				settingslayout_changes.layout = /*layout*/ ctx[1];
    				add_flush_callback(() => updating_layout = false);
    			}

    			settingslayout.$set(settingslayout_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(settingslayout.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(settingslayout.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(settingslayout, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block_3.name,
    		type: "if",
    		source: "(43:33) ",
    		ctx
    	});

    	return block;
    }

    // (40:28) 
    function create_if_block_2(ctx) {
    	let newlayout;
    	let updating_layout;
    	let current;

    	function newlayout_layout_binding(value) {
    		/*newlayout_layout_binding*/ ctx[5](value);
    	}

    	let newlayout_props = { back: /*layouts*/ ctx[2][1] };

    	if (/*layout*/ ctx[1] !== void 0) {
    		newlayout_props.layout = /*layout*/ ctx[1];
    	}

    	newlayout = new Layout_new({ props: newlayout_props, $$inline: true });
    	binding_callbacks.push(() => bind(newlayout, 'layout', newlayout_layout_binding));

    	const block = {
    		c: function create() {
    			create_component(newlayout.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(newlayout, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const newlayout_changes = {};
    			if (dirty & /*layouts*/ 4) newlayout_changes.back = /*layouts*/ ctx[2][1];

    			if (!updating_layout && dirty & /*layout*/ 2) {
    				updating_layout = true;
    				newlayout_changes.layout = /*layout*/ ctx[1];
    				add_flush_callback(() => updating_layout = false);
    			}

    			newlayout.$set(newlayout_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(newlayout.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(newlayout.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(newlayout, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block_2.name,
    		type: "if",
    		source: "(40:28) ",
    		ctx
    	});

    	return block;
    }

    // (37:29) 
    function create_if_block_1$1(ctx) {
    	let roomlayout;
    	let updating_layout;
    	let current;

    	function roomlayout_layout_binding(value) {
    		/*roomlayout_layout_binding*/ ctx[4](value);
    	}

    	let roomlayout_props = { back: /*layouts*/ ctx[2][1] };

    	if (/*layout*/ ctx[1] !== void 0) {
    		roomlayout_props.layout = /*layout*/ ctx[1];
    	}

    	roomlayout = new Layout_room({ props: roomlayout_props, $$inline: true });
    	binding_callbacks.push(() => bind(roomlayout, 'layout', roomlayout_layout_binding));

    	const block = {
    		c: function create() {
    			create_component(roomlayout.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(roomlayout, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const roomlayout_changes = {};
    			if (dirty & /*layouts*/ 4) roomlayout_changes.back = /*layouts*/ ctx[2][1];

    			if (!updating_layout && dirty & /*layout*/ 2) {
    				updating_layout = true;
    				roomlayout_changes.layout = /*layout*/ ctx[1];
    				add_flush_callback(() => updating_layout = false);
    			}

    			roomlayout.$set(roomlayout_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(roomlayout.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(roomlayout.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(roomlayout, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block_1$1.name,
    		type: "if",
    		source: "(37:29) ",
    		ctx
    	});

    	return block;
    }

    // (34:1) {#if layout === "home"}
    function create_if_block$6(ctx) {
    	let homelayout;
    	let updating_layout;
    	let current;

    	function homelayout_layout_binding(value) {
    		/*homelayout_layout_binding*/ ctx[3](value);
    	}

    	let homelayout_props = {};

    	if (/*layout*/ ctx[1] !== void 0) {
    		homelayout_props.layout = /*layout*/ ctx[1];
    	}

    	homelayout = new Layout_home({ props: homelayout_props, $$inline: true });
    	binding_callbacks.push(() => bind(homelayout, 'layout', homelayout_layout_binding));

    	const block = {
    		c: function create() {
    			create_component(homelayout.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(homelayout, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const homelayout_changes = {};

    			if (!updating_layout && dirty & /*layout*/ 2) {
    				updating_layout = true;
    				homelayout_changes.layout = /*layout*/ ctx[1];
    				add_flush_callback(() => updating_layout = false);
    			}

    			homelayout.$set(homelayout_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(homelayout.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(homelayout.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(homelayout, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block$6.name,
    		type: "if",
    		source: "(34:1) {#if layout === \\\"home\\\"}",
    		ctx
    	});

    	return block;
    }

    // (63:3) <Button bind:layout new_layout={layouts[0]} my_class="chat">
    function create_default_slot$2(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("chat");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot$2.name,
    		type: "slot",
    		source: "(63:3) <Button bind:layout new_layout={layouts[0]} my_class=\\\"chat\\\">",
    		ctx
    	});

    	return block;
    }

    function create_fragment$d(ctx) {
    	let div0;
    	let current_block_type_index;
    	let if_block;
    	let div0_class_value;
    	let t0;
    	let div1;
    	let p;
    	let t2;
    	let button0;
    	let t4;
    	let button1;
    	let t6;
    	let button2;
    	let t8;
    	let button3;
    	let t10;
    	let button4;
    	let t12;
    	let button5;
    	let t14;
    	let button6;
    	let t16;
    	let button7;
    	let t18;
    	let button8;
    	let t20;
    	let button9;
    	let t22;
    	let button10;
    	let current;
    	let mounted;
    	let dispose;

    	const if_block_creators = [
    		create_if_block$6,
    		create_if_block_1$1,
    		create_if_block_2,
    		create_if_block_3,
    		create_if_block_4,
    		create_if_block_5,
    		create_if_block_6,
    		create_if_block_7,
    		create_if_block_8,
    		create_else_block$4
    	];

    	const if_blocks = [];

    	function select_block_type(ctx, dirty) {
    		if (/*layout*/ ctx[1] === "home") return 0;
    		if (/*layout*/ ctx[1] === "room") return 1;
    		if (/*layout*/ ctx[1] === "new") return 2;
    		if (/*layout*/ ctx[1] === "settings") return 3;
    		if (/*layout*/ ctx[1] === "room_set") return 4;
    		if (/*layout*/ ctx[1] === "protected") return 5;
    		if (/*layout*/ ctx[1] === "create") return 6;
    		if (/*layout*/ ctx[1] === "mute") return 7;
    		if (/*layout*/ ctx[1] === "user") return 8;
    		return 9;
    	}

    	current_block_type_index = select_block_type(ctx);
    	if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);

    	const block = {
    		c: function create() {
    			div0 = element("div");
    			if_block.c();
    			t0 = space();
    			div1 = element("div");
    			p = element("p");
    			p.textContent = "temp, for testing :";
    			t2 = space();
    			button0 = element("button");
    			button0.textContent = "close";
    			t4 = space();
    			button1 = element("button");
    			button1.textContent = "home";
    			t6 = space();
    			button2 = element("button");
    			button2.textContent = "room";
    			t8 = space();
    			button3 = element("button");
    			button3.textContent = "new";
    			t10 = space();
    			button4 = element("button");
    			button4.textContent = "settings";
    			t12 = space();
    			button5 = element("button");
    			button5.textContent = "room_set";
    			t14 = space();
    			button6 = element("button");
    			button6.textContent = "protected";
    			t16 = space();
    			button7 = element("button");
    			button7.textContent = "create";
    			t18 = space();
    			button8 = element("button");
    			button8.textContent = "mute";
    			t20 = space();
    			button9 = element("button");
    			button9.textContent = "user from settings";
    			t22 = space();
    			button10 = element("button");
    			button10.textContent = "user from room_set";
    			attr_dev(div0, "class", div0_class_value = "" + (/*layout*/ ctx[1] + " chat_box" + " svelte-vnkqnh"));
    			set_style(div0, "background-color", /*color*/ ctx[0]);
    			add_location(div0, file$c, 31, 0, 982);
    			add_location(p, file$c, 74, 1, 2062);
    			add_location(button0, file$c, 75, 1, 2090);
    			add_location(button1, file$c, 76, 1, 2158);
    			add_location(button2, file$c, 77, 1, 2225);
    			add_location(button3, file$c, 78, 1, 2292);
    			add_location(button4, file$c, 79, 1, 2358);
    			add_location(button5, file$c, 80, 1, 2429);
    			add_location(button6, file$c, 81, 1, 2500);
    			add_location(button7, file$c, 82, 1, 2572);
    			add_location(button8, file$c, 83, 1, 2641);
    			add_location(button9, file$c, 84, 1, 2708);
    			add_location(button10, file$c, 88, 1, 2828);
    			set_style(div1, "display", "flex");
    			set_style(div1, "flex-direction", "column");
    			set_style(div1, "font-size", "12px");
    			set_style(div1, "position", "fixed");
    			set_style(div1, "top", "20px");
    			set_style(div1, "left", "20px");
    			set_style(div1, "background-color", "white");
    			add_location(div1, file$c, 73, 0, 1926);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div0, anchor);
    			if_blocks[current_block_type_index].m(div0, null);
    			insert_dev(target, t0, anchor);
    			insert_dev(target, div1, anchor);
    			append_dev(div1, p);
    			append_dev(div1, t2);
    			append_dev(div1, button0);
    			append_dev(div1, t4);
    			append_dev(div1, button1);
    			append_dev(div1, t6);
    			append_dev(div1, button2);
    			append_dev(div1, t8);
    			append_dev(div1, button3);
    			append_dev(div1, t10);
    			append_dev(div1, button4);
    			append_dev(div1, t12);
    			append_dev(div1, button5);
    			append_dev(div1, t14);
    			append_dev(div1, button6);
    			append_dev(div1, t16);
    			append_dev(div1, button7);
    			append_dev(div1, t18);
    			append_dev(div1, button8);
    			append_dev(div1, t20);
    			append_dev(div1, button9);
    			append_dev(div1, t22);
    			append_dev(div1, button10);
    			current = true;

    			if (!mounted) {
    				dispose = [
    					listen_dev(button0, "click", /*click_handler*/ ctx[13], false, false, false),
    					listen_dev(button1, "click", /*click_handler_1*/ ctx[14], false, false, false),
    					listen_dev(button2, "click", /*click_handler_2*/ ctx[15], false, false, false),
    					listen_dev(button3, "click", /*click_handler_3*/ ctx[16], false, false, false),
    					listen_dev(button4, "click", /*click_handler_4*/ ctx[17], false, false, false),
    					listen_dev(button5, "click", /*click_handler_5*/ ctx[18], false, false, false),
    					listen_dev(button6, "click", /*click_handler_6*/ ctx[19], false, false, false),
    					listen_dev(button7, "click", /*click_handler_7*/ ctx[20], false, false, false),
    					listen_dev(button8, "click", /*click_handler_8*/ ctx[21], false, false, false),
    					listen_dev(button9, "click", /*click_handler_9*/ ctx[22], false, false, false),
    					listen_dev(button10, "click", /*click_handler_10*/ ctx[23], false, false, false)
    				];

    				mounted = true;
    			}
    		},
    		p: function update(ctx, [dirty]) {
    			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_blocks[current_block_type_index].p(ctx, dirty);
    			} else {
    				group_outros();

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

    				check_outros();
    				if_block = if_blocks[current_block_type_index];

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

    				transition_in(if_block, 1);
    				if_block.m(div0, null);
    			}

    			if (!current || dirty & /*layout*/ 2 && div0_class_value !== (div0_class_value = "" + (/*layout*/ ctx[1] + " chat_box" + " svelte-vnkqnh"))) {
    				attr_dev(div0, "class", div0_class_value);
    			}

    			if (!current || dirty & /*color*/ 1) {
    				set_style(div0, "background-color", /*color*/ ctx[0]);
    			}
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(if_block);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(if_block);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div0);
    			if_blocks[current_block_type_index].d();
    			if (detaching) detach_dev(t0);
    			if (detaching) detach_dev(div1);
    			mounted = false;
    			run_all(dispose);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$d.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$d($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Chat', slots, []);
    	let { color = "transparent" } = $$props;
    	let room = "";
    	let admin = false;
    	let layout = "close";
    	let layouts = ["home", "home"];

    	// hold previous version of layout, to go back
    	function set_layouts(layout) {
    		if (layout === "close") return;
    		if (layout === layouts[0]) return;
    		if (layout === layouts[1]) $$invalidate(2, layouts = [layout, "home"]); else $$invalidate(2, layouts = [layout, layouts[0]]);
    		console.log(layouts);
    	}

    	const writable_props = ['color'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$5.warn(`<Chat> was created with unknown prop '${key}'`);
    	});

    	function homelayout_layout_binding(value) {
    		layout = value;
    		$$invalidate(1, layout);
    	}

    	function roomlayout_layout_binding(value) {
    		layout = value;
    		$$invalidate(1, layout);
    	}

    	function newlayout_layout_binding(value) {
    		layout = value;
    		$$invalidate(1, layout);
    	}

    	function settingslayout_layout_binding(value) {
    		layout = value;
    		$$invalidate(1, layout);
    	}

    	function roomsetlayout_layout_binding(value) {
    		layout = value;
    		$$invalidate(1, layout);
    	}

    	function protectedlayout_layout_binding(value) {
    		layout = value;
    		$$invalidate(1, layout);
    	}

    	function createlayout_layout_binding(value) {
    		layout = value;
    		$$invalidate(1, layout);
    	}

    	function mutelayout_layout_binding(value) {
    		layout = value;
    		$$invalidate(1, layout);
    	}

    	function userlayout_layout_binding(value) {
    		layout = value;
    		$$invalidate(1, layout);
    	}

    	function button_layout_binding(value) {
    		layout = value;
    		$$invalidate(1, layout);
    	}

    	const click_handler = function () {
    		$$invalidate(1, layout = "close");
    	};

    	const click_handler_1 = function () {
    		$$invalidate(1, layout = "home");
    	};

    	const click_handler_2 = function () {
    		$$invalidate(1, layout = "room");
    	};

    	const click_handler_3 = function () {
    		$$invalidate(1, layout = "new");
    	};

    	const click_handler_4 = function () {
    		$$invalidate(1, layout = "settings");
    	};

    	const click_handler_5 = function () {
    		$$invalidate(1, layout = "room_set");
    	};

    	const click_handler_6 = function () {
    		$$invalidate(1, layout = "protected");
    	};

    	const click_handler_7 = function () {
    		$$invalidate(1, layout = "create");
    	};

    	const click_handler_8 = function () {
    		$$invalidate(1, layout = "mute");
    	};

    	const click_handler_9 = function () {
    		$$invalidate(2, layouts = ["settings", "settings"]);
    		$$invalidate(1, layout = "user");
    	};

    	const click_handler_10 = function () {
    		$$invalidate(2, layouts = ["room_set", "room_set"]);
    		$$invalidate(1, layout = "user");
    	};

    	$$self.$$set = $$props => {
    		if ('color' in $$props) $$invalidate(0, color = $$props.color);
    	};

    	$$self.$capture_state = () => ({
    		Button: Chat_button,
    		HomeLayout: Layout_home,
    		RoomLayout: Layout_room,
    		NewLayout: Layout_new,
    		SettingsLayout: Layout_settings,
    		RoomsetLayout: Layout_room_set,
    		ProtectedLayout: Layout_protected,
    		CreateLayout: Layout_create,
    		MuteLayout: Layout_mute,
    		UserLayout: Layout_user,
    		color,
    		room,
    		admin,
    		layout,
    		layouts,
    		set_layouts
    	});

    	$$self.$inject_state = $$props => {
    		if ('color' in $$props) $$invalidate(0, color = $$props.color);
    		if ('room' in $$props) room = $$props.room;
    		if ('admin' in $$props) admin = $$props.admin;
    		if ('layout' in $$props) $$invalidate(1, layout = $$props.layout);
    		if ('layouts' in $$props) $$invalidate(2, layouts = $$props.layouts);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	$$self.$$.update = () => {
    		if ($$self.$$.dirty & /*layout*/ 2) {
    			set_layouts(layout);
    		}
    	};

    	return [
    		color,
    		layout,
    		layouts,
    		homelayout_layout_binding,
    		roomlayout_layout_binding,
    		newlayout_layout_binding,
    		settingslayout_layout_binding,
    		roomsetlayout_layout_binding,
    		protectedlayout_layout_binding,
    		createlayout_layout_binding,
    		mutelayout_layout_binding,
    		userlayout_layout_binding,
    		button_layout_binding,
    		click_handler,
    		click_handler_1,
    		click_handler_2,
    		click_handler_3,
    		click_handler_4,
    		click_handler_5,
    		click_handler_6,
    		click_handler_7,
    		click_handler_8,
    		click_handler_9,
    		click_handler_10
    	];
    }

    class Chat extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$d, create_fragment$d, safe_not_equal, { color: 0 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Chat",
    			options,
    			id: create_fragment$d.name
    		});
    	}

    	get color() {
    		throw new Error("<Chat>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set color(value) {
    		throw new Error("<Chat>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pages/profile/ProfileDisplay.svelte generated by Svelte v3.53.1 */
    const file$b = "src/pages/profile/ProfileDisplay.svelte";

    // (19:2) {:else}
    function create_else_block$3(ctx) {
    	let h2;
    	let t1;
    	let div;

    	const block = {
    		c: function create() {
    			h2 = element("h2");
    			h2.textContent = "Sorry";
    			t1 = space();
    			div = element("div");
    			div.textContent = "Failed to load current";
    			add_location(h2, file$b, 20, 4, 705);
    			add_location(div, file$b, 21, 4, 724);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, h2, anchor);
    			insert_dev(target, t1, anchor);
    			insert_dev(target, div, anchor);
    		},
    		p: noop,
    		i: noop,
    		o: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(h2);
    			if (detaching) detach_dev(t1);
    			if (detaching) detach_dev(div);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_else_block$3.name,
    		type: "else",
    		source: "(19:2) {:else}",
    		ctx
    	});

    	return block;
    }

    // (17:2) {#if user !== undefined}
    function create_if_block$5(ctx) {
    	let generateuserdisplay;
    	let current;

    	generateuserdisplay = new GenerateUserDisplay({
    			props: { user: /*user*/ ctx[0], primary: true },
    			$$inline: true
    		});

    	const block = {
    		c: function create() {
    			create_component(generateuserdisplay.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(generateuserdisplay, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const generateuserdisplay_changes = {};
    			if (dirty & /*user*/ 1) generateuserdisplay_changes.user = /*user*/ ctx[0];
    			generateuserdisplay.$set(generateuserdisplay_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(generateuserdisplay.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(generateuserdisplay.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(generateuserdisplay, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block$5.name,
    		type: "if",
    		source: "(17:2) {#if user !== undefined}",
    		ctx
    	});

    	return block;
    }

    function create_fragment$c(ctx) {
    	let chat;
    	let t0;
    	let div0;
    	let current_block_type_index;
    	let if_block;
    	let t1;
    	let div1;
    	let t3;
    	let div2;
    	let t5;
    	let div3;
    	let t7;
    	let div4;
    	let t9;
    	let div5;
    	let t11;
    	let div6;
    	let t13;
    	let div7;
    	let t15;
    	let div8;
    	let t17;
    	let div9;
    	let t19;
    	let div10;
    	let t21;
    	let div11;
    	let t23;
    	let div12;
    	let t25;
    	let div13;
    	let t27;
    	let div14;
    	let t29;
    	let div15;
    	let t31;
    	let div16;
    	let t33;
    	let div17;
    	let t35;
    	let div18;
    	let t37;
    	let div19;
    	let t39;
    	let div20;
    	let t41;
    	let div21;
    	let t43;
    	let div22;
    	let t45;
    	let div23;
    	let t47;
    	let div24;
    	let t49;
    	let div25;
    	let t51;
    	let div26;
    	let t53;
    	let div27;
    	let t55;
    	let div28;
    	let t57;
    	let div29;
    	let t59;
    	let div30;
    	let current;

    	chat = new Chat({
    			props: { color: "bisque" },
    			$$inline: true
    		});

    	const if_block_creators = [create_if_block$5, create_else_block$3];
    	const if_blocks = [];

    	function select_block_type(ctx, dirty) {
    		if (/*user*/ ctx[0] !== undefined) return 0;
    		return 1;
    	}

    	current_block_type_index = select_block_type(ctx);
    	if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);

    	const block = {
    		c: function create() {
    			create_component(chat.$$.fragment);
    			t0 = space();
    			div0 = element("div");
    			if_block.c();
    			t1 = space();
    			div1 = element("div");
    			div1.textContent = "testing when there's tons of stuff";
    			t3 = space();
    			div2 = element("div");
    			div2.textContent = "testing when there's tons of stuff";
    			t5 = space();
    			div3 = element("div");
    			div3.textContent = "testing when there's tons of stuff";
    			t7 = space();
    			div4 = element("div");
    			div4.textContent = "testing when there's tons of stuff";
    			t9 = space();
    			div5 = element("div");
    			div5.textContent = "testing when there's tons of stuff";
    			t11 = space();
    			div6 = element("div");
    			div6.textContent = "testing when there's tons of stuff";
    			t13 = space();
    			div7 = element("div");
    			div7.textContent = "testing when there's tons of stuff";
    			t15 = space();
    			div8 = element("div");
    			div8.textContent = "testing when there's tons of stuff";
    			t17 = space();
    			div9 = element("div");
    			div9.textContent = "testing when there's tons of stuff";
    			t19 = space();
    			div10 = element("div");
    			div10.textContent = "testing when there's tons of stuff";
    			t21 = space();
    			div11 = element("div");
    			div11.textContent = "testing when there's tons of stuff";
    			t23 = space();
    			div12 = element("div");
    			div12.textContent = "testing when there's tons of stuff";
    			t25 = space();
    			div13 = element("div");
    			div13.textContent = "testing when there's tons of stuff";
    			t27 = space();
    			div14 = element("div");
    			div14.textContent = "testing when there's tons of stuff";
    			t29 = space();
    			div15 = element("div");
    			div15.textContent = "testing when there's tons of stuff";
    			t31 = space();
    			div16 = element("div");
    			div16.textContent = "testing when there's tons of stuff";
    			t33 = space();
    			div17 = element("div");
    			div17.textContent = "testing when there's tons of stuff";
    			t35 = space();
    			div18 = element("div");
    			div18.textContent = "testing when there's tons of stuff";
    			t37 = space();
    			div19 = element("div");
    			div19.textContent = "testing when there's tons of stuff";
    			t39 = space();
    			div20 = element("div");
    			div20.textContent = "testing when there's tons of stuff";
    			t41 = space();
    			div21 = element("div");
    			div21.textContent = "testing when there's tons of stuff";
    			t43 = space();
    			div22 = element("div");
    			div22.textContent = "testing when there's tons of stuff";
    			t45 = space();
    			div23 = element("div");
    			div23.textContent = "testing when there's tons of stuff";
    			t47 = space();
    			div24 = element("div");
    			div24.textContent = "testing when there's tons of stuff";
    			t49 = space();
    			div25 = element("div");
    			div25.textContent = "testing when there's tons of stuff";
    			t51 = space();
    			div26 = element("div");
    			div26.textContent = "testing when there's tons of stuff";
    			t53 = space();
    			div27 = element("div");
    			div27.textContent = "testing when there's tons of stuff";
    			t55 = space();
    			div28 = element("div");
    			div28.textContent = "testing when there's tons of stuff";
    			t57 = space();
    			div29 = element("div");
    			div29.textContent = "testing when there's tons of stuff";
    			t59 = space();
    			div30 = element("div");
    			div30.textContent = "testing when there's tons of stuff";
    			attr_dev(div0, "class", "outer svelte-16aefqu");
    			add_location(div0, file$b, 14, 0, 422);
    			add_location(div1, file$b, 25, 0, 774);
    			add_location(div2, file$b, 26, 0, 820);
    			add_location(div3, file$b, 27, 0, 866);
    			add_location(div4, file$b, 28, 0, 912);
    			add_location(div5, file$b, 29, 0, 958);
    			add_location(div6, file$b, 30, 0, 1004);
    			add_location(div7, file$b, 31, 0, 1050);
    			add_location(div8, file$b, 32, 0, 1096);
    			add_location(div9, file$b, 33, 0, 1142);
    			add_location(div10, file$b, 34, 0, 1188);
    			add_location(div11, file$b, 35, 0, 1234);
    			add_location(div12, file$b, 36, 0, 1280);
    			add_location(div13, file$b, 37, 0, 1326);
    			add_location(div14, file$b, 38, 0, 1372);
    			add_location(div15, file$b, 39, 0, 1418);
    			add_location(div16, file$b, 40, 0, 1464);
    			add_location(div17, file$b, 41, 0, 1510);
    			add_location(div18, file$b, 42, 0, 1556);
    			add_location(div19, file$b, 43, 0, 1602);
    			add_location(div20, file$b, 44, 0, 1648);
    			add_location(div21, file$b, 45, 0, 1694);
    			add_location(div22, file$b, 46, 0, 1740);
    			add_location(div23, file$b, 47, 0, 1786);
    			add_location(div24, file$b, 48, 0, 1832);
    			add_location(div25, file$b, 49, 0, 1878);
    			add_location(div26, file$b, 50, 0, 1924);
    			add_location(div27, file$b, 51, 0, 1970);
    			add_location(div28, file$b, 52, 0, 2016);
    			add_location(div29, file$b, 53, 0, 2062);
    			add_location(div30, file$b, 54, 0, 2108);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			mount_component(chat, target, anchor);
    			insert_dev(target, t0, anchor);
    			insert_dev(target, div0, anchor);
    			if_blocks[current_block_type_index].m(div0, null);
    			insert_dev(target, t1, anchor);
    			insert_dev(target, div1, anchor);
    			insert_dev(target, t3, anchor);
    			insert_dev(target, div2, anchor);
    			insert_dev(target, t5, anchor);
    			insert_dev(target, div3, anchor);
    			insert_dev(target, t7, anchor);
    			insert_dev(target, div4, anchor);
    			insert_dev(target, t9, anchor);
    			insert_dev(target, div5, anchor);
    			insert_dev(target, t11, anchor);
    			insert_dev(target, div6, anchor);
    			insert_dev(target, t13, anchor);
    			insert_dev(target, div7, anchor);
    			insert_dev(target, t15, anchor);
    			insert_dev(target, div8, anchor);
    			insert_dev(target, t17, anchor);
    			insert_dev(target, div9, anchor);
    			insert_dev(target, t19, anchor);
    			insert_dev(target, div10, anchor);
    			insert_dev(target, t21, anchor);
    			insert_dev(target, div11, anchor);
    			insert_dev(target, t23, anchor);
    			insert_dev(target, div12, anchor);
    			insert_dev(target, t25, anchor);
    			insert_dev(target, div13, anchor);
    			insert_dev(target, t27, anchor);
    			insert_dev(target, div14, anchor);
    			insert_dev(target, t29, anchor);
    			insert_dev(target, div15, anchor);
    			insert_dev(target, t31, anchor);
    			insert_dev(target, div16, anchor);
    			insert_dev(target, t33, anchor);
    			insert_dev(target, div17, anchor);
    			insert_dev(target, t35, anchor);
    			insert_dev(target, div18, anchor);
    			insert_dev(target, t37, anchor);
    			insert_dev(target, div19, anchor);
    			insert_dev(target, t39, anchor);
    			insert_dev(target, div20, anchor);
    			insert_dev(target, t41, anchor);
    			insert_dev(target, div21, anchor);
    			insert_dev(target, t43, anchor);
    			insert_dev(target, div22, anchor);
    			insert_dev(target, t45, anchor);
    			insert_dev(target, div23, anchor);
    			insert_dev(target, t47, anchor);
    			insert_dev(target, div24, anchor);
    			insert_dev(target, t49, anchor);
    			insert_dev(target, div25, anchor);
    			insert_dev(target, t51, anchor);
    			insert_dev(target, div26, anchor);
    			insert_dev(target, t53, anchor);
    			insert_dev(target, div27, anchor);
    			insert_dev(target, t55, anchor);
    			insert_dev(target, div28, anchor);
    			insert_dev(target, t57, anchor);
    			insert_dev(target, div29, anchor);
    			insert_dev(target, t59, anchor);
    			insert_dev(target, div30, anchor);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			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_blocks[current_block_type_index].p(ctx, dirty);
    			} else {
    				group_outros();

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

    				check_outros();
    				if_block = if_blocks[current_block_type_index];

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

    				transition_in(if_block, 1);
    				if_block.m(div0, null);
    			}
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(chat.$$.fragment, local);
    			transition_in(if_block);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(chat.$$.fragment, local);
    			transition_out(if_block);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(chat, detaching);
    			if (detaching) detach_dev(t0);
    			if (detaching) detach_dev(div0);
    			if_blocks[current_block_type_index].d();
    			if (detaching) detach_dev(t1);
    			if (detaching) detach_dev(div1);
    			if (detaching) detach_dev(t3);
    			if (detaching) detach_dev(div2);
    			if (detaching) detach_dev(t5);
    			if (detaching) detach_dev(div3);
    			if (detaching) detach_dev(t7);
    			if (detaching) detach_dev(div4);
    			if (detaching) detach_dev(t9);
    			if (detaching) detach_dev(div5);
    			if (detaching) detach_dev(t11);
    			if (detaching) detach_dev(div6);
    			if (detaching) detach_dev(t13);
    			if (detaching) detach_dev(div7);
    			if (detaching) detach_dev(t15);
    			if (detaching) detach_dev(div8);
    			if (detaching) detach_dev(t17);
    			if (detaching) detach_dev(div9);
    			if (detaching) detach_dev(t19);
    			if (detaching) detach_dev(div10);
    			if (detaching) detach_dev(t21);
    			if (detaching) detach_dev(div11);
    			if (detaching) detach_dev(t23);
    			if (detaching) detach_dev(div12);
    			if (detaching) detach_dev(t25);
    			if (detaching) detach_dev(div13);
    			if (detaching) detach_dev(t27);
    			if (detaching) detach_dev(div14);
    			if (detaching) detach_dev(t29);
    			if (detaching) detach_dev(div15);
    			if (detaching) detach_dev(t31);
    			if (detaching) detach_dev(div16);
    			if (detaching) detach_dev(t33);
    			if (detaching) detach_dev(div17);
    			if (detaching) detach_dev(t35);
    			if (detaching) detach_dev(div18);
    			if (detaching) detach_dev(t37);
    			if (detaching) detach_dev(div19);
    			if (detaching) detach_dev(t39);
    			if (detaching) detach_dev(div20);
    			if (detaching) detach_dev(t41);
    			if (detaching) detach_dev(div21);
    			if (detaching) detach_dev(t43);
    			if (detaching) detach_dev(div22);
    			if (detaching) detach_dev(t45);
    			if (detaching) detach_dev(div23);
    			if (detaching) detach_dev(t47);
    			if (detaching) detach_dev(div24);
    			if (detaching) detach_dev(t49);
    			if (detaching) detach_dev(div25);
    			if (detaching) detach_dev(t51);
    			if (detaching) detach_dev(div26);
    			if (detaching) detach_dev(t53);
    			if (detaching) detach_dev(div27);
    			if (detaching) detach_dev(t55);
    			if (detaching) detach_dev(div28);
    			if (detaching) detach_dev(t57);
    			if (detaching) detach_dev(div29);
    			if (detaching) detach_dev(t59);
    			if (detaching) detach_dev(div30);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$c.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$c($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('ProfileDisplay', slots, []);
    	let user;

    	onMount(async () => {
    		// console.log('mounting profile display')
    		$$invalidate(0, user = await fetch('http://transcendance:8080/api/v2/user').then(x => x.json()));
    	});

    	const writable_props = [];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<ProfileDisplay> was created with unknown prop '${key}'`);
    	});

    	$$self.$capture_state = () => ({ onMount, GenerateUserDisplay, Chat, user });

    	$$self.$inject_state = $$props => {
    		if ('user' in $$props) $$invalidate(0, user = $$props.user);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [user];
    }

    class ProfileDisplay extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$c, create_fragment$c, safe_not_equal, {});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "ProfileDisplay",
    			options,
    			id: create_fragment$c.name
    		});
    	}
    }

    /* src/pieces/Card.svelte generated by Svelte v3.53.1 */

    const file$a = "src/pieces/Card.svelte";

    function create_fragment$b(ctx) {
    	let div;
    	let current;
    	const default_slot_template = /*#slots*/ ctx[1].default;
    	const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[0], null);

    	const block = {
    		c: function create() {
    			div = element("div");
    			if (default_slot) default_slot.c();
    			attr_dev(div, "class", "card svelte-8smyff");
    			add_location(div, file$a, 0, 0, 0);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div, anchor);

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

    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			if (default_slot) {
    				if (default_slot.p && (!current || dirty & /*$$scope*/ 1)) {
    					update_slot_base(
    						default_slot,
    						default_slot_template,
    						ctx,
    						/*$$scope*/ ctx[0],
    						!current
    						? get_all_dirty_from_scope(/*$$scope*/ ctx[0])
    						: get_slot_changes(default_slot_template, /*$$scope*/ ctx[0], dirty, null),
    						null
    					);
    				}
    			}
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(default_slot, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(default_slot, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div);
    			if (default_slot) default_slot.d(detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$b.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$b($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Card', slots, ['default']);
    	const writable_props = [];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Card> was created with unknown prop '${key}'`);
    	});

    	$$self.$$set = $$props => {
    		if ('$$scope' in $$props) $$invalidate(0, $$scope = $$props.$$scope);
    	};

    	return [$$scope, slots];
    }

    class Card extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$b, create_fragment$b, safe_not_equal, {});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Card",
    			options,
    			id: create_fragment$b.name
    		});
    	}
    }

    /* src/pieces/Button.svelte generated by Svelte v3.53.1 */

    const file$9 = "src/pieces/Button.svelte";

    function create_fragment$a(ctx) {
    	let button;
    	let button_class_value;
    	let current;
    	let mounted;
    	let dispose;
    	const default_slot_template = /*#slots*/ ctx[4].default;
    	const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[3], null);

    	const block = {
    		c: function create() {
    			button = element("button");
    			if (default_slot) default_slot.c();
    			attr_dev(button, "class", button_class_value = "" + (null_to_empty(/*type*/ ctx[0]) + " svelte-1u0z9cq"));
    			toggle_class(button, "flat", /*flat*/ ctx[1]);
    			toggle_class(button, "inverse", /*inverse*/ ctx[2]);
    			add_location(button, file$9, 10, 0, 602);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, button, anchor);

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

    			current = true;

    			if (!mounted) {
    				dispose = listen_dev(button, "click", /*click_handler*/ ctx[5], false, false, false);
    				mounted = true;
    			}
    		},
    		p: function update(ctx, [dirty]) {
    			if (default_slot) {
    				if (default_slot.p && (!current || dirty & /*$$scope*/ 8)) {
    					update_slot_base(
    						default_slot,
    						default_slot_template,
    						ctx,
    						/*$$scope*/ ctx[3],
    						!current
    						? get_all_dirty_from_scope(/*$$scope*/ ctx[3])
    						: get_slot_changes(default_slot_template, /*$$scope*/ ctx[3], dirty, null),
    						null
    					);
    				}
    			}

    			if (!current || dirty & /*type*/ 1 && button_class_value !== (button_class_value = "" + (null_to_empty(/*type*/ ctx[0]) + " svelte-1u0z9cq"))) {
    				attr_dev(button, "class", button_class_value);
    			}

    			if (!current || dirty & /*type, flat*/ 3) {
    				toggle_class(button, "flat", /*flat*/ ctx[1]);
    			}

    			if (!current || dirty & /*type, inverse*/ 5) {
    				toggle_class(button, "inverse", /*inverse*/ ctx[2]);
    			}
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(default_slot, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(default_slot, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(button);
    			if (default_slot) default_slot.d(detaching);
    			mounted = false;
    			dispose();
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$a.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$a($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Button', slots, ['default']);
    	let { type = 'primary' } = $$props;
    	let { flat = false } = $$props;
    	let { inverse = false } = $$props;
    	const writable_props = ['type', 'flat', 'inverse'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Button> was created with unknown prop '${key}'`);
    	});

    	function click_handler(event) {
    		bubble.call(this, $$self, event);
    	}

    	$$self.$$set = $$props => {
    		if ('type' in $$props) $$invalidate(0, type = $$props.type);
    		if ('flat' in $$props) $$invalidate(1, flat = $$props.flat);
    		if ('inverse' in $$props) $$invalidate(2, inverse = $$props.inverse);
    		if ('$$scope' in $$props) $$invalidate(3, $$scope = $$props.$$scope);
    	};

    	$$self.$capture_state = () => ({ type, flat, inverse });

    	$$self.$inject_state = $$props => {
    		if ('type' in $$props) $$invalidate(0, type = $$props.type);
    		if ('flat' in $$props) $$invalidate(1, flat = $$props.flat);
    		if ('inverse' in $$props) $$invalidate(2, inverse = $$props.inverse);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [type, flat, inverse, $$scope, slots, click_handler];
    }

    class Button extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$a, create_fragment$a, safe_not_equal, { type: 0, flat: 1, inverse: 2 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Button",
    			options,
    			id: create_fragment$a.name
    		});
    	}

    	get type() {
    		throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set type(value) {
    		throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get flat() {
    		throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set flat(value) {
    		throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	get inverse() {
    		throw new Error("<Button>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set inverse(value) {
    		throw new Error("<Button>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pages/profile/ProfileSettings.svelte generated by Svelte v3.53.1 */

    const { console: console_1$4 } = globals;
    const file$8 = "src/pages/profile/ProfileSettings.svelte";

    // (122:8) <Button type="secondary">
    function create_default_slot_3(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("Update Settings");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_3.name,
    		type: "slot",
    		source: "(122:8) <Button type=\\\"secondary\\\">",
    		ctx
    	});

    	return block;
    }

    // (107:4) <Card>
    function create_default_slot_2(ctx) {
    	let form;
    	let div3;
    	let div0;
    	let t1;
    	let input0;
    	let input0_placeholder_value;
    	let t2;
    	let div1;
    	let t3_value = /*success*/ ctx[5].username + "";
    	let t3;
    	let t4;
    	let div2;
    	let t5_value = /*errors*/ ctx[4].username + "";
    	let t5;
    	let t6;
    	let div6;
    	let div4;
    	let t8;
    	let input1;
    	let t9;
    	let div5;
    	let t10_value = /*errors*/ ctx[4].checkbox + "";
    	let t10;
    	let t11;
    	let button;
    	let current;
    	let mounted;
    	let dispose;

    	button = new Button({
    			props: {
    				type: "secondary",
    				$$slots: { default: [create_default_slot_3] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	const block = {
    		c: function create() {
    			form = element("form");
    			div3 = element("div");
    			div0 = element("div");
    			div0.textContent = "New Username";
    			t1 = space();
    			input0 = element("input");
    			t2 = space();
    			div1 = element("div");
    			t3 = text(t3_value);
    			t4 = space();
    			div2 = element("div");
    			t5 = text(t5_value);
    			t6 = space();
    			div6 = element("div");
    			div4 = element("div");
    			div4.textContent = "Set Two Factor Authentication";
    			t8 = space();
    			input1 = element("input");
    			t9 = space();
    			div5 = element("div");
    			t10 = text(t10_value);
    			t11 = space();
    			create_component(button.$$.fragment);
    			attr_dev(div0, "class", "label svelte-qtbld7");
    			add_location(div0, file$8, 109, 10, 3974);
    			attr_dev(input0, "type", "text");
    			attr_dev(input0, "placeholder", input0_placeholder_value = "current username: " + /*nameTmp*/ ctx[3]);
    			add_location(input0, file$8, 112, 10, 4208);
    			attr_dev(div1, "class", "success svelte-qtbld7");
    			add_location(div1, file$8, 113, 8, 4304);
    			attr_dev(div2, "class", "error svelte-qtbld7");
    			add_location(div2, file$8, 114, 10, 4360);
    			attr_dev(div3, "class", "form-field svelte-qtbld7");
    			add_location(div3, file$8, 108, 8, 3939);
    			attr_dev(div4, "class", "label inline-check svelte-qtbld7");
    			add_location(div4, file$8, 117, 10, 4461);
    			attr_dev(input1, "class", "inline-check svelte-qtbld7");
    			attr_dev(input1, "type", "checkbox");
    			add_location(input1, file$8, 118, 10, 4539);
    			attr_dev(div5, "class", "error svelte-qtbld7");
    			add_location(div5, file$8, 119, 10, 4617);
    			attr_dev(div6, "class", "form-field svelte-qtbld7");
    			add_location(div6, file$8, 116, 8, 4426);
    			attr_dev(form, "class", "svelte-qtbld7");
    			add_location(form, file$8, 107, 6, 3881);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, form, anchor);
    			append_dev(form, div3);
    			append_dev(div3, div0);
    			append_dev(div3, t1);
    			append_dev(div3, input0);
    			set_input_value(input0, /*set*/ ctx[2].username);
    			append_dev(div3, t2);
    			append_dev(div3, div1);
    			append_dev(div1, t3);
    			append_dev(div3, t4);
    			append_dev(div3, div2);
    			append_dev(div2, t5);
    			append_dev(form, t6);
    			append_dev(form, div6);
    			append_dev(div6, div4);
    			append_dev(div6, t8);
    			append_dev(div6, input1);
    			input1.checked = /*set*/ ctx[2].tfa;
    			append_dev(div6, t9);
    			append_dev(div6, div5);
    			append_dev(div5, t10);
    			append_dev(form, t11);
    			mount_component(button, form, null);
    			current = true;

    			if (!mounted) {
    				dispose = [
    					listen_dev(input0, "input", /*input0_input_handler*/ ctx[8]),
    					listen_dev(input1, "change", /*input1_change_handler*/ ctx[9]),
    					listen_dev(form, "submit", prevent_default(/*settingsHandler*/ ctx[6]), false, true, false)
    				];

    				mounted = true;
    			}
    		},
    		p: function update(ctx, dirty) {
    			if (!current || dirty & /*nameTmp*/ 8 && input0_placeholder_value !== (input0_placeholder_value = "current username: " + /*nameTmp*/ ctx[3])) {
    				attr_dev(input0, "placeholder", input0_placeholder_value);
    			}

    			if (dirty & /*set*/ 4 && input0.value !== /*set*/ ctx[2].username) {
    				set_input_value(input0, /*set*/ ctx[2].username);
    			}

    			if ((!current || dirty & /*success*/ 32) && t3_value !== (t3_value = /*success*/ ctx[5].username + "")) set_data_dev(t3, t3_value);
    			if ((!current || dirty & /*errors*/ 16) && t5_value !== (t5_value = /*errors*/ ctx[4].username + "")) set_data_dev(t5, t5_value);

    			if (dirty & /*set*/ 4) {
    				input1.checked = /*set*/ ctx[2].tfa;
    			}

    			if ((!current || dirty & /*errors*/ 16) && t10_value !== (t10_value = /*errors*/ ctx[4].checkbox + "")) set_data_dev(t10, t10_value);
    			const button_changes = {};

    			if (dirty & /*$$scope*/ 8192) {
    				button_changes.$$scope = { dirty, ctx };
    			}

    			button.$set(button_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(form);
    			destroy_component(button);
    			mounted = false;
    			run_all(dispose);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_2.name,
    		type: "slot",
    		source: "(107:4) <Card>",
    		ctx
    	});

    	return block;
    }

    // (128:6) {#if avatar !== undefined}
    function create_if_block$4(ctx) {
    	let img;
    	let img_src_value;

    	const block = {
    		c: function create() {
    			img = element("img");
    			attr_dev(img, "class", "avatar svelte-qtbld7");
    			if (!src_url_equal(img.src, img_src_value = /*avatar*/ ctx[0])) attr_dev(img, "src", img_src_value);
    			attr_dev(img, "alt", "your avatar");
    			add_location(img, file$8, 128, 8, 4905);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, img, anchor);
    		},
    		p: function update(ctx, dirty) {
    			if (dirty & /*avatar*/ 1 && !src_url_equal(img.src, img_src_value = /*avatar*/ ctx[0])) {
    				attr_dev(img, "src", img_src_value);
    			}
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(img);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block$4.name,
    		type: "if",
    		source: "(128:6) {#if avatar !== undefined}",
    		ctx
    	});

    	return block;
    }

    // (139:8) <Button type={newAvatar === undefined ? "primary" : "secondary"}>
    function create_default_slot_1(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("Upload Avatar");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot_1.name,
    		type: "slot",
    		source: "(139:8) <Button type={newAvatar === undefined ? \\\"primary\\\" : \\\"secondary\\\"}>",
    		ctx
    	});

    	return block;
    }

    // (126:4) <Card>
    function create_default_slot$1(ctx) {
    	let t0;
    	let form;
    	let div2;
    	let div0;
    	let t2;
    	let input;
    	let t3;
    	let div1;
    	let t4_value = /*errors*/ ctx[4].avatar + "";
    	let t4;
    	let t5;
    	let button;
    	let current;
    	let mounted;
    	let dispose;
    	let if_block = /*avatar*/ ctx[0] !== undefined && create_if_block$4(ctx);

    	button = new Button({
    			props: {
    				type: /*newAvatar*/ ctx[1] === undefined
    				? "primary"
    				: "secondary",
    				$$slots: { default: [create_default_slot_1] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	const block = {
    		c: function create() {
    			if (if_block) if_block.c();
    			t0 = space();
    			form = element("form");
    			div2 = element("div");
    			div0 = element("div");
    			div0.textContent = "Pick a new Avatar";
    			t2 = space();
    			input = element("input");
    			t3 = space();
    			div1 = element("div");
    			t4 = text(t4_value);
    			t5 = space();
    			create_component(button.$$.fragment);
    			attr_dev(div0, "class", "label svelte-qtbld7");
    			add_location(div0, file$8, 134, 10, 5211);
    			attr_dev(input, "type", "file");
    			add_location(input, file$8, 135, 10, 5264);
    			attr_dev(div1, "class", "error svelte-qtbld7");
    			add_location(div1, file$8, 136, 10, 5318);
    			attr_dev(div2, "class", "form-field svelte-qtbld7");
    			add_location(div2, file$8, 133, 8, 5176);
    			attr_dev(form, "class", "svelte-qtbld7");
    			add_location(form, file$8, 130, 6, 4976);
    		},
    		m: function mount(target, anchor) {
    			if (if_block) if_block.m(target, anchor);
    			insert_dev(target, t0, anchor);
    			insert_dev(target, form, anchor);
    			append_dev(form, div2);
    			append_dev(div2, div0);
    			append_dev(div2, t2);
    			append_dev(div2, input);
    			append_dev(div2, t3);
    			append_dev(div2, div1);
    			append_dev(div1, t4);
    			append_dev(form, t5);
    			mount_component(button, form, null);
    			current = true;

    			if (!mounted) {
    				dispose = [
    					listen_dev(input, "change", /*input_change_handler*/ ctx[10]),
    					listen_dev(form, "submit", prevent_default(/*uploadAvatar*/ ctx[7]), false, true, false)
    				];

    				mounted = true;
    			}
    		},
    		p: function update(ctx, dirty) {
    			if (/*avatar*/ ctx[0] !== undefined) {
    				if (if_block) {
    					if_block.p(ctx, dirty);
    				} else {
    					if_block = create_if_block$4(ctx);
    					if_block.c();
    					if_block.m(t0.parentNode, t0);
    				}
    			} else if (if_block) {
    				if_block.d(1);
    				if_block = null;
    			}

    			if ((!current || dirty & /*errors*/ 16) && t4_value !== (t4_value = /*errors*/ ctx[4].avatar + "")) set_data_dev(t4, t4_value);
    			const button_changes = {};

    			if (dirty & /*newAvatar*/ 2) button_changes.type = /*newAvatar*/ ctx[1] === undefined
    			? "primary"
    			: "secondary";

    			if (dirty & /*$$scope*/ 8192) {
    				button_changes.$$scope = { dirty, ctx };
    			}

    			button.$set(button_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(button.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(button.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (if_block) if_block.d(detaching);
    			if (detaching) detach_dev(t0);
    			if (detaching) detach_dev(form);
    			destroy_component(button);
    			mounted = false;
    			run_all(dispose);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot$1.name,
    		type: "slot",
    		source: "(126:4) <Card>",
    		ctx
    	});

    	return block;
    }

    function create_fragment$9(ctx) {
    	let main;
    	let h2;
    	let t1;
    	let div;
    	let card0;
    	let t2;
    	let card1;
    	let current;

    	card0 = new Card({
    			props: {
    				$$slots: { default: [create_default_slot_2] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	card1 = new Card({
    			props: {
    				$$slots: { default: [create_default_slot$1] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	const block = {
    		c: function create() {
    			main = element("main");
    			h2 = element("h2");
    			h2.textContent = "Look! You can change stuff";
    			t1 = space();
    			div = element("div");
    			create_component(card0.$$.fragment);
    			t2 = space();
    			create_component(card1.$$.fragment);
    			add_location(h2, file$8, 104, 2, 3806);
    			attr_dev(div, "class", "cards svelte-qtbld7");
    			add_location(div, file$8, 105, 2, 3844);
    			attr_dev(main, "class", "svelte-qtbld7");
    			add_location(main, file$8, 103, 0, 3797);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, main, anchor);
    			append_dev(main, h2);
    			append_dev(main, t1);
    			append_dev(main, div);
    			mount_component(card0, div, null);
    			append_dev(div, t2);
    			mount_component(card1, div, null);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			const card0_changes = {};

    			if (dirty & /*$$scope, errors, set, success, nameTmp*/ 8252) {
    				card0_changes.$$scope = { dirty, ctx };
    			}

    			card0.$set(card0_changes);
    			const card1_changes = {};

    			if (dirty & /*$$scope, newAvatar, errors, avatar*/ 8211) {
    				card1_changes.$$scope = { dirty, ctx };
    			}

    			card1.$set(card1_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(card0.$$.fragment, local);
    			transition_in(card1.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(card0.$$.fragment, local);
    			transition_out(card1.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(main);
    			destroy_component(card0);
    			destroy_component(card1);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$9.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$9($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('ProfileSettings', slots, []);
    	let user;
    	let avatar, newAvatar;
    	let uploadAvatarSuccess = false;

    	// tbh i might not need this...
    	let set = { username: '', tfa: false };

    	let nameTmp; // annoying...
    	const errors = { username: '', checkbox: '', avatar: '' };
    	let success = { username: '', avatar: '' };

    	onMount(async () => {
    		user = await fetch('http://transcendance:8080/api/v2/user').then(x => x.json());

    		// do a .catch?
    		if (user === undefined) {
    			console.log('User did not load, something more official should prolly happen');
    		}

    		// i don't unerstand why this is necessary but it really doesn't like it otherwise
    		$$invalidate(3, nameTmp = user.username);

    		console.log(user.username);
    		$$invalidate(2, set.tfa = user.isEnabledTwoFactorAuth, set);

    		// tmp
    		// console.log('this is what is in the avatar before fetch')
    		// console.log(avatar)
    		await fetch("http://transcendance:8080/api/v2/user/avatar", { method: "GET" }).then(response => {
    			return response.blob();
    		}).then(data => {
    			const url = URL.createObjectURL(data);
    			$$invalidate(0, avatar = url);
    		}).catch(() => $$invalidate(4, errors.avatar = 'Sorry your avatar could not be loaded', errors));
    	}); // .then(() => errors.avatar = '' ) // unnecessary i think cuz in on mount...
    	// tmp
    	// console.log('this is what is in the avatar')
    	// console.log(avatar)

    	// console.log('this is what is in the NEW Avatar')
    	// console.log(newAvatar)
    	const settingsHandler = async () => {
    		// I don't really care which i use at this point...
    		// if (set.username === nameTmp) {
    		if (set.username.trim() === '' && set.tfa === user.isEnabledTwoFactorAuth) {
    			$$invalidate(4, errors.username = 'Invalid new username', errors);
    			return;
    		} else if (set.username.trim() === '' && set.tfa !== user.isEnabledTwoFactorAuth) {
    			$$invalidate(2, set.username = user.username, set);
    		} else {
    			$$invalidate(4, errors.username = '', errors);
    		}

    		await fetch('http://transcendance:8080/api/v2/user', {
    			method: 'PATCH',
    			headers: { 'Content-Type': 'application/json' },
    			body: JSON.stringify({
    				"username": set.username,
    				"isEnabledTwoFactorAuth": set.tfa
    			})
    		}).then(response => {
    			if (response.status === 200) $$invalidate(5, success.username = "Your changes have been saved", success); else if (response.status === 201) push("/2fa"); else $$invalidate(4, errors.username = "Something went wrong", errors);
    		}).catch(err => $$invalidate(4, errors.username = err, errors));
    	}; // .then((result) => console.log(result))
    	// .then(() => console.log('successful sub of new settings'))

    	const uploadAvatar = async () => {
    		$$invalidate(4, errors.avatar = '', errors);

    		if (newAvatar === undefined) {
    			$$invalidate(4, errors.avatar = 'You need to pick a file.', errors);
    			return;
    		}

    		const data = new FormData();
    		data.append("file", newAvatar[0]);

    		// tmp
    		console.log(data);

    		await fetch("http://transcendance:8080/api/v2/user/avatar", { method: 'POST', body: data }).then(() => uploadAvatarSuccess = true).then(() => $$invalidate(5, success.avatar = 'Your changes have been saved', success)).catch(() => $$invalidate(4, errors.avatar = 'Sorry failed to upload your new Avatar', errors)); // for some reason it needs to be a function, i think a TS thing, not a promis otherwise

    		await fetch("http://transcendance:8080/api/v2/user/avatar", { method: "GET" }).then(response => {
    			return response.blob();
    		}).then(data => {
    			const url = URL.createObjectURL(data);
    			$$invalidate(0, avatar = url);
    		}).catch(() => $$invalidate(4, errors.avatar = 'Sorry your avatar could not be loaded', errors));
    	};

    	const writable_props = [];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$4.warn(`<ProfileSettings> was created with unknown prop '${key}'`);
    	});

    	function input0_input_handler() {
    		set.username = this.value;
    		$$invalidate(2, set);
    	}

    	function input1_change_handler() {
    		set.tfa = this.checked;
    		$$invalidate(2, set);
    	}

    	function input_change_handler() {
    		newAvatar = this.files;
    		$$invalidate(1, newAvatar);
    	}

    	$$self.$capture_state = () => ({
    		Card,
    		onMount,
    		push,
    		Button,
    		user,
    		avatar,
    		newAvatar,
    		uploadAvatarSuccess,
    		set,
    		nameTmp,
    		errors,
    		success,
    		settingsHandler,
    		uploadAvatar
    	});

    	$$self.$inject_state = $$props => {
    		if ('user' in $$props) user = $$props.user;
    		if ('avatar' in $$props) $$invalidate(0, avatar = $$props.avatar);
    		if ('newAvatar' in $$props) $$invalidate(1, newAvatar = $$props.newAvatar);
    		if ('uploadAvatarSuccess' in $$props) uploadAvatarSuccess = $$props.uploadAvatarSuccess;
    		if ('set' in $$props) $$invalidate(2, set = $$props.set);
    		if ('nameTmp' in $$props) $$invalidate(3, nameTmp = $$props.nameTmp);
    		if ('success' in $$props) $$invalidate(5, success = $$props.success);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [
    		avatar,
    		newAvatar,
    		set,
    		nameTmp,
    		errors,
    		success,
    		settingsHandler,
    		uploadAvatar,
    		input0_input_handler,
    		input1_change_handler,
    		input_change_handler
    	];
    }

    class ProfileSettings extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$9, create_fragment$9, safe_not_equal, {});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "ProfileSettings",
    			options,
    			id: create_fragment$9.name
    		});
    	}
    }

    /* src/pieces/DisplayAUser.svelte generated by Svelte v3.53.1 */

    const { console: console_1$3 } = globals;
    const file$7 = "src/pieces/DisplayAUser.svelte";

    // (37:0) {:else}
    function create_else_block$2(ctx) {
    	let h2;
    	let t1;
    	let div;
    	let t2;
    	let t3;

    	const block = {
    		c: function create() {
    			h2 = element("h2");
    			h2.textContent = "Sorry";
    			t1 = space();
    			div = element("div");
    			t2 = text("Failed to load user ");
    			t3 = text(/*aUsername*/ ctx[0]);
    			add_location(h2, file$7, 37, 2, 1502);
    			add_location(div, file$7, 38, 2, 1519);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, h2, anchor);
    			insert_dev(target, t1, anchor);
    			insert_dev(target, div, anchor);
    			append_dev(div, t2);
    			append_dev(div, t3);
    		},
    		p: function update(ctx, dirty) {
    			if (dirty & /*aUsername*/ 1) set_data_dev(t3, /*aUsername*/ ctx[0]);
    		},
    		i: noop,
    		o: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(h2);
    			if (detaching) detach_dev(t1);
    			if (detaching) detach_dev(div);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_else_block$2.name,
    		type: "else",
    		source: "(37:0) {:else}",
    		ctx
    	});

    	return block;
    }

    // (34:0) {#if user !== undefined}
    function create_if_block$3(ctx) {
    	let generateuserdisplay;
    	let updating_user;
    	let current;

    	function generateuserdisplay_user_binding(value) {
    		/*generateuserdisplay_user_binding*/ ctx[2](value);
    	}

    	let generateuserdisplay_props = { primary: true };

    	if (/*user*/ ctx[1] !== void 0) {
    		generateuserdisplay_props.user = /*user*/ ctx[1];
    	}

    	generateuserdisplay = new GenerateUserDisplay({
    			props: generateuserdisplay_props,
    			$$inline: true
    		});

    	binding_callbacks.push(() => bind(generateuserdisplay, 'user', generateuserdisplay_user_binding));

    	const block = {
    		c: function create() {
    			create_component(generateuserdisplay.$$.fragment);
    		},
    		m: function mount(target, anchor) {
    			mount_component(generateuserdisplay, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			const generateuserdisplay_changes = {};

    			if (!updating_user && dirty & /*user*/ 2) {
    				updating_user = true;
    				generateuserdisplay_changes.user = /*user*/ ctx[1];
    				add_flush_callback(() => updating_user = false);
    			}

    			generateuserdisplay.$set(generateuserdisplay_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(generateuserdisplay.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(generateuserdisplay.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(generateuserdisplay, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block$3.name,
    		type: "if",
    		source: "(34:0) {#if user !== undefined}",
    		ctx
    	});

    	return block;
    }

    function create_fragment$8(ctx) {
    	let current_block_type_index;
    	let if_block;
    	let if_block_anchor;
    	let current;
    	const if_block_creators = [create_if_block$3, create_else_block$2];
    	const if_blocks = [];

    	function select_block_type(ctx, dirty) {
    		if (/*user*/ ctx[1] !== undefined) return 0;
    		return 1;
    	}

    	current_block_type_index = select_block_type(ctx);
    	if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);

    	const block = {
    		c: function create() {
    			if_block.c();
    			if_block_anchor = empty();
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			if_blocks[current_block_type_index].m(target, anchor);
    			insert_dev(target, if_block_anchor, anchor);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			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_blocks[current_block_type_index].p(ctx, dirty);
    			} else {
    				group_outros();

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

    				check_outros();
    				if_block = if_blocks[current_block_type_index];

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

    				transition_in(if_block, 1);
    				if_block.m(if_block_anchor.parentNode, if_block_anchor);
    			}
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(if_block);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(if_block);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if_blocks[current_block_type_index].d(detaching);
    			if (detaching) detach_dev(if_block_anchor);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$8.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$8($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('DisplayAUser', slots, []);
    	let { aUsername } = $$props;
    	let user;

    	onMount(async () => {
    		console.log('Display aUser username: ' + aUsername);

    		// http://transcendance:8080/api/v2/user?username=NomDuUserATrouver
    		$$invalidate(1, user = await fetch(`http://transcendance:8080/api/v2/user?username=${aUsername}`).then(x => x.json()));
    	}); // console.log('Display a user: ')
    	// console.log({...user})

    	// $: {
    	//   updateUser(aUsername);
    	// }
    	const updateUser = async updatedUser => {
    		console.log('Display Update aUser username: ' + updateUser);

    		// http://transcendance:8080/api/v2/user?username=NomDuUserATrouver
    		$$invalidate(1, user = await fetch(`http://transcendance:8080/api/v2/user?username=${updateUser}`).then(x => x.json()));
    	};

    	$$self.$$.on_mount.push(function () {
    		if (aUsername === undefined && !('aUsername' in $$props || $$self.$$.bound[$$self.$$.props['aUsername']])) {
    			console_1$3.warn("<DisplayAUser> was created without expected prop 'aUsername'");
    		}
    	});

    	const writable_props = ['aUsername'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$3.warn(`<DisplayAUser> was created with unknown prop '${key}'`);
    	});

    	function generateuserdisplay_user_binding(value) {
    		user = value;
    		$$invalidate(1, user);
    	}

    	$$self.$$set = $$props => {
    		if ('aUsername' in $$props) $$invalidate(0, aUsername = $$props.aUsername);
    	};

    	$$self.$capture_state = () => ({
    		onMount,
    		GenerateUserDisplay,
    		aUsername,
    		user,
    		updateUser
    	});

    	$$self.$inject_state = $$props => {
    		if ('aUsername' in $$props) $$invalidate(0, aUsername = $$props.aUsername);
    		if ('user' in $$props) $$invalidate(1, user = $$props.user);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [aUsername, user, generateuserdisplay_user_binding];
    }

    class DisplayAUser extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$8, create_fragment$8, safe_not_equal, { aUsername: 0 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "DisplayAUser",
    			options,
    			id: create_fragment$8.name
    		});
    	}

    	get aUsername() {
    		throw new Error("<DisplayAUser>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set aUsername(value) {
    		throw new Error("<DisplayAUser>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    /* src/pages/profile/ProfileFriends.svelte generated by Svelte v3.53.1 */
    const file$6 = "src/pages/profile/ProfileFriends.svelte";

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

    // (112:4) {:else}
    function create_else_block$1(ctx) {
    	let each_1_anchor;
    	let each_value = /*allUsers*/ ctx[0];
    	validate_each_argument(each_value);
    	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));
    	}

    	const block = {
    		c: function create() {
    			for (let i = 0; i < each_blocks.length; i += 1) {
    				each_blocks[i].c();
    			}

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

    			insert_dev(target, each_1_anchor, anchor);
    		},
    		p: function update(ctx, dirty) {
    			if (dirty & /*allUsers, viewAUser*/ 9) {
    				each_value = /*allUsers*/ ctx[0];
    				validate_each_argument(each_value);
    				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: function destroy(detaching) {
    			destroy_each(each_blocks, detaching);
    			if (detaching) detach_dev(each_1_anchor);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_else_block$1.name,
    		type: "else",
    		source: "(112:4) {:else}",
    		ctx
    	});

    	return block;
    }

    // (110:4) {#if allUsers === undefined}
    function create_if_block_1(ctx) {
    	let div;

    	const block = {
    		c: function create() {
    			div = element("div");
    			div.textContent = "Failed to load all users";
    			attr_dev(div, "class", "error svelte-55f7si");
    			add_location(div, file$6, 110, 6, 3972);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div, anchor);
    		},
    		p: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block_1.name,
    		type: "if",
    		source: "(110:4) {#if allUsers === undefined}",
    		ctx
    	});

    	return block;
    }

    // (119:6) {#each allUsers as aUser }
    function create_each_block(ctx) {
    	let div0;
    	let t0_value = /*aUser*/ ctx[17].username + "";
    	let t0;
    	let t1;
    	let div1;
    	let t2_value = /*aUser*/ ctx[17].status + "";
    	let t2;
    	let t3;
    	let br;
    	let mounted;
    	let dispose;

    	function click_handler() {
    		return /*click_handler*/ ctx[4](/*aUser*/ ctx[17]);
    	}

    	const block = {
    		c: function create() {
    			div0 = element("div");
    			t0 = text(t0_value);
    			t1 = space();
    			div1 = element("div");
    			t2 = text(t2_value);
    			t3 = space();
    			br = element("br");
    			attr_dev(div0, "class", "a-user svelte-55f7si");
    			add_location(div0, file$6, 120, 8, 4506);
    			attr_dev(div1, "class", "status a-user svelte-55f7si");
    			add_location(div1, file$6, 124, 8, 4775);
    			add_location(br, file$6, 125, 8, 4831);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div0, anchor);
    			append_dev(div0, t0);
    			insert_dev(target, t1, anchor);
    			insert_dev(target, div1, anchor);
    			append_dev(div1, t2);
    			insert_dev(target, t3, anchor);
    			insert_dev(target, br, anchor);

    			if (!mounted) {
    				dispose = listen_dev(div0, "click", click_handler, false, false, false);
    				mounted = true;
    			}
    		},
    		p: function update(new_ctx, dirty) {
    			ctx = new_ctx;
    			if (dirty & /*allUsers*/ 1 && t0_value !== (t0_value = /*aUser*/ ctx[17].username + "")) set_data_dev(t0, t0_value);
    			if (dirty & /*allUsers*/ 1 && t2_value !== (t2_value = /*aUser*/ ctx[17].status + "")) set_data_dev(t2, t2_value);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div0);
    			if (detaching) detach_dev(t1);
    			if (detaching) detach_dev(div1);
    			if (detaching) detach_dev(t3);
    			if (detaching) detach_dev(br);
    			mounted = false;
    			dispose();
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_each_block.name,
    		type: "each",
    		source: "(119:6) {#each allUsers as aUser }",
    		ctx
    	});

    	return block;
    }

    // (141:4) {#if userBeingViewed}
    function create_if_block$2(ctx) {
    	let div;
    	let t0_value = /*userBeingViewed*/ ctx[1].username + "";
    	let t0;
    	let t1;
    	let displayauser;
    	let t2;
    	let button;
    	let current;

    	displayauser = new DisplayAUser({
    			props: {
    				aUsername: /*userBeingViewed*/ ctx[1].username
    			},
    			$$inline: true
    		});

    	button = new Button({
    			props: {
    				type: "secondary",
    				$$slots: { default: [create_default_slot] },
    				$$scope: { ctx }
    			},
    			$$inline: true
    		});

    	button.$on("click", /*click_handler_1*/ ctx[5]);

    	const block = {
    		c: function create() {
    			div = element("div");
    			t0 = text(t0_value);
    			t1 = space();
    			create_component(displayauser.$$.fragment);
    			t2 = space();
    			create_component(button.$$.fragment);
    			add_location(div, file$6, 141, 6, 5200);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div, anchor);
    			append_dev(div, t0);
    			insert_dev(target, t1, anchor);
    			mount_component(displayauser, target, anchor);
    			insert_dev(target, t2, anchor);
    			mount_component(button, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, dirty) {
    			if ((!current || dirty & /*userBeingViewed*/ 2) && t0_value !== (t0_value = /*userBeingViewed*/ ctx[1].username + "")) set_data_dev(t0, t0_value);
    			const displayauser_changes = {};
    			if (dirty & /*userBeingViewed*/ 2) displayauser_changes.aUsername = /*userBeingViewed*/ ctx[1].username;
    			displayauser.$set(displayauser_changes);
    			const button_changes = {};

    			if (dirty & /*$$scope*/ 1048576) {
    				button_changes.$$scope = { dirty, ctx };
    			}

    			button.$set(button_changes);
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(displayauser.$$.fragment, local);
    			transition_in(button.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(displayauser.$$.fragment, local);
    			transition_out(button.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div);
    			if (detaching) detach_dev(t1);
    			destroy_component(displayauser, detaching);
    			if (detaching) detach_dev(t2);
    			destroy_component(button, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block$2.name,
    		type: "if",
    		source: "(141:4) {#if userBeingViewed}",
    		ctx
    	});

    	return block;
    }

    // (146:6) <Button type="secondary" on:click={() => sendFriendRequest(userBeingViewed.username)}>
    function create_default_slot(ctx) {
    	let t;

    	const block = {
    		c: function create() {
    			t = text("Add Friend");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, t, anchor);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(t);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_default_slot.name,
    		type: "slot",
    		source: "(146:6) <Button type=\\\"secondary\\\" on:click={() => sendFriendRequest(userBeingViewed.username)}>",
    		ctx
    	});

    	return block;
    }

    function create_fragment$7(ctx) {
    	let div2;
    	let div0;
    	let h3;
    	let t1;
    	let t2;
    	let div1;
    	let h1;
    	let t4;
    	let current;

    	function select_block_type(ctx, dirty) {
    		if (/*allUsers*/ ctx[0] === undefined) return create_if_block_1;
    		return create_else_block$1;
    	}

    	let current_block_type = select_block_type(ctx);
    	let if_block0 = current_block_type(ctx);
    	let if_block1 = /*userBeingViewed*/ ctx[1] && create_if_block$2(ctx);

    	const block = {
    		c: function create() {
    			div2 = element("div");
    			div0 = element("div");
    			h3 = element("h3");
    			h3.textContent = "All Users";
    			t1 = space();
    			if_block0.c();
    			t2 = space();
    			div1 = element("div");
    			h1 = element("h1");
    			h1.textContent = "Main Display";
    			t4 = space();
    			if (if_block1) if_block1.c();
    			add_location(h3, file$6, 108, 4, 3914);
    			attr_dev(div0, "class", "all-users-sidebar svelte-55f7si");
    			add_location(div0, file$6, 107, 2, 3878);
    			add_location(h1, file$6, 134, 4, 4906);
    			attr_dev(div1, "class", "main-display svelte-55f7si");
    			add_location(div1, file$6, 132, 2, 4874);
    			attr_dev(div2, "class", "top-grid svelte-55f7si");
    			add_location(div2, file$6, 105, 0, 3852);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div2, anchor);
    			append_dev(div2, div0);
    			append_dev(div0, h3);
    			append_dev(div0, t1);
    			if_block0.m(div0, null);
    			append_dev(div2, t2);
    			append_dev(div2, div1);
    			append_dev(div1, h1);
    			append_dev(div1, t4);
    			if (if_block1) if_block1.m(div1, null);
    			current = true;
    		},
    		p: function update(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(div0, null);
    				}
    			}

    			if (/*userBeingViewed*/ ctx[1]) {
    				if (if_block1) {
    					if_block1.p(ctx, dirty);

    					if (dirty & /*userBeingViewed*/ 2) {
    						transition_in(if_block1, 1);
    					}
    				} else {
    					if_block1 = create_if_block$2(ctx);
    					if_block1.c();
    					transition_in(if_block1, 1);
    					if_block1.m(div1, null);
    				}
    			} else if (if_block1) {
    				group_outros();

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

    				check_outros();
    			}
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(if_block1);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(if_block1);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div2);
    			if_block0.d();
    			if (if_block1) if_block1.d();
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$7.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$7($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('ProfileFriends', slots, []);
    	let errors = { friendRequest: '' };
    	let set = { friendUsername: '', friendId: Number };
    	let user;
    	let allUsers;
    	let myFriends;
    	let requestsMade, requestsRecieved;
    	let userBeingViewed;

    	onMount(async () => {
    		// yea no idea what
    		// i mean do i fetch user? i will for now
    		user = await fetch('http://transcendance:8080/api/v2/user').then(x => x.json());

    		// userBeingViewed = user;
    		// console.log('user is ')
    		// console.log(user)
    		// console.log(user.username)
    		myFriends = await fetch("http://transcendance:8080/api/v2/network/myfriends").then(x => x.json());

    		// console.log('my friends')
    		// console.log(myFriends)
    		requestsMade = await fetch('http://transcendance:8080/api/v2/network/pending').then(x => x.json());

    		// console.log('Requests pending ');
    		// console.log(requestsMade);
    		requestsRecieved = await fetch('http://transcendance:8080/api/v2/network/received').then(x => x.json());

    		// console.log('Requests received ');
    		// console.log(requestsRecieved);
    		$$invalidate(0, allUsers = await fetch('http://transcendance:8080/api/v2/user/all').then(x => x.json()));
    	}); // console.log('got all users ' + allUsers)

    	const displayAllUsers = async () => {
    		$$invalidate(0, allUsers = await fetch('http://transcendance:8080/api/v2/user/all').then(x => x.json()));
    	}; // console.log('got all users ' + allUsers)

    	const displayAllFriends = async () => {
    		myFriends = await fetch('http://transcendance:8080/api/v2/network/myfriends').then(x => x.json());
    	}; // console.log('got all friends ' + allFriends)

    	const displayRequestsMade = async () => {
    		requestsMade = await fetch('http://transcendance:8080/api/v2/network/pending').then(x => x.json());
    	}; // console.log('got requests made ' + requestsMade)

    	let sentFriendRequest;

    	const sendFriendRequest = async potentialFriendUsername => {
    		set.friendUsername = '';
    		errors.friendRequest = '';
    		let valid = false;

    		if (potentialFriendUsername === user.username) {
    			errors.friendRequest = "You can't friend yourself.";
    			valid = false;
    		} else {
    			set.friendUsername = potentialFriendUsername;
    			valid = true;
    		}

    		if (valid) {
    			sentFriendRequest = await fetch("http://transcendance:8080/api/v2/network/myfriends", {
    				method: "POST",
    				headers: { 'Content-Type': 'application/json' },
    				body: JSON.stringify({
    					"receiverUsername": set.friendUsername,
    					"status": "R"
    				})
    			}).then(x => x.json());
    		}
    	};

    	// let sendUsername;
    	const viewAUser = async aUser => {
    		$$invalidate(1, userBeingViewed = aUser);
    	}; // sendUsername = userBeingViewed.username;
    	// prolly like fetch if you're friends or not?
    	// GET http://transcendance:8080/api/v2/networks/myfriends?username=aUser but i need to make that as long as Cherif
    	// doesn't have a better option

    	// like i want this thing to return the Friendship ID ideally
    	const blockAUser = async friendshipId => {
    		
    	};

    	const writable_props = [];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<ProfileFriends> was created with unknown prop '${key}'`);
    	});

    	const click_handler = aUser => viewAUser(aUser);
    	const click_handler_1 = () => sendFriendRequest(userBeingViewed.username);

    	$$self.$capture_state = () => ({
    		onMount,
    		Button,
    		DisplayAUser,
    		errors,
    		set,
    		user,
    		allUsers,
    		myFriends,
    		requestsMade,
    		requestsRecieved,
    		userBeingViewed,
    		displayAllUsers,
    		displayAllFriends,
    		displayRequestsMade,
    		sentFriendRequest,
    		sendFriendRequest,
    		viewAUser,
    		blockAUser
    	});

    	$$self.$inject_state = $$props => {
    		if ('errors' in $$props) errors = $$props.errors;
    		if ('set' in $$props) set = $$props.set;
    		if ('user' in $$props) user = $$props.user;
    		if ('allUsers' in $$props) $$invalidate(0, allUsers = $$props.allUsers);
    		if ('myFriends' in $$props) myFriends = $$props.myFriends;
    		if ('requestsMade' in $$props) requestsMade = $$props.requestsMade;
    		if ('requestsRecieved' in $$props) requestsRecieved = $$props.requestsRecieved;
    		if ('userBeingViewed' in $$props) $$invalidate(1, userBeingViewed = $$props.userBeingViewed);
    		if ('sentFriendRequest' in $$props) sentFriendRequest = $$props.sentFriendRequest;
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [
    		allUsers,
    		userBeingViewed,
    		sendFriendRequest,
    		viewAUser,
    		click_handler,
    		click_handler_1
    	];
    }

    class ProfileFriends extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$7, create_fragment$7, safe_not_equal, {});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "ProfileFriends",
    			options,
    			id: create_fragment$7.name
    		});
    	}
    }

    // establishing the prefix here very clearly so we can have a coherent repeatable structure
    const prefix = '/profile';

    const profileRoutes = {
      '/': ProfileDisplay,
      '/settings': ProfileSettings,
      '/friends': ProfileFriends,
      '*': NotFound
    };

    // I think the conditions of access like are you authenticated work best when they are on the parent routes not the nested routes cuz i don't want my header showing up

    // export const profileRoutes = {
    //   '/': wrap({
    //     component: ProfileDisplay,
    //     conditions: [
    //       (detail) => {
    //         const { fortyTwo, tfa } = get(loginStatus);
    //         console.log(fortyTwo);
    //         console.log(tfa);
    //         console.log('in Profile Display');
    //         // return true;
    //         return (fortyTwo && tfa);
    //       }
    //     ]
    //   }),
    //   '/settings': wrap({
    //     component: ProfileSettings,
    //     conditions: [
    //       (detail) => {
    //         const { fortyTwo, tfa } = get(loginStatus);
    //         // console.log(fortyTwo);
    //         // console.log(tfa);
    //         // return true;
    //         return (fortyTwo && tfa);
    //       }
    //     ]
    //   }),
    //   '*': NotFound
    // };

    // what if i did /#/profile/:id for like not the user? and then based on that did a fetch?

    /* src/pages/profile/ProfilePage.svelte generated by Svelte v3.53.1 */
    const file$5 = "src/pages/profile/ProfilePage.svelte";

    function create_fragment$6(ctx) {
    	let header;
    	let t;
    	let div;
    	let router;
    	let current;
    	header = new Header({ $$inline: true });

    	router = new Router({
    			props: { routes: profileRoutes, prefix },
    			$$inline: true
    		});

    	const block = {
    		c: function create() {
    			create_component(header.$$.fragment);
    			t = space();
    			div = element("div");
    			create_component(router.$$.fragment);
    			add_location(div, file$5, 15, 0, 618);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			mount_component(header, target, anchor);
    			insert_dev(target, t, anchor);
    			insert_dev(target, div, anchor);
    			mount_component(router, div, null);
    			current = true;
    		},
    		p: noop,
    		i: function intro(local) {
    			if (current) return;
    			transition_in(header.$$.fragment, local);
    			transition_in(router.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(header.$$.fragment, local);
    			transition_out(router.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(header, detaching);
    			if (detaching) detach_dev(t);
    			if (detaching) detach_dev(div);
    			destroy_component(router);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$6.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$6($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('ProfilePage', slots, []);
    	const writable_props = [];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<ProfilePage> was created with unknown prop '${key}'`);
    	});

    	$$self.$capture_state = () => ({ Header, Router, profileRoutes, prefix });
    	return [];
    }

    class ProfilePage extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$6, create_fragment$6, safe_not_equal, {});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "ProfilePage",
    			options,
    			id: create_fragment$6.name
    		});
    	}
    }

    /* src/pieces/Canvas.svelte generated by Svelte v3.53.1 */
    const file$4 = "src/pieces/Canvas.svelte";

    function create_fragment$5(ctx) {
    	let canvas_1;

    	const block = {
    		c: function create() {
    			canvas_1 = element("canvas");
    			attr_dev(canvas_1, "width", window.innerWidth);
    			attr_dev(canvas_1, "height", window.innerHeight);
    			attr_dev(canvas_1, "class", "svelte-1bstsd0");
    			add_location(canvas_1, file$4, 76, 0, 2948);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, canvas_1, anchor);
    			/*canvas_1_binding*/ ctx[1](canvas_1);
    		},
    		p: noop,
    		i: noop,
    		o: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(canvas_1);
    			/*canvas_1_binding*/ ctx[1](null);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$5.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$5($$self, $$props, $$invalidate) {
    	let scaleRatio;
    	let nPotoatoRows;
    	let nPotoatoCols;
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('Canvas', slots, []);
    	let canvas;

    	// let img;
    	let loaded = false;

    	// i feel like they told me not to do this, new Image(), isn't there another way?
    	// never mind they do seem to do this shit...
    	// no idea if this should be in onMount...
    	const img = new Image();

    	img.src = 'img/potato_logo.png';

    	img.onload = () => {
    		loaded = true;
    	}; // not sure if i'll use this...

    	// $: spacing = (canvas.height - (img.height / scaleRatio * (nPotoatoRows - 1) )) / nPotoatoRows;
    	// apparently i might need to move all my reactive statements outside the onMount... not sure why...
    	onMount(() => {
    		// in this on mount we will set the canvas and the img
    		const ctx = canvas.getContext('2d');

    		// let frame = requestAnimationFrame(loop);
    		ctx.width = window.innerWidth;

    		ctx.height = window.innerHeight;

    		// console.log(nPotoatoCols);
    		// img = fetch('img/potato_logo.png');
    		// Moving the IMG stuff from her out of mount
    		// let nPotoatoRows = 4;
    		// $: nPotoatoRows = Math.floor(canvas.height / 200);
    		let spacing = (canvas.height - img.height / scaleRatio * (nPotoatoRows - 1)) / nPotoatoRows;

    		// let startX = spacing;
    		// let startY = spacing;
    		// let startX = 0;
    		// let startY = 0;
    		let startX = -(spacing * 2.5);

    		let startY = -(spacing * 2.5);
    		let x = startX;
    		let y = startY;
    		let frame = requestAnimationFrame(loop);

    		// i don't think i need t...
    		function loop(t) {
    			// yea ok a loop in a loop in a loop, horrible idea...
    			ctx.clearRect(0, 0, canvas.width, canvas.height);

    			// this has to be at the end, no?
    			frame = requestAnimationFrame(loop);

    			// if (x > 900) {
    			//   x = startX;
    			//   y = startY;
    			// }
    			// else {
    			//   x += dx;
    			//   y += dy;
    			// }
    			for (let i = 0; i < 20; i++) {
    				for (let j = 0; j < 10; j++) {
    					// ctx.drawImage(img, x + (i * spacing * 2), y + (j * spacing), img.width / scaleRatio, img.height / scaleRatio);
    					ctx.drawImage(img, x + i * spacing, y + j * spacing, img.width / scaleRatio, img.height / scaleRatio);
    				}
    			}
    		}

    		return () => {
    			cancelAnimationFrame(frame);
    		};
    	});

    	const writable_props = [];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<Canvas> was created with unknown prop '${key}'`);
    	});

    	function canvas_1_binding($$value) {
    		binding_callbacks[$$value ? 'unshift' : 'push'](() => {
    			canvas = $$value;
    			$$invalidate(0, canvas);
    		});
    	}

    	$$self.$capture_state = () => ({
    		onMount,
    		canvas,
    		loaded,
    		img,
    		scaleRatio,
    		nPotoatoRows,
    		nPotoatoCols
    	});

    	$$self.$inject_state = $$props => {
    		if ('canvas' in $$props) $$invalidate(0, canvas = $$props.canvas);
    		if ('loaded' in $$props) loaded = $$props.loaded;
    		if ('scaleRatio' in $$props) scaleRatio = $$props.scaleRatio;
    		if ('nPotoatoRows' in $$props) nPotoatoRows = $$props.nPotoatoRows;
    		if ('nPotoatoCols' in $$props) nPotoatoCols = $$props.nPotoatoCols;
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	scaleRatio = 30;
    	nPotoatoRows = Math.floor(window.innerHeight / 200);
    	nPotoatoCols = Math.floor(window.innerWidth / 200);
    	return [canvas, canvas_1_binding];
    }

    class Canvas extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$5, create_fragment$5, safe_not_equal, {});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "Canvas",
    			options,
    			id: create_fragment$5.name
    		});
    	}
    }

    /* src/pages/SplashPage.svelte generated by Svelte v3.53.1 */

    const { console: console_1$2 } = globals;
    const file$3 = "src/pages/SplashPage.svelte";

    // (47:4) {:else}
    function create_else_block(ctx) {
    	let div;
    	let mounted;
    	let dispose;

    	const block = {
    		c: function create() {
    			div = element("div");
    			div.textContent = "Login";
    			attr_dev(div, "class", "svelte-7t4byu");
    			add_location(div, file$3, 47, 6, 1855);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div, anchor);

    			if (!mounted) {
    				dispose = listen_dev(div, "click", /*login*/ ctx[1], false, false, false);
    				mounted = true;
    			}
    		},
    		p: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div);
    			mounted = false;
    			dispose();
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_else_block.name,
    		type: "else",
    		source: "(47:4) {:else}",
    		ctx
    	});

    	return block;
    }

    // (44:4) {#if user && user.username}
    function create_if_block$1(ctx) {
    	let div0;
    	let t1;
    	let div1;
    	let mounted;
    	let dispose;

    	const block = {
    		c: function create() {
    			div0 = element("div");
    			div0.textContent = "Profile";
    			t1 = space();
    			div1 = element("div");
    			div1.textContent = "Logout";
    			attr_dev(div0, "class", "svelte-7t4byu");
    			add_location(div0, file$3, 44, 6, 1738);
    			attr_dev(div1, "class", "svelte-7t4byu");
    			add_location(div1, file$3, 45, 6, 1801);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div0, anchor);
    			insert_dev(target, t1, anchor);
    			insert_dev(target, div1, anchor);

    			if (!mounted) {
    				dispose = [
    					listen_dev(div0, "click", /*click_handler*/ ctx[3], false, false, false),
    					listen_dev(div1, "click", /*logout*/ ctx[2], false, false, false)
    				];

    				mounted = true;
    			}
    		},
    		p: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div0);
    			if (detaching) detach_dev(t1);
    			if (detaching) detach_dev(div1);
    			mounted = false;
    			run_all(dispose);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block$1.name,
    		type: "if",
    		source: "(44:4) {#if user && user.username}",
    		ctx
    	});

    	return block;
    }

    function create_fragment$4(ctx) {
    	let header;
    	let h1;
    	let t1;
    	let nav;
    	let t2;
    	let h2;
    	let div0;
    	let t4;
    	let div1;
    	let t6;
    	let canvas;
    	let current;

    	function select_block_type(ctx, dirty) {
    		if (/*user*/ ctx[0] && /*user*/ ctx[0].username) return create_if_block$1;
    		return create_else_block;
    	}

    	let current_block_type = select_block_type(ctx);
    	let if_block = current_block_type(ctx);
    	canvas = new Canvas({ $$inline: true });

    	const block = {
    		c: function create() {
    			header = element("header");
    			h1 = element("h1");
    			h1.textContent = "Potato Pong";
    			t1 = space();
    			nav = element("nav");
    			if_block.c();
    			t2 = space();
    			h2 = element("h2");
    			div0 = element("div");
    			div0.textContent = "Welcome to";
    			t4 = space();
    			div1 = element("div");
    			div1.textContent = "Potato Pong";
    			t6 = space();
    			create_component(canvas.$$.fragment);
    			attr_dev(h1, "class", "svelte-7t4byu");
    			add_location(h1, file$3, 40, 2, 1633);
    			attr_dev(nav, "class", "svelte-7t4byu");
    			add_location(nav, file$3, 41, 2, 1656);
    			attr_dev(div0, "class", "svelte-7t4byu");
    			add_location(div0, file$3, 51, 4, 1919);
    			attr_dev(div1, "class", "svelte-7t4byu");
    			add_location(div1, file$3, 52, 4, 1945);
    			attr_dev(h2, "class", "svelte-7t4byu");
    			add_location(h2, file$3, 50, 2, 1910);
    			attr_dev(header, "class", "grid-container svelte-7t4byu");
    			add_location(header, file$3, 39, 0, 1599);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, header, anchor);
    			append_dev(header, h1);
    			append_dev(header, t1);
    			append_dev(header, nav);
    			if_block.m(nav, null);
    			append_dev(header, t2);
    			append_dev(header, h2);
    			append_dev(h2, div0);
    			append_dev(h2, t4);
    			append_dev(h2, div1);
    			insert_dev(target, t6, anchor);
    			mount_component(canvas, target, anchor);
    			current = true;
    		},
    		p: function update(ctx, [dirty]) {
    			if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
    				if_block.p(ctx, dirty);
    			} else {
    				if_block.d(1);
    				if_block = current_block_type(ctx);

    				if (if_block) {
    					if_block.c();
    					if_block.m(nav, null);
    				}
    			}
    		},
    		i: function intro(local) {
    			if (current) return;
    			transition_in(canvas.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(canvas.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(header);
    			if_block.d();
    			if (detaching) detach_dev(t6);
    			destroy_component(canvas, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$4.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$4($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('SplashPage', slots, []);
    	let user;

    	onMount(async () => {
    		$$invalidate(0, user = await fetch('http://transcendance:8080/api/v2/user').then(resp => resp.json()));

    		// i mean i could do a failed to load user or some shit, maybe with a .catch or something? but atm why bother
    		console.log('User var');

    		console.log(user);

    		// if (user && user.statusCode && user.statusCode === 403) {
    		//   console.log('user not logged in')
    		// }
    		// if (user && user.username) {
    		//   console.log('we have a user');
    		// }
    		// user === undefined doesn't work cuz we declared user in the scope of onMount
    		// if (user === undefined) {
    		if (user && user.statusCode && user.statusCode === 403) {
    			console.log('on mount no user, returned status code 403 so logging out of userStore');
    		} // userLogout(); // which i think should delete any previous local storage
    	});

    	const login = async () => {
    		window.location.href = 'http://transcendance:8080/api/v2/auth';
    		console.log('you are now logged in');
    	};

    	// i could prolly put this in it's own compoent, i seem to use it in several places... or maybe just some JS? like no need for html
    	// we could .then( () => replace('/') ) need the func so TS compatible...
    	const logout = async () => {
    		await fetch('http://transcendance:8080/api/v2/auth/logout', { method: 'POST' });
    		$$invalidate(0, user = undefined);
    	};

    	const writable_props = [];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$2.warn(`<SplashPage> was created with unknown prop '${key}'`);
    	});

    	const click_handler = () => push('/profile');

    	$$self.$capture_state = () => ({
    		Canvas,
    		push,
    		onMount,
    		user,
    		login,
    		logout
    	});

    	$$self.$inject_state = $$props => {
    		if ('user' in $$props) $$invalidate(0, user = $$props.user);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [user, login, logout, click_handler];
    }

    class SplashPage extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$4, create_fragment$4, safe_not_equal, {});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "SplashPage",
    			options,
    			id: create_fragment$4.name
    		});
    	}
    }

    /* src/pages/TwoFactorAuthentication.svelte generated by Svelte v3.53.1 */

    const { console: console_1$1 } = globals;
    const file$2 = "src/pages/TwoFactorAuthentication.svelte";

    // (67:2) {:catch}
    function create_catch_block(ctx) {
    	let p;

    	const block = {
    		c: function create() {
    			p = element("p");
    			p.textContent = "Unable to get QrCodeImg";
    			add_location(p, file$2, 67, 4, 2000);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, p, anchor);
    		},
    		p: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(p);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_catch_block.name,
    		type: "catch",
    		source: "(67:2) {:catch}",
    		ctx
    	});

    	return block;
    }

    // (54:2) {:then data}
    function create_then_block(ctx) {
    	let img;
    	let img_src_value;
    	let t0;
    	let form;
    	let input;
    	let t1;
    	let button;
    	let t3;
    	let if_block_anchor;
    	let mounted;
    	let dispose;
    	let if_block = /*wrongCode*/ ctx[2] && create_if_block(ctx);

    	const block = {
    		c: function create() {
    			img = element("img");
    			t0 = space();
    			form = element("form");
    			input = element("input");
    			t1 = space();
    			button = element("button");
    			button.textContent = "Send";
    			t3 = space();
    			if (if_block) if_block.c();
    			if_block_anchor = empty();
    			if (!src_url_equal(img.src, img_src_value = /*qrCodeImg*/ ctx[0])) attr_dev(img, "src", img_src_value);
    			attr_dev(img, "alt", "A QRCodeImg you must scan with google authenticator");
    			attr_dev(img, "id", "qrcodeImg");
    			add_location(img, file$2, 55, 4, 1523);
    			attr_dev(input, "id", "code");
    			attr_dev(input, "type", "text");
    			attr_dev(input, "placeholder", "Input Code");
    			attr_dev(input, "class", "svelte-1cznfcz");
    			add_location(input, file$2, 57, 6, 1675);
    			attr_dev(button, "type", "submit");
    			add_location(button, file$2, 58, 6, 1757);
    			attr_dev(form, "class", "svelte-1cznfcz");
    			add_location(form, file$2, 56, 4, 1624);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, img, anchor);
    			insert_dev(target, t0, anchor);
    			insert_dev(target, form, anchor);
    			append_dev(form, input);
    			set_input_value(input, /*qrCode*/ ctx[1]);
    			append_dev(form, t1);
    			append_dev(form, button);
    			insert_dev(target, t3, anchor);
    			if (if_block) if_block.m(target, anchor);
    			insert_dev(target, if_block_anchor, anchor);

    			if (!mounted) {
    				dispose = [
    					listen_dev(input, "input", /*input_input_handler*/ ctx[5]),
    					listen_dev(form, "submit", prevent_default(/*submitCode*/ ctx[4]), false, true, false)
    				];

    				mounted = true;
    			}
    		},
    		p: function update(ctx, dirty) {
    			if (dirty & /*qrCodeImg*/ 1 && !src_url_equal(img.src, img_src_value = /*qrCodeImg*/ ctx[0])) {
    				attr_dev(img, "src", img_src_value);
    			}

    			if (dirty & /*qrCode*/ 2 && input.value !== /*qrCode*/ ctx[1]) {
    				set_input_value(input, /*qrCode*/ ctx[1]);
    			}

    			if (/*wrongCode*/ ctx[2]) {
    				if (if_block) {
    					if_block.p(ctx, dirty);
    				} else {
    					if_block = create_if_block(ctx);
    					if_block.c();
    					if_block.m(if_block_anchor.parentNode, if_block_anchor);
    				}
    			} else if (if_block) {
    				if_block.d(1);
    				if_block = null;
    			}
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(img);
    			if (detaching) detach_dev(t0);
    			if (detaching) detach_dev(form);
    			if (detaching) detach_dev(t3);
    			if (if_block) if_block.d(detaching);
    			if (detaching) detach_dev(if_block_anchor);
    			mounted = false;
    			run_all(dispose);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_then_block.name,
    		type: "then",
    		source: "(54:2) {:then data}",
    		ctx
    	});

    	return block;
    }

    // (61:4) {#if wrongCode}
    function create_if_block(ctx) {
    	let div;
    	let t;

    	const block = {
    		c: function create() {
    			div = element("div");
    			t = text(/*wrongCode*/ ctx[2]);
    			attr_dev(div, "class", "error svelte-1cznfcz");
    			add_location(div, file$2, 62, 6, 1922);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div, anchor);
    			append_dev(div, t);
    		},
    		p: function update(ctx, dirty) {
    			if (dirty & /*wrongCode*/ 4) set_data_dev(t, /*wrongCode*/ ctx[2]);
    		},
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_if_block.name,
    		type: "if",
    		source: "(61:4) {#if wrongCode}",
    		ctx
    	});

    	return block;
    }

    // (52:25)      <p>Please Wait...</p>   {:then data}
    function create_pending_block(ctx) {
    	let p;

    	const block = {
    		c: function create() {
    			p = element("p");
    			p.textContent = "Please Wait...";
    			add_location(p, file$2, 52, 4, 1437);
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, p, anchor);
    		},
    		p: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(p);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_pending_block.name,
    		type: "pending",
    		source: "(52:25)      <p>Please Wait...</p>   {:then data}",
    		ctx
    	});

    	return block;
    }

    function create_fragment$3(ctx) {
    	let main;
    	let h1;
    	let t1;
    	let p;
    	let t3;

    	let info = {
    		ctx,
    		current: null,
    		token: null,
    		hasCatch: true,
    		pending: create_pending_block,
    		then: create_then_block,
    		catch: create_catch_block,
    		value: 6
    	};

    	handle_promise(/*fetchQrCodeImg*/ ctx[3], info);

    	const block = {
    		c: function create() {
    			main = element("main");
    			h1 = element("h1");
    			h1.textContent = "2FA Sign In";
    			t1 = space();
    			p = element("p");
    			p.textContent = "use google authenticator";
    			t3 = space();
    			info.block.c();
    			add_location(h1, file$2, 49, 2, 1352);
    			add_location(p, file$2, 50, 2, 1375);
    			attr_dev(main, "class", "svelte-1cznfcz");
    			add_location(main, file$2, 48, 0, 1343);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, main, anchor);
    			append_dev(main, h1);
    			append_dev(main, t1);
    			append_dev(main, p);
    			append_dev(main, t3);
    			info.block.m(main, info.anchor = null);
    			info.mount = () => main;
    			info.anchor = null;
    		},
    		p: function update(new_ctx, [dirty]) {
    			ctx = new_ctx;
    			update_await_block_branch(info, ctx, dirty);
    		},
    		i: noop,
    		o: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(main);
    			info.block.d();
    			info.token = null;
    			info = null;
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$3.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$3($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('TwoFactorAuthentication', slots, []);
    	let qrCodeImg;
    	let qrCode = "";
    	let wrongCode = "";

    	const fetchQrCodeImg = (async () => {
    		await fetch("http://transcendance:8080/api/v2/auth/2fa/generate", { method: 'POST' }).then(response => {
    			return response.blob();
    		}).then(blob => {
    			const url = URL.createObjectURL(blob);
    			$$invalidate(0, qrCodeImg = url);
    		});
    	})();

    	const submitCode = async () => {
    		const response = await fetch("http://transcendance:8080/api/v2/auth/2fa/check", {
    			method: 'POST',
    			headers: { "Content-Type": "application/json" },
    			body: JSON.stringify({ "twoFaCode": qrCode })
    		});

    		if (response.status === 401) {
    			$$invalidate(1, qrCode = "");
    			$$invalidate(2, wrongCode = `Wrong code`);
    		}

    		if (response.status === 200) {
    			push('/profile');
    			console.log('valid Code for 2FA');
    		}
    	};

    	const writable_props = [];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$1.warn(`<TwoFactorAuthentication> was created with unknown prop '${key}'`);
    	});

    	function input_input_handler() {
    		qrCode = this.value;
    		$$invalidate(1, qrCode);
    	}

    	$$self.$capture_state = () => ({
    		push,
    		qrCodeImg,
    		qrCode,
    		wrongCode,
    		fetchQrCodeImg,
    		submitCode
    	});

    	$$self.$inject_state = $$props => {
    		if ('qrCodeImg' in $$props) $$invalidate(0, qrCodeImg = $$props.qrCodeImg);
    		if ('qrCode' in $$props) $$invalidate(1, qrCode = $$props.qrCode);
    		if ('wrongCode' in $$props) $$invalidate(2, wrongCode = $$props.wrongCode);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [qrCodeImg, qrCode, wrongCode, fetchQrCodeImg, submitCode, input_input_handler];
    }

    class TwoFactorAuthentication extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$3, create_fragment$3, safe_not_equal, {});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "TwoFactorAuthentication",
    			options,
    			id: create_fragment$3.name
    		});
    	}
    }

    /* src/pages/UnauthorizedAccessPage.svelte generated by Svelte v3.53.1 */
    const file$1 = "src/pages/UnauthorizedAccessPage.svelte";

    function create_fragment$2(ctx) {
    	let div;
    	let h1;
    	let t1;
    	let button;
    	let mounted;
    	let dispose;

    	const block = {
    		c: function create() {
    			div = element("div");
    			h1 = element("h1");
    			h1.textContent = "You're not supposed to be here...";
    			t1 = space();
    			button = element("button");
    			button.textContent = "Go Home";
    			add_location(h1, file$1, 4, 2, 98);
    			add_location(button, file$1, 5, 2, 143);
    			attr_dev(div, "class", "wrapper svelte-1q8uute");
    			add_location(div, file$1, 3, 0, 74);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div, anchor);
    			append_dev(div, h1);
    			append_dev(div, t1);
    			append_dev(div, button);

    			if (!mounted) {
    				dispose = listen_dev(button, "click", /*click_handler*/ ctx[0], false, false, false);
    				mounted = true;
    			}
    		},
    		p: noop,
    		i: noop,
    		o: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div);
    			mounted = false;
    			dispose();
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$2.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$2($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('UnauthorizedAccessPage', slots, []);
    	const writable_props = [];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<UnauthorizedAccessPage> was created with unknown prop '${key}'`);
    	});

    	const click_handler = () => replace('/');
    	$$self.$capture_state = () => ({ replace });
    	return [click_handler];
    }

    class UnauthorizedAccessPage extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$2, create_fragment$2, safe_not_equal, {});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "UnauthorizedAccessPage",
    			options,
    			id: create_fragment$2.name
    		});
    	}
    }

    /* src/pages/TmpTestPage.svelte generated by Svelte v3.53.1 */
    const file = "src/pages/TmpTestPage.svelte";

    function create_fragment$1(ctx) {
    	let div1;
    	let h1;
    	let t1;
    	let button;
    	let t3;
    	let div0;
    	let t4;
    	let mounted;
    	let dispose;

    	const block = {
    		c: function create() {
    			div1 = element("div");
    			h1 = element("h1");
    			h1.textContent = "You made it to Test";
    			t1 = space();
    			button = element("button");
    			button.textContent = "Go Home";
    			t3 = space();
    			div0 = element("div");
    			t4 = text(/*user*/ ctx[0]);
    			add_location(h1, file, 5, 2, 115);
    			add_location(button, file, 6, 2, 146);
    			add_location(div0, file, 7, 2, 206);
    			attr_dev(div1, "class", "wrapper svelte-1q8uute");
    			add_location(div1, file, 4, 0, 91);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			insert_dev(target, div1, anchor);
    			append_dev(div1, h1);
    			append_dev(div1, t1);
    			append_dev(div1, button);
    			append_dev(div1, t3);
    			append_dev(div1, div0);
    			append_dev(div0, t4);

    			if (!mounted) {
    				dispose = listen_dev(button, "click", /*click_handler*/ ctx[1], false, false, false);
    				mounted = true;
    			}
    		},
    		p: function update(ctx, [dirty]) {
    			if (dirty & /*user*/ 1) set_data_dev(t4, /*user*/ ctx[0]);
    		},
    		i: noop,
    		o: noop,
    		d: function destroy(detaching) {
    			if (detaching) detach_dev(div1);
    			mounted = false;
    			dispose();
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment$1.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance$1($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('TmpTestPage', slots, []);
    	let { user } = $$props;

    	$$self.$$.on_mount.push(function () {
    		if (user === undefined && !('user' in $$props || $$self.$$.bound[$$self.$$.props['user']])) {
    			console.warn("<TmpTestPage> was created without expected prop 'user'");
    		}
    	});

    	const writable_props = ['user'];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<TmpTestPage> was created with unknown prop '${key}'`);
    	});

    	const click_handler = () => replace('/');

    	$$self.$$set = $$props => {
    		if ('user' in $$props) $$invalidate(0, user = $$props.user);
    	};

    	$$self.$capture_state = () => ({ replace, user });

    	$$self.$inject_state = $$props => {
    		if ('user' in $$props) $$invalidate(0, user = $$props.user);
    	};

    	if ($$props && "$$inject" in $$props) {
    		$$self.$inject_state($$props.$$inject);
    	}

    	return [user, click_handler];
    }

    class TmpTestPage extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance$1, create_fragment$1, safe_not_equal, { user: 0 });

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "TmpTestPage",
    			options,
    			id: create_fragment$1.name
    		});
    	}

    	get user() {
    		throw new Error("<TmpTestPage>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}

    	set user(value) {
    		throw new Error("<TmpTestPage>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
    	}
    }

    //   "/article/:title": Article, // this is how you would do parameters!
    // "/": LoginPage,

    // TMP not using this cuz need to work out how to authentical both 42 and 2FA from the backend

    // export const primaryRoutes = {
    //   '/': SplashPage,
    //   // '/2fa': TwoFactorAuthentication,
    //   '/2fa': wrap({
    //     component: TwoFactorAuthentication,
    //     conditions: [
    //       (detail) => {
    //         // let loggedIn;
    //         // loginStatus.subscribe(value => {
    //        //   loggedIn = value;
    //        // });

    //         const { fortyTwo, tfa } = get(loginStatus);

    //         console.log('condition in /2fa');
    //         // return (loginStatus.fortyTwo && loginStatus.tfa);
    //         // console.log($loginStatus.fortyTwo)
    //         console.log(fortyTwo);
    //         console.log(tfa);
    //         return true;
    //       }
    //     ]
    //   }),
    //   '/profile': wrap({
    //     component: ProfilePage,
    //     conditions: [
    //       (detail) => {
    //         const { fortyTwo, tfa } = get(loginStatus);
    //         // console.log(fortyTwo);
    //         // console.log(tfa);
    //         // return true;
    //         return (fortyTwo && tfa);
    //       }
    //     ]
    //   }),
    //   '/profile/*': wrap({
    //     component: ProfilePage,
    //     conditions: [
    //       (detail) => {
    //         const { fortyTwo, tfa } = get(loginStatus);
    //         // console.log(fortyTwo);
    //         // console.log(tfa);
    //         // return true;
    //         return (fortyTwo && tfa);
    //       }
    //     ]
    //   }),
    //   '/profile': wrap({
    //         // Use a dynamically-loaded component for this
    //         asyncComponent: () => import('./ProfilePage.svelte'),
    //         // Adding one pre-condition that's an async function
    //         conditions: [
    //           async (detail) => {
    //             // Make a network request, which are async operations
    //             const response = await fetch('http://transcendance:8080/api/v2/user')
    //             const data = await response.json()
    //             // Return true to continue loading the component, or false otherwise
    //             if (data.isAdmin) {
    //               return true
    //             }
    //             else {
    //               return false
    //             }
    //           }
    //         ]
    //       }),
    //   '/unauthorized-access': UnauthorizedAccessPage,
    //   '*': NotFound
    // };

    const primaryRoutes = {
      '/': SplashPage,
      '/2fa': TwoFactorAuthentication,
      // '/test': wrap({
      //   component: TestPage,
      //   conditions: [
      //     (detail) => {
      //       const user = get(userStore);  // seems like get(store) is not an option
      //       // // const user = userStore;
      //       // // console.log(fortyTwo);
      //       // // console.log(tfa);
      //       // console.log('in /test what is in user')
      //       // console.log(user)

      //       // you moron $userStore is a Svelte Abreviation, this is .JS, duh
      //       // let user = $userStore;
      //       // let user;
      //       // const unsub = userStore.subscribe(value => {
      //       //   console.log(value);
      //       //   user = value;
      //       // });
      //       console.log('in /test what is in userStore directly')
      //       console.log(user)

      //       // return true;
      //       // obvi this doesn't work cuz skips to true after no user...
      //         // you gotta make the condition the true and the everything else false
      //       // if (user && user.statusCode && user.statusCode === 403)
      //       // if (user && user.username) {
      //       if (user !== null) {
      //         unsub();
      //         return true;
      //       } else {
      //         unsub();
      //         return false;
      //       }
      //     }
      //   ]
      // }),
      '/test': wrap$1({
        component: TmpTestPage,
        conditions: [
          async(detail) => {
            // THIS SHIT TOTALLY WORKS
            // Yea in the end this might be the best thing, like also from a Security point of view
            const user = await fetch('http://transcendance:8080/api/v2/user')
            .then((resp) => resp.json());

            console.log('in /test what is in user');
            console.log(user);

            if (user && user.username)
              return true;
            else
              return false;
          }
        ],
        // props: {
        //   user: user
        // }
      }),
      '/profile': wrap$1({
        component: ProfilePage,
        conditions: [
          async(detail) => {
            const user = await fetch('http://transcendance:8080/api/v2/user')
            .then((resp) => resp.json());

            console.log('in /profile what is in user');
            console.log(user);

            if (user && user.username)
              return true;
            else
              return false;
          }
        ]
      }),
      '/profile/*': wrap$1({
        component: ProfilePage,
        conditions: [
          async(detail) => {
            const user = await fetch('http://transcendance:8080/api/v2/user')
            .then((resp) => resp.json());

            console.log('in /profile/* what is in user');
            console.log(user);

            if (user && user.username)
              return true;
            else
              return false;
          }
        ]
      }),
      // '/game': wrap({
      //   component: ProfilePage,
      //   conditions: [
      //     async(detail) => {
      //       const user = await fetch('http://transcendance:8080/api/v2/user')
      //       .then((resp) => resp.json())

      //       console.log('in /test what is in user')
      //       console.log(user)

      //       if (user && user.username)
      //         return true;
      //       else
      //         return false;
      //     }
      //   ]
      // }),
      // '/spectate': wrap({
      //   component: ProfilePage,
      //   conditions: [
      //     async(detail) => {
      //       const user = await fetch('http://transcendance:8080/api/v2/user')
      //       .then((resp) => resp.json())

      //       console.log('in /test what is in user')
      //       console.log(user)

      //       if (user && user.username)
      //         return true;
      //       else
      //         return false;
      //     }
      //   ]
      // }),
      // '/chat': wrap({
      //   component: ProfilePage,
      //   conditions: [
      //     async(detail) => {
      //       const user = await fetch('http://transcendance:8080/api/v2/user')
      //       .then((resp) => resp.json())

      //       console.log('in /test what is in user')
      //       console.log(user)

      //       if (user && user.username)
      //         return true;
      //       else
      //         return false;
      //     }
      //   ]
      // }),
      '/unauthorized-access': UnauthorizedAccessPage,
      '*': NotFound
    };

    // export const primaryRoutes = {
    //   "/": SplashPage,
    //   "/profile": ProfilePage,
    //   "/game": GamePage,
    //   "/chat": ChatPage,
    //   "*": NotFound
    // };


    // i might need to add /profile/* and such to make the nested routers work

    // ok maybe these need to be in their own files?



    // export const gameRoutes = {
    //   "/": GamePage,
    //   "*": NotFound
    // };

    // export const chatRoutes = {
    //   "/": ChatPage,
    //   "*": NotFound
    // };

    /* src/App.svelte generated by Svelte v3.53.1 */

    const { console: console_1 } = globals;

    function create_fragment(ctx) {
    	let router;
    	let current;

    	router = new Router({
    			props: { routes: primaryRoutes },
    			$$inline: true
    		});

    	router.$on("conditionsFailed", /*conditionsFailed*/ ctx[0]);

    	const block = {
    		c: function create() {
    			create_component(router.$$.fragment);
    		},
    		l: function claim(nodes) {
    			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
    		},
    		m: function mount(target, anchor) {
    			mount_component(router, target, anchor);
    			current = true;
    		},
    		p: noop,
    		i: function intro(local) {
    			if (current) return;
    			transition_in(router.$$.fragment, local);
    			current = true;
    		},
    		o: function outro(local) {
    			transition_out(router.$$.fragment, local);
    			current = false;
    		},
    		d: function destroy(detaching) {
    			destroy_component(router, detaching);
    		}
    	};

    	dispatch_dev("SvelteRegisterBlock", {
    		block,
    		id: create_fragment.name,
    		type: "component",
    		source: "",
    		ctx
    	});

    	return block;
    }

    function instance($$self, $$props, $$invalidate) {
    	let { $$slots: slots = {}, $$scope } = $$props;
    	validate_slots('App', slots, []);

    	const conditionsFailed = event => {
    		console.error('conditionsFailed event', event.detail);

    		// i mean i guess i can just leave this in there permanently?
    		replace('/unauthorized-access');
    	};

    	const writable_props = [];

    	Object.keys($$props).forEach(key => {
    		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1.warn(`<App> was created with unknown prop '${key}'`);
    	});

    	$$self.$capture_state = () => ({
    		Router,
    		replace,
    		primaryRoutes,
    		conditionsFailed
    	});

    	return [conditionsFailed];
    }

    class App extends SvelteComponentDev {
    	constructor(options) {
    		super(options);
    		init(this, options, instance, create_fragment, safe_not_equal, {});

    		dispatch_dev("SvelteRegisterComponent", {
    			component: this,
    			tagName: "App",
    			options,
    			id: create_fragment.name
    		});
    	}
    }

    const app = new App({
        target: document.body,
        props: {
        // name: 'world'
        }
    });

    return app;

})();
//# sourceMappingURL=bundle.js.map
