: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '
: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '
'"
- )
- }
- }
-
- /* src\Table.svelte generated by Svelte v3.12.1 */
-
- const file$7 = "src\\Table.svelte"
-
- function get_each_context_1$1(ctx, list, i) {
- const child_ctx = Object.create(ctx)
- child_ctx.col = list[i]
- child_ctx.index = i
- return child_ctx
- }
-
- function get_each_context$1(ctx, list, i) {
- const child_ctx = Object.create(ctx)
- child_ctx.row = list[i]
- return child_ctx
- }
-
- function get_each_context_2(ctx, list, i) {
- const child_ctx = Object.create(ctx)
- child_ctx.col = list[i]
- return child_ctx
- }
-
- // (31:12) {#each columns as col}
- function create_each_block_2(ctx) {
- var th,
- t_value = ctx.col.title + "",
- t,
- th_class_value
-
- const block = {
- c: function create() {
- th = element("th")
- t = text(t_value)
- this.h()
- },
-
- l: function claim(nodes) {
- th = claim_element(nodes, "TH", { class: true }, false)
- var th_nodes = children(th)
-
- t = claim_text(th_nodes, t_value)
- th_nodes.forEach(detach_dev)
- this.h()
- },
-
- h: function hydrate() {
- attr_dev(
- th,
- "class",
- (th_class_value = "" + null_to_empty(ctx.thClass) + " svelte-h8rqk6")
- )
- add_location(th, file$7, 31, 12, 623)
- },
-
- m: function mount(target, anchor) {
- insert_dev(target, th, anchor)
- append_dev(th, t)
- },
-
- p: function update(changed, ctx) {
- if (changed.columns && t_value !== (t_value = ctx.col.title + "")) {
- set_data_dev(t, t_value)
- }
-
- if (
- changed.thClass &&
- th_class_value !==
- (th_class_value =
- "" + null_to_empty(ctx.thClass) + " svelte-h8rqk6")
- ) {
- attr_dev(th, "class", th_class_value)
- }
- },
-
- d: function destroy(detaching) {
- if (detaching) {
- detach_dev(th)
- }
- },
- }
- dispatch_dev("SvelteRegisterBlock", {
- block,
- id: create_each_block_2.name,
- type: "each",
- source: "(31:12) {#each columns as col}",
- ctx,
- })
- return block
- }
-
- // (37:8) {#if data}
- function create_if_block$3(ctx) {
- var each_1_anchor
-
- let each_value = ctx.data
-
- 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 block = {
- c: function create() {
- for (let i = 0; i < each_blocks.length; i += 1) {
- each_blocks[i].c()
- }
-
- each_1_anchor = empty()
- },
-
- l: function claim(nodes) {
- for (let i = 0; i < each_blocks.length; i += 1) {
- each_blocks[i].l(nodes)
- }
-
- each_1_anchor = empty()
- },
-
- m: function mount(target, anchor) {
- for (let i = 0; i < each_blocks.length; i += 1) {
- each_blocks[i].m(target, anchor)
- }
-
- insert_dev(target, each_1_anchor, anchor)
- },
-
- p: function update(changed, ctx) {
- if (
- changed.trClass ||
- changed.columns ||
- changed.thClass ||
- changed.cellValue ||
- changed.data
- ) {
- each_value = ctx.data
-
- 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(changed, child_ctx)
- } else {
- each_blocks[i] = create_each_block$1(child_ctx)
- each_blocks[i].c()
- each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor)
+ function claim_text(nodes, data) {
+ for (let i = 0; i < nodes.length; i += 1) {
+ const node = nodes[i];
+ if (node.nodeType === 3) {
+ node.data = '' + data;
+ return nodes.splice(i, 1)[0];
}
- }
-
- for (; i < each_blocks.length; i += 1) {
- each_blocks[i].d(1)
- }
- each_blocks.length = each_value.length
}
- },
-
- d: function destroy(detaching) {
- destroy_each(each_blocks, detaching)
-
- if (detaching) {
- detach_dev(each_1_anchor)
- }
- },
+ return text(data);
}
- dispatch_dev("SvelteRegisterBlock", {
- block,
- id: create_if_block$3.name,
- type: "if",
- source: "(37:8) {#if data}",
- ctx,
- })
- return block
- }
-
- // (41:12) {#each columns as col, index}
- function create_each_block_1$1(ctx) {
- var th,
- t_value = ctx.cellValue(ctx.index, ctx.row) + "",
- t,
- th_class_value
-
- const block = {
- c: function create() {
- th = element("th")
- t = text(t_value)
- this.h()
- },
-
- l: function claim(nodes) {
- th = claim_element(nodes, "TH", { class: true }, false)
- var th_nodes = children(th)
-
- t = claim_text(th_nodes, t_value)
- th_nodes.forEach(detach_dev)
- this.h()
- },
-
- h: function hydrate() {
- attr_dev(
- th,
- "class",
- (th_class_value = "" + null_to_empty(ctx.thClass) + " svelte-h8rqk6")
- )
- add_location(th, file$7, 41, 12, 923)
- },
-
- m: function mount(target, anchor) {
- insert_dev(target, th, anchor)
- append_dev(th, t)
- },
-
- p: function update(changed, ctx) {
- if (
- changed.data &&
- t_value !== (t_value = ctx.cellValue(ctx.index, ctx.row) + "")
- ) {
- set_data_dev(t, t_value)
- }
-
- if (
- changed.thClass &&
- th_class_value !==
- (th_class_value =
- "" + null_to_empty(ctx.thClass) + " svelte-h8rqk6")
- ) {
- attr_dev(th, "class", th_class_value)
- }
- },
-
- d: function destroy(detaching) {
- if (detaching) {
- detach_dev(th)
- }
- },
+ function claim_space(nodes) {
+ return claim_text(nodes, ' ');
}
- dispatch_dev("SvelteRegisterBlock", {
- block,
- id: create_each_block_1$1.name,
- type: "each",
- source: "(41:12) {#each columns as col, index}",
- ctx,
- })
- return block
- }
-
- // (38:8) {#each data as row}
- function create_each_block$1(ctx) {
- var tr, t, tr_class_value, dispose
-
- let each_value_1 = ctx.columns
-
- let each_blocks = []
-
- for (let i = 0; i < each_value_1.length; i += 1) {
- each_blocks[i] = create_each_block_1$1(
- get_each_context_1$1(ctx, each_value_1, i)
- )
+ function set_input_value(input, value) {
+ if (value != null || input.value) {
+ input.value = value;
+ }
+ }
+ function toggle_class(element, name, toggle) {
+ element.classList[toggle ? 'add' : 'remove'](name);
+ }
+ function custom_event(type, detail) {
+ const e = document.createEvent('CustomEvent');
+ e.initCustomEvent(type, false, false, detail);
+ return e;
}
- const block = {
- c: function create() {
- tr = element("tr")
+ let current_component;
+ 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;
+ }
- for (let i = 0; i < each_blocks.length; i += 1) {
- each_blocks[i].c()
+ const dirty_components = [];
+ const binding_callbacks = [];
+ const render_callbacks = [];
+ const flush_callbacks = [];
+ const resolved_promise = Promise.resolve();
+ let update_scheduled = false;
+ function schedule_update() {
+ if (!update_scheduled) {
+ update_scheduled = true;
+ resolved_promise.then(flush);
}
-
- t = space()
- this.h()
- },
-
- l: function claim(nodes) {
- tr = claim_element(nodes, "TR", { class: true }, false)
- var tr_nodes = children(tr)
-
- for (let i = 0; i < each_blocks.length; i += 1) {
- each_blocks[i].l(tr_nodes)
- }
-
- t = claim_space(tr_nodes)
- tr_nodes.forEach(detach_dev)
- this.h()
- },
-
- h: function hydrate() {
- attr_dev(
- tr,
- "class",
- (tr_class_value = "" + null_to_empty(ctx.trClass) + " svelte-h8rqk6")
- )
- add_location(tr, file$7, 38, 8, 800)
- dispose = listen_dev(tr, "click", ctx.rowClickHandler(ctx.row))
- },
-
- m: function mount(target, anchor) {
- insert_dev(target, tr, anchor)
-
- for (let i = 0; i < each_blocks.length; i += 1) {
- each_blocks[i].m(tr, null)
- }
-
- append_dev(tr, t)
- },
-
- p: function update(changed, new_ctx) {
- ctx = new_ctx
- if (
- changed.thClass ||
- changed.cellValue ||
- changed.data ||
- changed.columns
- ) {
- each_value_1 = ctx.columns
-
- let i
- for (i = 0; i < each_value_1.length; i += 1) {
- const child_ctx = get_each_context_1$1(ctx, each_value_1, i)
-
- if (each_blocks[i]) {
- each_blocks[i].p(changed, child_ctx)
- } else {
- each_blocks[i] = create_each_block_1$1(child_ctx)
- each_blocks[i].c()
- each_blocks[i].m(tr, t)
+ }
+ function add_render_callback(fn) {
+ render_callbacks.push(fn);
+ }
+ function flush() {
+ const seen_callbacks = new Set();
+ do {
+ // first, call beforeUpdate functions
+ // and update components
+ while (dirty_components.length) {
+ const component = dirty_components.shift();
+ set_current_component(component);
+ update(component.$$);
}
- }
-
- for (; i < each_blocks.length; i += 1) {
- each_blocks[i].d(1)
- }
- each_blocks.length = each_value_1.length
- }
-
- if (
- changed.trClass &&
- tr_class_value !==
- (tr_class_value =
- "" + null_to_empty(ctx.trClass) + " svelte-h8rqk6")
- ) {
- attr_dev(tr, "class", tr_class_value)
- }
- },
-
- d: function destroy(detaching) {
- if (detaching) {
- detach_dev(tr)
- }
-
- destroy_each(each_blocks, detaching)
-
- dispose()
- },
- }
- dispatch_dev("SvelteRegisterBlock", {
- block,
- id: create_each_block$1.name,
- type: "each",
- source: "(38:8) {#each data as row}",
- ctx,
- })
- return block
- }
-
- function create_fragment$7(ctx) {
- var table,
- thead,
- tr,
- tr_class_value,
- thead_class_value,
- t,
- tbody,
- tbody_class_value,
- table_class_value
-
- let each_value_2 = ctx.columns
-
- let each_blocks = []
-
- for (let i = 0; i < each_value_2.length; i += 1) {
- each_blocks[i] = create_each_block_2(
- get_each_context_2(ctx, each_value_2, i)
- )
- }
-
- var if_block = ctx.data && create_if_block$3(ctx)
-
- const block = {
- c: function create() {
- table = element("table")
- thead = element("thead")
- tr = element("tr")
-
- for (let i = 0; i < each_blocks.length; i += 1) {
- each_blocks[i].c()
- }
-
- t = space()
- tbody = element("tbody")
- if (if_block) if_block.c()
- this.h()
- },
-
- l: function claim(nodes) {
- table = claim_element(nodes, "TABLE", { class: true }, false)
- var table_nodes = children(table)
-
- thead = claim_element(table_nodes, "THEAD", { class: true }, false)
- var thead_nodes = children(thead)
-
- tr = claim_element(thead_nodes, "TR", { class: true }, false)
- var tr_nodes = children(tr)
-
- for (let i = 0; i < each_blocks.length; i += 1) {
- each_blocks[i].l(tr_nodes)
- }
-
- tr_nodes.forEach(detach_dev)
- thead_nodes.forEach(detach_dev)
- t = claim_space(table_nodes)
-
- tbody = claim_element(table_nodes, "TBODY", { class: true }, false)
- var tbody_nodes = children(tbody)
-
- if (if_block) if_block.l(tbody_nodes)
- tbody_nodes.forEach(detach_dev)
- table_nodes.forEach(detach_dev)
- this.h()
- },
-
- h: function hydrate() {
- attr_dev(
- tr,
- "class",
- (tr_class_value = "" + null_to_empty(ctx.trClass) + " svelte-h8rqk6")
- )
- add_location(tr, file$7, 29, 8, 553)
- attr_dev(
- thead,
- "class",
- (thead_class_value =
- "" + null_to_empty(ctx.theadClass) + " svelte-h8rqk6")
- )
- add_location(thead, file$7, 28, 4, 517)
- attr_dev(
- tbody,
- "class",
- (tbody_class_value =
- "" + null_to_empty(ctx.tbodyClass) + " svelte-h8rqk6")
- )
- add_location(tbody, file$7, 35, 4, 715)
- attr_dev(
- table,
- "class",
- (table_class_value =
- "" + null_to_empty(ctx.tableClass) + " svelte-h8rqk6")
- )
- add_location(table, file$7, 27, 1, 485)
- },
-
- m: function mount(target, anchor) {
- insert_dev(target, table, anchor)
- append_dev(table, thead)
- append_dev(thead, tr)
-
- for (let i = 0; i < each_blocks.length; i += 1) {
- each_blocks[i].m(tr, null)
- }
-
- append_dev(table, t)
- append_dev(table, tbody)
- if (if_block) if_block.m(tbody, null)
- },
-
- p: function update(changed, ctx) {
- if (changed.thClass || changed.columns) {
- each_value_2 = ctx.columns
-
- let i
- for (i = 0; i < each_value_2.length; i += 1) {
- const child_ctx = get_each_context_2(ctx, each_value_2, i)
-
- if (each_blocks[i]) {
- each_blocks[i].p(changed, child_ctx)
- } else {
- each_blocks[i] = create_each_block_2(child_ctx)
- each_blocks[i].c()
- each_blocks[i].m(tr, null)
- }
- }
-
- for (; i < each_blocks.length; i += 1) {
- each_blocks[i].d(1)
- }
- each_blocks.length = each_value_2.length
- }
-
- if (
- changed.trClass &&
- tr_class_value !==
- (tr_class_value =
- "" + null_to_empty(ctx.trClass) + " svelte-h8rqk6")
- ) {
- attr_dev(tr, "class", tr_class_value)
- }
-
- if (
- changed.theadClass &&
- thead_class_value !==
- (thead_class_value =
- "" + null_to_empty(ctx.theadClass) + " svelte-h8rqk6")
- ) {
- attr_dev(thead, "class", thead_class_value)
- }
-
- if (ctx.data) {
- if (if_block) {
- if_block.p(changed, ctx)
- } else {
- if_block = create_if_block$3(ctx)
- if_block.c()
- if_block.m(tbody, null)
- }
- } else if (if_block) {
- if_block.d(1)
- if_block = null
- }
-
- if (
- changed.tbodyClass &&
- tbody_class_value !==
- (tbody_class_value =
- "" + null_to_empty(ctx.tbodyClass) + " svelte-h8rqk6")
- ) {
- attr_dev(tbody, "class", tbody_class_value)
- }
-
- if (
- changed.tableClass &&
- table_class_value !==
- (table_class_value =
- "" + null_to_empty(ctx.tableClass) + " svelte-h8rqk6")
- ) {
- attr_dev(table, "class", table_class_value)
- }
- },
-
- i: noop,
- o: noop,
-
- d: function destroy(detaching) {
- if (detaching) {
- detach_dev(table)
- }
-
- destroy_each(each_blocks, detaching)
-
- if (if_block) if_block.d()
- },
- }
- dispatch_dev("SvelteRegisterBlock", {
- block,
- id: create_fragment$7.name,
- type: "component",
- source: "",
- ctx,
- })
- return block
- }
-
- function instance$7($$self, $$props, $$invalidate) {
- let {
- columns = [],
- data = "",
- tableClass = "",
- theadClass = "",
- tbodyClass = "",
- trClass = "",
- thClass = "",
- onRowClick,
- _bb,
- } = $$props
-
- const rowClickHandler = row => () => {
- _bb.call(onRowClick, row)
- }
-
- const cellValue = (colIndex, row) => {
- const val = _bb.getStateOrValue(_bb.props.columns[colIndex].value, row)
- return val
- }
-
- const writable_props = [
- "columns",
- "data",
- "tableClass",
- "theadClass",
- "tbodyClass",
- "trClass",
- "thClass",
- "onRowClick",
- "_bb",
- ]
- Object.keys($$props).forEach(key => {
- if (!writable_props.includes(key) && !key.startsWith("$$"))
- console.warn(`
was created with unknown prop '${key}'`)
- })
-
- $$self.$set = $$props => {
- if ("columns" in $$props)
- $$invalidate("columns", (columns = $$props.columns))
- if ("data" in $$props) $$invalidate("data", (data = $$props.data))
- if ("tableClass" in $$props)
- $$invalidate("tableClass", (tableClass = $$props.tableClass))
- if ("theadClass" in $$props)
- $$invalidate("theadClass", (theadClass = $$props.theadClass))
- if ("tbodyClass" in $$props)
- $$invalidate("tbodyClass", (tbodyClass = $$props.tbodyClass))
- if ("trClass" in $$props)
- $$invalidate("trClass", (trClass = $$props.trClass))
- if ("thClass" in $$props)
- $$invalidate("thClass", (thClass = $$props.thClass))
- if ("onRowClick" in $$props)
- $$invalidate("onRowClick", (onRowClick = $$props.onRowClick))
- if ("_bb" in $$props) $$invalidate("_bb", (_bb = $$props._bb))
- }
-
- $$self.$capture_state = () => {
- return {
- columns,
- data,
- tableClass,
- theadClass,
- tbodyClass,
- trClass,
- thClass,
- onRowClick,
- _bb,
- }
- }
-
- $$self.$inject_state = $$props => {
- if ("columns" in $$props)
- $$invalidate("columns", (columns = $$props.columns))
- if ("data" in $$props) $$invalidate("data", (data = $$props.data))
- if ("tableClass" in $$props)
- $$invalidate("tableClass", (tableClass = $$props.tableClass))
- if ("theadClass" in $$props)
- $$invalidate("theadClass", (theadClass = $$props.theadClass))
- if ("tbodyClass" in $$props)
- $$invalidate("tbodyClass", (tbodyClass = $$props.tbodyClass))
- if ("trClass" in $$props)
- $$invalidate("trClass", (trClass = $$props.trClass))
- if ("thClass" in $$props)
- $$invalidate("thClass", (thClass = $$props.thClass))
- if ("onRowClick" in $$props)
- $$invalidate("onRowClick", (onRowClick = $$props.onRowClick))
- if ("_bb" in $$props) $$invalidate("_bb", (_bb = $$props._bb))
- }
-
- return {
- columns,
- data,
- tableClass,
- theadClass,
- tbodyClass,
- trClass,
- thClass,
- onRowClick,
- _bb,
- rowClickHandler,
- cellValue,
- }
- }
-
- class Table extends SvelteComponentDev {
- constructor(options) {
- super(options)
- init(this, options, instance$7, create_fragment$7, safe_not_equal, [
- "columns",
- "data",
- "tableClass",
- "theadClass",
- "tbodyClass",
- "trClass",
- "thClass",
- "onRowClick",
- "_bb",
- ])
- dispatch_dev("SvelteRegisterComponent", {
- component: this,
- tagName: "Table",
- options,
- id: create_fragment$7.name,
- })
-
- const { ctx } = this.$$
- const props = options.props || {}
- if (ctx.onRowClick === undefined && !("onRowClick" in props)) {
- console.warn(" was created without expected prop 'onRowClick'")
- }
- if (ctx._bb === undefined && !("_bb" in props)) {
- console.warn(" was created without expected prop '_bb'")
- }
- }
-
- get columns() {
- throw new Error(
- ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- set columns(value) {
- throw new Error(
- ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- get data() {
- throw new Error(
- ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- set data(value) {
- throw new Error(
- ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- get tableClass() {
- throw new Error(
- ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- set tableClass(value) {
- throw new Error(
- ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- get theadClass() {
- throw new Error(
- ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- set theadClass(value) {
- throw new Error(
- ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- get tbodyClass() {
- throw new Error(
- ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- set tbodyClass(value) {
- throw new Error(
- ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- get trClass() {
- throw new Error(
- ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- set trClass(value) {
- throw new Error(
- ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- get thClass() {
- throw new Error(
- ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- set thClass(value) {
- throw new Error(
- ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- get onRowClick() {
- throw new Error(
- ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- set onRowClick(value) {
- throw new Error(
- ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- get _bb() {
- throw new Error(
- ": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"
- )
- }
-
- set _bb(value) {
- throw new Error(
- ": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"
- )
- }
- }
-
- var commonjsGlobal =
- typeof globalThis !== "undefined"
- ? globalThis
- : typeof window !== "undefined"
- ? window
- : typeof global !== "undefined"
- ? global
- : typeof self !== "undefined"
- ? self
- : {}
-
- function createCommonjsModule(fn, module) {
- return (
- (module = { exports: {} }), fn(module, module.exports), module.exports
- )
- }
-
- var lodash_min = createCommonjsModule(function(module, exports) {
- ;(function() {
- function n(n, t, r) {
- switch (r.length) {
- case 0:
- return n.call(t)
- case 1:
- return n.call(t, r[0])
- case 2:
- return n.call(t, r[0], r[1])
- case 3:
- return n.call(t, r[0], r[1], r[2])
- }
- return n.apply(t, r)
- }
- function t(n, t, r, e) {
- for (var u = -1, i = null == n ? 0 : n.length; ++u < i; ) {
- var o = n[u]
- t(e, o, r(o), n)
- }
- return e
- }
- function r(n, t) {
- for (
- var r = -1, e = null == n ? 0 : n.length;
- ++r < e && false !== t(n[r], r, n);
-
- );
- return n
- }
- function e(n, t) {
- for (
- var r = null == n ? 0 : n.length;
- r-- && false !== t(n[r], r, n);
-
- );
- return n
- }
- function u(n, t) {
- for (var r = -1, e = null == n ? 0 : n.length; ++r < e; )
- if (!t(n[r], r, n)) return false
- return true
- }
- function i(n, t) {
- for (
- var r = -1, e = null == n ? 0 : n.length, u = 0, i = [];
- ++r < e;
-
- ) {
- var o = n[r]
- t(o, r, n) && (i[u++] = o)
- }
- return i
- }
- function o(n, t) {
- return !(null == n || !n.length) && -1 < v(n, t, 0)
- }
- function f(n, t, r) {
- for (var e = -1, u = null == n ? 0 : n.length; ++e < u; )
- if (r(t, n[e])) return true
- return false
- }
- function c(n, t) {
- for (var r = -1, e = null == n ? 0 : n.length, u = Array(e); ++r < e; )
- u[r] = t(n[r], r, n)
- return u
- }
- function a(n, t) {
- for (var r = -1, e = t.length, u = n.length; ++r < e; ) n[u + r] = t[r]
- return n
- }
- function l(n, t, r, e) {
- var u = -1,
- i = null == n ? 0 : n.length
- for (e && i && (r = n[++u]); ++u < i; ) r = t(r, n[u], u, n)
- return r
- }
- function s(n, t, r, e) {
- var u = null == n ? 0 : n.length
- for (e && u && (r = n[--u]); u--; ) r = t(r, n[u], u, n)
- return r
- }
- function h(n, t) {
- for (var r = -1, e = null == n ? 0 : n.length; ++r < e; )
- if (t(n[r], r, n)) return true
- return false
- }
- function p(n, t, r) {
- var e
- return (
- r(n, function(n, r, u) {
- if (t(n, r, u)) return (e = r), false
- }),
- e
- )
- }
- function _(n, t, r, e) {
- var u = n.length
- for (r += e ? 1 : -1; e ? r-- : ++r < u; ) if (t(n[r], r, n)) return r
- return -1
- }
- function v(n, t, r) {
- if (t === t)
- n: {
- --r
- for (var e = n.length; ++r < e; )
- if (n[r] === t) {
- n = r
- break n
- }
- n = -1
- }
- else n = _(n, d, r)
- return n
- }
- function g(n, t, r, e) {
- --r
- for (var u = n.length; ++r < u; ) if (e(n[r], t)) return r
- return -1
- }
- function d(n) {
- return n !== n
- }
- function y(n, t) {
- var r = null == n ? 0 : n.length
- return r ? m(n, t) / r : F
- }
- function b(n) {
- return function(t) {
- return null == t ? T : t[n]
- }
- }
- function x(n) {
- return function(t) {
- return null == n ? T : n[t]
- }
- }
- function j(n, t, r, e, u) {
- return (
- u(n, function(n, u, i) {
- r = e ? ((e = false), n) : t(r, n, u, i)
- }),
- r
- )
- }
- function w(n, t) {
- var r = n.length
- for (n.sort(t); r--; ) n[r] = n[r].c
- return n
- }
- function m(n, t) {
- for (var r, e = -1, u = n.length; ++e < u; ) {
- var i = t(n[e])
- i !== T && (r = r === T ? i : r + i)
- }
- return r
- }
- function A(n, t) {
- for (var r = -1, e = Array(n); ++r < n; ) e[r] = t(r)
- return e
- }
- function E(n, t) {
- return c(t, function(t) {
- return [t, n[t]]
- })
- }
- function k(n) {
- return function(t) {
- return n(t)
- }
- }
- function S(n, t) {
- return c(t, function(t) {
- return n[t]
- })
- }
- function O(n, t) {
- return n.has(t)
- }
- function I(n, t) {
- for (var r = -1, e = n.length; ++r < e && -1 < v(t, n[r], 0); );
- return r
- }
- function R(n, t) {
- for (var r = n.length; r-- && -1 < v(t, n[r], 0); );
- return r
- }
- function z(n) {
- return "\\" + Un[n]
- }
- function W(n) {
- var t = -1,
- r = Array(n.size)
- return (
- n.forEach(function(n, e) {
- r[++t] = [e, n]
- }),
- r
- )
- }
- function B(n, t) {
- return function(r) {
- return n(t(r))
- }
- }
- function L(n, t) {
- for (var r = -1, e = n.length, u = 0, i = []; ++r < e; ) {
- var o = n[r]
- ;(o !== t && "__lodash_placeholder__" !== o) ||
- ((n[r] = "__lodash_placeholder__"), (i[u++] = r))
- }
- return i
- }
- function U(n) {
- var t = -1,
- r = Array(n.size)
- return (
- n.forEach(function(n) {
- r[++t] = n
- }),
- r
- )
- }
- function C(n) {
- var t = -1,
- r = Array(n.size)
- return (
- n.forEach(function(n) {
- r[++t] = [n, n]
- }),
- r
- )
- }
- function D(n) {
- if (Rn.test(n)) {
- for (var t = (On.lastIndex = 0); On.test(n); ) ++t
- n = t
- } else n = Qn(n)
- return n
- }
- function M(n) {
- return Rn.test(n) ? n.match(On) || [] : n.split("")
- }
- var T,
- $ = 1 / 0,
- F = NaN,
- N = [
- ["ary", 128],
- ["bind", 1],
- ["bindKey", 2],
- ["curry", 8],
- ["curryRight", 16],
- ["flip", 512],
- ["partial", 32],
- ["partialRight", 64],
- ["rearg", 256],
- ],
- P = /\b__p\+='';/g,
- Z = /\b(__p\+=)''\+/g,
- q = /(__e\(.*?\)|\b__t\))\+'';/g,
- V = /&(?:amp|lt|gt|quot|#39);/g,
- K = /[&<>"']/g,
- G = RegExp(V.source),
- H = RegExp(K.source),
- J = /<%-([\s\S]+?)%>/g,
- Y = /<%([\s\S]+?)%>/g,
- Q = /<%=([\s\S]+?)%>/g,
- X = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
- nn = /^\w*$/,
- tn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
- rn = /[\\^$.*+?()[\]{}|]/g,
- en = RegExp(rn.source),
- un = /^\s+|\s+$/g,
- on = /^\s+/,
- fn = /\s+$/,
- cn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
- an = /\{\n\/\* \[wrapped with (.+)\] \*/,
- ln = /,? & /,
- sn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,
- hn = /\\(\\)?/g,
- pn = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,
- _n = /\w*$/,
- vn = /^[-+]0x[0-9a-f]+$/i,
- gn = /^0b[01]+$/i,
- dn = /^\[object .+?Constructor\]$/,
- yn = /^0o[0-7]+$/i,
- bn = /^(?:0|[1-9]\d*)$/,
- xn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,
- jn = /($^)/,
- wn = /['\n\r\u2028\u2029\\]/g,
- mn =
- "[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",
- An =
- "(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])" +
- mn,
- En =
- "(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",
- kn = RegExp("['\u2019]", "g"),
- Sn = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g"),
- On = RegExp(
- "\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|" + En + mn,
- "g"
- ),
- In = RegExp(
- [
- "[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",
- An,
- ].join("|"),
- "g"
- ),
- Rn = RegExp(
- "[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"
- ),
- zn = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,
- Wn = "Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(
- " "
- ),
- Bn = {}
- ;(Bn["[object Float32Array]"] = Bn["[object Float64Array]"] = Bn[
- "[object Int8Array]"
- ] = Bn["[object Int16Array]"] = Bn["[object Int32Array]"] = Bn[
- "[object Uint8Array]"
- ] = Bn["[object Uint8ClampedArray]"] = Bn["[object Uint16Array]"] = Bn[
- "[object Uint32Array]"
- ] = true),
- (Bn["[object Arguments]"] = Bn["[object Array]"] = Bn[
- "[object ArrayBuffer]"
- ] = Bn["[object Boolean]"] = Bn["[object DataView]"] = Bn[
- "[object Date]"
- ] = Bn["[object Error]"] = Bn["[object Function]"] = Bn[
- "[object Map]"
- ] = Bn["[object Number]"] = Bn["[object Object]"] = Bn[
- "[object RegExp]"
- ] = Bn["[object Set]"] = Bn["[object String]"] = Bn[
- "[object WeakMap]"
- ] = false)
- var Ln = {}
- ;(Ln["[object Arguments]"] = Ln["[object Array]"] = Ln[
- "[object ArrayBuffer]"
- ] = Ln["[object DataView]"] = Ln["[object Boolean]"] = Ln[
- "[object Date]"
- ] = Ln["[object Float32Array]"] = Ln["[object Float64Array]"] = Ln[
- "[object Int8Array]"
- ] = Ln["[object Int16Array]"] = Ln["[object Int32Array]"] = Ln[
- "[object Map]"
- ] = Ln["[object Number]"] = Ln["[object Object]"] = Ln[
- "[object RegExp]"
- ] = Ln["[object Set]"] = Ln["[object String]"] = Ln[
- "[object Symbol]"
- ] = Ln["[object Uint8Array]"] = Ln["[object Uint8ClampedArray]"] = Ln[
- "[object Uint16Array]"
- ] = Ln["[object Uint32Array]"] = true),
- (Ln["[object Error]"] = Ln["[object Function]"] = Ln[
- "[object WeakMap]"
- ] = false)
- var Un = {
- "\\": "\\",
- "'": "'",
- "\n": "n",
- "\r": "r",
- "\u2028": "u2028",
- "\u2029": "u2029",
- },
- Cn = parseFloat,
- Dn = parseInt,
- Mn =
- typeof commonjsGlobal == "object" &&
- commonjsGlobal &&
- commonjsGlobal.Object === Object &&
- commonjsGlobal,
- Tn = typeof self == "object" && self && self.Object === Object && self,
- $n = Mn || Tn || Function("return this")(),
- Fn = exports && !exports.nodeType && exports,
- Nn = Fn && "object" == "object" && module && !module.nodeType && module,
- Pn = Nn && Nn.exports === Fn,
- Zn = Pn && Mn.process,
- qn = (function() {
- try {
- var n = Nn && Nn.f && Nn.f("util").types
- return n ? n : Zn && Zn.binding && Zn.binding("util")
- } catch (n) {}
- })(),
- Vn = qn && qn.isArrayBuffer,
- Kn = qn && qn.isDate,
- Gn = qn && qn.isMap,
- Hn = qn && qn.isRegExp,
- Jn = qn && qn.isSet,
- Yn = qn && qn.isTypedArray,
- Qn = b("length"),
- Xn = x({
- À: "A",
- Á: "A",
- Â: "A",
- Ã: "A",
- Ä: "A",
- Å: "A",
- à: "a",
- á: "a",
- â: "a",
- ã: "a",
- ä: "a",
- å: "a",
- Ç: "C",
- ç: "c",
- Ð: "D",
- ð: "d",
- È: "E",
- É: "E",
- Ê: "E",
- Ë: "E",
- è: "e",
- é: "e",
- ê: "e",
- ë: "e",
- Ì: "I",
- Í: "I",
- Î: "I",
- Ï: "I",
- ì: "i",
- í: "i",
- î: "i",
- ï: "i",
- Ñ: "N",
- ñ: "n",
- Ò: "O",
- Ó: "O",
- Ô: "O",
- Õ: "O",
- Ö: "O",
- Ø: "O",
- ò: "o",
- ó: "o",
- ô: "o",
- õ: "o",
- ö: "o",
- ø: "o",
- Ù: "U",
- Ú: "U",
- Û: "U",
- Ü: "U",
- ù: "u",
- ú: "u",
- û: "u",
- ü: "u",
- Ý: "Y",
- ý: "y",
- ÿ: "y",
- Æ: "Ae",
- æ: "ae",
- Þ: "Th",
- þ: "th",
- ß: "ss",
- Ā: "A",
- Ă: "A",
- Ą: "A",
- ā: "a",
- ă: "a",
- ą: "a",
- Ć: "C",
- Ĉ: "C",
- Ċ: "C",
- Č: "C",
- ć: "c",
- ĉ: "c",
- ċ: "c",
- č: "c",
- Ď: "D",
- Đ: "D",
- ď: "d",
- đ: "d",
- Ē: "E",
- Ĕ: "E",
- Ė: "E",
- Ę: "E",
- Ě: "E",
- ē: "e",
- ĕ: "e",
- ė: "e",
- ę: "e",
- ě: "e",
- Ĝ: "G",
- Ğ: "G",
- Ġ: "G",
- Ģ: "G",
- ĝ: "g",
- ğ: "g",
- ġ: "g",
- ģ: "g",
- Ĥ: "H",
- Ħ: "H",
- ĥ: "h",
- ħ: "h",
- Ĩ: "I",
- Ī: "I",
- Ĭ: "I",
- Į: "I",
- İ: "I",
- ĩ: "i",
- ī: "i",
- ĭ: "i",
- į: "i",
- ı: "i",
- Ĵ: "J",
- ĵ: "j",
- Ķ: "K",
- ķ: "k",
- ĸ: "k",
- Ĺ: "L",
- Ļ: "L",
- Ľ: "L",
- Ŀ: "L",
- Ł: "L",
- ĺ: "l",
- ļ: "l",
- ľ: "l",
- ŀ: "l",
- ł: "l",
- Ń: "N",
- Ņ: "N",
- Ň: "N",
- Ŋ: "N",
- ń: "n",
- ņ: "n",
- ň: "n",
- ŋ: "n",
- Ō: "O",
- Ŏ: "O",
- Ő: "O",
- ō: "o",
- ŏ: "o",
- ő: "o",
- Ŕ: "R",
- Ŗ: "R",
- Ř: "R",
- ŕ: "r",
- ŗ: "r",
- ř: "r",
- Ś: "S",
- Ŝ: "S",
- Ş: "S",
- Š: "S",
- ś: "s",
- ŝ: "s",
- ş: "s",
- š: "s",
- Ţ: "T",
- Ť: "T",
- Ŧ: "T",
- ţ: "t",
- ť: "t",
- ŧ: "t",
- Ũ: "U",
- Ū: "U",
- Ŭ: "U",
- Ů: "U",
- Ű: "U",
- Ų: "U",
- ũ: "u",
- ū: "u",
- ŭ: "u",
- ů: "u",
- ű: "u",
- ų: "u",
- Ŵ: "W",
- ŵ: "w",
- Ŷ: "Y",
- ŷ: "y",
- Ÿ: "Y",
- Ź: "Z",
- Ż: "Z",
- Ž: "Z",
- ź: "z",
- ż: "z",
- ž: "z",
- IJ: "IJ",
- ij: "ij",
- Œ: "Oe",
- œ: "oe",
- ʼn: "'n",
- ſ: "s",
- }),
- nt = x({
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'",
- }),
- tt = x({
- "&": "&",
- "<": "<",
- ">": ">",
- """: '"',
- "'": "'",
- }),
- rt = (function x(mn) {
- function An(n) {
- if (yu(n) && !ff(n) && !(n instanceof Un)) {
- if (n instanceof On) return n
- if (oi.call(n, "__wrapped__")) return Fe(n)
- }
- return new On(n)
- }
- function En() {}
- function On(n, t) {
- ;(this.__wrapped__ = n),
- (this.__actions__ = []),
- (this.__chain__ = !!t),
- (this.__index__ = 0),
- (this.__values__ = T)
- }
- function Un(n) {
- ;(this.__wrapped__ = n),
- (this.__actions__ = []),
- (this.__dir__ = 1),
- (this.__filtered__ = false),
- (this.__iteratees__ = []),
- (this.__takeCount__ = 4294967295),
- (this.__views__ = [])
- }
- function Mn(n) {
- var t = -1,
- r = null == n ? 0 : n.length
- for (this.clear(); ++t < r; ) {
- var e = n[t]
- this.set(e[0], e[1])
- }
- }
- function Tn(n) {
- var t = -1,
- r = null == n ? 0 : n.length
- for (this.clear(); ++t < r; ) {
- var e = n[t]
- this.set(e[0], e[1])
- }
- }
- function Fn(n) {
- var t = -1,
- r = null == n ? 0 : n.length
- for (this.clear(); ++t < r; ) {
- var e = n[t]
- this.set(e[0], e[1])
- }
- }
- function Nn(n) {
- var t = -1,
- r = null == n ? 0 : n.length
- for (this.__data__ = new Fn(); ++t < r; ) this.add(n[t])
- }
- function Zn(n) {
- this.size = (this.__data__ = new Tn(n)).size
- }
- function qn(n, t) {
- var r,
- e = ff(n),
- u = !e && of(n),
- i = !e && !u && af(n),
- o = !e && !u && !i && _f(n),
- u = (e = e || u || i || o) ? A(n.length, ni) : [],
- f = u.length
- for (r in n)
- (!t && !oi.call(n, r)) ||
- (e &&
- ("length" == r ||
- (i && ("offset" == r || "parent" == r)) ||
- (o &&
- ("buffer" == r ||
- "byteLength" == r ||
- "byteOffset" == r)) ||
- Se(r, f))) ||
- u.push(r)
- return u
- }
- function Qn(n) {
- var t = n.length
- return t ? n[ir(0, t - 1)] : T
- }
- function et(n, t) {
- return De(Ur(n), pt(t, 0, n.length))
- }
- function ut(n) {
- return De(Ur(n))
- }
- function it(n, t, r) {
- ;((r === T || lu(n[t], r)) && (r !== T || t in n)) || st(n, t, r)
- }
- function ot(n, t, r) {
- var e = n[t]
- ;(oi.call(n, t) && lu(e, r) && (r !== T || t in n)) || st(n, t, r)
- }
- function ft(n, t) {
- for (var r = n.length; r--; ) if (lu(n[r][0], t)) return r
- return -1
- }
- function ct(n, t, r, e) {
- return (
- uo(n, function(n, u, i) {
- t(e, n, r(n), i)
- }),
- e
- )
- }
- function at(n, t) {
- return n && Cr(t, Wu(t), n)
- }
- function lt(n, t) {
- return n && Cr(t, Bu(t), n)
- }
- function st(n, t, r) {
- "__proto__" == t && Ai
- ? Ai(n, t, {
- configurable: true,
- enumerable: true,
- value: r,
- writable: true,
- })
- : (n[t] = r)
- }
- function ht(n, t) {
- for (var r = -1, e = t.length, u = Ku(e), i = null == n; ++r < e; )
- u[r] = i ? T : Ru(n, t[r])
- return u
- }
- function pt(n, t, r) {
- return (
- n === n &&
- (r !== T && (n = n <= r ? n : r),
- t !== T && (n = n >= t ? n : t)),
- n
- )
- }
- function _t(n, t, e, u, i, o) {
- var f,
- c = 1 & t,
- a = 2 & t,
- l = 4 & t
- if ((e && (f = i ? e(n, u, i, o) : e(n)), f !== T)) return f
- if (!du(n)) return n
- if ((u = ff(n))) {
- if (((f = me(n)), !c)) return Ur(n, f)
- } else {
- var s = vo(n),
- h =
- "[object Function]" == s || "[object GeneratorFunction]" == s
- if (af(n)) return Ir(n, c)
- if (
- "[object Object]" == s ||
- "[object Arguments]" == s ||
- (h && !i)
- ) {
- if (((f = a || h ? {} : Ae(n)), !c))
- return a ? Mr(n, lt(f, n)) : Dr(n, at(f, n))
- } else {
- if (!Ln[s]) return i ? n : {}
- f = Ee(n, s, c)
- }
- }
- if ((o || (o = new Zn()), (i = o.get(n)))) return i
- o.set(n, f),
- pf(n)
- ? n.forEach(function(r) {
- f.add(_t(r, t, e, r, n, o))
- })
- : sf(n) &&
- n.forEach(function(r, u) {
- f.set(u, _t(r, t, e, u, n, o))
- })
- var a = l ? (a ? ve : _e) : a ? Bu : Wu,
- p = u ? T : a(n)
- return (
- r(p || n, function(r, u) {
- p && ((u = r), (r = n[u])), ot(f, u, _t(r, t, e, u, n, o))
- }),
- f
- )
- }
- function vt(n) {
- var t = Wu(n)
- return function(r) {
- return gt(r, n, t)
- }
- }
- function gt(n, t, r) {
- var e = r.length
- if (null == n) return !e
- for (n = Qu(n); e--; ) {
- var u = r[e],
- i = t[u],
- o = n[u]
- if ((o === T && !(u in n)) || !i(o)) return false
- }
- return true
- }
- function dt(n, t, r) {
- if (typeof n != "function") throw new ti("Expected a function")
- return bo(function() {
- n.apply(T, r)
- }, t)
- }
- function yt(n, t, r, e) {
- var u = -1,
- i = o,
- a = true,
- l = n.length,
- s = [],
- h = t.length
- if (!l) return s
- r && (t = c(t, k(r))),
- e
- ? ((i = f), (a = false))
- : 200 <= t.length && ((i = O), (a = false), (t = new Nn(t)))
- n: for (; ++u < l; ) {
- var p = n[u],
- _ = null == r ? p : r(p),
- p = e || 0 !== p ? p : 0
- if (a && _ === _) {
- for (var v = h; v--; ) if (t[v] === _) continue n
- s.push(p)
- } else i(t, _, e) || s.push(p)
- }
- return s
- }
- function bt(n, t) {
- var r = true
- return (
- uo(n, function(n, e, u) {
- return (r = !!t(n, e, u))
- }),
- r
- )
- }
- function xt(n, t, r) {
- for (var e = -1, u = n.length; ++e < u; ) {
- var i = n[e],
- o = t(i)
- if (null != o && (f === T ? o === o && !wu(o) : r(o, f)))
- var f = o,
- c = i
- }
- return c
- }
- function jt(n, t) {
- var r = []
- return (
- uo(n, function(n, e, u) {
- t(n, e, u) && r.push(n)
- }),
- r
- )
- }
- function wt(n, t, r, e, u) {
- var i = -1,
- o = n.length
- for (r || (r = ke), u || (u = []); ++i < o; ) {
- var f = n[i]
- 0 < t && r(f)
- ? 1 < t
- ? wt(f, t - 1, r, e, u)
- : a(u, f)
- : e || (u[u.length] = f)
- }
- return u
- }
- function mt(n, t) {
- return n && oo(n, t, Wu)
- }
- function At(n, t) {
- return n && fo(n, t, Wu)
- }
- function Et(n, t) {
- return i(t, function(t) {
- return _u(n[t])
- })
- }
- function kt(n, t) {
- t = Sr(t, n)
- for (var r = 0, e = t.length; null != n && r < e; )
- n = n[Me(t[r++])]
- return r && r == e ? n : T
- }
- function St(n, t, r) {
- return (t = t(n)), ff(n) ? t : a(t, r(n))
- }
- function Ot(n) {
- if (null == n) n = n === T ? "[object Undefined]" : "[object Null]"
- else if (mi && mi in Qu(n)) {
- var t = oi.call(n, mi),
- r = n[mi]
- try {
- n[mi] = T
- var e = true
- } catch (n) {}
- var u = ai.call(n)
- e && (t ? (n[mi] = r) : delete n[mi]), (n = u)
- } else n = ai.call(n)
- return n
- }
- function It(n, t) {
- return n > t
- }
- function Rt(n, t) {
- return null != n && oi.call(n, t)
- }
- function zt(n, t) {
- return null != n && t in Qu(n)
- }
- function Wt(n, t, r) {
- for (
- var e = r ? f : o,
- u = n[0].length,
- i = n.length,
- a = i,
- l = Ku(i),
- s = 1 / 0,
- h = [];
- a--;
-
- ) {
- var p = n[a]
- a && t && (p = c(p, k(t))),
- (s = Ci(p.length, s)),
- (l[a] =
- !r && (t || (120 <= u && 120 <= p.length))
- ? new Nn(a && p)
- : T)
- }
- var p = n[0],
- _ = -1,
- v = l[0]
- n: for (; ++_ < u && h.length < s; ) {
- var g = p[_],
- d = t ? t(g) : g,
- g = r || 0 !== g ? g : 0
- if (v ? !O(v, d) : !e(h, d, r)) {
- for (a = i; --a; ) {
- var y = l[a]
- if (y ? !O(y, d) : !e(n[a], d, r)) continue n
+ 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)) {
+ callback();
+ // ...so guard against infinite loops
+ seen_callbacks.add(callback);
}
- v && v.push(d), h.push(g)
- }
}
- return h
- }
- function Bt(n, t, r) {
- var e = {}
- return (
- mt(n, function(n, u, i) {
- t(e, r(n), u, i)
- }),
- e
- )
- }
- function Lt(t, r, e) {
- return (
- (r = Sr(r, t)),
- (t = 2 > r.length ? t : kt(t, hr(r, 0, -1))),
- (r = null == t ? t : t[Me(Ve(r))]),
- null == r ? T : n(r, t, e)
- )
- }
- function Ut(n) {
- return yu(n) && "[object Arguments]" == Ot(n)
- }
- function Ct(n) {
- return yu(n) && "[object ArrayBuffer]" == Ot(n)
- }
- function Dt(n) {
- return yu(n) && "[object Date]" == Ot(n)
- }
- function Mt(n, t, r, e, u) {
- if (n === t) t = true
- else if (null == n || null == t || (!yu(n) && !yu(t)))
- t = n !== n && t !== t
- else
- n: {
- var i = ff(n),
- o = ff(t),
- f = i ? "[object Array]" : vo(n),
- c = o ? "[object Array]" : vo(t),
- f = "[object Arguments]" == f ? "[object Object]" : f,
- c = "[object Arguments]" == c ? "[object Object]" : c,
- a = "[object Object]" == f,
- o = "[object Object]" == c
- if ((c = f == c) && af(n)) {
- if (!af(t)) {
- t = false
- break n
- }
- ;(i = true), (a = false)
+ render_callbacks.length = 0;
+ } while (dirty_components.length);
+ while (flush_callbacks.length) {
+ flush_callbacks.pop()();
+ }
+ update_scheduled = false;
+ }
+ function update($$) {
+ if ($$.fragment) {
+ $$.update($$.dirty);
+ run_all($$.before_update);
+ $$.fragment.p($$.dirty, $$.ctx);
+ $$.dirty = null;
+ $$.after_update.forEach(add_render_callback);
+ }
+ }
+ const outroing = new Set();
+ let outros;
+ function group_outros() {
+ outros = {
+ r: 0,
+ c: [],
+ p: outros // parent group
+ };
+ }
+ function check_outros() {
+ if (!outros.r) {
+ run_all(outros.c);
+ }
+ outros = outros.p;
+ }
+ function transition_in(block, local) {
+ if (block && block.i) {
+ outroing.delete(block);
+ block.i(local);
+ }
+ }
+ 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);
+ }
+ }
+
+ function handle_promise(promise, info) {
+ const token = info.token = {};
+ function update(type, index, key, value) {
+ if (info.token !== token)
+ return;
+ info.resolved = key && { [key]: value };
+ const child_ctx = assign(assign({}, info.ctx), info.resolved);
+ const block = type && (info.current = type)(child_ctx);
+ if (info.block) {
+ if (info.blocks) {
+ info.blocks.forEach((block, i) => {
+ if (i !== index && block) {
+ group_outros();
+ transition_out(block, 1, 1, () => {
+ info.blocks[i] = null;
+ });
+ check_outros();
+ }
+ });
}
- if (c && !a)
- u || (u = new Zn()),
- (t =
- i || _f(n)
- ? se(n, t, r, e, Mt, u)
- : he(n, t, f, r, e, Mt, u))
else {
- if (
- !(1 & r) &&
- ((i = a && oi.call(n, "__wrapped__")),
- (f = o && oi.call(t, "__wrapped__")),
- i || f)
- ) {
- ;(n = i ? n.value() : n),
- (t = f ? t.value() : t),
- u || (u = new Zn()),
- (t = Mt(n, t, r, e, u))
- break n
- }
- if (c)
- t: if (
- (u || (u = new Zn()),
- (i = 1 & r),
- (f = _e(n)),
- (o = f.length),
- (c = _e(t).length),
- o == c || i)
- ) {
- for (a = o; a--; ) {
- var l = f[a]
- if (!(i ? l in t : oi.call(t, l))) {
- t = false
- break t
- }
- }
- if ((c = u.get(n)) && u.get(t)) t = c == t
- else {
- ;(c = true), u.set(n, t), u.set(t, n)
- for (var s = i; ++a < o; ) {
- var l = f[a],
- h = n[l],
- p = t[l]
- if (e)
- var _ = i
- ? e(p, h, l, t, n, u)
- : e(h, p, l, n, t, u)
- if (_ === T ? h !== p && !Mt(h, p, r, e, u) : !_) {
- c = false
- break
- }
- s || (s = "constructor" == l)
- }
- c &&
- !s &&
- ((r = n.constructor),
- (e = t.constructor),
- r != e &&
- "constructor" in n &&
- "constructor" in t &&
- !(
- typeof r == "function" &&
- r instanceof r &&
- typeof e == "function" &&
- e instanceof e
- ) &&
- (c = false)),
- u.delete(n),
- u.delete(t),
- (t = c)
- }
- } else t = false
- else t = false
+ info.block.d(1);
}
- }
- return t
- }
- function Tt(n) {
- return yu(n) && "[object Map]" == vo(n)
- }
- function $t(n, t, r, e) {
- var u = r.length,
- i = u,
- o = !e
- if (null == n) return !i
- for (n = Qu(n); u--; ) {
- var f = r[u]
- if (o && f[2] ? f[1] !== n[f[0]] : !(f[0] in n)) return false
+ block.c();
+ transition_in(block, 1);
+ block.m(info.mount(), info.anchor);
+ flush();
}
- for (; ++u < i; ) {
- var f = r[u],
- c = f[0],
- a = n[c],
- l = f[1]
- if (o && f[2]) {
- if (a === T && !(c in n)) return false
- } else {
- if (((f = new Zn()), e)) var s = e(a, l, c, n, t, f)
- if (s === T ? !Mt(l, a, 3, e, f) : !s) return false
- }
+ info.block = block;
+ if (info.blocks)
+ info.blocks[index] = block;
+ }
+ 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 we previously had a then/catch block, destroy it
+ if (info.current !== info.pending) {
+ update(info.pending, 0);
+ return true;
}
- return true
- }
- function Ft(n) {
- return !(!du(n) || (ci && ci in n)) && (_u(n) ? hi : dn).test(Te(n))
- }
- function Nt(n) {
- return yu(n) && "[object RegExp]" == Ot(n)
- }
- function Pt(n) {
- return yu(n) && "[object Set]" == vo(n)
- }
- function Zt(n) {
- return yu(n) && gu(n.length) && !!Bn[Ot(n)]
- }
- function qt(n) {
- return typeof n == "function"
- ? n
- : null == n
- ? $u
- : typeof n == "object"
- ? ff(n)
- ? Jt(n[0], n[1])
- : Ht(n)
- : Zu(n)
- }
- function Vt(n) {
- if (!ze(n)) return Li(n)
- var t,
- r = []
- for (t in Qu(n)) oi.call(n, t) && "constructor" != t && r.push(t)
- return r
- }
- function Kt(n, t) {
- return n < t
- }
- function Gt(n, t) {
- var r = -1,
- e = su(n) ? Ku(n.length) : []
- return (
- uo(n, function(n, u, i) {
- e[++r] = t(n, u, i)
- }),
- e
- )
- }
- function Ht(n) {
- var t = xe(n)
- return 1 == t.length && t[0][2]
- ? We(t[0][0], t[0][1])
- : function(r) {
- return r === n || $t(r, n, t)
+ }
+ else {
+ if (info.current !== info.then) {
+ update(info.then, 1, info.value, promise);
+ return true;
+ }
+ info.resolved = { [info.value]: promise };
+ }
+ }
+
+ const globals = (typeof window !== 'undefined' ? window : global);
+ function mount_component(component, target, anchor) {
+ const { fragment, on_mount, on_destroy, after_update } = component.$$;
+ fragment.m(target, anchor);
+ // onMount happens before the initial afterUpdate
+ add_render_callback(() => {
+ const new_on_destroy = on_mount.map(run).filter(is_function);
+ if (on_destroy) {
+ 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);
+ }
+ function destroy_component(component, detaching) {
+ if (component.$$.fragment) {
+ run_all(component.$$.on_destroy);
+ component.$$.fragment.d(detaching);
+ // TODO null out other refs, including component.$$ (but need to
+ // preserve final state?)
+ component.$$.on_destroy = component.$$.fragment = null;
+ component.$$.ctx = {};
+ }
+ }
+ function make_dirty(component, key) {
+ if (!component.$$.dirty) {
+ dirty_components.push(component);
+ schedule_update();
+ component.$$.dirty = blank_object();
+ }
+ component.$$.dirty[key] = true;
+ }
+ function init(component, options, instance, create_fragment, not_equal, prop_names) {
+ const parent_component = current_component;
+ set_current_component(component);
+ const props = options.props || {};
+ const $$ = component.$$ = {
+ fragment: null,
+ ctx: null,
+ // state
+ props: prop_names,
+ update: noop,
+ not_equal,
+ bound: blank_object(),
+ // lifecycle
+ on_mount: [],
+ on_destroy: [],
+ before_update: [],
+ after_update: [],
+ context: new Map(parent_component ? parent_component.$$.context : []),
+ // everything else
+ callbacks: blank_object(),
+ dirty: null
+ };
+ let ready = false;
+ $$.ctx = instance
+ ? instance(component, props, (key, ret, value = ret) => {
+ if ($$.ctx && not_equal($$.ctx[key], $$.ctx[key] = value)) {
+ if ($$.bound[key])
+ $$.bound[key](value);
+ if (ready)
+ make_dirty(component, key);
}
- }
- function Jt(n, t) {
- return Ie(n) && t === t && !du(t)
- ? We(Me(n), t)
- : function(r) {
- var e = Ru(r, n)
- return e === T && e === t ? zu(r, n) : Mt(t, e, 3)
+ return ret;
+ })
+ : props;
+ $$.update();
+ ready = true;
+ run_all($$.before_update);
+ $$.fragment = create_fragment($$.ctx);
+ if (options.target) {
+ if (options.hydrate) {
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ $$.fragment.l(children(options.target));
+ }
+ else {
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ $$.fragment.c();
+ }
+ if (options.intro)
+ transition_in(component.$$.fragment);
+ mount_component(component, options.target, options.anchor);
+ flush();
+ }
+ set_current_component(parent_component);
+ }
+ let SvelteElement;
+ if (typeof HTMLElement !== 'undefined') {
+ SvelteElement = class extends HTMLElement {
+ constructor() {
+ super();
+ this.attachShadow({ mode: 'open' });
+ }
+ connectedCallback() {
+ // @ts-ignore todo: improve typings
+ for (const key in this.$$.slotted) {
+ // @ts-ignore todo: improve typings
+ this.appendChild(this.$$.slotted[key]);
}
- }
- function Yt(n, t, r, e, u) {
- n !== t &&
- oo(
- t,
- function(i, o) {
- if ((u || (u = new Zn()), du(i))) {
- var f = u,
- c = Le(n, o),
- a = Le(t, o),
- l = f.get(a)
- if (l) it(n, o, l)
- else {
- var l = e ? e(c, a, o + "", n, t, f) : T,
- s = l === T
- if (s) {
- var h = ff(a),
- p = !h && af(a),
- _ = !h && !p && _f(a),
- l = a
- h || p || _
- ? ff(c)
- ? (l = c)
- : hu(c)
- ? (l = Ur(c))
- : p
- ? ((s = false), (l = Ir(a, true)))
- : _
- ? ((s = false), (l = zr(a, true)))
- : (l = [])
- : xu(a) || of(a)
- ? ((l = c),
- of(c)
- ? (l = Ou(c))
- : (du(c) && !_u(c)) || (l = Ae(a)))
- : (s = false)
- }
- s && (f.set(a, l), Yt(l, a, r, e, f), f.delete(a)),
- it(n, o, l)
+ }
+ attributeChangedCallback(attr, _oldValue, newValue) {
+ this[attr] = newValue;
+ }
+ $destroy() {
+ destroy_component(this, 1);
+ this.$destroy = noop;
+ }
+ $on(type, callback) {
+ // TODO should this delegate to addEventListener?
+ const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
+ callbacks.push(callback);
+ return () => {
+ const index = callbacks.indexOf(callback);
+ if (index !== -1)
+ callbacks.splice(index, 1);
+ };
+ }
+ $set() {
+ // overridden by instance, if it has props
+ }
+ };
+ }
+ class SvelteComponent {
+ $destroy() {
+ destroy_component(this, 1);
+ this.$destroy = noop;
+ }
+ $on(type, callback) {
+ const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
+ callbacks.push(callback);
+ return () => {
+ const index = callbacks.indexOf(callback);
+ if (index !== -1)
+ callbacks.splice(index, 1);
+ };
+ }
+ $set() {
+ // overridden by instance, if it has props
+ }
+ }
+
+ function dispatch_dev(type, detail) {
+ document.dispatchEvent(custom_event(type, detail));
+ }
+ function append_dev(target, node) {
+ dispatch_dev("SvelteDOMInsert", { target, node });
+ append(target, node);
+ }
+ function insert_dev(target, node, anchor) {
+ dispatch_dev("SvelteDOMInsert", { target, node, anchor });
+ insert(target, node, anchor);
+ }
+ function detach_dev(node) {
+ dispatch_dev("SvelteDOMRemove", { node });
+ detach(node);
+ }
+ function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {
+ const modifiers = options === true ? ["capture"] : options ? Array.from(Object.keys(options)) : [];
+ if (has_prevent_default)
+ modifiers.push('preventDefault');
+ if (has_stop_propagation)
+ modifiers.push('stopPropagation');
+ dispatch_dev("SvelteDOMAddEventListener", { node, event, handler, modifiers });
+ const dispose = listen(node, event, handler, options);
+ return () => {
+ dispatch_dev("SvelteDOMRemoveEventListener", { node, event, handler, modifiers });
+ dispose();
+ };
+ }
+ function attr_dev(node, attribute, value) {
+ attr(node, attribute, value);
+ if (value == null)
+ dispatch_dev("SvelteDOMRemoveAttribute", { node, attribute });
+ else
+ dispatch_dev("SvelteDOMSetAttribute", { node, attribute, value });
+ }
+ function prop_dev(node, property, value) {
+ node[property] = value;
+ dispatch_dev("SvelteDOMSetProperty", { node, property, value });
+ }
+ function set_data_dev(text, data) {
+ data = '' + data;
+ if (text.data === data)
+ return;
+ dispatch_dev("SvelteDOMSetData", { node: text, data });
+ text.data = data;
+ }
+ class SvelteComponentDev extends SvelteComponent {
+ constructor(options) {
+ if (!options || (!options.target && !options.$$inline)) {
+ throw new Error(`'target' is a required option`);
+ }
+ super();
+ }
+ $destroy() {
+ super.$destroy();
+ this.$destroy = () => {
+ console.warn(`Component was already destroyed`); // eslint-disable-line no-console
+ };
+ }
+ }
+
+ const subscriber_queue = [];
+ /**
+ * Create a `Writable` store that allows both updating and reading by subscription.
+ * @param {*=}value initial value
+ * @param {StartStopNotifier=}start start and stop notifications for subscriptions
+ */
+ function writable(value, start = noop) {
+ let stop;
+ const subscribers = [];
+ function set(new_value) {
+ if (safe_not_equal(value, new_value)) {
+ value = new_value;
+ if (stop) { // store is ready
+ const run_queue = !subscriber_queue.length;
+ for (let i = 0; i < subscribers.length; i += 1) {
+ const s = subscribers[i];
+ s[1]();
+ subscriber_queue.push(s, value);
}
- } else
- (f = e ? e(Le(n, o), i, o + "", n, t, u) : T),
- f === T && (f = i),
- it(n, o, f)
- },
- Bu
- )
- }
- function Qt(n, t) {
- var r = n.length
- if (r) return (t += 0 > t ? r : 0), Se(t, r) ? n[t] : T
- }
- function Xt(n, t, r) {
- var e = -1
- return (
- (t = c(t.length ? t : [$u], k(ye()))),
- (n = Gt(n, function(n) {
- return {
- a: c(t, function(t) {
- return t(n)
- }),
- b: ++e,
- c: n,
- }
- })),
- w(n, function(n, t) {
- var e
- n: {
- e = -1
- for (
- var u = n.a, i = t.a, o = u.length, f = r.length;
- ++e < o;
-
- ) {
- var c = Wr(u[e], i[e])
- if (c) {
- e = e >= f ? c : c * ("desc" == r[e] ? -1 : 1)
- break n
+ if (run_queue) {
+ for (let i = 0; i < subscriber_queue.length; i += 2) {
+ subscriber_queue[i][0](subscriber_queue[i + 1]);
+ }
+ subscriber_queue.length = 0;
}
- }
- e = n.b - t.b
}
- return e
- })
- )
- }
- function nr(n, t) {
- return tr(n, t, function(t, r) {
- return zu(n, r)
- })
- }
- function tr(n, t, r) {
- for (var e = -1, u = t.length, i = {}; ++e < u; ) {
- var o = t[e],
- f = kt(n, o)
- r(f, o) && lr(i, Sr(o, n), f)
}
- return i
- }
- function rr(n) {
- return function(t) {
- return kt(t, n)
+ }
+ function update(fn) {
+ set(fn(value));
+ }
+ function subscribe(run, invalidate = noop) {
+ const subscriber = [run, invalidate];
+ subscribers.push(subscriber);
+ if (subscribers.length === 1) {
+ stop = start(set) || noop;
}
- }
- function er(n, t, r, e) {
- var u = e ? g : v,
- i = -1,
- o = t.length,
- f = n
- for (n === t && (t = Ur(t)), r && (f = c(n, k(r))); ++i < o; )
- for (
- var a = 0, l = t[i], l = r ? r(l) : l;
- -1 < (a = u(f, l, a, e));
-
- )
- f !== n && xi.call(f, a, 1), xi.call(n, a, 1)
- return n
- }
- function ur(n, t) {
- for (var r = n ? t.length : 0, e = r - 1; r--; ) {
- var u = t[r]
- if (r == e || u !== i) {
- var i = u
- Se(u) ? xi.call(n, u, 1) : xr(n, u)
- }
- }
- }
- function ir(n, t) {
- return n + Ii(Ti() * (t - n + 1))
- }
- function or(n, t) {
- var r = ""
- if (!n || 1 > t || 9007199254740991 < t) return r
- do t % 2 && (r += n), (t = Ii(t / 2)) && (n += n)
- while (t)
- return r
- }
- function fr(n, t) {
- return xo(Be(n, t, $u), n + "")
- }
- function cr(n) {
- return Qn(Uu(n))
- }
- function ar(n, t) {
- var r = Uu(n)
- return De(r, pt(t, 0, r.length))
- }
- function lr(n, t, r, e) {
- if (!du(n)) return n
- t = Sr(t, n)
- for (
- var u = -1, i = t.length, o = i - 1, f = n;
- null != f && ++u < i;
-
- ) {
- var c = Me(t[u]),
- a = r
- if (u != o) {
- var l = f[c],
- a = e ? e(l, c, f) : T
- a === T && (a = du(l) ? l : Se(t[u + 1]) ? [] : {})
- }
- ot(f, c, a), (f = f[c])
- }
- return n
- }
- function sr(n) {
- return De(Uu(n))
- }
- function hr(n, t, r) {
- var e = -1,
- u = n.length
- for (
- 0 > t && (t = -t > u ? 0 : u + t),
- r = r > u ? u : r,
- 0 > r && (r += u),
- u = t > r ? 0 : (r - t) >>> 0,
- t >>>= 0,
- r = Ku(u);
- ++e < u;
-
- )
- r[e] = n[e + t]
- return r
- }
- function pr(n, t) {
- var r
- return (
- uo(n, function(n, e, u) {
- return (r = t(n, e, u)), !r
- }),
- !!r
- )
- }
- function _r(n, t, r) {
- var e = 0,
- u = null == n ? e : n.length
- if (typeof t == "number" && t === t && 2147483647 >= u) {
- for (; e < u; ) {
- var i = (e + u) >>> 1,
- o = n[i]
- null !== o && !wu(o) && (r ? o <= t : o < t)
- ? (e = i + 1)
- : (u = i)
- }
- return u
- }
- return vr(n, t, $u, r)
- }
- function vr(n, t, r, e) {
- t = r(t)
- for (
- var u = 0,
- i = null == n ? 0 : n.length,
- o = t !== t,
- f = null === t,
- c = wu(t),
- a = t === T;
- u < i;
-
- ) {
- var l = Ii((u + i) / 2),
- s = r(n[l]),
- h = s !== T,
- p = null === s,
- _ = s === s,
- v = wu(s)
- ;(o
- ? e || _
- : a
- ? _ && (e || h)
- : f
- ? _ && h && (e || !p)
- : c
- ? _ && h && !p && (e || !v)
- : p || v
- ? 0
- : e
- ? s <= t
- : s < t)
- ? (u = l + 1)
- : (i = l)
- }
- return Ci(i, 4294967294)
- }
- function gr(n, t) {
- for (var r = -1, e = n.length, u = 0, i = []; ++r < e; ) {
- var o = n[r],
- f = t ? t(o) : o
- if (!r || !lu(f, c)) {
- var c = f
- i[u++] = 0 === o ? 0 : o
- }
- }
- return i
- }
- function dr(n) {
- return typeof n == "number" ? n : wu(n) ? F : +n
- }
- function yr(n) {
- if (typeof n == "string") return n
- if (ff(n)) return c(n, yr) + ""
- if (wu(n)) return ro ? ro.call(n) : ""
- var t = n + ""
- return "0" == t && 1 / n == -$ ? "-0" : t
- }
- function br(n, t, r) {
- var e = -1,
- u = o,
- i = n.length,
- c = true,
- a = [],
- l = a
- if (r) (c = false), (u = f)
- else if (200 <= i) {
- if ((u = t ? null : so(n))) return U(u)
- ;(c = false), (u = O), (l = new Nn())
- } else l = t ? [] : a
- n: for (; ++e < i; ) {
- var s = n[e],
- h = t ? t(s) : s,
- s = r || 0 !== s ? s : 0
- if (c && h === h) {
- for (var p = l.length; p--; ) if (l[p] === h) continue n
- t && l.push(h), a.push(s)
- } else u(l, h, r) || (l !== a && l.push(h), a.push(s))
- }
- return a
- }
- function xr(n, t) {
- return (
- (t = Sr(t, n)),
- (n = 2 > t.length ? n : kt(n, hr(t, 0, -1))),
- null == n || delete n[Me(Ve(t))]
- )
- }
- function jr(n, t, r, e) {
- for (
- var u = n.length, i = e ? u : -1;
- (e ? i-- : ++i < u) && t(n[i], i, n);
-
- );
- return r
- ? hr(n, e ? 0 : i, e ? i + 1 : u)
- : hr(n, e ? i + 1 : 0, e ? u : i)
- }
- function wr(n, t) {
- var r = n
- return (
- r instanceof Un && (r = r.value()),
- l(
- t,
- function(n, t) {
- return t.func.apply(t.thisArg, a([n], t.args))
- },
- r
- )
- )
- }
- function mr(n, t, r) {
- var e = n.length
- if (2 > e) return e ? br(n[0]) : []
- for (var u = -1, i = Ku(e); ++u < e; )
- for (var o = n[u], f = -1; ++f < e; )
- f != u && (i[u] = yt(i[u] || o, n[f], t, r))
- return br(wt(i, 1), t, r)
- }
- function Ar(n, t, r) {
- for (var e = -1, u = n.length, i = t.length, o = {}; ++e < u; )
- r(o, n[e], e < i ? t[e] : T)
- return o
- }
- function Er(n) {
- return hu(n) ? n : []
- }
- function kr(n) {
- return typeof n == "function" ? n : $u
- }
- function Sr(n, t) {
- return ff(n) ? n : Ie(n, t) ? [n] : jo(Iu(n))
- }
- function Or(n, t, r) {
- var e = n.length
- return (r = r === T ? e : r), !t && r >= e ? n : hr(n, t, r)
- }
- function Ir(n, t) {
- if (t) return n.slice()
- var r = n.length,
- r = gi ? gi(r) : new n.constructor(r)
- return n.copy(r), r
- }
- function Rr(n) {
- var t = new n.constructor(n.byteLength)
- return new vi(t).set(new vi(n)), t
- }
- function zr(n, t) {
- return new n.constructor(
- t ? Rr(n.buffer) : n.buffer,
- n.byteOffset,
- n.length
- )
- }
- function Wr(n, t) {
- if (n !== t) {
- var r = n !== T,
- e = null === n,
- u = n === n,
- i = wu(n),
- o = t !== T,
- f = null === t,
- c = t === t,
- a = wu(t)
- if (
- (!f && !a && !i && n > t) ||
- (i && o && c && !f && !a) ||
- (e && o && c) ||
- (!r && c) ||
- !u
- )
- return 1
- if (
- (!e && !i && !a && n < t) ||
- (a && r && u && !e && !i) ||
- (f && r && u) ||
- (!o && u) ||
- !c
- )
- return -1
- }
- return 0
- }
- function Br(n, t, r, e) {
- var u = -1,
- i = n.length,
- o = r.length,
- f = -1,
- c = t.length,
- a = Ui(i - o, 0),
- l = Ku(c + a)
- for (e = !e; ++f < c; ) l[f] = t[f]
- for (; ++u < o; ) (e || u < i) && (l[r[u]] = n[u])
- for (; a--; ) l[f++] = n[u++]
- return l
- }
- function Lr(n, t, r, e) {
- var u = -1,
- i = n.length,
- o = -1,
- f = r.length,
- c = -1,
- a = t.length,
- l = Ui(i - f, 0),
- s = Ku(l + a)
- for (e = !e; ++u < l; ) s[u] = n[u]
- for (l = u; ++c < a; ) s[l + c] = t[c]
- for (; ++o < f; ) (e || u < i) && (s[l + r[o]] = n[u++])
- return s
- }
- function Ur(n, t) {
- var r = -1,
- e = n.length
- for (t || (t = Ku(e)); ++r < e; ) t[r] = n[r]
- return t
- }
- function Cr(n, t, r, e) {
- var u = !r
- r || (r = {})
- for (var i = -1, o = t.length; ++i < o; ) {
- var f = t[i],
- c = e ? e(r[f], n[f], f, r, n) : T
- c === T && (c = n[f]), u ? st(r, f, c) : ot(r, f, c)
- }
- return r
- }
- function Dr(n, t) {
- return Cr(n, po(n), t)
- }
- function Mr(n, t) {
- return Cr(n, _o(n), t)
- }
- function Tr(n, r) {
- return function(e, u) {
- var i = ff(e) ? t : ct,
- o = r ? r() : {}
- return i(e, n, ye(u, 2), o)
- }
- }
- function $r(n) {
- return fr(function(t, r) {
- var e = -1,
- u = r.length,
- i = 1 < u ? r[u - 1] : T,
- o = 2 < u ? r[2] : T,
- i = 3 < n.length && typeof i == "function" ? (u--, i) : T
- for (
- o && Oe(r[0], r[1], o) && ((i = 3 > u ? T : i), (u = 1)),
- t = Qu(t);
- ++e < u;
-
- )
- (o = r[e]) && n(t, o, e, i)
- return t
- })
- }
- function Fr(n, t) {
- return function(r, e) {
- if (null == r) return r
- if (!su(r)) return n(r, e)
- for (
- var u = r.length, i = t ? u : -1, o = Qu(r);
- (t ? i-- : ++i < u) && false !== e(o[i], i, o);
-
- );
- return r
- }
- }
- function Nr(n) {
- return function(t, r, e) {
- var u = -1,
- i = Qu(t)
- e = e(t)
- for (var o = e.length; o--; ) {
- var f = e[n ? o : ++u]
- if (false === r(i[f], f, i)) break
- }
- return t
- }
- }
- function Pr(n, t, r) {
- function e() {
- return (this && this !== $n && this instanceof e ? i : n).apply(
- u ? r : this,
- arguments
- )
- }
- var u = 1 & t,
- i = Vr(n)
- return e
- }
- function Zr(n) {
- return function(t) {
- t = Iu(t)
- var r = Rn.test(t) ? M(t) : T,
- e = r ? r[0] : t.charAt(0)
- return (t = r ? Or(r, 1).join("") : t.slice(1)), e[n]() + t
- }
- }
- function qr(n) {
- return function(t) {
- return l(Mu(Du(t).replace(kn, "")), n, "")
- }
- }
- function Vr(n) {
- return function() {
- var t = arguments
- switch (t.length) {
- case 0:
- return new n()
- case 1:
- return new n(t[0])
- case 2:
- return new n(t[0], t[1])
- case 3:
- return new n(t[0], t[1], t[2])
- case 4:
- return new n(t[0], t[1], t[2], t[3])
- case 5:
- return new n(t[0], t[1], t[2], t[3], t[4])
- case 6:
- return new n(t[0], t[1], t[2], t[3], t[4], t[5])
- case 7:
- return new n(t[0], t[1], t[2], t[3], t[4], t[5], t[6])
- }
- var r = eo(n.prototype),
- t = n.apply(r, t)
- return du(t) ? t : r
- }
- }
- function Kr(t, r, e) {
- function u() {
- for (var o = arguments.length, f = Ku(o), c = o, a = de(u); c--; )
- f[c] = arguments[c]
- return (
- (c = 3 > o && f[0] !== a && f[o - 1] !== a ? [] : L(f, a)),
- (o -= c.length),
- o < e
- ? ue(t, r, Jr, u.placeholder, T, f, c, T, T, e - o)
- : n(this && this !== $n && this instanceof u ? i : t, this, f)
- )
- }
- var i = Vr(t)
- return u
- }
- function Gr(n) {
- return function(t, r, e) {
- var u = Qu(t)
- if (!su(t)) {
- var i = ye(r, 3)
- ;(t = Wu(t)),
- (r = function(n) {
- return i(u[n], n, u)
- })
- }
- return (r = n(t, r, e)), -1 < r ? u[i ? t[r] : r] : T
- }
- }
- function Hr(n) {
- return pe(function(t) {
- var r = t.length,
- e = r,
- u = On.prototype.thru
- for (n && t.reverse(); e--; ) {
- var i = t[e]
- if (typeof i != "function") throw new ti("Expected a function")
- if (u && !o && "wrapper" == ge(i)) var o = new On([], true)
- }
- for (e = o ? e : r; ++e < r; )
- var i = t[e],
- u = ge(i),
- f = "wrapper" == u ? ho(i) : T,
- o =
- f && Re(f[0]) && 424 == f[1] && !f[4].length && 1 == f[9]
- ? o[ge(f[0])].apply(o, f[3])
- : 1 == i.length && Re(i)
- ? o[u]()
- : o.thru(i)
- return function() {
- var n = arguments,
- e = n[0]
- if (o && 1 == n.length && ff(e)) return o.plant(e).value()
- for (var u = 0, n = r ? t[u].apply(this, n) : e; ++u < r; )
- n = t[u].call(this, n)
- return n
- }
- })
- }
- function Jr(n, t, r, e, u, i, o, f, c, a) {
- function l() {
- for (var d = arguments.length, y = Ku(d), b = d; b--; )
- y[b] = arguments[b]
- if (_) {
- var x,
- j = de(l),
- b = y.length
- for (x = 0; b--; ) y[b] === j && ++x
- }
- if (
- (e && (y = Br(y, e, u, _)),
- i && (y = Lr(y, i, o, _)),
- (d -= x),
- _ && d < a)
- )
- return (
- (j = L(y, j)),
- ue(n, t, Jr, l.placeholder, r, y, j, f, c, a - d)
- )
- if (((j = h ? r : this), (b = p ? j[n] : n), (d = y.length), f)) {
- x = y.length
- for (var w = Ci(f.length, x), m = Ur(y); w--; ) {
- var A = f[w]
- y[w] = Se(A, x) ? m[A] : T
+ run(value);
+ return () => {
+ const index = subscribers.indexOf(subscriber);
+ if (index !== -1) {
+ subscribers.splice(index, 1);
}
- } else v && 1 < d && y.reverse()
- return (
- s && c < d && (y.length = c),
- this && this !== $n && this instanceof l && (b = g || Vr(b)),
- b.apply(j, y)
- )
- }
- var s = 128 & t,
- h = 1 & t,
- p = 2 & t,
- _ = 24 & t,
- v = 512 & t,
- g = p ? T : Vr(n)
- return l
- }
- function Yr(n, t) {
- return function(r, e) {
- return Bt(r, n, t(e))
- }
- }
- function Qr(n, t) {
- return function(r, e) {
- var u
- if (r === T && e === T) return t
- if ((r !== T && (u = r), e !== T)) {
- if (u === T) return e
- typeof r == "string" || typeof e == "string"
- ? ((r = yr(r)), (e = yr(e)))
- : ((r = dr(r)), (e = dr(e))),
- (u = n(r, e))
- }
- return u
- }
- }
- function Xr(t) {
- return pe(function(r) {
- return (
- (r = c(r, k(ye()))),
- fr(function(e) {
- var u = this
- return t(r, function(t) {
- return n(t, u, e)
- })
- })
- )
- })
- }
- function ne(n, t) {
- t = t === T ? " " : yr(t)
- var r = t.length
- return 2 > r
- ? r
- ? or(t, n)
- : t
- : ((r = or(t, Oi(n / D(t)))),
- Rn.test(t) ? Or(M(r), 0, n).join("") : r.slice(0, n))
- }
- function te(t, r, e, u) {
- function i() {
- for (
- var r = -1,
- c = arguments.length,
- a = -1,
- l = u.length,
- s = Ku(l + c),
- h = this && this !== $n && this instanceof i ? f : t;
- ++a < l;
+ if (subscribers.length === 0) {
+ stop();
+ stop = null;
+ }
+ };
+ }
+ return { set, update, subscribe };
+ }
- )
- s[a] = u[a]
- for (; c--; ) s[a++] = arguments[++r]
- return n(h, o ? e : this, s)
- }
- var o = 1 & r,
- f = Vr(t)
- return i
- }
- function re(n) {
- return function(t, r, e) {
- e && typeof e != "number" && Oe(t, r, e) && (r = e = T),
- (t = Au(t)),
- r === T ? ((r = t), (t = 0)) : (r = Au(r)),
- (e = e === T ? (t < r ? 1 : -1) : Au(e))
- var u = -1
- r = Ui(Oi((r - t) / (e || 1)), 0)
- for (var i = Ku(r); r--; ) (i[n ? r : ++u] = t), (t += e)
- return i
- }
- }
- function ee(n) {
- return function(t, r) {
- return (
- (typeof t == "string" && typeof r == "string") ||
- ((t = Su(t)), (r = Su(r))),
- n(t, r)
- )
- }
- }
- function ue(n, t, r, e, u, i, o, f, c, a) {
- var l = 8 & t,
- s = l ? o : T
- o = l ? T : o
- var h = l ? i : T
- return (
- (i = l ? T : i),
- (t = (t | (l ? 32 : 64)) & ~(l ? 64 : 32)),
- 4 & t || (t &= -4),
- (u = [n, t, u, h, s, i, o, f, c, a]),
- (r = r.apply(T, u)),
- Re(n) && yo(r, u),
- (r.placeholder = e),
- Ue(r, n, t)
- )
- }
- function ie(n) {
- var t = Yu[n]
- return function(n, r) {
- if (
- ((n = Su(n)), (r = null == r ? 0 : Ci(Eu(r), 292)) && Wi(n))
- ) {
- var e = (Iu(n) + "e").split("e"),
- e = t(e[0] + "e" + (+e[1] + r)),
- e = (Iu(e) + "e").split("e")
- return +(e[0] + "e" + (+e[1] - r))
- }
- return t(n)
- }
- }
- function oe(n) {
- return function(t) {
- var r = vo(t)
- return "[object Map]" == r
- ? W(t)
- : "[object Set]" == r
- ? C(t)
- : E(t, n(t))
- }
- }
- function fe(n, t, r, e, u, i, o, f) {
- var c = 2 & t
- if (!c && typeof n != "function")
- throw new ti("Expected a function")
- var a = e ? e.length : 0
- if (
- (a || ((t &= -97), (e = u = T)),
- (o = o === T ? o : Ui(Eu(o), 0)),
- (f = f === T ? f : Eu(f)),
- (a -= u ? u.length : 0),
- 64 & t)
- ) {
- var l = e,
- s = u
- e = u = T
- }
- var h = c ? T : ho(n)
- return (
- (i = [n, t, r, e, u, l, s, i, o, f]),
- h &&
- ((r = i[1]),
- (n = h[1]),
- (t = r | n),
- (e =
- (128 == n && 8 == r) ||
- (128 == n && 256 == r && i[7].length <= h[8]) ||
- (384 == n && h[7].length <= h[8] && 8 == r)),
- 131 > t || e) &&
- (1 & n && ((i[2] = h[2]), (t |= 1 & r ? 0 : 4)),
- (r = h[3]) &&
- ((e = i[3]),
- (i[3] = e ? Br(e, r, h[4]) : r),
- (i[4] = e ? L(i[3], "__lodash_placeholder__") : h[4])),
- (r = h[5]) &&
- ((e = i[5]),
- (i[5] = e ? Lr(e, r, h[6]) : r),
- (i[6] = e ? L(i[5], "__lodash_placeholder__") : h[6])),
- (r = h[7]) && (i[7] = r),
- 128 & n && (i[8] = null == i[8] ? h[8] : Ci(i[8], h[8])),
- null == i[9] && (i[9] = h[9]),
- (i[0] = h[0]),
- (i[1] = t)),
- (n = i[0]),
- (t = i[1]),
- (r = i[2]),
- (e = i[3]),
- (u = i[4]),
- (f = i[9] = i[9] === T ? (c ? 0 : n.length) : Ui(i[9] - a, 0)),
- !f && 24 & t && (t &= -25),
- Ue(
- (h ? co : yo)(
- t && 1 != t
- ? 8 == t || 16 == t
- ? Kr(n, t, f)
- : (32 != t && 33 != t) || u.length
- ? Jr.apply(T, i)
- : te(n, t, r, e)
- : Pr(n, t, r),
- i
- ),
- n,
- t
- )
- )
- }
- function ce(n, t, r, e) {
- return n === T || (lu(n, ei[r]) && !oi.call(e, r)) ? t : n
- }
- function ae(n, t, r, e, u, i) {
- return (
- du(n) && du(t) && (i.set(t, n), Yt(n, t, T, ae, i), i.delete(t)),
- n
- )
- }
- function le(n) {
- return xu(n) ? T : n
- }
- function se(n, t, r, e, u, i) {
- var o = 1 & r,
- f = n.length,
- c = t.length
- if (f != c && !(o && c > f)) return false
- if ((c = i.get(n)) && i.get(t)) return c == t
- var c = -1,
- a = true,
- l = 2 & r ? new Nn() : T
- for (i.set(n, t), i.set(t, n); ++c < f; ) {
- var s = n[c],
- p = t[c]
- if (e) var _ = o ? e(p, s, c, t, n, i) : e(s, p, c, n, t, i)
- if (_ !== T) {
- if (_) continue
- a = false
- break
- }
- if (l) {
- if (
- !h(t, function(n, t) {
- if (!O(l, t) && (s === n || u(s, n, r, e, i)))
- return l.push(t)
- })
- ) {
- a = false
- break
- }
- } else if (s !== p && !u(s, p, r, e, i)) {
- a = false
- break
- }
- }
- return i.delete(n), i.delete(t), a
- }
- function he(n, t, r, e, u, i, o) {
- switch (r) {
- case "[object DataView]":
- if (
- n.byteLength != t.byteLength ||
- n.byteOffset != t.byteOffset
- )
- break
- ;(n = n.buffer), (t = t.buffer)
- case "[object ArrayBuffer]":
- if (n.byteLength != t.byteLength || !i(new vi(n), new vi(t)))
- break
- return true
- case "[object Boolean]":
- case "[object Date]":
- case "[object Number]":
- return lu(+n, +t)
- case "[object Error]":
- return n.name == t.name && n.message == t.message
- case "[object RegExp]":
- case "[object String]":
- return n == t + ""
- case "[object Map]":
- var f = W
- case "[object Set]":
- if ((f || (f = U), n.size != t.size && !(1 & e))) break
- return (r = o.get(n))
- ? r == t
- : ((e |= 2),
- o.set(n, t),
- (t = se(f(n), f(t), e, u, i, o)),
- o.delete(n),
- t)
- case "[object Symbol]":
- if (to) return to.call(n) == to.call(t)
- }
- return false
- }
- function pe(n) {
- return xo(Be(n, T, Ze), n + "")
- }
- function _e(n) {
- return St(n, Wu, po)
- }
- function ve(n) {
- return St(n, Bu, _o)
- }
- function ge(n) {
- for (
- var t = n.name + "", r = Gi[t], e = oi.call(Gi, t) ? r.length : 0;
- e--;
+ const createCoreApp = (backendDefinition, user) => {
+ const app = {
+ datastore: null,
+ crypto: null,
+ publish: () => {},
+ hierarchy: backendDefinition.hierarchy,
+ actions: backendDefinition.actions,
+ user,
+ };
- ) {
- var u = r[e],
- i = u.func
- if (null == i || i == n) return u.name
- }
- return t
- }
- function de(n) {
- return (oi.call(An, "placeholder") ? An : n).placeholder
- }
- function ye() {
- var n = An.iteratee || Fu,
- n = n === Fu ? qt : n
- return arguments.length ? n(arguments[0], arguments[1]) : n
- }
- function be(n, t) {
- var r = n.__data__,
- e = typeof t
- return ("string" == e ||
- "number" == e ||
- "symbol" == e ||
- "boolean" == e
- ? "__proto__" !== t
- : null === t)
- ? r[typeof t == "string" ? "string" : "hash"]
- : r.map
- }
- function xe(n) {
- for (var t = Wu(n), r = t.length; r--; ) {
- var e = t[r],
- u = n[e]
- t[r] = [e, u, u === u && !du(u)]
- }
- return t
- }
- function je(n, t) {
- var r = null == n ? T : n[t]
- return Ft(r) ? r : T
- }
- function we(n, t, r) {
- t = Sr(t, n)
- for (var e = -1, u = t.length, i = false; ++e < u; ) {
- var o = Me(t[e])
- if (!(i = null != n && r(n, o))) break
- n = n[o]
- }
- return i || ++e != u
- ? i
- : ((u = null == n ? 0 : n.length),
- !!u && gu(u) && Se(o, u) && (ff(n) || of(n)))
- }
- function me(n) {
- var t = n.length,
- r = new n.constructor(t)
- return (
- t &&
- "string" == typeof n[0] &&
- oi.call(n, "index") &&
- ((r.index = n.index), (r.input = n.input)),
- r
- )
- }
- function Ae(n) {
- return typeof n.constructor != "function" || ze(n) ? {} : eo(di(n))
- }
- function Ee(n, t, r) {
- var e = n.constructor
- switch (t) {
- case "[object ArrayBuffer]":
- return Rr(n)
- case "[object Boolean]":
- case "[object Date]":
- return new e(+n)
- case "[object DataView]":
- return (
- (t = r ? Rr(n.buffer) : n.buffer),
- new n.constructor(t, n.byteOffset, n.byteLength)
- )
- case "[object Float32Array]":
- case "[object Float64Array]":
- case "[object Int8Array]":
- case "[object Int16Array]":
- case "[object Int32Array]":
- case "[object Uint8Array]":
- case "[object Uint8ClampedArray]":
- case "[object Uint16Array]":
- case "[object Uint32Array]":
- return zr(n, r)
- case "[object Map]":
- return new e()
- case "[object Number]":
- case "[object String]":
- return new e(n)
- case "[object RegExp]":
- return (
- (t = new n.constructor(n.source, _n.exec(n))),
- (t.lastIndex = n.lastIndex),
- t
- )
- case "[object Set]":
- return new e()
- case "[object Symbol]":
- return to ? Qu(to.call(n)) : {}
- }
- }
- function ke(n) {
- return ff(n) || of(n) || !!(ji && n && n[ji])
- }
- function Se(n, t) {
- var r = typeof n
- return (
- (t = null == t ? 9007199254740991 : t),
- !!t &&
- ("number" == r || ("symbol" != r && bn.test(n))) &&
- -1 < n &&
- 0 == n % 1 &&
- n < t
- )
- }
- function Oe(n, t, r) {
- if (!du(r)) return false
- var e = typeof t
- return (
- !!("number" == e
- ? su(r) && Se(t, r.length)
- : "string" == e && t in r) && lu(r[t], n)
- )
- }
- function Ie(n, t) {
- if (ff(n)) return false
- var r = typeof n
- return (
- !(
- "number" != r &&
- "symbol" != r &&
- "boolean" != r &&
- null != n &&
- !wu(n)
- ) ||
- nn.test(n) ||
- !X.test(n) ||
- (null != t && n in Qu(t))
- )
- }
- function Re(n) {
- var t = ge(n),
- r = An[t]
- return (
- typeof r == "function" &&
- t in Un.prototype &&
- (n === r || ((t = ho(r)), !!t && n === t[0]))
- )
- }
- function ze(n) {
- var t = n && n.constructor
- return n === ((typeof t == "function" && t.prototype) || ei)
- }
- function We(n, t) {
- return function(r) {
- return null != r && r[n] === t && (t !== T || n in Qu(r))
- }
- }
- function Be(t, r, e) {
- return (
- (r = Ui(r === T ? t.length - 1 : r, 0)),
- function() {
- for (
- var u = arguments, i = -1, o = Ui(u.length - r, 0), f = Ku(o);
- ++i < o;
+ return app
+ };
- )
- f[i] = u[r + i]
- for (i = -1, o = Ku(r + 1); ++i < r; ) o[i] = u[i]
- return (o[r] = e(f)), n(t, this, o)
- }
- )
- }
- function Le(n, t) {
- if (
- ("constructor" !== t || "function" != typeof n[t]) &&
- "__proto__" != t
- )
- return n[t]
- }
- function Ue(n, t, r) {
- var e = t + ""
- t = xo
- var u,
- i = $e
- return (
- (u = (u = e.match(an)) ? u[1].split(ln) : []),
- (r = i(u, r)),
- (i = r.length) &&
- ((u = i - 1),
- (r[u] = (1 < i ? "& " : "") + r[u]),
- (r = r.join(2 < i ? ", " : " ")),
- (e = e.replace(cn, "{\n/* [wrapped with " + r + "] */\n"))),
- t(n, e)
- )
- }
- function Ce(n) {
- var t = 0,
- r = 0
- return function() {
- var e = Di(),
- u = 16 - (e - r)
- if (((r = e), 0 < u)) {
- if (800 <= ++t) return arguments[0]
- } else t = 0
- return n.apply(T, arguments)
- }
- }
- function De(n, t) {
- var r = -1,
- e = n.length,
- u = e - 1
- for (t = t === T ? e : t; ++r < t; ) {
- var e = ir(r, u),
- i = n[e]
- ;(n[e] = n[r]), (n[r] = i)
- }
- return (n.length = t), n
- }
- function Me(n) {
- if (typeof n == "string" || wu(n)) return n
- var t = n + ""
- return "0" == t && 1 / n == -$ ? "-0" : t
- }
- function Te(n) {
- if (null != n) {
- try {
- return ii.call(n)
- } catch (n) {}
- return n + ""
- }
- return ""
- }
- function $e(n, t) {
- return (
- r(N, function(r) {
- var e = "_." + r[0]
- t & r[1] && !o(n, e) && n.push(e)
- }),
- n.sort()
- )
- }
- function Fe(n) {
- if (n instanceof Un) return n.clone()
- var t = new On(n.__wrapped__, n.__chain__)
- return (
- (t.__actions__ = Ur(n.__actions__)),
- (t.__index__ = n.__index__),
- (t.__values__ = n.__values__),
- t
- )
- }
- function Ne(n, t, r) {
- var e = null == n ? 0 : n.length
- return e
- ? ((r = null == r ? 0 : Eu(r)),
- 0 > r && (r = Ui(e + r, 0)),
- _(n, ye(t, 3), r))
- : -1
- }
- function Pe(n, t, r) {
- var e = null == n ? 0 : n.length
- if (!e) return -1
- var u = e - 1
- return (
- r !== T &&
- ((u = Eu(r)), (u = 0 > r ? Ui(e + u, 0) : Ci(u, e - 1))),
- _(n, ye(t, 3), u, true)
- )
- }
- function Ze(n) {
- return (null == n ? 0 : n.length) ? wt(n, 1) : []
- }
- function qe(n) {
- return n && n.length ? n[0] : T
- }
- function Ve(n) {
- var t = null == n ? 0 : n.length
- return t ? n[t - 1] : T
- }
- function Ke(n, t) {
- return n && n.length && t && t.length ? er(n, t) : n
- }
- function Ge(n) {
- return null == n ? n : $i.call(n)
- }
- function He(n) {
- if (!n || !n.length) return []
- var t = 0
- return (
- (n = i(n, function(n) {
- if (hu(n)) return (t = Ui(n.length, t)), true
- })),
- A(t, function(t) {
- return c(n, b(t))
- })
- )
- }
- function Je(t, r) {
- if (!t || !t.length) return []
- var e = He(t)
- return null == r
- ? e
- : c(e, function(t) {
- return n(r, T, t)
- })
- }
- function Ye(n) {
- return (n = An(n)), (n.__chain__ = true), n
- }
- function Qe(n, t) {
- return t(n)
- }
- function Xe() {
- return this
- }
- function nu(n, t) {
- return (ff(n) ? r : uo)(n, ye(t, 3))
- }
- function tu(n, t) {
- return (ff(n) ? e : io)(n, ye(t, 3))
- }
- function ru(n, t) {
- return (ff(n) ? c : Gt)(n, ye(t, 3))
- }
- function eu(n, t, r) {
- return (
- (t = r ? T : t),
- (t = n && null == t ? n.length : t),
- fe(n, 128, T, T, T, T, t)
- )
- }
- function uu(n, t) {
- var r
- if (typeof t != "function") throw new ti("Expected a function")
- return (
- (n = Eu(n)),
- function() {
- return (
- 0 < --n && (r = t.apply(this, arguments)),
- 1 >= n && (t = T),
- r
- )
- }
- )
- }
- function iu(n, t, r) {
- return (
- (t = r ? T : t),
- (n = fe(n, 8, T, T, T, T, T, t)),
- (n.placeholder = iu.placeholder),
- n
- )
- }
- function ou(n, t, r) {
- return (
- (t = r ? T : t),
- (n = fe(n, 16, T, T, T, T, T, t)),
- (n.placeholder = ou.placeholder),
- n
- )
- }
- function fu(n, t, r) {
- function e(t) {
- var r = c,
- e = a
- return (c = a = T), (_ = t), (s = n.apply(e, r))
- }
- function u(n) {
- var r = n - p
- return (n -= _), p === T || r >= t || 0 > r || (g && n >= l)
- }
- function i() {
- var n = Go()
- if (u(n)) return o(n)
- var r,
- e = bo
- ;(r = n - _),
- (n = t - (n - p)),
- (r = g ? Ci(n, l - r) : n),
- (h = e(i, r))
- }
- function o(n) {
- return (h = T), d && c ? e(n) : ((c = a = T), s)
- }
- function f() {
- var n = Go(),
- r = u(n)
- if (((c = arguments), (a = this), (p = n), r)) {
- if (h === T) return (_ = n = p), (h = bo(i, t)), v ? e(n) : s
- if (g) return lo(h), (h = bo(i, t)), e(p)
- }
- return h === T && (h = bo(i, t)), s
- }
- var c,
- a,
- l,
- s,
- h,
- p,
- _ = 0,
- v = false,
- g = false,
- d = true
- if (typeof n != "function") throw new ti("Expected a function")
- return (
- (t = Su(t) || 0),
- du(r) &&
- ((v = !!r.leading),
- (l = (g = "maxWait" in r) ? Ui(Su(r.maxWait) || 0, t) : l),
- (d = "trailing" in r ? !!r.trailing : d)),
- (f.cancel = function() {
- h !== T && lo(h), (_ = 0), (c = p = a = h = T)
- }),
- (f.flush = function() {
- return h === T ? s : o(Go())
- }),
- f
- )
- }
- function cu(n, t) {
- function r() {
- var e = arguments,
- u = t ? t.apply(this, e) : e[0],
- i = r.cache
- return i.has(u)
- ? i.get(u)
- : ((e = n.apply(this, e)), (r.cache = i.set(u, e) || i), e)
- }
- if (typeof n != "function" || (null != t && typeof t != "function"))
- throw new ti("Expected a function")
- return (r.cache = new (cu.Cache || Fn)()), r
- }
- function au(n) {
- if (typeof n != "function") throw new ti("Expected a function")
- return function() {
- var t = arguments
- switch (t.length) {
- case 0:
- return !n.call(this)
- case 1:
- return !n.call(this, t[0])
- case 2:
- return !n.call(this, t[0], t[1])
- case 3:
- return !n.call(this, t[0], t[1], t[2])
- }
- return !n.apply(this, t)
- }
- }
- function lu(n, t) {
- return n === t || (n !== n && t !== t)
- }
- function su(n) {
- return null != n && gu(n.length) && !_u(n)
- }
- function hu(n) {
- return yu(n) && su(n)
- }
- function pu(n) {
- if (!yu(n)) return false
- var t = Ot(n)
- return (
- "[object Error]" == t ||
- "[object DOMException]" == t ||
- (typeof n.message == "string" &&
- typeof n.name == "string" &&
- !xu(n))
- )
- }
- function _u(n) {
- return (
- !!du(n) &&
- ((n = Ot(n)),
- "[object Function]" == n ||
- "[object GeneratorFunction]" == n ||
- "[object AsyncFunction]" == n ||
- "[object Proxy]" == n)
- )
- }
- function vu(n) {
- return typeof n == "number" && n == Eu(n)
- }
- function gu(n) {
- return (
- typeof n == "number" &&
- -1 < n &&
- 0 == n % 1 &&
- 9007199254740991 >= n
- )
- }
- function du(n) {
- var t = typeof n
- return null != n && ("object" == t || "function" == t)
- }
- function yu(n) {
- return null != n && typeof n == "object"
- }
- function bu(n) {
- return typeof n == "number" || (yu(n) && "[object Number]" == Ot(n))
- }
- function xu(n) {
- return (
- !(!yu(n) || "[object Object]" != Ot(n)) &&
- ((n = di(n)),
- null === n ||
- ((n = oi.call(n, "constructor") && n.constructor),
- typeof n == "function" && n instanceof n && ii.call(n) == li))
- )
- }
- function ju(n) {
- return (
- typeof n == "string" ||
- (!ff(n) && yu(n) && "[object String]" == Ot(n))
- )
- }
- function wu(n) {
- return typeof n == "symbol" || (yu(n) && "[object Symbol]" == Ot(n))
- }
- function mu(n) {
- if (!n) return []
- if (su(n)) return ju(n) ? M(n) : Ur(n)
- if (wi && n[wi]) {
- n = n[wi]()
- for (var t, r = []; !(t = n.next()).done; ) r.push(t.value)
- return r
- }
- return (
- (t = vo(n)),
- ("[object Map]" == t ? W : "[object Set]" == t ? U : Uu)(n)
- )
- }
- function Au(n) {
- return n
- ? ((n = Su(n)),
- n === $ || n === -$
- ? 1.7976931348623157e308 * (0 > n ? -1 : 1)
- : n === n
- ? n
- : 0)
- : 0 === n
- ? n
- : 0
- }
- function Eu(n) {
- n = Au(n)
- var t = n % 1
- return n === n ? (t ? n - t : n) : 0
- }
- function ku(n) {
- return n ? pt(Eu(n), 0, 4294967295) : 0
- }
- function Su(n) {
- if (typeof n == "number") return n
- if (wu(n)) return F
- if (
- (du(n) &&
- ((n = typeof n.valueOf == "function" ? n.valueOf() : n),
- (n = du(n) ? n + "" : n)),
- typeof n != "string")
- )
- return 0 === n ? n : +n
- n = n.replace(un, "")
- var t = gn.test(n)
- return t || yn.test(n)
- ? Dn(n.slice(2), t ? 2 : 8)
- : vn.test(n)
- ? F
- : +n
- }
- function Ou(n) {
- return Cr(n, Bu(n))
- }
- function Iu(n) {
- return null == n ? "" : yr(n)
- }
- function Ru(n, t, r) {
- return (n = null == n ? T : kt(n, t)), n === T ? r : n
- }
- function zu(n, t) {
- return null != n && we(n, t, zt)
- }
- function Wu(n) {
- return su(n) ? qn(n) : Vt(n)
- }
- function Bu(n) {
- if (su(n)) n = qn(n, true)
- else if (du(n)) {
- var t,
- r = ze(n),
- e = []
- for (t in n)
- ("constructor" != t || (!r && oi.call(n, t))) && e.push(t)
- n = e
- } else {
- if (((t = []), null != n)) for (r in Qu(n)) t.push(r)
- n = t
- }
- return n
- }
- function Lu(n, t) {
- if (null == n) return {}
- var r = c(ve(n), function(n) {
- return [n]
- })
- return (
- (t = ye(t)),
- tr(n, r, function(n, r) {
- return t(n, r[0])
- })
- )
- }
- function Uu(n) {
- return null == n ? [] : S(n, Wu(n))
- }
- function Cu(n) {
- return $f(Iu(n).toLowerCase())
- }
- function Du(n) {
- return (n = Iu(n)) && n.replace(xn, Xn).replace(Sn, "")
- }
- function Mu(n, t, r) {
- return (
- (n = Iu(n)),
- (t = r ? T : t),
- t === T
- ? zn.test(n)
- ? n.match(In) || []
- : n.match(sn) || []
- : n.match(t) || []
- )
- }
- function Tu(n) {
- return function() {
- return n
- }
- }
- function $u(n) {
- return n
- }
- function Fu(n) {
- return qt(typeof n == "function" ? n : _t(n, 1))
- }
- function Nu(n, t, e) {
- var u = Wu(t),
- i = Et(t, u)
- null != e ||
- (du(t) && (i.length || !u.length)) ||
- ((e = t), (t = n), (n = this), (i = Et(t, Wu(t))))
- var o = !(du(e) && "chain" in e && !e.chain),
- f = _u(n)
- return (
- r(i, function(r) {
- var e = t[r]
- ;(n[r] = e),
- f &&
- (n.prototype[r] = function() {
- var t = this.__chain__
- if (o || t) {
- var r = n(this.__wrapped__)
- return (
- (r.__actions__ = Ur(this.__actions__)).push({
- func: e,
- args: arguments,
- thisArg: n,
- }),
- (r.__chain__ = t),
- r
- )
- }
- return e.apply(n, a([this.value()], arguments))
- })
- }),
- n
- )
- }
- function Pu() {}
- function Zu(n) {
- return Ie(n) ? b(Me(n)) : rr(n)
- }
- function qu() {
- return []
- }
- function Vu() {
- return false
- }
- mn = null == mn ? $n : rt.defaults($n.Object(), mn, rt.pick($n, Wn))
- var Ku = mn.Array,
- Gu = mn.Date,
- Hu = mn.Error,
- Ju = mn.Function,
- Yu = mn.Math,
- Qu = mn.Object,
- Xu = mn.RegExp,
- ni = mn.String,
- ti = mn.TypeError,
- ri = Ku.prototype,
- ei = Qu.prototype,
- ui = mn["__core-js_shared__"],
- ii = Ju.prototype.toString,
- oi = ei.hasOwnProperty,
- fi = 0,
- ci = (function() {
- var n = /[^.]+$/.exec((ui && ui.keys && ui.keys.IE_PROTO) || "")
- return n ? "Symbol(src)_1." + n : ""
- })(),
- ai = ei.toString,
- li = ii.call(Qu),
- si = $n._,
- hi = Xu(
- "^" +
- ii
- .call(oi)
- .replace(rn, "\\$&")
- .replace(
- /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
- "$1.*?"
- ) +
- "$"
- ),
- pi = Pn ? mn.Buffer : T,
- _i = mn.Symbol,
- vi = mn.Uint8Array,
- gi = pi ? pi.g : T,
- di = B(Qu.getPrototypeOf, Qu),
- yi = Qu.create,
- bi = ei.propertyIsEnumerable,
- xi = ri.splice,
- ji = _i ? _i.isConcatSpreadable : T,
- wi = _i ? _i.iterator : T,
- mi = _i ? _i.toStringTag : T,
- Ai = (function() {
- try {
- var n = je(Qu, "defineProperty")
- return n({}, "", {}), n
- } catch (n) {}
- })(),
- Ei = mn.clearTimeout !== $n.clearTimeout && mn.clearTimeout,
- ki = Gu && Gu.now !== $n.Date.now && Gu.now,
- Si = mn.setTimeout !== $n.setTimeout && mn.setTimeout,
- Oi = Yu.ceil,
- Ii = Yu.floor,
- Ri = Qu.getOwnPropertySymbols,
- zi = pi ? pi.isBuffer : T,
- Wi = mn.isFinite,
- Bi = ri.join,
- Li = B(Qu.keys, Qu),
- Ui = Yu.max,
- Ci = Yu.min,
- Di = Gu.now,
- Mi = mn.parseInt,
- Ti = Yu.random,
- $i = ri.reverse,
- Fi = je(mn, "DataView"),
- Ni = je(mn, "Map"),
- Pi = je(mn, "Promise"),
- Zi = je(mn, "Set"),
- qi = je(mn, "WeakMap"),
- Vi = je(Qu, "create"),
- Ki = qi && new qi(),
- Gi = {},
- Hi = Te(Fi),
- Ji = Te(Ni),
- Yi = Te(Pi),
- Qi = Te(Zi),
- Xi = Te(qi),
- no = _i ? _i.prototype : T,
- to = no ? no.valueOf : T,
- ro = no ? no.toString : T,
- eo = (function() {
- function n() {}
- return function(t) {
- return du(t)
- ? yi
- ? yi(t)
- : ((n.prototype = t), (t = new n()), (n.prototype = T), t)
- : {}
- }
- })()
- ;(An.templateSettings = {
- escape: J,
- evaluate: Y,
- interpolate: Q,
- variable: "",
- imports: { _: An },
- }),
- (An.prototype = En.prototype),
- (An.prototype.constructor = An),
- (On.prototype = eo(En.prototype)),
- (On.prototype.constructor = On),
- (Un.prototype = eo(En.prototype)),
- (Un.prototype.constructor = Un),
- (Mn.prototype.clear = function() {
- ;(this.__data__ = Vi ? Vi(null) : {}), (this.size = 0)
- }),
- (Mn.prototype.delete = function(n) {
- return (
- (n = this.has(n) && delete this.__data__[n]),
- (this.size -= n ? 1 : 0),
- n
- )
- }),
- (Mn.prototype.get = function(n) {
- var t = this.__data__
- return Vi
- ? ((n = t[n]), "__lodash_hash_undefined__" === n ? T : n)
- : oi.call(t, n)
- ? t[n]
- : T
- }),
- (Mn.prototype.has = function(n) {
- var t = this.__data__
- return Vi ? t[n] !== T : oi.call(t, n)
- }),
- (Mn.prototype.set = function(n, t) {
- var r = this.__data__
- return (
- (this.size += this.has(n) ? 0 : 1),
- (r[n] = Vi && t === T ? "__lodash_hash_undefined__" : t),
- this
- )
- }),
- (Tn.prototype.clear = function() {
- ;(this.__data__ = []), (this.size = 0)
- }),
- (Tn.prototype.delete = function(n) {
- var t = this.__data__
- return (
- (n = ft(t, n)),
- !(0 > n) &&
- (n == t.length - 1 ? t.pop() : xi.call(t, n, 1),
- --this.size,
- true)
- )
- }),
- (Tn.prototype.get = function(n) {
- var t = this.__data__
- return (n = ft(t, n)), 0 > n ? T : t[n][1]
- }),
- (Tn.prototype.has = function(n) {
- return -1 < ft(this.__data__, n)
- }),
- (Tn.prototype.set = function(n, t) {
- var r = this.__data__,
- e = ft(r, n)
- return 0 > e ? (++this.size, r.push([n, t])) : (r[e][1] = t), this
- }),
- (Fn.prototype.clear = function() {
- ;(this.size = 0),
- (this.__data__ = {
- hash: new Mn(),
- map: new (Ni || Tn)(),
- string: new Mn(),
- })
- }),
- (Fn.prototype.delete = function(n) {
- return (n = be(this, n).delete(n)), (this.size -= n ? 1 : 0), n
- }),
- (Fn.prototype.get = function(n) {
- return be(this, n).get(n)
- }),
- (Fn.prototype.has = function(n) {
- return be(this, n).has(n)
- }),
- (Fn.prototype.set = function(n, t) {
- var r = be(this, n),
- e = r.size
- return r.set(n, t), (this.size += r.size == e ? 0 : 1), this
- }),
- (Nn.prototype.add = Nn.prototype.push = function(n) {
- return this.__data__.set(n, "__lodash_hash_undefined__"), this
- }),
- (Nn.prototype.has = function(n) {
- return this.__data__.has(n)
- }),
- (Zn.prototype.clear = function() {
- ;(this.__data__ = new Tn()), (this.size = 0)
- }),
- (Zn.prototype.delete = function(n) {
- var t = this.__data__
- return (n = t.delete(n)), (this.size = t.size), n
- }),
- (Zn.prototype.get = function(n) {
- return this.__data__.get(n)
- }),
- (Zn.prototype.has = function(n) {
- return this.__data__.has(n)
- }),
- (Zn.prototype.set = function(n, t) {
- var r = this.__data__
- if (r instanceof Tn) {
- var e = r.__data__
- if (!Ni || 199 > e.length)
- return e.push([n, t]), (this.size = ++r.size), this
- r = this.__data__ = new Fn(e)
- }
- return r.set(n, t), (this.size = r.size), this
- })
- var uo = Fr(mt),
- io = Fr(At, true),
- oo = Nr(),
- fo = Nr(true),
- co = Ki
- ? function(n, t) {
- return Ki.set(n, t), n
- }
- : $u,
- ao = Ai
- ? function(n, t) {
- return Ai(n, "toString", {
- configurable: true,
- enumerable: false,
- value: Tu(t),
- writable: true,
- })
- }
- : $u,
- lo =
- Ei ||
- function(n) {
- return $n.clearTimeout(n)
- },
- so =
- Zi && 1 / U(new Zi([, -0]))[1] == $
- ? function(n) {
- return new Zi(n)
- }
- : Pu,
- ho = Ki
- ? function(n) {
- return Ki.get(n)
- }
- : Pu,
- po = Ri
- ? function(n) {
- return null == n
- ? []
- : ((n = Qu(n)),
- i(Ri(n), function(t) {
- return bi.call(n, t)
- }))
- }
- : qu,
- _o = Ri
- ? function(n) {
- for (var t = []; n; ) a(t, po(n)), (n = di(n))
- return t
- }
- : qu,
- vo = Ot
- ;((Fi && "[object DataView]" != vo(new Fi(new ArrayBuffer(1)))) ||
- (Ni && "[object Map]" != vo(new Ni())) ||
- (Pi && "[object Promise]" != vo(Pi.resolve())) ||
- (Zi && "[object Set]" != vo(new Zi())) ||
- (qi && "[object WeakMap]" != vo(new qi()))) &&
- (vo = function(n) {
- var t = Ot(n)
- if (
- (n = (n = "[object Object]" == t ? n.constructor : T)
- ? Te(n)
- : "")
- )
- switch (n) {
- case Hi:
- return "[object DataView]"
- case Ji:
- return "[object Map]"
- case Yi:
- return "[object Promise]"
- case Qi:
- return "[object Set]"
- case Xi:
- return "[object WeakMap]"
- }
- return t
- })
- var go = ui ? _u : Vu,
- yo = Ce(co),
- bo =
- Si ||
- function(n, t) {
- return $n.setTimeout(n, t)
- },
- xo = Ce(ao),
- jo = (function(n) {
- n = cu(n, function(n) {
- return 500 === t.size && t.clear(), n
- })
- var t = n.cache
- return n
- })(function(n) {
- var t = []
- return (
- 46 === n.charCodeAt(0) && t.push(""),
- n.replace(tn, function(n, r, e, u) {
- t.push(e ? u.replace(hn, "$1") : r || n)
- }),
- t
- )
- }),
- wo = fr(function(n, t) {
- return hu(n) ? yt(n, wt(t, 1, hu, true)) : []
- }),
- mo = fr(function(n, t) {
- var r = Ve(t)
- return (
- hu(r) && (r = T),
- hu(n) ? yt(n, wt(t, 1, hu, true), ye(r, 2)) : []
- )
- }),
- Ao = fr(function(n, t) {
- var r = Ve(t)
- return (
- hu(r) && (r = T), hu(n) ? yt(n, wt(t, 1, hu, true), T, r) : []
- )
- }),
- Eo = fr(function(n) {
- var t = c(n, Er)
- return t.length && t[0] === n[0] ? Wt(t) : []
- }),
- ko = fr(function(n) {
- var t = Ve(n),
- r = c(n, Er)
- return (
- t === Ve(r) ? (t = T) : r.pop(),
- r.length && r[0] === n[0] ? Wt(r, ye(t, 2)) : []
- )
- }),
- So = fr(function(n) {
- var t = Ve(n),
- r = c(n, Er)
- return (
- (t = typeof t == "function" ? t : T) && r.pop(),
- r.length && r[0] === n[0] ? Wt(r, T, t) : []
- )
- }),
- Oo = fr(Ke),
- Io = pe(function(n, t) {
- var r = null == n ? 0 : n.length,
- e = ht(n, t)
- return (
- ur(
- n,
- c(t, function(n) {
- return Se(n, r) ? +n : n
- }).sort(Wr)
- ),
- e
- )
- }),
- Ro = fr(function(n) {
- return br(wt(n, 1, hu, true))
- }),
- zo = fr(function(n) {
- var t = Ve(n)
- return hu(t) && (t = T), br(wt(n, 1, hu, true), ye(t, 2))
- }),
- Wo = fr(function(n) {
- var t = Ve(n),
- t = typeof t == "function" ? t : T
- return br(wt(n, 1, hu, true), T, t)
- }),
- Bo = fr(function(n, t) {
- return hu(n) ? yt(n, t) : []
- }),
- Lo = fr(function(n) {
- return mr(i(n, hu))
- }),
- Uo = fr(function(n) {
- var t = Ve(n)
- return hu(t) && (t = T), mr(i(n, hu), ye(t, 2))
- }),
- Co = fr(function(n) {
- var t = Ve(n),
- t = typeof t == "function" ? t : T
- return mr(i(n, hu), T, t)
- }),
- Do = fr(He),
- Mo = fr(function(n) {
- var t = n.length,
- t = 1 < t ? n[t - 1] : T,
- t = typeof t == "function" ? (n.pop(), t) : T
- return Je(n, t)
- }),
- To = pe(function(n) {
- function t(t) {
- return ht(t, n)
- }
- var r = n.length,
- e = r ? n[0] : 0,
- u = this.__wrapped__
- return !(1 < r || this.__actions__.length) &&
- u instanceof Un &&
- Se(e)
- ? ((u = u.slice(e, +e + (r ? 1 : 0))),
- u.__actions__.push({ func: Qe, args: [t], thisArg: T }),
- new On(u, this.__chain__).thru(function(n) {
- return r && !n.length && n.push(T), n
- }))
- : this.thru(t)
- }),
- $o = Tr(function(n, t, r) {
- oi.call(n, r) ? ++n[r] : st(n, r, 1)
- }),
- Fo = Gr(Ne),
- No = Gr(Pe),
- Po = Tr(function(n, t, r) {
- oi.call(n, r) ? n[r].push(t) : st(n, r, [t])
- }),
- Zo = fr(function(t, r, e) {
- var u = -1,
- i = typeof r == "function",
- o = su(t) ? Ku(t.length) : []
- return (
- uo(t, function(t) {
- o[++u] = i ? n(r, t, e) : Lt(t, r, e)
- }),
- o
- )
- }),
- qo = Tr(function(n, t, r) {
- st(n, r, t)
- }),
- Vo = Tr(
- function(n, t, r) {
- n[r ? 0 : 1].push(t)
- },
- function() {
- return [[], []]
- }
- ),
- Ko = fr(function(n, t) {
- if (null == n) return []
- var r = t.length
- return (
- 1 < r && Oe(n, t[0], t[1])
- ? (t = [])
- : 2 < r && Oe(t[0], t[1], t[2]) && (t = [t[0]]),
- Xt(n, wt(t, 1), [])
- )
- }),
- Go =
- ki ||
- function() {
- return $n.Date.now()
- },
- Ho = fr(function(n, t, r) {
- var e = 1
- if (r.length)
- var u = L(r, de(Ho)),
- e = 32 | e
- return fe(n, e, t, r, u)
- }),
- Jo = fr(function(n, t, r) {
- var e = 3
- if (r.length)
- var u = L(r, de(Jo)),
- e = 32 | e
- return fe(t, e, n, r, u)
- }),
- Yo = fr(function(n, t) {
- return dt(n, 1, t)
- }),
- Qo = fr(function(n, t, r) {
- return dt(n, Su(t) || 0, r)
- })
- cu.Cache = Fn
- var Xo = fr(function(t, r) {
- r =
- 1 == r.length && ff(r[0])
- ? c(r[0], k(ye()))
- : c(wt(r, 1), k(ye()))
- var e = r.length
- return fr(function(u) {
- for (var i = -1, o = Ci(u.length, e); ++i < o; )
- u[i] = r[i].call(this, u[i])
- return n(t, this, u)
- })
- }),
- nf = fr(function(n, t) {
- return fe(n, 32, T, t, L(t, de(nf)))
- }),
- tf = fr(function(n, t) {
- return fe(n, 64, T, t, L(t, de(tf)))
- }),
- rf = pe(function(n, t) {
- return fe(n, 256, T, T, T, t)
- }),
- ef = ee(It),
- uf = ee(function(n, t) {
- return n >= t
- }),
- of = Ut(
- (function() {
- return arguments
- })()
- )
- ? Ut
- : function(n) {
- return yu(n) && oi.call(n, "callee") && !bi.call(n, "callee")
- },
- ff = Ku.isArray,
- cf = Vn ? k(Vn) : Ct,
- af = zi || Vu,
- lf = Kn ? k(Kn) : Dt,
- sf = Gn ? k(Gn) : Tt,
- hf = Hn ? k(Hn) : Nt,
- pf = Jn ? k(Jn) : Pt,
- _f = Yn ? k(Yn) : Zt,
- vf = ee(Kt),
- gf = ee(function(n, t) {
- return n <= t
- }),
- df = $r(function(n, t) {
- if (ze(t) || su(t)) Cr(t, Wu(t), n)
- else for (var r in t) oi.call(t, r) && ot(n, r, t[r])
- }),
- yf = $r(function(n, t) {
- Cr(t, Bu(t), n)
- }),
- bf = $r(function(n, t, r, e) {
- Cr(t, Bu(t), n, e)
- }),
- xf = $r(function(n, t, r, e) {
- Cr(t, Wu(t), n, e)
- }),
- jf = pe(ht),
- wf = fr(function(n, t) {
- n = Qu(n)
- var r = -1,
- e = t.length,
- u = 2 < e ? t[2] : T
- for (u && Oe(t[0], t[1], u) && (e = 1); ++r < e; )
- for (var u = t[r], i = Bu(u), o = -1, f = i.length; ++o < f; ) {
- var c = i[o],
- a = n[c]
- ;(a === T || (lu(a, ei[c]) && !oi.call(n, c))) &&
- (n[c] = u[c])
- }
- return n
- }),
- mf = fr(function(t) {
- return t.push(T, ae), n(Of, T, t)
- }),
- Af = Yr(function(n, t, r) {
- null != t && typeof t.toString != "function" && (t = ai.call(t)),
- (n[t] = r)
- }, Tu($u)),
- Ef = Yr(function(n, t, r) {
- null != t && typeof t.toString != "function" && (t = ai.call(t)),
- oi.call(n, t) ? n[t].push(r) : (n[t] = [r])
- }, ye),
- kf = fr(Lt),
- Sf = $r(function(n, t, r) {
- Yt(n, t, r)
- }),
- Of = $r(function(n, t, r, e) {
- Yt(n, t, r, e)
- }),
- If = pe(function(n, t) {
- var r = {}
- if (null == n) return r
- var e = false
- ;(t = c(t, function(t) {
- return (t = Sr(t, n)), e || (e = 1 < t.length), t
- })),
- Cr(n, ve(n), r),
- e && (r = _t(r, 7, le))
- for (var u = t.length; u--; ) xr(r, t[u])
- return r
- }),
- Rf = pe(function(n, t) {
- return null == n ? {} : nr(n, t)
- }),
- zf = oe(Wu),
- Wf = oe(Bu),
- Bf = qr(function(n, t, r) {
- return (t = t.toLowerCase()), n + (r ? Cu(t) : t)
- }),
- Lf = qr(function(n, t, r) {
- return n + (r ? "-" : "") + t.toLowerCase()
- }),
- Uf = qr(function(n, t, r) {
- return n + (r ? " " : "") + t.toLowerCase()
- }),
- Cf = Zr("toLowerCase"),
- Df = qr(function(n, t, r) {
- return n + (r ? "_" : "") + t.toLowerCase()
- }),
- Mf = qr(function(n, t, r) {
- return n + (r ? " " : "") + $f(t)
- }),
- Tf = qr(function(n, t, r) {
- return n + (r ? " " : "") + t.toUpperCase()
- }),
- $f = Zr("toUpperCase"),
- Ff = fr(function(t, r) {
- try {
- return n(t, T, r)
- } catch (n) {
- return pu(n) ? n : new Hu(n)
- }
- }),
- Nf = pe(function(n, t) {
- return (
- r(t, function(t) {
- ;(t = Me(t)), st(n, t, Ho(n[t], n))
- }),
- n
- )
- }),
- Pf = Hr(),
- Zf = Hr(true),
- qf = fr(function(n, t) {
- return function(r) {
- return Lt(r, n, t)
- }
- }),
- Vf = fr(function(n, t) {
- return function(r) {
- return Lt(n, r, t)
- }
- }),
- Kf = Xr(c),
- Gf = Xr(u),
- Hf = Xr(h),
- Jf = re(),
- Yf = re(true),
- Qf = Qr(function(n, t) {
- return n + t
- }, 0),
- Xf = ie("ceil"),
- nc = Qr(function(n, t) {
- return n / t
- }, 1),
- tc = ie("floor"),
- rc = Qr(function(n, t) {
- return n * t
- }, 1),
- ec = ie("round"),
- uc = Qr(function(n, t) {
- return n - t
- }, 0)
- return (
- (An.after = function(n, t) {
- if (typeof t != "function") throw new ti("Expected a function")
- return (
- (n = Eu(n)),
- function() {
- if (1 > --n) return t.apply(this, arguments)
- }
- )
- }),
- (An.ary = eu),
- (An.assign = df),
- (An.assignIn = yf),
- (An.assignInWith = bf),
- (An.assignWith = xf),
- (An.at = jf),
- (An.before = uu),
- (An.bind = Ho),
- (An.bindAll = Nf),
- (An.bindKey = Jo),
- (An.castArray = function() {
- if (!arguments.length) return []
- var n = arguments[0]
- return ff(n) ? n : [n]
- }),
- (An.chain = Ye),
- (An.chunk = function(n, t, r) {
- if (
- ((t = (r ? Oe(n, t, r) : t === T) ? 1 : Ui(Eu(t), 0)),
- (r = null == n ? 0 : n.length),
- !r || 1 > t)
- )
- return []
- for (var e = 0, u = 0, i = Ku(Oi(r / t)); e < r; )
- i[u++] = hr(n, e, (e += t))
- return i
- }),
- (An.compact = function(n) {
- for (
- var t = -1, r = null == n ? 0 : n.length, e = 0, u = [];
- ++t < r;
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
- ) {
- var i = n[t]
- i && (u[e++] = i)
- }
- return u
- }),
- (An.concat = function() {
- var n = arguments.length
- if (!n) return []
- for (var t = Ku(n - 1), r = arguments[0]; n--; )
- t[n - 1] = arguments[n]
- return a(ff(r) ? Ur(r) : [r], wt(t, 1))
- }),
- (An.cond = function(t) {
- var r = null == t ? 0 : t.length,
- e = ye()
- return (
- (t = r
- ? c(t, function(n) {
- if ("function" != typeof n[1])
- throw new ti("Expected a function")
- return [e(n[0]), n[1]]
- })
- : []),
- fr(function(e) {
- for (var u = -1; ++u < r; ) {
- var i = t[u]
- if (n(i[0], this, e)) return n(i[1], this, e)
- }
- })
- )
- }),
- (An.conforms = function(n) {
- return vt(_t(n, 1))
- }),
- (An.constant = Tu),
- (An.countBy = $o),
- (An.create = function(n, t) {
- var r = eo(n)
- return null == t ? r : at(r, t)
- }),
- (An.curry = iu),
- (An.curryRight = ou),
- (An.debounce = fu),
- (An.defaults = wf),
- (An.defaultsDeep = mf),
- (An.defer = Yo),
- (An.delay = Qo),
- (An.difference = wo),
- (An.differenceBy = mo),
- (An.differenceWith = Ao),
- (An.drop = function(n, t, r) {
- var e = null == n ? 0 : n.length
- return e
- ? ((t = r || t === T ? 1 : Eu(t)), hr(n, 0 > t ? 0 : t, e))
- : []
- }),
- (An.dropRight = function(n, t, r) {
- var e = null == n ? 0 : n.length
- return e
- ? ((t = r || t === T ? 1 : Eu(t)),
- (t = e - t),
- hr(n, 0, 0 > t ? 0 : t))
- : []
- }),
- (An.dropRightWhile = function(n, t) {
- return n && n.length ? jr(n, ye(t, 3), true, true) : []
- }),
- (An.dropWhile = function(n, t) {
- return n && n.length ? jr(n, ye(t, 3), true) : []
- }),
- (An.fill = function(n, t, r, e) {
- var u = null == n ? 0 : n.length
- if (!u) return []
- for (
- r && typeof r != "number" && Oe(n, t, r) && ((r = 0), (e = u)),
- u = n.length,
- r = Eu(r),
- 0 > r && (r = -r > u ? 0 : u + r),
- e = e === T || e > u ? u : Eu(e),
- 0 > e && (e += u),
- e = r > e ? 0 : ku(e);
- r < e;
+ function commonjsRequire () {
+ throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
+ }
- )
- n[r++] = t
- return n
- }),
- (An.filter = function(n, t) {
- return (ff(n) ? i : jt)(n, ye(t, 3))
- }),
- (An.flatMap = function(n, t) {
- return wt(ru(n, t), 1)
- }),
- (An.flatMapDeep = function(n, t) {
- return wt(ru(n, t), $)
- }),
- (An.flatMapDepth = function(n, t, r) {
- return (r = r === T ? 1 : Eu(r)), wt(ru(n, t), r)
- }),
- (An.flatten = Ze),
- (An.flattenDeep = function(n) {
- return (null == n ? 0 : n.length) ? wt(n, $) : []
- }),
- (An.flattenDepth = function(n, t) {
- return null != n && n.length
- ? ((t = t === T ? 1 : Eu(t)), wt(n, t))
- : []
- }),
- (An.flip = function(n) {
- return fe(n, 512)
- }),
- (An.flow = Pf),
- (An.flowRight = Zf),
- (An.fromPairs = function(n) {
- for (
- var t = -1, r = null == n ? 0 : n.length, e = {};
- ++t < r;
+ function createCommonjsModule(fn, module) {
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
+ }
- ) {
- var u = n[t]
- e[u[0]] = u[1]
- }
- return e
- }),
- (An.functions = function(n) {
- return null == n ? [] : Et(n, Wu(n))
- }),
- (An.functionsIn = function(n) {
- return null == n ? [] : Et(n, Bu(n))
- }),
- (An.groupBy = Po),
- (An.initial = function(n) {
- return (null == n ? 0 : n.length) ? hr(n, 0, -1) : []
- }),
- (An.intersection = Eo),
- (An.intersectionBy = ko),
- (An.intersectionWith = So),
- (An.invert = Af),
- (An.invertBy = Ef),
- (An.invokeMap = Zo),
- (An.iteratee = Fu),
- (An.keyBy = qo),
- (An.keys = Wu),
- (An.keysIn = Bu),
- (An.map = ru),
- (An.mapKeys = function(n, t) {
- var r = {}
- return (
- (t = ye(t, 3)),
- mt(n, function(n, e, u) {
- st(r, t(n, e, u), n)
- }),
- r
- )
- }),
- (An.mapValues = function(n, t) {
- var r = {}
- return (
- (t = ye(t, 3)),
- mt(n, function(n, e, u) {
- st(r, e, t(n, e, u))
- }),
- r
- )
- }),
- (An.matches = function(n) {
- return Ht(_t(n, 1))
- }),
- (An.matchesProperty = function(n, t) {
- return Jt(n, _t(t, 1))
- }),
- (An.memoize = cu),
- (An.merge = Sf),
- (An.mergeWith = Of),
- (An.method = qf),
- (An.methodOf = Vf),
- (An.mixin = Nu),
- (An.negate = au),
- (An.nthArg = function(n) {
- return (
- (n = Eu(n)),
- fr(function(t) {
- return Qt(t, n)
- })
- )
- }),
- (An.omit = If),
- (An.omitBy = function(n, t) {
- return Lu(n, au(ye(t)))
- }),
- (An.once = function(n) {
- return uu(2, n)
- }),
- (An.orderBy = function(n, t, r, e) {
- return null == n
- ? []
- : (ff(t) || (t = null == t ? [] : [t]),
- (r = e ? T : r),
- ff(r) || (r = null == r ? [] : [r]),
- Xt(n, t, r))
- }),
- (An.over = Kf),
- (An.overArgs = Xo),
- (An.overEvery = Gf),
- (An.overSome = Hf),
- (An.partial = nf),
- (An.partialRight = tf),
- (An.partition = Vo),
- (An.pick = Rf),
- (An.pickBy = Lu),
- (An.property = Zu),
- (An.propertyOf = function(n) {
- return function(t) {
- return null == n ? T : kt(n, t)
- }
- }),
- (An.pull = Oo),
- (An.pullAll = Ke),
- (An.pullAllBy = function(n, t, r) {
- return n && n.length && t && t.length ? er(n, t, ye(r, 2)) : n
- }),
- (An.pullAllWith = function(n, t, r) {
- return n && n.length && t && t.length ? er(n, t, T, r) : n
- }),
- (An.pullAt = Io),
- (An.range = Jf),
- (An.rangeRight = Yf),
- (An.rearg = rf),
- (An.reject = function(n, t) {
- return (ff(n) ? i : jt)(n, au(ye(t, 3)))
- }),
- (An.remove = function(n, t) {
- var r = []
- if (!n || !n.length) return r
- var e = -1,
- u = [],
- i = n.length
- for (t = ye(t, 3); ++e < i; ) {
- var o = n[e]
- t(o, e, n) && (r.push(o), u.push(e))
- }
- return ur(n, u), r
- }),
- (An.rest = function(n, t) {
- if (typeof n != "function") throw new ti("Expected a function")
- return (t = t === T ? t : Eu(t)), fr(n, t)
- }),
- (An.reverse = Ge),
- (An.sampleSize = function(n, t, r) {
- return (
- (t = (r ? Oe(n, t, r) : t === T) ? 1 : Eu(t)),
- (ff(n) ? et : ar)(n, t)
- )
- }),
- (An.set = function(n, t, r) {
- return null == n ? n : lr(n, t, r)
- }),
- (An.setWith = function(n, t, r, e) {
- return (
- (e = typeof e == "function" ? e : T),
- null == n ? n : lr(n, t, r, e)
- )
- }),
- (An.shuffle = function(n) {
- return (ff(n) ? ut : sr)(n)
- }),
- (An.slice = function(n, t, r) {
- var e = null == n ? 0 : n.length
- return e
- ? (r && typeof r != "number" && Oe(n, t, r)
- ? ((t = 0), (r = e))
- : ((t = null == t ? 0 : Eu(t)), (r = r === T ? e : Eu(r))),
- hr(n, t, r))
- : []
- }),
- (An.sortBy = Ko),
- (An.sortedUniq = function(n) {
- return n && n.length ? gr(n) : []
- }),
- (An.sortedUniqBy = function(n, t) {
- return n && n.length ? gr(n, ye(t, 2)) : []
- }),
- (An.split = function(n, t, r) {
- return (
- r && typeof r != "number" && Oe(n, t, r) && (t = r = T),
- (r = r === T ? 4294967295 : r >>> 0),
- r
- ? (n = Iu(n)) &&
- (typeof t == "string" || (null != t && !hf(t))) &&
- ((t = yr(t)), !t && Rn.test(n))
- ? Or(M(n), 0, r)
- : n.split(t, r)
- : []
- )
- }),
- (An.spread = function(t, r) {
- if (typeof t != "function") throw new ti("Expected a function")
- return (
- (r = null == r ? 0 : Ui(Eu(r), 0)),
- fr(function(e) {
- var u = e[r]
- return (e = Or(e, 0, r)), u && a(e, u), n(t, this, e)
- })
- )
- }),
- (An.tail = function(n) {
- var t = null == n ? 0 : n.length
- return t ? hr(n, 1, t) : []
- }),
- (An.take = function(n, t, r) {
- return n && n.length
- ? ((t = r || t === T ? 1 : Eu(t)), hr(n, 0, 0 > t ? 0 : t))
- : []
- }),
- (An.takeRight = function(n, t, r) {
- var e = null == n ? 0 : n.length
- return e
- ? ((t = r || t === T ? 1 : Eu(t)),
- (t = e - t),
- hr(n, 0 > t ? 0 : t, e))
- : []
- }),
- (An.takeRightWhile = function(n, t) {
- return n && n.length ? jr(n, ye(t, 3), false, true) : []
- }),
- (An.takeWhile = function(n, t) {
- return n && n.length ? jr(n, ye(t, 3)) : []
- }),
- (An.tap = function(n, t) {
- return t(n), n
- }),
- (An.throttle = function(n, t, r) {
- var e = true,
- u = true
- if (typeof n != "function") throw new ti("Expected a function")
- return (
- du(r) &&
- ((e = "leading" in r ? !!r.leading : e),
- (u = "trailing" in r ? !!r.trailing : u)),
- fu(n, t, { leading: e, maxWait: t, trailing: u })
- )
- }),
- (An.thru = Qe),
- (An.toArray = mu),
- (An.toPairs = zf),
- (An.toPairsIn = Wf),
- (An.toPath = function(n) {
- return ff(n) ? c(n, Me) : wu(n) ? [n] : Ur(jo(Iu(n)))
- }),
- (An.toPlainObject = Ou),
- (An.transform = function(n, t, e) {
- var u = ff(n),
- i = u || af(n) || _f(n)
- if (((t = ye(t, 4)), null == e)) {
- var o = n && n.constructor
- e = i ? (u ? new o() : []) : du(n) && _u(o) ? eo(di(n)) : {}
- }
- return (
- (i ? r : mt)(n, function(n, r, u) {
- return t(e, n, r, u)
- }),
- e
- )
- }),
- (An.unary = function(n) {
- return eu(n, 1)
- }),
- (An.union = Ro),
- (An.unionBy = zo),
- (An.unionWith = Wo),
- (An.uniq = function(n) {
- return n && n.length ? br(n) : []
- }),
- (An.uniqBy = function(n, t) {
- return n && n.length ? br(n, ye(t, 2)) : []
- }),
- (An.uniqWith = function(n, t) {
- return (
- (t = typeof t == "function" ? t : T),
- n && n.length ? br(n, T, t) : []
- )
- }),
- (An.unset = function(n, t) {
- return null == n || xr(n, t)
- }),
- (An.unzip = He),
- (An.unzipWith = Je),
- (An.update = function(n, t, r) {
- return null == n ? n : lr(n, t, kr(r)(kt(n, t)), void 0)
- }),
- (An.updateWith = function(n, t, r, e) {
- return (
- (e = typeof e == "function" ? e : T),
- null != n && (n = lr(n, t, kr(r)(kt(n, t)), e)),
- n
- )
- }),
- (An.values = Uu),
- (An.valuesIn = function(n) {
- return null == n ? [] : S(n, Bu(n))
- }),
- (An.without = Bo),
- (An.words = Mu),
- (An.wrap = function(n, t) {
- return nf(kr(t), n)
- }),
- (An.xor = Lo),
- (An.xorBy = Uo),
- (An.xorWith = Co),
- (An.zip = Do),
- (An.zipObject = function(n, t) {
- return Ar(n || [], t || [], ot)
- }),
- (An.zipObjectDeep = function(n, t) {
- return Ar(n || [], t || [], lr)
- }),
- (An.zipWith = Mo),
- (An.entries = zf),
- (An.entriesIn = Wf),
- (An.extend = yf),
- (An.extendWith = bf),
- Nu(An, An),
- (An.add = Qf),
- (An.attempt = Ff),
- (An.camelCase = Bf),
- (An.capitalize = Cu),
- (An.ceil = Xf),
- (An.clamp = function(n, t, r) {
- return (
- r === T && ((r = t), (t = T)),
- r !== T && ((r = Su(r)), (r = r === r ? r : 0)),
- t !== T && ((t = Su(t)), (t = t === t ? t : 0)),
- pt(Su(n), t, r)
- )
- }),
- (An.clone = function(n) {
- return _t(n, 4)
- }),
- (An.cloneDeep = function(n) {
- return _t(n, 5)
- }),
- (An.cloneDeepWith = function(n, t) {
- return (t = typeof t == "function" ? t : T), _t(n, 5, t)
- }),
- (An.cloneWith = function(n, t) {
- return (t = typeof t == "function" ? t : T), _t(n, 4, t)
- }),
- (An.conformsTo = function(n, t) {
- return null == t || gt(n, t, Wu(t))
- }),
- (An.deburr = Du),
- (An.defaultTo = function(n, t) {
- return null == n || n !== n ? t : n
- }),
- (An.divide = nc),
- (An.endsWith = function(n, t, r) {
- ;(n = Iu(n)), (t = yr(t))
- var e = n.length,
- e = (r = r === T ? e : pt(Eu(r), 0, e))
- return (r -= t.length), 0 <= r && n.slice(r, e) == t
- }),
- (An.eq = lu),
- (An.escape = function(n) {
- return (n = Iu(n)) && H.test(n) ? n.replace(K, nt) : n
- }),
- (An.escapeRegExp = function(n) {
- return (n = Iu(n)) && en.test(n) ? n.replace(rn, "\\$&") : n
- }),
- (An.every = function(n, t, r) {
- var e = ff(n) ? u : bt
- return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3))
- }),
- (An.find = Fo),
- (An.findIndex = Ne),
- (An.findKey = function(n, t) {
- return p(n, ye(t, 3), mt)
- }),
- (An.findLast = No),
- (An.findLastIndex = Pe),
- (An.findLastKey = function(n, t) {
- return p(n, ye(t, 3), At)
- }),
- (An.floor = tc),
- (An.forEach = nu),
- (An.forEachRight = tu),
- (An.forIn = function(n, t) {
- return null == n ? n : oo(n, ye(t, 3), Bu)
- }),
- (An.forInRight = function(n, t) {
- return null == n ? n : fo(n, ye(t, 3), Bu)
- }),
- (An.forOwn = function(n, t) {
- return n && mt(n, ye(t, 3))
- }),
- (An.forOwnRight = function(n, t) {
- return n && At(n, ye(t, 3))
- }),
- (An.get = Ru),
- (An.gt = ef),
- (An.gte = uf),
- (An.has = function(n, t) {
- return null != n && we(n, t, Rt)
- }),
- (An.hasIn = zu),
- (An.head = qe),
- (An.identity = $u),
- (An.includes = function(n, t, r, e) {
- return (
- (n = su(n) ? n : Uu(n)),
- (r = r && !e ? Eu(r) : 0),
- (e = n.length),
- 0 > r && (r = Ui(e + r, 0)),
- ju(n) ? r <= e && -1 < n.indexOf(t, r) : !!e && -1 < v(n, t, r)
- )
- }),
- (An.indexOf = function(n, t, r) {
- var e = null == n ? 0 : n.length
- return e
- ? ((r = null == r ? 0 : Eu(r)),
- 0 > r && (r = Ui(e + r, 0)),
- v(n, t, r))
- : -1
- }),
- (An.inRange = function(n, t, r) {
- return (
- (t = Au(t)),
- r === T ? ((r = t), (t = 0)) : (r = Au(r)),
- (n = Su(n)),
- n >= Ci(t, r) && n < Ui(t, r)
- )
- }),
- (An.invoke = kf),
- (An.isArguments = of),
- (An.isArray = ff),
- (An.isArrayBuffer = cf),
- (An.isArrayLike = su),
- (An.isArrayLikeObject = hu),
- (An.isBoolean = function(n) {
- return (
- true === n ||
- false === n ||
- (yu(n) && "[object Boolean]" == Ot(n))
- )
- }),
- (An.isBuffer = af),
- (An.isDate = lf),
- (An.isElement = function(n) {
- return yu(n) && 1 === n.nodeType && !xu(n)
- }),
- (An.isEmpty = function(n) {
- if (null == n) return true
- if (
- su(n) &&
- (ff(n) ||
- typeof n == "string" ||
- typeof n.splice == "function" ||
- af(n) ||
- _f(n) ||
- of(n))
- )
- return !n.length
- var t = vo(n)
- if ("[object Map]" == t || "[object Set]" == t) return !n.size
- if (ze(n)) return !Vt(n).length
- for (var r in n) if (oi.call(n, r)) return false
- return true
- }),
- (An.isEqual = function(n, t) {
- return Mt(n, t)
- }),
- (An.isEqualWith = function(n, t, r) {
- var e = (r = typeof r == "function" ? r : T) ? r(n, t) : T
- return e === T ? Mt(n, t, T, r) : !!e
- }),
- (An.isError = pu),
- (An.isFinite = function(n) {
- return typeof n == "number" && Wi(n)
- }),
- (An.isFunction = _u),
- (An.isInteger = vu),
- (An.isLength = gu),
- (An.isMap = sf),
- (An.isMatch = function(n, t) {
- return n === t || $t(n, t, xe(t))
- }),
- (An.isMatchWith = function(n, t, r) {
- return (r = typeof r == "function" ? r : T), $t(n, t, xe(t), r)
- }),
- (An.isNaN = function(n) {
- return bu(n) && n != +n
- }),
- (An.isNative = function(n) {
- if (go(n))
- throw new Hu(
- "Unsupported core-js use. Try https://npms.io/search?q=ponyfill."
- )
- return Ft(n)
- }),
- (An.isNil = function(n) {
- return null == n
- }),
- (An.isNull = function(n) {
- return null === n
- }),
- (An.isNumber = bu),
- (An.isObject = du),
- (An.isObjectLike = yu),
- (An.isPlainObject = xu),
- (An.isRegExp = hf),
- (An.isSafeInteger = function(n) {
- return vu(n) && -9007199254740991 <= n && 9007199254740991 >= n
- }),
- (An.isSet = pf),
- (An.isString = ju),
- (An.isSymbol = wu),
- (An.isTypedArray = _f),
- (An.isUndefined = function(n) {
- return n === T
- }),
- (An.isWeakMap = function(n) {
- return yu(n) && "[object WeakMap]" == vo(n)
- }),
- (An.isWeakSet = function(n) {
- return yu(n) && "[object WeakSet]" == Ot(n)
- }),
- (An.join = function(n, t) {
- return null == n ? "" : Bi.call(n, t)
- }),
- (An.kebabCase = Lf),
- (An.last = Ve),
- (An.lastIndexOf = function(n, t, r) {
- var e = null == n ? 0 : n.length
- if (!e) return -1
- var u = e
- if (
- (r !== T &&
- ((u = Eu(r)), (u = 0 > u ? Ui(e + u, 0) : Ci(u, e - 1))),
- t === t)
- ) {
- for (r = u + 1; r-- && n[r] !== t; );
- n = r
- } else n = _(n, d, u, true)
- return n
- }),
- (An.lowerCase = Uf),
- (An.lowerFirst = Cf),
- (An.lt = vf),
- (An.lte = gf),
- (An.max = function(n) {
- return n && n.length ? xt(n, $u, It) : T
- }),
- (An.maxBy = function(n, t) {
- return n && n.length ? xt(n, ye(t, 2), It) : T
- }),
- (An.mean = function(n) {
- return y(n, $u)
- }),
- (An.meanBy = function(n, t) {
- return y(n, ye(t, 2))
- }),
- (An.min = function(n) {
- return n && n.length ? xt(n, $u, Kt) : T
- }),
- (An.minBy = function(n, t) {
- return n && n.length ? xt(n, ye(t, 2), Kt) : T
- }),
- (An.stubArray = qu),
- (An.stubFalse = Vu),
- (An.stubObject = function() {
- return {}
- }),
- (An.stubString = function() {
- return ""
- }),
- (An.stubTrue = function() {
- return true
- }),
- (An.multiply = rc),
- (An.nth = function(n, t) {
- return n && n.length ? Qt(n, Eu(t)) : T
- }),
- (An.noConflict = function() {
- return $n._ === this && ($n._ = si), this
- }),
- (An.noop = Pu),
- (An.now = Go),
- (An.pad = function(n, t, r) {
- n = Iu(n)
- var e = (t = Eu(t)) ? D(n) : 0
- return !t || e >= t
- ? n
- : ((t = (t - e) / 2), ne(Ii(t), r) + n + ne(Oi(t), r))
- }),
- (An.padEnd = function(n, t, r) {
- n = Iu(n)
- var e = (t = Eu(t)) ? D(n) : 0
- return t && e < t ? n + ne(t - e, r) : n
- }),
- (An.padStart = function(n, t, r) {
- n = Iu(n)
- var e = (t = Eu(t)) ? D(n) : 0
- return t && e < t ? ne(t - e, r) + n : n
- }),
- (An.parseInt = function(n, t, r) {
- return (
- r || null == t ? (t = 0) : t && (t = +t),
- Mi(Iu(n).replace(on, ""), t || 0)
- )
- }),
- (An.random = function(n, t, r) {
- if (
- (r && typeof r != "boolean" && Oe(n, t, r) && (t = r = T),
- r === T &&
- (typeof t == "boolean"
- ? ((r = t), (t = T))
- : typeof n == "boolean" && ((r = n), (n = T))),
- n === T && t === T
- ? ((n = 0), (t = 1))
- : ((n = Au(n)), t === T ? ((t = n), (n = 0)) : (t = Au(t))),
- n > t)
- ) {
- var e = n
- ;(n = t), (t = e)
- }
- return r || n % 1 || t % 1
- ? ((r = Ti()),
- Ci(n + r * (t - n + Cn("1e-" + ((r + "").length - 1))), t))
- : ir(n, t)
- }),
- (An.reduce = function(n, t, r) {
- var e = ff(n) ? l : j,
- u = 3 > arguments.length
- return e(n, ye(t, 4), r, u, uo)
- }),
- (An.reduceRight = function(n, t, r) {
- var e = ff(n) ? s : j,
- u = 3 > arguments.length
- return e(n, ye(t, 4), r, u, io)
- }),
- (An.repeat = function(n, t, r) {
- return (t = (r ? Oe(n, t, r) : t === T) ? 1 : Eu(t)), or(Iu(n), t)
- }),
- (An.replace = function() {
- var n = arguments,
- t = Iu(n[0])
- return 3 > n.length ? t : t.replace(n[1], n[2])
- }),
- (An.result = function(n, t, r) {
- t = Sr(t, n)
- var e = -1,
- u = t.length
- for (u || ((u = 1), (n = T)); ++e < u; ) {
- var i = null == n ? T : n[Me(t[e])]
- i === T && ((e = u), (i = r)), (n = _u(i) ? i.call(n) : i)
- }
- return n
- }),
- (An.round = ec),
- (An.runInContext = x),
- (An.sample = function(n) {
- return (ff(n) ? Qn : cr)(n)
- }),
- (An.size = function(n) {
- if (null == n) return 0
- if (su(n)) return ju(n) ? D(n) : n.length
- var t = vo(n)
- return "[object Map]" == t || "[object Set]" == t
- ? n.size
- : Vt(n).length
- }),
- (An.snakeCase = Df),
- (An.some = function(n, t, r) {
- var e = ff(n) ? h : pr
- return r && Oe(n, t, r) && (t = T), e(n, ye(t, 3))
- }),
- (An.sortedIndex = function(n, t) {
- return _r(n, t)
- }),
- (An.sortedIndexBy = function(n, t, r) {
- return vr(n, t, ye(r, 2))
- }),
- (An.sortedIndexOf = function(n, t) {
- var r = null == n ? 0 : n.length
- if (r) {
- var e = _r(n, t)
- if (e < r && lu(n[e], t)) return e
- }
- return -1
- }),
- (An.sortedLastIndex = function(n, t) {
- return _r(n, t, true)
- }),
- (An.sortedLastIndexBy = function(n, t, r) {
- return vr(n, t, ye(r, 2), true)
- }),
- (An.sortedLastIndexOf = function(n, t) {
- if (null == n ? 0 : n.length) {
- var r = _r(n, t, true) - 1
- if (lu(n[r], t)) return r
- }
- return -1
- }),
- (An.startCase = Mf),
- (An.startsWith = function(n, t, r) {
- return (
- (n = Iu(n)),
- (r = null == r ? 0 : pt(Eu(r), 0, n.length)),
- (t = yr(t)),
- n.slice(r, r + t.length) == t
- )
- }),
- (An.subtract = uc),
- (An.sum = function(n) {
- return n && n.length ? m(n, $u) : 0
- }),
- (An.sumBy = function(n, t) {
- return n && n.length ? m(n, ye(t, 2)) : 0
- }),
- (An.template = function(n, t, r) {
- var e = An.templateSettings
- r && Oe(n, t, r) && (t = T),
- (n = Iu(n)),
- (t = bf({}, t, e, ce)),
- (r = bf({}, t.imports, e.imports, ce))
- var u,
- i,
- o = Wu(r),
- f = S(r, o),
- c = 0
- r = t.interpolate || jn
- var a = "__p+='"
- r = Xu(
- (t.escape || jn).source +
- "|" +
- r.source +
- "|" +
- (r === Q ? pn : jn).source +
- "|" +
- (t.evaluate || jn).source +
- "|$",
- "g"
- )
- var l = oi.call(t, "sourceURL")
- ? "//# sourceURL=" +
- (t.sourceURL + "").replace(/[\r\n]/g, " ") +
- "\n"
- : ""
- if (
- (n.replace(r, function(t, r, e, o, f, l) {
- return (
- e || (e = o),
- (a += n.slice(c, l).replace(wn, z)),
- r && ((u = true), (a += "'+__e(" + r + ")+'")),
- f && ((i = true), (a += "';" + f + ";\n__p+='")),
- e && (a += "'+((__t=(" + e + "))==null?'':__t)+'"),
- (c = l + t.length),
- t
- )
- }),
- (a += "';"),
- (t = oi.call(t, "variable") && t.variable) ||
- (a = "with(obj){" + a + "}"),
- (a = (i ? a.replace(P, "") : a)
- .replace(Z, "$1")
- .replace(q, "$1;")),
- (a =
- "function(" +
- (t || "obj") +
- "){" +
- (t ? "" : "obj||(obj={});") +
- "var __t,__p=''" +
- (u ? ",__e=_.escape" : "") +
- (i
- ? ",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"
- : ";") +
- a +
- "return __p}"),
- (t = Ff(function() {
- return Ju(o, l + "return " + a).apply(T, f)
- })),
- (t.source = a),
- pu(t))
- )
- throw t
- return t
- }),
- (An.times = function(n, t) {
- if (((n = Eu(n)), 1 > n || 9007199254740991 < n)) return []
- var r = 4294967295,
- e = Ci(n, 4294967295)
- for (t = ye(t), n -= 4294967295, e = A(e, t); ++r < n; ) t(r)
- return e
- }),
- (An.toFinite = Au),
- (An.toInteger = Eu),
- (An.toLength = ku),
- (An.toLower = function(n) {
- return Iu(n).toLowerCase()
- }),
- (An.toNumber = Su),
- (An.toSafeInteger = function(n) {
- return n
- ? pt(Eu(n), -9007199254740991, 9007199254740991)
- : 0 === n
- ? n
- : 0
- }),
- (An.toString = Iu),
- (An.toUpper = function(n) {
- return Iu(n).toUpperCase()
- }),
- (An.trim = function(n, t, r) {
- return (n = Iu(n)) && (r || t === T)
- ? n.replace(un, "")
- : n && (t = yr(t))
- ? ((n = M(n)),
- (r = M(t)),
- (t = I(n, r)),
- (r = R(n, r) + 1),
- Or(n, t, r).join(""))
- : n
- }),
- (An.trimEnd = function(n, t, r) {
- return (n = Iu(n)) && (r || t === T)
- ? n.replace(fn, "")
- : n && (t = yr(t))
- ? ((n = M(n)), (t = R(n, M(t)) + 1), Or(n, 0, t).join(""))
- : n
- }),
- (An.trimStart = function(n, t, r) {
- return (n = Iu(n)) && (r || t === T)
- ? n.replace(on, "")
- : n && (t = yr(t))
- ? ((n = M(n)), (t = I(n, M(t))), Or(n, t).join(""))
- : n
- }),
- (An.truncate = function(n, t) {
- var r = 30,
- e = "..."
- if (du(t))
- var u = "separator" in t ? t.separator : u,
- r = "length" in t ? Eu(t.length) : r,
- e = "omission" in t ? yr(t.omission) : e
- n = Iu(n)
- var i = n.length
- if (Rn.test(n))
- var o = M(n),
- i = o.length
- if (r >= i) return n
- if (((i = r - D(e)), 1 > i)) return e
- if (((r = o ? Or(o, 0, i).join("") : n.slice(0, i)), u === T))
- return r + e
- if ((o && (i += r.length - i), hf(u))) {
- if (n.slice(i).search(u)) {
- var f = r
- for (
- u.global || (u = Xu(u.source, Iu(_n.exec(u)) + "g")),
- u.lastIndex = 0;
- (o = u.exec(f));
+ var lodash_min = createCommonjsModule(function (module, exports) {
+ (function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u"']/g,G=RegExp(V.source),H=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nn=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rn=/[\\^$.*+?()[\]{}|]/g,en=RegExp(rn.source),un=/^\s+|\s+$/g,on=/^\s+/,fn=/\s+$/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,ln=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hn=/\\(\\)?/g,pn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_n=/\w*$/,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jn=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,mn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+mn,En="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",kn=RegExp("['\u2019]","g"),Sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+En+mn,"g"),In=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",An].join("|"),"g"),Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Bn={};
+ Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object Boolean]"]=Bn["[object DataView]"]=Bn["[object Date]"]=Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object WeakMap]"]=false;
+ var Ln={};Ln["[object Arguments]"]=Ln["[object Array]"]=Ln["[object ArrayBuffer]"]=Ln["[object DataView]"]=Ln["[object Boolean]"]=Ln["[object Date]"]=Ln["[object Float32Array]"]=Ln["[object Float64Array]"]=Ln["[object Int8Array]"]=Ln["[object Int16Array]"]=Ln["[object Int32Array]"]=Ln["[object Map]"]=Ln["[object Number]"]=Ln["[object Object]"]=Ln["[object RegExp]"]=Ln["[object Set]"]=Ln["[object String]"]=Ln["[object Symbol]"]=Ln["[object Uint8Array]"]=Ln["[object Uint8ClampedArray]"]=Ln["[object Uint16Array]"]=Ln["[object Uint32Array]"]=true,
+ Ln["[object Error]"]=Ln["[object Function]"]=Ln["[object WeakMap]"]=false;var Un={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cn=parseFloat,Dn=parseInt,Mn=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,Tn=typeof self=="object"&&self&&self.Object===Object&&self,$n=Mn||Tn||Function("return this")(),Fn=exports&&!exports.nodeType&&exports,Nn=Fn&&'object'=="object"&&module&&!module.nodeType&&module,Pn=Nn&&Nn.exports===Fn,Zn=Pn&&Mn.process,qn=function(){
+ try{var n=Nn&&Nn.f&&Nn.f("util").types;return n?n:Zn&&Zn.binding&&Zn.binding("util")}catch(n){}}(),Vn=qn&&qn.isArrayBuffer,Kn=qn&&qn.isDate,Gn=qn&&qn.isMap,Hn=qn&&qn.isRegExp,Jn=qn&&qn.isSet,Yn=qn&&qn.isTypedArray,Qn=b("length"),Xn=x({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I",
+ "\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C",
+ "\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i",
+ "\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r",
+ "\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij",
+ "\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),nt=x({"&":"&","<":"<",">":">",'"':""","'":"'"}),tt=x({"&":"&","<":"<",">":">",""":'"',"'":"'"}),rt=function x(mn){function An(n){if(yu(n)&&!ff(n)&&!(n instanceof Un)){if(n instanceof On)return n;if(oi.call(n,"__wrapped__"))return Fe(n)}return new On(n)}function En(){}function On(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=T;}function Un(n){this.__wrapped__=n,
+ this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[];}function Mn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function _t(n,t,e,u,i,o){var f,c=1&t,a=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==T)return f;if(!du(n))return n;if(u=ff(n)){if(f=me(n),!c)return Ur(n,f)}else{var s=vo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(af(n))return Ir(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Ae(n),!c)return a?Mr(n,lt(f,n)):Dr(n,at(f,n))}else{if(!Ln[s])return i?n:{};f=Ee(n,s,c);}}if(o||(o=new Zn),
+ i=o.get(n))return i;o.set(n,f),pf(n)?n.forEach(function(r){f.add(_t(r,t,e,r,n,o));}):sf(n)&&n.forEach(function(r,u){f.set(u,_t(r,t,e,u,n,o));});var a=l?a?ve:_e:a?Bu:Wu,p=u?T:a(n);return r(p||n,function(r,u){p&&(u=r,r=n[u]),ot(f,u,_t(r,t,e,u,n,o));}),f}function vt(n){var t=Wu(n);return function(r){return gt(r,n,t)}}function gt(n,t,r){var e=r.length;if(null==n)return !e;for(n=Qu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===T&&!(u in n)||!i(o))return false}return true}function dt(n,t,r){if(typeof n!="function")throw new ti("Expected a function");
+ return bo(function(){n.apply(T,r);},t)}function yt(n,t,r,e){var u=-1,i=o,a=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,k(r))),e?(i=f,a=false):200<=t.length&&(i=O,a=false,t=new Nn(t));n:for(;++ut}function Rt(n,t){return null!=n&&oi.call(n,t)}function zt(n,t){return null!=n&&t in Qu(n)}function Wt(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=Ku(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,k(t))),s=Ci(p.length,s),
+ l[a]=!r&&(t||120<=u&&120<=p.length)?new Nn(a&&p):T;}var p=n[0],_=-1,v=l[0];n:for(;++_r.length?t:kt(t,hr(r,0,-1)),r=null==t?t:t[Me(Ve(r))],null==r?T:n(r,t,e)}function Ut(n){return yu(n)&&"[object Arguments]"==Ot(n)}function Ct(n){
+ return yu(n)&&"[object ArrayBuffer]"==Ot(n)}function Dt(n){return yu(n)&&"[object Date]"==Ot(n)}function Mt(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!yu(n)&&!yu(t))t=n!==n&&t!==t;else n:{var i=ff(n),o=ff(t),f=i?"[object Array]":vo(n),c=o?"[object Array]":vo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&af(n)){if(!af(t)){t=false;break n}i=true,a=false;}if(c&&!a)u||(u=new Zn),t=i||_f(n)?se(n,t,r,e,Mt,u):he(n,t,f,r,e,Mt,u);else{
+ if(!(1&r)&&(i=a&&oi.call(n,"__wrapped__"),f=o&&oi.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Zn),t=Mt(n,t,r,e,u);break n}if(c)t:if(u||(u=new Zn),i=1&r,f=_e(n),o=f.length,c=_e(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:oi.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++at?r:0,Se(t,r)?n[t]:T}function Xt(n,t,r){var e=-1;return t=c(t.length?t:[$u],k(ye())),n=Gt(n,function(n){return {
+ a:c(t,function(t){return t(n)}),b:++e,c:n}}),w(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b;}return e})}function nr(n,t){return tr(n,t,function(t,r){return zu(n,r)})}function tr(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ku(u);++e=u){for(;e>>1,o=n[i];null!==o&&!wu(o)&&(r?o<=t:ot.length?n:kt(n,hr(t,0,-1)),null==n||delete n[Me(Ve(t))]}function jr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?br(n[0]):[];for(var u=-1,i=Ku(e);++u=e?n:hr(n,t,r)}function Ir(n,t){if(t)return n.slice();var r=n.length,r=gi?gi(r):new n.constructor(r);return n.copy(r),r}function Rr(n){var t=new n.constructor(n.byteLength);return new vi(t).set(new vi(n)),
+ t}function zr(n,t){return new n.constructor(t?Rr(n.buffer):n.buffer,n.byteOffset,n.length)}function Wr(n,t){if(n!==t){var r=n!==T,e=null===n,u=n===n,i=wu(n),o=t!==T,f=null===t,c=t===t,a=wu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?T:i,u=1),t=Qu(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:L(f,a),
+ o-=c.length,or?r?or(t,n):t:(r=or(t,Oi(n/D(t))),Rn.test(t)?Or(M(r),0,n).join(""):r.slice(0,n))}function te(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=Ku(l+c),h=this&&this!==$n&&this instanceof i?f:t;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Br(e,r,h[4]):r,i[4]=e?L(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Lr(e,r,h[6]):r,i[6]=e?L(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Ci(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],
+ t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===T?c?0:n.length:Ui(i[9]-a,0),!f&&24&t&&(t&=-25),Ue((h?co:yo)(t&&1!=t?8==t||16==t?Kr(n,t,f):32!=t&&33!=t||u.length?Jr.apply(T,i):te(n,t,r,e):Pr(n,t,r),i),n,t)}function ce(n,t,r,e){return n===T||lu(n,ei[r])&&!oi.call(e,r)?t:n}function ae(n,t,r,e,u,i){return du(n)&&du(t)&&(i.set(t,n),Yt(n,t,T,ae,i),i.delete(t)),n}function le(n){return xu(n)?T:n}function se(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;
+ var c=-1,a=true,l=2&r?new Nn:T;for(i.set(n,t),i.set(t,n);++cr&&(r=Ui(e+r,0)),_(n,ye(t,3),r)):-1}function Pe(n,t,r){var e=null==n?0:n.length;if(!e)return -1;var u=e-1;return r!==T&&(u=Eu(r),u=0>r?Ui(e+u,0):Ci(u,e-1)),
+ _(n,ye(t,3),u,true)}function Ze(n){return (null==n?0:n.length)?wt(n,1):[]}function qe(n){return n&&n.length?n[0]:T}function Ve(n){var t=null==n?0:n.length;return t?n[t-1]:T}function Ke(n,t){return n&&n.length&&t&&t.length?er(n,t):n}function Ge(n){return null==n?n:$i.call(n)}function He(n){if(!n||!n.length)return [];var t=0;return n=i(n,function(n){if(hu(n))return t=Ui(n.length,t),true}),A(t,function(t){return c(n,b(t))})}function Je(t,r){if(!t||!t.length)return [];var e=He(t);return null==r?e:c(e,function(t){
+ return n(r,T,t)})}function Ye(n){return n=An(n),n.__chain__=true,n}function Qe(n,t){return t(n)}function Xe(){return this}function nu(n,t){return (ff(n)?r:uo)(n,ye(t,3))}function tu(n,t){return (ff(n)?e:io)(n,ye(t,3))}function ru(n,t){return (ff(n)?c:Gt)(n,ye(t,3))}function eu(n,t,r){return t=r?T:t,t=n&&null==t?n.length:t,fe(n,128,T,T,T,T,t)}function uu(n,t){var r;if(typeof t!="function")throw new ti("Expected a function");return n=Eu(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=T),
+ r}}function iu(n,t,r){return t=r?T:t,n=fe(n,8,T,T,T,T,T,t),n.placeholder=iu.placeholder,n}function ou(n,t,r){return t=r?T:t,n=fe(n,16,T,T,T,T,T,t),n.placeholder=ou.placeholder,n}function fu(n,t,r){function e(t){var r=c,e=a;return c=a=T,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===T||r>=t||0>r||g&&n>=l}function i(){var n=Go();if(u(n))return o(n);var r,e=bo;r=n-_,n=t-(n-p),r=g?Ci(n,l-r):n,h=e(i,r);}function o(n){return h=T,d&&c?e(n):(c=a=T,s)}function f(){var n=Go(),r=u(n);if(c=arguments,
+ a=this,p=n,r){if(h===T)return _=n=p,h=bo(i,t),v?e(n):s;if(g)return lo(h),h=bo(i,t),e(p)}return h===T&&(h=bo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ti("Expected a function");return t=Su(t)||0,du(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ui(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==T&&lo(h),_=0,c=p=a=h=T;},f.flush=function(){return h===T?s:o(Go())},f}function cu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;
+ return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ti("Expected a function");return r.cache=new(cu.Cache||Fn),r}function au(n){if(typeof n!="function")throw new ti("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return !n.call(this);case 1:return !n.call(this,t[0]);case 2:return !n.call(this,t[0],t[1]);case 3:return !n.call(this,t[0],t[1],t[2])}return !n.apply(this,t)}}function lu(n,t){return n===t||n!==n&&t!==t;
+ }function su(n){return null!=n&&gu(n.length)&&!_u(n)}function hu(n){return yu(n)&&su(n)}function pu(n){if(!yu(n))return false;var t=Ot(n);return "[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!xu(n)}function _u(n){return !!du(n)&&(n=Ot(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function vu(n){return typeof n=="number"&&n==Eu(n)}function gu(n){return typeof n=="number"&&-1=n;
+ }function du(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function yu(n){return null!=n&&typeof n=="object"}function bu(n){return typeof n=="number"||yu(n)&&"[object Number]"==Ot(n)}function xu(n){return !(!yu(n)||"[object Object]"!=Ot(n))&&(n=di(n),null===n||(n=oi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&ii.call(n)==li))}function ju(n){return typeof n=="string"||!ff(n)&&yu(n)&&"[object String]"==Ot(n)}function wu(n){return typeof n=="symbol"||yu(n)&&"[object Symbol]"==Ot(n);
+ }function mu(n){if(!n)return [];if(su(n))return ju(n)?M(n):Ur(n);if(wi&&n[wi]){n=n[wi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=vo(n),("[object Map]"==t?W:"[object Set]"==t?U:Uu)(n)}function Au(n){return n?(n=Su(n),n===$||n===-$?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Eu(n){n=Au(n);var t=n%1;return n===n?t?n-t:n:0}function ku(n){return n?pt(Eu(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(wu(n))return F;if(du(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,
+ n=du(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(un,"");var t=gn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):vn.test(n)?F:+n}function Ou(n){return Cr(n,Bu(n))}function Iu(n){return null==n?"":yr(n)}function Ru(n,t,r){return n=null==n?T:kt(n,t),n===T?r:n}function zu(n,t){return null!=n&&we(n,t,zt)}function Wu(n){return su(n)?qn(n):Vt(n)}function Bu(n){if(su(n))n=qn(n,true);else if(du(n)){var t,r=ze(n),e=[];for(t in n)("constructor"!=t||!r&&oi.call(n,t))&&e.push(t);n=e;}else{if(t=[],
+ null!=n)for(r in Qu(n))t.push(r);n=t;}return n}function Lu(n,t){if(null==n)return {};var r=c(ve(n),function(n){return [n]});return t=ye(t),tr(n,r,function(n,r){return t(n,r[0])})}function Uu(n){return null==n?[]:S(n,Wu(n))}function Cu(n){return $f(Iu(n).toLowerCase())}function Du(n){return (n=Iu(n))&&n.replace(xn,Xn).replace(Sn,"")}function Mu(n,t,r){return n=Iu(n),t=r?T:t,t===T?zn.test(n)?n.match(In)||[]:n.match(sn)||[]:n.match(t)||[]}function Tu(n){return function(){return n}}function $u(n){return n;
+ }function Fu(n){return qt(typeof n=="function"?n:_t(n,1))}function Nu(n,t,e){var u=Wu(t),i=Et(t,u);null!=e||du(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=Et(t,Wu(t)));var o=!(du(e)&&"chain"in e&&!e.chain),f=_u(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return (r.__actions__=Ur(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))});}),n}function Pu(){}
+ function Zu(n){return Ie(n)?b(Me(n)):rr(n)}function qu(){return []}function Vu(){return false}mn=null==mn?$n:rt.defaults($n.Object(),mn,rt.pick($n,Wn));var Ku=mn.Array,Gu=mn.Date,Hu=mn.Error,Ju=mn.Function,Yu=mn.Math,Qu=mn.Object,Xu=mn.RegExp,ni=mn.String,ti=mn.TypeError,ri=Ku.prototype,ei=Qu.prototype,ui=mn["__core-js_shared__"],ii=Ju.prototype.toString,oi=ei.hasOwnProperty,fi=0,ci=function(){var n=/[^.]+$/.exec(ui&&ui.keys&&ui.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ai=ei.toString,li=ii.call(Qu),si=$n._,hi=Xu("^"+ii.call(oi).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pi=Pn?mn.Buffer:T,_i=mn.Symbol,vi=mn.Uint8Array,gi=pi?pi.g:T,di=B(Qu.getPrototypeOf,Qu),yi=Qu.create,bi=ei.propertyIsEnumerable,xi=ri.splice,ji=_i?_i.isConcatSpreadable:T,wi=_i?_i.iterator:T,mi=_i?_i.toStringTag:T,Ai=function(){
+ try{var n=je(Qu,"defineProperty");return n({},"",{}),n}catch(n){}}(),Ei=mn.clearTimeout!==$n.clearTimeout&&mn.clearTimeout,ki=Gu&&Gu.now!==$n.Date.now&&Gu.now,Si=mn.setTimeout!==$n.setTimeout&&mn.setTimeout,Oi=Yu.ceil,Ii=Yu.floor,Ri=Qu.getOwnPropertySymbols,zi=pi?pi.isBuffer:T,Wi=mn.isFinite,Bi=ri.join,Li=B(Qu.keys,Qu),Ui=Yu.max,Ci=Yu.min,Di=Gu.now,Mi=mn.parseInt,Ti=Yu.random,$i=ri.reverse,Fi=je(mn,"DataView"),Ni=je(mn,"Map"),Pi=je(mn,"Promise"),Zi=je(mn,"Set"),qi=je(mn,"WeakMap"),Vi=je(Qu,"create"),Ki=qi&&new qi,Gi={},Hi=Te(Fi),Ji=Te(Ni),Yi=Te(Pi),Qi=Te(Zi),Xi=Te(qi),no=_i?_i.prototype:T,to=no?no.valueOf:T,ro=no?no.toString:T,eo=function(){
+ function n(){}return function(t){return du(t)?yi?yi(t):(n.prototype=t,t=new n,n.prototype=T,t):{}}}();An.templateSettings={escape:J,evaluate:Y,interpolate:Q,variable:"",imports:{_:An}},An.prototype=En.prototype,An.prototype.constructor=An,On.prototype=eo(En.prototype),On.prototype.constructor=On,Un.prototype=eo(En.prototype),Un.prototype.constructor=Un,Mn.prototype.clear=function(){this.__data__=Vi?Vi(null):{},this.size=0;},Mn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],
+ this.size-=n?1:0,n},Mn.prototype.get=function(n){var t=this.__data__;return Vi?(n=t[n],"__lodash_hash_undefined__"===n?T:n):oi.call(t,n)?t[n]:T},Mn.prototype.has=function(n){var t=this.__data__;return Vi?t[n]!==T:oi.call(t,n)},Mn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Vi&&t===T?"__lodash_hash_undefined__":t,this},Tn.prototype.clear=function(){this.__data__=[],this.size=0;},Tn.prototype.delete=function(n){var t=this.__data__;return n=ft(t,n),!(0>n)&&(n==t.length-1?t.pop():xi.call(t,n,1),
+ --this.size,true)},Tn.prototype.get=function(n){var t=this.__data__;return n=ft(t,n),0>n?T:t[n][1]},Tn.prototype.has=function(n){return -1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(Ni||Tn),string:new Mn};},Fn.prototype.delete=function(n){return n=be(this,n).delete(n),this.size-=n?1:0,n},Fn.prototype.get=function(n){return be(this,n).get(n);
+ },Fn.prototype.has=function(n){return be(this,n).has(n)},Fn.prototype.set=function(n,t){var r=be(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Nn.prototype.add=Nn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.clear=function(){this.__data__=new Tn,this.size=0;},Zn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Zn.prototype.get=function(n){
+ return this.__data__.get(n)},Zn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Tn){var e=r.__data__;if(!Ni||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Fn(e);}return r.set(n,t),this.size=r.size,this};var uo=Fr(mt),io=Fr(At,true),oo=Nr(),fo=Nr(true),co=Ki?function(n,t){return Ki.set(n,t),n}:$u,ao=Ai?function(n,t){return Ai(n,"toString",{configurable:true,enumerable:false,value:Tu(t),writable:true})}:$u,lo=Ei||function(n){
+ return $n.clearTimeout(n)},so=Zi&&1/U(new Zi([,-0]))[1]==$?function(n){return new Zi(n)}:Pu,ho=Ki?function(n){return Ki.get(n)}:Pu,po=Ri?function(n){return null==n?[]:(n=Qu(n),i(Ri(n),function(t){return bi.call(n,t)}))}:qu,_o=Ri?function(n){for(var t=[];n;)a(t,po(n)),n=di(n);return t}:qu,vo=Ot;(Fi&&"[object DataView]"!=vo(new Fi(new ArrayBuffer(1)))||Ni&&"[object Map]"!=vo(new Ni)||Pi&&"[object Promise]"!=vo(Pi.resolve())||Zi&&"[object Set]"!=vo(new Zi)||qi&&"[object WeakMap]"!=vo(new qi))&&(vo=function(n){
+ var t=Ot(n);if(n=(n="[object Object]"==t?n.constructor:T)?Te(n):"")switch(n){case Hi:return "[object DataView]";case Ji:return "[object Map]";case Yi:return "[object Promise]";case Qi:return "[object Set]";case Xi:return "[object WeakMap]"}return t});var go=ui?_u:Vu,yo=Ce(co),bo=Si||function(n,t){return $n.setTimeout(n,t)},xo=Ce(ao),jo=function(n){n=cu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(tn,function(n,r,e,u){
+ t.push(e?u.replace(hn,"$1"):r||n);}),t}),wo=fr(function(n,t){return hu(n)?yt(n,wt(t,1,hu,true)):[]}),mo=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),ye(r,2)):[]}),Ao=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),T,r):[]}),Eo=fr(function(n){var t=c(n,Er);return t.length&&t[0]===n[0]?Wt(t):[]}),ko=fr(function(n){var t=Ve(n),r=c(n,Er);return t===Ve(r)?t=T:r.pop(),r.length&&r[0]===n[0]?Wt(r,ye(t,2)):[]}),So=fr(function(n){var t=Ve(n),r=c(n,Er);return (t=typeof t=="function"?t:T)&&r.pop(),
+ r.length&&r[0]===n[0]?Wt(r,T,t):[]}),Oo=fr(Ke),Io=pe(function(n,t){var r=null==n?0:n.length,e=ht(n,t);return ur(n,c(t,function(n){return Se(n,r)?+n:n}).sort(Wr)),e}),Ro=fr(function(n){return br(wt(n,1,hu,true))}),zo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),br(wt(n,1,hu,true),ye(t,2))}),Wo=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return br(wt(n,1,hu,true),T,t)}),Bo=fr(function(n,t){return hu(n)?yt(n,t):[]}),Lo=fr(function(n){return mr(i(n,hu))}),Uo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),
+ mr(i(n,hu),ye(t,2))}),Co=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return mr(i(n,hu),T,t)}),Do=fr(He),Mo=fr(function(n){var t=n.length,t=1=t}),of=Ut(function(){return arguments}())?Ut:function(n){return yu(n)&&oi.call(n,"callee")&&!bi.call(n,"callee")},ff=Ku.isArray,cf=Vn?k(Vn):Ct,af=zi||Vu,lf=Kn?k(Kn):Dt,sf=Gn?k(Gn):Tt,hf=Hn?k(Hn):Nt,pf=Jn?k(Jn):Pt,_f=Yn?k(Yn):Zt,vf=ee(Kt),gf=ee(function(n,t){return n<=t}),df=$r(function(n,t){
+ if(ze(t)||su(t))Cr(t,Wu(t),n);else for(var r in t)oi.call(t,r)&&ot(n,r,t[r]);}),yf=$r(function(n,t){Cr(t,Bu(t),n);}),bf=$r(function(n,t,r,e){Cr(t,Bu(t),n,e);}),xf=$r(function(n,t,r,e){Cr(t,Wu(t),n,e);}),jf=pe(ht),wf=fr(function(n,t){n=Qu(n);var r=-1,e=t.length,u=2--n)return t.apply(this,arguments)}},An.ary=eu,An.assign=df,An.assignIn=yf,An.assignInWith=bf,An.assignWith=xf,An.at=jf,An.before=uu,An.bind=Ho,An.bindAll=Nf,An.bindKey=Jo,An.castArray=function(){if(!arguments.length)return [];var n=arguments[0];return ff(n)?n:[n]},An.chain=Ye,An.chunk=function(n,t,r){if(t=(r?Oe(n,t,r):t===T)?1:Ui(Eu(t),0),r=null==n?0:n.length,!r||1>t)return [];for(var e=0,u=0,i=Ku(Oi(r/t));et?0:t,e)):[]},An.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0,0>t?0:t)):[]},An.dropRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true,true):[];
+ },An.dropWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true):[]},An.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return [];for(r&&typeof r!="number"&&Oe(n,t,r)&&(r=0,e=u),u=n.length,r=Eu(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Eu(e),0>e&&(e+=u),e=r>e?0:ku(e);r>>0,r?(n=Iu(n))&&(typeof t=="string"||null!=t&&!hf(t))&&(t=yr(t),!t&&Rn.test(n))?Or(M(n),0,r):n.split(t,r):[]},An.spread=function(t,r){if(typeof t!="function")throw new ti("Expected a function");return r=null==r?0:Ui(Eu(r),0),
+ fr(function(e){var u=e[r];return e=Or(e,0,r),u&&a(e,u),n(t,this,e)})},An.tail=function(n){var t=null==n?0:n.length;return t?hr(n,1,t):[]},An.take=function(n,t,r){return n&&n.length?(t=r||t===T?1:Eu(t),hr(n,0,0>t?0:t)):[]},An.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0>t?0:t,e)):[]},An.takeRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),false,true):[]},An.takeWhile=function(n,t){return n&&n.length?jr(n,ye(t,3)):[]},An.tap=function(n,t){return t(n),
+ n},An.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ti("Expected a function");return du(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),fu(n,t,{leading:e,maxWait:t,trailing:u})},An.thru=Qe,An.toArray=mu,An.toPairs=zf,An.toPairsIn=Wf,An.toPath=function(n){return ff(n)?c(n,Me):wu(n)?[n]:Ur(jo(Iu(n)))},An.toPlainObject=Ou,An.transform=function(n,t,e){var u=ff(n),i=u||af(n)||_f(n);if(t=ye(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:du(n)&&_u(o)?eo(di(n)):{};
+ }return (i?r:mt)(n,function(n,r,u){return t(e,n,r,u)}),e},An.unary=function(n){return eu(n,1)},An.union=Ro,An.unionBy=zo,An.unionWith=Wo,An.uniq=function(n){return n&&n.length?br(n):[]},An.uniqBy=function(n,t){return n&&n.length?br(n,ye(t,2)):[]},An.uniqWith=function(n,t){return t=typeof t=="function"?t:T,n&&n.length?br(n,T,t):[]},An.unset=function(n,t){return null==n||xr(n,t)},An.unzip=He,An.unzipWith=Je,An.update=function(n,t,r){return null==n?n:lr(n,t,kr(r)(kt(n,t)),void 0)},An.updateWith=function(n,t,r,e){
+ return e=typeof e=="function"?e:T,null!=n&&(n=lr(n,t,kr(r)(kt(n,t)),e)),n},An.values=Uu,An.valuesIn=function(n){return null==n?[]:S(n,Bu(n))},An.without=Bo,An.words=Mu,An.wrap=function(n,t){return nf(kr(t),n)},An.xor=Lo,An.xorBy=Uo,An.xorWith=Co,An.zip=Do,An.zipObject=function(n,t){return Ar(n||[],t||[],ot)},An.zipObjectDeep=function(n,t){return Ar(n||[],t||[],lr)},An.zipWith=Mo,An.entries=zf,An.entriesIn=Wf,An.extend=yf,An.extendWith=bf,Nu(An,An),An.add=Qf,An.attempt=Ff,An.camelCase=Bf,An.capitalize=Cu,
+ An.ceil=Xf,An.clamp=function(n,t,r){return r===T&&(r=t,t=T),r!==T&&(r=Su(r),r=r===r?r:0),t!==T&&(t=Su(t),t=t===t?t:0),pt(Su(n),t,r)},An.clone=function(n){return _t(n,4)},An.cloneDeep=function(n){return _t(n,5)},An.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,5,t)},An.cloneWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,4,t)},An.conformsTo=function(n,t){return null==t||gt(n,t,Wu(t))},An.deburr=Du,An.defaultTo=function(n,t){return null==n||n!==n?t:n},An.divide=nc,An.endsWith=function(n,t,r){
+ n=Iu(n),t=yr(t);var e=n.length,e=r=r===T?e:pt(Eu(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},An.eq=lu,An.escape=function(n){return (n=Iu(n))&&H.test(n)?n.replace(K,nt):n},An.escapeRegExp=function(n){return (n=Iu(n))&&en.test(n)?n.replace(rn,"\\$&"):n},An.every=function(n,t,r){var e=ff(n)?u:bt;return r&&Oe(n,t,r)&&(t=T),e(n,ye(t,3))},An.find=Fo,An.findIndex=Ne,An.findKey=function(n,t){return p(n,ye(t,3),mt)},An.findLast=No,An.findLastIndex=Pe,An.findLastKey=function(n,t){return p(n,ye(t,3),At);
+ },An.floor=tc,An.forEach=nu,An.forEachRight=tu,An.forIn=function(n,t){return null==n?n:oo(n,ye(t,3),Bu)},An.forInRight=function(n,t){return null==n?n:fo(n,ye(t,3),Bu)},An.forOwn=function(n,t){return n&&mt(n,ye(t,3))},An.forOwnRight=function(n,t){return n&&At(n,ye(t,3))},An.get=Ru,An.gt=ef,An.gte=uf,An.has=function(n,t){return null!=n&&we(n,t,Rt)},An.hasIn=zu,An.head=qe,An.identity=$u,An.includes=function(n,t,r,e){return n=su(n)?n:Uu(n),r=r&&!e?Eu(r):0,e=n.length,0>r&&(r=Ui(e+r,0)),ju(n)?r<=e&&-1r&&(r=Ui(e+r,0)),v(n,t,r)):-1},An.inRange=function(n,t,r){return t=Au(t),r===T?(r=t,t=0):r=Au(r),n=Su(n),n>=Ci(t,r)&&n=n},An.isSet=pf,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_f,An.isUndefined=function(n){return n===T},An.isWeakMap=function(n){return yu(n)&&"[object WeakMap]"==vo(n)},An.isWeakSet=function(n){return yu(n)&&"[object WeakSet]"==Ot(n)},An.join=function(n,t){return null==n?"":Bi.call(n,t)},An.kebabCase=Lf,An.last=Ve,An.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return -1;var u=e;if(r!==T&&(u=Eu(r),u=0>u?Ui(e+u,0):Ci(u,e-1)),
+ t===t){for(r=u+1;r--&&n[r]!==t;);n=r;}else n=_(n,d,u,true);return n},An.lowerCase=Uf,An.lowerFirst=Cf,An.lt=vf,An.lte=gf,An.max=function(n){return n&&n.length?xt(n,$u,It):T},An.maxBy=function(n,t){return n&&n.length?xt(n,ye(t,2),It):T},An.mean=function(n){return y(n,$u)},An.meanBy=function(n,t){return y(n,ye(t,2))},An.min=function(n){return n&&n.length?xt(n,$u,Kt):T},An.minBy=function(n,t){return n&&n.length?xt(n,ye(t,2),Kt):T},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){return {}},An.stubString=function(){
+ return ""},An.stubTrue=function(){return true},An.multiply=rc,An.nth=function(n,t){return n&&n.length?Qt(n,Eu(t)):T},An.noConflict=function(){return $n._===this&&($n._=si),this},An.noop=Pu,An.now=Go,An.pad=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return !t||e>=t?n:(t=(t-e)/2,ne(Ii(t),r)+n+ne(Oi(t),r))},An.padEnd=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return t&&et){var e=n;n=t,t=e;}return r||n%1||t%1?(r=Ti(),Ci(n+r*(t-n+Cn("1e-"+((r+"").length-1))),t)):ir(n,t)},An.reduce=function(n,t,r){var e=ff(n)?l:j,u=3>arguments.length;return e(n,ye(t,4),r,u,uo)},An.reduceRight=function(n,t,r){var e=ff(n)?s:j,u=3>arguments.length;
+ return e(n,ye(t,4),r,u,io)},An.repeat=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:Eu(t),or(Iu(n),t)},An.replace=function(){var n=arguments,t=Iu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},An.result=function(n,t,r){t=Sr(t,n);var e=-1,u=t.length;for(u||(u=1,n=T);++en||9007199254740991=i)return n;if(i=r-D(e),1>i)return e;if(r=o?Or(o,0,i).join(""):n.slice(0,i),u===T)return r+e;if(o&&(i+=r.length-i),hf(u)){if(n.slice(i).search(u)){
+ var f=r;for(u.global||(u=Xu(u.source,Iu(_n.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===T?i:c);}}else n.indexOf(yr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?"Right":"")}),e},Un.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()};}),r(["filter","map","takeWhile"],function(n,t){
+ var r=t+1,e=1==r||3==r;Un.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t};}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Un.prototype[n]=function(){return this[r](1).value()[0]};}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Un.prototype[n]=function(){return this.__filtered__?new Un(this):this[r](1)};}),Un.prototype.compact=function(){return this.filter($u)},Un.prototype.find=function(n){
+ return this.filter(n).head()},Un.prototype.findLast=function(n){return this.reverse().find(n)},Un.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Un(this):this.map(function(r){return Lt(r,n,t)})}),Un.prototype.reject=function(n){return this.filter(au(ye(n)))},Un.prototype.slice=function(n,t){n=Eu(n);var r=this;return r.__filtered__&&(0t)?new Un(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=Eu(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Un.prototype.takeRightWhile=function(n){
+ return this.reverse().takeWhile(n).reverse()},Un.prototype.toArray=function(){return this.take(4294967295)},mt(Un.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=An[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(An.prototype[t]=function(){function t(n){return n=u.apply(An,a([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Un,l=f[0],s=c||ff(o);s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,l=i&&!h,c=c&&!p;
+ return !i&&s?(o=c?o:new Un(this),o=n.apply(o,f),o.__actions__.push({func:Qe,args:[t],thisArg:T}),new On(o,h)):l&&c?n.apply(this,f):(o=this.thru(t),l?e?o.value()[0]:o.value():o)});}),r("pop push shift sort splice unshift".split(" "),function(n){var t=ri[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);An.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(ff(u)?u:[],n)}return this[r](function(r){return t.apply(ff(r)?r:[],n)});
+ };}),mt(Un.prototype,function(n,t){var r=An[t];if(r){var e=r.name+"";oi.call(Gi,e)||(Gi[e]=[]),Gi[e].push({name:t,func:r});}}),Gi[Jr(T,2).name]=[{name:"wrapper",func:T}],Un.prototype.clone=function(){var n=new Un(this.__wrapped__);return n.__actions__=Ur(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Ur(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Ur(this.__views__),n},Un.prototype.reverse=function(){if(this.__filtered__){var n=new Un(this);
+ n.__dir__=-1,n.__filtered__=true;}else n=this.clone(),n.__dir__*=-1;return n},Un.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c=this.__values__.length;return {done:n,value:n?T:this.__values__[this.__index__++]}},An.prototype.plant=function(n){
+ for(var t,r=this;r instanceof En;){var e=Fe(r);e.__index__=0,e.__values__=T,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__;}return u.__wrapped__=n,t},An.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Un?(this.__actions__.length&&(n=new Un(this)),n=n.reverse(),n.__actions__.push({func:Qe,args:[Ge],thisArg:T}),new On(n,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,
+ wi&&(An.prototype[wi]=Xe),An}();Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt;}).call(commonjsGlobal);
+ });
- )
- var c = o.index
- r = r.slice(0, c === T ? i : c)
- }
- } else
- n.indexOf(yr(u), i) != i &&
- ((u = r.lastIndexOf(u)), -1 < u && (r = r.slice(0, u)))
- return r + e
- }),
- (An.unescape = function(n) {
- return (n = Iu(n)) && G.test(n) ? n.replace(V, tt) : n
- }),
- (An.uniqueId = function(n) {
- var t = ++fi
- return Iu(n) + t
- }),
- (An.upperCase = Tf),
- (An.upperFirst = $f),
- (An.each = nu),
- (An.eachRight = tu),
- (An.first = qe),
- Nu(
- An,
- (function() {
- var n = {}
- return (
- mt(An, function(t, r) {
- oi.call(An.prototype, r) || (n[r] = t)
- }),
- n
- )
- })(),
- { chain: false }
- ),
- (An.VERSION = "4.17.15"),
- r(
- "bind bindKey curry curryRight partial partialRight".split(" "),
- function(n) {
- An[n].placeholder = An
- }
- ),
- r(["drop", "take"], function(n, t) {
- ;(Un.prototype[n] = function(r) {
- r = r === T ? 1 : Ui(Eu(r), 0)
- var e = this.__filtered__ && !t ? new Un(this) : this.clone()
- return (
- e.__filtered__
- ? (e.__takeCount__ = Ci(r, e.__takeCount__))
- : e.__views__.push({
- size: Ci(r, 4294967295),
- type: n + (0 > e.__dir__ ? "Right" : ""),
- }),
- e
- )
- }),
- (Un.prototype[n + "Right"] = function(t) {
- return this.reverse()
- [n](t)
- .reverse()
- })
- }),
- r(["filter", "map", "takeWhile"], function(n, t) {
- var r = t + 1,
- e = 1 == r || 3 == r
- Un.prototype[n] = function(n) {
- var t = this.clone()
- return (
- t.__iteratees__.push({ iteratee: ye(n, 3), type: r }),
- (t.__filtered__ = t.__filtered__ || e),
- t
- )
- }
- }),
- r(["head", "last"], function(n, t) {
- var r = "take" + (t ? "Right" : "")
- Un.prototype[n] = function() {
- return this[r](1).value()[0]
- }
- }),
- r(["initial", "tail"], function(n, t) {
- var r = "drop" + (t ? "" : "Right")
- Un.prototype[n] = function() {
- return this.__filtered__ ? new Un(this) : this[r](1)
- }
- }),
- (Un.prototype.compact = function() {
- return this.filter($u)
- }),
- (Un.prototype.find = function(n) {
- return this.filter(n).head()
- }),
- (Un.prototype.findLast = function(n) {
- return this.reverse().find(n)
- }),
- (Un.prototype.invokeMap = fr(function(n, t) {
- return typeof n == "function"
- ? new Un(this)
- : this.map(function(r) {
- return Lt(r, n, t)
- })
- })),
- (Un.prototype.reject = function(n) {
- return this.filter(au(ye(n)))
- }),
- (Un.prototype.slice = function(n, t) {
- n = Eu(n)
- var r = this
- return r.__filtered__ && (0 < n || 0 > t)
- ? new Un(r)
- : (0 > n ? (r = r.takeRight(-n)) : n && (r = r.drop(n)),
- t !== T &&
- ((t = Eu(t)),
- (r = 0 > t ? r.dropRight(-t) : r.take(t - n))),
- r)
- }),
- (Un.prototype.takeRightWhile = function(n) {
- return this.reverse()
- .takeWhile(n)
- .reverse()
- }),
- (Un.prototype.toArray = function() {
- return this.take(4294967295)
- }),
- mt(Un.prototype, function(n, t) {
- var r = /^(?:filter|find|map|reject)|While$/.test(t),
- e = /^(?:head|last)$/.test(t),
- u = An[e ? "take" + ("last" == t ? "Right" : "") : t],
- i = e || /^find/.test(t)
- u &&
- (An.prototype[t] = function() {
- function t(n) {
- return (n = u.apply(An, a([n], f))), e && h ? n[0] : n
- }
- var o = this.__wrapped__,
- f = e ? [1] : arguments,
- c = o instanceof Un,
- l = f[0],
- s = c || ff(o)
- s &&
- r &&
- typeof l == "function" &&
- 1 != l.length &&
- (c = s = false)
- var h = this.__chain__,
- p = !!this.__actions__.length,
- l = i && !h,
- c = c && !p
- return !i && s
- ? ((o = c ? o : new Un(this)),
- (o = n.apply(o, f)),
- o.__actions__.push({ func: Qe, args: [t], thisArg: T }),
- new On(o, h))
- : l && c
- ? n.apply(this, f)
- : ((o = this.thru(t)),
- l ? (e ? o.value()[0] : o.value()) : o)
- })
- }),
- r("pop push shift sort splice unshift".split(" "), function(n) {
- var t = ri[n],
- r = /^(?:push|sort|unshift)$/.test(n) ? "tap" : "thru",
- e = /^(?:pop|shift)$/.test(n)
- An.prototype[n] = function() {
- var n = arguments
- if (e && !this.__chain__) {
- var u = this.value()
- return t.apply(ff(u) ? u : [], n)
- }
- return this[r](function(r) {
- return t.apply(ff(r) ? r : [], n)
- })
- }
- }),
- mt(Un.prototype, function(n, t) {
- var r = An[t]
- if (r) {
- var e = r.name + ""
- oi.call(Gi, e) || (Gi[e] = []), Gi[e].push({ name: t, func: r })
- }
- }),
- (Gi[Jr(T, 2).name] = [{ name: "wrapper", func: T }]),
- (Un.prototype.clone = function() {
- var n = new Un(this.__wrapped__)
- return (
- (n.__actions__ = Ur(this.__actions__)),
- (n.__dir__ = this.__dir__),
- (n.__filtered__ = this.__filtered__),
- (n.__iteratees__ = Ur(this.__iteratees__)),
- (n.__takeCount__ = this.__takeCount__),
- (n.__views__ = Ur(this.__views__)),
- n
- )
- }),
- (Un.prototype.reverse = function() {
- if (this.__filtered__) {
- var n = new Un(this)
- ;(n.__dir__ = -1), (n.__filtered__ = true)
- } else (n = this.clone()), (n.__dir__ *= -1)
- return n
- }),
- (Un.prototype.value = function() {
- var n,
- t = this.__wrapped__.value(),
- r = this.__dir__,
- e = ff(t),
- u = 0 > r,
- i = e ? t.length : 0
- n = i
- for (
- var o = this.__views__, f = 0, c = -1, a = o.length;
- ++c < a;
-
- ) {
- var l = o[c],
- s = l.size
- switch (l.type) {
- case "drop":
- f += s
- break
- case "dropRight":
- n -= s
- break
- case "take":
- n = Ci(n, f + s)
- break
- case "takeRight":
- f = Ui(f, n - s)
- }
- }
- if (
- ((n = { start: f, end: n }),
- (o = n.start),
- (f = n.end),
- (n = f - o),
- (o = u ? f : o - 1),
- (f = this.__iteratees__),
- (c = f.length),
- (a = 0),
- (l = Ci(n, this.__takeCount__)),
- !e || (!u && i == n && l == n))
- )
- return wr(t, this.__actions__)
- e = []
- n: for (; n-- && a < l; ) {
- for (o += r, u = -1, i = t[o]; ++u < c; ) {
- var h = f[u],
- s = h.type,
- h = (0, h.iteratee)(i)
- if (2 == s) i = h
- else if (!h) {
- if (1 == s) continue n
- break n
- }
- }
- e[a++] = i
- }
- return e
- }),
- (An.prototype.at = To),
- (An.prototype.chain = function() {
- return Ye(this)
- }),
- (An.prototype.commit = function() {
- return new On(this.value(), this.__chain__)
- }),
- (An.prototype.next = function() {
- this.__values__ === T && (this.__values__ = mu(this.value()))
- var n = this.__index__ >= this.__values__.length
- return {
- done: n,
- value: n ? T : this.__values__[this.__index__++],
- }
- }),
- (An.prototype.plant = function(n) {
- for (var t, r = this; r instanceof En; ) {
- var e = Fe(r)
- ;(e.__index__ = 0),
- (e.__values__ = T),
- t ? (u.__wrapped__ = e) : (t = e)
- var u = e,
- r = r.__wrapped__
- }
- return (u.__wrapped__ = n), t
- }),
- (An.prototype.reverse = function() {
- var n = this.__wrapped__
- return n instanceof Un
- ? (this.__actions__.length && (n = new Un(this)),
- (n = n.reverse()),
- n.__actions__.push({ func: Qe, args: [Ge], thisArg: T }),
- new On(n, this.__chain__))
- : this.thru(Ge)
- }),
- (An.prototype.toJSON = An.prototype.valueOf = An.prototype.value = function() {
- return wr(this.__wrapped__, this.__actions__)
- }),
- (An.prototype.first = An.prototype.head),
- wi && (An.prototype[wi] = Xe),
- An
- )
- })()
- Nn ? (((Nn.exports = rt)._ = rt), (Fn._ = rt)) : ($n._ = rt)
- }.call(commonjsGlobal))
- })
-
- var _mapping = createCommonjsModule(function(module, exports) {
+ var _mapping = createCommonjsModule(function (module, exports) {
/** Used to map aliases to their real names. */
exports.aliasToReal = {
+
// Lodash aliases.
- each: "forEach",
- eachRight: "forEachRight",
- entries: "toPairs",
- entriesIn: "toPairsIn",
- extend: "assignIn",
- extendAll: "assignInAll",
- extendAllWith: "assignInAllWith",
- extendWith: "assignInWith",
- first: "head",
+ 'each': 'forEach',
+ 'eachRight': 'forEachRight',
+ 'entries': 'toPairs',
+ 'entriesIn': 'toPairsIn',
+ 'extend': 'assignIn',
+ 'extendAll': 'assignInAll',
+ 'extendAllWith': 'assignInAllWith',
+ 'extendWith': 'assignInWith',
+ 'first': 'head',
// Methods that are curried variants of others.
- conforms: "conformsTo",
- matches: "isMatch",
- property: "get",
+ 'conforms': 'conformsTo',
+ 'matches': 'isMatch',
+ 'property': 'get',
// Ramda aliases.
- __: "placeholder",
- F: "stubFalse",
- T: "stubTrue",
- all: "every",
- allPass: "overEvery",
- always: "constant",
- any: "some",
- anyPass: "overSome",
- apply: "spread",
- assoc: "set",
- assocPath: "set",
- complement: "negate",
- compose: "flowRight",
- contains: "includes",
- dissoc: "unset",
- dissocPath: "unset",
- dropLast: "dropRight",
- dropLastWhile: "dropRightWhile",
- equals: "isEqual",
- identical: "eq",
- indexBy: "keyBy",
- init: "initial",
- invertObj: "invert",
- juxt: "over",
- omitAll: "omit",
- nAry: "ary",
- path: "get",
- pathEq: "matchesProperty",
- pathOr: "getOr",
- paths: "at",
- pickAll: "pick",
- pipe: "flow",
- pluck: "map",
- prop: "get",
- propEq: "matchesProperty",
- propOr: "getOr",
- props: "at",
- symmetricDifference: "xor",
- symmetricDifferenceBy: "xorBy",
- symmetricDifferenceWith: "xorWith",
- takeLast: "takeRight",
- takeLastWhile: "takeRightWhile",
- unapply: "rest",
- unnest: "flatten",
- useWith: "overArgs",
- where: "conformsTo",
- whereEq: "isMatch",
- zipObj: "zipObject",
- }
+ '__': 'placeholder',
+ 'F': 'stubFalse',
+ 'T': 'stubTrue',
+ 'all': 'every',
+ 'allPass': 'overEvery',
+ 'always': 'constant',
+ 'any': 'some',
+ 'anyPass': 'overSome',
+ 'apply': 'spread',
+ 'assoc': 'set',
+ 'assocPath': 'set',
+ 'complement': 'negate',
+ 'compose': 'flowRight',
+ 'contains': 'includes',
+ 'dissoc': 'unset',
+ 'dissocPath': 'unset',
+ 'dropLast': 'dropRight',
+ 'dropLastWhile': 'dropRightWhile',
+ 'equals': 'isEqual',
+ 'identical': 'eq',
+ 'indexBy': 'keyBy',
+ 'init': 'initial',
+ 'invertObj': 'invert',
+ 'juxt': 'over',
+ 'omitAll': 'omit',
+ 'nAry': 'ary',
+ 'path': 'get',
+ 'pathEq': 'matchesProperty',
+ 'pathOr': 'getOr',
+ 'paths': 'at',
+ 'pickAll': 'pick',
+ 'pipe': 'flow',
+ 'pluck': 'map',
+ 'prop': 'get',
+ 'propEq': 'matchesProperty',
+ 'propOr': 'getOr',
+ 'props': 'at',
+ 'symmetricDifference': 'xor',
+ 'symmetricDifferenceBy': 'xorBy',
+ 'symmetricDifferenceWith': 'xorWith',
+ 'takeLast': 'takeRight',
+ 'takeLastWhile': 'takeRightWhile',
+ 'unapply': 'rest',
+ 'unnest': 'flatten',
+ 'useWith': 'overArgs',
+ 'where': 'conformsTo',
+ 'whereEq': 'isMatch',
+ 'zipObj': 'zipObject'
+ };
/** Used to map ary to method names. */
exports.aryMethod = {
- "1": [
- "assignAll",
- "assignInAll",
- "attempt",
- "castArray",
- "ceil",
- "create",
- "curry",
- "curryRight",
- "defaultsAll",
- "defaultsDeepAll",
- "floor",
- "flow",
- "flowRight",
- "fromPairs",
- "invert",
- "iteratee",
- "memoize",
- "method",
- "mergeAll",
- "methodOf",
- "mixin",
- "nthArg",
- "over",
- "overEvery",
- "overSome",
- "rest",
- "reverse",
- "round",
- "runInContext",
- "spread",
- "template",
- "trim",
- "trimEnd",
- "trimStart",
- "uniqueId",
- "words",
- "zipAll",
+ '1': [
+ 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',
+ 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',
+ 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',
+ 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',
+ 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
+ 'uniqueId', 'words', 'zipAll'
],
- "2": [
- "add",
- "after",
- "ary",
- "assign",
- "assignAllWith",
- "assignIn",
- "assignInAllWith",
- "at",
- "before",
- "bind",
- "bindAll",
- "bindKey",
- "chunk",
- "cloneDeepWith",
- "cloneWith",
- "concat",
- "conformsTo",
- "countBy",
- "curryN",
- "curryRightN",
- "debounce",
- "defaults",
- "defaultsDeep",
- "defaultTo",
- "delay",
- "difference",
- "divide",
- "drop",
- "dropRight",
- "dropRightWhile",
- "dropWhile",
- "endsWith",
- "eq",
- "every",
- "filter",
- "find",
- "findIndex",
- "findKey",
- "findLast",
- "findLastIndex",
- "findLastKey",
- "flatMap",
- "flatMapDeep",
- "flattenDepth",
- "forEach",
- "forEachRight",
- "forIn",
- "forInRight",
- "forOwn",
- "forOwnRight",
- "get",
- "groupBy",
- "gt",
- "gte",
- "has",
- "hasIn",
- "includes",
- "indexOf",
- "intersection",
- "invertBy",
- "invoke",
- "invokeMap",
- "isEqual",
- "isMatch",
- "join",
- "keyBy",
- "lastIndexOf",
- "lt",
- "lte",
- "map",
- "mapKeys",
- "mapValues",
- "matchesProperty",
- "maxBy",
- "meanBy",
- "merge",
- "mergeAllWith",
- "minBy",
- "multiply",
- "nth",
- "omit",
- "omitBy",
- "overArgs",
- "pad",
- "padEnd",
- "padStart",
- "parseInt",
- "partial",
- "partialRight",
- "partition",
- "pick",
- "pickBy",
- "propertyOf",
- "pull",
- "pullAll",
- "pullAt",
- "random",
- "range",
- "rangeRight",
- "rearg",
- "reject",
- "remove",
- "repeat",
- "restFrom",
- "result",
- "sampleSize",
- "some",
- "sortBy",
- "sortedIndex",
- "sortedIndexOf",
- "sortedLastIndex",
- "sortedLastIndexOf",
- "sortedUniqBy",
- "split",
- "spreadFrom",
- "startsWith",
- "subtract",
- "sumBy",
- "take",
- "takeRight",
- "takeRightWhile",
- "takeWhile",
- "tap",
- "throttle",
- "thru",
- "times",
- "trimChars",
- "trimCharsEnd",
- "trimCharsStart",
- "truncate",
- "union",
- "uniqBy",
- "uniqWith",
- "unset",
- "unzipWith",
- "without",
- "wrap",
- "xor",
- "zip",
- "zipObject",
- "zipObjectDeep",
+ '2': [
+ 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',
+ 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',
+ 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',
+ 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',
+ 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
+ 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
+ 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',
+ 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',
+ 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',
+ 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',
+ 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',
+ 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',
+ 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
+ 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',
+ 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
+ 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
+ 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
+ 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
+ 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
+ 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
+ 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
+ 'zipObjectDeep'
],
- "3": [
- "assignInWith",
- "assignWith",
- "clamp",
- "differenceBy",
- "differenceWith",
- "findFrom",
- "findIndexFrom",
- "findLastFrom",
- "findLastIndexFrom",
- "getOr",
- "includesFrom",
- "indexOfFrom",
- "inRange",
- "intersectionBy",
- "intersectionWith",
- "invokeArgs",
- "invokeArgsMap",
- "isEqualWith",
- "isMatchWith",
- "flatMapDepth",
- "lastIndexOfFrom",
- "mergeWith",
- "orderBy",
- "padChars",
- "padCharsEnd",
- "padCharsStart",
- "pullAllBy",
- "pullAllWith",
- "rangeStep",
- "rangeStepRight",
- "reduce",
- "reduceRight",
- "replace",
- "set",
- "slice",
- "sortedIndexBy",
- "sortedLastIndexBy",
- "transform",
- "unionBy",
- "unionWith",
- "update",
- "xorBy",
- "xorWith",
- "zipWith",
+ '3': [
+ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
+ 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
+ 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
+ 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
+ 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
+ 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',
+ 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',
+ 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',
+ 'xorWith', 'zipWith'
],
- "4": ["fill", "setWith", "updateWith"],
- }
+ '4': [
+ 'fill', 'setWith', 'updateWith'
+ ]
+ };
/** Used to map ary to rearg configs. */
exports.aryRearg = {
- "2": [1, 0],
- "3": [2, 0, 1],
- "4": [3, 2, 0, 1],
- }
+ '2': [1, 0],
+ '3': [2, 0, 1],
+ '4': [3, 2, 0, 1]
+ };
/** Used to map method names to their iteratee ary. */
exports.iterateeAry = {
- dropRightWhile: 1,
- dropWhile: 1,
- every: 1,
- filter: 1,
- find: 1,
- findFrom: 1,
- findIndex: 1,
- findIndexFrom: 1,
- findKey: 1,
- findLast: 1,
- findLastFrom: 1,
- findLastIndex: 1,
- findLastIndexFrom: 1,
- findLastKey: 1,
- flatMap: 1,
- flatMapDeep: 1,
- flatMapDepth: 1,
- forEach: 1,
- forEachRight: 1,
- forIn: 1,
- forInRight: 1,
- forOwn: 1,
- forOwnRight: 1,
- map: 1,
- mapKeys: 1,
- mapValues: 1,
- partition: 1,
- reduce: 2,
- reduceRight: 2,
- reject: 1,
- remove: 1,
- some: 1,
- takeRightWhile: 1,
- takeWhile: 1,
- times: 1,
- transform: 2,
- }
+ 'dropRightWhile': 1,
+ 'dropWhile': 1,
+ 'every': 1,
+ 'filter': 1,
+ 'find': 1,
+ 'findFrom': 1,
+ 'findIndex': 1,
+ 'findIndexFrom': 1,
+ 'findKey': 1,
+ 'findLast': 1,
+ 'findLastFrom': 1,
+ 'findLastIndex': 1,
+ 'findLastIndexFrom': 1,
+ 'findLastKey': 1,
+ 'flatMap': 1,
+ 'flatMapDeep': 1,
+ 'flatMapDepth': 1,
+ 'forEach': 1,
+ 'forEachRight': 1,
+ 'forIn': 1,
+ 'forInRight': 1,
+ 'forOwn': 1,
+ 'forOwnRight': 1,
+ 'map': 1,
+ 'mapKeys': 1,
+ 'mapValues': 1,
+ 'partition': 1,
+ 'reduce': 2,
+ 'reduceRight': 2,
+ 'reject': 1,
+ 'remove': 1,
+ 'some': 1,
+ 'takeRightWhile': 1,
+ 'takeWhile': 1,
+ 'times': 1,
+ 'transform': 2
+ };
/** Used to map method names to iteratee rearg configs. */
exports.iterateeRearg = {
- mapKeys: [1],
- reduceRight: [1, 0],
- }
+ 'mapKeys': [1],
+ 'reduceRight': [1, 0]
+ };
/** Used to map method names to rearg configs. */
exports.methodRearg = {
- assignInAllWith: [1, 0],
- assignInWith: [1, 2, 0],
- assignAllWith: [1, 0],
- assignWith: [1, 2, 0],
- differenceBy: [1, 2, 0],
- differenceWith: [1, 2, 0],
- getOr: [2, 1, 0],
- intersectionBy: [1, 2, 0],
- intersectionWith: [1, 2, 0],
- isEqualWith: [1, 2, 0],
- isMatchWith: [2, 1, 0],
- mergeAllWith: [1, 0],
- mergeWith: [1, 2, 0],
- padChars: [2, 1, 0],
- padCharsEnd: [2, 1, 0],
- padCharsStart: [2, 1, 0],
- pullAllBy: [2, 1, 0],
- pullAllWith: [2, 1, 0],
- rangeStep: [1, 2, 0],
- rangeStepRight: [1, 2, 0],
- setWith: [3, 1, 2, 0],
- sortedIndexBy: [2, 1, 0],
- sortedLastIndexBy: [2, 1, 0],
- unionBy: [1, 2, 0],
- unionWith: [1, 2, 0],
- updateWith: [3, 1, 2, 0],
- xorBy: [1, 2, 0],
- xorWith: [1, 2, 0],
- zipWith: [1, 2, 0],
- }
+ 'assignInAllWith': [1, 0],
+ 'assignInWith': [1, 2, 0],
+ 'assignAllWith': [1, 0],
+ 'assignWith': [1, 2, 0],
+ 'differenceBy': [1, 2, 0],
+ 'differenceWith': [1, 2, 0],
+ 'getOr': [2, 1, 0],
+ 'intersectionBy': [1, 2, 0],
+ 'intersectionWith': [1, 2, 0],
+ 'isEqualWith': [1, 2, 0],
+ 'isMatchWith': [2, 1, 0],
+ 'mergeAllWith': [1, 0],
+ 'mergeWith': [1, 2, 0],
+ 'padChars': [2, 1, 0],
+ 'padCharsEnd': [2, 1, 0],
+ 'padCharsStart': [2, 1, 0],
+ 'pullAllBy': [2, 1, 0],
+ 'pullAllWith': [2, 1, 0],
+ 'rangeStep': [1, 2, 0],
+ 'rangeStepRight': [1, 2, 0],
+ 'setWith': [3, 1, 2, 0],
+ 'sortedIndexBy': [2, 1, 0],
+ 'sortedLastIndexBy': [2, 1, 0],
+ 'unionBy': [1, 2, 0],
+ 'unionWith': [1, 2, 0],
+ 'updateWith': [3, 1, 2, 0],
+ 'xorBy': [1, 2, 0],
+ 'xorWith': [1, 2, 0],
+ 'zipWith': [1, 2, 0]
+ };
/** Used to map method names to spread configs. */
exports.methodSpread = {
- assignAll: { start: 0 },
- assignAllWith: { start: 0 },
- assignInAll: { start: 0 },
- assignInAllWith: { start: 0 },
- defaultsAll: { start: 0 },
- defaultsDeepAll: { start: 0 },
- invokeArgs: { start: 2 },
- invokeArgsMap: { start: 2 },
- mergeAll: { start: 0 },
- mergeAllWith: { start: 0 },
- partial: { start: 1 },
- partialRight: { start: 1 },
- without: { start: 1 },
- zipAll: { start: 0 },
- }
+ 'assignAll': { 'start': 0 },
+ 'assignAllWith': { 'start': 0 },
+ 'assignInAll': { 'start': 0 },
+ 'assignInAllWith': { 'start': 0 },
+ 'defaultsAll': { 'start': 0 },
+ 'defaultsDeepAll': { 'start': 0 },
+ 'invokeArgs': { 'start': 2 },
+ 'invokeArgsMap': { 'start': 2 },
+ 'mergeAll': { 'start': 0 },
+ 'mergeAllWith': { 'start': 0 },
+ 'partial': { 'start': 1 },
+ 'partialRight': { 'start': 1 },
+ 'without': { 'start': 1 },
+ 'zipAll': { 'start': 0 }
+ };
/** Used to identify methods which mutate arrays or objects. */
exports.mutate = {
- array: {
- fill: true,
- pull: true,
- pullAll: true,
- pullAllBy: true,
- pullAllWith: true,
- pullAt: true,
- remove: true,
- reverse: true,
+ 'array': {
+ 'fill': true,
+ 'pull': true,
+ 'pullAll': true,
+ 'pullAllBy': true,
+ 'pullAllWith': true,
+ 'pullAt': true,
+ 'remove': true,
+ 'reverse': true
},
- object: {
- assign: true,
- assignAll: true,
- assignAllWith: true,
- assignIn: true,
- assignInAll: true,
- assignInAllWith: true,
- assignInWith: true,
- assignWith: true,
- defaults: true,
- defaultsAll: true,
- defaultsDeep: true,
- defaultsDeepAll: true,
- merge: true,
- mergeAll: true,
- mergeAllWith: true,
- mergeWith: true,
+ 'object': {
+ 'assign': true,
+ 'assignAll': true,
+ 'assignAllWith': true,
+ 'assignIn': true,
+ 'assignInAll': true,
+ 'assignInAllWith': true,
+ 'assignInWith': true,
+ 'assignWith': true,
+ 'defaults': true,
+ 'defaultsAll': true,
+ 'defaultsDeep': true,
+ 'defaultsDeepAll': true,
+ 'merge': true,
+ 'mergeAll': true,
+ 'mergeAllWith': true,
+ 'mergeWith': true,
},
- set: {
- set: true,
- setWith: true,
- unset: true,
- update: true,
- updateWith: true,
- },
- }
+ 'set': {
+ 'set': true,
+ 'setWith': true,
+ 'unset': true,
+ 'update': true,
+ 'updateWith': true
+ }
+ };
/** Used to map real names to their aliases. */
exports.realToAlias = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
- object = exports.aliasToReal,
- result = {}
+ object = exports.aliasToReal,
+ result = {};
for (var key in object) {
- var value = object[key]
+ var value = object[key];
if (hasOwnProperty.call(result, value)) {
- result[value].push(key)
+ result[value].push(key);
} else {
- result[value] = [key]
+ result[value] = [key];
}
}
- return result
- })()
+ return result;
+ }());
/** Used to map method names to other names. */
exports.remap = {
- assignAll: "assign",
- assignAllWith: "assignWith",
- assignInAll: "assignIn",
- assignInAllWith: "assignInWith",
- curryN: "curry",
- curryRightN: "curryRight",
- defaultsAll: "defaults",
- defaultsDeepAll: "defaultsDeep",
- findFrom: "find",
- findIndexFrom: "findIndex",
- findLastFrom: "findLast",
- findLastIndexFrom: "findLastIndex",
- getOr: "get",
- includesFrom: "includes",
- indexOfFrom: "indexOf",
- invokeArgs: "invoke",
- invokeArgsMap: "invokeMap",
- lastIndexOfFrom: "lastIndexOf",
- mergeAll: "merge",
- mergeAllWith: "mergeWith",
- padChars: "pad",
- padCharsEnd: "padEnd",
- padCharsStart: "padStart",
- propertyOf: "get",
- rangeStep: "range",
- rangeStepRight: "rangeRight",
- restFrom: "rest",
- spreadFrom: "spread",
- trimChars: "trim",
- trimCharsEnd: "trimEnd",
- trimCharsStart: "trimStart",
- zipAll: "zip",
- }
+ 'assignAll': 'assign',
+ 'assignAllWith': 'assignWith',
+ 'assignInAll': 'assignIn',
+ 'assignInAllWith': 'assignInWith',
+ 'curryN': 'curry',
+ 'curryRightN': 'curryRight',
+ 'defaultsAll': 'defaults',
+ 'defaultsDeepAll': 'defaultsDeep',
+ 'findFrom': 'find',
+ 'findIndexFrom': 'findIndex',
+ 'findLastFrom': 'findLast',
+ 'findLastIndexFrom': 'findLastIndex',
+ 'getOr': 'get',
+ 'includesFrom': 'includes',
+ 'indexOfFrom': 'indexOf',
+ 'invokeArgs': 'invoke',
+ 'invokeArgsMap': 'invokeMap',
+ 'lastIndexOfFrom': 'lastIndexOf',
+ 'mergeAll': 'merge',
+ 'mergeAllWith': 'mergeWith',
+ 'padChars': 'pad',
+ 'padCharsEnd': 'padEnd',
+ 'padCharsStart': 'padStart',
+ 'propertyOf': 'get',
+ 'rangeStep': 'range',
+ 'rangeStepRight': 'rangeRight',
+ 'restFrom': 'rest',
+ 'spreadFrom': 'spread',
+ 'trimChars': 'trim',
+ 'trimCharsEnd': 'trimEnd',
+ 'trimCharsStart': 'trimStart',
+ 'zipAll': 'zip'
+ };
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
- castArray: true,
- flow: true,
- flowRight: true,
- iteratee: true,
- mixin: true,
- rearg: true,
- runInContext: true,
- }
+ 'castArray': true,
+ 'flow': true,
+ 'flowRight': true,
+ 'iteratee': true,
+ 'mixin': true,
+ 'rearg': true,
+ 'runInContext': true
+ };
/** Used to track methods that skip rearranging arguments. */
exports.skipRearg = {
- add: true,
- assign: true,
- assignIn: true,
- bind: true,
- bindKey: true,
- concat: true,
- difference: true,
- divide: true,
- eq: true,
- gt: true,
- gte: true,
- isEqual: true,
- lt: true,
- lte: true,
- matchesProperty: true,
- merge: true,
- multiply: true,
- overArgs: true,
- partial: true,
- partialRight: true,
- propertyOf: true,
- random: true,
- range: true,
- rangeRight: true,
- subtract: true,
- zip: true,
- zipObject: true,
- zipObjectDeep: true,
- }
- })
- var _mapping_1 = _mapping.aliasToReal
- var _mapping_2 = _mapping.aryMethod
- var _mapping_3 = _mapping.aryRearg
- var _mapping_4 = _mapping.iterateeAry
- var _mapping_5 = _mapping.iterateeRearg
- var _mapping_6 = _mapping.methodRearg
- var _mapping_7 = _mapping.methodSpread
- var _mapping_8 = _mapping.mutate
- var _mapping_9 = _mapping.realToAlias
- var _mapping_10 = _mapping.remap
- var _mapping_11 = _mapping.skipFixed
- var _mapping_12 = _mapping.skipRearg
-
- /**
- * The default argument placeholder value for methods.
- *
- * @type {Object}
- */
- var placeholder = {}
-
- /** Built-in value reference. */
- var push = Array.prototype.push
-
- /**
- * Creates a function, with an arity of `n`, that invokes `func` with the
- * arguments it receives.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} n The arity of the new function.
- * @returns {Function} Returns the new function.
- */
- function baseArity(func, n) {
- return n == 2
- ? function(a, b) {
- return func.apply(undefined, arguments)
- }
- : function(a) {
- return func.apply(undefined, arguments)
- }
- }
-
- /**
- * Creates a function that invokes `func`, with up to `n` arguments, ignoring
- * any additional arguments.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @param {number} n The arity cap.
- * @returns {Function} Returns the new function.
- */
- function baseAry(func, n) {
- return n == 2
- ? function(a, b) {
- return func(a, b)
- }
- : function(a) {
- return func(a)
- }
- }
-
- /**
- * Creates a clone of `array`.
- *
- * @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the cloned array.
- */
- function cloneArray(array) {
- var length = array ? array.length : 0,
- result = Array(length)
-
- while (length--) {
- result[length] = array[length]
- }
- return result
- }
-
- /**
- * Creates a function that clones a given object using the assignment `func`.
- *
- * @private
- * @param {Function} func The assignment function.
- * @returns {Function} Returns the new cloner function.
- */
- function createCloner(func) {
- return function(object) {
- return func({}, object)
- }
- }
-
- /**
- * A specialized version of `_.spread` which flattens the spread array into
- * the arguments of the invoked `func`.
- *
- * @private
- * @param {Function} func The function to spread arguments over.
- * @param {number} start The start position of the spread.
- * @returns {Function} Returns the new function.
- */
- function flatSpread(func, start) {
- return function() {
- var length = arguments.length,
- lastIndex = length - 1,
- args = Array(length)
-
- while (length--) {
- args[length] = arguments[length]
- }
- var array = args[start],
- otherArgs = args.slice(0, start)
-
- if (array) {
- push.apply(otherArgs, array)
- }
- if (start != lastIndex) {
- push.apply(otherArgs, args.slice(start + 1))
- }
- return func.apply(this, otherArgs)
- }
- }
-
- /**
- * Creates a function that wraps `func` and uses `cloner` to clone the first
- * argument it receives.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} cloner The function to clone arguments.
- * @returns {Function} Returns the new immutable function.
- */
- function wrapImmutable(func, cloner) {
- return function() {
- var length = arguments.length
- if (!length) {
- return
- }
- var args = Array(length)
- while (length--) {
- args[length] = arguments[length]
- }
- var result = (args[0] = cloner.apply(undefined, args))
- func.apply(undefined, args)
- return result
- }
- }
-
- /**
- * The base implementation of `convert` which accepts a `util` object of methods
- * required to perform conversions.
- *
- * @param {Object} util The util object.
- * @param {string} name The name of the function to convert.
- * @param {Function} func The function to convert.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.cap=true] Specify capping iteratee arguments.
- * @param {boolean} [options.curry=true] Specify currying.
- * @param {boolean} [options.fixed=true] Specify fixed arity.
- * @param {boolean} [options.immutable=true] Specify immutable operations.
- * @param {boolean} [options.rearg=true] Specify rearranging arguments.
- * @returns {Function|Object} Returns the converted function or object.
- */
- function baseConvert(util, name, func, options) {
- var isLib = typeof name == "function",
- isObj = name === Object(name)
-
- if (isObj) {
- options = func
- func = name
- name = undefined
- }
- if (func == null) {
- throw new TypeError()
- }
- options || (options = {})
-
- var config = {
- cap: "cap" in options ? options.cap : true,
- curry: "curry" in options ? options.curry : true,
- fixed: "fixed" in options ? options.fixed : true,
- immutable: "immutable" in options ? options.immutable : true,
- rearg: "rearg" in options ? options.rearg : true,
- }
-
- var defaultHolder = isLib ? func : placeholder,
- forceCurry = "curry" in options && options.curry,
- forceFixed = "fixed" in options && options.fixed,
- forceRearg = "rearg" in options && options.rearg,
- pristine = isLib ? func.runInContext() : undefined
-
- var helpers = isLib
- ? func
- : {
- ary: util.ary,
- assign: util.assign,
- clone: util.clone,
- curry: util.curry,
- forEach: util.forEach,
- isArray: util.isArray,
- isError: util.isError,
- isFunction: util.isFunction,
- isWeakMap: util.isWeakMap,
- iteratee: util.iteratee,
- keys: util.keys,
- rearg: util.rearg,
- toInteger: util.toInteger,
- toPath: util.toPath,
- }
-
- var ary = helpers.ary,
- assign = helpers.assign,
- clone = helpers.clone,
- curry = helpers.curry,
- each = helpers.forEach,
- isArray = helpers.isArray,
- isError = helpers.isError,
- isFunction = helpers.isFunction,
- isWeakMap = helpers.isWeakMap,
- keys = helpers.keys,
- rearg = helpers.rearg,
- toInteger = helpers.toInteger,
- toPath = helpers.toPath
-
- var aryMethodKeys = keys(_mapping.aryMethod)
-
- var wrappers = {
- castArray: function(castArray) {
- return function() {
- var value = arguments[0]
- return isArray(value)
- ? castArray(cloneArray(value))
- : castArray.apply(undefined, arguments)
- }
- },
- iteratee: function(iteratee) {
- return function() {
- var func = arguments[0],
- arity = arguments[1],
- result = iteratee(func, arity),
- length = result.length
-
- if (config.cap && typeof arity == "number") {
- arity = arity > 2 ? arity - 2 : 1
- return length && length <= arity ? result : baseAry(result, arity)
- }
- return result
- }
- },
- mixin: function(mixin) {
- return function(source) {
- var func = this
- if (!isFunction(func)) {
- return mixin(func, Object(source))
- }
- var pairs = []
- each(keys(source), function(key) {
- if (isFunction(source[key])) {
- pairs.push([key, func.prototype[key]])
- }
- })
-
- mixin(func, Object(source))
-
- each(pairs, function(pair) {
- var value = pair[1]
- if (isFunction(value)) {
- func.prototype[pair[0]] = value
- } else {
- delete func.prototype[pair[0]]
- }
- })
- return func
- }
- },
- nthArg: function(nthArg) {
- return function(n) {
- var arity = n < 0 ? 1 : toInteger(n) + 1
- return curry(nthArg(n), arity)
- }
- },
- rearg: function(rearg) {
- return function(func, indexes) {
- var arity = indexes ? indexes.length : 0
- return curry(rearg(func, indexes), arity)
- }
- },
- runInContext: function(runInContext) {
- return function(context) {
- return baseConvert(util, runInContext(context), options)
- }
- },
- }
-
- /*--------------------------------------------------------------------------*/
+ 'add': true,
+ 'assign': true,
+ 'assignIn': true,
+ 'bind': true,
+ 'bindKey': true,
+ 'concat': true,
+ 'difference': true,
+ 'divide': true,
+ 'eq': true,
+ 'gt': true,
+ 'gte': true,
+ 'isEqual': true,
+ 'lt': true,
+ 'lte': true,
+ 'matchesProperty': true,
+ 'merge': true,
+ 'multiply': true,
+ 'overArgs': true,
+ 'partial': true,
+ 'partialRight': true,
+ 'propertyOf': true,
+ 'random': true,
+ 'range': true,
+ 'rangeRight': true,
+ 'subtract': true,
+ 'zip': true,
+ 'zipObject': true,
+ 'zipObjectDeep': true
+ };
+ });
+ var _mapping_1 = _mapping.aliasToReal;
+ var _mapping_2 = _mapping.aryMethod;
+ var _mapping_3 = _mapping.aryRearg;
+ var _mapping_4 = _mapping.iterateeAry;
+ var _mapping_5 = _mapping.iterateeRearg;
+ var _mapping_6 = _mapping.methodRearg;
+ var _mapping_7 = _mapping.methodSpread;
+ var _mapping_8 = _mapping.mutate;
+ var _mapping_9 = _mapping.realToAlias;
+ var _mapping_10 = _mapping.remap;
+ var _mapping_11 = _mapping.skipFixed;
+ var _mapping_12 = _mapping.skipRearg;
/**
- * Casts `func` to a function with an arity capped iteratee if needed.
+ * The default argument placeholder value for methods.
*
- * @private
- * @param {string} name The name of the function to inspect.
- * @param {Function} func The function to inspect.
- * @returns {Function} Returns the cast function.
+ * @type {Object}
*/
- function castCap(name, func) {
- if (config.cap) {
- var indexes = _mapping.iterateeRearg[name]
- if (indexes) {
- return iterateeRearg(func, indexes)
- }
- var n = !isLib && _mapping.iterateeAry[name]
- if (n) {
- return iterateeAry(func, n)
- }
- }
- return func
- }
+ var placeholder = {};
+
+ /** Built-in value reference. */
+ var push = Array.prototype.push;
/**
- * Casts `func` to a curried function if needed.
+ * Creates a function, with an arity of `n`, that invokes `func` with the
+ * arguments it receives.
*
* @private
- * @param {string} name The name of the function to inspect.
- * @param {Function} func The function to inspect.
- * @param {number} n The arity of `func`.
- * @returns {Function} Returns the cast function.
+ * @param {Function} func The function to wrap.
+ * @param {number} n The arity of the new function.
+ * @returns {Function} Returns the new function.
*/
- function castCurry(name, func, n) {
- return forceCurry || (config.curry && n > 1) ? curry(func, n) : func
+ function baseArity(func, n) {
+ return n == 2
+ ? function(a, b) { return func.apply(undefined, arguments); }
+ : function(a) { return func.apply(undefined, arguments); };
}
/**
- * Casts `func` to a fixed arity function if needed.
+ * Creates a function that invokes `func`, with up to `n` arguments, ignoring
+ * any additional arguments.
*
* @private
- * @param {string} name The name of the function to inspect.
- * @param {Function} func The function to inspect.
+ * @param {Function} func The function to cap arguments for.
* @param {number} n The arity cap.
- * @returns {Function} Returns the cast function.
+ * @returns {Function} Returns the new function.
*/
- function castFixed(name, func, n) {
- if (config.fixed && (forceFixed || !_mapping.skipFixed[name])) {
- var data = _mapping.methodSpread[name],
- start = data && data.start
+ function baseAry(func, n) {
+ return n == 2
+ ? function(a, b) { return func(a, b); }
+ : function(a) { return func(a); };
+ }
- return start === undefined ? ary(func, n) : flatSpread(func, start)
+ /**
+ * Creates a clone of `array`.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the cloned array.
+ */
+ function cloneArray(array) {
+ var length = array ? array.length : 0,
+ result = Array(length);
+
+ while (length--) {
+ result[length] = array[length];
}
- return func
+ return result;
}
/**
- * Casts `func` to an rearged function if needed.
+ * Creates a function that clones a given object using the assignment `func`.
*
* @private
- * @param {string} name The name of the function to inspect.
- * @param {Function} func The function to inspect.
- * @param {number} n The arity of `func`.
- * @returns {Function} Returns the cast function.
+ * @param {Function} func The assignment function.
+ * @returns {Function} Returns the new cloner function.
*/
- function castRearg(name, func, n) {
- return config.rearg && n > 1 && (forceRearg || !_mapping.skipRearg[name])
- ? rearg(func, _mapping.methodRearg[name] || _mapping.aryRearg[n])
- : func
+ function createCloner(func) {
+ return function(object) {
+ return func({}, object);
+ };
}
/**
- * Creates a clone of `object` by `path`.
+ * A specialized version of `_.spread` which flattens the spread array into
+ * the arguments of the invoked `func`.
*
* @private
- * @param {Object} object The object to clone.
- * @param {Array|string} path The path to clone by.
- * @returns {Object} Returns the cloned object.
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} start The start position of the spread.
+ * @returns {Function} Returns the new function.
*/
- function cloneByPath(object, path) {
- path = toPath(path)
+ function flatSpread(func, start) {
+ return function() {
+ var length = arguments.length,
+ lastIndex = length - 1,
+ args = Array(length);
- var index = -1,
- length = path.length,
- lastIndex = length - 1,
- result = clone(Object(object)),
- nested = result
-
- while (nested != null && ++index < length) {
- var key = path[index],
- value = nested[key]
-
- if (
- value != null &&
- !(isFunction(value) || isError(value) || isWeakMap(value))
- ) {
- nested[key] = clone(index == lastIndex ? value : Object(value))
+ while (length--) {
+ args[length] = arguments[length];
}
- nested = nested[key]
- }
- return result
+ var array = args[start],
+ otherArgs = args.slice(0, start);
+
+ if (array) {
+ push.apply(otherArgs, array);
+ }
+ if (start != lastIndex) {
+ push.apply(otherArgs, args.slice(start + 1));
+ }
+ return func.apply(this, otherArgs);
+ };
}
/**
- * Converts `lodash` to an immutable auto-curried iteratee-first data-last
- * version with conversion `options` applied.
+ * Creates a function that wraps `func` and uses `cloner` to clone the first
+ * argument it receives.
*
- * @param {Object} [options] The options object. See `baseConvert` for more details.
- * @returns {Function} Returns the converted `lodash`.
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} cloner The function to clone arguments.
+ * @returns {Function} Returns the new immutable function.
*/
- function convertLib(options) {
- return _.runInContext.convert(options)(undefined)
+ function wrapImmutable(func, cloner) {
+ return function() {
+ var length = arguments.length;
+ if (!length) {
+ return;
+ }
+ var args = Array(length);
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var result = args[0] = cloner.apply(undefined, args);
+ func.apply(undefined, args);
+ return result;
+ };
}
/**
- * Create a converter function for `func` of `name`.
+ * The base implementation of `convert` which accepts a `util` object of methods
+ * required to perform conversions.
*
+ * @param {Object} util The util object.
* @param {string} name The name of the function to convert.
* @param {Function} func The function to convert.
- * @returns {Function} Returns the new converter function.
+ * @param {Object} [options] The options object.
+ * @param {boolean} [options.cap=true] Specify capping iteratee arguments.
+ * @param {boolean} [options.curry=true] Specify currying.
+ * @param {boolean} [options.fixed=true] Specify fixed arity.
+ * @param {boolean} [options.immutable=true] Specify immutable operations.
+ * @param {boolean} [options.rearg=true] Specify rearranging arguments.
+ * @returns {Function|Object} Returns the converted function or object.
*/
- function createConverter(name, func) {
- var realName = _mapping.aliasToReal[name] || name,
- methodName = _mapping.remap[realName] || realName,
- oldOptions = options
+ function baseConvert(util, name, func, options) {
+ var isLib = typeof name == 'function',
+ isObj = name === Object(name);
- return function(options) {
- var newUtil = isLib ? pristine : helpers,
- newFunc = isLib ? pristine[methodName] : func,
- newOptions = assign(assign({}, oldOptions), options)
-
- return baseConvert(newUtil, realName, newFunc, newOptions)
+ if (isObj) {
+ options = func;
+ func = name;
+ name = undefined;
}
- }
-
- /**
- * Creates a function that wraps `func` to invoke its iteratee, with up to `n`
- * arguments, ignoring any additional arguments.
- *
- * @private
- * @param {Function} func The function to cap iteratee arguments for.
- * @param {number} n The arity cap.
- * @returns {Function} Returns the new function.
- */
- function iterateeAry(func, n) {
- return overArg(func, function(func) {
- return typeof func == "function" ? baseAry(func, n) : func
- })
- }
-
- /**
- * Creates a function that wraps `func` to invoke its iteratee with arguments
- * arranged according to the specified `indexes` where the argument value at
- * the first index is provided as the first argument, the argument value at
- * the second index is provided as the second argument, and so on.
- *
- * @private
- * @param {Function} func The function to rearrange iteratee arguments for.
- * @param {number[]} indexes The arranged argument indexes.
- * @returns {Function} Returns the new function.
- */
- function iterateeRearg(func, indexes) {
- return overArg(func, function(func) {
- var n = indexes.length
- return baseArity(rearg(baseAry(func, n), indexes), n)
- })
- }
-
- /**
- * Creates a function that invokes `func` with its first argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
- function overArg(func, transform) {
- return function() {
- var length = arguments.length
- if (!length) {
- return func()
- }
- var args = Array(length)
- while (length--) {
- args[length] = arguments[length]
- }
- var index = config.rearg ? 0 : length - 1
- args[index] = transform(args[index])
- return func.apply(undefined, args)
+ if (func == null) {
+ throw new TypeError;
}
- }
+ options || (options = {});
- /**
- * Creates a function that wraps `func` and applys the conversions
- * rules by `name`.
- *
- * @private
- * @param {string} name The name of the function to wrap.
- * @param {Function} func The function to wrap.
- * @returns {Function} Returns the converted function.
- */
- function wrap(name, func, placeholder) {
- var result,
- realName = _mapping.aliasToReal[name] || name,
- wrapped = func,
- wrapper = wrappers[realName]
+ var config = {
+ 'cap': 'cap' in options ? options.cap : true,
+ 'curry': 'curry' in options ? options.curry : true,
+ 'fixed': 'fixed' in options ? options.fixed : true,
+ 'immutable': 'immutable' in options ? options.immutable : true,
+ 'rearg': 'rearg' in options ? options.rearg : true
+ };
- if (wrapper) {
- wrapped = wrapper(func)
- } else if (config.immutable) {
- if (_mapping.mutate.array[realName]) {
- wrapped = wrapImmutable(func, cloneArray)
- } else if (_mapping.mutate.object[realName]) {
- wrapped = wrapImmutable(func, createCloner(func))
- } else if (_mapping.mutate.set[realName]) {
- wrapped = wrapImmutable(func, cloneByPath)
- }
- }
- each(aryMethodKeys, function(aryKey) {
- each(_mapping.aryMethod[aryKey], function(otherName) {
- if (realName == otherName) {
- var data = _mapping.methodSpread[realName],
- afterRearg = data && data.afterRearg
+ var defaultHolder = isLib ? func : placeholder,
+ forceCurry = ('curry' in options) && options.curry,
+ forceFixed = ('fixed' in options) && options.fixed,
+ forceRearg = ('rearg' in options) && options.rearg,
+ pristine = isLib ? func.runInContext() : undefined;
- result = afterRearg
- ? castFixed(
- realName,
- castRearg(realName, wrapped, aryKey),
- aryKey
- )
- : castRearg(
- realName,
- castFixed(realName, wrapped, aryKey),
- aryKey
- )
+ var helpers = isLib ? func : {
+ 'ary': util.ary,
+ 'assign': util.assign,
+ 'clone': util.clone,
+ 'curry': util.curry,
+ 'forEach': util.forEach,
+ 'isArray': util.isArray,
+ 'isError': util.isError,
+ 'isFunction': util.isFunction,
+ 'isWeakMap': util.isWeakMap,
+ 'iteratee': util.iteratee,
+ 'keys': util.keys,
+ 'rearg': util.rearg,
+ 'toInteger': util.toInteger,
+ 'toPath': util.toPath
+ };
- result = castCap(realName, result)
- result = castCurry(realName, result, aryKey)
- return false
- }
- })
- return !result
- })
+ var ary = helpers.ary,
+ assign = helpers.assign,
+ clone = helpers.clone,
+ curry = helpers.curry,
+ each = helpers.forEach,
+ isArray = helpers.isArray,
+ isError = helpers.isError,
+ isFunction = helpers.isFunction,
+ isWeakMap = helpers.isWeakMap,
+ keys = helpers.keys,
+ rearg = helpers.rearg,
+ toInteger = helpers.toInteger,
+ toPath = helpers.toPath;
- result || (result = wrapped)
- if (result == func) {
- result = forceCurry
- ? curry(result, 1)
- : function() {
- return func.apply(this, arguments)
+ var aryMethodKeys = keys(_mapping.aryMethod);
+
+ var wrappers = {
+ 'castArray': function(castArray) {
+ return function() {
+ var value = arguments[0];
+ return isArray(value)
+ ? castArray(cloneArray(value))
+ : castArray.apply(undefined, arguments);
+ };
+ },
+ 'iteratee': function(iteratee) {
+ return function() {
+ var func = arguments[0],
+ arity = arguments[1],
+ result = iteratee(func, arity),
+ length = result.length;
+
+ if (config.cap && typeof arity == 'number') {
+ arity = arity > 2 ? (arity - 2) : 1;
+ return (length && length <= arity) ? result : baseAry(result, arity);
}
- }
- result.convert = createConverter(realName, func)
- result.placeholder = func.placeholder = placeholder
+ return result;
+ };
+ },
+ 'mixin': function(mixin) {
+ return function(source) {
+ var func = this;
+ if (!isFunction(func)) {
+ return mixin(func, Object(source));
+ }
+ var pairs = [];
+ each(keys(source), function(key) {
+ if (isFunction(source[key])) {
+ pairs.push([key, func.prototype[key]]);
+ }
+ });
- return result
- }
+ mixin(func, Object(source));
- /*--------------------------------------------------------------------------*/
-
- if (!isObj) {
- return wrap(name, func, defaultHolder)
- }
- var _ = func
-
- // Convert methods by ary cap.
- var pairs = []
- each(aryMethodKeys, function(aryKey) {
- each(_mapping.aryMethod[aryKey], function(key) {
- var func = _[_mapping.remap[key] || key]
- if (func) {
- pairs.push([key, wrap(key, func, _)])
+ each(pairs, function(pair) {
+ var value = pair[1];
+ if (isFunction(value)) {
+ func.prototype[pair[0]] = value;
+ } else {
+ delete func.prototype[pair[0]];
+ }
+ });
+ return func;
+ };
+ },
+ 'nthArg': function(nthArg) {
+ return function(n) {
+ var arity = n < 0 ? 1 : (toInteger(n) + 1);
+ return curry(nthArg(n), arity);
+ };
+ },
+ 'rearg': function(rearg) {
+ return function(func, indexes) {
+ var arity = indexes ? indexes.length : 0;
+ return curry(rearg(func, indexes), arity);
+ };
+ },
+ 'runInContext': function(runInContext) {
+ return function(context) {
+ return baseConvert(util, runInContext(context), options);
+ };
}
- })
- })
+ };
- // Convert remaining methods.
- each(keys(_), function(key) {
- var func = _[key]
- if (typeof func == "function") {
- var length = pairs.length
- while (length--) {
- if (pairs[length][0] == key) {
- return
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Casts `func` to a function with an arity capped iteratee if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @returns {Function} Returns the cast function.
+ */
+ function castCap(name, func) {
+ if (config.cap) {
+ var indexes = _mapping.iterateeRearg[name];
+ if (indexes) {
+ return iterateeRearg(func, indexes);
+ }
+ var n = !isLib && _mapping.iterateeAry[name];
+ if (n) {
+ return iterateeAry(func, n);
}
}
- func.convert = createConverter(key, func)
- pairs.push([key, func])
+ return func;
}
- })
- // Assign to `_` leaving `_.prototype` unchanged to allow chaining.
- each(pairs, function(pair) {
- _[pair[0]] = pair[1]
- })
+ /**
+ * Casts `func` to a curried function if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @param {number} n The arity of `func`.
+ * @returns {Function} Returns the cast function.
+ */
+ function castCurry(name, func, n) {
+ return (forceCurry || (config.curry && n > 1))
+ ? curry(func, n)
+ : func;
+ }
- _.convert = convertLib
- _.placeholder = _
+ /**
+ * Casts `func` to a fixed arity function if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the cast function.
+ */
+ function castFixed(name, func, n) {
+ if (config.fixed && (forceFixed || !_mapping.skipFixed[name])) {
+ var data = _mapping.methodSpread[name],
+ start = data && data.start;
- // Assign aliases.
- each(keys(_), function(key) {
- each(_mapping.realToAlias[key] || [], function(alias) {
- _[alias] = _[key]
- })
- })
+ return start === undefined ? ary(func, n) : flatSpread(func, start);
+ }
+ return func;
+ }
- return _
- }
+ /**
+ * Casts `func` to an rearged function if needed.
+ *
+ * @private
+ * @param {string} name The name of the function to inspect.
+ * @param {Function} func The function to inspect.
+ * @param {number} n The arity of `func`.
+ * @returns {Function} Returns the cast function.
+ */
+ function castRearg(name, func, n) {
+ return (config.rearg && n > 1 && (forceRearg || !_mapping.skipRearg[name]))
+ ? rearg(func, _mapping.methodRearg[name] || _mapping.aryRearg[n])
+ : func;
+ }
- var _baseConvert = baseConvert
+ /**
+ * Creates a clone of `object` by `path`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {Array|string} path The path to clone by.
+ * @returns {Object} Returns the cloned object.
+ */
+ function cloneByPath(object, path) {
+ path = toPath(path);
- var _ = lodash_min.runInContext()
- var fp = _baseConvert(_, _)
- var fp_1 = fp.find
- var fp_2 = fp.isUndefined
- var fp_3 = fp.split
- var fp_4 = fp.max
- var fp_5 = fp.last
- var fp_6 = fp.union
- var fp_7 = fp.reduce
- var fp_8 = fp.isObject
- var fp_9 = fp.cloneDeep
- var fp_10 = fp.some
- var fp_11 = fp.isArray
- var fp_12 = fp.map
- var fp_13 = fp.filter
- var fp_14 = fp.keys
- var fp_15 = fp.isFunction
- var fp_16 = fp.isEmpty
- var fp_17 = fp.countBy
- var fp_18 = fp.join
- var fp_19 = fp.includes
- var fp_20 = fp.flatten
- var fp_21 = fp.constant
- var fp_22 = fp.first
- var fp_23 = fp.intersection
- var fp_24 = fp.take
- var fp_25 = fp.has
- var fp_26 = fp.mapValues
- var fp_27 = fp.isString
- var fp_28 = fp.isBoolean
- var fp_29 = fp.isNull
- var fp_30 = fp.isNumber
- var fp_31 = fp.isObjectLike
- var fp_32 = fp.isDate
- var fp_33 = fp.clone
- var fp_34 = fp.values
- var fp_35 = fp.keyBy
- var fp_36 = fp.isNaN
- var fp_37 = fp.isInteger
- var fp_38 = fp.toNumber
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ result = clone(Object(object)),
+ nested = result;
+
+ while (nested != null && ++index < length) {
+ var key = path[index],
+ value = nested[key];
+
+ if (value != null &&
+ !(isFunction(value) || isError(value) || isWeakMap(value))) {
+ nested[key] = clone(index == lastIndex ? value : Object(value));
+ }
+ nested = nested[key];
+ }
+ return result;
+ }
+
+ /**
+ * Converts `lodash` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied.
+ *
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function} Returns the converted `lodash`.
+ */
+ function convertLib(options) {
+ return _.runInContext.convert(options)(undefined);
+ }
+
+ /**
+ * Create a converter function for `func` of `name`.
+ *
+ * @param {string} name The name of the function to convert.
+ * @param {Function} func The function to convert.
+ * @returns {Function} Returns the new converter function.
+ */
+ function createConverter(name, func) {
+ var realName = _mapping.aliasToReal[name] || name,
+ methodName = _mapping.remap[realName] || realName,
+ oldOptions = options;
+
+ return function(options) {
+ var newUtil = isLib ? pristine : helpers,
+ newFunc = isLib ? pristine[methodName] : func,
+ newOptions = assign(assign({}, oldOptions), options);
+
+ return baseConvert(newUtil, realName, newFunc, newOptions);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke its iteratee, with up to `n`
+ * arguments, ignoring any additional arguments.
+ *
+ * @private
+ * @param {Function} func The function to cap iteratee arguments for.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the new function.
+ */
+ function iterateeAry(func, n) {
+ return overArg(func, function(func) {
+ return typeof func == 'function' ? baseAry(func, n) : func;
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke its iteratee with arguments
+ * arranged according to the specified `indexes` where the argument value at
+ * the first index is provided as the first argument, the argument value at
+ * the second index is provided as the second argument, and so on.
+ *
+ * @private
+ * @param {Function} func The function to rearrange iteratee arguments for.
+ * @param {number[]} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ */
+ function iterateeRearg(func, indexes) {
+ return overArg(func, function(func) {
+ var n = indexes.length;
+ return baseArity(rearg(baseAry(func, n), indexes), n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `func` with its first argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function() {
+ var length = arguments.length;
+ if (!length) {
+ return func();
+ }
+ var args = Array(length);
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var index = config.rearg ? 0 : (length - 1);
+ args[index] = transform(args[index]);
+ return func.apply(undefined, args);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` and applys the conversions
+ * rules by `name`.
+ *
+ * @private
+ * @param {string} name The name of the function to wrap.
+ * @param {Function} func The function to wrap.
+ * @returns {Function} Returns the converted function.
+ */
+ function wrap(name, func, placeholder) {
+ var result,
+ realName = _mapping.aliasToReal[name] || name,
+ wrapped = func,
+ wrapper = wrappers[realName];
+
+ if (wrapper) {
+ wrapped = wrapper(func);
+ }
+ else if (config.immutable) {
+ if (_mapping.mutate.array[realName]) {
+ wrapped = wrapImmutable(func, cloneArray);
+ }
+ else if (_mapping.mutate.object[realName]) {
+ wrapped = wrapImmutable(func, createCloner(func));
+ }
+ else if (_mapping.mutate.set[realName]) {
+ wrapped = wrapImmutable(func, cloneByPath);
+ }
+ }
+ each(aryMethodKeys, function(aryKey) {
+ each(_mapping.aryMethod[aryKey], function(otherName) {
+ if (realName == otherName) {
+ var data = _mapping.methodSpread[realName],
+ afterRearg = data && data.afterRearg;
+
+ result = afterRearg
+ ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)
+ : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);
+
+ result = castCap(realName, result);
+ result = castCurry(realName, result, aryKey);
+ return false;
+ }
+ });
+ return !result;
+ });
+
+ result || (result = wrapped);
+ if (result == func) {
+ result = forceCurry ? curry(result, 1) : function() {
+ return func.apply(this, arguments);
+ };
+ }
+ result.convert = createConverter(realName, func);
+ result.placeholder = func.placeholder = placeholder;
+
+ return result;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ if (!isObj) {
+ return wrap(name, func, defaultHolder);
+ }
+ var _ = func;
+
+ // Convert methods by ary cap.
+ var pairs = [];
+ each(aryMethodKeys, function(aryKey) {
+ each(_mapping.aryMethod[aryKey], function(key) {
+ var func = _[_mapping.remap[key] || key];
+ if (func) {
+ pairs.push([key, wrap(key, func, _)]);
+ }
+ });
+ });
+
+ // Convert remaining methods.
+ each(keys(_), function(key) {
+ var func = _[key];
+ if (typeof func == 'function') {
+ var length = pairs.length;
+ while (length--) {
+ if (pairs[length][0] == key) {
+ return;
+ }
+ }
+ func.convert = createConverter(key, func);
+ pairs.push([key, func]);
+ }
+ });
+
+ // Assign to `_` leaving `_.prototype` unchanged to allow chaining.
+ each(pairs, function(pair) {
+ _[pair[0]] = pair[1];
+ });
+
+ _.convert = convertLib;
+ _.placeholder = _;
+
+ // Assign aliases.
+ each(keys(_), function(key) {
+ each(_mapping.realToAlias[key] || [], function(alias) {
+ _[alias] = _[key];
+ });
+ });
+
+ return _;
+ }
+
+ var _baseConvert = baseConvert;
+
+ var _ = lodash_min.runInContext();
+ var fp = _baseConvert(_, _);
+ var fp_1 = fp.find;
+ var fp_2 = fp.isUndefined;
+ var fp_3 = fp.split;
+ var fp_4 = fp.max;
+ var fp_5 = fp.last;
+ var fp_6 = fp.union;
+ var fp_7 = fp.reduce;
+ var fp_8 = fp.isObject;
+ var fp_9 = fp.cloneDeep;
+ var fp_10 = fp.some;
+ var fp_11 = fp.isArray;
+ var fp_12 = fp.map;
+ var fp_13 = fp.filter;
+ var fp_14 = fp.keys;
+ var fp_15 = fp.isFunction;
+ var fp_16 = fp.isEmpty;
+ var fp_17 = fp.countBy;
+ var fp_18 = fp.join;
+ var fp_19 = fp.includes;
+ var fp_20 = fp.flatten;
+ var fp_21 = fp.constant;
+ var fp_22 = fp.first;
+ var fp_23 = fp.intersection;
+ var fp_24 = fp.take;
+ var fp_25 = fp.has;
+ var fp_26 = fp.mapValues;
+ var fp_27 = fp.isString;
+ var fp_28 = fp.isBoolean;
+ var fp_29 = fp.isNull;
+ var fp_30 = fp.isNumber;
+ var fp_31 = fp.isObjectLike;
+ var fp_32 = fp.isDate;
+ var fp_33 = fp.clone;
+ var fp_34 = fp.values;
+ var fp_35 = fp.keyBy;
+ var fp_36 = fp.isNaN;
+ var fp_37 = fp.isInteger;
+ var fp_38 = fp.toNumber;
+
+ // Found this seed-based random generator somewhere
+ // Based on The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu)
+
+ var seed = 1;
+
+ /**
+ * return a random number based on a seed
+ * @param seed
+ * @returns {number}
+ */
+ function getNextValue() {
+ seed = (seed * 9301 + 49297) % 233280;
+ return seed/(233280.0);
+ }
+
+ function setSeed(_seed_) {
+ seed = _seed_;
+ }
+
+ var randomFromSeed = {
+ nextValue: getNextValue,
+ seed: setSeed
+ };
+
+ var ORIGINAL = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-';
+ var alphabet;
+ var previousSeed;
+
+ var shuffled;
+
+ function reset() {
+ shuffled = false;
+ }
+
+ function setCharacters(_alphabet_) {
+ if (!_alphabet_) {
+ if (alphabet !== ORIGINAL) {
+ alphabet = ORIGINAL;
+ reset();
+ }
+ return;
+ }
+
+ if (_alphabet_ === alphabet) {
+ return;
+ }
+
+ if (_alphabet_.length !== ORIGINAL.length) {
+ throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. You submitted ' + _alphabet_.length + ' characters: ' + _alphabet_);
+ }
+
+ var unique = _alphabet_.split('').filter(function(item, ind, arr){
+ return ind !== arr.lastIndexOf(item);
+ });
+
+ if (unique.length) {
+ throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. These characters were not unique: ' + unique.join(', '));
+ }
+
+ alphabet = _alphabet_;
+ reset();
+ }
+
+ function characters(_alphabet_) {
+ setCharacters(_alphabet_);
+ return alphabet;
+ }
+
+ function setSeed$1(seed) {
+ randomFromSeed.seed(seed);
+ if (previousSeed !== seed) {
+ reset();
+ previousSeed = seed;
+ }
+ }
+
+ function shuffle() {
+ if (!alphabet) {
+ setCharacters(ORIGINAL);
+ }
+
+ var sourceArray = alphabet.split('');
+ var targetArray = [];
+ var r = randomFromSeed.nextValue();
+ var characterIndex;
+
+ while (sourceArray.length > 0) {
+ r = randomFromSeed.nextValue();
+ characterIndex = Math.floor(r * sourceArray.length);
+ targetArray.push(sourceArray.splice(characterIndex, 1)[0]);
+ }
+ return targetArray.join('');
+ }
+
+ function getShuffled() {
+ if (shuffled) {
+ return shuffled;
+ }
+ shuffled = shuffle();
+ return shuffled;
+ }
+
+ /**
+ * lookup shuffled letter
+ * @param index
+ * @returns {string}
+ */
+ function lookup(index) {
+ var alphabetShuffled = getShuffled();
+ return alphabetShuffled[index];
+ }
+
+ function get () {
+ return alphabet || ORIGINAL;
+ }
+
+ var alphabet_1 = {
+ get: get,
+ characters: characters,
+ seed: setSeed$1,
+ lookup: lookup,
+ shuffled: getShuffled
+ };
+
+ var crypto = typeof window === 'object' && (window.crypto || window.msCrypto); // IE 11 uses window.msCrypto
+
+ var randomByte;
+
+ if (!crypto || !crypto.getRandomValues) {
+ randomByte = function(size) {
+ var bytes = [];
+ for (var i = 0; i < size; i++) {
+ bytes.push(Math.floor(Math.random() * 256));
+ }
+ return bytes;
+ };
+ } else {
+ randomByte = function(size) {
+ return crypto.getRandomValues(new Uint8Array(size));
+ };
+ }
+
+ var randomByteBrowser = randomByte;
+
+ /**
+ * Secure random string generator with custom alphabet.
+ *
+ * Alphabet must contain 256 symbols or less. Otherwise, the generator
+ * will not be secure.
+ *
+ * @param {generator} random The random bytes generator.
+ * @param {string} alphabet Symbols to be used in new random string.
+ * @param {size} size The number of symbols in new random string.
+ *
+ * @return {string} Random string.
+ *
+ * @example
+ * const format = require('nanoid/format')
+ *
+ * function random (size) {
+ * const result = []
+ * for (let i = 0; i < size; i++) {
+ * result.push(randomByte())
+ * }
+ * return result
+ * }
+ *
+ * format(random, "abcdef", 5) //=> "fbaef"
+ *
+ * @name format
+ * @function
+ */
+ var format = function (random, alphabet, size) {
+ var mask = (2 << Math.log(alphabet.length - 1) / Math.LN2) - 1;
+ var step = Math.ceil(1.6 * mask * size / alphabet.length);
+ size = +size;
+
+ var id = '';
+ while (true) {
+ var bytes = random(step);
+ for (var i = 0; i < step; i++) {
+ var byte = bytes[i] & mask;
+ if (alphabet[byte]) {
+ id += alphabet[byte];
+ if (id.length === size) return id
+ }
+ }
+ }
+ };
+
+ function generate(number) {
+ var loopCounter = 0;
+ var done;
+
+ var str = '';
+
+ while (!done) {
+ str = str + format(randomByteBrowser, alphabet_1.get(), 1);
+ done = number < (Math.pow(16, loopCounter + 1 ) );
+ loopCounter++;
+ }
+ return str;
+ }
+
+ var generate_1 = generate;
+
+ // Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness.
+ // This number should be updated every year or so to keep the generated id short.
+ // To regenerate `new Date() - 0` and bump the version. Always bump the version!
+ var REDUCE_TIME = 1567752802062;
+
+ // don't change unless we change the algos or REDUCE_TIME
+ // must be an integer and less than 16
+ var version = 7;
+
+ // Counter is used when shortid is called multiple times in one second.
+ var counter;
+
+ // Remember the last time shortid was called in case counter is needed.
+ var previousSeconds;
+
+ /**
+ * Generate unique id
+ * Returns string id
+ */
+ function build(clusterWorkerId) {
+ var str = '';
+
+ var seconds = Math.floor((Date.now() - REDUCE_TIME) * 0.001);
+
+ if (seconds === previousSeconds) {
+ counter++;
+ } else {
+ counter = 0;
+ previousSeconds = seconds;
+ }
+
+ str = str + generate_1(version);
+ str = str + generate_1(clusterWorkerId);
+ if (counter > 0) {
+ str = str + generate_1(counter);
+ }
+ str = str + generate_1(seconds);
+ return str;
+ }
+
+ var build_1 = build;
+
+ function isShortId(id) {
+ if (!id || typeof id !== 'string' || id.length < 6 ) {
+ return false;
+ }
+
+ var nonAlphabetic = new RegExp('[^' +
+ alphabet_1.get().replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&') +
+ ']');
+ return !nonAlphabetic.test(id);
+ }
+
+ var isValid = isShortId;
+
+ var lib = createCommonjsModule(function (module) {
+
+
+
+
+
+ // if you are using cluster or multiple servers use this to make each instance
+ // has a unique value for worker
+ // Note: I don't know if this is automatically set when using third
+ // party cluster solutions such as pm2.
+ var clusterWorkerId = 0;
+
+ /**
+ * Set the seed.
+ * Highly recommended if you don't want people to try to figure out your id schema.
+ * exposed as shortid.seed(int)
+ * @param seed Integer value to seed the random alphabet. ALWAYS USE THE SAME SEED or you might get overlaps.
+ */
+ function seed(seedValue) {
+ alphabet_1.seed(seedValue);
+ return module.exports;
+ }
+
+ /**
+ * Set the cluster worker or machine id
+ * exposed as shortid.worker(int)
+ * @param workerId worker must be positive integer. Number less than 16 is recommended.
+ * returns shortid module so it can be chained.
+ */
+ function worker(workerId) {
+ clusterWorkerId = workerId;
+ return module.exports;
+ }
+
+ /**
+ *
+ * sets new characters to use in the alphabet
+ * returns the shuffled alphabet
+ */
+ function characters(newCharacters) {
+ if (newCharacters !== undefined) {
+ alphabet_1.characters(newCharacters);
+ }
+
+ return alphabet_1.shuffled();
+ }
+
+ /**
+ * Generate unique id
+ * Returns string id
+ */
+ function generate() {
+ return build_1(clusterWorkerId);
+ }
+
+ // Export all other functions as properties of the generate function
+ module.exports = generate;
+ module.exports.generate = generate;
+ module.exports.seed = seed;
+ module.exports.worker = worker;
+ module.exports.characters = characters;
+ module.exports.isValid = isValid;
+ });
+ var lib_1 = lib.generate;
+ var lib_2 = lib.seed;
+ var lib_3 = lib.worker;
+ var lib_4 = lib.characters;
+ var lib_5 = lib.isValid;
+
+ var shortid = lib;
+ var shortid_1 = shortid.generate;
+
+ var lodash = createCommonjsModule(function (module, exports) {
+ (function() {
- var lodash = createCommonjsModule(function(module, exports) {
- ;(function() {
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
- var undefined$1
+ var undefined$1;
/** Used as the semantic version number. */
- var VERSION = "4.17.15"
+ var VERSION = '4.17.15';
/** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200
+ var LARGE_ARRAY_SIZE = 200;
/** Error message constants. */
- var CORE_ERROR_TEXT =
- "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",
- FUNC_ERROR_TEXT = "Expected a function"
+ var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
+ FUNC_ERROR_TEXT = 'Expected a function';
/** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED = "__lodash_hash_undefined__"
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used as the maximum memoize cache size. */
- var MAX_MEMOIZE_SIZE = 500
+ var MAX_MEMOIZE_SIZE = 500;
/** Used as the internal argument placeholder. */
- var PLACEHOLDER = "__lodash_placeholder__"
+ var PLACEHOLDER = '__lodash_placeholder__';
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1,
- CLONE_FLAT_FLAG = 2,
- CLONE_SYMBOLS_FLAG = 4
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
- COMPARE_UNORDERED_FLAG = 2
+ COMPARE_UNORDERED_FLAG = 2;
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG = 1,
- WRAP_BIND_KEY_FLAG = 2,
- WRAP_CURRY_BOUND_FLAG = 4,
- WRAP_CURRY_FLAG = 8,
- WRAP_CURRY_RIGHT_FLAG = 16,
- WRAP_PARTIAL_FLAG = 32,
- WRAP_PARTIAL_RIGHT_FLAG = 64,
- WRAP_ARY_FLAG = 128,
- WRAP_REARG_FLAG = 256,
- WRAP_FLIP_FLAG = 512
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_BOUND_FLAG = 4,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256,
+ WRAP_FLIP_FLAG = 512;
/** Used as default options for `_.truncate`. */
var DEFAULT_TRUNC_LENGTH = 30,
- DEFAULT_TRUNC_OMISSION = "..."
+ DEFAULT_TRUNC_OMISSION = '...';
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800,
- HOT_SPAN = 16
+ HOT_SPAN = 16;
/** Used to indicate the type of lazy iteratees. */
var LAZY_FILTER_FLAG = 1,
- LAZY_MAP_FLAG = 2,
- LAZY_WHILE_FLAG = 3
+ LAZY_MAP_FLAG = 2,
+ LAZY_WHILE_FLAG = 3;
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
- MAX_SAFE_INTEGER = 9007199254740991,
- MAX_INTEGER = 1.7976931348623157e308,
- NAN = 0 / 0
+ MAX_SAFE_INTEGER = 9007199254740991,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
/** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295,
- MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
- HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
/** Used to associate wrap methods with their bit flags. */
var wrapFlags = [
- ["ary", WRAP_ARY_FLAG],
- ["bind", WRAP_BIND_FLAG],
- ["bindKey", WRAP_BIND_KEY_FLAG],
- ["curry", WRAP_CURRY_FLAG],
- ["curryRight", WRAP_CURRY_RIGHT_FLAG],
- ["flip", WRAP_FLIP_FLAG],
- ["partial", WRAP_PARTIAL_FLAG],
- ["partialRight", WRAP_PARTIAL_RIGHT_FLAG],
- ["rearg", WRAP_REARG_FLAG],
- ]
+ ['ary', WRAP_ARY_FLAG],
+ ['bind', WRAP_BIND_FLAG],
+ ['bindKey', WRAP_BIND_KEY_FLAG],
+ ['curry', WRAP_CURRY_FLAG],
+ ['curryRight', WRAP_CURRY_RIGHT_FLAG],
+ ['flip', WRAP_FLIP_FLAG],
+ ['partial', WRAP_PARTIAL_FLAG],
+ ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
+ ['rearg', WRAP_REARG_FLAG]
+ ];
/** `Object#toString` result references. */
- var argsTag = "[object Arguments]",
- arrayTag = "[object Array]",
- asyncTag = "[object AsyncFunction]",
- boolTag = "[object Boolean]",
- dateTag = "[object Date]",
- domExcTag = "[object DOMException]",
- errorTag = "[object Error]",
- funcTag = "[object Function]",
- genTag = "[object GeneratorFunction]",
- mapTag = "[object Map]",
- numberTag = "[object Number]",
- nullTag = "[object Null]",
- objectTag = "[object Object]",
- promiseTag = "[object Promise]",
- proxyTag = "[object Proxy]",
- regexpTag = "[object RegExp]",
- setTag = "[object Set]",
- stringTag = "[object String]",
- symbolTag = "[object Symbol]",
- undefinedTag = "[object Undefined]",
- weakMapTag = "[object WeakMap]",
- weakSetTag = "[object WeakSet]"
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ asyncTag = '[object AsyncFunction]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ domExcTag = '[object DOMException]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ nullTag = '[object Null]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ proxyTag = '[object Proxy]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ undefinedTag = '[object Undefined]',
+ weakMapTag = '[object WeakMap]',
+ weakSetTag = '[object WeakSet]';
- var arrayBufferTag = "[object ArrayBuffer]",
- dataViewTag = "[object DataView]",
- float32Tag = "[object Float32Array]",
- float64Tag = "[object Float64Array]",
- int8Tag = "[object Int8Array]",
- int16Tag = "[object Int16Array]",
- int32Tag = "[object Int32Array]",
- uint8Tag = "[object Uint8Array]",
- uint8ClampedTag = "[object Uint8ClampedArray]",
- uint16Tag = "[object Uint16Array]",
- uint32Tag = "[object Uint32Array]"
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
/** Used to match empty string literals in compiled template source. */
var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
/** Used to match HTML entities and HTML characters. */
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
- reUnescapedHtml = /[&<>"']/g,
- reHasEscapedHtml = RegExp(reEscapedHtml.source),
- reHasUnescapedHtml = RegExp(reUnescapedHtml.source)
+ reUnescapedHtml = /[&<>"']/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source),
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
/** Used to match template delimiters. */
var reEscape = /<%-([\s\S]+?)%>/g,
- reEvaluate = /<%([\s\S]+?)%>/g,
- reInterpolate = /<%=([\s\S]+?)%>/g
+ reEvaluate = /<%([\s\S]+?)%>/g,
+ reInterpolate = /<%=([\s\S]+?)%>/g;
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
- reIsPlainProp = /^\w*$/,
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
- reHasRegExpChar = RegExp(reRegExpChar.source)
+ reHasRegExpChar = RegExp(reRegExpChar.source);
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g,
- reTrimStart = /^\s+/,
- reTrimEnd = /\s+$/
+ reTrimStart = /^\s+/,
+ reTrimEnd = /\s+$/;
/** Used to match wrap detail comments. */
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
- reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
- reSplitDetails = /,? & /
+ reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
+ reSplitDetails = /,? & /;
/** Used to match words composed of alphanumeric characters. */
- var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
/** Used to match backslashes in property paths. */
- var reEscapeChar = /\\(\\)?/g
+ var reEscapeChar = /\\(\\)?/g;
/**
* Used to match
* [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
*/
- var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
/** Used to match `RegExp` flags from their coerced string values. */
- var reFlags = /\w*$/
+ var reFlags = /\w*$/;
/** Used to detect bad signed hexadecimal string values. */
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
/** Used to detect binary string values. */
- var reIsBinary = /^0b[01]+$/i
+ var reIsBinary = /^0b[01]+$/i;
/** Used to detect host constructors (Safari). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used to detect octal string values. */
- var reIsOctal = /^0o[0-7]+$/i
+ var reIsOctal = /^0o[0-7]+$/i;
/** Used to detect unsigned integer values. */
- var reIsUint = /^(?:0|[1-9]\d*)$/
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
/** Used to match Latin Unicode letters (excluding mathematical operators). */
- var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
/** Used to ensure capturing order of template delimiters. */
- var reNoMatch = /($^)/
+ var reNoMatch = /($^)/;
/** Used to match unescaped characters in compiled string literals. */
- var reUnescapedString = /['\n\r\u2028\u2029\\]/g
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
/** Used to compose unicode character classes. */
- var rsAstralRange = "\\ud800-\\udfff",
- rsComboMarksRange = "\\u0300-\\u036f",
- reComboHalfMarksRange = "\\ufe20-\\ufe2f",
- rsComboSymbolsRange = "\\u20d0-\\u20ff",
- rsComboRange =
- rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
- rsDingbatRange = "\\u2700-\\u27bf",
- rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff",
- rsMathOpRange = "\\xac\\xb1\\xd7\\xf7",
- rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",
- rsPunctuationRange = "\\u2000-\\u206f",
- rsSpaceRange =
- " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",
- rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde",
- rsVarRange = "\\ufe0e\\ufe0f",
- rsBreakRange =
- rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange
+ var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsDingbatRange = '\\u2700-\\u27bf',
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+ rsPunctuationRange = '\\u2000-\\u206f',
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+ rsVarRange = '\\ufe0e\\ufe0f',
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
/** Used to compose unicode capture groups. */
var rsApos = "['\u2019]",
- rsAstral = "[" + rsAstralRange + "]",
- rsBreak = "[" + rsBreakRange + "]",
- rsCombo = "[" + rsComboRange + "]",
- rsDigits = "\\d+",
- rsDingbat = "[" + rsDingbatRange + "]",
- rsLower = "[" + rsLowerRange + "]",
- rsMisc =
- "[^" +
- rsAstralRange +
- rsBreakRange +
- rsDigits +
- rsDingbatRange +
- rsLowerRange +
- rsUpperRange +
- "]",
- rsFitz = "\\ud83c[\\udffb-\\udfff]",
- rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")",
- rsNonAstral = "[^" + rsAstralRange + "]",
- rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}",
- rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]",
- rsUpper = "[" + rsUpperRange + "]",
- rsZWJ = "\\u200d"
+ rsAstral = '[' + rsAstralRange + ']',
+ rsBreak = '[' + rsBreakRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsDigits = '\\d+',
+ rsDingbat = '[' + rsDingbatRange + ']',
+ rsLower = '[' + rsLowerRange + ']',
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsUpper = '[' + rsUpperRange + ']',
+ rsZWJ = '\\u200d';
/** Used to compose unicode regexes. */
- var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")",
- rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")",
- rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?",
- rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?",
- reOptMod = rsModifier + "?",
- rsOptVar = "[" + rsVarRange + "]?",
- rsOptJoin =
- "(?:" +
- rsZWJ +
- "(?:" +
- [rsNonAstral, rsRegional, rsSurrPair].join("|") +
- ")" +
- rsOptVar +
- reOptMod +
- ")*",
- rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",
- rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",
- rsSeq = rsOptVar + reOptMod + rsOptJoin,
- rsEmoji =
- "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq,
- rsSymbol =
- "(?:" +
- [
- rsNonAstral + rsCombo + "?",
- rsCombo,
- rsRegional,
- rsSurrPair,
- rsAstral,
- ].join("|") +
- ")"
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
+ rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+ rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+ reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
/** Used to match apostrophes. */
- var reApos = RegExp(rsApos, "g")
+ var reApos = RegExp(rsApos, 'g');
/**
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
*/
- var reComboMark = RegExp(rsCombo, "g")
+ var reComboMark = RegExp(rsCombo, 'g');
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
- var reUnicode = RegExp(
- rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq,
- "g"
- )
+ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
/** Used to match complex or compound words. */
- var reUnicodeWord = RegExp(
- [
- rsUpper +
- "?" +
- rsLower +
- "+" +
- rsOptContrLower +
- "(?=" +
- [rsBreak, rsUpper, "$"].join("|") +
- ")",
- rsMiscUpper +
- "+" +
- rsOptContrUpper +
- "(?=" +
- [rsBreak, rsUpper + rsMiscLower, "$"].join("|") +
- ")",
- rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
- rsUpper + "+" + rsOptContrUpper,
- rsOrdUpper,
- rsOrdLower,
- rsDigits,
- rsEmoji,
- ].join("|"),
- "g"
- )
+ var reUnicodeWord = RegExp([
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
+ rsUpper + '+' + rsOptContrUpper,
+ rsOrdUpper,
+ rsOrdLower,
+ rsDigits,
+ rsEmoji
+ ].join('|'), 'g');
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
- var reHasUnicode = RegExp(
- "[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]"
- )
+ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
/** Used to detect strings that need a more robust regexp to match words. */
- var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
/** Used to assign default `context` object properties. */
var contextProps = [
- "Array",
- "Buffer",
- "DataView",
- "Date",
- "Error",
- "Float32Array",
- "Float64Array",
- "Function",
- "Int8Array",
- "Int16Array",
- "Int32Array",
- "Map",
- "Math",
- "Object",
- "Promise",
- "RegExp",
- "Set",
- "String",
- "Symbol",
- "TypeError",
- "Uint8Array",
- "Uint8ClampedArray",
- "Uint16Array",
- "Uint32Array",
- "WeakMap",
- "_",
- "clearTimeout",
- "isFinite",
- "parseInt",
- "setTimeout",
- ]
+ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
+ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
+ 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
+ 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
+ '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
+ ];
/** Used to make template sourceURLs easier to identify. */
- var templateCounter = -1
+ var templateCounter = -1;
/** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {}
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[
- int8Tag
- ] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[
- uint8Tag
- ] = typedArrayTags[uint8ClampedTag] = typedArrayTags[
- uint16Tag
- ] = typedArrayTags[uint32Tag] = true
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[
- arrayBufferTag
- ] = typedArrayTags[boolTag] = typedArrayTags[
- dataViewTag
- ] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[
- funcTag
- ] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[
- objectTag
- ] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[
- stringTag
- ] = typedArrayTags[weakMapTag] = false
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
+ typedArrayTags[weakMapTag] = false;
/** Used to identify `toStringTag` values supported by `_.clone`. */
- var cloneableTags = {}
- cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[
- arrayBufferTag
- ] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[
- dateTag
- ] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[
- int8Tag
- ] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[
- mapTag
- ] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[
- regexpTag
- ] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[
- symbolTag
- ] = cloneableTags[uint8Tag] = cloneableTags[
- uint8ClampedTag
- ] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true
- cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[
- weakMapTag
- ] = false
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
/** Used to map Latin Unicode letters to basic Latin letters. */
var deburredLetters = {
// Latin-1 Supplement block.
- À: "A",
- Á: "A",
- Â: "A",
- Ã: "A",
- Ä: "A",
- Å: "A",
- à: "a",
- á: "a",
- â: "a",
- ã: "a",
- ä: "a",
- å: "a",
- Ç: "C",
- ç: "c",
- Ð: "D",
- ð: "d",
- È: "E",
- É: "E",
- Ê: "E",
- Ë: "E",
- è: "e",
- é: "e",
- ê: "e",
- ë: "e",
- Ì: "I",
- Í: "I",
- Î: "I",
- Ï: "I",
- ì: "i",
- í: "i",
- î: "i",
- ï: "i",
- Ñ: "N",
- ñ: "n",
- Ò: "O",
- Ó: "O",
- Ô: "O",
- Õ: "O",
- Ö: "O",
- Ø: "O",
- ò: "o",
- ó: "o",
- ô: "o",
- õ: "o",
- ö: "o",
- ø: "o",
- Ù: "U",
- Ú: "U",
- Û: "U",
- Ü: "U",
- ù: "u",
- ú: "u",
- û: "u",
- ü: "u",
- Ý: "Y",
- ý: "y",
- ÿ: "y",
- Æ: "Ae",
- æ: "ae",
- Þ: "Th",
- þ: "th",
- ß: "ss",
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss',
// Latin Extended-A block.
- Ā: "A",
- Ă: "A",
- Ą: "A",
- ā: "a",
- ă: "a",
- ą: "a",
- Ć: "C",
- Ĉ: "C",
- Ċ: "C",
- Č: "C",
- ć: "c",
- ĉ: "c",
- ċ: "c",
- č: "c",
- Ď: "D",
- Đ: "D",
- ď: "d",
- đ: "d",
- Ē: "E",
- Ĕ: "E",
- Ė: "E",
- Ę: "E",
- Ě: "E",
- ē: "e",
- ĕ: "e",
- ė: "e",
- ę: "e",
- ě: "e",
- Ĝ: "G",
- Ğ: "G",
- Ġ: "G",
- Ģ: "G",
- ĝ: "g",
- ğ: "g",
- ġ: "g",
- ģ: "g",
- Ĥ: "H",
- Ħ: "H",
- ĥ: "h",
- ħ: "h",
- Ĩ: "I",
- Ī: "I",
- Ĭ: "I",
- Į: "I",
- İ: "I",
- ĩ: "i",
- ī: "i",
- ĭ: "i",
- į: "i",
- ı: "i",
- Ĵ: "J",
- ĵ: "j",
- Ķ: "K",
- ķ: "k",
- ĸ: "k",
- Ĺ: "L",
- Ļ: "L",
- Ľ: "L",
- Ŀ: "L",
- Ł: "L",
- ĺ: "l",
- ļ: "l",
- ľ: "l",
- ŀ: "l",
- ł: "l",
- Ń: "N",
- Ņ: "N",
- Ň: "N",
- Ŋ: "N",
- ń: "n",
- ņ: "n",
- ň: "n",
- ŋ: "n",
- Ō: "O",
- Ŏ: "O",
- Ő: "O",
- ō: "o",
- ŏ: "o",
- ő: "o",
- Ŕ: "R",
- Ŗ: "R",
- Ř: "R",
- ŕ: "r",
- ŗ: "r",
- ř: "r",
- Ś: "S",
- Ŝ: "S",
- Ş: "S",
- Š: "S",
- ś: "s",
- ŝ: "s",
- ş: "s",
- š: "s",
- Ţ: "T",
- Ť: "T",
- Ŧ: "T",
- ţ: "t",
- ť: "t",
- ŧ: "t",
- Ũ: "U",
- Ū: "U",
- Ŭ: "U",
- Ů: "U",
- Ű: "U",
- Ų: "U",
- ũ: "u",
- ū: "u",
- ŭ: "u",
- ů: "u",
- ű: "u",
- ų: "u",
- Ŵ: "W",
- ŵ: "w",
- Ŷ: "Y",
- ŷ: "y",
- Ÿ: "Y",
- Ź: "Z",
- Ż: "Z",
- Ž: "Z",
- ź: "z",
- ż: "z",
- ž: "z",
- IJ: "IJ",
- ij: "ij",
- Œ: "Oe",
- œ: "oe",
- ʼn: "'n",
- ſ: "s",
- }
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
+ '\u0134': 'J', '\u0135': 'j',
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
+ '\u0174': 'W', '\u0175': 'w',
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
+ '\u0132': 'IJ', '\u0133': 'ij',
+ '\u0152': 'Oe', '\u0153': 'oe',
+ '\u0149': "'n", '\u017f': 's'
+ };
/** Used to map characters to HTML entities. */
var htmlEscapes = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'",
- }
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": '''
+ };
/** Used to map HTML entities to characters. */
var htmlUnescapes = {
- "&": "&",
- "<": "<",
- ">": ">",
- """: '"',
- "'": "'",
- }
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ ''': "'"
+ };
/** Used to escape characters for inclusion in compiled string literals. */
var stringEscapes = {
- "\\": "\\",
+ '\\': '\\',
"'": "'",
- "\n": "n",
- "\r": "r",
- "\u2028": "u2028",
- "\u2029": "u2029",
- }
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
/** Built-in method references without a dependency on `root`. */
var freeParseFloat = parseFloat,
- freeParseInt = parseInt
+ freeParseInt = parseInt;
/** Detect free variable `global` from Node.js. */
- var freeGlobal =
- typeof commonjsGlobal == "object" &&
- commonjsGlobal &&
- commonjsGlobal.Object === Object &&
- commonjsGlobal
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
/** Detect free variable `self`. */
- var freeSelf =
- typeof self == "object" && self && self.Object === Object && self
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function("return this")()
+ var root = freeGlobal || freeSelf || Function('return this')();
/** Detect free variable `exports`. */
- var freeExports = exports && !exports.nodeType && exports
+ var freeExports = exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
- var freeModule =
- freeExports &&
- "object" == "object" &&
- module &&
- !module.nodeType &&
- module
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = freeModule && freeModule.exports === freeExports
+ var moduleExports = freeModule && freeModule.exports === freeExports;
/** Detect free variable `process` from Node.js. */
- var freeProcess = moduleExports && freeGlobal.process
+ var freeProcess = moduleExports && freeGlobal.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
try {
// Use `util.types` for Node.js 10+.
- var types =
- freeModule && freeModule.require && freeModule.require("util").types
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
if (types) {
- return types
+ return types;
}
// Legacy `process.binding('util')` for Node.js < 10.
- return (
- freeProcess && freeProcess.binding && freeProcess.binding("util")
- )
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
- })()
+ }());
/* Node.js helper references. */
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
- nodeIsDate = nodeUtil && nodeUtil.isDate,
- nodeIsMap = nodeUtil && nodeUtil.isMap,
- nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
- nodeIsSet = nodeUtil && nodeUtil.isSet,
- nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray
+ nodeIsDate = nodeUtil && nodeUtil.isDate,
+ nodeIsMap = nodeUtil && nodeUtil.isMap,
+ nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
+ nodeIsSet = nodeUtil && nodeUtil.isSet,
+ nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
/*--------------------------------------------------------------------------*/
@@ -11037,16 +2487,12 @@ var app = (function() {
*/
function apply(func, thisArg, args) {
switch (args.length) {
- case 0:
- return func.call(thisArg)
- case 1:
- return func.call(thisArg, args[0])
- case 2:
- return func.call(thisArg, args[0], args[1])
- case 3:
- return func.call(thisArg, args[0], args[1], args[2])
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
}
- return func.apply(thisArg, args)
+ return func.apply(thisArg, args);
}
/**
@@ -11061,13 +2507,13 @@ var app = (function() {
*/
function arrayAggregator(array, setter, iteratee, accumulator) {
var index = -1,
- length = array == null ? 0 : array.length
+ length = array == null ? 0 : array.length;
while (++index < length) {
- var value = array[index]
- setter(accumulator, value, iteratee(value), array)
+ var value = array[index];
+ setter(accumulator, value, iteratee(value), array);
}
- return accumulator
+ return accumulator;
}
/**
@@ -11081,14 +2527,14 @@ var app = (function() {
*/
function arrayEach(array, iteratee) {
var index = -1,
- length = array == null ? 0 : array.length
+ length = array == null ? 0 : array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
- break
+ break;
}
}
- return array
+ return array;
}
/**
@@ -11101,14 +2547,14 @@ var app = (function() {
* @returns {Array} Returns `array`.
*/
function arrayEachRight(array, iteratee) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
while (length--) {
if (iteratee(array[length], length, array) === false) {
- break
+ break;
}
}
- return array
+ return array;
}
/**
@@ -11123,14 +2569,14 @@ var app = (function() {
*/
function arrayEvery(array, predicate) {
var index = -1,
- length = array == null ? 0 : array.length
+ length = array == null ? 0 : array.length;
while (++index < length) {
if (!predicate(array[index], index, array)) {
- return false
+ return false;
}
}
- return true
+ return true;
}
/**
@@ -11144,17 +2590,17 @@ var app = (function() {
*/
function arrayFilter(array, predicate) {
var index = -1,
- length = array == null ? 0 : array.length,
- resIndex = 0,
- result = []
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
while (++index < length) {
- var value = array[index]
+ var value = array[index];
if (predicate(value, index, array)) {
- result[resIndex++] = value
+ result[resIndex++] = value;
}
}
- return result
+ return result;
}
/**
@@ -11167,8 +2613,8 @@ var app = (function() {
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludes(array, value) {
- var length = array == null ? 0 : array.length
- return !!length && baseIndexOf(array, value, 0) > -1
+ var length = array == null ? 0 : array.length;
+ return !!length && baseIndexOf(array, value, 0) > -1;
}
/**
@@ -11182,14 +2628,14 @@ var app = (function() {
*/
function arrayIncludesWith(array, value, comparator) {
var index = -1,
- length = array == null ? 0 : array.length
+ length = array == null ? 0 : array.length;
while (++index < length) {
if (comparator(value, array[index])) {
- return true
+ return true;
}
}
- return false
+ return false;
}
/**
@@ -11203,13 +2649,13 @@ var app = (function() {
*/
function arrayMap(array, iteratee) {
var index = -1,
- length = array == null ? 0 : array.length,
- result = Array(length)
+ length = array == null ? 0 : array.length,
+ result = Array(length);
while (++index < length) {
- result[index] = iteratee(array[index], index, array)
+ result[index] = iteratee(array[index], index, array);
}
- return result
+ return result;
}
/**
@@ -11222,13 +2668,13 @@ var app = (function() {
*/
function arrayPush(array, values) {
var index = -1,
- length = values.length,
- offset = array.length
+ length = values.length,
+ offset = array.length;
while (++index < length) {
- array[offset + index] = values[index]
+ array[offset + index] = values[index];
}
- return array
+ return array;
}
/**
@@ -11245,15 +2691,15 @@ var app = (function() {
*/
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1,
- length = array == null ? 0 : array.length
+ length = array == null ? 0 : array.length;
if (initAccum && length) {
- accumulator = array[++index]
+ accumulator = array[++index];
}
while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array)
+ accumulator = iteratee(accumulator, array[index], index, array);
}
- return accumulator
+ return accumulator;
}
/**
@@ -11269,14 +2715,14 @@ var app = (function() {
* @returns {*} Returns the accumulated value.
*/
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (initAccum && length) {
- accumulator = array[--length]
+ accumulator = array[--length];
}
while (length--) {
- accumulator = iteratee(accumulator, array[length], length, array)
+ accumulator = iteratee(accumulator, array[length], length, array);
}
- return accumulator
+ return accumulator;
}
/**
@@ -11291,14 +2737,14 @@ var app = (function() {
*/
function arraySome(array, predicate) {
var index = -1,
- length = array == null ? 0 : array.length
+ length = array == null ? 0 : array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
- return true
+ return true;
}
}
- return false
+ return false;
}
/**
@@ -11308,7 +2754,7 @@ var app = (function() {
* @param {string} string The string inspect.
* @returns {number} Returns the string size.
*/
- var asciiSize = baseProperty("length")
+ var asciiSize = baseProperty('length');
/**
* Converts an ASCII `string` to an array.
@@ -11318,7 +2764,7 @@ var app = (function() {
* @returns {Array} Returns the converted array.
*/
function asciiToArray(string) {
- return string.split("")
+ return string.split('');
}
/**
@@ -11329,7 +2775,7 @@ var app = (function() {
* @returns {Array} Returns the words of `string`.
*/
function asciiWords(string) {
- return string.match(reAsciiWord) || []
+ return string.match(reAsciiWord) || [];
}
/**
@@ -11344,14 +2790,14 @@ var app = (function() {
* @returns {*} Returns the found element or its key, else `undefined`.
*/
function baseFindKey(collection, predicate, eachFunc) {
- var result
+ var result;
eachFunc(collection, function(value, key, collection) {
if (predicate(value, key, collection)) {
- result = key
- return false
+ result = key;
+ return false;
}
- })
- return result
+ });
+ return result;
}
/**
@@ -11367,14 +2813,14 @@ var app = (function() {
*/
function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length,
- index = fromIndex + (fromRight ? 1 : -1)
+ index = fromIndex + (fromRight ? 1 : -1);
- while (fromRight ? index-- : ++index < length) {
+ while ((fromRight ? index-- : ++index < length)) {
if (predicate(array[index], index, array)) {
- return index
+ return index;
}
}
- return -1
+ return -1;
}
/**
@@ -11389,7 +2835,7 @@ var app = (function() {
function baseIndexOf(array, value, fromIndex) {
return value === value
? strictIndexOf(array, value, fromIndex)
- : baseFindIndex(array, baseIsNaN, fromIndex)
+ : baseFindIndex(array, baseIsNaN, fromIndex);
}
/**
@@ -11404,14 +2850,14 @@ var app = (function() {
*/
function baseIndexOfWith(array, value, fromIndex, comparator) {
var index = fromIndex - 1,
- length = array.length
+ length = array.length;
while (++index < length) {
if (comparator(array[index], value)) {
- return index
+ return index;
}
}
- return -1
+ return -1;
}
/**
@@ -11422,7 +2868,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
*/
function baseIsNaN(value) {
- return value !== value
+ return value !== value;
}
/**
@@ -11435,8 +2881,8 @@ var app = (function() {
* @returns {number} Returns the mean.
*/
function baseMean(array, iteratee) {
- var length = array == null ? 0 : array.length
- return length ? baseSum(array, iteratee) / length : NAN
+ var length = array == null ? 0 : array.length;
+ return length ? (baseSum(array, iteratee) / length) : NAN;
}
/**
@@ -11448,8 +2894,8 @@ var app = (function() {
*/
function baseProperty(key) {
return function(object) {
- return object == null ? undefined$1 : object[key]
- }
+ return object == null ? undefined$1 : object[key];
+ };
}
/**
@@ -11461,8 +2907,8 @@ var app = (function() {
*/
function basePropertyOf(object) {
return function(key) {
- return object == null ? undefined$1 : object[key]
- }
+ return object == null ? undefined$1 : object[key];
+ };
}
/**
@@ -11478,19 +2924,13 @@ var app = (function() {
* @param {Function} eachFunc The function to iterate over `collection`.
* @returns {*} Returns the accumulated value.
*/
- function baseReduce(
- collection,
- iteratee,
- accumulator,
- initAccum,
- eachFunc
- ) {
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
eachFunc(collection, function(value, index, collection) {
accumulator = initAccum
- ? ((initAccum = false), value)
- : iteratee(accumulator, value, index, collection)
- })
- return accumulator
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
}
/**
@@ -11504,13 +2944,13 @@ var app = (function() {
* @returns {Array} Returns `array`.
*/
function baseSortBy(array, comparer) {
- var length = array.length
+ var length = array.length;
- array.sort(comparer)
+ array.sort(comparer);
while (length--) {
- array[length] = array[length].value
+ array[length] = array[length].value;
}
- return array
+ return array;
}
/**
@@ -11524,16 +2964,16 @@ var app = (function() {
*/
function baseSum(array, iteratee) {
var result,
- index = -1,
- length = array.length
+ index = -1,
+ length = array.length;
while (++index < length) {
- var current = iteratee(array[index])
+ var current = iteratee(array[index]);
if (current !== undefined$1) {
- result = result === undefined$1 ? current : result + current
+ result = result === undefined$1 ? current : (result + current);
}
}
- return result
+ return result;
}
/**
@@ -11547,12 +2987,12 @@ var app = (function() {
*/
function baseTimes(n, iteratee) {
var index = -1,
- result = Array(n)
+ result = Array(n);
while (++index < n) {
- result[index] = iteratee(index)
+ result[index] = iteratee(index);
}
- return result
+ return result;
}
/**
@@ -11566,8 +3006,8 @@ var app = (function() {
*/
function baseToPairs(object, props) {
return arrayMap(props, function(key) {
- return [key, object[key]]
- })
+ return [key, object[key]];
+ });
}
/**
@@ -11579,8 +3019,8 @@ var app = (function() {
*/
function baseUnary(func) {
return function(value) {
- return func(value)
- }
+ return func(value);
+ };
}
/**
@@ -11595,8 +3035,8 @@ var app = (function() {
*/
function baseValues(object, props) {
return arrayMap(props, function(key) {
- return object[key]
- })
+ return object[key];
+ });
}
/**
@@ -11608,7 +3048,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function cacheHas(cache, key) {
- return cache.has(key)
+ return cache.has(key);
}
/**
@@ -11622,13 +3062,10 @@ var app = (function() {
*/
function charsStartIndex(strSymbols, chrSymbols) {
var index = -1,
- length = strSymbols.length
+ length = strSymbols.length;
- while (
- ++index < length &&
- baseIndexOf(chrSymbols, strSymbols[index], 0) > -1
- ) {}
- return index
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
}
/**
@@ -11641,10 +3078,10 @@ var app = (function() {
* @returns {number} Returns the index of the last unmatched string symbol.
*/
function charsEndIndex(strSymbols, chrSymbols) {
- var index = strSymbols.length
+ var index = strSymbols.length;
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
- return index
+ return index;
}
/**
@@ -11657,14 +3094,14 @@ var app = (function() {
*/
function countHolders(array, placeholder) {
var length = array.length,
- result = 0
+ result = 0;
while (length--) {
if (array[length] === placeholder) {
- ++result
+ ++result;
}
}
- return result
+ return result;
}
/**
@@ -11675,7 +3112,7 @@ var app = (function() {
* @param {string} letter The matched letter to deburr.
* @returns {string} Returns the deburred letter.
*/
- var deburrLetter = basePropertyOf(deburredLetters)
+ var deburrLetter = basePropertyOf(deburredLetters);
/**
* Used by `_.escape` to convert characters to HTML entities.
@@ -11684,7 +3121,7 @@ var app = (function() {
* @param {string} chr The matched character to escape.
* @returns {string} Returns the escaped character.
*/
- var escapeHtmlChar = basePropertyOf(htmlEscapes)
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
/**
* Used by `_.template` to escape characters for inclusion in compiled string literals.
@@ -11694,7 +3131,7 @@ var app = (function() {
* @returns {string} Returns the escaped character.
*/
function escapeStringChar(chr) {
- return "\\" + stringEscapes[chr]
+ return '\\' + stringEscapes[chr];
}
/**
@@ -11706,7 +3143,7 @@ var app = (function() {
* @returns {*} Returns the property value.
*/
function getValue(object, key) {
- return object == null ? undefined$1 : object[key]
+ return object == null ? undefined$1 : object[key];
}
/**
@@ -11717,7 +3154,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
*/
function hasUnicode(string) {
- return reHasUnicode.test(string)
+ return reHasUnicode.test(string);
}
/**
@@ -11728,7 +3165,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if a word is found, else `false`.
*/
function hasUnicodeWord(string) {
- return reHasUnicodeWord.test(string)
+ return reHasUnicodeWord.test(string);
}
/**
@@ -11740,12 +3177,12 @@ var app = (function() {
*/
function iteratorToArray(iterator) {
var data,
- result = []
+ result = [];
while (!(data = iterator.next()).done) {
- result.push(data.value)
+ result.push(data.value);
}
- return result
+ return result;
}
/**
@@ -11757,12 +3194,12 @@ var app = (function() {
*/
function mapToArray(map) {
var index = -1,
- result = Array(map.size)
+ result = Array(map.size);
map.forEach(function(value, key) {
- result[++index] = [key, value]
- })
- return result
+ result[++index] = [key, value];
+ });
+ return result;
}
/**
@@ -11775,8 +3212,8 @@ var app = (function() {
*/
function overArg(func, transform) {
return function(arg) {
- return func(transform(arg))
- }
+ return func(transform(arg));
+ };
}
/**
@@ -11790,18 +3227,18 @@ var app = (function() {
*/
function replaceHolders(array, placeholder) {
var index = -1,
- length = array.length,
- resIndex = 0,
- result = []
+ length = array.length,
+ resIndex = 0,
+ result = [];
while (++index < length) {
- var value = array[index]
+ var value = array[index];
if (value === placeholder || value === PLACEHOLDER) {
- array[index] = PLACEHOLDER
- result[resIndex++] = index
+ array[index] = PLACEHOLDER;
+ result[resIndex++] = index;
}
}
- return result
+ return result;
}
/**
@@ -11813,12 +3250,12 @@ var app = (function() {
*/
function setToArray(set) {
var index = -1,
- result = Array(set.size)
+ result = Array(set.size);
set.forEach(function(value) {
- result[++index] = value
- })
- return result
+ result[++index] = value;
+ });
+ return result;
}
/**
@@ -11830,12 +3267,12 @@ var app = (function() {
*/
function setToPairs(set) {
var index = -1,
- result = Array(set.size)
+ result = Array(set.size);
set.forEach(function(value) {
- result[++index] = [value, value]
- })
- return result
+ result[++index] = [value, value];
+ });
+ return result;
}
/**
@@ -11850,14 +3287,14 @@ var app = (function() {
*/
function strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1,
- length = array.length
+ length = array.length;
while (++index < length) {
if (array[index] === value) {
- return index
+ return index;
}
}
- return -1
+ return -1;
}
/**
@@ -11871,13 +3308,13 @@ var app = (function() {
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function strictLastIndexOf(array, value, fromIndex) {
- var index = fromIndex + 1
+ var index = fromIndex + 1;
while (index--) {
if (array[index] === value) {
- return index
+ return index;
}
}
- return index
+ return index;
}
/**
@@ -11888,7 +3325,9 @@ var app = (function() {
* @returns {number} Returns the string size.
*/
function stringSize(string) {
- return hasUnicode(string) ? unicodeSize(string) : asciiSize(string)
+ return hasUnicode(string)
+ ? unicodeSize(string)
+ : asciiSize(string);
}
/**
@@ -11901,7 +3340,7 @@ var app = (function() {
function stringToArray(string) {
return hasUnicode(string)
? unicodeToArray(string)
- : asciiToArray(string)
+ : asciiToArray(string);
}
/**
@@ -11911,7 +3350,7 @@ var app = (function() {
* @param {string} chr The matched character to unescape.
* @returns {string} Returns the unescaped character.
*/
- var unescapeHtmlChar = basePropertyOf(htmlUnescapes)
+ var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
/**
* Gets the size of a Unicode `string`.
@@ -11921,11 +3360,11 @@ var app = (function() {
* @returns {number} Returns the string size.
*/
function unicodeSize(string) {
- var result = (reUnicode.lastIndex = 0)
+ var result = reUnicode.lastIndex = 0;
while (reUnicode.test(string)) {
- ++result
+ ++result;
}
- return result
+ return result;
}
/**
@@ -11936,7 +3375,7 @@ var app = (function() {
* @returns {Array} Returns the converted array.
*/
function unicodeToArray(string) {
- return string.match(reUnicode) || []
+ return string.match(reUnicode) || [];
}
/**
@@ -11947,7 +3386,7 @@ var app = (function() {
* @returns {Array} Returns the words of `string`.
*/
function unicodeWords(string) {
- return string.match(reUnicodeWord) || []
+ return string.match(reUnicodeWord) || [];
}
/*--------------------------------------------------------------------------*/
@@ -11981,142 +3420,128 @@ var app = (function() {
* // Create a suped-up `defer` in Node.js.
* var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
*/
- var runInContext = function runInContext(context) {
- context =
- context == null
- ? root
- : _.defaults(root.Object(), context, _.pick(root, contextProps))
+ var runInContext = (function runInContext(context) {
+ context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
/** Built-in constructor references. */
var Array = context.Array,
- Date = context.Date,
- Error = context.Error,
- Function = context.Function,
- Math = context.Math,
- Object = context.Object,
- RegExp = context.RegExp,
- String = context.String,
- TypeError = context.TypeError
+ Date = context.Date,
+ Error = context.Error,
+ Function = context.Function,
+ Math = context.Math,
+ Object = context.Object,
+ RegExp = context.RegExp,
+ String = context.String,
+ TypeError = context.TypeError;
/** Used for built-in method references. */
var arrayProto = Array.prototype,
- funcProto = Function.prototype,
- objectProto = Object.prototype
+ funcProto = Function.prototype,
+ objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
- var coreJsData = context["__core-js_shared__"]
+ var coreJsData = context['__core-js_shared__'];
/** Used to resolve the decompiled source of functions. */
- var funcToString = funcProto.toString
+ var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty
+ var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to generate unique IDs. */
- var idCounter = 0
+ var idCounter = 0;
/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
- var uid = /[^.]+$/.exec(
- (coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO) || ""
- )
- return uid ? "Symbol(src)_1." + uid : ""
- })()
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+ }());
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
- var nativeObjectToString = objectProto.toString
+ var nativeObjectToString = objectProto.toString;
/** Used to infer the `Object` constructor. */
- var objectCtorString = funcToString.call(Object)
+ var objectCtorString = funcToString.call(Object);
/** Used to restore the original `_` reference in `_.noConflict`. */
- var oldDash = root._
+ var oldDash = root._;
/** Used to detect if a method is native. */
- var reIsNative = RegExp(
- "^" +
- funcToString
- .call(hasOwnProperty)
- .replace(reRegExpChar, "\\$&")
- .replace(
- /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
- "$1.*?"
- ) +
- "$"
- )
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
/** Built-in value references. */
var Buffer = moduleExports ? context.Buffer : undefined$1,
- Symbol = context.Symbol,
- Uint8Array = context.Uint8Array,
- allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined$1,
- getPrototype = overArg(Object.getPrototypeOf, Object),
- objectCreate = Object.create,
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
- splice = arrayProto.splice,
- spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined$1,
- symIterator = Symbol ? Symbol.iterator : undefined$1,
- symToStringTag = Symbol ? Symbol.toStringTag : undefined$1
+ Symbol = context.Symbol,
+ Uint8Array = context.Uint8Array,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined$1,
+ getPrototype = overArg(Object.getPrototypeOf, Object),
+ objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ splice = arrayProto.splice,
+ spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined$1,
+ symIterator = Symbol ? Symbol.iterator : undefined$1,
+ symToStringTag = Symbol ? Symbol.toStringTag : undefined$1;
var defineProperty = (function() {
try {
- var func = getNative(Object, "defineProperty")
- func({}, "", {})
- return func
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
} catch (e) {}
- })()
+ }());
/** Mocked built-ins. */
- var ctxClearTimeout =
- context.clearTimeout !== root.clearTimeout && context.clearTimeout,
- ctxNow = Date && Date.now !== root.Date.now && Date.now,
- ctxSetTimeout =
- context.setTimeout !== root.setTimeout && context.setTimeout
+ var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
+ ctxNow = Date && Date.now !== root.Date.now && Date.now,
+ ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil,
- nativeFloor = Math.floor,
- nativeGetSymbols = Object.getOwnPropertySymbols,
- nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1,
- nativeIsFinite = context.isFinite,
- nativeJoin = arrayProto.join,
- nativeKeys = overArg(Object.keys, Object),
- nativeMax = Math.max,
- nativeMin = Math.min,
- nativeNow = Date.now,
- nativeParseInt = context.parseInt,
- nativeRandom = Math.random,
- nativeReverse = arrayProto.reverse
+ nativeFloor = Math.floor,
+ nativeGetSymbols = Object.getOwnPropertySymbols,
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1,
+ nativeIsFinite = context.isFinite,
+ nativeJoin = arrayProto.join,
+ nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max,
+ nativeMin = Math.min,
+ nativeNow = Date.now,
+ nativeParseInt = context.parseInt,
+ nativeRandom = Math.random,
+ nativeReverse = arrayProto.reverse;
/* Built-in method references that are verified to be native. */
- var DataView = getNative(context, "DataView"),
- Map = getNative(context, "Map"),
- Promise = getNative(context, "Promise"),
- Set = getNative(context, "Set"),
- WeakMap = getNative(context, "WeakMap"),
- nativeCreate = getNative(Object, "create")
+ var DataView = getNative(context, 'DataView'),
+ Map = getNative(context, 'Map'),
+ Promise = getNative(context, 'Promise'),
+ Set = getNative(context, 'Set'),
+ WeakMap = getNative(context, 'WeakMap'),
+ nativeCreate = getNative(Object, 'create');
/** Used to store function metadata. */
- var metaMap = WeakMap && new WeakMap()
+ var metaMap = WeakMap && new WeakMap;
/** Used to lookup unminified function names. */
- var realNames = {}
+ var realNames = {};
/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
- mapCtorString = toSource(Map),
- promiseCtorString = toSource(Promise),
- setCtorString = toSource(Set),
- weakMapCtorString = toSource(WeakMap)
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined$1,
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1,
- symbolToString = symbolProto ? symbolProto.toString : undefined$1
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1,
+ symbolToString = symbolProto ? symbolProto.toString : undefined$1;
/*------------------------------------------------------------------------*/
@@ -12238,19 +3663,15 @@ var app = (function() {
* // => true
*/
function lodash(value) {
- if (
- isObjectLike(value) &&
- !isArray(value) &&
- !(value instanceof LazyWrapper)
- ) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
if (value instanceof LodashWrapper) {
- return value
+ return value;
}
- if (hasOwnProperty.call(value, "__wrapped__")) {
- return wrapperClone(value)
+ if (hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
}
}
- return new LodashWrapper(value)
+ return new LodashWrapper(value);
}
/**
@@ -12265,17 +3686,17 @@ var app = (function() {
function object() {}
return function(proto) {
if (!isObject(proto)) {
- return {}
+ return {};
}
if (objectCreate) {
- return objectCreate(proto)
+ return objectCreate(proto);
}
- object.prototype = proto
- var result = new object()
- object.prototype = undefined$1
- return result
- }
- })()
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined$1;
+ return result;
+ };
+ }());
/**
* The function whose prototype chain sequence wrappers inherit from.
@@ -12294,11 +3715,11 @@ var app = (function() {
* @param {boolean} [chainAll] Enable explicit method chain sequences.
*/
function LodashWrapper(value, chainAll) {
- this.__wrapped__ = value
- this.__actions__ = []
- this.__chain__ = !!chainAll
- this.__index__ = 0
- this.__values__ = undefined$1
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ this.__index__ = 0;
+ this.__values__ = undefined$1;
}
/**
@@ -12311,13 +3732,14 @@ var app = (function() {
* @type {Object}
*/
lodash.templateSettings = {
+
/**
* Used to detect `data` property values to be HTML-escaped.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
- escape: reEscape,
+ 'escape': reEscape,
/**
* Used to detect code to be evaluated.
@@ -12325,7 +3747,7 @@ var app = (function() {
* @memberOf _.templateSettings
* @type {RegExp}
*/
- evaluate: reEvaluate,
+ 'evaluate': reEvaluate,
/**
* Used to detect `data` property values to inject.
@@ -12333,7 +3755,7 @@ var app = (function() {
* @memberOf _.templateSettings
* @type {RegExp}
*/
- interpolate: reInterpolate,
+ 'interpolate': reInterpolate,
/**
* Used to reference the data object in the template text.
@@ -12341,7 +3763,7 @@ var app = (function() {
* @memberOf _.templateSettings
* @type {string}
*/
- variable: "",
+ 'variable': '',
/**
* Used to import variables into the compiled template.
@@ -12349,23 +3771,24 @@ var app = (function() {
* @memberOf _.templateSettings
* @type {Object}
*/
- imports: {
+ 'imports': {
+
/**
* A reference to the `lodash` function.
*
* @memberOf _.templateSettings.imports
* @type {Function}
*/
- _: lodash,
- },
- }
+ '_': lodash
+ }
+ };
// Ensure wrappers are instances of `baseLodash`.
- lodash.prototype = baseLodash.prototype
- lodash.prototype.constructor = lodash
+ lodash.prototype = baseLodash.prototype;
+ lodash.prototype.constructor = lodash;
- LodashWrapper.prototype = baseCreate(baseLodash.prototype)
- LodashWrapper.prototype.constructor = LodashWrapper
+ LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
/*------------------------------------------------------------------------*/
@@ -12377,13 +3800,13 @@ var app = (function() {
* @param {*} value The value to wrap.
*/
function LazyWrapper(value) {
- this.__wrapped__ = value
- this.__actions__ = []
- this.__dir__ = 1
- this.__filtered__ = false
- this.__iteratees__ = []
- this.__takeCount__ = MAX_ARRAY_LENGTH
- this.__views__ = []
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
+ this.__views__ = [];
}
/**
@@ -12395,14 +3818,14 @@ var app = (function() {
* @returns {Object} Returns the cloned `LazyWrapper` object.
*/
function lazyClone() {
- var result = new LazyWrapper(this.__wrapped__)
- result.__actions__ = copyArray(this.__actions__)
- result.__dir__ = this.__dir__
- result.__filtered__ = this.__filtered__
- result.__iteratees__ = copyArray(this.__iteratees__)
- result.__takeCount__ = this.__takeCount__
- result.__views__ = copyArray(this.__views__)
- return result
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = copyArray(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = copyArray(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = copyArray(this.__views__);
+ return result;
}
/**
@@ -12415,14 +3838,14 @@ var app = (function() {
*/
function lazyReverse() {
if (this.__filtered__) {
- var result = new LazyWrapper(this)
- result.__dir__ = -1
- result.__filtered__ = true
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
} else {
- result = this.clone()
- result.__dir__ *= -1
+ result = this.clone();
+ result.__dir__ *= -1;
}
- return result
+ return result;
}
/**
@@ -12435,58 +3858,56 @@ var app = (function() {
*/
function lazyValue() {
var array = this.__wrapped__.value(),
- dir = this.__dir__,
- isArr = isArray(array),
- isRight = dir < 0,
- arrLength = isArr ? array.length : 0,
- view = getView(0, arrLength, this.__views__),
- start = view.start,
- end = view.end,
- length = end - start,
- index = isRight ? end : start - 1,
- iteratees = this.__iteratees__,
- iterLength = iteratees.length,
- resIndex = 0,
- takeCount = nativeMin(length, this.__takeCount__)
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
- if (
- !isArr ||
- (!isRight && arrLength == length && takeCount == length)
- ) {
- return baseWrapperValue(array, this.__actions__)
+ if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
+ return baseWrapperValue(array, this.__actions__);
}
- var result = []
+ var result = [];
- outer: while (length-- && resIndex < takeCount) {
- index += dir
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
var iterIndex = -1,
- value = array[index]
+ value = array[index];
while (++iterIndex < iterLength) {
var data = iteratees[iterIndex],
- iteratee = data.iteratee,
- type = data.type,
- computed = iteratee(value)
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
if (type == LAZY_MAP_FLAG) {
- value = computed
+ value = computed;
} else if (!computed) {
if (type == LAZY_FILTER_FLAG) {
- continue outer
+ continue outer;
} else {
- break outer
+ break outer;
}
}
}
- result[resIndex++] = value
+ result[resIndex++] = value;
}
- return result
+ return result;
}
// Ensure `LazyWrapper` is an instance of `baseLodash`.
- LazyWrapper.prototype = baseCreate(baseLodash.prototype)
- LazyWrapper.prototype.constructor = LazyWrapper
+ LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+ LazyWrapper.prototype.constructor = LazyWrapper;
/*------------------------------------------------------------------------*/
@@ -12499,12 +3920,12 @@ var app = (function() {
*/
function Hash(entries) {
var index = -1,
- length = entries == null ? 0 : entries.length
+ length = entries == null ? 0 : entries.length;
- this.clear()
+ this.clear();
while (++index < length) {
- var entry = entries[index]
- this.set(entry[0], entry[1])
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
}
}
@@ -12516,8 +3937,8 @@ var app = (function() {
* @memberOf Hash
*/
function hashClear() {
- this.__data__ = nativeCreate ? nativeCreate(null) : {}
- this.size = 0
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
}
/**
@@ -12531,9 +3952,9 @@ var app = (function() {
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
- var result = this.has(key) && delete this.__data__[key]
- this.size -= result ? 1 : 0
- return result
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
}
/**
@@ -12546,12 +3967,12 @@ var app = (function() {
* @returns {*} Returns the entry value.
*/
function hashGet(key) {
- var data = this.__data__
+ var data = this.__data__;
if (nativeCreate) {
- var result = data[key]
- return result === HASH_UNDEFINED ? undefined$1 : result
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined$1 : result;
}
- return hasOwnProperty.call(data, key) ? data[key] : undefined$1
+ return hasOwnProperty.call(data, key) ? data[key] : undefined$1;
}
/**
@@ -12564,10 +3985,8 @@ var app = (function() {
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function hashHas(key) {
- var data = this.__data__
- return nativeCreate
- ? data[key] !== undefined$1
- : hasOwnProperty.call(data, key)
+ var data = this.__data__;
+ return nativeCreate ? (data[key] !== undefined$1) : hasOwnProperty.call(data, key);
}
/**
@@ -12581,19 +4000,18 @@ var app = (function() {
* @returns {Object} Returns the hash instance.
*/
function hashSet(key, value) {
- var data = this.__data__
- this.size += this.has(key) ? 0 : 1
- data[key] =
- nativeCreate && value === undefined$1 ? HASH_UNDEFINED : value
- return this
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = (nativeCreate && value === undefined$1) ? HASH_UNDEFINED : value;
+ return this;
}
// Add methods to `Hash`.
- Hash.prototype.clear = hashClear
- Hash.prototype["delete"] = hashDelete
- Hash.prototype.get = hashGet
- Hash.prototype.has = hashHas
- Hash.prototype.set = hashSet
+ Hash.prototype.clear = hashClear;
+ Hash.prototype['delete'] = hashDelete;
+ Hash.prototype.get = hashGet;
+ Hash.prototype.has = hashHas;
+ Hash.prototype.set = hashSet;
/*------------------------------------------------------------------------*/
@@ -12606,12 +4024,12 @@ var app = (function() {
*/
function ListCache(entries) {
var index = -1,
- length = entries == null ? 0 : entries.length
+ length = entries == null ? 0 : entries.length;
- this.clear()
+ this.clear();
while (++index < length) {
- var entry = entries[index]
- this.set(entry[0], entry[1])
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
}
}
@@ -12623,8 +4041,8 @@ var app = (function() {
* @memberOf ListCache
*/
function listCacheClear() {
- this.__data__ = []
- this.size = 0
+ this.__data__ = [];
+ this.size = 0;
}
/**
@@ -12638,19 +4056,19 @@ var app = (function() {
*/
function listCacheDelete(key) {
var data = this.__data__,
- index = assocIndexOf(data, key)
+ index = assocIndexOf(data, key);
if (index < 0) {
- return false
+ return false;
}
- var lastIndex = data.length - 1
+ var lastIndex = data.length - 1;
if (index == lastIndex) {
- data.pop()
+ data.pop();
} else {
- splice.call(data, index, 1)
+ splice.call(data, index, 1);
}
- --this.size
- return true
+ --this.size;
+ return true;
}
/**
@@ -12664,9 +4082,9 @@ var app = (function() {
*/
function listCacheGet(key) {
var data = this.__data__,
- index = assocIndexOf(data, key)
+ index = assocIndexOf(data, key);
- return index < 0 ? undefined$1 : data[index][1]
+ return index < 0 ? undefined$1 : data[index][1];
}
/**
@@ -12679,7 +4097,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function listCacheHas(key) {
- return assocIndexOf(this.__data__, key) > -1
+ return assocIndexOf(this.__data__, key) > -1;
}
/**
@@ -12694,23 +4112,23 @@ var app = (function() {
*/
function listCacheSet(key, value) {
var data = this.__data__,
- index = assocIndexOf(data, key)
+ index = assocIndexOf(data, key);
if (index < 0) {
- ++this.size
- data.push([key, value])
+ ++this.size;
+ data.push([key, value]);
} else {
- data[index][1] = value
+ data[index][1] = value;
}
- return this
+ return this;
}
// Add methods to `ListCache`.
- ListCache.prototype.clear = listCacheClear
- ListCache.prototype["delete"] = listCacheDelete
- ListCache.prototype.get = listCacheGet
- ListCache.prototype.has = listCacheHas
- ListCache.prototype.set = listCacheSet
+ ListCache.prototype.clear = listCacheClear;
+ ListCache.prototype['delete'] = listCacheDelete;
+ ListCache.prototype.get = listCacheGet;
+ ListCache.prototype.has = listCacheHas;
+ ListCache.prototype.set = listCacheSet;
/*------------------------------------------------------------------------*/
@@ -12723,12 +4141,12 @@ var app = (function() {
*/
function MapCache(entries) {
var index = -1,
- length = entries == null ? 0 : entries.length
+ length = entries == null ? 0 : entries.length;
- this.clear()
+ this.clear();
while (++index < length) {
- var entry = entries[index]
- this.set(entry[0], entry[1])
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
}
}
@@ -12740,12 +4158,12 @@ var app = (function() {
* @memberOf MapCache
*/
function mapCacheClear() {
- this.size = 0
+ this.size = 0;
this.__data__ = {
- hash: new Hash(),
- map: new (Map || ListCache)(),
- string: new Hash(),
- }
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
}
/**
@@ -12758,9 +4176,9 @@ var app = (function() {
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
- var result = getMapData(this, key)["delete"](key)
- this.size -= result ? 1 : 0
- return result
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
}
/**
@@ -12773,7 +4191,7 @@ var app = (function() {
* @returns {*} Returns the entry value.
*/
function mapCacheGet(key) {
- return getMapData(this, key).get(key)
+ return getMapData(this, key).get(key);
}
/**
@@ -12786,7 +4204,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapCacheHas(key) {
- return getMapData(this, key).has(key)
+ return getMapData(this, key).has(key);
}
/**
@@ -12801,19 +4219,19 @@ var app = (function() {
*/
function mapCacheSet(key, value) {
var data = getMapData(this, key),
- size = data.size
+ size = data.size;
- data.set(key, value)
- this.size += data.size == size ? 0 : 1
- return this
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
+ return this;
}
// Add methods to `MapCache`.
- MapCache.prototype.clear = mapCacheClear
- MapCache.prototype["delete"] = mapCacheDelete
- MapCache.prototype.get = mapCacheGet
- MapCache.prototype.has = mapCacheHas
- MapCache.prototype.set = mapCacheSet
+ MapCache.prototype.clear = mapCacheClear;
+ MapCache.prototype['delete'] = mapCacheDelete;
+ MapCache.prototype.get = mapCacheGet;
+ MapCache.prototype.has = mapCacheHas;
+ MapCache.prototype.set = mapCacheSet;
/*------------------------------------------------------------------------*/
@@ -12827,11 +4245,11 @@ var app = (function() {
*/
function SetCache(values) {
var index = -1,
- length = values == null ? 0 : values.length
+ length = values == null ? 0 : values.length;
- this.__data__ = new MapCache()
+ this.__data__ = new MapCache;
while (++index < length) {
- this.add(values[index])
+ this.add(values[index]);
}
}
@@ -12846,8 +4264,8 @@ var app = (function() {
* @returns {Object} Returns the cache instance.
*/
function setCacheAdd(value) {
- this.__data__.set(value, HASH_UNDEFINED)
- return this
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
}
/**
@@ -12860,12 +4278,12 @@ var app = (function() {
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
function setCacheHas(value) {
- return this.__data__.has(value)
+ return this.__data__.has(value);
}
// Add methods to `SetCache`.
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd
- SetCache.prototype.has = setCacheHas
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+ SetCache.prototype.has = setCacheHas;
/*------------------------------------------------------------------------*/
@@ -12877,8 +4295,8 @@ var app = (function() {
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
- var data = (this.__data__ = new ListCache(entries))
- this.size = data.size
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
}
/**
@@ -12889,8 +4307,8 @@ var app = (function() {
* @memberOf Stack
*/
function stackClear() {
- this.__data__ = new ListCache()
- this.size = 0
+ this.__data__ = new ListCache;
+ this.size = 0;
}
/**
@@ -12904,10 +4322,10 @@ var app = (function() {
*/
function stackDelete(key) {
var data = this.__data__,
- result = data["delete"](key)
+ result = data['delete'](key);
- this.size = data.size
- return result
+ this.size = data.size;
+ return result;
}
/**
@@ -12920,7 +4338,7 @@ var app = (function() {
* @returns {*} Returns the entry value.
*/
function stackGet(key) {
- return this.__data__.get(key)
+ return this.__data__.get(key);
}
/**
@@ -12933,7 +4351,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function stackHas(key) {
- return this.__data__.has(key)
+ return this.__data__.has(key);
}
/**
@@ -12947,27 +4365,27 @@ var app = (function() {
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
- var data = this.__data__
+ var data = this.__data__;
if (data instanceof ListCache) {
- var pairs = data.__data__
- if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
- pairs.push([key, value])
- this.size = ++data.size
- return this
+ var pairs = data.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ this.size = ++data.size;
+ return this;
}
- data = this.__data__ = new MapCache(pairs)
+ data = this.__data__ = new MapCache(pairs);
}
- data.set(key, value)
- this.size = data.size
- return this
+ data.set(key, value);
+ this.size = data.size;
+ return this;
}
// Add methods to `Stack`.
- Stack.prototype.clear = stackClear
- Stack.prototype["delete"] = stackDelete
- Stack.prototype.get = stackGet
- Stack.prototype.has = stackHas
- Stack.prototype.set = stackSet
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
/*------------------------------------------------------------------------*/
@@ -12981,35 +4399,29 @@ var app = (function() {
*/
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value),
- isArg = !isArr && isArguments(value),
- isBuff = !isArr && !isArg && isBuffer(value),
- isType = !isArr && !isArg && !isBuff && isTypedArray(value),
- skipIndexes = isArr || isArg || isBuff || isType,
- result = skipIndexes ? baseTimes(value.length, String) : [],
- length = result.length
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
for (var key in value) {
- if (
- (inherited || hasOwnProperty.call(value, key)) &&
- !(
- skipIndexes &&
- // Safari 9 has enumerable `arguments.length` in strict mode.
- (key == "length" ||
- // Node.js 0.10 has enumerable non-index properties on buffers.
- (isBuff && (key == "offset" || key == "parent")) ||
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
- (isType &&
- (key == "buffer" ||
- key == "byteLength" ||
- key == "byteOffset")) ||
- // Skip index properties.
- isIndex(key, length))
- )
- ) {
- result.push(key)
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
+ result.push(key);
}
}
- return result
+ return result;
}
/**
@@ -13020,8 +4432,8 @@ var app = (function() {
* @returns {*} Returns the random element.
*/
function arraySample(array) {
- var length = array.length
- return length ? array[baseRandom(0, length - 1)] : undefined$1
+ var length = array.length;
+ return length ? array[baseRandom(0, length - 1)] : undefined$1;
}
/**
@@ -13033,7 +4445,7 @@ var app = (function() {
* @returns {Array} Returns the random elements.
*/
function arraySampleSize(array, n) {
- return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length))
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
}
/**
@@ -13044,7 +4456,7 @@ var app = (function() {
* @returns {Array} Returns the new shuffled array.
*/
function arrayShuffle(array) {
- return shuffleSelf(copyArray(array))
+ return shuffleSelf(copyArray(array));
}
/**
@@ -13057,11 +4469,9 @@ var app = (function() {
* @param {*} value The value to assign.
*/
function assignMergeValue(object, key, value) {
- if (
- (value !== undefined$1 && !eq(object[key], value)) ||
- (value === undefined$1 && !(key in object))
- ) {
- baseAssignValue(object, key, value)
+ if ((value !== undefined$1 && !eq(object[key], value)) ||
+ (value === undefined$1 && !(key in object))) {
+ baseAssignValue(object, key, value);
}
}
@@ -13076,12 +4486,10 @@ var app = (function() {
* @param {*} value The value to assign.
*/
function assignValue(object, key, value) {
- var objValue = object[key]
- if (
- !(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
- (value === undefined$1 && !(key in object))
- ) {
- baseAssignValue(object, key, value)
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined$1 && !(key in object))) {
+ baseAssignValue(object, key, value);
}
}
@@ -13094,13 +4502,13 @@ var app = (function() {
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
- var length = array.length
+ var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
- return length
+ return length;
}
}
- return -1
+ return -1;
}
/**
@@ -13116,9 +4524,9 @@ var app = (function() {
*/
function baseAggregator(collection, setter, iteratee, accumulator) {
baseEach(collection, function(value, key, collection) {
- setter(accumulator, value, iteratee(value), collection)
- })
- return accumulator
+ setter(accumulator, value, iteratee(value), collection);
+ });
+ return accumulator;
}
/**
@@ -13131,7 +4539,7 @@ var app = (function() {
* @returns {Object} Returns `object`.
*/
function baseAssign(object, source) {
- return object && copyObject(source, keys(source), object)
+ return object && copyObject(source, keys(source), object);
}
/**
@@ -13144,7 +4552,7 @@ var app = (function() {
* @returns {Object} Returns `object`.
*/
function baseAssignIn(object, source) {
- return object && copyObject(source, keysIn(source), object)
+ return object && copyObject(source, keysIn(source), object);
}
/**
@@ -13157,15 +4565,15 @@ var app = (function() {
* @param {*} value The value to assign.
*/
function baseAssignValue(object, key, value) {
- if (key == "__proto__" && defineProperty) {
+ if (key == '__proto__' && defineProperty) {
defineProperty(object, key, {
- configurable: true,
- enumerable: true,
- value: value,
- writable: true,
- })
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
} else {
- object[key] = value
+ object[key] = value;
}
}
@@ -13179,14 +4587,14 @@ var app = (function() {
*/
function baseAt(object, paths) {
var index = -1,
- length = paths.length,
- result = Array(length),
- skip = object == null
+ length = paths.length,
+ result = Array(length),
+ skip = object == null;
while (++index < length) {
- result[index] = skip ? undefined$1 : get(object, paths[index])
+ result[index] = skip ? undefined$1 : get(object, paths[index]);
}
- return result
+ return result;
}
/**
@@ -13201,13 +4609,13 @@ var app = (function() {
function baseClamp(number, lower, upper) {
if (number === number) {
if (upper !== undefined$1) {
- number = number <= upper ? number : upper
+ number = number <= upper ? number : upper;
}
if (lower !== undefined$1) {
- number = number >= lower ? number : lower
+ number = number >= lower ? number : lower;
}
}
- return number
+ return number;
}
/**
@@ -13228,93 +4636,78 @@ var app = (function() {
*/
function baseClone(value, bitmask, customizer, key, object, stack) {
var result,
- isDeep = bitmask & CLONE_DEEP_FLAG,
- isFlat = bitmask & CLONE_FLAT_FLAG,
- isFull = bitmask & CLONE_SYMBOLS_FLAG
+ isDeep = bitmask & CLONE_DEEP_FLAG,
+ isFlat = bitmask & CLONE_FLAT_FLAG,
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
if (customizer) {
- result = object
- ? customizer(value, key, object, stack)
- : customizer(value)
+ result = object ? customizer(value, key, object, stack) : customizer(value);
}
if (result !== undefined$1) {
- return result
+ return result;
}
if (!isObject(value)) {
- return value
+ return value;
}
- var isArr = isArray(value)
+ var isArr = isArray(value);
if (isArr) {
- result = initCloneArray(value)
+ result = initCloneArray(value);
if (!isDeep) {
- return copyArray(value, result)
+ return copyArray(value, result);
}
} else {
var tag = getTag(value),
- isFunc = tag == funcTag || tag == genTag
+ isFunc = tag == funcTag || tag == genTag;
if (isBuffer(value)) {
- return cloneBuffer(value, isDeep)
+ return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- result = isFlat || isFunc ? {} : initCloneObject(value)
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
if (!isDeep) {
return isFlat
? copySymbolsIn(value, baseAssignIn(result, value))
- : copySymbols(value, baseAssign(result, value))
+ : copySymbols(value, baseAssign(result, value));
}
} else {
if (!cloneableTags[tag]) {
- return object ? value : {}
+ return object ? value : {};
}
- result = initCloneByTag(value, tag, isDeep)
+ result = initCloneByTag(value, tag, isDeep);
}
}
// Check for circular references and return its corresponding clone.
- stack || (stack = new Stack())
- var stacked = stack.get(value)
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
if (stacked) {
- return stacked
+ return stacked;
}
- stack.set(value, result)
+ stack.set(value, result);
if (isSet(value)) {
value.forEach(function(subValue) {
- result.add(
- baseClone(subValue, bitmask, customizer, subValue, value, stack)
- )
- })
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+ });
} else if (isMap(value)) {
value.forEach(function(subValue, key) {
- result.set(
- key,
- baseClone(subValue, bitmask, customizer, key, value, stack)
- )
- })
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
}
var keysFunc = isFull
- ? isFlat
- ? getAllKeysIn
- : getAllKeys
- : isFlat
- ? keysIn
- : keys
+ ? (isFlat ? getAllKeysIn : getAllKeys)
+ : (isFlat ? keysIn : keys);
- var props = isArr ? undefined$1 : keysFunc(value)
+ var props = isArr ? undefined$1 : keysFunc(value);
arrayEach(props || value, function(subValue, key) {
if (props) {
- key = subValue
- subValue = value[key]
+ key = subValue;
+ subValue = value[key];
}
// Recursively populate clone (susceptible to call stack limits).
- assignValue(
- result,
- key,
- baseClone(subValue, bitmask, customizer, key, value, stack)
- )
- })
- return result
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ return result;
}
/**
@@ -13325,10 +4718,10 @@ var app = (function() {
* @returns {Function} Returns the new spec function.
*/
function baseConforms(source) {
- var props = keys(source)
+ var props = keys(source);
return function(object) {
- return baseConformsTo(object, source, props)
- }
+ return baseConformsTo(object, source, props);
+ };
}
/**
@@ -13340,24 +4733,21 @@ var app = (function() {
* @returns {boolean} Returns `true` if `object` conforms, else `false`.
*/
function baseConformsTo(object, source, props) {
- var length = props.length
+ var length = props.length;
if (object == null) {
- return !length
+ return !length;
}
- object = Object(object)
+ object = Object(object);
while (length--) {
var key = props[length],
- predicate = source[key],
- value = object[key]
+ predicate = source[key],
+ value = object[key];
- if (
- (value === undefined$1 && !(key in object)) ||
- !predicate(value)
- ) {
- return false
+ if ((value === undefined$1 && !(key in object)) || !predicate(value)) {
+ return false;
}
}
- return true
+ return true;
}
/**
@@ -13371,12 +4761,10 @@ var app = (function() {
* @returns {number|Object} Returns the timer id or timeout object.
*/
function baseDelay(func, wait, args) {
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT)
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
}
- return setTimeout(function() {
- func.apply(undefined$1, args)
- }, wait)
+ return setTimeout(function() { func.apply(undefined$1, args); }, wait);
}
/**
@@ -13392,44 +4780,47 @@ var app = (function() {
*/
function baseDifference(array, values, iteratee, comparator) {
var index = -1,
- includes = arrayIncludes,
- isCommon = true,
- length = array.length,
- result = [],
- valuesLength = values.length
+ includes = arrayIncludes,
+ isCommon = true,
+ length = array.length,
+ result = [],
+ valuesLength = values.length;
if (!length) {
- return result
+ return result;
}
if (iteratee) {
- values = arrayMap(values, baseUnary(iteratee))
+ values = arrayMap(values, baseUnary(iteratee));
}
if (comparator) {
- includes = arrayIncludesWith
- isCommon = false
- } else if (values.length >= LARGE_ARRAY_SIZE) {
- includes = cacheHas
- isCommon = false
- values = new SetCache(values)
+ includes = arrayIncludesWith;
+ isCommon = false;
}
- outer: while (++index < length) {
+ else if (values.length >= LARGE_ARRAY_SIZE) {
+ includes = cacheHas;
+ isCommon = false;
+ values = new SetCache(values);
+ }
+ outer:
+ while (++index < length) {
var value = array[index],
- computed = iteratee == null ? value : iteratee(value)
+ computed = iteratee == null ? value : iteratee(value);
- value = comparator || value !== 0 ? value : 0
+ value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
- var valuesIndex = valuesLength
+ var valuesIndex = valuesLength;
while (valuesIndex--) {
if (values[valuesIndex] === computed) {
- continue outer
+ continue outer;
}
}
- result.push(value)
- } else if (!includes(values, computed, comparator)) {
- result.push(value)
+ result.push(value);
+ }
+ else if (!includes(values, computed, comparator)) {
+ result.push(value);
}
}
- return result
+ return result;
}
/**
@@ -13440,7 +4831,7 @@ var app = (function() {
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
*/
- var baseEach = createBaseEach(baseForOwn)
+ var baseEach = createBaseEach(baseForOwn);
/**
* The base implementation of `_.forEachRight` without support for iteratee shorthands.
@@ -13450,7 +4841,7 @@ var app = (function() {
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
*/
- var baseEachRight = createBaseEach(baseForOwnRight, true)
+ var baseEachRight = createBaseEach(baseForOwnRight, true);
/**
* The base implementation of `_.every` without support for iteratee shorthands.
@@ -13462,12 +4853,12 @@ var app = (function() {
* else `false`
*/
function baseEvery(collection, predicate) {
- var result = true
+ var result = true;
baseEach(collection, function(value, index, collection) {
- result = !!predicate(value, index, collection)
- return result
- })
- return result
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
}
/**
@@ -13482,23 +4873,21 @@ var app = (function() {
*/
function baseExtremum(array, iteratee, comparator) {
var index = -1,
- length = array.length
+ length = array.length;
while (++index < length) {
var value = array[index],
- current = iteratee(value)
+ current = iteratee(value);
- if (
- current != null &&
- (computed === undefined$1
- ? current === current && !isSymbol(current)
- : comparator(current, computed))
- ) {
+ if (current != null && (computed === undefined$1
+ ? (current === current && !isSymbol(current))
+ : comparator(current, computed)
+ )) {
var computed = current,
- result = value
+ result = value;
}
}
- return result
+ return result;
}
/**
@@ -13512,21 +4901,21 @@ var app = (function() {
* @returns {Array} Returns `array`.
*/
function baseFill(array, value, start, end) {
- var length = array.length
+ var length = array.length;
- start = toInteger(start)
+ start = toInteger(start);
if (start < 0) {
- start = -start > length ? 0 : length + start
+ start = -start > length ? 0 : (length + start);
}
- end = end === undefined$1 || end > length ? length : toInteger(end)
+ end = (end === undefined$1 || end > length) ? length : toInteger(end);
if (end < 0) {
- end += length
+ end += length;
}
- end = start > end ? 0 : toLength(end)
+ end = start > end ? 0 : toLength(end);
while (start < end) {
- array[start++] = value
+ array[start++] = value;
}
- return array
+ return array;
}
/**
@@ -13538,13 +4927,13 @@ var app = (function() {
* @returns {Array} Returns the new filtered array.
*/
function baseFilter(collection, predicate) {
- var result = []
+ var result = [];
baseEach(collection, function(value, index, collection) {
if (predicate(value, index, collection)) {
- result.push(value)
+ result.push(value);
}
- })
- return result
+ });
+ return result;
}
/**
@@ -13560,25 +4949,25 @@ var app = (function() {
*/
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1,
- length = array.length
+ length = array.length;
- predicate || (predicate = isFlattenable)
- result || (result = [])
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
while (++index < length) {
- var value = array[index]
+ var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
// Recursively flatten arrays (susceptible to call stack limits).
- baseFlatten(value, depth - 1, predicate, isStrict, result)
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
} else {
- arrayPush(result, value)
+ arrayPush(result, value);
}
} else if (!isStrict) {
- result[result.length] = value
+ result[result.length] = value;
}
}
- return result
+ return result;
}
/**
@@ -13592,7 +4981,7 @@ var app = (function() {
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
- var baseFor = createBaseFor()
+ var baseFor = createBaseFor();
/**
* This function is like `baseFor` except that it iterates over properties
@@ -13604,7 +4993,7 @@ var app = (function() {
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
- var baseForRight = createBaseFor(true)
+ var baseForRight = createBaseFor(true);
/**
* The base implementation of `_.forOwn` without support for iteratee shorthands.
@@ -13615,7 +5004,7 @@ var app = (function() {
* @returns {Object} Returns `object`.
*/
function baseForOwn(object, iteratee) {
- return object && baseFor(object, iteratee, keys)
+ return object && baseFor(object, iteratee, keys);
}
/**
@@ -13627,7 +5016,7 @@ var app = (function() {
* @returns {Object} Returns `object`.
*/
function baseForOwnRight(object, iteratee) {
- return object && baseForRight(object, iteratee, keys)
+ return object && baseForRight(object, iteratee, keys);
}
/**
@@ -13641,8 +5030,8 @@ var app = (function() {
*/
function baseFunctions(object, props) {
return arrayFilter(props, function(key) {
- return isFunction(object[key])
- })
+ return isFunction(object[key]);
+ });
}
/**
@@ -13654,15 +5043,15 @@ var app = (function() {
* @returns {*} Returns the resolved value.
*/
function baseGet(object, path) {
- path = castPath(path, object)
+ path = castPath(path, object);
var index = 0,
- length = path.length
+ length = path.length;
while (object != null && index < length) {
- object = object[toKey(path[index++])]
+ object = object[toKey(path[index++])];
}
- return index && index == length ? object : undefined$1
+ return (index && index == length) ? object : undefined$1;
}
/**
@@ -13677,10 +5066,8 @@ var app = (function() {
* @returns {Array} Returns the array of property names and symbols.
*/
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
- var result = keysFunc(object)
- return isArray(object)
- ? result
- : arrayPush(result, symbolsFunc(object))
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}
/**
@@ -13692,11 +5079,11 @@ var app = (function() {
*/
function baseGetTag(value) {
if (value == null) {
- return value === undefined$1 ? undefinedTag : nullTag
+ return value === undefined$1 ? undefinedTag : nullTag;
}
- return symToStringTag && symToStringTag in Object(value)
+ return (symToStringTag && symToStringTag in Object(value))
? getRawTag(value)
- : objectToString(value)
+ : objectToString(value);
}
/**
@@ -13709,7 +5096,7 @@ var app = (function() {
* else `false`.
*/
function baseGt(value, other) {
- return value > other
+ return value > other;
}
/**
@@ -13721,7 +5108,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHas(object, key) {
- return object != null && hasOwnProperty.call(object, key)
+ return object != null && hasOwnProperty.call(object, key);
}
/**
@@ -13733,7 +5120,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHasIn(object, key) {
- return object != null && key in Object(object)
+ return object != null && key in Object(object);
}
/**
@@ -13746,9 +5133,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
*/
function baseInRange(number, start, end) {
- return (
- number >= nativeMin(start, end) && number < nativeMax(start, end)
- )
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
}
/**
@@ -13763,58 +5148,55 @@ var app = (function() {
*/
function baseIntersection(arrays, iteratee, comparator) {
var includes = comparator ? arrayIncludesWith : arrayIncludes,
- length = arrays[0].length,
- othLength = arrays.length,
- othIndex = othLength,
- caches = Array(othLength),
- maxLength = Infinity,
- result = []
+ length = arrays[0].length,
+ othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(othLength),
+ maxLength = Infinity,
+ result = [];
while (othIndex--) {
- var array = arrays[othIndex]
+ var array = arrays[othIndex];
if (othIndex && iteratee) {
- array = arrayMap(array, baseUnary(iteratee))
+ array = arrayMap(array, baseUnary(iteratee));
}
- maxLength = nativeMin(array.length, maxLength)
- caches[othIndex] =
- !comparator &&
- (iteratee || (length >= 120 && array.length >= 120))
- ? new SetCache(othIndex && array)
- : undefined$1
+ maxLength = nativeMin(array.length, maxLength);
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
+ ? new SetCache(othIndex && array)
+ : undefined$1;
}
- array = arrays[0]
+ array = arrays[0];
var index = -1,
- seen = caches[0]
+ seen = caches[0];
- outer: while (++index < length && result.length < maxLength) {
+ outer:
+ while (++index < length && result.length < maxLength) {
var value = array[index],
- computed = iteratee ? iteratee(value) : value
+ computed = iteratee ? iteratee(value) : value;
- value = comparator || value !== 0 ? value : 0
- if (
- !(seen
- ? cacheHas(seen, computed)
- : includes(result, computed, comparator))
- ) {
- othIndex = othLength
+ value = (comparator || value !== 0) ? value : 0;
+ if (!(seen
+ ? cacheHas(seen, computed)
+ : includes(result, computed, comparator)
+ )) {
+ othIndex = othLength;
while (--othIndex) {
- var cache = caches[othIndex]
- if (
- !(cache
- ? cacheHas(cache, computed)
- : includes(arrays[othIndex], computed, comparator))
- ) {
- continue outer
+ var cache = caches[othIndex];
+ if (!(cache
+ ? cacheHas(cache, computed)
+ : includes(arrays[othIndex], computed, comparator))
+ ) {
+ continue outer;
}
}
if (seen) {
- seen.push(computed)
+ seen.push(computed);
}
- result.push(value)
+ result.push(value);
}
}
- return result
+ return result;
}
/**
@@ -13830,9 +5212,9 @@ var app = (function() {
*/
function baseInverter(object, setter, iteratee, accumulator) {
baseForOwn(object, function(value, key, object) {
- setter(accumulator, iteratee(value), key, object)
- })
- return accumulator
+ setter(accumulator, iteratee(value), key, object);
+ });
+ return accumulator;
}
/**
@@ -13846,10 +5228,10 @@ var app = (function() {
* @returns {*} Returns the result of the invoked method.
*/
function baseInvoke(object, path, args) {
- path = castPath(path, object)
- object = parent(object, path)
- var func = object == null ? object : object[toKey(last(path))]
- return func == null ? undefined$1 : apply(func, object, args)
+ path = castPath(path, object);
+ object = parent(object, path);
+ var func = object == null ? object : object[toKey(last(path))];
+ return func == null ? undefined$1 : apply(func, object, args);
}
/**
@@ -13860,7 +5242,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
*/
function baseIsArguments(value) {
- return isObjectLike(value) && baseGetTag(value) == argsTag
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
}
/**
@@ -13871,7 +5253,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
*/
function baseIsArrayBuffer(value) {
- return isObjectLike(value) && baseGetTag(value) == arrayBufferTag
+ return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
}
/**
@@ -13882,7 +5264,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
*/
function baseIsDate(value) {
- return isObjectLike(value) && baseGetTag(value) == dateTag
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
}
/**
@@ -13901,23 +5283,12 @@ var app = (function() {
*/
function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
- return true
+ return true;
}
- if (
- value == null ||
- other == null ||
- (!isObjectLike(value) && !isObjectLike(other))
- ) {
- return value !== value && other !== other
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
}
- return baseIsEqualDeep(
- value,
- other,
- bitmask,
- customizer,
- baseIsEqual,
- stack
- )
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
/**
@@ -13934,86 +5305,49 @@ var app = (function() {
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
- function baseIsEqualDeep(
- object,
- other,
- bitmask,
- customizer,
- equalFunc,
- stack
- ) {
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object),
- othIsArr = isArray(other),
- objTag = objIsArr ? arrayTag : getTag(object),
- othTag = othIsArr ? arrayTag : getTag(other)
+ othIsArr = isArray(other),
+ objTag = objIsArr ? arrayTag : getTag(object),
+ othTag = othIsArr ? arrayTag : getTag(other);
- objTag = objTag == argsTag ? objectTag : objTag
- othTag = othTag == argsTag ? objectTag : othTag
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
var objIsObj = objTag == objectTag,
- othIsObj = othTag == objectTag,
- isSameTag = objTag == othTag
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
if (isSameTag && isBuffer(object)) {
if (!isBuffer(other)) {
- return false
+ return false;
}
- objIsArr = true
- objIsObj = false
+ objIsArr = true;
+ objIsObj = false;
}
if (isSameTag && !objIsObj) {
- stack || (stack = new Stack())
- return objIsArr || isTypedArray(object)
- ? equalArrays(
- object,
- other,
- bitmask,
- customizer,
- equalFunc,
- stack
- )
- : equalByTag(
- object,
- other,
- objTag,
- bitmask,
- customizer,
- equalFunc,
- stack
- )
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
}
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
- var objIsWrapped =
- objIsObj && hasOwnProperty.call(object, "__wrapped__"),
- othIsWrapped =
- othIsObj && hasOwnProperty.call(other, "__wrapped__")
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object,
- othUnwrapped = othIsWrapped ? other.value() : other
+ othUnwrapped = othIsWrapped ? other.value() : other;
- stack || (stack = new Stack())
- return equalFunc(
- objUnwrapped,
- othUnwrapped,
- bitmask,
- customizer,
- stack
- )
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
if (!isSameTag) {
- return false
+ return false;
}
- stack || (stack = new Stack())
- return equalObjects(
- object,
- other,
- bitmask,
- customizer,
- equalFunc,
- stack
- )
+ stack || (stack = new Stack);
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
/**
@@ -14024,7 +5358,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
*/
function baseIsMap(value) {
- return isObjectLike(value) && getTag(value) == mapTag
+ return isObjectLike(value) && getTag(value) == mapTag;
}
/**
@@ -14039,61 +5373,46 @@ var app = (function() {
*/
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length,
- length = index,
- noCustomizer = !customizer
+ length = index,
+ noCustomizer = !customizer;
if (object == null) {
- return !length
+ return !length;
}
- object = Object(object)
+ object = Object(object);
while (index--) {
- var data = matchData[index]
- if (
- noCustomizer && data[2]
- ? data[1] !== object[data[0]]
- : !(data[0] in object)
- ) {
- return false
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
}
}
while (++index < length) {
- data = matchData[index]
+ data = matchData[index];
var key = data[0],
- objValue = object[key],
- srcValue = data[1]
+ objValue = object[key],
+ srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === undefined$1 && !(key in object)) {
- return false
+ return false;
}
} else {
- var stack = new Stack()
+ var stack = new Stack;
if (customizer) {
- var result = customizer(
- objValue,
- srcValue,
- key,
- object,
- source,
- stack
- )
+ var result = customizer(objValue, srcValue, key, object, source, stack);
}
- if (
- !(result === undefined$1
- ? baseIsEqual(
- srcValue,
- objValue,
- COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG,
- customizer,
- stack
- )
- : result)
- ) {
- return false
+ if (!(result === undefined$1
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+ : result
+ )) {
+ return false;
}
}
}
- return true
+ return true;
}
/**
@@ -14106,10 +5425,10 @@ var app = (function() {
*/
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
- return false
+ return false;
}
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor
- return pattern.test(toSource(value))
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
}
/**
@@ -14120,7 +5439,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
*/
function baseIsRegExp(value) {
- return isObjectLike(value) && baseGetTag(value) == regexpTag
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
}
/**
@@ -14131,7 +5450,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
*/
function baseIsSet(value) {
- return isObjectLike(value) && getTag(value) == setTag
+ return isObjectLike(value) && getTag(value) == setTag;
}
/**
@@ -14142,11 +5461,8 @@ var app = (function() {
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
*/
function baseIsTypedArray(value) {
- return (
- isObjectLike(value) &&
- isLength(value.length) &&
- !!typedArrayTags[baseGetTag(value)]
- )
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
/**
@@ -14159,18 +5475,18 @@ var app = (function() {
function baseIteratee(value) {
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
- if (typeof value == "function") {
- return value
+ if (typeof value == 'function') {
+ return value;
}
if (value == null) {
- return identity
+ return identity;
}
- if (typeof value == "object") {
+ if (typeof value == 'object') {
return isArray(value)
? baseMatchesProperty(value[0], value[1])
- : baseMatches(value)
+ : baseMatches(value);
}
- return property(value)
+ return property(value);
}
/**
@@ -14182,15 +5498,15 @@ var app = (function() {
*/
function baseKeys(object) {
if (!isPrototype(object)) {
- return nativeKeys(object)
+ return nativeKeys(object);
}
- var result = []
+ var result = [];
for (var key in Object(object)) {
- if (hasOwnProperty.call(object, key) && key != "constructor") {
- result.push(key)
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
}
}
- return result
+ return result;
}
/**
@@ -14202,22 +5518,17 @@ var app = (function() {
*/
function baseKeysIn(object) {
if (!isObject(object)) {
- return nativeKeysIn(object)
+ return nativeKeysIn(object);
}
var isProto = isPrototype(object),
- result = []
+ result = [];
for (var key in object) {
- if (
- !(
- key == "constructor" &&
- (isProto || !hasOwnProperty.call(object, key))
- )
- ) {
- result.push(key)
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
}
}
- return result
+ return result;
}
/**
@@ -14230,7 +5541,7 @@ var app = (function() {
* else `false`.
*/
function baseLt(value, other) {
- return value < other
+ return value < other;
}
/**
@@ -14243,12 +5554,12 @@ var app = (function() {
*/
function baseMap(collection, iteratee) {
var index = -1,
- result = isArrayLike(collection) ? Array(collection.length) : []
+ result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value, key, collection) {
- result[++index] = iteratee(value, key, collection)
- })
- return result
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
}
/**
@@ -14259,13 +5570,13 @@ var app = (function() {
* @returns {Function} Returns the new spec function.
*/
function baseMatches(source) {
- var matchData = getMatchData(source)
+ var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
- return matchesStrictComparable(matchData[0][0], matchData[0][1])
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function(object) {
- return object === source || baseIsMatch(object, source, matchData)
- }
+ return object === source || baseIsMatch(object, source, matchData);
+ };
}
/**
@@ -14278,18 +5589,14 @@ var app = (function() {
*/
function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
- return matchesStrictComparable(toKey(path), srcValue)
+ return matchesStrictComparable(toKey(path), srcValue);
}
return function(object) {
- var objValue = get(object, path)
- return objValue === undefined$1 && objValue === srcValue
+ var objValue = get(object, path);
+ return (objValue === undefined$1 && objValue === srcValue)
? hasIn(object, path)
- : baseIsEqual(
- srcValue,
- objValue,
- COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG
- )
- }
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+ };
}
/**
@@ -14305,42 +5612,24 @@ var app = (function() {
*/
function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
- return
+ return;
}
- baseFor(
- source,
- function(srcValue, key) {
- stack || (stack = new Stack())
- if (isObject(srcValue)) {
- baseMergeDeep(
- object,
- source,
- key,
- srcIndex,
- baseMerge,
- customizer,
- stack
- )
- } else {
- var newValue = customizer
- ? customizer(
- safeGet(object, key),
- srcValue,
- key + "",
- object,
- source,
- stack
- )
- : undefined$1
+ baseFor(source, function(srcValue, key) {
+ stack || (stack = new Stack);
+ if (isObject(srcValue)) {
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
+ : undefined$1;
- if (newValue === undefined$1) {
- newValue = srcValue
- }
- assignMergeValue(object, key, newValue)
+ if (newValue === undefined$1) {
+ newValue = srcValue;
}
- },
- keysIn
- )
+ assignMergeValue(object, key, newValue);
+ }
+ }, keysIn);
}
/**
@@ -14358,67 +5647,66 @@ var app = (function() {
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
- function baseMergeDeep(
- object,
- source,
- key,
- srcIndex,
- mergeFunc,
- customizer,
- stack
- ) {
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = safeGet(object, key),
- srcValue = safeGet(source, key),
- stacked = stack.get(srcValue)
+ srcValue = safeGet(source, key),
+ stacked = stack.get(srcValue);
if (stacked) {
- assignMergeValue(object, key, stacked)
- return
+ assignMergeValue(object, key, stacked);
+ return;
}
var newValue = customizer
- ? customizer(objValue, srcValue, key + "", object, source, stack)
- : undefined$1
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined$1;
- var isCommon = newValue === undefined$1
+ var isCommon = newValue === undefined$1;
if (isCommon) {
var isArr = isArray(srcValue),
- isBuff = !isArr && isBuffer(srcValue),
- isTyped = !isArr && !isBuff && isTypedArray(srcValue)
+ isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
- newValue = srcValue
+ newValue = srcValue;
if (isArr || isBuff || isTyped) {
if (isArray(objValue)) {
- newValue = objValue
- } else if (isArrayLikeObject(objValue)) {
- newValue = copyArray(objValue)
- } else if (isBuff) {
- isCommon = false
- newValue = cloneBuffer(srcValue, true)
- } else if (isTyped) {
- isCommon = false
- newValue = cloneTypedArray(srcValue, true)
- } else {
- newValue = []
+ newValue = objValue;
}
- } else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- newValue = objValue
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else if (isBuff) {
+ isCommon = false;
+ newValue = cloneBuffer(srcValue, true);
+ }
+ else if (isTyped) {
+ isCommon = false;
+ newValue = cloneTypedArray(srcValue, true);
+ }
+ else {
+ newValue = [];
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
if (isArguments(objValue)) {
- newValue = toPlainObject(objValue)
- } else if (!isObject(objValue) || isFunction(objValue)) {
- newValue = initCloneObject(srcValue)
+ newValue = toPlainObject(objValue);
}
- } else {
- isCommon = false
+ else if (!isObject(objValue) || isFunction(objValue)) {
+ newValue = initCloneObject(srcValue);
+ }
+ }
+ else {
+ isCommon = false;
}
}
if (isCommon) {
// Recursively merge objects and arrays (susceptible to call stack limits).
- stack.set(srcValue, newValue)
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack)
- stack["delete"](srcValue)
+ stack.set(srcValue, newValue);
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ stack['delete'](srcValue);
}
- assignMergeValue(object, key, newValue)
+ assignMergeValue(object, key, newValue);
}
/**
@@ -14430,12 +5718,12 @@ var app = (function() {
* @returns {*} Returns the nth element of `array`.
*/
function baseNth(array, n) {
- var length = array.length
+ var length = array.length;
if (!length) {
- return
+ return;
}
- n += n < 0 ? length : 0
- return isIndex(n, length) ? array[n] : undefined$1
+ n += n < 0 ? length : 0;
+ return isIndex(n, length) ? array[n] : undefined$1;
}
/**
@@ -14448,22 +5736,19 @@ var app = (function() {
* @returns {Array} Returns the new sorted array.
*/
function baseOrderBy(collection, iteratees, orders) {
- var index = -1
- iteratees = arrayMap(
- iteratees.length ? iteratees : [identity],
- baseUnary(getIteratee())
- )
+ var index = -1;
+ iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
var result = baseMap(collection, function(value, key, collection) {
var criteria = arrayMap(iteratees, function(iteratee) {
- return iteratee(value)
- })
- return { criteria: criteria, index: ++index, value: value }
- })
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
return baseSortBy(result, function(object, other) {
- return compareMultiple(object, other, orders)
- })
+ return compareMultiple(object, other, orders);
+ });
}
/**
@@ -14477,8 +5762,8 @@ var app = (function() {
*/
function basePick(object, paths) {
return basePickBy(object, paths, function(value, path) {
- return hasIn(object, path)
- })
+ return hasIn(object, path);
+ });
}
/**
@@ -14492,18 +5777,18 @@ var app = (function() {
*/
function basePickBy(object, paths, predicate) {
var index = -1,
- length = paths.length,
- result = {}
+ length = paths.length,
+ result = {};
while (++index < length) {
var path = paths[index],
- value = baseGet(object, path)
+ value = baseGet(object, path);
if (predicate(value, path)) {
- baseSet(result, castPath(path, object), value)
+ baseSet(result, castPath(path, object), value);
}
}
- return result
+ return result;
}
/**
@@ -14515,8 +5800,8 @@ var app = (function() {
*/
function basePropertyDeep(path) {
return function(object) {
- return baseGet(object, path)
- }
+ return baseGet(object, path);
+ };
}
/**
@@ -14532,31 +5817,29 @@ var app = (function() {
*/
function basePullAll(array, values, iteratee, comparator) {
var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
- index = -1,
- length = values.length,
- seen = array
+ index = -1,
+ length = values.length,
+ seen = array;
if (array === values) {
- values = copyArray(values)
+ values = copyArray(values);
}
if (iteratee) {
- seen = arrayMap(array, baseUnary(iteratee))
+ seen = arrayMap(array, baseUnary(iteratee));
}
while (++index < length) {
var fromIndex = 0,
- value = values[index],
- computed = iteratee ? iteratee(value) : value
+ value = values[index],
+ computed = iteratee ? iteratee(value) : value;
- while (
- (fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1
- ) {
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
if (seen !== array) {
- splice.call(seen, fromIndex, 1)
+ splice.call(seen, fromIndex, 1);
}
- splice.call(array, fromIndex, 1)
+ splice.call(array, fromIndex, 1);
}
}
- return array
+ return array;
}
/**
@@ -14570,20 +5853,20 @@ var app = (function() {
*/
function basePullAt(array, indexes) {
var length = array ? indexes.length : 0,
- lastIndex = length - 1
+ lastIndex = length - 1;
while (length--) {
- var index = indexes[length]
+ var index = indexes[length];
if (length == lastIndex || index !== previous) {
- var previous = index
+ var previous = index;
if (isIndex(index)) {
- splice.call(array, index, 1)
+ splice.call(array, index, 1);
} else {
- baseUnset(array, index)
+ baseUnset(array, index);
}
}
}
- return array
+ return array;
}
/**
@@ -14596,7 +5879,7 @@ var app = (function() {
* @returns {number} Returns the random number.
*/
function baseRandom(lower, upper) {
- return lower + nativeFloor(nativeRandom() * (upper - lower + 1))
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
}
/**
@@ -14612,14 +5895,14 @@ var app = (function() {
*/
function baseRange(start, end, step, fromRight) {
var index = -1,
- length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
- result = Array(length)
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
while (length--) {
- result[fromRight ? length : ++index] = start
- start += step
+ result[fromRight ? length : ++index] = start;
+ start += step;
}
- return result
+ return result;
}
/**
@@ -14631,23 +5914,23 @@ var app = (function() {
* @returns {string} Returns the repeated string.
*/
function baseRepeat(string, n) {
- var result = ""
+ var result = '';
if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
- return result
+ return result;
}
// Leverage the exponentiation by squaring algorithm for a faster repeat.
// See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
do {
if (n % 2) {
- result += string
+ result += string;
}
- n = nativeFloor(n / 2)
+ n = nativeFloor(n / 2);
if (n) {
- string += string
+ string += string;
}
- } while (n)
+ } while (n);
- return result
+ return result;
}
/**
@@ -14659,7 +5942,7 @@ var app = (function() {
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
- return setToString(overRest(func, start, identity), func + "")
+ return setToString(overRest(func, start, identity), func + '');
}
/**
@@ -14670,7 +5953,7 @@ var app = (function() {
* @returns {*} Returns the random element.
*/
function baseSample(collection) {
- return arraySample(values(collection))
+ return arraySample(values(collection));
}
/**
@@ -14682,8 +5965,8 @@ var app = (function() {
* @returns {Array} Returns the random elements.
*/
function baseSampleSize(collection, n) {
- var array = values(collection)
- return shuffleSelf(array, baseClamp(n, 0, array.length))
+ var array = values(collection);
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
}
/**
@@ -14698,36 +5981,32 @@ var app = (function() {
*/
function baseSet(object, path, value, customizer) {
if (!isObject(object)) {
- return object
+ return object;
}
- path = castPath(path, object)
+ path = castPath(path, object);
var index = -1,
- length = path.length,
- lastIndex = length - 1,
- nested = object
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
while (nested != null && ++index < length) {
var key = toKey(path[index]),
- newValue = value
+ newValue = value;
if (index != lastIndex) {
- var objValue = nested[key]
- newValue = customizer
- ? customizer(objValue, key, nested)
- : undefined$1
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
if (newValue === undefined$1) {
newValue = isObject(objValue)
? objValue
- : isIndex(path[index + 1])
- ? []
- : {}
+ : (isIndex(path[index + 1]) ? [] : {});
}
}
- assignValue(nested, key, newValue)
- nested = nested[key]
+ assignValue(nested, key, newValue);
+ nested = nested[key];
}
- return object
+ return object;
}
/**
@@ -14738,12 +6017,10 @@ var app = (function() {
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
- var baseSetData = !metaMap
- ? identity
- : function(func, data) {
- metaMap.set(func, data)
- return func
- }
+ var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+ };
/**
* The base implementation of `setToString` without support for hot loop shorting.
@@ -14753,16 +6030,14 @@ var app = (function() {
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
- var baseSetToString = !defineProperty
- ? identity
- : function(func, string) {
- return defineProperty(func, "toString", {
- configurable: true,
- enumerable: false,
- value: constant(string),
- writable: true,
- })
- }
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+ };
/**
* The base implementation of `_.shuffle`.
@@ -14772,7 +6047,7 @@ var app = (function() {
* @returns {Array} Returns the new shuffled array.
*/
function baseShuffle(collection) {
- return shuffleSelf(values(collection))
+ return shuffleSelf(values(collection));
}
/**
@@ -14786,23 +6061,23 @@ var app = (function() {
*/
function baseSlice(array, start, end) {
var index = -1,
- length = array.length
+ length = array.length;
if (start < 0) {
- start = -start > length ? 0 : length + start
+ start = -start > length ? 0 : (length + start);
}
- end = end > length ? length : end
+ end = end > length ? length : end;
if (end < 0) {
- end += length
+ end += length;
}
- length = start > end ? 0 : (end - start) >>> 0
- start >>>= 0
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
- var result = Array(length)
+ var result = Array(length);
while (++index < length) {
- result[index] = array[index + start]
+ result[index] = array[index + start];
}
- return result
+ return result;
}
/**
@@ -14815,13 +6090,13 @@ var app = (function() {
* else `false`.
*/
function baseSome(collection, predicate) {
- var result
+ var result;
baseEach(collection, function(value, index, collection) {
- result = predicate(value, index, collection)
- return !result
- })
- return !!result
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
}
/**
@@ -14838,30 +6113,23 @@ var app = (function() {
*/
function baseSortedIndex(array, value, retHighest) {
var low = 0,
- high = array == null ? low : array.length
+ high = array == null ? low : array.length;
- if (
- typeof value == "number" &&
- value === value &&
- high <= HALF_MAX_ARRAY_LENGTH
- ) {
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
while (low < high) {
var mid = (low + high) >>> 1,
- computed = array[mid]
+ computed = array[mid];
- if (
- computed !== null &&
- !isSymbol(computed) &&
- (retHighest ? computed <= value : computed < value)
- ) {
- low = mid + 1
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
+ low = mid + 1;
} else {
- high = mid
+ high = mid;
}
}
- return high
+ return high;
}
- return baseSortedIndexBy(array, value, identity, retHighest)
+ return baseSortedIndexBy(array, value, identity, retHighest);
}
/**
@@ -14878,48 +6146,43 @@ var app = (function() {
* into `array`.
*/
function baseSortedIndexBy(array, value, iteratee, retHighest) {
- value = iteratee(value)
+ value = iteratee(value);
var low = 0,
- high = array == null ? 0 : array.length,
- valIsNaN = value !== value,
- valIsNull = value === null,
- valIsSymbol = isSymbol(value),
- valIsUndefined = value === undefined$1
+ high = array == null ? 0 : array.length,
+ valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsSymbol = isSymbol(value),
+ valIsUndefined = value === undefined$1;
while (low < high) {
var mid = nativeFloor((low + high) / 2),
- computed = iteratee(array[mid]),
- othIsDefined = computed !== undefined$1,
- othIsNull = computed === null,
- othIsReflexive = computed === computed,
- othIsSymbol = isSymbol(computed)
+ computed = iteratee(array[mid]),
+ othIsDefined = computed !== undefined$1,
+ othIsNull = computed === null,
+ othIsReflexive = computed === computed,
+ othIsSymbol = isSymbol(computed);
if (valIsNaN) {
- var setLow = retHighest || othIsReflexive
+ var setLow = retHighest || othIsReflexive;
} else if (valIsUndefined) {
- setLow = othIsReflexive && (retHighest || othIsDefined)
+ setLow = othIsReflexive && (retHighest || othIsDefined);
} else if (valIsNull) {
- setLow =
- othIsReflexive && othIsDefined && (retHighest || !othIsNull)
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
} else if (valIsSymbol) {
- setLow =
- othIsReflexive &&
- othIsDefined &&
- !othIsNull &&
- (retHighest || !othIsSymbol)
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
} else if (othIsNull || othIsSymbol) {
- setLow = false
+ setLow = false;
} else {
- setLow = retHighest ? computed <= value : computed < value
+ setLow = retHighest ? (computed <= value) : (computed < value);
}
if (setLow) {
- low = mid + 1
+ low = mid + 1;
} else {
- high = mid
+ high = mid;
}
}
- return nativeMin(high, MAX_ARRAY_INDEX)
+ return nativeMin(high, MAX_ARRAY_INDEX);
}
/**
@@ -14933,20 +6196,20 @@ var app = (function() {
*/
function baseSortedUniq(array, iteratee) {
var index = -1,
- length = array.length,
- resIndex = 0,
- result = []
+ length = array.length,
+ resIndex = 0,
+ result = [];
while (++index < length) {
var value = array[index],
- computed = iteratee ? iteratee(value) : value
+ computed = iteratee ? iteratee(value) : value;
if (!index || !eq(computed, seen)) {
- var seen = computed
- result[resIndex++] = value === 0 ? 0 : value
+ var seen = computed;
+ result[resIndex++] = value === 0 ? 0 : value;
}
}
- return result
+ return result;
}
/**
@@ -14958,13 +6221,13 @@ var app = (function() {
* @returns {number} Returns the number.
*/
function baseToNumber(value) {
- if (typeof value == "number") {
- return value
+ if (typeof value == 'number') {
+ return value;
}
if (isSymbol(value)) {
- return NAN
+ return NAN;
}
- return +value
+ return +value;
}
/**
@@ -14977,18 +6240,18 @@ var app = (function() {
*/
function baseToString(value) {
// Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == "string") {
- return value
+ if (typeof value == 'string') {
+ return value;
}
if (isArray(value)) {
// Recursively convert values (susceptible to call stack limits).
- return arrayMap(value, baseToString) + ""
+ return arrayMap(value, baseToString) + '';
}
if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : ""
+ return symbolToString ? symbolToString.call(value) : '';
}
- var result = value + ""
- return result == "0" && 1 / value == -INFINITY ? "-0" : result
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
/**
@@ -15002,50 +6265,54 @@ var app = (function() {
*/
function baseUniq(array, iteratee, comparator) {
var index = -1,
- includes = arrayIncludes,
- length = array.length,
- isCommon = true,
- result = [],
- seen = result
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
if (comparator) {
- isCommon = false
- includes = arrayIncludesWith
- } else if (length >= LARGE_ARRAY_SIZE) {
- var set = iteratee ? null : createSet(array)
- if (set) {
- return setToArray(set)
- }
- isCommon = false
- includes = cacheHas
- seen = new SetCache()
- } else {
- seen = iteratee ? [] : result
+ isCommon = false;
+ includes = arrayIncludesWith;
}
- outer: while (++index < length) {
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
var value = array[index],
- computed = iteratee ? iteratee(value) : value
+ computed = iteratee ? iteratee(value) : value;
- value = comparator || value !== 0 ? value : 0
+ value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
- var seenIndex = seen.length
+ var seenIndex = seen.length;
while (seenIndex--) {
if (seen[seenIndex] === computed) {
- continue outer
+ continue outer;
}
}
if (iteratee) {
- seen.push(computed)
+ seen.push(computed);
}
- result.push(value)
- } else if (!includes(seen, computed, comparator)) {
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
if (seen !== result) {
- seen.push(computed)
+ seen.push(computed);
}
- result.push(value)
+ result.push(value);
}
}
- return result
+ return result;
}
/**
@@ -15057,9 +6324,9 @@ var app = (function() {
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
*/
function baseUnset(object, path) {
- path = castPath(path, object)
- object = parent(object, path)
- return object == null || delete object[toKey(last(path))]
+ path = castPath(path, object);
+ object = parent(object, path);
+ return object == null || delete object[toKey(last(path))];
}
/**
@@ -15073,12 +6340,7 @@ var app = (function() {
* @returns {Object} Returns `object`.
*/
function baseUpdate(object, path, updater, customizer) {
- return baseSet(
- object,
- path,
- updater(baseGet(object, path)),
- customizer
- )
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
}
/**
@@ -15094,24 +6356,14 @@ var app = (function() {
*/
function baseWhile(array, predicate, isDrop, fromRight) {
var length = array.length,
- index = fromRight ? length : -1
+ index = fromRight ? length : -1;
- while (
- (fromRight ? index-- : ++index < length) &&
- predicate(array[index], index, array)
- ) {}
+ while ((fromRight ? index-- : ++index < length) &&
+ predicate(array[index], index, array)) {}
return isDrop
- ? baseSlice(
- array,
- fromRight ? 0 : index,
- fromRight ? index + 1 : length
- )
- : baseSlice(
- array,
- fromRight ? index + 1 : 0,
- fromRight ? length : index
- )
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
}
/**
@@ -15125,20 +6377,13 @@ var app = (function() {
* @returns {*} Returns the resolved value.
*/
function baseWrapperValue(value, actions) {
- var result = value
+ var result = value;
if (result instanceof LazyWrapper) {
- result = result.value()
+ result = result.value();
}
- return arrayReduce(
- actions,
- function(result, action) {
- return action.func.apply(
- action.thisArg,
- arrayPush([result], action.args)
- )
- },
- result
- )
+ return arrayReduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
}
/**
@@ -15152,29 +6397,24 @@ var app = (function() {
* @returns {Array} Returns the new array of values.
*/
function baseXor(arrays, iteratee, comparator) {
- var length = arrays.length
+ var length = arrays.length;
if (length < 2) {
- return length ? baseUniq(arrays[0]) : []
+ return length ? baseUniq(arrays[0]) : [];
}
var index = -1,
- result = Array(length)
+ result = Array(length);
while (++index < length) {
var array = arrays[index],
- othIndex = -1
+ othIndex = -1;
while (++othIndex < length) {
if (othIndex != index) {
- result[index] = baseDifference(
- result[index] || array,
- arrays[othIndex],
- iteratee,
- comparator
- )
+ result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
}
}
}
- return baseUniq(baseFlatten(result, 1), iteratee, comparator)
+ return baseUniq(baseFlatten(result, 1), iteratee, comparator);
}
/**
@@ -15188,15 +6428,15 @@ var app = (function() {
*/
function baseZipObject(props, values, assignFunc) {
var index = -1,
- length = props.length,
- valsLength = values.length,
- result = {}
+ length = props.length,
+ valsLength = values.length,
+ result = {};
while (++index < length) {
- var value = index < valsLength ? values[index] : undefined$1
- assignFunc(result, props[index], value)
+ var value = index < valsLength ? values[index] : undefined$1;
+ assignFunc(result, props[index], value);
}
- return result
+ return result;
}
/**
@@ -15207,7 +6447,7 @@ var app = (function() {
* @returns {Array|Object} Returns the cast array-like object.
*/
function castArrayLikeObject(value) {
- return isArrayLikeObject(value) ? value : []
+ return isArrayLikeObject(value) ? value : [];
}
/**
@@ -15218,7 +6458,7 @@ var app = (function() {
* @returns {Function} Returns cast function.
*/
function castFunction(value) {
- return typeof value == "function" ? value : identity
+ return typeof value == 'function' ? value : identity;
}
/**
@@ -15231,9 +6471,9 @@ var app = (function() {
*/
function castPath(value, object) {
if (isArray(value)) {
- return value
+ return value;
}
- return isKey(value, object) ? [value] : stringToPath(toString(value))
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
}
/**
@@ -15245,7 +6485,7 @@ var app = (function() {
* @param {Function} func The function to apply a rest parameter to.
* @returns {Function} Returns the new function.
*/
- var castRest = baseRest
+ var castRest = baseRest;
/**
* Casts `array` to a slice if it's needed.
@@ -15257,9 +6497,9 @@ var app = (function() {
* @returns {Array} Returns the cast slice.
*/
function castSlice(array, start, end) {
- var length = array.length
- end = end === undefined$1 ? length : end
- return !start && end >= length ? array : baseSlice(array, start, end)
+ var length = array.length;
+ end = end === undefined$1 ? length : end;
+ return (!start && end >= length) ? array : baseSlice(array, start, end);
}
/**
@@ -15268,11 +6508,9 @@ var app = (function() {
* @private
* @param {number|Object} id The timer id or timeout object of the timer to clear.
*/
- var clearTimeout =
- ctxClearTimeout ||
- function(id) {
- return root.clearTimeout(id)
- }
+ var clearTimeout = ctxClearTimeout || function(id) {
+ return root.clearTimeout(id);
+ };
/**
* Creates a clone of `buffer`.
@@ -15284,15 +6522,13 @@ var app = (function() {
*/
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
- return buffer.slice()
+ return buffer.slice();
}
var length = buffer.length,
- result = allocUnsafe
- ? allocUnsafe(length)
- : new buffer.constructor(length)
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
- buffer.copy(result)
- return result
+ buffer.copy(result);
+ return result;
}
/**
@@ -15303,9 +6539,9 @@ var app = (function() {
* @returns {ArrayBuffer} Returns the cloned array buffer.
*/
function cloneArrayBuffer(arrayBuffer) {
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength)
- new Uint8Array(result).set(new Uint8Array(arrayBuffer))
- return result
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
}
/**
@@ -15317,14 +6553,8 @@ var app = (function() {
* @returns {Object} Returns the cloned data view.
*/
function cloneDataView(dataView, isDeep) {
- var buffer = isDeep
- ? cloneArrayBuffer(dataView.buffer)
- : dataView.buffer
- return new dataView.constructor(
- buffer,
- dataView.byteOffset,
- dataView.byteLength
- )
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
/**
@@ -15335,12 +6565,9 @@ var app = (function() {
* @returns {Object} Returns the cloned regexp.
*/
function cloneRegExp(regexp) {
- var result = new regexp.constructor(
- regexp.source,
- reFlags.exec(regexp)
- )
- result.lastIndex = regexp.lastIndex
- return result
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
}
/**
@@ -15351,7 +6578,7 @@ var app = (function() {
* @returns {Object} Returns the cloned symbol object.
*/
function cloneSymbol(symbol) {
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
/**
@@ -15363,14 +6590,8 @@ var app = (function() {
* @returns {Object} Returns the cloned typed array.
*/
function cloneTypedArray(typedArray, isDeep) {
- var buffer = isDeep
- ? cloneArrayBuffer(typedArray.buffer)
- : typedArray.buffer
- return new typedArray.constructor(
- buffer,
- typedArray.byteOffset,
- typedArray.length
- )
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
/**
@@ -15384,43 +6605,31 @@ var app = (function() {
function compareAscending(value, other) {
if (value !== other) {
var valIsDefined = value !== undefined$1,
- valIsNull = value === null,
- valIsReflexive = value === value,
- valIsSymbol = isSymbol(value)
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = isSymbol(value);
var othIsDefined = other !== undefined$1,
- othIsNull = other === null,
- othIsReflexive = other === other,
- othIsSymbol = isSymbol(other)
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = isSymbol(other);
- if (
- (!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
- (valIsSymbol &&
- othIsDefined &&
- othIsReflexive &&
- !othIsNull &&
- !othIsSymbol) ||
- (valIsNull && othIsDefined && othIsReflexive) ||
- (!valIsDefined && othIsReflexive) ||
- !valIsReflexive
- ) {
- return 1
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
}
- if (
- (!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
- (othIsSymbol &&
- valIsDefined &&
- valIsReflexive &&
- !valIsNull &&
- !valIsSymbol) ||
- (othIsNull && valIsDefined && valIsReflexive) ||
- (!othIsDefined && valIsReflexive) ||
- !othIsReflexive
- ) {
- return -1
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
}
}
- return 0
+ return 0;
}
/**
@@ -15439,22 +6648,19 @@ var app = (function() {
*/
function compareMultiple(object, other, orders) {
var index = -1,
- objCriteria = object.criteria,
- othCriteria = other.criteria,
- length = objCriteria.length,
- ordersLength = orders.length
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
while (++index < length) {
- var result = compareAscending(
- objCriteria[index],
- othCriteria[index]
- )
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
if (result) {
if (index >= ordersLength) {
- return result
+ return result;
}
- var order = orders[index]
- return result * (order == "desc" ? -1 : 1)
+ var order = orders[index];
+ return result * (order == 'desc' ? -1 : 1);
}
}
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
@@ -15464,7 +6670,7 @@ var app = (function() {
//
// This also ensures a stable sort in V8 and other engines.
// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
- return object.index - other.index
+ return object.index - other.index;
}
/**
@@ -15480,26 +6686,26 @@ var app = (function() {
*/
function composeArgs(args, partials, holders, isCurried) {
var argsIndex = -1,
- argsLength = args.length,
- holdersLength = holders.length,
- leftIndex = -1,
- leftLength = partials.length,
- rangeLength = nativeMax(argsLength - holdersLength, 0),
- result = Array(leftLength + rangeLength),
- isUncurried = !isCurried
+ argsLength = args.length,
+ holdersLength = holders.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(leftLength + rangeLength),
+ isUncurried = !isCurried;
while (++leftIndex < leftLength) {
- result[leftIndex] = partials[leftIndex]
+ result[leftIndex] = partials[leftIndex];
}
while (++argsIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
- result[holders[argsIndex]] = args[argsIndex]
+ result[holders[argsIndex]] = args[argsIndex];
}
}
while (rangeLength--) {
- result[leftIndex++] = args[argsIndex++]
+ result[leftIndex++] = args[argsIndex++];
}
- return result
+ return result;
}
/**
@@ -15515,28 +6721,28 @@ var app = (function() {
*/
function composeArgsRight(args, partials, holders, isCurried) {
var argsIndex = -1,
- argsLength = args.length,
- holdersIndex = -1,
- holdersLength = holders.length,
- rightIndex = -1,
- rightLength = partials.length,
- rangeLength = nativeMax(argsLength - holdersLength, 0),
- result = Array(rangeLength + rightLength),
- isUncurried = !isCurried
+ argsLength = args.length,
+ holdersIndex = -1,
+ holdersLength = holders.length,
+ rightIndex = -1,
+ rightLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(rangeLength + rightLength),
+ isUncurried = !isCurried;
while (++argsIndex < rangeLength) {
- result[argsIndex] = args[argsIndex]
+ result[argsIndex] = args[argsIndex];
}
- var offset = argsIndex
+ var offset = argsIndex;
while (++rightIndex < rightLength) {
- result[offset + rightIndex] = partials[rightIndex]
+ result[offset + rightIndex] = partials[rightIndex];
}
while (++holdersIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
- result[offset + holders[holdersIndex]] = args[argsIndex++]
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
}
}
- return result
+ return result;
}
/**
@@ -15549,13 +6755,13 @@ var app = (function() {
*/
function copyArray(source, array) {
var index = -1,
- length = source.length
+ length = source.length;
- array || (array = Array(length))
+ array || (array = Array(length));
while (++index < length) {
- array[index] = source[index]
+ array[index] = source[index];
}
- return array
+ return array;
}
/**
@@ -15569,29 +6775,29 @@ var app = (function() {
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
- var isNew = !object
- object || (object = {})
+ var isNew = !object;
+ object || (object = {});
var index = -1,
- length = props.length
+ length = props.length;
while (++index < length) {
- var key = props[index]
+ var key = props[index];
var newValue = customizer
? customizer(object[key], source[key], key, object, source)
- : undefined$1
+ : undefined$1;
if (newValue === undefined$1) {
- newValue = source[key]
+ newValue = source[key];
}
if (isNew) {
- baseAssignValue(object, key, newValue)
+ baseAssignValue(object, key, newValue);
} else {
- assignValue(object, key, newValue)
+ assignValue(object, key, newValue);
}
}
- return object
+ return object;
}
/**
@@ -15603,7 +6809,7 @@ var app = (function() {
* @returns {Object} Returns `object`.
*/
function copySymbols(source, object) {
- return copyObject(source, getSymbols(source), object)
+ return copyObject(source, getSymbols(source), object);
}
/**
@@ -15615,7 +6821,7 @@ var app = (function() {
* @returns {Object} Returns `object`.
*/
function copySymbolsIn(source, object) {
- return copyObject(source, getSymbolsIn(source), object)
+ return copyObject(source, getSymbolsIn(source), object);
}
/**
@@ -15629,15 +6835,10 @@ var app = (function() {
function createAggregator(setter, initializer) {
return function(collection, iteratee) {
var func = isArray(collection) ? arrayAggregator : baseAggregator,
- accumulator = initializer ? initializer() : {}
+ accumulator = initializer ? initializer() : {};
- return func(
- collection,
- setter,
- getIteratee(iteratee, 2),
- accumulator
- )
- }
+ return func(collection, setter, getIteratee(iteratee, 2), accumulator);
+ };
}
/**
@@ -15650,28 +6851,27 @@ var app = (function() {
function createAssigner(assigner) {
return baseRest(function(object, sources) {
var index = -1,
- length = sources.length,
- customizer = length > 1 ? sources[length - 1] : undefined$1,
- guard = length > 2 ? sources[2] : undefined$1
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined$1,
+ guard = length > 2 ? sources[2] : undefined$1;
- customizer =
- assigner.length > 3 && typeof customizer == "function"
- ? (length--, customizer)
- : undefined$1
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined$1;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- customizer = length < 3 ? undefined$1 : customizer
- length = 1
+ customizer = length < 3 ? undefined$1 : customizer;
+ length = 1;
}
- object = Object(object)
+ object = Object(object);
while (++index < length) {
- var source = sources[index]
+ var source = sources[index];
if (source) {
- assigner(object, source, index, customizer)
+ assigner(object, source, index, customizer);
}
}
- return object
- })
+ return object;
+ });
}
/**
@@ -15685,22 +6885,22 @@ var app = (function() {
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
if (collection == null) {
- return collection
+ return collection;
}
if (!isArrayLike(collection)) {
- return eachFunc(collection, iteratee)
+ return eachFunc(collection, iteratee);
}
var length = collection.length,
- index = fromRight ? length : -1,
- iterable = Object(collection)
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
- while (fromRight ? index-- : ++index < length) {
+ while ((fromRight ? index-- : ++index < length)) {
if (iteratee(iterable[index], index, iterable) === false) {
- break
+ break;
}
}
- return collection
- }
+ return collection;
+ };
}
/**
@@ -15713,18 +6913,18 @@ var app = (function() {
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var index = -1,
- iterable = Object(object),
- props = keysFunc(object),
- length = props.length
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
while (length--) {
- var key = props[fromRight ? length : ++index]
+ var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
- break
+ break;
}
}
- return object
- }
+ return object;
+ };
}
/**
@@ -15739,14 +6939,13 @@ var app = (function() {
*/
function createBind(func, bitmask, thisArg) {
var isBind = bitmask & WRAP_BIND_FLAG,
- Ctor = createCtor(func)
+ Ctor = createCtor(func);
function wrapper() {
- var fn =
- this && this !== root && this instanceof wrapper ? Ctor : func
- return fn.apply(isBind ? thisArg : this, arguments)
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, arguments);
}
- return wrapper
+ return wrapper;
}
/**
@@ -15758,20 +6957,22 @@ var app = (function() {
*/
function createCaseFirst(methodName) {
return function(string) {
- string = toString(string)
+ string = toString(string);
var strSymbols = hasUnicode(string)
? stringToArray(string)
- : undefined$1
+ : undefined$1;
- var chr = strSymbols ? strSymbols[0] : string.charAt(0)
+ var chr = strSymbols
+ ? strSymbols[0]
+ : string.charAt(0);
var trailing = strSymbols
- ? castSlice(strSymbols, 1).join("")
- : string.slice(1)
+ ? castSlice(strSymbols, 1).join('')
+ : string.slice(1);
- return chr[methodName]() + trailing
- }
+ return chr[methodName]() + trailing;
+ };
}
/**
@@ -15783,12 +6984,8 @@ var app = (function() {
*/
function createCompounder(callback) {
return function(string) {
- return arrayReduce(
- words(deburr(string).replace(reApos, "")),
- callback,
- ""
- )
- }
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+ };
}
/**
@@ -15804,47 +7001,24 @@ var app = (function() {
// Use a `switch` statement to work with class constructors. See
// http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
// for more details.
- var args = arguments
+ var args = arguments;
switch (args.length) {
- case 0:
- return new Ctor()
- case 1:
- return new Ctor(args[0])
- case 2:
- return new Ctor(args[0], args[1])
- case 3:
- return new Ctor(args[0], args[1], args[2])
- case 4:
- return new Ctor(args[0], args[1], args[2], args[3])
- case 5:
- return new Ctor(args[0], args[1], args[2], args[3], args[4])
- case 6:
- return new Ctor(
- args[0],
- args[1],
- args[2],
- args[3],
- args[4],
- args[5]
- )
- case 7:
- return new Ctor(
- args[0],
- args[1],
- args[2],
- args[3],
- args[4],
- args[5],
- args[6]
- )
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
}
var thisBinding = baseCreate(Ctor.prototype),
- result = Ctor.apply(thisBinding, args)
+ result = Ctor.apply(thisBinding, args);
// Mimic the constructor's `return` behavior.
// See https://es5.github.io/#x13.2.2 for more details.
- return isObject(result) ? result : thisBinding
- }
+ return isObject(result) ? result : thisBinding;
+ };
}
/**
@@ -15857,44 +7031,31 @@ var app = (function() {
* @returns {Function} Returns the new wrapped function.
*/
function createCurry(func, bitmask, arity) {
- var Ctor = createCtor(func)
+ var Ctor = createCtor(func);
function wrapper() {
var length = arguments.length,
- args = Array(length),
- index = length,
- placeholder = getHolder(wrapper)
+ args = Array(length),
+ index = length,
+ placeholder = getHolder(wrapper);
while (index--) {
- args[index] = arguments[index]
+ args[index] = arguments[index];
}
- var holders =
- length < 3 &&
- args[0] !== placeholder &&
- args[length - 1] !== placeholder
- ? []
- : replaceHolders(args, placeholder)
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+ ? []
+ : replaceHolders(args, placeholder);
- length -= holders.length
+ length -= holders.length;
if (length < arity) {
return createRecurry(
- func,
- bitmask,
- createHybrid,
- wrapper.placeholder,
- undefined$1,
- args,
- holders,
- undefined$1,
- undefined$1,
- arity - length
- )
+ func, bitmask, createHybrid, wrapper.placeholder, undefined$1,
+ args, holders, undefined$1, undefined$1, arity - length);
}
- var fn =
- this && this !== root && this instanceof wrapper ? Ctor : func
- return apply(fn, this, args)
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return apply(fn, this, args);
}
- return wrapper
+ return wrapper;
}
/**
@@ -15906,19 +7067,15 @@ var app = (function() {
*/
function createFind(findIndexFunc) {
return function(collection, predicate, fromIndex) {
- var iterable = Object(collection)
+ var iterable = Object(collection);
if (!isArrayLike(collection)) {
- var iteratee = getIteratee(predicate, 3)
- collection = keys(collection)
- predicate = function(key) {
- return iteratee(iterable[key], key, iterable)
- }
+ var iteratee = getIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
}
- var index = findIndexFunc(collection, predicate, fromIndex)
- return index > -1
- ? iterable[iteratee ? collection[index] : index]
- : undefined$1
- }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined$1;
+ };
}
/**
@@ -15931,63 +7088,55 @@ var app = (function() {
function createFlow(fromRight) {
return flatRest(function(funcs) {
var length = funcs.length,
- index = length,
- prereq = LodashWrapper.prototype.thru
+ index = length,
+ prereq = LodashWrapper.prototype.thru;
if (fromRight) {
- funcs.reverse()
+ funcs.reverse();
}
while (index--) {
- var func = funcs[index]
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT)
+ var func = funcs[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
}
- if (prereq && !wrapper && getFuncName(func) == "wrapper") {
- var wrapper = new LodashWrapper([], true)
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
+ var wrapper = new LodashWrapper([], true);
}
}
- index = wrapper ? index : length
+ index = wrapper ? index : length;
while (++index < length) {
- func = funcs[index]
+ func = funcs[index];
var funcName = getFuncName(func),
- data = funcName == "wrapper" ? getData(func) : undefined$1
+ data = funcName == 'wrapper' ? getData(func) : undefined$1;
- if (
- data &&
- isLaziable(data[0]) &&
- data[1] ==
- (WRAP_ARY_FLAG |
- WRAP_CURRY_FLAG |
- WRAP_PARTIAL_FLAG |
- WRAP_REARG_FLAG) &&
- !data[4].length &&
- data[9] == 1
- ) {
- wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3])
+ if (data && isLaziable(data[0]) &&
+ data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
+ !data[4].length && data[9] == 1
+ ) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
} else {
- wrapper =
- func.length == 1 && isLaziable(func)
- ? wrapper[funcName]()
- : wrapper.thru(func)
+ wrapper = (func.length == 1 && isLaziable(func))
+ ? wrapper[funcName]()
+ : wrapper.thru(func);
}
}
return function() {
var args = arguments,
- value = args[0]
+ value = args[0];
if (wrapper && args.length == 1 && isArray(value)) {
- return wrapper.plant(value).value()
+ return wrapper.plant(value).value();
}
var index = 0,
- result = length ? funcs[index].apply(this, args) : value
+ result = length ? funcs[index].apply(this, args) : value;
while (++index < length) {
- result = funcs[index].call(this, result)
+ result = funcs[index].call(this, result);
}
- return result
- }
- })
+ return result;
+ };
+ });
}
/**
@@ -16009,82 +7158,58 @@ var app = (function() {
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
- function createHybrid(
- func,
- bitmask,
- thisArg,
- partials,
- holders,
- partialsRight,
- holdersRight,
- argPos,
- ary,
- arity
- ) {
+ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
var isAry = bitmask & WRAP_ARY_FLAG,
- isBind = bitmask & WRAP_BIND_FLAG,
- isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
- isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
- isFlip = bitmask & WRAP_FLIP_FLAG,
- Ctor = isBindKey ? undefined$1 : createCtor(func)
+ isBind = bitmask & WRAP_BIND_FLAG,
+ isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
+ isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
+ isFlip = bitmask & WRAP_FLIP_FLAG,
+ Ctor = isBindKey ? undefined$1 : createCtor(func);
function wrapper() {
var length = arguments.length,
- args = Array(length),
- index = length
+ args = Array(length),
+ index = length;
while (index--) {
- args[index] = arguments[index]
+ args[index] = arguments[index];
}
if (isCurried) {
var placeholder = getHolder(wrapper),
- holdersCount = countHolders(args, placeholder)
+ holdersCount = countHolders(args, placeholder);
}
if (partials) {
- args = composeArgs(args, partials, holders, isCurried)
+ args = composeArgs(args, partials, holders, isCurried);
}
if (partialsRight) {
- args = composeArgsRight(
- args,
- partialsRight,
- holdersRight,
- isCurried
- )
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
}
- length -= holdersCount
+ length -= holdersCount;
if (isCurried && length < arity) {
- var newHolders = replaceHolders(args, placeholder)
+ var newHolders = replaceHolders(args, placeholder);
return createRecurry(
- func,
- bitmask,
- createHybrid,
- wrapper.placeholder,
- thisArg,
- args,
- newHolders,
- argPos,
- ary,
- arity - length
- )
+ func, bitmask, createHybrid, wrapper.placeholder, thisArg,
+ args, newHolders, argPos, ary, arity - length
+ );
}
var thisBinding = isBind ? thisArg : this,
- fn = isBindKey ? thisBinding[func] : func
+ fn = isBindKey ? thisBinding[func] : func;
- length = args.length
+ length = args.length;
if (argPos) {
- args = reorder(args, argPos)
+ args = reorder(args, argPos);
} else if (isFlip && length > 1) {
- args.reverse()
+ args.reverse();
}
if (isAry && ary < length) {
- args.length = ary
+ args.length = ary;
}
if (this && this !== root && this instanceof wrapper) {
- fn = Ctor || createCtor(fn)
+ fn = Ctor || createCtor(fn);
}
- return fn.apply(thisBinding, args)
+ return fn.apply(thisBinding, args);
}
- return wrapper
+ return wrapper;
}
/**
@@ -16097,8 +7222,8 @@ var app = (function() {
*/
function createInverter(setter, toIteratee) {
return function(object, iteratee) {
- return baseInverter(object, setter, toIteratee(iteratee), {})
- }
+ return baseInverter(object, setter, toIteratee(iteratee), {});
+ };
}
/**
@@ -16111,28 +7236,28 @@ var app = (function() {
*/
function createMathOperation(operator, defaultValue) {
return function(value, other) {
- var result
+ var result;
if (value === undefined$1 && other === undefined$1) {
- return defaultValue
+ return defaultValue;
}
if (value !== undefined$1) {
- result = value
+ result = value;
}
if (other !== undefined$1) {
if (result === undefined$1) {
- return other
+ return other;
}
- if (typeof value == "string" || typeof other == "string") {
- value = baseToString(value)
- other = baseToString(other)
+ if (typeof value == 'string' || typeof other == 'string') {
+ value = baseToString(value);
+ other = baseToString(other);
} else {
- value = baseToNumber(value)
- other = baseToNumber(other)
+ value = baseToNumber(value);
+ other = baseToNumber(other);
}
- result = operator(value, other)
+ result = operator(value, other);
}
- return result
- }
+ return result;
+ };
}
/**
@@ -16144,14 +7269,14 @@ var app = (function() {
*/
function createOver(arrayFunc) {
return flatRest(function(iteratees) {
- iteratees = arrayMap(iteratees, baseUnary(getIteratee()))
+ iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
return baseRest(function(args) {
- var thisArg = this
+ var thisArg = this;
return arrayFunc(iteratees, function(iteratee) {
- return apply(iteratee, thisArg, args)
- })
- })
- })
+ return apply(iteratee, thisArg, args);
+ });
+ });
+ });
}
/**
@@ -16164,16 +7289,16 @@ var app = (function() {
* @returns {string} Returns the padding for `string`.
*/
function createPadding(length, chars) {
- chars = chars === undefined$1 ? " " : baseToString(chars)
+ chars = chars === undefined$1 ? ' ' : baseToString(chars);
- var charsLength = chars.length
+ var charsLength = chars.length;
if (charsLength < 2) {
- return charsLength ? baseRepeat(chars, length) : chars
+ return charsLength ? baseRepeat(chars, length) : chars;
}
- var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)))
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
return hasUnicode(chars)
- ? castSlice(stringToArray(result), 0, length).join("")
- : result.slice(0, length)
+ ? castSlice(stringToArray(result), 0, length).join('')
+ : result.slice(0, length);
}
/**
@@ -16190,26 +7315,25 @@ var app = (function() {
*/
function createPartial(func, bitmask, thisArg, partials) {
var isBind = bitmask & WRAP_BIND_FLAG,
- Ctor = createCtor(func)
+ Ctor = createCtor(func);
function wrapper() {
var argsIndex = -1,
- argsLength = arguments.length,
- leftIndex = -1,
- leftLength = partials.length,
- args = Array(leftLength + argsLength),
- fn =
- this && this !== root && this instanceof wrapper ? Ctor : func
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
while (++leftIndex < leftLength) {
- args[leftIndex] = partials[leftIndex]
+ args[leftIndex] = partials[leftIndex];
}
while (argsLength--) {
- args[leftIndex++] = arguments[++argsIndex]
+ args[leftIndex++] = arguments[++argsIndex];
}
- return apply(fn, isBind ? thisArg : this, args)
+ return apply(fn, isBind ? thisArg : this, args);
}
- return wrapper
+ return wrapper;
}
/**
@@ -16221,25 +7345,20 @@ var app = (function() {
*/
function createRange(fromRight) {
return function(start, end, step) {
- if (
- step &&
- typeof step != "number" &&
- isIterateeCall(start, end, step)
- ) {
- end = step = undefined$1
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
+ end = step = undefined$1;
}
// Ensure the sign of `-0` is preserved.
- start = toFinite(start)
+ start = toFinite(start);
if (end === undefined$1) {
- end = start
- start = 0
+ end = start;
+ start = 0;
} else {
- end = toFinite(end)
+ end = toFinite(end);
}
- step =
- step === undefined$1 ? (start < end ? 1 : -1) : toFinite(step)
- return baseRange(start, end, step, fromRight)
- }
+ step = step === undefined$1 ? (start < end ? 1 : -1) : toFinite(step);
+ return baseRange(start, end, step, fromRight);
+ };
}
/**
@@ -16251,12 +7370,12 @@ var app = (function() {
*/
function createRelationalOperation(operator) {
return function(value, other) {
- if (!(typeof value == "string" && typeof other == "string")) {
- value = toNumber(value)
- other = toNumber(other)
+ if (!(typeof value == 'string' && typeof other == 'string')) {
+ value = toNumber(value);
+ other = toNumber(other);
}
- return operator(value, other)
- }
+ return operator(value, other);
+ };
}
/**
@@ -16276,49 +7395,30 @@ var app = (function() {
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
- function createRecurry(
- func,
- bitmask,
- wrapFunc,
- placeholder,
- thisArg,
- partials,
- holders,
- argPos,
- ary,
- arity
- ) {
+ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
var isCurry = bitmask & WRAP_CURRY_FLAG,
- newHolders = isCurry ? holders : undefined$1,
- newHoldersRight = isCurry ? undefined$1 : holders,
- newPartials = isCurry ? partials : undefined$1,
- newPartialsRight = isCurry ? undefined$1 : partials
+ newHolders = isCurry ? holders : undefined$1,
+ newHoldersRight = isCurry ? undefined$1 : holders,
+ newPartials = isCurry ? partials : undefined$1,
+ newPartialsRight = isCurry ? undefined$1 : partials;
- bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG
- bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG)
+ bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
- bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG)
+ bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
}
var newData = [
- func,
- bitmask,
- thisArg,
- newPartials,
- newHolders,
- newPartialsRight,
- newHoldersRight,
- argPos,
- ary,
- arity,
- ]
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+ newHoldersRight, argPos, ary, arity
+ ];
- var result = wrapFunc.apply(undefined$1, newData)
+ var result = wrapFunc.apply(undefined$1, newData);
if (isLaziable(func)) {
- setData(result, newData)
+ setData(result, newData);
}
- result.placeholder = placeholder
- return setWrapToString(result, func, bitmask)
+ result.placeholder = placeholder;
+ return setWrapToString(result, func, bitmask);
}
/**
@@ -16329,22 +7429,21 @@ var app = (function() {
* @returns {Function} Returns the new round function.
*/
function createRound(methodName) {
- var func = Math[methodName]
+ var func = Math[methodName];
return function(number, precision) {
- number = toNumber(number)
- precision =
- precision == null ? 0 : nativeMin(toInteger(precision), 292)
+ number = toNumber(number);
+ precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
if (precision && nativeIsFinite(number)) {
// Shift with exponential notation to avoid floating-point issues.
// See [MDN](https://mdn.io/round#Examples) for more details.
- var pair = (toString(number) + "e").split("e"),
- value = func(pair[0] + "e" + (+pair[1] + precision))
+ var pair = (toString(number) + 'e').split('e'),
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
- pair = (toString(value) + "e").split("e")
- return +(pair[0] + "e" + (+pair[1] - precision))
+ pair = (toString(value) + 'e').split('e');
+ return +(pair[0] + 'e' + (+pair[1] - precision));
}
- return func(number)
- }
+ return func(number);
+ };
}
/**
@@ -16354,11 +7453,9 @@ var app = (function() {
* @param {Array} values The values to add to the set.
* @returns {Object} Returns the new set.
*/
- var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY)
- ? noop
- : function(values) {
- return new Set(values)
- }
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+ };
/**
* Creates a `_.toPairs` or `_.toPairsIn` function.
@@ -16369,15 +7466,15 @@ var app = (function() {
*/
function createToPairs(keysFunc) {
return function(object) {
- var tag = getTag(object)
+ var tag = getTag(object);
if (tag == mapTag) {
- return mapToArray(object)
+ return mapToArray(object);
}
if (tag == setTag) {
- return setToPairs(object)
+ return setToPairs(object);
}
- return baseToPairs(object, keysFunc(object))
- }
+ return baseToPairs(object, keysFunc(object));
+ };
}
/**
@@ -16405,86 +7502,59 @@ var app = (function() {
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
- function createWrap(
- func,
- bitmask,
- thisArg,
- partials,
- holders,
- argPos,
- ary,
- arity
- ) {
- var isBindKey = bitmask & WRAP_BIND_KEY_FLAG
- if (!isBindKey && typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT)
+ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
}
- var length = partials ? partials.length : 0
+ var length = partials ? partials.length : 0;
if (!length) {
- bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG)
- partials = holders = undefined$1
+ bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined$1;
}
- ary = ary === undefined$1 ? ary : nativeMax(toInteger(ary), 0)
- arity = arity === undefined$1 ? arity : toInteger(arity)
- length -= holders ? holders.length : 0
+ ary = ary === undefined$1 ? ary : nativeMax(toInteger(ary), 0);
+ arity = arity === undefined$1 ? arity : toInteger(arity);
+ length -= holders ? holders.length : 0;
if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
var partialsRight = partials,
- holdersRight = holders
+ holdersRight = holders;
- partials = holders = undefined$1
+ partials = holders = undefined$1;
}
- var data = isBindKey ? undefined$1 : getData(func)
+ var data = isBindKey ? undefined$1 : getData(func);
var newData = [
- func,
- bitmask,
- thisArg,
- partials,
- holders,
- partialsRight,
- holdersRight,
- argPos,
- ary,
- arity,
- ]
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+ argPos, ary, arity
+ ];
if (data) {
- mergeData(newData, data)
+ mergeData(newData, data);
}
- func = newData[0]
- bitmask = newData[1]
- thisArg = newData[2]
- partials = newData[3]
- holders = newData[4]
- arity = newData[9] =
- newData[9] === undefined$1
- ? isBindKey
- ? 0
- : func.length
- : nativeMax(newData[9] - length, 0)
+ func = newData[0];
+ bitmask = newData[1];
+ thisArg = newData[2];
+ partials = newData[3];
+ holders = newData[4];
+ arity = newData[9] = newData[9] === undefined$1
+ ? (isBindKey ? 0 : func.length)
+ : nativeMax(newData[9] - length, 0);
if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
- bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)
+ bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
}
if (!bitmask || bitmask == WRAP_BIND_FLAG) {
- var result = createBind(func, bitmask, thisArg)
- } else if (
- bitmask == WRAP_CURRY_FLAG ||
- bitmask == WRAP_CURRY_RIGHT_FLAG
- ) {
- result = createCurry(func, bitmask, arity)
- } else if (
- (bitmask == WRAP_PARTIAL_FLAG ||
- bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) &&
- !holders.length
- ) {
- result = createPartial(func, bitmask, thisArg, partials)
+ var result = createBind(func, bitmask, thisArg);
+ } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
+ result = createCurry(func, bitmask, arity);
+ } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
+ result = createPartial(func, bitmask, thisArg, partials);
} else {
- result = createHybrid.apply(undefined$1, newData)
+ result = createHybrid.apply(undefined$1, newData);
}
- var setter = data ? baseSetData : setData
- return setWrapToString(setter(result, newData), func, bitmask)
+ var setter = data ? baseSetData : setData;
+ return setWrapToString(setter(result, newData), func, bitmask);
}
/**
@@ -16500,14 +7570,11 @@ var app = (function() {
* @returns {*} Returns the value to assign.
*/
function customDefaultsAssignIn(objValue, srcValue, key, object) {
- if (
- objValue === undefined$1 ||
- (eq(objValue, objectProto[key]) &&
- !hasOwnProperty.call(object, key))
- ) {
- return srcValue
+ if (objValue === undefined$1 ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
}
- return objValue
+ return objValue;
}
/**
@@ -16524,27 +7591,14 @@ var app = (function() {
* counterparts.
* @returns {*} Returns the value to assign.
*/
- function customDefaultsMerge(
- objValue,
- srcValue,
- key,
- object,
- source,
- stack
- ) {
+ function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
if (isObject(objValue) && isObject(srcValue)) {
// Recursively merge objects and arrays (susceptible to call stack limits).
- stack.set(srcValue, objValue)
- baseMerge(
- objValue,
- srcValue,
- undefined$1,
- customDefaultsMerge,
- stack
- )
- stack["delete"](srcValue)
+ stack.set(srcValue, objValue);
+ baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
+ stack['delete'](srcValue);
}
- return objValue
+ return objValue;
}
/**
@@ -16557,7 +7611,7 @@ var app = (function() {
* @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
*/
function customOmitClone(value) {
- return isPlainObject(value) ? undefined$1 : value
+ return isPlainObject(value) ? undefined$1 : value;
}
/**
@@ -16573,80 +7627,65 @@ var app = (function() {
* @param {Object} stack Tracks traversed `array` and `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/
- function equalArrays(
- array,
- other,
- bitmask,
- customizer,
- equalFunc,
- stack
- ) {
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- arrLength = array.length,
- othLength = other.length
+ arrLength = array.length,
+ othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false
+ return false;
}
// Assume cyclic values are equal.
- var stacked = stack.get(array)
+ var stacked = stack.get(array);
if (stacked && stack.get(other)) {
- return stacked == other
+ return stacked == other;
}
var index = -1,
- result = true,
- seen =
- bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined$1
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined$1;
- stack.set(array, other)
- stack.set(other, array)
+ stack.set(array, other);
+ stack.set(other, array);
// Ignore non-index properties.
while (++index < arrLength) {
var arrValue = array[index],
- othValue = other[index]
+ othValue = other[index];
if (customizer) {
var compared = isPartial
? customizer(othValue, arrValue, index, other, array, stack)
- : customizer(arrValue, othValue, index, array, other, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== undefined$1) {
if (compared) {
- continue
+ continue;
}
- result = false
- break
+ result = false;
+ break;
}
// Recursively compare arrays (susceptible to call stack limits).
if (seen) {
- if (
- !arraySome(other, function(othValue, othIndex) {
- if (
- !cacheHas(seen, othIndex) &&
- (arrValue === othValue ||
- equalFunc(arrValue, othValue, bitmask, customizer, stack))
- ) {
- return seen.push(othIndex)
- }
- })
- ) {
- result = false
- break
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
}
- } else if (
- !(
- arrValue === othValue ||
- equalFunc(arrValue, othValue, bitmask, customizer, stack)
- )
- ) {
- result = false
- break
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
}
}
- stack["delete"](array)
- stack["delete"](other)
- return result
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
}
/**
@@ -16666,90 +7705,69 @@ var app = (function() {
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
- function equalByTag(
- object,
- other,
- tag,
- bitmask,
- customizer,
- equalFunc,
- stack
- ) {
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
- if (
- object.byteLength != other.byteLength ||
- object.byteOffset != other.byteOffset
- ) {
- return false
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
}
- object = object.buffer
- other = other.buffer
+ object = object.buffer;
+ other = other.buffer;
case arrayBufferTag:
- if (
- object.byteLength != other.byteLength ||
- !equalFunc(new Uint8Array(object), new Uint8Array(other))
- ) {
- return false
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
}
- return true
+ return true;
case boolTag:
case dateTag:
case numberTag:
// Coerce booleans to `1` or `0` and dates to milliseconds.
// Invalid dates are coerced to `NaN`.
- return eq(+object, +other)
+ return eq(+object, +other);
case errorTag:
- return (
- object.name == other.name && object.message == other.message
- )
+ return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
// for more details.
- return object == other + ""
+ return object == (other + '');
case mapTag:
- var convert = mapToArray
+ var convert = mapToArray;
case setTag:
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG
- convert || (convert = setToArray)
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+ convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
- return false
+ return false;
}
// Assume cyclic values are equal.
- var stacked = stack.get(object)
+ var stacked = stack.get(object);
if (stacked) {
- return stacked == other
+ return stacked == other;
}
- bitmask |= COMPARE_UNORDERED_FLAG
+ bitmask |= COMPARE_UNORDERED_FLAG;
// Recursively compare objects (susceptible to call stack limits).
- stack.set(object, other)
- var result = equalArrays(
- convert(object),
- convert(other),
- bitmask,
- customizer,
- equalFunc,
- stack
- )
- stack["delete"](object)
- return result
+ stack.set(object, other);
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+ stack['delete'](object);
+ return result;
case symbolTag:
if (symbolValueOf) {
- return symbolValueOf.call(object) == symbolValueOf.call(other)
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
- return false
+ return false;
}
/**
@@ -16765,84 +7783,68 @@ var app = (function() {
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
- function equalObjects(
- object,
- other,
- bitmask,
- customizer,
- equalFunc,
- stack
- ) {
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- objProps = getAllKeys(object),
- objLength = objProps.length,
- othProps = getAllKeys(other),
- othLength = othProps.length
+ objProps = getAllKeys(object),
+ objLength = objProps.length,
+ othProps = getAllKeys(other),
+ othLength = othProps.length;
if (objLength != othLength && !isPartial) {
- return false
+ return false;
}
- var index = objLength
+ var index = objLength;
while (index--) {
- var key = objProps[index]
+ var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
- return false
+ return false;
}
}
// Assume cyclic values are equal.
- var stacked = stack.get(object)
+ var stacked = stack.get(object);
if (stacked && stack.get(other)) {
- return stacked == other
+ return stacked == other;
}
- var result = true
- stack.set(object, other)
- stack.set(other, object)
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
- var skipCtor = isPartial
+ var skipCtor = isPartial;
while (++index < objLength) {
- key = objProps[index]
+ key = objProps[index];
var objValue = object[key],
- othValue = other[key]
+ othValue = other[key];
if (customizer) {
var compared = isPartial
? customizer(othValue, objValue, key, other, object, stack)
- : customizer(objValue, othValue, key, object, other, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
}
// Recursively compare objects (susceptible to call stack limits).
- if (
- !(compared === undefined$1
- ? objValue === othValue ||
- equalFunc(objValue, othValue, bitmask, customizer, stack)
- : compared)
- ) {
- result = false
- break
+ if (!(compared === undefined$1
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
}
- skipCtor || (skipCtor = key == "constructor")
+ skipCtor || (skipCtor = key == 'constructor');
}
if (result && !skipCtor) {
var objCtor = object.constructor,
- othCtor = other.constructor
+ othCtor = other.constructor;
// Non `Object` object instances with different constructors are not equal.
- if (
- objCtor != othCtor &&
- "constructor" in object &&
- "constructor" in other &&
- !(
- typeof objCtor == "function" &&
- objCtor instanceof objCtor &&
- typeof othCtor == "function" &&
- othCtor instanceof othCtor
- )
- ) {
- result = false
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
}
}
- stack["delete"](object)
- stack["delete"](other)
- return result
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
}
/**
@@ -16853,7 +7855,7 @@ var app = (function() {
* @returns {Function} Returns the new function.
*/
function flatRest(func) {
- return setToString(overRest(func, undefined$1, flatten), func + "")
+ return setToString(overRest(func, undefined$1, flatten), func + '');
}
/**
@@ -16864,7 +7866,7 @@ var app = (function() {
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeys(object) {
- return baseGetAllKeys(object, keys, getSymbols)
+ return baseGetAllKeys(object, keys, getSymbols);
}
/**
@@ -16876,7 +7878,7 @@ var app = (function() {
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeysIn(object) {
- return baseGetAllKeys(object, keysIn, getSymbolsIn)
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
}
/**
@@ -16886,11 +7888,9 @@ var app = (function() {
* @param {Function} func The function to query.
* @returns {*} Returns the metadata for `func`.
*/
- var getData = !metaMap
- ? noop
- : function(func) {
- return metaMap.get(func)
- }
+ var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+ };
/**
* Gets the name of `func`.
@@ -16900,18 +7900,18 @@ var app = (function() {
* @returns {string} Returns the function name.
*/
function getFuncName(func) {
- var result = func.name + "",
- array = realNames[result],
- length = hasOwnProperty.call(realNames, result) ? array.length : 0
+ var result = (func.name + ''),
+ array = realNames[result],
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
while (length--) {
var data = array[length],
- otherFunc = data.func
+ otherFunc = data.func;
if (otherFunc == null || otherFunc == func) {
- return data.name
+ return data.name;
}
}
- return result
+ return result;
}
/**
@@ -16922,10 +7922,8 @@ var app = (function() {
* @returns {*} Returns the placeholder value.
*/
function getHolder(func) {
- var object = hasOwnProperty.call(lodash, "placeholder")
- ? lodash
- : func
- return object.placeholder
+ var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
+ return object.placeholder;
}
/**
@@ -16940,9 +7938,9 @@ var app = (function() {
* @returns {Function} Returns the chosen function or its result.
*/
function getIteratee() {
- var result = lodash.iteratee || iteratee
- result = result === iteratee ? baseIteratee : result
- return arguments.length ? result(arguments[0], arguments[1]) : result
+ var result = lodash.iteratee || iteratee;
+ result = result === iteratee ? baseIteratee : result;
+ return arguments.length ? result(arguments[0], arguments[1]) : result;
}
/**
@@ -16954,10 +7952,10 @@ var app = (function() {
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
- var data = map.__data__
+ var data = map.__data__;
return isKeyable(key)
- ? data[typeof key == "string" ? "string" : "hash"]
- : data.map
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
}
/**
@@ -16969,15 +7967,15 @@ var app = (function() {
*/
function getMatchData(object) {
var result = keys(object),
- length = result.length
+ length = result.length;
while (length--) {
var key = result[length],
- value = object[key]
+ value = object[key];
- result[length] = [key, value, isStrictComparable(value)]
+ result[length] = [key, value, isStrictComparable(value)];
}
- return result
+ return result;
}
/**
@@ -16989,8 +7987,8 @@ var app = (function() {
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
- var value = getValue(object, key)
- return baseIsNative(value) ? value : undefined$1
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined$1;
}
/**
@@ -17002,22 +8000,22 @@ var app = (function() {
*/
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag),
- tag = value[symToStringTag]
+ tag = value[symToStringTag];
try {
- value[symToStringTag] = undefined$1
- var unmasked = true
+ value[symToStringTag] = undefined$1;
+ var unmasked = true;
} catch (e) {}
- var result = nativeObjectToString.call(value)
+ var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
- value[symToStringTag] = tag
+ value[symToStringTag] = tag;
} else {
- delete value[symToStringTag]
+ delete value[symToStringTag];
}
}
- return result
+ return result;
}
/**
@@ -17027,17 +8025,15 @@ var app = (function() {
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
- var getSymbols = !nativeGetSymbols
- ? stubArray
- : function(object) {
- if (object == null) {
- return []
- }
- object = Object(object)
- return arrayFilter(nativeGetSymbols(object), function(symbol) {
- return propertyIsEnumerable.call(object, symbol)
- })
- }
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
+ };
/**
* Creates an array of the own and inherited enumerable symbols of `object`.
@@ -17046,16 +8042,14 @@ var app = (function() {
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
- var getSymbolsIn = !nativeGetSymbols
- ? stubArray
- : function(object) {
- var result = []
- while (object) {
- arrayPush(result, getSymbols(object))
- object = getPrototype(object)
- }
- return result
- }
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
+ var result = [];
+ while (object) {
+ arrayPush(result, getSymbols(object));
+ object = getPrototype(object);
+ }
+ return result;
+ };
/**
* Gets the `toStringTag` of `value`.
@@ -17064,38 +8058,30 @@ var app = (function() {
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
- var getTag = baseGetTag
+ var getTag = baseGetTag;
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
- if (
- (DataView &&
- getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
- (Map && getTag(new Map()) != mapTag) ||
- (Promise && getTag(Promise.resolve()) != promiseTag) ||
- (Set && getTag(new Set()) != setTag) ||
- (WeakMap && getTag(new WeakMap()) != weakMapTag)
- ) {
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
getTag = function(value) {
var result = baseGetTag(value),
- Ctor = result == objectTag ? value.constructor : undefined$1,
- ctorString = Ctor ? toSource(Ctor) : ""
+ Ctor = result == objectTag ? value.constructor : undefined$1,
+ ctorString = Ctor ? toSource(Ctor) : '';
if (ctorString) {
switch (ctorString) {
- case dataViewCtorString:
- return dataViewTag
- case mapCtorString:
- return mapTag
- case promiseCtorString:
- return promiseTag
- case setCtorString:
- return setTag
- case weakMapCtorString:
- return weakMapTag
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
}
}
- return result
- }
+ return result;
+ };
}
/**
@@ -17110,28 +8096,20 @@ var app = (function() {
*/
function getView(start, end, transforms) {
var index = -1,
- length = transforms.length
+ length = transforms.length;
while (++index < length) {
var data = transforms[index],
- size = data.size
+ size = data.size;
switch (data.type) {
- case "drop":
- start += size
- break
- case "dropRight":
- end -= size
- break
- case "take":
- end = nativeMin(end, start + size)
- break
- case "takeRight":
- start = nativeMax(start, end - size)
- break
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
}
}
- return { start: start, end: end }
+ return { 'start': start, 'end': end };
}
/**
@@ -17142,8 +8120,8 @@ var app = (function() {
* @returns {Array} Returns the wrapper details.
*/
function getWrapDetails(source) {
- var match = source.match(reWrapDetails)
- return match ? match[1].split(reSplitDetails) : []
+ var match = source.match(reWrapDetails);
+ return match ? match[1].split(reSplitDetails) : [];
}
/**
@@ -17156,29 +8134,25 @@ var app = (function() {
* @returns {boolean} Returns `true` if `path` exists, else `false`.
*/
function hasPath(object, path, hasFunc) {
- path = castPath(path, object)
+ path = castPath(path, object);
var index = -1,
- length = path.length,
- result = false
+ length = path.length,
+ result = false;
while (++index < length) {
- var key = toKey(path[index])
+ var key = toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
- break
+ break;
}
- object = object[key]
+ object = object[key];
}
if (result || ++index != length) {
- return result
+ return result;
}
- length = object == null ? 0 : object.length
- return (
- !!length &&
- isLength(length) &&
- isIndex(key, length) &&
- (isArray(object) || isArguments(object))
- )
+ length = object == null ? 0 : object.length;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isArguments(object));
}
/**
@@ -17190,18 +8164,14 @@ var app = (function() {
*/
function initCloneArray(array) {
var length = array.length,
- result = new array.constructor(length)
+ result = new array.constructor(length);
// Add properties assigned by `RegExp#exec`.
- if (
- length &&
- typeof array[0] == "string" &&
- hasOwnProperty.call(array, "index")
- ) {
- result.index = array.index
- result.input = array.input
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
}
- return result
+ return result;
}
/**
@@ -17212,9 +8182,9 @@ var app = (function() {
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
- return typeof object.constructor == "function" && !isPrototype(object)
+ return (typeof object.constructor == 'function' && !isPrototype(object))
? baseCreate(getPrototype(object))
- : {}
+ : {};
}
/**
@@ -17230,44 +8200,38 @@ var app = (function() {
* @returns {Object} Returns the initialized clone.
*/
function initCloneByTag(object, tag, isDeep) {
- var Ctor = object.constructor
+ var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
- return cloneArrayBuffer(object)
+ return cloneArrayBuffer(object);
case boolTag:
case dateTag:
- return new Ctor(+object)
+ return new Ctor(+object);
case dataViewTag:
- return cloneDataView(object, isDeep)
+ return cloneDataView(object, isDeep);
- case float32Tag:
- case float64Tag:
- case int8Tag:
- case int16Tag:
- case int32Tag:
- case uint8Tag:
- case uint8ClampedTag:
- case uint16Tag:
- case uint32Tag:
- return cloneTypedArray(object, isDeep)
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
case mapTag:
- return new Ctor()
+ return new Ctor;
case numberTag:
case stringTag:
- return new Ctor(object)
+ return new Ctor(object);
case regexpTag:
- return cloneRegExp(object)
+ return cloneRegExp(object);
case setTag:
- return new Ctor()
+ return new Ctor;
case symbolTag:
- return cloneSymbol(object)
+ return cloneSymbol(object);
}
}
@@ -17280,17 +8244,14 @@ var app = (function() {
* @returns {string} Returns the modified source.
*/
function insertWrapDetails(source, details) {
- var length = details.length
+ var length = details.length;
if (!length) {
- return source
+ return source;
}
- var lastIndex = length - 1
- details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex]
- details = details.join(length > 2 ? ", " : " ")
- return source.replace(
- reWrapComment,
- "{\n/* [wrapped with " + details + "] */\n"
- )
+ var lastIndex = length - 1;
+ details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
+ details = details.join(length > 2 ? ', ' : ' ');
+ return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
}
/**
@@ -17301,11 +8262,8 @@ var app = (function() {
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
*/
function isFlattenable(value) {
- return (
- isArray(value) ||
- isArguments(value) ||
- !!(spreadableSymbol && value && value[spreadableSymbol])
- )
+ return isArray(value) || isArguments(value) ||
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
}
/**
@@ -17317,16 +8275,13 @@ var app = (function() {
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
- var type = typeof value
- length = length == null ? MAX_SAFE_INTEGER : length
+ var type = typeof value;
+ length = length == null ? MAX_SAFE_INTEGER : length;
- return (
- !!length &&
- (type == "number" || (type != "symbol" && reIsUint.test(value))) &&
- value > -1 &&
- value % 1 == 0 &&
- value < length
- )
+ return !!length &&
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
}
/**
@@ -17341,17 +8296,16 @@ var app = (function() {
*/
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
- return false
+ return false;
}
- var type = typeof index
- if (
- type == "number"
- ? isArrayLike(object) && isIndex(index, object.length)
- : type == "string" && index in object
- ) {
- return eq(object[index], value)
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
}
- return false
+ return false;
}
/**
@@ -17364,23 +8318,15 @@ var app = (function() {
*/
function isKey(value, object) {
if (isArray(value)) {
- return false
+ return false;
}
- var type = typeof value
- if (
- type == "number" ||
- type == "symbol" ||
- type == "boolean" ||
- value == null ||
- isSymbol(value)
- ) {
- return true
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
}
- return (
- reIsPlainProp.test(value) ||
- !reIsDeepProp.test(value) ||
- (object != null && value in Object(object))
- )
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
}
/**
@@ -17391,13 +8337,10 @@ var app = (function() {
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
- var type = typeof value
- return type == "string" ||
- type == "number" ||
- type == "symbol" ||
- type == "boolean"
- ? value !== "__proto__"
- : value === null
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
}
/**
@@ -17410,19 +8353,16 @@ var app = (function() {
*/
function isLaziable(func) {
var funcName = getFuncName(func),
- other = lodash[funcName]
+ other = lodash[funcName];
- if (
- typeof other != "function" ||
- !(funcName in LazyWrapper.prototype)
- ) {
- return false
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+ return false;
}
if (func === other) {
- return true
+ return true;
}
- var data = getData(other)
- return !!data && func === data[0]
+ var data = getData(other);
+ return !!data && func === data[0];
}
/**
@@ -17433,7 +8373,7 @@ var app = (function() {
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
- return !!maskSrcKey && maskSrcKey in func
+ return !!maskSrcKey && (maskSrcKey in func);
}
/**
@@ -17443,7 +8383,7 @@ var app = (function() {
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `func` is maskable, else `false`.
*/
- var isMaskable = coreJsData ? isFunction : stubFalse
+ var isMaskable = coreJsData ? isFunction : stubFalse;
/**
* Checks if `value` is likely a prototype object.
@@ -17454,9 +8394,9 @@ var app = (function() {
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
- proto = (typeof Ctor == "function" && Ctor.prototype) || objectProto
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
- return value === proto
+ return value === proto;
}
/**
@@ -17468,7 +8408,7 @@ var app = (function() {
* equality comparisons, else `false`.
*/
function isStrictComparable(value) {
- return value === value && !isObject(value)
+ return value === value && !isObject(value);
}
/**
@@ -17483,13 +8423,11 @@ var app = (function() {
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
- return false
+ return false;
}
- return (
- object[key] === srcValue &&
- (srcValue !== undefined$1 || key in Object(object))
- )
- }
+ return object[key] === srcValue &&
+ (srcValue !== undefined$1 || (key in Object(object)));
+ };
}
/**
@@ -17503,13 +8441,13 @@ var app = (function() {
function memoizeCapped(func) {
var result = memoize(func, function(key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
- cache.clear()
+ cache.clear();
}
- return key
- })
+ return key;
+ });
- var cache = result.cache
- return result
+ var cache = result.cache;
+ return result;
}
/**
@@ -17530,69 +8468,57 @@ var app = (function() {
*/
function mergeData(data, source) {
var bitmask = data[1],
- srcBitmask = source[1],
- newBitmask = bitmask | srcBitmask,
- isCommon =
- newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG)
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
var isCombo =
- (srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG) ||
- (srcBitmask == WRAP_ARY_FLAG &&
- bitmask == WRAP_REARG_FLAG &&
- data[7].length <= source[8]) ||
- (srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) &&
- source[7].length <= source[8] &&
- bitmask == WRAP_CURRY_FLAG)
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
+ ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
// Exit early if metadata can't be merged.
if (!(isCommon || isCombo)) {
- return data
+ return data;
}
// Use source `thisArg` if available.
if (srcBitmask & WRAP_BIND_FLAG) {
- data[2] = source[2]
+ data[2] = source[2];
// Set when currying a bound function.
- newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG
+ newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
}
// Compose partial arguments.
- var value = source[3]
+ var value = source[3];
if (value) {
- var partials = data[3]
- data[3] = partials ? composeArgs(partials, value, source[4]) : value
- data[4] = partials
- ? replaceHolders(data[3], PLACEHOLDER)
- : source[4]
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
}
// Compose partial right arguments.
- value = source[5]
+ value = source[5];
if (value) {
- partials = data[5]
- data[5] = partials
- ? composeArgsRight(partials, value, source[6])
- : value
- data[6] = partials
- ? replaceHolders(data[5], PLACEHOLDER)
- : source[6]
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
}
// Use source `argPos` if available.
- value = source[7]
+ value = source[7];
if (value) {
- data[7] = value
+ data[7] = value;
}
// Use source `ary` if it's smaller.
if (srcBitmask & WRAP_ARY_FLAG) {
- data[8] =
- data[8] == null ? source[8] : nativeMin(data[8], source[8])
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
}
// Use source `arity` if one is not provided.
if (data[9] == null) {
- data[9] = source[9]
+ data[9] = source[9];
}
// Use source `func` and merge bitmasks.
- data[0] = source[0]
- data[1] = newBitmask
+ data[0] = source[0];
+ data[1] = newBitmask;
- return data
+ return data;
}
/**
@@ -17605,13 +8531,13 @@ var app = (function() {
* @returns {Array} Returns the array of property names.
*/
function nativeKeysIn(object) {
- var result = []
+ var result = [];
if (object != null) {
for (var key in Object(object)) {
- result.push(key)
+ result.push(key);
}
}
- return result
+ return result;
}
/**
@@ -17622,7 +8548,7 @@ var app = (function() {
* @returns {string} Returns the converted string.
*/
function objectToString(value) {
- return nativeObjectToString.call(value)
+ return nativeObjectToString.call(value);
}
/**
@@ -17635,24 +8561,24 @@ var app = (function() {
* @returns {Function} Returns the new function.
*/
function overRest(func, start, transform) {
- start = nativeMax(start === undefined$1 ? func.length - 1 : start, 0)
+ start = nativeMax(start === undefined$1 ? (func.length - 1) : start, 0);
return function() {
var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length)
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
while (++index < length) {
- array[index] = args[start + index]
+ array[index] = args[start + index];
}
- index = -1
- var otherArgs = Array(start + 1)
+ index = -1;
+ var otherArgs = Array(start + 1);
while (++index < start) {
- otherArgs[index] = args[index]
+ otherArgs[index] = args[index];
}
- otherArgs[start] = transform(array)
- return apply(func, this, otherArgs)
- }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
}
/**
@@ -17664,9 +8590,7 @@ var app = (function() {
* @returns {*} Returns the parent value.
*/
function parent(object, path) {
- return path.length < 2
- ? object
- : baseGet(object, baseSlice(path, 0, -1))
+ return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
}
/**
@@ -17681,16 +8605,14 @@ var app = (function() {
*/
function reorder(array, indexes) {
var arrLength = array.length,
- length = nativeMin(indexes.length, arrLength),
- oldArray = copyArray(array)
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = copyArray(array);
while (length--) {
- var index = indexes[length]
- array[length] = isIndex(index, arrLength)
- ? oldArray[index]
- : undefined$1
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined$1;
}
- return array
+ return array;
}
/**
@@ -17702,15 +8624,15 @@ var app = (function() {
* @returns {*} Returns the property value.
*/
function safeGet(object, key) {
- if (key === "constructor" && typeof object[key] === "function") {
- return
+ if (key === 'constructor' && typeof object[key] === 'function') {
+ return;
}
- if (key == "__proto__") {
- return
+ if (key == '__proto__') {
+ return;
}
- return object[key]
+ return object[key];
}
/**
@@ -17727,7 +8649,7 @@ var app = (function() {
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
- var setData = shortOut(baseSetData)
+ var setData = shortOut(baseSetData);
/**
* A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
@@ -17737,11 +8659,9 @@ var app = (function() {
* @param {number} wait The number of milliseconds to delay invocation.
* @returns {number|Object} Returns the timer id or timeout object.
*/
- var setTimeout =
- ctxSetTimeout ||
- function(func, wait) {
- return root.setTimeout(func, wait)
- }
+ var setTimeout = ctxSetTimeout || function(func, wait) {
+ return root.setTimeout(func, wait);
+ };
/**
* Sets the `toString` method of `func` to return `string`.
@@ -17751,7 +8671,7 @@ var app = (function() {
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
- var setToString = shortOut(baseSetToString)
+ var setToString = shortOut(baseSetToString);
/**
* Sets the `toString` method of `wrapper` to mimic the source of `reference`
@@ -17764,14 +8684,8 @@ var app = (function() {
* @returns {Function} Returns `wrapper`.
*/
function setWrapToString(wrapper, reference, bitmask) {
- var source = reference + ""
- return setToString(
- wrapper,
- insertWrapDetails(
- source,
- updateWrapDetails(getWrapDetails(source), bitmask)
- )
- )
+ var source = (reference + '');
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
}
/**
@@ -17785,22 +8699,22 @@ var app = (function() {
*/
function shortOut(func) {
var count = 0,
- lastCalled = 0
+ lastCalled = 0;
return function() {
var stamp = nativeNow(),
- remaining = HOT_SPAN - (stamp - lastCalled)
+ remaining = HOT_SPAN - (stamp - lastCalled);
- lastCalled = stamp
+ lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
- return arguments[0]
+ return arguments[0];
}
} else {
- count = 0
+ count = 0;
}
- return func.apply(undefined$1, arguments)
- }
+ return func.apply(undefined$1, arguments);
+ };
}
/**
@@ -17813,19 +8727,19 @@ var app = (function() {
*/
function shuffleSelf(array, size) {
var index = -1,
- length = array.length,
- lastIndex = length - 1
+ length = array.length,
+ lastIndex = length - 1;
- size = size === undefined$1 ? length : size
+ size = size === undefined$1 ? length : size;
while (++index < size) {
var rand = baseRandom(index, lastIndex),
- value = array[rand]
+ value = array[rand];
- array[rand] = array[index]
- array[index] = value
+ array[rand] = array[index];
+ array[index] = value;
}
- array.length = size
- return array
+ array.length = size;
+ return array;
}
/**
@@ -17836,17 +8750,15 @@ var app = (function() {
* @returns {Array} Returns the property path array.
*/
var stringToPath = memoizeCapped(function(string) {
- var result = []
+ var result = [];
if (string.charCodeAt(0) === 46 /* . */) {
- result.push("")
+ result.push('');
}
string.replace(rePropName, function(match, number, quote, subString) {
- result.push(
- quote ? subString.replace(reEscapeChar, "$1") : number || match
- )
- })
- return result
- })
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ });
/**
* Converts `value` to a string key if it's not a string or symbol.
@@ -17856,11 +8768,11 @@ var app = (function() {
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
- if (typeof value == "string" || isSymbol(value)) {
- return value
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
}
- var result = value + ""
- return result == "0" && 1 / value == -INFINITY ? "-0" : result
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
/**
@@ -17873,13 +8785,13 @@ var app = (function() {
function toSource(func) {
if (func != null) {
try {
- return funcToString.call(func)
+ return funcToString.call(func);
} catch (e) {}
try {
- return func + ""
+ return (func + '');
} catch (e) {}
}
- return ""
+ return '';
}
/**
@@ -17892,12 +8804,12 @@ var app = (function() {
*/
function updateWrapDetails(details, bitmask) {
arrayEach(wrapFlags, function(pair) {
- var value = "_." + pair[0]
- if (bitmask & pair[1] && !arrayIncludes(details, value)) {
- details.push(value)
+ var value = '_.' + pair[0];
+ if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
+ details.push(value);
}
- })
- return details.sort()
+ });
+ return details.sort();
}
/**
@@ -17909,13 +8821,13 @@ var app = (function() {
*/
function wrapperClone(wrapper) {
if (wrapper instanceof LazyWrapper) {
- return wrapper.clone()
+ return wrapper.clone();
}
- var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__)
- result.__actions__ = copyArray(wrapper.__actions__)
- result.__index__ = wrapper.__index__
- result.__values__ = wrapper.__values__
- return result
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+ result.__actions__ = copyArray(wrapper.__actions__);
+ result.__index__ = wrapper.__index__;
+ result.__values__ = wrapper.__values__;
+ return result;
}
/*------------------------------------------------------------------------*/
@@ -17942,25 +8854,23 @@ var app = (function() {
* // => [['a', 'b', 'c'], ['d']]
*/
function chunk(array, size, guard) {
- if (
- guard ? isIterateeCall(array, size, guard) : size === undefined$1
- ) {
- size = 1
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined$1)) {
+ size = 1;
} else {
- size = nativeMax(toInteger(size), 0)
+ size = nativeMax(toInteger(size), 0);
}
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (!length || size < 1) {
- return []
+ return [];
}
var index = 0,
- resIndex = 0,
- result = Array(nativeCeil(length / size))
+ resIndex = 0,
+ result = Array(nativeCeil(length / size));
while (index < length) {
- result[resIndex++] = baseSlice(array, index, (index += size))
+ result[resIndex++] = baseSlice(array, index, (index += size));
}
- return result
+ return result;
}
/**
@@ -17980,17 +8890,17 @@ var app = (function() {
*/
function compact(array) {
var index = -1,
- length = array == null ? 0 : array.length,
- resIndex = 0,
- result = []
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
while (++index < length) {
- var value = array[index]
+ var value = array[index];
if (value) {
- result[resIndex++] = value
+ result[resIndex++] = value;
}
}
- return result
+ return result;
}
/**
@@ -18016,21 +8926,18 @@ var app = (function() {
* // => [1]
*/
function concat() {
- var length = arguments.length
+ var length = arguments.length;
if (!length) {
- return []
+ return [];
}
var args = Array(length - 1),
- array = arguments[0],
- index = length
+ array = arguments[0],
+ index = length;
while (index--) {
- args[index - 1] = arguments[index]
+ args[index - 1] = arguments[index];
}
- return arrayPush(
- isArray(array) ? copyArray(array) : [array],
- baseFlatten(args, 1)
- )
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
}
/**
@@ -18056,12 +8963,9 @@ var app = (function() {
*/
var difference = baseRest(function(array, values) {
return isArrayLikeObject(array)
- ? baseDifference(
- array,
- baseFlatten(values, 1, isArrayLikeObject, true)
- )
- : []
- })
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
+ : [];
+ });
/**
* This method is like `_.difference` except that it accepts `iteratee` which
@@ -18090,18 +8994,14 @@ var app = (function() {
* // => [{ 'x': 2 }]
*/
var differenceBy = baseRest(function(array, values) {
- var iteratee = last(values)
+ var iteratee = last(values);
if (isArrayLikeObject(iteratee)) {
- iteratee = undefined$1
+ iteratee = undefined$1;
}
return isArrayLikeObject(array)
- ? baseDifference(
- array,
- baseFlatten(values, 1, isArrayLikeObject, true),
- getIteratee(iteratee, 2)
- )
- : []
- })
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
+ : [];
+ });
/**
* This method is like `_.difference` except that it accepts `comparator`
@@ -18127,19 +9027,14 @@ var app = (function() {
* // => [{ 'x': 2, 'y': 1 }]
*/
var differenceWith = baseRest(function(array, values) {
- var comparator = last(values)
+ var comparator = last(values);
if (isArrayLikeObject(comparator)) {
- comparator = undefined$1
+ comparator = undefined$1;
}
return isArrayLikeObject(array)
- ? baseDifference(
- array,
- baseFlatten(values, 1, isArrayLikeObject, true),
- undefined$1,
- comparator
- )
- : []
- })
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined$1, comparator)
+ : [];
+ });
/**
* Creates a slice of `array` with `n` elements dropped from the beginning.
@@ -18167,12 +9062,12 @@ var app = (function() {
* // => [1, 2, 3]
*/
function drop(array, n, guard) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (!length) {
- return []
+ return [];
}
- n = guard || n === undefined$1 ? 1 : toInteger(n)
- return baseSlice(array, n < 0 ? 0 : n, length)
+ n = (guard || n === undefined$1) ? 1 : toInteger(n);
+ return baseSlice(array, n < 0 ? 0 : n, length);
}
/**
@@ -18201,13 +9096,13 @@ var app = (function() {
* // => [1, 2, 3]
*/
function dropRight(array, n, guard) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (!length) {
- return []
+ return [];
}
- n = guard || n === undefined$1 ? 1 : toInteger(n)
- n = length - n
- return baseSlice(array, 0, n < 0 ? 0 : n)
+ n = (guard || n === undefined$1) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, 0, n < 0 ? 0 : n);
}
/**
@@ -18246,9 +9141,9 @@ var app = (function() {
* // => objects for ['barney', 'fred', 'pebbles']
*/
function dropRightWhile(array, predicate) {
- return array && array.length
+ return (array && array.length)
? baseWhile(array, getIteratee(predicate, 3), true, true)
- : []
+ : [];
}
/**
@@ -18287,9 +9182,9 @@ var app = (function() {
* // => objects for ['barney', 'fred', 'pebbles']
*/
function dropWhile(array, predicate) {
- return array && array.length
+ return (array && array.length)
? baseWhile(array, getIteratee(predicate, 3), true)
- : []
+ : [];
}
/**
@@ -18322,19 +9217,15 @@ var app = (function() {
* // => [4, '*', '*', 10]
*/
function fill(array, value, start, end) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (!length) {
- return []
+ return [];
}
- if (
- start &&
- typeof start != "number" &&
- isIterateeCall(array, value, start)
- ) {
- start = 0
- end = length
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
}
- return baseFill(array, value, start, end)
+ return baseFill(array, value, start, end);
}
/**
@@ -18373,15 +9264,15 @@ var app = (function() {
* // => 2
*/
function findIndex(array, predicate, fromIndex) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (!length) {
- return -1
+ return -1;
}
- var index = fromIndex == null ? 0 : toInteger(fromIndex)
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
- index = nativeMax(length + index, 0)
+ index = nativeMax(length + index, 0);
}
- return baseFindIndex(array, getIteratee(predicate, 3), index)
+ return baseFindIndex(array, getIteratee(predicate, 3), index);
}
/**
@@ -18420,19 +9311,18 @@ var app = (function() {
* // => 0
*/
function findLastIndex(array, predicate, fromIndex) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (!length) {
- return -1
+ return -1;
}
- var index = length - 1
+ var index = length - 1;
if (fromIndex !== undefined$1) {
- index = toInteger(fromIndex)
- index =
- fromIndex < 0
- ? nativeMax(length + index, 0)
- : nativeMin(index, length - 1)
+ index = toInteger(fromIndex);
+ index = fromIndex < 0
+ ? nativeMax(length + index, 0)
+ : nativeMin(index, length - 1);
}
- return baseFindIndex(array, getIteratee(predicate, 3), index, true)
+ return baseFindIndex(array, getIteratee(predicate, 3), index, true);
}
/**
@@ -18450,8 +9340,8 @@ var app = (function() {
* // => [1, 2, [3, [4]], 5]
*/
function flatten(array) {
- var length = array == null ? 0 : array.length
- return length ? baseFlatten(array, 1) : []
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
}
/**
@@ -18469,8 +9359,8 @@ var app = (function() {
* // => [1, 2, 3, 4, 5]
*/
function flattenDeep(array) {
- var length = array == null ? 0 : array.length
- return length ? baseFlatten(array, INFINITY) : []
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
}
/**
@@ -18494,12 +9384,12 @@ var app = (function() {
* // => [1, 2, 3, [4], 5]
*/
function flattenDepth(array, depth) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (!length) {
- return []
+ return [];
}
- depth = depth === undefined$1 ? 1 : toInteger(depth)
- return baseFlatten(array, depth)
+ depth = depth === undefined$1 ? 1 : toInteger(depth);
+ return baseFlatten(array, depth);
}
/**
@@ -18519,14 +9409,14 @@ var app = (function() {
*/
function fromPairs(pairs) {
var index = -1,
- length = pairs == null ? 0 : pairs.length,
- result = {}
+ length = pairs == null ? 0 : pairs.length,
+ result = {};
while (++index < length) {
- var pair = pairs[index]
- result[pair[0]] = pair[1]
+ var pair = pairs[index];
+ result[pair[0]] = pair[1];
}
- return result
+ return result;
}
/**
@@ -18548,7 +9438,7 @@ var app = (function() {
* // => undefined
*/
function head(array) {
- return array && array.length ? array[0] : undefined$1
+ return (array && array.length) ? array[0] : undefined$1;
}
/**
@@ -18575,15 +9465,15 @@ var app = (function() {
* // => 3
*/
function indexOf(array, value, fromIndex) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (!length) {
- return -1
+ return -1;
}
- var index = fromIndex == null ? 0 : toInteger(fromIndex)
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
- index = nativeMax(length + index, 0)
+ index = nativeMax(length + index, 0);
}
- return baseIndexOf(array, value, index)
+ return baseIndexOf(array, value, index);
}
/**
@@ -18601,8 +9491,8 @@ var app = (function() {
* // => [1, 2]
*/
function initial(array) {
- var length = array == null ? 0 : array.length
- return length ? baseSlice(array, 0, -1) : []
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 0, -1) : [];
}
/**
@@ -18623,11 +9513,11 @@ var app = (function() {
* // => [2]
*/
var intersection = baseRest(function(arrays) {
- var mapped = arrayMap(arrays, castArrayLikeObject)
- return mapped.length && mapped[0] === arrays[0]
+ var mapped = arrayMap(arrays, castArrayLikeObject);
+ return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped)
- : []
- })
+ : [];
+ });
/**
* This method is like `_.intersection` except that it accepts `iteratee`
@@ -18654,17 +9544,17 @@ var app = (function() {
*/
var intersectionBy = baseRest(function(arrays) {
var iteratee = last(arrays),
- mapped = arrayMap(arrays, castArrayLikeObject)
+ mapped = arrayMap(arrays, castArrayLikeObject);
if (iteratee === last(mapped)) {
- iteratee = undefined$1
+ iteratee = undefined$1;
} else {
- mapped.pop()
+ mapped.pop();
}
- return mapped.length && mapped[0] === arrays[0]
+ return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped, getIteratee(iteratee, 2))
- : []
- })
+ : [];
+ });
/**
* This method is like `_.intersection` except that it accepts `comparator`
@@ -18689,17 +9579,16 @@ var app = (function() {
*/
var intersectionWith = baseRest(function(arrays) {
var comparator = last(arrays),
- mapped = arrayMap(arrays, castArrayLikeObject)
+ mapped = arrayMap(arrays, castArrayLikeObject);
- comparator =
- typeof comparator == "function" ? comparator : undefined$1
+ comparator = typeof comparator == 'function' ? comparator : undefined$1;
if (comparator) {
- mapped.pop()
+ mapped.pop();
}
- return mapped.length && mapped[0] === arrays[0]
+ return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped, undefined$1, comparator)
- : []
- })
+ : [];
+ });
/**
* Converts all elements in `array` into a string separated by `separator`.
@@ -18717,7 +9606,7 @@ var app = (function() {
* // => 'a~b~c'
*/
function join(array, separator) {
- return array == null ? "" : nativeJoin.call(array, separator)
+ return array == null ? '' : nativeJoin.call(array, separator);
}
/**
@@ -18735,8 +9624,8 @@ var app = (function() {
* // => 3
*/
function last(array) {
- var length = array == null ? 0 : array.length
- return length ? array[length - 1] : undefined$1
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined$1;
}
/**
@@ -18761,21 +9650,18 @@ var app = (function() {
* // => 1
*/
function lastIndexOf(array, value, fromIndex) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (!length) {
- return -1
+ return -1;
}
- var index = length
+ var index = length;
if (fromIndex !== undefined$1) {
- index = toInteger(fromIndex)
- index =
- index < 0
- ? nativeMax(length + index, 0)
- : nativeMin(index, length - 1)
+ index = toInteger(fromIndex);
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
}
return value === value
? strictLastIndexOf(array, value, index)
- : baseFindIndex(array, baseIsNaN, index, true)
+ : baseFindIndex(array, baseIsNaN, index, true);
}
/**
@@ -18800,9 +9686,7 @@ var app = (function() {
* // => 'c';
*/
function nth(array, n) {
- return array && array.length
- ? baseNth(array, toInteger(n))
- : undefined$1
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined$1;
}
/**
@@ -18828,7 +9712,7 @@ var app = (function() {
* console.log(array);
* // => ['b', 'b']
*/
- var pull = baseRest(pullAll)
+ var pull = baseRest(pullAll);
/**
* This method is like `_.pull` except that it accepts an array of values to remove.
@@ -18851,9 +9735,9 @@ var app = (function() {
* // => ['b', 'b']
*/
function pullAll(array, values) {
- return array && array.length && values && values.length
+ return (array && array.length && values && values.length)
? basePullAll(array, values)
- : array
+ : array;
}
/**
@@ -18880,9 +9764,9 @@ var app = (function() {
* // => [{ 'x': 2 }]
*/
function pullAllBy(array, values, iteratee) {
- return array && array.length && values && values.length
+ return (array && array.length && values && values.length)
? basePullAll(array, values, getIteratee(iteratee, 2))
- : array
+ : array;
}
/**
@@ -18909,9 +9793,9 @@ var app = (function() {
* // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
*/
function pullAllWith(array, values, comparator) {
- return array && array.length && values && values.length
+ return (array && array.length && values && values.length)
? basePullAll(array, values, undefined$1, comparator)
- : array
+ : array;
}
/**
@@ -18940,17 +9824,14 @@ var app = (function() {
*/
var pullAt = flatRest(function(array, indexes) {
var length = array == null ? 0 : array.length,
- result = baseAt(array, indexes)
+ result = baseAt(array, indexes);
- basePullAt(
- array,
- arrayMap(indexes, function(index) {
- return isIndex(index, length) ? +index : index
- }).sort(compareAscending)
- )
+ basePullAt(array, arrayMap(indexes, function(index) {
+ return isIndex(index, length) ? +index : index;
+ }).sort(compareAscending));
- return result
- })
+ return result;
+ });
/**
* Removes all elements from `array` that `predicate` returns truthy for
@@ -18981,24 +9862,24 @@ var app = (function() {
* // => [2, 4]
*/
function remove(array, predicate) {
- var result = []
+ var result = [];
if (!(array && array.length)) {
- return result
+ return result;
}
var index = -1,
- indexes = [],
- length = array.length
+ indexes = [],
+ length = array.length;
- predicate = getIteratee(predicate, 3)
+ predicate = getIteratee(predicate, 3);
while (++index < length) {
- var value = array[index]
+ var value = array[index];
if (predicate(value, index, array)) {
- result.push(value)
- indexes.push(index)
+ result.push(value);
+ indexes.push(index);
}
}
- basePullAt(array, indexes)
- return result
+ basePullAt(array, indexes);
+ return result;
}
/**
@@ -19025,7 +9906,7 @@ var app = (function() {
* // => [3, 2, 1]
*/
function reverse(array) {
- return array == null ? array : nativeReverse.call(array)
+ return array == null ? array : nativeReverse.call(array);
}
/**
@@ -19045,22 +9926,19 @@ var app = (function() {
* @returns {Array} Returns the slice of `array`.
*/
function slice(array, start, end) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (!length) {
- return []
+ return [];
}
- if (
- end &&
- typeof end != "number" &&
- isIterateeCall(array, start, end)
- ) {
- start = 0
- end = length
- } else {
- start = start == null ? 0 : toInteger(start)
- end = end === undefined$1 ? length : toInteger(end)
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
}
- return baseSlice(array, start, end)
+ else {
+ start = start == null ? 0 : toInteger(start);
+ end = end === undefined$1 ? length : toInteger(end);
+ }
+ return baseSlice(array, start, end);
}
/**
@@ -19081,7 +9959,7 @@ var app = (function() {
* // => 1
*/
function sortedIndex(array, value) {
- return baseSortedIndex(array, value)
+ return baseSortedIndex(array, value);
}
/**
@@ -19110,7 +9988,7 @@ var app = (function() {
* // => 0
*/
function sortedIndexBy(array, value, iteratee) {
- return baseSortedIndexBy(array, value, getIteratee(iteratee, 2))
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
}
/**
@@ -19130,14 +10008,14 @@ var app = (function() {
* // => 1
*/
function sortedIndexOf(array, value) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (length) {
- var index = baseSortedIndex(array, value)
+ var index = baseSortedIndex(array, value);
if (index < length && eq(array[index], value)) {
- return index
+ return index;
}
}
- return -1
+ return -1;
}
/**
@@ -19159,7 +10037,7 @@ var app = (function() {
* // => 4
*/
function sortedLastIndex(array, value) {
- return baseSortedIndex(array, value, true)
+ return baseSortedIndex(array, value, true);
}
/**
@@ -19188,7 +10066,7 @@ var app = (function() {
* // => 1
*/
function sortedLastIndexBy(array, value, iteratee) {
- return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true)
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
}
/**
@@ -19208,14 +10086,14 @@ var app = (function() {
* // => 3
*/
function sortedLastIndexOf(array, value) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (length) {
- var index = baseSortedIndex(array, value, true) - 1
+ var index = baseSortedIndex(array, value, true) - 1;
if (eq(array[index], value)) {
- return index
+ return index;
}
}
- return -1
+ return -1;
}
/**
@@ -19234,7 +10112,9 @@ var app = (function() {
* // => [1, 2]
*/
function sortedUniq(array) {
- return array && array.length ? baseSortedUniq(array) : []
+ return (array && array.length)
+ ? baseSortedUniq(array)
+ : [];
}
/**
@@ -19254,9 +10134,9 @@ var app = (function() {
* // => [1.1, 2.3]
*/
function sortedUniqBy(array, iteratee) {
- return array && array.length
+ return (array && array.length)
? baseSortedUniq(array, getIteratee(iteratee, 2))
- : []
+ : [];
}
/**
@@ -19274,8 +10154,8 @@ var app = (function() {
* // => [2, 3]
*/
function tail(array) {
- var length = array == null ? 0 : array.length
- return length ? baseSlice(array, 1, length) : []
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 1, length) : [];
}
/**
@@ -19305,10 +10185,10 @@ var app = (function() {
*/
function take(array, n, guard) {
if (!(array && array.length)) {
- return []
+ return [];
}
- n = guard || n === undefined$1 ? 1 : toInteger(n)
- return baseSlice(array, 0, n < 0 ? 0 : n)
+ n = (guard || n === undefined$1) ? 1 : toInteger(n);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
}
/**
@@ -19337,13 +10217,13 @@ var app = (function() {
* // => []
*/
function takeRight(array, n, guard) {
- var length = array == null ? 0 : array.length
+ var length = array == null ? 0 : array.length;
if (!length) {
- return []
+ return [];
}
- n = guard || n === undefined$1 ? 1 : toInteger(n)
- n = length - n
- return baseSlice(array, n < 0 ? 0 : n, length)
+ n = (guard || n === undefined$1) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, n < 0 ? 0 : n, length);
}
/**
@@ -19382,9 +10262,9 @@ var app = (function() {
* // => []
*/
function takeRightWhile(array, predicate) {
- return array && array.length
+ return (array && array.length)
? baseWhile(array, getIteratee(predicate, 3), false, true)
- : []
+ : [];
}
/**
@@ -19423,9 +10303,9 @@ var app = (function() {
* // => []
*/
function takeWhile(array, predicate) {
- return array && array.length
+ return (array && array.length)
? baseWhile(array, getIteratee(predicate, 3))
- : []
+ : [];
}
/**
@@ -19445,8 +10325,8 @@ var app = (function() {
* // => [2, 1]
*/
var union = baseRest(function(arrays) {
- return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true))
- })
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
+ });
/**
* This method is like `_.union` except that it accepts `iteratee` which is
@@ -19472,15 +10352,12 @@ var app = (function() {
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
var unionBy = baseRest(function(arrays) {
- var iteratee = last(arrays)
+ var iteratee = last(arrays);
if (isArrayLikeObject(iteratee)) {
- iteratee = undefined$1
+ iteratee = undefined$1;
}
- return baseUniq(
- baseFlatten(arrays, 1, isArrayLikeObject, true),
- getIteratee(iteratee, 2)
- )
- })
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
+ });
/**
* This method is like `_.union` except that it accepts `comparator` which
@@ -19504,15 +10381,10 @@ var app = (function() {
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
*/
var unionWith = baseRest(function(arrays) {
- var comparator = last(arrays)
- comparator =
- typeof comparator == "function" ? comparator : undefined$1
- return baseUniq(
- baseFlatten(arrays, 1, isArrayLikeObject, true),
- undefined$1,
- comparator
- )
- })
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined$1;
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined$1, comparator);
+ });
/**
* Creates a duplicate-free version of an array, using
@@ -19533,7 +10405,7 @@ var app = (function() {
* // => [2, 1]
*/
function uniq(array) {
- return array && array.length ? baseUniq(array) : []
+ return (array && array.length) ? baseUniq(array) : [];
}
/**
@@ -19560,9 +10432,7 @@ var app = (function() {
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
function uniqBy(array, iteratee) {
- return array && array.length
- ? baseUniq(array, getIteratee(iteratee, 2))
- : []
+ return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
}
/**
@@ -19586,11 +10456,8 @@ var app = (function() {
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
*/
function uniqWith(array, comparator) {
- comparator =
- typeof comparator == "function" ? comparator : undefined$1
- return array && array.length
- ? baseUniq(array, undefined$1, comparator)
- : []
+ comparator = typeof comparator == 'function' ? comparator : undefined$1;
+ return (array && array.length) ? baseUniq(array, undefined$1, comparator) : [];
}
/**
@@ -19614,18 +10481,18 @@ var app = (function() {
*/
function unzip(array) {
if (!(array && array.length)) {
- return []
+ return [];
}
- var length = 0
+ var length = 0;
array = arrayFilter(array, function(group) {
if (isArrayLikeObject(group)) {
- length = nativeMax(group.length, length)
- return true
+ length = nativeMax(group.length, length);
+ return true;
}
- })
+ });
return baseTimes(length, function(index) {
- return arrayMap(array, baseProperty(index))
- })
+ return arrayMap(array, baseProperty(index));
+ });
}
/**
@@ -19651,15 +10518,15 @@ var app = (function() {
*/
function unzipWith(array, iteratee) {
if (!(array && array.length)) {
- return []
+ return [];
}
- var result = unzip(array)
+ var result = unzip(array);
if (iteratee == null) {
- return result
+ return result;
}
return arrayMap(result, function(group) {
- return apply(iteratee, undefined$1, group)
- })
+ return apply(iteratee, undefined$1, group);
+ });
}
/**
@@ -19683,8 +10550,10 @@ var app = (function() {
* // => [3]
*/
var without = baseRest(function(array, values) {
- return isArrayLikeObject(array) ? baseDifference(array, values) : []
- })
+ return isArrayLikeObject(array)
+ ? baseDifference(array, values)
+ : [];
+ });
/**
* Creates an array of unique values that is the
@@ -19705,8 +10574,8 @@ var app = (function() {
* // => [1, 3]
*/
var xor = baseRest(function(arrays) {
- return baseXor(arrayFilter(arrays, isArrayLikeObject))
- })
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
+ });
/**
* This method is like `_.xor` except that it accepts `iteratee` which is
@@ -19732,15 +10601,12 @@ var app = (function() {
* // => [{ 'x': 2 }]
*/
var xorBy = baseRest(function(arrays) {
- var iteratee = last(arrays)
+ var iteratee = last(arrays);
if (isArrayLikeObject(iteratee)) {
- iteratee = undefined$1
+ iteratee = undefined$1;
}
- return baseXor(
- arrayFilter(arrays, isArrayLikeObject),
- getIteratee(iteratee, 2)
- )
- })
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
+ });
/**
* This method is like `_.xor` except that it accepts `comparator` which is
@@ -19764,15 +10630,10 @@ var app = (function() {
* // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
*/
var xorWith = baseRest(function(arrays) {
- var comparator = last(arrays)
- comparator =
- typeof comparator == "function" ? comparator : undefined$1
- return baseXor(
- arrayFilter(arrays, isArrayLikeObject),
- undefined$1,
- comparator
- )
- })
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined$1;
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined$1, comparator);
+ });
/**
* Creates an array of grouped elements, the first of which contains the
@@ -19790,7 +10651,7 @@ var app = (function() {
* _.zip(['a', 'b'], [1, 2], [true, false]);
* // => [['a', 1, true], ['b', 2, false]]
*/
- var zip = baseRest(unzip)
+ var zip = baseRest(unzip);
/**
* This method is like `_.fromPairs` except that it accepts two arrays,
@@ -19809,7 +10670,7 @@ var app = (function() {
* // => { 'a': 1, 'b': 2 }
*/
function zipObject(props, values) {
- return baseZipObject(props || [], values || [], assignValue)
+ return baseZipObject(props || [], values || [], assignValue);
}
/**
@@ -19828,7 +10689,7 @@ var app = (function() {
* // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
*/
function zipObjectDeep(props, values) {
- return baseZipObject(props || [], values || [], baseSet)
+ return baseZipObject(props || [], values || [], baseSet);
}
/**
@@ -19853,14 +10714,11 @@ var app = (function() {
*/
var zipWith = baseRest(function(arrays) {
var length = arrays.length,
- iteratee = length > 1 ? arrays[length - 1] : undefined$1
+ iteratee = length > 1 ? arrays[length - 1] : undefined$1;
- iteratee =
- typeof iteratee == "function"
- ? (arrays.pop(), iteratee)
- : undefined$1
- return unzipWith(arrays, iteratee)
- })
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined$1;
+ return unzipWith(arrays, iteratee);
+ });
/*------------------------------------------------------------------------*/
@@ -19894,9 +10752,9 @@ var app = (function() {
* // => 'pebbles is 1'
*/
function chain(value) {
- var result = lodash(value)
- result.__chain__ = true
- return result
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
}
/**
@@ -19923,8 +10781,8 @@ var app = (function() {
* // => [2, 1]
*/
function tap(value, interceptor) {
- interceptor(value)
- return value
+ interceptor(value);
+ return value;
}
/**
@@ -19951,7 +10809,7 @@ var app = (function() {
* // => ['abc']
*/
function thru(value, interceptor) {
- return interceptor(value)
+ return interceptor(value);
}
/**
@@ -19972,33 +10830,27 @@ var app = (function() {
*/
var wrapperAt = flatRest(function(paths) {
var length = paths.length,
- start = length ? paths[0] : 0,
- value = this.__wrapped__,
- interceptor = function(object) {
- return baseAt(object, paths)
- }
+ start = length ? paths[0] : 0,
+ value = this.__wrapped__,
+ interceptor = function(object) { return baseAt(object, paths); };
- if (
- length > 1 ||
- this.__actions__.length ||
- !(value instanceof LazyWrapper) ||
- !isIndex(start)
- ) {
- return this.thru(interceptor)
+ if (length > 1 || this.__actions__.length ||
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
+ return this.thru(interceptor);
}
- value = value.slice(start, +start + (length ? 1 : 0))
+ value = value.slice(start, +start + (length ? 1 : 0));
value.__actions__.push({
- func: thru,
- args: [interceptor],
- thisArg: undefined$1,
- })
+ 'func': thru,
+ 'args': [interceptor],
+ 'thisArg': undefined$1
+ });
return new LodashWrapper(value, this.__chain__).thru(function(array) {
if (length && !array.length) {
- array.push(undefined$1)
+ array.push(undefined$1);
}
- return array
- })
- })
+ return array;
+ });
+ });
/**
* Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
@@ -20028,7 +10880,7 @@ var app = (function() {
* // => { 'user': 'barney' }
*/
function wrapperChain() {
- return chain(this)
+ return chain(this);
}
/**
@@ -20058,7 +10910,7 @@ var app = (function() {
* // => [1, 2, 3]
*/
function wrapperCommit() {
- return new LodashWrapper(this.value(), this.__chain__)
+ return new LodashWrapper(this.value(), this.__chain__);
}
/**
@@ -20085,12 +10937,12 @@ var app = (function() {
*/
function wrapperNext() {
if (this.__values__ === undefined$1) {
- this.__values__ = toArray(this.value())
+ this.__values__ = toArray(this.value());
}
var done = this.__index__ >= this.__values__.length,
- value = done ? undefined$1 : this.__values__[this.__index__++]
+ value = done ? undefined$1 : this.__values__[this.__index__++];
- return { done: done, value: value }
+ return { 'done': done, 'value': value };
}
/**
@@ -20112,7 +10964,7 @@ var app = (function() {
* // => [1, 2]
*/
function wrapperToIterator() {
- return this
+ return this;
}
/**
@@ -20141,22 +10993,22 @@ var app = (function() {
*/
function wrapperPlant(value) {
var result,
- parent = this
+ parent = this;
while (parent instanceof baseLodash) {
- var clone = wrapperClone(parent)
- clone.__index__ = 0
- clone.__values__ = undefined$1
+ var clone = wrapperClone(parent);
+ clone.__index__ = 0;
+ clone.__values__ = undefined$1;
if (result) {
- previous.__wrapped__ = clone
+ previous.__wrapped__ = clone;
} else {
- result = clone
+ result = clone;
}
- var previous = clone
- parent = parent.__wrapped__
+ var previous = clone;
+ parent = parent.__wrapped__;
}
- previous.__wrapped__ = value
- return result
+ previous.__wrapped__ = value;
+ return result;
}
/**
@@ -20180,21 +11032,21 @@ var app = (function() {
* // => [3, 2, 1]
*/
function wrapperReverse() {
- var value = this.__wrapped__
+ var value = this.__wrapped__;
if (value instanceof LazyWrapper) {
- var wrapped = value
+ var wrapped = value;
if (this.__actions__.length) {
- wrapped = new LazyWrapper(this)
+ wrapped = new LazyWrapper(this);
}
- wrapped = wrapped.reverse()
+ wrapped = wrapped.reverse();
wrapped.__actions__.push({
- func: thru,
- args: [reverse],
- thisArg: undefined$1,
- })
- return new LodashWrapper(wrapped, this.__chain__)
+ 'func': thru,
+ 'args': [reverse],
+ 'thisArg': undefined$1
+ });
+ return new LodashWrapper(wrapped, this.__chain__);
}
- return this.thru(reverse)
+ return this.thru(reverse);
}
/**
@@ -20212,7 +11064,7 @@ var app = (function() {
* // => [1, 2, 3]
*/
function wrapperValue() {
- return baseWrapperValue(this.__wrapped__, this.__actions__)
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
}
/*------------------------------------------------------------------------*/
@@ -20241,11 +11093,11 @@ var app = (function() {
*/
var countBy = createAggregator(function(result, value, key) {
if (hasOwnProperty.call(result, key)) {
- ++result[key]
+ ++result[key];
} else {
- baseAssignValue(result, key, 1)
+ baseAssignValue(result, key, 1);
}
- })
+ });
/**
* Checks if `predicate` returns truthy for **all** elements of `collection`.
@@ -20289,11 +11141,11 @@ var app = (function() {
* // => false
*/
function every(collection, predicate, guard) {
- var func = isArray(collection) ? arrayEvery : baseEvery
+ var func = isArray(collection) ? arrayEvery : baseEvery;
if (guard && isIterateeCall(collection, predicate, guard)) {
- predicate = undefined$1
+ predicate = undefined$1;
}
- return func(collection, getIteratee(predicate, 3))
+ return func(collection, getIteratee(predicate, 3));
}
/**
@@ -20334,8 +11186,8 @@ var app = (function() {
* // => objects for ['barney']
*/
function filter(collection, predicate) {
- var func = isArray(collection) ? arrayFilter : baseFilter
- return func(collection, getIteratee(predicate, 3))
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, getIteratee(predicate, 3));
}
/**
@@ -20374,7 +11226,7 @@ var app = (function() {
* _.find(users, 'active');
* // => object for 'barney'
*/
- var find = createFind(findIndex)
+ var find = createFind(findIndex);
/**
* This method is like `_.find` except that it iterates over elements of
@@ -20395,7 +11247,7 @@ var app = (function() {
* });
* // => 3
*/
- var findLast = createFind(findLastIndex)
+ var findLast = createFind(findLastIndex);
/**
* Creates a flattened array of values by running each element in `collection`
@@ -20419,7 +11271,7 @@ var app = (function() {
* // => [1, 1, 2, 2]
*/
function flatMap(collection, iteratee) {
- return baseFlatten(map(collection, iteratee), 1)
+ return baseFlatten(map(collection, iteratee), 1);
}
/**
@@ -20443,7 +11295,7 @@ var app = (function() {
* // => [1, 1, 2, 2]
*/
function flatMapDeep(collection, iteratee) {
- return baseFlatten(map(collection, iteratee), INFINITY)
+ return baseFlatten(map(collection, iteratee), INFINITY);
}
/**
@@ -20468,8 +11320,8 @@ var app = (function() {
* // => [[1, 1], [2, 2]]
*/
function flatMapDepth(collection, iteratee, depth) {
- depth = depth === undefined$1 ? 1 : toInteger(depth)
- return baseFlatten(map(collection, iteratee), depth)
+ depth = depth === undefined$1 ? 1 : toInteger(depth);
+ return baseFlatten(map(collection, iteratee), depth);
}
/**
@@ -20503,8 +11355,8 @@ var app = (function() {
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forEach(collection, iteratee) {
- var func = isArray(collection) ? arrayEach : baseEach
- return func(collection, getIteratee(iteratee, 3))
+ var func = isArray(collection) ? arrayEach : baseEach;
+ return func(collection, getIteratee(iteratee, 3));
}
/**
@@ -20528,8 +11380,8 @@ var app = (function() {
* // => Logs `2` then `1`.
*/
function forEachRight(collection, iteratee) {
- var func = isArray(collection) ? arrayEachRight : baseEachRight
- return func(collection, getIteratee(iteratee, 3))
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
+ return func(collection, getIteratee(iteratee, 3));
}
/**
@@ -20557,11 +11409,11 @@ var app = (function() {
*/
var groupBy = createAggregator(function(result, value, key) {
if (hasOwnProperty.call(result, key)) {
- result[key].push(value)
+ result[key].push(value);
} else {
- baseAssignValue(result, key, [value])
+ baseAssignValue(result, key, [value]);
}
- })
+ });
/**
* Checks if `value` is in `collection`. If `collection` is a string, it's
@@ -20594,16 +11446,16 @@ var app = (function() {
* // => true
*/
function includes(collection, value, fromIndex, guard) {
- collection = isArrayLike(collection) ? collection : values(collection)
- fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
- var length = collection.length
+ var length = collection.length;
if (fromIndex < 0) {
- fromIndex = nativeMax(length + fromIndex, 0)
+ fromIndex = nativeMax(length + fromIndex, 0);
}
return isString(collection)
- ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1
- : !!length && baseIndexOf(collection, value, fromIndex) > -1
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
}
/**
@@ -20631,16 +11483,14 @@ var app = (function() {
*/
var invokeMap = baseRest(function(collection, path, args) {
var index = -1,
- isFunc = typeof path == "function",
- result = isArrayLike(collection) ? Array(collection.length) : []
+ isFunc = typeof path == 'function',
+ result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value) {
- result[++index] = isFunc
- ? apply(path, value, args)
- : baseInvoke(value, path, args)
- })
- return result
- })
+ result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
+ });
+ return result;
+ });
/**
* Creates an object composed of keys generated from the results of running
@@ -20671,8 +11521,8 @@ var app = (function() {
* // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
*/
var keyBy = createAggregator(function(result, value, key) {
- baseAssignValue(result, key, value)
- })
+ baseAssignValue(result, key, value);
+ });
/**
* Creates an array of values by running each element in `collection` thru
@@ -20717,8 +11567,8 @@ var app = (function() {
* // => ['barney', 'fred']
*/
function map(collection, iteratee) {
- var func = isArray(collection) ? arrayMap : baseMap
- return func(collection, getIteratee(iteratee, 3))
+ var func = isArray(collection) ? arrayMap : baseMap;
+ return func(collection, getIteratee(iteratee, 3));
}
/**
@@ -20752,16 +11602,16 @@ var app = (function() {
*/
function orderBy(collection, iteratees, orders, guard) {
if (collection == null) {
- return []
+ return [];
}
if (!isArray(iteratees)) {
- iteratees = iteratees == null ? [] : [iteratees]
+ iteratees = iteratees == null ? [] : [iteratees];
}
- orders = guard ? undefined$1 : orders
+ orders = guard ? undefined$1 : orders;
if (!isArray(orders)) {
- orders = orders == null ? [] : [orders]
+ orders = orders == null ? [] : [orders];
}
- return baseOrderBy(collection, iteratees, orders)
+ return baseOrderBy(collection, iteratees, orders);
}
/**
@@ -20800,14 +11650,9 @@ var app = (function() {
* _.partition(users, 'active');
* // => objects for [['fred'], ['barney', 'pebbles']]
*/
- var partition = createAggregator(
- function(result, value, key) {
- result[key ? 0 : 1].push(value)
- },
- function() {
- return [[], []]
- }
- )
+ var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+ }, function() { return [[], []]; });
/**
* Reduces `collection` to a value which is the accumulated result of running
@@ -20848,15 +11693,9 @@ var app = (function() {
*/
function reduce(collection, iteratee, accumulator) {
var func = isArray(collection) ? arrayReduce : baseReduce,
- initAccum = arguments.length < 3
+ initAccum = arguments.length < 3;
- return func(
- collection,
- getIteratee(iteratee, 4),
- accumulator,
- initAccum,
- baseEach
- )
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
}
/**
@@ -20883,15 +11722,9 @@ var app = (function() {
*/
function reduceRight(collection, iteratee, accumulator) {
var func = isArray(collection) ? arrayReduceRight : baseReduce,
- initAccum = arguments.length < 3
+ initAccum = arguments.length < 3;
- return func(
- collection,
- getIteratee(iteratee, 4),
- accumulator,
- initAccum,
- baseEachRight
- )
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
}
/**
@@ -20929,8 +11762,8 @@ var app = (function() {
* // => objects for ['barney']
*/
function reject(collection, predicate) {
- var func = isArray(collection) ? arrayFilter : baseFilter
- return func(collection, negate(getIteratee(predicate, 3)))
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, negate(getIteratee(predicate, 3)));
}
/**
@@ -20948,8 +11781,8 @@ var app = (function() {
* // => 2
*/
function sample(collection) {
- var func = isArray(collection) ? arraySample : baseSample
- return func(collection)
+ var func = isArray(collection) ? arraySample : baseSample;
+ return func(collection);
}
/**
@@ -20973,15 +11806,13 @@ var app = (function() {
* // => [2, 3, 1]
*/
function sampleSize(collection, n, guard) {
- if (
- guard ? isIterateeCall(collection, n, guard) : n === undefined$1
- ) {
- n = 1
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined$1)) {
+ n = 1;
} else {
- n = toInteger(n)
+ n = toInteger(n);
}
- var func = isArray(collection) ? arraySampleSize : baseSampleSize
- return func(collection, n)
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
+ return func(collection, n);
}
/**
@@ -21000,8 +11831,8 @@ var app = (function() {
* // => [4, 1, 3, 2]
*/
function shuffle(collection) {
- var func = isArray(collection) ? arrayShuffle : baseShuffle
- return func(collection)
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
+ return func(collection);
}
/**
@@ -21027,18 +11858,16 @@ var app = (function() {
*/
function size(collection) {
if (collection == null) {
- return 0
+ return 0;
}
if (isArrayLike(collection)) {
- return isString(collection)
- ? stringSize(collection)
- : collection.length
+ return isString(collection) ? stringSize(collection) : collection.length;
}
- var tag = getTag(collection)
+ var tag = getTag(collection);
if (tag == mapTag || tag == setTag) {
- return collection.size
+ return collection.size;
}
- return baseKeys(collection).length
+ return baseKeys(collection).length;
}
/**
@@ -21078,11 +11907,11 @@ var app = (function() {
* // => true
*/
function some(collection, predicate, guard) {
- var func = isArray(collection) ? arraySome : baseSome
+ var func = isArray(collection) ? arraySome : baseSome;
if (guard && isIterateeCall(collection, predicate, guard)) {
- predicate = undefined$1
+ predicate = undefined$1;
}
- return func(collection, getIteratee(predicate, 3))
+ return func(collection, getIteratee(predicate, 3));
}
/**
@@ -21116,22 +11945,16 @@ var app = (function() {
*/
var sortBy = baseRest(function(collection, iteratees) {
if (collection == null) {
- return []
+ return [];
}
- var length = iteratees.length
- if (
- length > 1 &&
- isIterateeCall(collection, iteratees[0], iteratees[1])
- ) {
- iteratees = []
- } else if (
- length > 2 &&
- isIterateeCall(iteratees[0], iteratees[1], iteratees[2])
- ) {
- iteratees = [iteratees[0]]
+ var length = iteratees.length;
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
}
- return baseOrderBy(collection, baseFlatten(iteratees, 1), [])
- })
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
+ });
/*------------------------------------------------------------------------*/
@@ -21151,11 +11974,9 @@ var app = (function() {
* }, _.now());
* // => Logs the number of milliseconds it took for the deferred invocation.
*/
- var now =
- ctxNow ||
- function() {
- return root.Date.now()
- }
+ var now = ctxNow || function() {
+ return root.Date.now();
+ };
/*------------------------------------------------------------------------*/
@@ -21184,15 +12005,15 @@ var app = (function() {
* // => Logs 'done saving!' after the two async saves have completed.
*/
function after(n, func) {
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT)
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
}
- n = toInteger(n)
+ n = toInteger(n);
return function() {
if (--n < 1) {
- return func.apply(this, arguments)
+ return func.apply(this, arguments);
}
- }
+ };
}
/**
@@ -21213,17 +12034,9 @@ var app = (function() {
* // => [6, 8, 10]
*/
function ary(func, n, guard) {
- n = guard ? undefined$1 : n
- n = func && n == null ? func.length : n
- return createWrap(
- func,
- WRAP_ARY_FLAG,
- undefined$1,
- undefined$1,
- undefined$1,
- undefined$1,
- n
- )
+ n = guard ? undefined$1 : n;
+ n = (func && n == null) ? func.length : n;
+ return createWrap(func, WRAP_ARY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, n);
}
/**
@@ -21244,20 +12057,20 @@ var app = (function() {
* // => Allows adding up to 4 contacts to the list.
*/
function before(n, func) {
- var result
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT)
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
}
- n = toInteger(n)
+ n = toInteger(n);
return function() {
if (--n > 0) {
- result = func.apply(this, arguments)
+ result = func.apply(this, arguments);
}
if (n <= 1) {
- func = undefined$1
+ func = undefined$1;
}
- return result
- }
+ return result;
+ };
}
/**
@@ -21296,13 +12109,13 @@ var app = (function() {
* // => 'hi fred!'
*/
var bind = baseRest(function(func, thisArg, partials) {
- var bitmask = WRAP_BIND_FLAG
+ var bitmask = WRAP_BIND_FLAG;
if (partials.length) {
- var holders = replaceHolders(partials, getHolder(bind))
- bitmask |= WRAP_PARTIAL_FLAG
+ var holders = replaceHolders(partials, getHolder(bind));
+ bitmask |= WRAP_PARTIAL_FLAG;
}
- return createWrap(func, bitmask, thisArg, partials, holders)
- })
+ return createWrap(func, bitmask, thisArg, partials, holders);
+ });
/**
* Creates a function that invokes the method at `object[key]` with `partials`
@@ -21350,13 +12163,13 @@ var app = (function() {
* // => 'hiya fred!'
*/
var bindKey = baseRest(function(object, key, partials) {
- var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG
+ var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
if (partials.length) {
- var holders = replaceHolders(partials, getHolder(bindKey))
- bitmask |= WRAP_PARTIAL_FLAG
+ var holders = replaceHolders(partials, getHolder(bindKey));
+ bitmask |= WRAP_PARTIAL_FLAG;
}
- return createWrap(key, bitmask, object, partials, holders)
- })
+ return createWrap(key, bitmask, object, partials, holders);
+ });
/**
* Creates a function that accepts arguments of `func` and either invokes
@@ -21400,19 +12213,10 @@ var app = (function() {
* // => [1, 2, 3]
*/
function curry(func, arity, guard) {
- arity = guard ? undefined$1 : arity
- var result = createWrap(
- func,
- WRAP_CURRY_FLAG,
- undefined$1,
- undefined$1,
- undefined$1,
- undefined$1,
- undefined$1,
- arity
- )
- result.placeholder = curry.placeholder
- return result
+ arity = guard ? undefined$1 : arity;
+ var result = createWrap(func, WRAP_CURRY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity);
+ result.placeholder = curry.placeholder;
+ return result;
}
/**
@@ -21454,19 +12258,10 @@ var app = (function() {
* // => [1, 2, 3]
*/
function curryRight(func, arity, guard) {
- arity = guard ? undefined$1 : arity
- var result = createWrap(
- func,
- WRAP_CURRY_RIGHT_FLAG,
- undefined$1,
- undefined$1,
- undefined$1,
- undefined$1,
- undefined$1,
- arity
- )
- result.placeholder = curryRight.placeholder
- return result
+ arity = guard ? undefined$1 : arity;
+ var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity);
+ result.placeholder = curryRight.placeholder;
+ return result;
}
/**
@@ -21525,133 +12320,127 @@ var app = (function() {
*/
function debounce(func, wait, options) {
var lastArgs,
- lastThis,
- maxWait,
- result,
- timerId,
- lastCallTime,
- lastInvokeTime = 0,
- leading = false,
- maxing = false,
- trailing = true
+ lastThis,
+ maxWait,
+ result,
+ timerId,
+ lastCallTime,
+ lastInvokeTime = 0,
+ leading = false,
+ maxing = false,
+ trailing = true;
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT)
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
}
- wait = toNumber(wait) || 0
+ wait = toNumber(wait) || 0;
if (isObject(options)) {
- leading = !!options.leading
- maxing = "maxWait" in options
- maxWait = maxing
- ? nativeMax(toNumber(options.maxWait) || 0, wait)
- : maxWait
- trailing = "trailing" in options ? !!options.trailing : trailing
+ leading = !!options.leading;
+ maxing = 'maxWait' in options;
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
}
function invokeFunc(time) {
var args = lastArgs,
- thisArg = lastThis
+ thisArg = lastThis;
- lastArgs = lastThis = undefined$1
- lastInvokeTime = time
- result = func.apply(thisArg, args)
- return result
+ lastArgs = lastThis = undefined$1;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
+ return result;
}
function leadingEdge(time) {
// Reset any `maxWait` timer.
- lastInvokeTime = time
+ lastInvokeTime = time;
// Start the timer for the trailing edge.
- timerId = setTimeout(timerExpired, wait)
+ timerId = setTimeout(timerExpired, wait);
// Invoke the leading edge.
- return leading ? invokeFunc(time) : result
+ return leading ? invokeFunc(time) : result;
}
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime,
- timeWaiting = wait - timeSinceLastCall
+ timeSinceLastInvoke = time - lastInvokeTime,
+ timeWaiting = wait - timeSinceLastCall;
return maxing
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
- : timeWaiting
+ : timeWaiting;
}
function shouldInvoke(time) {
var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime
+ timeSinceLastInvoke = time - lastInvokeTime;
// Either this is the first call, activity has stopped and we're at the
// trailing edge, the system time has gone backwards and we're treating
// it as the trailing edge, or we've hit the `maxWait` limit.
- return (
- lastCallTime === undefined$1 ||
- timeSinceLastCall >= wait ||
- timeSinceLastCall < 0 ||
- (maxing && timeSinceLastInvoke >= maxWait)
- )
+ return (lastCallTime === undefined$1 || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
}
function timerExpired() {
- var time = now()
+ var time = now();
if (shouldInvoke(time)) {
- return trailingEdge(time)
+ return trailingEdge(time);
}
// Restart the timer.
- timerId = setTimeout(timerExpired, remainingWait(time))
+ timerId = setTimeout(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
- timerId = undefined$1
+ timerId = undefined$1;
// Only invoke if we have `lastArgs` which means `func` has been
// debounced at least once.
if (trailing && lastArgs) {
- return invokeFunc(time)
+ return invokeFunc(time);
}
- lastArgs = lastThis = undefined$1
- return result
+ lastArgs = lastThis = undefined$1;
+ return result;
}
function cancel() {
if (timerId !== undefined$1) {
- clearTimeout(timerId)
+ clearTimeout(timerId);
}
- lastInvokeTime = 0
- lastArgs = lastCallTime = lastThis = timerId = undefined$1
+ lastInvokeTime = 0;
+ lastArgs = lastCallTime = lastThis = timerId = undefined$1;
}
function flush() {
- return timerId === undefined$1 ? result : trailingEdge(now())
+ return timerId === undefined$1 ? result : trailingEdge(now());
}
function debounced() {
var time = now(),
- isInvoking = shouldInvoke(time)
+ isInvoking = shouldInvoke(time);
- lastArgs = arguments
- lastThis = this
- lastCallTime = time
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
if (isInvoking) {
if (timerId === undefined$1) {
- return leadingEdge(lastCallTime)
+ return leadingEdge(lastCallTime);
}
if (maxing) {
// Handle invocations in a tight loop.
- clearTimeout(timerId)
- timerId = setTimeout(timerExpired, wait)
- return invokeFunc(lastCallTime)
+ clearTimeout(timerId);
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
}
}
if (timerId === undefined$1) {
- timerId = setTimeout(timerExpired, wait)
+ timerId = setTimeout(timerExpired, wait);
}
- return result
+ return result;
}
- debounced.cancel = cancel
- debounced.flush = flush
- return debounced
+ debounced.cancel = cancel;
+ debounced.flush = flush;
+ return debounced;
}
/**
@@ -21673,8 +12462,8 @@ var app = (function() {
* // => Logs 'deferred' after one millisecond.
*/
var defer = baseRest(function(func, args) {
- return baseDelay(func, 1, args)
- })
+ return baseDelay(func, 1, args);
+ });
/**
* Invokes `func` after `wait` milliseconds. Any additional arguments are
@@ -21696,8 +12485,8 @@ var app = (function() {
* // => Logs 'later' after one second.
*/
var delay = baseRest(function(func, wait, args) {
- return baseDelay(func, toNumber(wait) || 0, args)
- })
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
/**
* Creates a function that invokes `func` with arguments reversed.
@@ -21718,7 +12507,7 @@ var app = (function() {
* // => ['d', 'c', 'b', 'a']
*/
function flip(func) {
- return createWrap(func, WRAP_FLIP_FLAG)
+ return createWrap(func, WRAP_FLIP_FLAG);
}
/**
@@ -21766,30 +12555,27 @@ var app = (function() {
* _.memoize.Cache = WeakMap;
*/
function memoize(func, resolver) {
- if (
- typeof func != "function" ||
- (resolver != null && typeof resolver != "function")
- ) {
- throw new TypeError(FUNC_ERROR_TEXT)
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments,
- key = resolver ? resolver.apply(this, args) : args[0],
- cache = memoized.cache
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
if (cache.has(key)) {
- return cache.get(key)
+ return cache.get(key);
}
- var result = func.apply(this, args)
- memoized.cache = cache.set(key, result) || cache
- return result
- }
- memoized.cache = new (memoize.Cache || MapCache)()
- return memoized
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
}
// Expose `MapCache`.
- memoize.Cache = MapCache
+ memoize.Cache = MapCache;
/**
* Creates a function that negates the result of the predicate `func`. The
@@ -21812,23 +12598,19 @@ var app = (function() {
* // => [1, 3, 5]
*/
function negate(predicate) {
- if (typeof predicate != "function") {
- throw new TypeError(FUNC_ERROR_TEXT)
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
}
return function() {
- var args = arguments
+ var args = arguments;
switch (args.length) {
- case 0:
- return !predicate.call(this)
- case 1:
- return !predicate.call(this, args[0])
- case 2:
- return !predicate.call(this, args[0], args[1])
- case 3:
- return !predicate.call(this, args[0], args[1], args[2])
+ case 0: return !predicate.call(this);
+ case 1: return !predicate.call(this, args[0]);
+ case 2: return !predicate.call(this, args[0], args[1]);
+ case 3: return !predicate.call(this, args[0], args[1], args[2]);
}
- return !predicate.apply(this, args)
- }
+ return !predicate.apply(this, args);
+ };
}
/**
@@ -21850,7 +12632,7 @@ var app = (function() {
* // => `createApplication` is invoked once
*/
function once(func) {
- return before(2, func)
+ return before(2, func);
}
/**
@@ -21885,22 +12667,21 @@ var app = (function() {
* // => [100, 10]
*/
var overArgs = castRest(function(func, transforms) {
- transforms =
- transforms.length == 1 && isArray(transforms[0])
- ? arrayMap(transforms[0], baseUnary(getIteratee()))
- : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()))
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
+ ? arrayMap(transforms[0], baseUnary(getIteratee()))
+ : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
- var funcsLength = transforms.length
+ var funcsLength = transforms.length;
return baseRest(function(args) {
var index = -1,
- length = nativeMin(args.length, funcsLength)
+ length = nativeMin(args.length, funcsLength);
while (++index < length) {
- args[index] = transforms[index].call(this, args[index])
+ args[index] = transforms[index].call(this, args[index]);
}
- return apply(func, this, args)
- })
- })
+ return apply(func, this, args);
+ });
+ });
/**
* Creates a function that invokes `func` with `partials` prepended to the
@@ -21936,15 +12717,9 @@ var app = (function() {
* // => 'hi fred'
*/
var partial = baseRest(function(func, partials) {
- var holders = replaceHolders(partials, getHolder(partial))
- return createWrap(
- func,
- WRAP_PARTIAL_FLAG,
- undefined$1,
- partials,
- holders
- )
- })
+ var holders = replaceHolders(partials, getHolder(partial));
+ return createWrap(func, WRAP_PARTIAL_FLAG, undefined$1, partials, holders);
+ });
/**
* This method is like `_.partial` except that partially applied arguments
@@ -21979,15 +12754,9 @@ var app = (function() {
* // => 'hello fred'
*/
var partialRight = baseRest(function(func, partials) {
- var holders = replaceHolders(partials, getHolder(partialRight))
- return createWrap(
- func,
- WRAP_PARTIAL_RIGHT_FLAG,
- undefined$1,
- partials,
- holders
- )
- })
+ var holders = replaceHolders(partials, getHolder(partialRight));
+ return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined$1, partials, holders);
+ });
/**
* Creates a function that invokes `func` with arguments arranged according
@@ -22012,15 +12781,8 @@ var app = (function() {
* // => ['a', 'b', 'c']
*/
var rearg = flatRest(function(func, indexes) {
- return createWrap(
- func,
- WRAP_REARG_FLAG,
- undefined$1,
- undefined$1,
- undefined$1,
- indexes
- )
- })
+ return createWrap(func, WRAP_REARG_FLAG, undefined$1, undefined$1, undefined$1, indexes);
+ });
/**
* Creates a function that invokes `func` with the `this` binding of the
@@ -22048,11 +12810,11 @@ var app = (function() {
* // => 'hello fred, barney, & pebbles'
*/
function rest(func, start) {
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT)
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
}
- start = start === undefined$1 ? start : toInteger(start)
- return baseRest(func, start)
+ start = start === undefined$1 ? start : toInteger(start);
+ return baseRest(func, start);
}
/**
@@ -22090,19 +12852,19 @@ var app = (function() {
* // => a Promise of 76
*/
function spread(func, start) {
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT)
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
}
- start = start == null ? 0 : nativeMax(toInteger(start), 0)
+ start = start == null ? 0 : nativeMax(toInteger(start), 0);
return baseRest(function(args) {
var array = args[start],
- otherArgs = castSlice(args, 0, start)
+ otherArgs = castSlice(args, 0, start);
if (array) {
- arrayPush(otherArgs, array)
+ arrayPush(otherArgs, array);
}
- return apply(func, this, otherArgs)
- })
+ return apply(func, this, otherArgs);
+ });
}
/**
@@ -22151,20 +12913,20 @@ var app = (function() {
*/
function throttle(func, wait, options) {
var leading = true,
- trailing = true
+ trailing = true;
- if (typeof func != "function") {
- throw new TypeError(FUNC_ERROR_TEXT)
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
}
if (isObject(options)) {
- leading = "leading" in options ? !!options.leading : leading
- trailing = "trailing" in options ? !!options.trailing : trailing
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
}
return debounce(func, wait, {
- leading: leading,
- maxWait: wait,
- trailing: trailing,
- })
+ 'leading': leading,
+ 'maxWait': wait,
+ 'trailing': trailing
+ });
}
/**
@@ -22183,7 +12945,7 @@ var app = (function() {
* // => [6, 8, 10]
*/
function unary(func) {
- return ary(func, 1)
+ return ary(func, 1);
}
/**
@@ -22209,7 +12971,7 @@ var app = (function() {
* // => 'fred, barney, & pebbles
'
*/
function wrap(value, wrapper) {
- return partial(castFunction(wrapper), value)
+ return partial(castFunction(wrapper), value);
}
/*------------------------------------------------------------------------*/
@@ -22249,10 +13011,10 @@ var app = (function() {
*/
function castArray() {
if (!arguments.length) {
- return []
+ return [];
}
- var value = arguments[0]
- return isArray(value) ? value : [value]
+ var value = arguments[0];
+ return isArray(value) ? value : [value];
}
/**
@@ -22282,7 +13044,7 @@ var app = (function() {
* // => true
*/
function clone(value) {
- return baseClone(value, CLONE_SYMBOLS_FLAG)
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
}
/**
@@ -22317,9 +13079,8 @@ var app = (function() {
* // => 0
*/
function cloneWith(value, customizer) {
- customizer =
- typeof customizer == "function" ? customizer : undefined$1
- return baseClone(value, CLONE_SYMBOLS_FLAG, customizer)
+ customizer = typeof customizer == 'function' ? customizer : undefined$1;
+ return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
}
/**
@@ -22341,7 +13102,7 @@ var app = (function() {
* // => false
*/
function cloneDeep(value) {
- return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG)
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
}
/**
@@ -22373,13 +13134,8 @@ var app = (function() {
* // => 20
*/
function cloneDeepWith(value, customizer) {
- customizer =
- typeof customizer == "function" ? customizer : undefined$1
- return baseClone(
- value,
- CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG,
- customizer
- )
+ customizer = typeof customizer == 'function' ? customizer : undefined$1;
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
}
/**
@@ -22407,7 +13163,7 @@ var app = (function() {
* // => false
*/
function conformsTo(object, source) {
- return source == null || baseConformsTo(object, source, keys(source))
+ return source == null || baseConformsTo(object, source, keys(source));
}
/**
@@ -22443,7 +13199,7 @@ var app = (function() {
* // => true
*/
function eq(value, other) {
- return value === other || (value !== value && other !== other)
+ return value === other || (value !== value && other !== other);
}
/**
@@ -22469,7 +13225,7 @@ var app = (function() {
* _.gt(1, 3);
* // => false
*/
- var gt = createRelationalOperation(baseGt)
+ var gt = createRelationalOperation(baseGt);
/**
* Checks if `value` is greater than or equal to `other`.
@@ -22495,8 +13251,8 @@ var app = (function() {
* // => false
*/
var gte = createRelationalOperation(function(value, other) {
- return value >= other
- })
+ return value >= other;
+ });
/**
* Checks if `value` is likely an `arguments` object.
@@ -22516,19 +13272,10 @@ var app = (function() {
* _.isArguments([1, 2, 3]);
* // => false
*/
- var isArguments = baseIsArguments(
- (function() {
- return arguments
- })()
- )
- ? baseIsArguments
- : function(value) {
- return (
- isObjectLike(value) &&
- hasOwnProperty.call(value, "callee") &&
- !propertyIsEnumerable.call(value, "callee")
- )
- }
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+ };
/**
* Checks if `value` is classified as an `Array` object.
@@ -22553,7 +13300,7 @@ var app = (function() {
* _.isArray(_.noop);
* // => false
*/
- var isArray = Array.isArray
+ var isArray = Array.isArray;
/**
* Checks if `value` is classified as an `ArrayBuffer` object.
@@ -22572,9 +13319,7 @@ var app = (function() {
* _.isArrayBuffer(new Array(2));
* // => false
*/
- var isArrayBuffer = nodeIsArrayBuffer
- ? baseUnary(nodeIsArrayBuffer)
- : baseIsArrayBuffer
+ var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
/**
* Checks if `value` is array-like. A value is considered array-like if it's
@@ -22602,7 +13347,7 @@ var app = (function() {
* // => false
*/
function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value)
+ return value != null && isLength(value.length) && !isFunction(value);
}
/**
@@ -22631,7 +13376,7 @@ var app = (function() {
* // => false
*/
function isArrayLikeObject(value) {
- return isObjectLike(value) && isArrayLike(value)
+ return isObjectLike(value) && isArrayLike(value);
}
/**
@@ -22652,11 +13397,8 @@ var app = (function() {
* // => false
*/
function isBoolean(value) {
- return (
- value === true ||
- value === false ||
- (isObjectLike(value) && baseGetTag(value) == boolTag)
- )
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
}
/**
@@ -22676,7 +13418,7 @@ var app = (function() {
* _.isBuffer(new Uint8Array(2));
* // => false
*/
- var isBuffer = nativeIsBuffer || stubFalse
+ var isBuffer = nativeIsBuffer || stubFalse;
/**
* Checks if `value` is classified as a `Date` object.
@@ -22695,7 +13437,7 @@ var app = (function() {
* _.isDate('Mon April 23 2012');
* // => false
*/
- var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate
+ var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
/**
* Checks if `value` is likely a DOM element.
@@ -22715,9 +13457,7 @@ var app = (function() {
* // => false
*/
function isElement(value) {
- return (
- isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value)
- )
+ return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
}
/**
@@ -22755,32 +13495,26 @@ var app = (function() {
*/
function isEmpty(value) {
if (value == null) {
- return true
+ return true;
}
- if (
- isArrayLike(value) &&
- (isArray(value) ||
- typeof value == "string" ||
- typeof value.splice == "function" ||
- isBuffer(value) ||
- isTypedArray(value) ||
- isArguments(value))
- ) {
- return !value.length
+ if (isArrayLike(value) &&
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
+ return !value.length;
}
- var tag = getTag(value)
+ var tag = getTag(value);
if (tag == mapTag || tag == setTag) {
- return !value.size
+ return !value.size;
}
if (isPrototype(value)) {
- return !baseKeys(value).length
+ return !baseKeys(value).length;
}
for (var key in value) {
if (hasOwnProperty.call(value, key)) {
- return false
+ return false;
}
}
- return true
+ return true;
}
/**
@@ -22812,7 +13546,7 @@ var app = (function() {
* // => false
*/
function isEqual(value, other) {
- return baseIsEqual(value, other)
+ return baseIsEqual(value, other);
}
/**
@@ -22848,12 +13582,9 @@ var app = (function() {
* // => true
*/
function isEqualWith(value, other, customizer) {
- customizer =
- typeof customizer == "function" ? customizer : undefined$1
- var result = customizer ? customizer(value, other) : undefined$1
- return result === undefined$1
- ? baseIsEqual(value, other, undefined$1, customizer)
- : !!result
+ customizer = typeof customizer == 'function' ? customizer : undefined$1;
+ var result = customizer ? customizer(value, other) : undefined$1;
+ return result === undefined$1 ? baseIsEqual(value, other, undefined$1, customizer) : !!result;
}
/**
@@ -22876,16 +13607,11 @@ var app = (function() {
*/
function isError(value) {
if (!isObjectLike(value)) {
- return false
+ return false;
}
- var tag = baseGetTag(value)
- return (
- tag == errorTag ||
- tag == domExcTag ||
- (typeof value.message == "string" &&
- typeof value.name == "string" &&
- !isPlainObject(value))
- )
+ var tag = baseGetTag(value);
+ return tag == errorTag || tag == domExcTag ||
+ (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
}
/**
@@ -22915,7 +13641,7 @@ var app = (function() {
* // => false
*/
function isFinite(value) {
- return typeof value == "number" && nativeIsFinite(value)
+ return typeof value == 'number' && nativeIsFinite(value);
}
/**
@@ -22937,17 +13663,12 @@ var app = (function() {
*/
function isFunction(value) {
if (!isObject(value)) {
- return false
+ return false;
}
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
- var tag = baseGetTag(value)
- return (
- tag == funcTag ||
- tag == genTag ||
- tag == asyncTag ||
- tag == proxyTag
- )
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
/**
@@ -22977,7 +13698,7 @@ var app = (function() {
* // => false
*/
function isInteger(value) {
- return typeof value == "number" && value == toInteger(value)
+ return typeof value == 'number' && value == toInteger(value);
}
/**
@@ -23007,12 +13728,8 @@ var app = (function() {
* // => false
*/
function isLength(value) {
- return (
- typeof value == "number" &&
- value > -1 &&
- value % 1 == 0 &&
- value <= MAX_SAFE_INTEGER
- )
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
/**
@@ -23041,8 +13758,8 @@ var app = (function() {
* // => false
*/
function isObject(value) {
- var type = typeof value
- return value != null && (type == "object" || type == "function")
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
}
/**
@@ -23070,7 +13787,7 @@ var app = (function() {
* // => false
*/
function isObjectLike(value) {
- return value != null && typeof value == "object"
+ return value != null && typeof value == 'object';
}
/**
@@ -23090,7 +13807,7 @@ var app = (function() {
* _.isMap(new WeakMap);
* // => false
*/
- var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
/**
* Performs a partial deep comparison between `object` and `source` to
@@ -23121,10 +13838,7 @@ var app = (function() {
* // => false
*/
function isMatch(object, source) {
- return (
- object === source ||
- baseIsMatch(object, source, getMatchData(source))
- )
+ return object === source || baseIsMatch(object, source, getMatchData(source));
}
/**
@@ -23160,9 +13874,8 @@ var app = (function() {
* // => true
*/
function isMatchWith(object, source, customizer) {
- customizer =
- typeof customizer == "function" ? customizer : undefined$1
- return baseIsMatch(object, source, getMatchData(source), customizer)
+ customizer = typeof customizer == 'function' ? customizer : undefined$1;
+ return baseIsMatch(object, source, getMatchData(source), customizer);
}
/**
@@ -23197,7 +13910,7 @@ var app = (function() {
// An `NaN` primitive is the only value that is not equal to itself.
// Perform the `toStringTag` check first to avoid errors with some
// ActiveX objects in IE.
- return isNumber(value) && value != +value
+ return isNumber(value) && value != +value;
}
/**
@@ -23228,9 +13941,9 @@ var app = (function() {
*/
function isNative(value) {
if (isMaskable(value)) {
- throw new Error(CORE_ERROR_TEXT)
+ throw new Error(CORE_ERROR_TEXT);
}
- return baseIsNative(value)
+ return baseIsNative(value);
}
/**
@@ -23251,7 +13964,7 @@ var app = (function() {
* // => false
*/
function isNull(value) {
- return value === null
+ return value === null;
}
/**
@@ -23275,7 +13988,7 @@ var app = (function() {
* // => false
*/
function isNil(value) {
- return value == null
+ return value == null;
}
/**
@@ -23305,10 +14018,8 @@ var app = (function() {
* // => false
*/
function isNumber(value) {
- return (
- typeof value == "number" ||
- (isObjectLike(value) && baseGetTag(value) == numberTag)
- )
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
}
/**
@@ -23341,19 +14052,15 @@ var app = (function() {
*/
function isPlainObject(value) {
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
- return false
+ return false;
}
- var proto = getPrototype(value)
+ var proto = getPrototype(value);
if (proto === null) {
- return true
+ return true;
}
- var Ctor =
- hasOwnProperty.call(proto, "constructor") && proto.constructor
- return (
- typeof Ctor == "function" &&
- Ctor instanceof Ctor &&
- funcToString.call(Ctor) == objectCtorString
- )
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+ funcToString.call(Ctor) == objectCtorString;
}
/**
@@ -23373,7 +14080,7 @@ var app = (function() {
* _.isRegExp('/abc/');
* // => false
*/
- var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp
+ var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
/**
* Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
@@ -23403,11 +14110,7 @@ var app = (function() {
* // => false
*/
function isSafeInteger(value) {
- return (
- isInteger(value) &&
- value >= -MAX_SAFE_INTEGER &&
- value <= MAX_SAFE_INTEGER
- )
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
}
/**
@@ -23427,7 +14130,7 @@ var app = (function() {
* _.isSet(new WeakSet);
* // => false
*/
- var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
/**
* Checks if `value` is classified as a `String` primitive or object.
@@ -23447,12 +14150,8 @@ var app = (function() {
* // => false
*/
function isString(value) {
- return (
- typeof value == "string" ||
- (!isArray(value) &&
- isObjectLike(value) &&
- baseGetTag(value) == stringTag)
- )
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
}
/**
@@ -23473,10 +14172,8 @@ var app = (function() {
* // => false
*/
function isSymbol(value) {
- return (
- typeof value == "symbol" ||
- (isObjectLike(value) && baseGetTag(value) == symbolTag)
- )
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
}
/**
@@ -23496,9 +14193,7 @@ var app = (function() {
* _.isTypedArray([]);
* // => false
*/
- var isTypedArray = nodeIsTypedArray
- ? baseUnary(nodeIsTypedArray)
- : baseIsTypedArray
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
/**
* Checks if `value` is `undefined`.
@@ -23518,7 +14213,7 @@ var app = (function() {
* // => false
*/
function isUndefined(value) {
- return value === undefined$1
+ return value === undefined$1;
}
/**
@@ -23539,7 +14234,7 @@ var app = (function() {
* // => false
*/
function isWeakMap(value) {
- return isObjectLike(value) && getTag(value) == weakMapTag
+ return isObjectLike(value) && getTag(value) == weakMapTag;
}
/**
@@ -23560,7 +14255,7 @@ var app = (function() {
* // => false
*/
function isWeakSet(value) {
- return isObjectLike(value) && baseGetTag(value) == weakSetTag
+ return isObjectLike(value) && baseGetTag(value) == weakSetTag;
}
/**
@@ -23586,7 +14281,7 @@ var app = (function() {
* _.lt(3, 1);
* // => false
*/
- var lt = createRelationalOperation(baseLt)
+ var lt = createRelationalOperation(baseLt);
/**
* Checks if `value` is less than or equal to `other`.
@@ -23612,8 +14307,8 @@ var app = (function() {
* // => false
*/
var lte = createRelationalOperation(function(value, other) {
- return value <= other
- })
+ return value <= other;
+ });
/**
* Converts `value` to an array.
@@ -23640,19 +14335,18 @@ var app = (function() {
*/
function toArray(value) {
if (!value) {
- return []
+ return [];
}
if (isArrayLike(value)) {
- return isString(value) ? stringToArray(value) : copyArray(value)
+ return isString(value) ? stringToArray(value) : copyArray(value);
}
if (symIterator && value[symIterator]) {
- return iteratorToArray(value[symIterator]())
+ return iteratorToArray(value[symIterator]());
}
var tag = getTag(value),
- func =
- tag == mapTag ? mapToArray : tag == setTag ? setToArray : values
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
- return func(value)
+ return func(value);
}
/**
@@ -23680,14 +14374,14 @@ var app = (function() {
*/
function toFinite(value) {
if (!value) {
- return value === 0 ? value : 0
+ return value === 0 ? value : 0;
}
- value = toNumber(value)
+ value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
- var sign = value < 0 ? -1 : 1
- return sign * MAX_INTEGER
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
}
- return value === value ? value : 0
+ return value === value ? value : 0;
}
/**
@@ -23718,13 +14412,9 @@ var app = (function() {
*/
function toInteger(value) {
var result = toFinite(value),
- remainder = result % 1
+ remainder = result % 1;
- return result === result
- ? remainder
- ? result - remainder
- : result
- : 0
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -23755,7 +14445,7 @@ var app = (function() {
* // => 3
*/
function toLength(value) {
- return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0
+ return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
}
/**
@@ -23782,27 +14472,24 @@ var app = (function() {
* // => 3.2
*/
function toNumber(value) {
- if (typeof value == "number") {
- return value
+ if (typeof value == 'number') {
+ return value;
}
if (isSymbol(value)) {
- return NAN
+ return NAN;
}
if (isObject(value)) {
- var other =
- typeof value.valueOf == "function" ? value.valueOf() : value
- value = isObject(other) ? other + "" : other
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
}
- if (typeof value != "string") {
- return value === 0 ? value : +value
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
}
- value = value.replace(reTrim, "")
- var isBinary = reIsBinary.test(value)
- return isBinary || reIsOctal.test(value)
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
- : reIsBadHex.test(value)
- ? NAN
- : +value
+ : (reIsBadHex.test(value) ? NAN : +value);
}
/**
@@ -23830,7 +14517,7 @@ var app = (function() {
* // => { 'a': 1, 'b': 2, 'c': 3 }
*/
function toPlainObject(value) {
- return copyObject(value, keysIn(value))
+ return copyObject(value, keysIn(value));
}
/**
@@ -23860,9 +14547,7 @@ var app = (function() {
function toSafeInteger(value) {
return value
? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
- : value === 0
- ? value
- : 0
+ : (value === 0 ? value : 0);
}
/**
@@ -23887,7 +14572,7 @@ var app = (function() {
* // => '1,2,3'
*/
function toString(value) {
- return value == null ? "" : baseToString(value)
+ return value == null ? '' : baseToString(value);
}
/*------------------------------------------------------------------------*/
@@ -23926,15 +14611,15 @@ var app = (function() {
*/
var assign = createAssigner(function(object, source) {
if (isPrototype(source) || isArrayLike(source)) {
- copyObject(source, keys(source), object)
- return
+ copyObject(source, keys(source), object);
+ return;
}
for (var key in source) {
if (hasOwnProperty.call(source, key)) {
- assignValue(object, key, source[key])
+ assignValue(object, key, source[key]);
}
}
- })
+ });
/**
* This method is like `_.assign` except that it iterates over own and
@@ -23968,8 +14653,8 @@ var app = (function() {
* // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
*/
var assignIn = createAssigner(function(object, source) {
- copyObject(source, keysIn(source), object)
- })
+ copyObject(source, keysIn(source), object);
+ });
/**
* This method is like `_.assignIn` except that it accepts `customizer`
@@ -24000,14 +14685,9 @@ var app = (function() {
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
- var assignInWith = createAssigner(function(
- object,
- source,
- srcIndex,
- customizer
- ) {
- copyObject(source, keysIn(source), object, customizer)
- })
+ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+ });
/**
* This method is like `_.assign` except that it accepts `customizer`
@@ -24037,14 +14717,9 @@ var app = (function() {
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
- var assignWith = createAssigner(function(
- object,
- source,
- srcIndex,
- customizer
- ) {
- copyObject(source, keys(source), object, customizer)
- })
+ var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keys(source), object, customizer);
+ });
/**
* Creates an array of values corresponding to `paths` of `object`.
@@ -24063,7 +14738,7 @@ var app = (function() {
* _.at(object, ['a[0].b.c', 'a[1]']);
* // => [3, 4]
*/
- var at = flatRest(baseAt)
+ var at = flatRest(baseAt);
/**
* Creates an object that inherits from the `prototype` object. If a
@@ -24100,8 +14775,8 @@ var app = (function() {
* // => true
*/
function create(prototype, properties) {
- var result = baseCreate(prototype)
- return properties == null ? result : baseAssign(result, properties)
+ var result = baseCreate(prototype);
+ return properties == null ? result : baseAssign(result, properties);
}
/**
@@ -24126,38 +14801,35 @@ var app = (function() {
* // => { 'a': 1, 'b': 2 }
*/
var defaults = baseRest(function(object, sources) {
- object = Object(object)
+ object = Object(object);
- var index = -1
- var length = sources.length
- var guard = length > 2 ? sources[2] : undefined$1
+ var index = -1;
+ var length = sources.length;
+ var guard = length > 2 ? sources[2] : undefined$1;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- length = 1
+ length = 1;
}
while (++index < length) {
- var source = sources[index]
- var props = keysIn(source)
- var propsIndex = -1
- var propsLength = props.length
+ var source = sources[index];
+ var props = keysIn(source);
+ var propsIndex = -1;
+ var propsLength = props.length;
while (++propsIndex < propsLength) {
- var key = props[propsIndex]
- var value = object[key]
+ var key = props[propsIndex];
+ var value = object[key];
- if (
- value === undefined$1 ||
- (eq(value, objectProto[key]) &&
- !hasOwnProperty.call(object, key))
- ) {
- object[key] = source[key]
+ if (value === undefined$1 ||
+ (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ object[key] = source[key];
}
}
}
- return object
- })
+ return object;
+ });
/**
* This method is like `_.defaults` except that it recursively assigns
@@ -24179,9 +14851,9 @@ var app = (function() {
* // => { 'a': { 'b': 2, 'c': 3 } }
*/
var defaultsDeep = baseRest(function(args) {
- args.push(undefined$1, customDefaultsMerge)
- return apply(mergeWith, undefined$1, args)
- })
+ args.push(undefined$1, customDefaultsMerge);
+ return apply(mergeWith, undefined$1, args);
+ });
/**
* This method is like `_.find` except that it returns the key of the first
@@ -24219,7 +14891,7 @@ var app = (function() {
* // => 'barney'
*/
function findKey(object, predicate) {
- return baseFindKey(object, getIteratee(predicate, 3), baseForOwn)
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
}
/**
@@ -24258,7 +14930,7 @@ var app = (function() {
* // => 'pebbles'
*/
function findLastKey(object, predicate) {
- return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight)
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
}
/**
@@ -24292,7 +14964,7 @@ var app = (function() {
function forIn(object, iteratee) {
return object == null
? object
- : baseFor(object, getIteratee(iteratee, 3), keysIn)
+ : baseFor(object, getIteratee(iteratee, 3), keysIn);
}
/**
@@ -24324,7 +14996,7 @@ var app = (function() {
function forInRight(object, iteratee) {
return object == null
? object
- : baseForRight(object, getIteratee(iteratee, 3), keysIn)
+ : baseForRight(object, getIteratee(iteratee, 3), keysIn);
}
/**
@@ -24356,7 +15028,7 @@ var app = (function() {
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forOwn(object, iteratee) {
- return object && baseForOwn(object, getIteratee(iteratee, 3))
+ return object && baseForOwn(object, getIteratee(iteratee, 3));
}
/**
@@ -24386,7 +15058,7 @@ var app = (function() {
* // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
*/
function forOwnRight(object, iteratee) {
- return object && baseForOwnRight(object, getIteratee(iteratee, 3))
+ return object && baseForOwnRight(object, getIteratee(iteratee, 3));
}
/**
@@ -24413,7 +15085,7 @@ var app = (function() {
* // => ['a', 'b']
*/
function functions(object) {
- return object == null ? [] : baseFunctions(object, keys(object))
+ return object == null ? [] : baseFunctions(object, keys(object));
}
/**
@@ -24440,7 +15112,7 @@ var app = (function() {
* // => ['a', 'b', 'c']
*/
function functionsIn(object) {
- return object == null ? [] : baseFunctions(object, keysIn(object))
+ return object == null ? [] : baseFunctions(object, keysIn(object));
}
/**
@@ -24469,8 +15141,8 @@ var app = (function() {
* // => 'default'
*/
function get(object, path, defaultValue) {
- var result = object == null ? undefined$1 : baseGet(object, path)
- return result === undefined$1 ? defaultValue : result
+ var result = object == null ? undefined$1 : baseGet(object, path);
+ return result === undefined$1 ? defaultValue : result;
}
/**
@@ -24501,7 +15173,7 @@ var app = (function() {
* // => false
*/
function has(object, path) {
- return object != null && hasPath(object, path, baseHas)
+ return object != null && hasPath(object, path, baseHas);
}
/**
@@ -24531,7 +15203,7 @@ var app = (function() {
* // => false
*/
function hasIn(object, path) {
- return object != null && hasPath(object, path, baseHasIn)
+ return object != null && hasPath(object, path, baseHasIn);
}
/**
@@ -24553,12 +15225,13 @@ var app = (function() {
* // => { '1': 'c', '2': 'b' }
*/
var invert = createInverter(function(result, value, key) {
- if (value != null && typeof value.toString != "function") {
- value = nativeObjectToString.call(value)
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
}
- result[value] = key
- }, constant(identity))
+ result[value] = key;
+ }, constant(identity));
/**
* This method is like `_.invert` except that the inverted object is generated
@@ -24587,16 +15260,17 @@ var app = (function() {
* // => { 'group1': ['a', 'c'], 'group2': ['b'] }
*/
var invertBy = createInverter(function(result, value, key) {
- if (value != null && typeof value.toString != "function") {
- value = nativeObjectToString.call(value)
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
}
if (hasOwnProperty.call(result, value)) {
- result[value].push(key)
+ result[value].push(key);
} else {
- result[value] = [key]
+ result[value] = [key];
}
- }, getIteratee)
+ }, getIteratee);
/**
* Invokes the method at `path` of `object`.
@@ -24616,7 +15290,7 @@ var app = (function() {
* _.invoke(object, 'a[0].b.c.slice', 1, 3);
* // => [2, 3]
*/
- var invoke = baseRest(baseInvoke)
+ var invoke = baseRest(baseInvoke);
/**
* Creates an array of the own enumerable property names of `object`.
@@ -24647,7 +15321,7 @@ var app = (function() {
* // => ['0', '1']
*/
function keys(object) {
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object)
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
/**
@@ -24674,9 +15348,7 @@ var app = (function() {
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
function keysIn(object) {
- return isArrayLike(object)
- ? arrayLikeKeys(object, true)
- : baseKeysIn(object)
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}
/**
@@ -24701,13 +15373,13 @@ var app = (function() {
* // => { 'a1': 1, 'b2': 2 }
*/
function mapKeys(object, iteratee) {
- var result = {}
- iteratee = getIteratee(iteratee, 3)
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
baseForOwn(object, function(value, key, object) {
- baseAssignValue(result, iteratee(value, key, object), value)
- })
- return result
+ baseAssignValue(result, iteratee(value, key, object), value);
+ });
+ return result;
}
/**
@@ -24739,13 +15411,13 @@ var app = (function() {
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
*/
function mapValues(object, iteratee) {
- var result = {}
- iteratee = getIteratee(iteratee, 3)
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
baseForOwn(object, function(value, key, object) {
- baseAssignValue(result, key, iteratee(value, key, object))
- })
- return result
+ baseAssignValue(result, key, iteratee(value, key, object));
+ });
+ return result;
}
/**
@@ -24780,8 +15452,8 @@ var app = (function() {
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
- baseMerge(object, source, srcIndex)
- })
+ baseMerge(object, source, srcIndex);
+ });
/**
* This method is like `_.merge` except that it accepts `customizer` which
@@ -24814,14 +15486,9 @@ var app = (function() {
* _.mergeWith(object, other, customizer);
* // => { 'a': [1, 3], 'b': [2, 4] }
*/
- var mergeWith = createAssigner(function(
- object,
- source,
- srcIndex,
- customizer
- ) {
- baseMerge(object, source, srcIndex, customizer)
- })
+ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
+ baseMerge(object, source, srcIndex, customizer);
+ });
/**
* The opposite of `_.pick`; this method creates an object composed of the
@@ -24844,30 +15511,26 @@ var app = (function() {
* // => { 'b': '2' }
*/
var omit = flatRest(function(object, paths) {
- var result = {}
+ var result = {};
if (object == null) {
- return result
+ return result;
}
- var isDeep = false
+ var isDeep = false;
paths = arrayMap(paths, function(path) {
- path = castPath(path, object)
- isDeep || (isDeep = path.length > 1)
- return path
- })
- copyObject(object, getAllKeysIn(object), result)
+ path = castPath(path, object);
+ isDeep || (isDeep = path.length > 1);
+ return path;
+ });
+ copyObject(object, getAllKeysIn(object), result);
if (isDeep) {
- result = baseClone(
- result,
- CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG,
- customOmitClone
- )
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
}
- var length = paths.length
+ var length = paths.length;
while (length--) {
- baseUnset(result, paths[length])
+ baseUnset(result, paths[length]);
}
- return result
- })
+ return result;
+ });
/**
* The opposite of `_.pickBy`; this method creates an object composed of
@@ -24890,7 +15553,7 @@ var app = (function() {
* // => { 'b': '2' }
*/
function omitBy(object, predicate) {
- return pickBy(object, negate(getIteratee(predicate)))
+ return pickBy(object, negate(getIteratee(predicate)));
}
/**
@@ -24911,8 +15574,8 @@ var app = (function() {
* // => { 'a': 1, 'c': 3 }
*/
var pick = flatRest(function(object, paths) {
- return object == null ? {} : basePick(object, paths)
- })
+ return object == null ? {} : basePick(object, paths);
+ });
/**
* Creates an object composed of the `object` properties `predicate` returns
@@ -24934,15 +15597,15 @@ var app = (function() {
*/
function pickBy(object, predicate) {
if (object == null) {
- return {}
+ return {};
}
var props = arrayMap(getAllKeysIn(object), function(prop) {
- return [prop]
- })
- predicate = getIteratee(predicate)
+ return [prop];
+ });
+ predicate = getIteratee(predicate);
return basePickBy(object, props, function(value, path) {
- return predicate(value, path[0])
- })
+ return predicate(value, path[0]);
+ });
}
/**
@@ -24975,26 +15638,25 @@ var app = (function() {
* // => 'default'
*/
function result(object, path, defaultValue) {
- path = castPath(path, object)
+ path = castPath(path, object);
var index = -1,
- length = path.length
+ length = path.length;
// Ensure the loop is entered when path is empty.
if (!length) {
- length = 1
- object = undefined$1
+ length = 1;
+ object = undefined$1;
}
while (++index < length) {
- var value =
- object == null ? undefined$1 : object[toKey(path[index])]
+ var value = object == null ? undefined$1 : object[toKey(path[index])];
if (value === undefined$1) {
- index = length
- value = defaultValue
+ index = length;
+ value = defaultValue;
}
- object = isFunction(value) ? value.call(object) : value
+ object = isFunction(value) ? value.call(object) : value;
}
- return object
+ return object;
}
/**
@@ -25026,7 +15688,7 @@ var app = (function() {
* // => 5
*/
function set(object, path, value) {
- return object == null ? object : baseSet(object, path, value)
+ return object == null ? object : baseSet(object, path, value);
}
/**
@@ -25054,11 +15716,8 @@ var app = (function() {
* // => { '0': { '1': 'a' } }
*/
function setWith(object, path, value, customizer) {
- customizer =
- typeof customizer == "function" ? customizer : undefined$1
- return object == null
- ? object
- : baseSet(object, path, value, customizer)
+ customizer = typeof customizer == 'function' ? customizer : undefined$1;
+ return object == null ? object : baseSet(object, path, value, customizer);
}
/**
@@ -25085,7 +15744,7 @@ var app = (function() {
* _.toPairs(new Foo);
* // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
*/
- var toPairs = createToPairs(keys)
+ var toPairs = createToPairs(keys);
/**
* Creates an array of own and inherited enumerable string keyed-value pairs
@@ -25111,7 +15770,7 @@ var app = (function() {
* _.toPairsIn(new Foo);
* // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
*/
- var toPairsIn = createToPairs(keysIn)
+ var toPairsIn = createToPairs(keysIn);
/**
* An alternative to `_.reduce`; this method transforms `object` to a new
@@ -25145,29 +15804,25 @@ var app = (function() {
*/
function transform(object, iteratee, accumulator) {
var isArr = isArray(object),
- isArrLike = isArr || isBuffer(object) || isTypedArray(object)
+ isArrLike = isArr || isBuffer(object) || isTypedArray(object);
- iteratee = getIteratee(iteratee, 4)
+ iteratee = getIteratee(iteratee, 4);
if (accumulator == null) {
- var Ctor = object && object.constructor
+ var Ctor = object && object.constructor;
if (isArrLike) {
- accumulator = isArr ? new Ctor() : []
- } else if (isObject(object)) {
- accumulator = isFunction(Ctor)
- ? baseCreate(getPrototype(object))
- : {}
- } else {
- accumulator = {}
+ accumulator = isArr ? new Ctor : [];
+ }
+ else if (isObject(object)) {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ else {
+ accumulator = {};
}
}
- ;(isArrLike ? arrayEach : baseForOwn)(object, function(
- value,
- index,
- object
- ) {
- return iteratee(accumulator, value, index, object)
- })
- return accumulator
+ (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
}
/**
@@ -25198,7 +15853,7 @@ var app = (function() {
* // => { 'a': [{ 'b': {} }] };
*/
function unset(object, path) {
- return object == null ? true : baseUnset(object, path)
+ return object == null ? true : baseUnset(object, path);
}
/**
@@ -25229,9 +15884,7 @@ var app = (function() {
* // => 0
*/
function update(object, path, updater) {
- return object == null
- ? object
- : baseUpdate(object, path, castFunction(updater))
+ return object == null ? object : baseUpdate(object, path, castFunction(updater));
}
/**
@@ -25259,11 +15912,8 @@ var app = (function() {
* // => { '0': { '1': 'a' } }
*/
function updateWith(object, path, updater, customizer) {
- customizer =
- typeof customizer == "function" ? customizer : undefined$1
- return object == null
- ? object
- : baseUpdate(object, path, castFunction(updater), customizer)
+ customizer = typeof customizer == 'function' ? customizer : undefined$1;
+ return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
}
/**
@@ -25293,7 +15943,7 @@ var app = (function() {
* // => ['h', 'i']
*/
function values(object) {
- return object == null ? [] : baseValues(object, keys(object))
+ return object == null ? [] : baseValues(object, keys(object));
}
/**
@@ -25321,7 +15971,7 @@ var app = (function() {
* // => [1, 2, 3] (iteration order is not guaranteed)
*/
function valuesIn(object) {
- return object == null ? [] : baseValues(object, keysIn(object))
+ return object == null ? [] : baseValues(object, keysIn(object));
}
/*------------------------------------------------------------------------*/
@@ -25347,18 +15997,18 @@ var app = (function() {
*/
function clamp(number, lower, upper) {
if (upper === undefined$1) {
- upper = lower
- lower = undefined$1
+ upper = lower;
+ lower = undefined$1;
}
if (upper !== undefined$1) {
- upper = toNumber(upper)
- upper = upper === upper ? upper : 0
+ upper = toNumber(upper);
+ upper = upper === upper ? upper : 0;
}
if (lower !== undefined$1) {
- lower = toNumber(lower)
- lower = lower === lower ? lower : 0
+ lower = toNumber(lower);
+ lower = lower === lower ? lower : 0;
}
- return baseClamp(toNumber(number), lower, upper)
+ return baseClamp(toNumber(number), lower, upper);
}
/**
@@ -25400,15 +16050,15 @@ var app = (function() {
* // => true
*/
function inRange(number, start, end) {
- start = toFinite(start)
+ start = toFinite(start);
if (end === undefined$1) {
- end = start
- start = 0
+ end = start;
+ start = 0;
} else {
- end = toFinite(end)
+ end = toFinite(end);
}
- number = toNumber(number)
- return baseInRange(number, start, end)
+ number = toNumber(number);
+ return baseInRange(number, start, end);
}
/**
@@ -25443,51 +16093,42 @@ var app = (function() {
* // => a floating-point number between 1.2 and 5.2
*/
function random(lower, upper, floating) {
- if (
- floating &&
- typeof floating != "boolean" &&
- isIterateeCall(lower, upper, floating)
- ) {
- upper = floating = undefined$1
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
+ upper = floating = undefined$1;
}
if (floating === undefined$1) {
- if (typeof upper == "boolean") {
- floating = upper
- upper = undefined$1
- } else if (typeof lower == "boolean") {
- floating = lower
- lower = undefined$1
+ if (typeof upper == 'boolean') {
+ floating = upper;
+ upper = undefined$1;
+ }
+ else if (typeof lower == 'boolean') {
+ floating = lower;
+ lower = undefined$1;
}
}
if (lower === undefined$1 && upper === undefined$1) {
- lower = 0
- upper = 1
- } else {
- lower = toFinite(lower)
+ lower = 0;
+ upper = 1;
+ }
+ else {
+ lower = toFinite(lower);
if (upper === undefined$1) {
- upper = lower
- lower = 0
+ upper = lower;
+ lower = 0;
} else {
- upper = toFinite(upper)
+ upper = toFinite(upper);
}
}
if (lower > upper) {
- var temp = lower
- lower = upper
- upper = temp
+ var temp = lower;
+ lower = upper;
+ upper = temp;
}
if (floating || lower % 1 || upper % 1) {
- var rand = nativeRandom()
- return nativeMin(
- lower +
- rand *
- (upper -
- lower +
- freeParseFloat("1e-" + ((rand + "").length - 1))),
- upper
- )
+ var rand = nativeRandom();
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
}
- return baseRandom(lower, upper)
+ return baseRandom(lower, upper);
}
/*------------------------------------------------------------------------*/
@@ -25513,9 +16154,9 @@ var app = (function() {
* // => 'fooBar'
*/
var camelCase = createCompounder(function(result, word, index) {
- word = word.toLowerCase()
- return result + (index ? capitalize(word) : word)
- })
+ word = word.toLowerCase();
+ return result + (index ? capitalize(word) : word);
+ });
/**
* Converts the first character of `string` to upper case and the remaining
@@ -25533,7 +16174,7 @@ var app = (function() {
* // => 'Fred'
*/
function capitalize(string) {
- return upperFirst(toString(string).toLowerCase())
+ return upperFirst(toString(string).toLowerCase());
}
/**
@@ -25555,11 +16196,8 @@ var app = (function() {
* // => 'deja vu'
*/
function deburr(string) {
- string = toString(string)
- return (
- string &&
- string.replace(reLatin, deburrLetter).replace(reComboMark, "")
- )
+ string = toString(string);
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
}
/**
@@ -25586,18 +16224,17 @@ var app = (function() {
* // => true
*/
function endsWith(string, target, position) {
- string = toString(string)
- target = baseToString(target)
+ string = toString(string);
+ target = baseToString(target);
- var length = string.length
- position =
- position === undefined$1
- ? length
- : baseClamp(toInteger(position), 0, length)
+ var length = string.length;
+ position = position === undefined$1
+ ? length
+ : baseClamp(toInteger(position), 0, length);
- var end = position
- position -= target.length
- return position >= 0 && string.slice(position, end) == target
+ var end = position;
+ position -= target.length;
+ return position >= 0 && string.slice(position, end) == target;
}
/**
@@ -25629,10 +16266,10 @@ var app = (function() {
* // => 'fred, barney, & pebbles'
*/
function escape(string) {
- string = toString(string)
- return string && reHasUnescapedHtml.test(string)
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
? string.replace(reUnescapedHtml, escapeHtmlChar)
- : string
+ : string;
}
/**
@@ -25651,10 +16288,10 @@ var app = (function() {
* // => '\[lodash\]\(https://lodash\.com/\)'
*/
function escapeRegExp(string) {
- string = toString(string)
- return string && reHasRegExpChar.test(string)
- ? string.replace(reRegExpChar, "\\$&")
- : string
+ string = toString(string);
+ return (string && reHasRegExpChar.test(string))
+ ? string.replace(reRegExpChar, '\\$&')
+ : string;
}
/**
@@ -25679,8 +16316,8 @@ var app = (function() {
* // => 'foo-bar'
*/
var kebabCase = createCompounder(function(result, word, index) {
- return result + (index ? "-" : "") + word.toLowerCase()
- })
+ return result + (index ? '-' : '') + word.toLowerCase();
+ });
/**
* Converts `string`, as space separated words, to lower case.
@@ -25703,8 +16340,8 @@ var app = (function() {
* // => 'foo bar'
*/
var lowerCase = createCompounder(function(result, word, index) {
- return result + (index ? " " : "") + word.toLowerCase()
- })
+ return result + (index ? ' ' : '') + word.toLowerCase();
+ });
/**
* Converts the first character of `string` to lower case.
@@ -25723,7 +16360,7 @@ var app = (function() {
* _.lowerFirst('FRED');
* // => 'fRED'
*/
- var lowerFirst = createCaseFirst("toLowerCase")
+ var lowerFirst = createCaseFirst('toLowerCase');
/**
* Pads `string` on the left and right sides if it's shorter than `length`.
@@ -25749,19 +16386,19 @@ var app = (function() {
* // => 'abc'
*/
function pad(string, length, chars) {
- string = toString(string)
- length = toInteger(length)
+ string = toString(string);
+ length = toInteger(length);
- var strLength = length ? stringSize(string) : 0
+ var strLength = length ? stringSize(string) : 0;
if (!length || strLength >= length) {
- return string
+ return string;
}
- var mid = (length - strLength) / 2
+ var mid = (length - strLength) / 2;
return (
createPadding(nativeFloor(mid), chars) +
string +
createPadding(nativeCeil(mid), chars)
- )
+ );
}
/**
@@ -25788,13 +16425,13 @@ var app = (function() {
* // => 'abc'
*/
function padEnd(string, length, chars) {
- string = toString(string)
- length = toInteger(length)
+ string = toString(string);
+ length = toInteger(length);
- var strLength = length ? stringSize(string) : 0
- return length && strLength < length
- ? string + createPadding(length - strLength, chars)
- : string
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (string + createPadding(length - strLength, chars))
+ : string;
}
/**
@@ -25821,13 +16458,13 @@ var app = (function() {
* // => 'abc'
*/
function padStart(string, length, chars) {
- string = toString(string)
- length = toInteger(length)
+ string = toString(string);
+ length = toInteger(length);
- var strLength = length ? stringSize(string) : 0
- return length && strLength < length
- ? createPadding(length - strLength, chars) + string
- : string
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (createPadding(length - strLength, chars) + string)
+ : string;
}
/**
@@ -25856,14 +16493,11 @@ var app = (function() {
*/
function parseInt(string, radix, guard) {
if (guard || radix == null) {
- radix = 0
+ radix = 0;
} else if (radix) {
- radix = +radix
+ radix = +radix;
}
- return nativeParseInt(
- toString(string).replace(reTrimStart, ""),
- radix || 0
- )
+ return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
}
/**
@@ -25889,12 +16523,12 @@ var app = (function() {
* // => ''
*/
function repeat(string, n, guard) {
- if (guard ? isIterateeCall(string, n, guard) : n === undefined$1) {
- n = 1
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined$1)) {
+ n = 1;
} else {
- n = toInteger(n)
+ n = toInteger(n);
}
- return baseRepeat(toString(string), n)
+ return baseRepeat(toString(string), n);
}
/**
@@ -25918,9 +16552,9 @@ var app = (function() {
*/
function replace() {
var args = arguments,
- string = toString(args[0])
+ string = toString(args[0]);
- return args.length < 3 ? string : string.replace(args[1], args[2])
+ return args.length < 3 ? string : string.replace(args[1], args[2]);
}
/**
@@ -25945,8 +16579,8 @@ var app = (function() {
* // => 'foo_bar'
*/
var snakeCase = createCompounder(function(result, word, index) {
- return result + (index ? "_" : "") + word.toLowerCase()
- })
+ return result + (index ? '_' : '') + word.toLowerCase();
+ });
/**
* Splits `string` by `separator`.
@@ -25968,29 +16602,24 @@ var app = (function() {
* // => ['a', 'b']
*/
function split(string, separator, limit) {
- if (
- limit &&
- typeof limit != "number" &&
- isIterateeCall(string, separator, limit)
- ) {
- separator = limit = undefined$1
+ if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
+ separator = limit = undefined$1;
}
- limit = limit === undefined$1 ? MAX_ARRAY_LENGTH : limit >>> 0
+ limit = limit === undefined$1 ? MAX_ARRAY_LENGTH : limit >>> 0;
if (!limit) {
- return []
+ return [];
}
- string = toString(string)
- if (
- string &&
- (typeof separator == "string" ||
- (separator != null && !isRegExp(separator)))
- ) {
- separator = baseToString(separator)
+ string = toString(string);
+ if (string && (
+ typeof separator == 'string' ||
+ (separator != null && !isRegExp(separator))
+ )) {
+ separator = baseToString(separator);
if (!separator && hasUnicode(string)) {
- return castSlice(stringToArray(string), 0, limit)
+ return castSlice(stringToArray(string), 0, limit);
}
}
- return string.split(separator, limit)
+ return string.split(separator, limit);
}
/**
@@ -26015,8 +16644,8 @@ var app = (function() {
* // => 'FOO BAR'
*/
var startCase = createCompounder(function(result, word, index) {
- return result + (index ? " " : "") + upperFirst(word)
- })
+ return result + (index ? ' ' : '') + upperFirst(word);
+ });
/**
* Checks if `string` starts with the given target string.
@@ -26042,14 +16671,13 @@ var app = (function() {
* // => true
*/
function startsWith(string, target, position) {
- string = toString(string)
- position =
- position == null
- ? 0
- : baseClamp(toInteger(position), 0, string.length)
+ string = toString(string);
+ position = position == null
+ ? 0
+ : baseClamp(toInteger(position), 0, string.length);
- target = baseToString(target)
- return string.slice(position, position + target.length) == target
+ target = baseToString(target);
+ return string.slice(position, position + target.length) == target;
}
/**
@@ -26160,139 +16788,113 @@ var app = (function() {
// Based on John Resig's `tmpl` implementation
// (http://ejohn.org/blog/javascript-micro-templating/)
// and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = lodash.templateSettings
+ var settings = lodash.templateSettings;
if (guard && isIterateeCall(string, options, guard)) {
- options = undefined$1
+ options = undefined$1;
}
- string = toString(string)
- options = assignInWith({}, options, settings, customDefaultsAssignIn)
+ string = toString(string);
+ options = assignInWith({}, options, settings, customDefaultsAssignIn);
- var imports = assignInWith(
- {},
- options.imports,
- settings.imports,
- customDefaultsAssignIn
- ),
- importsKeys = keys(imports),
- importsValues = baseValues(imports, importsKeys)
+ var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
var isEscaping,
- isEvaluating,
- index = 0,
- interpolate = options.interpolate || reNoMatch,
- source = "__p += '"
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
// Compile the regexp to match each delimiter.
var reDelimiters = RegExp(
- (options.escape || reNoMatch).source +
- "|" +
- interpolate.source +
- "|" +
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch)
- .source +
- "|" +
- (options.evaluate || reNoMatch).source +
- "|$",
- "g"
- )
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
// Use a sourceURL for easier debugging.
// The sourceURL gets injected into the source that's eval-ed, so be careful
// with lookup (in case of e.g. prototype pollution), and strip newlines if any.
// A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection.
- var sourceURL =
- "//# sourceURL=" +
- (hasOwnProperty.call(options, "sourceURL")
- ? (options.sourceURL + "").replace(/[\r\n]/g, " ")
- : "lodash.templateSources[" + ++templateCounter + "]") +
- "\n"
+ var sourceURL = '//# sourceURL=' +
+ (hasOwnProperty.call(options, 'sourceURL')
+ ? (options.sourceURL + '').replace(/[\r\n]/g, ' ')
+ : ('lodash.templateSources[' + (++templateCounter) + ']')
+ ) + '\n';
- string.replace(reDelimiters, function(
- match,
- escapeValue,
- interpolateValue,
- esTemplateValue,
- evaluateValue,
- offset
- ) {
- interpolateValue || (interpolateValue = esTemplateValue)
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
// Escape characters that can't be included in string literals.
- source += string
- .slice(index, offset)
- .replace(reUnescapedString, escapeStringChar)
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
// Replace delimiters with snippets.
if (escapeValue) {
- isEscaping = true
- source += "' +\n__e(" + escapeValue + ") +\n'"
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
}
if (evaluateValue) {
- isEvaluating = true
- source += "';\n" + evaluateValue + ";\n__p += '"
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
}
if (interpolateValue) {
- source +=
- "' +\n((__t = (" +
- interpolateValue +
- ")) == null ? '' : __t) +\n'"
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
}
- index = offset + match.length
+ index = offset + match.length;
// The JS engine embedded in Adobe products needs `match` returned in
// order to produce the correct `offset` value.
- return match
- })
+ return match;
+ });
- source += "';\n"
+ source += "';\n";
// If `variable` is not specified wrap a with-statement around the generated
// code to add the data object to the top of the scope chain.
// Like with sourceURL, we take care to not check the option's prototype,
// as this configuration is a code injection vector.
- var variable =
- hasOwnProperty.call(options, "variable") && options.variable
+ var variable = hasOwnProperty.call(options, 'variable') && options.variable;
if (!variable) {
- source = "with (obj) {\n" + source + "\n}\n"
+ source = 'with (obj) {\n' + source + '\n}\n';
}
// Cleanup code by stripping empty strings.
- source = (isEvaluating
- ? source.replace(reEmptyStringLeading, "")
- : source
- )
- .replace(reEmptyStringMiddle, "$1")
- .replace(reEmptyStringTrailing, "$1;")
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
// Frame code as the function body.
- source =
- "function(" +
- (variable || "obj") +
- ") {\n" +
- (variable ? "" : "obj || (obj = {});\n") +
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
"var __t, __p = ''" +
- (isEscaping ? ", __e = _.escape" : "") +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
(isEvaluating
- ? ", __j = Array.prototype.join;\n" +
+ ? ', __j = Array.prototype.join;\n' +
"function print() { __p += __j.call(arguments, '') }\n"
- : ";\n") +
+ : ';\n'
+ ) +
source +
- "return __p\n}"
+ 'return __p\n}';
var result = attempt(function() {
- return Function(importsKeys, sourceURL + "return " + source).apply(
- undefined$1,
- importsValues
- )
- })
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined$1, importsValues);
+ });
// Provide the compiled function's source by its `toString` method or
// the `source` property as a convenience for inlining compiled templates.
- result.source = source
+ result.source = source;
if (isError(result)) {
- throw result
+ throw result;
}
- return result
+ return result;
}
/**
@@ -26317,7 +16919,7 @@ var app = (function() {
* // => '__foo_bar__'
*/
function toLower(value) {
- return toString(value).toLowerCase()
+ return toString(value).toLowerCase();
}
/**
@@ -26342,7 +16944,7 @@ var app = (function() {
* // => '__FOO_BAR__'
*/
function toUpper(value) {
- return toString(value).toUpperCase()
+ return toString(value).toUpperCase();
}
/**
@@ -26368,19 +16970,19 @@ var app = (function() {
* // => ['foo', 'bar']
*/
function trim(string, chars, guard) {
- string = toString(string)
+ string = toString(string);
if (string && (guard || chars === undefined$1)) {
- return string.replace(reTrim, "")
+ return string.replace(reTrim, '');
}
if (!string || !(chars = baseToString(chars))) {
- return string
+ return string;
}
var strSymbols = stringToArray(string),
- chrSymbols = stringToArray(chars),
- start = charsStartIndex(strSymbols, chrSymbols),
- end = charsEndIndex(strSymbols, chrSymbols) + 1
+ chrSymbols = stringToArray(chars),
+ start = charsStartIndex(strSymbols, chrSymbols),
+ end = charsEndIndex(strSymbols, chrSymbols) + 1;
- return castSlice(strSymbols, start, end).join("")
+ return castSlice(strSymbols, start, end).join('');
}
/**
@@ -26403,17 +17005,17 @@ var app = (function() {
* // => '-_-abc'
*/
function trimEnd(string, chars, guard) {
- string = toString(string)
+ string = toString(string);
if (string && (guard || chars === undefined$1)) {
- return string.replace(reTrimEnd, "")
+ return string.replace(reTrimEnd, '');
}
if (!string || !(chars = baseToString(chars))) {
- return string
+ return string;
}
var strSymbols = stringToArray(string),
- end = charsEndIndex(strSymbols, stringToArray(chars)) + 1
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
- return castSlice(strSymbols, 0, end).join("")
+ return castSlice(strSymbols, 0, end).join('');
}
/**
@@ -26436,17 +17038,17 @@ var app = (function() {
* // => 'abc-_-'
*/
function trimStart(string, chars, guard) {
- string = toString(string)
+ string = toString(string);
if (string && (guard || chars === undefined$1)) {
- return string.replace(reTrimStart, "")
+ return string.replace(reTrimStart, '');
}
if (!string || !(chars = baseToString(chars))) {
- return string
+ return string;
}
var strSymbols = stringToArray(string),
- start = charsStartIndex(strSymbols, stringToArray(chars))
+ start = charsStartIndex(strSymbols, stringToArray(chars));
- return castSlice(strSymbols, start).join("")
+ return castSlice(strSymbols, start).join('');
}
/**
@@ -26488,63 +17090,58 @@ var app = (function() {
*/
function truncate(string, options) {
var length = DEFAULT_TRUNC_LENGTH,
- omission = DEFAULT_TRUNC_OMISSION
+ omission = DEFAULT_TRUNC_OMISSION;
if (isObject(options)) {
- var separator =
- "separator" in options ? options.separator : separator
- length = "length" in options ? toInteger(options.length) : length
- omission =
- "omission" in options ? baseToString(options.omission) : omission
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? toInteger(options.length) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
}
- string = toString(string)
+ string = toString(string);
- var strLength = string.length
+ var strLength = string.length;
if (hasUnicode(string)) {
- var strSymbols = stringToArray(string)
- strLength = strSymbols.length
+ var strSymbols = stringToArray(string);
+ strLength = strSymbols.length;
}
if (length >= strLength) {
- return string
+ return string;
}
- var end = length - stringSize(omission)
+ var end = length - stringSize(omission);
if (end < 1) {
- return omission
+ return omission;
}
var result = strSymbols
- ? castSlice(strSymbols, 0, end).join("")
- : string.slice(0, end)
+ ? castSlice(strSymbols, 0, end).join('')
+ : string.slice(0, end);
if (separator === undefined$1) {
- return result + omission
+ return result + omission;
}
if (strSymbols) {
- end += result.length - end
+ end += (result.length - end);
}
if (isRegExp(separator)) {
if (string.slice(end).search(separator)) {
var match,
- substring = result
+ substring = result;
if (!separator.global) {
- separator = RegExp(
- separator.source,
- toString(reFlags.exec(separator)) + "g"
- )
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
}
- separator.lastIndex = 0
+ separator.lastIndex = 0;
while ((match = separator.exec(substring))) {
- var newEnd = match.index
+ var newEnd = match.index;
}
- result = result.slice(0, newEnd === undefined$1 ? end : newEnd)
+ result = result.slice(0, newEnd === undefined$1 ? end : newEnd);
}
} else if (string.indexOf(baseToString(separator), end) != end) {
- var index = result.lastIndexOf(separator)
+ var index = result.lastIndexOf(separator);
if (index > -1) {
- result = result.slice(0, index)
+ result = result.slice(0, index);
}
}
- return result + omission
+ return result + omission;
}
/**
@@ -26567,10 +17164,10 @@ var app = (function() {
* // => 'fred, barney, & pebbles'
*/
function unescape(string) {
- string = toString(string)
- return string && reHasEscapedHtml.test(string)
+ string = toString(string);
+ return (string && reHasEscapedHtml.test(string))
? string.replace(reEscapedHtml, unescapeHtmlChar)
- : string
+ : string;
}
/**
@@ -26594,8 +17191,8 @@ var app = (function() {
* // => 'FOO BAR'
*/
var upperCase = createCompounder(function(result, word, index) {
- return result + (index ? " " : "") + word.toUpperCase()
- })
+ return result + (index ? ' ' : '') + word.toUpperCase();
+ });
/**
* Converts the first character of `string` to upper case.
@@ -26614,7 +17211,7 @@ var app = (function() {
* _.upperFirst('FRED');
* // => 'FRED'
*/
- var upperFirst = createCaseFirst("toUpperCase")
+ var upperFirst = createCaseFirst('toUpperCase');
/**
* Splits `string` into an array of its words.
@@ -26636,15 +17233,13 @@ var app = (function() {
* // => ['fred', 'barney', '&', 'pebbles']
*/
function words(string, pattern, guard) {
- string = toString(string)
- pattern = guard ? undefined$1 : pattern
+ string = toString(string);
+ pattern = guard ? undefined$1 : pattern;
if (pattern === undefined$1) {
- return hasUnicodeWord(string)
- ? unicodeWords(string)
- : asciiWords(string)
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
}
- return string.match(pattern) || []
+ return string.match(pattern) || [];
}
/*------------------------------------------------------------------------*/
@@ -26673,11 +17268,11 @@ var app = (function() {
*/
var attempt = baseRest(function(func, args) {
try {
- return apply(func, undefined$1, args)
+ return apply(func, undefined$1, args);
} catch (e) {
- return isError(e) ? e : new Error(e)
+ return isError(e) ? e : new Error(e);
}
- })
+ });
/**
* Binds methods of an object to the object itself, overwriting the existing
@@ -26707,11 +17302,11 @@ var app = (function() {
*/
var bindAll = flatRest(function(object, methodNames) {
arrayEach(methodNames, function(key) {
- key = toKey(key)
- baseAssignValue(object, key, bind(object[key], object))
- })
- return object
- })
+ key = toKey(key);
+ baseAssignValue(object, key, bind(object[key], object));
+ });
+ return object;
+ });
/**
* Creates a function that iterates over `pairs` and invokes the corresponding
@@ -26744,26 +17339,24 @@ var app = (function() {
*/
function cond(pairs) {
var length = pairs == null ? 0 : pairs.length,
- toIteratee = getIteratee()
+ toIteratee = getIteratee();
- pairs = !length
- ? []
- : arrayMap(pairs, function(pair) {
- if (typeof pair[1] != "function") {
- throw new TypeError(FUNC_ERROR_TEXT)
- }
- return [toIteratee(pair[0]), pair[1]]
- })
+ pairs = !length ? [] : arrayMap(pairs, function(pair) {
+ if (typeof pair[1] != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return [toIteratee(pair[0]), pair[1]];
+ });
return baseRest(function(args) {
- var index = -1
+ var index = -1;
while (++index < length) {
- var pair = pairs[index]
+ var pair = pairs[index];
if (apply(pair[0], this, args)) {
- return apply(pair[1], this, args)
+ return apply(pair[1], this, args);
}
}
- })
+ });
}
/**
@@ -26791,7 +17384,7 @@ var app = (function() {
* // => [{ 'a': 1, 'b': 2 }]
*/
function conforms(source) {
- return baseConforms(baseClone(source, CLONE_DEEP_FLAG))
+ return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
}
/**
@@ -26815,8 +17408,8 @@ var app = (function() {
*/
function constant(value) {
return function() {
- return value
- }
+ return value;
+ };
}
/**
@@ -26840,7 +17433,7 @@ var app = (function() {
* // => 10
*/
function defaultTo(value, defaultValue) {
- return value == null || value !== value ? defaultValue : value
+ return (value == null || value !== value) ? defaultValue : value;
}
/**
@@ -26865,7 +17458,7 @@ var app = (function() {
* addSquare(1, 2);
* // => 9
*/
- var flow = createFlow()
+ var flow = createFlow();
/**
* This method is like `_.flow` except that it creates a function that
@@ -26888,7 +17481,7 @@ var app = (function() {
* addSquare(1, 2);
* // => 9
*/
- var flowRight = createFlow(true)
+ var flowRight = createFlow(true);
/**
* This method returns the first argument it receives.
@@ -26907,7 +17500,7 @@ var app = (function() {
* // => true
*/
function identity(value) {
- return value
+ return value;
}
/**
@@ -26953,9 +17546,7 @@ var app = (function() {
* // => ['def']
*/
function iteratee(func) {
- return baseIteratee(
- typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG)
- )
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
}
/**
@@ -26987,7 +17578,7 @@ var app = (function() {
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
*/
function matches(source) {
- return baseMatches(baseClone(source, CLONE_DEEP_FLAG))
+ return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
}
/**
@@ -27017,7 +17608,7 @@ var app = (function() {
* // => { 'a': 4, 'b': 5, 'c': 6 }
*/
function matchesProperty(path, srcValue) {
- return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG))
+ return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
}
/**
@@ -27046,9 +17637,9 @@ var app = (function() {
*/
var method = baseRest(function(path, args) {
return function(object) {
- return baseInvoke(object, path, args)
- }
- })
+ return baseInvoke(object, path, args);
+ };
+ });
/**
* The opposite of `_.method`; this method creates a function that invokes
@@ -27075,9 +17666,9 @@ var app = (function() {
*/
var methodOf = baseRest(function(object, args) {
return function(path) {
- return baseInvoke(object, path, args)
- }
- })
+ return baseInvoke(object, path, args);
+ };
+ });
/**
* Adds all own enumerable string keyed function properties of a source
@@ -27117,41 +17708,38 @@ var app = (function() {
*/
function mixin(object, source, options) {
var props = keys(source),
- methodNames = baseFunctions(source, props)
+ methodNames = baseFunctions(source, props);
- if (
- options == null &&
- !(isObject(source) && (methodNames.length || !props.length))
- ) {
- options = source
- source = object
- object = this
- methodNames = baseFunctions(source, keys(source))
+ if (options == null &&
+ !(isObject(source) && (methodNames.length || !props.length))) {
+ options = source;
+ source = object;
+ object = this;
+ methodNames = baseFunctions(source, keys(source));
}
- var chain =
- !(isObject(options) && "chain" in options) || !!options.chain,
- isFunc = isFunction(object)
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
arrayEach(methodNames, function(methodName) {
- var func = source[methodName]
- object[methodName] = func
+ var func = source[methodName];
+ object[methodName] = func;
if (isFunc) {
object.prototype[methodName] = function() {
- var chainAll = this.__chain__
+ var chainAll = this.__chain__;
if (chain || chainAll) {
var result = object(this.__wrapped__),
- actions = (result.__actions__ = copyArray(this.__actions__))
+ actions = result.__actions__ = copyArray(this.__actions__);
- actions.push({ func: func, args: arguments, thisArg: object })
- result.__chain__ = chainAll
- return result
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
}
- return func.apply(object, arrayPush([this.value()], arguments))
- }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
}
- })
+ });
- return object
+ return object;
}
/**
@@ -27169,9 +17757,9 @@ var app = (function() {
*/
function noConflict() {
if (root._ === this) {
- root._ = oldDash
+ root._ = oldDash;
}
- return this
+ return this;
}
/**
@@ -27211,10 +17799,10 @@ var app = (function() {
* // => 'c'
*/
function nthArg(n) {
- n = toInteger(n)
+ n = toInteger(n);
return baseRest(function(args) {
- return baseNth(args, n)
- })
+ return baseNth(args, n);
+ });
}
/**
@@ -27235,7 +17823,7 @@ var app = (function() {
* func(1, 2, 3, 4);
* // => [4, 1]
*/
- var over = createOver(arrayMap)
+ var over = createOver(arrayMap);
/**
* Creates a function that checks if **all** of the `predicates` return
@@ -27261,7 +17849,7 @@ var app = (function() {
* func(NaN);
* // => false
*/
- var overEvery = createOver(arrayEvery)
+ var overEvery = createOver(arrayEvery);
/**
* Creates a function that checks if **any** of the `predicates` return
@@ -27287,7 +17875,7 @@ var app = (function() {
* func(NaN);
* // => false
*/
- var overSome = createOver(arraySome)
+ var overSome = createOver(arraySome);
/**
* Creates a function that returns the value at `path` of a given object.
@@ -27312,9 +17900,7 @@ var app = (function() {
* // => [1, 2]
*/
function property(path) {
- return isKey(path)
- ? baseProperty(toKey(path))
- : basePropertyDeep(path)
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
}
/**
@@ -27340,8 +17926,8 @@ var app = (function() {
*/
function propertyOf(object) {
return function(path) {
- return object == null ? undefined$1 : baseGet(object, path)
- }
+ return object == null ? undefined$1 : baseGet(object, path);
+ };
}
/**
@@ -27385,7 +17971,7 @@ var app = (function() {
* _.range(0);
* // => []
*/
- var range = createRange()
+ var range = createRange();
/**
* This method is like `_.range` except that it populates values in
@@ -27423,7 +18009,7 @@ var app = (function() {
* _.rangeRight(0);
* // => []
*/
- var rangeRight = createRange(true)
+ var rangeRight = createRange(true);
/**
* This method returns a new empty array.
@@ -27444,7 +18030,7 @@ var app = (function() {
* // => false
*/
function stubArray() {
- return []
+ return [];
}
/**
@@ -27461,7 +18047,7 @@ var app = (function() {
* // => [false, false]
*/
function stubFalse() {
- return false
+ return false;
}
/**
@@ -27483,7 +18069,7 @@ var app = (function() {
* // => false
*/
function stubObject() {
- return {}
+ return {};
}
/**
@@ -27500,7 +18086,7 @@ var app = (function() {
* // => ['', '']
*/
function stubString() {
- return ""
+ return '';
}
/**
@@ -27517,7 +18103,7 @@ var app = (function() {
* // => [true, true]
*/
function stubTrue() {
- return true
+ return true;
}
/**
@@ -27540,21 +18126,21 @@ var app = (function() {
* // => [0, 0, 0, 0]
*/
function times(n, iteratee) {
- n = toInteger(n)
+ n = toInteger(n);
if (n < 1 || n > MAX_SAFE_INTEGER) {
- return []
+ return [];
}
var index = MAX_ARRAY_LENGTH,
- length = nativeMin(n, MAX_ARRAY_LENGTH)
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
- iteratee = getIteratee(iteratee)
- n -= MAX_ARRAY_LENGTH
+ iteratee = getIteratee(iteratee);
+ n -= MAX_ARRAY_LENGTH;
- var result = baseTimes(length, iteratee)
+ var result = baseTimes(length, iteratee);
while (++index < n) {
- iteratee(index)
+ iteratee(index);
}
- return result
+ return result;
}
/**
@@ -27576,11 +18162,9 @@ var app = (function() {
*/
function toPath(value) {
if (isArray(value)) {
- return arrayMap(value, toKey)
+ return arrayMap(value, toKey);
}
- return isSymbol(value)
- ? [value]
- : copyArray(stringToPath(toString(value)))
+ return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
}
/**
@@ -27601,8 +18185,8 @@ var app = (function() {
* // => '105'
*/
function uniqueId(prefix) {
- var id = ++idCounter
- return toString(prefix) + id
+ var id = ++idCounter;
+ return toString(prefix) + id;
}
/*------------------------------------------------------------------------*/
@@ -27623,8 +18207,8 @@ var app = (function() {
* // => 10
*/
var add = createMathOperation(function(augend, addend) {
- return augend + addend
- }, 0)
+ return augend + addend;
+ }, 0);
/**
* Computes `number` rounded up to `precision`.
@@ -27647,7 +18231,7 @@ var app = (function() {
* _.ceil(6040, -2);
* // => 6100
*/
- var ceil = createRound("ceil")
+ var ceil = createRound('ceil');
/**
* Divide two numbers.
@@ -27665,8 +18249,8 @@ var app = (function() {
* // => 1.5
*/
var divide = createMathOperation(function(dividend, divisor) {
- return dividend / divisor
- }, 1)
+ return dividend / divisor;
+ }, 1);
/**
* Computes `number` rounded down to `precision`.
@@ -27689,7 +18273,7 @@ var app = (function() {
* _.floor(4060, -2);
* // => 4000
*/
- var floor = createRound("floor")
+ var floor = createRound('floor');
/**
* Computes the maximum value of `array`. If `array` is empty or falsey,
@@ -27710,9 +18294,9 @@ var app = (function() {
* // => undefined
*/
function max(array) {
- return array && array.length
+ return (array && array.length)
? baseExtremum(array, identity, baseGt)
- : undefined$1
+ : undefined$1;
}
/**
@@ -27739,9 +18323,9 @@ var app = (function() {
* // => { 'n': 2 }
*/
function maxBy(array, iteratee) {
- return array && array.length
+ return (array && array.length)
? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
- : undefined$1
+ : undefined$1;
}
/**
@@ -27759,7 +18343,7 @@ var app = (function() {
* // => 5
*/
function mean(array) {
- return baseMean(array, identity)
+ return baseMean(array, identity);
}
/**
@@ -27786,7 +18370,7 @@ var app = (function() {
* // => 5
*/
function meanBy(array, iteratee) {
- return baseMean(array, getIteratee(iteratee, 2))
+ return baseMean(array, getIteratee(iteratee, 2));
}
/**
@@ -27808,9 +18392,9 @@ var app = (function() {
* // => undefined
*/
function min(array) {
- return array && array.length
+ return (array && array.length)
? baseExtremum(array, identity, baseLt)
- : undefined$1
+ : undefined$1;
}
/**
@@ -27837,9 +18421,9 @@ var app = (function() {
* // => { 'n': 1 }
*/
function minBy(array, iteratee) {
- return array && array.length
+ return (array && array.length)
? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
- : undefined$1
+ : undefined$1;
}
/**
@@ -27858,8 +18442,8 @@ var app = (function() {
* // => 24
*/
var multiply = createMathOperation(function(multiplier, multiplicand) {
- return multiplier * multiplicand
- }, 1)
+ return multiplier * multiplicand;
+ }, 1);
/**
* Computes `number` rounded to `precision`.
@@ -27882,7 +18466,7 @@ var app = (function() {
* _.round(4060, -2);
* // => 4100
*/
- var round = createRound("round")
+ var round = createRound('round');
/**
* Subtract two numbers.
@@ -27900,8 +18484,8 @@ var app = (function() {
* // => 2
*/
var subtract = createMathOperation(function(minuend, subtrahend) {
- return minuend - subtrahend
- }, 0)
+ return minuend - subtrahend;
+ }, 0);
/**
* Computes the sum of the values in `array`.
@@ -27918,7 +18502,9 @@ var app = (function() {
* // => 20
*/
function sum(array) {
- return array && array.length ? baseSum(array, identity) : 0
+ return (array && array.length)
+ ? baseSum(array, identity)
+ : 0;
}
/**
@@ -27945,344 +18531,340 @@ var app = (function() {
* // => 20
*/
function sumBy(array, iteratee) {
- return array && array.length
+ return (array && array.length)
? baseSum(array, getIteratee(iteratee, 2))
- : 0
+ : 0;
}
/*------------------------------------------------------------------------*/
// Add methods that return wrapped values in chain sequences.
- lodash.after = after
- lodash.ary = ary
- lodash.assign = assign
- lodash.assignIn = assignIn
- lodash.assignInWith = assignInWith
- lodash.assignWith = assignWith
- lodash.at = at
- lodash.before = before
- lodash.bind = bind
- lodash.bindAll = bindAll
- lodash.bindKey = bindKey
- lodash.castArray = castArray
- lodash.chain = chain
- lodash.chunk = chunk
- lodash.compact = compact
- lodash.concat = concat
- lodash.cond = cond
- lodash.conforms = conforms
- lodash.constant = constant
- lodash.countBy = countBy
- lodash.create = create
- lodash.curry = curry
- lodash.curryRight = curryRight
- lodash.debounce = debounce
- lodash.defaults = defaults
- lodash.defaultsDeep = defaultsDeep
- lodash.defer = defer
- lodash.delay = delay
- lodash.difference = difference
- lodash.differenceBy = differenceBy
- lodash.differenceWith = differenceWith
- lodash.drop = drop
- lodash.dropRight = dropRight
- lodash.dropRightWhile = dropRightWhile
- lodash.dropWhile = dropWhile
- lodash.fill = fill
- lodash.filter = filter
- lodash.flatMap = flatMap
- lodash.flatMapDeep = flatMapDeep
- lodash.flatMapDepth = flatMapDepth
- lodash.flatten = flatten
- lodash.flattenDeep = flattenDeep
- lodash.flattenDepth = flattenDepth
- lodash.flip = flip
- lodash.flow = flow
- lodash.flowRight = flowRight
- lodash.fromPairs = fromPairs
- lodash.functions = functions
- lodash.functionsIn = functionsIn
- lodash.groupBy = groupBy
- lodash.initial = initial
- lodash.intersection = intersection
- lodash.intersectionBy = intersectionBy
- lodash.intersectionWith = intersectionWith
- lodash.invert = invert
- lodash.invertBy = invertBy
- lodash.invokeMap = invokeMap
- lodash.iteratee = iteratee
- lodash.keyBy = keyBy
- lodash.keys = keys
- lodash.keysIn = keysIn
- lodash.map = map
- lodash.mapKeys = mapKeys
- lodash.mapValues = mapValues
- lodash.matches = matches
- lodash.matchesProperty = matchesProperty
- lodash.memoize = memoize
- lodash.merge = merge
- lodash.mergeWith = mergeWith
- lodash.method = method
- lodash.methodOf = methodOf
- lodash.mixin = mixin
- lodash.negate = negate
- lodash.nthArg = nthArg
- lodash.omit = omit
- lodash.omitBy = omitBy
- lodash.once = once
- lodash.orderBy = orderBy
- lodash.over = over
- lodash.overArgs = overArgs
- lodash.overEvery = overEvery
- lodash.overSome = overSome
- lodash.partial = partial
- lodash.partialRight = partialRight
- lodash.partition = partition
- lodash.pick = pick
- lodash.pickBy = pickBy
- lodash.property = property
- lodash.propertyOf = propertyOf
- lodash.pull = pull
- lodash.pullAll = pullAll
- lodash.pullAllBy = pullAllBy
- lodash.pullAllWith = pullAllWith
- lodash.pullAt = pullAt
- lodash.range = range
- lodash.rangeRight = rangeRight
- lodash.rearg = rearg
- lodash.reject = reject
- lodash.remove = remove
- lodash.rest = rest
- lodash.reverse = reverse
- lodash.sampleSize = sampleSize
- lodash.set = set
- lodash.setWith = setWith
- lodash.shuffle = shuffle
- lodash.slice = slice
- lodash.sortBy = sortBy
- lodash.sortedUniq = sortedUniq
- lodash.sortedUniqBy = sortedUniqBy
- lodash.split = split
- lodash.spread = spread
- lodash.tail = tail
- lodash.take = take
- lodash.takeRight = takeRight
- lodash.takeRightWhile = takeRightWhile
- lodash.takeWhile = takeWhile
- lodash.tap = tap
- lodash.throttle = throttle
- lodash.thru = thru
- lodash.toArray = toArray
- lodash.toPairs = toPairs
- lodash.toPairsIn = toPairsIn
- lodash.toPath = toPath
- lodash.toPlainObject = toPlainObject
- lodash.transform = transform
- lodash.unary = unary
- lodash.union = union
- lodash.unionBy = unionBy
- lodash.unionWith = unionWith
- lodash.uniq = uniq
- lodash.uniqBy = uniqBy
- lodash.uniqWith = uniqWith
- lodash.unset = unset
- lodash.unzip = unzip
- lodash.unzipWith = unzipWith
- lodash.update = update
- lodash.updateWith = updateWith
- lodash.values = values
- lodash.valuesIn = valuesIn
- lodash.without = without
- lodash.words = words
- lodash.wrap = wrap
- lodash.xor = xor
- lodash.xorBy = xorBy
- lodash.xorWith = xorWith
- lodash.zip = zip
- lodash.zipObject = zipObject
- lodash.zipObjectDeep = zipObjectDeep
- lodash.zipWith = zipWith
+ lodash.after = after;
+ lodash.ary = ary;
+ lodash.assign = assign;
+ lodash.assignIn = assignIn;
+ lodash.assignInWith = assignInWith;
+ lodash.assignWith = assignWith;
+ lodash.at = at;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.bindAll = bindAll;
+ lodash.bindKey = bindKey;
+ lodash.castArray = castArray;
+ lodash.chain = chain;
+ lodash.chunk = chunk;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.cond = cond;
+ lodash.conforms = conforms;
+ lodash.constant = constant;
+ lodash.countBy = countBy;
+ lodash.create = create;
+ lodash.curry = curry;
+ lodash.curryRight = curryRight;
+ lodash.debounce = debounce;
+ lodash.defaults = defaults;
+ lodash.defaultsDeep = defaultsDeep;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.difference = difference;
+ lodash.differenceBy = differenceBy;
+ lodash.differenceWith = differenceWith;
+ lodash.drop = drop;
+ lodash.dropRight = dropRight;
+ lodash.dropRightWhile = dropRightWhile;
+ lodash.dropWhile = dropWhile;
+ lodash.fill = fill;
+ lodash.filter = filter;
+ lodash.flatMap = flatMap;
+ lodash.flatMapDeep = flatMapDeep;
+ lodash.flatMapDepth = flatMapDepth;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.flattenDepth = flattenDepth;
+ lodash.flip = flip;
+ lodash.flow = flow;
+ lodash.flowRight = flowRight;
+ lodash.fromPairs = fromPairs;
+ lodash.functions = functions;
+ lodash.functionsIn = functionsIn;
+ lodash.groupBy = groupBy;
+ lodash.initial = initial;
+ lodash.intersection = intersection;
+ lodash.intersectionBy = intersectionBy;
+ lodash.intersectionWith = intersectionWith;
+ lodash.invert = invert;
+ lodash.invertBy = invertBy;
+ lodash.invokeMap = invokeMap;
+ lodash.iteratee = iteratee;
+ lodash.keyBy = keyBy;
+ lodash.keys = keys;
+ lodash.keysIn = keysIn;
+ lodash.map = map;
+ lodash.mapKeys = mapKeys;
+ lodash.mapValues = mapValues;
+ lodash.matches = matches;
+ lodash.matchesProperty = matchesProperty;
+ lodash.memoize = memoize;
+ lodash.merge = merge;
+ lodash.mergeWith = mergeWith;
+ lodash.method = method;
+ lodash.methodOf = methodOf;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.nthArg = nthArg;
+ lodash.omit = omit;
+ lodash.omitBy = omitBy;
+ lodash.once = once;
+ lodash.orderBy = orderBy;
+ lodash.over = over;
+ lodash.overArgs = overArgs;
+ lodash.overEvery = overEvery;
+ lodash.overSome = overSome;
+ lodash.partial = partial;
+ lodash.partialRight = partialRight;
+ lodash.partition = partition;
+ lodash.pick = pick;
+ lodash.pickBy = pickBy;
+ lodash.property = property;
+ lodash.propertyOf = propertyOf;
+ lodash.pull = pull;
+ lodash.pullAll = pullAll;
+ lodash.pullAllBy = pullAllBy;
+ lodash.pullAllWith = pullAllWith;
+ lodash.pullAt = pullAt;
+ lodash.range = range;
+ lodash.rangeRight = rangeRight;
+ lodash.rearg = rearg;
+ lodash.reject = reject;
+ lodash.remove = remove;
+ lodash.rest = rest;
+ lodash.reverse = reverse;
+ lodash.sampleSize = sampleSize;
+ lodash.set = set;
+ lodash.setWith = setWith;
+ lodash.shuffle = shuffle;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.sortedUniq = sortedUniq;
+ lodash.sortedUniqBy = sortedUniqBy;
+ lodash.split = split;
+ lodash.spread = spread;
+ lodash.tail = tail;
+ lodash.take = take;
+ lodash.takeRight = takeRight;
+ lodash.takeRightWhile = takeRightWhile;
+ lodash.takeWhile = takeWhile;
+ lodash.tap = tap;
+ lodash.throttle = throttle;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.toPairs = toPairs;
+ lodash.toPairsIn = toPairsIn;
+ lodash.toPath = toPath;
+ lodash.toPlainObject = toPlainObject;
+ lodash.transform = transform;
+ lodash.unary = unary;
+ lodash.union = union;
+ lodash.unionBy = unionBy;
+ lodash.unionWith = unionWith;
+ lodash.uniq = uniq;
+ lodash.uniqBy = uniqBy;
+ lodash.uniqWith = uniqWith;
+ lodash.unset = unset;
+ lodash.unzip = unzip;
+ lodash.unzipWith = unzipWith;
+ lodash.update = update;
+ lodash.updateWith = updateWith;
+ lodash.values = values;
+ lodash.valuesIn = valuesIn;
+ lodash.without = without;
+ lodash.words = words;
+ lodash.wrap = wrap;
+ lodash.xor = xor;
+ lodash.xorBy = xorBy;
+ lodash.xorWith = xorWith;
+ lodash.zip = zip;
+ lodash.zipObject = zipObject;
+ lodash.zipObjectDeep = zipObjectDeep;
+ lodash.zipWith = zipWith;
// Add aliases.
- lodash.entries = toPairs
- lodash.entriesIn = toPairsIn
- lodash.extend = assignIn
- lodash.extendWith = assignInWith
+ lodash.entries = toPairs;
+ lodash.entriesIn = toPairsIn;
+ lodash.extend = assignIn;
+ lodash.extendWith = assignInWith;
// Add methods to `lodash.prototype`.
- mixin(lodash, lodash)
+ mixin(lodash, lodash);
/*------------------------------------------------------------------------*/
// Add methods that return unwrapped values in chain sequences.
- lodash.add = add
- lodash.attempt = attempt
- lodash.camelCase = camelCase
- lodash.capitalize = capitalize
- lodash.ceil = ceil
- lodash.clamp = clamp
- lodash.clone = clone
- lodash.cloneDeep = cloneDeep
- lodash.cloneDeepWith = cloneDeepWith
- lodash.cloneWith = cloneWith
- lodash.conformsTo = conformsTo
- lodash.deburr = deburr
- lodash.defaultTo = defaultTo
- lodash.divide = divide
- lodash.endsWith = endsWith
- lodash.eq = eq
- lodash.escape = escape
- lodash.escapeRegExp = escapeRegExp
- lodash.every = every
- lodash.find = find
- lodash.findIndex = findIndex
- lodash.findKey = findKey
- lodash.findLast = findLast
- lodash.findLastIndex = findLastIndex
- lodash.findLastKey = findLastKey
- lodash.floor = floor
- lodash.forEach = forEach
- lodash.forEachRight = forEachRight
- lodash.forIn = forIn
- lodash.forInRight = forInRight
- lodash.forOwn = forOwn
- lodash.forOwnRight = forOwnRight
- lodash.get = get
- lodash.gt = gt
- lodash.gte = gte
- lodash.has = has
- lodash.hasIn = hasIn
- lodash.head = head
- lodash.identity = identity
- lodash.includes = includes
- lodash.indexOf = indexOf
- lodash.inRange = inRange
- lodash.invoke = invoke
- lodash.isArguments = isArguments
- lodash.isArray = isArray
- lodash.isArrayBuffer = isArrayBuffer
- lodash.isArrayLike = isArrayLike
- lodash.isArrayLikeObject = isArrayLikeObject
- lodash.isBoolean = isBoolean
- lodash.isBuffer = isBuffer
- lodash.isDate = isDate
- lodash.isElement = isElement
- lodash.isEmpty = isEmpty
- lodash.isEqual = isEqual
- lodash.isEqualWith = isEqualWith
- lodash.isError = isError
- lodash.isFinite = isFinite
- lodash.isFunction = isFunction
- lodash.isInteger = isInteger
- lodash.isLength = isLength
- lodash.isMap = isMap
- lodash.isMatch = isMatch
- lodash.isMatchWith = isMatchWith
- lodash.isNaN = isNaN
- lodash.isNative = isNative
- lodash.isNil = isNil
- lodash.isNull = isNull
- lodash.isNumber = isNumber
- lodash.isObject = isObject
- lodash.isObjectLike = isObjectLike
- lodash.isPlainObject = isPlainObject
- lodash.isRegExp = isRegExp
- lodash.isSafeInteger = isSafeInteger
- lodash.isSet = isSet
- lodash.isString = isString
- lodash.isSymbol = isSymbol
- lodash.isTypedArray = isTypedArray
- lodash.isUndefined = isUndefined
- lodash.isWeakMap = isWeakMap
- lodash.isWeakSet = isWeakSet
- lodash.join = join
- lodash.kebabCase = kebabCase
- lodash.last = last
- lodash.lastIndexOf = lastIndexOf
- lodash.lowerCase = lowerCase
- lodash.lowerFirst = lowerFirst
- lodash.lt = lt
- lodash.lte = lte
- lodash.max = max
- lodash.maxBy = maxBy
- lodash.mean = mean
- lodash.meanBy = meanBy
- lodash.min = min
- lodash.minBy = minBy
- lodash.stubArray = stubArray
- lodash.stubFalse = stubFalse
- lodash.stubObject = stubObject
- lodash.stubString = stubString
- lodash.stubTrue = stubTrue
- lodash.multiply = multiply
- lodash.nth = nth
- lodash.noConflict = noConflict
- lodash.noop = noop
- lodash.now = now
- lodash.pad = pad
- lodash.padEnd = padEnd
- lodash.padStart = padStart
- lodash.parseInt = parseInt
- lodash.random = random
- lodash.reduce = reduce
- lodash.reduceRight = reduceRight
- lodash.repeat = repeat
- lodash.replace = replace
- lodash.result = result
- lodash.round = round
- lodash.runInContext = runInContext
- lodash.sample = sample
- lodash.size = size
- lodash.snakeCase = snakeCase
- lodash.some = some
- lodash.sortedIndex = sortedIndex
- lodash.sortedIndexBy = sortedIndexBy
- lodash.sortedIndexOf = sortedIndexOf
- lodash.sortedLastIndex = sortedLastIndex
- lodash.sortedLastIndexBy = sortedLastIndexBy
- lodash.sortedLastIndexOf = sortedLastIndexOf
- lodash.startCase = startCase
- lodash.startsWith = startsWith
- lodash.subtract = subtract
- lodash.sum = sum
- lodash.sumBy = sumBy
- lodash.template = template
- lodash.times = times
- lodash.toFinite = toFinite
- lodash.toInteger = toInteger
- lodash.toLength = toLength
- lodash.toLower = toLower
- lodash.toNumber = toNumber
- lodash.toSafeInteger = toSafeInteger
- lodash.toString = toString
- lodash.toUpper = toUpper
- lodash.trim = trim
- lodash.trimEnd = trimEnd
- lodash.trimStart = trimStart
- lodash.truncate = truncate
- lodash.unescape = unescape
- lodash.uniqueId = uniqueId
- lodash.upperCase = upperCase
- lodash.upperFirst = upperFirst
+ lodash.add = add;
+ lodash.attempt = attempt;
+ lodash.camelCase = camelCase;
+ lodash.capitalize = capitalize;
+ lodash.ceil = ceil;
+ lodash.clamp = clamp;
+ lodash.clone = clone;
+ lodash.cloneDeep = cloneDeep;
+ lodash.cloneDeepWith = cloneDeepWith;
+ lodash.cloneWith = cloneWith;
+ lodash.conformsTo = conformsTo;
+ lodash.deburr = deburr;
+ lodash.defaultTo = defaultTo;
+ lodash.divide = divide;
+ lodash.endsWith = endsWith;
+ lodash.eq = eq;
+ lodash.escape = escape;
+ lodash.escapeRegExp = escapeRegExp;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.findIndex = findIndex;
+ lodash.findKey = findKey;
+ lodash.findLast = findLast;
+ lodash.findLastIndex = findLastIndex;
+ lodash.findLastKey = findLastKey;
+ lodash.floor = floor;
+ lodash.forEach = forEach;
+ lodash.forEachRight = forEachRight;
+ lodash.forIn = forIn;
+ lodash.forInRight = forInRight;
+ lodash.forOwn = forOwn;
+ lodash.forOwnRight = forOwnRight;
+ lodash.get = get;
+ lodash.gt = gt;
+ lodash.gte = gte;
+ lodash.has = has;
+ lodash.hasIn = hasIn;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.includes = includes;
+ lodash.indexOf = indexOf;
+ lodash.inRange = inRange;
+ lodash.invoke = invoke;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isArrayBuffer = isArrayBuffer;
+ lodash.isArrayLike = isArrayLike;
+ lodash.isArrayLikeObject = isArrayLikeObject;
+ lodash.isBoolean = isBoolean;
+ lodash.isBuffer = isBuffer;
+ lodash.isDate = isDate;
+ lodash.isElement = isElement;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isEqualWith = isEqualWith;
+ lodash.isError = isError;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isInteger = isInteger;
+ lodash.isLength = isLength;
+ lodash.isMap = isMap;
+ lodash.isMatch = isMatch;
+ lodash.isMatchWith = isMatchWith;
+ lodash.isNaN = isNaN;
+ lodash.isNative = isNative;
+ lodash.isNil = isNil;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isObjectLike = isObjectLike;
+ lodash.isPlainObject = isPlainObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isSafeInteger = isSafeInteger;
+ lodash.isSet = isSet;
+ lodash.isString = isString;
+ lodash.isSymbol = isSymbol;
+ lodash.isTypedArray = isTypedArray;
+ lodash.isUndefined = isUndefined;
+ lodash.isWeakMap = isWeakMap;
+ lodash.isWeakSet = isWeakSet;
+ lodash.join = join;
+ lodash.kebabCase = kebabCase;
+ lodash.last = last;
+ lodash.lastIndexOf = lastIndexOf;
+ lodash.lowerCase = lowerCase;
+ lodash.lowerFirst = lowerFirst;
+ lodash.lt = lt;
+ lodash.lte = lte;
+ lodash.max = max;
+ lodash.maxBy = maxBy;
+ lodash.mean = mean;
+ lodash.meanBy = meanBy;
+ lodash.min = min;
+ lodash.minBy = minBy;
+ lodash.stubArray = stubArray;
+ lodash.stubFalse = stubFalse;
+ lodash.stubObject = stubObject;
+ lodash.stubString = stubString;
+ lodash.stubTrue = stubTrue;
+ lodash.multiply = multiply;
+ lodash.nth = nth;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.now = now;
+ lodash.pad = pad;
+ lodash.padEnd = padEnd;
+ lodash.padStart = padStart;
+ lodash.parseInt = parseInt;
+ lodash.random = random;
+ lodash.reduce = reduce;
+ lodash.reduceRight = reduceRight;
+ lodash.repeat = repeat;
+ lodash.replace = replace;
+ lodash.result = result;
+ lodash.round = round;
+ lodash.runInContext = runInContext;
+ lodash.sample = sample;
+ lodash.size = size;
+ lodash.snakeCase = snakeCase;
+ lodash.some = some;
+ lodash.sortedIndex = sortedIndex;
+ lodash.sortedIndexBy = sortedIndexBy;
+ lodash.sortedIndexOf = sortedIndexOf;
+ lodash.sortedLastIndex = sortedLastIndex;
+ lodash.sortedLastIndexBy = sortedLastIndexBy;
+ lodash.sortedLastIndexOf = sortedLastIndexOf;
+ lodash.startCase = startCase;
+ lodash.startsWith = startsWith;
+ lodash.subtract = subtract;
+ lodash.sum = sum;
+ lodash.sumBy = sumBy;
+ lodash.template = template;
+ lodash.times = times;
+ lodash.toFinite = toFinite;
+ lodash.toInteger = toInteger;
+ lodash.toLength = toLength;
+ lodash.toLower = toLower;
+ lodash.toNumber = toNumber;
+ lodash.toSafeInteger = toSafeInteger;
+ lodash.toString = toString;
+ lodash.toUpper = toUpper;
+ lodash.trim = trim;
+ lodash.trimEnd = trimEnd;
+ lodash.trimStart = trimStart;
+ lodash.truncate = truncate;
+ lodash.unescape = unescape;
+ lodash.uniqueId = uniqueId;
+ lodash.upperCase = upperCase;
+ lodash.upperFirst = upperFirst;
// Add aliases.
- lodash.each = forEach
- lodash.eachRight = forEachRight
- lodash.first = head
+ lodash.each = forEach;
+ lodash.eachRight = forEachRight;
+ lodash.first = head;
- mixin(
- lodash,
- (function() {
- var source = {}
- baseForOwn(lodash, function(func, methodName) {
- if (!hasOwnProperty.call(lodash.prototype, methodName)) {
- source[methodName] = func
- }
- })
- return source
- })(),
- { chain: false }
- )
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), { 'chain': false });
/*------------------------------------------------------------------------*/
@@ -28293,2602 +18875,3655 @@ var app = (function() {
* @memberOf _
* @type {string}
*/
- lodash.VERSION = VERSION
+ lodash.VERSION = VERSION;
// Assign default placeholders.
- arrayEach(
- ["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"],
- function(methodName) {
- lodash[methodName].placeholder = lodash
- }
- )
+ arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
+ lodash[methodName].placeholder = lodash;
+ });
// Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
- arrayEach(["drop", "take"], function(methodName, index) {
+ arrayEach(['drop', 'take'], function(methodName, index) {
LazyWrapper.prototype[methodName] = function(n) {
- n = n === undefined$1 ? 1 : nativeMax(toInteger(n), 0)
+ n = n === undefined$1 ? 1 : nativeMax(toInteger(n), 0);
- var result =
- this.__filtered__ && !index ? new LazyWrapper(this) : this.clone()
+ var result = (this.__filtered__ && !index)
+ ? new LazyWrapper(this)
+ : this.clone();
if (result.__filtered__) {
- result.__takeCount__ = nativeMin(n, result.__takeCount__)
+ result.__takeCount__ = nativeMin(n, result.__takeCount__);
} else {
result.__views__.push({
- size: nativeMin(n, MAX_ARRAY_LENGTH),
- type: methodName + (result.__dir__ < 0 ? "Right" : ""),
- })
+ 'size': nativeMin(n, MAX_ARRAY_LENGTH),
+ 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
+ });
}
- return result
- }
+ return result;
+ };
- LazyWrapper.prototype[methodName + "Right"] = function(n) {
- return this.reverse()
- [methodName](n)
- .reverse()
- }
- })
+ LazyWrapper.prototype[methodName + 'Right'] = function(n) {
+ return this.reverse()[methodName](n).reverse();
+ };
+ });
// Add `LazyWrapper` methods that accept an `iteratee` value.
- arrayEach(["filter", "map", "takeWhile"], function(methodName, index) {
+ arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
var type = index + 1,
- isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG
+ isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
LazyWrapper.prototype[methodName] = function(iteratee) {
- var result = this.clone()
+ var result = this.clone();
result.__iteratees__.push({
- iteratee: getIteratee(iteratee, 3),
- type: type,
- })
- result.__filtered__ = result.__filtered__ || isFilter
- return result
- }
- })
+ 'iteratee': getIteratee(iteratee, 3),
+ 'type': type
+ });
+ result.__filtered__ = result.__filtered__ || isFilter;
+ return result;
+ };
+ });
// Add `LazyWrapper` methods for `_.head` and `_.last`.
- arrayEach(["head", "last"], function(methodName, index) {
- var takeName = "take" + (index ? "Right" : "")
+ arrayEach(['head', 'last'], function(methodName, index) {
+ var takeName = 'take' + (index ? 'Right' : '');
LazyWrapper.prototype[methodName] = function() {
- return this[takeName](1).value()[0]
- }
- })
+ return this[takeName](1).value()[0];
+ };
+ });
// Add `LazyWrapper` methods for `_.initial` and `_.tail`.
- arrayEach(["initial", "tail"], function(methodName, index) {
- var dropName = "drop" + (index ? "" : "Right")
+ arrayEach(['initial', 'tail'], function(methodName, index) {
+ var dropName = 'drop' + (index ? '' : 'Right');
LazyWrapper.prototype[methodName] = function() {
- return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1)
- }
- })
+ return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
+ };
+ });
LazyWrapper.prototype.compact = function() {
- return this.filter(identity)
- }
+ return this.filter(identity);
+ };
LazyWrapper.prototype.find = function(predicate) {
- return this.filter(predicate).head()
- }
+ return this.filter(predicate).head();
+ };
LazyWrapper.prototype.findLast = function(predicate) {
- return this.reverse().find(predicate)
- }
+ return this.reverse().find(predicate);
+ };
LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
- if (typeof path == "function") {
- return new LazyWrapper(this)
+ if (typeof path == 'function') {
+ return new LazyWrapper(this);
}
return this.map(function(value) {
- return baseInvoke(value, path, args)
- })
- })
+ return baseInvoke(value, path, args);
+ });
+ });
LazyWrapper.prototype.reject = function(predicate) {
- return this.filter(negate(getIteratee(predicate)))
- }
+ return this.filter(negate(getIteratee(predicate)));
+ };
LazyWrapper.prototype.slice = function(start, end) {
- start = toInteger(start)
+ start = toInteger(start);
- var result = this
+ var result = this;
if (result.__filtered__ && (start > 0 || end < 0)) {
- return new LazyWrapper(result)
+ return new LazyWrapper(result);
}
if (start < 0) {
- result = result.takeRight(-start)
+ result = result.takeRight(-start);
} else if (start) {
- result = result.drop(start)
+ result = result.drop(start);
}
if (end !== undefined$1) {
- end = toInteger(end)
- result = end < 0 ? result.dropRight(-end) : result.take(end - start)
+ end = toInteger(end);
+ result = end < 0 ? result.dropRight(-end) : result.take(end - start);
}
- return result
- }
+ return result;
+ };
LazyWrapper.prototype.takeRightWhile = function(predicate) {
- return this.reverse()
- .takeWhile(predicate)
- .reverse()
- }
+ return this.reverse().takeWhile(predicate).reverse();
+ };
LazyWrapper.prototype.toArray = function() {
- return this.take(MAX_ARRAY_LENGTH)
- }
+ return this.take(MAX_ARRAY_LENGTH);
+ };
// Add `LazyWrapper` methods to `lodash.prototype`.
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
- var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(
- methodName
- ),
- isTaker = /^(?:head|last)$/.test(methodName),
- lodashFunc =
- lodash[
- isTaker
- ? "take" + (methodName == "last" ? "Right" : "")
- : methodName
- ],
- retUnwrapped = isTaker || /^find/.test(methodName)
+ var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
+ isTaker = /^(?:head|last)$/.test(methodName),
+ lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
+ retUnwrapped = isTaker || /^find/.test(methodName);
if (!lodashFunc) {
- return
+ return;
}
lodash.prototype[methodName] = function() {
var value = this.__wrapped__,
- args = isTaker ? [1] : arguments,
- isLazy = value instanceof LazyWrapper,
- iteratee = args[0],
- useLazy = isLazy || isArray(value)
+ args = isTaker ? [1] : arguments,
+ isLazy = value instanceof LazyWrapper,
+ iteratee = args[0],
+ useLazy = isLazy || isArray(value);
var interceptor = function(value) {
- var result = lodashFunc.apply(lodash, arrayPush([value], args))
- return isTaker && chainAll ? result[0] : result
- }
+ var result = lodashFunc.apply(lodash, arrayPush([value], args));
+ return (isTaker && chainAll) ? result[0] : result;
+ };
- if (
- useLazy &&
- checkIteratee &&
- typeof iteratee == "function" &&
- iteratee.length != 1
- ) {
+ if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
// Avoid lazy use if the iteratee has a "length" value other than `1`.
- isLazy = useLazy = false
+ isLazy = useLazy = false;
}
var chainAll = this.__chain__,
- isHybrid = !!this.__actions__.length,
- isUnwrapped = retUnwrapped && !chainAll,
- onlyLazy = isLazy && !isHybrid
+ isHybrid = !!this.__actions__.length,
+ isUnwrapped = retUnwrapped && !chainAll,
+ onlyLazy = isLazy && !isHybrid;
if (!retUnwrapped && useLazy) {
- value = onlyLazy ? value : new LazyWrapper(this)
- var result = func.apply(value, args)
- result.__actions__.push({
- func: thru,
- args: [interceptor],
- thisArg: undefined$1,
- })
- return new LodashWrapper(result, chainAll)
+ value = onlyLazy ? value : new LazyWrapper(this);
+ var result = func.apply(value, args);
+ result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined$1 });
+ return new LodashWrapper(result, chainAll);
}
if (isUnwrapped && onlyLazy) {
- return func.apply(this, args)
+ return func.apply(this, args);
}
- result = this.thru(interceptor)
- return isUnwrapped
- ? isTaker
- ? result.value()[0]
- : result.value()
- : result
- }
- })
+ result = this.thru(interceptor);
+ return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
+ };
+ });
// Add `Array` methods to `lodash.prototype`.
- arrayEach(
- ["pop", "push", "shift", "sort", "splice", "unshift"],
- function(methodName) {
- var func = arrayProto[methodName],
- chainName = /^(?:push|sort|unshift)$/.test(methodName)
- ? "tap"
- : "thru",
- retUnwrapped = /^(?:pop|shift)$/.test(methodName)
+ arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = arrayProto[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|shift)$/.test(methodName);
- lodash.prototype[methodName] = function() {
- var args = arguments
- if (retUnwrapped && !this.__chain__) {
- var value = this.value()
- return func.apply(isArray(value) ? value : [], args)
- }
- return this[chainName](function(value) {
- return func.apply(isArray(value) ? value : [], args)
- })
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ var value = this.value();
+ return func.apply(isArray(value) ? value : [], args);
}
- }
- )
+ return this[chainName](function(value) {
+ return func.apply(isArray(value) ? value : [], args);
+ });
+ };
+ });
// Map minified method names to their real names.
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
- var lodashFunc = lodash[methodName]
+ var lodashFunc = lodash[methodName];
if (lodashFunc) {
- var key = lodashFunc.name + ""
+ var key = lodashFunc.name + '';
if (!hasOwnProperty.call(realNames, key)) {
- realNames[key] = []
+ realNames[key] = [];
}
- realNames[key].push({ name: methodName, func: lodashFunc })
+ realNames[key].push({ 'name': methodName, 'func': lodashFunc });
}
- })
+ });
- realNames[createHybrid(undefined$1, WRAP_BIND_KEY_FLAG).name] = [
- {
- name: "wrapper",
- func: undefined$1,
- },
- ]
+ realNames[createHybrid(undefined$1, WRAP_BIND_KEY_FLAG).name] = [{
+ 'name': 'wrapper',
+ 'func': undefined$1
+ }];
// Add methods to `LazyWrapper`.
- LazyWrapper.prototype.clone = lazyClone
- LazyWrapper.prototype.reverse = lazyReverse
- LazyWrapper.prototype.value = lazyValue
+ LazyWrapper.prototype.clone = lazyClone;
+ LazyWrapper.prototype.reverse = lazyReverse;
+ LazyWrapper.prototype.value = lazyValue;
// Add chain sequence methods to the `lodash` wrapper.
- lodash.prototype.at = wrapperAt
- lodash.prototype.chain = wrapperChain
- lodash.prototype.commit = wrapperCommit
- lodash.prototype.next = wrapperNext
- lodash.prototype.plant = wrapperPlant
- lodash.prototype.reverse = wrapperReverse
- lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue
+ lodash.prototype.at = wrapperAt;
+ lodash.prototype.chain = wrapperChain;
+ lodash.prototype.commit = wrapperCommit;
+ lodash.prototype.next = wrapperNext;
+ lodash.prototype.plant = wrapperPlant;
+ lodash.prototype.reverse = wrapperReverse;
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
// Add lazy aliases.
- lodash.prototype.first = lodash.prototype.head
+ lodash.prototype.first = lodash.prototype.head;
if (symIterator) {
- lodash.prototype[symIterator] = wrapperToIterator
+ lodash.prototype[symIterator] = wrapperToIterator;
}
- return lodash
- }
+ return lodash;
+ });
/*--------------------------------------------------------------------------*/
// Export lodash.
- var _ = runInContext()
+ var _ = runInContext();
// Some AMD build optimizers, like r.js, check for condition patterns like:
if (freeModule) {
// Export for Node.js.
- ;(freeModule.exports = _)._ = _
+ (freeModule.exports = _)._ = _;
// Export for CommonJS support.
- freeExports._ = _
- } else {
+ freeExports._ = _;
+ }
+ else {
// Export to the global object.
- root._ = _
+ root._ = _;
}
- }.call(commonjsGlobal))
- })
- var lodash_1 = lodash.flow
- var lodash_2 = lodash.head
- var lodash_3 = lodash.find
- var lodash_4 = lodash.each
- var lodash_5 = lodash.tail
- var lodash_6 = lodash.findIndex
- var lodash_7 = lodash.startsWith
- var lodash_8 = lodash.dropRight
- var lodash_9 = lodash.takeRight
- var lodash_10 = lodash.trim
- var lodash_11 = lodash.split
- var lodash_12 = lodash.replace
- var lodash_13 = lodash.merge
- var lodash_14 = lodash.assign
+ }.call(commonjsGlobal));
+ });
+ var lodash_1 = lodash.flow;
+ var lodash_2 = lodash.head;
+ var lodash_3 = lodash.find;
+ var lodash_4 = lodash.each;
+ var lodash_5 = lodash.tail;
+ var lodash_6 = lodash.findIndex;
+ var lodash_7 = lodash.startsWith;
+ var lodash_8 = lodash.dropRight;
+ var lodash_9 = lodash.takeRight;
+ var lodash_10 = lodash.trim;
+ var lodash_11 = lodash.split;
+ var lodash_12 = lodash.replace;
+ var lodash_13 = lodash.merge;
+ var lodash_14 = lodash.assign;
- const commonPlus = extra => fp_6(["onBegin", "onComplete", "onError"])(extra)
+ const commonPlus = extra => fp_6(["onBegin", "onComplete", "onError"])(extra);
- const common = () => commonPlus([])
+ const common = () => commonPlus([]);
- const _events = {
- recordApi: {
- save: commonPlus(["onInvalid", "onRecordUpdated", "onRecordCreated"]),
- delete: common(),
- getContext: common(),
- getNew: common(),
- load: common(),
- validate: common(),
- uploadFile: common(),
- downloadFile: common(),
- },
- indexApi: {
- buildIndex: common(),
- listItems: common(),
- delete: common(),
- aggregates: common(),
- },
- collectionApi: {
- getAllowedRecordTypes: common(),
- initialise: common(),
- delete: common(),
- },
- authApi: {
- authenticate: common(),
- authenticateTemporaryAccess: common(),
- createTemporaryAccess: common(),
- createUser: common(),
- enableUser: common(),
- disableUser: common(),
- loadAccessLevels: common(),
- getNewAccessLevel: common(),
- getNewUser: common(),
- getNewUserAuth: common(),
- getUsers: common(),
- saveAccessLevels: common(),
- isAuthorized: common(),
- changeMyPassword: common(),
- setPasswordFromTemporaryCode: common(),
- scorePassword: common(),
- isValidPassword: common(),
- validateUser: common(),
- validateAccessLevels: common(),
- setUserAccessLevels: common(),
- },
- templateApi: {
- saveApplicationHierarchy: common(),
- saveActionsAndTriggers: common(),
- },
- actionsApi: {
- execute: common(),
- },
- }
+ const _events = {
+ recordApi: {
+ save: commonPlus(["onInvalid", "onRecordUpdated", "onRecordCreated"]),
+ delete: common(),
+ getContext: common(),
+ getNew: common(),
+ load: common(),
+ validate: common(),
+ uploadFile: common(),
+ downloadFile: common(),
+ },
+ indexApi: {
+ buildIndex: common(),
+ listItems: common(),
+ delete: common(),
+ aggregates: common(),
+ },
+ collectionApi: {
+ getAllowedRecordTypes: common(),
+ initialise: common(),
+ delete: common(),
+ },
+ authApi: {
+ authenticate: common(),
+ authenticateTemporaryAccess: common(),
+ createTemporaryAccess: common(),
+ createUser: common(),
+ enableUser: common(),
+ disableUser: common(),
+ loadAccessLevels: common(),
+ getNewAccessLevel: common(),
+ getNewUser: common(),
+ getNewUserAuth: common(),
+ getUsers: common(),
+ saveAccessLevels: common(),
+ isAuthorized: common(),
+ changeMyPassword: common(),
+ setPasswordFromTemporaryCode: common(),
+ scorePassword: common(),
+ isValidPassword: common(),
+ validateUser: common(),
+ validateAccessLevels: common(),
+ setUserAccessLevels: common(),
+ },
+ templateApi: {
+ saveApplicationHierarchy: common(),
+ saveActionsAndTriggers: common(),
+ },
+ actionsApi: {
+ execute: common(),
+ },
+ };
- const _eventsList = []
+ const _eventsList = [];
- const makeEvent = (area, method, name) => `${area}:${method}:${name}`
+ const makeEvent = (area, method, name) => `${area}:${method}:${name}`;
- for (const areaKey in _events) {
- for (const methodKey in _events[areaKey]) {
- _events[areaKey][methodKey] = fp_7((obj, s) => {
- obj[s] = makeEvent(areaKey, methodKey, s)
- return obj
- }, {})(_events[areaKey][methodKey])
- }
- }
-
- for (const areaKey in _events) {
- for (const methodKey in _events[areaKey]) {
- for (const name in _events[areaKey][methodKey]) {
- _eventsList.push(_events[areaKey][methodKey][name])
+ for (const areaKey in _events) {
+ for (const methodKey in _events[areaKey]) {
+ _events[areaKey][methodKey] = fp_7((obj, s) => {
+ obj[s] = makeEvent(areaKey, methodKey, s);
+ return obj
+ }, {})(_events[areaKey][methodKey]);
}
}
- }
- const events = _events
-
- // Found this seed-based random generator somewhere
- // Based on The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu)
-
- var seed = 1
-
- /**
- * return a random number based on a seed
- * @param seed
- * @returns {number}
- */
- function getNextValue() {
- seed = (seed * 9301 + 49297) % 233280
- return seed / 233280.0
- }
-
- function setSeed(_seed_) {
- seed = _seed_
- }
-
- var randomFromSeed = {
- nextValue: getNextValue,
- seed: setSeed,
- }
-
- var ORIGINAL =
- "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"
- var alphabet
- var previousSeed
-
- var shuffled
-
- function reset() {
- shuffled = false
- }
-
- function setCharacters(_alphabet_) {
- if (!_alphabet_) {
- if (alphabet !== ORIGINAL) {
- alphabet = ORIGINAL
- reset()
- }
- return
- }
-
- if (_alphabet_ === alphabet) {
- return
- }
-
- if (_alphabet_.length !== ORIGINAL.length) {
- throw new Error(
- "Custom alphabet for shortid must be " +
- ORIGINAL.length +
- " unique characters. You submitted " +
- _alphabet_.length +
- " characters: " +
- _alphabet_
- )
- }
-
- var unique = _alphabet_.split("").filter(function(item, ind, arr) {
- return ind !== arr.lastIndexOf(item)
- })
-
- if (unique.length) {
- throw new Error(
- "Custom alphabet for shortid must be " +
- ORIGINAL.length +
- " unique characters. These characters were not unique: " +
- unique.join(", ")
- )
- }
-
- alphabet = _alphabet_
- reset()
- }
-
- function characters(_alphabet_) {
- setCharacters(_alphabet_)
- return alphabet
- }
-
- function setSeed$1(seed) {
- randomFromSeed.seed(seed)
- if (previousSeed !== seed) {
- reset()
- previousSeed = seed
- }
- }
-
- function shuffle() {
- if (!alphabet) {
- setCharacters(ORIGINAL)
- }
-
- var sourceArray = alphabet.split("")
- var targetArray = []
- var r = randomFromSeed.nextValue()
- var characterIndex
-
- while (sourceArray.length > 0) {
- r = randomFromSeed.nextValue()
- characterIndex = Math.floor(r * sourceArray.length)
- targetArray.push(sourceArray.splice(characterIndex, 1)[0])
- }
- return targetArray.join("")
- }
-
- function getShuffled() {
- if (shuffled) {
- return shuffled
- }
- shuffled = shuffle()
- return shuffled
- }
-
- /**
- * lookup shuffled letter
- * @param index
- * @returns {string}
- */
- function lookup(index) {
- var alphabetShuffled = getShuffled()
- return alphabetShuffled[index]
- }
-
- function get() {
- return alphabet || ORIGINAL
- }
-
- var alphabet_1 = {
- get: get,
- characters: characters,
- seed: setSeed$1,
- lookup: lookup,
- shuffled: getShuffled,
- }
-
- var crypto = typeof window === "object" && (window.crypto || window.msCrypto) // IE 11 uses window.msCrypto
-
- var randomByte
-
- if (!crypto || !crypto.getRandomValues) {
- randomByte = function(size) {
- var bytes = []
- for (var i = 0; i < size; i++) {
- bytes.push(Math.floor(Math.random() * 256))
- }
- return bytes
- }
- } else {
- randomByte = function(size) {
- return crypto.getRandomValues(new Uint8Array(size))
- }
- }
-
- var randomByteBrowser = randomByte
-
- /**
- * Secure random string generator with custom alphabet.
- *
- * Alphabet must contain 256 symbols or less. Otherwise, the generator
- * will not be secure.
- *
- * @param {generator} random The random bytes generator.
- * @param {string} alphabet Symbols to be used in new random string.
- * @param {size} size The number of symbols in new random string.
- *
- * @return {string} Random string.
- *
- * @example
- * const format = require('nanoid/format')
- *
- * function random (size) {
- * const result = []
- * for (let i = 0; i < size; i++) {
- * result.push(randomByte())
- * }
- * return result
- * }
- *
- * format(random, "abcdef", 5) //=> "fbaef"
- *
- * @name format
- * @function
- */
- var format = function(random, alphabet, size) {
- var mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
- var step = Math.ceil((1.6 * mask * size) / alphabet.length)
- size = +size
-
- var id = ""
- while (true) {
- var bytes = random(step)
- for (var i = 0; i < step; i++) {
- var byte = bytes[i] & mask
- if (alphabet[byte]) {
- id += alphabet[byte]
- if (id.length === size) return id
+ for (const areaKey in _events) {
+ for (const methodKey in _events[areaKey]) {
+ for (const name in _events[areaKey][methodKey]) {
+ _eventsList.push(_events[areaKey][methodKey][name]);
}
}
}
- }
- function generate(number) {
- var loopCounter = 0
- var done
+ const events = _events;
- var str = ""
-
- while (!done) {
- str = str + format(randomByteBrowser, alphabet_1.get(), 1)
- done = number < Math.pow(16, loopCounter + 1)
- loopCounter++
- }
- return str
- }
-
- var generate_1 = generate
-
- // Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness.
- // This number should be updated every year or so to keep the generated id short.
- // To regenerate `new Date() - 0` and bump the version. Always bump the version!
- var REDUCE_TIME = 1567752802062
-
- // don't change unless we change the algos or REDUCE_TIME
- // must be an integer and less than 16
- var version = 7
-
- // Counter is used when shortid is called multiple times in one second.
- var counter
-
- // Remember the last time shortid was called in case counter is needed.
- var previousSeconds
-
- /**
- * Generate unique id
- * Returns string id
- */
- function build(clusterWorkerId) {
- var str = ""
-
- var seconds = Math.floor((Date.now() - REDUCE_TIME) * 0.001)
-
- if (seconds === previousSeconds) {
- counter++
- } else {
- counter = 0
- previousSeconds = seconds
+ class BadRequestError extends Error {
+ constructor(message) {
+ super(message);
+ this.httpStatusCode = 400;
+ }
}
- str = str + generate_1(version)
- str = str + generate_1(clusterWorkerId)
- if (counter > 0) {
- str = str + generate_1(counter)
- }
- str = str + generate_1(seconds)
- return str
- }
-
- var build_1 = build
-
- function isShortId(id) {
- if (!id || typeof id !== "string" || id.length < 6) {
- return false
+ class UnauthorisedError extends Error {
+ constructor(message) {
+ super(message);
+ this.httpStatusCode = 401;
+ }
}
- var nonAlphabetic = new RegExp(
- "[^" + alphabet_1.get().replace(/[|\\{}()[\]^$+*?.-]/g, "\\$&") + "]"
- )
- return !nonAlphabetic.test(id)
- }
+ const apiWrapperSync = (
+ app,
+ eventNamespace,
+ isAuthorized,
+ eventContext,
+ func,
+ ...params
+ ) => {
+ pushCallStack(app, eventNamespace);
- var isValid = isShortId
-
- var lib = createCommonjsModule(function(module) {
- // if you are using cluster or multiple servers use this to make each instance
- // has a unique value for worker
- // Note: I don't know if this is automatically set when using third
- // party cluster solutions such as pm2.
- var clusterWorkerId = 0
-
- /**
- * Set the seed.
- * Highly recommended if you don't want people to try to figure out your id schema.
- * exposed as shortid.seed(int)
- * @param seed Integer value to seed the random alphabet. ALWAYS USE THE SAME SEED or you might get overlaps.
- */
- function seed(seedValue) {
- alphabet_1.seed(seedValue)
- return module.exports
- }
-
- /**
- * Set the cluster worker or machine id
- * exposed as shortid.worker(int)
- * @param workerId worker must be positive integer. Number less than 16 is recommended.
- * returns shortid module so it can be chained.
- */
- function worker(workerId) {
- clusterWorkerId = workerId
- return module.exports
- }
-
- /**
- *
- * sets new characters to use in the alphabet
- * returns the shuffled alphabet
- */
- function characters(newCharacters) {
- if (newCharacters !== undefined) {
- alphabet_1.characters(newCharacters)
+ if (!isAuthorized(app)) {
+ handleNotAuthorized(app, eventContext, eventNamespace);
+ return
}
- return alphabet_1.shuffled()
- }
+ const startDate = Date.now();
+ const elapsed = () => Date.now() - startDate;
- /**
- * Generate unique id
- * Returns string id
- */
- function generate() {
- return build_1(clusterWorkerId)
- }
+ try {
+ app.publish(eventNamespace.onBegin, eventContext);
- // Export all other functions as properties of the generate function
- module.exports = generate
- module.exports.generate = generate
- module.exports.seed = seed
- module.exports.worker = worker
- module.exports.characters = characters
- module.exports.isValid = isValid
- })
- var lib_1 = lib.generate
- var lib_2 = lib.seed
- var lib_3 = lib.worker
- var lib_4 = lib.characters
- var lib_5 = lib.isValid
+ const result = func(...params);
- var shortid = lib
- var shortid_1 = shortid.generate
+ publishComplete(app, eventContext, eventNamespace, elapsed, result);
+ return result
+ } catch (error) {
+ publishError(app, eventContext, eventNamespace, elapsed, error);
+ throw error
+ }
+ };
- class BadRequestError extends Error {
- constructor(message) {
- super(message)
- this.httpStatusCode = 400
- }
- }
+ const handleNotAuthorized = (app, eventContext, eventNamespace) => {
+ const err = new UnauthorisedError(`Unauthorized: ${eventNamespace}`);
+ publishError(app, eventContext, eventNamespace, () => 0, err);
+ throw err
+ };
- class UnauthorisedError extends Error {
- constructor(message) {
- super(message)
- this.httpStatusCode = 401
- }
- }
+ const pushCallStack = (app, eventNamespace, seedCallId) => {
+ const callId = shortid_1();
- const apiWrapperSync = (
- app,
- eventNamespace,
- isAuthorized,
- eventContext,
- func,
- ...params
- ) => {
- pushCallStack(app, eventNamespace)
+ const createCallStack = () => ({
+ seedCallId: !fp_2(seedCallId) ? seedCallId : callId,
+ threadCallId: callId,
+ stack: [],
+ });
- if (!isAuthorized(app)) {
- handleNotAuthorized(app, eventContext, eventNamespace)
- return
- }
+ if (fp_2(app.calls)) {
+ app.calls = createCallStack();
+ }
- const startDate = Date.now()
- const elapsed = () => Date.now() - startDate
+ app.calls.stack.push({
+ namespace: eventNamespace,
+ callId,
+ });
+ };
- try {
- app.publish(eventNamespace.onBegin, eventContext)
+ const popCallStack = app => {
+ app.calls.stack.pop();
+ if (app.calls.stack.length === 0) {
+ delete app.calls;
+ }
+ };
- const result = func(...params)
+ const publishError = async (
+ app,
+ eventContext,
+ eventNamespace,
+ elapsed,
+ err
+ ) => {
+ const ctx = fp_9(eventContext);
+ ctx.error = err;
+ ctx.elapsed = elapsed();
+ await app.publish(eventNamespace.onError, ctx);
+ popCallStack(app);
+ };
- publishComplete(app, eventContext, eventNamespace, elapsed, result)
+ const publishComplete = async (
+ app,
+ eventContext,
+ eventNamespace,
+ elapsed,
+ result
+ ) => {
+ const endcontext = fp_9(eventContext);
+ endcontext.result = result;
+ endcontext.elapsed = elapsed();
+ await app.publish(eventNamespace.onComplete, endcontext);
+ popCallStack(app);
return result
- } catch (error) {
- publishError(app, eventContext, eventNamespace, elapsed, error)
- throw error
- }
- }
+ };
- const handleNotAuthorized = (app, eventContext, eventNamespace) => {
- const err = new UnauthorisedError(`Unauthorized: ${eventNamespace}`)
- publishError(app, eventContext, eventNamespace, () => 0, err)
- throw err
- }
+ var bcrypt = createCommonjsModule(function (module) {
+ /*
+ Copyright (c) 2012 Nevins Bartolomeo
+ Copyright (c) 2012 Shane Girish
+ Copyright (c) 2014 Daniel Wirtz
- const pushCallStack = (app, eventNamespace, seedCallId) => {
- const callId = shortid_1()
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
- const createCallStack = () => ({
- seedCallId: !fp_2(seedCallId) ? seedCallId : callId,
- threadCallId: callId,
- stack: [],
- })
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
- if (fp_2(app.calls)) {
- app.calls = createCallStack()
+ /**
+ * @license bcrypt.js (c) 2013 Daniel Wirtz
+ * Released under the Apache License, Version 2.0
+ * see: https://github.com/dcodeIO/bcrypt.js for details
+ */
+ (function(global, factory) {
+
+ /* AMD */ if (typeof commonjsRequire === 'function' && 'object' === "object" && module && module["exports"])
+ module["exports"] = factory();
+ /* Global */ else
+ (global["dcodeIO"] = global["dcodeIO"] || {})["bcrypt"] = factory();
+
+ }(commonjsGlobal, function() {
+
+ /**
+ * bcrypt namespace.
+ * @type {Object.}
+ */
+ var bcrypt = {};
+
+ /**
+ * The random implementation to use as a fallback.
+ * @type {?function(number):!Array.}
+ * @inner
+ */
+ var randomFallback = null;
+
+ /**
+ * Generates cryptographically secure random bytes.
+ * @function
+ * @param {number} len Bytes length
+ * @returns {!Array.} Random bytes
+ * @throws {Error} If no random implementation is available
+ * @inner
+ */
+ function random(len) {
+ /* node */ if ( module && module['exports'])
+ try {
+ return crypto$1['randomBytes'](len);
+ } catch (e) {}
+ /* WCA */ try {
+ var a; (self['crypto']||self['msCrypto'])['getRandomValues'](a = new Uint32Array(len));
+ return Array.prototype.slice.call(a);
+ } catch (e) {}
+ /* fallback */ if (!randomFallback)
+ throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");
+ return randomFallback(len);
+ }
+
+ // Test if any secure randomness source is available
+ var randomAvailable = false;
+ try {
+ random(1);
+ randomAvailable = true;
+ } catch (e) {}
+
+ // Default fallback, if any
+ randomFallback = null;
+ /**
+ * Sets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto
+ * API is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it
+ * is seeded properly!
+ * @param {?function(number):!Array.} random Function taking the number of bytes to generate as its
+ * sole argument, returning the corresponding array of cryptographically secure random byte values.
+ * @see http://nodejs.org/api/crypto.html
+ * @see http://www.w3.org/TR/WebCryptoAPI/
+ */
+ bcrypt.setRandomFallback = function(random) {
+ randomFallback = random;
+ };
+
+ /**
+ * Synchronously generates a salt.
+ * @param {number=} rounds Number of rounds to use, defaults to 10 if omitted
+ * @param {number=} seed_length Not supported.
+ * @returns {string} Resulting salt
+ * @throws {Error} If a random fallback is required but not set
+ * @expose
+ */
+ bcrypt.genSaltSync = function(rounds, seed_length) {
+ rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS;
+ if (typeof rounds !== 'number')
+ throw Error("Illegal arguments: "+(typeof rounds)+", "+(typeof seed_length));
+ if (rounds < 4)
+ rounds = 4;
+ else if (rounds > 31)
+ rounds = 31;
+ var salt = [];
+ salt.push("$2a$");
+ if (rounds < 10)
+ salt.push("0");
+ salt.push(rounds.toString());
+ salt.push('$');
+ salt.push(base64_encode(random(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); // May throw
+ return salt.join('');
+ };
+
+ /**
+ * Asynchronously generates a salt.
+ * @param {(number|function(Error, string=))=} rounds Number of rounds to use, defaults to 10 if omitted
+ * @param {(number|function(Error, string=))=} seed_length Not supported.
+ * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting salt
+ * @returns {!Promise} If `callback` has been omitted
+ * @throws {Error} If `callback` is present but not a function
+ * @expose
+ */
+ bcrypt.genSalt = function(rounds, seed_length, callback) {
+ if (typeof seed_length === 'function')
+ callback = seed_length,
+ seed_length = undefined; // Not supported.
+ if (typeof rounds === 'function')
+ callback = rounds,
+ rounds = undefined;
+ if (typeof rounds === 'undefined')
+ rounds = GENSALT_DEFAULT_LOG2_ROUNDS;
+ else if (typeof rounds !== 'number')
+ throw Error("illegal arguments: "+(typeof rounds));
+
+ function _async(callback) {
+ nextTick(function() { // Pretty thin, but salting is fast enough
+ try {
+ callback(null, bcrypt.genSaltSync(rounds));
+ } catch (err) {
+ callback(err);
+ }
+ });
+ }
+
+ if (callback) {
+ if (typeof callback !== 'function')
+ throw Error("Illegal callback: "+typeof(callback));
+ _async(callback);
+ } else
+ return new Promise(function(resolve, reject) {
+ _async(function(err, res) {
+ if (err) {
+ reject(err);
+ return;
+ }
+ resolve(res);
+ });
+ });
+ };
+
+ /**
+ * Synchronously generates a hash for the given string.
+ * @param {string} s String to hash
+ * @param {(number|string)=} salt Salt length to generate or salt to use, default to 10
+ * @returns {string} Resulting hash
+ * @expose
+ */
+ bcrypt.hashSync = function(s, salt) {
+ if (typeof salt === 'undefined')
+ salt = GENSALT_DEFAULT_LOG2_ROUNDS;
+ if (typeof salt === 'number')
+ salt = bcrypt.genSaltSync(salt);
+ if (typeof s !== 'string' || typeof salt !== 'string')
+ throw Error("Illegal arguments: "+(typeof s)+', '+(typeof salt));
+ return _hash(s, salt);
+ };
+
+ /**
+ * Asynchronously generates a hash for the given string.
+ * @param {string} s String to hash
+ * @param {number|string} salt Salt length to generate or salt to use
+ * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash
+ * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed
+ * (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
+ * @returns {!Promise} If `callback` has been omitted
+ * @throws {Error} If `callback` is present but not a function
+ * @expose
+ */
+ bcrypt.hash = function(s, salt, callback, progressCallback) {
+
+ function _async(callback) {
+ if (typeof s === 'string' && typeof salt === 'number')
+ bcrypt.genSalt(salt, function(err, salt) {
+ _hash(s, salt, callback, progressCallback);
+ });
+ else if (typeof s === 'string' && typeof salt === 'string')
+ _hash(s, salt, callback, progressCallback);
+ else
+ nextTick(callback.bind(this, Error("Illegal arguments: "+(typeof s)+', '+(typeof salt))));
+ }
+
+ if (callback) {
+ if (typeof callback !== 'function')
+ throw Error("Illegal callback: "+typeof(callback));
+ _async(callback);
+ } else
+ return new Promise(function(resolve, reject) {
+ _async(function(err, res) {
+ if (err) {
+ reject(err);
+ return;
+ }
+ resolve(res);
+ });
+ });
+ };
+
+ /**
+ * Compares two strings of the same length in constant time.
+ * @param {string} known Must be of the correct length
+ * @param {string} unknown Must be the same length as `known`
+ * @returns {boolean}
+ * @inner
+ */
+ function safeStringCompare(known, unknown) {
+ var right = 0,
+ wrong = 0;
+ for (var i=0, k=known.length; i} UTF8 bytes
+ * @inner
+ */
+ function stringToBytes(str) {
+ var out = [],
+ i = 0;
+ utfx.encodeUTF16toUTF8(function() {
+ if (i >= str.length) return null;
+ return str.charCodeAt(i++);
+ }, function(b) {
+ out.push(b);
+ });
+ return out;
+ }
+
+ // A base64 implementation for the bcrypt algorithm. This is partly non-standard.
+
+ /**
+ * bcrypt's own non-standard base64 dictionary.
+ * @type {!Array.}
+ * @const
+ * @inner
+ **/
+ var BASE64_CODE = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split('');
+
+ /**
+ * @type {!Array.}
+ * @const
+ * @inner
+ **/
+ var BASE64_INDEX = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
+ 1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, -1, -1, -1, -1, -1,
+ -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1];
+
+ /**
+ * @type {!function(...number):string}
+ * @inner
+ */
+ var stringFromCharCode = String.fromCharCode;
+
+ /**
+ * Encodes a byte array to base64 with up to len bytes of input.
+ * @param {!Array.} b Byte array
+ * @param {number} len Maximum input length
+ * @returns {string}
+ * @inner
+ */
+ function base64_encode(b, len) {
+ var off = 0,
+ rs = [],
+ c1, c2;
+ if (len <= 0 || len > b.length)
+ throw Error("Illegal len: "+len);
+ while (off < len) {
+ c1 = b[off++] & 0xff;
+ rs.push(BASE64_CODE[(c1 >> 2) & 0x3f]);
+ c1 = (c1 & 0x03) << 4;
+ if (off >= len) {
+ rs.push(BASE64_CODE[c1 & 0x3f]);
+ break;
+ }
+ c2 = b[off++] & 0xff;
+ c1 |= (c2 >> 4) & 0x0f;
+ rs.push(BASE64_CODE[c1 & 0x3f]);
+ c1 = (c2 & 0x0f) << 2;
+ if (off >= len) {
+ rs.push(BASE64_CODE[c1 & 0x3f]);
+ break;
+ }
+ c2 = b[off++] & 0xff;
+ c1 |= (c2 >> 6) & 0x03;
+ rs.push(BASE64_CODE[c1 & 0x3f]);
+ rs.push(BASE64_CODE[c2 & 0x3f]);
+ }
+ return rs.join('');
+ }
+
+ /**
+ * Decodes a base64 encoded string to up to len bytes of output.
+ * @param {string} s String to decode
+ * @param {number} len Maximum output length
+ * @returns {!Array.}
+ * @inner
+ */
+ function base64_decode(s, len) {
+ var off = 0,
+ slen = s.length,
+ olen = 0,
+ rs = [],
+ c1, c2, c3, c4, o, code;
+ if (len <= 0)
+ throw Error("Illegal len: "+len);
+ while (off < slen - 1 && olen < len) {
+ code = s.charCodeAt(off++);
+ c1 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;
+ code = s.charCodeAt(off++);
+ c2 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;
+ if (c1 == -1 || c2 == -1)
+ break;
+ o = (c1 << 2) >>> 0;
+ o |= (c2 & 0x30) >> 4;
+ rs.push(stringFromCharCode(o));
+ if (++olen >= len || off >= slen)
+ break;
+ code = s.charCodeAt(off++);
+ c3 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;
+ if (c3 == -1)
+ break;
+ o = ((c2 & 0x0f) << 4) >>> 0;
+ o |= (c3 & 0x3c) >> 2;
+ rs.push(stringFromCharCode(o));
+ if (++olen >= len || off >= slen)
+ break;
+ code = s.charCodeAt(off++);
+ c4 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;
+ o = ((c3 & 0x03) << 6) >>> 0;
+ o |= c4;
+ rs.push(stringFromCharCode(o));
+ ++olen;
+ }
+ var res = [];
+ for (off = 0; off
+ * Released under the Apache License, Version 2.0
+ * see: https://github.com/dcodeIO/utfx for details
+ */
+ var utfx = function() {
+
+ /**
+ * utfx namespace.
+ * @inner
+ * @type {!Object.}
+ */
+ var utfx = {};
+
+ /**
+ * Maximum valid code point.
+ * @type {number}
+ * @const
+ */
+ utfx.MAX_CODEPOINT = 0x10FFFF;
+
+ /**
+ * Encodes UTF8 code points to UTF8 bytes.
+ * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point
+ * respectively `null` if there are no more code points left or a single numeric code point.
+ * @param {!function(number)} dst Bytes destination as a function successively called with the next byte
+ */
+ utfx.encodeUTF8 = function(src, dst) {
+ var cp = null;
+ if (typeof src === 'number')
+ cp = src,
+ src = function() { return null; };
+ while (cp !== null || (cp = src()) !== null) {
+ if (cp < 0x80)
+ dst(cp&0x7F);
+ else if (cp < 0x800)
+ dst(((cp>>6)&0x1F)|0xC0),
+ dst((cp&0x3F)|0x80);
+ else if (cp < 0x10000)
+ dst(((cp>>12)&0x0F)|0xE0),
+ dst(((cp>>6)&0x3F)|0x80),
+ dst((cp&0x3F)|0x80);
+ else
+ dst(((cp>>18)&0x07)|0xF0),
+ dst(((cp>>12)&0x3F)|0x80),
+ dst(((cp>>6)&0x3F)|0x80),
+ dst((cp&0x3F)|0x80);
+ cp = null;
+ }
+ };
+
+ /**
+ * Decodes UTF8 bytes to UTF8 code points.
+ * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there
+ * are no more bytes left.
+ * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point.
+ * @throws {RangeError} If a starting byte is invalid in UTF8
+ * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the
+ * remaining bytes.
+ */
+ utfx.decodeUTF8 = function(src, dst) {
+ var a, b, c, d, fail = function(b) {
+ b = b.slice(0, b.indexOf(null));
+ var err = Error(b.toString());
+ err.name = "TruncatedError";
+ err['bytes'] = b;
+ throw err;
+ };
+ while ((a = src()) !== null) {
+ if ((a&0x80) === 0)
+ dst(a);
+ else if ((a&0xE0) === 0xC0)
+ ((b = src()) === null) && fail([a, b]),
+ dst(((a&0x1F)<<6) | (b&0x3F));
+ else if ((a&0xF0) === 0xE0)
+ ((b=src()) === null || (c=src()) === null) && fail([a, b, c]),
+ dst(((a&0x0F)<<12) | ((b&0x3F)<<6) | (c&0x3F));
+ else if ((a&0xF8) === 0xF0)
+ ((b=src()) === null || (c=src()) === null || (d=src()) === null) && fail([a, b, c ,d]),
+ dst(((a&0x07)<<18) | ((b&0x3F)<<12) | ((c&0x3F)<<6) | (d&0x3F));
+ else throw RangeError("Illegal starting byte: "+a);
+ }
+ };
+
+ /**
+ * Converts UTF16 characters to UTF8 code points.
+ * @param {!function():number|null} src Characters source as a function returning the next char code respectively
+ * `null` if there are no more characters left.
+ * @param {!function(number)} dst Code points destination as a function successively called with each converted code
+ * point.
+ */
+ utfx.UTF16toUTF8 = function(src, dst) {
+ var c1, c2 = null;
+ while (true) {
+ if ((c1 = c2 !== null ? c2 : src()) === null)
+ break;
+ if (c1 >= 0xD800 && c1 <= 0xDFFF) {
+ if ((c2 = src()) !== null) {
+ if (c2 >= 0xDC00 && c2 <= 0xDFFF) {
+ dst((c1-0xD800)*0x400+c2-0xDC00+0x10000);
+ c2 = null; continue;
+ }
+ }
+ }
+ dst(c1);
+ }
+ if (c2 !== null) dst(c2);
+ };
+
+ /**
+ * Converts UTF8 code points to UTF16 characters.
+ * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point
+ * respectively `null` if there are no more code points left or a single numeric code point.
+ * @param {!function(number)} dst Characters destination as a function successively called with each converted char code.
+ * @throws {RangeError} If a code point is out of range
+ */
+ utfx.UTF8toUTF16 = function(src, dst) {
+ var cp = null;
+ if (typeof src === 'number')
+ cp = src, src = function() { return null; };
+ while (cp !== null || (cp = src()) !== null) {
+ if (cp <= 0xFFFF)
+ dst(cp);
+ else
+ cp -= 0x10000,
+ dst((cp>>10)+0xD800),
+ dst((cp%0x400)+0xDC00);
+ cp = null;
+ }
+ };
+
+ /**
+ * Converts and encodes UTF16 characters to UTF8 bytes.
+ * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null`
+ * if there are no more characters left.
+ * @param {!function(number)} dst Bytes destination as a function successively called with the next byte.
+ */
+ utfx.encodeUTF16toUTF8 = function(src, dst) {
+ utfx.UTF16toUTF8(src, function(cp) {
+ utfx.encodeUTF8(cp, dst);
+ });
+ };
+
+ /**
+ * Decodes and converts UTF8 bytes to UTF16 characters.
+ * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there
+ * are no more bytes left.
+ * @param {!function(number)} dst Characters destination as a function successively called with each converted char code.
+ * @throws {RangeError} If a starting byte is invalid in UTF8
+ * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes.
+ */
+ utfx.decodeUTF8toUTF16 = function(src, dst) {
+ utfx.decodeUTF8(src, function(cp) {
+ utfx.UTF8toUTF16(cp, dst);
+ });
+ };
+
+ /**
+ * Calculates the byte length of an UTF8 code point.
+ * @param {number} cp UTF8 code point
+ * @returns {number} Byte length
+ */
+ utfx.calculateCodePoint = function(cp) {
+ return (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;
+ };
+
+ /**
+ * Calculates the number of UTF8 bytes required to store UTF8 code points.
+ * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively
+ * `null` if there are no more code points left.
+ * @returns {number} The number of UTF8 bytes required
+ */
+ utfx.calculateUTF8 = function(src) {
+ var cp, l=0;
+ while ((cp = src()) !== null)
+ l += utfx.calculateCodePoint(cp);
+ return l;
+ };
+
+ /**
+ * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes.
+ * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively
+ * `null` if there are no more characters left.
+ * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1.
+ */
+ utfx.calculateUTF16asUTF8 = function(src) {
+ var n=0, l=0;
+ utfx.UTF16toUTF8(src, function(cp) {
+ ++n; l += utfx.calculateCodePoint(cp);
+ });
+ return [n,l];
+ };
+
+ return utfx;
+ }();
+
+ Date.now = Date.now || function() { return +new Date; };
+
+ /**
+ * @type {number}
+ * @const
+ * @inner
+ */
+ var BCRYPT_SALT_LEN = 16;
+
+ /**
+ * @type {number}
+ * @const
+ * @inner
+ */
+ var GENSALT_DEFAULT_LOG2_ROUNDS = 10;
+
+ /**
+ * @type {number}
+ * @const
+ * @inner
+ */
+ var BLOWFISH_NUM_ROUNDS = 16;
+
+ /**
+ * @type {number}
+ * @const
+ * @inner
+ */
+ var MAX_EXECUTION_TIME = 100;
+
+ /**
+ * @type {Array.}
+ * @const
+ * @inner
+ */
+ var P_ORIG = [
+ 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822,
+ 0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377,
+ 0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5,
+ 0xb5470917, 0x9216d5d9, 0x8979fb1b
+ ];
+
+ /**
+ * @type {Array.}
+ * @const
+ * @inner
+ */
+ var S_ORIG = [
+ 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed,
+ 0x6a267e96, 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7,
+ 0x0801f2e2, 0x858efc16, 0x636920d8, 0x71574e69, 0xa458fea3,
+ 0xf4933d7e, 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,
+ 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, 0xc5d1b023,
+ 0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e,
+ 0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda,
+ 0x55605c60, 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
+ 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, 0xa15486af,
+ 0x7c72e993, 0xb3ee1411, 0x636fbc2a, 0x2ba9c55d, 0x741831f6,
+ 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c, 0x7a325381,
+ 0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
+ 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, 0xef845d5d,
+ 0xe98575b1, 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5,
+ 0x0f6d6ff3, 0x83f44239, 0x2e0b4482, 0xa4842004, 0x69c8f04a,
+ 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
+ 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, 0x6eef0b6c,
+ 0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176,
+ 0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3,
+ 0x3b8b5ebe, 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,
+ 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, 0x37d0d724,
+ 0xd00a1248, 0xdb0fead3, 0x49f1c09b, 0x075372c9, 0x80991b7b,
+ 0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b, 0x976ce0bd,
+ 0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
+ 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f,
+ 0x9b30952c, 0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd,
+ 0x660f2807, 0x192e4bb3, 0xc0cba857, 0x45c8740f, 0xd20b5f39,
+ 0xb9d3fbdb, 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279,
+ 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, 0x3c7516df,
+ 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760,
+ 0x53317b48, 0x3e00df82, 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e,
+ 0xdf1769db, 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573,
+ 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, 0x10fa3d98,
+ 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, 0x9a53e479, 0xb6f84565,
+ 0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341,
+ 0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
+ 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0,
+ 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64,
+ 0x8888b812, 0x900df01c, 0x4fad5ea0, 0x688fc31c, 0xd1cff191,
+ 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1,
+ 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, 0xb4a84fe0,
+ 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, 0x165fa266, 0x80957705,
+ 0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5,
+ 0xfb9d35cf, 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49,
+ 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, 0x2464369b,
+ 0xf009b91e, 0x5563911d, 0x59dfa6aa, 0x78c14389, 0xd95a537f,
+ 0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9, 0x11c81968,
+ 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
+ 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5,
+ 0x571be91f, 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6,
+ 0xff34052e, 0xc5855664, 0x53b02d5d, 0xa99f8fa1, 0x08ba4799,
+ 0x6e85076a, 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623,
+ 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, 0xecaa8c71,
+ 0x699a17ff, 0x5664526c, 0xc2b19ee1, 0x193602a5, 0x75094c29,
+ 0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 0x6b8fe4d6,
+ 0x99f73fd6, 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
+ 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, 0x09686b3f,
+ 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, 0x687f3584, 0x52a0e286,
+ 0xb79c5305, 0xaa500737, 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec,
+ 0x5716f2b8, 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,
+ 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, 0xd19113f9,
+ 0x7ca92ff6, 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc,
+ 0xc8b57634, 0x9af3dda7, 0xa9446146, 0x0fd0030e, 0xecc8c73e,
+ 0xa4751e41, 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331,
+ 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, 0x2cb81290,
+ 0x24977c79, 0x5679b072, 0xbcaf89af, 0xde9a771f, 0xd9930810,
+ 0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124, 0x501adde6,
+ 0x9f84cd87, 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,
+ 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, 0xef1c1847,
+ 0x3215d908, 0xdd433b37, 0x24c2ba16, 0x12a14d43, 0x2a65c451,
+ 0x50940002, 0x133ae4dd, 0x71dff89e, 0x10314e55, 0x81ac77d6,
+ 0x5f11199b, 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
+ 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 0x86e34570,
+ 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c, 0x4e3d06fa,
+ 0x2965dcb9, 0x99e71d0f, 0x803e89d6, 0x5266c825, 0x2e4cc978,
+ 0x9c10b36a, 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4,
+ 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, 0x5223a708,
+ 0xf71312b6, 0xebadfe6e, 0xeac31f66, 0xe3bc4595, 0xa67bc883,
+ 0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5, 0x65582185,
+ 0x68ab9802, 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
+ 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, 0x13cca830,
+ 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, 0xb5735c90, 0x4c70a239,
+ 0xd59e9e0b, 0xcbaade14, 0xeecc86bc, 0x60622ca7, 0x9cab5cab,
+ 0xb2f3846e, 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,
+ 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, 0x9b540b19,
+ 0x875fa099, 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77,
+ 0x11ed935f, 0x16681281, 0x0e358829, 0xc7e61fd6, 0x96dedfa1,
+ 0x7858ba99, 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696,
+ 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, 0x58ebf2ef,
+ 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, 0x5d4a14d9, 0xe864b7e3,
+ 0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15,
+ 0xfacb4fd0, 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,
+ 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, 0xcf62a1f2,
+ 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, 0x7f1524c3, 0x69cb7492,
+ 0x47848a0b, 0x5692b285, 0x095bbf00, 0xad19489d, 0x1462b174,
+ 0x23820e00, 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,
+ 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 0x7cde3759,
+ 0xcbee7460, 0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e,
+ 0xe8efd855, 0x61d99735, 0xa969a7aa, 0xc50c06c2, 0x5a04abfc,
+ 0x800bcadc, 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9,
+ 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, 0xc5c43465,
+ 0x713e38d8, 0x3d28f89e, 0xf16dff20, 0x153e21e7, 0x8fb03d4a,
+ 0xe6e39f2b, 0xdb83adf7, 0xe93d5a68, 0x948140f7, 0xf64c261c,
+ 0x94692934, 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068,
+ 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, 0x1e39f62e,
+ 0x97244546, 0x14214f74, 0xbf8b8840, 0x4d95fc1d, 0x96b591af,
+ 0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0,
+ 0x31cb8504, 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,
+ 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, 0x68dc1462,
+ 0xd7486900, 0x680ec0a4, 0x27a18dee, 0x4f3ffea2, 0xe887ad8c,
+ 0xb58ce006, 0x7af4d6b6, 0xaace1e7c, 0xd3375fec, 0xce78a399,
+ 0x406b2a42, 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
+ 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, 0x3a6efa74,
+ 0xdd5b4332, 0x6841e7f7, 0xca7820fb, 0xfb0af54e, 0xd8feb397,
+ 0x454056ac, 0xba489527, 0x55533a3a, 0x20838d87, 0xfe6ba9b7,
+ 0xd096954b, 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33,
+ 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, 0xfdf8e802,
+ 0x04272f70, 0x80bb155c, 0x05282ce3, 0x95c11548, 0xe4c66d22,
+ 0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f, 0x404779a4,
+ 0x5d886e17, 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,
+ 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2,
+ 0x02e1329e, 0xaf664fd1, 0xcad18115, 0x6b2395e0, 0x333e92e1,
+ 0x3b240b62, 0xeebeb922, 0x85b2a20e, 0xe6ba0d99, 0xde720c8c,
+ 0x2da2f728, 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,
+ 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, 0x0a476341,
+ 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8,
+ 0x991be14c, 0xdb6e6b0d, 0xc67b5510, 0x6d672c37, 0x2765d43b,
+ 0xdcd0e804, 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b,
+ 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, 0xbb132f88,
+ 0x515bad24, 0x7b9479bf, 0x763bd6eb, 0x37392eb3, 0xcc115979,
+ 0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b, 0x12754ccc,
+ 0x782ef11c, 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,
+ 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, 0x44421659,
+ 0x0a121386, 0xd90cec6e, 0xd5abea2a, 0x64af674e, 0xda86a85f,
+ 0xbebfe988, 0x64e4c3fe, 0x9dbc8057, 0xf0f7c086, 0x60787bf8,
+ 0x6003604d, 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
+ 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, 0x77a057be,
+ 0xbde8ae24, 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2,
+ 0xf474ef38, 0x8789bdc2, 0x5366f9c3, 0xc8b38e74, 0xb475f255,
+ 0x46fcd9b9, 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2,
+ 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, 0xb90bace1,
+ 0xbb8205d0, 0x11a86248, 0x7574a99e, 0xb77f19b6, 0xe0a9dc09,
+ 0x662d09a1, 0xc4324633, 0xe85a1f02, 0x09f0be8c, 0x4a99a025,
+ 0x1d6efe10, 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
+ 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01,
+ 0xa70683fa, 0xa002b5c4, 0x0de6d027, 0x9af88c27, 0x773f8641,
+ 0xc3604c06, 0x61a806b5, 0xf0177a28, 0xc0f586e0, 0x006058aa,
+ 0x30dc7d62, 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,
+ 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, 0x6f05e409,
+ 0x4b7c0188, 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9,
+ 0x1ac15bb4, 0xd39eb8fc, 0xed545578, 0x08fca5b5, 0xd83d7cd3,
+ 0x4dad0fc4, 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c,
+ 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, 0xd79a3234,
+ 0x92638212, 0x670efa8e, 0x406000e0, 0x3a39ce37, 0xd3faf5cf,
+ 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742, 0xd3822740,
+ 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,
+ 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f,
+ 0xbc946e79, 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d,
+ 0xd5730a1d, 0x4cd04dc6, 0x2939bbdb, 0xa9ba4650, 0xac9526e8,
+ 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22,
+ 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, 0x83c061ba,
+ 0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1,
+ 0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69,
+ 0x77fa0a59, 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593,
+ 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a,
+ 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, 0x1f9f25cf, 0xadf2b89b,
+ 0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6, 0x47b0acfd,
+ 0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
+ 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4,
+ 0x88f46dba, 0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2,
+ 0x97271aec, 0xa93a072a, 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb,
+ 0x26dcf319, 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb,
+ 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, 0x4de81751,
+ 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce,
+ 0x5121ce64, 0x774fbe32, 0xa8b6e37e, 0xc3293d46, 0x48de5369,
+ 0x6413e680, 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166,
+ 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, 0x5bbef7dd,
+ 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, 0xdda26a7e, 0x3a59ff45,
+ 0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb, 0x8d6612ae,
+ 0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
+ 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08,
+ 0x4eb4e2cc, 0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d,
+ 0x06b89fb4, 0xce6ea048, 0x6f3f3b82, 0x3520ab82, 0x011a1d4b,
+ 0x277227f8, 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd,
+ 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, 0xe01cc87e,
+ 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, 0x1a908749, 0xd44fbd9a,
+ 0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c,
+ 0xe0b12b4f, 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c,
+ 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, 0xfae59361,
+ 0xceb69ceb, 0xc2a86459, 0x12baa8d1, 0xb6c1075e, 0xe3056a0c,
+ 0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be,
+ 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
+ 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d,
+ 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891,
+ 0xce6279cf, 0xcd3e7e6f, 0x1618b166, 0xfd2c1d05, 0x848fd2c5,
+ 0xf6fb2299, 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02,
+ 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, 0xde966292,
+ 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a,
+ 0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2,
+ 0x35bdd2f6, 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b,
+ 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, 0xba38209c,
+ 0xf746ce76, 0x77afa1c5, 0x20756060, 0x85cbfe4e, 0x8ae88dd8,
+ 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c, 0x01c36ae4,
+ 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
+ 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6
+ ];
+
+ /**
+ * @type {Array.}
+ * @const
+ * @inner
+ */
+ var C_ORIG = [
+ 0x4f727068, 0x65616e42, 0x65686f6c, 0x64657253, 0x63727944,
+ 0x6f756274
+ ];
+
+ /**
+ * @param {Array.} lr
+ * @param {number} off
+ * @param {Array.} P
+ * @param {Array.} S
+ * @returns {Array.}
+ * @inner
+ */
+ function _encipher(lr, off, P, S) { // This is our bottleneck: 1714/1905 ticks / 90% - see profile.txt
+ var n,
+ l = lr[off],
+ r = lr[off + 1];
+
+ l ^= P[0];
+
+ /*
+ for (var i=0, k=BLOWFISH_NUM_ROUNDS-2; i<=k;)
+ // Feistel substitution on left word
+ n = S[l >>> 24],
+ n += S[0x100 | ((l >> 16) & 0xff)],
+ n ^= S[0x200 | ((l >> 8) & 0xff)],
+ n += S[0x300 | (l & 0xff)],
+ r ^= n ^ P[++i],
+ // Feistel substitution on right word
+ n = S[r >>> 24],
+ n += S[0x100 | ((r >> 16) & 0xff)],
+ n ^= S[0x200 | ((r >> 8) & 0xff)],
+ n += S[0x300 | (r & 0xff)],
+ l ^= n ^ P[++i];
+ */
+
+ //The following is an unrolled version of the above loop.
+ //Iteration 0
+ n = S[l >>> 24];
+ n += S[0x100 | ((l >> 16) & 0xff)];
+ n ^= S[0x200 | ((l >> 8) & 0xff)];
+ n += S[0x300 | (l & 0xff)];
+ r ^= n ^ P[1];
+ n = S[r >>> 24];
+ n += S[0x100 | ((r >> 16) & 0xff)];
+ n ^= S[0x200 | ((r >> 8) & 0xff)];
+ n += S[0x300 | (r & 0xff)];
+ l ^= n ^ P[2];
+ //Iteration 1
+ n = S[l >>> 24];
+ n += S[0x100 | ((l >> 16) & 0xff)];
+ n ^= S[0x200 | ((l >> 8) & 0xff)];
+ n += S[0x300 | (l & 0xff)];
+ r ^= n ^ P[3];
+ n = S[r >>> 24];
+ n += S[0x100 | ((r >> 16) & 0xff)];
+ n ^= S[0x200 | ((r >> 8) & 0xff)];
+ n += S[0x300 | (r & 0xff)];
+ l ^= n ^ P[4];
+ //Iteration 2
+ n = S[l >>> 24];
+ n += S[0x100 | ((l >> 16) & 0xff)];
+ n ^= S[0x200 | ((l >> 8) & 0xff)];
+ n += S[0x300 | (l & 0xff)];
+ r ^= n ^ P[5];
+ n = S[r >>> 24];
+ n += S[0x100 | ((r >> 16) & 0xff)];
+ n ^= S[0x200 | ((r >> 8) & 0xff)];
+ n += S[0x300 | (r & 0xff)];
+ l ^= n ^ P[6];
+ //Iteration 3
+ n = S[l >>> 24];
+ n += S[0x100 | ((l >> 16) & 0xff)];
+ n ^= S[0x200 | ((l >> 8) & 0xff)];
+ n += S[0x300 | (l & 0xff)];
+ r ^= n ^ P[7];
+ n = S[r >>> 24];
+ n += S[0x100 | ((r >> 16) & 0xff)];
+ n ^= S[0x200 | ((r >> 8) & 0xff)];
+ n += S[0x300 | (r & 0xff)];
+ l ^= n ^ P[8];
+ //Iteration 4
+ n = S[l >>> 24];
+ n += S[0x100 | ((l >> 16) & 0xff)];
+ n ^= S[0x200 | ((l >> 8) & 0xff)];
+ n += S[0x300 | (l & 0xff)];
+ r ^= n ^ P[9];
+ n = S[r >>> 24];
+ n += S[0x100 | ((r >> 16) & 0xff)];
+ n ^= S[0x200 | ((r >> 8) & 0xff)];
+ n += S[0x300 | (r & 0xff)];
+ l ^= n ^ P[10];
+ //Iteration 5
+ n = S[l >>> 24];
+ n += S[0x100 | ((l >> 16) & 0xff)];
+ n ^= S[0x200 | ((l >> 8) & 0xff)];
+ n += S[0x300 | (l & 0xff)];
+ r ^= n ^ P[11];
+ n = S[r >>> 24];
+ n += S[0x100 | ((r >> 16) & 0xff)];
+ n ^= S[0x200 | ((r >> 8) & 0xff)];
+ n += S[0x300 | (r & 0xff)];
+ l ^= n ^ P[12];
+ //Iteration 6
+ n = S[l >>> 24];
+ n += S[0x100 | ((l >> 16) & 0xff)];
+ n ^= S[0x200 | ((l >> 8) & 0xff)];
+ n += S[0x300 | (l & 0xff)];
+ r ^= n ^ P[13];
+ n = S[r >>> 24];
+ n += S[0x100 | ((r >> 16) & 0xff)];
+ n ^= S[0x200 | ((r >> 8) & 0xff)];
+ n += S[0x300 | (r & 0xff)];
+ l ^= n ^ P[14];
+ //Iteration 7
+ n = S[l >>> 24];
+ n += S[0x100 | ((l >> 16) & 0xff)];
+ n ^= S[0x200 | ((l >> 8) & 0xff)];
+ n += S[0x300 | (l & 0xff)];
+ r ^= n ^ P[15];
+ n = S[r >>> 24];
+ n += S[0x100 | ((r >> 16) & 0xff)];
+ n ^= S[0x200 | ((r >> 8) & 0xff)];
+ n += S[0x300 | (r & 0xff)];
+ l ^= n ^ P[16];
+
+ lr[off] = r ^ P[BLOWFISH_NUM_ROUNDS + 1];
+ lr[off + 1] = l;
+ return lr;
+ }
+
+ /**
+ * @param {Array.} data
+ * @param {number} offp
+ * @returns {{key: number, offp: number}}
+ * @inner
+ */
+ function _streamtoword(data, offp) {
+ for (var i = 0, word = 0; i < 4; ++i)
+ word = (word << 8) | (data[offp] & 0xff),
+ offp = (offp + 1) % data.length;
+ return { key: word, offp: offp };
+ }
+
+ /**
+ * @param {Array.} key
+ * @param {Array.} P
+ * @param {Array.} S
+ * @inner
+ */
+ function _key(key, P, S) {
+ var offset = 0,
+ lr = [0, 0],
+ plen = P.length,
+ slen = S.length,
+ sw;
+ for (var i = 0; i < plen; i++)
+ sw = _streamtoword(key, offset),
+ offset = sw.offp,
+ P[i] = P[i] ^ sw.key;
+ for (i = 0; i < plen; i += 2)
+ lr = _encipher(lr, 0, P, S),
+ P[i] = lr[0],
+ P[i + 1] = lr[1];
+ for (i = 0; i < slen; i += 2)
+ lr = _encipher(lr, 0, P, S),
+ S[i] = lr[0],
+ S[i + 1] = lr[1];
+ }
+
+ /**
+ * Expensive key schedule Blowfish.
+ * @param {Array.} data
+ * @param {Array.} key
+ * @param {Array.} P
+ * @param {Array.} S
+ * @inner
+ */
+ function _ekskey(data, key, P, S) {
+ var offp = 0,
+ lr = [0, 0],
+ plen = P.length,
+ slen = S.length,
+ sw;
+ for (var i = 0; i < plen; i++)
+ sw = _streamtoword(key, offp),
+ offp = sw.offp,
+ P[i] = P[i] ^ sw.key;
+ offp = 0;
+ for (i = 0; i < plen; i += 2)
+ sw = _streamtoword(data, offp),
+ offp = sw.offp,
+ lr[0] ^= sw.key,
+ sw = _streamtoword(data, offp),
+ offp = sw.offp,
+ lr[1] ^= sw.key,
+ lr = _encipher(lr, 0, P, S),
+ P[i] = lr[0],
+ P[i + 1] = lr[1];
+ for (i = 0; i < slen; i += 2)
+ sw = _streamtoword(data, offp),
+ offp = sw.offp,
+ lr[0] ^= sw.key,
+ sw = _streamtoword(data, offp),
+ offp = sw.offp,
+ lr[1] ^= sw.key,
+ lr = _encipher(lr, 0, P, S),
+ S[i] = lr[0],
+ S[i + 1] = lr[1];
+ }
+
+ /**
+ * Internaly crypts a string.
+ * @param {Array.} b Bytes to crypt
+ * @param {Array.} salt Salt bytes to use
+ * @param {number} rounds Number of rounds
+ * @param {function(Error, Array.=)=} callback Callback receiving the error, if any, and the resulting bytes. If
+ * omitted, the operation will be performed synchronously.
+ * @param {function(number)=} progressCallback Callback called with the current progress
+ * @returns {!Array.|undefined} Resulting bytes if callback has been omitted, otherwise `undefined`
+ * @inner
+ */
+ function _crypt(b, salt, rounds, callback, progressCallback) {
+ var cdata = C_ORIG.slice(),
+ clen = cdata.length,
+ err;
+
+ // Validate
+ if (rounds < 4 || rounds > 31) {
+ err = Error("Illegal number of rounds (4-31): "+rounds);
+ if (callback) {
+ nextTick(callback.bind(this, err));
+ return;
+ } else
+ throw err;
+ }
+ if (salt.length !== BCRYPT_SALT_LEN) {
+ err =Error("Illegal salt length: "+salt.length+" != "+BCRYPT_SALT_LEN);
+ if (callback) {
+ nextTick(callback.bind(this, err));
+ return;
+ } else
+ throw err;
+ }
+ rounds = (1 << rounds) >>> 0;
+
+ var P, S, i = 0, j;
+
+ //Use typed arrays when available - huge speedup!
+ if (Int32Array) {
+ P = new Int32Array(P_ORIG);
+ S = new Int32Array(S_ORIG);
+ } else {
+ P = P_ORIG.slice();
+ S = S_ORIG.slice();
+ }
+
+ _ekskey(salt, b, P, S);
+
+ /**
+ * Calcualtes the next round.
+ * @returns {Array.|undefined} Resulting array if callback has been omitted, otherwise `undefined`
+ * @inner
+ */
+ function next() {
+ if (progressCallback)
+ progressCallback(i / rounds);
+ if (i < rounds) {
+ var start = Date.now();
+ for (; i < rounds;) {
+ i = i + 1;
+ _key(b, P, S);
+ _key(salt, P, S);
+ if (Date.now() - start > MAX_EXECUTION_TIME)
+ break;
+ }
+ } else {
+ for (i = 0; i < 64; i++)
+ for (j = 0; j < (clen >> 1); j++)
+ _encipher(cdata, j << 1, P, S);
+ var ret = [];
+ for (i = 0; i < clen; i++)
+ ret.push(((cdata[i] >> 24) & 0xff) >>> 0),
+ ret.push(((cdata[i] >> 16) & 0xff) >>> 0),
+ ret.push(((cdata[i] >> 8) & 0xff) >>> 0),
+ ret.push((cdata[i] & 0xff) >>> 0);
+ if (callback) {
+ callback(null, ret);
+ return;
+ } else
+ return ret;
+ }
+ if (callback)
+ nextTick(next);
+ }
+
+ // Async
+ if (typeof callback !== 'undefined') {
+ next();
+
+ // Sync
+ } else {
+ var res;
+ while (true)
+ if (typeof(res = next()) !== 'undefined')
+ return res || [];
+ }
+ }
+
+ /**
+ * Internally hashes a string.
+ * @param {string} s String to hash
+ * @param {?string} salt Salt to use, actually never null
+ * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash. If omitted,
+ * hashing is perormed synchronously.
+ * @param {function(number)=} progressCallback Callback called with the current progress
+ * @returns {string|undefined} Resulting hash if callback has been omitted, otherwise `undefined`
+ * @inner
+ */
+ function _hash(s, salt, callback, progressCallback) {
+ var err;
+ if (typeof s !== 'string' || typeof salt !== 'string') {
+ err = Error("Invalid string / salt: Not a string");
+ if (callback) {
+ nextTick(callback.bind(this, err));
+ return;
+ }
+ else
+ throw err;
+ }
+
+ // Validate the salt
+ var minor, offset;
+ if (salt.charAt(0) !== '$' || salt.charAt(1) !== '2') {
+ err = Error("Invalid salt version: "+salt.substring(0,2));
+ if (callback) {
+ nextTick(callback.bind(this, err));
+ return;
+ }
+ else
+ throw err;
+ }
+ if (salt.charAt(2) === '$')
+ minor = String.fromCharCode(0),
+ offset = 3;
+ else {
+ minor = salt.charAt(2);
+ if ((minor !== 'a' && minor !== 'b' && minor !== 'y') || salt.charAt(3) !== '$') {
+ err = Error("Invalid salt revision: "+salt.substring(2,4));
+ if (callback) {
+ nextTick(callback.bind(this, err));
+ return;
+ } else
+ throw err;
+ }
+ offset = 4;
+ }
+
+ // Extract number of rounds
+ if (salt.charAt(offset + 2) > '$') {
+ err = Error("Missing salt rounds");
+ if (callback) {
+ nextTick(callback.bind(this, err));
+ return;
+ } else
+ throw err;
+ }
+ var r1 = parseInt(salt.substring(offset, offset + 1), 10) * 10,
+ r2 = parseInt(salt.substring(offset + 1, offset + 2), 10),
+ rounds = r1 + r2,
+ real_salt = salt.substring(offset + 3, offset + 25);
+ s += minor >= 'a' ? "\x00" : "";
+
+ var passwordb = stringToBytes(s),
+ saltb = base64_decode(real_salt, BCRYPT_SALT_LEN);
+
+ /**
+ * Finishes hashing.
+ * @param {Array.} bytes Byte array
+ * @returns {string}
+ * @inner
+ */
+ function finish(bytes) {
+ var res = [];
+ res.push("$2");
+ if (minor >= 'a')
+ res.push(minor);
+ res.push("$");
+ if (rounds < 10)
+ res.push("0");
+ res.push(rounds.toString());
+ res.push("$");
+ res.push(base64_encode(saltb, saltb.length));
+ res.push(base64_encode(bytes, C_ORIG.length * 4 - 1));
+ return res.join('');
+ }
+
+ // Sync
+ if (typeof callback == 'undefined')
+ return finish(_crypt(passwordb, saltb, rounds));
+
+ // Async
+ else {
+ _crypt(passwordb, saltb, rounds, function(err, bytes) {
+ if (err)
+ callback(err, null);
+ else
+ callback(null, finish(bytes));
+ }, progressCallback);
+ }
+ }
+
+ /**
+ * Encodes a byte array to base64 with up to len bytes of input, using the custom bcrypt alphabet.
+ * @function
+ * @param {!Array.} b Byte array
+ * @param {number} len Maximum input length
+ * @returns {string}
+ * @expose
+ */
+ bcrypt.encodeBase64 = base64_encode;
+
+ /**
+ * Decodes a base64 encoded string to up to len bytes of output, using the custom bcrypt alphabet.
+ * @function
+ * @param {string} s String to decode
+ * @param {number} len Maximum output length
+ * @returns {!Array.}
+ * @expose
+ */
+ bcrypt.decodeBase64 = base64_decode;
+
+ return bcrypt;
+ }));
+ });
+
+ // this is the combinator function
+ const $$ = (...funcs) => arg => lodash_1(funcs)(arg);
+
+ // this is the pipe function
+ const $ = (arg, funcs) => $$(...funcs)(arg);
+
+ const keySep = "/";
+ const trimKeySep = str => lodash_10(str, keySep);
+ const splitByKeySep = str => fp_3(keySep)(str);
+ const safeKey = key =>
+ lodash_12(`${keySep}${trimKeySep(key)}`, `${keySep}${keySep}`, keySep);
+ const joinKey = (...strs) => {
+ const paramsOrArray = (strs.length === 1) & fp_11(strs[0]) ? strs[0] : strs;
+ return $(paramsOrArray, [
+ fp_13(s => !fp_2(s) && !fp_29(s) && s.toString().length > 0),
+ fp_18(keySep),
+ safeKey,
+ ])
+ };
+ const splitKey = $$(trimKeySep, splitByKeySep);
+
+ const configFolder = `${keySep}.config`;
+ const fieldDefinitions = joinKey(configFolder, "fields.json");
+ const templateDefinitions = joinKey(configFolder, "templates.json");
+ const appDefinitionFile = joinKey(configFolder, "appDefinition.json");
+
+ const not = func => val => !func(val);
+ const isDefined = not(fp_2);
+ const isNonNull = not(fp_29);
+ const isNotNaN = not(fp_36);
+
+ const allTrue = (...funcArgs) => val =>
+ fp_7(
+ (result, conditionFunc) =>
+ (fp_29(result) || result == true) && conditionFunc(val),
+ null
+ )(funcArgs);
+
+ const isSomething = allTrue(isDefined, isNonNull, isNotNaN);
+ const isNothing = not(isSomething);
+
+ const none = predicate => collection => !fp_10(predicate)(collection);
+
+ const all = predicate => collection =>
+ none(v => !predicate(v))(collection);
+
+ const isNotEmpty = ob => !fp_16(ob);
+ const isNonEmptyString = allTrue(fp_27, isNotEmpty);
+ const tryOr = failFunc => (func, ...args) => {
+ try {
+ return func.apply(null, ...args)
+ } catch (_) {
+ return failFunc()
+ }
+ };
+ const causesException = func => {
+ try {
+ func();
+ return false
+ } catch (e) {
+ return true
+ }
+ };
+
+ const executesWithoutException = func => !causesException(func);
+
+ const handleErrorWith = returnValInError =>
+ tryOr(fp_21(returnValInError));
+
+ const handleErrorWithUndefined = handleErrorWith(undefined);
+
+ const switchCase = (...cases) => value => {
+ const nextCase = () => lodash_2(cases)[0](value);
+ const nextResult = () => lodash_2(cases)[1](value);
+
+ if (fp_16(cases)) return // undefined
+ if (nextCase() === true) return nextResult()
+ return switchCase(...lodash_5(cases))(value)
+ };
+ const isOneOf = (...vals) => val => fp_19(val)(vals);
+ const defaultCase = fp_21(true);
+
+ const isSafeInteger = n =>
+ fp_37(n) &&
+ n <= Number.MAX_SAFE_INTEGER &&
+ n >= 0 - Number.MAX_SAFE_INTEGER;
+
+ const toDateOrNull = s =>
+ fp_29(s) ? null : fp_32(s) ? s : new Date(s);
+ const toBoolOrNull = s => (fp_29(s) ? null : s === "true" || s === true);
+ const toNumberOrNull = s => (fp_29(s) ? null : fp_38(s));
+
+ const isArrayOfString = opts => fp_11(opts) && all(fp_27)(opts);
+
+ const makerule = (field, error, isValid) => ({ field, error, isValid });
+
+ var filters = new Map();
+ var limiters = new Map();
+
+ function compileRawExpression(src) {
+ return new Function('context', 'tempVars', // eslint-disable-line
+ ("const sandbox = $nxCompileToSandbox(context, tempVars)\n try { with (sandbox) { return " + src + " } } catch (err) {\n if (!(err instanceof TypeError)) throw err\n }\n $nxClearSandbox()"));
}
- app.calls.stack.push({
- namespace: eventNamespace,
- callId,
- })
- }
-
- const popCallStack = app => {
- app.calls.stack.pop()
- if (app.calls.stack.length === 0) {
- delete app.calls
+ function compileRawCode(src) {
+ return new Function('context', 'tempVars', // eslint-disable-line
+ ("const sandbox = $nxCompileToSandbox(context, tempVars)\n with (sandbox) { " + src + " }\n $nxClearSandbox()"));
}
- }
- const publishError = async (
- app,
- eventContext,
- eventNamespace,
- elapsed,
- err
- ) => {
- const ctx = fp_9(eventContext)
- ctx.error = err
- ctx.elapsed = elapsed()
- await app.publish(eventNamespace.onError, ctx)
- popCallStack(app)
- }
+ var filterRegex = /(?:[^\|]|\|\|)+/g;
+ var limiterRegex = /(?:[^&]|&&)+/g;
+ var argsRegex = /\S+/g;
- const publishComplete = async (
- app,
- eventContext,
- eventNamespace,
- elapsed,
- result
- ) => {
- const endcontext = fp_9(eventContext)
- endcontext.result = result
- endcontext.elapsed = elapsed()
- await app.publish(eventNamespace.onComplete, endcontext)
- popCallStack(app)
- return result
- }
-
- // this is the combinator function
- const $$ = (...funcs) => arg => lodash_1(funcs)(arg)
-
- // this is the pipe function
- const $ = (arg, funcs) => $$(...funcs)(arg)
-
- const keySep = "/"
- const trimKeySep = str => lodash_10(str, keySep)
- const splitByKeySep = str => fp_3(keySep)(str)
- const safeKey = key =>
- lodash_12(`${keySep}${trimKeySep(key)}`, `${keySep}${keySep}`, keySep)
- const joinKey = (...strs) => {
- const paramsOrArray = (strs.length === 1) & fp_11(strs[0]) ? strs[0] : strs
- return $(paramsOrArray, [
- fp_13(s => !fp_2(s) && !fp_29(s) && s.toString().length > 0),
- fp_18(keySep),
- safeKey,
- ])
- }
- const splitKey = $$(trimKeySep, splitByKeySep)
-
- const configFolder = `${keySep}.config`
- const fieldDefinitions = joinKey(configFolder, "fields.json")
- const templateDefinitions = joinKey(configFolder, "templates.json")
- const appDefinitionFile = joinKey(configFolder, "appDefinition.json")
-
- const not = func => val => !func(val)
- const isDefined = not(fp_2)
- const isNonNull = not(fp_29)
- const isNotNaN = not(fp_36)
-
- const allTrue = (...funcArgs) => val =>
- fp_7(
- (result, conditionFunc) =>
- (fp_29(result) || result == true) && conditionFunc(val),
- null
- )(funcArgs)
-
- const isSomething = allTrue(isDefined, isNonNull, isNotNaN)
- const isNothing = not(isSomething)
-
- const none = predicate => collection => !fp_10(predicate)(collection)
-
- const all = predicate => collection => none(v => !predicate(v))(collection)
-
- const isNotEmpty = ob => !fp_16(ob)
- const isNonEmptyString = allTrue(fp_27, isNotEmpty)
- const tryOr = failFunc => (func, ...args) => {
- try {
- return func.apply(null, ...args)
- } catch (_) {
- return failFunc()
- }
- }
- const causesException = func => {
- try {
- func()
- return false
- } catch (e) {
- return true
- }
- }
-
- const executesWithoutException = func => !causesException(func)
-
- const handleErrorWith = returnValInError => tryOr(fp_21(returnValInError))
-
- const handleErrorWithUndefined = handleErrorWith(undefined)
-
- const switchCase = (...cases) => value => {
- const nextCase = () => lodash_2(cases)[0](value)
- const nextResult = () => lodash_2(cases)[1](value)
-
- if (fp_16(cases)) return // undefined
- if (nextCase() === true) return nextResult()
- return switchCase(...lodash_5(cases))(value)
- }
- const isOneOf = (...vals) => val => fp_19(val)(vals)
- const defaultCase = fp_21(true)
-
- const isSafeInteger = n =>
- fp_37(n) && n <= Number.MAX_SAFE_INTEGER && n >= 0 - Number.MAX_SAFE_INTEGER
-
- const toDateOrNull = s => (fp_29(s) ? null : fp_32(s) ? s : new Date(s))
- const toBoolOrNull = s => (fp_29(s) ? null : s === "true" || s === true)
- const toNumberOrNull = s => (fp_29(s) ? null : fp_38(s))
-
- const isArrayOfString = opts => fp_11(opts) && all(fp_27)(opts)
-
- const BB_STATE_BINDINGPATH = "##bbstate"
- const BB_STATE_BINDINGSOURCE = "##bbsource"
- const BB_STATE_FALLBACK = "##bbstatefallback"
-
- const isBound = prop =>
- prop !== undefined && prop[BB_STATE_BINDINGPATH] !== undefined
-
- const takeStateFromStore = prop =>
- prop[BB_STATE_BINDINGSOURCE] === undefined ||
- prop[BB_STATE_BINDINGSOURCE] === "store"
-
- const takeStateFromContext = prop =>
- prop[BB_STATE_BINDINGSOURCE] === "context"
-
- const takeStateFromEventParameters = prop =>
- prop[BB_STATE_BINDINGSOURCE] === "event"
-
- const setState = (store, path, value) => {
- if (!path || path.length === 0) return
-
- const pathParts = path.split(".")
- const safeSetPath = (obj, currentPartIndex = 0) => {
- const currentKey = pathParts[currentPartIndex]
-
- if (pathParts.length - 1 == currentPartIndex) {
- obj[currentKey] = value
- return
+ function parseExpression(src) {
+ var tokens = src.match(filterRegex);
+ if (tokens.length === 1) {
+ return compileRawExpression(tokens[0]);
}
- if (
- obj[currentKey] === null ||
- obj[currentKey] === undefined ||
- !fp_8(obj[currentKey])
- ) {
- obj[currentKey] = {}
+ var expression = {
+ exec: compileRawExpression(tokens[0]),
+ filters: []
+ };
+ for (var i = 1; i < tokens.length; i++) {
+ var filterTokens = tokens[i].match(argsRegex);
+ var filterName = filterTokens.shift();
+ var effect = filters.get(filterName);
+ if (!effect) {
+ throw new Error(("There is no filter named: " + filterName + "."));
+ }
+ expression.filters.push({ effect: effect, argExpressions: filterTokens.map(compileRawExpression) });
+ }
+ return expression;
+ }
+
+ function parseCode(src) {
+ var tokens = src.match(limiterRegex);
+ if (tokens.length === 1) {
+ return compileRawCode(tokens[0]);
}
- safeSetPath(obj[currentKey], currentPartIndex + 1)
+ var code = {
+ exec: compileRawCode(tokens[0]),
+ limiters: []
+ };
+ for (var i = 1; i < tokens.length; i++) {
+ var limiterTokens = tokens[i].match(argsRegex);
+ var limiterName = limiterTokens.shift();
+ var effect = limiters.get(limiterName);
+ if (!effect) {
+ throw new Error(("There is no limiter named: " + limiterName + "."));
+ }
+ code.limiters.push({ effect: effect, argExpressions: limiterTokens.map(compileRawExpression) });
+ }
+ return code;
}
- store.update(s => {
- safeSetPath(s)
- return s
- })
- }
+ var expressionCache = new Map();
+ var codeCache = new Map();
- const setStateFromBinding = (store, binding, value) =>
- setState(store, binding[BB_STATE_BINDINGPATH], value)
-
- const getState = (s, path, fallback) => {
- if (!s) return fallback
- if (!path || path.length === 0) return fallback
-
- if (path === "$") return s
-
- const pathParts = path.split(".")
- const safeGetPath = (obj, currentPartIndex = 0) => {
- const currentKey = pathParts[currentPartIndex]
-
- if (pathParts.length - 1 == currentPartIndex) {
- const value = obj[currentKey]
- if (fp_2(value)) return fallback
- else return value
+ function compileExpression(src) {
+ if (typeof src !== 'string') {
+ throw new TypeError('First argument must be a string.');
+ }
+ var expression = expressionCache.get(src);
+ if (!expression) {
+ expression = parseExpression(src);
+ expressionCache.set(src, expression);
}
- if (
- obj[currentKey] === null ||
- obj[currentKey] === undefined ||
- !fp_8(obj[currentKey])
- ) {
- return fallback
+ if (typeof expression === 'function') {
+ return expression;
}
- return safeGetPath(obj[currentKey], currentPartIndex + 1)
+ return function evaluateExpression(context, tempVars) {
+ var value = expression.exec(context, tempVars);
+ for (var i = 0, list = expression.filters; i < list.length; i += 1) {
+ var filter = list[i];
+
+ var args = filter.argExpressions.map(evaluateArgExpression, context);
+ value = filter.effect.apply(filter, [ value ].concat( args ));
+ }
+ return value;
+ };
}
- return safeGetPath(s)
- }
+ function compileCode(src) {
+ if (typeof src !== 'string') {
+ throw new TypeError('First argument must be a string.');
+ }
+ var code = codeCache.get(src);
+ if (!code) {
+ code = parseCode(src);
+ codeCache.set(src, code);
+ }
- const getStateOrValue = (globalState, prop, currentContext) => {
- if (!prop) return prop
+ if (typeof code === 'function') {
+ return code;
+ }
- if (isBound(prop)) {
- const stateToUse = takeStateFromStore(prop) ? globalState : currentContext
-
- return getState(
- stateToUse,
- prop[BB_STATE_BINDINGPATH],
- prop[BB_STATE_FALLBACK]
- )
+ var context = {};
+ return function evaluateCode(state, tempVars) {
+ var i = 0;
+ function next() {
+ Object.assign(context, tempVars);
+ if (i < code.limiters.length) {
+ var limiter = code.limiters[i++];
+ var args = limiter.argExpressions.map(evaluateArgExpression, state);
+ limiter.effect.apply(limiter, [ next, context ].concat( args ));
+ } else {
+ code.exec(state, tempVars);
+ }
+ }
+ next();
+ };
}
- if (prop.path && prop.source) {
- const stateToUse = prop.source === "store" ? globalState : currentContext
-
- return getState(stateToUse, prop.path, prop.fallback)
+ function evaluateArgExpression(argExpression) {
+ return argExpression(this);
}
- return prop
- }
+ var hasHandler = { has: has };
+ var allHandlers = { has: has, get: get$1 };
+ var globals$1 = new Set();
+ var temp;
- const ERROR = "##error_message"
+ var globalObj;
+ if (typeof window !== 'undefined') { globalObj = window; } // eslint-disable-line
+ else if (typeof global !== 'undefined') { globalObj = global; } // eslint-disable-line
+ else if (typeof self !== 'undefined') { globalObj = self; } // eslint-disable-line
+ globalObj.$nxCompileToSandbox = toSandbox;
+ globalObj.$nxClearSandbox = clearSandbox;
- const trimSlash = str => str.replace(/^\/+|\/+$/g, "")
-
- const loadRecord = api => async ({ recordKey, statePath }) => {
- if (!recordKey) {
- api.error("Load Record: record key not set")
- return
+ function has(target, key) {
+ return globals$1.has(key) ? key in target : true;
}
- if (!statePath) {
- api.error("Load Record: state path not set")
- return
+ function get$1(target, key) {
+ return key in temp ? temp[key] : target[key];
}
- const record = await api.get({
- url: `/api/record/${trimSlash(recordKey)}`,
- })
-
- if (api.isSuccess(record)) api.setState(statePath, record)
- }
-
- const listRecords = api => async ({ indexKey, statePath }) => {
- if (!indexKey) {
- api.error("Load Record: record key not set")
- return
+ function toSandbox(obj, tempVars) {
+ if (tempVars) {
+ temp = tempVars;
+ return new Proxy(obj, allHandlers);
+ }
+ return new Proxy(obj, hasHandler);
}
- if (!statePath) {
- api.error("Load Record: state path not set")
- return
+ function clearSandbox() {
+ temp = undefined;
}
- const records = await api.get({
- url: `/api/listRecords/${trimSlash(indexKey)}`,
- })
+ const compileFilter = index => compileExpression(index.filter);
- if (api.isSuccess(records)) api.setState(statePath, records)
- }
+ const compileMap = index => compileCode(index.map);
- const USER_STATE_PATH = "_bbuser"
+ const indexTypes = { reference: "reference", ancestor: "ancestor" };
- const authenticate = api => async ({ username, password }) => {
- if (!username) {
- api.error("Authenticate: username not set")
- return
- }
+ const indexRuleSet = [
+ makerule("map", "index has no map function", index =>
+ isNonEmptyString(index.map)
+ ),
+ makerule(
+ "map",
+ "index's map function does not compile",
+ index =>
+ !isNonEmptyString(index.map) ||
+ executesWithoutException(() => compileMap(index))
+ ),
+ makerule(
+ "filter",
+ "index's filter function does not compile",
+ index =>
+ !isNonEmptyString(index.filter) ||
+ executesWithoutException(() => compileFilter(index))
+ ),
+ makerule("name", "must declare a name for index", index =>
+ isNonEmptyString(index.name)
+ ),
+ makerule(
+ "name",
+ "there is a duplicate named index on this node",
+ index =>
+ fp_16(index.name) ||
+ fp_17("name")(index.parent().indexes)[index.name] === 1
+ ),
+ makerule(
+ "indexType",
+ "reference index may only exist on a record node",
+ index =>
+ isRecord(index.parent()) || index.indexType !== indexTypes.reference
+ ),
+ makerule(
+ "indexType",
+ `index type must be one of: ${fp_18(", ")(fp_14(indexTypes))}`,
+ index => fp_19(index.indexType)(fp_14(indexTypes))
+ ),
+ ];
- if (!password) {
- api.error("Authenticate: password not set")
- return
- }
+ const getFlattenedHierarchy = (appHierarchy, useCached = true) => {
+ if (isSomething(appHierarchy.getFlattenedHierarchy) && useCached) {
+ return appHierarchy.getFlattenedHierarchy()
+ }
- const user = await api.post({
- url: "/api/authenticate",
- body: { username, password },
- })
+ const flattenHierarchy = (currentNode, flattened) => {
+ flattened.push(currentNode);
+ if (
+ (!currentNode.children || currentNode.children.length === 0) &&
+ (!currentNode.indexes || currentNode.indexes.length === 0) &&
+ (!currentNode.aggregateGroups || currentNode.aggregateGroups.length === 0)
+ ) {
+ return flattened
+ }
- // set user even if error - so it is defined at least
- api.setState(USER_STATE_PATH, user)
- localStorage.setItem("budibase:user", JSON.stringify(user))
- }
+ const unionIfAny = l2 => l1 => fp_6(l1)(!l2 ? [] : l2);
- const saveRecord = api => async ({ statePath }) => {
- if (!statePath) {
- api.error("Load Record: state path not set")
- return
- }
+ const children = $(
+ [],
+ [
+ unionIfAny(currentNode.children),
+ unionIfAny(currentNode.indexes),
+ unionIfAny(currentNode.aggregateGroups),
+ ]
+ );
- const recordtoSave = api.getState(statePath)
+ for (const child of children) {
+ flattenHierarchy(child, flattened);
+ }
+ return flattened
+ };
- if (!recordtoSave) {
- api.error(`there is no record in state: ${statePath}`)
- return
- }
+ appHierarchy.getFlattenedHierarchy = () => flattenHierarchy(appHierarchy, []);
+ return appHierarchy.getFlattenedHierarchy()
+ };
- if (!recordtoSave.key) {
- api.error(
- `item in state does not appear to be a record - it has no key (${statePath})`
- )
- return
- }
+ const getExactNodeForKey = appHierarchy => key =>
+ $(appHierarchy, [
+ getFlattenedHierarchy,
+ fp_1(n => new RegExp(`${n.pathRegx()}$`).test(key)),
+ ]);
- const savedRecord = await api.post({
- url: `/api/record/${trimSlash(recordtoSave.key)}`,
- body: recordtoSave,
- })
+ const getNodeForCollectionPath = appHierarchy => collectionKey =>
+ $(appHierarchy, [
+ getFlattenedHierarchy,
+ fp_1(
+ n =>
+ isCollectionRecord(n) &&
+ new RegExp(`${n.collectionPathRegx()}$`).test(collectionKey)
+ ),
+ ]);
- if (api.isSuccess(savedRecord)) api.setState(statePath, savedRecord)
- }
+ const getNode = (appHierarchy, nodeKey) =>
+ $(appHierarchy, [
+ getFlattenedHierarchy,
+ fp_1(
+ n =>
+ n.nodeKey() === nodeKey ||
+ (isCollectionRecord(n) && n.collectionNodeKey() === nodeKey)
+ ),
+ ]);
- const createApi = ({ rootPath, setState, getState }) => {
- const apiCall = method => ({
- url,
- body,
- notFound,
- badRequest,
- forbidden,
- }) => {
- return fetch(`${rootPath}${url}`, {
- method: method,
- headers: {
- "Content-Type": "application/json",
+ const getNodeByKeyOrNodeKey = (appHierarchy, keyOrNodeKey) => {
+ const nodeByKey = getExactNodeForKey(appHierarchy)(keyOrNodeKey);
+ return isNothing(nodeByKey) ? getNode(appHierarchy, keyOrNodeKey) : nodeByKey
+ };
+
+ const isNode = (appHierarchy, key) =>
+ isSomething(getExactNodeForKey(appHierarchy)(key));
+
+ const isRecord = node => isSomething(node) && node.type === "record";
+ const isSingleRecord = node => isRecord(node) && node.isSingle;
+ const isCollectionRecord = node => isRecord(node) && !node.isSingle;
+ const isRoot = node => isSomething(node) && node.isRoot();
+
+ const getSafeFieldParser = (tryParse, defaultValueFunctions) => (
+ field,
+ record
+ ) => {
+ if (fp_25(field.name)(record)) {
+ return getSafeValueParser(
+ tryParse,
+ defaultValueFunctions
+ )(record[field.name])
+ }
+ return defaultValueFunctions[field.getUndefinedValue]()
+ };
+
+ const getSafeValueParser = (
+ tryParse,
+ defaultValueFunctions
+ ) => value => {
+ const parsed = tryParse(value);
+ if (parsed.success) {
+ return parsed.value
+ }
+ return defaultValueFunctions.default()
+ };
+
+ const getNewValue = (tryParse, defaultValueFunctions) => field => {
+ const getInitialValue =
+ fp_2(field) || fp_2(field.getInitialValue)
+ ? "default"
+ : field.getInitialValue;
+
+ return fp_25(getInitialValue)(defaultValueFunctions)
+ ? defaultValueFunctions[getInitialValue]()
+ : getSafeValueParser(tryParse, defaultValueFunctions)(getInitialValue)
+ };
+
+ const typeFunctions = specificFunctions =>
+ lodash_13(
+ {
+ value: fp_21,
+ null: fp_21(null),
},
- body: body && JSON.stringify(body),
- credentials: "same-origin",
- }).then(r => {
- switch (r.status) {
- case 200:
- return r.json()
- case 404:
- return error(notFound || `${url} Not found`)
- case 400:
- return error(badRequest || `${url} Bad Request`)
- case 403:
- return error(forbidden || `${url} Forbidden`)
- default:
- if (
- r.status.toString().startsWith("2") ||
- r.status.toString().startsWith("3")
- )
- return r.json()
- else return error(`${url} - ${r.statusText}`)
+ specificFunctions
+ );
+
+ const validateTypeConstraints = validationRules => async (
+ field,
+ record,
+ context
+ ) => {
+ const fieldValue = record[field.name];
+ const validateRule = async r =>
+ !(await r.isValid(fieldValue, field.typeOptions, context))
+ ? r.getMessage(fieldValue, field.typeOptions)
+ : "";
+
+ const errors = [];
+ for (const r of validationRules) {
+ const err = await validateRule(r);
+ if (isNotEmpty(err)) errors.push(err);
+ }
+
+ return errors
+ };
+
+ const getDefaultOptions = fp_26(v => v.defaultValue);
+
+ const makerule$1 = (isValid, getMessage) => ({ isValid, getMessage });
+ const parsedFailed = val => ({ success: false, value: val });
+ const parsedSuccess = val => ({ success: true, value: val });
+ const getDefaultExport = (
+ name,
+ tryParse,
+ functions,
+ options,
+ validationRules,
+ sampleValue,
+ stringify
+ ) => ({
+ getNew: getNewValue(tryParse, functions),
+ safeParseField: getSafeFieldParser(tryParse, functions),
+ safeParseValue: getSafeValueParser(tryParse, functions),
+ tryParse,
+ name,
+ getDefaultOptions: () => getDefaultOptions(fp_9(options)),
+ optionDefinitions: options,
+ validateTypeConstraints: validateTypeConstraints(validationRules),
+ sampleValue,
+ stringify: val => (val === null || val === undefined ? "" : stringify(val)),
+ getDefaultValue: functions.default,
+ });
+
+ const stringFunctions = typeFunctions({
+ default: fp_21(null),
+ });
+
+ const stringTryParse = switchCase(
+ [fp_27, parsedSuccess],
+ [fp_29, parsedSuccess],
+ [defaultCase, v => parsedSuccess(v.toString())]
+ );
+
+ const options = {
+ maxLength: {
+ defaultValue: null,
+ isValid: n => n === null || (isSafeInteger(n) && n > 0),
+ requirementDescription:
+ "max length must be null (no limit) or a greater than zero integer",
+ parse: toNumberOrNull,
+ },
+ values: {
+ defaultValue: null,
+ isValid: v =>
+ v === null || (isArrayOfString(v) && v.length > 0 && v.length < 10000),
+ requirementDescription:
+ "'values' must be null (no values) or an arry of at least one string",
+ parse: s => s,
+ },
+ allowDeclaredValuesOnly: {
+ defaultValue: false,
+ isValid: fp_28,
+ requirementDescription: "allowDeclaredValuesOnly must be true or false",
+ parse: toBoolOrNull,
+ },
+ };
+
+ const typeConstraints = [
+ makerule$1(
+ async (val, opts) =>
+ val === null || opts.maxLength === null || val.length <= opts.maxLength,
+ (val, opts) => `value exceeds maximum length of ${opts.maxLength}`
+ ),
+ makerule$1(
+ async (val, opts) =>
+ val === null ||
+ opts.allowDeclaredValuesOnly === false ||
+ fp_19(val)(opts.values),
+ val => `"${val}" does not exist in the list of allowed values`
+ ),
+ ];
+
+ var string = getDefaultExport(
+ "string",
+ stringTryParse,
+ stringFunctions,
+ options,
+ typeConstraints,
+ "abcde",
+ str => str
+ );
+
+ const boolFunctions = typeFunctions({
+ default: fp_21(null),
+ });
+
+ const boolTryParse = switchCase(
+ [fp_28, parsedSuccess],
+ [fp_29, parsedSuccess],
+ [isOneOf("true", "1", "yes", "on"), () => parsedSuccess(true)],
+ [isOneOf("false", "0", "no", "off"), () => parsedSuccess(false)],
+ [defaultCase, parsedFailed]
+ );
+
+ const options$1 = {
+ allowNulls: {
+ defaultValue: true,
+ isValid: fp_28,
+ requirementDescription: "must be a true or false",
+ parse: toBoolOrNull,
+ },
+ };
+
+ const typeConstraints$1 = [
+ makerule$1(
+ async (val, opts) => opts.allowNulls === true || val !== null,
+ () => "field cannot be null"
+ ),
+ ];
+
+ var bool = getDefaultExport(
+ "bool",
+ boolTryParse,
+ boolFunctions,
+ options$1,
+ typeConstraints$1,
+ true,
+ JSON.stringify
+ );
+
+ const numberFunctions = typeFunctions({
+ default: fp_21(null),
+ });
+
+ const parseStringtoNumberOrNull = s => {
+ const num = Number(s);
+ return isNaN(num) ? parsedFailed(s) : parsedSuccess(num)
+ };
+
+ const numberTryParse = switchCase(
+ [fp_30, parsedSuccess],
+ [fp_27, parseStringtoNumberOrNull],
+ [fp_29, parsedSuccess],
+ [defaultCase, parsedFailed]
+ );
+
+ const options$2 = {
+ maxValue: {
+ defaultValue: Number.MAX_SAFE_INTEGER,
+ isValid: isSafeInteger,
+ requirementDescription: "must be a valid integer",
+ parse: toNumberOrNull,
+ },
+ minValue: {
+ defaultValue: 0 - Number.MAX_SAFE_INTEGER,
+ isValid: isSafeInteger,
+ requirementDescription: "must be a valid integer",
+ parse: toNumberOrNull,
+ },
+ decimalPlaces: {
+ defaultValue: 0,
+ isValid: n => isSafeInteger(n) && n >= 0,
+ requirementDescription: "must be a positive integer",
+ parse: toNumberOrNull,
+ },
+ };
+
+ const getDecimalPlaces = val => {
+ const splitDecimal = val.toString().split(".");
+ if (splitDecimal.length === 1) return 0
+ return splitDecimal[1].length
+ };
+
+ const typeConstraints$2 = [
+ makerule$1(
+ async (val, opts) =>
+ val === null || opts.minValue === null || val >= opts.minValue,
+ (val, opts) =>
+ `value (${val.toString()}) must be greater than or equal to ${
+ opts.minValue
+ }`
+ ),
+ makerule$1(
+ async (val, opts) =>
+ val === null || opts.maxValue === null || val <= opts.maxValue,
+ (val, opts) =>
+ `value (${val.toString()}) must be less than or equal to ${
+ opts.minValue
+ } options`
+ ),
+ makerule$1(
+ async (val, opts) =>
+ val === null || opts.decimalPlaces >= getDecimalPlaces(val),
+ (val, opts) =>
+ `value (${val.toString()}) must have ${
+ opts.decimalPlaces
+ } decimal places or less`
+ ),
+ ];
+
+ var number = getDefaultExport(
+ "number",
+ numberTryParse,
+ numberFunctions,
+ options$2,
+ typeConstraints$2,
+ 1,
+ num => num.toString()
+ );
+
+ const dateFunctions = typeFunctions({
+ default: fp_21(null),
+ now: () => new Date(),
+ });
+
+ const isValidDate = d => d instanceof Date && !isNaN(d);
+
+ const parseStringToDate = s =>
+ switchCase(
+ [isValidDate, parsedSuccess],
+ [defaultCase, parsedFailed]
+ )(new Date(s));
+
+ const dateTryParse = switchCase(
+ [fp_32, parsedSuccess],
+ [fp_27, parseStringToDate],
+ [fp_29, parsedSuccess],
+ [defaultCase, parsedFailed]
+ );
+
+ const options$3 = {
+ maxValue: {
+ defaultValue: new Date(32503680000000),
+ isValid: fp_32,
+ requirementDescription: "must be a valid date",
+ parse: toDateOrNull,
+ },
+ minValue: {
+ defaultValue: new Date(-8520336000000),
+ isValid: fp_32,
+ requirementDescription: "must be a valid date",
+ parse: toDateOrNull,
+ },
+ };
+
+ const typeConstraints$3 = [
+ makerule$1(
+ async (val, opts) =>
+ val === null || opts.minValue === null || val >= opts.minValue,
+ (val, opts) =>
+ `value (${val.toString()}) must be greater than or equal to ${
+ opts.minValue
+ }`
+ ),
+ makerule$1(
+ async (val, opts) =>
+ val === null || opts.maxValue === null || val <= opts.maxValue,
+ (val, opts) =>
+ `value (${val.toString()}) must be less than or equal to ${
+ opts.minValue
+ } options`
+ ),
+ ];
+
+ var datetime = getDefaultExport(
+ "datetime",
+ dateTryParse,
+ dateFunctions,
+ options$3,
+ typeConstraints$3,
+ new Date(1984, 4, 1),
+ date => JSON.stringify(date).replace(new RegExp('"', "g"), "")
+ );
+
+ const arrayFunctions = () =>
+ typeFunctions({
+ default: fp_21([]),
+ });
+
+ const mapToParsedArrary = type =>
+ $$(
+ fp_12(i => type.safeParseValue(i)),
+ parsedSuccess
+ );
+
+ const arrayTryParse = type =>
+ switchCase([fp_11, mapToParsedArrary(type)], [defaultCase, parsedFailed]);
+
+ const typeName = type => `array<${type}>`;
+
+ const options$4 = {
+ maxLength: {
+ defaultValue: 10000,
+ isValid: isSafeInteger,
+ requirementDescription: "must be a positive integer",
+ parse: toNumberOrNull,
+ },
+ minLength: {
+ defaultValue: 0,
+ isValid: n => isSafeInteger(n) && n >= 0,
+ requirementDescription: "must be a positive integer",
+ parse: toNumberOrNull,
+ },
+ };
+
+ const typeConstraints$4 = [
+ makerule$1(
+ async (val, opts) => val === null || val.length >= opts.minLength,
+ (val, opts) => `must choose ${opts.minLength} or more options`
+ ),
+ makerule$1(
+ async (val, opts) => val === null || val.length <= opts.maxLength,
+ (val, opts) => `cannot choose more than ${opts.maxLength} options`
+ ),
+ ];
+
+ var array = type =>
+ getDefaultExport(
+ typeName(type.name),
+ arrayTryParse(type),
+ arrayFunctions(),
+ options$4,
+ typeConstraints$4,
+ [type.sampleValue],
+ JSON.stringify
+ );
+
+ const referenceNothing = () => ({ key: "" });
+
+ const referenceFunctions = typeFunctions({
+ default: referenceNothing,
+ });
+
+ const hasStringValue = (ob, path) => fp_25(path)(ob) && fp_27(ob[path]);
+
+ const isObjectWithKey = v => fp_31(v) && hasStringValue(v, "key");
+
+ const tryParseFromString = s => {
+ try {
+ const asObj = JSON.parse(s);
+ if (isObjectWithKey) {
+ return parsedSuccess(asObj)
}
- })
- }
-
- const post = apiCall("POST")
- const get = apiCall("GET")
- const patch = apiCall("PATCH")
- const del = apiCall("DELETE")
-
- const ERROR_MEMBER = "##error"
- const error = message => {
- const e = {}
- e[ERROR_MEMBER] = message
- setState(ERROR, message)
- return e
- }
-
- const isSuccess = obj => !obj || !obj[ERROR_MEMBER]
-
- const apiOpts = {
- rootPath,
- setState,
- getState,
- isSuccess,
- error,
- post,
- get,
- patch,
- delete: del,
- }
-
- return {
- loadRecord: loadRecord(apiOpts),
- listRecords: listRecords(apiOpts),
- authenticate: authenticate(apiOpts),
- saveRecord: saveRecord(apiOpts),
- }
- }
-
- const getNewChildRecordToState = (coreApi, setState) => ({
- recordKey,
- collectionName,
- childRecordType,
- statePath,
- }) => {
- const error = errorHandler(setState)
- try {
- if (!recordKey) {
- error("getNewChild > recordKey not set")
- return
+ } catch (_) {
+ // EMPTY
}
- if (!collectionName) {
- error("getNewChild > collectionName not set")
- return
- }
+ return parsedFailed(s)
+ };
- if (!childRecordType) {
- error("getNewChild > childRecordType not set")
- return
- }
+ const referenceTryParse = v =>
+ switchCase(
+ [isObjectWithKey, parsedSuccess],
+ [fp_27, tryParseFromString],
+ [fp_29, () => parsedSuccess(referenceNothing())],
+ [defaultCase, parsedFailed]
+ )(v);
- if (!statePath) {
- error("getNewChild > statePath not set")
- return
- }
+ const options$5 = {
+ indexNodeKey: {
+ defaultValue: null,
+ isValid: isNonEmptyString,
+ requirementDescription: "must be a non-empty string",
+ parse: s => s,
+ },
+ displayValue: {
+ defaultValue: "",
+ isValid: isNonEmptyString,
+ requirementDescription: "must be a non-empty string",
+ parse: s => s,
+ },
+ reverseIndexNodeKeys: {
+ defaultValue: null,
+ isValid: v => isArrayOfString(v) && v.length > 0,
+ requirementDescription: "must be a non-empty array of strings",
+ parse: s => s,
+ },
+ };
- const rec = coreApi.recordApi.getNewChild(
- recordKey,
- collectionName,
- childRecordType
+ const isEmptyString = s => fp_27(s) && fp_16(s);
+
+ const ensureReferenceExists = async (val, opts, context) =>
+ isEmptyString(val.key) || (await context.referenceExists(opts, val.key));
+
+ const typeConstraints$5 = [
+ makerule$1(
+ ensureReferenceExists,
+ (val, opts) =>
+ `"${val[opts.displayValue]}" does not exist in options list (key: ${
+ val.key
+ })`
+ ),
+ ];
+
+ var reference = getDefaultExport(
+ "reference",
+ referenceTryParse,
+ referenceFunctions,
+ options$5,
+ typeConstraints$5,
+ { key: "key", value: "value" },
+ JSON.stringify
+ );
+
+ const illegalCharacters = "*?\\/:<>|\0\b\f\v";
+
+ const isLegalFilename = filePath => {
+ const fn = fileName(filePath);
+ return (
+ fn.length <= 255 &&
+ fp_23(fn.split(""))(illegalCharacters.split("")).length === 0 &&
+ none(f => f === "..")(splitKey(filePath))
)
- setState(statePath, rec)
- } catch (e) {
- error(e.message)
- }
- }
+ };
- const getNewRecordToState = (coreApi, setState) => ({
- collectionKey,
- childRecordType,
- statePath,
- }) => {
- const error = errorHandler(setState)
- try {
- if (!collectionKey) {
- error("getNewChild > collectionKey not set")
- return
+ const fileNothing = () => ({ relativePath: "", size: 0 });
+
+ const fileFunctions = typeFunctions({
+ default: fileNothing,
+ });
+
+ const fileTryParse = v =>
+ switchCase(
+ [isValidFile, parsedSuccess],
+ [fp_29, () => parsedSuccess(fileNothing())],
+ [defaultCase, parsedFailed]
+ )(v);
+
+ const fileName = filePath => $(filePath, [splitKey, fp_5]);
+
+ const isValidFile = f =>
+ !fp_29(f) &&
+ fp_25("relativePath")(f) &&
+ fp_25("size")(f) &&
+ fp_30(f.size) &&
+ fp_27(f.relativePath) &&
+ isLegalFilename(f.relativePath);
+
+ const options$6 = {};
+
+ const typeConstraints$6 = [];
+
+ var file = getDefaultExport(
+ "file",
+ fileTryParse,
+ fileFunctions,
+ options$6,
+ typeConstraints$6,
+ { relativePath: "some_file.jpg", size: 1000 },
+ JSON.stringify
+ );
+
+ const allTypes = () => {
+ const basicTypes = {
+ string,
+ number,
+ datetime,
+ bool,
+ reference,
+ file,
+ };
+
+ const arrays = $(basicTypes, [
+ fp_14,
+ fp_12(k => {
+ const kvType = {};
+ const concreteArray = array(basicTypes[k]);
+ kvType[concreteArray.name] = concreteArray;
+ return kvType
+ }),
+ types => lodash_14({}, ...types),
+ ]);
+
+ return lodash_13({}, basicTypes, arrays)
+ };
+
+ const all$1 = allTypes();
+
+ const getType = typeName => {
+ if (!fp_25(typeName)(all$1))
+ throw new BadRequestError(`Do not recognise type ${typeName}`)
+ return all$1[typeName]
+ };
+
+ const getNewFieldValue = field => getType(field.type).getNew(field);
+
+ const AUTH_FOLDER = "/.auth";
+ const USERS_LIST_FILE = joinKey(AUTH_FOLDER, "users.json");
+ const USERS_LOCK_FILE = joinKey(AUTH_FOLDER, "users_lock");
+ const ACCESS_LEVELS_FILE = joinKey(AUTH_FOLDER, "access_levels.json");
+ const ACCESS_LEVELS_LOCK_FILE = joinKey(
+ AUTH_FOLDER,
+ "access_levels_lock"
+ );
+
+ const permissionTypes = {
+ CREATE_RECORD: "create record",
+ UPDATE_RECORD: "update record",
+ READ_RECORD: "read record",
+ DELETE_RECORD: "delete record",
+ READ_INDEX: "read index",
+ MANAGE_INDEX: "manage index",
+ MANAGE_COLLECTION: "manage collection",
+ WRITE_TEMPLATES: "write templates",
+ CREATE_USER: "create user",
+ SET_PASSWORD: "set password",
+ CREATE_TEMPORARY_ACCESS: "create temporary access",
+ ENABLE_DISABLE_USER: "enable or disable user",
+ WRITE_ACCESS_LEVELS: "write access levels",
+ LIST_USERS: "list users",
+ LIST_ACCESS_LEVELS: "list access levels",
+ EXECUTE_ACTION: "execute action",
+ SET_USER_ACCESS_LEVELS: "set user access levels",
+ };
+
+ const isAuthorized = app => (permissionType, resourceKey) =>
+ apiWrapperSync(
+ app,
+ events.authApi.isAuthorized,
+ alwaysAuthorized,
+ { resourceKey, permissionType },
+ _isAuthorized,
+ app,
+ permissionType,
+ resourceKey
+ );
+
+ const _isAuthorized = (app, permissionType, resourceKey) => {
+ if (!app.user) {
+ return false
}
- if (!childRecordType) {
- error("getNewChild > childRecordType not set")
- return
+ const validType = $(permissionTypes, [fp_34, fp_19(permissionType)]);
+
+ if (!validType) {
+ return false
}
- if (!statePath) {
- error("getNewChild > statePath not set")
- return
+ const permMatchesResource = userperm => {
+ const nodeKey = isNothing(resourceKey)
+ ? null
+ : isNode(app.hierarchy, resourceKey)
+ ? getNodeByKeyOrNodeKey(app.hierarchy, resourceKey).nodeKey()
+ : resourceKey;
+
+ return (
+ userperm.type === permissionType &&
+ (isNothing(resourceKey) || nodeKey === userperm.nodeKey)
+ )
+ };
+
+ return $(app.user.permissions, [fp_10(permMatchesResource)])
+ };
+
+ const nodePermission = type => ({
+ add: (nodeKey, accessLevel) =>
+ accessLevel.permissions.push({ type, nodeKey }),
+ isAuthorized: resourceKey => app => isAuthorized(app)(type, resourceKey),
+ isNode: true,
+ get: nodeKey => ({ type, nodeKey }),
+ });
+
+ const staticPermission = type => ({
+ add: accessLevel => accessLevel.permissions.push({ type }),
+ isAuthorized: app => isAuthorized(app)(type),
+ isNode: false,
+ get: () => ({ type }),
+ });
+
+ const createRecord = nodePermission(permissionTypes.CREATE_RECORD);
+
+ const updateRecord = nodePermission(permissionTypes.UPDATE_RECORD);
+
+ const deleteRecord = nodePermission(permissionTypes.DELETE_RECORD);
+
+ const readRecord = nodePermission(permissionTypes.READ_RECORD);
+
+ const writeTemplates = staticPermission(permissionTypes.WRITE_TEMPLATES);
+
+ const createUser = staticPermission(permissionTypes.CREATE_USER);
+
+ const setPassword = staticPermission(permissionTypes.SET_PASSWORD);
+
+ const readIndex = nodePermission(permissionTypes.READ_INDEX);
+
+ const manageIndex = staticPermission(permissionTypes.MANAGE_INDEX);
+
+ const manageCollection = staticPermission(permissionTypes.MANAGE_COLLECTION);
+
+ const createTemporaryAccess = staticPermission(
+ permissionTypes.CREATE_TEMPORARY_ACCESS
+ );
+
+ const enableDisableUser = staticPermission(permissionTypes.ENABLE_DISABLE_USER);
+
+ const writeAccessLevels = staticPermission(permissionTypes.WRITE_ACCESS_LEVELS);
+
+ const listUsers = staticPermission(permissionTypes.LIST_USERS);
+
+ const listAccessLevels = staticPermission(permissionTypes.LIST_ACCESS_LEVELS);
+
+ const setUserAccessLevels = staticPermission(
+ permissionTypes.SET_USER_ACCESS_LEVELS
+ );
+
+ const executeAction = nodePermission(permissionTypes.EXECUTE_ACTION);
+
+ const alwaysAuthorized = () => true;
+
+ const permission = {
+ createRecord,
+ updateRecord,
+ deleteRecord,
+ readRecord,
+ writeTemplates,
+ createUser,
+ setPassword,
+ readIndex,
+ createTemporaryAccess,
+ enableDisableUser,
+ writeAccessLevels,
+ listUsers,
+ listAccessLevels,
+ manageIndex,
+ manageCollection,
+ executeAction,
+ setUserAccessLevels,
+ };
+
+ const getNew = app => (collectionKey, recordTypeName) => {
+ const recordNode = getRecordNode(app, collectionKey);
+ collectionKey = safeKey(collectionKey);
+ return apiWrapperSync(
+ app,
+ events.recordApi.getNew,
+ permission.createRecord.isAuthorized(recordNode.nodeKey()),
+ { collectionKey, recordTypeName },
+ _getNew,
+ recordNode,
+ collectionKey
+ )
+ };
+
+ const _getNew = (recordNode, collectionKey) =>
+ constructRecord(recordNode, getNewFieldValue, collectionKey);
+
+ const getRecordNode = (app, collectionKey) => {
+ collectionKey = safeKey(collectionKey);
+ return getNodeForCollectionPath(app.hierarchy)(collectionKey)
+ };
+
+ const getNewChild = app => (recordKey, collectionName, recordTypeName) =>
+ getNew(app)(joinKey(recordKey, collectionName), recordTypeName);
+
+ const constructRecord = (recordNode, getFieldValue, collectionKey) => {
+ const record = $(recordNode.fields, [fp_35("name"), fp_26(getFieldValue)]);
+
+ record.id = `${recordNode.nodeId}-${shortid_1()}`;
+ record.key = isSingleRecord(recordNode)
+ ? joinKey(collectionKey, recordNode.name)
+ : joinKey(collectionKey, record.id);
+ record.isNew = true;
+ record.type = recordNode.name;
+ return record
+ };
+
+ const pathRegxMaker = node => () =>
+ node.nodeKey().replace(/{id}/g, "[a-zA-Z0-9_-]+");
+
+ const nodeKeyMaker = node => () =>
+ switchCase(
+ [
+ n => isRecord(n) && !isSingleRecord(n),
+ n =>
+ joinKey(
+ node.parent().nodeKey(),
+ node.collectionName,
+ `${n.nodeId}-{id}`
+ ),
+ ],
+
+ [isRoot, fp_21("/")],
+
+ [defaultCase, n => joinKey(node.parent().nodeKey(), n.name)]
+ )(node);
+
+ const construct = parent => node => {
+ node.nodeKey = nodeKeyMaker(node);
+ node.pathRegx = pathRegxMaker(node);
+ node.parent = fp_21(parent);
+ node.isRoot = () =>
+ isNothing(parent) && node.name === "root" && node.type === "root";
+ if (isCollectionRecord(node)) {
+ node.collectionNodeKey = () =>
+ joinKey(parent.nodeKey(), node.collectionName);
+ node.collectionPathRegx = () =>
+ joinKey(parent.pathRegx(), node.collectionName);
}
+ return node
+ };
- const rec = coreApi.recordApi.getNew(collectionKey, childRecordType)
- setState(statePath, rec)
- } catch (e) {
- error(e.message)
- }
- }
-
- const errorHandler = setState => message => setState(ERROR, message)
-
- const EVENT_TYPE_MEMBER_NAME = "##eventHandlerType"
-
- const eventHandlers = (store, coreApi, rootPath) => {
- const handler = (parameters, execute) => ({
- execute,
- parameters,
- })
-
- const setStateWithStore = (path, value) => setState(store, path, value)
-
- let currentState
- store.subscribe(s => {
- currentState = s
- })
-
- const api = createApi({
- rootPath: rootPath,
- setState: setStateWithStore,
- getState: (path, fallback) => getState(currentState, path, fallback),
- })
-
- const setStateHandler = ({ path, value }) => setState(store, path, value)
-
- return {
- "Set State": handler(["path", "value"], setStateHandler),
- "Load Record": handler(["recordKey", "statePath"], api.loadRecord),
- "List Records": handler(["indexKey", "statePath"], api.listRecords),
- "Save Record": handler(["statePath"], api.saveRecord),
-
- "Get New Child Record": handler(
- ["recordKey", "collectionName", "childRecordType", "statePath"],
- getNewChildRecordToState(coreApi, setStateWithStore)
- ),
-
- "Get New Record": handler(
- ["collectionKey", "childRecordType", "statePath"],
- getNewRecordToState(coreApi, setStateWithStore)
- ),
-
- Authenticate: handler(["username", "password"], api.authenticate),
- }
- }
-
- const isEventType = prop =>
- fp_11(prop) && prop.length > 0 && !fp_2(prop[0][EVENT_TYPE_MEMBER_NAME])
-
- const doNothing = () => {}
- doNothing.isPlaceholder = true
-
- const setupBinding = (store, rootProps, coreApi, context, rootPath) => {
- const rootInitialProps = { ...rootProps }
-
- const getBindings = (props, initialProps) => {
- const boundProps = []
- const contextBoundProps = []
- const componentEventHandlers = []
- const boundArrays = []
-
- for (let propName in props) {
- if (propName === "_component") continue
-
- const val = initialProps[propName]
-
- if (isBound(val) && takeStateFromStore(val)) {
- const binding = BindingPath(val)
- const source = BindingSource(val)
- const fallback = BindingFallback(val)
-
- boundProps.push({
- path: binding,
- fallback,
- propName,
- source,
+ const constructHierarchy = (node, parent) => {
+ construct(parent)(node);
+ if (node.indexes) {
+ lodash_4(node.indexes, child => constructHierarchy(child, node));
+ }
+ if (node.aggregateGroups) {
+ lodash_4(node.aggregateGroups, child => constructHierarchy(child, node));
+ }
+ if (node.children && node.children.length > 0) {
+ lodash_4(node.children, child => constructHierarchy(child, node));
+ }
+ if (node.fields) {
+ lodash_4(node.fields, f =>
+ lodash_4(f.typeOptions, (val, key) => {
+ const def = all$1[f.type].optionDefinitions[key];
+ if (!def) {
+ // unknown typeOption
+ delete f.typeOptions[key];
+ } else {
+ f.typeOptions[key] = def.parse(val);
+ }
})
-
- initialProps[propName] = fallback
- } else if (isBound(val) && takeStateFromContext(val)) {
- const binding = BindingPath(val)
- const fallback = BindingFallback(val)
- const source = BindingSource(val)
-
- contextBoundProps.push({
- path: binding,
- fallback,
- propName,
- source,
- })
-
- initialProps[propName] = !context
- ? val
- : getState(context, binding, fallback)
- } else if (isEventType(val)) {
- const handlers = { propName, handlers: [] }
- componentEventHandlers.push(handlers)
-
- for (let e of val) {
- handlers.handlers.push({
- handlerType: e[EVENT_TYPE_MEMBER_NAME],
- parameters: e.parameters,
- })
- }
-
- initialProps[propName] = doNothing
- } else if (Array.isArray(val)) {
- const arrayOfBindings = []
- for (let element of val) {
- arrayOfBindings.push(getBindings(element, { ...element }))
- }
-
- boundArrays.push({
- arrayOfBindings,
- propName,
- })
- }
+ );
}
+ return node
+ };
+
+ const createCoreApi = (backendDefinition, user) => {
+ const app = createCoreApp(backendDefinition, user);
return {
- contextBoundProps,
- boundProps,
- componentEventHandlers,
- boundArrays,
- initialProps,
- }
- }
+ recordApi: {
+ getNew: getNew(app),
+ getNewChild: getNewChild(app),
+ },
- const bind = rootBindings => component => {
- if (
- rootBindings.boundProps.length === 0 &&
- rootBindings.componentEventHandlers.length === 0 &&
- rootBindings.boundArrays.length === 0
- )
+ templateApi: {
+ constructHierarchy,
+ },
+ }
+ };
+
+ const BB_STATE_BINDINGPATH = "##bbstate";
+ const BB_STATE_BINDINGSOURCE = "##bbsource";
+ const BB_STATE_FALLBACK = "##bbstatefallback";
+
+ const isBound = prop =>
+ prop !== undefined && prop[BB_STATE_BINDINGPATH] !== undefined;
+
+ const takeStateFromStore = prop =>
+ prop[BB_STATE_BINDINGSOURCE] === undefined ||
+ prop[BB_STATE_BINDINGSOURCE] === "store";
+
+ const takeStateFromContext = prop =>
+ prop[BB_STATE_BINDINGSOURCE] === "context";
+
+ const takeStateFromEventParameters = prop =>
+ prop[BB_STATE_BINDINGSOURCE] === "event";
+
+ const getState = (s, path, fallback) => {
+ if (!s) return fallback
+ if (!path || path.length === 0) return fallback
+
+ if (path === "$") return s
+
+ const pathParts = path.split(".");
+ const safeGetPath = (obj, currentPartIndex = 0) => {
+ const currentKey = pathParts[currentPartIndex];
+
+ if (pathParts.length - 1 == currentPartIndex) {
+ const value = obj[currentKey];
+ if (fp_2(value)) return fallback
+ else return value
+ }
+
+ if (
+ obj[currentKey] === null ||
+ obj[currentKey] === undefined ||
+ !fp_8(obj[currentKey])
+ ) {
+ return fallback
+ }
+
+ return safeGetPath(obj[currentKey], currentPartIndex + 1)
+ };
+
+ return safeGetPath(s)
+ };
+
+ const getStateOrValue = (globalState, prop, currentContext) => {
+ if (!prop) return prop
+
+ if (isBound(prop)) {
+ const stateToUse = takeStateFromStore(prop) ? globalState : currentContext;
+
+ return getState(
+ stateToUse,
+ prop[BB_STATE_BINDINGPATH],
+ prop[BB_STATE_FALLBACK]
+ )
+ }
+
+ if (prop.path && prop.source) {
+ const stateToUse = prop.source === "store" ? globalState : currentContext;
+
+ return getState(stateToUse, prop.path, prop.fallback)
+ }
+
+ return prop
+ };
+
+ const setState = (store, path, value) => {
+ if (!path || path.length === 0) return
+
+ const pathParts = path.split(".");
+ const safeSetPath = (obj, currentPartIndex = 0) => {
+ const currentKey = pathParts[currentPartIndex];
+
+ if (pathParts.length - 1 == currentPartIndex) {
+ obj[currentKey] = value;
+ return
+ }
+
+ if (
+ obj[currentKey] === null ||
+ obj[currentKey] === undefined ||
+ !fp_8(obj[currentKey])
+ ) {
+ obj[currentKey] = {};
+ }
+
+ safeSetPath(obj[currentKey], currentPartIndex + 1);
+ };
+
+ store.update(s => {
+ safeSetPath(s);
+ return s
+ });
+ };
+
+ const setStateFromBinding = (store, binding, value) =>
+ setState(store, binding[BB_STATE_BINDINGPATH], value);
+
+ const trimSlash = str => str.replace(/^\/+|\/+$/g, "");
+
+ const ERROR = "##error_message";
+
+ const loadRecord = api => async ({ recordKey, statePath }) => {
+ if (!recordKey) {
+ api.error("Load Record: record key not set");
return
+ }
- const handlerTypes = eventHandlers(store, coreApi, rootPath)
+ if (!statePath) {
+ api.error("Load Record: state path not set");
+ return
+ }
- const unsubscribe = store.subscribe(rootState => {
- const getPropsFromBindings = (s, bindings) => {
- const { boundProps, componentEventHandlers, boundArrays } = bindings
- const newProps = { ...bindings.initialProps }
+ const record = await api.get({
+ url: `/api/record/${trimSlash(recordKey)}`,
+ });
- for (let boundProp of boundProps) {
- const val = getState(s, boundProp.path, boundProp.fallback)
+ if (api.isSuccess(record)) api.setState(statePath, record);
+ };
- if (
- val === undefined &&
- newProps[boundProp.propName] !== undefined
- ) {
- delete newProps[boundProp.propName]
- }
+ const listRecords = api => async ({ indexKey, statePath }) => {
+ if (!indexKey) {
+ api.error("Load Record: record key not set");
+ return
+ }
- if (val !== undefined) {
- newProps[boundProp.propName] = val
- }
- }
+ if (!statePath) {
+ api.error("Load Record: state path not set");
+ return
+ }
- for (let boundHandler of componentEventHandlers) {
- const closuredHandlers = []
- for (let h of boundHandler.handlers) {
- const handlerType = handlerTypes[h.handlerType]
- closuredHandlers.push(eventContext => {
- const parameters = {}
- for (let pname in h.parameters) {
- const p = h.parameters[pname]
- parameters[pname] = !isBound(p)
- ? p
- : takeStateFromStore(p)
- ? getState(s, p[BB_STATE_BINDINGPATH], p[BB_STATE_FALLBACK])
- : takeStateFromEventParameters(p)
- ? getState(
- eventContext,
- p[BB_STATE_BINDINGPATH],
- p[BB_STATE_FALLBACK]
- )
- : takeStateFromContext(p)
- ? getState(
- context,
- p[BB_STATE_BINDINGPATH],
- p[BB_STATE_FALLBACK]
- )
- : p[BB_STATE_FALLBACK]
- }
- handlerType.execute(parameters)
- })
- }
+ const records = await api.get({
+ url: `/api/listRecords/${trimSlash(indexKey)}`,
+ });
- newProps[boundHandler.propName] = async context => {
- for (let runHandler of closuredHandlers) {
- await runHandler(context)
- }
- }
- }
+ if (api.isSuccess(records)) api.setState(statePath, records);
+ };
- for (let boundArray of boundArrays) {
- let index = 0
- if (!newProps[boundArray.propName])
- newProps[boundArray.propName] = []
- for (let bindings of boundArray.arrayOfBindings) {
- newProps[boundArray.propName][index] = getPropsFromBindings(
- s,
- bindings
+ const USER_STATE_PATH = "_bbuser";
+
+ const authenticate = api => async ({ username, password }) => {
+ if (!username) {
+ api.error("Authenticate: username not set");
+ return
+ }
+
+ if (!password) {
+ api.error("Authenticate: password not set");
+ return
+ }
+
+ const user = await api.post({
+ url: "/api/authenticate",
+ body: { username, password },
+ });
+
+ // set user even if error - so it is defined at least
+ api.setState(USER_STATE_PATH, user);
+ localStorage.setItem("budibase:user", JSON.stringify(user));
+ };
+
+ const saveRecord = api => async ({ statePath }) => {
+ if (!statePath) {
+ api.error("Load Record: state path not set");
+ return
+ }
+
+ const recordtoSave = api.getState(statePath);
+
+ if (!recordtoSave) {
+ api.error(`there is no record in state: ${statePath}`);
+ return
+ }
+
+ if (!recordtoSave.key) {
+ api.error(
+ `item in state does not appear to be a record - it has no key (${statePath})`
+ );
+ return
+ }
+
+ const savedRecord = await api.post({
+ url: `/api/record/${trimSlash(recordtoSave.key)}`,
+ body: recordtoSave,
+ });
+
+ if (api.isSuccess(savedRecord)) api.setState(statePath, savedRecord);
+ };
+
+ const createApi = ({ rootPath, setState, getState }) => {
+ const apiCall = method => ({
+ url,
+ body,
+ notFound,
+ badRequest,
+ forbidden,
+ }) => {
+ return fetch(`${rootPath}${url}`, {
+ method: method,
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: body && JSON.stringify(body),
+ credentials: "same-origin",
+ }).then(r => {
+ switch (r.status) {
+ case 200:
+ return r.json()
+ case 404:
+ return error(notFound || `${url} Not found`)
+ case 400:
+ return error(badRequest || `${url} Bad Request`)
+ case 403:
+ return error(forbidden || `${url} Forbidden`)
+ default:
+ if (
+ r.status.toString().startsWith("2") ||
+ r.status.toString().startsWith("3")
)
- index++
- }
- }
-
- return newProps
- }
-
- const rootNewProps = getPropsFromBindings(rootState, rootBindings)
-
- component.$set(rootNewProps)
- })
-
- return unsubscribe
- }
-
- const bindings = getBindings(rootProps, rootInitialProps)
-
- return {
- initialProps: rootInitialProps,
- bind: bind(bindings),
- boundProps: bindings.boundProps,
- boundArrays: bindings.boundArrays,
- contextBoundProps: bindings.contextBoundProps,
- }
- }
-
- const BindingPath = prop => prop[BB_STATE_BINDINGPATH]
- const BindingFallback = prop => prop[BB_STATE_FALLBACK]
- const BindingSource = prop => prop[BB_STATE_BINDINGSOURCE]
-
- const createCoreApp = (appDefinition, user) => {
- const app = {
- datastore: null,
- crypto: null,
- publish: () => {},
- hierarchy: appDefinition.hierarchy,
- actions: appDefinition.actions,
- user,
- }
-
- return app
- }
-
- const makerule = (field, error, isValid) => ({ field, error, isValid })
-
- var filters = new Map()
- var limiters = new Map()
-
- function compileRawExpression(src) {
- return new Function(
- "context",
- "tempVars", // eslint-disable-line
- "const sandbox = $nxCompileToSandbox(context, tempVars)\n try { with (sandbox) { return " +
- src +
- " } } catch (err) {\n if (!(err instanceof TypeError)) throw err\n }\n $nxClearSandbox()"
- )
- }
-
- function compileRawCode(src) {
- return new Function(
- "context",
- "tempVars", // eslint-disable-line
- "const sandbox = $nxCompileToSandbox(context, tempVars)\n with (sandbox) { " +
- src +
- " }\n $nxClearSandbox()"
- )
- }
-
- var filterRegex = /(?:[^\|]|\|\|)+/g
- var limiterRegex = /(?:[^&]|&&)+/g
- var argsRegex = /\S+/g
-
- function parseExpression(src) {
- var tokens = src.match(filterRegex)
- if (tokens.length === 1) {
- return compileRawExpression(tokens[0])
- }
-
- var expression = {
- exec: compileRawExpression(tokens[0]),
- filters: [],
- }
- for (var i = 1; i < tokens.length; i++) {
- var filterTokens = tokens[i].match(argsRegex)
- var filterName = filterTokens.shift()
- var effect = filters.get(filterName)
- if (!effect) {
- throw new Error("There is no filter named: " + filterName + ".")
- }
- expression.filters.push({
- effect: effect,
- argExpressions: filterTokens.map(compileRawExpression),
- })
- }
- return expression
- }
-
- function parseCode(src) {
- var tokens = src.match(limiterRegex)
- if (tokens.length === 1) {
- return compileRawCode(tokens[0])
- }
-
- var code = {
- exec: compileRawCode(tokens[0]),
- limiters: [],
- }
- for (var i = 1; i < tokens.length; i++) {
- var limiterTokens = tokens[i].match(argsRegex)
- var limiterName = limiterTokens.shift()
- var effect = limiters.get(limiterName)
- if (!effect) {
- throw new Error("There is no limiter named: " + limiterName + ".")
- }
- code.limiters.push({
- effect: effect,
- argExpressions: limiterTokens.map(compileRawExpression),
- })
- }
- return code
- }
-
- var expressionCache = new Map()
- var codeCache = new Map()
-
- function compileExpression(src) {
- if (typeof src !== "string") {
- throw new TypeError("First argument must be a string.")
- }
- var expression = expressionCache.get(src)
- if (!expression) {
- expression = parseExpression(src)
- expressionCache.set(src, expression)
- }
-
- if (typeof expression === "function") {
- return expression
- }
-
- return function evaluateExpression(context, tempVars) {
- var value = expression.exec(context, tempVars)
- for (var i = 0, list = expression.filters; i < list.length; i += 1) {
- var filter = list[i]
-
- var args = filter.argExpressions.map(evaluateArgExpression, context)
- value = filter.effect.apply(filter, [value].concat(args))
- }
- return value
- }
- }
-
- function compileCode(src) {
- if (typeof src !== "string") {
- throw new TypeError("First argument must be a string.")
- }
- var code = codeCache.get(src)
- if (!code) {
- code = parseCode(src)
- codeCache.set(src, code)
- }
-
- if (typeof code === "function") {
- return code
- }
-
- var context = {}
- return function evaluateCode(state, tempVars) {
- var i = 0
- function next() {
- Object.assign(context, tempVars)
- if (i < code.limiters.length) {
- var limiter = code.limiters[i++]
- var args = limiter.argExpressions.map(evaluateArgExpression, state)
- limiter.effect.apply(limiter, [next, context].concat(args))
- } else {
- code.exec(state, tempVars)
- }
- }
- next()
- }
- }
-
- function evaluateArgExpression(argExpression) {
- return argExpression(this)
- }
-
- var hasHandler = { has: has }
- var allHandlers = { has: has, get: get$1 }
- var globals$1 = new Set()
- var temp
-
- var globalObj
- if (typeof window !== "undefined") {
- globalObj = window
- } // eslint-disable-line
- else if (typeof global !== "undefined") {
- globalObj = global
- } // eslint-disable-line
- else if (typeof self !== "undefined") {
- globalObj = self
- } // eslint-disable-line
- globalObj.$nxCompileToSandbox = toSandbox
- globalObj.$nxClearSandbox = clearSandbox
-
- function has(target, key) {
- return globals$1.has(key) ? key in target : true
- }
-
- function get$1(target, key) {
- return key in temp ? temp[key] : target[key]
- }
-
- function toSandbox(obj, tempVars) {
- if (tempVars) {
- temp = tempVars
- return new Proxy(obj, allHandlers)
- }
- return new Proxy(obj, hasHandler)
- }
-
- function clearSandbox() {
- temp = undefined
- }
-
- const compileFilter = index => compileExpression(index.filter)
-
- const compileMap = index => compileCode(index.map)
-
- const indexTypes = { reference: "reference", ancestor: "ancestor" }
-
- const indexRuleSet = [
- makerule("map", "index has no map function", index =>
- isNonEmptyString(index.map)
- ),
- makerule(
- "map",
- "index's map function does not compile",
- index =>
- !isNonEmptyString(index.map) ||
- executesWithoutException(() => compileMap(index))
- ),
- makerule(
- "filter",
- "index's filter function does not compile",
- index =>
- !isNonEmptyString(index.filter) ||
- executesWithoutException(() => compileFilter(index))
- ),
- makerule("name", "must declare a name for index", index =>
- isNonEmptyString(index.name)
- ),
- makerule(
- "name",
- "there is a duplicate named index on this node",
- index =>
- fp_16(index.name) ||
- fp_17("name")(index.parent().indexes)[index.name] === 1
- ),
- makerule(
- "indexType",
- "reference index may only exist on a record node",
- index =>
- isRecord(index.parent()) || index.indexType !== indexTypes.reference
- ),
- makerule(
- "indexType",
- `index type must be one of: ${fp_18(", ")(fp_14(indexTypes))}`,
- index => fp_19(index.indexType)(fp_14(indexTypes))
- ),
- ]
-
- const getFlattenedHierarchy = (appHierarchy, useCached = true) => {
- if (isSomething(appHierarchy.getFlattenedHierarchy) && useCached) {
- return appHierarchy.getFlattenedHierarchy()
- }
-
- const flattenHierarchy = (currentNode, flattened) => {
- flattened.push(currentNode)
- if (
- (!currentNode.children || currentNode.children.length === 0) &&
- (!currentNode.indexes || currentNode.indexes.length === 0) &&
- (!currentNode.aggregateGroups ||
- currentNode.aggregateGroups.length === 0)
- ) {
- return flattened
- }
-
- const unionIfAny = l2 => l1 => fp_6(l1)(!l2 ? [] : l2)
-
- const children = $(
- [],
- [
- unionIfAny(currentNode.children),
- unionIfAny(currentNode.indexes),
- unionIfAny(currentNode.aggregateGroups),
- ]
- )
-
- for (const child of children) {
- flattenHierarchy(child, flattened)
- }
- return flattened
- }
-
- appHierarchy.getFlattenedHierarchy = () =>
- flattenHierarchy(appHierarchy, [])
- return appHierarchy.getFlattenedHierarchy()
- }
-
- const getExactNodeForKey = appHierarchy => key =>
- $(appHierarchy, [
- getFlattenedHierarchy,
- fp_1(n => new RegExp(`${n.pathRegx()}$`).test(key)),
- ])
-
- const getNodeForCollectionPath = appHierarchy => collectionKey =>
- $(appHierarchy, [
- getFlattenedHierarchy,
- fp_1(
- n =>
- isCollectionRecord(n) &&
- new RegExp(`${n.collectionPathRegx()}$`).test(collectionKey)
- ),
- ])
-
- const getNode = (appHierarchy, nodeKey) =>
- $(appHierarchy, [
- getFlattenedHierarchy,
- fp_1(
- n =>
- n.nodeKey() === nodeKey ||
- (isCollectionRecord(n) && n.collectionNodeKey() === nodeKey)
- ),
- ])
-
- const getNodeByKeyOrNodeKey = (appHierarchy, keyOrNodeKey) => {
- const nodeByKey = getExactNodeForKey(appHierarchy)(keyOrNodeKey)
- return isNothing(nodeByKey)
- ? getNode(appHierarchy, keyOrNodeKey)
- : nodeByKey
- }
-
- const isNode = (appHierarchy, key) =>
- isSomething(getExactNodeForKey(appHierarchy)(key))
-
- const isRecord = node => isSomething(node) && node.type === "record"
- const isSingleRecord = node => isRecord(node) && node.isSingle
- const isCollectionRecord = node => isRecord(node) && !node.isSingle
- const isRoot = node => isSomething(node) && node.isRoot()
-
- const getSafeFieldParser = (tryParse, defaultValueFunctions) => (
- field,
- record
- ) => {
- if (fp_25(field.name)(record)) {
- return getSafeValueParser(
- tryParse,
- defaultValueFunctions
- )(record[field.name])
- }
- return defaultValueFunctions[field.getUndefinedValue]()
- }
-
- const getSafeValueParser = (tryParse, defaultValueFunctions) => value => {
- const parsed = tryParse(value)
- if (parsed.success) {
- return parsed.value
- }
- return defaultValueFunctions.default()
- }
-
- const getNewValue = (tryParse, defaultValueFunctions) => field => {
- const getInitialValue =
- fp_2(field) || fp_2(field.getInitialValue)
- ? "default"
- : field.getInitialValue
-
- return fp_25(getInitialValue)(defaultValueFunctions)
- ? defaultValueFunctions[getInitialValue]()
- : getSafeValueParser(tryParse, defaultValueFunctions)(getInitialValue)
- }
-
- const typeFunctions = specificFunctions =>
- lodash_13(
- {
- value: fp_21,
- null: fp_21(null),
- },
- specificFunctions
- )
-
- const validateTypeConstraints = validationRules => async (
- field,
- record,
- context
- ) => {
- const fieldValue = record[field.name]
- const validateRule = async r =>
- !(await r.isValid(fieldValue, field.typeOptions, context))
- ? r.getMessage(fieldValue, field.typeOptions)
- : ""
-
- const errors = []
- for (const r of validationRules) {
- const err = await validateRule(r)
- if (isNotEmpty(err)) errors.push(err)
- }
-
- return errors
- }
-
- const getDefaultOptions = fp_26(v => v.defaultValue)
-
- const makerule$1 = (isValid, getMessage) => ({ isValid, getMessage })
- const parsedFailed = val => ({ success: false, value: val })
- const parsedSuccess = val => ({ success: true, value: val })
- const getDefaultExport = (
- name,
- tryParse,
- functions,
- options,
- validationRules,
- sampleValue,
- stringify
- ) => ({
- getNew: getNewValue(tryParse, functions),
- safeParseField: getSafeFieldParser(tryParse, functions),
- safeParseValue: getSafeValueParser(tryParse, functions),
- tryParse,
- name,
- getDefaultOptions: () => getDefaultOptions(fp_9(options)),
- optionDefinitions: options,
- validateTypeConstraints: validateTypeConstraints(validationRules),
- sampleValue,
- stringify: val => (val === null || val === undefined ? "" : stringify(val)),
- getDefaultValue: functions.default,
- })
-
- const stringFunctions = typeFunctions({
- default: fp_21(null),
- })
-
- const stringTryParse = switchCase(
- [fp_27, parsedSuccess],
- [fp_29, parsedSuccess],
- [defaultCase, v => parsedSuccess(v.toString())]
- )
-
- const options = {
- maxLength: {
- defaultValue: null,
- isValid: n => n === null || (isSafeInteger(n) && n > 0),
- requirementDescription:
- "max length must be null (no limit) or a greater than zero integer",
- parse: toNumberOrNull,
- },
- values: {
- defaultValue: null,
- isValid: v =>
- v === null || (isArrayOfString(v) && v.length > 0 && v.length < 10000),
- requirementDescription:
- "'values' must be null (no values) or an arry of at least one string",
- parse: s => s,
- },
- allowDeclaredValuesOnly: {
- defaultValue: false,
- isValid: fp_28,
- requirementDescription: "allowDeclaredValuesOnly must be true or false",
- parse: toBoolOrNull,
- },
- }
-
- const typeConstraints = [
- makerule$1(
- async (val, opts) =>
- val === null || opts.maxLength === null || val.length <= opts.maxLength,
- (val, opts) => `value exceeds maximum length of ${opts.maxLength}`
- ),
- makerule$1(
- async (val, opts) =>
- val === null ||
- opts.allowDeclaredValuesOnly === false ||
- fp_19(val)(opts.values),
- val => `"${val}" does not exist in the list of allowed values`
- ),
- ]
-
- var string = getDefaultExport(
- "string",
- stringTryParse,
- stringFunctions,
- options,
- typeConstraints,
- "abcde",
- str => str
- )
-
- const boolFunctions = typeFunctions({
- default: fp_21(null),
- })
-
- const boolTryParse = switchCase(
- [fp_28, parsedSuccess],
- [fp_29, parsedSuccess],
- [isOneOf("true", "1", "yes", "on"), () => parsedSuccess(true)],
- [isOneOf("false", "0", "no", "off"), () => parsedSuccess(false)],
- [defaultCase, parsedFailed]
- )
-
- const options$1 = {
- allowNulls: {
- defaultValue: true,
- isValid: fp_28,
- requirementDescription: "must be a true or false",
- parse: toBoolOrNull,
- },
- }
-
- const typeConstraints$1 = [
- makerule$1(
- async (val, opts) => opts.allowNulls === true || val !== null,
- () => "field cannot be null"
- ),
- ]
-
- var bool = getDefaultExport(
- "bool",
- boolTryParse,
- boolFunctions,
- options$1,
- typeConstraints$1,
- true,
- JSON.stringify
- )
-
- const numberFunctions = typeFunctions({
- default: fp_21(null),
- })
-
- const parseStringtoNumberOrNull = s => {
- const num = Number(s)
- return isNaN(num) ? parsedFailed(s) : parsedSuccess(num)
- }
-
- const numberTryParse = switchCase(
- [fp_30, parsedSuccess],
- [fp_27, parseStringtoNumberOrNull],
- [fp_29, parsedSuccess],
- [defaultCase, parsedFailed]
- )
-
- const options$2 = {
- maxValue: {
- defaultValue: Number.MAX_SAFE_INTEGER,
- isValid: isSafeInteger,
- requirementDescription: "must be a valid integer",
- parse: toNumberOrNull,
- },
- minValue: {
- defaultValue: 0 - Number.MAX_SAFE_INTEGER,
- isValid: isSafeInteger,
- requirementDescription: "must be a valid integer",
- parse: toNumberOrNull,
- },
- decimalPlaces: {
- defaultValue: 0,
- isValid: n => isSafeInteger(n) && n >= 0,
- requirementDescription: "must be a positive integer",
- parse: toNumberOrNull,
- },
- }
-
- const getDecimalPlaces = val => {
- const splitDecimal = val.toString().split(".")
- if (splitDecimal.length === 1) return 0
- return splitDecimal[1].length
- }
-
- const typeConstraints$2 = [
- makerule$1(
- async (val, opts) =>
- val === null || opts.minValue === null || val >= opts.minValue,
- (val, opts) =>
- `value (${val.toString()}) must be greater than or equal to ${
- opts.minValue
- }`
- ),
- makerule$1(
- async (val, opts) =>
- val === null || opts.maxValue === null || val <= opts.maxValue,
- (val, opts) =>
- `value (${val.toString()}) must be less than or equal to ${
- opts.minValue
- } options`
- ),
- makerule$1(
- async (val, opts) =>
- val === null || opts.decimalPlaces >= getDecimalPlaces(val),
- (val, opts) =>
- `value (${val.toString()}) must have ${
- opts.decimalPlaces
- } decimal places or less`
- ),
- ]
-
- var number = getDefaultExport(
- "number",
- numberTryParse,
- numberFunctions,
- options$2,
- typeConstraints$2,
- 1,
- num => num.toString()
- )
-
- const dateFunctions = typeFunctions({
- default: fp_21(null),
- now: () => new Date(),
- })
-
- const isValidDate = d => d instanceof Date && !isNaN(d)
-
- const parseStringToDate = s =>
- switchCase(
- [isValidDate, parsedSuccess],
- [defaultCase, parsedFailed]
- )(new Date(s))
-
- const dateTryParse = switchCase(
- [fp_32, parsedSuccess],
- [fp_27, parseStringToDate],
- [fp_29, parsedSuccess],
- [defaultCase, parsedFailed]
- )
-
- const options$3 = {
- maxValue: {
- defaultValue: new Date(32503680000000),
- isValid: fp_32,
- requirementDescription: "must be a valid date",
- parse: toDateOrNull,
- },
- minValue: {
- defaultValue: new Date(-8520336000000),
- isValid: fp_32,
- requirementDescription: "must be a valid date",
- parse: toDateOrNull,
- },
- }
-
- const typeConstraints$3 = [
- makerule$1(
- async (val, opts) =>
- val === null || opts.minValue === null || val >= opts.minValue,
- (val, opts) =>
- `value (${val.toString()}) must be greater than or equal to ${
- opts.minValue
- }`
- ),
- makerule$1(
- async (val, opts) =>
- val === null || opts.maxValue === null || val <= opts.maxValue,
- (val, opts) =>
- `value (${val.toString()}) must be less than or equal to ${
- opts.minValue
- } options`
- ),
- ]
-
- var datetime = getDefaultExport(
- "datetime",
- dateTryParse,
- dateFunctions,
- options$3,
- typeConstraints$3,
- new Date(1984, 4, 1),
- date => JSON.stringify(date).replace(new RegExp('"', "g"), "")
- )
-
- const arrayFunctions = () =>
- typeFunctions({
- default: fp_21([]),
- })
-
- const mapToParsedArrary = type =>
- $$(
- fp_12(i => type.safeParseValue(i)),
- parsedSuccess
- )
-
- const arrayTryParse = type =>
- switchCase([fp_11, mapToParsedArrary(type)], [defaultCase, parsedFailed])
-
- const typeName = type => `array<${type}>`
-
- const options$4 = {
- maxLength: {
- defaultValue: 10000,
- isValid: isSafeInteger,
- requirementDescription: "must be a positive integer",
- parse: toNumberOrNull,
- },
- minLength: {
- defaultValue: 0,
- isValid: n => isSafeInteger(n) && n >= 0,
- requirementDescription: "must be a positive integer",
- parse: toNumberOrNull,
- },
- }
-
- const typeConstraints$4 = [
- makerule$1(
- async (val, opts) => val === null || val.length >= opts.minLength,
- (val, opts) => `must choose ${opts.minLength} or more options`
- ),
- makerule$1(
- async (val, opts) => val === null || val.length <= opts.maxLength,
- (val, opts) => `cannot choose more than ${opts.maxLength} options`
- ),
- ]
-
- var array = type =>
- getDefaultExport(
- typeName(type.name),
- arrayTryParse(type),
- arrayFunctions(),
- options$4,
- typeConstraints$4,
- [type.sampleValue],
- JSON.stringify
- )
-
- const referenceNothing = () => ({ key: "" })
-
- const referenceFunctions = typeFunctions({
- default: referenceNothing,
- })
-
- const hasStringValue = (ob, path) => fp_25(path)(ob) && fp_27(ob[path])
-
- const isObjectWithKey = v => fp_31(v) && hasStringValue(v, "key")
-
- const tryParseFromString = s => {
- try {
- const asObj = JSON.parse(s)
- if (isObjectWithKey) {
- return parsedSuccess(asObj)
- }
- } catch (_) {
- // EMPTY
- }
-
- return parsedFailed(s)
- }
-
- const referenceTryParse = v =>
- switchCase(
- [isObjectWithKey, parsedSuccess],
- [fp_27, tryParseFromString],
- [fp_29, () => parsedSuccess(referenceNothing())],
- [defaultCase, parsedFailed]
- )(v)
-
- const options$5 = {
- indexNodeKey: {
- defaultValue: null,
- isValid: isNonEmptyString,
- requirementDescription: "must be a non-empty string",
- parse: s => s,
- },
- displayValue: {
- defaultValue: "",
- isValid: isNonEmptyString,
- requirementDescription: "must be a non-empty string",
- parse: s => s,
- },
- reverseIndexNodeKeys: {
- defaultValue: null,
- isValid: v => isArrayOfString(v) && v.length > 0,
- requirementDescription: "must be a non-empty array of strings",
- parse: s => s,
- },
- }
-
- const isEmptyString = s => fp_27(s) && fp_16(s)
-
- const ensureReferenceExists = async (val, opts, context) =>
- isEmptyString(val.key) || (await context.referenceExists(opts, val.key))
-
- const typeConstraints$5 = [
- makerule$1(
- ensureReferenceExists,
- (val, opts) =>
- `"${val[opts.displayValue]}" does not exist in options list (key: ${
- val.key
- })`
- ),
- ]
-
- var reference = getDefaultExport(
- "reference",
- referenceTryParse,
- referenceFunctions,
- options$5,
- typeConstraints$5,
- { key: "key", value: "value" },
- JSON.stringify
- )
-
- const illegalCharacters = "*?\\/:<>|\0\b\f\v"
-
- const isLegalFilename = filePath => {
- const fn = fileName(filePath)
- return (
- fn.length <= 255 &&
- fp_23(fn.split(""))(illegalCharacters.split("")).length === 0 &&
- none(f => f === "..")(splitKey(filePath))
- )
- }
-
- const fileNothing = () => ({ relativePath: "", size: 0 })
-
- const fileFunctions = typeFunctions({
- default: fileNothing,
- })
-
- const fileTryParse = v =>
- switchCase(
- [isValidFile, parsedSuccess],
- [fp_29, () => parsedSuccess(fileNothing())],
- [defaultCase, parsedFailed]
- )(v)
-
- const fileName = filePath => $(filePath, [splitKey, fp_5])
-
- const isValidFile = f =>
- !fp_29(f) &&
- fp_25("relativePath")(f) &&
- fp_25("size")(f) &&
- fp_30(f.size) &&
- fp_27(f.relativePath) &&
- isLegalFilename(f.relativePath)
-
- const options$6 = {}
-
- const typeConstraints$6 = []
-
- var file$8 = getDefaultExport(
- "file",
- fileTryParse,
- fileFunctions,
- options$6,
- typeConstraints$6,
- { relativePath: "some_file.jpg", size: 1000 },
- JSON.stringify
- )
-
- const allTypes = () => {
- const basicTypes = {
- string,
- number,
- datetime,
- bool,
- reference,
- file: file$8,
- }
-
- const arrays = $(basicTypes, [
- fp_14,
- fp_12(k => {
- const kvType = {}
- const concreteArray = array(basicTypes[k])
- kvType[concreteArray.name] = concreteArray
- return kvType
- }),
- types => lodash_14({}, ...types),
- ])
-
- return lodash_13({}, basicTypes, arrays)
- }
-
- const all$1 = allTypes()
-
- const getType = typeName => {
- if (!fp_25(typeName)(all$1))
- throw new BadRequestError(`Do not recognise type ${typeName}`)
- return all$1[typeName]
- }
-
- const getNewFieldValue = field => getType(field.type).getNew(field)
-
- const AUTH_FOLDER = "/.auth"
- const USERS_LIST_FILE = joinKey(AUTH_FOLDER, "users.json")
- const USERS_LOCK_FILE = joinKey(AUTH_FOLDER, "users_lock")
- const ACCESS_LEVELS_FILE = joinKey(AUTH_FOLDER, "access_levels.json")
- const ACCESS_LEVELS_LOCK_FILE = joinKey(AUTH_FOLDER, "access_levels_lock")
-
- const permissionTypes = {
- CREATE_RECORD: "create record",
- UPDATE_RECORD: "update record",
- READ_RECORD: "read record",
- DELETE_RECORD: "delete record",
- READ_INDEX: "read index",
- MANAGE_INDEX: "manage index",
- MANAGE_COLLECTION: "manage collection",
- WRITE_TEMPLATES: "write templates",
- CREATE_USER: "create user",
- SET_PASSWORD: "set password",
- CREATE_TEMPORARY_ACCESS: "create temporary access",
- ENABLE_DISABLE_USER: "enable or disable user",
- WRITE_ACCESS_LEVELS: "write access levels",
- LIST_USERS: "list users",
- LIST_ACCESS_LEVELS: "list access levels",
- EXECUTE_ACTION: "execute action",
- SET_USER_ACCESS_LEVELS: "set user access levels",
- }
-
- const isAuthorized = app => (permissionType, resourceKey) =>
- apiWrapperSync(
- app,
- events.authApi.isAuthorized,
- alwaysAuthorized,
- { resourceKey, permissionType },
- _isAuthorized,
- app,
- permissionType,
- resourceKey
- )
-
- const _isAuthorized = (app, permissionType, resourceKey) => {
- if (!app.user) {
- return false
- }
-
- const validType = $(permissionTypes, [fp_34, fp_19(permissionType)])
-
- if (!validType) {
- return false
- }
-
- const permMatchesResource = userperm => {
- const nodeKey = isNothing(resourceKey)
- ? null
- : isNode(app.hierarchy, resourceKey)
- ? getNodeByKeyOrNodeKey(app.hierarchy, resourceKey).nodeKey()
- : resourceKey
-
- return (
- userperm.type === permissionType &&
- (isNothing(resourceKey) || nodeKey === userperm.nodeKey)
- )
- }
-
- return $(app.user.permissions, [fp_10(permMatchesResource)])
- }
-
- const nodePermission = type => ({
- add: (nodeKey, accessLevel) =>
- accessLevel.permissions.push({ type, nodeKey }),
- isAuthorized: resourceKey => app => isAuthorized(app)(type, resourceKey),
- isNode: true,
- get: nodeKey => ({ type, nodeKey }),
- })
-
- const staticPermission = type => ({
- add: accessLevel => accessLevel.permissions.push({ type }),
- isAuthorized: app => isAuthorized(app)(type),
- isNode: false,
- get: () => ({ type }),
- })
-
- const createRecord = nodePermission(permissionTypes.CREATE_RECORD)
-
- const updateRecord = nodePermission(permissionTypes.UPDATE_RECORD)
-
- const deleteRecord = nodePermission(permissionTypes.DELETE_RECORD)
-
- const readRecord = nodePermission(permissionTypes.READ_RECORD)
-
- const writeTemplates = staticPermission(permissionTypes.WRITE_TEMPLATES)
-
- const createUser = staticPermission(permissionTypes.CREATE_USER)
-
- const setPassword = staticPermission(permissionTypes.SET_PASSWORD)
-
- const readIndex = nodePermission(permissionTypes.READ_INDEX)
-
- const manageIndex = staticPermission(permissionTypes.MANAGE_INDEX)
-
- const manageCollection = staticPermission(permissionTypes.MANAGE_COLLECTION)
-
- const createTemporaryAccess = staticPermission(
- permissionTypes.CREATE_TEMPORARY_ACCESS
- )
-
- const enableDisableUser = staticPermission(
- permissionTypes.ENABLE_DISABLE_USER
- )
-
- const writeAccessLevels = staticPermission(
- permissionTypes.WRITE_ACCESS_LEVELS
- )
-
- const listUsers = staticPermission(permissionTypes.LIST_USERS)
-
- const listAccessLevels = staticPermission(permissionTypes.LIST_ACCESS_LEVELS)
-
- const setUserAccessLevels = staticPermission(
- permissionTypes.SET_USER_ACCESS_LEVELS
- )
-
- const executeAction = nodePermission(permissionTypes.EXECUTE_ACTION)
-
- const alwaysAuthorized = () => true
-
- const permission = {
- createRecord,
- updateRecord,
- deleteRecord,
- readRecord,
- writeTemplates,
- createUser,
- setPassword,
- readIndex,
- createTemporaryAccess,
- enableDisableUser,
- writeAccessLevels,
- listUsers,
- listAccessLevels,
- manageIndex,
- manageCollection,
- executeAction,
- setUserAccessLevels,
- }
-
- const getNew = app => (collectionKey, recordTypeName) => {
- const recordNode = getRecordNode(app, collectionKey)
- collectionKey = safeKey(collectionKey)
- return apiWrapperSync(
- app,
- events.recordApi.getNew,
- permission.createRecord.isAuthorized(recordNode.nodeKey()),
- { collectionKey, recordTypeName },
- _getNew,
- recordNode,
- collectionKey
- )
- }
-
- const _getNew = (recordNode, collectionKey) =>
- constructRecord(recordNode, getNewFieldValue, collectionKey)
-
- const getRecordNode = (app, collectionKey) => {
- collectionKey = safeKey(collectionKey)
- return getNodeForCollectionPath(app.hierarchy)(collectionKey)
- }
-
- const getNewChild = app => (recordKey, collectionName, recordTypeName) =>
- getNew(app)(joinKey(recordKey, collectionName), recordTypeName)
-
- const constructRecord = (recordNode, getFieldValue, collectionKey) => {
- const record = $(recordNode.fields, [fp_35("name"), fp_26(getFieldValue)])
-
- record.id = `${recordNode.nodeId}-${shortid_1()}`
- record.key = isSingleRecord(recordNode)
- ? joinKey(collectionKey, recordNode.name)
- : joinKey(collectionKey, record.id)
- record.isNew = true
- record.type = recordNode.name
- return record
- }
-
- const pathRegxMaker = node => () =>
- node.nodeKey().replace(/{id}/g, "[a-zA-Z0-9_-]+")
-
- const nodeKeyMaker = node => () =>
- switchCase(
- [
- n => isRecord(n) && !isSingleRecord(n),
- n =>
- joinKey(
- node.parent().nodeKey(),
- node.collectionName,
- `${n.nodeId}-{id}`
- ),
- ],
-
- [isRoot, fp_21("/")],
-
- [defaultCase, n => joinKey(node.parent().nodeKey(), n.name)]
- )(node)
-
- const construct = parent => node => {
- node.nodeKey = nodeKeyMaker(node)
- node.pathRegx = pathRegxMaker(node)
- node.parent = fp_21(parent)
- node.isRoot = () =>
- isNothing(parent) && node.name === "root" && node.type === "root"
- if (isCollectionRecord(node)) {
- node.collectionNodeKey = () =>
- joinKey(parent.nodeKey(), node.collectionName)
- node.collectionPathRegx = () =>
- joinKey(parent.pathRegx(), node.collectionName)
- }
- return node
- }
-
- const constructHierarchy = (node, parent) => {
- construct(parent)(node)
- if (node.indexes) {
- lodash_4(node.indexes, child => constructHierarchy(child, node))
- }
- if (node.aggregateGroups) {
- lodash_4(node.aggregateGroups, child => constructHierarchy(child, node))
- }
- if (node.children && node.children.length > 0) {
- lodash_4(node.children, child => constructHierarchy(child, node))
- }
- if (node.fields) {
- lodash_4(node.fields, f =>
- lodash_4(f.typeOptions, (val, key) => {
- const def = all$1[f.type].optionDefinitions[key]
- if (!def) {
- // unknown typeOption
- delete f.typeOptions[key]
- } else {
- f.typeOptions[key] = def.parse(val)
+ return r.json()
+ else return error(`${url} - ${r.statusText}`)
}
})
- )
- }
- return node
- }
+ };
- const createCoreApi = (appDefinition, user) => {
- const app = createCoreApp(appDefinition, user)
+ const post = apiCall("POST");
+ const get = apiCall("GET");
+ const patch = apiCall("PATCH");
+ const del = apiCall("DELETE");
- return {
- recordApi: {
- getNew: getNew(app),
- getNewChild: getNewChild(app),
- },
+ const ERROR_MEMBER = "##error";
+ const error = message => {
+ const e = {};
+ e[ERROR_MEMBER] = message;
+ setState(ERROR, message);
+ return e
+ };
- templateApi: {
- constructHierarchy,
- },
- }
- }
+ const isSuccess = obj => !obj || !obj[ERROR_MEMBER];
- const createApp = (componentLibraries, appDefinition, user) => {
- const _initialiseChildren = (parentContext, hydrate) => (
- childrenProps,
+ const apiOpts = {
+ rootPath,
+ setState,
+ getState,
+ isSuccess,
+ error,
+ post,
+ get,
+ patch,
+ delete: del,
+ };
+
+ return {
+ loadRecord: loadRecord(apiOpts),
+ listRecords: listRecords(apiOpts),
+ authenticate: authenticate(apiOpts),
+ saveRecord: saveRecord(apiOpts),
+ }
+ };
+
+ const getNewChildRecordToState = (coreApi, setState) => ({
+ recordKey,
+ collectionName,
+ childRecordType,
+ statePath,
+ }) => {
+ const error = errorHandler(setState);
+ try {
+ if (!recordKey) {
+ error("getNewChild > recordKey not set");
+ return
+ }
+
+ if (!collectionName) {
+ error("getNewChild > collectionName not set");
+ return
+ }
+
+ if (!childRecordType) {
+ error("getNewChild > childRecordType not set");
+ return
+ }
+
+ if (!statePath) {
+ error("getNewChild > statePath not set");
+ return
+ }
+
+ const rec = coreApi.recordApi.getNewChild(
+ recordKey,
+ collectionName,
+ childRecordType
+ );
+ setState(statePath, rec);
+ } catch (e) {
+ error(e.message);
+ }
+ };
+
+ const getNewRecordToState = (coreApi, setState) => ({
+ collectionKey,
+ childRecordType,
+ statePath,
+ }) => {
+ const error = errorHandler(setState);
+ try {
+ if (!collectionKey) {
+ error("getNewChild > collectionKey not set");
+ return
+ }
+
+ if (!childRecordType) {
+ error("getNewChild > childRecordType not set");
+ return
+ }
+
+ if (!statePath) {
+ error("getNewChild > statePath not set");
+ return
+ }
+
+ const rec = coreApi.recordApi.getNew(collectionKey, childRecordType);
+ setState(statePath, rec);
+ } catch (e) {
+ error(e.message);
+ }
+ };
+
+ const errorHandler = setState => message => setState(ERROR, message);
+
+ const EVENT_TYPE_MEMBER_NAME = "##eventHandlerType";
+
+ const eventHandlers = (store, coreApi, rootPath) => {
+ const handler = (parameters, execute) => ({
+ execute,
+ parameters,
+ });
+
+ const setStateWithStore = (path, value) => setState(store, path, value);
+
+ let currentState;
+ store.subscribe(s => {
+ currentState = s;
+ });
+
+ const api = createApi({
+ rootPath: rootPath,
+ setState: setStateWithStore,
+ getState: (path, fallback) => getState(currentState, path, fallback),
+ });
+
+ const setStateHandler = ({ path, value }) => setState(store, path, value);
+
+ return {
+ "Set State": handler(["path", "value"], setStateHandler),
+ "Load Record": handler(["recordKey", "statePath"], api.loadRecord),
+ "List Records": handler(["indexKey", "statePath"], api.listRecords),
+ "Save Record": handler(["statePath"], api.saveRecord),
+
+ "Get New Child Record": handler(
+ ["recordKey", "collectionName", "childRecordType", "statePath"],
+ getNewChildRecordToState(coreApi, setStateWithStore)
+ ),
+
+ "Get New Record": handler(
+ ["collectionKey", "childRecordType", "statePath"],
+ getNewRecordToState(coreApi, setStateWithStore)
+ ),
+
+ Authenticate: handler(["username", "password"], api.authenticate),
+ }
+ };
+
+ const isEventType = prop =>
+ fp_11(prop) &&
+ prop.length > 0 &&
+ !fp_2(prop[0][EVENT_TYPE_MEMBER_NAME]);
+
+ const doNothing = () => {};
+ doNothing.isPlaceholder = true;
+
+ const isMetaProp = propName =>
+ propName === "_component" ||
+ propName === "_children" ||
+ propName === "_id" ||
+ propName === "_style";
+
+ const setupBinding = (store, rootProps, coreApi, context, rootPath) => {
+ const rootInitialProps = { ...rootProps };
+
+ const getBindings = (props, initialProps) => {
+ const boundProps = [];
+ const contextBoundProps = [];
+ const componentEventHandlers = [];
+
+ for (let propName in props) {
+ if (isMetaProp(propName)) continue
+
+ const val = props[propName];
+
+ if (isBound(val) && takeStateFromStore(val)) {
+ const binding = BindingPath(val);
+ const source = BindingSource(val);
+ const fallback = BindingFallback(val);
+
+ boundProps.push({
+ path: binding,
+ fallback,
+ propName,
+ source,
+ });
+
+ initialProps[propName] = fallback;
+ } else if (isBound(val) && takeStateFromContext(val)) {
+ const binding = BindingPath(val);
+ const fallback = BindingFallback(val);
+ const source = BindingSource(val);
+
+ contextBoundProps.push({
+ path: binding,
+ fallback,
+ propName,
+ source,
+ });
+
+ initialProps[propName] = !context
+ ? val
+ : getState(context, binding, fallback);
+ } else if (isEventType(val)) {
+ const handlers = { propName, handlers: [] };
+ componentEventHandlers.push(handlers);
+
+ for (let e of val) {
+ handlers.handlers.push({
+ handlerType: e[EVENT_TYPE_MEMBER_NAME],
+ parameters: e.parameters,
+ });
+ }
+
+ initialProps[propName] = doNothing;
+ }
+ }
+
+ return {
+ contextBoundProps,
+ boundProps,
+ componentEventHandlers,
+ initialProps,
+ }
+ };
+
+ const bind = rootBindings => component => {
+ if (
+ rootBindings.boundProps.length === 0 &&
+ rootBindings.componentEventHandlers.length === 0
+ )
+ return
+
+ const handlerTypes = eventHandlers(store, coreApi, rootPath);
+
+ const unsubscribe = store.subscribe(rootState => {
+ const getPropsFromBindings = (s, bindings) => {
+ const { boundProps, componentEventHandlers } = bindings;
+ const newProps = { ...bindings.initialProps };
+
+ for (let boundProp of boundProps) {
+ const val = getState(s, boundProp.path, boundProp.fallback);
+
+ if (val === undefined && newProps[boundProp.propName] !== undefined) {
+ delete newProps[boundProp.propName];
+ }
+
+ if (val !== undefined) {
+ newProps[boundProp.propName] = val;
+ }
+ }
+
+ for (let boundHandler of componentEventHandlers) {
+ const closuredHandlers = [];
+ for (let h of boundHandler.handlers) {
+ const handlerType = handlerTypes[h.handlerType];
+ closuredHandlers.push(eventContext => {
+ const parameters = {};
+ for (let pname in h.parameters) {
+ const p = h.parameters[pname];
+ parameters[pname] = !isBound(p)
+ ? p
+ : takeStateFromStore(p)
+ ? getState(s, p[BB_STATE_BINDINGPATH], p[BB_STATE_FALLBACK])
+ : takeStateFromEventParameters(p)
+ ? getState(
+ eventContext,
+ p[BB_STATE_BINDINGPATH],
+ p[BB_STATE_FALLBACK]
+ )
+ : takeStateFromContext(p)
+ ? getState(
+ context,
+ p[BB_STATE_BINDINGPATH],
+ p[BB_STATE_FALLBACK]
+ )
+ : p[BB_STATE_FALLBACK];
+ }
+ handlerType.execute(parameters);
+ });
+ }
+
+ newProps[boundHandler.propName] = async context => {
+ for (let runHandler of closuredHandlers) {
+ await runHandler(context);
+ }
+ };
+ }
+
+ return newProps
+ };
+
+ const rootNewProps = getPropsFromBindings(rootState, rootBindings);
+
+ component.$set(rootNewProps);
+ });
+
+ return unsubscribe
+ };
+
+ const bindings = getBindings(rootProps, rootInitialProps);
+
+ return {
+ initialProps: rootInitialProps,
+ bind: bind(bindings),
+ boundProps: bindings.boundProps,
+ contextBoundProps: bindings.contextBoundProps,
+ }
+ };
+
+ const BindingPath = prop => prop[BB_STATE_BINDINGPATH];
+ const BindingFallback = prop => prop[BB_STATE_FALLBACK];
+ const BindingSource = prop => prop[BB_STATE_BINDINGSOURCE];
+
+ const renderComponent = ({
+ componentConstructor,
+ uiFunctions,
htmlElement,
- context,
- anchor = null
- ) => {
- const childComponents = []
+ anchor,
+ props,
+ initialProps,
+ bb,
+ parentNode,
+ }) => {
+ const func = initialProps._id ? uiFunctions[initialProps._id] : undefined;
- for (let childProps of childrenProps) {
- const { componentName, libName } = splitName(childProps._component)
+ const parentContext = (parentNode && parentNode.context) || {};
+
+ let renderedNodes = [];
+ const render = context => {
+ let componentContext = parentContext;
+ if (context) {
+ componentContext = { ...componentContext };
+ componentContext.$parent = parentContext;
+ }
+
+ const thisNode = createTreeNode();
+ thisNode.context = componentContext;
+ thisNode.parentNode = parentNode;
+ thisNode.props = props;
+
+ parentNode.children.push(thisNode);
+ renderedNodes.push(thisNode);
+
+ initialProps._bb = bb(thisNode, props);
+
+ thisNode.component = new componentConstructor({
+ target: htmlElement,
+ props: initialProps,
+ hydrate: false,
+ anchor,
+ });
+
+ thisNode.rootElement = htmlElement.children[htmlElement.children.length - 1];
+
+ if (initialProps._id && thisNode.rootElement) {
+ thisNode.rootElement.classList.add(`pos-${initialProps._id}`);
+ }
+ };
+
+ if (func) {
+ func(render, parentContext);
+ } else {
+ render();
+ }
+
+ return renderedNodes
+ };
+
+ const createTreeNode = () => ({
+ context: {},
+ props: {},
+ rootElement: null,
+ parentNode: null,
+ children: [],
+ component: null,
+ unsubscribe: () => {},
+ get destroy() {
+ const node = this;
+ return () => {
+ if (node.unsubscribe) node.unsubscribe();
+ if (node.component && node.component.$destroy) node.component.$destroy();
+ if (node.children) {
+ for (let child of node.children) {
+ child.destroy();
+ }
+ }
+ }
+ },
+ });
+
+ const isScreenSlot = componentName =>
+ componentName === "##builtin/screenslot";
+
+ const attachChildren = initialiseOpts => (htmlElement, options) => {
+ const {
+ uiFunctions,
+ bb,
+ coreApi,
+ store,
+ componentLibraries,
+ treeNode,
+ frontendDefinition,
+ onScreenSlotRendered,
+ } = initialiseOpts;
+
+ const anchor = options && options.anchor ? options.anchor : null;
+ const force = options ? options.force : false;
+ const hydrate = options ? options.hydrate : true;
+
+ if (!force && treeNode.children.length > 0) return treeNode.children
+
+ for (let childNode of treeNode.children) {
+ childNode.destroy();
+ }
+
+ if (hydrate) {
+ while (htmlElement.firstChild) {
+ htmlElement.removeChild(htmlElement.firstChild);
+ }
+ }
+
+ htmlElement.classList.add(`lay-${treeNode.props._id}`);
+
+ const renderedComponents = [];
+ for (let childProps of treeNode.props._children) {
+ const { componentName, libName } = splitName(childProps._component);
if (!componentName || !libName) return
@@ -30896,582 +22531,5346 @@ var app = (function() {
store,
childProps,
coreApi,
- context || parentContext,
- appDefinition.appRootPath
- )
+ frontendDefinition.appRootPath
+ );
- const componentProps = {
- ...initialProps,
- _bb: bb(context || parentContext, childProps),
+ const componentConstructor = componentLibraries[libName][componentName];
+
+ const renderedComponentsThisIteration = renderComponent({
+ props: childProps,
+ parentNode: treeNode,
+ componentConstructor,
+ uiFunctions,
+ htmlElement,
+ anchor,
+ initialProps,
+ bb,
+ });
+
+ if (
+ onScreenSlotRendered &&
+ isScreenSlot(childProps._component) &&
+ renderedComponentsThisIteration.length > 0
+ ) {
+ // assuming there is only ever one screen slot
+ onScreenSlotRendered(renderedComponentsThisIteration[0]);
}
- const component = new componentLibraries[libName][componentName]({
- target: htmlElement,
- props: componentProps,
- hydrate,
- anchor,
- })
-
- bind(component)
- childComponents.push(component)
+ for (let comp of renderedComponentsThisIteration) {
+ comp.unsubscribe = bind(comp.component);
+ renderedComponents.push(comp);
+ }
}
- return childComponents
+ treeNode.children = renderedComponents;
+
+ return renderedComponents
+ };
+
+ const splitName = fullname => {
+ const componentName = $(fullname, [fp_3("/"), fp_5]);
+
+ const libName = fullname.substring(
+ 0,
+ fullname.length - componentName.length - 1
+ );
+
+ return { libName, componentName }
+ };
+
+ function regexparam (str, loose) {
+ if (str instanceof RegExp) return { keys:false, pattern:str };
+ var c, o, tmp, ext, keys=[], pattern='', arr = str.split('/');
+ arr[0] || arr.shift();
+
+ while (tmp = arr.shift()) {
+ c = tmp[0];
+ if (c === '*') {
+ keys.push('wild');
+ pattern += '/(.*)';
+ } else if (c === ':') {
+ o = tmp.indexOf('?', 1);
+ ext = tmp.indexOf('.', 1);
+ keys.push( tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length) );
+ pattern += !!~o && !~ext ? '(?:/([^/]+?))?' : '/([^/]+?)';
+ if (!!~ext) pattern += (!!~o ? '?' : '') + '\\' + tmp.substring(ext);
+ } else {
+ pattern += '/' + tmp;
+ }
+ }
+
+ return {
+ keys: keys,
+ pattern: new RegExp('^' + pattern + (loose ? '(?=$|\/)' : '\/?$'), 'i')
+ };
}
- const coreApi = createCoreApi(appDefinition, user)
- appDefinition.hierarchy = coreApi.templateApi.constructHierarchy(
- appDefinition.hierarchy
- )
- const store = writable({
- _bbuser: user,
- })
+ const screenRouter = (screens, onScreenSelected) => {
+ const routes = screens.map(s => s.route);
+ let fallback = routes.findIndex(([p]) => p === "*");
+ if (fallback < 0) fallback = 0;
- let globalState = null
- store.subscribe(s => {
- globalState = s
- })
+ let current;
- const relativeUrl = url =>
- appDefinition.appRootPath
- ? appDefinition.appRootPath + "/" + trimSlash(url)
- : url
+ function route(url) {
+ const _url = url.state || url;
+ current = routes.findIndex(
+ p => p !== "*" && new RegExp("^" + p + "$").test(_url)
+ );
- const apiCall = method => (url, body) =>
- fetch(relativeUrl(url), {
- method: method,
- headers: {
- "Content-Type": "application/json",
+ const params = {};
+
+ if (current === -1) {
+ routes.forEach(([p], i) => {
+ const pm = regexparam(p);
+ const matches = pm.pattern.exec(_url);
+
+ if (!matches) return
+
+ let j = 0;
+ while (j < pm.keys.length) {
+ params[pm.keys[j]] = matches[++j] || null;
+ }
+
+ current = i;
+ });
+ }
+
+ const storeInitial = {};
+ const store = writable(storeInitial);
+
+ if (current !== -1) {
+ onScreenSelected(screens[current], store, _url);
+ } else if (fallback) {
+ onScreenSelected(screens[fallback], store, _url);
+ }
+
+ !url.state && history.pushState(_url, null, _url);
+ }
+
+ function click(e) {
+ const x = e.target.closest("a");
+ const y = x && x.getAttribute("href");
+
+ if (
+ e.ctrlKey ||
+ e.metaKey ||
+ e.altKey ||
+ e.shiftKey ||
+ e.button ||
+ e.defaultPrevented
+ )
+ return
+
+ if (!y || x.target || x.host !== location.host) return
+
+ e.preventDefault();
+ route(y);
+ }
+
+ addEventListener("popstate", route);
+ addEventListener("pushstate", route);
+ addEventListener("click", click);
+
+ return route
+ };
+
+ const createApp = (
+ document,
+ componentLibraries,
+ frontendDefinition,
+ backendDefinition,
+ user,
+ uiFunctions
+ ) => {
+ const coreApi = createCoreApi(backendDefinition, user);
+ backendDefinition.hierarchy = coreApi.templateApi.constructHierarchy(
+ backendDefinition.hierarchy
+ );
+ const pageStore = writable({
+ _bbuser: user,
+ });
+
+ const relativeUrl = url =>
+ frontendDefinition.appRootPath
+ ? frontendDefinition.appRootPath + "/" + trimSlash(url)
+ : url;
+
+ const apiCall = method => (url, body) =>
+ fetch(relativeUrl(url), {
+ method: method,
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: body && JSON.stringify(body),
+ });
+
+ const api = {
+ post: apiCall("POST"),
+ get: apiCall("GET"),
+ patch: apiCall("PATCH"),
+ delete: apiCall("DELETE"),
+ };
+
+ const safeCallEvent = (event, context) => {
+ const isFunction = obj =>
+ !!(obj && obj.constructor && obj.call && obj.apply);
+
+ if (isFunction(event)) event(context);
+ };
+
+ let routeTo;
+ let currentScreenStore;
+ let currentScreenUbsubscribe;
+ let currentUrl;
+
+ const onScreenSlotRendered = screenSlotNode => {
+ const onScreenSelected = (screen, store, url) => {
+ const { getInitialiseParams, unsubscribe } = attachChildrenParams(store);
+ screenSlotNode.props._children = [screen.props];
+ const initialiseChildParams = getInitialiseParams(screenSlotNode);
+ attachChildren(initialiseChildParams)(screenSlotNode.rootElement, {
+ hydrate: true,
+ force: true,
+ });
+ if (currentScreenUbsubscribe) currentScreenUbsubscribe();
+ currentScreenUbsubscribe = unsubscribe;
+ currentScreenStore = store;
+ currentUrl = url;
+ };
+
+ routeTo = screenRouter(frontendDefinition.screens, onScreenSelected);
+ routeTo(currentUrl || window.location.pathname);
+ };
+
+ const attachChildrenParams = store => {
+ let currentState = null;
+ const unsubscribe = store.subscribe(s => {
+ currentState = s;
+ });
+
+ const getInitialiseParams = treeNode => ({
+ bb: getBbClientApi,
+ coreApi,
+ store,
+ document,
+ componentLibraries,
+ frontendDefinition,
+ uiFunctions,
+ treeNode,
+ onScreenSlotRendered,
+ });
+
+ const getBbClientApi = (treeNode, componentProps) => {
+ return {
+ attachChildren: attachChildren(getInitialiseParams(treeNode)),
+ context: treeNode.context,
+ props: componentProps,
+ call: safeCallEvent,
+ setStateFromBinding: (binding, value) =>
+ setStateFromBinding(store, binding, value),
+ setState: (path, value) => setState(store, path, value),
+ getStateOrValue: (prop, currentContext) =>
+ getStateOrValue(currentState, prop, currentContext),
+ store,
+ relativeUrl,
+ api,
+ isBound,
+ parent,
+ }
+ };
+ return { getInitialiseParams, unsubscribe }
+ };
+
+ let rootTreeNode;
+
+ const initialisePage = (page, target, urlPath) => {
+ currentUrl = urlPath;
+
+ rootTreeNode = createTreeNode();
+ rootTreeNode.props = {
+ _children: [page.props],
+ };
+ rootTreeNode.rootElement = target;
+ const { getInitialiseParams } = attachChildrenParams(pageStore);
+ const initChildParams = getInitialiseParams(rootTreeNode);
+
+ attachChildren(initChildParams)(target, {
+ hydrate: true,
+ force: true,
+ });
+
+ return rootTreeNode
+ };
+ return {
+ initialisePage,
+ screenStore: () => currentScreenStore,
+ pageStore: () => pageStore,
+ routeTo: () => routeTo,
+ rootNode: () => rootTreeNode,
+ }
+ };
+
+ /* src\Container.svelte generated by Svelte v3.12.1 */
+
+ const file$1 = "src\\Container.svelte";
+
+ // (47:31)
+ function create_if_block_12(ctx) {
+ var p;
+
+ const block = {
+ c: function create() {
+ p = element("p");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ p = claim_element(nodes, "P", { class: true }, false);
+ var p_nodes = children(p);
+
+ p_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(p, "class", ctx.className);
+ add_location(p, file$1, 47, 0, 1453);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, p, anchor);
+ ctx.p_binding(p);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(p, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(p);
+ }
+
+ ctx.p_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_12.name, type: "if", source: "(47:31) ", ctx });
+ return block;
+ }
+
+ // (45:32)
+ function create_if_block_11(ctx) {
+ var figcaption;
+
+ const block = {
+ c: function create() {
+ figcaption = element("figcaption");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ figcaption = claim_element(nodes, "FIGCAPTION", { class: true }, false);
+ var figcaption_nodes = children(figcaption);
+
+ figcaption_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(figcaption, "class", ctx.className);
+ add_location(figcaption, file$1, 45, 0, 1357);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, figcaption, anchor);
+ ctx.figcaption_binding(figcaption);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(figcaption, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(figcaption);
+ }
+
+ ctx.figcaption_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_11.name, type: "if", source: "(45:32) ", ctx });
+ return block;
+ }
+
+ // (43:28)
+ function create_if_block_10(ctx) {
+ var figure;
+
+ const block = {
+ c: function create() {
+ figure = element("figure");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ figure = claim_element(nodes, "FIGURE", { class: true }, false);
+ var figure_nodes = children(figure);
+
+ figure_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(figure, "class", ctx.className);
+ add_location(figure, file$1, 43, 0, 1264);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, figure, anchor);
+ ctx.figure_binding(figure);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(figure, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(figure);
+ }
+
+ ctx.figure_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_10.name, type: "if", source: "(43:28) ", ctx });
+ return block;
+ }
+
+ // (41:26)
+ function create_if_block_9(ctx) {
+ var mark;
+
+ const block = {
+ c: function create() {
+ mark = element("mark");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ mark = claim_element(nodes, "MARK", { class: true }, false);
+ var mark_nodes = children(mark);
+
+ mark_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(mark, "class", ctx.className);
+ add_location(mark, file$1, 41, 0, 1177);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, mark, anchor);
+ ctx.mark_binding(mark);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(mark, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(mark);
+ }
+
+ ctx.mark_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_9.name, type: "if", source: "(41:26) ", ctx });
+ return block;
+ }
+
+ // (39:25)
+ function create_if_block_8(ctx) {
+ var nav;
+
+ const block = {
+ c: function create() {
+ nav = element("nav");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ nav = claim_element(nodes, "NAV", { class: true }, false);
+ var nav_nodes = children(nav);
+
+ nav_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(nav, "class", ctx.className);
+ add_location(nav, file$1, 39, 0, 1093);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, nav, anchor);
+ ctx.nav_binding(nav);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(nav, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(nav);
+ }
+
+ ctx.nav_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_8.name, type: "if", source: "(39:25) ", ctx });
+ return block;
+ }
+
+ // (37:29)
+ function create_if_block_7(ctx) {
+ var article;
+
+ const block = {
+ c: function create() {
+ article = element("article");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ article = claim_element(nodes, "ARTICLE", { class: true }, false);
+ var article_nodes = children(article);
+
+ article_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(article, "class", ctx.className);
+ add_location(article, file$1, 37, 0, 1006);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, article, anchor);
+ ctx.article_binding(article);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(article, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(article);
+ }
+
+ ctx.article_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_7.name, type: "if", source: "(37:29) ", ctx });
+ return block;
+ }
+
+ // (35:29)
+ function create_if_block_6(ctx) {
+ var details;
+
+ const block = {
+ c: function create() {
+ details = element("details");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ details = claim_element(nodes, "DETAILS", { class: true }, false);
+ var details_nodes = children(details);
+
+ details_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(details, "class", ctx.className);
+ add_location(details, file$1, 35, 0, 915);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, details, anchor);
+ ctx.details_binding(details);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(details, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(details);
+ }
+
+ ctx.details_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_6.name, type: "if", source: "(35:29) ", ctx });
+ return block;
+ }
+
+ // (33:29)
+ function create_if_block_5(ctx) {
+ var summary;
+
+ const block = {
+ c: function create() {
+ summary = element("summary");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ summary = claim_element(nodes, "SUMMARY", { class: true }, false);
+ var summary_nodes = children(summary);
+
+ summary_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(summary, "class", ctx.className);
+ add_location(summary, file$1, 33, 0, 824);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, summary, anchor);
+ ctx.summary_binding(summary);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(summary, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(summary);
+ }
+
+ ctx.summary_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_5.name, type: "if", source: "(33:29) ", ctx });
+ return block;
+ }
+
+ // (31:27)
+ function create_if_block_4(ctx) {
+ var aside;
+
+ const block = {
+ c: function create() {
+ aside = element("aside");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ aside = claim_element(nodes, "ASIDE", { class: true }, false);
+ var aside_nodes = children(aside);
+
+ aside_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(aside, "class", ctx.className);
+ add_location(aside, file$1, 31, 0, 735);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, aside, anchor);
+ ctx.aside_binding(aside);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(aside, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(aside);
+ }
+
+ ctx.aside_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_4.name, type: "if", source: "(31:27) ", ctx });
+ return block;
+ }
+
+ // (29:28)
+ function create_if_block_3(ctx) {
+ var footer;
+
+ const block = {
+ c: function create() {
+ footer = element("footer");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ footer = claim_element(nodes, "FOOTER", { class: true }, false);
+ var footer_nodes = children(footer);
+
+ footer_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(footer, "class", ctx.className);
+ add_location(footer, file$1, 29, 0, 647);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, footer, anchor);
+ ctx.footer_binding(footer);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(footer, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(footer);
+ }
+
+ ctx.footer_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_3.name, type: "if", source: "(29:28) ", ctx });
+ return block;
+ }
+
+ // (27:26)
+ function create_if_block_2(ctx) {
+ var main;
+
+ const block = {
+ c: function create() {
+ main = element("main");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ main = claim_element(nodes, "MAIN", { class: true }, false);
+ var main_nodes = children(main);
+
+ main_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(main, "class", ctx.className);
+ add_location(main, file$1, 27, 0, 560);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, main, anchor);
+ ctx.main_binding(main);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(main, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(main);
+ }
+
+ ctx.main_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_2.name, type: "if", source: "(27:26) ", ctx });
+ return block;
+ }
+
+ // (25:28)
+ function create_if_block_1(ctx) {
+ var header;
+
+ const block = {
+ c: function create() {
+ header = element("header");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ header = claim_element(nodes, "HEADER", { class: true }, false);
+ var header_nodes = children(header);
+
+ header_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(header, "class", ctx.className);
+ add_location(header, file$1, 25, 0, 473);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, header, anchor);
+ ctx.header_binding(header);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(header, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(header);
+ }
+
+ ctx.header_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_1.name, type: "if", source: "(25:28) ", ctx });
+ return block;
+ }
+
+ // (23:0) {#if type === "div"}
+ function create_if_block(ctx) {
+ var div;
+
+ const block = {
+ c: function create() {
+ div = element("div");
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ div = claim_element(nodes, "DIV", { class: true }, false);
+ var div_nodes = children(div);
+
+ div_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(div, "class", ctx.className);
+ add_location(div, file$1, 23, 0, 387);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, div, anchor);
+ ctx.div_binding(div);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.className) {
+ attr_dev(div, "class", ctx.className);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(div);
+ }
+
+ ctx.div_binding(null);
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block.name, type: "if", source: "(23:0) {#if type === \"div\"}", ctx });
+ return block;
+ }
+
+ function create_fragment(ctx) {
+ var if_block_anchor;
+
+ function select_block_type(changed, ctx) {
+ if (ctx.type === "div") return create_if_block;
+ if (ctx.type === "header") return create_if_block_1;
+ if (ctx.type === "main") return create_if_block_2;
+ if (ctx.type === "footer") return create_if_block_3;
+ if (ctx.type === "aside") return create_if_block_4;
+ if (ctx.type === "summary") return create_if_block_5;
+ if (ctx.type === "details") return create_if_block_6;
+ if (ctx.type === "article") return create_if_block_7;
+ if (ctx.type === "nav") return create_if_block_8;
+ if (ctx.type === "mark") return create_if_block_9;
+ if (ctx.type === "figure") return create_if_block_10;
+ if (ctx.type === "figcaption") return create_if_block_11;
+ if (ctx.type === "paragraph") return create_if_block_12;
+ }
+
+ var current_block_type = select_block_type(null, ctx);
+ var if_block = current_block_type && current_block_type(ctx);
+
+ const block = {
+ c: function create() {
+ if (if_block) if_block.c();
+ if_block_anchor = empty();
+ },
+
+ l: function claim(nodes) {
+ if (if_block) if_block.l(nodes);
+ if_block_anchor = empty();
+ },
+
+ m: function mount(target, anchor) {
+ if (if_block) if_block.m(target, anchor);
+ insert_dev(target, if_block_anchor, anchor);
+ },
+
+ p: function update(changed, ctx) {
+ if (current_block_type === (current_block_type = select_block_type(changed, ctx)) && if_block) {
+ if_block.p(changed, ctx);
+ } else {
+ if (if_block) if_block.d(1);
+ if_block = current_block_type && 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: function destroy(detaching) {
+ if (if_block) if_block.d(detaching);
+
+ if (detaching) {
+ detach_dev(if_block_anchor);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_fragment.name, type: "component", source: "", ctx });
+ return block;
+ }
+
+ function instance($$self, $$props, $$invalidate) {
+ let { className = "", onLoad, type, _bb } = $$props;
+
+ let containerElement;
+ let hasLoaded;
+ let currentChildren;
+
+ const writable_props = ['className', 'onLoad', 'type', '_bb'];
+ Object.keys($$props).forEach(key => {
+ if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(` was created with unknown prop '${key}'`);
+ });
+
+ function div_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ function header_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ function main_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ function footer_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ function aside_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ function summary_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ function details_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ function article_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ function nav_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ function mark_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ function figure_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ function figcaption_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ function p_binding($$value) {
+ binding_callbacks[$$value ? 'unshift' : 'push'](() => {
+ $$invalidate('containerElement', containerElement = $$value);
+ });
+ }
+
+ $$self.$set = $$props => {
+ if ('className' in $$props) $$invalidate('className', className = $$props.className);
+ if ('onLoad' in $$props) $$invalidate('onLoad', onLoad = $$props.onLoad);
+ if ('type' in $$props) $$invalidate('type', type = $$props.type);
+ if ('_bb' in $$props) $$invalidate('_bb', _bb = $$props._bb);
+ };
+
+ $$self.$capture_state = () => {
+ return { className, onLoad, type, _bb, containerElement, hasLoaded, currentChildren };
+ };
+
+ $$self.$inject_state = $$props => {
+ if ('className' in $$props) $$invalidate('className', className = $$props.className);
+ if ('onLoad' in $$props) $$invalidate('onLoad', onLoad = $$props.onLoad);
+ if ('type' in $$props) $$invalidate('type', type = $$props.type);
+ if ('_bb' in $$props) $$invalidate('_bb', _bb = $$props._bb);
+ if ('containerElement' in $$props) $$invalidate('containerElement', containerElement = $$props.containerElement);
+ if ('hasLoaded' in $$props) $$invalidate('hasLoaded', hasLoaded = $$props.hasLoaded);
+ if ('currentChildren' in $$props) currentChildren = $$props.currentChildren;
+ };
+
+ $$self.$$.update = ($$dirty = { containerElement: 1, _bb: 1, hasLoaded: 1, onLoad: 1 }) => {
+ if ($$dirty.containerElement || $$dirty._bb || $$dirty.hasLoaded || $$dirty.onLoad) { {
+ if(containerElement) {
+ _bb.attachChildren(containerElement);
+ if (!hasLoaded) {
+ _bb.call(onLoad);
+ $$invalidate('hasLoaded', hasLoaded = true);
+ }
+ }
+ } }
+ };
+
+ return {
+ className,
+ onLoad,
+ type,
+ _bb,
+ containerElement,
+ div_binding,
+ header_binding,
+ main_binding,
+ footer_binding,
+ aside_binding,
+ summary_binding,
+ details_binding,
+ article_binding,
+ nav_binding,
+ mark_binding,
+ figure_binding,
+ figcaption_binding,
+ p_binding
+ };
+ }
+
+ class Container extends SvelteComponentDev {
+ constructor(options) {
+ super(options);
+ init(this, options, instance, create_fragment, safe_not_equal, ["className", "onLoad", "type", "_bb"]);
+ dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Container", options, id: create_fragment.name });
+
+ const { ctx } = this.$$;
+ const props = options.props || {};
+ if (ctx.onLoad === undefined && !('onLoad' in props)) {
+ console.warn(" was created without expected prop 'onLoad'");
+ }
+ if (ctx.type === undefined && !('type' in props)) {
+ console.warn(" was created without expected prop 'type'");
+ }
+ if (ctx._bb === undefined && !('_bb' in props)) {
+ console.warn(" was created without expected prop '_bb'");
+ }
+ }
+
+ get className() {
+ throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''");
+ }
+
+ set className(value) {
+ throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''");
+ }
+
+ get onLoad() {
+ throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''");
+ }
+
+ set onLoad(value) {
+ throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''");
+ }
+
+ get type() {
+ throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''");
+ }
+
+ set type(value) {
+ throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''");
+ }
+
+ get _bb() {
+ throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''");
+ }
+
+ set _bb(value) {
+ throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''");
+ }
+ }
+
+ const buildStyle = styles => {
+ let str = "";
+ for (let s in styles) {
+ if (styles[s]) {
+ str += `${s}: ${styles[s]}; `;
+ }
+ }
+ return str
+ };
+
+ /* src\Text.svelte generated by Svelte v3.12.1 */
+
+ const file$2 = "src\\Text.svelte";
+
+ // (53:0) {:else}
+ function create_else_block(ctx) {
+ var t;
+
+ const block = {
+ c: function create() {
+ t = text(ctx.text);
+ },
+
+ l: function claim(nodes) {
+ t = claim_text(nodes, ctx.text);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, t, anchor);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.text) {
+ set_data_dev(t, ctx.text);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(t);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_else_block.name, type: "else", source: "(53:0) {:else}", ctx });
+ return block;
+ }
+
+ // (51:25)
+ function create_if_block_10$1(ctx) {
+ var sup, t;
+
+ const block = {
+ c: function create() {
+ sup = element("sup");
+ t = text(ctx.text);
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ sup = claim_element(nodes, "SUP", { class: true, style: true }, false);
+ var sup_nodes = children(sup);
+
+ t = claim_text(sup_nodes, ctx.text);
+ sup_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(sup, "class", ctx.className);
+ attr_dev(sup, "style", ctx.style);
+ add_location(sup, file$2, 51, 0, 1254);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, sup, anchor);
+ append_dev(sup, t);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.text) {
+ set_data_dev(t, ctx.text);
+ }
+
+ if (changed.className) {
+ attr_dev(sup, "class", ctx.className);
+ }
+
+ if (changed.style) {
+ attr_dev(sup, "style", ctx.style);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(sup);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_10$1.name, type: "if", source: "(51:25) ", ctx });
+ return block;
+ }
+
+ // (49:25)
+ function create_if_block_9$1(ctx) {
+ var sub, t;
+
+ const block = {
+ c: function create() {
+ sub = element("sub");
+ t = text(ctx.text);
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ sub = claim_element(nodes, "SUB", { class: true, style: true }, false);
+ var sub_nodes = children(sub);
+
+ t = claim_text(sub_nodes, ctx.text);
+ sub_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(sub, "class", ctx.className);
+ attr_dev(sub, "style", ctx.style);
+ add_location(sub, file$2, 49, 0, 1182);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, sub, anchor);
+ append_dev(sub, t);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.text) {
+ set_data_dev(t, ctx.text);
+ }
+
+ if (changed.className) {
+ attr_dev(sub, "class", ctx.className);
+ }
+
+ if (changed.style) {
+ attr_dev(sub, "style", ctx.style);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(sub);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_9$1.name, type: "if", source: "(49:25) ", ctx });
+ return block;
+ }
+
+ // (47:25)
+ function create_if_block_8$1(ctx) {
+ var ins, t;
+
+ const block = {
+ c: function create() {
+ ins = element("ins");
+ t = text(ctx.text);
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ ins = claim_element(nodes, "INS", { class: true, style: true }, false);
+ var ins_nodes = children(ins);
+
+ t = claim_text(ins_nodes, ctx.text);
+ ins_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(ins, "class", ctx.className);
+ attr_dev(ins, "style", ctx.style);
+ add_location(ins, file$2, 47, 0, 1110);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, ins, anchor);
+ append_dev(ins, t);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.text) {
+ set_data_dev(t, ctx.text);
+ }
+
+ if (changed.className) {
+ attr_dev(ins, "class", ctx.className);
+ }
+
+ if (changed.style) {
+ attr_dev(ins, "style", ctx.style);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(ins);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_8$1.name, type: "if", source: "(47:25) ", ctx });
+ return block;
+ }
+
+ // (45:25)
+ function create_if_block_7$1(ctx) {
+ var del, t;
+
+ const block = {
+ c: function create() {
+ del = element("del");
+ t = text(ctx.text);
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ del = claim_element(nodes, "DEL", { class: true, style: true }, false);
+ var del_nodes = children(del);
+
+ t = claim_text(del_nodes, ctx.text);
+ del_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(del, "class", ctx.className);
+ attr_dev(del, "style", ctx.style);
+ add_location(del, file$2, 45, 0, 1038);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, del, anchor);
+ append_dev(del, t);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.text) {
+ set_data_dev(t, ctx.text);
+ }
+
+ if (changed.className) {
+ attr_dev(del, "class", ctx.className);
+ }
+
+ if (changed.style) {
+ attr_dev(del, "style", ctx.style);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(del);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_7$1.name, type: "if", source: "(45:25) ", ctx });
+ return block;
+ }
+
+ // (43:27)
+ function create_if_block_6$1(ctx) {
+ var small, t;
+
+ const block = {
+ c: function create() {
+ small = element("small");
+ t = text(ctx.text);
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ small = claim_element(nodes, "SMALL", { class: true, style: true }, false);
+ var small_nodes = children(small);
+
+ t = claim_text(small_nodes, ctx.text);
+ small_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(small, "class", ctx.className);
+ attr_dev(small, "style", ctx.style);
+ add_location(small, file$2, 43, 0, 962);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, small, anchor);
+ append_dev(small, t);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.text) {
+ set_data_dev(t, ctx.text);
+ }
+
+ if (changed.className) {
+ attr_dev(small, "class", ctx.className);
+ }
+
+ if (changed.style) {
+ attr_dev(small, "style", ctx.style);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(small);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_6$1.name, type: "if", source: "(43:27) ", ctx });
+ return block;
+ }
+
+ // (41:26)
+ function create_if_block_5$1(ctx) {
+ var mark, t;
+
+ const block = {
+ c: function create() {
+ mark = element("mark");
+ t = text(ctx.text);
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ mark = claim_element(nodes, "MARK", { class: true, style: true }, false);
+ var mark_nodes = children(mark);
+
+ t = claim_text(mark_nodes, ctx.text);
+ mark_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(mark, "class", ctx.className);
+ attr_dev(mark, "style", ctx.style);
+ add_location(mark, file$2, 41, 0, 886);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, mark, anchor);
+ append_dev(mark, t);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.text) {
+ set_data_dev(t, ctx.text);
+ }
+
+ if (changed.className) {
+ attr_dev(mark, "class", ctx.className);
+ }
+
+ if (changed.style) {
+ attr_dev(mark, "style", ctx.style);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(mark);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_5$1.name, type: "if", source: "(41:26) ", ctx });
+ return block;
+ }
+
+ // (39:24)
+ function create_if_block_4$1(ctx) {
+ var em, t;
+
+ const block = {
+ c: function create() {
+ em = element("em");
+ t = text(ctx.text);
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ em = claim_element(nodes, "EM", { class: true, style: true }, false);
+ var em_nodes = children(em);
+
+ t = claim_text(em_nodes, ctx.text);
+ em_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(em, "class", ctx.className);
+ attr_dev(em, "style", ctx.style);
+ add_location(em, file$2, 39, 0, 815);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, em, anchor);
+ append_dev(em, t);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.text) {
+ set_data_dev(t, ctx.text);
+ }
+
+ if (changed.className) {
+ attr_dev(em, "class", ctx.className);
+ }
+
+ if (changed.style) {
+ attr_dev(em, "style", ctx.style);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(em);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_4$1.name, type: "if", source: "(39:24) ", ctx });
+ return block;
+ }
+
+ // (37:23)
+ function create_if_block_3$1(ctx) {
+ var i, t;
+
+ const block = {
+ c: function create() {
+ i = element("i");
+ t = text(ctx.text);
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ i = claim_element(nodes, "I", { class: true, style: true }, false);
+ var i_nodes = children(i);
+
+ t = claim_text(i_nodes, ctx.text);
+ i_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(i, "class", ctx.className);
+ attr_dev(i, "style", ctx.style);
+ add_location(i, file$2, 37, 0, 748);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, i, anchor);
+ append_dev(i, t);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.text) {
+ set_data_dev(t, ctx.text);
+ }
+
+ if (changed.className) {
+ attr_dev(i, "class", ctx.className);
+ }
+
+ if (changed.style) {
+ attr_dev(i, "style", ctx.style);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(i);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_3$1.name, type: "if", source: "(37:23) ", ctx });
+ return block;
+ }
+
+ // (35:28)
+ function create_if_block_2$1(ctx) {
+ var strong, t;
+
+ const block = {
+ c: function create() {
+ strong = element("strong");
+ t = text(ctx.text);
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ strong = claim_element(nodes, "STRONG", { class: true, style: true }, false);
+ var strong_nodes = children(strong);
+
+ t = claim_text(strong_nodes, ctx.text);
+ strong_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(strong, "class", ctx.className);
+ attr_dev(strong, "style", ctx.style);
+ add_location(strong, file$2, 35, 0, 672);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, strong, anchor);
+ append_dev(strong, t);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.text) {
+ set_data_dev(t, ctx.text);
+ }
+
+ if (changed.className) {
+ attr_dev(strong, "class", ctx.className);
+ }
+
+ if (changed.style) {
+ attr_dev(strong, "style", ctx.style);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(strong);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_2$1.name, type: "if", source: "(35:28) ", ctx });
+ return block;
+ }
+
+ // (33:23)
+ function create_if_block_1$1(ctx) {
+ var b, t;
+
+ const block = {
+ c: function create() {
+ b = element("b");
+ t = text(ctx.text);
+ this.h();
+ },
+
+ l: function claim(nodes) {
+ b = claim_element(nodes, "B", { class: true, style: true }, false);
+ var b_nodes = children(b);
+
+ t = claim_text(b_nodes, ctx.text);
+ b_nodes.forEach(detach_dev);
+ this.h();
+ },
+
+ h: function hydrate() {
+ attr_dev(b, "class", ctx.className);
+ attr_dev(b, "style", ctx.style);
+ add_location(b, file$2, 33, 0, 601);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, b, anchor);
+ append_dev(b, t);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.text) {
+ set_data_dev(t, ctx.text);
+ }
+
+ if (changed.className) {
+ attr_dev(b, "class", ctx.className);
+ }
+
+ if (changed.style) {
+ attr_dev(b, "style", ctx.style);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(b);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block_1$1.name, type: "if", source: "(33:23) ", ctx });
+ return block;
+ }
+
+ // (31:0) {#if isTag("none")}
+ function create_if_block$1(ctx) {
+ var t;
+
+ const block = {
+ c: function create() {
+ t = text(ctx.text);
+ },
+
+ l: function claim(nodes) {
+ t = claim_text(nodes, ctx.text);
+ },
+
+ m: function mount(target, anchor) {
+ insert_dev(target, t, anchor);
+ },
+
+ p: function update(changed, ctx) {
+ if (changed.text) {
+ set_data_dev(t, ctx.text);
+ }
+ },
+
+ d: function destroy(detaching) {
+ if (detaching) {
+ detach_dev(t);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_if_block$1.name, type: "if", source: "(31:0) {#if isTag(\"none\")}", ctx });
+ return block;
+ }
+
+ function create_fragment$1(ctx) {
+ var if_block_anchor;
+
+ function select_block_type(changed, ctx) {
+ if (ctx.isTag("none")) return create_if_block$1;
+ if (ctx.isTag("")) return create_if_block_1$1;
+ if (ctx.isTag("")) return create_if_block_2$1;
+ if (ctx.isTag("")) return create_if_block_3$1;
+ if (ctx.isTag("")) return create_if_block_4$1;
+ if (ctx.isTag("")) return create_if_block_5$1;
+ if (ctx.isTag("")) return create_if_block_6$1;
+ if (ctx.isTag("")) return create_if_block_7$1;
+ if (ctx.isTag("")) return create_if_block_8$1;
+ if (ctx.isTag("")) return create_if_block_9$1;
+ if (ctx.isTag("")) return create_if_block_10$1;
+ return create_else_block;
+ }
+
+ var current_block_type = select_block_type(null, ctx);
+ var if_block = current_block_type(ctx);
+
+ const block = {
+ c: function create() {
+ if_block.c();
+ if_block_anchor = empty();
+ },
+
+ l: function claim(nodes) {
+ if_block.l(nodes);
+ if_block_anchor = empty();
+ },
+
+ m: function mount(target, anchor) {
+ if_block.m(target, anchor);
+ insert_dev(target, if_block_anchor, anchor);
+ },
+
+ p: function update(changed, ctx) {
+ if_block.p(changed, ctx);
+ },
+
+ i: noop,
+ o: noop,
+
+ d: function destroy(detaching) {
+ if_block.d(detaching);
+
+ if (detaching) {
+ detach_dev(if_block_anchor);
+ }
+ }
+ };
+ dispatch_dev("SvelteRegisterBlock", { block, id: create_fragment$1.name, type: "component", source: "", ctx });
+ return block;
+ }
+
+ function instance$1($$self, $$props, $$invalidate) {
+ let { text = "", className = "", formattingTag = "", font = "", textAlign = "", verticalAlign = "", color = "", _bb } = $$props;
+
+ let style = "";
+
+ const isTag = tag => (formattingTag || "").indexOf(tag) > -1;
+
+ const writable_props = ['text', 'className', 'formattingTag', 'font', 'textAlign', 'verticalAlign', 'color', '_bb'];
+ Object.keys($$props).forEach(key => {
+ if (!writable_props.includes(key) && !key.startsWith('$$')) console.warn(` was created with unknown prop '${key}'`);
+ });
+
+ $$self.$set = $$props => {
+ if ('text' in $$props) $$invalidate('text', text = $$props.text);
+ if ('className' in $$props) $$invalidate('className', className = $$props.className);
+ if ('formattingTag' in $$props) $$invalidate('formattingTag', formattingTag = $$props.formattingTag);
+ if ('font' in $$props) $$invalidate('font', font = $$props.font);
+ if ('textAlign' in $$props) $$invalidate('textAlign', textAlign = $$props.textAlign);
+ if ('verticalAlign' in $$props) $$invalidate('verticalAlign', verticalAlign = $$props.verticalAlign);
+ if ('color' in $$props) $$invalidate('color', color = $$props.color);
+ if ('_bb' in $$props) $$invalidate('_bb', _bb = $$props._bb);
+ };
+
+ $$self.$capture_state = () => {
+ return { text, className, formattingTag, font, textAlign, verticalAlign, color, _bb, style };
+ };
+
+ $$self.$inject_state = $$props => {
+ if ('text' in $$props) $$invalidate('text', text = $$props.text);
+ if ('className' in $$props) $$invalidate('className', className = $$props.className);
+ if ('formattingTag' in $$props) $$invalidate('formattingTag', formattingTag = $$props.formattingTag);
+ if ('font' in $$props) $$invalidate('font', font = $$props.font);
+ if ('textAlign' in $$props) $$invalidate('textAlign', textAlign = $$props.textAlign);
+ if ('verticalAlign' in $$props) $$invalidate('verticalAlign', verticalAlign = $$props.verticalAlign);
+ if ('color' in $$props) $$invalidate('color', color = $$props.color);
+ if ('_bb' in $$props) $$invalidate('_bb', _bb = $$props._bb);
+ if ('style' in $$props) $$invalidate('style', style = $$props.style);
+ };
+
+ $$self.$$.update = ($$dirty = { font: 1, verticalAlign: 1, color: 1, textAlign: 1 }) => {
+ if ($$dirty.font || $$dirty.verticalAlign || $$dirty.color || $$dirty.textAlign) { {
+ $$invalidate('style', style = buildStyle({
+ font,
+ verticalAlign,
+ color,
+ "text-align": textAlign,
+ "vertical-align": verticalAlign,
+ }));
+ } }
+ };
+
+ return {
+ text,
+ className,
+ formattingTag,
+ font,
+ textAlign,
+ verticalAlign,
+ color,
+ _bb,
+ style,
+ isTag
+ };
+ }
+
+ class Text extends SvelteComponentDev {
+ constructor(options) {
+ super(options);
+ init(this, options, instance$1, create_fragment$1, safe_not_equal, ["text", "className", "formattingTag", "font", "textAlign", "verticalAlign", "color", "_bb"]);
+ dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "Text", options, id: create_fragment$1.name });
+
+ const { ctx } = this.$$;
+ const props = options.props || {};
+ if (ctx._bb === undefined && !('_bb' in props)) {
+ console.warn(" was created without expected prop '_bb'");
+ }
+ }
+
+ get text() {
+ throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''");
+ }
+
+ set text(value) {
+ throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''");
+ }
+
+ get className() {
+ throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''");
+ }
+
+ set className(value) {
+ throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''");
+ }
+
+ get formattingTag() {
+ throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''");
+ }
+
+ set formattingTag(value) {
+ throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '