yo-vscode/svelte-helper/public/e/embed-rollup.js
2025-06-06 14:02:41 -07:00

3278 lines
72 KiB
JavaScript

(function () {
'use strict';
/** @returns {void} */
function noop() {}
// Adapted from https://github.com/then/is-promise/blob/master/index.js
// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE
/**
* @param {any} value
* @returns {value is PromiseLike<any>}
*/
function is_promise(value) {
return (
!!value &&
(typeof value === 'object' || typeof value === 'function') &&
typeof (/** @type {any} */ (value).then) === 'function'
);
}
function run(fn) {
return fn();
}
function blank_object() {
return Object.create(null);
}
/**
* @param {Function[]} fns
* @returns {void}
*/
function run_all(fns) {
fns.forEach(run);
}
/**
* @param {any} thing
* @returns {thing is Function}
*/
function is_function(thing) {
return typeof thing === 'function';
}
/** @returns {boolean} */
function safe_not_equal(a, b) {
return a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function';
}
/** @returns {boolean} */
function is_empty(obj) {
return Object.keys(obj).length === 0;
}
/**
* @param {Node} target
* @param {Node} node
* @returns {void}
*/
function append(target, node) {
target.appendChild(node);
}
/**
* @param {Node} target
* @param {Node} node
* @param {Node} [anchor]
* @returns {void}
*/
function insert(target, node, anchor) {
target.insertBefore(node, anchor || null);
}
/**
* @param {Node} node
* @returns {void}
*/
function detach(node) {
if (node.parentNode) {
node.parentNode.removeChild(node);
}
}
/**
* @returns {void} */
function destroy_each(iterations, detaching) {
for (let i = 0; i < iterations.length; i += 1) {
if (iterations[i]) iterations[i].d(detaching);
}
}
/**
* @template {keyof HTMLElementTagNameMap} K
* @param {K} name
* @returns {HTMLElementTagNameMap[K]}
*/
function element(name) {
return document.createElement(name);
}
/**
* @param {string} data
* @returns {Text}
*/
function text(data) {
return document.createTextNode(data);
}
/**
* @returns {Text} */
function space() {
return text(' ');
}
/**
* @returns {Text} */
function empty() {
return text('');
}
/**
* @param {Element} element
* @returns {ChildNode[]}
*/
function children(element) {
return Array.from(element.childNodes);
}
/**
* @param {Text} text
* @param {unknown} data
* @returns {void}
*/
function set_data(text, data) {
data = '' + data;
if (text.data === data) return;
text.data = /** @type {string} */ (data);
}
/**
* @typedef {Node & {
* claim_order?: number;
* hydrate_init?: true;
* actual_end_child?: NodeEx;
* childNodes: NodeListOf<NodeEx>;
* }} NodeEx
*/
/** @typedef {ChildNode & NodeEx} ChildNodeEx */
/** @typedef {NodeEx & { claim_order: number }} NodeEx2 */
/**
* @typedef {ChildNodeEx[] & {
* claim_info?: {
* last_index: number;
* total_claimed: number;
* };
* }} ChildNodeArray
*/
let current_component;
/** @returns {void} */
function set_current_component(component) {
current_component = component;
}
function get_current_component() {
if (!current_component) throw new Error('Function called outside component initialization');
return current_component;
}
const dirty_components = [];
const binding_callbacks = [];
let render_callbacks = [];
const flush_callbacks = [];
const resolved_promise = /* @__PURE__ */ Promise.resolve();
let update_scheduled = false;
/** @returns {void} */
function schedule_update() {
if (!update_scheduled) {
update_scheduled = true;
resolved_promise.then(flush);
}
}
/** @returns {void} */
function add_render_callback(fn) {
render_callbacks.push(fn);
}
// flush() calls callbacks in this order:
// 1. All beforeUpdate callbacks, in order: parents before children
// 2. All bind:this callbacks, in reverse order: children before parents.
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
// for afterUpdates called during the initial onMount, which are called in
// reverse order: children before parents.
// Since callbacks might update component values, which could trigger another
// call to flush(), the following steps guard against this:
// 1. During beforeUpdate, any updated components will be added to the
// dirty_components array and will cause a reentrant call to flush(). Because
// the flush index is kept outside the function, the reentrant call will pick
// up where the earlier call left off and go through all dirty components. The
// current_component value is saved and restored so that the reentrant call will
// not interfere with the "parent" flush() call.
// 2. bind:this callbacks cannot trigger new flush() calls.
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
// callback called a second time; the seen_callbacks set, outside the flush()
// function, guarantees this behavior.
const seen_callbacks = new Set();
let flushidx = 0; // Do *not* move this inside the flush() function
/** @returns {void} */
function flush() {
// Do not reenter flush while dirty components are updated, as this can
// result in an infinite loop. Instead, let the inner flush handle it.
// Reentrancy is ok afterwards for bindings etc.
if (flushidx !== 0) {
return;
}
const saved_component = current_component;
do {
// first, call beforeUpdate functions
// and update components
try {
while (flushidx < dirty_components.length) {
const component = dirty_components[flushidx];
flushidx++;
set_current_component(component);
update(component.$$);
}
} catch (e) {
// reset dirty state to not end up in a deadlocked state and then rethrow
dirty_components.length = 0;
flushidx = 0;
throw e;
}
set_current_component(null);
dirty_components.length = 0;
flushidx = 0;
while (binding_callbacks.length) binding_callbacks.pop()();
// then, once components are updated, call
// afterUpdate functions. This may cause
// subsequent updates...
for (let i = 0; i < render_callbacks.length; i += 1) {
const callback = render_callbacks[i];
if (!seen_callbacks.has(callback)) {
// ...so guard against infinite loops
seen_callbacks.add(callback);
callback();
}
}
render_callbacks.length = 0;
} while (dirty_components.length);
while (flush_callbacks.length) {
flush_callbacks.pop()();
}
update_scheduled = false;
seen_callbacks.clear();
set_current_component(saved_component);
}
/** @returns {void} */
function update($$) {
if ($$.fragment !== null) {
$$.update();
run_all($$.before_update);
const dirty = $$.dirty;
$$.dirty = [-1];
$$.fragment && $$.fragment.p($$.ctx, dirty);
$$.after_update.forEach(add_render_callback);
}
}
/**
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
* @param {Function[]} fns
* @returns {void}
*/
function flush_render_callbacks(fns) {
const filtered = [];
const targets = [];
render_callbacks.forEach((c) => (fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c)));
targets.forEach((c) => c());
render_callbacks = filtered;
}
const outroing = new Set();
/**
* @type {Outro}
*/
let outros;
/**
* @returns {void} */
function group_outros() {
outros = {
r: 0,
c: [],
p: outros // parent group
};
}
/**
* @returns {void} */
function check_outros() {
if (!outros.r) {
run_all(outros.c);
}
outros = outros.p;
}
/**
* @param {import('./private.js').Fragment} block
* @param {0 | 1} [local]
* @returns {void}
*/
function transition_in(block, local) {
if (block && block.i) {
outroing.delete(block);
block.i(local);
}
}
/**
* @param {import('./private.js').Fragment} block
* @param {0 | 1} local
* @param {0 | 1} [detach]
* @param {() => void} [callback]
* @returns {void}
*/
function transition_out(block, local, detach, callback) {
if (block && block.o) {
if (outroing.has(block)) return;
outroing.add(block);
outros.c.push(() => {
outroing.delete(block);
if (callback) {
if (detach) block.d(1);
callback();
}
});
block.o(local);
} else if (callback) {
callback();
}
}
/** @typedef {1} INTRO */
/** @typedef {0} OUTRO */
/** @typedef {{ direction: 'in' | 'out' | 'both' }} TransitionOptions */
/** @typedef {(node: Element, params: any, options: TransitionOptions) => import('../transition/public.js').TransitionConfig} TransitionFn */
/**
* @typedef {Object} Outro
* @property {number} r
* @property {Function[]} c
* @property {Object} p
*/
/**
* @typedef {Object} PendingProgram
* @property {number} start
* @property {INTRO|OUTRO} b
* @property {Outro} [group]
*/
/**
* @typedef {Object} Program
* @property {number} a
* @property {INTRO|OUTRO} b
* @property {1|-1} d
* @property {number} duration
* @property {number} start
* @property {number} end
* @property {Outro} [group]
*/
/**
* @template T
* @param {Promise<T>} promise
* @param {import('./private.js').PromiseInfo<T>} info
* @returns {boolean}
*/
function handle_promise(promise, info) {
const token = (info.token = {});
/**
* @param {import('./private.js').FragmentFactory} type
* @param {0 | 1 | 2} index
* @param {number} [key]
* @param {any} [value]
* @returns {void}
*/
function update(type, index, key, value) {
if (info.token !== token) return;
info.resolved = value;
let child_ctx = info.ctx;
if (key !== undefined) {
child_ctx = child_ctx.slice();
child_ctx[key] = value;
}
const block = type && (info.current = type)(child_ctx);
let needs_flush = false;
if (info.block) {
if (info.blocks) {
info.blocks.forEach((block, i) => {
if (i !== index && block) {
group_outros();
transition_out(block, 1, 1, () => {
if (info.blocks[i] === block) {
info.blocks[i] = null;
}
});
check_outros();
}
});
} else {
info.block.d(1);
}
block.c();
transition_in(block, 1);
block.m(info.mount(), info.anchor);
needs_flush = true;
}
info.block = block;
if (info.blocks) info.blocks[index] = block;
if (needs_flush) {
flush();
}
}
if (is_promise(promise)) {
const current_component = get_current_component();
promise.then(
(value) => {
set_current_component(current_component);
update(info.then, 1, info.value, value);
set_current_component(null);
},
(error) => {
set_current_component(current_component);
update(info.catch, 2, info.error, error);
set_current_component(null);
if (!info.hasCatch) {
throw error;
}
}
);
// if we previously had a then/catch block, destroy it
if (info.current !== info.pending) {
update(info.pending, 0);
return true;
}
} else {
if (info.current !== info.then) {
update(info.then, 1, info.value, promise);
return true;
}
info.resolved = /** @type {T} */ (promise);
}
}
/** @returns {void} */
function update_await_block_branch(info, ctx, dirty) {
const child_ctx = ctx.slice();
const { resolved } = info;
if (info.current === info.then) {
child_ctx[info.value] = resolved;
}
if (info.current === info.catch) {
child_ctx[info.error] = resolved;
}
info.block.p(child_ctx, dirty);
}
// general each functions:
function ensure_array_like(array_like_or_iterator) {
return array_like_or_iterator?.length !== undefined
? array_like_or_iterator
: Array.from(array_like_or_iterator);
}
/** @returns {void} */
function create_component(block) {
block && block.c();
}
/** @returns {void} */
function mount_component(component, target, anchor) {
const { fragment, after_update } = component.$$;
fragment && fragment.m(target, anchor);
// onMount happens before the initial afterUpdate
add_render_callback(() => {
const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
// if the component was destroyed immediately
// it will update the `$$.on_destroy` reference to `null`.
// the destructured on_destroy may still reference to the old array
if (component.$$.on_destroy) {
component.$$.on_destroy.push(...new_on_destroy);
} else {
// Edge case - component was destroyed immediately,
// most likely as a result of a binding initialising
run_all(new_on_destroy);
}
component.$$.on_mount = [];
});
after_update.forEach(add_render_callback);
}
/** @returns {void} */
function destroy_component(component, detaching) {
const $$ = component.$$;
if ($$.fragment !== null) {
flush_render_callbacks($$.after_update);
run_all($$.on_destroy);
$$.fragment && $$.fragment.d(detaching);
// TODO null out other refs, including component.$$ (but need to
// preserve final state?)
$$.on_destroy = $$.fragment = null;
$$.ctx = [];
}
}
/** @returns {void} */
function make_dirty(component, i) {
if (component.$$.dirty[0] === -1) {
dirty_components.push(component);
schedule_update();
component.$$.dirty.fill(0);
}
component.$$.dirty[(i / 31) | 0] |= 1 << i % 31;
}
// TODO: Document the other params
/**
* @param {SvelteComponent} component
* @param {import('./public.js').ComponentConstructorOptions} options
*
* @param {import('./utils.js')['not_equal']} not_equal Used to compare props and state values.
* @param {(target: Element | ShadowRoot) => void} [append_styles] Function that appends styles to the DOM when the component is first initialised.
* This will be the `add_css` function from the compiled component.
*
* @returns {void}
*/
function init(
component,
options,
instance,
create_fragment,
not_equal,
props,
append_styles = null,
dirty = [-1]
) {
const parent_component = current_component;
set_current_component(component);
/** @type {import('./private.js').T$$} */
const $$ = (component.$$ = {
fragment: null,
ctx: [],
// state
props,
update: noop,
not_equal,
bound: blank_object(),
// lifecycle
on_mount: [],
on_destroy: [],
on_disconnect: [],
before_update: [],
after_update: [],
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
// everything else
callbacks: blank_object(),
dirty,
skip_bound: false,
root: options.target || parent_component.$$.root
});
append_styles && append_styles($$.root);
let ready = false;
$$.ctx = instance
? instance(component, options.props || {}, (i, ret, ...rest) => {
const value = rest.length ? rest[0] : ret;
if ($$.ctx && not_equal($$.ctx[i], ($$.ctx[i] = value))) {
if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value);
if (ready) make_dirty(component, i);
}
return ret;
})
: [];
$$.update();
ready = true;
run_all($$.before_update);
// `false` as a special case of no DOM component
$$.fragment = create_fragment ? create_fragment($$.ctx) : false;
if (options.target) {
if (options.hydrate) {
// TODO: what is the correct type here?
// @ts-expect-error
const nodes = children(options.target);
$$.fragment && $$.fragment.l(nodes);
nodes.forEach(detach);
} else {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
$$.fragment && $$.fragment.c();
}
if (options.intro) transition_in(component.$$.fragment);
mount_component(component, options.target, options.anchor);
flush();
}
set_current_component(parent_component);
}
/**
* Base class for Svelte components. Used when dev=false.
*
* @template {Record<string, any>} [Props=any]
* @template {Record<string, any>} [Events=any]
*/
class SvelteComponent {
/**
* ### PRIVATE API
*
* Do not use, may change at any time
*
* @type {any}
*/
$$ = undefined;
/**
* ### PRIVATE API
*
* Do not use, may change at any time
*
* @type {any}
*/
$$set = undefined;
/** @returns {void} */
$destroy() {
destroy_component(this, 1);
this.$destroy = noop;
}
/**
* @template {Extract<keyof Events, string>} K
* @param {K} type
* @param {((e: Events[K]) => void) | null | undefined} callback
* @returns {() => void}
*/
$on(type, callback) {
if (!is_function(callback)) {
return noop;
}
const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);
callbacks.push(callback);
return () => {
const index = callbacks.indexOf(callback);
if (index !== -1) callbacks.splice(index, 1);
};
}
/**
* @param {Partial<Props>} props
* @returns {void}
*/
$set(props) {
if (this.$$set && !is_empty(props)) {
this.$$.skip_bound = true;
this.$$set(props);
this.$$.skip_bound = false;
}
}
}
/**
* @typedef {Object} CustomElementPropDefinition
* @property {string} [attribute]
* @property {boolean} [reflect]
* @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type]
*/
// generated during release, do not modify
const PUBLIC_VERSION = '4';
if (typeof window !== 'undefined')
// @ts-ignore
(window.__svelte || (window.__svelte = { v: new Set() })).v.add(PUBLIC_VERSION);
/* src\lib\Left.svelte generated by Svelte v4.2.20 */
function create_else_block$9(ctx) {
let li;
let t0;
let t1_value = /*data*/ ctx[0].RelativePath + "";
let t1;
let t2;
let t3_value = /*data*/ ctx[0].Size + "";
let t3;
let t4;
let t5_value = /*data*/ ctx[0].Ticks + "";
let t5;
return {
c() {
li = element("li");
t0 = text("Left: ");
t1 = text(t1_value);
t2 = text(" - ");
t3 = text(t3_value);
t4 = text(" - ");
t5 = text(t5_value);
},
m(target, anchor) {
insert(target, li, anchor);
append(li, t0);
append(li, t1);
append(li, t2);
append(li, t3);
append(li, t4);
append(li, t5);
},
p(ctx, dirty) {
if (dirty & /*data*/ 1 && t1_value !== (t1_value = /*data*/ ctx[0].RelativePath + "")) set_data(t1, t1_value);
if (dirty & /*data*/ 1 && t3_value !== (t3_value = /*data*/ ctx[0].Size + "")) set_data(t3, t3_value);
if (dirty & /*data*/ 1 && t5_value !== (t5_value = /*data*/ ctx[0].Ticks + "")) set_data(t5, t5_value);
},
d(detaching) {
if (detaching) {
detach(li);
}
}
};
}
// (5:0) {#if !data}
function create_if_block$9(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "Left data is null";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
function create_fragment$9(ctx) {
let if_block_anchor;
function select_block_type(ctx, dirty) {
if (!/*data*/ ctx[0]) return create_if_block$9;
return create_else_block$9;
}
let current_block_type = select_block_type(ctx);
let if_block = current_block_type(ctx);
return {
c() {
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
},
p(ctx, [dirty]) {
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
if_block.p(ctx, dirty);
} else {
if_block.d(1);
if_block = current_block_type(ctx);
if (if_block) {
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
}
},
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(if_block_anchor);
}
if_block.d(detaching);
}
};
}
function instance$9($$self, $$props, $$invalidate) {
let { data } = $$props;
$$self.$$set = $$props => {
if ('data' in $$props) $$invalidate(0, data = $$props.data);
};
return [data];
}
class Left extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance$9, create_fragment$9, safe_not_equal, { data: 0 });
}
}
/* src\lib\Right.svelte generated by Svelte v4.2.20 */
function create_else_block$8(ctx) {
let li;
let t0;
let t1_value = /*data*/ ctx[0].RelativePath + "";
let t1;
let t2;
let t3_value = /*data*/ ctx[0].Size + "";
let t3;
let t4;
let t5_value = /*data*/ ctx[0].Ticks + "";
let t5;
return {
c() {
li = element("li");
t0 = text("Right: ");
t1 = text(t1_value);
t2 = text(" - ");
t3 = text(t3_value);
t4 = text(" - ");
t5 = text(t5_value);
},
m(target, anchor) {
insert(target, li, anchor);
append(li, t0);
append(li, t1);
append(li, t2);
append(li, t3);
append(li, t4);
append(li, t5);
},
p(ctx, dirty) {
if (dirty & /*data*/ 1 && t1_value !== (t1_value = /*data*/ ctx[0].RelativePath + "")) set_data(t1, t1_value);
if (dirty & /*data*/ 1 && t3_value !== (t3_value = /*data*/ ctx[0].Size + "")) set_data(t3, t3_value);
if (dirty & /*data*/ 1 && t5_value !== (t5_value = /*data*/ ctx[0].Ticks + "")) set_data(t5, t5_value);
},
d(detaching) {
if (detaching) {
detach(li);
}
}
};
}
// (5:0) {#if !data}
function create_if_block$8(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "Right data is null";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
function create_fragment$8(ctx) {
let if_block_anchor;
function select_block_type(ctx, dirty) {
if (!/*data*/ ctx[0]) return create_if_block$8;
return create_else_block$8;
}
let current_block_type = select_block_type(ctx);
let if_block = current_block_type(ctx);
return {
c() {
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
},
p(ctx, [dirty]) {
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
if_block.p(ctx, dirty);
} else {
if_block.d(1);
if_block = current_block_type(ctx);
if (if_block) {
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
}
},
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(if_block_anchor);
}
if_block.d(detaching);
}
};
}
function instance$8($$self, $$props, $$invalidate) {
let { data } = $$props;
$$self.$$set = $$props => {
if ('data' in $$props) $$invalidate(0, data = $$props.data);
};
return [data];
}
class Right extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance$8, create_fragment$8, safe_not_equal, { data: 0 });
}
}
/* src\lib\AreEqual.svelte generated by Svelte v4.2.20 */
function get_each_context$6(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[1] = list[i];
return child_ctx;
}
// (12:0) {:else}
function create_else_block$7(ctx) {
let each_1_anchor;
let current;
let each_value = ensure_array_like(/*data*/ ctx[0]);
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block$6(get_each_context$6(ctx, each_value, i));
}
const out = i => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].m(target, anchor);
}
}
insert(target, each_1_anchor, anchor);
current = true;
},
p(ctx, dirty) {
if (dirty & /*data*/ 1) {
each_value = ensure_array_like(/*data*/ ctx[0]);
let i;
for (i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context$6(ctx, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block$6(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
group_outros();
for (i = each_value.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current) return;
for (let i = 0; i < each_value.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
if (detaching) {
detach(each_1_anchor);
}
destroy_each(each_blocks, detaching);
}
};
}
// (10:28)
function create_if_block_1$6(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "AreEqual data is empty";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (8:0) {#if !data}
function create_if_block$7(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "AreEqual data is null";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (13:2) {#each data as segment}
function create_each_block$6(ctx) {
let t0;
let left;
let t1;
let right;
let current;
left = new Left({ props: { data: /*segment*/ ctx[1].Left } });
right = new Right({
props: { data: /*segment*/ ctx[1].Right }
});
return {
c() {
t0 = text("AreEqual:\n ");
create_component(left.$$.fragment);
t1 = space();
create_component(right.$$.fragment);
},
m(target, anchor) {
insert(target, t0, anchor);
mount_component(left, target, anchor);
insert(target, t1, anchor);
mount_component(right, target, anchor);
current = true;
},
p(ctx, dirty) {
const left_changes = {};
if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left;
left.$set(left_changes);
const right_changes = {};
if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right;
right.$set(right_changes);
},
i(local) {
if (current) return;
transition_in(left.$$.fragment, local);
transition_in(right.$$.fragment, local);
current = true;
},
o(local) {
transition_out(left.$$.fragment, local);
transition_out(right.$$.fragment, local);
current = false;
},
d(detaching) {
if (detaching) {
detach(t0);
detach(t1);
}
destroy_component(left, detaching);
destroy_component(right, detaching);
}
};
}
function create_fragment$7(ctx) {
let current_block_type_index;
let if_block;
let if_block_anchor;
let current;
const if_block_creators = [create_if_block$7, create_if_block_1$6, create_else_block$7];
const if_blocks = [];
function select_block_type(ctx, dirty) {
if (!/*data*/ ctx[0]) return 0;
if (/*data*/ ctx[0].length === 0) return 1;
return 2;
}
current_block_type_index = select_block_type(ctx);
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
return {
c() {
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if_blocks[current_block_type_index].m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx, [dirty]) {
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type(ctx);
if (current_block_type_index === previous_block_index) {
if_blocks[current_block_type_index].p(ctx, dirty);
} else {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block = if_blocks[current_block_type_index];
if (!if_block) {
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
if_block.c();
} else {
if_block.p(ctx, dirty);
}
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
},
i(local) {
if (current) return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if (detaching) {
detach(if_block_anchor);
}
if_blocks[current_block_type_index].d(detaching);
}
};
}
function instance$7($$self, $$props, $$invalidate) {
let { data } = $$props;
$$self.$$set = $$props => {
if ('data' in $$props) $$invalidate(0, data = $$props.data);
};
return [data];
}
class AreEqual extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance$7, create_fragment$7, safe_not_equal, { data: 0 });
}
}
/* src\lib\LeftSideIsNewer.svelte generated by Svelte v4.2.20 */
function get_each_context$5(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[1] = list[i];
return child_ctx;
}
// (12:0) {:else}
function create_else_block$6(ctx) {
let each_1_anchor;
let current;
let each_value = ensure_array_like(/*data*/ ctx[0]);
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block$5(get_each_context$5(ctx, each_value, i));
}
const out = i => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].m(target, anchor);
}
}
insert(target, each_1_anchor, anchor);
current = true;
},
p(ctx, dirty) {
if (dirty & /*data*/ 1) {
each_value = ensure_array_like(/*data*/ ctx[0]);
let i;
for (i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context$5(ctx, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block$5(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
group_outros();
for (i = each_value.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current) return;
for (let i = 0; i < each_value.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
if (detaching) {
detach(each_1_anchor);
}
destroy_each(each_blocks, detaching);
}
};
}
// (10:28)
function create_if_block_1$5(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "LeftSideIsNewer data is empty";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (8:0) {#if !data}
function create_if_block$6(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "LeftSideIsNewer data is null";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (13:2) {#each data as segment}
function create_each_block$5(ctx) {
let t0;
let left;
let t1;
let right;
let current;
left = new Left({ props: { data: /*segment*/ ctx[1].Left } });
right = new Right({
props: { data: /*segment*/ ctx[1].Right }
});
return {
c() {
t0 = text("LeftSideIsNewer:\n ");
create_component(left.$$.fragment);
t1 = space();
create_component(right.$$.fragment);
},
m(target, anchor) {
insert(target, t0, anchor);
mount_component(left, target, anchor);
insert(target, t1, anchor);
mount_component(right, target, anchor);
current = true;
},
p(ctx, dirty) {
const left_changes = {};
if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left;
left.$set(left_changes);
const right_changes = {};
if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right;
right.$set(right_changes);
},
i(local) {
if (current) return;
transition_in(left.$$.fragment, local);
transition_in(right.$$.fragment, local);
current = true;
},
o(local) {
transition_out(left.$$.fragment, local);
transition_out(right.$$.fragment, local);
current = false;
},
d(detaching) {
if (detaching) {
detach(t0);
detach(t1);
}
destroy_component(left, detaching);
destroy_component(right, detaching);
}
};
}
function create_fragment$6(ctx) {
let current_block_type_index;
let if_block;
let if_block_anchor;
let current;
const if_block_creators = [create_if_block$6, create_if_block_1$5, create_else_block$6];
const if_blocks = [];
function select_block_type(ctx, dirty) {
if (!/*data*/ ctx[0]) return 0;
if (/*data*/ ctx[0].length === 0) return 1;
return 2;
}
current_block_type_index = select_block_type(ctx);
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
return {
c() {
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if_blocks[current_block_type_index].m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx, [dirty]) {
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type(ctx);
if (current_block_type_index === previous_block_index) {
if_blocks[current_block_type_index].p(ctx, dirty);
} else {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block = if_blocks[current_block_type_index];
if (!if_block) {
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
if_block.c();
} else {
if_block.p(ctx, dirty);
}
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
},
i(local) {
if (current) return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if (detaching) {
detach(if_block_anchor);
}
if_blocks[current_block_type_index].d(detaching);
}
};
}
function instance$6($$self, $$props, $$invalidate) {
let { data } = $$props;
$$self.$$set = $$props => {
if ('data' in $$props) $$invalidate(0, data = $$props.data);
};
return [data];
}
class LeftSideIsNewer extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance$6, create_fragment$6, safe_not_equal, { data: 0 });
}
}
/* src\lib\LeftSideOnly.svelte generated by Svelte v4.2.20 */
function get_each_context$4(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[1] = list[i];
return child_ctx;
}
// (12:0) {:else}
function create_else_block$5(ctx) {
let each_1_anchor;
let current;
let each_value = ensure_array_like(/*data*/ ctx[0]);
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i));
}
const out = i => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].m(target, anchor);
}
}
insert(target, each_1_anchor, anchor);
current = true;
},
p(ctx, dirty) {
if (dirty & /*data*/ 1) {
each_value = ensure_array_like(/*data*/ ctx[0]);
let i;
for (i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context$4(ctx, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block$4(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
group_outros();
for (i = each_value.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current) return;
for (let i = 0; i < each_value.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
if (detaching) {
detach(each_1_anchor);
}
destroy_each(each_blocks, detaching);
}
};
}
// (10:28)
function create_if_block_1$4(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "LeftSideOnly data is empty";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (8:0) {#if !data}
function create_if_block$5(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "LeftSideOnly data is null";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (13:2) {#each data as segment}
function create_each_block$4(ctx) {
let t0;
let left;
let t1;
let right;
let current;
left = new Left({ props: { data: /*segment*/ ctx[1].Left } });
right = new Right({
props: { data: /*segment*/ ctx[1].Right }
});
return {
c() {
t0 = text("LeftSideOnly:\n ");
create_component(left.$$.fragment);
t1 = space();
create_component(right.$$.fragment);
},
m(target, anchor) {
insert(target, t0, anchor);
mount_component(left, target, anchor);
insert(target, t1, anchor);
mount_component(right, target, anchor);
current = true;
},
p(ctx, dirty) {
const left_changes = {};
if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left;
left.$set(left_changes);
const right_changes = {};
if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right;
right.$set(right_changes);
},
i(local) {
if (current) return;
transition_in(left.$$.fragment, local);
transition_in(right.$$.fragment, local);
current = true;
},
o(local) {
transition_out(left.$$.fragment, local);
transition_out(right.$$.fragment, local);
current = false;
},
d(detaching) {
if (detaching) {
detach(t0);
detach(t1);
}
destroy_component(left, detaching);
destroy_component(right, detaching);
}
};
}
function create_fragment$5(ctx) {
let current_block_type_index;
let if_block;
let if_block_anchor;
let current;
const if_block_creators = [create_if_block$5, create_if_block_1$4, create_else_block$5];
const if_blocks = [];
function select_block_type(ctx, dirty) {
if (!/*data*/ ctx[0]) return 0;
if (/*data*/ ctx[0].length === 0) return 1;
return 2;
}
current_block_type_index = select_block_type(ctx);
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
return {
c() {
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if_blocks[current_block_type_index].m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx, [dirty]) {
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type(ctx);
if (current_block_type_index === previous_block_index) {
if_blocks[current_block_type_index].p(ctx, dirty);
} else {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block = if_blocks[current_block_type_index];
if (!if_block) {
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
if_block.c();
} else {
if_block.p(ctx, dirty);
}
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
},
i(local) {
if (current) return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if (detaching) {
detach(if_block_anchor);
}
if_blocks[current_block_type_index].d(detaching);
}
};
}
function instance$5($$self, $$props, $$invalidate) {
let { data } = $$props;
$$self.$$set = $$props => {
if ('data' in $$props) $$invalidate(0, data = $$props.data);
};
return [data];
}
class LeftSideOnly extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance$5, create_fragment$5, safe_not_equal, { data: 0 });
}
}
/* src\lib\NotEqualBut.svelte generated by Svelte v4.2.20 */
function get_each_context$3(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[1] = list[i];
return child_ctx;
}
// (12:0) {:else}
function create_else_block$4(ctx) {
let each_1_anchor;
let current;
let each_value = ensure_array_like(/*data*/ ctx[0]);
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i));
}
const out = i => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].m(target, anchor);
}
}
insert(target, each_1_anchor, anchor);
current = true;
},
p(ctx, dirty) {
if (dirty & /*data*/ 1) {
each_value = ensure_array_like(/*data*/ ctx[0]);
let i;
for (i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context$3(ctx, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block$3(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
group_outros();
for (i = each_value.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current) return;
for (let i = 0; i < each_value.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
if (detaching) {
detach(each_1_anchor);
}
destroy_each(each_blocks, detaching);
}
};
}
// (10:28)
function create_if_block_1$3(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "NotEqualBut data is empty";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (8:0) {#if !data}
function create_if_block$4(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "NotEqualBut data is null";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (13:2) {#each data as segment}
function create_each_block$3(ctx) {
let t0;
let left;
let t1;
let right;
let current;
left = new Left({ props: { data: /*segment*/ ctx[1].Left } });
right = new Right({
props: { data: /*segment*/ ctx[1].Right }
});
return {
c() {
t0 = text("NotEqualBut:\n ");
create_component(left.$$.fragment);
t1 = space();
create_component(right.$$.fragment);
},
m(target, anchor) {
insert(target, t0, anchor);
mount_component(left, target, anchor);
insert(target, t1, anchor);
mount_component(right, target, anchor);
current = true;
},
p(ctx, dirty) {
const left_changes = {};
if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left;
left.$set(left_changes);
const right_changes = {};
if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right;
right.$set(right_changes);
},
i(local) {
if (current) return;
transition_in(left.$$.fragment, local);
transition_in(right.$$.fragment, local);
current = true;
},
o(local) {
transition_out(left.$$.fragment, local);
transition_out(right.$$.fragment, local);
current = false;
},
d(detaching) {
if (detaching) {
detach(t0);
detach(t1);
}
destroy_component(left, detaching);
destroy_component(right, detaching);
}
};
}
function create_fragment$4(ctx) {
let current_block_type_index;
let if_block;
let if_block_anchor;
let current;
const if_block_creators = [create_if_block$4, create_if_block_1$3, create_else_block$4];
const if_blocks = [];
function select_block_type(ctx, dirty) {
if (!/*data*/ ctx[0]) return 0;
if (/*data*/ ctx[0].length === 0) return 1;
return 2;
}
current_block_type_index = select_block_type(ctx);
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
return {
c() {
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if_blocks[current_block_type_index].m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx, [dirty]) {
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type(ctx);
if (current_block_type_index === previous_block_index) {
if_blocks[current_block_type_index].p(ctx, dirty);
} else {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block = if_blocks[current_block_type_index];
if (!if_block) {
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
if_block.c();
} else {
if_block.p(ctx, dirty);
}
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
},
i(local) {
if (current) return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if (detaching) {
detach(if_block_anchor);
}
if_blocks[current_block_type_index].d(detaching);
}
};
}
function instance$4($$self, $$props, $$invalidate) {
let { data } = $$props;
$$self.$$set = $$props => {
if ('data' in $$props) $$invalidate(0, data = $$props.data);
};
return [data];
}
class NotEqualBut extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance$4, create_fragment$4, safe_not_equal, { data: 0 });
}
}
/* src\lib\Records.svelte generated by Svelte v4.2.20 */
function get_each_context$2(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[1] = list[i];
return child_ctx;
}
// (9:0) {:else}
function create_else_block$3(ctx) {
let t;
let each_1_anchor;
let each_value = ensure_array_like(/*data*/ ctx[0]);
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i));
}
return {
c() {
t = text("Records:\n ");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
insert(target, t, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].m(target, anchor);
}
}
insert(target, each_1_anchor, anchor);
},
p(ctx, dirty) {
if (dirty & /*data*/ 1) {
each_value = ensure_array_like(/*data*/ ctx[0]);
let i;
for (i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context$2(ctx, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
} else {
each_blocks[i] = create_each_block$2(child_ctx);
each_blocks[i].c();
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
for (; i < each_blocks.length; i += 1) {
each_blocks[i].d(1);
}
each_blocks.length = each_value.length;
}
},
d(detaching) {
if (detaching) {
detach(t);
detach(each_1_anchor);
}
destroy_each(each_blocks, detaching);
}
};
}
// (7:28)
function create_if_block_1$2(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "Records data is empty";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (5:0) {#if !data}
function create_if_block$3(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "Records data is null";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (11:2) {#each data as record}
function create_each_block$2(ctx) {
let li;
let t_value = /*record*/ ctx[1].Left.Records + "";
let t;
return {
c() {
li = element("li");
t = text(t_value);
},
m(target, anchor) {
insert(target, li, anchor);
append(li, t);
},
p(ctx, dirty) {
if (dirty & /*data*/ 1 && t_value !== (t_value = /*record*/ ctx[1].Left.Records + "")) set_data(t, t_value);
},
d(detaching) {
if (detaching) {
detach(li);
}
}
};
}
function create_fragment$3(ctx) {
let if_block_anchor;
function select_block_type(ctx, dirty) {
if (!/*data*/ ctx[0]) return create_if_block$3;
if (/*data*/ ctx[0].length === 0) return create_if_block_1$2;
return create_else_block$3;
}
let current_block_type = select_block_type(ctx);
let if_block = current_block_type(ctx);
return {
c() {
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
},
p(ctx, [dirty]) {
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
if_block.p(ctx, dirty);
} else {
if_block.d(1);
if_block = current_block_type(ctx);
if (if_block) {
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
}
},
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(if_block_anchor);
}
if_block.d(detaching);
}
};
}
function instance$3($$self, $$props, $$invalidate) {
let { data } = $$props;
$$self.$$set = $$props => {
if ('data' in $$props) $$invalidate(0, data = $$props.data);
};
return [data];
}
class Records extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance$3, create_fragment$3, safe_not_equal, { data: 0 });
}
}
/* src\lib\RightSideIsNewer.svelte generated by Svelte v4.2.20 */
function get_each_context$1(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[1] = list[i];
return child_ctx;
}
// (12:0) {:else}
function create_else_block$2(ctx) {
let each_1_anchor;
let current;
let each_value = ensure_array_like(/*data*/ ctx[0]);
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
}
const out = i => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].m(target, anchor);
}
}
insert(target, each_1_anchor, anchor);
current = true;
},
p(ctx, dirty) {
if (dirty & /*data*/ 1) {
each_value = ensure_array_like(/*data*/ ctx[0]);
let i;
for (i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context$1(ctx, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block$1(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
group_outros();
for (i = each_value.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current) return;
for (let i = 0; i < each_value.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
if (detaching) {
detach(each_1_anchor);
}
destroy_each(each_blocks, detaching);
}
};
}
// (10:28)
function create_if_block_1$1(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "RightSideIsNewer data is empty";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (8:0) {#if !data}
function create_if_block$2(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "RightSideIsNewer data is null";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (13:2) {#each data as segment}
function create_each_block$1(ctx) {
let t0;
let left;
let t1;
let right;
let current;
left = new Left({ props: { data: /*segment*/ ctx[1].Left } });
right = new Right({
props: { data: /*segment*/ ctx[1].Right }
});
return {
c() {
t0 = text("RightSideIsNewer:\n ");
create_component(left.$$.fragment);
t1 = space();
create_component(right.$$.fragment);
},
m(target, anchor) {
insert(target, t0, anchor);
mount_component(left, target, anchor);
insert(target, t1, anchor);
mount_component(right, target, anchor);
current = true;
},
p(ctx, dirty) {
const left_changes = {};
if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left;
left.$set(left_changes);
const right_changes = {};
if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right;
right.$set(right_changes);
},
i(local) {
if (current) return;
transition_in(left.$$.fragment, local);
transition_in(right.$$.fragment, local);
current = true;
},
o(local) {
transition_out(left.$$.fragment, local);
transition_out(right.$$.fragment, local);
current = false;
},
d(detaching) {
if (detaching) {
detach(t0);
detach(t1);
}
destroy_component(left, detaching);
destroy_component(right, detaching);
}
};
}
function create_fragment$2(ctx) {
let current_block_type_index;
let if_block;
let if_block_anchor;
let current;
const if_block_creators = [create_if_block$2, create_if_block_1$1, create_else_block$2];
const if_blocks = [];
function select_block_type(ctx, dirty) {
if (!/*data*/ ctx[0]) return 0;
if (/*data*/ ctx[0].length === 0) return 1;
return 2;
}
current_block_type_index = select_block_type(ctx);
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
return {
c() {
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if_blocks[current_block_type_index].m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx, [dirty]) {
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type(ctx);
if (current_block_type_index === previous_block_index) {
if_blocks[current_block_type_index].p(ctx, dirty);
} else {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block = if_blocks[current_block_type_index];
if (!if_block) {
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
if_block.c();
} else {
if_block.p(ctx, dirty);
}
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
},
i(local) {
if (current) return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if (detaching) {
detach(if_block_anchor);
}
if_blocks[current_block_type_index].d(detaching);
}
};
}
function instance$2($$self, $$props, $$invalidate) {
let { data } = $$props;
$$self.$$set = $$props => {
if ('data' in $$props) $$invalidate(0, data = $$props.data);
};
return [data];
}
class RightSideIsNewer extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance$2, create_fragment$2, safe_not_equal, { data: 0 });
}
}
/* src\lib\RightSideOnly.svelte generated by Svelte v4.2.20 */
function get_each_context(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[1] = list[i];
return child_ctx;
}
// (12:0) {:else}
function create_else_block$1(ctx) {
let each_1_anchor;
let current;
let each_value = ensure_array_like(/*data*/ ctx[0]);
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
}
const out = i => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
if (each_blocks[i]) {
each_blocks[i].m(target, anchor);
}
}
insert(target, each_1_anchor, anchor);
current = true;
},
p(ctx, dirty) {
if (dirty & /*data*/ 1) {
each_value = ensure_array_like(/*data*/ ctx[0]);
let i;
for (i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context(ctx, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
group_outros();
for (i = each_value.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current) return;
for (let i = 0; i < each_value.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
if (detaching) {
detach(each_1_anchor);
}
destroy_each(each_blocks, detaching);
}
};
}
// (10:28)
function create_if_block_1(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "RightSideOnly data is empty";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (8:0) {#if !data}
function create_if_block$1(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "RightSideOnly data is null";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (13:2) {#each data as segment}
function create_each_block(ctx) {
let t0;
let left;
let t1;
let right;
let current;
left = new Left({ props: { data: /*segment*/ ctx[1].Left } });
right = new Right({
props: { data: /*segment*/ ctx[1].Right }
});
return {
c() {
t0 = text("RightSideOnly:\n ");
create_component(left.$$.fragment);
t1 = space();
create_component(right.$$.fragment);
},
m(target, anchor) {
insert(target, t0, anchor);
mount_component(left, target, anchor);
insert(target, t1, anchor);
mount_component(right, target, anchor);
current = true;
},
p(ctx, dirty) {
const left_changes = {};
if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left;
left.$set(left_changes);
const right_changes = {};
if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right;
right.$set(right_changes);
},
i(local) {
if (current) return;
transition_in(left.$$.fragment, local);
transition_in(right.$$.fragment, local);
current = true;
},
o(local) {
transition_out(left.$$.fragment, local);
transition_out(right.$$.fragment, local);
current = false;
},
d(detaching) {
if (detaching) {
detach(t0);
detach(t1);
}
destroy_component(left, detaching);
destroy_component(right, detaching);
}
};
}
function create_fragment$1(ctx) {
let current_block_type_index;
let if_block;
let if_block_anchor;
let current;
const if_block_creators = [create_if_block$1, create_if_block_1, create_else_block$1];
const if_blocks = [];
function select_block_type(ctx, dirty) {
if (!/*data*/ ctx[0]) return 0;
if (/*data*/ ctx[0].length === 0) return 1;
return 2;
}
current_block_type_index = select_block_type(ctx);
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
return {
c() {
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if_blocks[current_block_type_index].m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx, [dirty]) {
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type(ctx);
if (current_block_type_index === previous_block_index) {
if_blocks[current_block_type_index].p(ctx, dirty);
} else {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block = if_blocks[current_block_type_index];
if (!if_block) {
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
if_block.c();
} else {
if_block.p(ctx, dirty);
}
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
},
i(local) {
if (current) return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if (detaching) {
detach(if_block_anchor);
}
if_blocks[current_block_type_index].d(detaching);
}
};
}
function instance$1($$self, $$props, $$invalidate) {
let { data } = $$props;
$$self.$$set = $$props => {
if ('data' in $$props) $$invalidate(0, data = $$props.data);
};
return [data];
}
class RightSideOnly extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance$1, create_fragment$1, safe_not_equal, { data: 0 });
}
}
/* src\lib\Review.svelte generated by Svelte v4.2.20 */
function create_catch_block(ctx) {
let span;
return {
c() {
span = element("span");
span.textContent = `${/*error*/ ctx[5]}`;
},
m(target, anchor) {
insert(target, span, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(span);
}
}
};
}
// (24:0) {:then data}
function create_then_block(ctx) {
let current_block_type_index;
let if_block;
let if_block_anchor;
let current;
const if_block_creators = [create_if_block, create_else_block];
const if_blocks = [];
function select_block_type(ctx, dirty) {
if (!/*data*/ ctx[4]) return 0;
return 1;
}
current_block_type_index = select_block_type(ctx);
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
return {
c() {
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if_blocks[current_block_type_index].m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx, dirty) {
if_block.p(ctx, dirty);
},
i(local) {
if (current) return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if (detaching) {
detach(if_block_anchor);
}
if_blocks[current_block_type_index].d(detaching);
}
};
}
// (28:2) {:else}
function create_else_block(ctx) {
let p;
let t1;
let areequal;
let t2;
let leftsideisnewer;
let t3;
let leftsideonly;
let t4;
let notequalbut;
let t5;
let records;
let t6;
let rightsideisnewer;
let t7;
let rightsideonly;
let current;
areequal = new AreEqual({
props: { data: /*data*/ ctx[4].AreEqual }
});
leftsideisnewer = new LeftSideIsNewer({
props: { data: /*data*/ ctx[4].LeftSideIsNewer }
});
leftsideonly = new LeftSideOnly({
props: { data: /*data*/ ctx[4].LeftSideOnly }
});
notequalbut = new NotEqualBut({
props: { data: /*data*/ ctx[4].NotEqualBut }
});
records = new Records({ props: { data: /*data*/ ctx[4].Records } });
rightsideisnewer = new RightSideIsNewer({
props: { data: /*data*/ ctx[4].RightSideIsNewer }
});
rightsideonly = new RightSideOnly({
props: { data: /*data*/ ctx[4].RightSideOnly }
});
return {
c() {
p = element("p");
p.textContent = "Review:";
t1 = space();
create_component(areequal.$$.fragment);
t2 = space();
create_component(leftsideisnewer.$$.fragment);
t3 = space();
create_component(leftsideonly.$$.fragment);
t4 = space();
create_component(notequalbut.$$.fragment);
t5 = space();
create_component(records.$$.fragment);
t6 = space();
create_component(rightsideisnewer.$$.fragment);
t7 = space();
create_component(rightsideonly.$$.fragment);
},
m(target, anchor) {
insert(target, p, anchor);
insert(target, t1, anchor);
mount_component(areequal, target, anchor);
insert(target, t2, anchor);
mount_component(leftsideisnewer, target, anchor);
insert(target, t3, anchor);
mount_component(leftsideonly, target, anchor);
insert(target, t4, anchor);
mount_component(notequalbut, target, anchor);
insert(target, t5, anchor);
mount_component(records, target, anchor);
insert(target, t6, anchor);
mount_component(rightsideisnewer, target, anchor);
insert(target, t7, anchor);
mount_component(rightsideonly, target, anchor);
current = true;
},
p: noop,
i(local) {
if (current) return;
transition_in(areequal.$$.fragment, local);
transition_in(leftsideisnewer.$$.fragment, local);
transition_in(leftsideonly.$$.fragment, local);
transition_in(notequalbut.$$.fragment, local);
transition_in(records.$$.fragment, local);
transition_in(rightsideisnewer.$$.fragment, local);
transition_in(rightsideonly.$$.fragment, local);
current = true;
},
o(local) {
transition_out(areequal.$$.fragment, local);
transition_out(leftsideisnewer.$$.fragment, local);
transition_out(leftsideonly.$$.fragment, local);
transition_out(notequalbut.$$.fragment, local);
transition_out(records.$$.fragment, local);
transition_out(rightsideisnewer.$$.fragment, local);
transition_out(rightsideonly.$$.fragment, local);
current = false;
},
d(detaching) {
if (detaching) {
detach(p);
detach(t1);
detach(t2);
detach(t3);
detach(t4);
detach(t5);
detach(t6);
detach(t7);
}
destroy_component(areequal, detaching);
destroy_component(leftsideisnewer, detaching);
destroy_component(leftsideonly, detaching);
destroy_component(notequalbut, detaching);
destroy_component(records, detaching);
destroy_component(rightsideisnewer, detaching);
destroy_component(rightsideonly, detaching);
}
};
}
// (26:2) {#if !data}
function create_if_block(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "Review data is null";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(p);
}
}
};
}
// (21:16) <!-- optionally show something while promise is pending --> <span>waiting</span> {:then data}
function create_pending_block(ctx) {
let span;
return {
c() {
span = element("span");
span.textContent = "waiting";
},
m(target, anchor) {
insert(target, span, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(span);
}
}
};
}
function create_fragment(ctx) {
let await_block_anchor;
let current;
let info = {
ctx,
current: null,
token: null,
hasCatch: true,
pending: create_pending_block,
then: create_then_block,
catch: create_catch_block,
value: 4,
error: 5,
blocks: [,,,]
};
handle_promise(/*promise*/ ctx[0], info);
return {
c() {
await_block_anchor = empty();
info.block.c();
},
m(target, anchor) {
insert(target, await_block_anchor, anchor);
info.block.m(target, info.anchor = anchor);
info.mount = () => await_block_anchor.parentNode;
info.anchor = await_block_anchor;
current = true;
},
p(new_ctx, [dirty]) {
ctx = new_ctx;
update_await_block_branch(info, ctx, dirty);
},
i(local) {
if (current) return;
transition_in(info.block);
current = true;
},
o(local) {
for (let i = 0; i < 3; i += 1) {
const block = info.blocks[i];
transition_out(block);
}
current = false;
},
d(detaching) {
if (detaching) {
detach(await_block_anchor);
}
info.block.d(detaching);
info.token = null;
info = null;
}
};
}
function instance($$self, $$props, $$invalidate) {
let { page } = $$props;
let { json } = $$props;
let { baseUrl } = $$props;
let promise = fetch(baseUrl + page, {
method: 'POST',
body: json,
headers: { 'Content-Type': 'application/json' }
}).then(x => x.json());
$$self.$$set = $$props => {
if ('page' in $$props) $$invalidate(1, page = $$props.page);
if ('json' in $$props) $$invalidate(2, json = $$props.json);
if ('baseUrl' in $$props) $$invalidate(3, baseUrl = $$props.baseUrl);
};
return [promise, page, json, baseUrl];
}
class Review extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance, create_fragment, safe_not_equal, { page: 1, json: 2, baseUrl: 3 });
}
}
var div = document.createElement('DIV');
var script = document.currentScript;
script.parentNode.insertBefore(div, script);
const page = '/api/SyncV1/?';
const baseUrl = 'http://localhost:5004';
const json = `
{
"LeftDirectory": "D:/Tmp/phares/VisualStudioCodeLeft",
"RightDirectory": "D:/Tmp/phares/VisualStudioCode",
"Records": [
{
"RelativePath": "D:/Tmp/phares/VisualStudioCode",
"Size": 0,
"Ticks": 0
},
{
"RelativePath": "z-exclude-patterns.nsv",
"Size": 230,
"Ticks": 638843891271017574
},
{
"RelativePath": "z-include-patterns.nsv",
"Size": 4,
"Ticks": 638796666663591762
}
]
}
`;
new Review({
target: div,
props: { page: page, baseUrl: baseUrl, json: json },
});
})();