cube-ui
Version:
A fantastic mobile ui lib implement by Vue
1,786 lines (1,477 loc) • 79.3 kB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["recycle-list"] = factory();
else
root["cube"] = root["cube"] || {}, root["cube"]["recycle-list"] = factory();
})(typeof self !== 'undefined' ? self : this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "./";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 352);
/******/ })
/************************************************************************/
/******/ ({
/***/ 0:
/***/ (function(module, exports) {
var core = module.exports = { version: '2.5.7' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
/***/ 1:
/***/ (function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func
: Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
/***/ }),
/***/ 10:
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(1);
var core = __webpack_require__(0);
var ctx = __webpack_require__(31);
var hide = __webpack_require__(6);
var has = __webpack_require__(5);
var PROTOTYPE = 'prototype';
var $export = function (type, name, source) {
var IS_FORCED = type & $export.F;
var IS_GLOBAL = type & $export.G;
var IS_STATIC = type & $export.S;
var IS_PROTO = type & $export.P;
var IS_BIND = type & $export.B;
var IS_WRAP = type & $export.W;
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
var expProto = exports[PROTOTYPE];
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
var key, own, out;
if (IS_GLOBAL) source = name;
for (key in source) {
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
if (own && has(exports, key)) continue;
// export native or passed
out = own ? target[key] : source[key];
// prevent global pollution for namespaces
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
// bind timers to global for call from export context
: IS_BIND && own ? ctx(out, global)
// wrap global constructors for prevent change them in library
: IS_WRAP && target[key] == out ? (function (C) {
var F = function (a, b, c) {
if (this instanceof C) {
switch (arguments.length) {
case 0: return new C();
case 1: return new C(a);
case 2: return new C(a, b);
} return new C(a, b, c);
} return C.apply(this, arguments);
};
F[PROTOTYPE] = C[PROTOTYPE];
return F;
// make static versions for prototype methods
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
if (IS_PROTO) {
(exports.virtual || (exports.virtual = {}))[key] = out;
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
}
}
};
// type bitmap
$export.F = 1; // forced
$export.G = 2; // global
$export.S = 4; // static
$export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
$export.U = 64; // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;
/***/ }),
/***/ 107:
/***/ (function(module, exports, __webpack_require__) {
function injectStyle (ssrContext) {
__webpack_require__(114)
}
var Component = __webpack_require__(9)(
/* script */
__webpack_require__(115),
/* template */
__webpack_require__(116),
/* styles */
injectStyle,
/* scopeId */
null,
/* moduleIdentifier (server only) */
null
)
module.exports = Component.exports
/***/ }),
/***/ 11:
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (e) {
return true;
}
};
/***/ }),
/***/ 114:
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/***/ 115:
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof exports !== "undefined") {
factory(module, exports);
} else {
var mod = {
exports: {}
};
factory(mod, mod.exports);
global.loading = mod.exports;
}
})(this, function (module, exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var COMPONENT_NAME = 'cube-loading';
exports.default = {
name: COMPONENT_NAME,
data: function data() {
return {
balde: 12
};
},
props: {
size: {
type: Number
}
},
computed: {
style: function style() {
if (!this.size) {
return;
}
var value = this.size + 'px';
return {
width: value,
height: value
};
}
}
};
module.exports = exports['default'];
});
/***/ }),
/***/ 116:
/***/ (function(module, exports) {
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
return _c('div', {
staticClass: "cube-loading"
}, [_c('span', {
staticClass: "cube-loading-spinners",
style: (_vm.style)
}, _vm._l((_vm.balde), function(item) {
return _c('i', {
staticClass: "cube-loading-spinner"
})
}))])
},staticRenderFns: []}
/***/ }),
/***/ 12:
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(8);
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/***/ 13:
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(36);
var enumBugKeys = __webpack_require__(25);
module.exports = Object.keys || function keys(O) {
return $keys(O, enumBugKeys);
};
/***/ }),
/***/ 14:
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ 15:
/***/ (function(module, exports) {
module.exports = true;
/***/ }),
/***/ 16:
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/***/ 17:
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/***/ 18:
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
/***/ }),
/***/ 19:
/***/ (function(module, exports) {
// 7.2.1 RequireObjectCoercible(argument)
module.exports = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/***/ 2:
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__(24)('wks');
var uid = __webpack_require__(17);
var Symbol = __webpack_require__(1).Symbol;
var USE_SYMBOL = typeof Symbol == 'function';
var $exports = module.exports = function (name) {
return store[name] || (store[name] =
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};
$exports.store = store;
/***/ }),
/***/ 20:
/***/ (function(module, exports) {
// 7.1.4 ToInteger
var ceil = Math.ceil;
var floor = Math.floor;
module.exports = function (it) {
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
/***/ }),
/***/ 21:
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/***/ 22:
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(8);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
if (!isObject(it)) return it;
var fn, val;
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/***/ 23:
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__(24)('keys');
var uid = __webpack_require__(17);
module.exports = function (key) {
return shared[key] || (shared[key] = uid(key));
};
/***/ }),
/***/ 24:
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__(0);
var global = __webpack_require__(1);
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: core.version,
mode: __webpack_require__(15) ? 'pure' : 'global',
copyright: '© 2018 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ 25:
/***/ (function(module, exports) {
// IE 8- don't enum bug keys
module.exports = (
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
/***/ }),
/***/ 26:
/***/ (function(module, exports, __webpack_require__) {
var def = __webpack_require__(4).f;
var has = __webpack_require__(5);
var TAG = __webpack_require__(2)('toStringTag');
module.exports = function (it, tag, stat) {
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};
/***/ }),
/***/ 27:
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(19);
module.exports = function (it) {
return Object(defined(it));
};
/***/ }),
/***/ 28:
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(8);
var document = __webpack_require__(1).document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return is ? document.createElement(it) : {};
};
/***/ }),
/***/ 29:
/***/ (function(module, exports, __webpack_require__) {
exports.f = __webpack_require__(2);
/***/ }),
/***/ 3:
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(11)(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ 30:
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(1);
var core = __webpack_require__(0);
var LIBRARY = __webpack_require__(15);
var wksExt = __webpack_require__(29);
var defineProperty = __webpack_require__(4).f;
module.exports = function (name) {
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
};
/***/ }),
/***/ 31:
/***/ (function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(34);
module.exports = function (fn, that, length) {
aFunction(fn);
if (that === undefined) return fn;
switch (length) {
case 1: return function (a) {
return fn.call(that, a);
};
case 2: return function (a, b) {
return fn.call(that, a, b);
};
case 3: return function (a, b, c) {
return fn.call(that, a, b, c);
};
}
return function (/* ...args */) {
return fn.apply(that, arguments);
};
};
/***/ }),
/***/ 32:
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/***/ 33:
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(3) && !__webpack_require__(11)(function () {
return Object.defineProperty(__webpack_require__(28)('div'), 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ 34:
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/***/ 35:
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(48), __webpack_require__(37), __webpack_require__(53), __webpack_require__(47)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof exports !== "undefined") {
factory(exports, require('babel-runtime/core-js/object/keys'), require('babel-runtime/helpers/defineProperty'), require('babel-runtime/helpers/typeof'), require('../lang/string'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.keys, global.defineProperty, global._typeof, global.string);
global.util = mod.exports;
}
})(this, function (exports, _keys, _defineProperty2, _typeof2, _string) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getIOSVersion = exports.isNumber = exports.isObject = exports.isString = exports.isArray = exports.isFunc = exports.isUndef = exports.parsePath = exports.processComponentName = exports.debounce = exports.cb2PromiseWithResolve = exports.parallel = exports.resetTypeValue = exports.createAddAPI = exports.deepAssign = exports.findIndex = undefined;
var _keys2 = _interopRequireDefault(_keys);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _typeof3 = _interopRequireDefault(_typeof2);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function findIndex(ary, fn) {
if (ary.findIndex) {
return ary.findIndex(fn);
}
var index = -1;
ary.some(function (item, i, ary) {
var ret = fn.call(this, item, i, ary);
if (ret) {
index = i;
return ret;
}
});
return index;
}
function deepAssign(to, from) {
for (var key in from) {
if (!to[key] || (0, _typeof3.default)(to[key]) !== 'object') {
to[key] = from[key];
} else {
deepAssign(to[key], from[key]);
}
}
}
function createAddAPI(baseObj) {
return function add() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (typeof args[0] === 'string') {
args[0] = (0, _defineProperty3.default)({}, args[0], args[1]);
}
deepAssign(baseObj, args[0]);
};
}
function judgeTypeFnCreator(type) {
var toString = Object.prototype.toString;
return function isType(o) {
return toString.call(o) === '[object ' + type + ']';
};
}
var typesReset = {
_set: function _set(obj, key, value) {
obj[key] = value;
},
string: function string(obj, key) {
typesReset._set(obj, key, '');
},
number: function number(obj, key) {
typesReset._set(obj, key, 0);
},
boolean: function boolean(obj, key) {
typesReset._set(obj, key, false);
},
object: function object(obj, key, value) {
if (Array.isArray(value)) {
typesReset._set(obj, key, []);
} else {
typesReset._set(obj, key, {});
}
}
};
function resetTypeValue(obj, key, defVal) {
if (defVal !== undefined) {
return typesReset._set(obj, key, defVal);
}
if (key) {
var value = obj[key];
var resetHandler = typesReset[typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)];
resetHandler && resetHandler(obj, key, value);
} else {
(0, _keys2.default)(obj).forEach(function (key) {
resetTypeValue(obj, key);
});
}
}
function parallel(tasks, cb) {
var doneCount = 0;
var results = [];
var tasksLen = tasks.length;
if (!tasksLen) {
return cb(results);
}
tasks.forEach(function (task, i) {
task(function (ret) {
doneCount += 1;
results[i] = ret;
if (doneCount === tasksLen) {
cb(results);
}
});
});
}
function cb2PromiseWithResolve(cb) {
var promise = void 0;
if (typeof window.Promise !== 'undefined') {
var _cb = cb;
promise = new window.Promise(function (resolve) {
cb = function cb(data) {
_cb && _cb(data);
resolve(data);
};
});
promise.resolve = cb;
}
return promise;
}
function debounce(func, wait, immediate, initValue) {
var timeout = void 0;
var result = initValue;
var later = function later(context, args) {
timeout = null;
if (args) {
result = func.apply(context, args);
}
};
var debounced = function debounced() {
var _this = this;
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
if (timeout) {
clearTimeout(timeout);
}
if (immediate) {
var callNow = !timeout;
timeout = setTimeout(later, wait);
if (callNow) {
result = func.apply(this, args);
}
} else {
timeout = setTimeout(function () {
later(_this, args);
}, wait);
}
return result;
};
debounced.cancel = function () {
clearTimeout(timeout);
timeout = null;
};
return debounced;
}
function processComponentName(Component) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
_ref$prefix = _ref.prefix,
prefix = _ref$prefix === undefined ? '' : _ref$prefix,
_ref$firstUpperCase = _ref.firstUpperCase,
firstUpperCase = _ref$firstUpperCase === undefined ? false : _ref$firstUpperCase;
var name = Component.name;
var pureName = name.replace(/^cube-/i, '');
var camelizeName = '' + (0, _string.camelize)('' + prefix + pureName);
if (firstUpperCase) {
camelizeName = camelizeName.charAt(0).toUpperCase() + camelizeName.slice(1);
}
return camelizeName;
}
function parsePath(obj) {
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var segments = path.split('.');
var result = obj;
for (var i = 0; i < segments.length; i++) {
var key = segments[i];
if (isUndef(result[key])) {
result = '';
break;
} else {
result = result[key];
}
}
return result;
}
function getIOSVersion(ua) {
var regex = /os (\d\d?_\d(_\d)?)/;
var matches = regex.exec(ua);
if (!matches) return null;
var parts = matches[1].split('_').map(function (item) {
return parseInt(item, 10);
});
return {
major: parts[0],
minor: parts[1],
patch: parts[2] || 0
};
}
var isFunc = judgeTypeFnCreator('Function');
var isUndef = judgeTypeFnCreator('Undefined');
var isArray = judgeTypeFnCreator('Array');
var isString = judgeTypeFnCreator('String');
var isObject = judgeTypeFnCreator('Object');
var isNumber = judgeTypeFnCreator('Number');
exports.findIndex = findIndex;
exports.deepAssign = deepAssign;
exports.createAddAPI = createAddAPI;
exports.resetTypeValue = resetTypeValue;
exports.parallel = parallel;
exports.cb2PromiseWithResolve = cb2PromiseWithResolve;
exports.debounce = debounce;
exports.processComponentName = processComponentName;
exports.parsePath = parsePath;
exports.isUndef = isUndef;
exports.isFunc = isFunc;
exports.isArray = isArray;
exports.isString = isString;
exports.isObject = isObject;
exports.isNumber = isNumber;
exports.getIOSVersion = getIOSVersion;
});
/***/ }),
/***/ 352:
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(353)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof exports !== "undefined") {
factory(module, exports, require('../../components/recycle-list/recycle-list.vue'));
} else {
var mod = {
exports: {}
};
factory(mod, mod.exports, global.recycleList);
global.index = mod.exports;
}
})(this, function (module, exports, _recycleList) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _recycleList2 = _interopRequireDefault(_recycleList);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
_recycleList2.default.install = function (Vue) {
Vue.component(_recycleList2.default.name, _recycleList2.default);
};
exports.default = _recycleList2.default;
module.exports = exports['default'];
});
/***/ }),
/***/ 353:
/***/ (function(module, exports, __webpack_require__) {
function injectStyle (ssrContext) {
__webpack_require__(354)
}
var Component = __webpack_require__(9)(
/* script */
__webpack_require__(355),
/* template */
__webpack_require__(356),
/* styles */
injectStyle,
/* scopeId */
null,
/* moduleIdentifier (server only) */
null
)
module.exports = Component.exports
/***/ }),
/***/ 354:
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/***/ 355:
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(107), __webpack_require__(39), __webpack_require__(35)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof exports !== "undefined") {
factory(module, exports, require('../loading/loading.vue'), require('../../common/helpers/debug.js'), require('../../common/helpers/util.js'));
} else {
var mod = {
exports: {}
};
factory(mod, mod.exports, global.loading, global.debug, global.util);
global.recycleList = mod.exports;
}
})(this, function (module, exports, _loading, _debug, _util) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _loading2 = _interopRequireDefault(_loading);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var COMPONENT_NAME = 'cube-recycle-list';
var PROMISE_ERROR = 'requires a Promise polyfill in this browser.';
var EVENT_SCROLL = 'scroll';
var EVENT_RESIZE = 'resize';
exports.default = {
name: COMPONENT_NAME,
data: function data() {
return {
items: [],
heights: 0,
startIndex: 0,
loadings: [],
noMore: false
};
},
props: {
infinite: {
type: Boolean,
default: false
},
size: {
type: Number,
default: 20
},
offset: {
type: Number,
default: 100
},
onFetch: {
type: Function,
required: true
}
},
computed: {
visibleItems: function visibleItems() {
return this.items.slice(Math.max(0, this.startIndex - this.size), Math.min(this.items.length, this.startIndex + this.size));
},
tombHeight: function tombHeight() {
return this.infinite ? this.$refs.tomb && this.$refs.tomb.offsetHeight : 0;
},
loading: function loading() {
return this.loadings.length;
}
},
created: function created() {
this.list = [];
this.promiseStack = [];
},
mounted: function mounted() {
this.checkPromiseCompatibility();
this.$el.addEventListener(EVENT_SCROLL, this._onScroll);
window.addEventListener(EVENT_RESIZE, this._onResize);
this.load();
},
beforeDestroy: function beforeDestroy() {
this.$el.removeEventListener(EVENT_SCROLL, this._onScroll);
window.removeEventListener(EVENT_RESIZE, this._onResize);
},
methods: {
checkPromiseCompatibility: function checkPromiseCompatibility() {
if ((0, _util.isUndef)(window.Promise)) {
(0, _debug.warn)(PROMISE_ERROR);
}
},
load: function load() {
if (this.infinite) {
var items = this.items;
var start = items.length;
items.length += this.size;
var end = items.length;
this.loadItems(start, end);
this.getItems();
} else if (!this.loading) {
this.getItems();
}
},
getItems: function getItems() {
var _this = this;
var index = this.promiseStack.length;
var promiseFetch = this.onFetch();
this.loadings.push('pending');
this.promiseStack.push(promiseFetch);
promiseFetch.then(function (res) {
_this.loadings.pop();
if (!res) {
_this.stopScroll(index);
} else {
_this.setList(index, res);
_this.loadItemsByIndex(index);
if (res.length < _this.size) {
_this.stopScroll(index);
}
}
});
},
removeUnusedTombs: function removeUnusedTombs(copy, index) {
var cursor = void 0;
var size = this.size;
var start = index * size;
var end = (index + 1) * size;
for (cursor = start; cursor < end; cursor++) {
if (copy[cursor] && copy[cursor].isTombstone) break;
}
this.items = copy.slice(0, cursor);
},
stopScroll: function stopScroll(index) {
this.noMore = true;
this.removeUnusedTombs(this.items.slice(0), index);
this.updateItemTop();
this.updateStartIndex();
},
setList: function setList(index, res) {
var list = this.list;
var baseIndex = index * this.size;
for (var i = 0; i < res.length; i++) {
list[baseIndex + i] = res[i];
}
},
loadItemsByIndex: function loadItemsByIndex(index) {
var size = this.size;
var start = index * size;
var end = (index + 1) * size;
this.loadItems(start, end);
},
loadItems: function loadItems(start, end) {
var _this2 = this;
var items = this.items;
var promiseTasks = [];
var item = void 0;
var _loop = function _loop(i) {
item = items[i];
if (item && item.loaded) {
return 'continue';
}
_this2.setItem(i, _this2.list[i]);
promiseTasks.push(_this2.$nextTick().then(function () {
_this2.updateItemHeight(i);
}));
};
for (var i = start; i < end; i++) {
var _ret = _loop(i);
if (_ret === 'continue') continue;
}
window.Promise.all(promiseTasks).then(function () {
_this2.updateItemTop();
_this2.updateStartIndex();
});
},
setItem: function setItem(index, data) {
this.$set(this.items, index, {
data: data || {},
height: 0,
top: -1000,
isTombstone: !data,
loaded: data ? 1 : 0
});
},
updateItemHeight: function updateItemHeight(index) {
var cur = this.items[index];
var dom = this.$refs['preloads' + index];
if (dom && dom[0]) {
cur.height = dom[0].offsetHeight;
} else if (cur) {
cur.height = this.tombHeight;
}
},
updateItemTop: function updateItemTop() {
var heights = 0;
var items = this.items;
var pre = void 0;
var current = void 0;
for (var i = 0; i < items.length; i++) {
pre = items[i - 1];
current = items[i];
if (!items[i]) {
heights += 0;
} else {
current.top = pre ? pre.top + pre.height : 0;
heights += current.height;
}
}
this.heights = heights;
},
updateStartIndex: function updateStartIndex() {
var top = this.$el.scrollTop;
var item = void 0;
var items = this.items;
for (var i = 0; i < items.length; i++) {
item = items[i];
if (!item || item.top > top) {
this.startIndex = Math.max(0, i - 1);
break;
}
}
},
reset: function reset() {
var _this3 = this;
var map = [{
key: 'items',
value: []
}, {
key: 'heights',
value: 0
}, {
key: 'startIndex',
value: 0
}, {
key: 'loadings',
value: []
}, {
key: 'noMore',
value: false
}, {
key: 'list',
value: []
}, {
key: 'promiseStack',
value: []
}];
map.forEach(function (_ref) {
var key = _ref.key,
value = _ref.value;
_this3[key] = value;
});
this.$el.scrollTop = 0;
this.load();
},
_onScroll: function _onScroll() {
if (!this.noMore && this.$el.scrollTop + this.$el.offsetHeight > this.heights - this.offset) {
this.load();
}
this.updateStartIndex();
},
_onResize: function _onResize() {
var items = this.items;
items.forEach(function (item) {
item.loaded = false;
});
this.loadItems(0, items.length);
}
},
components: {
CubeLoading: _loading2.default
}
};
module.exports = exports['default'];
});
/***/ }),
/***/ 356:
/***/ (function(module, exports) {
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
return _c('div', {
staticClass: "cube-recycle-list"
}, [_c('div', {
staticClass: "cube-recycle-list-main"
}, [_c('div', {
staticClass: "cube-recycle-list-items",
style: ({
height: _vm.heights + 'px'
})
}, [_vm._l((_vm.visibleItems), function(item) {
return _c('div', {
staticClass: "cube-recycle-list-item",
style: ({
transform: 'translate(0,' + item.top + 'px)'
})
}, [(_vm.infinite) ? _c('div', {
class: {
'cube-recycle-list-transition': _vm.infinite
},
style: ({
opacity: +!item.loaded
})
}, [_vm._t("tombstone")], 2) : _vm._e(), _vm._v(" "), _c('div', {
class: {
'cube-recycle-list-transition': _vm.infinite
},
style: ({
opacity: item.loaded
})
}, [_vm._t("item", null, {
data: item.data
})], 2)])
}), _vm._v(" "), _c('div', {
staticClass: "cube-recycle-list-pool"
}, [_vm._l((_vm.items), function(item, index) {
return (item && !item.isTombstone && !item.height) ? _c('div', {
ref: 'preloads' + index,
refInFor: true,
staticClass: "cube-recycle-list-item cube-recycle-list-invisible"
}, [_vm._t("item", null, {
data: item.data
})], 2) : _vm._e()
}), _vm._v(" "), _c('div', {
ref: "tomb",
staticClass: "cube-recycle-list-item cube-recycle-list-invisible"
}, [_vm._t("tombstone")], 2)], 2)], 2), _vm._v(" "), (!_vm.infinite && !_vm.noMore) ? _c('div', {
staticClass: "cube-recycle-list-loading",
style: ({
visibility: _vm.loading ? 'visible' : 'hidden'
})
}, [_vm._t("spinner", [_c('div', {
staticClass: "cube-recycle-list-loading-content"
}, [_c('cube-loading', {
staticClass: "cube-recycle-list-spinner"
})], 1)])], 2) : _vm._e(), _vm._v(" "), _c('div', {
directives: [{
name: "show",
rawName: "v-show",
value: (_vm.noMore),
expression: "noMore"
}],
staticClass: "cube-recycle-list-noMore"
}, [_vm._t("noMore")], 2)]), _vm._v(" "), _c('div', {
staticClass: "cube-recycle-list-fake"
})])
},staticRenderFns: []}
/***/ }),
/***/ 36:
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(5);
var toIObject = __webpack_require__(7);
var arrayIndexOf = __webpack_require__(50)(false);
var IE_PROTO = __webpack_require__(23)('IE_PROTO');
module.exports = function (object, names) {
var O = toIObject(object);
var i = 0;
var result = [];
var key;
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
// Don't enum bug & hidden keys
while (names.length > i) if (has(O, key = names[i++])) {
~arrayIndexOf(result, key) || result.push(key);
}
return result;
};
/***/ }),
/***/ 37:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _defineProperty = __webpack_require__(55);
var _defineProperty2 = _interopRequireDefault(_defineProperty);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function (obj, key, value) {
if (key in obj) {
(0, _defineProperty2.default)(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
};
/***/ }),
/***/ 38:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $at = __webpack_require__(62)(true);
// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(42)(String, 'String', function (iterated) {
this._t = String(iterated); // target
this._i = 0; // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
}, function () {
var O = this._t;
var index = this._i;
var point;
if (index >= O.length) return { value: undefined, done: true };
point = $at(O, index);
this._i += point.length;
return { value: point, done: false };
});
/***/ }),
/***/ 39:
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.debug = mod.exports;
}
})(this, function (exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var warn = exports.warn = function warn(msg, componentName) {
if (process.env.NODE_ENV !== 'production') {
var component = componentName ? '<' + componentName + '> ' : '';
console.error('[Cube warn]: ' + component + msg);
}
};
var tip = exports.tip = function tip(msg, componentName) {
if (process.env.NODE_ENV !== 'production') {
var component = componentName ? '<' + componentName + '> ' : '';
console.warn('[Cube tip]: ' + component + msg);
}
};
});
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(83)))
/***/ }),
/***/ 4:
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(12);
var IE8_DOM_DEFINE = __webpack_require__(33);
var toPrimitive = __webpack_require__(22);
var dP = Object.defineProperty;
exports.f = __webpack_require__(3) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return dP(O, P, Attributes);
} catch (e) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/***/ 40:
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(21);
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ }),
/***/ 41:
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__(20);
var min = Math.min;
module.exports = function (it) {
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/***/ 42:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__(15);
var $export = __webpack_require__(10);
var redefine = __webpack_require__(43);
var hide = __webpack_require__(6);
var Iterators = __webpack_require__(16);
var $iterCreate = __webpack_require__(63);
var setToStringTag = __webpack_require__(26);
var getPrototypeOf = __webpack_require__(65);
var ITERATOR = __webpack_require__(2)('iterator');
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
var FF_ITERATOR = '@@iterator';
var KEYS = 'keys';
var VALUES = 'values';
var returnThis = function () { return this; };
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
$iterCreate(Constructor, NAME, next);
var getMethod = function (kind) {
if (!BUGGY && kind in proto) return proto[kind];
switch (kind) {
case KEYS: return function keys() { return new Constructor(this, kind); };
case VALUES: return function values() { return new Constructor(this, kind); };
} return function entries() { return new Constructor(this, kind); };
};
var TAG = NAME + ' Iterator';
var DEF_VALUES = DEFAULT == VALUES;
var VALUES_BUG = false;
var proto = Base.prototype;
var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
var $default = $native || getMethod(DEFAULT);
var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
var methods, key, IteratorPrototype;
// Fix native
if ($anyNative) {
IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
// Set @@toStringTag to native iterators
setToStringTag(IteratorPrototype, TAG, true);
// fix for some old engines
if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
}
}
// fix Array#{values, @@iterator}.name in V8 / FF
if (DEF_VALUES && $native && $native.name !== VALUES) {
VALUES_BUG = true;
$default = function values() { return $native.call(this); };
}
// Define iterator
if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
hide(proto, ITERATOR, $default);
}
// Plug for library
Iterators[NAME] = $default;
Iterators[TAG] = returnThis;
if (DEFAULT) {
methods = {
values: DEF_VALUES ? $default : getMethod(VALUES),
keys: IS_SET ? $default : getMethod(KEYS),
entries: $entries
};
if (FORCED) for (key in methods) {
if (!(key in proto)) redefine(proto, key, methods[key]);
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
}
return methods;
};
/***/ }),
/***/ 43:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(6);
/***/ }),
/***/ 44:
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(12);
var dPs = __webpack_require__(64);
var enumBugKeys = __webpack_require__(25);
var IE_PROTO = __webpack_require__(23)('IE_PROTO');
var Empty = function () { /* empty */ };
var PROTOTYPE = 'prototype';
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = __webpack_require__(28)('iframe');
var i = enumBugKeys.length;
var lt = '<';
var gt = '>';
var iframeDocument;
iframe.style.display = 'none';
__webpack_require__(52).appendChild(iframe);
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
// createDict = iframe.contentWindow.Object;
// html.removeChild(iframe);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
iframeDocument.close();
createDict = iframeDocument.F;
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
return createDict();
};
module.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
Empty[PROTOTYPE] = anObject(O);
result = new Empty();
Empty[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = createDict();
return Properties === undefined ? result : dPs(result, Properties);
};
/***/ }),
/***/ 45:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(66);
var global = __webpack_require__(1);
var hide = __webpack_require__(6);
var Iterators = __webpack_require__(16);
var TO_STRING_TAG = __webpack_require__(2)('toStringTag');
var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
'TextTrackList,TouchList').split(',');
for (var i = 0; i < DOMIterables.length; i++) {
var NAME = DOMIterables[i];
var Collection = global[NAME];
var proto = Collection && Collection.prototype;
if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
Iterators[NAME] = Iterators.Array;
}
/***/ }),
/***/ 46:
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__(36);
var hiddenKeys = __webpack_require__(25).concat('length', 'prototype');
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return $keys(O, hiddenKeys);
};
/***/ }),
/***/ 47:
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.string = mod.exports;
}
})(this, function (exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.camelize = camelize;
exports.kebab = kebab;
var camelizeRE = /-(\w)/g;
function camelize(str) {
str = String(str);
return str.replace(camelizeRE, function (m, c) {
return c ? c.toUpperCase() : '';
});
}
function kebab(str) {
str = String(str);
return str.replace(/([A-Z])/g, '-$1').toLowerCase();
}
});
/***/ }),
/***/ 48:
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(59), __esModule: true };
/***/ }),
/***/ 5:
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ 50:
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__(7);
var toLength = __webpack_require__(41);
var toAbsoluteIndex = __webpack_require__(51);
module.exports = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIObject($this);
var length = toLength(O.length);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
if (O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
/***/ }),
/***/ 51:
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(20);
var max = Math.max;
var min = Math.min;
module.exports = function (index, length) {
index = toInteger(index);
return index < 0 ? max(index + length, 0) : min(index, length);
};
/***/ }),
/***/ 52:
/***/ (function(module, exports, __webpack_requ