You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
40 KiB
1 line
40 KiB
4 weeks ago
|
{"version":3,"file":"dataTool.js","sources":["../../node_modules/zrender/lib/core/util.js","../../extension/dataTool/gexf.js","../../extension/dataTool/prepareBoxplotData.js","../../extension/dataTool/index.js"],"sourcesContent":["import { platformApi } from './platform.js';\nvar BUILTIN_OBJECT = reduce([\n 'Function',\n 'RegExp',\n 'Date',\n 'Error',\n 'CanvasGradient',\n 'CanvasPattern',\n 'Image',\n 'Canvas'\n], function (obj, val) {\n obj['[object ' + val + ']'] = true;\n return obj;\n}, {});\nvar TYPED_ARRAY = reduce([\n 'Int8',\n 'Uint8',\n 'Uint8Clamped',\n 'Int16',\n 'Uint16',\n 'Int32',\n 'Uint32',\n 'Float32',\n 'Float64'\n], function (obj, val) {\n obj['[object ' + val + 'Array]'] = true;\n return obj;\n}, {});\nvar objToString = Object.prototype.toString;\nvar arrayProto = Array.prototype;\nvar nativeForEach = arrayProto.forEach;\nvar nativeFilter = arrayProto.filter;\nvar nativeSlice = arrayProto.slice;\nvar nativeMap = arrayProto.map;\nvar ctorFunction = function () { }.constructor;\nvar protoFunction = ctorFunction ? ctorFunction.prototype : null;\nvar protoKey = '__proto__';\nvar idStart = 0x0907;\nexport function guid() {\n return idStart++;\n}\nexport function logError() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (typeof console !== 'undefined') {\n console.error.apply(console, args);\n }\n}\nexport function clone(source) {\n if (source == null || typeof source !== 'object') {\n return source;\n }\n var result = source;\n var typeStr = objToString.call(source);\n if (typeStr === '[object Array]') {\n if (!isPrimitive(source)) {\n result = [];\n for (var i = 0, len = source.length; i < len; i++) {\n result[i] = clone(source[i]);\n }\n }\n }\n else if (TYPED_ARRAY[typeStr]) {\n if (!isPrimitive(source)) {\n var Ctor = source.constructor;\n if (Ctor.from) {\n result = Ctor.from(source);\n }\n else {\n result = new Ctor(source.length);\n for (var i = 0, len = source.length; i < len; i++) {\n result[i] = source[i];\n }\n }\n }\n }\n else if (!BUILTIN_OBJECT[typeStr] && !isPrimitive(source) && !isDom(source)) {\n result = {};\n for (var key in source) {\n if (source.hasOwnProperty(key) && key !== protoKey) {\n result[key] = clone(source[key]);\n }\n }\n }\n return result;\n}\nexport function merge(target, source, overwrite) {\n if (!isObject(source) || !isObject(target)) {\n return overwrite ? clone(source) : target;\n }\n for (var key in source) {\n if (source.hasOwnProperty(key) && key !== protoKey) {\n var targetProp = target[key];\n var sourceProp = source[key];\n if (isObject(sourceProp)\n && isObject(targetProp)\n && !isArray(sourceProp)\n && !isArray(targetProp)\n && !isDom(sourceProp)\n && !isDom(targetProp)\n && !isBuiltInObject(sourceProp)\n && !isBuiltInObject(targetProp)\n && !isPrimitive(sourceProp)\n && !isPrimitive(targetProp)) {\n merge(targetProp, sourceProp, overwrite);\n }\n else if (overwrite || !(key in target)) {\n target[key] = clone(source[key]);\n }\n }\n }\n return target;\n}\nexport function mergeAll(targetAndSources, overwrite) {\n var result = targetAndSources[0];\n for (var i = 1, len = targetAndSources.length; i < len; i++) {\n result = merge(result, targetAndSources[i], overwrite);\n }\n return result;\n}\nexport function extend(target, source) {\n if (Object.assign) {\n Object.assign(target, source);\n }\n else {\n
|