diff --git "a/bundle.js" "b/bundle.js" --- "a/bundle.js" +++ "b/bundle.js" @@ -733,17 +733,17 @@ var app = (function () { /* src\VideoGradioComponentBrainstorming.svelte generated by Svelte v3.59.2 */ - const { console: console_1$c } = globals; - const file$q = "src\\VideoGradioComponentBrainstorming.svelte"; + const { console: console_1$d } = globals; + const file$s = "src\\VideoGradioComponentBrainstorming.svelte"; - function get_each_context$g(ctx, list, i) { + function get_each_context$i(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[15] = list[i]; return child_ctx; } // (85:4) {#each kitchenOptions as option} - function create_each_block$g(ctx) { + function create_each_block$i(ctx) { let option; let t_value = /*option*/ ctx[15] + ""; let t; @@ -754,7 +754,7 @@ var app = (function () { t = text(t_value); option.__value = /*option*/ ctx[15]; option.value = option.__value; - add_location(option, file$q, 85, 6, 2561); + add_location(option, file$s, 85, 6, 2561); }, m: function mount(target, anchor) { insert_dev(target, option, anchor); @@ -768,7 +768,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_each_block$g.name, + id: create_each_block$i.name, type: "each", source: "(85:4) {#each kitchenOptions as option}", ctx @@ -777,7 +777,7 @@ var app = (function () { return block; } - function create_fragment$q(ctx) { + function create_fragment$s(ctx) { let h1; let t1; let div1; @@ -804,7 +804,7 @@ var app = (function () { let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$g(get_each_context$g(ctx, each_value, i)); + each_blocks[i] = create_each_block$i(get_each_context$i(ctx, each_value, i)); } const block = { @@ -834,34 +834,34 @@ var app = (function () { each_blocks[i].c(); } - add_location(h1, file$q, 66, 0, 1800); + add_location(h1, file$s, 66, 0, 1800); attr_dev(track, "kind", "captions"); if (!src_url_equal(track.src, track_src_value = "path/to/your/captions/file.vtt")) attr_dev(track, "src", track_src_value); attr_dev(track, "srclang", "en"); attr_dev(track, "label", "English"); - add_location(track, file$q, 72, 4, 2006); + add_location(track, file$s, 72, 4, 2006); attr_dev(video, "id", "videoCanvas"); video.autoplay = true; attr_dev(video, "class", "svelte-ufd3fo"); - add_location(video, file$q, 70, 2, 1965); + add_location(video, file$s, 70, 2, 1965); attr_dev(div0, "id", "overlayText"); attr_dev(div0, "class", "svelte-ufd3fo"); - add_location(div0, file$q, 74, 2, 2111); + add_location(div0, file$s, 74, 2, 2111); attr_dev(div1, "id", "videoContainer"); attr_dev(div1, "class", "svelte-ufd3fo"); - add_location(div1, file$q, 68, 0, 1911); + add_location(div1, file$s, 68, 0, 1911); attr_dev(canvas_1, "id", "myCanvas"); set_style(canvas_1, "border", "2px solid black"); attr_dev(canvas_1, "width", "500"); attr_dev(canvas_1, "height", "500"); - add_location(canvas_1, file$q, 77, 0, 2186); + add_location(canvas_1, file$s, 77, 0, 2186); attr_dev(input, "type", "text"); - add_location(input, file$q, 78, 0, 2294); - add_location(button, file$q, 82, 2, 2429); + add_location(input, file$s, 78, 0, 2294); + add_location(button, file$s, 82, 2, 2429); if (/*selectedOption*/ ctx[0] === void 0) add_render_callback(() => /*select_change_handler*/ ctx[9].call(select)); - add_location(select, file$q, 83, 2, 2479); + add_location(select, file$s, 83, 2, 2479); attr_dev(div2, "id", "frameForButtons"); - add_location(div2, file$q, 81, 0, 2399); + add_location(div2, file$s, 81, 0, 2399); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -920,12 +920,12 @@ var app = (function () { let i; for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$g(ctx, each_value, i); + const child_ctx = get_each_context$i(ctx, each_value, i); if (each_blocks[i]) { each_blocks[i].p(child_ctx, dirty); } else { - each_blocks[i] = create_each_block$g(child_ctx); + each_blocks[i] = create_each_block$i(child_ctx); each_blocks[i].c(); each_blocks[i].m(select, null); } @@ -963,7 +963,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$q.name, + id: create_fragment$s.name, type: "component", source: "", ctx @@ -976,7 +976,7 @@ var app = (function () { } // Logic for 'Test OCR' button - function instance$q($$self, $$props, $$invalidate) { + function instance$s($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('VideoGradioComponentBrainstorming', slots, []); let selectedOption = 'Stove - lu'; // default value @@ -1038,7 +1038,7 @@ var app = (function () { const writable_props = []; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$c.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$d.warn(` was created with unknown prop '${key}'`); }); function canvas_1_binding($$value) { @@ -1109,13 +1109,13 @@ var app = (function () { class VideoGradioComponentBrainstorming extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$q, create_fragment$q, safe_not_equal, {}); + init(this, options, instance$s, create_fragment$s, safe_not_equal, {}); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "VideoGradioComponentBrainstorming", options, - id: create_fragment$q.name + id: create_fragment$s.name }); } } @@ -1169,9 +1169,9 @@ var app = (function () { } /* src\MovingDotPortfromReact.svelte generated by Svelte v3.59.2 */ - const file$p = "src\\MovingDotPortfromReact.svelte"; + const file$r = "src\\MovingDotPortfromReact.svelte"; - function create_fragment$p(ctx) { + function create_fragment$r(ctx) { let button; const block = { @@ -1181,7 +1181,7 @@ var app = (function () { set_style(button, "left", /*position*/ ctx[0].x + "px"); set_style(button, "top", /*position*/ ctx[0].y + "px"); attr_dev(button, "tabindex", "0"); - add_location(button, file$p, 48, 0, 1573); + add_location(button, file$r, 48, 0, 1573); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -1209,7 +1209,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$p.name, + id: create_fragment$r.name, type: "component", source: "", ctx @@ -1220,7 +1220,7 @@ var app = (function () { const step = 10; - function instance$p($$self, $$props, $$invalidate) { + function instance$r($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('MovingDotPortfromReact', slots, []); let { position = { x: 0, y: 0 } } = $$props; @@ -1325,13 +1325,13 @@ var app = (function () { class MovingDotPortfromReact extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$p, create_fragment$p, safe_not_equal, { position: 0, boundaries: 2, focusDot: 3 }); + init(this, options, instance$r, create_fragment$r, safe_not_equal, { position: 0, boundaries: 2, focusDot: 3 }); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "MovingDotPortfromReact", options, - id: create_fragment$p.name + id: create_fragment$r.name }); } @@ -1362,9 +1362,9 @@ var app = (function () { /* src\MovingDotTargetPortfromReact.svelte generated by Svelte v3.59.2 */ - const file$o = "src\\MovingDotTargetPortfromReact.svelte"; + const file$q = "src\\MovingDotTargetPortfromReact.svelte"; - function create_fragment$o(ctx) { + function create_fragment$q(ctx) { let div; const block = { @@ -1373,7 +1373,7 @@ var app = (function () { attr_dev(div, "class", "target svelte-4yc66h"); set_style(div, "left", /*position*/ ctx[0].x + "px"); set_style(div, "top", /*position*/ ctx[0].y + "px"); - add_location(div, file$o, 4, 0, 49); + add_location(div, file$q, 4, 0, 49); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -1399,7 +1399,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$o.name, + id: create_fragment$q.name, type: "component", source: "", ctx @@ -1408,7 +1408,7 @@ var app = (function () { return block; } - function instance$o($$self, $$props, $$invalidate) { + function instance$q($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('MovingDotTargetPortfromReact', slots, []); let { position } = $$props; @@ -1445,13 +1445,13 @@ var app = (function () { class MovingDotTargetPortfromReact extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$o, create_fragment$o, safe_not_equal, { position: 0 }); + init(this, options, instance$q, create_fragment$q, safe_not_equal, { position: 0 }); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "MovingDotTargetPortfromReact", options, - id: create_fragment$o.name + id: create_fragment$q.name }); } @@ -1466,17 +1466,17 @@ var app = (function () { /* src\MovingDotSpaceSimpleModal.svelte generated by Svelte v3.59.2 */ - const { console: console_1$b } = globals; - const file$n = "src\\MovingDotSpaceSimpleModal.svelte"; + const { console: console_1$c } = globals; + const file$p = "src\\MovingDotSpaceSimpleModal.svelte"; - function get_each_context$f(ctx, list, i) { + function get_each_context$h(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[10] = list[i]; return child_ctx; } // (34:0) {#if isOpen} - function create_if_block$d(ctx) { + function create_if_block$f(ctx) { let div3; let div2; let div0; @@ -1496,7 +1496,7 @@ var app = (function () { let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$f(get_each_context$f(ctx, each_value, i)); + each_blocks[i] = create_each_block$h(get_each_context$h(ctx, each_value, i)); } const block = { @@ -1519,18 +1519,18 @@ var app = (function () { each_blocks[i].c(); } - add_location(h2, file$n, 37, 8, 1159); - add_location(button, file$n, 38, 8, 1185); + add_location(h2, file$p, 37, 8, 1159); + add_location(button, file$p, 38, 8, 1185); attr_dev(div0, "class", "modal-header svelte-m51ous"); - add_location(div0, file$n, 36, 6, 1123); + add_location(div0, file$p, 36, 6, 1123); attr_dev(ul, "class", "modal-items"); - add_location(ul, file$n, 42, 8, 1309); + add_location(ul, file$p, 42, 8, 1309); attr_dev(div1, "class", "modal-content svelte-m51ous"); - add_location(div1, file$n, 40, 6, 1253); + add_location(div1, file$p, 40, 6, 1253); attr_dev(div2, "class", "modal svelte-m51ous"); - add_location(div2, file$n, 35, 4, 1096); + add_location(div2, file$p, 35, 4, 1096); attr_dev(div3, "class", "modal-overlay svelte-m51ous"); - add_location(div3, file$n, 34, 2, 1063); + add_location(div3, file$p, 34, 2, 1063); }, m: function mount(target, anchor) { insert_dev(target, div3, anchor); @@ -1567,12 +1567,12 @@ var app = (function () { let i; for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$f(ctx, each_value, i); + const child_ctx = get_each_context$h(ctx, each_value, i); if (each_blocks[i]) { each_blocks[i].p(child_ctx, dirty); } else { - each_blocks[i] = create_each_block$f(child_ctx); + each_blocks[i] = create_each_block$h(child_ctx); each_blocks[i].c(); each_blocks[i].m(ul, null); } @@ -1595,7 +1595,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_if_block$d.name, + id: create_if_block$f.name, type: "if", source: "(34:0) {#if isOpen}", ctx @@ -1605,7 +1605,7 @@ var app = (function () { } // (44:10) {#each items as item} - function create_each_block$f(ctx) { + function create_each_block$h(ctx) { let button; let t_value = /*item*/ ctx[10].label + ""; let t; @@ -1620,7 +1620,7 @@ var app = (function () { c: function create() { button = element("button"); t = text(t_value); - add_location(button, file$n, 44, 12, 1380); + add_location(button, file$p, 44, 12, 1380); }, m: function mount(target, anchor) { insert_dev(target, button, anchor); @@ -1644,7 +1644,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_each_block$f.name, + id: create_each_block$h.name, type: "each", source: "(44:10) {#each items as item}", ctx @@ -1653,9 +1653,9 @@ var app = (function () { return block; } - function create_fragment$n(ctx) { + function create_fragment$p(ctx) { let if_block_anchor; - let if_block = /*isOpen*/ ctx[0] && create_if_block$d(ctx); + let if_block = /*isOpen*/ ctx[0] && create_if_block$f(ctx); const block = { c: function create() { @@ -1674,7 +1674,7 @@ var app = (function () { if (if_block) { if_block.p(ctx, dirty); } else { - if_block = create_if_block$d(ctx); + if_block = create_if_block$f(ctx); if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); } @@ -1693,7 +1693,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$n.name, + id: create_fragment$p.name, type: "component", source: "", ctx @@ -1702,7 +1702,7 @@ var app = (function () { return block; } - function instance$n($$self, $$props, $$invalidate) { + function instance$p($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('MovingDotSpaceSimpleModal', slots, []); let { isOpen = false } = $$props; @@ -1737,11 +1737,11 @@ var app = (function () { $$self.$$.on_mount.push(function () { if (onClose === undefined && !('onClose' in $$props || $$self.$$.bound[$$self.$$.props['onClose']])) { - console_1$b.warn(" was created without expected prop 'onClose'"); + console_1$c.warn(" was created without expected prop 'onClose'"); } if (themeActions === undefined && !('themeActions' in $$props || $$self.$$.bound[$$self.$$.props['themeActions']])) { - console_1$b.warn(" was created without expected prop 'themeActions'"); + console_1$c.warn(" was created without expected prop 'themeActions'"); } }); @@ -1756,7 +1756,7 @@ var app = (function () { ]; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$b.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$c.warn(` was created with unknown prop '${key}'`); }); const click_handler = item => handleItemClick(item); @@ -1815,7 +1815,7 @@ var app = (function () { constructor(options) { super(options); - init(this, options, instance$n, create_fragment$n, safe_not_equal, { + init(this, options, instance$p, create_fragment$p, safe_not_equal, { isOpen: 0, title: 1, content: 2, @@ -1829,7 +1829,7 @@ var app = (function () { component: this, tagName: "MovingDotSpaceSimpleModal", options, - id: create_fragment$n.name + id: create_fragment$p.name }); } @@ -1907,6 +1907,21 @@ var app = (function () { const fightplayerComputer = createfightPlayer(); const fightcurrentTurn = writable('human'); // 'human' or 'computer' const themeactions = writable({}); + const autogenconfigtest = writable({ + background: '/AutoGameBackgrounds/theme_background.png', + inventory: [ + { type: "weapon", name: "Random waepon", description: "A powerful weapon." }, + // ... more space items + ], + skills: [ + { branch: "Skill Group 1", name: "Skill One", learned: false }, + // ... more space skills + ], + persistentTargets: [ + { name: "Background Target 1", x: 500, y: 500, collisionType: "alert", collisiontext: "First Test"}, + ], + actions: [], + }); function createfightPlayer() { return writable({ @@ -1979,17 +1994,17 @@ var app = (function () { /* src\SimpleStateMachineModal.svelte generated by Svelte v3.59.2 */ - const { console: console_1$a } = globals; - const file$m = "src\\SimpleStateMachineModal.svelte"; + const { console: console_1$b } = globals; + const file$o = "src\\SimpleStateMachineModal.svelte"; - function get_each_context$e(ctx, list, i) { + function get_each_context$g(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[14] = list[i]; return child_ctx; } // (64:0) {#if isOpen} - function create_if_block$c(ctx) { + function create_if_block$e(ctx) { let div3; let div2; let div0; @@ -2009,7 +2024,7 @@ var app = (function () { let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$e(get_each_context$e(ctx, each_value, i)); + each_blocks[i] = create_each_block$g(get_each_context$g(ctx, each_value, i)); } const block = { @@ -2032,18 +2047,18 @@ var app = (function () { each_blocks[i].c(); } - add_location(h2, file$m, 67, 12, 2262); - add_location(button, file$m, 68, 12, 2292); + add_location(h2, file$o, 67, 12, 2262); + add_location(button, file$o, 68, 12, 2292); attr_dev(div0, "class", "modal-header svelte-13fuaz8"); - add_location(div0, file$m, 66, 8, 2222); + add_location(div0, file$o, 66, 8, 2222); attr_dev(ul, "class", "modal-items"); - add_location(ul, file$m, 72, 12, 2428); + add_location(ul, file$o, 72, 12, 2428); attr_dev(div1, "class", "modal-content svelte-13fuaz8"); - add_location(div1, file$m, 70, 8, 2364); + add_location(div1, file$o, 70, 8, 2364); attr_dev(div2, "class", "modal svelte-13fuaz8"); - add_location(div2, file$m, 65, 8, 2193); + add_location(div2, file$o, 65, 8, 2193); attr_dev(div3, "class", "modal-overlay svelte-13fuaz8"); - add_location(div3, file$m, 64, 4, 2156); + add_location(div3, file$o, 64, 4, 2156); }, m: function mount(target, anchor) { insert_dev(target, div3, anchor); @@ -2080,12 +2095,12 @@ var app = (function () { let i; for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$e(ctx, each_value, i); + const child_ctx = get_each_context$g(ctx, each_value, i); if (each_blocks[i]) { each_blocks[i].p(child_ctx, dirty); } else { - each_blocks[i] = create_each_block$e(child_ctx); + each_blocks[i] = create_each_block$g(child_ctx); each_blocks[i].c(); each_blocks[i].m(ul, null); } @@ -2108,7 +2123,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_if_block$c.name, + id: create_if_block$e.name, type: "if", source: "(64:0) {#if isOpen}", ctx @@ -2118,7 +2133,7 @@ var app = (function () { } // (74:12) {#each items as item} - function create_each_block$e(ctx) { + function create_each_block$g(ctx) { let button; let t_value = /*item*/ ctx[14].label + ""; let t; @@ -2133,7 +2148,7 @@ var app = (function () { c: function create() { button = element("button"); t = text(t_value); - add_location(button, file$m, 74, 16, 2505); + add_location(button, file$o, 74, 16, 2505); }, m: function mount(target, anchor) { insert_dev(target, button, anchor); @@ -2157,7 +2172,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_each_block$e.name, + id: create_each_block$g.name, type: "each", source: "(74:12) {#each items as item}", ctx @@ -2166,9 +2181,9 @@ var app = (function () { return block; } - function create_fragment$m(ctx) { + function create_fragment$o(ctx) { let if_block_anchor; - let if_block = /*isOpen*/ ctx[0] && create_if_block$c(ctx); + let if_block = /*isOpen*/ ctx[0] && create_if_block$e(ctx); const block = { c: function create() { @@ -2187,7 +2202,7 @@ var app = (function () { if (if_block) { if_block.p(ctx, dirty); } else { - if_block = create_if_block$c(ctx); + if_block = create_if_block$e(ctx); if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); } @@ -2206,7 +2221,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$m.name, + id: create_fragment$o.name, type: "component", source: "", ctx @@ -2215,7 +2230,7 @@ var app = (function () { return block; } - function instance$m($$self, $$props, $$invalidate) { + function instance$o($$self, $$props, $$invalidate) { let $themeactions; let $state; validate_store(themeactions, 'themeactions'); @@ -2276,18 +2291,18 @@ var app = (function () { $$self.$$.on_mount.push(function () { if (modalStates === undefined && !('modalStates' in $$props || $$self.$$.bound[$$self.$$.props['modalStates']])) { - console_1$a.warn(" was created without expected prop 'modalStates'"); + console_1$b.warn(" was created without expected prop 'modalStates'"); } if (onClose === undefined && !('onClose' in $$props || $$self.$$.bound[$$self.$$.props['onClose']])) { - console_1$a.warn(" was created without expected prop 'onClose'"); + console_1$b.warn(" was created without expected prop 'onClose'"); } }); const writable_props = ['modalStates', 'isOpen', 'onClose']; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$a.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$b.warn(` was created with unknown prop '${key}'`); }); const click_handler = item => handleItemClick(item); @@ -2356,13 +2371,13 @@ var app = (function () { class SimpleStateMachineModal extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$m, create_fragment$m, safe_not_equal, { modalStates: 7, isOpen: 0, onClose: 8 }); + init(this, options, instance$o, create_fragment$o, safe_not_equal, { modalStates: 7, isOpen: 0, onClose: 8 }); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "SimpleStateMachineModal", options, - id: create_fragment$m.name + id: create_fragment$o.name }); } @@ -2393,15 +2408,15 @@ var app = (function () { /* src\MovingDotStatDisplay.svelte generated by Svelte v3.59.2 */ - const file$l = "src\\MovingDotStatDisplay.svelte"; + const file$n = "src\\MovingDotStatDisplay.svelte"; - function get_each_context$d(ctx, list, i) { + function get_each_context$f(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[13] = list[i]; return child_ctx; } - function get_each_context_1$7(ctx, list, i) { + function get_each_context_1$8(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[16] = list[i]; return child_ctx; @@ -2435,7 +2450,7 @@ var app = (function () { t3 = space(); t4 = text(t4_value); attr_dev(li, "class", li_class_value = "" + (null_to_empty(/*item*/ ctx[16].complete ? 'completedobjetive' : '') + " svelte-w7krpq")); - add_location(li, file$l, 15, 8, 453); + add_location(li, file$n, 15, 8, 453); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -2471,7 +2486,7 @@ var app = (function () { } // (26:8) {#each $inventory as item} - function create_each_block_1$7(ctx) { + function create_each_block_1$8(ctx) { let button; let t0_value = /*item*/ ctx[16].name + ""; let t0; @@ -2489,7 +2504,7 @@ var app = (function () { t0 = text(t0_value); t1 = space(); attr_dev(button, "class", "skill"); - add_location(button, file$l, 26, 10, 813); + add_location(button, file$n, 26, 10, 813); }, m: function mount(target, anchor) { insert_dev(target, button, anchor); @@ -2514,7 +2529,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_each_block_1$7.name, + id: create_each_block_1$8.name, type: "each", source: "(26:8) {#each $inventory as item}", ctx @@ -2524,7 +2539,7 @@ var app = (function () { } // (50:8) {#each $skills as skill} - function create_each_block$d(ctx) { + function create_each_block$f(ctx) { let li; let t0_value = /*skill*/ ctx[13].name + ""; let t0; @@ -2543,7 +2558,7 @@ var app = (function () { t2 = text(t2_value); t3 = text(" - Learned: "); t4 = text(t4_value); - add_location(li, file$l, 50, 10, 1580); + add_location(li, file$n, 50, 10, 1580); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -2565,7 +2580,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_each_block$d.name, + id: create_each_block$f.name, type: "each", source: "(50:8) {#each $skills as skill}", ctx @@ -2574,7 +2589,7 @@ var app = (function () { return block; } - function create_fragment$l(ctx) { + function create_fragment$n(ctx) { let div10; let div0; let h10; @@ -2637,7 +2652,7 @@ var app = (function () { let each_blocks_1 = []; for (let i = 0; i < each_value_1.length; i += 1) { - each_blocks_1[i] = create_each_block_1$7(get_each_context_1$7(ctx, each_value_1, i)); + each_blocks_1[i] = create_each_block_1$8(get_each_context_1$8(ctx, each_value_1, i)); } let each_value = /*$skills*/ ctx[10]; @@ -2645,7 +2660,7 @@ var app = (function () { let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$d(get_each_context$d(ctx, each_value, i)); + each_blocks[i] = create_each_block$f(get_each_context$f(ctx, each_value, i)); } const block = { @@ -2721,35 +2736,35 @@ var app = (function () { each_blocks[i].c(); } - add_location(h10, file$l, 11, 4, 329); - add_location(ul0, file$l, 12, 4, 354); + add_location(h10, file$n, 11, 4, 329); + add_location(ul0, file$n, 12, 4, 354); attr_dev(div0, "class", "grid-statsitem svelte-w7krpq"); - add_location(div0, file$l, 10, 2, 295); - add_location(h20, file$l, 22, 6, 677); - add_location(h60, file$l, 23, 6, 703); - add_location(ul1, file$l, 24, 6, 761); + add_location(div0, file$n, 10, 2, 295); + add_location(h20, file$n, 22, 6, 677); + add_location(h60, file$n, 23, 6, 703); + add_location(ul1, file$n, 24, 6, 761); attr_dev(div1, "class", "inventory svelte-w7krpq"); - add_location(div1, file$l, 21, 4, 646); + add_location(div1, file$n, 21, 4, 646); attr_dev(div2, "class", "grid-statsitem svelte-w7krpq"); - add_location(div2, file$l, 20, 2, 612); - add_location(h11, file$l, 36, 6, 1066); - add_location(h61, file$l, 37, 6, 1095); - add_location(div3, file$l, 38, 6, 1142); - add_location(div4, file$l, 39, 6, 1286); - add_location(div5, file$l, 40, 6, 1318); + add_location(div2, file$n, 20, 2, 612); + add_location(h11, file$n, 36, 6, 1066); + add_location(h61, file$n, 37, 6, 1095); + add_location(div3, file$n, 38, 6, 1142); + add_location(div4, file$n, 39, 6, 1286); + add_location(div5, file$n, 40, 6, 1318); attr_dev(div6, "class", "stats svelte-w7krpq"); - add_location(div6, file$l, 35, 4, 1039); + add_location(div6, file$n, 35, 4, 1039); attr_dev(div7, "class", "grid-statsitem svelte-w7krpq"); - add_location(div7, file$l, 34, 2, 1005); - add_location(h21, file$l, 46, 6, 1440); - add_location(h62, file$l, 47, 6, 1479); - add_location(ul2, file$l, 48, 6, 1530); + add_location(div7, file$n, 34, 2, 1005); + add_location(h21, file$n, 46, 6, 1440); + add_location(h62, file$n, 47, 6, 1479); + add_location(ul2, file$n, 48, 6, 1530); attr_dev(div8, "class", "skill-tree svelte-w7krpq"); - add_location(div8, file$l, 45, 4, 1408); + add_location(div8, file$n, 45, 4, 1408); attr_dev(div9, "class", "grid-statsitem svelte-w7krpq"); - add_location(div9, file$l, 44, 2, 1374); + add_location(div9, file$n, 44, 2, 1374); attr_dev(div10, "class", "grid-statsContainer svelte-w7krpq"); - add_location(div10, file$l, 9, 0, 258); + add_location(div10, file$n, 9, 0, 258); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -2856,12 +2871,12 @@ var app = (function () { let i; for (i = 0; i < each_value_1.length; i += 1) { - const child_ctx = get_each_context_1$7(ctx, each_value_1, i); + const child_ctx = get_each_context_1$8(ctx, each_value_1, i); if (each_blocks_1[i]) { each_blocks_1[i].p(child_ctx, dirty); } else { - each_blocks_1[i] = create_each_block_1$7(child_ctx); + each_blocks_1[i] = create_each_block_1$8(child_ctx); each_blocks_1[i].c(); each_blocks_1[i].m(ul1, null); } @@ -2889,12 +2904,12 @@ var app = (function () { let i; for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$d(ctx, each_value, i); + const child_ctx = get_each_context$f(ctx, each_value, i); if (each_blocks[i]) { each_blocks[i].p(child_ctx, dirty); } else { - each_blocks[i] = create_each_block$d(child_ctx); + each_blocks[i] = create_each_block$f(child_ctx); each_blocks[i].c(); each_blocks[i].m(ul2, null); } @@ -2919,7 +2934,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$l.name, + id: create_fragment$n.name, type: "component", source: "", ctx @@ -2928,7 +2943,7 @@ var app = (function () { return block; } - function instance$l($$self, $$props, $$invalidate) { + function instance$n($$self, $$props, $$invalidate) { let $objectives; let $inventory; let $health; @@ -3024,23 +3039,23 @@ var app = (function () { class MovingDotStatDisplay extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$l, create_fragment$l, safe_not_equal, {}); + init(this, options, instance$n, create_fragment$n, safe_not_equal, {}); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "MovingDotStatDisplay", options, - id: create_fragment$l.name + id: create_fragment$n.name }); } } /* src\SimpleCollapsible.svelte generated by Svelte v3.59.2 */ - const file$k = "src\\SimpleCollapsible.svelte"; + const file$m = "src\\SimpleCollapsible.svelte"; // (16:4) {#if isOpen} - function create_if_block$b(ctx) { + function create_if_block$d(ctx) { let div; let current; const default_slot_template = /*#slots*/ ctx[4].default; @@ -3051,7 +3066,7 @@ var app = (function () { div = element("div"); if (default_slot) default_slot.c(); attr_dev(div, "class", "content svelte-rzwxvd"); - add_location(div, file$k, 16, 6, 335); + add_location(div, file$m, 16, 6, 335); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); @@ -3095,7 +3110,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_if_block$b.name, + id: create_if_block$d.name, type: "if", source: "(16:4) {#if isOpen}", ctx @@ -3104,7 +3119,7 @@ var app = (function () { return block; } - function create_fragment$k(ctx) { + function create_fragment$m(ctx) { let div; let button; let t0_value = (/*isOpen*/ ctx[1] ? 'Close' : 'Open') + ""; @@ -3115,7 +3130,7 @@ var app = (function () { let current; let mounted; let dispose; - let if_block = /*isOpen*/ ctx[1] && create_if_block$b(ctx); + let if_block = /*isOpen*/ ctx[1] && create_if_block$d(ctx); const block = { c: function create() { @@ -3127,9 +3142,9 @@ var app = (function () { t3 = space(); if (if_block) if_block.c(); attr_dev(button, "class", "svelte-rzwxvd"); - add_location(button, file$k, 11, 4, 210); + add_location(button, file$m, 11, 4, 210); attr_dev(div, "class", "collapsible svelte-rzwxvd"); - add_location(div, file$k, 10, 0, 179); + add_location(div, file$m, 10, 0, 179); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -3161,7 +3176,7 @@ var app = (function () { transition_in(if_block, 1); } } else { - if_block = create_if_block$b(ctx); + if_block = create_if_block$d(ctx); if_block.c(); transition_in(if_block, 1); if_block.m(div, null); @@ -3195,7 +3210,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$k.name, + id: create_fragment$m.name, type: "component", source: "", ctx @@ -3204,7 +3219,7 @@ var app = (function () { return block; } - function instance$k($$self, $$props, $$invalidate) { + function instance$m($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('SimpleCollapsible', slots, ['default']); let { title = '' } = $$props; @@ -3242,13 +3257,13 @@ var app = (function () { class SimpleCollapsible extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$k, create_fragment$k, safe_not_equal, { title: 0 }); + init(this, options, instance$m, create_fragment$m, safe_not_equal, { title: 0 }); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "SimpleCollapsible", options, - id: create_fragment$k.name + id: create_fragment$m.name }); } @@ -3263,16 +3278,16 @@ var app = (function () { /* src\BrainstormGameConfigsRandom.svelte generated by Svelte v3.59.2 */ - const { console: console_1$9 } = globals; - const file$j = "src\\BrainstormGameConfigsRandom.svelte"; + const { console: console_1$a } = globals; + const file$l = "src\\BrainstormGameConfigsRandom.svelte"; - function get_each_context$c(ctx, list, i) { + function get_each_context$e(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[9] = list[i]; return child_ctx; } - function get_each_context_1$6(ctx, list, i) { + function get_each_context_1$7(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[12] = list[i]; child_ctx[14] = i; @@ -3344,7 +3359,7 @@ var app = (function () { t1 = text(" - "); t2 = text(t2_value); attr_dev(li, "class", "svelte-utjjnp"); - add_location(li, file$j, 262, 28, 10991); + add_location(li, file$l, 262, 28, 10991); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -3389,7 +3404,7 @@ var app = (function () { t2 = text(t2_value); attr_dev(li, "class", "svelte-utjjnp"); toggle_class(li, "learned", /*skill*/ ctx[30].learned); - add_location(li, file$j, 269, 28, 11282); + add_location(li, file$l, 269, 28, 11282); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -3438,7 +3453,7 @@ var app = (function () { t2 = text(t2_value); attr_dev(li, "class", "svelte-utjjnp"); toggle_class(li, "complete", /*objective*/ ctx[21].complete); - add_location(li, file$j, 276, 28, 11612); + add_location(li, file$l, 276, 28, 11612); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -3496,7 +3511,7 @@ var app = (function () { t5 = text(") - "); t6 = text(t6_value); attr_dev(li, "class", "svelte-utjjnp"); - add_location(li, file$j, 288, 28, 12148); + add_location(li, file$l, 288, 28, 12148); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -3565,10 +3580,10 @@ var app = (function () { } t5 = space(); - add_location(h3, file$j, 284, 24, 11960); - add_location(p, file$j, 285, 24, 12010); + add_location(h3, file$l, 284, 24, 11960); + add_location(p, file$l, 285, 24, 12010); attr_dev(ul, "class", "svelte-utjjnp"); - add_location(ul, file$j, 286, 24, 12051); + add_location(ul, file$l, 286, 24, 12051); }, m: function mount(target, anchor) { insert_dev(target, h3, anchor); @@ -3651,12 +3666,12 @@ var app = (function () { t1 = space(); input = element("input"); t2 = space(); - add_location(span, file$j, 309, 44, 13293); + add_location(span, file$l, 309, 44, 13293); attr_dev(input, "type", "text"); attr_dev(input, "placeholder", "Enter objective details"); - add_location(input, file$j, 310, 44, 13368); + add_location(input, file$l, 310, 44, 13368); attr_dev(li, "class", "svelte-utjjnp"); - add_location(li, file$j, 308, 40, 13243); + add_location(li, file$l, 308, 40, 13243); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -3686,7 +3701,7 @@ var app = (function () { } // (326:44) {#if target.subTargets && target.subTargets.length > 0} - function create_if_block$a(ctx) { + function create_if_block$c(ctx) { let div; let h5; let t0; @@ -3715,10 +3730,10 @@ var app = (function () { each_blocks[i].c(); } - add_location(h5, file$j, 327, 52, 14525); + add_location(h5, file$l, 327, 52, 14525); attr_dev(ul, "class", "svelte-utjjnp"); - add_location(ul, file$j, 328, 52, 14615); - add_location(div, file$j, 326, 48, 14466); + add_location(ul, file$l, 328, 52, 14615); + add_location(div, file$l, 326, 48, 14466); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); @@ -3769,7 +3784,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_if_block$a.name, + id: create_if_block$c.name, type: "if", source: "(326:44) {#if target.subTargets && target.subTargets.length > 0}", ctx @@ -3826,17 +3841,17 @@ var app = (function () { t11 = space(); textarea = element("textarea"); t12 = space(); - add_location(span, file$j, 331, 64, 14847); + add_location(span, file$l, 331, 64, 14847); attr_dev(input, "type", "text"); attr_dev(input, "placeholder", "Enter subtarget details"); - add_location(input, file$j, 332, 64, 14942); - add_location(p0, file$j, 333, 64, 15067); - add_location(p1, file$j, 334, 64, 15183); + add_location(input, file$l, 332, 64, 14942); + add_location(p0, file$l, 333, 64, 15067); + add_location(p1, file$l, 334, 64, 15183); attr_dev(textarea, "placeholder", "Enter collision text"); textarea.value = textarea_value_value = /*subTarget*/ ctx[18].collisiontext; - add_location(textarea, file$j, 335, 64, 15297); + add_location(textarea, file$l, 335, 64, 15297); attr_dev(li, "class", "svelte-utjjnp"); - add_location(li, file$j, 330, 60, 14777); + add_location(li, file$l, 330, 60, 14777); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -3912,7 +3927,7 @@ var app = (function () { let textarea_value_value; let t12; let t13; - let if_block = /*target*/ ctx[15].subTargets && /*target*/ ctx[15].subTargets.length > 0 && create_if_block$a(ctx); + let if_block = /*target*/ ctx[15].subTargets && /*target*/ ctx[15].subTargets.length > 0 && create_if_block$c(ctx); const block = { c: function create() { @@ -3937,17 +3952,17 @@ var app = (function () { t12 = space(); if (if_block) if_block.c(); t13 = space(); - add_location(span, file$j, 320, 44, 13882); + add_location(span, file$l, 320, 44, 13882); attr_dev(input, "type", "text"); attr_dev(input, "placeholder", "Enter target details"); - add_location(input, file$j, 321, 44, 13954); - add_location(p0, file$j, 322, 44, 14056); - add_location(p1, file$j, 323, 44, 14146); + add_location(input, file$l, 321, 44, 13954); + add_location(p0, file$l, 322, 44, 14056); + add_location(p1, file$l, 323, 44, 14146); attr_dev(textarea, "placeholder", "Enter collision text"); textarea.value = textarea_value_value = /*target*/ ctx[15].collisiontext; - add_location(textarea, file$j, 324, 44, 14237); + add_location(textarea, file$l, 324, 44, 14237); attr_dev(li, "class", "svelte-utjjnp"); - add_location(li, file$j, 319, 40, 13832); + add_location(li, file$l, 319, 40, 13832); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -3986,7 +4001,7 @@ var app = (function () { if (if_block) { if_block.p(ctx, dirty); } else { - if_block = create_if_block$a(ctx); + if_block = create_if_block$c(ctx); if_block.c(); if_block.m(li, t13); } @@ -4013,7 +4028,7 @@ var app = (function () { } // (302:20) {#each randomContentStructureSubtargets.story as storyPart, i} - function create_each_block_1$6(ctx) { + function create_each_block_1$7(ctx) { let div2; let h3; let t0; @@ -4075,16 +4090,16 @@ var app = (function () { } t8 = space(); - add_location(h3, file$j, 303, 28, 12962); - add_location(h40, file$j, 305, 32, 13065); + add_location(h3, file$l, 303, 28, 12962); + add_location(h40, file$l, 305, 32, 13065); attr_dev(ul0, "class", "svelte-utjjnp"); - add_location(ul0, file$j, 306, 32, 13118); - add_location(div0, file$j, 304, 28, 13026); - add_location(h41, file$j, 316, 32, 13663); + add_location(ul0, file$l, 306, 32, 13118); + add_location(div0, file$l, 304, 28, 13026); + add_location(h41, file$l, 316, 32, 13663); attr_dev(ul1, "class", "svelte-utjjnp"); - add_location(ul1, file$j, 317, 32, 13713); - add_location(div1, file$j, 315, 28, 13624); - add_location(div2, file$j, 302, 24, 12927); + add_location(ul1, file$l, 317, 32, 13713); + add_location(div1, file$l, 315, 28, 13624); + add_location(div2, file$l, 302, 24, 12927); }, m: function mount(target, anchor) { insert_dev(target, div2, anchor); @@ -4177,7 +4192,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_each_block_1$6.name, + id: create_each_block_1$7.name, type: "each", source: "(302:20) {#each randomContentStructureSubtargets.story as storyPart, i}", ctx @@ -4187,7 +4202,7 @@ var app = (function () { } // (358:12) {#each timelinePoints as point} - function create_each_block$c(ctx) { + function create_each_block$e(ctx) { let li; let strong; let t0_value = /*point*/ ctx[9].name + ""; @@ -4207,10 +4222,10 @@ var app = (function () { p = element("p"); t2 = text(t2_value); t3 = space(); - add_location(strong, file$j, 359, 20, 16431); - add_location(p, file$j, 360, 20, 16482); + add_location(strong, file$l, 359, 20, 16431); + add_location(p, file$l, 360, 20, 16482); attr_dev(li, "class", "svelte-utjjnp"); - add_location(li, file$j, 358, 16, 16405); + add_location(li, file$l, 358, 16, 16405); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -4232,7 +4247,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_each_block$c.name, + id: create_each_block$e.name, type: "each", source: "(358:12) {#each timelinePoints as point}", ctx @@ -4241,7 +4256,7 @@ var app = (function () { return block; } - function create_fragment$j(ctx) { + function create_fragment$l(ctx) { let div10; let h10; let t1; @@ -4334,7 +4349,7 @@ var app = (function () { let each_blocks_1 = []; for (let i = 0; i < each_value_1.length; i += 1) { - each_blocks_1[i] = create_each_block_1$6(get_each_context_1$6(ctx, each_value_1, i)); + each_blocks_1[i] = create_each_block_1$7(get_each_context_1$7(ctx, each_value_1, i)); } let each_value = /*timelinePoints*/ ctx[2]; @@ -4342,7 +4357,7 @@ var app = (function () { let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$c(get_each_context$c(ctx, each_value, i)); + each_blocks[i] = create_each_block$e(get_each_context$e(ctx, each_value, i)); } const block = { @@ -4444,44 +4459,44 @@ var app = (function () { each_blocks[i].c(); } - add_location(h10, file$j, 244, 4, 10201); - add_location(h11, file$j, 250, 20, 10377); - add_location(button0, file$j, 251, 20, 10437); - add_location(button1, file$j, 252, 20, 10553); - add_location(div0, file$j, 249, 16, 10350); - add_location(h20, file$j, 256, 24, 10749); - add_location(h21, file$j, 259, 24, 10848); + add_location(h10, file$l, 244, 4, 10201); + add_location(h11, file$l, 250, 20, 10377); + add_location(button0, file$l, 251, 20, 10437); + add_location(button1, file$l, 252, 20, 10553); + add_location(div0, file$l, 249, 16, 10350); + add_location(h20, file$l, 256, 24, 10749); + add_location(h21, file$l, 259, 24, 10848); attr_dev(ul0, "class", "svelte-utjjnp"); - add_location(ul0, file$j, 260, 24, 10892); - add_location(h22, file$j, 266, 24, 11144); + add_location(ul0, file$l, 260, 24, 10892); + add_location(h22, file$l, 266, 24, 11144); attr_dev(ul1, "class", "svelte-utjjnp"); - add_location(ul1, file$j, 267, 24, 11185); - add_location(h23, file$j, 273, 24, 11462); + add_location(ul1, file$l, 267, 24, 11185); + add_location(h23, file$l, 273, 24, 11462); attr_dev(ul2, "class", "svelte-utjjnp"); - add_location(ul2, file$j, 274, 24, 11507); - add_location(div1, file$j, 255, 20, 10718); - add_location(h24, file$j, 282, 24, 11853); - add_location(div2, file$j, 281, 20, 11822); + add_location(ul2, file$l, 274, 24, 11507); + add_location(div1, file$l, 255, 20, 10718); + add_location(h24, file$l, 282, 24, 11853); + add_location(div2, file$l, 281, 20, 11822); attr_dev(div3, "class", "StatColumns svelte-utjjnp"); - add_location(div3, file$j, 254, 16, 10671); - add_location(div4, file$j, 248, 12, 10323); - add_location(h12, file$j, 297, 16, 12442); - add_location(button2, file$j, 298, 16, 12511); - add_location(button3, file$j, 299, 16, 12677); + add_location(div3, file$l, 254, 16, 10671); + add_location(div4, file$l, 248, 12, 10323); + add_location(h12, file$l, 297, 16, 12442); + add_location(button2, file$l, 298, 16, 12511); + add_location(button3, file$l, 299, 16, 12677); attr_dev(div5, "class", "StatColumns svelte-utjjnp"); - add_location(div5, file$j, 300, 16, 12792); - add_location(div6, file$j, 296, 12, 12419); + add_location(div5, file$l, 300, 16, 12792); + add_location(div6, file$l, 296, 12, 12419); attr_dev(div7, "class", "ContainerColumns svelte-utjjnp"); - add_location(div7, file$j, 247, 8, 10279); - add_location(div8, file$j, 246, 4, 10264); - add_location(h13, file$j, 352, 4, 15984); - add_location(button4, file$j, 353, 4, 16042); - add_location(button5, file$j, 354, 4, 16177); + add_location(div7, file$l, 247, 8, 10279); + add_location(div8, file$l, 246, 4, 10264); + add_location(h13, file$l, 352, 4, 15984); + add_location(button4, file$l, 353, 4, 16042); + add_location(button5, file$l, 354, 4, 16177); attr_dev(ul3, "class", "svelte-utjjnp"); - add_location(ul3, file$j, 356, 8, 16338); + add_location(ul3, file$l, 356, 8, 16338); attr_dev(div9, "class", "timeline svelte-utjjnp"); - add_location(div9, file$j, 355, 4, 16306); - add_location(div10, file$j, 243, 0, 10190); + add_location(div9, file$l, 355, 4, 16306); + add_location(div10, file$l, 243, 0, 10190); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -4699,12 +4714,12 @@ var app = (function () { let i; for (i = 0; i < each_value_1.length; i += 1) { - const child_ctx = get_each_context_1$6(ctx, each_value_1, i); + const child_ctx = get_each_context_1$7(ctx, each_value_1, i); if (each_blocks_1[i]) { each_blocks_1[i].p(child_ctx, dirty); } else { - each_blocks_1[i] = create_each_block_1$6(child_ctx); + each_blocks_1[i] = create_each_block_1$7(child_ctx); each_blocks_1[i].c(); each_blocks_1[i].m(div5, null); } @@ -4723,12 +4738,12 @@ var app = (function () { let i; for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$c(ctx, each_value, i); + const child_ctx = get_each_context$e(ctx, each_value, i); if (each_blocks[i]) { each_blocks[i].p(child_ctx, dirty); } else { - each_blocks[i] = create_each_block$c(child_ctx); + each_blocks[i] = create_each_block$e(child_ctx); each_blocks[i].c(); each_blocks[i].m(ul3, null); } @@ -4758,7 +4773,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$j.name, + id: create_fragment$l.name, type: "component", source: "", ctx @@ -4908,7 +4923,7 @@ var app = (function () { // }; // return randomContentstructure; // } - function generateRandomContentStructureSubtargets() { + function generateRandomContentStructureSubtargets$1() { // Random number generator for various properties function getRandomNumber(max, min = 1) { return Math.floor(Math.random() * (max - min + 1)) + min; @@ -4994,13 +5009,13 @@ var app = (function () { return allPoints; } - function instance$j($$self, $$props, $$invalidate) { + function instance$l($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('BrainstormGameConfigsRandom', slots, []); let randomContent = generateRandomContent(); // let randomContentstructure = generateRandomContentStructure(); - let randomContentStructureSubtargets = generateRandomContentStructureSubtargets(); + let randomContentStructureSubtargets = generateRandomContentStructureSubtargets$1(); console.log(randomContentStructureSubtargets); @@ -5038,15 +5053,15 @@ var app = (function () { const writable_props = []; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$9.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$a.warn(` was created with unknown prop '${key}'`); }); const click_handler = () => $$invalidate(0, randomContent = generateRandomContent()); - const click_handler_1 = () => $$invalidate(1, randomContentStructureSubtargets = generateRandomContentStructureSubtargets()); + const click_handler_1 = () => $$invalidate(1, randomContentStructureSubtargets = generateRandomContentStructureSubtargets$1()); $$self.$capture_state = () => ({ generateRandomContent, - generateRandomContentStructureSubtargets, + generateRandomContentStructureSubtargets: generateRandomContentStructureSubtargets$1, randomContent, randomContentStructureSubtargets, copyToClipboard, @@ -5084,20 +5099,20 @@ var app = (function () { class BrainstormGameConfigsRandom extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$j, create_fragment$j, safe_not_equal, {}, null, [-1, -1]); + init(this, options, instance$l, create_fragment$l, safe_not_equal, {}, null, [-1, -1]); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "BrainstormGameConfigsRandom", options, - id: create_fragment$j.name + id: create_fragment$l.name }); } } /* src\BrainstormStateTransitionsRandom.svelte generated by Svelte v3.59.2 */ - const file$i = "src\\BrainstormStateTransitionsRandom.svelte"; + const file$k = "src\\BrainstormStateTransitionsRandom.svelte"; // (109:8) {#if sequence.length > 0} function create_if_block_2$1(ctx) { @@ -5113,8 +5128,8 @@ var app = (function () { p = element("p"); t0 = text("Generated Sequence: "); t1 = text(t1_value); - add_location(p, file$i, 110, 12, 5001); - add_location(div, file$i, 109, 8, 4982); + add_location(p, file$k, 110, 12, 5001); + add_location(div, file$k, 109, 8, 4982); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); @@ -5168,14 +5183,14 @@ var app = (function () { p1 = element("p"); t3 = text("Enemy Sequence: "); t4 = text(t4_value); - add_location(p0, file$i, 101, 12, 4730); + add_location(p0, file$k, 101, 12, 4730); set_style(div0, "flex", "1"); - add_location(div0, file$i, 100, 8, 4694); - add_location(p1, file$i, 104, 12, 4843); + add_location(div0, file$k, 100, 8, 4694); + add_location(p1, file$k, 104, 12, 4843); set_style(div1, "flex", "1"); - add_location(div1, file$i, 103, 8, 4807); + add_location(div1, file$k, 103, 8, 4807); set_style(div2, "display", "flex"); - add_location(div2, file$i, 99, 8, 4656); + add_location(div2, file$k, 99, 8, 4656); }, m: function mount(target, anchor) { insert_dev(target, div2, anchor); @@ -5210,7 +5225,7 @@ var app = (function () { } // (116:4) {#if sequence.length > 0} - function create_if_block$9(ctx) { + function create_if_block$b(ctx) { let div; let button0; let t1; @@ -5236,11 +5251,11 @@ var app = (function () { t5 = space(); button3 = element("button"); button3.textContent = "Copy All Events"; - add_location(button0, file$i, 117, 8, 5147); - add_location(button1, file$i, 118, 8, 5222); - add_location(button2, file$i, 119, 8, 5299); - add_location(button3, file$i, 120, 8, 5376); - add_location(div, file$i, 116, 6, 5132); + add_location(button0, file$k, 117, 8, 5147); + add_location(button1, file$k, 118, 8, 5222); + add_location(button2, file$k, 119, 8, 5299); + add_location(button3, file$k, 120, 8, 5376); + add_location(div, file$k, 116, 6, 5132); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); @@ -5273,7 +5288,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_if_block$9.name, + id: create_if_block$b.name, type: "if", source: "(116:4) {#if sequence.length > 0}", ctx @@ -5282,7 +5297,7 @@ var app = (function () { return block; } - function create_fragment$i(ctx) { + function create_fragment$k(ctx) { let main; let button0; let t1; @@ -5303,7 +5318,7 @@ var app = (function () { let current_block_type = select_block_type(ctx); let if_block0 = current_block_type && current_block_type(ctx); - let if_block1 = /*sequence*/ ctx[0].length > 0 && create_if_block$9(ctx); + let if_block1 = /*sequence*/ ctx[0].length > 0 && create_if_block$b(ctx); const block = { c: function create() { @@ -5320,11 +5335,11 @@ var app = (function () { if (if_block0) if_block0.c(); t6 = space(); if (if_block1) if_block1.c(); - add_location(button0, file$i, 93, 4, 4282); + add_location(button0, file$k, 93, 4, 4282); button1.disabled = button1_disabled_value = /*sequence*/ ctx[0].length === 0; - add_location(button1, file$i, 94, 4, 4354); - add_location(button2, file$i, 95, 4, 4473); - add_location(main, file$i, 92, 0, 4270); + add_location(button1, file$k, 94, 4, 4354); + add_location(button2, file$k, 95, 4, 4473); + add_location(main, file$k, 92, 0, 4270); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -5373,7 +5388,7 @@ var app = (function () { if (if_block1) { if_block1.p(ctx, dirty); } else { - if_block1 = create_if_block$9(ctx); + if_block1 = create_if_block$b(ctx); if_block1.c(); if_block1.m(main, null); } @@ -5399,7 +5414,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$i.name, + id: create_fragment$k.name, type: "component", source: "", ctx @@ -5408,7 +5423,7 @@ var app = (function () { return block; } - function instance$i($$self, $$props, $$invalidate) { + function instance$k($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('BrainstormStateTransitionsRandom', slots, []); @@ -5591,36 +5606,36 @@ var app = (function () { class BrainstormStateTransitionsRandom extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$i, create_fragment$i, safe_not_equal, {}); + init(this, options, instance$k, create_fragment$k, safe_not_equal, {}); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "BrainstormStateTransitionsRandom", options, - id: create_fragment$i.name + id: create_fragment$k.name }); } } /* src\testbrainstorminstantpopulate.svelte generated by Svelte v3.59.2 */ - const { console: console_1$8 } = globals; - const file$h = "src\\testbrainstorminstantpopulate.svelte"; + const { console: console_1$9 } = globals; + const file$j = "src\\testbrainstorminstantpopulate.svelte"; - function get_each_context$b(ctx, list, i) { + function get_each_context$d(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[6] = list[i]; return child_ctx; } - function get_each_context_1$5(ctx, list, i) { + function get_each_context_1$6(ctx, list, i) { const child_ctx = ctx.slice(); child_ctx[6] = list[i]; return child_ctx; } // (70:12) {#each filteredKeys as key} - function create_each_block_1$5(ctx) { + function create_each_block_1$6(ctx) { let li; let t_value = /*key*/ ctx[6] + ""; let t; @@ -5629,7 +5644,7 @@ var app = (function () { c: function create() { li = element("li"); t = text(t_value); - add_location(li, file$h, 70, 14, 2213); + add_location(li, file$j, 70, 14, 2213); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -5645,7 +5660,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_each_block_1$5.name, + id: create_each_block_1$6.name, type: "each", source: "(70:12) {#each filteredKeys as key}", ctx @@ -5655,7 +5670,7 @@ var app = (function () { } // (79:12) {#each remainingKeys as key} - function create_each_block$b(ctx) { + function create_each_block$d(ctx) { let li; let t_value = /*key*/ ctx[6] + ""; let t; @@ -5664,7 +5679,7 @@ var app = (function () { c: function create() { li = element("li"); t = text(t_value); - add_location(li, file$h, 79, 14, 2410); + add_location(li, file$j, 79, 14, 2410); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -5680,7 +5695,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_each_block$b.name, + id: create_each_block$d.name, type: "each", source: "(79:12) {#each remainingKeys as key}", ctx @@ -5689,7 +5704,7 @@ var app = (function () { return block; } - function create_fragment$h(ctx) { + function create_fragment$j(ctx) { let main; let h1; let t1; @@ -5718,7 +5733,7 @@ var app = (function () { let each_blocks_1 = []; for (let i = 0; i < each_value_1.length; i += 1) { - each_blocks_1[i] = create_each_block_1$5(get_each_context_1$5(ctx, each_value_1, i)); + each_blocks_1[i] = create_each_block_1$6(get_each_context_1$6(ctx, each_value_1, i)); } let each_value = /*remainingKeys*/ ctx[2]; @@ -5726,7 +5741,7 @@ var app = (function () { let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$b(get_each_context$b(ctx, each_value, i)); + each_blocks[i] = create_each_block$d(get_each_context$d(ctx, each_value, i)); } const block = { @@ -5767,26 +5782,26 @@ var app = (function () { each_blocks[i].c(); } - add_location(h1, file$h, 56, 4, 1730); + add_location(h1, file$j, 56, 4, 1730); attr_dev(label, "for", "jsonInput"); - add_location(label, file$h, 60, 8, 1834); + add_location(label, file$j, 60, 8, 1834); attr_dev(textarea, "id", "jsonInput"); attr_dev(textarea, "class", "svelte-1t47hvo"); - add_location(textarea, file$h, 61, 8, 1886); - add_location(button, file$h, 62, 8, 1985); + add_location(textarea, file$j, 61, 8, 1886); + add_location(button, file$j, 62, 8, 1985); attr_dev(div0, "class", "input-column svelte-1t47hvo"); - add_location(div0, file$h, 59, 6, 1798); - add_location(h20, file$h, 67, 10, 2117); - add_location(ul0, file$h, 68, 10, 2152); - add_location(div1, file$h, 66, 8, 2100); - add_location(h21, file$h, 76, 10, 2312); - add_location(ul1, file$h, 77, 10, 2348); - add_location(div2, file$h, 75, 8, 2295); + add_location(div0, file$j, 59, 6, 1798); + add_location(h20, file$j, 67, 10, 2117); + add_location(ul0, file$j, 68, 10, 2152); + add_location(div1, file$j, 66, 8, 2100); + add_location(h21, file$j, 76, 10, 2312); + add_location(ul1, file$j, 77, 10, 2348); + add_location(div2, file$j, 75, 8, 2295); attr_dev(div3, "class", "output-column svelte-1t47hvo"); - add_location(div3, file$h, 65, 6, 2063); + add_location(div3, file$j, 65, 6, 2063); attr_dev(div4, "class", "container svelte-1t47hvo"); - add_location(div4, file$h, 58, 4, 1767); - add_location(main, file$h, 55, 2, 1718); + add_location(div4, file$j, 58, 4, 1767); + add_location(main, file$j, 55, 2, 1718); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -5831,7 +5846,7 @@ var app = (function () { if (!mounted) { dispose = [ listen_dev(textarea, "input", /*textarea_input_handler*/ ctx[4]), - listen_dev(textarea, "input", autoExpandTextarea$1, false, false, false, false), + listen_dev(textarea, "input", autoExpandTextarea$2, false, false, false, false), listen_dev(button, "click", /*extractKeys*/ ctx[3], false, false, false, false) ]; @@ -5849,12 +5864,12 @@ var app = (function () { let i; for (i = 0; i < each_value_1.length; i += 1) { - const child_ctx = get_each_context_1$5(ctx, each_value_1, i); + const child_ctx = get_each_context_1$6(ctx, each_value_1, i); if (each_blocks_1[i]) { each_blocks_1[i].p(child_ctx, dirty); } else { - each_blocks_1[i] = create_each_block_1$5(child_ctx); + each_blocks_1[i] = create_each_block_1$6(child_ctx); each_blocks_1[i].c(); each_blocks_1[i].m(ul0, null); } @@ -5873,12 +5888,12 @@ var app = (function () { let i; for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$b(ctx, each_value, i); + const child_ctx = get_each_context$d(ctx, each_value, i); if (each_blocks[i]) { each_blocks[i].p(child_ctx, dirty); } else { - each_blocks[i] = create_each_block$b(child_ctx); + each_blocks[i] = create_each_block$d(child_ctx); each_blocks[i].c(); each_blocks[i].m(ul1, null); } @@ -5904,7 +5919,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$h.name, + id: create_fragment$j.name, type: "component", source: "", ctx @@ -5913,7 +5928,7 @@ var app = (function () { return block; } - function getKeysFromJSON(json, filter) { + function getKeysFromJSON$1(json, filter) { const filteredKeys = []; const remainingKeys = []; @@ -5939,13 +5954,13 @@ var app = (function () { return { filteredKeys, remainingKeys }; } - function autoExpandTextarea$1(event) { + function autoExpandTextarea$2(event) { const textarea = event.target; textarea.style.height = 'auto'; textarea.style.height = `${textarea.scrollHeight}px`; } - function instance$h($$self, $$props, $$invalidate) { + function instance$j($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('Testbrainstorminstantpopulate', slots, []); let jsonInput = ''; @@ -5957,7 +5972,7 @@ var app = (function () { try { json = JSON.parse(jsonInput); - const { filteredKeys: filtered, remainingKeys: remaining } = getKeysFromJSON(json, key => { + const { filteredKeys: filtered, remainingKeys: remaining } = getKeysFromJSON$1(json, key => { return key.includes('name') || key.includes('collisiontext'); //|| modal fields; }); //return key.endsWith('.x') || key.endsWith('.y') || key.includes('Type') || key.includes('complete'); @@ -5973,7 +5988,7 @@ var app = (function () { const writable_props = []; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$8.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$9.warn(` was created with unknown prop '${key}'`); }); function textarea_input_handler() { @@ -5986,9 +6001,9 @@ var app = (function () { json, filteredKeys, remainingKeys, - getKeysFromJSON, + getKeysFromJSON: getKeysFromJSON$1, extractKeys, - autoExpandTextarea: autoExpandTextarea$1 + autoExpandTextarea: autoExpandTextarea$2 }); $$self.$inject_state = $$props => { @@ -6008,24 +6023,24 @@ var app = (function () { class Testbrainstorminstantpopulate extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$h, create_fragment$h, safe_not_equal, {}); + init(this, options, instance$j, create_fragment$j, safe_not_equal, {}); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Testbrainstorminstantpopulate", options, - id: create_fragment$h.name + id: create_fragment$j.name }); } } /* src\testjsonmatchingfieldmerge.svelte generated by Svelte v3.59.2 */ - const { Object: Object_1$3, console: console_1$7 } = globals; - const file$g = "src\\testjsonmatchingfieldmerge.svelte"; + const { Object: Object_1$4, console: console_1$8 } = globals; + const file$i = "src\\testjsonmatchingfieldmerge.svelte"; // (195:4) {#if Object.keys(mergedJson).length > 0} - function create_if_block$8(ctx) { + function create_if_block$a(ctx) { let div; let h3; let t1; @@ -6041,9 +6056,9 @@ var app = (function () { t1 = space(); pre = element("pre"); t2 = text(t2_value); - add_location(h3, file$g, 196, 8, 4625); - add_location(pre, file$g, 197, 8, 4656); - add_location(div, file$g, 195, 6, 4610); + add_location(h3, file$i, 196, 8, 4625); + add_location(pre, file$i, 197, 8, 4656); + add_location(div, file$i, 195, 6, 4610); }, m: function mount(target, anchor) { insert_dev(target, div, anchor); @@ -6062,7 +6077,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_if_block$8.name, + id: create_if_block$a.name, type: "if", source: "(195:4) {#if Object.keys(mergedJson).length > 0}", ctx @@ -6071,7 +6086,7 @@ var app = (function () { return block; } - function create_fragment$g(ctx) { + function create_fragment$i(ctx) { let main; let h2; let t1; @@ -6090,7 +6105,7 @@ var app = (function () { let show_if = Object.keys(/*mergedJson*/ ctx[2]).length > 0; let mounted; let dispose; - let if_block = show_if && create_if_block$8(ctx); + let if_block = show_if && create_if_block$a(ctx); const block = { c: function create() { @@ -6114,17 +6129,17 @@ var app = (function () { button.textContent = "Merge JSON"; t9 = space(); if (if_block) if_block.c(); - add_location(h2, file$g, 180, 4, 4178); - add_location(h30, file$g, 183, 6, 4221); + add_location(h2, file$i, 180, 4, 4178); + add_location(h30, file$i, 183, 6, 4221); attr_dev(textarea0, "class", "svelte-1jgnkl9"); - add_location(textarea0, file$g, 184, 6, 4252); - add_location(div0, file$g, 182, 4, 4208); - add_location(h31, file$g, 188, 6, 4369); + add_location(textarea0, file$i, 184, 6, 4252); + add_location(div0, file$i, 182, 4, 4208); + add_location(h31, file$i, 188, 6, 4369); attr_dev(textarea1, "class", "svelte-1jgnkl9"); - add_location(textarea1, file$g, 189, 6, 4399); - add_location(div1, file$g, 187, 4, 4356); - add_location(button, file$g, 192, 4, 4502); - add_location(main, file$g, 179, 2, 4166); + add_location(textarea1, file$i, 189, 6, 4399); + add_location(div1, file$i, 187, 4, 4356); + add_location(button, file$i, 192, 4, 4502); + add_location(main, file$i, 179, 2, 4166); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -6152,9 +6167,9 @@ var app = (function () { if (!mounted) { dispose = [ listen_dev(textarea0, "input", /*textarea0_input_handler*/ ctx[4]), - listen_dev(textarea0, "input", autoExpandTextarea, false, false, false, false), + listen_dev(textarea0, "input", autoExpandTextarea$1, false, false, false, false), listen_dev(textarea1, "input", /*textarea1_input_handler*/ ctx[5]), - listen_dev(textarea1, "input", autoExpandTextarea, false, false, false, false), + listen_dev(textarea1, "input", autoExpandTextarea$1, false, false, false, false), listen_dev(button, "click", /*handleMerge*/ ctx[3], false, false, false, false) ]; @@ -6176,7 +6191,7 @@ var app = (function () { if (if_block) { if_block.p(ctx, dirty); } else { - if_block = create_if_block$8(ctx); + if_block = create_if_block$a(ctx); if_block.c(); if_block.m(main, null); } @@ -6197,7 +6212,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$g.name, + id: create_fragment$i.name, type: "component", source: "", ctx @@ -6225,199 +6240,1387 @@ var app = (function () { target.name = snippet.story.targets[index].name; target.collisiontext = snippet.story.targets[index].collisiontext; - // Update subTargets recursively - function updateSubTargets(originalSubTargets, snippetSubTargets) { - originalSubTargets.forEach((subTarget, subIndex) => { - if (snippetSubTargets[subIndex]) { - subTarget.name = snippetSubTargets[subIndex].name; - subTarget.collisiontext = snippetSubTargets[subIndex].collisiontext; + // Update subTargets recursively + function updateSubTargets(originalSubTargets, snippetSubTargets) { + originalSubTargets.forEach((subTarget, subIndex) => { + if (snippetSubTargets[subIndex]) { + subTarget.name = snippetSubTargets[subIndex].name; + subTarget.collisiontext = snippetSubTargets[subIndex].collisiontext; + + if (Array.isArray(snippetSubTargets[subIndex].subTargets)) { + updateSubTargets(subTarget.subTargets, snippetSubTargets[subIndex].subTargets); + } + } + }); + } + + if (Array.isArray(target.subTargets) && Array.isArray(snippet.story.targets[index].subTargets)) { + updateSubTargets(target.subTargets, snippet.story.targets[index].subTargets); + } + } + }); + } + + return merged; + } + + function autoExpandTextarea$1(event) { + const textarea = event.target; + textarea.style.height = 'auto'; + textarea.style.height = `${textarea.scrollHeight}px`; + } + + function instance$i($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots('Testjsonmatchingfieldmerge', slots, []); + + let originalJsonInput = `{ +"story": [ +{ +"part": 0, +"objectives": [ +{ +"id": "Objective1_1", +"name": "Objective 1.1", +"complete": false +}, +{ +"id": "Objective1_2", +"name": "Objective 1.2", +"complete": false +} +], +"targets": [ +{ +"name": "Target0_1", +"x": 55, +"y": 4, +"collisionType": "alert", +"collisiontext": "Placeholder text for Target 0.1", +"subTargets": [ +{ +"name": "Target1_1", +"x": 63, +"y": 4, +"collisionType": "alert", +"collisiontext": "Placeholder text for Target 1.1", +"subTargets": [ +{ +"name": "Target2_1", +"x": 88, +"y": 87, +"collisionType": "alert", +"collisiontext": "Placeholder text for Target 2.1" +} +] +}, +{ +"name": "Target1_2", +"x": 89, +"y": 5, +"collisionType": "alert", +"collisiontext": "Placeholder text for Target 1.2", +"subTargets": [ +{ +"name": "Target2_1", +"x": 69, +"y": 92, +"collisionType": "alert", +"collisiontext": "Placeholder text for Target 2.1" +} +] +} +] +}, +{ +"name": "Target0_2", +"x": 12, +"y": 59, +"collisionType": "alert", +"collisiontext": "Placeholder text for Target 0.2" +} +] +} +] +}`; + + let snippetJsonInput = `{ +"story": { +"objectives": [ +{"name": "Master the ancient magic"}, +{"name": "Unite the warring clans"} +], +"targets": [ +{ +"name": "The ancient temple", +"collisiontext": "Enter the temple", +"subTargets": [ +{ +"name": "The sacred artifact", +"collisiontext": "Take the artifact", +"subTargets": [ +{ +"name": "The ancient scroll", +"collisiontext": "Unroll the scroll" +} +] +}, +{ +"name": "The hidden chamber", +"collisiontext": "Discover the chamber", +"subTargets": [ +{ +"name": "The ancient relic", +"collisiontext": "Claim the relic" +} +] +} +] +}, +{ +"name": "The dark forest", +"collisiontext": "Venture into the forest" +} +] +} +}`; + + let originalJson = {}; + let snippetJson = {}; + let mergedJson = {}; + + function handleMerge() { + try { + originalJson = JSON.parse(originalJsonInput); + snippetJson = JSON.parse(snippetJsonInput); + $$invalidate(2, mergedJson = mergeJSON(originalJson, snippetJson)); + } catch(error) { + console.error('Invalid JSON:', error); + $$invalidate(2, mergedJson = {}); + } + } + + const writable_props = []; + + Object_1$4.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$8.warn(` was created with unknown prop '${key}'`); + }); + + function textarea0_input_handler() { + originalJsonInput = this.value; + $$invalidate(0, originalJsonInput); + } + + function textarea1_input_handler() { + snippetJsonInput = this.value; + $$invalidate(1, snippetJsonInput); + } + + $$self.$capture_state = () => ({ + originalJsonInput, + snippetJsonInput, + originalJson, + snippetJson, + mergedJson, + mergeJSON, + handleMerge, + autoExpandTextarea: autoExpandTextarea$1 + }); + + $$self.$inject_state = $$props => { + if ('originalJsonInput' in $$props) $$invalidate(0, originalJsonInput = $$props.originalJsonInput); + if ('snippetJsonInput' in $$props) $$invalidate(1, snippetJsonInput = $$props.snippetJsonInput); + if ('originalJson' in $$props) originalJson = $$props.originalJson; + if ('snippetJson' in $$props) snippetJson = $$props.snippetJson; + if ('mergedJson' in $$props) $$invalidate(2, mergedJson = $$props.mergedJson); + }; + + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + + return [ + originalJsonInput, + snippetJsonInput, + mergedJson, + handleMerge, + textarea0_input_handler, + textarea1_input_handler + ]; + } + + class Testjsonmatchingfieldmerge extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$i, create_fragment$i, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "Testjsonmatchingfieldmerge", + options, + id: create_fragment$i.name + }); + } + } + + /* src\SimpleIFrame.svelte generated by Svelte v3.59.2 */ + + const file$h = "src\\SimpleIFrame.svelte"; + + function get_each_context$c(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[4] = list[i]; + return child_ctx; + } + + // (17:6) {#each webpages as webpage} + function create_each_block$c(ctx) { + let option; + let t_value = /*webpage*/ ctx[4].name + ""; + let t; + let option_value_value; + + const block = { + c: function create() { + option = element("option"); + t = text(t_value); + option.__value = option_value_value = /*webpage*/ ctx[4].url; + option.value = option.__value; + add_location(option, file$h, 17, 8, 538); + }, + m: function mount(target, anchor) { + insert_dev(target, option, anchor); + append_dev(option, t); + }, + p: function update(ctx, dirty) { + if (dirty & /*webpages*/ 1 && t_value !== (t_value = /*webpage*/ ctx[4].name + "")) set_data_dev(t, t_value); + + if (dirty & /*webpages*/ 1 && option_value_value !== (option_value_value = /*webpage*/ ctx[4].url)) { + prop_dev(option, "__value", option_value_value); + option.value = option.__value; + } + }, + d: function destroy(detaching) { + if (detaching) detach_dev(option); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block$c.name, + type: "each", + source: "(17:6) {#each webpages as webpage}", + ctx + }); + + return block; + } + + // (22:4) {#if selectedUrl} + function create_if_block$9(ctx) { + let iframe; + let iframe_src_value; + + const block = { + c: function create() { + iframe = element("iframe"); + if (!src_url_equal(iframe.src, iframe_src_value = /*selectedUrl*/ ctx[1])) attr_dev(iframe, "src", iframe_src_value); + attr_dev(iframe, "title", "Webpage"); + attr_dev(iframe, "width", "100%"); + attr_dev(iframe, "height", "800px"); + attr_dev(iframe, "frameborder", "0"); + add_location(iframe, file$h, 22, 6, 662); + }, + m: function mount(target, anchor) { + insert_dev(target, iframe, anchor); + }, + p: function update(ctx, dirty) { + if (dirty & /*selectedUrl, webpages*/ 3 && !src_url_equal(iframe.src, iframe_src_value = /*selectedUrl*/ ctx[1])) { + attr_dev(iframe, "src", iframe_src_value); + } + }, + d: function destroy(detaching) { + if (detaching) detach_dev(iframe); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block$9.name, + type: "if", + source: "(22:4) {#if selectedUrl}", + ctx + }); + + return block; + } + + function create_fragment$h(ctx) { + let div; + let select; + let option; + let t1; + let br; + let t2; + let mounted; + let dispose; + let each_value = /*webpages*/ ctx[0]; + validate_each_argument(each_value); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$c(get_each_context$c(ctx, each_value, i)); + } + + let if_block = /*selectedUrl*/ ctx[1] && create_if_block$9(ctx); + + const block = { + c: function create() { + div = element("div"); + select = element("select"); + option = element("option"); + option.textContent = "Select a webpage"; + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + t1 = space(); + br = element("br"); + t2 = space(); + if (if_block) if_block.c(); + option.__value = ""; + option.value = option.__value; + add_location(option, file$h, 15, 6, 451); + if (/*selectedUrl*/ ctx[1] === void 0) add_render_callback(() => /*select_change_handler*/ ctx[3].call(select)); + add_location(select, file$h, 14, 4, 385); + add_location(br, file$h, 20, 4, 625); + add_location(div, file$h, 13, 2, 374); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, div, anchor); + append_dev(div, select); + append_dev(select, option); + + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(select, null); + } + } + + select_option(select, /*selectedUrl*/ ctx[1], true); + append_dev(div, t1); + append_dev(div, br); + append_dev(div, t2); + if (if_block) if_block.m(div, null); + + if (!mounted) { + dispose = [ + listen_dev(select, "change", /*select_change_handler*/ ctx[3]), + listen_dev(select, "change", /*handleChange*/ ctx[2], false, false, false, false) + ]; + + mounted = true; + } + }, + p: function update(ctx, [dirty]) { + if (dirty & /*webpages*/ 1) { + each_value = /*webpages*/ ctx[0]; + validate_each_argument(each_value); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$c(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + } else { + each_blocks[i] = create_each_block$c(child_ctx); + each_blocks[i].c(); + each_blocks[i].m(select, null); + } + } + + for (; i < each_blocks.length; i += 1) { + each_blocks[i].d(1); + } + + each_blocks.length = each_value.length; + } + + if (dirty & /*selectedUrl, webpages*/ 3) { + select_option(select, /*selectedUrl*/ ctx[1]); + } + + if (/*selectedUrl*/ ctx[1]) { + if (if_block) { + if_block.p(ctx, dirty); + } else { + if_block = create_if_block$9(ctx); + if_block.c(); + if_block.m(div, null); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + }, + i: noop, + o: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(div); + destroy_each(each_blocks, detaching); + if (if_block) if_block.d(); + mounted = false; + run_all(dispose); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$h.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function instance$h($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots('SimpleIFrame', slots, []); + let selectedUrl = ''; + + let { webpages = [ + { + name: 'Example 1', + url: 'https://www.example1.com' + }, + { + name: 'Example 2', + url: 'https://www.example2.com' + }, + { + name: 'Example 3', + url: 'https://www.example3.com' + } + ] } = $$props; + + const handleChange = event => { + $$invalidate(1, selectedUrl = event.target.value); + }; + + const writable_props = ['webpages']; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); + }); + + function select_change_handler() { + selectedUrl = select_value(this); + $$invalidate(1, selectedUrl); + $$invalidate(0, webpages); + } + + $$self.$$set = $$props => { + if ('webpages' in $$props) $$invalidate(0, webpages = $$props.webpages); + }; + + $$self.$capture_state = () => ({ selectedUrl, webpages, handleChange }); + + $$self.$inject_state = $$props => { + if ('selectedUrl' in $$props) $$invalidate(1, selectedUrl = $$props.selectedUrl); + if ('webpages' in $$props) $$invalidate(0, webpages = $$props.webpages); + }; + + if ($$props && "$$inject" in $$props) { + $$self.$inject_state($$props.$$inject); + } + + return [webpages, selectedUrl, handleChange, select_change_handler]; + } + + class SimpleIFrame extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$h, create_fragment$h, safe_not_equal, { webpages: 0 }); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "SimpleIFrame", + options, + id: create_fragment$h.name + }); + } + + get webpages() { + throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); + } + + set webpages(value) { + throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); + } + } + + /* src\CustomGameConfigHelper.svelte generated by Svelte v3.59.2 */ + + const { Object: Object_1$3, console: console_1$7 } = globals; + const file$g = "src\\CustomGameConfigHelper.svelte"; + + function get_each_context$b(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[19] = list[i]; + return child_ctx; + } + + function get_each_context_1$5(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[19] = list[i]; + return child_ctx; + } + + // (308:16) {#each filteredKeys as key} + function create_each_block_1$5(ctx) { + let li; + let t_value = /*key*/ ctx[19] + ""; + let t; + + const block = { + c: function create() { + li = element("li"); + t = text(t_value); + add_location(li, file$g, 308, 16, 12158); + }, + m: function mount(target, anchor) { + insert_dev(target, li, anchor); + append_dev(li, t); + }, + p: function update(ctx, dirty) { + if (dirty & /*filteredKeys*/ 1 && t_value !== (t_value = /*key*/ ctx[19] + "")) set_data_dev(t, t_value); + }, + d: function destroy(detaching) { + if (detaching) detach_dev(li); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block_1$5.name, + type: "each", + source: "(308:16) {#each filteredKeys as key}", + ctx + }); + + return block; + } + + // (317:16) {#each remainingKeys as key} + function create_each_block$b(ctx) { + let li; + let t_value = /*key*/ ctx[19] + ""; + let t; + + const block = { + c: function create() { + li = element("li"); + t = text(t_value); + add_location(li, file$g, 317, 16, 12381); + }, + m: function mount(target, anchor) { + insert_dev(target, li, anchor); + append_dev(li, t); + }, + p: function update(ctx, dirty) { + if (dirty & /*remainingKeys*/ 2 && t_value !== (t_value = /*key*/ ctx[19] + "")) set_data_dev(t, t_value); + }, + d: function destroy(detaching) { + if (detaching) detach_dev(li); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_each_block$b.name, + type: "each", + source: "(317:16) {#each remainingKeys as key}", + ctx + }); + + return block; + } + + // (357:8) {#if Object.keys(mergedJson).length > 0} + function create_if_block$8(ctx) { + let div; + let h3; + let t1; + let pre; + let t2_value = JSON.stringify(/*mergedJson*/ ctx[3], null, 2) + ""; + let t2; + + const block = { + c: function create() { + div = element("div"); + h3 = element("h3"); + h3.textContent = "Merged JSON:"; + t1 = space(); + pre = element("pre"); + t2 = text(t2_value); + add_location(h3, file$g, 358, 12, 13687); + add_location(pre, file$g, 359, 12, 13722); + add_location(div, file$g, 357, 8, 13668); + }, + m: function mount(target, anchor) { + insert_dev(target, div, anchor); + append_dev(div, h3); + append_dev(div, t1); + append_dev(div, pre); + append_dev(pre, t2); + }, + p: function update(ctx, dirty) { + if (dirty & /*mergedJson*/ 8 && t2_value !== (t2_value = JSON.stringify(/*mergedJson*/ ctx[3], null, 2) + "")) set_data_dev(t2, t2_value); + }, + d: function destroy(detaching) { + if (detaching) detach_dev(div); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_if_block$8.name, + type: "if", + source: "(357:8) {#if Object.keys(mergedJson).length > 0}", + ctx + }); + + return block; + } + + function create_fragment$g(ctx) { + let div5; + let h1; + let t1; + let h20; + let t3; + let div4; + let div0; + let pre; + let t7; + let div3; + let div1; + let h21; + let t9; + let ul0; + let t10; + let div2; + let h22; + let t12; + let ul1; + let t13; + let div7; + let h30; + let t15; + let div6; + let h31; + let t17; + let textarea0; + let textarea0_value_value; + let t18; + let br0; + let t19; + let simpleiframe; + let t20; + let hr0; + let t21; + let textarea1; + let t22; + let button0; + let t24; + let show_if = Object.keys(/*mergedJson*/ ctx[3]).length > 0; + let t25; + let br1; + let t26; + let button1; + let t28; + let hr1; + let t29; + let br2; + let t30; + let br3; + let t31; + let br4; + let current; + let mounted; + let dispose; + let each_value_1 = /*filteredKeys*/ ctx[0]; + validate_each_argument(each_value_1); + let each_blocks_1 = []; + + for (let i = 0; i < each_value_1.length; i += 1) { + each_blocks_1[i] = create_each_block_1$5(get_each_context_1$5(ctx, each_value_1, i)); + } + + let each_value = /*remainingKeys*/ ctx[1]; + validate_each_argument(each_value); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$b(get_each_context$b(ctx, each_value, i)); + } + + simpleiframe = new SimpleIFrame({ + props: { webpages: /*LLMforassit*/ ctx[7] }, + $$inline: true + }); + + let if_block = show_if && create_if_block$8(ctx); + + const block = { + c: function create() { + div5 = element("div"); + h1 = element("h1"); + h1.textContent = "Streamlined Config Creator Randomiser has been forced to max 2 story parts and 2 targets each to test load"; + t1 = space(); + h20 = element("h2"); + h20.textContent = "User should be able to control the length in respect to llm used and should be able prompt the llm in chunks"; + t3 = space(); + div4 = element("div"); + div0 = element("div"); + pre = element("pre"); + + pre.textContent = ` ${JSON.stringify(/*randomContentStructureSubtargets*/ ctx[4], null, 2)} + `; + + t7 = space(); + div3 = element("div"); + div1 = element("div"); + h21 = element("h2"); + h21.textContent = "Filtered Keys:"; + t9 = space(); + ul0 = element("ul"); + + for (let i = 0; i < each_blocks_1.length; i += 1) { + each_blocks_1[i].c(); + } + + t10 = space(); + div2 = element("div"); + h22 = element("h2"); + h22.textContent = "Remaining Keys:"; + t12 = space(); + ul1 = element("ul"); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + t13 = space(); + div7 = element("div"); + h30 = element("h3"); + h30.textContent = "Original JSON Above"; + t15 = space(); + div6 = element("div"); + h31 = element("h3"); + h31.textContent = "Snippet JSON (Get from LLM APIs or interfaces), Use the following prompt from the below :"; + t17 = space(); + textarea0 = element("textarea"); + t18 = text("\r\n Placeholder for copy system prompt | Placeholder for copy user prompt\r\n\r\n "); + br0 = element("br"); + t19 = text(" Iframe for a Qwen 1.5 (Due to system prompt field add a selector here to do as many as possible in case they struggle)\r\n\r\n "); + create_component(simpleiframe.$$.fragment); + t20 = space(); + hr0 = element("hr"); + t21 = text("\r\n\r\n LLM Response to be pasted below\r\n "); + textarea1 = element("textarea"); + t22 = space(); + button0 = element("button"); + button0.textContent = "Merge JSON"; + t24 = space(); + if (if_block) if_block.c(); + t25 = text("\r\n\r\n placeholder for image input for background - optional\r\n "); + br1 = element("br"); + t26 = space(); + button1 = element("button"); + button1.textContent = "Test load for the auto gen config"; + t28 = space(); + hr1 = element("hr"); + t29 = text("\r\n\r\n Major Issues now are how are how to incorporate non alert types OR just assume this is the manual part i.e. filling in the blanks the autogen doesnt manage AND "); + br2 = element("br"); + t30 = text("\r\n Long Structures? "); + br3 = element("br"); + t31 = text("\r\n How to use the sequence planner in the same workflow? AND "); + br4 = element("br"); + add_location(h1, file$g, 292, 4, 11392); + add_location(h20, file$g, 293, 4, 11513); + add_location(pre, file$g, 298, 12, 11862); + attr_dev(div0, "class", "input-column svelte-1ynthow"); + add_location(div0, file$g, 296, 8, 11680); + add_location(h21, file$g, 305, 12, 12054); + add_location(ul0, file$g, 306, 12, 12091); + add_location(div1, file$g, 304, 12, 12035); + add_location(h22, file$g, 314, 12, 12275); + add_location(ul1, file$g, 315, 12, 12313); + add_location(div2, file$g, 313, 12, 12256); + attr_dev(div3, "class", "output-column svelte-1ynthow"); + add_location(div3, file$g, 303, 8, 11994); + attr_dev(div4, "class", "ContainerColumns svelte-1ynthow"); + add_location(div4, file$g, 294, 4, 11636); + add_location(div5, file$g, 290, 0, 11379); + add_location(h30, file$g, 327, 8, 12530); + add_location(h31, file$g, 331, 8, 12690); + textarea0.value = textarea0_value_value = "System\r\n\r\nUse the fields given to you to create a JSON object to fulfill the request of creating a story in JSON form - Its a story that will be interactive. The format is " + /*llmresponseformat*/ ctx[5] + "\r\n\r\n----\r\nUser\r\nUse the following fields to write a pirate story - \r\n\r\n" + /*filteredKeys*/ ctx[0] + "\r\n "; + attr_dev(textarea0, "class", "svelte-1ynthow"); + add_location(textarea0, file$g, 332, 8, 12798); + add_location(br0, file$g, 344, 8, 13196); + add_location(hr0, file$g, 348, 8, 13382); + attr_dev(textarea1, "class", "svelte-1ynthow"); + add_location(textarea1, file$g, 351, 8, 13439); + add_location(div6, file$g, 330, 8, 12675); + add_location(button0, file$g, 354, 8, 13552); + add_location(div7, file$g, 325, 4, 12511); + add_location(br1, file$g, 365, 4, 13880); + add_location(button1, file$g, 367, 4, 13892); + add_location(hr1, file$g, 369, 4, 13991); + add_location(br2, file$g, 371, 164, 14163); + add_location(br3, file$g, 372, 21, 14190); + add_location(br4, file$g, 373, 62, 14258); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, div5, anchor); + append_dev(div5, h1); + append_dev(div5, t1); + append_dev(div5, h20); + append_dev(div5, t3); + append_dev(div5, div4); + append_dev(div4, div0); + append_dev(div0, pre); + append_dev(div4, t7); + append_dev(div4, div3); + append_dev(div3, div1); + append_dev(div1, h21); + append_dev(div1, t9); + append_dev(div1, ul0); + + for (let i = 0; i < each_blocks_1.length; i += 1) { + if (each_blocks_1[i]) { + each_blocks_1[i].m(ul0, null); + } + } + + append_dev(div3, t10); + append_dev(div3, div2); + append_dev(div2, h22); + append_dev(div2, t12); + append_dev(div2, ul1); + + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(ul1, null); + } + } + + insert_dev(target, t13, anchor); + insert_dev(target, div7, anchor); + append_dev(div7, h30); + append_dev(div7, t15); + append_dev(div7, div6); + append_dev(div6, h31); + append_dev(div6, t17); + append_dev(div6, textarea0); + append_dev(div6, t18); + append_dev(div6, br0); + append_dev(div6, t19); + mount_component(simpleiframe, div6, null); + append_dev(div6, t20); + append_dev(div6, hr0); + append_dev(div6, t21); + append_dev(div6, textarea1); + set_input_value(textarea1, /*snippetJsonInput*/ ctx[2]); + append_dev(div7, t22); + append_dev(div7, button0); + append_dev(div7, t24); + if (if_block) if_block.m(div7, null); + insert_dev(target, t25, anchor); + insert_dev(target, br1, anchor); + insert_dev(target, t26, anchor); + insert_dev(target, button1, anchor); + insert_dev(target, t28, anchor); + insert_dev(target, hr1, anchor); + insert_dev(target, t29, anchor); + insert_dev(target, br2, anchor); + insert_dev(target, t30, anchor); + insert_dev(target, br3, anchor); + insert_dev(target, t31, anchor); + insert_dev(target, br4, anchor); + current = true; + + if (!mounted) { + dispose = [ + listen_dev(textarea1, "input", /*textarea1_input_handler*/ ctx[9]), + listen_dev(textarea1, "input", autoExpandTextarea, false, false, false, false), + listen_dev(button0, "click", /*handleMerge*/ ctx[6], false, false, false, false), + listen_dev(button1, "click", /*loadexperimentalthemedispatch*/ ctx[8], false, false, false, false) + ]; + + mounted = true; + } + }, + p: function update(ctx, [dirty]) { + if (dirty & /*filteredKeys*/ 1) { + each_value_1 = /*filteredKeys*/ ctx[0]; + validate_each_argument(each_value_1); + let i; + + for (i = 0; i < each_value_1.length; i += 1) { + const child_ctx = get_each_context_1$5(ctx, each_value_1, i); + + if (each_blocks_1[i]) { + each_blocks_1[i].p(child_ctx, dirty); + } else { + each_blocks_1[i] = create_each_block_1$5(child_ctx); + each_blocks_1[i].c(); + each_blocks_1[i].m(ul0, null); + } + } + + for (; i < each_blocks_1.length; i += 1) { + each_blocks_1[i].d(1); + } + + each_blocks_1.length = each_value_1.length; + } + + if (dirty & /*remainingKeys*/ 2) { + each_value = /*remainingKeys*/ ctx[1]; + validate_each_argument(each_value); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$b(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + } else { + each_blocks[i] = create_each_block$b(child_ctx); + each_blocks[i].c(); + each_blocks[i].m(ul1, null); + } + } + + for (; i < each_blocks.length; i += 1) { + each_blocks[i].d(1); + } + + each_blocks.length = each_value.length; + } + + if (!current || dirty & /*filteredKeys*/ 1 && textarea0_value_value !== (textarea0_value_value = "System\r\n\r\nUse the fields given to you to create a JSON object to fulfill the request of creating a story in JSON form - Its a story that will be interactive. The format is " + /*llmresponseformat*/ ctx[5] + "\r\n\r\n----\r\nUser\r\nUse the following fields to write a pirate story - \r\n\r\n" + /*filteredKeys*/ ctx[0] + "\r\n ")) { + prop_dev(textarea0, "value", textarea0_value_value); + } + + if (dirty & /*snippetJsonInput*/ 4) { + set_input_value(textarea1, /*snippetJsonInput*/ ctx[2]); + } + + if (dirty & /*mergedJson*/ 8) show_if = Object.keys(/*mergedJson*/ ctx[3]).length > 0; + + if (show_if) { + if (if_block) { + if_block.p(ctx, dirty); + } else { + if_block = create_if_block$8(ctx); + if_block.c(); + if_block.m(div7, null); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + }, + i: function intro(local) { + if (current) return; + transition_in(simpleiframe.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(simpleiframe.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + if (detaching) detach_dev(div5); + destroy_each(each_blocks_1, detaching); + destroy_each(each_blocks, detaching); + if (detaching) detach_dev(t13); + if (detaching) detach_dev(div7); + destroy_component(simpleiframe); + if (if_block) if_block.d(); + if (detaching) detach_dev(t25); + if (detaching) detach_dev(br1); + if (detaching) detach_dev(t26); + if (detaching) detach_dev(button1); + if (detaching) detach_dev(t28); + if (detaching) detach_dev(hr1); + if (detaching) detach_dev(t29); + if (detaching) detach_dev(br2); + if (detaching) detach_dev(t30); + if (detaching) detach_dev(br3); + if (detaching) detach_dev(t31); + if (detaching) detach_dev(br4); + mounted = false; + run_all(dispose); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_fragment$g.name, + type: "component", + source: "", + ctx + }); + + return block; + } + + function generateRandomContentStructureSubtargets() { + // Random number generator for various properties + function getRandomNumber(max, min = 1) { + return Math.floor(Math.random() * (max - min + 1)) + min; + } + + // Recursive function to generate targets and optionally subtargets + function generateTargets(level = 0) { + const numberOfTargets = getRandomNumber(2); // Generate up to 4 targets -------------------- simplified for test + + const targets = Array.from({ length: numberOfTargets }, (_, idx) => { + const target = { + name: `Target${level}_${idx + 1}`, + x: getRandomNumber(100), + y: getRandomNumber(100), + collisionType: 'alert', + collisiontext: `Placeholder text for Target ${level}.${idx + 1}` + }; + + // Randomly decide if this target should have subtargets, less likely as level increases + if (Math.random() < 0.5 - level * 0.1) { + target.subTargets = generateTargets(level + 1); + } + + return target; + }); + + return targets; + } + + // Generate the random story structure with nested targets + const randomStoryPartsLength = getRandomNumber(2); // Generate random number of story parts (1-5) -------------------------------------simplified for tests + + const randomStoryStructure = Array.from({ length: randomStoryPartsLength }, (_, index) => ({ + part: index, + objectives: Array.from({ length: getRandomNumber(3) }, (_, idx) => ({ + id: `Objective${index + 1}_${idx + 1}`, + name: `Objective ${index + 1}.${idx + 1}`, + complete: false + })), + targets: generateTargets() + })); + + // Compile the full random content structure + const randomContentStructure = { story: randomStoryStructure }; + + return randomContentStructure; + } + + function getKeysFromJSON(json, filter) { + const filteredKeys = []; + const remainingKeys = []; + + function traverseObject(obj, parentKey = '') { + for (const key in obj) { + if (obj.hasOwnProperty(key)) { + const fullKey = parentKey ? `${parentKey}.${key}` : key; + + if (typeof filter === 'function' && filter(fullKey)) { + filteredKeys.push(fullKey); + } else { + remainingKeys.push(fullKey); + } + + if (typeof obj[key] === 'object' && obj[key] !== null) { + traverseObject(obj[key], fullKey); + } + } + } + } + + traverseObject(json); + return { filteredKeys, remainingKeys }; + } + + function autoExpandTextarea(event) { + const textarea = event.target; + textarea.style.height = 'auto'; + textarea.style.height = `${textarea.scrollHeight}px`; + } + + function instance$g($$self, $$props, $$invalidate) { + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots('CustomGameConfigHelper', slots, []); + let randomContentStructureSubtargets = generateRandomContentStructureSubtargets(); + console.log(randomContentStructureSubtargets); + + function copyToClipboardStructuresubtargets() { + navigator.clipboard.writeText(JSON.stringify(randomContentStructureSubtargets, null, 2)).then(() => { + alert('Random content Structure copied to clipboard!'); + }).catch(error => { + console.error('Failed to copy to clipboard:', error); + alert('Error, Random content Structure failed to copy due to error!'); + }); + } + + //Filter ----------------------------------------------------------------------------------------------------- + let jsonInput = ''; + + let json = {}; + let filteredKeys = []; + let remainingKeys = []; + let llmresponseformat = '{"story" : [{},{},... ]'; + + function extractKeys() { + try { + //json = JSON.parse(jsonInput); + json = randomContentStructureSubtargets; + + const { filteredKeys: filtered, remainingKeys: remaining } = getKeysFromJSON(json, key => { + return key.includes('name') || key.includes('collisiontext'); //|| modal fields; + }); //return key.endsWith('.x') || key.endsWith('.y') || key.includes('Type') || key.includes('complete'); + + $$invalidate(0, filteredKeys = filtered); + $$invalidate(1, remainingKeys = remaining); + } catch(error) { + console.error('Invalid JSON:', error); + $$invalidate(0, filteredKeys = []); + $$invalidate(1, remainingKeys = []); + } + } + + extractKeys(); - if (Array.isArray(snippetSubTargets[subIndex].subTargets)) { - updateSubTargets(subTarget.subTargets, snippetSubTargets[subIndex].subTargets); - } + //Merge ------------------------------------------------------------------------------------------------------ + let randomContentStructureSubtargetsstring = JSON.stringify(randomContentStructureSubtargets, null, 2); + + let originalJson = randomContentStructureSubtargets; + let snippetJson = {}; + let snippetJsonInput = ''; + let mergedJson = {}; + + // function mergeJSON(original, snippet) { + // const merged = JSON.parse(JSON.stringify(original)); + // // Update objectives + // if (Array.isArray(snippet.story.objectives)) { + // merged.story[0].objectives.forEach((obj, index) => { + // if (snippet.story.objectives[index]) { + // obj.name = snippet.story.objectives[index].name; + // } + // }); + // } + // // Update targets + // if (Array.isArray(snippet.story.targets)) { + // merged.story[0].targets.forEach((target, index) => { + // if (snippet.story.targets[index]) { + // target.name = snippet.story.targets[index].name; + // target.collisiontext = snippet.story.targets[index].collisiontext; + // // Update subTargets recursively + // function updateSubTargets(originalSubTargets, snippetSubTargets) { + // originalSubTargets.forEach((subTarget, subIndex) => { + // if (snippetSubTargets[subIndex]) { + // subTarget.name = snippetSubTargets[subIndex].name; + // subTarget.collisiontext = snippetSubTargets[subIndex].collisiontext; + // if (Array.isArray(snippetSubTargets[subIndex].subTargets)) { + // updateSubTargets(subTarget.subTargets, snippetSubTargets[subIndex].subTargets); + // } + // } + // }); + // } + // if (Array.isArray(target.subTargets) && Array.isArray(snippet.story.targets[index].subTargets)) { + // updateSubTargets(target.subTargets, snippet.story.targets[index].subTargets); + // } + // } + // }); + // } + // autogenconfigtest.update(currentData => { + // const updatedData = { ...currentData, ...merged }; + // return updatedData; + // }); + // return merged; + // } + // function mergeJSON(original, snippet) { + // const merged = JSON.parse(JSON.stringify(original)); + // // Update objectives + // if (Array.isArray(snippet.story[0].objectives)) { + // merged.story[0].objectives.forEach((obj, index) => { + // if (snippet.story[0].objectives[index]) { + // obj.name = snippet.story[0].objectives[index].name; + // } + // }); + // } + // // Update targets + // if (Array.isArray(snippet.story[0].targets)) { + // merged.story[0].targets.forEach((target, index) => { + // if (snippet.story[0].targets[index]) { + // target.name = snippet.story[0].targets[index].name; + // target.collisiontext = snippet.story[0].targets[index].collisiontext; + // } + // }); + // } + // autogenconfigtest.update(currentData => { + // const updatedData = { ...currentData, ...merged }; + // return updatedData; + // }); + // return merged; + // } + function mergeJSON(original, snippet) { + const merged = JSON.parse(JSON.stringify(original)); + + // Update story parts + snippet.story.forEach((part, partIndex) => { + if (merged.story[partIndex]) { + // Update objectives + if (Array.isArray(part.objectives)) { + part.objectives.forEach((obj, objIndex) => { + if (merged.story[partIndex].objectives[objIndex]) { + merged.story[partIndex].objectives[objIndex].name = obj.name; } }); } - if (Array.isArray(target.subTargets) && Array.isArray(snippet.story.targets[index].subTargets)) { - updateSubTargets(target.subTargets, snippet.story.targets[index].subTargets); + // Update targets + if (Array.isArray(part.targets)) { + part.targets.forEach((target, targetIndex) => { + if (merged.story[partIndex].targets[targetIndex]) { + merged.story[partIndex].targets[targetIndex].name = target.name; + merged.story[partIndex].targets[targetIndex].collisiontext = target.collisiontext; + + // Update subtargets recursively + function updateSubTargets(originalSubTargets, snippetSubTargets) { + snippetSubTargets.forEach((subTarget, subIndex) => { + if (originalSubTargets[subIndex]) { + originalSubTargets[subIndex].name = subTarget.name; + originalSubTargets[subIndex].collisiontext = subTarget.collisiontext; + + if (Array.isArray(subTarget.subTargets)) { + updateSubTargets(originalSubTargets[subIndex].subTargets, subTarget.subTargets); + } + } + }); + } + + if (Array.isArray(target.subTargets)) { + updateSubTargets(merged.story[partIndex].targets[targetIndex].subTargets, target.subTargets); + } + } + }); } } }); - } - - return merged; - } - - function autoExpandTextarea(event) { - const textarea = event.target; - textarea.style.height = 'auto'; - textarea.style.height = `${textarea.scrollHeight}px`; - } - - function instance$g($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('Testjsonmatchingfieldmerge', slots, []); - let originalJsonInput = `{ -"story": [ -{ -"part": 0, -"objectives": [ -{ -"id": "Objective1_1", -"name": "Objective 1.1", -"complete": false -}, -{ -"id": "Objective1_2", -"name": "Objective 1.2", -"complete": false -} -], -"targets": [ -{ -"name": "Target0_1", -"x": 55, -"y": 4, -"collisionType": "alert", -"collisiontext": "Placeholder text for Target 0.1", -"subTargets": [ -{ -"name": "Target1_1", -"x": 63, -"y": 4, -"collisionType": "alert", -"collisiontext": "Placeholder text for Target 1.1", -"subTargets": [ -{ -"name": "Target2_1", -"x": 88, -"y": 87, -"collisionType": "alert", -"collisiontext": "Placeholder text for Target 2.1" -} -] -}, -{ -"name": "Target1_2", -"x": 89, -"y": 5, -"collisionType": "alert", -"collisiontext": "Placeholder text for Target 1.2", -"subTargets": [ -{ -"name": "Target2_1", -"x": 69, -"y": 92, -"collisionType": "alert", -"collisiontext": "Placeholder text for Target 2.1" -} -] -} -] -}, -{ -"name": "Target0_2", -"x": 12, -"y": 59, -"collisionType": "alert", -"collisiontext": "Placeholder text for Target 0.2" -} -] -} -] -}`; + //console.log(merged); + autogenconfigtest.update(currentData => { + const updatedData = { ...currentData, ...merged }; - let snippetJsonInput = `{ -"story": { -"objectives": [ -{"name": "Master the ancient magic"}, -{"name": "Unite the warring clans"} -], -"targets": [ -{ -"name": "The ancient temple", -"collisiontext": "Enter the temple", -"subTargets": [ -{ -"name": "The sacred artifact", -"collisiontext": "Take the artifact", -"subTargets": [ -{ -"name": "The ancient scroll", -"collisiontext": "Unroll the scroll" -} -] -}, -{ -"name": "The hidden chamber", -"collisiontext": "Discover the chamber", -"subTargets": [ -{ -"name": "The ancient relic", -"collisiontext": "Claim the relic" -} -] -} -] -}, -{ -"name": "The dark forest", -"collisiontext": "Venture into the forest" -} -] -} -}`; + //console.log(updatedData); + return updatedData; + }); - let originalJson = {}; - let snippetJson = {}; - let mergedJson = {}; + return merged; + } function handleMerge() { try { - originalJson = JSON.parse(originalJsonInput); + //originalJson = JSON.parse(originalJsonInput); snippetJson = JSON.parse(snippetJsonInput); - $$invalidate(2, mergedJson = mergeJSON(originalJson, snippetJson)); + + //console.log(snippetJson) + $$invalidate(3, mergedJson = mergeJSON(originalJson, snippetJson)); } catch(error) { console.error('Invalid JSON:', error); - $$invalidate(2, mergedJson = {}); + $$invalidate(3, mergedJson = {}); + } + } + + //Live Asset Generation + let LLMforassit = [ + { + name: 'Qwen/Qwen1.5-110B-Chat-demo', + url: 'https://qwen-qwen1-5-110b-chat-demo.hf.space' } + ]; //List of models with system prompt available + + //Load Function + const dispatch = createEventDispatcher(); + + function loadexperimentalthemedispatch() { + dispatch('loadexperimentaltheme'); } const writable_props = []; Object_1$3.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$7.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1$7.warn(` was created with unknown prop '${key}'`); }); - function textarea0_input_handler() { - originalJsonInput = this.value; - $$invalidate(0, originalJsonInput); - } - function textarea1_input_handler() { snippetJsonInput = this.value; - $$invalidate(1, snippetJsonInput); + $$invalidate(2, snippetJsonInput); } $$self.$capture_state = () => ({ - originalJsonInput, - snippetJsonInput, + autogenconfigtest, + SimpleIFrame, + createEventDispatcher, + generateRandomContentStructureSubtargets, + randomContentStructureSubtargets, + copyToClipboardStructuresubtargets, + jsonInput, + json, + filteredKeys, + remainingKeys, + llmresponseformat, + getKeysFromJSON, + extractKeys, + autoExpandTextarea, + randomContentStructureSubtargetsstring, originalJson, snippetJson, + snippetJsonInput, mergedJson, mergeJSON, handleMerge, - autoExpandTextarea + LLMforassit, + dispatch, + loadexperimentalthemedispatch }); $$self.$inject_state = $$props => { - if ('originalJsonInput' in $$props) $$invalidate(0, originalJsonInput = $$props.originalJsonInput); - if ('snippetJsonInput' in $$props) $$invalidate(1, snippetJsonInput = $$props.snippetJsonInput); + if ('randomContentStructureSubtargets' in $$props) $$invalidate(4, randomContentStructureSubtargets = $$props.randomContentStructureSubtargets); + if ('jsonInput' in $$props) jsonInput = $$props.jsonInput; + if ('json' in $$props) json = $$props.json; + if ('filteredKeys' in $$props) $$invalidate(0, filteredKeys = $$props.filteredKeys); + if ('remainingKeys' in $$props) $$invalidate(1, remainingKeys = $$props.remainingKeys); + if ('llmresponseformat' in $$props) $$invalidate(5, llmresponseformat = $$props.llmresponseformat); + if ('randomContentStructureSubtargetsstring' in $$props) randomContentStructureSubtargetsstring = $$props.randomContentStructureSubtargetsstring; if ('originalJson' in $$props) originalJson = $$props.originalJson; if ('snippetJson' in $$props) snippetJson = $$props.snippetJson; - if ('mergedJson' in $$props) $$invalidate(2, mergedJson = $$props.mergedJson); + if ('snippetJsonInput' in $$props) $$invalidate(2, snippetJsonInput = $$props.snippetJsonInput); + if ('mergedJson' in $$props) $$invalidate(3, mergedJson = $$props.mergedJson); + if ('LLMforassit' in $$props) $$invalidate(7, LLMforassit = $$props.LLMforassit); }; if ($$props && "$$inject" in $$props) { @@ -6425,23 +7628,27 @@ var app = (function () { } return [ - originalJsonInput, + filteredKeys, + remainingKeys, snippetJsonInput, mergedJson, + randomContentStructureSubtargets, + llmresponseformat, handleMerge, - textarea0_input_handler, + LLMforassit, + loadexperimentalthemedispatch, textarea1_input_handler ]; } - class Testjsonmatchingfieldmerge extends SvelteComponentDev { + class CustomGameConfigHelper extends SvelteComponentDev { constructor(options) { super(options); init(this, options, instance$g, create_fragment$g, safe_not_equal, {}); dispatch_dev("SvelteRegisterComponent", { component: this, - tagName: "Testjsonmatchingfieldmerge", + tagName: "CustomGameConfigHelper", options, id: create_fragment$g.name }); @@ -6451,7 +7658,107 @@ var app = (function () { /* src\MovingDotSpaceThemeManager.svelte generated by Svelte v3.59.2 */ const file$f = "src\\MovingDotSpaceThemeManager.svelte"; - // (71:0) + // (91:4) + function create_default_slot_2(ctx) { + let brainstormgameconfigsrandom; + let t0; + let testbrainstorminstantpopulate; + let t1; + let testjsonmatchingfieldmerge; + let current; + brainstormgameconfigsrandom = new BrainstormGameConfigsRandom({ $$inline: true }); + testbrainstorminstantpopulate = new Testbrainstorminstantpopulate({ $$inline: true }); + testjsonmatchingfieldmerge = new Testjsonmatchingfieldmerge({ $$inline: true }); + + const block = { + c: function create() { + create_component(brainstormgameconfigsrandom.$$.fragment); + t0 = space(); + create_component(testbrainstorminstantpopulate.$$.fragment); + t1 = space(); + create_component(testjsonmatchingfieldmerge.$$.fragment); + }, + m: function mount(target, anchor) { + mount_component(brainstormgameconfigsrandom, target, anchor); + insert_dev(target, t0, anchor); + mount_component(testbrainstorminstantpopulate, target, anchor); + insert_dev(target, t1, anchor); + mount_component(testjsonmatchingfieldmerge, target, anchor); + current = true; + }, + i: function intro(local) { + if (current) return; + transition_in(brainstormgameconfigsrandom.$$.fragment, local); + transition_in(testbrainstorminstantpopulate.$$.fragment, local); + transition_in(testjsonmatchingfieldmerge.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(brainstormgameconfigsrandom.$$.fragment, local); + transition_out(testbrainstorminstantpopulate.$$.fragment, local); + transition_out(testjsonmatchingfieldmerge.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + destroy_component(brainstormgameconfigsrandom, detaching); + if (detaching) detach_dev(t0); + destroy_component(testbrainstorminstantpopulate, detaching); + if (detaching) detach_dev(t1); + destroy_component(testjsonmatchingfieldmerge, detaching); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_default_slot_2.name, + type: "slot", + source: "(91:4) ", + ctx + }); + + return block; + } + + // (97:4) + function create_default_slot_1(ctx) { + let customgameconfighelper; + let current; + customgameconfighelper = new CustomGameConfigHelper({ $$inline: true }); + + const block = { + c: function create() { + create_component(customgameconfighelper.$$.fragment); + }, + m: function mount(target, anchor) { + mount_component(customgameconfighelper, target, anchor); + current = true; + }, + i: function intro(local) { + if (current) return; + transition_in(customgameconfighelper.$$.fragment, local); + current = true; + }, + o: function outro(local) { + transition_out(customgameconfighelper.$$.fragment, local); + current = false; + }, + d: function destroy(detaching) { + destroy_component(customgameconfighelper, detaching); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block, + id: create_default_slot_1.name, + type: "slot", + source: "(97:4) ", + ctx + }); + + return block; + } + + // (72:0) function create_default_slot$1(ctx) { let t0; let hr; @@ -6471,17 +7778,30 @@ var app = (function () { let t9; let label; let t11; - let brainstormgameconfigsrandom; + let simplecollapsible0; let t12; - let testbrainstorminstantpopulate; - let t13; - let testjsonmatchingfieldmerge; + let simplecollapsible1; let current; let mounted; let dispose; - brainstormgameconfigsrandom = new BrainstormGameConfigsRandom({ $$inline: true }); - testbrainstorminstantpopulate = new Testbrainstorminstantpopulate({ $$inline: true }); - testjsonmatchingfieldmerge = new Testjsonmatchingfieldmerge({ $$inline: true }); + + simplecollapsible0 = new SimpleCollapsible({ + props: { + title: "JSON Config Seperate steps", + $$slots: { default: [create_default_slot_2] }, + $$scope: { ctx } + }, + $$inline: true + }); + + simplecollapsible1 = new SimpleCollapsible({ + props: { + title: "Streamlined Config Steps", + $$slots: { default: [create_default_slot_1] }, + $$scope: { ctx } + }, + $$inline: true + }); const block = { c: function create() { @@ -6506,32 +7826,30 @@ var app = (function () { label = element("label"); label.textContent = "Upload Configuration"; t11 = space(); - create_component(brainstormgameconfigsrandom.$$.fragment); + create_component(simplecollapsible0.$$.fragment); t12 = space(); - create_component(testbrainstorminstantpopulate.$$.fragment); - t13 = space(); - create_component(testjsonmatchingfieldmerge.$$.fragment); - add_location(hr, file$f, 72, 4, 3248); + create_component(simplecollapsible1.$$.fragment); + add_location(hr, file$f, 73, 4, 3323); attr_dev(input0, "type", "text"); attr_dev(input0, "placeholder", "Type (weapon, armor, consumable)"); - add_location(input0, file$f, 76, 8, 3400); + add_location(input0, file$f, 77, 8, 3475); attr_dev(input1, "type", "text"); attr_dev(input1, "placeholder", "Name"); - add_location(input1, file$f, 77, 8, 3504); + add_location(input1, file$f, 78, 8, 3579); attr_dev(input2, "type", "text"); attr_dev(input2, "placeholder", "Description"); - add_location(input2, file$f, 78, 8, 3580); + add_location(input2, file$f, 79, 8, 3655); attr_dev(button0, "type", "submit"); - add_location(button0, file$f, 79, 8, 3670); - add_location(form, file$f, 75, 4, 3349); - add_location(button1, file$f, 85, 4, 3865); + add_location(button0, file$f, 80, 8, 3745); + add_location(form, file$f, 76, 4, 3424); + add_location(button1, file$f, 86, 4, 3940); attr_dev(input3, "type", "file"); attr_dev(input3, "id", "fileInput"); set_style(input3, "display", "none"); - add_location(input3, file$f, 86, 4, 3943); + add_location(input3, file$f, 87, 4, 4018); attr_dev(label, "for", "fileInput"); attr_dev(label, "class", "btn"); - add_location(label, file$f, 87, 4, 4036); + add_location(label, file$f, 88, 4, 4111); }, m: function mount(target, anchor) { insert_dev(target, t0, anchor); @@ -6555,11 +7873,9 @@ var app = (function () { insert_dev(target, t9, anchor); insert_dev(target, label, anchor); insert_dev(target, t11, anchor); - mount_component(brainstormgameconfigsrandom, target, anchor); + mount_component(simplecollapsible0, target, anchor); insert_dev(target, t12, anchor); - mount_component(testbrainstorminstantpopulate, target, anchor); - insert_dev(target, t13, anchor); - mount_component(testjsonmatchingfieldmerge, target, anchor); + mount_component(simplecollapsible1, target, anchor); current = true; if (!mounted) { @@ -6587,18 +7903,31 @@ var app = (function () { if (dirty & /*newItem*/ 2 && input2.value !== /*newItem*/ ctx[1].description) { set_input_value(input2, /*newItem*/ ctx[1].description); } + + const simplecollapsible0_changes = {}; + + if (dirty & /*$$scope*/ 65536) { + simplecollapsible0_changes.$$scope = { dirty, ctx }; + } + + simplecollapsible0.$set(simplecollapsible0_changes); + const simplecollapsible1_changes = {}; + + if (dirty & /*$$scope*/ 65536) { + simplecollapsible1_changes.$$scope = { dirty, ctx }; + } + + simplecollapsible1.$set(simplecollapsible1_changes); }, i: function intro(local) { if (current) return; - transition_in(brainstormgameconfigsrandom.$$.fragment, local); - transition_in(testbrainstorminstantpopulate.$$.fragment, local); - transition_in(testjsonmatchingfieldmerge.$$.fragment, local); + transition_in(simplecollapsible0.$$.fragment, local); + transition_in(simplecollapsible1.$$.fragment, local); current = true; }, o: function outro(local) { - transition_out(brainstormgameconfigsrandom.$$.fragment, local); - transition_out(testbrainstorminstantpopulate.$$.fragment, local); - transition_out(testjsonmatchingfieldmerge.$$.fragment, local); + transition_out(simplecollapsible0.$$.fragment, local); + transition_out(simplecollapsible1.$$.fragment, local); current = false; }, d: function destroy(detaching) { @@ -6613,11 +7942,9 @@ var app = (function () { if (detaching) detach_dev(t9); if (detaching) detach_dev(label); if (detaching) detach_dev(t11); - destroy_component(brainstormgameconfigsrandom, detaching); + destroy_component(simplecollapsible0, detaching); if (detaching) detach_dev(t12); - destroy_component(testbrainstorminstantpopulate, detaching); - if (detaching) detach_dev(t13); - destroy_component(testjsonmatchingfieldmerge, detaching); + destroy_component(simplecollapsible1, detaching); mounted = false; run_all(dispose); } @@ -6627,7 +7954,7 @@ var app = (function () { block, id: create_default_slot$1.name, type: "slot", - source: "(71:0) ", + source: "(72:0) ", ctx }); @@ -6637,36 +7964,38 @@ var app = (function () { function create_fragment$f(ctx) { let simplecollapsible; let t0; - let brainstormstatetransitionsrandom; + let hr0; let t1; - let hr; - let t2; let br0; - let t3; + let t2; let br1; + let t3; + let brainstormstatetransitionsrandom; let t4; - let br2; + let hr1; let t5; - let br3; - let t6; let div3; let div0; + let t6; + let br2; let t7; - let br4; + let br3; let t8; - let br5; + let br4; let t9; let t10; let div1; let t11; + let br5; let t12; let br6; let t13; - let br7; - let br8; let t14; - let t15; let div2; + let t15; + let t16; + let br7; + let t17; let current; simplecollapsible = new SimpleCollapsible({ @@ -6684,52 +8013,53 @@ var app = (function () { c: function create() { create_component(simplecollapsible.$$.fragment); t0 = space(); - create_component(brainstormstatetransitionsrandom.$$.fragment); - t1 = space(); - hr = element("hr"); - t2 = text("\r\nNext Is auto generate + extract in one output "); + hr0 = element("hr"); + t1 = text("\r\nEarly examples - \r\n"); br0 = element("br"); - t3 = text("-- Then autogenerate + extract + llm api call for the JSON snippet "); + t2 = text("Write a story where the main event are in this order: gosomewhere getsomething makeobservation getsomething talktosomeone makeobservation getsomething talktosomeone gosomewhere fight talktosomeone fight fight talktosomeone talktosomeone talktosomeone gosomewhere talktosomeone\r\n"); br1 = element("br"); - t4 = text("-- Then autogenerate + extract + llm api call for the JSON snippet + Merge in one button press "); - br2 = element("br"); - t5 = text("-- Then autogenerate + extract + llm api call for the JSON snippet + Merge in one button press + load into game component for testing \r\n"); - br3 = element("br"); - t6 = text("-- Then autogenerate + extract + llm api call for the JSON snippet + Merge in one button press + load into game component for testing + Sequence generate built into autogenerate json as an option (sequence becomes the placeholder text)\r\n\r\n"); + t3 = text("lets write the story to fit this order - stats location stats inventory stats location location skills inventory stats inventory skills skills skills stats stats skills\r\n\r\n"); + create_component(brainstormstatetransitionsrandom.$$.fragment); + t4 = space(); + hr1 = element("hr"); + t5 = text("\r\nNext Is autogenerate + extract + llm api call for the JSON snippet + Merge in one button press + load into game component for testing + Sequence generate built into autogenerate json as an option (sequence becomes the placeholder text)\r\n\r\n"); div3 = element("div"); div0 = element("div"); - t7 = text("Website = multilingual support in chrome "); + t6 = text("TODO - "); + br2 = element("br"); + t7 = text(" Simplify Theme Manager "); + br3 = element("br"); + t8 = text(" Fix state transition and game mechanic integration "); br4 = element("br"); - t8 = text("\r\n The mechanics here are location based so story should be location based "); - br5 = element("br"); - t9 = text("\r\n Simultaneous relationships between multiple items = complexity - eg. player location and objectives"); + t9 = text(" Flesh out Iframe modal gameplay eg. youtube video as an item and llm judge"); t10 = space(); div1 = element("div"); - t11 = text(/*ChangedContentPlaceholder*/ ctx[0]); - t12 = space(); + t11 = text("Website = multilingual support in chrome "); + br5 = element("br"); + t12 = text("\r\n The mechanics here are location based so story should be location based "); br6 = element("br"); - t13 = text("\r\n Most stories for games are about a character that lacks something to beat their problems and the 90% inbetween the begining and the end is acquiring\r\n "); - br7 = element("br"); - br8 = element("br"); - t14 = text("\r\n Example - Write a story where the main event are in this order: gosomewhere getsomething makeobservation getsomething talktosomeone makeobservation getsomething talktosomeone gosomewhere fight talktosomeone fight fight talktosomeone talktosomeone talktosomeone gosomewhere talktosomeone"); - t15 = space(); + t13 = text("\r\n Simultaneous relationships between multiple items = complexity - eg. player location and objectives"); + t14 = space(); div2 = element("div"); - div2.textContent = "lets write the story to fit this order - stats location stats inventory stats location location skills inventory stats inventory skills skills skills stats stats skills"; - add_location(hr, file$f, 96, 0, 4278); - add_location(br0, file$f, 97, 46, 4330); - add_location(br1, file$f, 97, 117, 4401); - add_location(br2, file$f, 97, 216, 4500); - add_location(br3, file$f, 98, 0, 4640); - add_location(br4, file$f, 102, 49, 4982); - add_location(br5, file$f, 103, 80, 5068); - add_location(div0, file$f, 101, 4, 4926); - add_location(br6, file$f, 108, 38, 5246); - add_location(br7, file$f, 110, 8, 5418); - add_location(br8, file$f, 110, 12, 5422); - add_location(div1, file$f, 107, 4, 5201); - add_location(div2, file$f, 114, 4, 5743); - attr_dev(div3, "class", "grid-themegridContainer svelte-a95t5t"); - add_location(div3, file$f, 100, 0, 4883); + t15 = text(/*ChangedContentPlaceholder*/ ctx[0]); + t16 = space(); + br7 = element("br"); + t17 = text("\r\n Most stories for games are about a character that lacks something to beat their problems and the 90% inbetween the begining and the end is acquiring"); + add_location(hr0, file$f, 102, 0, 4539); + add_location(br0, file$f, 104, 0, 4564); + add_location(br1, file$f, 105, 0, 4846); + add_location(hr1, file$f, 109, 0, 5062); + add_location(br2, file$f, 115, 15, 5374); + add_location(br3, file$f, 115, 43, 5402); + add_location(br4, file$f, 115, 99, 5458); + add_location(div0, file$f, 114, 4, 5352); + add_location(br5, file$f, 119, 49, 5613); + add_location(br6, file$f, 120, 80, 5699); + add_location(div1, file$f, 118, 4, 5557); + add_location(br7, file$f, 125, 38, 5877); + add_location(div2, file$f, 124, 4, 5832); + attr_dev(div3, "class", "grid-themegridContainer svelte-qg4vfk"); + add_location(div3, file$f, 112, 0, 5307); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -6737,36 +8067,38 @@ var app = (function () { m: function mount(target, anchor) { mount_component(simplecollapsible, target, anchor); insert_dev(target, t0, anchor); - mount_component(brainstormstatetransitionsrandom, target, anchor); + insert_dev(target, hr0, anchor); insert_dev(target, t1, anchor); - insert_dev(target, hr, anchor); - insert_dev(target, t2, anchor); insert_dev(target, br0, anchor); - insert_dev(target, t3, anchor); + insert_dev(target, t2, anchor); insert_dev(target, br1, anchor); + insert_dev(target, t3, anchor); + mount_component(brainstormstatetransitionsrandom, target, anchor); insert_dev(target, t4, anchor); - insert_dev(target, br2, anchor); + insert_dev(target, hr1, anchor); insert_dev(target, t5, anchor); - insert_dev(target, br3, anchor); - insert_dev(target, t6, anchor); insert_dev(target, div3, anchor); append_dev(div3, div0); + append_dev(div0, t6); + append_dev(div0, br2); append_dev(div0, t7); - append_dev(div0, br4); + append_dev(div0, br3); append_dev(div0, t8); - append_dev(div0, br5); + append_dev(div0, br4); append_dev(div0, t9); append_dev(div3, t10); append_dev(div3, div1); append_dev(div1, t11); + append_dev(div1, br5); append_dev(div1, t12); append_dev(div1, br6); append_dev(div1, t13); - append_dev(div1, br7); - append_dev(div1, br8); - append_dev(div1, t14); - append_dev(div3, t15); + append_dev(div3, t14); append_dev(div3, div2); + append_dev(div2, t15); + append_dev(div2, t16); + append_dev(div2, br7); + append_dev(div2, t17); current = true; }, p: function update(ctx, [dirty]) { @@ -6777,7 +8109,7 @@ var app = (function () { } simplecollapsible.$set(simplecollapsible_changes); - if (!current || dirty & /*ChangedContentPlaceholder*/ 1) set_data_dev(t11, /*ChangedContentPlaceholder*/ ctx[0]); + if (!current || dirty & /*ChangedContentPlaceholder*/ 1) set_data_dev(t15, /*ChangedContentPlaceholder*/ ctx[0]); }, i: function intro(local) { if (current) return; @@ -6793,18 +8125,16 @@ var app = (function () { d: function destroy(detaching) { destroy_component(simplecollapsible, detaching); if (detaching) detach_dev(t0); - destroy_component(brainstormstatetransitionsrandom, detaching); + if (detaching) detach_dev(hr0); if (detaching) detach_dev(t1); - if (detaching) detach_dev(hr); - if (detaching) detach_dev(t2); if (detaching) detach_dev(br0); - if (detaching) detach_dev(t3); + if (detaching) detach_dev(t2); if (detaching) detach_dev(br1); + if (detaching) detach_dev(t3); + destroy_component(brainstormstatetransitionsrandom, detaching); if (detaching) detach_dev(t4); - if (detaching) detach_dev(br2); + if (detaching) detach_dev(hr1); if (detaching) detach_dev(t5); - if (detaching) detach_dev(br3); - if (detaching) detach_dev(t6); if (detaching) detach_dev(div3); } }; @@ -6934,6 +8264,7 @@ var app = (function () { BrainstormStateTransitionsRandom, Testbrainstorminstantpopulate, Testjsonmatchingfieldmerge, + CustomGameConfigHelper, newItem, newSkill, newObjective, @@ -59732,29 +61063,29 @@ var app = (function () { function get_each_context$8(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[27] = list[i]; + child_ctx[29] = list[i]; return child_ctx; } function get_each_context_1$3(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[30] = list[i]; + child_ctx[32] = list[i]; return child_ctx; } - // (252:4) {#each themeKeys as key} + // (286:4) {#each themeKeys as key} function create_each_block_1$3(ctx) { let option; - let t_value = /*key*/ ctx[30] + ""; + let t_value = /*key*/ ctx[32] + ""; let t; const block = { c: function create() { option = element("option"); t = text(t_value); - option.__value = /*key*/ ctx[30]; + option.__value = /*key*/ ctx[32]; option.value = option.__value; - add_location(option, file$a, 252, 8, 10253); + add_location(option, file$a, 286, 8, 11619); }, m: function mount(target, anchor) { insert_dev(target, option, anchor); @@ -59770,25 +61101,25 @@ var app = (function () { block, id: create_each_block_1$3.name, type: "each", - source: "(252:4) {#each themeKeys as key}", + source: "(286:4) {#each themeKeys as key}", ctx }); return block; } - // (262:4) {#each $targets as target (target.name)} + // (298:4) {#each $targets as target (target.name)} function create_each_block$8(key_1, ctx) { let first; let target; let t0; let span; - let t1_value = /*target*/ ctx[27].name + ""; + let t1_value = /*target*/ ctx[29].name + ""; let t1; let current; target = new MovingDotTargetPortfromReact({ - props: { position: /*target*/ ctx[27] }, + props: { position: /*target*/ ctx[29] }, $$inline: true }); @@ -59802,9 +61133,9 @@ var app = (function () { span = element("span"); t1 = text(t1_value); set_style(span, "position", "absolute"); - set_style(span, "left", /*target*/ ctx[27].x + "px"); - set_style(span, "top", /*target*/ ctx[27].y + "px"); - add_location(span, file$a, 263, 8, 11299); + set_style(span, "left", /*target*/ ctx[29].x + "px"); + set_style(span, "top", /*target*/ ctx[29].y + "px"); + add_location(span, file$a, 299, 8, 12755); this.first = first; }, m: function mount(target$1, anchor) { @@ -59818,16 +61149,16 @@ var app = (function () { p: function update(new_ctx, dirty) { ctx = new_ctx; const target_changes = {}; - if (dirty[0] & /*$targets*/ 4096) target_changes.position = /*target*/ ctx[27]; + if (dirty[0] & /*$targets*/ 4096) target_changes.position = /*target*/ ctx[29]; target.$set(target_changes); - if ((!current || dirty[0] & /*$targets*/ 4096) && t1_value !== (t1_value = /*target*/ ctx[27].name + "")) set_data_dev(t1, t1_value); + if ((!current || dirty[0] & /*$targets*/ 4096) && t1_value !== (t1_value = /*target*/ ctx[29].name + "")) set_data_dev(t1, t1_value); if (!current || dirty[0] & /*$targets*/ 4096) { - set_style(span, "left", /*target*/ ctx[27].x + "px"); + set_style(span, "left", /*target*/ ctx[29].x + "px"); } if (!current || dirty[0] & /*$targets*/ 4096) { - set_style(span, "top", /*target*/ ctx[27].y + "px"); + set_style(span, "top", /*target*/ ctx[29].y + "px"); } }, i: function intro(local) { @@ -59851,14 +61182,14 @@ var app = (function () { block, id: create_each_block$8.name, type: "each", - source: "(262:4) {#each $targets as target (target.name)}", + source: "(298:4) {#each $targets as target (target.name)}", ctx }); return block; } - // (268:4) {#if isModalOpen} + // (304:4) {#if isModalOpen} function create_if_block_1$1(ctx) { let modal; let current; @@ -59866,7 +61197,7 @@ var app = (function () { modal = new MovingDotSpaceSimpleModal({ props: { isOpen: /*isModalOpen*/ ctx[3], - onClose: /*handleModalClose*/ ctx[18], + onClose: /*handleModalClose*/ ctx[19], title: /*currentcollisiontitletext*/ ctx[5], content: /*currentcollisiontext*/ ctx[6], items: /*currentcollisionitems*/ ctx[7], @@ -59912,14 +61243,14 @@ var app = (function () { block, id: create_if_block_1$1.name, type: "if", - source: "(268:4) {#if isModalOpen}", + source: "(304:4) {#if isModalOpen}", ctx }); return block; } - // (272:4) {#if isSMModalOpen} + // (308:4) {#if isSMModalOpen} function create_if_block$4(ctx) { let smmodal; let current; @@ -59927,7 +61258,7 @@ var app = (function () { smmodal = new SimpleStateMachineModal({ props: { isOpen: /*isSMModalOpen*/ ctx[4], - onClose: /*handleModalClose*/ ctx[18], + onClose: /*handleModalClose*/ ctx[19], modalStates: /*currentstatemodalstates*/ ctx[9] }, $$inline: true @@ -59965,14 +61296,14 @@ var app = (function () { block, id: create_if_block$4.name, type: "if", - source: "(272:4) {#if isSMModalOpen}", + source: "(308:4) {#if isSMModalOpen}", ctx }); return block; } - // (282:0) + // (318:0) function create_default_slot(ctx) { let h10; let t1; @@ -60011,9 +61342,9 @@ var app = (function () { h12.textContent = "Find out/ make sense / Resolve Conflict = order mixed up and"; t8 = space(); create_component(ordertest.$$.fragment); - add_location(h10, file$a, 282, 4, 12202); - add_location(h11, file$a, 285, 4, 12307); - add_location(h12, file$a, 287, 4, 12460); + add_location(h10, file$a, 318, 4, 13658); + add_location(h11, file$a, 321, 4, 13763); + add_location(h12, file$a, 323, 4, 13916); }, m: function mount(target, anchor) { insert_dev(target, h10, anchor); @@ -60068,7 +61399,7 @@ var app = (function () { block, id: create_default_slot.name, type: "slot", - source: "(282:0) ", + source: "(318:0) ", ctx }); @@ -60079,33 +61410,35 @@ var app = (function () { let t0; let select; let t1; + let button; + let t3; let dotgamethememanager; - let t2; + let t4; let div1; let canvas_1; - let t3; - let movingdot; - let t4; - let div0; let t5; - let t6_value = /*$dotPosition*/ ctx[0].x + ""; + let movingdot; let t6; + let div0; let t7; - let t8_value = /*$dotPosition*/ ctx[0].y + ""; + let t8_value = /*$dotPosition*/ ctx[0].x + ""; let t8; let t9; + let t10_value = /*$dotPosition*/ ctx[0].y + ""; let t10; - let each_blocks = []; - let each1_lookup = new Map(); let t11; let t12; + let each_blocks = []; + let each1_lookup = new Map(); let t13; - let movingdotstats; let t14; - let h1; + let t15; + let movingdotstats; let t16; + let h1; + let t18; let hr; - let t17; + let t19; let simplecollapsible; let current; let mounted; @@ -60131,11 +61464,11 @@ var app = (function () { }; movingdot = new MovingDotPortfromReact({ props: movingdot_props, $$inline: true }); - /*movingdot_binding*/ ctx[22](movingdot); - movingdot.$on("move", /*move_handler*/ ctx[23]); + /*movingdot_binding*/ ctx[23](movingdot); + movingdot.$on("move", /*move_handler*/ ctx[24]); let each_value = /*$targets*/ ctx[12]; validate_each_argument(each_value); - const get_key = ctx => /*target*/ ctx[27].name; + const get_key = ctx => /*target*/ ctx[29].name; validate_each_keys(ctx, each_value, get_each_context$8, get_key); for (let i = 0; i < each_value.length; i += 1) { @@ -60166,48 +61499,52 @@ var app = (function () { each_blocks_1[i].c(); } - t1 = space(); + t1 = text("\r\n | \r\n"); + button = element("button"); + button.textContent = "Test load for the auto gen config"; + t3 = space(); create_component(dotgamethememanager.$$.fragment); - t2 = space(); + t4 = space(); div1 = element("div"); canvas_1 = element("canvas"); - t3 = space(); + t5 = space(); create_component(movingdot.$$.fragment); - t4 = space(); + t6 = space(); div0 = element("div"); - t5 = text("Minor Game Events Log for player ||| Position for Developer "); - t6 = text(t6_value); - t7 = space(); + t7 = text("Minor Game Events Log for player ||| Position for Developer "); t8 = text(t8_value); - t9 = text(" - TODO - Story Line / Avatars? / Clock System ||| For Job Experience focused Stats can be Emotions Stress Frustration Relief Tiredness Confidence (Percieved Skill) Experience (Actual Skill)"); - t10 = space(); + t9 = space(); + t10 = text(t10_value); + t11 = text(" - TODO - Story Line / Avatars? / Clock System ||| For Job Experience focused Stats can be Emotions Stress Frustration Relief Tiredness Confidence (Percieved Skill) Experience (Actual Skill)"); + t12 = space(); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].c(); } - t11 = space(); + t13 = space(); if (if_block0) if_block0.c(); - t12 = space(); + t14 = space(); if (if_block1) if_block1.c(); - t13 = space(); + t15 = space(); create_component(movingdotstats.$$.fragment); - t14 = space(); + t16 = space(); h1 = element("h1"); h1.textContent = "Simple Game is normally just story with fighting and traversing mechanics repeated in between videos"; - t16 = space(); + t18 = space(); hr = element("hr"); - t17 = space(); + t19 = space(); create_component(simplecollapsible.$$.fragment); - if (/*currentTheme*/ ctx[10] === void 0) add_render_callback(() => /*select_change_handler*/ ctx[20].call(select)); - add_location(select, file$a, 250, 0, 10155); + if (/*currentTheme*/ ctx[10] === void 0) add_render_callback(() => /*select_change_handler*/ ctx[21].call(select)); + add_location(select, file$a, 284, 0, 11521); + add_location(button, file$a, 290, 0, 11684); set_style(canvas_1, "width", "100%"); set_style(canvas_1, "height", "100%"); attr_dev(canvas_1, "tabindex", "0"); - add_location(canvas_1, file$a, 258, 4, 10635); + add_location(canvas_1, file$a, 294, 4, 12091); attr_dev(div0, "id", "overlayText"); attr_dev(div0, "class", "svelte-c2nwl9"); - add_location(div0, file$a, 260, 4, 10893); + add_location(div0, file$a, 296, 4, 12349); attr_dev(div1, "id", "game-container"); set_style(div1, "position", "relative"); set_style(div1, "width", "100%"); @@ -60217,9 +61554,9 @@ var app = (function () { set_style(div1, "background-image", "url('" + /*CurrentGameBackground*/ ctx[11] + "')"); set_style(div1, "background-size", "cover"); set_style(div1, "background-position", "center"); - add_location(div1, file$a, 257, 0, 10402); - add_location(h1, file$a, 278, 0, 11950); - add_location(hr, file$a, 279, 0, 12061); + add_location(div1, file$a, 293, 0, 11858); + add_location(h1, file$a, 314, 0, 13406); + add_location(hr, file$a, 315, 0, 13517); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -60236,21 +61573,23 @@ var app = (function () { select_option(select, /*currentTheme*/ ctx[10], true); insert_dev(target, t1, anchor); + insert_dev(target, button, anchor); + insert_dev(target, t3, anchor); mount_component(dotgamethememanager, target, anchor); - insert_dev(target, t2, anchor); + insert_dev(target, t4, anchor); insert_dev(target, div1, anchor); append_dev(div1, canvas_1); - /*canvas_1_binding*/ ctx[21](canvas_1); - append_dev(div1, t3); + /*canvas_1_binding*/ ctx[22](canvas_1); + append_dev(div1, t5); mount_component(movingdot, div1, null); - append_dev(div1, t4); + append_dev(div1, t6); append_dev(div1, div0); - append_dev(div0, t5); - append_dev(div0, t6); append_dev(div0, t7); append_dev(div0, t8); append_dev(div0, t9); - append_dev(div1, t10); + append_dev(div0, t10); + append_dev(div0, t11); + append_dev(div1, t12); for (let i = 0; i < each_blocks.length; i += 1) { if (each_blocks[i]) { @@ -60258,25 +61597,26 @@ var app = (function () { } } - append_dev(div1, t11); + append_dev(div1, t13); if (if_block0) if_block0.m(div1, null); - append_dev(div1, t12); + append_dev(div1, t14); if (if_block1) if_block1.m(div1, null); - insert_dev(target, t13, anchor); + insert_dev(target, t15, anchor); mount_component(movingdotstats, target, anchor); - insert_dev(target, t14, anchor); - insert_dev(target, h1, anchor); insert_dev(target, t16, anchor); + insert_dev(target, h1, anchor); + insert_dev(target, t18, anchor); insert_dev(target, hr, anchor); - insert_dev(target, t17, anchor); + insert_dev(target, t19, anchor); mount_component(simplecollapsible, target, anchor); current = true; if (!mounted) { dispose = [ - listen_dev(select, "change", /*select_change_handler*/ ctx[20]), + listen_dev(select, "change", /*select_change_handler*/ ctx[21]), listen_dev(select, "change", /*changeTheme*/ ctx[16], false, false, false, false), - listen_dev(canvas_1, "click", /*handleSpaceClick*/ ctx[17], false, false, false, false) + listen_dev(button, "click", /*loadexperimentaltheme*/ ctx[17], false, false, false, false), + listen_dev(canvas_1, "click", /*handleSpaceClick*/ ctx[18], false, false, false, false) ]; mounted = true; @@ -60317,15 +61657,15 @@ var app = (function () { const movingdot_changes = {}; if (dirty[0] & /*$dotPosition*/ 1) movingdot_changes.position = /*$dotPosition*/ ctx[0]; movingdot.$set(movingdot_changes); - if ((!current || dirty[0] & /*$dotPosition*/ 1) && t6_value !== (t6_value = /*$dotPosition*/ ctx[0].x + "")) set_data_dev(t6, t6_value); - if ((!current || dirty[0] & /*$dotPosition*/ 1) && t8_value !== (t8_value = /*$dotPosition*/ ctx[0].y + "")) set_data_dev(t8, t8_value); + if ((!current || dirty[0] & /*$dotPosition*/ 1) && t8_value !== (t8_value = /*$dotPosition*/ ctx[0].x + "")) set_data_dev(t8, t8_value); + if ((!current || dirty[0] & /*$dotPosition*/ 1) && t10_value !== (t10_value = /*$dotPosition*/ ctx[0].y + "")) set_data_dev(t10, t10_value); if (dirty[0] & /*$targets*/ 4096) { each_value = /*$targets*/ ctx[12]; validate_each_argument(each_value); group_outros(); validate_each_keys(ctx, each_value, get_each_context$8, get_key); - each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div1, outro_and_destroy_block, create_each_block$8, t11, get_each_context$8); + each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div1, outro_and_destroy_block, create_each_block$8, t13, get_each_context$8); check_outros(); } @@ -60340,7 +61680,7 @@ var app = (function () { if_block0 = create_if_block_1$1(ctx); if_block0.c(); transition_in(if_block0, 1); - if_block0.m(div1, t12); + if_block0.m(div1, t14); } } else if (if_block0) { group_outros(); @@ -60381,7 +61721,7 @@ var app = (function () { const simplecollapsible_changes = {}; - if (dirty[1] & /*$$scope*/ 4) { + if (dirty[1] & /*$$scope*/ 16) { simplecollapsible_changes.$$scope = { dirty, ctx }; } @@ -60421,11 +61761,13 @@ var app = (function () { if (detaching) detach_dev(select); destroy_each(each_blocks_1, detaching); if (detaching) detach_dev(t1); + if (detaching) detach_dev(button); + if (detaching) detach_dev(t3); destroy_component(dotgamethememanager, detaching); - if (detaching) detach_dev(t2); + if (detaching) detach_dev(t4); if (detaching) detach_dev(div1); - /*canvas_1_binding*/ ctx[21](null); - /*movingdot_binding*/ ctx[22](null); + /*canvas_1_binding*/ ctx[22](null); + /*movingdot_binding*/ ctx[23](null); destroy_component(movingdot); for (let i = 0; i < each_blocks.length; i += 1) { @@ -60434,13 +61776,13 @@ var app = (function () { if (if_block0) if_block0.d(); if (if_block1) if_block1.d(); - if (detaching) detach_dev(t13); + if (detaching) detach_dev(t15); destroy_component(movingdotstats, detaching); - if (detaching) detach_dev(t14); - if (detaching) detach_dev(h1); if (detaching) detach_dev(t16); + if (detaching) detach_dev(h1); + if (detaching) detach_dev(t18); if (detaching) detach_dev(hr); - if (detaching) detach_dev(t17); + if (detaching) detach_dev(t19); destroy_component(simplecollapsible, detaching); mounted = false; run_all(dispose); @@ -60461,8 +61803,11 @@ var app = (function () { function instance$a($$self, $$props, $$invalidate) { let $dotPosition; let $targets; + let $autogenconfigtest; validate_store(targets, 'targets'); component_subscribe($$self, targets, $$value => $$invalidate(12, $targets = $$value)); + validate_store(autogenconfigtest, 'autogenconfigtest'); + component_subscribe($$self, autogenconfigtest, $$value => $$invalidate(26, $autogenconfigtest = $$value)); let { $$slots: slots = {}, $$scope } = $$props; validate_slots('MovingDotSpacePortfromReact', slots, []); let ChangedContentPlaceholdertoSend = "No changes"; @@ -60538,6 +61883,37 @@ var app = (function () { $$invalidate(1, ChangedContentPlaceholdertoSend = "TODO is all other variables to change"); } + function loadexperimentaltheme() { + if ($autogenconfigtest.story) { + inventory.set($autogenconfigtest.inventory); + skills.set($autogenconfigtest.skills); + themeactions.set($autogenconfigtest.actions); + currentThemeStage = 0; + const initialStory = $autogenconfigtest.story.find(part => part.part === 0); + + if (initialStory) { + objectives.set(initialStory.objectives); + + const uniqueTargets = [ + ...$autogenconfigtest.persistentTargets, + ...initialStory.targets.filter(target => !$autogenconfigtest.persistentTargets.some(persistentTarget => persistentTarget.name === target.name)) + ]; + + targets.set(uniqueTargets); + } else { + // Handle the case when no initial story part is found + objectives.set([]); + + targets.set([...$autogenconfigtest.persistentTargets]); + } + + $$invalidate(11, CurrentGameBackground = $autogenconfigtest.background); + $$invalidate(1, ChangedContentPlaceholdertoSend = "TODO is all other variables to change"); + } else { + alert("Merge not performed"); + } + } + function handleSpaceClick() { //console.log('Container clicked!', event); movingDotElement.focusDot(); @@ -60672,6 +62048,7 @@ var app = (function () { objectives, targets, themeactions, + autogenconfigtest, ChangedContentPlaceholdertoSend, canvas, dotPosition, @@ -60688,13 +62065,15 @@ var app = (function () { themeKeys, CurrentGameBackground, changeTheme, + loadexperimentaltheme, handleSpaceClick, handleModalClose, updateDotPosition, checkCollision, handleCollision, $dotPosition, - $targets + $targets, + $autogenconfigtest }); $$self.$inject_state = $$props => { @@ -60785,6 +62164,7 @@ var app = (function () { boundaries, themeKeys, changeTheme, + loadexperimentaltheme, handleSpaceClick, handleModalClose, updateDotPosition,