dont wrap ESM in IIFE

pull/7738/head
Rich Harris 8 years ago
parent 1934d82dd7
commit 14e1c20dee

@ -93,10 +93,8 @@ function es(
${importHelpers} ${importHelpers}
${importBlock} ${importBlock}
export default (function() { ${code}
${code} export default ${name};`;
return ${name};
}());`;
} }
function amd( function amd(

@ -190,8 +190,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { var template = (function() {
var template = (function() {
return { return {
data: function () { data: function () {
return { foo: 42 } return { foo: 42 }
@ -199,66 +198,64 @@ var _actual = (function() {
}; };
}()); }());
function encapsulateStyles(node) { function encapsulateStyles(node) {
setAttribute(node, "svelte-3590263702", ""); setAttribute(node, "svelte-3590263702", "");
} }
function add_css() { function add_css() {
var style = createElement("style"); var style = createElement("style");
style.id = 'svelte-3590263702-style'; style.id = 'svelte-3590263702-style';
style.textContent = "p[svelte-3590263702],[svelte-3590263702] p{color:red}"; style.textContent = "p[svelte-3590263702],[svelte-3590263702] p{color:red}";
appendNode(style, document.head); appendNode(style, document.head);
} }
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var p, text; var p, text;
return { return {
create: function() { create: function() {
p = createElement("p"); p = createElement("p");
text = createText(state.foo); text = createText(state.foo);
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
encapsulateStyles(p); encapsulateStyles(p);
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
appendNode(text, p); appendNode(text, p);
}, },
update: function(changed, state) { update: function(changed, state) {
if (changed.foo) { if (changed.foo) {
text.data = state.foo; text.data = state.foo;
} }
}, },
unmount: function() { unmount: function() {
detachNode(p); detachNode(p);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = assign(template.data(), options.data); this._state = assign(template.data(), options.data);
if (!document.getElementById("svelte-3590263702-style")) add_css(); if (!document.getElementById("svelte-3590263702-style")) add_css();
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,8 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js"; import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js";
export default (function() { var template = (function() {
var template = (function() {
return { return {
data: function () { data: function () {
return { foo: 42 } return { foo: 42 }
@ -10,64 +9,63 @@ export default (function() {
}; };
}()); }());
function encapsulateStyles(node) { function encapsulateStyles(node) {
setAttribute(node, "svelte-3590263702", ""); setAttribute(node, "svelte-3590263702", "");
} }
function add_css() { function add_css() {
var style = createElement("style"); var style = createElement("style");
style.id = 'svelte-3590263702-style'; style.id = 'svelte-3590263702-style';
style.textContent = "p[svelte-3590263702],[svelte-3590263702] p{color:red}"; style.textContent = "p[svelte-3590263702],[svelte-3590263702] p{color:red}";
appendNode(style, document.head); appendNode(style, document.head);
} }
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var p, text; var p, text;
return { return {
create: function() { create: function() {
p = createElement("p"); p = createElement("p");
text = createText(state.foo); text = createText(state.foo);
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
encapsulateStyles(p); encapsulateStyles(p);
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
appendNode(text, p); appendNode(text, p);
}, },
update: function(changed, state) { update: function(changed, state) {
if (changed.foo) { if (changed.foo) {
text.data = state.foo; text.data = state.foo;
} }
}, },
unmount: function() { unmount: function() {
detachNode(p); detachNode(p);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = assign(template.data(), options.data); this._state = assign(template.data(), options.data);
if (!document.getElementById("svelte-3590263702-style")) add_css(); if (!document.getElementById("svelte-3590263702-style")) add_css();
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -166,8 +166,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { var template = (function() {
var template = (function() {
return { return {
components: { components: {
Nested: window.Nested Nested: window.Nested
@ -175,60 +174,58 @@ var _actual = (function() {
}; };
}()); }());
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var nested = new template.components.Nested({ var nested = new template.components.Nested({
_root: component._root, _root: component._root,
data: { foo: "bar" } data: { foo: "bar" }
}); });
return { return {
create: function() { create: function() {
nested._fragment.create(); nested._fragment.create();
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
nested._mount(target, anchor); nested._mount(target, anchor);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
nested._unmount(); nested._unmount();
}, },
destroy: function() { destroy: function() {
nested.destroy(false); nested.destroy(false);
} }
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
if (!options._root) { if (!options._root) {
this._oncreate = []; this._oncreate = [];
this._beforecreate = []; this._beforecreate = [];
this._aftercreate = []; this._aftercreate = [];
} }
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
this._lock = true; this._lock = true;
callAll(this._beforecreate); callAll(this._beforecreate);
callAll(this._oncreate); callAll(this._oncreate);
callAll(this._aftercreate); callAll(this._aftercreate);
this._lock = false; this._lock = false;
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,8 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, callAll, init, noop, proto } from "svelte/shared.js"; import { assign, callAll, init, noop, proto } from "svelte/shared.js";
export default (function() { var template = (function() {
var template = (function() {
return { return {
components: { components: {
Nested: window.Nested Nested: window.Nested
@ -10,58 +9,57 @@ export default (function() {
}; };
}()); }());
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var nested = new template.components.Nested({ var nested = new template.components.Nested({
_root: component._root, _root: component._root,
data: { foo: "bar" } data: { foo: "bar" }
}); });
return { return {
create: function() { create: function() {
nested._fragment.create(); nested._fragment.create();
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
nested._mount(target, anchor); nested._mount(target, anchor);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
nested._unmount(); nested._unmount();
}, },
destroy: function() { destroy: function() {
nested.destroy(false); nested.destroy(false);
} }
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
if (!options._root) { if (!options._root) {
this._oncreate = []; this._oncreate = [];
this._beforecreate = []; this._beforecreate = [];
this._aftercreate = []; this._aftercreate = [];
} }
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
this._lock = true; this._lock = true;
callAll(this._beforecreate); callAll(this._beforecreate);
callAll(this._oncreate); callAll(this._oncreate);
callAll(this._aftercreate); callAll(this._aftercreate);
this._lock = false; this._lock = false;
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -166,8 +166,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { var template = (function() {
var template = (function() {
return { return {
computed: { computed: {
a: x => x * 2, a: x => x * 2,
@ -176,43 +175,41 @@ var _actual = (function() {
}; };
}()); }());
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
return { return {
create: noop, create: noop,
mount: noop, mount: noop,
update: noop, update: noop,
unmount: noop, unmount: noop,
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._recompute({ x: 1 }, this._state); this._recompute({ x: 1 }, this._state);
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
SvelteComponent.prototype._recompute = function _recompute(changed, state) { SvelteComponent.prototype._recompute = function _recompute(changed, state) {
if (changed.x) { if (changed.x) {
if (differs(state.a, (state.a = template.computed.a(state.x)))) changed.a = true; if (differs(state.a, (state.a = template.computed.a(state.x)))) changed.a = true;
if (differs(state.b, (state.b = template.computed.b(state.x)))) changed.b = true; if (differs(state.b, (state.b = template.computed.b(state.x)))) changed.b = true;
} }
}; };
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,8 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, differs, init, noop, proto } from "svelte/shared.js"; import { assign, differs, init, noop, proto } from "svelte/shared.js";
export default (function() { var template = (function() {
var template = (function() {
return { return {
computed: { computed: {
a: x => x * 2, a: x => x * 2,
@ -11,41 +10,40 @@ export default (function() {
}; };
}()); }());
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
return { return {
create: noop, create: noop,
mount: noop, mount: noop,
update: noop, update: noop,
unmount: noop, unmount: noop,
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._recompute({ x: 1 }, this._state); this._recompute({ x: 1 }, this._state);
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
SvelteComponent.prototype._recompute = function _recompute(changed, state) { SvelteComponent.prototype._recompute = function _recompute(changed, state) {
if (changed.x) { if (changed.x) {
if (differs(state.a, (state.a = template.computed.a(state.x)))) changed.a = true; if (differs(state.a, (state.a = template.computed.a(state.x)))) changed.a = true;
if (differs(state.b, (state.b = template.computed.b(state.x)))) changed.b = true; if (differs(state.b, (state.b = template.computed.b(state.x)))) changed.b = true;
}
} }
return SvelteComponent; }
}()); export default SvelteComponent;

@ -186,61 +186,58 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function encapsulateStyles(node) {
function encapsulateStyles(node) { setAttribute(node, "svelte-2363328337", "");
setAttribute(node, "svelte-2363328337", ""); }
}
function add_css() { function add_css() {
var style = createElement("style"); var style = createElement("style");
style.id = 'svelte-2363328337-style'; style.id = 'svelte-2363328337-style';
style.textContent = "@media(min-width: 1px){div[svelte-2363328337],[svelte-2363328337] div{color:red}}"; style.textContent = "@media(min-width: 1px){div[svelte-2363328337],[svelte-2363328337] div{color:red}}";
appendNode(style, document.head); appendNode(style, document.head);
} }
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { create: function() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
encapsulateStyles(div); encapsulateStyles(div);
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
detachNode(div); detachNode(div);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
if (!document.getElementById("svelte-2363328337-style")) add_css(); if (!document.getElementById("svelte-2363328337-style")) add_css();
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,59 +1,57 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js"; import { appendNode, assign, createElement, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js";
export default (function() { function encapsulateStyles(node) {
function encapsulateStyles(node) { setAttribute(node, "svelte-2363328337", "");
setAttribute(node, "svelte-2363328337", ""); }
}
function add_css() { function add_css() {
var style = createElement("style"); var style = createElement("style");
style.id = 'svelte-2363328337-style'; style.id = 'svelte-2363328337-style';
style.textContent = "@media(min-width: 1px){div[svelte-2363328337],[svelte-2363328337] div{color:red}}"; style.textContent = "@media(min-width: 1px){div[svelte-2363328337],[svelte-2363328337] div{color:red}}";
appendNode(style, document.head); appendNode(style, document.head);
} }
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { create: function() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
encapsulateStyles(div); encapsulateStyles(div);
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
detachNode(div); detachNode(div);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
if (!document.getElementById("svelte-2363328337-style")) add_css(); if (!document.getElementById("svelte-2363328337-style")) add_css();
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -186,68 +186,65 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div, text;
var div, text;
return { return {
create: function() { create: function() {
div = createElement("div"); div = createElement("div");
text = createText("fades in"); text = createText("fades in");
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
appendNode(text, div); appendNode(text, div);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
detachNode(div); detachNode(div);
}, },
destroy: noop destroy: noop
}; };
} }
class SvelteComponent extends HTMLElement { class SvelteComponent extends HTMLElement {
constructor(options = {}) { constructor(options = {}) {
super(); super();
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this.attachShadow({ mode: 'open' }); this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`; this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`;
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
this._fragment.create(); this._fragment.create();
this._fragment.mount(this.shadowRoot, null); this._fragment.mount(this.shadowRoot, null);
if (options.target) this._mount(options.target, options.anchor || null); if (options.target) this._mount(options.target, options.anchor || null);
} }
static get observedAttributes() { static get observedAttributes() {
return []; return [];
} }
attributeChangedCallback(attr, oldValue, newValue) { attributeChangedCallback(attr, oldValue, newValue) {
this.set({ [attr]: newValue }); this.set({ [attr]: newValue });
}
} }
}
customElements.define("custom-element", SvelteComponent); customElements.define("custom-element", SvelteComponent);
assign(SvelteComponent.prototype, proto, { assign(SvelteComponent.prototype, proto, {
_mount(target, anchor) { _mount(target, anchor) {
target.insertBefore(this, anchor); target.insertBefore(this, anchor);
}, },
_unmount() { _unmount() {
this.parentNode.removeChild(this); this.parentNode.removeChild(this);
} }
}); });
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,66 +1,64 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div, text;
var div, text;
return { return {
create: function() { create: function() {
div = createElement("div"); div = createElement("div");
text = createText("fades in"); text = createText("fades in");
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
appendNode(text, div); appendNode(text, div);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
detachNode(div); detachNode(div);
}, },
destroy: noop destroy: noop
}; };
} }
class SvelteComponent extends HTMLElement { class SvelteComponent extends HTMLElement {
constructor(options = {}) { constructor(options = {}) {
super(); super();
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this.attachShadow({ mode: 'open' }); this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`; this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`;
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
this._fragment.create(); this._fragment.create();
this._fragment.mount(this.shadowRoot, null); this._fragment.mount(this.shadowRoot, null);
if (options.target) this._mount(options.target, options.anchor || null); if (options.target) this._mount(options.target, options.anchor || null);
} }
static get observedAttributes() { static get observedAttributes() {
return []; return [];
} }
attributeChangedCallback(attr, oldValue, newValue) { attributeChangedCallback(attr, oldValue, newValue) {
this.set({ [attr]: newValue }); this.set({ [attr]: newValue });
}
} }
}
customElements.define("custom-element", SvelteComponent); customElements.define("custom-element", SvelteComponent);
assign(SvelteComponent.prototype, proto, { assign(SvelteComponent.prototype, proto, {
_mount(target, anchor) { _mount(target, anchor) {
target.insertBefore(this, anchor); target.insertBefore(this, anchor);
}, },
_unmount() { _unmount() {
this.parentNode.removeChild(this); this.parentNode.removeChild(this);
} }
}); });
return SvelteComponent; export default SvelteComponent;
}());

@ -198,159 +198,156 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var text, p, text_1;
var text, p, text_1;
var comments = state.comments; var comments = state.comments;
var each_blocks = []; var each_blocks = [];
for (var i = 0; i < comments.length; i += 1) { for (var i = 0; i < comments.length; i += 1) {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component); each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
} }
return {
create: function() {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].create();
}
text = createText("\n\n"); return {
p = createElement("p"); create: function() {
text_1 = createText(state.foo); for (var i = 0; i < each_blocks.length; i += 1) {
}, each_blocks[i].create();
}
mount: function(target, anchor) { text = createText("\n\n");
for (var i = 0; i < each_blocks.length; i += 1) { p = createElement("p");
each_blocks[i].mount(target, anchor); text_1 = createText(state.foo);
} },
insertNode(text, target, anchor); mount: function(target, anchor) {
insertNode(p, target, anchor); for (var i = 0; i < each_blocks.length; i += 1) {
appendNode(text_1, p); each_blocks[i].mount(target, anchor);
}, }
update: function(changed, state) {
var comments = state.comments;
if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < comments.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].update(changed, state, comments, comments[i], i);
} else {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
each_blocks[i].create();
each_blocks[i].mount(text.parentNode, text);
}
}
for (; i < each_blocks.length; i += 1) { insertNode(text, target, anchor);
each_blocks[i].unmount(); insertNode(p, target, anchor);
each_blocks[i].destroy(); appendNode(text_1, p);
},
update: function(changed, state) {
var comments = state.comments;
if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < comments.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].update(changed, state, comments, comments[i], i);
} else {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
each_blocks[i].create();
each_blocks[i].mount(text.parentNode, text);
} }
each_blocks.length = comments.length;
} }
if (changed.foo) { for (; i < each_blocks.length; i += 1) {
text_1.data = state.foo;
}
},
unmount: function() {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].unmount(); each_blocks[i].unmount();
each_blocks[i].destroy();
} }
each_blocks.length = comments.length;
}
detachNode(text); if (changed.foo) {
detachNode(p); text_1.data = state.foo;
}, }
},
destroy: function() { unmount: function() {
destroyEach(each_blocks); for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].unmount();
} }
};
}
// (1:0) {{#each comments as comment, i}} detachNode(text);
function create_each_block(state, comments, comment, i, component) { detachNode(p);
var div, strong, text, text_1, span, text_2_value = comment.author, text_2, text_3, text_4_value = state.elapsed(comment.time, state.time), text_4, text_5, text_6, raw_value = comment.html, raw_before; },
return {
create: function() {
div = createElement("div");
strong = createElement("strong");
text = createText(i);
text_1 = createText("\n\n\t\t");
span = createElement("span");
text_2 = createText(text_2_value);
text_3 = createText(" wrote ");
text_4 = createText(text_4_value);
text_5 = createText(" ago:");
text_6 = createText("\n\n\t\t");
raw_before = createElement('noscript');
this.hydrate();
},
hydrate: function() {
div.className = "comment";
span.className = "meta";
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
appendNode(strong, div);
appendNode(text, strong);
appendNode(text_1, div);
appendNode(span, div);
appendNode(text_2, span);
appendNode(text_3, span);
appendNode(text_4, span);
appendNode(text_5, span);
appendNode(text_6, div);
appendNode(raw_before, div);
raw_before.insertAdjacentHTML("afterend", raw_value);
},
update: function(changed, state, comments, comment, i) { destroy: function() {
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) { destroyEach(each_blocks);
text_2.data = text_2_value; }
} };
}
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) { // (1:0) {{#each comments as comment, i}}
text_4.data = text_4_value; function create_each_block(state, comments, comment, i, component) {
} var div, strong, text, text_1, span, text_2_value = comment.author, text_2, text_3, text_4_value = state.elapsed(comment.time, state.time), text_4, text_5, text_6, raw_value = comment.html, raw_before;
if ((changed.comments) && raw_value !== (raw_value = comment.html)) { return {
detachAfter(raw_before); create: function() {
raw_before.insertAdjacentHTML("afterend", raw_value); div = createElement("div");
} strong = createElement("strong");
}, text = createText(i);
text_1 = createText("\n\n\t\t");
span = createElement("span");
text_2 = createText(text_2_value);
text_3 = createText(" wrote ");
text_4 = createText(text_4_value);
text_5 = createText(" ago:");
text_6 = createText("\n\n\t\t");
raw_before = createElement('noscript');
this.hydrate();
},
hydrate: function() {
div.className = "comment";
span.className = "meta";
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
appendNode(strong, div);
appendNode(text, strong);
appendNode(text_1, div);
appendNode(span, div);
appendNode(text_2, span);
appendNode(text_3, span);
appendNode(text_4, span);
appendNode(text_5, span);
appendNode(text_6, div);
appendNode(raw_before, div);
raw_before.insertAdjacentHTML("afterend", raw_value);
},
update: function(changed, state, comments, comment, i) {
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
text_2.data = text_2_value;
}
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) {
text_4.data = text_4_value;
}
unmount: function() { if ((changed.comments) && raw_value !== (raw_value = comment.html)) {
detachAfter(raw_before); detachAfter(raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value);
}
},
detachNode(div); unmount: function() {
}, detachAfter(raw_before);
destroy: noop detachNode(div);
}; },
}
destroy: noop
};
}
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,157 +1,155 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var text, p, text_1;
var text, p, text_1;
var comments = state.comments; var comments = state.comments;
var each_blocks = []; var each_blocks = [];
for (var i = 0; i < comments.length; i += 1) { for (var i = 0; i < comments.length; i += 1) {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component); each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
} }
return {
create: function() {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].create();
}
text = createText("\n\n"); return {
p = createElement("p"); create: function() {
text_1 = createText(state.foo); for (var i = 0; i < each_blocks.length; i += 1) {
}, each_blocks[i].create();
}
mount: function(target, anchor) { text = createText("\n\n");
for (var i = 0; i < each_blocks.length; i += 1) { p = createElement("p");
each_blocks[i].mount(target, anchor); text_1 = createText(state.foo);
} },
insertNode(text, target, anchor); mount: function(target, anchor) {
insertNode(p, target, anchor); for (var i = 0; i < each_blocks.length; i += 1) {
appendNode(text_1, p); each_blocks[i].mount(target, anchor);
}, }
update: function(changed, state) {
var comments = state.comments;
if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < comments.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].update(changed, state, comments, comments[i], i);
} else {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
each_blocks[i].create();
each_blocks[i].mount(text.parentNode, text);
}
}
for (; i < each_blocks.length; i += 1) { insertNode(text, target, anchor);
each_blocks[i].unmount(); insertNode(p, target, anchor);
each_blocks[i].destroy(); appendNode(text_1, p);
},
update: function(changed, state) {
var comments = state.comments;
if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < comments.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].update(changed, state, comments, comments[i], i);
} else {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
each_blocks[i].create();
each_blocks[i].mount(text.parentNode, text);
} }
each_blocks.length = comments.length;
}
if (changed.foo) {
text_1.data = state.foo;
} }
},
unmount: function() { for (; i < each_blocks.length; i += 1) {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].unmount(); each_blocks[i].unmount();
each_blocks[i].destroy();
} }
each_blocks.length = comments.length;
}
detachNode(text); if (changed.foo) {
detachNode(p); text_1.data = state.foo;
},
destroy: function() {
destroyEach(each_blocks);
} }
}; },
}
// (1:0) {{#each comments as comment, i}} unmount: function() {
function create_each_block(state, comments, comment, i, component) { for (var i = 0; i < each_blocks.length; i += 1) {
var div, strong, text, text_1, span, text_2_value = comment.author, text_2, text_3, text_4_value = state.elapsed(comment.time, state.time), text_4, text_5, text_6, raw_value = comment.html, raw_before; each_blocks[i].unmount();
}
return {
create: function() {
div = createElement("div");
strong = createElement("strong");
text = createText(i);
text_1 = createText("\n\n\t\t");
span = createElement("span");
text_2 = createText(text_2_value);
text_3 = createText(" wrote ");
text_4 = createText(text_4_value);
text_5 = createText(" ago:");
text_6 = createText("\n\n\t\t");
raw_before = createElement('noscript');
this.hydrate();
},
hydrate: function() {
div.className = "comment";
span.className = "meta";
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
appendNode(strong, div);
appendNode(text, strong);
appendNode(text_1, div);
appendNode(span, div);
appendNode(text_2, span);
appendNode(text_3, span);
appendNode(text_4, span);
appendNode(text_5, span);
appendNode(text_6, div);
appendNode(raw_before, div);
raw_before.insertAdjacentHTML("afterend", raw_value);
},
update: function(changed, state, comments, comment, i) { detachNode(text);
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) { detachNode(p);
text_2.data = text_2_value; },
}
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) { destroy: function() {
text_4.data = text_4_value; destroyEach(each_blocks);
} }
};
}
// (1:0) {{#each comments as comment, i}}
function create_each_block(state, comments, comment, i, component) {
var div, strong, text, text_1, span, text_2_value = comment.author, text_2, text_3, text_4_value = state.elapsed(comment.time, state.time), text_4, text_5, text_6, raw_value = comment.html, raw_before;
return {
create: function() {
div = createElement("div");
strong = createElement("strong");
text = createText(i);
text_1 = createText("\n\n\t\t");
span = createElement("span");
text_2 = createText(text_2_value);
text_3 = createText(" wrote ");
text_4 = createText(text_4_value);
text_5 = createText(" ago:");
text_6 = createText("\n\n\t\t");
raw_before = createElement('noscript');
this.hydrate();
},
hydrate: function() {
div.className = "comment";
span.className = "meta";
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
appendNode(strong, div);
appendNode(text, strong);
appendNode(text_1, div);
appendNode(span, div);
appendNode(text_2, span);
appendNode(text_3, span);
appendNode(text_4, span);
appendNode(text_5, span);
appendNode(text_6, div);
appendNode(raw_before, div);
raw_before.insertAdjacentHTML("afterend", raw_value);
},
update: function(changed, state, comments, comment, i) {
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
text_2.data = text_2_value;
}
if ((changed.comments) && raw_value !== (raw_value = comment.html)) { if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) {
detachAfter(raw_before); text_4.data = text_4_value;
raw_before.insertAdjacentHTML("afterend", raw_value); }
}
},
unmount: function() { if ((changed.comments) && raw_value !== (raw_value = comment.html)) {
detachAfter(raw_before); detachAfter(raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value);
}
},
detachNode(div); unmount: function() {
}, detachAfter(raw_before);
destroy: noop detachNode(div);
}; },
}
function SvelteComponent(options) { destroy: noop
init(this, options); };
this._state = options.data || {}; }
this._fragment = create_main_fragment(this._state, this); function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
if (options.target) { this._fragment = create_main_fragment(this._state, this);
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); if (options.target) {
} this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -186,8 +186,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { var template = (function() {
var template = (function() {
return { return {
methods: { methods: {
foo ( bar ) { foo ( bar ) {
@ -202,54 +201,52 @@ var _actual = (function() {
}; };
}()); }());
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var button, foo_handler, text; var button, foo_handler, text;
return { return {
create: function() { create: function() {
button = createElement("button"); button = createElement("button");
text = createText("foo"); text = createText("foo");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
foo_handler = template.events.foo.call(component, button, function(event) { foo_handler = template.events.foo.call(component, button, function(event) {
var state = component.get(); var state = component.get();
component.foo( state.bar ); component.foo( state.bar );
}); });
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(button, target, anchor); insertNode(button, target, anchor);
appendNode(text, button); appendNode(text, button);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
detachNode(button); detachNode(button);
}, },
destroy: function() { destroy: function() {
foo_handler.teardown(); foo_handler.teardown();
} }
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, template.methods, proto); assign(SvelteComponent.prototype, template.methods, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,8 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() { var template = (function() {
var template = (function() {
return { return {
methods: { methods: {
foo ( bar ) { foo ( bar ) {
@ -17,52 +16,51 @@ export default (function() {
}; };
}()); }());
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var button, foo_handler, text; var button, foo_handler, text;
return { return {
create: function() { create: function() {
button = createElement("button"); button = createElement("button");
text = createText("foo"); text = createText("foo");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
foo_handler = template.events.foo.call(component, button, function(event) { foo_handler = template.events.foo.call(component, button, function(event) {
var state = component.get(); var state = component.get();
component.foo( state.bar ); component.foo( state.bar );
}); });
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(button, target, anchor); insertNode(button, target, anchor);
appendNode(text, button); appendNode(text, button);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
detachNode(button); detachNode(button);
}, },
destroy: function() { destroy: function() {
foo_handler.teardown(); foo_handler.teardown();
} }
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, template.methods, proto); assign(SvelteComponent.prototype, template.methods, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -190,110 +190,107 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var if_block_anchor;
var if_block_anchor;
var current_block_type = select_block_type(state); var current_block_type = select_block_type(state);
var if_block = current_block_type(state, component); var if_block = current_block_type(state, component);
return { return {
create: function() { create: function() {
if_block.create(); if_block.create();
if_block_anchor = createComment(); if_block_anchor = createComment();
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
if_block.mount(target, anchor); if_block.mount(target, anchor);
insertNode(if_block_anchor, target, anchor); insertNode(if_block_anchor, target, anchor);
}, },
update: function(changed, state) { update: function(changed, state) {
if (current_block_type !== (current_block_type = select_block_type(state))) { if (current_block_type !== (current_block_type = select_block_type(state))) {
if_block.unmount();
if_block.destroy();
if_block = current_block_type(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
}
},
unmount: function() {
if_block.unmount(); if_block.unmount();
detachNode(if_block_anchor);
},
destroy: function() {
if_block.destroy(); if_block.destroy();
if_block = current_block_type(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
} }
}; },
}
// (1:0) {{#if foo}} unmount: function() {
function create_if_block(state, component) { if_block.unmount();
var p, text; detachNode(if_block_anchor);
},
return { destroy: function() {
create: function() { if_block.destroy();
p = createElement("p"); }
text = createText("foo!"); };
}, }
mount: function(target, anchor) { // (1:0) {{#if foo}}
insertNode(p, target, anchor); function create_if_block(state, component) {
appendNode(text, p); var p, text;
},
unmount: function() { return {
detachNode(p); create: function() {
}, p = createElement("p");
text = createText("foo!");
},
destroy: noop mount: function(target, anchor) {
}; insertNode(p, target, anchor);
} appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
// (3:0) {{else}} destroy: noop
function create_if_block_1(state, component) { };
var p, text; }
return { // (3:0) {{else}}
create: function() { function create_if_block_1(state, component) {
p = createElement("p"); var p, text;
text = createText("not foo!");
},
mount: function(target, anchor) { return {
insertNode(p, target, anchor); create: function() {
appendNode(text, p); p = createElement("p");
}, text = createText("not foo!");
},
unmount: function() { mount: function(target, anchor) {
detachNode(p); insertNode(p, target, anchor);
}, appendNode(text, p);
},
destroy: noop unmount: function() {
}; detachNode(p);
} },
function select_block_type(state) { destroy: noop
if (state.foo) return create_if_block; };
return create_if_block_1; }
}
function SvelteComponent(options) { function select_block_type(state) {
init(this, options); if (state.foo) return create_if_block;
this._state = options.data || {}; return create_if_block_1;
}
this._fragment = create_main_fragment(this._state, this); function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
if (options.target) { this._fragment = create_main_fragment(this._state, this);
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); if (options.target) {
} this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,108 +1,106 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var if_block_anchor;
var if_block_anchor;
var current_block_type = select_block_type(state); var current_block_type = select_block_type(state);
var if_block = current_block_type(state, component); var if_block = current_block_type(state, component);
return { return {
create: function() { create: function() {
if_block.create(); if_block.create();
if_block_anchor = createComment(); if_block_anchor = createComment();
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
if_block.mount(target, anchor); if_block.mount(target, anchor);
insertNode(if_block_anchor, target, anchor); insertNode(if_block_anchor, target, anchor);
}, },
update: function(changed, state) {
if (current_block_type !== (current_block_type = select_block_type(state))) {
if_block.unmount();
if_block.destroy();
if_block = current_block_type(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
}
},
unmount: function() {
if_block.unmount();
detachNode(if_block_anchor);
},
destroy: function() { update: function(changed, state) {
if (current_block_type !== (current_block_type = select_block_type(state))) {
if_block.unmount();
if_block.destroy(); if_block.destroy();
if_block = current_block_type(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
} }
}; },
}
// (1:0) {{#if foo}}
function create_if_block(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("foo!");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (3:0) {{else}}
function create_if_block_1(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("not foo!");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
function select_block_type(state) {
if (state.foo) return create_if_block;
return create_if_block_1;
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); unmount: function() {
if_block.unmount();
detachNode(if_block_anchor);
},
if (options.target) { destroy: function() {
this._fragment.create(); if_block.destroy();
this._fragment.mount(options.target, options.anchor || null);
} }
};
}
// (1:0) {{#if foo}}
function create_if_block(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("foo!");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (3:0) {{else}}
function create_if_block_1(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("not foo!");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
function select_block_type(state) {
if (state.foo) return create_if_block;
return create_if_block_1;
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -190,85 +190,82 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var if_block_anchor;
var if_block_anchor;
var if_block = (state.foo) && create_if_block(state, component);
return {
create: function() {
if (if_block) if_block.create();
if_block_anchor = createComment();
},
mount: function(target, anchor) {
if (if_block) if_block.mount(target, anchor);
insertNode(if_block_anchor, target, anchor);
},
update: function(changed, state) {
if (state.foo) {
if (!if_block) {
if_block = create_if_block(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
}
},
unmount: function() { var if_block = (state.foo) && create_if_block(state, component);
if (if_block) if_block.unmount();
detachNode(if_block_anchor);
},
destroy: function() { return {
if (if_block) if_block.destroy(); create: function() {
if (if_block) if_block.create();
if_block_anchor = createComment();
},
mount: function(target, anchor) {
if (if_block) if_block.mount(target, anchor);
insertNode(if_block_anchor, target, anchor);
},
update: function(changed, state) {
if (state.foo) {
if (!if_block) {
if_block = create_if_block(state, component);
if_block.create();
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
} }
}; },
}
// (1:0) {{#if foo}} unmount: function() {
function create_if_block(state, component) { if (if_block) if_block.unmount();
var p, text; detachNode(if_block_anchor);
},
return { destroy: function() {
create: function() { if (if_block) if_block.destroy();
p = createElement("p"); }
text = createText("foo!"); };
}, }
mount: function(target, anchor) { // (1:0) {{#if foo}}
insertNode(p, target, anchor); function create_if_block(state, component) {
appendNode(text, p); var p, text;
},
unmount: function() { return {
detachNode(p); create: function() {
}, p = createElement("p");
text = createText("foo!");
},
destroy: noop mount: function(target, anchor) {
}; insertNode(p, target, anchor);
} appendNode(text, p);
},
function SvelteComponent(options) { unmount: function() {
init(this, options); detachNode(p);
this._state = options.data || {}; },
this._fragment = create_main_fragment(this._state, this); destroy: noop
};
}
if (options.target) { function SvelteComponent(options) {
this._fragment.create(); init(this, options);
this._fragment.mount(options.target, options.anchor || null); this._state = options.data || {};
}
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,83 +1,81 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var if_block_anchor;
var if_block_anchor;
var if_block = (state.foo) && create_if_block(state, component);
var if_block = (state.foo) && create_if_block(state, component);
return {
return { create: function() {
create: function() { if (if_block) if_block.create();
if (if_block) if_block.create(); if_block_anchor = createComment();
if_block_anchor = createComment(); },
},
mount: function(target, anchor) {
mount: function(target, anchor) { if (if_block) if_block.mount(target, anchor);
if (if_block) if_block.mount(target, anchor); insertNode(if_block_anchor, target, anchor);
insertNode(if_block_anchor, target, anchor); },
},
update: function(changed, state) {
update: function(changed, state) { if (state.foo) {
if (state.foo) { if (!if_block) {
if (!if_block) { if_block = create_if_block(state, component);
if_block = create_if_block(state, component); if_block.create();
if_block.create(); if_block.mount(if_block_anchor.parentNode, if_block_anchor);
if_block.mount(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
} }
}, } else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
}
},
unmount: function() { unmount: function() {
if (if_block) if_block.unmount(); if (if_block) if_block.unmount();
detachNode(if_block_anchor); detachNode(if_block_anchor);
}, },
destroy: function() { destroy: function() {
if (if_block) if_block.destroy(); if (if_block) if_block.destroy();
} }
}; };
} }
// (1:0) {{#if foo}} // (1:0) {{#if foo}}
function create_if_block(state, component) { function create_if_block(state, component) {
var p, text; var p, text;
return { return {
create: function() { create: function() {
p = createElement("p"); p = createElement("p");
text = createText("foo!"); text = createText("foo!");
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
appendNode(text, p); appendNode(text, p);
}, },
unmount: function() { unmount: function() {
detachNode(p); detachNode(p);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -182,57 +182,54 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div;
var div;
return { return {
create: function() { create: function() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
setStyle(div, "color", state.color);
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
update: function(changed, state) {
if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)"); }
},
mount: function(target, anchor) { if (changed.x || changed.y) {
insertNode(div, target, anchor); setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
}, }
},
update: function(changed, state) {
if (changed.color) {
setStyle(div, "color", state.color);
}
if (changed.x || changed.y) {
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
}
},
unmount: function() { unmount: function() {
detachNode(div); detachNode(div);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,55 +1,53 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div;
var div;
return {
return { create: function() {
create: function() { div = createElement("div");
div = createElement("div"); this.hydrate();
this.hydrate(); },
},
hydrate: function() {
hydrate: function() { setStyle(div, "color", state.color);
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
update: function(changed, state) {
if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)"); }
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
},
update: function(changed, state) { if (changed.x || changed.y) {
if (changed.color) { setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
setStyle(div, "color", state.color); }
} },
if (changed.x || changed.y) {
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
}
},
unmount: function() { unmount: function() {
detachNode(div); detachNode(div);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -182,52 +182,49 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div;
var div;
return { return {
create: function() { create: function() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")"); setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: function(changed, state) { update: function(changed, state) {
if (changed.data) { if (changed.data) {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")"); setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
} }
}, },
unmount: function() { unmount: function() {
detachNode(div); detachNode(div);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,50 +1,48 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div;
var div;
return { return {
create: function() { create: function() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")"); setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: function(changed, state) { update: function(changed, state) {
if (changed.data) { if (changed.data) {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")"); setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
} }
}, },
unmount: function() { unmount: function() {
detachNode(div); detachNode(div);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -182,52 +182,49 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div;
var div;
return { return {
create: function() { create: function() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: function(changed, state) { update: function(changed, state) {
if (changed.color) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
} }
}, },
unmount: function() { unmount: function() {
detachNode(div); detachNode(div);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,50 +1,48 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div;
var div;
return { return {
create: function() { create: function() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: function(changed, state) { update: function(changed, state) {
if (changed.color) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
} }
}, },
unmount: function() { unmount: function() {
detachNode(div); detachNode(div);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -182,63 +182,60 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div, text, div_1, div_1_style_value;
var div, text, div_1, div_1_style_value;
return {
return { create: function() {
create: function() { div = createElement("div");
div = createElement("div"); text = createText("\n");
text = createText("\n"); div_1 = createElement("div");
div_1 = createElement("div"); this.hydrate();
this.hydrate(); },
},
hydrate: function() {
hydrate: function() { div.style.cssText = state.style;
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value;
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
},
update: function(changed, state) {
if (changed.style) {
div.style.cssText = state.style; div.style.cssText = state.style;
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value; }
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
},
update: function(changed, state) {
if (changed.style) {
div.style.cssText = state.style;
}
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) {
div_1.style.cssText = div_1_style_value;
}
},
unmount: function() {
detachNode(div);
detachNode(text);
detachNode(div_1);
},
destroy: noop
};
}
function SvelteComponent(options) { if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) {
init(this, options); div_1.style.cssText = div_1_style_value;
this._state = options.data || {}; }
},
this._fragment = create_main_fragment(this._state, this); unmount: function() {
detachNode(div);
detachNode(text);
detachNode(div_1);
},
if (options.target) { destroy: noop
this._fragment.create(); };
this._fragment.mount(options.target, options.anchor || null); }
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,61 +1,59 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div, text, div_1, div_1_style_value;
var div, text, div_1, div_1_style_value;
return {
return { create: function() {
create: function() { div = createElement("div");
div = createElement("div"); text = createText("\n");
text = createText("\n"); div_1 = createElement("div");
div_1 = createElement("div"); this.hydrate();
this.hydrate(); },
},
hydrate: function() {
hydrate: function() { div.style.cssText = state.style;
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value;
},
mount: function(target, anchor) {
insertNode(div, target, anchor);
insertNode(text, target, anchor);
insertNode(div_1, target, anchor);
},
update: function(changed, state) {
if (changed.style) {
div.style.cssText = state.style; div.style.cssText = state.style;
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value; }
},
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) {
mount: function(target, anchor) { div_1.style.cssText = div_1_style_value;
insertNode(div, target, anchor); }
insertNode(text, target, anchor); },
insertNode(div_1, target, anchor);
}, unmount: function() {
detachNode(div);
update: function(changed, state) { detachNode(text);
if (changed.style) { detachNode(div_1);
div.style.cssText = state.style; },
}
destroy: noop
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) { };
div_1.style.cssText = div_1_style_value; }
}
},
unmount: function() {
detachNode(div);
detachNode(text);
detachNode(div_1);
},
destroy: noop
};
}
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -186,59 +186,56 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var input;
var input;
function input_change_handler() { function input_change_handler() {
component.set({ foo: input.checked }); component.set({ foo: input.checked });
} }
return { return {
create: function() { create: function() {
input = createElement("input"); input = createElement("input");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
input.type = "checkbox"; input.type = "checkbox";
addListener(input, "change", input_change_handler); addListener(input, "change", input_change_handler);
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(input, target, anchor); insertNode(input, target, anchor);
input.checked = state.foo; input.checked = state.foo;
}, },
update: function(changed, state) { update: function(changed, state) {
input.checked = state.foo; input.checked = state.foo;
}, },
unmount: function() { unmount: function() {
detachNode(input); detachNode(input);
}, },
destroy: function() { destroy: function() {
removeListener(input, "change", input_change_handler); removeListener(input, "change", input_change_handler);
} }
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,57 +1,55 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener } from "svelte/shared.js"; import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var input;
var input;
function input_change_handler() { function input_change_handler() {
component.set({ foo: input.checked }); component.set({ foo: input.checked });
} }
return { return {
create: function() { create: function() {
input = createElement("input"); input = createElement("input");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
input.type = "checkbox"; input.type = "checkbox";
addListener(input, "change", input_change_handler); addListener(input, "change", input_change_handler);
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(input, target, anchor); insertNode(input, target, anchor);
input.checked = state.foo; input.checked = state.foo;
}, },
update: function(changed, state) { update: function(changed, state) {
input.checked = state.foo; input.checked = state.foo;
}, },
unmount: function() { unmount: function() {
detachNode(input); detachNode(input);
}, },
destroy: function() { destroy: function() {
removeListener(input, "change", input_change_handler); removeListener(input, "change", input_change_handler);
} }
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -184,48 +184,45 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var input;
var input;
return { return {
create: function() { create: function() {
input = createElement("input"); input = createElement("input");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
setInputType(input, "search"); setInputType(input, "search");
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(input, target, anchor); insertNode(input, target, anchor);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
detachNode(input); detachNode(input);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,46 +1,44 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setInputType } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto, setInputType } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var input;
var input;
return { return {
create: function() { create: function() {
input = createElement("input"); input = createElement("input");
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
setInputType(input, "search"); setInputType(input, "search");
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(input, target, anchor); insertNode(input, target, anchor);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
detachNode(input); detachNode(input);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -201,58 +201,55 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div;
var div;
return { return {
create: function() { create: function() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.hydrate();
}, },
claim: function(nodes) { claim: function(nodes) {
div = claimElement(nodes, "DIV", { "class": true }, false); div = claimElement(nodes, "DIV", { "class": true }, false);
var div_nodes = children(div); var div_nodes = children(div);
div_nodes.forEach(detachNode); div_nodes.forEach(detachNode);
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
div.className = "foo"; div.className = "foo";
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
detachNode(div); detachNode(div);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
var nodes = children(options.target); var nodes = children(options.target);
options.hydrate ? this._fragment.claim(nodes) : this._fragment.create(); options.hydrate ? this._fragment.claim(nodes) : this._fragment.create();
nodes.forEach(detachNode); nodes.forEach(detachNode);
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,56 +1,54 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, children, claimElement, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { assign, children, claimElement, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div;
var div;
return { return {
create: function() { create: function() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.hydrate();
}, },
claim: function(nodes) { claim: function(nodes) {
div = claimElement(nodes, "DIV", { "class": true }, false); div = claimElement(nodes, "DIV", { "class": true }, false);
var div_nodes = children(div); var div_nodes = children(div);
div_nodes.forEach(detachNode); div_nodes.forEach(detachNode);
this.hydrate(); this.hydrate();
}, },
hydrate: function() { hydrate: function() {
div.className = "foo"; div.className = "foo";
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
detachNode(div); detachNode(div);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
var nodes = children(options.target); var nodes = children(options.target);
options.hydrate ? this._fragment.claim(nodes) : this._fragment.create(); options.hydrate ? this._fragment.claim(nodes) : this._fragment.create();
nodes.forEach(detachNode); nodes.forEach(detachNode);
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -194,134 +194,131 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var audio, audio_updating = false, audio_animationframe, audio_paused_value = true;
var audio, audio_updating = false, audio_animationframe, audio_paused_value = true;
function audio_progress_loadedmetadata_handler() {
audio_updating = true;
component.set({ buffered: timeRangesToArray(audio.buffered) });
audio_updating = false;
}
function audio_loadedmetadata_handler() {
audio_updating = true;
component.set({ seekable: timeRangesToArray(audio.seekable) });
audio_updating = false;
}
function audio_timeupdate_handler() { function audio_progress_loadedmetadata_handler() {
audio_updating = true; audio_updating = true;
component.set({ played: timeRangesToArray(audio.played) }); component.set({ buffered: timeRangesToArray(audio.buffered) });
audio_updating = false; audio_updating = false;
} }
function audio_timeupdate_handler_1() { function audio_loadedmetadata_handler() {
audio_updating = true; audio_updating = true;
cancelAnimationFrame(audio_animationframe); component.set({ seekable: timeRangesToArray(audio.seekable) });
if (!audio.paused) audio_animationframe = requestAnimationFrame(audio_timeupdate_handler_1); audio_updating = false;
component.set({ currentTime: audio.currentTime }); }
audio_updating = false;
}
function audio_durationchange_handler() { function audio_timeupdate_handler() {
audio_updating = true; audio_updating = true;
component.set({ duration: audio.duration }); component.set({ played: timeRangesToArray(audio.played) });
audio_updating = false; audio_updating = false;
} }
function audio_pause_handler() { function audio_timeupdate_handler_1() {
audio_updating = true; audio_updating = true;
component.set({ paused: audio.paused }); cancelAnimationFrame(audio_animationframe);
audio_updating = false; if (!audio.paused) audio_animationframe = requestAnimationFrame(audio_timeupdate_handler_1);
} component.set({ currentTime: audio.currentTime });
audio_updating = false;
}
return { function audio_durationchange_handler() {
create: function() { audio_updating = true;
audio = createElement("audio"); component.set({ duration: audio.duration });
addListener(audio, "play", audio_pause_handler); audio_updating = false;
this.hydrate(); }
},
hydrate: function() { function audio_pause_handler() {
component._root._beforecreate.push(audio_progress_loadedmetadata_handler); audio_updating = true;
component.set({ paused: audio.paused });
audio_updating = false;
}
addListener(audio, "progress", audio_progress_loadedmetadata_handler); return {
addListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler); create: function() {
audio = createElement("audio");
addListener(audio, "play", audio_pause_handler);
this.hydrate();
},
component._root._beforecreate.push(audio_loadedmetadata_handler); hydrate: function() {
component._root._beforecreate.push(audio_progress_loadedmetadata_handler);
addListener(audio, "loadedmetadata", audio_loadedmetadata_handler); addListener(audio, "progress", audio_progress_loadedmetadata_handler);
addListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
component._root._beforecreate.push(audio_timeupdate_handler); component._root._beforecreate.push(audio_loadedmetadata_handler);
addListener(audio, "timeupdate", audio_timeupdate_handler); addListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
component._root._beforecreate.push(audio_timeupdate_handler_1); component._root._beforecreate.push(audio_timeupdate_handler);
addListener(audio, "timeupdate", audio_timeupdate_handler_1); addListener(audio, "timeupdate", audio_timeupdate_handler);
component._root._beforecreate.push(audio_durationchange_handler); component._root._beforecreate.push(audio_timeupdate_handler_1);
addListener(audio, "durationchange", audio_durationchange_handler); addListener(audio, "timeupdate", audio_timeupdate_handler_1);
component._root._beforecreate.push(audio_pause_handler); component._root._beforecreate.push(audio_durationchange_handler);
addListener(audio, "pause", audio_pause_handler); addListener(audio, "durationchange", audio_durationchange_handler);
},
mount: function(target, anchor) { component._root._beforecreate.push(audio_pause_handler);
insertNode(audio, target, anchor);
},
update: function(changed, state) { addListener(audio, "pause", audio_pause_handler);
if (!audio_updating && !isNaN(state.currentTime )) { },
audio.currentTime = state.currentTime ;
}
if (audio_paused_value !== (audio_paused_value = state.paused)) { mount: function(target, anchor) {
audio[audio_paused_value ? "pause" : "play"](); insertNode(audio, target, anchor);
} },
},
unmount: function() { update: function(changed, state) {
detachNode(audio); if (!audio_updating && !isNaN(state.currentTime )) {
}, audio.currentTime = state.currentTime ;
}
destroy: function() { if (audio_paused_value !== (audio_paused_value = state.paused)) {
removeListener(audio, "progress", audio_progress_loadedmetadata_handler); audio[audio_paused_value ? "pause" : "play"]();
removeListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler_1);
removeListener(audio, "durationchange", audio_durationchange_handler);
removeListener(audio, "pause", audio_pause_handler);
removeListener(audio, "play", audio_pause_handler);
} }
}; },
}
unmount: function() {
detachNode(audio);
},
destroy: function() {
removeListener(audio, "progress", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler_1);
removeListener(audio, "durationchange", audio_durationchange_handler);
removeListener(audio, "pause", audio_pause_handler);
removeListener(audio, "play", audio_pause_handler);
}
};
}
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
if (!options._root) { if (!options._root) {
this._oncreate = []; this._oncreate = [];
this._beforecreate = []; this._beforecreate = [];
} }
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
callAll(this._beforecreate); callAll(this._beforecreate);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,132 +1,130 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { addListener, assign, callAll, createElement, detachNode, init, insertNode, proto, removeListener, timeRangesToArray } from "svelte/shared.js"; import { addListener, assign, callAll, createElement, detachNode, init, insertNode, proto, removeListener, timeRangesToArray } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var audio, audio_updating = false, audio_animationframe, audio_paused_value = true;
var audio, audio_updating = false, audio_animationframe, audio_paused_value = true;
function audio_progress_loadedmetadata_handler() {
audio_updating = true;
component.set({ buffered: timeRangesToArray(audio.buffered) });
audio_updating = false;
}
function audio_loadedmetadata_handler() {
audio_updating = true;
component.set({ seekable: timeRangesToArray(audio.seekable) });
audio_updating = false;
}
function audio_timeupdate_handler() { function audio_progress_loadedmetadata_handler() {
audio_updating = true; audio_updating = true;
component.set({ played: timeRangesToArray(audio.played) }); component.set({ buffered: timeRangesToArray(audio.buffered) });
audio_updating = false; audio_updating = false;
} }
function audio_timeupdate_handler_1() { function audio_loadedmetadata_handler() {
audio_updating = true; audio_updating = true;
cancelAnimationFrame(audio_animationframe); component.set({ seekable: timeRangesToArray(audio.seekable) });
if (!audio.paused) audio_animationframe = requestAnimationFrame(audio_timeupdate_handler_1); audio_updating = false;
component.set({ currentTime: audio.currentTime }); }
audio_updating = false;
}
function audio_durationchange_handler() { function audio_timeupdate_handler() {
audio_updating = true; audio_updating = true;
component.set({ duration: audio.duration }); component.set({ played: timeRangesToArray(audio.played) });
audio_updating = false; audio_updating = false;
} }
function audio_pause_handler() { function audio_timeupdate_handler_1() {
audio_updating = true; audio_updating = true;
component.set({ paused: audio.paused }); cancelAnimationFrame(audio_animationframe);
audio_updating = false; if (!audio.paused) audio_animationframe = requestAnimationFrame(audio_timeupdate_handler_1);
} component.set({ currentTime: audio.currentTime });
audio_updating = false;
}
return { function audio_durationchange_handler() {
create: function() { audio_updating = true;
audio = createElement("audio"); component.set({ duration: audio.duration });
addListener(audio, "play", audio_pause_handler); audio_updating = false;
this.hydrate(); }
},
hydrate: function() { function audio_pause_handler() {
component._root._beforecreate.push(audio_progress_loadedmetadata_handler); audio_updating = true;
component.set({ paused: audio.paused });
audio_updating = false;
}
addListener(audio, "progress", audio_progress_loadedmetadata_handler); return {
addListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler); create: function() {
audio = createElement("audio");
addListener(audio, "play", audio_pause_handler);
this.hydrate();
},
component._root._beforecreate.push(audio_loadedmetadata_handler); hydrate: function() {
component._root._beforecreate.push(audio_progress_loadedmetadata_handler);
addListener(audio, "loadedmetadata", audio_loadedmetadata_handler); addListener(audio, "progress", audio_progress_loadedmetadata_handler);
addListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
component._root._beforecreate.push(audio_timeupdate_handler); component._root._beforecreate.push(audio_loadedmetadata_handler);
addListener(audio, "timeupdate", audio_timeupdate_handler); addListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
component._root._beforecreate.push(audio_timeupdate_handler_1); component._root._beforecreate.push(audio_timeupdate_handler);
addListener(audio, "timeupdate", audio_timeupdate_handler_1); addListener(audio, "timeupdate", audio_timeupdate_handler);
component._root._beforecreate.push(audio_durationchange_handler); component._root._beforecreate.push(audio_timeupdate_handler_1);
addListener(audio, "durationchange", audio_durationchange_handler); addListener(audio, "timeupdate", audio_timeupdate_handler_1);
component._root._beforecreate.push(audio_pause_handler); component._root._beforecreate.push(audio_durationchange_handler);
addListener(audio, "pause", audio_pause_handler); addListener(audio, "durationchange", audio_durationchange_handler);
},
mount: function(target, anchor) { component._root._beforecreate.push(audio_pause_handler);
insertNode(audio, target, anchor);
},
update: function(changed, state) { addListener(audio, "pause", audio_pause_handler);
if (!audio_updating && !isNaN(state.currentTime )) { },
audio.currentTime = state.currentTime ;
}
if (audio_paused_value !== (audio_paused_value = state.paused)) { mount: function(target, anchor) {
audio[audio_paused_value ? "pause" : "play"](); insertNode(audio, target, anchor);
} },
},
unmount: function() { update: function(changed, state) {
detachNode(audio); if (!audio_updating && !isNaN(state.currentTime )) {
}, audio.currentTime = state.currentTime ;
}
destroy: function() { if (audio_paused_value !== (audio_paused_value = state.paused)) {
removeListener(audio, "progress", audio_progress_loadedmetadata_handler); audio[audio_paused_value ? "pause" : "play"]();
removeListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler_1);
removeListener(audio, "durationchange", audio_durationchange_handler);
removeListener(audio, "pause", audio_pause_handler);
removeListener(audio, "play", audio_pause_handler);
} }
}; },
}
unmount: function() {
detachNode(audio);
},
destroy: function() {
removeListener(audio, "progress", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler);
removeListener(audio, "timeupdate", audio_timeupdate_handler_1);
removeListener(audio, "durationchange", audio_durationchange_handler);
removeListener(audio, "pause", audio_pause_handler);
removeListener(audio, "play", audio_pause_handler);
}
};
}
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
if (!options._root) { if (!options._root) {
this._oncreate = []; this._oncreate = [];
this._beforecreate = []; this._beforecreate = [];
} }
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
callAll(this._beforecreate); callAll(this._beforecreate);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -180,8 +180,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { var template = (function() {
var template = (function() {
return { return {
components: { components: {
NonImported NonImported
@ -189,71 +188,69 @@ var _actual = (function() {
}; };
}()); }());
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var text; var text;
var imported = new Imported({ var imported = new Imported({
_root: component._root _root: component._root
}); });
var nonimported = new template.components.NonImported({
_root: component._root
});
return {
create: function() {
imported._fragment.create();
text = createText("\n");
nonimported._fragment.create();
},
mount: function(target, anchor) {
imported._mount(target, anchor);
insertNode(text, target, anchor);
nonimported._mount(target, anchor);
},
update: noop,
unmount: function() {
imported._unmount();
detachNode(text);
nonimported._unmount();
},
destroy: function() {
imported.destroy(false);
nonimported.destroy(false);
}
};
}
function SvelteComponent(options) { var nonimported = new template.components.NonImported({
init(this, options); _root: component._root
this._state = options.data || {}; });
if (!options._root) { return {
this._oncreate = []; create: function() {
this._beforecreate = []; imported._fragment.create();
this._aftercreate = []; text = createText("\n");
nonimported._fragment.create();
},
mount: function(target, anchor) {
imported._mount(target, anchor);
insertNode(text, target, anchor);
nonimported._mount(target, anchor);
},
update: noop,
unmount: function() {
imported._unmount();
detachNode(text);
nonimported._unmount();
},
destroy: function() {
imported.destroy(false);
nonimported.destroy(false);
} }
};
}
this._fragment = create_main_fragment(this._state, this); function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
if (options.target) { if (!options._root) {
this._fragment.create(); this._oncreate = [];
this._fragment.mount(options.target, options.anchor || null); this._beforecreate = [];
this._aftercreate = [];
}
this._lock = true; this._fragment = create_main_fragment(this._state, this);
callAll(this._beforecreate);
callAll(this._oncreate); if (options.target) {
callAll(this._aftercreate); this._fragment.create();
this._lock = false; this._fragment.mount(options.target, options.anchor || null);
}
this._lock = true;
callAll(this._beforecreate);
callAll(this._oncreate);
callAll(this._aftercreate);
this._lock = false;
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -2,8 +2,7 @@
import { assign, callAll, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { assign, callAll, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
import Imported from 'Imported.html'; import Imported from 'Imported.html';
export default (function() { var template = (function() {
var template = (function() {
return { return {
components: { components: {
NonImported NonImported
@ -11,69 +10,68 @@ export default (function() {
}; };
}()); }());
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var text; var text;
var imported = new Imported({ var imported = new Imported({
_root: component._root _root: component._root
}); });
var nonimported = new template.components.NonImported({ var nonimported = new template.components.NonImported({
_root: component._root _root: component._root
}); });
return { return {
create: function() { create: function() {
imported._fragment.create(); imported._fragment.create();
text = createText("\n"); text = createText("\n");
nonimported._fragment.create(); nonimported._fragment.create();
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
imported._mount(target, anchor); imported._mount(target, anchor);
insertNode(text, target, anchor); insertNode(text, target, anchor);
nonimported._mount(target, anchor); nonimported._mount(target, anchor);
}, },
update: noop, update: noop,
unmount: function() { unmount: function() {
imported._unmount(); imported._unmount();
detachNode(text); detachNode(text);
nonimported._unmount(); nonimported._unmount();
}, },
destroy: function() { destroy: function() {
imported.destroy(false); imported.destroy(false);
nonimported.destroy(false); nonimported.destroy(false);
} }
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
if (!options._root) { if (!options._root) {
this._oncreate = []; this._oncreate = [];
this._beforecreate = []; this._beforecreate = [];
this._aftercreate = []; this._aftercreate = [];
} }
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
this._lock = true; this._lock = true;
callAll(this._beforecreate); callAll(this._beforecreate);
callAll(this._oncreate); callAll(this._oncreate);
callAll(this._aftercreate); callAll(this._aftercreate);
this._lock = false; this._lock = false;
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -166,8 +166,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { var template = (function() {
var template = (function() {
return { return {
// this test should be removed in v2 // this test should be removed in v2
oncreate () {}, oncreate () {},
@ -175,47 +174,45 @@ var _actual = (function() {
}; };
}()); }());
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
return { return {
create: noop, create: noop,
mount: noop, mount: noop,
update: noop, update: noop,
unmount: noop, unmount: noop,
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._handlers.destroy = [template.ondestroy]; this._handlers.destroy = [template.ondestroy];
var oncreate = template.oncreate.bind(this); var oncreate = template.oncreate.bind(this);
if (!options._root) { if (!options._root) {
this._oncreate = [oncreate]; this._oncreate = [oncreate];
} else { } else {
this._root._oncreate.push(oncreate); this._root._oncreate.push(oncreate);
} }
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
callAll(this._oncreate); callAll(this._oncreate);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,8 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, callAll, init, noop, proto } from "svelte/shared.js"; import { assign, callAll, init, noop, proto } from "svelte/shared.js";
export default (function() { var template = (function() {
var template = (function() {
return { return {
// this test should be removed in v2 // this test should be removed in v2
oncreate () {}, oncreate () {},
@ -10,45 +9,44 @@ export default (function() {
}; };
}()); }());
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
return { return {
create: noop, create: noop,
mount: noop, mount: noop,
update: noop, update: noop,
unmount: noop, unmount: noop,
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._handlers.destroy = [template.ondestroy] this._handlers.destroy = [template.ondestroy]
var oncreate = template.oncreate.bind(this); var oncreate = template.oncreate.bind(this);
if (!options._root) { if (!options._root) {
this._oncreate = [oncreate]; this._oncreate = [oncreate];
} else { } else {
this._root._oncreate.push(oncreate); this._root._oncreate.push(oncreate);
} }
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
callAll(this._oncreate); callAll(this._oncreate);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -166,8 +166,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { var template = (function() {
var template = (function() {
return { return {
methods: { methods: {
foo ( bar ) { foo ( bar ) {
@ -186,37 +185,35 @@ var _actual = (function() {
}; };
}()); }());
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
return { return {
create: noop, create: noop,
mount: noop, mount: noop,
update: noop, update: noop,
unmount: noop, unmount: noop,
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, template.methods, proto); assign(SvelteComponent.prototype, template.methods, proto);
template.setup(SvelteComponent); template.setup(SvelteComponent);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,8 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, init, noop, proto } from "svelte/shared.js"; import { assign, init, noop, proto } from "svelte/shared.js";
export default (function() { var template = (function() {
var template = (function() {
return { return {
methods: { methods: {
foo ( bar ) { foo ( bar ) {
@ -21,35 +20,34 @@ export default (function() {
}; };
}()); }());
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
return { return {
create: noop, create: noop,
mount: noop, mount: noop,
update: noop, update: noop,
unmount: noop, unmount: noop,
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, template.methods, proto); assign(SvelteComponent.prototype, template.methods, proto);
template.setup(SvelteComponent); template.setup(SvelteComponent);
return SvelteComponent; export default SvelteComponent;
}());

@ -190,273 +190,270 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div, text, p, text_1, text_2, text_3, text_4, p_1, text_5, text_6, text_8, if_block_4_anchor;
var div, text, p, text_1, text_2, text_3, text_4, p_1, text_5, text_6, text_8, if_block_4_anchor;
var if_block = (state.a) && create_if_block(state, component);
var if_block = (state.a) && create_if_block(state, component);
var if_block_1 = (state.b) && create_if_block_1(state, component);
var if_block_1 = (state.b) && create_if_block_1(state, component);
var if_block_2 = (state.c) && create_if_block_2(state, component);
var if_block_2 = (state.c) && create_if_block_2(state, component);
var if_block_3 = (state.d) && create_if_block_3(state, component);
var if_block_3 = (state.d) && create_if_block_3(state, component);
var if_block_4 = (state.e) && create_if_block_4(state, component);
var if_block_4 = (state.e) && create_if_block_4(state, component);
return {
return { create: function() {
create: function() { div = createElement("div");
div = createElement("div"); if (if_block) if_block.create();
if (if_block) if_block.create(); text = createText("\n\n\t");
text = createText("\n\n\t"); p = createElement("p");
p = createElement("p"); text_1 = createText("this can be used as an anchor");
text_1 = createText("this can be used as an anchor"); text_2 = createText("\n\n\t");
text_2 = createText("\n\n\t"); if (if_block_1) if_block_1.create();
if (if_block_1) if_block_1.create(); text_3 = createText("\n\n\t");
text_3 = createText("\n\n\t"); if (if_block_2) if_block_2.create();
if (if_block_2) if_block_2.create(); text_4 = createText("\n\n\t");
text_4 = createText("\n\n\t"); p_1 = createElement("p");
p_1 = createElement("p"); text_5 = createText("so can this");
text_5 = createText("so can this"); text_6 = createText("\n\n\t");
text_6 = createText("\n\n\t"); if (if_block_3) if_block_3.create();
if (if_block_3) if_block_3.create(); text_8 = createText("\n\n");
text_8 = createText("\n\n"); if (if_block_4) if_block_4.create();
if (if_block_4) if_block_4.create(); if_block_4_anchor = createComment();
if_block_4_anchor = createComment(); },
},
mount: function(target, anchor) {
mount: function(target, anchor) { insertNode(div, target, anchor);
insertNode(div, target, anchor); if (if_block) if_block.mount(div, null);
if (if_block) if_block.mount(div, null); appendNode(text, div);
appendNode(text, div); appendNode(p, div);
appendNode(p, div); appendNode(text_1, p);
appendNode(text_1, p); appendNode(text_2, div);
appendNode(text_2, div); if (if_block_1) if_block_1.mount(div, null);
if (if_block_1) if_block_1.mount(div, null); appendNode(text_3, div);
appendNode(text_3, div); if (if_block_2) if_block_2.mount(div, null);
if (if_block_2) if_block_2.mount(div, null); appendNode(text_4, div);
appendNode(text_4, div); appendNode(p_1, div);
appendNode(p_1, div); appendNode(text_5, p_1);
appendNode(text_5, p_1); appendNode(text_6, div);
appendNode(text_6, div); if (if_block_3) if_block_3.mount(div, null);
if (if_block_3) if_block_3.mount(div, null); insertNode(text_8, target, anchor);
insertNode(text_8, target, anchor); if (if_block_4) if_block_4.mount(target, anchor);
if (if_block_4) if_block_4.mount(target, anchor); insertNode(if_block_4_anchor, target, anchor);
insertNode(if_block_4_anchor, target, anchor); },
},
update: function(changed, state) {
update: function(changed, state) { if (state.a) {
if (state.a) { if (!if_block) {
if (!if_block) { if_block = create_if_block(state, component);
if_block = create_if_block(state, component); if_block.create();
if_block.create(); if_block.mount(div, text);
if_block.mount(div, text);
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
} }
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
}
if (state.b) { if (state.b) {
if (!if_block_1) { if (!if_block_1) {
if_block_1 = create_if_block_1(state, component); if_block_1 = create_if_block_1(state, component);
if_block_1.create(); if_block_1.create();
if_block_1.mount(div, text_3); if_block_1.mount(div, text_3);
}
} else if (if_block_1) {
if_block_1.unmount();
if_block_1.destroy();
if_block_1 = null;
} }
} else if (if_block_1) {
if_block_1.unmount();
if_block_1.destroy();
if_block_1 = null;
}
if (state.c) { if (state.c) {
if (!if_block_2) { if (!if_block_2) {
if_block_2 = create_if_block_2(state, component); if_block_2 = create_if_block_2(state, component);
if_block_2.create(); if_block_2.create();
if_block_2.mount(div, text_4); if_block_2.mount(div, text_4);
}
} else if (if_block_2) {
if_block_2.unmount();
if_block_2.destroy();
if_block_2 = null;
} }
} else if (if_block_2) {
if_block_2.unmount();
if_block_2.destroy();
if_block_2 = null;
}
if (state.d) { if (state.d) {
if (!if_block_3) { if (!if_block_3) {
if_block_3 = create_if_block_3(state, component); if_block_3 = create_if_block_3(state, component);
if_block_3.create(); if_block_3.create();
if_block_3.mount(div, null); if_block_3.mount(div, null);
}
} else if (if_block_3) {
if_block_3.unmount();
if_block_3.destroy();
if_block_3 = null;
} }
} else if (if_block_3) {
if_block_3.unmount();
if_block_3.destroy();
if_block_3 = null;
}
if (state.e) { if (state.e) {
if (!if_block_4) { if (!if_block_4) {
if_block_4 = create_if_block_4(state, component); if_block_4 = create_if_block_4(state, component);
if_block_4.create(); if_block_4.create();
if_block_4.mount(if_block_4_anchor.parentNode, if_block_4_anchor); if_block_4.mount(if_block_4_anchor.parentNode, if_block_4_anchor);
}
} else if (if_block_4) {
if_block_4.unmount();
if_block_4.destroy();
if_block_4 = null;
} }
}, } else if (if_block_4) {
if_block_4.unmount();
unmount: function() { if_block_4.destroy();
detachNode(div); if_block_4 = null;
if (if_block) if_block.unmount();
if (if_block_1) if_block_1.unmount();
if (if_block_2) if_block_2.unmount();
if (if_block_3) if_block_3.unmount();
detachNode(text_8);
if (if_block_4) if_block_4.unmount();
detachNode(if_block_4_anchor);
},
destroy: function() {
if (if_block) if_block.destroy();
if (if_block_1) if_block_1.destroy();
if (if_block_2) if_block_2.destroy();
if (if_block_3) if_block_3.destroy();
if (if_block_4) if_block_4.destroy();
} }
}; },
}
unmount: function() {
detachNode(div);
if (if_block) if_block.unmount();
if (if_block_1) if_block_1.unmount();
if (if_block_2) if_block_2.unmount();
if (if_block_3) if_block_3.unmount();
detachNode(text_8);
if (if_block_4) if_block_4.unmount();
detachNode(if_block_4_anchor);
},
destroy: function() {
if (if_block) if_block.destroy();
if (if_block_1) if_block_1.destroy();
if (if_block_2) if_block_2.destroy();
if (if_block_3) if_block_3.destroy();
if (if_block_4) if_block_4.destroy();
}
};
}
// (2:1) {{#if a}} // (2:1) {{#if a}}
function create_if_block(state, component) { function create_if_block(state, component) {
var p, text; var p, text;
return { return {
create: function() { create: function() {
p = createElement("p"); p = createElement("p");
text = createText("a"); text = createText("a");
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
appendNode(text, p); appendNode(text, p);
}, },
unmount: function() { unmount: function() {
detachNode(p); detachNode(p);
}, },
destroy: noop destroy: noop
}; };
} }
// (8:1) {{#if b}} // (8:1) {{#if b}}
function create_if_block_1(state, component) { function create_if_block_1(state, component) {
var p, text; var p, text;
return { return {
create: function() { create: function() {
p = createElement("p"); p = createElement("p");
text = createText("b"); text = createText("b");
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
appendNode(text, p); appendNode(text, p);
}, },
unmount: function() { unmount: function() {
detachNode(p); detachNode(p);
}, },
destroy: noop destroy: noop
}; };
} }
// (12:1) {{#if c}} // (12:1) {{#if c}}
function create_if_block_2(state, component) { function create_if_block_2(state, component) {
var p, text; var p, text;
return { return {
create: function() { create: function() {
p = createElement("p"); p = createElement("p");
text = createText("c"); text = createText("c");
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
appendNode(text, p); appendNode(text, p);
}, },
unmount: function() { unmount: function() {
detachNode(p); detachNode(p);
}, },
destroy: noop destroy: noop
}; };
} }
// (18:1) {{#if d}} // (18:1) {{#if d}}
function create_if_block_3(state, component) { function create_if_block_3(state, component) {
var p, text; var p, text;
return { return {
create: function() { create: function() {
p = createElement("p"); p = createElement("p");
text = createText("d"); text = createText("d");
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
appendNode(text, p); appendNode(text, p);
}, },
unmount: function() { unmount: function() {
detachNode(p); detachNode(p);
}, },
destroy: noop destroy: noop
}; };
} }
// (25:0) {{#if e}} // (25:0) {{#if e}}
function create_if_block_4(state, component) { function create_if_block_4(state, component) {
var p, text; var p, text;
return { return {
create: function() { create: function() {
p = createElement("p"); p = createElement("p");
text = createText("e"); text = createText("e");
}, },
mount: function(target, anchor) { mount: function(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
appendNode(text, p); appendNode(text, p);
}, },
unmount: function() { unmount: function() {
detachNode(p); detachNode(p);
}, },
destroy: noop destroy: noop
}; };
} }
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
this._state = options.data || {}; this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
if (options.target) { if (options.target) {
this._fragment.create(); this._fragment.create();
this._fragment.mount(options.target, options.anchor || null); this._fragment.mount(options.target, options.anchor || null);
}
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent;
}());
export default _actual; export default SvelteComponent;

@ -1,271 +1,269 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() { function create_main_fragment(state, component) {
function create_main_fragment(state, component) { var div, text, p, text_1, text_2, text_3, text_4, p_1, text_5, text_6, text_8, if_block_4_anchor;
var div, text, p, text_1, text_2, text_3, text_4, p_1, text_5, text_6, text_8, if_block_4_anchor;
var if_block = (state.a) && create_if_block(state, component);
var if_block = (state.a) && create_if_block(state, component);
var if_block_1 = (state.b) && create_if_block_1(state, component);
var if_block_1 = (state.b) && create_if_block_1(state, component);
var if_block_2 = (state.c) && create_if_block_2(state, component);
var if_block_2 = (state.c) && create_if_block_2(state, component);
var if_block_3 = (state.d) && create_if_block_3(state, component);
var if_block_3 = (state.d) && create_if_block_3(state, component);
var if_block_4 = (state.e) && create_if_block_4(state, component);
var if_block_4 = (state.e) && create_if_block_4(state, component);
return {
return { create: function() {
create: function() { div = createElement("div");
div = createElement("div"); if (if_block) if_block.create();
if (if_block) if_block.create(); text = createText("\n\n\t");
text = createText("\n\n\t"); p = createElement("p");
p = createElement("p"); text_1 = createText("this can be used as an anchor");
text_1 = createText("this can be used as an anchor"); text_2 = createText("\n\n\t");
text_2 = createText("\n\n\t"); if (if_block_1) if_block_1.create();
if (if_block_1) if_block_1.create(); text_3 = createText("\n\n\t");
text_3 = createText("\n\n\t"); if (if_block_2) if_block_2.create();
if (if_block_2) if_block_2.create(); text_4 = createText("\n\n\t");
text_4 = createText("\n\n\t"); p_1 = createElement("p");
p_1 = createElement("p"); text_5 = createText("so can this");
text_5 = createText("so can this"); text_6 = createText("\n\n\t");
text_6 = createText("\n\n\t"); if (if_block_3) if_block_3.create();
if (if_block_3) if_block_3.create(); text_8 = createText("\n\n");
text_8 = createText("\n\n"); if (if_block_4) if_block_4.create();
if (if_block_4) if_block_4.create(); if_block_4_anchor = createComment();
if_block_4_anchor = createComment(); },
},
mount: function(target, anchor) {
mount: function(target, anchor) { insertNode(div, target, anchor);
insertNode(div, target, anchor); if (if_block) if_block.mount(div, null);
if (if_block) if_block.mount(div, null); appendNode(text, div);
appendNode(text, div); appendNode(p, div);
appendNode(p, div); appendNode(text_1, p);
appendNode(text_1, p); appendNode(text_2, div);
appendNode(text_2, div); if (if_block_1) if_block_1.mount(div, null);
if (if_block_1) if_block_1.mount(div, null); appendNode(text_3, div);
appendNode(text_3, div); if (if_block_2) if_block_2.mount(div, null);
if (if_block_2) if_block_2.mount(div, null); appendNode(text_4, div);
appendNode(text_4, div); appendNode(p_1, div);
appendNode(p_1, div); appendNode(text_5, p_1);
appendNode(text_5, p_1); appendNode(text_6, div);
appendNode(text_6, div); if (if_block_3) if_block_3.mount(div, null);
if (if_block_3) if_block_3.mount(div, null); insertNode(text_8, target, anchor);
insertNode(text_8, target, anchor); if (if_block_4) if_block_4.mount(target, anchor);
if (if_block_4) if_block_4.mount(target, anchor); insertNode(if_block_4_anchor, target, anchor);
insertNode(if_block_4_anchor, target, anchor); },
},
update: function(changed, state) {
update: function(changed, state) { if (state.a) {
if (state.a) { if (!if_block) {
if (!if_block) { if_block = create_if_block(state, component);
if_block = create_if_block(state, component); if_block.create();
if_block.create(); if_block.mount(div, text);
if_block.mount(div, text);
}
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
} }
} else if (if_block) {
if_block.unmount();
if_block.destroy();
if_block = null;
}
if (state.b) { if (state.b) {
if (!if_block_1) { if (!if_block_1) {
if_block_1 = create_if_block_1(state, component); if_block_1 = create_if_block_1(state, component);
if_block_1.create(); if_block_1.create();
if_block_1.mount(div, text_3); if_block_1.mount(div, text_3);
}
} else if (if_block_1) {
if_block_1.unmount();
if_block_1.destroy();
if_block_1 = null;
} }
} else if (if_block_1) {
if_block_1.unmount();
if_block_1.destroy();
if_block_1 = null;
}
if (state.c) { if (state.c) {
if (!if_block_2) { if (!if_block_2) {
if_block_2 = create_if_block_2(state, component); if_block_2 = create_if_block_2(state, component);
if_block_2.create(); if_block_2.create();
if_block_2.mount(div, text_4); if_block_2.mount(div, text_4);
}
} else if (if_block_2) {
if_block_2.unmount();
if_block_2.destroy();
if_block_2 = null;
} }
} else if (if_block_2) {
if_block_2.unmount();
if_block_2.destroy();
if_block_2 = null;
}
if (state.d) { if (state.d) {
if (!if_block_3) { if (!if_block_3) {
if_block_3 = create_if_block_3(state, component); if_block_3 = create_if_block_3(state, component);
if_block_3.create(); if_block_3.create();
if_block_3.mount(div, null); if_block_3.mount(div, null);
}
} else if (if_block_3) {
if_block_3.unmount();
if_block_3.destroy();
if_block_3 = null;
} }
} else if (if_block_3) {
if_block_3.unmount();
if_block_3.destroy();
if_block_3 = null;
}
if (state.e) { if (state.e) {
if (!if_block_4) { if (!if_block_4) {
if_block_4 = create_if_block_4(state, component); if_block_4 = create_if_block_4(state, component);
if_block_4.create(); if_block_4.create();
if_block_4.mount(if_block_4_anchor.parentNode, if_block_4_anchor); if_block_4.mount(if_block_4_anchor.parentNode, if_block_4_anchor);
}
} else if (if_block_4) {
if_block_4.unmount();
if_block_4.destroy();
if_block_4 = null;
} }
}, } else if (if_block_4) {
if_block_4.unmount();
unmount: function() { if_block_4.destroy();
detachNode(div); if_block_4 = null;
if (if_block) if_block.unmount();
if (if_block_1) if_block_1.unmount();
if (if_block_2) if_block_2.unmount();
if (if_block_3) if_block_3.unmount();
detachNode(text_8);
if (if_block_4) if_block_4.unmount();
detachNode(if_block_4_anchor);
},
destroy: function() {
if (if_block) if_block.destroy();
if (if_block_1) if_block_1.destroy();
if (if_block_2) if_block_2.destroy();
if (if_block_3) if_block_3.destroy();
if (if_block_4) if_block_4.destroy();
} }
}; },
}
unmount: function() {
// (2:1) {{#if a}} detachNode(div);
function create_if_block(state, component) { if (if_block) if_block.unmount();
var p, text; if (if_block_1) if_block_1.unmount();
if (if_block_2) if_block_2.unmount();
return { if (if_block_3) if_block_3.unmount();
create: function() { detachNode(text_8);
p = createElement("p"); if (if_block_4) if_block_4.unmount();
text = createText("a"); detachNode(if_block_4_anchor);
}, },
mount: function(target, anchor) { destroy: function() {
insertNode(p, target, anchor); if (if_block) if_block.destroy();
appendNode(text, p); if (if_block_1) if_block_1.destroy();
}, if (if_block_2) if_block_2.destroy();
if (if_block_3) if_block_3.destroy();
unmount: function() { if (if_block_4) if_block_4.destroy();
detachNode(p);
},
destroy: noop
};
}
// (8:1) {{#if b}}
function create_if_block_1(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("b");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (12:1) {{#if c}}
function create_if_block_2(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("c");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (18:1) {{#if d}}
function create_if_block_3(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("d");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (25:0) {{#if e}}
function create_if_block_4(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("e");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
} }
};
}
// (2:1) {{#if a}}
function create_if_block(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("a");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (8:1) {{#if b}}
function create_if_block_1(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("b");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (12:1) {{#if c}}
function create_if_block_2(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("c");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (18:1) {{#if d}}
function create_if_block_3(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("d");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
// (25:0) {{#if e}}
function create_if_block_4(state, component) {
var p, text;
return {
create: function() {
p = createElement("p");
text = createText("e");
},
mount: function(target, anchor) {
insertNode(p, target, anchor);
appendNode(text, p);
},
unmount: function() {
detachNode(p);
},
destroy: noop
};
}
function SvelteComponent(options) {
init(this, options);
this._state = options.data || {};
this._fragment = create_main_fragment(this._state, this);
if (options.target) {
this._fragment.create();
this._fragment.mount(options.target, options.anchor || null);
} }
}
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
return SvelteComponent; export default SvelteComponent;
}());

@ -74,7 +74,7 @@ describe("runtime", () => {
const { code } = svelte.compile(source, compileOptions); const { code } = svelte.compile(source, compileOptions);
const startIndex = code.indexOf("function create_main_fragment"); // may change! const startIndex = code.indexOf("function create_main_fragment"); // may change!
if (startIndex === -1) throw new Error("missing create_main_fragment"); if (startIndex === -1) throw new Error("missing create_main_fragment");
const endIndex = code.lastIndexOf("return"); const endIndex = code.lastIndexOf("export default");
const es5 = const es5 =
code.slice(0, startIndex).split('\n').map(x => spaces(x.length)).join('\n') + code.slice(0, startIndex).split('\n').map(x => spaces(x.length)).join('\n') +
code.slice(startIndex, endIndex); code.slice(startIndex, endIndex);

Loading…
Cancel
Save