UNPKG

star-horse-devops

Version:

低代码相关组件,自定义表单组件,自定义表格组件,自定义图表组件,自定义流程图组件,自定义脑图组件

1,481 lines (1,337 loc) 12.2 MB
import { defineAsyncComponent, getCurrentInstance, inject, ref as ref$1, computed, unref, readonly, getCurrentScope, onScopeDispose, watch, shallowRef, watchEffect, onMounted, nextTick, isRef as isRef$1, warn, provide, defineComponent, createElementBlock, openBlock, mergeProps, renderSlot, createElementVNode, toRef, onUnmounted, useAttrs as useAttrs$1, useSlots, normalizeStyle, normalizeClass, createCommentVNode, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, onBeforeUnmount, Transition, withDirectives, vShow, reactive, onActivated, onUpdated, cloneVNode, Text as Text$3, Comment, Teleport as Teleport$1, onBeforeMount, onDeactivated, withKeys, createSlots, renderList, createTextVNode, isVNode, toRaw as toRaw$1, vModelCheckbox, toRefs, vModelRadio, h as h$2, resolveComponent, onBeforeUpdate, vModelText, toHandlers, normalizeProps, guardReactiveProps, TransitionGroup, markRaw, effectScope, resolveDirective, toHandlerKey, render, createApp, useCssVars, hasInjectionContext, isReactive as isReactive$1, mergeModels, useModel } from 'vue'; const comps = /* #__PURE__ */ Object.assign({"/src/packages/comp/PdfViewer.vue": () => Promise.resolve().then(() => PdfViewer$1),"/src/packages/comp/ShDynamicForm.vue": () => Promise.resolve().then(() => ShDynamicForm),"/src/packages/comp/ShTableListColumn.vue": () => Promise.resolve().then(() => ShTableListColumn),"/src/packages/comp/StarHorseButtonList.vue": () => Promise.resolve().then(() => StarHorseButtonList$1),"/src/packages/comp/StarHorseDataSelector.vue": () => Promise.resolve().then(() => StarHorseDataSelector$1),"/src/packages/comp/StarHorseDataView.vue": () => Promise.resolve().then(() => StarHorseDataView$1),"/src/packages/comp/StarHorseDataViewItems.vue": () => Promise.resolve().then(() => StarHorseDataViewItems),"/src/packages/comp/StarHorseDataViewTable.vue": () => Promise.resolve().then(() => StarHorseDataViewTable),"/src/packages/comp/StarHorseDesign.vue": () => Promise.resolve().then(() => StarHorseDesign$1),"/src/packages/comp/StarHorseDialog.vue": () => Promise.resolve().then(() => StarHorseDialog),"/src/packages/comp/StarHorseDraggable.vue": () => Promise.resolve().then(() => StarHorseDraggable$1),"/src/packages/comp/StarHorseEditor.vue": () => Promise.resolve().then(() => StarHorseEditor),"/src/packages/comp/StarHorseForm.vue": () => Promise.resolve().then(() => StarHorseForm),"/src/packages/comp/StarHorseFormItem.vue": () => Promise.resolve().then(() => StarHorseFormItem),"/src/packages/comp/StarHorseFormList.vue": () => Promise.resolve().then(() => StarHorseFormList),"/src/packages/comp/StarHorseFormTable.vue": () => Promise.resolve().then(() => StarHorseFormTable),"/src/packages/comp/StarHorseHmenu.vue": () => Promise.resolve().then(() => StarHorseHmenu$1),"/src/packages/comp/StarHorseIcon.vue": () => Promise.resolve().then(() => StarHorseIcon),"/src/packages/comp/StarHorseItem.vue": () => Promise.resolve().then(() => StarHorseItem$1),"/src/packages/comp/StarHorseJsonEditor.vue": () => Promise.resolve().then(() => StarHorseJsonEditor),"/src/packages/comp/StarHorsePopover.vue": () => Promise.resolve().then(() => StarHorsePopover$1),"/src/packages/comp/StarHorseSearchComp.vue": () => Promise.resolve().then(() => StarHorseSearchComp),"/src/packages/comp/StarHorseStaticTable.vue": () => Promise.resolve().then(() => StarHorseStaticTable$1),"/src/packages/comp/StarHorseSvg.vue": () => Promise.resolve().then(() => StarHorseSvg$1),"/src/packages/comp/StarHorseTableColumn.vue": () => Promise.resolve().then(() => StarHorseTableColumn),"/src/packages/comp/StarHorseTableComp.vue": () => Promise.resolve().then(() => StarHorseTableComp$1),"/src/packages/comp/StarHorseTableViewColumn.vue": () => Promise.resolve().then(() => StarHorseTableViewColumn),"/src/packages/comp/StarHorseTree.vue": () => Promise.resolve().then(() => StarHorseTree$1)}); const containers$1 = /* #__PURE__ */ Object.assign({"/src/packages/formcomp/container/box-container.vue": () => Promise.resolve().then(() => boxContainer$1),"/src/packages/formcomp/container/card-container.vue": () => Promise.resolve().then(() => cardContainer$1),"/src/packages/formcomp/container/collapse-container.vue": () => Promise.resolve().then(() => collapseContainer$1),"/src/packages/formcomp/container/dytable-col.vue": () => Promise.resolve().then(() => dytableCol),"/src/packages/formcomp/container/dytable-container.vue": () => Promise.resolve().then(() => dytableContainer),"/src/packages/formcomp/container/group-box-container.vue": () => Promise.resolve().then(() => groupBoxContainer),"/src/packages/formcomp/container/tab-container.vue": () => Promise.resolve().then(() => tabContainer$1),"/src/packages/formcomp/container/table-container.vue": () => Promise.resolve().then(() => tableContainer$1)}); const items = /* #__PURE__ */ Object.assign({"/src/packages/formcomp/items/area-item.vue": () => Promise.resolve().then(() => areaItem$1),"/src/packages/formcomp/items/audio-item.vue": () => Promise.resolve().then(() => audioItem$1),"/src/packages/formcomp/items/autocomplete-item.vue": () => Promise.resolve().then(() => autocompleteItem$1),"/src/packages/formcomp/items/button-item.vue": () => Promise.resolve().then(() => buttonItem$1),"/src/packages/formcomp/items/cascade-item.vue": () => Promise.resolve().then(() => cascadeItem$1),"/src/packages/formcomp/items/checkbox-item.vue": () => Promise.resolve().then(() => checkboxItem$1),"/src/packages/formcomp/items/color-item.vue": () => Promise.resolve().then(() => colorItem$1),"/src/packages/formcomp/items/comp-item.vue": () => Promise.resolve().then(() => compItem$1),"/src/packages/formcomp/items/cron-item.vue": () => Promise.resolve().then(() => cronItem$1),"/src/packages/formcomp/items/datetime-item.vue": () => Promise.resolve().then(() => datetimeItem$1),"/src/packages/formcomp/items/depart-item.vue": () => Promise.resolve().then(() => departItem$1),"/src/packages/formcomp/items/dialog-input-item.vue": () => Promise.resolve().then(() => dialogInputItem$1),"/src/packages/formcomp/items/divider-item.vue": () => Promise.resolve().then(() => dividerItem$1),"/src/packages/formcomp/items/editor-item.vue": () => Promise.resolve().then(() => editorItem$1),"/src/packages/formcomp/items/excel-item.vue": () => Promise.resolve().then(() => excelItem$1),"/src/packages/formcomp/items/html-item.vue": () => Promise.resolve().then(() => htmlItem$1),"/src/packages/formcomp/items/htmleditor-item.vue": () => Promise.resolve().then(() => htmleditorItem$1),"/src/packages/formcomp/items/icon-item.vue": () => Promise.resolve().then(() => iconItem$1),"/src/packages/formcomp/items/image-item.vue": () => Promise.resolve().then(() => imageItem$1),"/src/packages/formcomp/items/input-item.vue": () => Promise.resolve().then(() => inputItem$1),"/src/packages/formcomp/items/json-array-item.vue": () => Promise.resolve().then(() => jsonArrayItem$1),"/src/packages/formcomp/items/json-item.vue": () => Promise.resolve().then(() => jsonItem$1),"/src/packages/formcomp/items/markdown-item.vue": () => Promise.resolve().then(() => markdownItem$1),"/src/packages/formcomp/items/number-item.vue": () => Promise.resolve().then(() => numberItem$1),"/src/packages/formcomp/items/number-range-item.vue": () => Promise.resolve().then(() => numberRangeItem$1),"/src/packages/formcomp/items/page-select-item.vue": () => Promise.resolve().then(() => pageSelectItem$1),"/src/packages/formcomp/items/password-item.vue": () => Promise.resolve().then(() => passwordItem$1),"/src/packages/formcomp/items/pdf-item.vue": () => Promise.resolve().then(() => pdfItem$1),"/src/packages/formcomp/items/radio-item.vue": () => Promise.resolve().then(() => radioItem$1),"/src/packages/formcomp/items/rate-item.vue": () => Promise.resolve().then(() => rateItem$1),"/src/packages/formcomp/items/select-item.vue": () => Promise.resolve().then(() => selectItem$1),"/src/packages/formcomp/items/signature-item.vue": () => Promise.resolve().then(() => signatureItem$1),"/src/packages/formcomp/items/slider-item.vue": () => Promise.resolve().then(() => sliderItem$1),"/src/packages/formcomp/items/starhorse-form-item.vue": () => Promise.resolve().then(() => starhorseFormItem),"/src/packages/formcomp/items/switch-item.vue": () => Promise.resolve().then(() => switchItem$1),"/src/packages/formcomp/items/text-item.vue": () => Promise.resolve().then(() => textItem$1),"/src/packages/formcomp/items/textarea-item.vue": () => Promise.resolve().then(() => textareaItem$1),"/src/packages/formcomp/items/time-item.vue": () => Promise.resolve().then(() => timeItem$1),"/src/packages/formcomp/items/time-picker-item.vue": () => Promise.resolve().then(() => timePickerItem$1),"/src/packages/formcomp/items/transfer-item.vue": () => Promise.resolve().then(() => transferItem$1),"/src/packages/formcomp/items/tselect-item.vue": () => Promise.resolve().then(() => tselectItem$1),"/src/packages/formcomp/items/unknown-item.vue": () => Promise.resolve().then(() => unknownItem$1),"/src/packages/formcomp/items/upload-item.vue": () => Promise.resolve().then(() => uploadItem$1),"/src/packages/formcomp/items/user-item.vue": () => Promise.resolve().then(() => userItem$1),"/src/packages/formcomp/items/vedio-item.vue": () => Promise.resolve().then(() => vedioItem$1),"/src/packages/formcomp/items/view-markdown-item.vue": () => Promise.resolve().then(() => viewMarkdownItem$1),"/src/packages/formcomp/items/word-item.vue": () => Promise.resolve().then(() => wordItem$1)}); const install = (app) => { for (const [key, value] of Object.entries(comps)) { const name = key.slice(key.lastIndexOf("/") + 1, key.lastIndexOf(".")); app.component(name, defineAsyncComponent(value)); } for (const [key, value] of Object.entries(containers$1)) { const name = key.slice(key.lastIndexOf("/") + 1, key.lastIndexOf(".")); app.component(name, defineAsyncComponent(value)); } for (const [key, value] of Object.entries(items)) { const name = key.slice(key.lastIndexOf("/") + 1, key.lastIndexOf(".")); app.component(name, defineAsyncComponent(value)); } }; function registerComp(app) { install(app); } /* unplugin-vue-components disabled */ const _export_sfc$3 = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; /* unplugin-vue-components disabled */const _sfc_main$3C = {}; function _sfc_render$1a(_ctx, _cache) { return null } const PdfViewer = /*#__PURE__*/_export_sfc$3(_sfc_main$3C, [['render',_sfc_render$1a],['__scopeId',"data-v-a192abfd"]]); const PdfViewer$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({ __proto__: null, default: PdfViewer }, Symbol.toStringTag, { value: 'Module' })); const configProviderContextKey = Symbol(); const defaultNamespace = "el"; const statePrefix = "is-"; const _bem = (namespace, block, blockSuffix, element, modifier) => { let cls = `${namespace}-${block}`; if (blockSuffix) { cls += `-${blockSuffix}`; } if (element) { cls += `__${element}`; } if (modifier) { cls += `--${modifier}`; } return cls; }; const namespaceContextKey = Symbol("namespaceContextKey"); const useGetDerivedNamespace = (namespaceOverrides) => { const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref$1(defaultNamespace)) : ref$1(defaultNamespace)); const namespace = computed(() => { return unref(derivedNamespace) || defaultNamespace; }); return namespace; }; const useNamespace = (block, namespaceOverrides) => { const namespace = useGetDerivedNamespace(namespaceOverrides); const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", ""); const e = (element) => element ? _bem(namespace.value, block, "", element, "") : ""; const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : ""; const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : ""; const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : ""; const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : ""; const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : ""; const is = (name, ...args) => { const state = args.length >= 1 ? args[0] : true; return name && state ? `${statePrefix}${name}` : ""; }; const cssVar = (object) => { const styles = {}; for (const key in object) { if (object[key]) { styles[`--${namespace.value}-${key}`] = object[key]; } } return styles; }; const cssVarBlock = (object) => { const styles = {}; for (const key in object) { if (object[key]) { styles[`--${namespace.value}-${block}-${key}`] = object[key]; } } return styles; }; const cssVarName = (name) => `--${namespace.value}-${name}`; const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`; return { namespace, b, e, m, be, em, bm, bem, is, cssVar, cssVarName, cssVarBlock, cssVarBlockName }; }; /** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {}; !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : []; const NOOP = () => { }; const hasOwnProperty$j = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty$j.call(val, key); const isArray$3 = Array.isArray; const isDate$2 = (val) => toTypeString(val) === "[object Date]"; const isFunction$3 = (val) => typeof val === "function"; const isString$3 = (val) => typeof val === "string"; const isObject$2 = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { return (isObject$2(val) || isFunction$3(val)) && isFunction$3(val.then) && isFunction$3(val.catch); }; const objectToString$1 = Object.prototype.toString; const toTypeString = (value) => objectToString$1.call(value); const isPlainObject$3 = (val) => toTypeString(val) === "[object Object]"; const cacheStringFunction$1 = (fn) => { const cache = /* @__PURE__ */ Object.create(null); return (str) => { const hit = cache[str]; return hit || (cache[str] = fn(str)); }; }; const camelizeRE = /-(\w)/g; const camelize$1 = cacheStringFunction$1( (str) => { return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); } ); const hyphenateRE = /\B([A-Z])/g; const hyphenate = cacheStringFunction$1( (str) => str.replace(hyphenateRE, "-$1").toLowerCase() ); const capitalize$2 = cacheStringFunction$1((str) => { return str.charAt(0).toUpperCase() + str.slice(1); }); /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; /** Detect free variable `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')(); /** Built-in value references. */ var Symbol$1 = root.Symbol; /** Used for built-in method references. */ var objectProto$j = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$i = objectProto$j.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString$1 = objectProto$j.toString; /** Built-in value references. */ var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty$i.call(value, symToStringTag$1), tag = value[symToStringTag$1]; try { value[symToStringTag$1] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString$1.call(value); if (unmasked) { if (isOwn) { value[symToStringTag$1] = tag; } else { delete value[symToStringTag$1]; } } return result; } /** Used for built-in method references. */ var objectProto$i = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto$i.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } /** `Object#toString` result references. */ var symbolTag$3 = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol$1(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag$3); } /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray$2 = Array.isArray; /** Used to convert symbols to primitives and strings. */ var symbolProto$2 = Symbol$1 ? Symbol$1.prototype : undefined, symbolToString = symbolProto$2 ? symbolProto$2.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray$2(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol$1(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -Infinity) ? '-0' : result; } /** Used to match a single whitespace character. */ var reWhitespace = /\s/; /** * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace * character of `string`. * * @private * @param {string} string The string to inspect. * @returns {number} Returns the index of the last non-whitespace character. */ function trimmedEndIndex(string) { var index = string.length; while (index-- && reWhitespace.test(string.charAt(index))) {} return index; } /** Used to match leading whitespace. */ var reTrimStart = /^\s+/; /** * The base implementation of `_.trim`. * * @private * @param {string} string The string to trim. * @returns {string} Returns the trimmed string. */ function baseTrim(string) { return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') : string; } /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject$1(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } /** Used as references for various `Number` constants. */ var NAN$1 = 0 / 0; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol$1(value)) { return NAN$1; } if (isObject$1(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject$1(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = baseTrim(value); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN$1 : +value); } /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity$1(value) { return value; } /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag$2 = '[object Function]', genTag$1 = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction$2(value) { if (!isObject$1(value)) { 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$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag; } /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; /** 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) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } /** Used for built-in method references. */ var funcProto$2 = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString$2 = funcProto$2.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString$2.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto$1 = Function.prototype, objectProto$h = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString$1 = funcProto$1.toString; /** Used to check objects for own properties. */ var hasOwnProperty$h = objectProto$h.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString$1.call(hasOwnProperty$h).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject$1(value) || isMasked(value)) { return false; } var pattern = isFunction$2(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue$1(object, key) { return object == null ? undefined : object[key]; } /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue$1(object, key); return baseIsNative(value) ? value : undefined; } /* Built-in method references that are verified to be native. */ var WeakMap$1 = getNative(root, 'WeakMap'); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject$1(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply$1(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]); } return func.apply(thisArg, args); } /** * This method returns `undefined`. * * @static * @memberOf _ * @since 2.3.0 * @category Util * @example * * _.times(2, _.noop); * // => [undefined, undefined] */ function noop$4() { // No operation performed. } /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeNow = Date.now; /** * Creates a function that'll short out and invoke `identity` instead * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` * milliseconds. * * @private * @param {Function} func The function to restrict. * @returns {Function} Returns the new shortable function. */ function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined, arguments); }; } /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !defineProperty ? identity$1 : function(func, string) { return defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(string), 'writable': true }); }; /** * Sets the `toString` method of `func` to return `string`. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var setToString = shortOut(baseSetToString); /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { return index; } } return -1; } /** * The base implementation of `_.isNaN` without support for number objects. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. */ function baseIsNaN(value) { return value !== value; } /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } /** * A specialized version of `_.includes` for arrays without support for * specifying an index to search from. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @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; } /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER$1 = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @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$1 : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && (value > -1 && value % 1 == 0 && value < length); } /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq$1(value, other) { return value === other || (value !== value && other !== other); } /** Used for built-in method references. */ var objectProto$g = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$g = objectProto$g.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty$g.call(object, key) && eq$1(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax$1 = Math.max; /** * A specialized version of `baseRest` which transforms the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @param {Function} transform The rest array transform. * @returns {Function} Returns the new function. */ function overRest(func, start, transform) { start = nativeMax$1(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax$1(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return apply$1(func, this, otherArgs); }; } /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { return setToString(overRest(func, start, identity$1), func + ''); } /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction$2(value); } /** * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, * else `false`. */ function isIterateeCall(value, index, object) { if (!isObject$1(object)) { return false; } var type = typeof index; if (type == 'number' ? (isArrayLike(object) && isIndex(index, object.length)) : (type == 'string' && index in object) ) { return eq$1(object[index], value); } return false; } /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } /** Used for built-in method references. */ var objectProto$f = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$f; return value === proto; } /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } /** `Object#toString` result references. */ var argsTag$3 = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag$3; } /** Used for built-in method references. */ var objectProto$e = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty$f = objectProto$e.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable$1 = objectProto$e.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty$f.call(value, 'callee') && !propertyIsEnumerable$1.call(value, 'callee'); }; /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } /** Detect free variable `exports`. */ var freeExports$2 = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule$2 = freeExports$2 && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2; /** Built-in value references. */ var Buffer$3 = moduleExports$2 ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer$3 ? Buffer$3.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer$1 = nativeIsBuffer || stubFalse; /** `Object#toString` result references. */ var argsTag$2 = '[object Arguments]', arrayTag$2 = '[object Array]', boolTag$3 = '[object Boolean]', dateTag$3 = '[object Date]', errorTag$2 = '[object Error]', funcTag$1 = '[object Function]', mapTag$6 = '[object Map]', numberTag$4 = '[object Number]', objectTag$4 = '[object Object]', regexpTag$3 = '[object RegExp]', setTag$6 = '[object Set]', stringTag$3 = '[object String]', weakMapTag$2 = '[object WeakMap]'; var arrayBufferTag$3 = '[object ArrayBuffer]', dataViewTag$4 = '[object DataView]', float32Tag$2 = '[object Float32Array]', float64Tag$2 = '[object Float64Array]', int8Tag$2 = '[object Int8Array]', int16Tag$2 = '[object Int16Array]', int32Tag$2 = '[object Int32Array]', uint8Tag$2 = '[object Uint8Array]', uint8ClampedTag$2 = '[object Uint8ClampedArray]', uint16Tag$2 = '[object Uint16Array]', uint32Tag$2 = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true; typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$6] = typedArrayTags[numberTag$4] = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$6] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } /** Detect free variable `exports`. */ var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1; /** Detect free variable `process` from Node.j