You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/js/samples/use-elements-as-anchors/expected.js

318 lines
5.6 KiB

/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal.js";
// (2:1) {#if a}
function create_if_block_4(component, ctx) {
var p;
return {
c() {
p = createElement("p");
p.textContent = "a";
},
m(target, anchor) {
insert(target, p, anchor);
},
d(detach) {
if (detach) {
detachNode(p);
}
}
};
}
// (8:1) {#if b}
function create_if_block_3(component, ctx) {
var p;
return {
c() {
p = createElement("p");
p.textContent = "b";
},
m(target, anchor) {
insert(target, p, anchor);
},
d(detach) {
if (detach) {
detachNode(p);
}
}
};
}
// (12:1) {#if c}
function create_if_block_2(component, ctx) {
var p;
return {
c() {
p = createElement("p");
p.textContent = "c";
},
m(target, anchor) {
insert(target, p, anchor);
},
d(detach) {
if (detach) {
detachNode(p);
}
}
};
}
// (18:1) {#if d}
function create_if_block_1(component, ctx) {
var p;
return {
c() {
p = createElement("p");
p.textContent = "d";
},
m(target, anchor) {
insert(target, p, anchor);
},
d(detach) {
if (detach) {
detachNode(p);
}
}
};
}
// (25:0) {#if e}
function create_if_block(component, ctx) {
var p;
return {
c() {
p = createElement("p");
p.textContent = "e";
},
m(target, anchor) {
insert(target, p, anchor);
},
d(detach) {
if (detach) {
detachNode(p);
}
}
};
}
function create_fragment(component, ctx) {
var div, text0, p0, text2, text3, text4, p1, text6, text7, if_block4_anchor, current;
var if_block0 = (ctx.a) && create_if_block_4(component, ctx);
var if_block1 = (ctx.b) && create_if_block_3(component, ctx);
var if_block2 = (ctx.c) && create_if_block_2(component, ctx);
var if_block3 = (ctx.d) && create_if_block_1(component, ctx);
var if_block4 = (ctx.e) && create_if_block(component, ctx);
return {
c() {
div = createElement("div");
if (if_block0) if_block0.c();
text0 = createText("\n\n\t");
p0 = createElement("p");
p0.textContent = "this can be used as an anchor";
text2 = createText("\n\n\t");
if (if_block1) if_block1.c();
text3 = createText("\n\n\t");
if (if_block2) if_block2.c();
text4 = createText("\n\n\t");
p1 = createElement("p");
p1.textContent = "so can this";
text6 = createText("\n\n\t");
if (if_block3) if_block3.c();
text7 = createText("\n\n");
if (if_block4) if_block4.c();
if_block4_anchor = createComment();
},
m(target, anchor) {
insert(target, div, anchor);
if (if_block0) if_block0.m(div, null);
append(div, text0);
append(div, p0);
append(div, text2);
if (if_block1) if_block1.m(div, null);
append(div, text3);
if (if_block2) if_block2.m(div, null);
append(div, text4);
append(div, p1);
append(div, text6);
if (if_block3) if_block3.m(div, null);
insert(target, text7, anchor);
if (if_block4) if_block4.m(target, anchor);
insert(target, if_block4_anchor, anchor);
current = true;
},
p(changed, ctx) {
if (ctx.a) {
if (!if_block0) {
if_block0 = create_if_block_4(component, ctx);
if_block0.c();
if_block0.m(div, text0);
}
} else if (if_block0) {
if_block0.d(1);
if_block0 = null;
}
if (ctx.b) {
if (!if_block1) {
if_block1 = create_if_block_3(component, ctx);
if_block1.c();
if_block1.m(div, text3);
}
} else if (if_block1) {
if_block1.d(1);
if_block1 = null;
}
if (ctx.c) {
if (!if_block2) {
if_block2 = create_if_block_2(component, ctx);
if_block2.c();
if_block2.m(div, text4);
}
} else if (if_block2) {
if_block2.d(1);
if_block2 = null;
}
if (ctx.d) {
if (!if_block3) {
if_block3 = create_if_block_1(component, ctx);
if_block3.c();
if_block3.m(div, null);
}
} else if (if_block3) {
if_block3.d(1);
if_block3 = null;
}
if (ctx.e) {
if (!if_block4) {
if_block4 = create_if_block(component, ctx);
if_block4.c();
if_block4.m(if_block4_anchor.parentNode, if_block4_anchor);
}
} else if (if_block4) {
if_block4.d(1);
if_block4 = null;
}
},
i(target, anchor) {
if (current) return;
this.m(target, anchor);
},
o: run,
d(detach) {
if (detach) {
detachNode(div);
}
if (if_block0) if_block0.d();
if (if_block1) if_block1.d();
if (if_block2) if_block2.d();
if (if_block3) if_block3.d();
if (detach) {
detachNode(text7);
}
if (if_block4) if_block4.d(detach);
if (detach) {
detachNode(if_block4_anchor);
}
}
};
}
function define($$self, $$props) {
let { a, b, c, d, e } = $$props;
$$self.$$.get = () => ({ a, b, c, d, e });
$$self.$$.set = $$props => {
if ('a' in $$props) a = $$props.a;
if ('b' in $$props) b = $$props.b;
if ('c' in $$props) c = $$props.c;
if ('d' in $$props) d = $$props.d;
if ('e' in $$props) e = $$props.e;
};
}
class SvelteComponent extends SvelteComponent_1 {
constructor(options) {
super();
init(this, options, define, create_fragment, safe_not_equal);
}
get a() {
return this.$$.get().a;
}
set a(value) {
this.$set({ a: value });
flush();
}
get b() {
return this.$$.get().b;
}
set b(value) {
this.$set({ b: value });
flush();
}
get c() {
return this.$$.get().c;
}
set c(value) {
this.$set({ c: value });
flush();
}
get d() {
return this.$$.get().d;
}
set d(value) {
this.$set({ d: value });
flush();
}
get e() {
return this.$$.get().e;
}
set e(value) {
this.$set({ e: value });
flush();
}
}
export default SvelteComponent;