'use strict';
// can we use __proto__?
function getHasProto() {
var hasProto = false;
if ('__proto__' in {}) {
var fn = function () {};
var arr = [];
arr.__proto__ = { push: fn };
hasProto = fn === arr.push;
}
return hasProto;
}
var hasProto = getHasProto();
var _Set; // $flow-disable-line
/* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {
// use native Set when available.
_Set = Set;
} else {
// a non-standard Set polyfill that only works with primitive keys.
_Set = /*@__PURE__*/(function () {
function Set() {
this.set = Object.create(null);
}
Set.prototype.has = function has (key) {
return this.set[key] === true;
};
Set.prototype.add = function add (key) {
this.set[key] = true;
};
Set.prototype.clear = function clear () {
this.set = Object.create(null);
};
return Set;
}());
}
/* istanbul ignore next */
function isNative(Ctor) {
return typeof Ctor === 'function' && /native code/.test(Ctor.toString());
}
/**
* String type check
*/
var isStr = function (v) { return typeof v === 'string'; };
/**
* Number type check
*/
var isNum = function (v) { return typeof v === 'number'; };
/**
* Array type check
*/
var isArr = Array.isArray;
/**
* undefined type check
*/
var isUndef = function (v) { return v === undefined; };
/**
* Function type check
*/
var isFunc = function (v) { return typeof v === 'function'; };
/**
* Quick object check - this is primarily used to tell
* Objects from primitive values when we know the value
* is a JSON-compliant type.
*/
function isObject(obj) {
return obj !== null && typeof obj === 'object';
}
var isObj = isObject;
/**
* Strict object type check. Only returns true
* for plain JavaScript objects.
*/
var _toString = Object.prototype.toString;
function isPlainObject(obj) {
return _toString.call(obj) === '[object Object]';
}
/**
* Check whether the object has the property.
*/
var hasOwnProperty = Object.prototype.hasOwnProperty;
function hasOwn(obj, key) {
return hasOwnProperty.call(obj, key);
}
/**
* Perform no operation.
* Stubbing args to make Flow happy without leaving useless transpiled code
* with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/)
*/
// eslint-disable-next-line
function noop(a, b, c) {}
/**
* Check if val is a valid array index.
*/
function isValidArrayIndex(val) {
var n = parseFloat(String(val));
return n >= 0 && Math.floor(n) === n && isFinite(val);
}
/**
* Convert an Array-lik object to a real Array
*/
function toArray(list, start) {
if ( start === void 0 ) start = 0;
var i = list.length - start;
var rst = new Array(i);
while (i--) {
rst[i] = list[i + start];
}
return rst;
}
/**
* Cached simply key function return
*/
var cached = function (fn) {
var cache = {};
return function (str) { return cache[str] || (cache[str] = fn(str)); };
};
var camelizeRE = /-(\w)/g;
/**
* camelize words
* e.g. my-key => myKey
*/
var camelize = cached(function (str) { return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); }); });
/*
* extend objects
* e.g.
* extend({}, {a: 1}) : extend {a: 1} to {}
* extend(true, [], [1,2,3]) : deep extend [1,2,3] to an empty array
* extend(true, {}, {a: 1}, {b: 2}) : deep extend two objects to {}
*/
function extend() {
var arguments$1 = arguments;
var options,
name,
src,
copy,
copyIsArray,
clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
deep = false;
// Handle a deep copy situation
if (typeof target === 'boolean') {
deep = target;
// Skip the boolean and the target
target = arguments[i] || {};
i++;
}
// Handle case when target is a string or something (possible in deep copy)
if (typeof target !== 'object' && !(typeof target === 'function')) {
target = {};
}
// Extend jQuery itself if only one argument is passed
if (i === length) {
target = this;
i--;
}
for (; i < length; i++) {
// Only deal with non-null/undefined values
if ((options = arguments$1[i])) {
// Extend the base object
for (name in options) {
src = target[name];
copy = options[name];
// Prevent never-ending loop
if (target === copy) {
continue;
}
// Recurse if we're merging plain objects or arrays
if (deep && copy && (isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
if (copyIsArray) {
copyIsArray = false;
clone = src && Array.isArray(src) ? src : [];
} else {
clone = src && isPlainObject(src) ? src : {};
}
// Never move original objects, clone them
target[name] = extend(deep, clone, copy);
// Don't bring in undefined values => bring undefined values
} else {
target[name] = copy;
}
}
}
}
// Return the modified object
return target;
}
/*
* clone objects, return a cloned object default to use deep clone
* e.g.
* clone({a: 1})
* clone({a: b: {c : 1}}, false);
*/
function clone(sth, deep) {
if ( deep === void 0 ) deep = true;
if (isArr(sth)) {
return extend(deep, [], sth);
} else if ('' + sth === 'null') {
return sth;
} else if (isPlainObject(sth)) {
return extend(deep, {}, sth);
} else {
return sth;
}
}
var WEAPP_APP_LIFECYCLE = ['onLaunch', 'onShow', 'onHide', 'onError', 'onPageNotFound'];
var WEAPP_PAGE_LIFECYCLE = [
'onLoad',
'onShow',
'onReady',
'onHide',
'onUnload',
'onPullDownRefresh',
'onReachBottom',
'onShareAppMessage',
'onPageScroll',
'onTabItemTap',
'onResize'
];
var WEAPP_COMPONENT_LIFECYCLE = ['beforeCreate', 'created', 'attached', 'ready', 'moved', 'detached'];
var WEAPP_LIFECYCLE = []
.concat(WEAPP_APP_LIFECYCLE)
.concat(WEAPP_PAGE_LIFECYCLE)
.concat(WEAPP_COMPONENT_LIFECYCLE);
var config = {};
var warn = noop;
var generateComponentTrace = function(vm) {
return ("Found in component: \"" + (vm.$is) + "\"");
};
{
var hasConsole = typeof console !== 'undefined';
// TODO
warn = function (msg, vm) {
if (hasConsole && !config.silent) {
// eslint-disable-next-line
console.error("[WePY warn]: " + msg + (vm ? generateComponentTrace(vm) : ''));
}
};
}
function handleError(err, vm, info) {
if (vm) {
var cur = vm;
while ((cur = cur.$parent)) {
var hooks = cur.$options.errorCaptured;
if (hooks) {
for (var i = 0; i < hooks.length; i++) {
try {
var capture = hooks[i].call(cur, err, vm, info) === false;
if (capture) { return; }
} catch (e) {
globalHandleError(e, cur, 'errorCaptured hook');
}
}
}
}
}
globalHandleError(err, vm, info);
}
function globalHandleError(err, vm, info) {
if (config.errorHandler) {
try {
return config.errorHandler.call(null, err, vm, info);
} catch (e) {
logError(e, null, 'config.errorHandler');
}
}
logError(err, vm, info);
}
function logError(err, vm, info) {
{
warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
}
/* istanbul ignore else */
if (typeof console !== 'undefined') {
// eslint-disable-next-line
console.error(err);
} else {
throw err;
}
}
var callbacks = [];
var pending = false;
function flushCallbacks() {
pending = false;
var copies = callbacks.slice(0);
callbacks.length = 0;
for (var i = 0; i < copies.length; i++) {
copies[i]();
}
}
// Here we have async deferring wrappers using both micro and macro tasks.
// In < 2.4 we used micro tasks everywhere, but there are some scenarios where
// micro tasks have too high a priority and fires in between supposedly
// sequential events (e.g. #4521, #6690) or even between bubbling of the same
// event (#6566). However, using macro tasks everywhere also has s
xyq2024
- 粉丝: 3015
- 资源: 5586
最新资源
- 三相可控整流电路设计与仿真文档:涵盖主电路设计、参数计算及元件选择,三相可控整流电路的设计与仿真,带文档,有需要的直接,文档中有可控主电路设计及参数计算,计算整流电压器参数,选择整流元件的额定等
- PowerDesigner 16.7 64位破jie解 dll文件
- "西门子S7-200与组态王仿真技术:电梯系统六层运行原理图与程序送报研究",西门子s7-200和组态王仿真,需与实物接线 两部电梯六层 电梯仿真 送报告 原理图 程序 ,西门子S7-200;组态王
- 掌讯车机SD8227 新UI车速版-1024x600 版本6.6 ROM 带root全套资料
- 永磁同步电机矢量控制Matlab仿真:双闭环与前馈补偿下的波形表现优秀,永磁同步电机矢量控制Marlab仿真(采用双闭环以及前馈补偿的控制方式)波形完好 ,核心关键词:永磁同步电机;矢量控制;Mar
- 基于SMIC18EE工艺的24位高精度Sigma Delta ADC模拟电路设计:学习架构与电路搭建指南,sigma delta ADC 模拟ic设计 24位高精度sigma delta ADC 使用
- 马原期末复习 选择题知识点
- 粉煤灰加固土研究现状综述.pdf
- 高海拔输油管道气保护药芯焊丝半自动焊工艺研究与应用.pdf
- 非常规油气储层孔隙结构研究方法及评价参数综述.pdf
- 高难山地测量工序施工行进线路规划及应用探讨.pdf
- 混凝土板柱节点弯曲裂缝截面冲切承载力验算方法研究.pdf
- 高应力下岩石损伤破裂机制研究进展.pdf
- 基于ResNet-ViT和注意力机制的车道线检测方法.pdf
- 基于ROC分析及样本熵的轴承故障检测.pdf
- 基于BERT的机构名命名实体细粒度实体识别研究.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈