text: var app = (function () {
      'use strict';
  
      function noop() { }
      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');
      }
      function is_empty(obj) {
          return Object.keys(obj).length === 0;
      }
      function append(target, node) {
          target.appendChild(node);
      }
      function insert(target, node, anchor) {
          target.insertBefore(node, anchor || null);
      }
      function detach(node) {
          node.parentNode.removeChild(node);
      }
      function element(name) {
          return document.createElement(name);
      }
      function text(data) {
          return document.createTextNode(data);
      }
      function space() {
          return text(' ');
      }
      function listen(node, event, handler, options) {
          node.addEventListener(event, handler, options);
          return () => node.removeEventListener(event, handler, options);
      }
      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_data(text, data) {
          data = '' + data;
          if (text.wholeText !== data)
              text.data = data;
      }
      function set_input_value(input, value) {
          input.value = value == null ? '' : value;
      }
  
      let current_component;
      function set_current_component(component) {
          current_component = component;
      }
  
      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 add_render_callback(fn) {
          render_callbacks.push(fn);
      }
      let flushing = false;
      const seen_callbacks = new Set();
      function flush() {
          if (flushing)
              return;
          flushing = true;
          do {
              // first, call beforeUpdate functions
              // and update components
              for (let i = 0; i < dirty_components.length; i += 1) {
                  const component = dirty_components[i];
                  set_current_component(component);
                  update(component.$$);
              }
              set_current_component(null);
              dirty_components.length = 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;
          flushing = false;
          seen_callbacks.clear();
      }
      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();
      function transition_in(block, local) {
          if (block && block.i) {
              outroing.delete(block);
              block.i(local);
          }
      }
      function mount_component(component, target, anchor, customElement) {
          const { fragment, on_mount, on_destroy, after_update } = component.$$;
          fragment && fragment.m(target, anchor);
          if (!customElement) {
              // onMount happens before the initial afterUpdate
              add_render_callback(() => {
                  const new_on_destroy = on_mount.map(run).filter(is_function);
                  if (on_destroy) {
                      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: null,
              // state
              props,
              update: noop,
              not_equal,
              bound: blank_object(),
              // lifecycle
              on_mount: [],
              on_destroy: [],
              on_disconnect: [],
              before_update: [],
              after_update: [],
              context: new Map(parent_component ? parent_component.$$.context : options.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) {
              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;
              }
          }
      }
  
      // @ts-check
      // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
      // This file is automatically generated. DO NOT EDIT
  
      const go = {
        "main": {
          "App": {
            /**
             * Greet
             * @param {Person} arg1 - Go Type: main.Person
             * @returns {Promise<string>}  - Go Type: string
             */
            "Greet": (arg1) => {
              return window.go.main.App.Greet(arg1);
            },
            /**
             * Greet3
             * @param {Person} arg1 - Go Type: main.Person
             * @returns {Promise<string>}  - Go Type: string
             */
            "Greet3": (arg1) => {
              return window.go.main.App.Greet3(arg1);
            },
          }
        }
  
      };
  
      /* Do not change, this code is generated from Golang structs */
      class Address {
          constructor(source = {}) {
              if ('string' === typeof source)
                  source = JSON.parse(source);
              this.street = source["street"];
              this.postcode = source["postcode"];
          }
          static createFrom(source = {}) {
              return new Address(source);
          }
      }
      class Person {
          constructor(source = {}) {
              if ('string' === typeof source)
                  source = JSON.parse(source);
              this.name = source["name"];
              this.age = source["age"];
              this.phone = source["phone"];
              this.address = this.convertValues(source["address"], Address);
          }
          static createFrom(source = {}) {
              return new Person(source);
          }
          convertValues(a, classs, asMap = false) {
              if (!a) {
                  return a;
              }
              if (a.slice) {
                  return a.map(elem => this.convertValues(elem, classs));
              }
              else if ("object" === typeof a) {
                  if (asMap) {
                      for (const key of Object.keys(a)) {
                          a[key] = new classs(a[key]);
                      }
                      return a;
                  }
                  return new classs(a);
              }
              return a;
          }
      }
  
      function styleInject(css, ref) {
        if ( ref === void 0 ) ref = {};
        var insertAt = ref.insertAt;
  
        if (!css || typeof document === 'undefined') { return; }
  
        var head = document.head || document.getElementsByTagName('head')[0];
        var style = document.createElement('style');
        style.type = 'text/css';
  
        if (insertAt === 'top') {
          if (head.firstChild) {
            head.insertBefore(style, head.firstChild);
          } else {
            head.appendChild(style);
          }
        } else {
          head.appendChild(style);
        }
  
        if (style.styleSheet) {
          style.styleSheet.cssText = css;
        } else {
          style.appendChild(document.createTextNode(css));
        }
      }
  
      var css_248z$1 = "main.svelte-r8ffec{height:100%;width:100%}#result.svelte-r8ffec{margin-top:1rem;font-size:1.5rem}button.svelte-r8ffec{-webkit-appearance:default-button;padding:6px}#name.svelte-r8ffec{border-radius:3px;outline:none;-webkit-font-smoothing:antialiased}#logo.svelte-r8ffec{width:40%;height:40%;padding-top:20%;margin:auto;display:block;background-position:50%;background-repeat:no-repeat;background-image:url(assets/images/logo-dark.svg)}";
      styleInject(css_248z$1);
  
      /* src\App.svelte generated by Svelte v3.42.4 */
  
      function create_if_block(ctx) {
      	let div;
      	let t;
  
      	return {
      		c() {
      			div = element("div");
      			t = text(/*greeting*/ ctx[1]);
      			attr(div, "id", "result");
      			attr(div, "class", "svelte-r8ffec");
      		},
      		m(target, anchor) {
      			insert(target, div, anchor);
      			append(div, t);
      		},
      		p(ctx, dirty) {
      			if (dirty & /*greeting*/ 2) set_data(t, /*greeting*/ ctx[1]);
      		},
      		d(detaching) {
      			if (detaching) detach(div);
      		}
      	};
      }
  
      function create_fragment(ctx) {
      	let main;
      	let div0;
      	let t0;
      	let div1;
      	let input;
      	let t1;
      	let button;
      	let t3;
      	let mounted;
      	let dispose;
      	let if_block = /*greeting*/ ctx[1] && create_if_block(ctx);
  
      	return {
      		c() {
      			main = element("main");
      			div0 = element("div");
      			t0 = space();
      			div1 = element("div");
      			input = element("input");
      			t1 = space();
      			button = element("button");
      			button.textContent = "Greet";
      			t3 = space();
      			if (if_block) if_block.c();
      			attr(div0, "id", "logo");
      			attr(div0, "class", "svelte-r8ffec");
      			attr(input, "id", "name");
      			attr(input, "type", "text");
      			attr(input, "class", "svelte-r8ffec");
      			attr(button, "class", "button svelte-r8ffec");
      			attr(div1, "id", "input");
      			attr(div1, "data-wails-no-drag", "");
      			attr(main, "class", "svelte-r8ffec");
      		},
      		m(target, anchor) {
      			insert(target, main, anchor);
      			append(main, div0);
      			append(main, t0);
      			append(main, div1);
      			append(div1, input);
      			set_input_value(input, /*name*/ ctx[0]);
      			append(div1, t1);
      			append(div1, button);
      			append(main, t3);
      			if (if_block) if_block.m(main, null);
  
      			if (!mounted) {
      				dispose = [
      					listen(input, "input", /*input_input_handler*/ ctx[3]),
      					listen(button, "click", /*greet*/ ctx[2])
      				];
  
      				mounted = true;
      			}
      		},
      		p(ctx, [dirty]) {
      			if (dirty & /*name*/ 1 && input.value !== /*name*/ ctx[0]) {
      				set_input_value(input, /*name*/ ctx[0]);
      			}
  
      			if (/*greeting*/ ctx[1]) {
      				if (if_block) {
      					if_block.p(ctx, dirty);
      				} else {
      					if_block = create_if_block(ctx);
      					if_block.c();
      					if_block.m(main, null);
      				}
      			} else if (if_block) {
      				if_block.d(1);
      				if_block = null;
      			}
      		},
      		i: noop,
      		o: noop,
      		d(detaching) {
      			if (detaching) detach(main);
      			if (if_block) if_block.d();
      			mounted = false;
      			run_all(dispose);
      		}
      	};
      }
  
      function instance($$self, $$props, $$invalidate) {
      	let name = "";
      	let greeting = "";
  
      	function greet() {
      		let p = new Person();
      		p.name = name;
      		p.age = 71;
  
      		go.main.App.Greet(p).then(result => {
      			$$invalidate(1, greeting = result);
      		});
      	}
  
      	function input_input_handler() {
      		name = this.value;
      		$$invalidate(0, name);
      	}
  
      	return [name, greeting, greet, input_input_handler];
      }
  
      class App extends SvelteComponent {
      	constructor(options) {
      		super();
      		init(this, options, instance, create_fragment, safe_not_equal, {});
      	}
      }
  
      var css_248z = "html{text-align:center;background-color:rgba(10,10,10,0)}body,html{color:#fff;width:100%;height:100%}body{font-family:Nunito,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}@font-face{font-family:Nunito;font-style:normal;font-weight:400;src:local(\"\"),url(assets/fonts/nunito-v16-latin-regular.woff2) format(\"woff2\")}";
      styleInject(css_248z);
  
      const app = new App({
      	target: document.body,
      });
  
      return app;
  
  }());
  //# sourceMappingURL=bundle.js.map
  