Merge pull request #863 from sveltejs/short-method-names

use short method names
pull/867/head
Rich Harris 7 years ago committed by GitHub
commit 3c405afa77

@ -226,24 +226,24 @@ export default class Block {
} }
if (this.builders.create.isEmpty()) { if (this.builders.create.isEmpty()) {
properties.addBlock(`create: @noop,`); properties.addBlock(`c: @noop,`);
} else { } else {
properties.addBlock(deindent` properties.addBlock(deindent`
create: function() { c: function create() {
${this.builders.create} ${this.builders.create}
${!this.builders.hydrate.isEmpty() && `this.hydrate();`} ${!this.builders.hydrate.isEmpty() && `this.h();`}
}, },
`); `);
} }
if (this.generator.hydratable) { if (this.generator.hydratable) {
if (this.builders.claim.isEmpty()) { if (this.builders.claim.isEmpty()) {
properties.addBlock(`claim: @noop,`); properties.addBlock(`l: @noop,`);
} else { } else {
properties.addBlock(deindent` properties.addBlock(deindent`
claim: function(nodes) { l: function claim(nodes) {
${this.builders.claim} ${this.builders.claim}
${!this.builders.hydrate.isEmpty() && `this.hydrate();`} ${!this.builders.hydrate.isEmpty() && `this.h();`}
}, },
`); `);
} }
@ -251,17 +251,17 @@ export default class Block {
if (!this.builders.hydrate.isEmpty()) { if (!this.builders.hydrate.isEmpty()) {
properties.addBlock(deindent` properties.addBlock(deindent`
hydrate: function() { h: function hydrate() {
${this.builders.hydrate} ${this.builders.hydrate}
}, },
`); `);
} }
if (this.builders.mount.isEmpty()) { if (this.builders.mount.isEmpty()) {
properties.addBlock(`mount: @noop,`); properties.addBlock(`m: @noop,`);
} else { } else {
properties.addBlock(deindent` properties.addBlock(deindent`
mount: function(#target, anchor) { m: function mount(#target, anchor) {
${this.builders.mount} ${this.builders.mount}
}, },
`); `);
@ -269,10 +269,10 @@ export default class Block {
if (this.hasUpdateMethod) { if (this.hasUpdateMethod) {
if (this.builders.update.isEmpty()) { if (this.builders.update.isEmpty()) {
properties.addBlock(`update: @noop,`); properties.addBlock(`p: @noop,`);
} else { } else {
properties.addBlock(deindent` properties.addBlock(deindent`
update: function(changed, ${this.params.join(', ')}) { p: function update(changed, ${this.params.join(', ')}) {
${this.builders.update} ${this.builders.update}
}, },
`); `);
@ -282,20 +282,20 @@ export default class Block {
if (this.hasIntroMethod) { if (this.hasIntroMethod) {
if (hasIntros) { if (hasIntros) {
properties.addBlock(deindent` properties.addBlock(deindent`
intro: function(#target, anchor) { i: function intro(#target, anchor) {
if (${introing}) return; if (${introing}) return;
${introing} = true; ${introing} = true;
${hasOutros && `${outroing} = false;`} ${hasOutros && `${outroing} = false;`}
${this.builders.intro} ${this.builders.intro}
this.mount(#target, anchor); this.m(#target, anchor);
}, },
`); `);
} else { } else {
properties.addBlock(deindent` properties.addBlock(deindent`
intro: function(#target, anchor) { i: function intro(#target, anchor) {
this.mount(#target, anchor); this.m(#target, anchor);
}, },
`); `);
} }
@ -304,7 +304,7 @@ export default class Block {
if (this.hasOutroMethod) { if (this.hasOutroMethod) {
if (hasOutros) { if (hasOutros) {
properties.addBlock(deindent` properties.addBlock(deindent`
outro: function(${this.alias('outrocallback')}) { o: function outro(${this.alias('outrocallback')}) {
if (${outroing}) return; if (${outroing}) return;
${outroing} = true; ${outroing} = true;
${hasIntros && `${introing} = false;`} ${hasIntros && `${introing} = false;`}
@ -315,8 +315,9 @@ export default class Block {
}, },
`); `);
} else { } else {
// TODO should this be a helper?
properties.addBlock(deindent` properties.addBlock(deindent`
outro: function(outrocallback) { o: function outro(outrocallback) {
outrocallback(); outrocallback();
}, },
`); `);
@ -324,20 +325,20 @@ export default class Block {
} }
if (this.builders.unmount.isEmpty()) { if (this.builders.unmount.isEmpty()) {
properties.addBlock(`unmount: @noop,`); properties.addBlock(`u: @noop,`);
} else { } else {
properties.addBlock(deindent` properties.addBlock(deindent`
unmount: function() { u: function unmount() {
${this.builders.unmount} ${this.builders.unmount}
}, },
`); `);
} }
if (this.builders.destroy.isEmpty()) { if (this.builders.destroy.isEmpty()) {
properties.addBlock(`destroy: @noop`); properties.addBlock(`d: @noop`);
} else { } else {
properties.addBlock(deindent` properties.addBlock(deindent`
destroy: function() { d: function destroy() {
${this.builders.destroy} ${this.builders.destroy}
} }
`); `);

@ -236,8 +236,8 @@ export default function dom(
this._fragment = @create_main_fragment(this._state, this); this._fragment = @create_main_fragment(this._state, this);
${generator.customElement ? deindent` ${generator.customElement ? deindent`
this._fragment.create(); this._fragment.c();
this._fragment.${block.hasIntroMethod ? 'intro' : 'mount'}(this.shadowRoot, null); this._fragment.${block.hasIntroMethod ? 'i' : 'm'}(this.shadowRoot, null);
if (options.target) this._mount(options.target, options.anchor || null); if (options.target) this._mount(options.target, options.anchor || null);
` : deindent` ` : deindent`
@ -245,14 +245,14 @@ export default function dom(
${generator.hydratable ${generator.hydratable
? deindent` ? deindent`
var nodes = @children(options.target); var nodes = @children(options.target);
options.hydrate ? this._fragment.claim(nodes) : this._fragment.create(); options.hydrate ? this._fragment.l(nodes) : this._fragment.c();
nodes.forEach(@detachNode); nodes.forEach(@detachNode);
` : ` :
deindent` deindent`
${options.dev && `if (options.hydrate) throw new Error("options.hydrate only works if the component was compiled with the \`hydratable: true\` option");`} ${options.dev && `if (options.hydrate) throw new Error("options.hydrate only works if the component was compiled with the \`hydratable: true\` option");`}
this._fragment.create(); this._fragment.c();
`} `}
this._fragment.${block.hasIntroMethod ? 'intro' : 'mount'}(options.target, options.anchor || null); this._fragment.${block.hasIntroMethod ? 'i' : 'm'}(options.target, options.anchor || null);
${(generator.hasComponents || generator.hasComplexBindings || templateProperties.oncreate || generator.hasIntroTransitions) && deindent` ${(generator.hasComponents || generator.hasComplexBindings || templateProperties.oncreate || generator.hasIntroTransitions) && deindent`
${generator.hasComponents && `this._lock = true;`} ${generator.hasComponents && `this._lock = true;`}

@ -230,10 +230,10 @@ export default function visitComponent(
${beforecreate} ${beforecreate}
`); `);
block.builders.create.addLine(`${name}._fragment.create();`); block.builders.create.addLine(`${name}._fragment.c();`);
block.builders.claim.addLine( block.builders.claim.addLine(
`${name}._fragment.claim( ${state.parentNodes} );` `${name}._fragment.l( ${state.parentNodes} );`
); );
block.builders.mount.addLine( block.builders.mount.addLine(

@ -33,7 +33,7 @@ export default function visitEachBlock(
generator.code.overwrite(c, c + 4, 'length'); generator.code.overwrite(c, c + 4, 'length');
const length = `[✂${c}-${c+4}✂]`; const length = `[✂${c}-${c+4}✂]`;
const mountOrIntro = node._block.hasIntroMethod ? 'intro' : 'mount'; const mountOrIntro = node._block.hasIntroMethod ? 'i' : 'm';
const vars = { const vars = {
each, each,
create_each_block, create_each_block,
@ -75,7 +75,7 @@ export default function visitEachBlock(
block.builders.init.addBlock(deindent` block.builders.init.addBlock(deindent`
if (!${each_block_value}.${length}) { if (!${each_block_value}.${length}) {
${each_block_else} = ${node.else._block.name}(${params}, #component); ${each_block_else} = ${node.else._block.name}(${params}, #component);
${each_block_else}.create(); ${each_block_else}.c();
} }
`); `);
@ -90,14 +90,14 @@ export default function visitEachBlock(
if (node.else._block.hasUpdateMethod) { if (node.else._block.hasUpdateMethod) {
block.builders.update.addBlock(deindent` block.builders.update.addBlock(deindent`
if (!${each_block_value}.${length} && ${each_block_else}) { if (!${each_block_value}.${length} && ${each_block_else}) {
${each_block_else}.update( changed, ${params} ); ${each_block_else}.p( changed, ${params} );
} else if (!${each_block_value}.${length}) { } else if (!${each_block_value}.${length}) {
${each_block_else} = ${node.else._block.name}(${params}, #component); ${each_block_else} = ${node.else._block.name}(${params}, #component);
${each_block_else}.create(); ${each_block_else}.c();
${each_block_else}.${mountOrIntro}(${parentNode}, ${anchor}); ${each_block_else}.${mountOrIntro}(${parentNode}, ${anchor});
} else if (${each_block_else}) { } else if (${each_block_else}) {
${each_block_else}.unmount(); ${each_block_else}.u();
${each_block_else}.destroy(); ${each_block_else}.d();
${each_block_else} = null; ${each_block_else} = null;
} }
`); `);
@ -105,24 +105,24 @@ export default function visitEachBlock(
block.builders.update.addBlock(deindent` block.builders.update.addBlock(deindent`
if (${each_block_value}.${length}) { if (${each_block_value}.${length}) {
if (${each_block_else}) { if (${each_block_else}) {
${each_block_else}.unmount(); ${each_block_else}.u();
${each_block_else}.destroy(); ${each_block_else}.d();
${each_block_else} = null; ${each_block_else} = null;
} }
} else if (!${each_block_else}) { } else if (!${each_block_else}) {
${each_block_else} = ${node.else._block.name}(${params}, #component); ${each_block_else} = ${node.else._block.name}(${params}, #component);
${each_block_else}.create(); ${each_block_else}.c();
${each_block_else}.${mountOrIntro}(${parentNode}, ${anchor}); ${each_block_else}.${mountOrIntro}(${parentNode}, ${anchor});
} }
`); `);
} }
block.builders.unmount.addLine( block.builders.unmount.addLine(
`if (${each_block_else}) ${each_block_else}.unmount()` `if (${each_block_else}) ${each_block_else}.u()`
); );
block.builders.destroy.addBlock(deindent` block.builders.destroy.addBlock(deindent`
if (${each_block_else}) ${each_block_else}.destroy(); if (${each_block_else}) ${each_block_else}.d();
`); `);
} }
@ -196,7 +196,7 @@ function keyed(
block.builders.create.addBlock(deindent` block.builders.create.addBlock(deindent`
var ${iteration} = ${head}; var ${iteration} = ${head};
while (${iteration}) { while (${iteration}) {
${iteration}.create(); ${iteration}.c();
${iteration} = ${iteration}.next; ${iteration} = ${iteration}.next;
} }
`); `);
@ -204,7 +204,7 @@ function keyed(
block.builders.claim.addBlock(deindent` block.builders.claim.addBlock(deindent`
var ${iteration} = ${head}; var ${iteration} = ${head};
while (${iteration}) { while (${iteration}) {
${iteration}.claim(${state.parentNodes}); ${iteration}.l(${state.parentNodes});
${iteration} = ${iteration}.next; ${iteration} = ${iteration}.next;
} }
`); `);
@ -225,9 +225,9 @@ function keyed(
const fn = block.getUniqueName(`${each}_outro`); const fn = block.getUniqueName(`${each}_outro`);
block.builders.init.addBlock(deindent` block.builders.init.addBlock(deindent`
function ${fn}(iteration) { function ${fn}(iteration) {
iteration.outro(function() { iteration.o(function() {
iteration.unmount(); iteration.u();
iteration.destroy(); iteration.d();
${lookup}[iteration.key] = null; ${lookup}[iteration.key] = null;
}); });
} }
@ -249,8 +249,8 @@ function keyed(
const fn = block.getUniqueName(`${each}_destroy`); const fn = block.getUniqueName(`${each}_destroy`);
block.builders.init.addBlock(deindent` block.builders.init.addBlock(deindent`
function ${fn}(iteration) { function ${fn}(iteration) {
iteration.unmount(); iteration.u();
iteration.destroy(); iteration.d();
${lookup}[iteration.key] = null; ${lookup}[iteration.key] = null;
} }
`); `);
@ -283,7 +283,7 @@ function keyed(
var ${iteration} = ${lookup}[${key}]; var ${iteration} = ${lookup}[${key}];
${dynamic && ${dynamic &&
`if (${iteration}) ${iteration}.update(changed, ${params}, ${each_block_value}, ${each_block_value}[#i], #i);`} `if (${iteration}) ${iteration}.p(changed, ${params}, ${each_block_value}, ${each_block_value}[#i], #i);`}
if (${expected}) { if (${expected}) {
if (${key} === ${expected}.key) { if (${key} === ${expected}.key) {
@ -301,11 +301,11 @@ function keyed(
${iteration}.discard = false; ${iteration}.discard = false;
${iteration}.last = ${last}; ${iteration}.last = ${last};
if (!${expected}) ${iteration}.mount(${parentNode}, ${anchor}); if (!${expected}) ${iteration}.m(${parentNode}, ${anchor});
} else { } else {
// key is being inserted // key is being inserted
${iteration} = ${lookup}[${key}] = ${create_each_block}(${params}, ${each_block_value}, ${each_block_value}[#i], #i, #component, ${key}); ${iteration} = ${lookup}[${key}] = ${create_each_block}(${params}, ${each_block_value}, ${each_block_value}[#i], #i, #component, ${key});
${iteration}.create(); ${iteration}.c();
${iteration}.${mountOrIntro}(${parentNode}, ${expected}.first); ${iteration}.${mountOrIntro}(${parentNode}, ${expected}.first);
${expected}.last = ${iteration}; ${expected}.last = ${iteration};
@ -317,17 +317,17 @@ function keyed(
if (${iteration}) { if (${iteration}) {
${iteration}.discard = false; ${iteration}.discard = false;
${iteration}.next = null; ${iteration}.next = null;
${iteration}.mount(${parentNode}, ${anchor}); ${iteration}.m(${parentNode}, ${anchor});
} else { } else {
${iteration} = ${lookup}[${key}] = ${create_each_block}(${params}, ${each_block_value}, ${each_block_value}[#i], #i, #component, ${key}); ${iteration} = ${lookup}[${key}] = ${create_each_block}(${params}, ${each_block_value}, ${each_block_value}[#i], #i, #component, ${key});
${iteration}.create(); ${iteration}.c();
${iteration}.${mountOrIntro}(${parentNode}, ${anchor}); ${iteration}.${mountOrIntro}(${parentNode}, ${anchor});
} }
} }
if (${last}) ${last}.next = ${iteration}; if (${last}) ${last}.next = ${iteration};
${iteration}.last = ${last}; ${iteration}.last = ${last};
${node._block.hasIntroMethod && `${iteration}.intro(${parentNode}, ${anchor});`} ${node._block.hasIntroMethod && `${iteration}.i(${parentNode}, ${anchor});`}
${last} = ${iteration}; ${last} = ${iteration};
} }
@ -342,7 +342,7 @@ function keyed(
block.builders.unmount.addBlock(deindent` block.builders.unmount.addBlock(deindent`
var ${iteration} = ${head}; var ${iteration} = ${head};
while (${iteration}) { while (${iteration}) {
${iteration}.unmount(); ${iteration}.u();
${iteration} = ${iteration}.next; ${iteration} = ${iteration}.next;
} }
`); `);
@ -351,7 +351,7 @@ function keyed(
block.builders.destroy.addBlock(deindent` block.builders.destroy.addBlock(deindent`
var ${iteration} = ${head}; var ${iteration} = ${head};
while (${iteration}) { while (${iteration}) {
${iteration}.destroy(); ${iteration}.d();
${iteration} = ${iteration}.next; ${iteration} = ${iteration}.next;
} }
`); `);
@ -386,13 +386,13 @@ function unkeyed(
block.builders.create.addBlock(deindent` block.builders.create.addBlock(deindent`
for (var #i = 0; #i < ${iterations}.length; #i += 1) { for (var #i = 0; #i < ${iterations}.length; #i += 1) {
${iterations}[#i].create(); ${iterations}[#i].c();
} }
`); `);
block.builders.claim.addBlock(deindent` block.builders.claim.addBlock(deindent`
for (var #i = 0; #i < ${iterations}.length; #i += 1) { for (var #i = 0; #i < ${iterations}.length; #i += 1) {
${iterations}[#i].claim(${state.parentNodes}); ${iterations}[#i].l(${state.parentNodes});
} }
`); `);
@ -420,25 +420,25 @@ function unkeyed(
? node._block.hasIntroMethod ? node._block.hasIntroMethod
? deindent` ? deindent`
if (${iterations}[#i]) { if (${iterations}[#i]) {
${iterations}[#i].update(changed, ${params}, ${each_block_value}, ${each_block_value}[#i], #i); ${iterations}[#i].p(changed, ${params}, ${each_block_value}, ${each_block_value}[#i], #i);
} else { } else {
${iterations}[#i] = ${create_each_block}(${params}, ${each_block_value}, ${each_block_value}[#i], #i, #component); ${iterations}[#i] = ${create_each_block}(${params}, ${each_block_value}, ${each_block_value}[#i], #i, #component);
${iterations}[#i].create(); ${iterations}[#i].c();
} }
${iterations}[#i].intro(${parentNode}, ${anchor}); ${iterations}[#i].i(${parentNode}, ${anchor});
` `
: deindent` : deindent`
if (${iterations}[#i]) { if (${iterations}[#i]) {
${iterations}[#i].update(changed, ${params}, ${each_block_value}, ${each_block_value}[#i], #i); ${iterations}[#i].p(changed, ${params}, ${each_block_value}, ${each_block_value}[#i], #i);
} else { } else {
${iterations}[#i] = ${create_each_block}(${params}, ${each_block_value}, ${each_block_value}[#i], #i, #component); ${iterations}[#i] = ${create_each_block}(${params}, ${each_block_value}, ${each_block_value}[#i], #i, #component);
${iterations}[#i].create(); ${iterations}[#i].c();
${iterations}[#i].mount(${parentNode}, ${anchor}); ${iterations}[#i].m(${parentNode}, ${anchor});
} }
` `
: deindent` : deindent`
${iterations}[#i] = ${create_each_block}(${params}, ${each_block_value}, ${each_block_value}[#i], #i, #component); ${iterations}[#i] = ${create_each_block}(${params}, ${each_block_value}, ${each_block_value}[#i], #i, #component);
${iterations}[#i].create(); ${iterations}[#i].c();
${iterations}[#i].${mountOrIntro}(${parentNode}, ${anchor}); ${iterations}[#i].${mountOrIntro}(${parentNode}, ${anchor});
`; `;
@ -449,9 +449,9 @@ function unkeyed(
? deindent` ? deindent`
function ${outro}(i) { function ${outro}(i) {
if (${iterations}[i]) { if (${iterations}[i]) {
${iterations}[i].outro(function() { ${iterations}[i].o(function() {
${iterations}[i].unmount(); ${iterations}[i].u();
${iterations}[i].destroy(); ${iterations}[i].d();
${iterations}[i] = null; ${iterations}[i] = null;
}); });
} }
@ -461,8 +461,8 @@ function unkeyed(
` `
: deindent` : deindent`
for (; #i < ${iterations}.length; #i += 1) { for (; #i < ${iterations}.length; #i += 1) {
${iterations}[#i].unmount(); ${iterations}[#i].u();
${iterations}[#i].destroy(); ${iterations}[#i].d();
} }
${iterations}.length = ${each_block_value}.${length}; ${iterations}.length = ${each_block_value}.${length};
`; `;
@ -482,7 +482,7 @@ function unkeyed(
block.builders.unmount.addBlock(deindent` block.builders.unmount.addBlock(deindent`
for (var #i = 0; #i < ${iterations}.length; #i += 1) { for (var #i = 0; #i < ${iterations}.length; #i += 1) {
${iterations}[#i].unmount(); ${iterations}[#i].u();
} }
`); `);

@ -114,10 +114,10 @@ export default function visitIfBlock(
simple(generator, block, state, node, branches[0], dynamic, vars); simple(generator, block, state, node, branches[0], dynamic, vars);
} }
block.builders.create.addLine(`${if_name}${name}.create();`); block.builders.create.addLine(`${if_name}${name}.c();`);
block.builders.claim.addLine( block.builders.claim.addLine(
`${if_name}${name}.claim(${state.parentNodes});` `${if_name}${name}.l(${state.parentNodes});`
); );
if (needsAnchor) { if (needsAnchor) {
@ -144,7 +144,7 @@ function simple(
`); `);
const isTopLevel = !state.parentNode; const isTopLevel = !state.parentNode;
const mountOrIntro = branch.hasIntroMethod ? 'intro' : 'mount'; const mountOrIntro = branch.hasIntroMethod ? 'i' : 'm';
const targetNode = state.parentNode || '#target'; const targetNode = state.parentNode || '#target';
const anchorNode = state.parentNode ? 'null' : 'anchor'; const anchorNode = state.parentNode ? 'null' : 'anchor';
@ -158,52 +158,52 @@ function simple(
? branch.hasIntroMethod ? branch.hasIntroMethod
? deindent` ? deindent`
if (${name}) { if (${name}) {
${name}.update(changed, ${params}); ${name}.p(changed, ${params});
} else { } else {
${name} = ${branch.block}(${params}, #component); ${name} = ${branch.block}(${params}, #component);
if (${name}) ${name}.create(); if (${name}) ${name}.c();
} }
${name}.intro(${parentNode}, ${anchor}); ${name}.i(${parentNode}, ${anchor});
` `
: deindent` : deindent`
if (${name}) { if (${name}) {
${name}.update(changed, ${params}); ${name}.p(changed, ${params});
} else { } else {
${name} = ${branch.block}(${params}, #component); ${name} = ${branch.block}(${params}, #component);
${name}.create(); ${name}.c();
${name}.mount(${parentNode}, ${anchor}); ${name}.m(${parentNode}, ${anchor});
} }
` `
: branch.hasIntroMethod : branch.hasIntroMethod
? deindent` ? deindent`
if (!${name}) { if (!${name}) {
${name} = ${branch.block}(${params}, #component); ${name} = ${branch.block}(${params}, #component);
${name}.create(); ${name}.c();
} }
${name}.intro(${parentNode}, ${anchor}); ${name}.i(${parentNode}, ${anchor});
` `
: deindent` : deindent`
if (!${name}) { if (!${name}) {
${name} = ${branch.block}(${params}, #component); ${name} = ${branch.block}(${params}, #component);
${name}.create(); ${name}.c();
${name}.mount(${parentNode}, ${anchor}); ${name}.m(${parentNode}, ${anchor});
} }
`; `;
// no `update()` here — we don't want to update outroing nodes, // no `p()` here — we don't want to update outroing nodes,
// as that will typically result in glitching // as that will typically result in glitching
const exit = branch.hasOutroMethod const exit = branch.hasOutroMethod
? deindent` ? deindent`
${name}.outro(function() { ${name}.o(function() {
${name}.unmount(); ${name}.u();
${name}.destroy(); ${name}.d();
${name} = null; ${name} = null;
}); });
` `
: deindent` : deindent`
${name}.unmount(); ${name}.u();
${name}.destroy(); ${name}.d();
${name} = null; ${name} = null;
`; `;
@ -215,9 +215,9 @@ function simple(
} }
`); `);
block.builders.unmount.addLine(`${if_name}${name}.unmount();`); block.builders.unmount.addLine(`${if_name}${name}.u();`);
block.builders.destroy.addLine(`${if_name}${name}.destroy();`); block.builders.destroy.addLine(`${if_name}${name}.d();`);
} }
function compound( function compound(
@ -247,7 +247,7 @@ function compound(
`); `);
const isTopLevel = !state.parentNode; const isTopLevel = !state.parentNode;
const mountOrIntro = branches[0].hasIntroMethod ? 'intro' : 'mount'; const mountOrIntro = branches[0].hasIntroMethod ? 'i' : 'm';
const targetNode = state.parentNode || '#target'; const targetNode = state.parentNode || '#target';
const anchorNode = state.parentNode ? 'null' : 'anchor'; const anchorNode = state.parentNode ? 'null' : 'anchor';
@ -260,23 +260,23 @@ function compound(
const changeBlock = deindent` const changeBlock = deindent`
${hasElse ${hasElse
? deindent` ? deindent`
${name}.unmount(); ${name}.u();
${name}.destroy(); ${name}.d();
` `
: deindent` : deindent`
if (${name}) { if (${name}) {
${name}.unmount(); ${name}.u();
${name}.destroy(); ${name}.d();
}`} }`}
${name} = ${current_block_type_and}${current_block_type}(${params}, #component); ${name} = ${current_block_type_and}${current_block_type}(${params}, #component);
${if_name}${name}.create(); ${if_name}${name}.c();
${if_name}${name}.${mountOrIntro}(${parentNode}, ${anchor}); ${if_name}${name}.${mountOrIntro}(${parentNode}, ${anchor});
`; `;
if (dynamic) { if (dynamic) {
block.builders.update.addBlock(deindent` block.builders.update.addBlock(deindent`
if (${current_block_type} === (${current_block_type} = ${select_block_type}(${params})) && ${name}) { if (${current_block_type} === (${current_block_type} = ${select_block_type}(${params})) && ${name}) {
${name}.update(changed, ${params}); ${name}.p(changed, ${params});
} else { } else {
${changeBlock} ${changeBlock}
} }
@ -289,9 +289,9 @@ function compound(
`); `);
} }
block.builders.unmount.addLine(`${if_name}${name}.unmount();`); block.builders.unmount.addLine(`${if_name}${name}.u();`);
block.builders.destroy.addLine(`${if_name}${name}.destroy();`); block.builders.destroy.addLine(`${if_name}${name}.d();`);
} }
// if any of the siblings have outros, we need to keep references to the blocks // if any of the siblings have outros, we need to keep references to the blocks
@ -346,7 +346,7 @@ function compoundWithOutros(
} }
const isTopLevel = !state.parentNode; const isTopLevel = !state.parentNode;
const mountOrIntro = branches[0].hasIntroMethod ? 'intro' : 'mount'; const mountOrIntro = branches[0].hasIntroMethod ? 'i' : 'm';
const targetNode = state.parentNode || '#target'; const targetNode = state.parentNode || '#target';
const anchorNode = state.parentNode ? 'null' : 'anchor'; const anchorNode = state.parentNode ? 'null' : 'anchor';
@ -357,9 +357,9 @@ function compoundWithOutros(
const parentNode = (state.parentNode && !needsAnchor) ? state.parentNode : `${anchor}.parentNode`; const parentNode = (state.parentNode && !needsAnchor) ? state.parentNode : `${anchor}.parentNode`;
const destroyOldBlock = deindent` const destroyOldBlock = deindent`
${name}.outro(function() { ${name}.o(function() {
${if_blocks}[ ${previous_block_index} ].unmount(); ${if_blocks}[ ${previous_block_index} ].u();
${if_blocks}[ ${previous_block_index} ].destroy(); ${if_blocks}[ ${previous_block_index} ].d();
${if_blocks}[ ${previous_block_index} ] = null; ${if_blocks}[ ${previous_block_index} ] = null;
}); });
`; `;
@ -368,7 +368,7 @@ function compoundWithOutros(
${name} = ${if_blocks}[${current_block_type_index}]; ${name} = ${if_blocks}[${current_block_type_index}];
if (!${name}) { if (!${name}) {
${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](${params}, #component); ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](${params}, #component);
${name}.create(); ${name}.c();
} }
${name}.${mountOrIntro}(${parentNode}, ${anchor}); ${name}.${mountOrIntro}(${parentNode}, ${anchor});
`; `;
@ -396,7 +396,7 @@ function compoundWithOutros(
var ${previous_block_index} = ${current_block_type_index}; var ${previous_block_index} = ${current_block_type_index};
${current_block_type_index} = ${select_block_type}(${params}); ${current_block_type_index} = ${select_block_type}(${params});
if (${current_block_type_index} === ${previous_block_index}) { if (${current_block_type_index} === ${previous_block_index}) {
${if_current_block_type_index}${if_blocks}[${current_block_type_index}].update(changed, ${params}); ${if_current_block_type_index}${if_blocks}[${current_block_type_index}].p(changed, ${params});
} else { } else {
${changeBlock} ${changeBlock}
} }
@ -413,8 +413,8 @@ function compoundWithOutros(
block.builders.destroy.addLine(deindent` block.builders.destroy.addLine(deindent`
${if_current_block_type_index}{ ${if_current_block_type_index}{
${if_blocks}[${current_block_type_index}].unmount(); ${if_blocks}[${current_block_type_index}].u();
${if_blocks}[${current_block_type_index}].destroy(); ${if_blocks}[${current_block_type_index}].d();
} }
`); `);
} }

@ -49,7 +49,7 @@ export function reinsertBefore(after, target) {
export function destroyEach(iterations) { export function destroyEach(iterations) {
for (var i = 0; i < iterations.length; i += 1) { for (var i = 0; i < iterations.length; i += 1) {
if (iterations[i]) iterations[i].destroy(); if (iterations[i]) iterations[i].d();
} }
} }

@ -13,8 +13,8 @@ export function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -158,7 +158,7 @@ export function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -178,11 +178,11 @@ export function callAll(fns) {
} }
export function _mount(target, anchor) { export function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
export function _unmount() { export function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
export var proto = { export var proto = {

@ -46,8 +46,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -159,7 +159,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -168,11 +168,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -213,32 +213,32 @@ function create_main_fragment(state, component) {
var p, text; var p, text;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
text = createText(state.foo); text = createText(state.foo);
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
encapsulateStyles(p); encapsulateStyles(p);
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
appendNode(text, p); appendNode(text, p);
}, },
update: function(changed, state) { p: function update(changed, state) {
if (changed.foo) { if (changed.foo) {
text.data = state.foo; text.data = state.foo;
} }
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -251,8 +251,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -24,32 +24,32 @@ function create_main_fragment(state, component) {
var p, text; var p, text;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
text = createText(state.foo); text = createText(state.foo);
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
encapsulateStyles(p); encapsulateStyles(p);
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
appendNode(text, p); appendNode(text, p);
}, },
update: function(changed, state) { p: function update(changed, state) {
if (changed.foo) { if (changed.foo) {
text.data = state.foo; text.data = state.foo;
} }
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -62,8 +62,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -22,8 +22,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -135,7 +135,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -144,11 +144,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -182,21 +182,21 @@ function create_main_fragment(state, component) {
}); });
return { return {
create: function() { c: function create() {
nested._fragment.create(); nested._fragment.c();
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
nested._mount(target, anchor); nested._mount(target, anchor);
}, },
update: noop, p: noop,
unmount: function() { u: function unmount() {
nested._unmount(); nested._unmount();
}, },
destroy: function() { d: function destroy$$1() {
nested.destroy(false); nested.destroy(false);
} }
}; };
@ -215,8 +215,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
this._lock = true; this._lock = true;
callAll(this._beforecreate); callAll(this._beforecreate);

@ -17,21 +17,21 @@ function create_main_fragment(state, component) {
}); });
return { return {
create: function() { c: function create() {
nested._fragment.create(); nested._fragment.c();
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
nested._mount(target, anchor); nested._mount(target, anchor);
}, },
update: noop, p: noop,
unmount: function() { u: function unmount() {
nested._unmount(); nested._unmount();
}, },
destroy: function() { d: function destroy() {
nested.destroy(false); nested.destroy(false);
} }
}; };
@ -50,8 +50,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
this._lock = true; this._lock = true;
callAll(this._beforecreate); callAll(this._beforecreate);

@ -22,8 +22,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -135,7 +135,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -144,11 +144,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -178,15 +178,15 @@ var template = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
return { return {
create: noop, c: noop,
mount: noop, m: noop,
update: noop, p: noop,
unmount: noop, u: noop,
destroy: noop d: noop
}; };
} }
@ -198,8 +198,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -13,15 +13,15 @@ var template = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
return { return {
create: noop, c: noop,
mount: noop, m: noop,
update: noop, p: noop,
unmount: noop, u: noop,
destroy: noop d: noop
}; };
} }
@ -33,8 +33,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -42,8 +42,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -155,7 +155,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -164,11 +164,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -201,26 +201,26 @@ function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
encapsulateStyles(div); encapsulateStyles(div);
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: noop, p: noop,
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -233,8 +233,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -16,26 +16,26 @@ function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
encapsulateStyles(div); encapsulateStyles(div);
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: noop, p: noop,
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -48,8 +48,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -34,8 +34,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -147,7 +147,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -156,11 +156,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -182,22 +182,22 @@ function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
div.textContent = "fades in"; div.textContent = "fades in";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: noop, p: noop,
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -212,8 +212,8 @@ class SvelteComponent extends HTMLElement {
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
this._fragment.create(); this._fragment.c();
this._fragment.mount(this.shadowRoot, null); this._fragment.m(this.shadowRoot, null);
if (options.target) this._mount(options.target, options.anchor || null); if (options.target) this._mount(options.target, options.anchor || null);
} }

@ -5,22 +5,22 @@ function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
div.textContent = "fades in"; div.textContent = "fades in";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: noop, p: noop,
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -35,8 +35,8 @@ class SvelteComponent extends HTMLElement {
this._fragment = create_main_fragment(this._state, this); this._fragment = create_main_fragment(this._state, this);
this._fragment.create(); this._fragment.c();
this._fragment.mount(this.shadowRoot, null); this._fragment.m(this.shadowRoot, null);
if (options.target) this._mount(options.target, options.anchor || null); if (options.target) this._mount(options.target, options.anchor || null);
} }

@ -33,7 +33,7 @@ function detachAfter(before) {
function destroyEach(iterations) { function destroyEach(iterations) {
for (var i = 0; i < iterations.length; i += 1) { for (var i = 0; i < iterations.length; i += 1) {
if (iterations[i]) iterations[i].destroy(); if (iterations[i]) iterations[i].d();
} }
} }
@ -54,8 +54,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -167,7 +167,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -176,11 +176,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -210,9 +210,9 @@ function create_main_fragment(state, component) {
} }
return { return {
create: function() { c: function create() {
for (var i = 0; i < each_blocks.length; i += 1) { for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].create(); each_blocks[i].c();
} }
text = createText("\n\n"); text = createText("\n\n");
@ -220,9 +220,9 @@ function create_main_fragment(state, component) {
text_1 = createText(state.foo); text_1 = createText(state.foo);
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
for (var i = 0; i < each_blocks.length; i += 1) { for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].mount(target, anchor); each_blocks[i].m(target, anchor);
} }
insertNode(text, target, anchor); insertNode(text, target, anchor);
@ -230,23 +230,23 @@ function create_main_fragment(state, component) {
appendNode(text_1, p); appendNode(text_1, p);
}, },
update: function(changed, state) { p: function update(changed, state) {
var comments = state.comments; var comments = state.comments;
if (changed.comments || changed.elapsed || changed.time) { if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < comments.length; i += 1) { for (var i = 0; i < comments.length; i += 1) {
if (each_blocks[i]) { if (each_blocks[i]) {
each_blocks[i].update(changed, state, comments, comments[i], i); each_blocks[i].p(changed, state, comments, comments[i], i);
} else { } else {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component); each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
each_blocks[i].create(); each_blocks[i].c();
each_blocks[i].mount(text.parentNode, text); each_blocks[i].m(text.parentNode, text);
} }
} }
for (; i < each_blocks.length; i += 1) { for (; i < each_blocks.length; i += 1) {
each_blocks[i].unmount(); each_blocks[i].u();
each_blocks[i].destroy(); each_blocks[i].d();
} }
each_blocks.length = comments.length; each_blocks.length = comments.length;
} }
@ -256,16 +256,16 @@ function create_main_fragment(state, component) {
} }
}, },
unmount: function() { u: function unmount() {
for (var i = 0; i < each_blocks.length; i += 1) { for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].unmount(); each_blocks[i].u();
} }
detachNode(text); detachNode(text);
detachNode(p); detachNode(p);
}, },
destroy: function() { d: function destroy$$1() {
destroyEach(each_blocks); destroyEach(each_blocks);
} }
}; };
@ -276,7 +276,7 @@ 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; 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 { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
strong = createElement("strong"); strong = createElement("strong");
text = createText(i); text = createText(i);
@ -288,15 +288,15 @@ function create_each_block(state, comments, comment, i, component) {
text_5 = createText(" ago:"); text_5 = createText(" ago:");
text_6 = createText("\n\n\t\t"); text_6 = createText("\n\n\t\t");
raw_before = createElement('noscript'); raw_before = createElement('noscript');
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
div.className = "comment"; div.className = "comment";
span.className = "meta"; span.className = "meta";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
appendNode(strong, div); appendNode(strong, div);
appendNode(text, strong); appendNode(text, strong);
@ -311,7 +311,7 @@ function create_each_block(state, comments, comment, i, component) {
raw_before.insertAdjacentHTML("afterend", raw_value); raw_before.insertAdjacentHTML("afterend", raw_value);
}, },
update: function(changed, state, comments, comment, i) { p: function update(changed, state, comments, comment, i) {
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) { if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
text_2.data = text_2_value; text_2.data = text_2_value;
} }
@ -326,13 +326,13 @@ function create_each_block(state, comments, comment, i, component) {
} }
}, },
unmount: function() { u: function unmount() {
detachAfter(raw_before); detachAfter(raw_before);
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -343,8 +343,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -13,9 +13,9 @@ function create_main_fragment(state, component) {
} }
return { return {
create: function() { c: function create() {
for (var i = 0; i < each_blocks.length; i += 1) { for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].create(); each_blocks[i].c();
} }
text = createText("\n\n"); text = createText("\n\n");
@ -23,9 +23,9 @@ function create_main_fragment(state, component) {
text_1 = createText(state.foo); text_1 = createText(state.foo);
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
for (var i = 0; i < each_blocks.length; i += 1) { for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].mount(target, anchor); each_blocks[i].m(target, anchor);
} }
insertNode(text, target, anchor); insertNode(text, target, anchor);
@ -33,23 +33,23 @@ function create_main_fragment(state, component) {
appendNode(text_1, p); appendNode(text_1, p);
}, },
update: function(changed, state) { p: function update(changed, state) {
var comments = state.comments; var comments = state.comments;
if (changed.comments || changed.elapsed || changed.time) { if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < comments.length; i += 1) { for (var i = 0; i < comments.length; i += 1) {
if (each_blocks[i]) { if (each_blocks[i]) {
each_blocks[i].update(changed, state, comments, comments[i], i); each_blocks[i].p(changed, state, comments, comments[i], i);
} else { } else {
each_blocks[i] = create_each_block(state, comments, comments[i], i, component); each_blocks[i] = create_each_block(state, comments, comments[i], i, component);
each_blocks[i].create(); each_blocks[i].c();
each_blocks[i].mount(text.parentNode, text); each_blocks[i].m(text.parentNode, text);
} }
} }
for (; i < each_blocks.length; i += 1) { for (; i < each_blocks.length; i += 1) {
each_blocks[i].unmount(); each_blocks[i].u();
each_blocks[i].destroy(); each_blocks[i].d();
} }
each_blocks.length = comments.length; each_blocks.length = comments.length;
} }
@ -59,16 +59,16 @@ function create_main_fragment(state, component) {
} }
}, },
unmount: function() { u: function unmount() {
for (var i = 0; i < each_blocks.length; i += 1) { for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].unmount(); each_blocks[i].u();
} }
detachNode(text); detachNode(text);
detachNode(p); detachNode(p);
}, },
destroy: function() { d: function destroy() {
destroyEach(each_blocks); destroyEach(each_blocks);
} }
}; };
@ -79,7 +79,7 @@ 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; 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 { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
strong = createElement("strong"); strong = createElement("strong");
text = createText(i); text = createText(i);
@ -91,15 +91,15 @@ function create_each_block(state, comments, comment, i, component) {
text_5 = createText(" ago:"); text_5 = createText(" ago:");
text_6 = createText("\n\n\t\t"); text_6 = createText("\n\n\t\t");
raw_before = createElement('noscript'); raw_before = createElement('noscript');
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
div.className = "comment"; div.className = "comment";
span.className = "meta"; span.className = "meta";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
appendNode(strong, div); appendNode(strong, div);
appendNode(text, strong); appendNode(text, strong);
@ -114,7 +114,7 @@ function create_each_block(state, comments, comment, i, component) {
raw_before.insertAdjacentHTML("afterend", raw_value); raw_before.insertAdjacentHTML("afterend", raw_value);
}, },
update: function(changed, state, comments, comment, i) { p: function update(changed, state, comments, comment, i) {
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) { if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
text_2.data = text_2_value; text_2.data = text_2_value;
} }
@ -129,13 +129,13 @@ function create_each_block(state, comments, comment, i, component) {
} }
}, },
unmount: function() { u: function unmount() {
detachAfter(raw_before); detachAfter(raw_before);
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -146,8 +146,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -34,8 +34,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -147,7 +147,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -156,11 +156,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -197,30 +197,30 @@ function create_main_fragment(state, component) {
var button, foo_handler; var button, foo_handler;
return { return {
create: function() { c: function create() {
button = createElement("button"); button = createElement("button");
button.textContent = "foo"; button.textContent = "foo";
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
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) { m: function mount(target, anchor) {
insertNode(button, target, anchor); insertNode(button, target, anchor);
}, },
update: noop, p: noop,
unmount: function() { u: function unmount() {
detachNode(button); detachNode(button);
}, },
destroy: function() { d: function destroy$$1() {
foo_handler.teardown(); foo_handler.teardown();
} }
}; };
@ -233,8 +233,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -20,30 +20,30 @@ function create_main_fragment(state, component) {
var button, foo_handler; var button, foo_handler;
return { return {
create: function() { c: function create() {
button = createElement("button"); button = createElement("button");
button.textContent = "foo"; button.textContent = "foo";
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
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) { m: function mount(target, anchor) {
insertNode(button, target, anchor); insertNode(button, target, anchor);
}, },
update: noop, p: noop,
unmount: function() { u: function unmount() {
detachNode(button); detachNode(button);
}, },
destroy: function() { d: function destroy() {
foo_handler.teardown(); foo_handler.teardown();
} }
}; };
@ -56,8 +56,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -38,8 +38,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -151,7 +151,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -160,11 +160,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -189,33 +189,33 @@ function create_main_fragment(state, component) {
var if_block = current_block_type(state, component); var if_block = current_block_type(state, component);
return { return {
create: function() { c: function create() {
if_block.create(); if_block.c();
if_block_anchor = createComment(); if_block_anchor = createComment();
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
if_block.mount(target, anchor); if_block.m(target, anchor);
insertNode(if_block_anchor, target, anchor); insertNode(if_block_anchor, target, anchor);
}, },
update: function(changed, state) { p: function update(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.u();
if_block.destroy(); if_block.d();
if_block = current_block_type(state, component); if_block = current_block_type(state, component);
if_block.create(); if_block.c();
if_block.mount(if_block_anchor.parentNode, if_block_anchor); if_block.m(if_block_anchor.parentNode, if_block_anchor);
} }
}, },
unmount: function() { u: function unmount() {
if_block.unmount(); if_block.u();
detachNode(if_block_anchor); detachNode(if_block_anchor);
}, },
destroy: function() { d: function destroy$$1() {
if_block.destroy(); if_block.d();
} }
}; };
} }
@ -225,20 +225,20 @@ function create_if_block(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "foo!"; p.textContent = "foo!";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -247,20 +247,20 @@ function create_if_block_1(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "not foo!"; p.textContent = "not foo!";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -276,8 +276,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -8,33 +8,33 @@ function create_main_fragment(state, component) {
var if_block = current_block_type(state, component); var if_block = current_block_type(state, component);
return { return {
create: function() { c: function create() {
if_block.create(); if_block.c();
if_block_anchor = createComment(); if_block_anchor = createComment();
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
if_block.mount(target, anchor); if_block.m(target, anchor);
insertNode(if_block_anchor, target, anchor); insertNode(if_block_anchor, target, anchor);
}, },
update: function(changed, state) { p: function update(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.u();
if_block.destroy(); if_block.d();
if_block = current_block_type(state, component); if_block = current_block_type(state, component);
if_block.create(); if_block.c();
if_block.mount(if_block_anchor.parentNode, if_block_anchor); if_block.m(if_block_anchor.parentNode, if_block_anchor);
} }
}, },
unmount: function() { u: function unmount() {
if_block.unmount(); if_block.u();
detachNode(if_block_anchor); detachNode(if_block_anchor);
}, },
destroy: function() { d: function destroy() {
if_block.destroy(); if_block.d();
} }
}; };
} }
@ -44,20 +44,20 @@ function create_if_block(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "foo!"; p.textContent = "foo!";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -66,20 +66,20 @@ function create_if_block_1(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "not foo!"; p.textContent = "not foo!";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -95,8 +95,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -38,8 +38,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -151,7 +151,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -160,11 +160,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -188,37 +188,37 @@ function create_main_fragment(state, component) {
var if_block = (state.foo) && create_if_block(state, component); var if_block = (state.foo) && create_if_block(state, component);
return { return {
create: function() { c: function create() {
if (if_block) if_block.create(); if (if_block) if_block.c();
if_block_anchor = createComment(); if_block_anchor = createComment();
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
if (if_block) if_block.mount(target, anchor); if (if_block) if_block.m(target, anchor);
insertNode(if_block_anchor, target, anchor); insertNode(if_block_anchor, target, anchor);
}, },
update: function(changed, state) { p: function update(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.c();
if_block.mount(if_block_anchor.parentNode, if_block_anchor); if_block.m(if_block_anchor.parentNode, if_block_anchor);
} }
} else if (if_block) { } else if (if_block) {
if_block.unmount(); if_block.u();
if_block.destroy(); if_block.d();
if_block = null; if_block = null;
} }
}, },
unmount: function() { u: function unmount() {
if (if_block) if_block.unmount(); if (if_block) if_block.u();
detachNode(if_block_anchor); detachNode(if_block_anchor);
}, },
destroy: function() { d: function destroy$$1() {
if (if_block) if_block.destroy(); if (if_block) if_block.d();
} }
}; };
} }
@ -228,20 +228,20 @@ function create_if_block(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "foo!"; p.textContent = "foo!";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -252,8 +252,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -7,37 +7,37 @@ function create_main_fragment(state, component) {
var if_block = (state.foo) && create_if_block(state, component); var if_block = (state.foo) && create_if_block(state, component);
return { return {
create: function() { c: function create() {
if (if_block) if_block.create(); if (if_block) if_block.c();
if_block_anchor = createComment(); if_block_anchor = createComment();
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
if (if_block) if_block.mount(target, anchor); if (if_block) if_block.m(target, anchor);
insertNode(if_block_anchor, target, anchor); insertNode(if_block_anchor, target, anchor);
}, },
update: function(changed, state) { p: function update(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.c();
if_block.mount(if_block_anchor.parentNode, if_block_anchor); if_block.m(if_block_anchor.parentNode, if_block_anchor);
} }
} else if (if_block) { } else if (if_block) {
if_block.unmount(); if_block.u();
if_block.destroy(); if_block.d();
if_block = null; if_block = null;
} }
}, },
unmount: function() { u: function unmount() {
if (if_block) if_block.unmount(); if (if_block) if_block.u();
detachNode(if_block_anchor); detachNode(if_block_anchor);
}, },
destroy: function() { d: function destroy() {
if (if_block) if_block.destroy(); if (if_block) if_block.d();
} }
}; };
} }
@ -47,20 +47,20 @@ function create_if_block(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "foo!"; p.textContent = "foo!";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -71,8 +71,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -38,8 +38,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -151,7 +151,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -160,11 +160,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -186,21 +186,21 @@ function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)"); setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: function(changed, state) { p: function update(changed, state) {
if (changed.color) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
} }
@ -210,11 +210,11 @@ function create_main_fragment(state, component) {
} }
}, },
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -225,8 +225,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -5,21 +5,21 @@ function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)"); setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: function(changed, state) { p: function update(changed, state) {
if (changed.color) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
} }
@ -29,11 +29,11 @@ function create_main_fragment(state, component) {
} }
}, },
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -44,8 +44,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -38,8 +38,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -151,7 +151,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -160,11 +160,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -186,30 +186,30 @@ function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")"); setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: function(changed, state) { p: function update(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() { u: function unmount() {
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -220,8 +220,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -5,30 +5,30 @@ function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")"); setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: function(changed, state) { p: function update(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() { u: function unmount() {
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -39,8 +39,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -38,8 +38,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -151,7 +151,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -160,11 +160,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -186,30 +186,30 @@ function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: function(changed, state) { p: function update(changed, state) {
if (changed.color) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
} }
}, },
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -220,8 +220,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -5,30 +5,30 @@ function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: function(changed, state) { p: function update(changed, state) {
if (changed.color) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
} }
}, },
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -39,8 +39,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -38,8 +38,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -151,7 +151,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -160,11 +160,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -186,25 +186,25 @@ 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() { c: function create() {
div = createElement("div"); div = createElement("div");
text = createText("\n"); text = createText("\n");
div_1 = createElement("div"); div_1 = createElement("div");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
div.style.cssText = state.style; div.style.cssText = state.style;
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value; div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value;
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
insertNode(text, target, anchor); insertNode(text, target, anchor);
insertNode(div_1, target, anchor); insertNode(div_1, target, anchor);
}, },
update: function(changed, state) { p: function update(changed, state) {
if (changed.style) { if (changed.style) {
div.style.cssText = state.style; div.style.cssText = state.style;
} }
@ -214,13 +214,13 @@ function create_main_fragment(state, component) {
} }
}, },
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
detachNode(text); detachNode(text);
detachNode(div_1); detachNode(div_1);
}, },
destroy: noop d: noop
}; };
} }
@ -231,8 +231,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -5,25 +5,25 @@ 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() { c: function create() {
div = createElement("div"); div = createElement("div");
text = createText("\n"); text = createText("\n");
div_1 = createElement("div"); div_1 = createElement("div");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
div.style.cssText = state.style; div.style.cssText = state.style;
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value; div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value;
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
insertNode(text, target, anchor); insertNode(text, target, anchor);
insertNode(div_1, target, anchor); insertNode(div_1, target, anchor);
}, },
update: function(changed, state) { p: function update(changed, state) {
if (changed.style) { if (changed.style) {
div.style.cssText = state.style; div.style.cssText = state.style;
} }
@ -33,13 +33,13 @@ function create_main_fragment(state, component) {
} }
}, },
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
detachNode(text); detachNode(text);
detachNode(div_1); detachNode(div_1);
}, },
destroy: noop d: noop
}; };
} }
@ -50,8 +50,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -42,8 +42,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -155,7 +155,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -164,11 +164,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -194,31 +194,31 @@ function create_main_fragment(state, component) {
} }
return { return {
create: function() { c: function create() {
input = createElement("input"); input = createElement("input");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
input.type = "checkbox"; input.type = "checkbox";
addListener(input, "change", input_change_handler); addListener(input, "change", input_change_handler);
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(input, target, anchor); insertNode(input, target, anchor);
input.checked = state.foo; input.checked = state.foo;
}, },
update: function(changed, state) { p: function update(changed, state) {
input.checked = state.foo; input.checked = state.foo;
}, },
unmount: function() { u: function unmount() {
detachNode(input); detachNode(input);
}, },
destroy: function() { d: function destroy$$1() {
removeListener(input, "change", input_change_handler); removeListener(input, "change", input_change_handler);
} }
}; };
@ -231,8 +231,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -9,31 +9,31 @@ function create_main_fragment(state, component) {
} }
return { return {
create: function() { c: function create() {
input = createElement("input"); input = createElement("input");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
input.type = "checkbox"; input.type = "checkbox";
addListener(input, "change", input_change_handler); addListener(input, "change", input_change_handler);
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(input, target, anchor); insertNode(input, target, anchor);
input.checked = state.foo; input.checked = state.foo;
}, },
update: function(changed, state) { p: function update(changed, state) {
input.checked = state.foo; input.checked = state.foo;
}, },
unmount: function() { u: function unmount() {
detachNode(input); detachNode(input);
}, },
destroy: function() { d: function destroy() {
removeListener(input, "change", input_change_handler); removeListener(input, "change", input_change_handler);
} }
}; };
@ -46,8 +46,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -40,8 +40,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -153,7 +153,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -162,11 +162,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -188,26 +188,26 @@ function create_main_fragment(state, component) {
var input; var input;
return { return {
create: function() { c: function create() {
input = createElement("input"); input = createElement("input");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
setInputType(input, "search"); setInputType(input, "search");
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(input, target, anchor); insertNode(input, target, anchor);
}, },
update: noop, p: noop,
unmount: function() { u: function unmount() {
detachNode(input); detachNode(input);
}, },
destroy: noop d: noop
}; };
} }
@ -218,8 +218,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -5,26 +5,26 @@ function create_main_fragment(state, component) {
var input; var input;
return { return {
create: function() { c: function create() {
input = createElement("input"); input = createElement("input");
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
setInputType(input, "search"); setInputType(input, "search");
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(input, target, anchor); insertNode(input, target, anchor);
}, },
update: noop, p: noop,
unmount: function() { u: function unmount() {
detachNode(input); detachNode(input);
}, },
destroy: noop d: noop
}; };
} }
@ -35,8 +35,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -57,8 +57,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -170,7 +170,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -179,11 +179,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -205,34 +205,34 @@ function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.h();
}, },
claim: function(nodes) { l: function claim(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.h();
}, },
hydrate: function() { h: function hydrate() {
div.className = "foo"; div.className = "foo";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: noop, p: noop,
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -244,9 +244,9 @@ function SvelteComponent(options) {
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.l(nodes) : this._fragment.c();
nodes.forEach(detachNode); nodes.forEach(detachNode);
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -5,34 +5,34 @@ function create_main_fragment(state, component) {
var div; var div;
return { return {
create: function() { c: function create() {
div = createElement("div"); div = createElement("div");
this.hydrate(); this.h();
}, },
claim: function(nodes) { l: function claim(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.h();
}, },
hydrate: function() { h: function hydrate() {
div.className = "foo"; div.className = "foo";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
}, },
update: noop, p: noop,
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
}, },
destroy: noop d: noop
}; };
} }
@ -44,9 +44,9 @@ function SvelteComponent(options) {
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.l(nodes) : this._fragment.c();
nodes.forEach(detachNode); nodes.forEach(detachNode);
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -50,8 +50,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -163,7 +163,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -172,11 +172,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -236,13 +236,13 @@ function create_main_fragment(state, component) {
} }
return { return {
create: function() { c: function create() {
audio = createElement("audio"); audio = createElement("audio");
addListener(audio, "play", audio_pause_handler); addListener(audio, "play", audio_pause_handler);
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
component._root._beforecreate.push(audio_progress_loadedmetadata_handler); component._root._beforecreate.push(audio_progress_loadedmetadata_handler);
addListener(audio, "progress", audio_progress_loadedmetadata_handler); addListener(audio, "progress", audio_progress_loadedmetadata_handler);
@ -269,11 +269,11 @@ function create_main_fragment(state, component) {
addListener(audio, "pause", audio_pause_handler); addListener(audio, "pause", audio_pause_handler);
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(audio, target, anchor); insertNode(audio, target, anchor);
}, },
update: function(changed, state) { p: function update(changed, state) {
if (!audio_updating && !isNaN(state.currentTime )) { if (!audio_updating && !isNaN(state.currentTime )) {
audio.currentTime = state.currentTime ; audio.currentTime = state.currentTime ;
} }
@ -283,11 +283,11 @@ function create_main_fragment(state, component) {
} }
}, },
unmount: function() { u: function unmount() {
detachNode(audio); detachNode(audio);
}, },
destroy: function() { d: function destroy$$1() {
removeListener(audio, "progress", audio_progress_loadedmetadata_handler); removeListener(audio, "progress", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler); removeListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_loadedmetadata_handler); removeListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
@ -312,8 +312,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
callAll(this._beforecreate); callAll(this._beforecreate);
} }

@ -43,13 +43,13 @@ function create_main_fragment(state, component) {
} }
return { return {
create: function() { c: function create() {
audio = createElement("audio"); audio = createElement("audio");
addListener(audio, "play", audio_pause_handler); addListener(audio, "play", audio_pause_handler);
this.hydrate(); this.h();
}, },
hydrate: function() { h: function hydrate() {
component._root._beforecreate.push(audio_progress_loadedmetadata_handler); component._root._beforecreate.push(audio_progress_loadedmetadata_handler);
addListener(audio, "progress", audio_progress_loadedmetadata_handler); addListener(audio, "progress", audio_progress_loadedmetadata_handler);
@ -76,11 +76,11 @@ function create_main_fragment(state, component) {
addListener(audio, "pause", audio_pause_handler); addListener(audio, "pause", audio_pause_handler);
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(audio, target, anchor); insertNode(audio, target, anchor);
}, },
update: function(changed, state) { p: function update(changed, state) {
if (!audio_updating && !isNaN(state.currentTime )) { if (!audio_updating && !isNaN(state.currentTime )) {
audio.currentTime = state.currentTime ; audio.currentTime = state.currentTime ;
} }
@ -90,11 +90,11 @@ function create_main_fragment(state, component) {
} }
}, },
unmount: function() { u: function unmount() {
detachNode(audio); detachNode(audio);
}, },
destroy: function() { d: function destroy() {
removeListener(audio, "progress", audio_progress_loadedmetadata_handler); removeListener(audio, "progress", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler); removeListener(audio, "loadedmetadata", audio_progress_loadedmetadata_handler);
removeListener(audio, "loadedmetadata", audio_loadedmetadata_handler); removeListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
@ -119,8 +119,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
callAll(this._beforecreate); callAll(this._beforecreate);
} }

@ -36,8 +36,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -149,7 +149,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -158,11 +158,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -200,27 +200,27 @@ function create_main_fragment(state, component) {
}); });
return { return {
create: function() { c: function create() {
imported._fragment.create(); imported._fragment.c();
text = createText("\n"); text = createText("\n");
nonimported._fragment.create(); nonimported._fragment.c();
}, },
mount: function(target, anchor) { m: function mount(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, p: noop,
unmount: function() { u: function unmount() {
imported._unmount(); imported._unmount();
detachNode(text); detachNode(text);
nonimported._unmount(); nonimported._unmount();
}, },
destroy: function() { d: function destroy$$1() {
imported.destroy(false); imported.destroy(false);
nonimported.destroy(false); nonimported.destroy(false);
} }
@ -240,8 +240,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
this._lock = true; this._lock = true;
callAll(this._beforecreate); callAll(this._beforecreate);

@ -22,27 +22,27 @@ function create_main_fragment(state, component) {
}); });
return { return {
create: function() { c: function create() {
imported._fragment.create(); imported._fragment.c();
text = createText("\n"); text = createText("\n");
nonimported._fragment.create(); nonimported._fragment.c();
}, },
mount: function(target, anchor) { m: function mount(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, p: noop,
unmount: function() { u: function unmount() {
imported._unmount(); imported._unmount();
detachNode(text); detachNode(text);
nonimported._unmount(); nonimported._unmount();
}, },
destroy: function() { d: function destroy() {
imported.destroy(false); imported.destroy(false);
nonimported.destroy(false); nonimported.destroy(false);
} }
@ -62,8 +62,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
this._lock = true; this._lock = true;
callAll(this._beforecreate); callAll(this._beforecreate);

@ -22,8 +22,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -135,7 +135,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -144,11 +144,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -177,15 +177,15 @@ var template = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
return { return {
create: noop, c: noop,
mount: noop, m: noop,
update: noop, p: noop,
unmount: noop, u: noop,
destroy: noop d: noop
}; };
} }
@ -206,8 +206,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
callAll(this._oncreate); callAll(this._oncreate);
} }

@ -12,15 +12,15 @@ var template = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
return { return {
create: noop, c: noop,
mount: noop, m: noop,
update: noop, p: noop,
unmount: noop, u: noop,
destroy: noop d: noop
}; };
} }
@ -41,8 +41,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
callAll(this._oncreate); callAll(this._oncreate);
} }

@ -22,8 +22,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -135,7 +135,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -144,11 +144,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -188,15 +188,15 @@ var template = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
return { return {
create: noop, c: noop,
mount: noop, m: noop,
update: noop, p: noop,
unmount: noop, u: noop,
destroy: noop d: noop
}; };
} }
@ -207,8 +207,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -23,15 +23,15 @@ var template = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
return { return {
create: noop, c: noop,
mount: noop, m: noop,
update: noop, p: noop,
unmount: noop, u: noop,
destroy: noop d: noop
}; };
} }
@ -42,8 +42,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -46,8 +46,8 @@ function destroy(detach) {
this.fire('destroy'); this.fire('destroy');
this.set = this.get = noop; this.set = this.get = noop;
if (detach !== false) this._fragment.unmount(); if (detach !== false) this._fragment.u();
this._fragment.destroy(); this._fragment.d();
this._fragment = this._state = null; this._fragment = this._state = null;
} }
@ -159,7 +159,7 @@ function _set(newState) {
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
dispatchObservers(this, this._observers.pre, changed, this._state, oldState); dispatchObservers(this, this._observers.pre, changed, this._state, oldState);
this._fragment.update(changed, this._state); this._fragment.p(changed, this._state);
dispatchObservers(this, this._observers.post, changed, this._state, oldState); dispatchObservers(this, this._observers.post, changed, this._state, oldState);
} }
@ -168,11 +168,11 @@ function callAll(fns) {
} }
function _mount(target, anchor) { function _mount(target, anchor) {
this._fragment.mount(target, anchor); this._fragment.m(target, anchor);
} }
function _unmount() { function _unmount() {
this._fragment.unmount(); this._fragment.u();
} }
var proto = { var proto = {
@ -204,123 +204,123 @@ function create_main_fragment(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() { c: function create() {
div = createElement("div"); div = createElement("div");
if (if_block) if_block.create(); if (if_block) if_block.c();
text = createText("\n\n\t"); text = createText("\n\n\t");
p = createElement("p"); p = createElement("p");
p.textContent = "this can be used as an anchor"; p.textContent = "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.c();
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.c();
text_4 = createText("\n\n\t"); text_4 = createText("\n\n\t");
p_1 = createElement("p"); p_1 = createElement("p");
p_1.textContent = "so can this"; p_1.textContent = "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.c();
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.c();
if_block_4_anchor = createComment(); if_block_4_anchor = createComment();
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
if (if_block) if_block.mount(div, null); if (if_block) if_block.m(div, null);
appendNode(text, div); appendNode(text, div);
appendNode(p, div); appendNode(p, div);
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.m(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.m(div, null);
appendNode(text_4, div); appendNode(text_4, div);
appendNode(p_1, div); appendNode(p_1, div);
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.m(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.m(target, anchor);
insertNode(if_block_4_anchor, target, anchor); insertNode(if_block_4_anchor, target, anchor);
}, },
update: function(changed, state) { p: function update(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.c();
if_block.mount(div, text); if_block.m(div, text);
} }
} else if (if_block) { } else if (if_block) {
if_block.unmount(); if_block.u();
if_block.destroy(); if_block.d();
if_block = null; 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.c();
if_block_1.mount(div, text_3); if_block_1.m(div, text_3);
} }
} else if (if_block_1) { } else if (if_block_1) {
if_block_1.unmount(); if_block_1.u();
if_block_1.destroy(); if_block_1.d();
if_block_1 = null; 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.c();
if_block_2.mount(div, text_4); if_block_2.m(div, text_4);
} }
} else if (if_block_2) { } else if (if_block_2) {
if_block_2.unmount(); if_block_2.u();
if_block_2.destroy(); if_block_2.d();
if_block_2 = null; 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.c();
if_block_3.mount(div, null); if_block_3.m(div, null);
} }
} else if (if_block_3) { } else if (if_block_3) {
if_block_3.unmount(); if_block_3.u();
if_block_3.destroy(); if_block_3.d();
if_block_3 = null; 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.c();
if_block_4.mount(if_block_4_anchor.parentNode, if_block_4_anchor); if_block_4.m(if_block_4_anchor.parentNode, if_block_4_anchor);
} }
} else if (if_block_4) { } else if (if_block_4) {
if_block_4.unmount(); if_block_4.u();
if_block_4.destroy(); if_block_4.d();
if_block_4 = null; if_block_4 = null;
} }
}, },
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
if (if_block) if_block.unmount(); if (if_block) if_block.u();
if (if_block_1) if_block_1.unmount(); if (if_block_1) if_block_1.u();
if (if_block_2) if_block_2.unmount(); if (if_block_2) if_block_2.u();
if (if_block_3) if_block_3.unmount(); if (if_block_3) if_block_3.u();
detachNode(text_8); detachNode(text_8);
if (if_block_4) if_block_4.unmount(); if (if_block_4) if_block_4.u();
detachNode(if_block_4_anchor); detachNode(if_block_4_anchor);
}, },
destroy: function() { d: function destroy$$1() {
if (if_block) if_block.destroy(); if (if_block) if_block.d();
if (if_block_1) if_block_1.destroy(); if (if_block_1) if_block_1.d();
if (if_block_2) if_block_2.destroy(); if (if_block_2) if_block_2.d();
if (if_block_3) if_block_3.destroy(); if (if_block_3) if_block_3.d();
if (if_block_4) if_block_4.destroy(); if (if_block_4) if_block_4.d();
} }
}; };
} }
@ -330,20 +330,20 @@ function create_if_block(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "a"; p.textContent = "a";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -352,20 +352,20 @@ function create_if_block_1(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "b"; p.textContent = "b";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -374,20 +374,20 @@ function create_if_block_2(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "c"; p.textContent = "c";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -396,20 +396,20 @@ function create_if_block_3(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "d"; p.textContent = "d";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -418,20 +418,20 @@ function create_if_block_4(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "e"; p.textContent = "e";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -442,8 +442,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

@ -15,123 +15,123 @@ function create_main_fragment(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() { c: function create() {
div = createElement("div"); div = createElement("div");
if (if_block) if_block.create(); if (if_block) if_block.c();
text = createText("\n\n\t"); text = createText("\n\n\t");
p = createElement("p"); p = createElement("p");
p.textContent = "this can be used as an anchor"; p.textContent = "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.c();
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.c();
text_4 = createText("\n\n\t"); text_4 = createText("\n\n\t");
p_1 = createElement("p"); p_1 = createElement("p");
p_1.textContent = "so can this"; p_1.textContent = "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.c();
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.c();
if_block_4_anchor = createComment(); if_block_4_anchor = createComment();
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(div, target, anchor); insertNode(div, target, anchor);
if (if_block) if_block.mount(div, null); if (if_block) if_block.m(div, null);
appendNode(text, div); appendNode(text, div);
appendNode(p, div); appendNode(p, div);
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.m(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.m(div, null);
appendNode(text_4, div); appendNode(text_4, div);
appendNode(p_1, div); appendNode(p_1, div);
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.m(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.m(target, anchor);
insertNode(if_block_4_anchor, target, anchor); insertNode(if_block_4_anchor, target, anchor);
}, },
update: function(changed, state) { p: function update(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.c();
if_block.mount(div, text); if_block.m(div, text);
} }
} else if (if_block) { } else if (if_block) {
if_block.unmount(); if_block.u();
if_block.destroy(); if_block.d();
if_block = null; 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.c();
if_block_1.mount(div, text_3); if_block_1.m(div, text_3);
} }
} else if (if_block_1) { } else if (if_block_1) {
if_block_1.unmount(); if_block_1.u();
if_block_1.destroy(); if_block_1.d();
if_block_1 = null; 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.c();
if_block_2.mount(div, text_4); if_block_2.m(div, text_4);
} }
} else if (if_block_2) { } else if (if_block_2) {
if_block_2.unmount(); if_block_2.u();
if_block_2.destroy(); if_block_2.d();
if_block_2 = null; 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.c();
if_block_3.mount(div, null); if_block_3.m(div, null);
} }
} else if (if_block_3) { } else if (if_block_3) {
if_block_3.unmount(); if_block_3.u();
if_block_3.destroy(); if_block_3.d();
if_block_3 = null; 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.c();
if_block_4.mount(if_block_4_anchor.parentNode, if_block_4_anchor); if_block_4.m(if_block_4_anchor.parentNode, if_block_4_anchor);
} }
} else if (if_block_4) { } else if (if_block_4) {
if_block_4.unmount(); if_block_4.u();
if_block_4.destroy(); if_block_4.d();
if_block_4 = null; if_block_4 = null;
} }
}, },
unmount: function() { u: function unmount() {
detachNode(div); detachNode(div);
if (if_block) if_block.unmount(); if (if_block) if_block.u();
if (if_block_1) if_block_1.unmount(); if (if_block_1) if_block_1.u();
if (if_block_2) if_block_2.unmount(); if (if_block_2) if_block_2.u();
if (if_block_3) if_block_3.unmount(); if (if_block_3) if_block_3.u();
detachNode(text_8); detachNode(text_8);
if (if_block_4) if_block_4.unmount(); if (if_block_4) if_block_4.u();
detachNode(if_block_4_anchor); detachNode(if_block_4_anchor);
}, },
destroy: function() { d: function destroy() {
if (if_block) if_block.destroy(); if (if_block) if_block.d();
if (if_block_1) if_block_1.destroy(); if (if_block_1) if_block_1.d();
if (if_block_2) if_block_2.destroy(); if (if_block_2) if_block_2.d();
if (if_block_3) if_block_3.destroy(); if (if_block_3) if_block_3.d();
if (if_block_4) if_block_4.destroy(); if (if_block_4) if_block_4.d();
} }
}; };
} }
@ -141,20 +141,20 @@ function create_if_block(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "a"; p.textContent = "a";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -163,20 +163,20 @@ function create_if_block_1(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "b"; p.textContent = "b";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -185,20 +185,20 @@ function create_if_block_2(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "c"; p.textContent = "c";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -207,20 +207,20 @@ function create_if_block_3(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "d"; p.textContent = "d";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -229,20 +229,20 @@ function create_if_block_4(state, component) {
var p; var p;
return { return {
create: function() { c: function create() {
p = createElement("p"); p = createElement("p");
p.textContent = "e"; p.textContent = "e";
}, },
mount: function(target, anchor) { m: function mount(target, anchor) {
insertNode(p, target, anchor); insertNode(p, target, anchor);
}, },
unmount: function() { u: function unmount() {
detachNode(p); detachNode(p);
}, },
destroy: noop d: noop
}; };
} }
@ -253,8 +253,8 @@ function SvelteComponent(options) {
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.c();
this._fragment.mount(options.target, options.anchor || null); this._fragment.m(options.target, options.anchor || null);
} }
} }

Loading…
Cancel
Save