Created
June 25, 2016 15:15
-
-
Save topgun743/ca217aaa8b5fe654439a0ae3f918a307 to your computer and use it in GitHub Desktop.
subschema-noreact
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function webpackUniversalModuleDefinition(root, factory) { | |
if(typeof exports === 'object' && typeof module === 'object') | |
module.exports = factory(require("react"), require("react-dom")); | |
else if(typeof define === 'function' && define.amd) | |
define(["react", "react-dom"], factory); | |
else if(typeof exports === 'object') | |
exports["Subschema"] = factory(require("react"), require("react-dom")); | |
else | |
root["Subschema"] = factory(root["React"], root["ReactDOM"]); | |
})(this, function(__WEBPACK_EXTERNAL_MODULE_302__, __WEBPACK_EXTERNAL_MODULE_303__) { | |
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] = { | |
/******/ exports: {}, | |
/******/ id: moduleId, | |
/******/ loaded: false | |
/******/ }; | |
/******/ | |
/******/ // Execute the module function | |
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | |
/******/ | |
/******/ // Flag the module as loaded | |
/******/ module.loaded = 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; | |
/******/ | |
/******/ // __webpack_public_path__ | |
/******/ __webpack_require__.p = ""; | |
/******/ | |
/******/ // Load entry module and return exports | |
/******/ return __webpack_require__(0); | |
/******/ }) | |
/************************************************************************/ | |
/******/ ([ | |
/* 0 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
//This should really only happen to top level projects. | |
// which subschema can be. So its needed, but in generally | |
// if compiling subschema with webpack, you will just point | |
//and happens automagically with node. | |
/* | |
I thought about having a prebuilt subschema intended just | |
to speed up builds, something that you could just include, | |
the pieces you need, but that has issues, also. | |
If I keep this in the index, than its bad, if I keep it here | |
than its bad. I have no non-bad solution. This seems least bad. | |
*/ | |
__webpack_require__(1); | |
module.exports = __webpack_require__(300); | |
/***/ }, | |
/* 1 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/* WEBPACK VAR INJECTION */(function(global) {"use strict"; | |
__webpack_require__(2); | |
__webpack_require__(294); | |
__webpack_require__(297); | |
/* eslint max-len: 0 */ | |
if (global._babelPolyfill) { | |
throw new Error("only one instance of babel-polyfill is allowed"); | |
} | |
global._babelPolyfill = true; | |
// Should be removed in the next major release: | |
var DEFINE_PROPERTY = "defineProperty"; | |
function define(O, key, value) { | |
O[key] || Object[DEFINE_PROPERTY](O, key, { | |
writable: true, | |
configurable: true, | |
value: value | |
}); | |
} | |
define(String.prototype, "padLeft", "".padStart); | |
define(String.prototype, "padRight", "".padEnd); | |
"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) { | |
[][key] && define(Array, key, Function.call.bind([][key])); | |
}); | |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) | |
/***/ }, | |
/* 2 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(3); | |
__webpack_require__(52); | |
__webpack_require__(53); | |
__webpack_require__(54); | |
__webpack_require__(55); | |
__webpack_require__(57); | |
__webpack_require__(60); | |
__webpack_require__(61); | |
__webpack_require__(62); | |
__webpack_require__(63); | |
__webpack_require__(64); | |
__webpack_require__(65); | |
__webpack_require__(66); | |
__webpack_require__(67); | |
__webpack_require__(68); | |
__webpack_require__(70); | |
__webpack_require__(72); | |
__webpack_require__(74); | |
__webpack_require__(76); | |
__webpack_require__(79); | |
__webpack_require__(80); | |
__webpack_require__(81); | |
__webpack_require__(85); | |
__webpack_require__(87); | |
__webpack_require__(89); | |
__webpack_require__(93); | |
__webpack_require__(94); | |
__webpack_require__(95); | |
__webpack_require__(96); | |
__webpack_require__(98); | |
__webpack_require__(99); | |
__webpack_require__(100); | |
__webpack_require__(101); | |
__webpack_require__(102); | |
__webpack_require__(103); | |
__webpack_require__(104); | |
__webpack_require__(106); | |
__webpack_require__(107); | |
__webpack_require__(108); | |
__webpack_require__(110); | |
__webpack_require__(111); | |
__webpack_require__(112); | |
__webpack_require__(114); | |
__webpack_require__(115); | |
__webpack_require__(116); | |
__webpack_require__(117); | |
__webpack_require__(118); | |
__webpack_require__(119); | |
__webpack_require__(120); | |
__webpack_require__(121); | |
__webpack_require__(122); | |
__webpack_require__(123); | |
__webpack_require__(124); | |
__webpack_require__(125); | |
__webpack_require__(126); | |
__webpack_require__(127); | |
__webpack_require__(132); | |
__webpack_require__(133); | |
__webpack_require__(137); | |
__webpack_require__(138); | |
__webpack_require__(139); | |
__webpack_require__(140); | |
__webpack_require__(142); | |
__webpack_require__(143); | |
__webpack_require__(144); | |
__webpack_require__(145); | |
__webpack_require__(146); | |
__webpack_require__(147); | |
__webpack_require__(148); | |
__webpack_require__(149); | |
__webpack_require__(150); | |
__webpack_require__(151); | |
__webpack_require__(152); | |
__webpack_require__(153); | |
__webpack_require__(154); | |
__webpack_require__(155); | |
__webpack_require__(156); | |
__webpack_require__(157); | |
__webpack_require__(158); | |
__webpack_require__(160); | |
__webpack_require__(161); | |
__webpack_require__(167); | |
__webpack_require__(168); | |
__webpack_require__(170); | |
__webpack_require__(171); | |
__webpack_require__(172); | |
__webpack_require__(176); | |
__webpack_require__(177); | |
__webpack_require__(178); | |
__webpack_require__(179); | |
__webpack_require__(180); | |
__webpack_require__(182); | |
__webpack_require__(183); | |
__webpack_require__(184); | |
__webpack_require__(185); | |
__webpack_require__(188); | |
__webpack_require__(190); | |
__webpack_require__(191); | |
__webpack_require__(192); | |
__webpack_require__(194); | |
__webpack_require__(196); | |
__webpack_require__(198); | |
__webpack_require__(199); | |
__webpack_require__(200); | |
__webpack_require__(202); | |
__webpack_require__(203); | |
__webpack_require__(204); | |
__webpack_require__(205); | |
__webpack_require__(211); | |
__webpack_require__(214); | |
__webpack_require__(215); | |
__webpack_require__(217); | |
__webpack_require__(218); | |
__webpack_require__(221); | |
__webpack_require__(222); | |
__webpack_require__(225); | |
__webpack_require__(226); | |
__webpack_require__(227); | |
__webpack_require__(228); | |
__webpack_require__(229); | |
__webpack_require__(230); | |
__webpack_require__(231); | |
__webpack_require__(232); | |
__webpack_require__(233); | |
__webpack_require__(234); | |
__webpack_require__(235); | |
__webpack_require__(236); | |
__webpack_require__(237); | |
__webpack_require__(238); | |
__webpack_require__(239); | |
__webpack_require__(240); | |
__webpack_require__(241); | |
__webpack_require__(242); | |
__webpack_require__(243); | |
__webpack_require__(245); | |
__webpack_require__(246); | |
__webpack_require__(247); | |
__webpack_require__(248); | |
__webpack_require__(249); | |
__webpack_require__(250); | |
__webpack_require__(252); | |
__webpack_require__(253); | |
__webpack_require__(254); | |
__webpack_require__(255); | |
__webpack_require__(256); | |
__webpack_require__(257); | |
__webpack_require__(258); | |
__webpack_require__(259); | |
__webpack_require__(261); | |
__webpack_require__(262); | |
__webpack_require__(264); | |
__webpack_require__(265); | |
__webpack_require__(266); | |
__webpack_require__(267); | |
__webpack_require__(270); | |
__webpack_require__(271); | |
__webpack_require__(272); | |
__webpack_require__(273); | |
__webpack_require__(274); | |
__webpack_require__(275); | |
__webpack_require__(276); | |
__webpack_require__(277); | |
__webpack_require__(279); | |
__webpack_require__(280); | |
__webpack_require__(281); | |
__webpack_require__(282); | |
__webpack_require__(283); | |
__webpack_require__(284); | |
__webpack_require__(285); | |
__webpack_require__(286); | |
__webpack_require__(287); | |
__webpack_require__(288); | |
__webpack_require__(289); | |
__webpack_require__(292); | |
__webpack_require__(293); | |
module.exports = __webpack_require__(9); | |
/***/ }, | |
/* 3 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// ECMAScript 6 symbols shim | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
var global = __webpack_require__(4), | |
has = __webpack_require__(5), | |
DESCRIPTORS = __webpack_require__(6), | |
$export = __webpack_require__(8), | |
redefine = __webpack_require__(18), | |
META = __webpack_require__(22).KEY, | |
$fails = __webpack_require__(7), | |
shared = __webpack_require__(23), | |
setToStringTag = __webpack_require__(24), | |
uid = __webpack_require__(19), | |
wks = __webpack_require__(25), | |
wksExt = __webpack_require__(26), | |
wksDefine = __webpack_require__(27), | |
keyOf = __webpack_require__(29), | |
enumKeys = __webpack_require__(42), | |
isArray = __webpack_require__(45), | |
anObject = __webpack_require__(12), | |
toIObject = __webpack_require__(32), | |
toPrimitive = __webpack_require__(16), | |
createDesc = __webpack_require__(17), | |
_create = __webpack_require__(46), | |
gOPNExt = __webpack_require__(49), | |
$GOPD = __webpack_require__(51), | |
$DP = __webpack_require__(11), | |
$keys = __webpack_require__(30), | |
gOPD = $GOPD.f, | |
dP = $DP.f, | |
gOPN = gOPNExt.f, | |
$Symbol = global.Symbol, | |
$JSON = global.JSON, | |
_stringify = $JSON && $JSON.stringify, | |
PROTOTYPE = 'prototype', | |
HIDDEN = wks('_hidden'), | |
TO_PRIMITIVE = wks('toPrimitive'), | |
isEnum = {}.propertyIsEnumerable, | |
SymbolRegistry = shared('symbol-registry'), | |
AllSymbols = shared('symbols'), | |
OPSymbols = shared('op-symbols'), | |
ObjectProto = Object[PROTOTYPE], | |
USE_NATIVE = typeof $Symbol == 'function', | |
QObject = global.QObject; | |
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 | |
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; | |
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 | |
var setSymbolDesc = DESCRIPTORS && $fails(function () { | |
return _create(dP({}, 'a', { | |
get: function get() { | |
return dP(this, 'a', { value: 7 }).a; | |
} | |
})).a != 7; | |
}) ? function (it, key, D) { | |
var protoDesc = gOPD(ObjectProto, key); | |
if (protoDesc) delete ObjectProto[key]; | |
dP(it, key, D); | |
if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); | |
} : dP; | |
var wrap = function wrap(tag) { | |
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); | |
sym._k = tag; | |
return sym; | |
}; | |
var isSymbol = USE_NATIVE && _typeof($Symbol.iterator) == 'symbol' ? function (it) { | |
return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) == 'symbol'; | |
} : function (it) { | |
return it instanceof $Symbol; | |
}; | |
var $defineProperty = function defineProperty(it, key, D) { | |
if (it === ObjectProto) $defineProperty(OPSymbols, key, D); | |
anObject(it); | |
key = toPrimitive(key, true); | |
anObject(D); | |
if (has(AllSymbols, key)) { | |
if (!D.enumerable) { | |
if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); | |
it[HIDDEN][key] = true; | |
} else { | |
if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; | |
D = _create(D, { enumerable: createDesc(0, false) }); | |
}return setSymbolDesc(it, key, D); | |
}return dP(it, key, D); | |
}; | |
var $defineProperties = function defineProperties(it, P) { | |
anObject(it); | |
var keys = enumKeys(P = toIObject(P)), | |
i = 0, | |
l = keys.length, | |
key; | |
while (l > i) { | |
$defineProperty(it, key = keys[i++], P[key]); | |
}return it; | |
}; | |
var $create = function create(it, P) { | |
return P === undefined ? _create(it) : $defineProperties(_create(it), P); | |
}; | |
var $propertyIsEnumerable = function propertyIsEnumerable(key) { | |
var E = isEnum.call(this, key = toPrimitive(key, true)); | |
if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; | |
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; | |
}; | |
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { | |
it = toIObject(it); | |
key = toPrimitive(key, true); | |
if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; | |
var D = gOPD(it, key); | |
if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; | |
return D; | |
}; | |
var $getOwnPropertyNames = function getOwnPropertyNames(it) { | |
var names = gOPN(toIObject(it)), | |
result = [], | |
i = 0, | |
key; | |
while (names.length > i) { | |
if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); | |
}return result; | |
}; | |
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { | |
var IS_OP = it === ObjectProto, | |
names = gOPN(IS_OP ? OPSymbols : toIObject(it)), | |
result = [], | |
i = 0, | |
key; | |
while (names.length > i) { | |
if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); | |
}return result; | |
}; | |
// 19.4.1.1 Symbol([description]) | |
if (!USE_NATIVE) { | |
$Symbol = function _Symbol() { | |
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); | |
var tag = uid(arguments.length > 0 ? arguments[0] : undefined); | |
var $set = function $set(value) { | |
if (this === ObjectProto) $set.call(OPSymbols, value); | |
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; | |
setSymbolDesc(this, tag, createDesc(1, value)); | |
}; | |
if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); | |
return wrap(tag); | |
}; | |
redefine($Symbol[PROTOTYPE], 'toString', function toString() { | |
return this._k; | |
}); | |
$GOPD.f = $getOwnPropertyDescriptor; | |
$DP.f = $defineProperty; | |
__webpack_require__(50).f = gOPNExt.f = $getOwnPropertyNames; | |
__webpack_require__(44).f = $propertyIsEnumerable; | |
__webpack_require__(43).f = $getOwnPropertySymbols; | |
if (DESCRIPTORS && !__webpack_require__(28)) { | |
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); | |
} | |
wksExt.f = function (name) { | |
return wrap(wks(name)); | |
}; | |
} | |
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); | |
for (var symbols = | |
// 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 | |
'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','), i = 0; symbols.length > i;) { | |
wks(symbols[i++]); | |
}for (var symbols = $keys(wks.store), i = 0; symbols.length > i;) { | |
wksDefine(symbols[i++]); | |
}$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { | |
// 19.4.2.1 Symbol.for(key) | |
'for': function _for(key) { | |
return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); | |
}, | |
// 19.4.2.5 Symbol.keyFor(sym) | |
keyFor: function keyFor(key) { | |
if (isSymbol(key)) return keyOf(SymbolRegistry, key); | |
throw TypeError(key + ' is not a symbol!'); | |
}, | |
useSetter: function useSetter() { | |
setter = true; | |
}, | |
useSimple: function useSimple() { | |
setter = false; | |
} | |
}); | |
$export($export.S + $export.F * !USE_NATIVE, 'Object', { | |
// 19.1.2.2 Object.create(O [, Properties]) | |
create: $create, | |
// 19.1.2.4 Object.defineProperty(O, P, Attributes) | |
defineProperty: $defineProperty, | |
// 19.1.2.3 Object.defineProperties(O, Properties) | |
defineProperties: $defineProperties, | |
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) | |
getOwnPropertyDescriptor: $getOwnPropertyDescriptor, | |
// 19.1.2.7 Object.getOwnPropertyNames(O) | |
getOwnPropertyNames: $getOwnPropertyNames, | |
// 19.1.2.8 Object.getOwnPropertySymbols(O) | |
getOwnPropertySymbols: $getOwnPropertySymbols | |
}); | |
// 24.3.2 JSON.stringify(value [, replacer [, space]]) | |
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { | |
var S = $Symbol(); | |
// MS Edge converts symbol values to JSON as {} | |
// WebKit converts symbol values to JSON as null | |
// V8 throws on boxed symbols | |
return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; | |
})), 'JSON', { | |
stringify: function stringify(it) { | |
if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined | |
var args = [it], | |
i = 1, | |
replacer, | |
$replacer; | |
while (arguments.length > i) { | |
args.push(arguments[i++]); | |
}replacer = args[1]; | |
if (typeof replacer == 'function') $replacer = replacer; | |
if ($replacer || !isArray(replacer)) replacer = function replacer(key, value) { | |
if ($replacer) value = $replacer.call(this, key, value); | |
if (!isSymbol(value)) return value; | |
}; | |
args[1] = replacer; | |
return _stringify.apply($JSON, args); | |
} | |
}); | |
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) | |
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(10)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); | |
// 19.4.3.5 Symbol.prototype[@@toStringTag] | |
setToStringTag($Symbol, 'Symbol'); | |
// 20.2.1.9 Math[@@toStringTag] | |
setToStringTag(Math, 'Math', true); | |
// 24.3.3 JSON[@@toStringTag] | |
setToStringTag(global.JSON, 'JSON', true); | |
/***/ }, | |
/* 4 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
// 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 : Function('return this')(); | |
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef | |
/***/ }, | |
/* 5 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
var hasOwnProperty = {}.hasOwnProperty; | |
module.exports = function (it, key) { | |
return hasOwnProperty.call(it, key); | |
}; | |
/***/ }, | |
/* 6 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// Thank's IE8 for his funny defineProperty | |
module.exports = !__webpack_require__(7)(function () { | |
return Object.defineProperty({}, 'a', { get: function get() { | |
return 7; | |
} }).a != 7; | |
}); | |
/***/ }, | |
/* 7 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = function (exec) { | |
try { | |
return !!exec(); | |
} catch (e) { | |
return true; | |
} | |
}; | |
/***/ }, | |
/* 8 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var global = __webpack_require__(4), | |
core = __webpack_require__(9), | |
hide = __webpack_require__(10), | |
redefine = __webpack_require__(18), | |
ctx = __webpack_require__(20), | |
PROTOTYPE = 'prototype'; | |
var $export = function $export(type, name, source) { | |
var IS_FORCED = type & $export.F, | |
IS_GLOBAL = type & $export.G, | |
IS_STATIC = type & $export.S, | |
IS_PROTO = type & $export.P, | |
IS_BIND = type & $export.B, | |
target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE], | |
exports = IS_GLOBAL ? core : core[name] || (core[name] = {}), | |
expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}), | |
key, | |
own, | |
out, | |
exp; | |
if (IS_GLOBAL) source = name; | |
for (key in source) { | |
// contains in native | |
own = !IS_FORCED && target && target[key] !== undefined; | |
// export native or passed | |
out = (own ? target : source)[key]; | |
// bind timers to global for call from export context | |
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; | |
// extend global | |
if (target) redefine(target, key, out, type & $export.U); | |
// export | |
if (exports[key] != out) hide(exports, key, exp); | |
if (IS_PROTO && expProto[key] != out) expProto[key] = out; | |
} | |
}; | |
global.core = core; | |
// 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; | |
/***/ }, | |
/* 9 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
var core = module.exports = { version: '2.4.0' }; | |
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef | |
/***/ }, | |
/* 10 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var dP = __webpack_require__(11), | |
createDesc = __webpack_require__(17); | |
module.exports = __webpack_require__(6) ? function (object, key, value) { | |
return dP.f(object, key, createDesc(1, value)); | |
} : function (object, key, value) { | |
object[key] = value; | |
return object; | |
}; | |
/***/ }, | |
/* 11 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var anObject = __webpack_require__(12), | |
IE8_DOM_DEFINE = __webpack_require__(14), | |
toPrimitive = __webpack_require__(16), | |
dP = Object.defineProperty; | |
exports.f = __webpack_require__(6) ? 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; | |
}; | |
/***/ }, | |
/* 12 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObject = __webpack_require__(13); | |
module.exports = function (it) { | |
if (!isObject(it)) throw TypeError(it + ' is not an object!'); | |
return it; | |
}; | |
/***/ }, | |
/* 13 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
module.exports = function (it) { | |
return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) === 'object' ? it !== null : typeof it === 'function'; | |
}; | |
/***/ }, | |
/* 14 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
module.exports = !__webpack_require__(6) && !__webpack_require__(7)(function () { | |
return Object.defineProperty(__webpack_require__(15)('div'), 'a', { get: function get() { | |
return 7; | |
} }).a != 7; | |
}); | |
/***/ }, | |
/* 15 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObject = __webpack_require__(13), | |
document = __webpack_require__(4).document | |
// in old IE typeof document.createElement is 'object' | |
, | |
is = isObject(document) && isObject(document.createElement); | |
module.exports = function (it) { | |
return is ? document.createElement(it) : {}; | |
}; | |
/***/ }, | |
/* 16 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 7.1.1 ToPrimitive(input [, PreferredType]) | |
var isObject = __webpack_require__(13); | |
// 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"); | |
}; | |
/***/ }, | |
/* 17 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = function (bitmap, value) { | |
return { | |
enumerable: !(bitmap & 1), | |
configurable: !(bitmap & 2), | |
writable: !(bitmap & 4), | |
value: value | |
}; | |
}; | |
/***/ }, | |
/* 18 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var global = __webpack_require__(4), | |
hide = __webpack_require__(10), | |
has = __webpack_require__(5), | |
SRC = __webpack_require__(19)('src'), | |
TO_STRING = 'toString', | |
$toString = Function[TO_STRING], | |
TPL = ('' + $toString).split(TO_STRING); | |
__webpack_require__(9).inspectSource = function (it) { | |
return $toString.call(it); | |
}; | |
(module.exports = function (O, key, val, safe) { | |
var isFunction = typeof val == 'function'; | |
if (isFunction) has(val, 'name') || hide(val, 'name', key); | |
if (O[key] === val) return; | |
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); | |
if (O === global) { | |
O[key] = val; | |
} else { | |
if (!safe) { | |
delete O[key]; | |
hide(O, key, val); | |
} else { | |
if (O[key]) O[key] = val;else hide(O, key, val); | |
} | |
} | |
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative | |
})(Function.prototype, TO_STRING, function toString() { | |
return typeof this == 'function' && this[SRC] || $toString.call(this); | |
}); | |
/***/ }, | |
/* 19 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
var id = 0, | |
px = Math.random(); | |
module.exports = function (key) { | |
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); | |
}; | |
/***/ }, | |
/* 20 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// optional / simple context binding | |
var aFunction = __webpack_require__(21); | |
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); | |
}; | |
}; | |
/***/ }, | |
/* 21 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
module.exports = function (it) { | |
if (typeof it != 'function') throw TypeError(it + ' is not a function!'); | |
return it; | |
}; | |
/***/ }, | |
/* 22 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
var META = __webpack_require__(19)('meta'), | |
isObject = __webpack_require__(13), | |
has = __webpack_require__(5), | |
setDesc = __webpack_require__(11).f, | |
id = 0; | |
var isExtensible = Object.isExtensible || function () { | |
return true; | |
}; | |
var FREEZE = !__webpack_require__(7)(function () { | |
return isExtensible(Object.preventExtensions({})); | |
}); | |
var setMeta = function setMeta(it) { | |
setDesc(it, META, { value: { | |
i: 'O' + ++id, // object ID | |
w: {} // weak collections IDs | |
} }); | |
}; | |
var fastKey = function fastKey(it, create) { | |
// return primitive with prefix | |
if (!isObject(it)) return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; | |
if (!has(it, META)) { | |
// can't set metadata to uncaught frozen object | |
if (!isExtensible(it)) return 'F'; | |
// not necessary to add metadata | |
if (!create) return 'E'; | |
// add missing metadata | |
setMeta(it); | |
// return object ID | |
}return it[META].i; | |
}; | |
var getWeak = function getWeak(it, create) { | |
if (!has(it, META)) { | |
// can't set metadata to uncaught frozen object | |
if (!isExtensible(it)) return true; | |
// not necessary to add metadata | |
if (!create) return false; | |
// add missing metadata | |
setMeta(it); | |
// return hash weak collections IDs | |
}return it[META].w; | |
}; | |
// add metadata on freeze-family methods calling | |
var onFreeze = function onFreeze(it) { | |
if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); | |
return it; | |
}; | |
var meta = module.exports = { | |
KEY: META, | |
NEED: false, | |
fastKey: fastKey, | |
getWeak: getWeak, | |
onFreeze: onFreeze | |
}; | |
/***/ }, | |
/* 23 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var global = __webpack_require__(4), | |
SHARED = '__core-js_shared__', | |
store = global[SHARED] || (global[SHARED] = {}); | |
module.exports = function (key) { | |
return store[key] || (store[key] = {}); | |
}; | |
/***/ }, | |
/* 24 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var def = __webpack_require__(11).f, | |
has = __webpack_require__(5), | |
TAG = __webpack_require__(25)('toStringTag'); | |
module.exports = function (it, tag, stat) { | |
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); | |
}; | |
/***/ }, | |
/* 25 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var store = __webpack_require__(23)('wks'), | |
uid = __webpack_require__(19), | |
_Symbol = __webpack_require__(4).Symbol, | |
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; | |
/***/ }, | |
/* 26 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.f = __webpack_require__(25); | |
/***/ }, | |
/* 27 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var global = __webpack_require__(4), | |
core = __webpack_require__(9), | |
LIBRARY = __webpack_require__(28), | |
wksExt = __webpack_require__(26), | |
defineProperty = __webpack_require__(11).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) }); | |
}; | |
/***/ }, | |
/* 28 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = false; | |
/***/ }, | |
/* 29 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var getKeys = __webpack_require__(30), | |
toIObject = __webpack_require__(32); | |
module.exports = function (object, el) { | |
var O = toIObject(object), | |
keys = getKeys(O), | |
length = keys.length, | |
index = 0, | |
key; | |
while (length > index) { | |
if (O[key = keys[index++]] === el) return key; | |
} | |
}; | |
/***/ }, | |
/* 30 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.14 / 15.2.3.14 Object.keys(O) | |
var $keys = __webpack_require__(31), | |
enumBugKeys = __webpack_require__(41); | |
module.exports = Object.keys || function keys(O) { | |
return $keys(O, enumBugKeys); | |
}; | |
/***/ }, | |
/* 31 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var has = __webpack_require__(5), | |
toIObject = __webpack_require__(32), | |
arrayIndexOf = __webpack_require__(36)(false), | |
IE_PROTO = __webpack_require__(40)('IE_PROTO'); | |
module.exports = function (object, names) { | |
var O = toIObject(object), | |
i = 0, | |
result = [], | |
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; | |
}; | |
/***/ }, | |
/* 32 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// to indexed object, toObject with fallback for non-array-like ES3 strings | |
var IObject = __webpack_require__(33), | |
defined = __webpack_require__(35); | |
module.exports = function (it) { | |
return IObject(defined(it)); | |
}; | |
/***/ }, | |
/* 33 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// fallback for non-array-like ES3 and non-enumerable old V8 strings | |
var cof = __webpack_require__(34); | |
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { | |
return cof(it) == 'String' ? it.split('') : Object(it); | |
}; | |
/***/ }, | |
/* 34 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
var toString = {}.toString; | |
module.exports = function (it) { | |
return toString.call(it).slice(8, -1); | |
}; | |
/***/ }, | |
/* 35 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
// 7.2.1 RequireObjectCoercible(argument) | |
module.exports = function (it) { | |
if (it == undefined) throw TypeError("Can't call method on " + it); | |
return it; | |
}; | |
/***/ }, | |
/* 36 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// false -> Array#indexOf | |
// true -> Array#includes | |
var toIObject = __webpack_require__(32), | |
toLength = __webpack_require__(37), | |
toIndex = __webpack_require__(39); | |
module.exports = function (IS_INCLUDES) { | |
return function ($this, el, fromIndex) { | |
var O = toIObject($this), | |
length = toLength(O.length), | |
index = toIndex(fromIndex, length), | |
value; | |
// Array#includes uses SameValueZero equality algorithm | |
if (IS_INCLUDES && el != el) while (length > index) { | |
value = O[index++]; | |
if (value != value) return true; | |
// Array#toIndex 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; | |
}; | |
}; | |
/***/ }, | |
/* 37 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 7.1.15 ToLength | |
var toInteger = __webpack_require__(38), | |
min = Math.min; | |
module.exports = function (it) { | |
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 | |
}; | |
/***/ }, | |
/* 38 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
// 7.1.4 ToInteger | |
var ceil = Math.ceil, | |
floor = Math.floor; | |
module.exports = function (it) { | |
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); | |
}; | |
/***/ }, | |
/* 39 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var toInteger = __webpack_require__(38), | |
max = Math.max, | |
min = Math.min; | |
module.exports = function (index, length) { | |
index = toInteger(index); | |
return index < 0 ? max(index + length, 0) : min(index, length); | |
}; | |
/***/ }, | |
/* 40 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var shared = __webpack_require__(23)('keys'), | |
uid = __webpack_require__(19); | |
module.exports = function (key) { | |
return shared[key] || (shared[key] = uid(key)); | |
}; | |
/***/ }, | |
/* 41 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
// IE 8- don't enum bug keys | |
module.exports = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(','); | |
/***/ }, | |
/* 42 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// all enumerable object keys, includes symbols | |
var getKeys = __webpack_require__(30), | |
gOPS = __webpack_require__(43), | |
pIE = __webpack_require__(44); | |
module.exports = function (it) { | |
var result = getKeys(it), | |
getSymbols = gOPS.f; | |
if (getSymbols) { | |
var symbols = getSymbols(it), | |
isEnum = pIE.f, | |
i = 0, | |
key; | |
while (symbols.length > i) { | |
if (isEnum.call(it, key = symbols[i++])) result.push(key); | |
} | |
}return result; | |
}; | |
/***/ }, | |
/* 43 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
exports.f = Object.getOwnPropertySymbols; | |
/***/ }, | |
/* 44 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
exports.f = {}.propertyIsEnumerable; | |
/***/ }, | |
/* 45 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 7.2.2 IsArray(argument) | |
var cof = __webpack_require__(34); | |
module.exports = Array.isArray || function isArray(arg) { | |
return cof(arg) == 'Array'; | |
}; | |
/***/ }, | |
/* 46 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) | |
var anObject = __webpack_require__(12), | |
dPs = __webpack_require__(47), | |
enumBugKeys = __webpack_require__(41), | |
IE_PROTO = __webpack_require__(40)('IE_PROTO'), | |
Empty = function Empty() {/* empty */}, | |
PROTOTYPE = 'prototype'; | |
// Create object with fake `null` prototype: use iframe Object with cleared prototype | |
var _createDict = function createDict() { | |
// Thrash, waste and sodomy: IE GC bug | |
var iframe = __webpack_require__(15)('iframe'), | |
i = enumBugKeys.length, | |
gt = '>', | |
iframeDocument; | |
iframe.style.display = 'none'; | |
__webpack_require__(48).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('<script>document.F=Object</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); | |
}; | |
/***/ }, | |
/* 47 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var dP = __webpack_require__(11), | |
anObject = __webpack_require__(12), | |
getKeys = __webpack_require__(30); | |
module.exports = __webpack_require__(6) ? Object.defineProperties : function defineProperties(O, Properties) { | |
anObject(O); | |
var keys = getKeys(Properties), | |
length = keys.length, | |
i = 0, | |
P; | |
while (length > i) { | |
dP.f(O, P = keys[i++], Properties[P]); | |
}return O; | |
}; | |
/***/ }, | |
/* 48 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
module.exports = __webpack_require__(4).document && document.documentElement; | |
/***/ }, | |
/* 49 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window | |
var toIObject = __webpack_require__(32), | |
gOPN = __webpack_require__(50).f, | |
toString = {}.toString; | |
var windowNames = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; | |
var getWindowNames = function getWindowNames(it) { | |
try { | |
return gOPN(it); | |
} catch (e) { | |
return windowNames.slice(); | |
} | |
}; | |
module.exports.f = function getOwnPropertyNames(it) { | |
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); | |
}; | |
/***/ }, | |
/* 50 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) | |
var $keys = __webpack_require__(31), | |
hiddenKeys = __webpack_require__(41).concat('length', 'prototype'); | |
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { | |
return $keys(O, hiddenKeys); | |
}; | |
/***/ }, | |
/* 51 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var pIE = __webpack_require__(44), | |
createDesc = __webpack_require__(17), | |
toIObject = __webpack_require__(32), | |
toPrimitive = __webpack_require__(16), | |
has = __webpack_require__(5), | |
IE8_DOM_DEFINE = __webpack_require__(14), | |
gOPD = Object.getOwnPropertyDescriptor; | |
exports.f = __webpack_require__(6) ? gOPD : function getOwnPropertyDescriptor(O, P) { | |
O = toIObject(O); | |
P = toPrimitive(P, true); | |
if (IE8_DOM_DEFINE) try { | |
return gOPD(O, P); | |
} catch (e) {/* empty */} | |
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); | |
}; | |
/***/ }, | |
/* 52 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8); | |
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) | |
$export($export.S, 'Object', { create: __webpack_require__(46) }); | |
/***/ }, | |
/* 53 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8); | |
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) | |
$export($export.S + $export.F * !__webpack_require__(6), 'Object', { defineProperty: __webpack_require__(11).f }); | |
/***/ }, | |
/* 54 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8); | |
// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) | |
$export($export.S + $export.F * !__webpack_require__(6), 'Object', { defineProperties: __webpack_require__(47) }); | |
/***/ }, | |
/* 55 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) | |
var toIObject = __webpack_require__(32), | |
$getOwnPropertyDescriptor = __webpack_require__(51).f; | |
__webpack_require__(56)('getOwnPropertyDescriptor', function () { | |
return function getOwnPropertyDescriptor(it, key) { | |
return $getOwnPropertyDescriptor(toIObject(it), key); | |
}; | |
}); | |
/***/ }, | |
/* 56 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// most Object methods by ES6 should accept primitives | |
var $export = __webpack_require__(8), | |
core = __webpack_require__(9), | |
fails = __webpack_require__(7); | |
module.exports = function (KEY, exec) { | |
var fn = (core.Object || {})[KEY] || Object[KEY], | |
exp = {}; | |
exp[KEY] = exec(fn); | |
$export($export.S + $export.F * fails(function () { | |
fn(1); | |
}), 'Object', exp); | |
}; | |
/***/ }, | |
/* 57 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.9 Object.getPrototypeOf(O) | |
var toObject = __webpack_require__(58), | |
$getPrototypeOf = __webpack_require__(59); | |
__webpack_require__(56)('getPrototypeOf', function () { | |
return function getPrototypeOf(it) { | |
return $getPrototypeOf(toObject(it)); | |
}; | |
}); | |
/***/ }, | |
/* 58 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 7.1.13 ToObject(argument) | |
var defined = __webpack_require__(35); | |
module.exports = function (it) { | |
return Object(defined(it)); | |
}; | |
/***/ }, | |
/* 59 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) | |
var has = __webpack_require__(5), | |
toObject = __webpack_require__(58), | |
IE_PROTO = __webpack_require__(40)('IE_PROTO'), | |
ObjectProto = Object.prototype; | |
module.exports = Object.getPrototypeOf || function (O) { | |
O = toObject(O); | |
if (has(O, IE_PROTO)) return O[IE_PROTO]; | |
if (typeof O.constructor == 'function' && O instanceof O.constructor) { | |
return O.constructor.prototype; | |
}return O instanceof Object ? ObjectProto : null; | |
}; | |
/***/ }, | |
/* 60 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.14 Object.keys(O) | |
var toObject = __webpack_require__(58), | |
$keys = __webpack_require__(30); | |
__webpack_require__(56)('keys', function () { | |
return function keys(it) { | |
return $keys(toObject(it)); | |
}; | |
}); | |
/***/ }, | |
/* 61 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.7 Object.getOwnPropertyNames(O) | |
__webpack_require__(56)('getOwnPropertyNames', function () { | |
return __webpack_require__(49).f; | |
}); | |
/***/ }, | |
/* 62 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.5 Object.freeze(O) | |
var isObject = __webpack_require__(13), | |
meta = __webpack_require__(22).onFreeze; | |
__webpack_require__(56)('freeze', function ($freeze) { | |
return function freeze(it) { | |
return $freeze && isObject(it) ? $freeze(meta(it)) : it; | |
}; | |
}); | |
/***/ }, | |
/* 63 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.17 Object.seal(O) | |
var isObject = __webpack_require__(13), | |
meta = __webpack_require__(22).onFreeze; | |
__webpack_require__(56)('seal', function ($seal) { | |
return function seal(it) { | |
return $seal && isObject(it) ? $seal(meta(it)) : it; | |
}; | |
}); | |
/***/ }, | |
/* 64 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.15 Object.preventExtensions(O) | |
var isObject = __webpack_require__(13), | |
meta = __webpack_require__(22).onFreeze; | |
__webpack_require__(56)('preventExtensions', function ($preventExtensions) { | |
return function preventExtensions(it) { | |
return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; | |
}; | |
}); | |
/***/ }, | |
/* 65 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.12 Object.isFrozen(O) | |
var isObject = __webpack_require__(13); | |
__webpack_require__(56)('isFrozen', function ($isFrozen) { | |
return function isFrozen(it) { | |
return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; | |
}; | |
}); | |
/***/ }, | |
/* 66 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.13 Object.isSealed(O) | |
var isObject = __webpack_require__(13); | |
__webpack_require__(56)('isSealed', function ($isSealed) { | |
return function isSealed(it) { | |
return isObject(it) ? $isSealed ? $isSealed(it) : false : true; | |
}; | |
}); | |
/***/ }, | |
/* 67 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.11 Object.isExtensible(O) | |
var isObject = __webpack_require__(13); | |
__webpack_require__(56)('isExtensible', function ($isExtensible) { | |
return function isExtensible(it) { | |
return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; | |
}; | |
}); | |
/***/ }, | |
/* 68 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.3.1 Object.assign(target, source) | |
var $export = __webpack_require__(8); | |
$export($export.S + $export.F, 'Object', { assign: __webpack_require__(69) }); | |
/***/ }, | |
/* 69 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.2.1 Object.assign(target, source, ...) | |
var getKeys = __webpack_require__(30), | |
gOPS = __webpack_require__(43), | |
pIE = __webpack_require__(44), | |
toObject = __webpack_require__(58), | |
IObject = __webpack_require__(33), | |
$assign = Object.assign; | |
// should work with symbols and should have deterministic property order (V8 bug) | |
module.exports = !$assign || __webpack_require__(7)(function () { | |
var A = {}, | |
B = {}, | |
S = Symbol(), | |
K = 'abcdefghijklmnopqrst'; | |
A[S] = 7; | |
K.split('').forEach(function (k) { | |
B[k] = k; | |
}); | |
return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; | |
}) ? function assign(target, source) { | |
// eslint-disable-line no-unused-vars | |
var T = toObject(target), | |
aLen = arguments.length, | |
index = 1, | |
getSymbols = gOPS.f, | |
isEnum = pIE.f; | |
while (aLen > index) { | |
var S = IObject(arguments[index++]), | |
keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S), | |
length = keys.length, | |
j = 0, | |
key; | |
while (length > j) { | |
if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; | |
} | |
}return T; | |
} : $assign; | |
/***/ }, | |
/* 70 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.3.10 Object.is(value1, value2) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Object', { is: __webpack_require__(71) }); | |
/***/ }, | |
/* 71 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
// 7.2.9 SameValue(x, y) | |
module.exports = Object.is || function is(x, y) { | |
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; | |
}; | |
/***/ }, | |
/* 72 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.3.19 Object.setPrototypeOf(O, proto) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(73).set }); | |
/***/ }, | |
/* 73 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// Works with __proto__ only. Old v8 can't work with null proto objects. | |
/* eslint-disable no-proto */ | |
var isObject = __webpack_require__(13), | |
anObject = __webpack_require__(12); | |
var check = function check(O, proto) { | |
anObject(O); | |
if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); | |
}; | |
module.exports = { | |
set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line | |
function (test, buggy, set) { | |
try { | |
set = __webpack_require__(20)(Function.call, __webpack_require__(51).f(Object.prototype, '__proto__').set, 2); | |
set(test, []); | |
buggy = !(test instanceof Array); | |
} catch (e) { | |
buggy = true; | |
} | |
return function setPrototypeOf(O, proto) { | |
check(O, proto); | |
if (buggy) O.__proto__ = proto;else set(O, proto); | |
return O; | |
}; | |
}({}, false) : undefined), | |
check: check | |
}; | |
/***/ }, | |
/* 74 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.1.3.6 Object.prototype.toString() | |
var classof = __webpack_require__(75), | |
test = {}; | |
test[__webpack_require__(25)('toStringTag')] = 'z'; | |
if (test + '' != '[object z]') { | |
__webpack_require__(18)(Object.prototype, 'toString', function toString() { | |
return '[object ' + classof(this) + ']'; | |
}, true); | |
} | |
/***/ }, | |
/* 75 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// getting tag from 19.1.3.6 Object.prototype.toString() | |
var cof = __webpack_require__(34), | |
TAG = __webpack_require__(25)('toStringTag') | |
// ES3 wrong here | |
, | |
ARG = cof(function () { | |
return arguments; | |
}()) == 'Arguments'; | |
// fallback for IE11 Script Access Denied error | |
var tryGet = function tryGet(it, key) { | |
try { | |
return it[key]; | |
} catch (e) {/* empty */} | |
}; | |
module.exports = function (it) { | |
var O, T, B; | |
return it === undefined ? 'Undefined' : it === null ? 'Null' | |
// @@toStringTag case | |
: typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T | |
// builtinTag case | |
: ARG ? cof(O) | |
// ES3 arguments fallback | |
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; | |
}; | |
/***/ }, | |
/* 76 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) | |
var $export = __webpack_require__(8); | |
$export($export.P, 'Function', { bind: __webpack_require__(77) }); | |
/***/ }, | |
/* 77 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var aFunction = __webpack_require__(21), | |
isObject = __webpack_require__(13), | |
invoke = __webpack_require__(78), | |
arraySlice = [].slice, | |
factories = {}; | |
var construct = function construct(F, len, args) { | |
if (!(len in factories)) { | |
for (var n = [], i = 0; i < len; i++) { | |
n[i] = 'a[' + i + ']'; | |
}factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); | |
}return factories[len](F, args); | |
}; | |
module.exports = Function.bind || function bind(that /*, args... */) { | |
var fn = aFunction(this), | |
partArgs = arraySlice.call(arguments, 1); | |
var bound = function bound() /* args... */{ | |
var args = partArgs.concat(arraySlice.call(arguments)); | |
return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); | |
}; | |
if (isObject(fn.prototype)) bound.prototype = fn.prototype; | |
return bound; | |
}; | |
/***/ }, | |
/* 78 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
// fast apply, http://jsperf.lnkit.com/fast-apply/5 | |
module.exports = function (fn, args, that) { | |
var un = that === undefined; | |
switch (args.length) { | |
case 0: | |
return un ? fn() : fn.call(that); | |
case 1: | |
return un ? fn(args[0]) : fn.call(that, args[0]); | |
case 2: | |
return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); | |
case 3: | |
return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); | |
case 4: | |
return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); | |
}return fn.apply(that, args); | |
}; | |
/***/ }, | |
/* 79 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var dP = __webpack_require__(11).f, | |
createDesc = __webpack_require__(17), | |
has = __webpack_require__(5), | |
FProto = Function.prototype, | |
nameRE = /^\s*function ([^ (]*)/, | |
NAME = 'name'; | |
var isExtensible = Object.isExtensible || function () { | |
return true; | |
}; | |
// 19.2.4.2 name | |
NAME in FProto || __webpack_require__(6) && dP(FProto, NAME, { | |
configurable: true, | |
get: function get() { | |
try { | |
var that = this, | |
name = ('' + that).match(nameRE)[1]; | |
has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name)); | |
return name; | |
} catch (e) { | |
return ''; | |
} | |
} | |
}); | |
/***/ }, | |
/* 80 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObject = __webpack_require__(13), | |
getPrototypeOf = __webpack_require__(59), | |
HAS_INSTANCE = __webpack_require__(25)('hasInstance'), | |
FunctionProto = Function.prototype; | |
// 19.2.3.6 Function.prototype[@@hasInstance](V) | |
if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(11).f(FunctionProto, HAS_INSTANCE, { value: function value(O) { | |
if (typeof this != 'function' || !isObject(O)) return false; | |
if (!isObject(this.prototype)) return O instanceof this; | |
// for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: | |
while (O = getPrototypeOf(O)) { | |
if (this.prototype === O) return true; | |
}return false; | |
} }); | |
/***/ }, | |
/* 81 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$parseInt = __webpack_require__(82); | |
// 18.2.5 parseInt(string, radix) | |
$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); | |
/***/ }, | |
/* 82 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $parseInt = __webpack_require__(4).parseInt, | |
$trim = __webpack_require__(83).trim, | |
ws = __webpack_require__(84), | |
hex = /^[\-+]?0[xX]/; | |
module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { | |
var string = $trim(String(str), 3); | |
return $parseInt(string, radix >>> 0 || (hex.test(string) ? 16 : 10)); | |
} : $parseInt; | |
/***/ }, | |
/* 83 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
defined = __webpack_require__(35), | |
fails = __webpack_require__(7), | |
spaces = __webpack_require__(84), | |
space = '[' + spaces + ']', | |
non = ' ', | |
ltrim = RegExp('^' + space + space + '*'), | |
rtrim = RegExp(space + space + '*$'); | |
var exporter = function exporter(KEY, exec, ALIAS) { | |
var exp = {}; | |
var FORCE = fails(function () { | |
return !!spaces[KEY]() || non[KEY]() != non; | |
}); | |
var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; | |
if (ALIAS) exp[ALIAS] = fn; | |
$export($export.P + $export.F * FORCE, 'String', exp); | |
}; | |
// 1 -> String#trimLeft | |
// 2 -> String#trimRight | |
// 3 -> String#trim | |
var trim = exporter.trim = function (string, TYPE) { | |
string = String(defined(string)); | |
if (TYPE & 1) string = string.replace(ltrim, ''); | |
if (TYPE & 2) string = string.replace(rtrim, ''); | |
return string; | |
}; | |
module.exports = exporter; | |
/***/ }, | |
/* 84 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
module.exports = '\t\n\u000b\f\r ' + ' \u2028\u2029'; | |
/***/ }, | |
/* 85 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$parseFloat = __webpack_require__(86); | |
// 18.2.4 parseFloat(string) | |
$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); | |
/***/ }, | |
/* 86 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $parseFloat = __webpack_require__(4).parseFloat, | |
$trim = __webpack_require__(83).trim; | |
module.exports = 1 / $parseFloat(__webpack_require__(84) + '-0') !== -Infinity ? function parseFloat(str) { | |
var string = $trim(String(str), 3), | |
result = $parseFloat(string); | |
return result === 0 && string.charAt(0) == '-' ? -0 : result; | |
} : $parseFloat; | |
/***/ }, | |
/* 87 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var global = __webpack_require__(4), | |
has = __webpack_require__(5), | |
cof = __webpack_require__(34), | |
inheritIfRequired = __webpack_require__(88), | |
toPrimitive = __webpack_require__(16), | |
fails = __webpack_require__(7), | |
gOPN = __webpack_require__(50).f, | |
gOPD = __webpack_require__(51).f, | |
dP = __webpack_require__(11).f, | |
$trim = __webpack_require__(83).trim, | |
NUMBER = 'Number', | |
$Number = global[NUMBER], | |
Base = $Number, | |
proto = $Number.prototype | |
// Opera ~12 has broken Object#toString | |
, | |
BROKEN_COF = cof(__webpack_require__(46)(proto)) == NUMBER, | |
TRIM = 'trim' in String.prototype; | |
// 7.1.3 ToNumber(argument) | |
var toNumber = function toNumber(argument) { | |
var it = toPrimitive(argument, false); | |
if (typeof it == 'string' && it.length > 2) { | |
it = TRIM ? it.trim() : $trim(it, 3); | |
var first = it.charCodeAt(0), | |
third, | |
radix, | |
maxCode; | |
if (first === 43 || first === 45) { | |
third = it.charCodeAt(2); | |
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix | |
} else if (first === 48) { | |
switch (it.charCodeAt(1)) { | |
case 66:case 98: | |
radix = 2;maxCode = 49;break; // fast equal /^0b[01]+$/i | |
case 79:case 111: | |
radix = 8;maxCode = 55;break; // fast equal /^0o[0-7]+$/i | |
default: | |
return +it; | |
} | |
for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { | |
code = digits.charCodeAt(i); | |
// parseInt parses a string to a first unavailable symbol | |
// but ToNumber should return NaN if a string contains unavailable symbols | |
if (code < 48 || code > maxCode) return NaN; | |
}return parseInt(digits, radix); | |
} | |
}return +it; | |
}; | |
if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { | |
$Number = function Number(value) { | |
var it = arguments.length < 1 ? 0 : value, | |
that = this; | |
return that instanceof $Number | |
// check on 1..constructor(foo) case | |
&& (BROKEN_COF ? fails(function () { | |
proto.valueOf.call(that); | |
}) : cof(that) != NUMBER) ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); | |
}; | |
for (var keys = __webpack_require__(6) ? gOPN(Base) : ( | |
// ES3: | |
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + | |
// ES6 (in case, if modules with ES6 Number statics required before): | |
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger').split(','), j = 0, key; keys.length > j; j++) { | |
if (has(Base, key = keys[j]) && !has($Number, key)) { | |
dP($Number, key, gOPD(Base, key)); | |
} | |
} | |
$Number.prototype = proto; | |
proto.constructor = $Number; | |
__webpack_require__(18)(global, NUMBER, $Number); | |
} | |
/***/ }, | |
/* 88 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObject = __webpack_require__(13), | |
setPrototypeOf = __webpack_require__(73).set; | |
module.exports = function (that, target, C) { | |
var P, | |
S = target.constructor; | |
if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { | |
setPrototypeOf(that, P); | |
}return that; | |
}; | |
/***/ }, | |
/* 89 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
anInstance = __webpack_require__(90), | |
toInteger = __webpack_require__(38), | |
aNumberValue = __webpack_require__(91), | |
repeat = __webpack_require__(92), | |
$toFixed = 1..toFixed, | |
floor = Math.floor, | |
data = [0, 0, 0, 0, 0, 0], | |
ERROR = 'Number.toFixed: incorrect invocation!', | |
ZERO = '0'; | |
var multiply = function multiply(n, c) { | |
var i = -1, | |
c2 = c; | |
while (++i < 6) { | |
c2 += n * data[i]; | |
data[i] = c2 % 1e7; | |
c2 = floor(c2 / 1e7); | |
} | |
}; | |
var divide = function divide(n) { | |
var i = 6, | |
c = 0; | |
while (--i >= 0) { | |
c += data[i]; | |
data[i] = floor(c / n); | |
c = c % n * 1e7; | |
} | |
}; | |
var numToString = function numToString() { | |
var i = 6, | |
s = ''; | |
while (--i >= 0) { | |
if (s !== '' || i === 0 || data[i] !== 0) { | |
var t = String(data[i]); | |
s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; | |
} | |
}return s; | |
}; | |
var pow = function pow(x, n, acc) { | |
return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); | |
}; | |
var log = function log(x) { | |
var n = 0, | |
x2 = x; | |
while (x2 >= 4096) { | |
n += 12; | |
x2 /= 4096; | |
} | |
while (x2 >= 2) { | |
n += 1; | |
x2 /= 2; | |
}return n; | |
}; | |
$export($export.P + $export.F * (!!$toFixed && (0.00008.toFixed(3) !== '0.000' || 0.9.toFixed(0) !== '1' || 1.255.toFixed(2) !== '1.25' || 1000000000000000128..toFixed(0) !== '1000000000000000128') || !__webpack_require__(7)(function () { | |
// V8 ~ Android 4.3- | |
$toFixed.call({}); | |
})), 'Number', { | |
toFixed: function toFixed(fractionDigits) { | |
var x = aNumberValue(this, ERROR), | |
f = toInteger(fractionDigits), | |
s = '', | |
m = ZERO, | |
e, | |
z, | |
j, | |
k; | |
if (f < 0 || f > 20) throw RangeError(ERROR); | |
if (x != x) return 'NaN'; | |
if (x <= -1e21 || x >= 1e21) return String(x); | |
if (x < 0) { | |
s = '-'; | |
x = -x; | |
} | |
if (x > 1e-21) { | |
e = log(x * pow(2, 69, 1)) - 69; | |
z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); | |
z *= 0x10000000000000; | |
e = 52 - e; | |
if (e > 0) { | |
multiply(0, z); | |
j = f; | |
while (j >= 7) { | |
multiply(1e7, 0); | |
j -= 7; | |
} | |
multiply(pow(10, j, 1), 0); | |
j = e - 1; | |
while (j >= 23) { | |
divide(1 << 23); | |
j -= 23; | |
} | |
divide(1 << j); | |
multiply(1, 1); | |
divide(2); | |
m = numToString(); | |
} else { | |
multiply(0, z); | |
multiply(1 << -e, 0); | |
m = numToString() + repeat.call(ZERO, f); | |
} | |
} | |
if (f > 0) { | |
k = m.length; | |
m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); | |
} else { | |
m = s + m; | |
}return m; | |
} | |
}); | |
/***/ }, | |
/* 90 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
module.exports = function (it, Constructor, name, forbiddenField) { | |
if (!(it instanceof Constructor) || forbiddenField !== undefined && forbiddenField in it) { | |
throw TypeError(name + ': incorrect invocation!'); | |
}return it; | |
}; | |
/***/ }, | |
/* 91 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var cof = __webpack_require__(34); | |
module.exports = function (it, msg) { | |
if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); | |
return +it; | |
}; | |
/***/ }, | |
/* 92 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var toInteger = __webpack_require__(38), | |
defined = __webpack_require__(35); | |
module.exports = function repeat(count) { | |
var str = String(defined(this)), | |
res = '', | |
n = toInteger(count); | |
if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); | |
for (; n > 0; (n >>>= 1) && (str += str)) { | |
if (n & 1) res += str; | |
}return res; | |
}; | |
/***/ }, | |
/* 93 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$fails = __webpack_require__(7), | |
aNumberValue = __webpack_require__(91), | |
$toPrecision = 1..toPrecision; | |
$export($export.P + $export.F * ($fails(function () { | |
// IE7- | |
return $toPrecision.call(1, undefined) !== '1'; | |
}) || !$fails(function () { | |
// V8 ~ Android 4.3- | |
$toPrecision.call({}); | |
})), 'Number', { | |
toPrecision: function toPrecision(precision) { | |
var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); | |
return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); | |
} | |
}); | |
/***/ }, | |
/* 94 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.1.2.1 Number.EPSILON | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); | |
/***/ }, | |
/* 95 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.1.2.2 Number.isFinite(number) | |
var $export = __webpack_require__(8), | |
_isFinite = __webpack_require__(4).isFinite; | |
$export($export.S, 'Number', { | |
isFinite: function isFinite(it) { | |
return typeof it == 'number' && _isFinite(it); | |
} | |
}); | |
/***/ }, | |
/* 96 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.1.2.3 Number.isInteger(number) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Number', { isInteger: __webpack_require__(97) }); | |
/***/ }, | |
/* 97 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.1.2.3 Number.isInteger(number) | |
var isObject = __webpack_require__(13), | |
floor = Math.floor; | |
module.exports = function isInteger(it) { | |
return !isObject(it) && isFinite(it) && floor(it) === it; | |
}; | |
/***/ }, | |
/* 98 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.1.2.4 Number.isNaN(number) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Number', { | |
isNaN: function isNaN(number) { | |
return number != number; | |
} | |
}); | |
/***/ }, | |
/* 99 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.1.2.5 Number.isSafeInteger(number) | |
var $export = __webpack_require__(8), | |
isInteger = __webpack_require__(97), | |
abs = Math.abs; | |
$export($export.S, 'Number', { | |
isSafeInteger: function isSafeInteger(number) { | |
return isInteger(number) && abs(number) <= 0x1fffffffffffff; | |
} | |
}); | |
/***/ }, | |
/* 100 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.1.2.6 Number.MAX_SAFE_INTEGER | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); | |
/***/ }, | |
/* 101 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.1.2.10 Number.MIN_SAFE_INTEGER | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); | |
/***/ }, | |
/* 102 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$parseFloat = __webpack_require__(86); | |
// 20.1.2.12 Number.parseFloat(string) | |
$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); | |
/***/ }, | |
/* 103 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$parseInt = __webpack_require__(82); | |
// 20.1.2.13 Number.parseInt(string, radix) | |
$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); | |
/***/ }, | |
/* 104 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.3 Math.acosh(x) | |
var $export = __webpack_require__(8), | |
log1p = __webpack_require__(105), | |
sqrt = Math.sqrt, | |
$acosh = Math.acosh; | |
$export($export.S + $export.F * !($acosh | |
// V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 | |
&& Math.floor($acosh(Number.MAX_VALUE)) == 710 | |
// Tor Browser bug: Math.acosh(Infinity) -> NaN | |
&& $acosh(Infinity) == Infinity), 'Math', { | |
acosh: function acosh(x) { | |
return (x = +x) < 1 ? NaN : x > 94906265.62425156 ? Math.log(x) + Math.LN2 : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); | |
} | |
}); | |
/***/ }, | |
/* 105 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
// 20.2.2.20 Math.log1p(x) | |
module.exports = Math.log1p || function log1p(x) { | |
return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); | |
}; | |
/***/ }, | |
/* 106 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.5 Math.asinh(x) | |
var $export = __webpack_require__(8), | |
$asinh = Math.asinh; | |
function asinh(x) { | |
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); | |
} | |
// Tor Browser bug: Math.asinh(0) -> -0 | |
$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); | |
/***/ }, | |
/* 107 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.7 Math.atanh(x) | |
var $export = __webpack_require__(8), | |
$atanh = Math.atanh; | |
// Tor Browser bug: Math.atanh(-0) -> 0 | |
$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { | |
atanh: function atanh(x) { | |
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; | |
} | |
}); | |
/***/ }, | |
/* 108 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.9 Math.cbrt(x) | |
var $export = __webpack_require__(8), | |
sign = __webpack_require__(109); | |
$export($export.S, 'Math', { | |
cbrt: function cbrt(x) { | |
return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); | |
} | |
}); | |
/***/ }, | |
/* 109 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
// 20.2.2.28 Math.sign(x) | |
module.exports = Math.sign || function sign(x) { | |
return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; | |
}; | |
/***/ }, | |
/* 110 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.11 Math.clz32(x) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Math', { | |
clz32: function clz32(x) { | |
return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; | |
} | |
}); | |
/***/ }, | |
/* 111 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.12 Math.cosh(x) | |
var $export = __webpack_require__(8), | |
exp = Math.exp; | |
$export($export.S, 'Math', { | |
cosh: function cosh(x) { | |
return (exp(x = +x) + exp(-x)) / 2; | |
} | |
}); | |
/***/ }, | |
/* 112 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.14 Math.expm1(x) | |
var $export = __webpack_require__(8), | |
$expm1 = __webpack_require__(113); | |
$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); | |
/***/ }, | |
/* 113 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
// 20.2.2.14 Math.expm1(x) | |
var $expm1 = Math.expm1; | |
module.exports = !$expm1 | |
// Old FF bug | |
|| $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 | |
// Tor Browser bug | |
|| $expm1(-2e-17) != -2e-17 ? function expm1(x) { | |
return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; | |
} : $expm1; | |
/***/ }, | |
/* 114 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.16 Math.fround(x) | |
var $export = __webpack_require__(8), | |
sign = __webpack_require__(109), | |
pow = Math.pow, | |
EPSILON = pow(2, -52), | |
EPSILON32 = pow(2, -23), | |
MAX32 = pow(2, 127) * (2 - EPSILON32), | |
MIN32 = pow(2, -126); | |
var roundTiesToEven = function roundTiesToEven(n) { | |
return n + 1 / EPSILON - 1 / EPSILON; | |
}; | |
$export($export.S, 'Math', { | |
fround: function fround(x) { | |
var $abs = Math.abs(x), | |
$sign = sign(x), | |
a, | |
result; | |
if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; | |
a = (1 + EPSILON32 / EPSILON) * $abs; | |
result = a - (a - $abs); | |
if (result > MAX32 || result != result) return $sign * Infinity; | |
return $sign * result; | |
} | |
}); | |
/***/ }, | |
/* 115 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) | |
var $export = __webpack_require__(8), | |
abs = Math.abs; | |
$export($export.S, 'Math', { | |
hypot: function hypot(value1, value2) { | |
// eslint-disable-line no-unused-vars | |
var sum = 0, | |
i = 0, | |
aLen = arguments.length, | |
larg = 0, | |
arg, | |
div; | |
while (i < aLen) { | |
arg = abs(arguments[i++]); | |
if (larg < arg) { | |
div = larg / arg; | |
sum = sum * div * div + 1; | |
larg = arg; | |
} else if (arg > 0) { | |
div = arg / larg; | |
sum += div * div; | |
} else sum += arg; | |
} | |
return larg === Infinity ? Infinity : larg * Math.sqrt(sum); | |
} | |
}); | |
/***/ }, | |
/* 116 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.18 Math.imul(x, y) | |
var $export = __webpack_require__(8), | |
$imul = Math.imul; | |
// some WebKit versions fails with big numbers, some has wrong arity | |
$export($export.S + $export.F * __webpack_require__(7)(function () { | |
return $imul(0xffffffff, 5) != -5 || $imul.length != 2; | |
}), 'Math', { | |
imul: function imul(x, y) { | |
var UINT16 = 0xffff, | |
xn = +x, | |
yn = +y, | |
xl = UINT16 & xn, | |
yl = UINT16 & yn; | |
return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); | |
} | |
}); | |
/***/ }, | |
/* 117 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.21 Math.log10(x) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Math', { | |
log10: function log10(x) { | |
return Math.log(x) / Math.LN10; | |
} | |
}); | |
/***/ }, | |
/* 118 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.20 Math.log1p(x) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Math', { log1p: __webpack_require__(105) }); | |
/***/ }, | |
/* 119 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.22 Math.log2(x) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Math', { | |
log2: function log2(x) { | |
return Math.log(x) / Math.LN2; | |
} | |
}); | |
/***/ }, | |
/* 120 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.28 Math.sign(x) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Math', { sign: __webpack_require__(109) }); | |
/***/ }, | |
/* 121 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.30 Math.sinh(x) | |
var $export = __webpack_require__(8), | |
expm1 = __webpack_require__(113), | |
exp = Math.exp; | |
// V8 near Chromium 38 has a problem with very small numbers | |
$export($export.S + $export.F * __webpack_require__(7)(function () { | |
return !Math.sinh(-2e-17) != -2e-17; | |
}), 'Math', { | |
sinh: function sinh(x) { | |
return Math.abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); | |
} | |
}); | |
/***/ }, | |
/* 122 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.33 Math.tanh(x) | |
var $export = __webpack_require__(8), | |
expm1 = __webpack_require__(113), | |
exp = Math.exp; | |
$export($export.S, 'Math', { | |
tanh: function tanh(x) { | |
var a = expm1(x = +x), | |
b = expm1(-x); | |
return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); | |
} | |
}); | |
/***/ }, | |
/* 123 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.2.2.34 Math.trunc(x) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Math', { | |
trunc: function trunc(it) { | |
return (it > 0 ? Math.floor : Math.ceil)(it); | |
} | |
}); | |
/***/ }, | |
/* 124 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
toIndex = __webpack_require__(39), | |
fromCharCode = String.fromCharCode, | |
$fromCodePoint = String.fromCodePoint; | |
// length should be 1, old FF problem | |
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { | |
// 21.1.2.2 String.fromCodePoint(...codePoints) | |
fromCodePoint: function fromCodePoint(x) { | |
// eslint-disable-line no-unused-vars | |
var res = [], | |
aLen = arguments.length, | |
i = 0, | |
code; | |
while (aLen > i) { | |
code = +arguments[i++]; | |
if (toIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); | |
res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)); | |
}return res.join(''); | |
} | |
}); | |
/***/ }, | |
/* 125 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
toIObject = __webpack_require__(32), | |
toLength = __webpack_require__(37); | |
$export($export.S, 'String', { | |
// 21.1.2.4 String.raw(callSite, ...substitutions) | |
raw: function raw(callSite) { | |
var tpl = toIObject(callSite.raw), | |
len = toLength(tpl.length), | |
aLen = arguments.length, | |
res = [], | |
i = 0; | |
while (len > i) { | |
res.push(String(tpl[i++])); | |
if (i < aLen) res.push(String(arguments[i])); | |
}return res.join(''); | |
} | |
}); | |
/***/ }, | |
/* 126 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 21.1.3.25 String.prototype.trim() | |
__webpack_require__(83)('trim', function ($trim) { | |
return function trim() { | |
return $trim(this, 3); | |
}; | |
}); | |
/***/ }, | |
/* 127 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $at = __webpack_require__(128)(true); | |
// 21.1.3.27 String.prototype[@@iterator]() | |
__webpack_require__(129)(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, | |
index = this._i, | |
point; | |
if (index >= O.length) return { value: undefined, done: true }; | |
point = $at(O, index); | |
this._i += point.length; | |
return { value: point, done: false }; | |
}); | |
/***/ }, | |
/* 128 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var toInteger = __webpack_require__(38), | |
defined = __webpack_require__(35); | |
// true -> String#at | |
// false -> String#codePointAt | |
module.exports = function (TO_STRING) { | |
return function (that, pos) { | |
var s = String(defined(that)), | |
i = toInteger(pos), | |
l = s.length, | |
a, | |
b; | |
if (i < 0 || i >= l) return TO_STRING ? '' : undefined; | |
a = s.charCodeAt(i); | |
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; | |
}; | |
}; | |
/***/ }, | |
/* 129 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var LIBRARY = __webpack_require__(28), | |
$export = __webpack_require__(8), | |
redefine = __webpack_require__(18), | |
hide = __webpack_require__(10), | |
has = __webpack_require__(5), | |
Iterators = __webpack_require__(130), | |
$iterCreate = __webpack_require__(131), | |
setToStringTag = __webpack_require__(24), | |
getPrototypeOf = __webpack_require__(59), | |
ITERATOR = __webpack_require__(25)('iterator'), | |
BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` | |
, | |
FF_ITERATOR = '@@iterator', | |
KEYS = 'keys', | |
VALUES = 'values'; | |
var returnThis = function returnThis() { | |
return this; | |
}; | |
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { | |
$iterCreate(Constructor, NAME, next); | |
var getMethod = function getMethod(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', | |
DEF_VALUES = DEFAULT == VALUES, | |
VALUES_BUG = false, | |
proto = Base.prototype, | |
$native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT], | |
$default = $native || getMethod(DEFAULT), | |
$entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined, | |
$anyNative = NAME == 'Array' ? proto.entries || $native : $native, | |
methods, | |
key, | |
IteratorPrototype; | |
// Fix native | |
if ($anyNative) { | |
IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); | |
if (IteratorPrototype !== Object.prototype) { | |
// Set @@toStringTag to native iterators | |
setToStringTag(IteratorPrototype, TAG, true); | |
// fix for some old engines | |
if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) 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; | |
}; | |
/***/ }, | |
/* 130 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = {}; | |
/***/ }, | |
/* 131 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var create = __webpack_require__(46), | |
descriptor = __webpack_require__(17), | |
setToStringTag = __webpack_require__(24), | |
IteratorPrototype = {}; | |
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() | |
__webpack_require__(10)(IteratorPrototype, __webpack_require__(25)('iterator'), function () { | |
return this; | |
}); | |
module.exports = function (Constructor, NAME, next) { | |
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); | |
setToStringTag(Constructor, NAME + ' Iterator'); | |
}; | |
/***/ }, | |
/* 132 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$at = __webpack_require__(128)(false); | |
$export($export.P, 'String', { | |
// 21.1.3.3 String.prototype.codePointAt(pos) | |
codePointAt: function codePointAt(pos) { | |
return $at(this, pos); | |
} | |
}); | |
/***/ }, | |
/* 133 */ | |
/***/ function(module, exports, __webpack_require__) { | |
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) | |
'use strict'; | |
var $export = __webpack_require__(8), | |
toLength = __webpack_require__(37), | |
context = __webpack_require__(134), | |
ENDS_WITH = 'endsWith', | |
$endsWith = ''[ENDS_WITH]; | |
$export($export.P + $export.F * __webpack_require__(136)(ENDS_WITH), 'String', { | |
endsWith: function endsWith(searchString /*, endPosition = @length */) { | |
var that = context(this, searchString, ENDS_WITH), | |
endPosition = arguments.length > 1 ? arguments[1] : undefined, | |
len = toLength(that.length), | |
end = endPosition === undefined ? len : Math.min(toLength(endPosition), len), | |
search = String(searchString); | |
return $endsWith ? $endsWith.call(that, search, end) : that.slice(end - search.length, end) === search; | |
} | |
}); | |
/***/ }, | |
/* 134 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// helper for String#{startsWith, endsWith, includes} | |
var isRegExp = __webpack_require__(135), | |
defined = __webpack_require__(35); | |
module.exports = function (that, searchString, NAME) { | |
if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); | |
return String(defined(that)); | |
}; | |
/***/ }, | |
/* 135 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 7.2.8 IsRegExp(argument) | |
var isObject = __webpack_require__(13), | |
cof = __webpack_require__(34), | |
MATCH = __webpack_require__(25)('match'); | |
module.exports = function (it) { | |
var isRegExp; | |
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); | |
}; | |
/***/ }, | |
/* 136 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var MATCH = __webpack_require__(25)('match'); | |
module.exports = function (KEY) { | |
var re = /./; | |
try { | |
'/./'[KEY](re); | |
} catch (e) { | |
try { | |
re[MATCH] = false; | |
return !'/./'[KEY](re); | |
} catch (f) {/* empty */} | |
}return true; | |
}; | |
/***/ }, | |
/* 137 */ | |
/***/ function(module, exports, __webpack_require__) { | |
// 21.1.3.7 String.prototype.includes(searchString, position = 0) | |
'use strict'; | |
var $export = __webpack_require__(8), | |
context = __webpack_require__(134), | |
INCLUDES = 'includes'; | |
$export($export.P + $export.F * __webpack_require__(136)(INCLUDES), 'String', { | |
includes: function includes(searchString /*, position = 0 */) { | |
return !!~context(this, searchString, INCLUDES).indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); | |
} | |
}); | |
/***/ }, | |
/* 138 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8); | |
$export($export.P, 'String', { | |
// 21.1.3.13 String.prototype.repeat(count) | |
repeat: __webpack_require__(92) | |
}); | |
/***/ }, | |
/* 139 */ | |
/***/ function(module, exports, __webpack_require__) { | |
// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) | |
'use strict'; | |
var $export = __webpack_require__(8), | |
toLength = __webpack_require__(37), | |
context = __webpack_require__(134), | |
STARTS_WITH = 'startsWith', | |
$startsWith = ''[STARTS_WITH]; | |
$export($export.P + $export.F * __webpack_require__(136)(STARTS_WITH), 'String', { | |
startsWith: function startsWith(searchString /*, position = 0 */) { | |
var that = context(this, searchString, STARTS_WITH), | |
index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)), | |
search = String(searchString); | |
return $startsWith ? $startsWith.call(that, search, index) : that.slice(index, index + search.length) === search; | |
} | |
}); | |
/***/ }, | |
/* 140 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.2 String.prototype.anchor(name) | |
__webpack_require__(141)('anchor', function (createHTML) { | |
return function anchor(name) { | |
return createHTML(this, 'a', 'name', name); | |
}; | |
}); | |
/***/ }, | |
/* 141 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
fails = __webpack_require__(7), | |
defined = __webpack_require__(35), | |
quot = /"/g; | |
// B.2.3.2.1 CreateHTML(string, tag, attribute, value) | |
var createHTML = function createHTML(string, tag, attribute, value) { | |
var S = String(defined(string)), | |
p1 = '<' + tag; | |
if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; | |
return p1 + '>' + S + '</' + tag + '>'; | |
}; | |
module.exports = function (NAME, exec) { | |
var O = {}; | |
O[NAME] = exec(createHTML); | |
$export($export.P + $export.F * fails(function () { | |
var test = ''[NAME]('"'); | |
return test !== test.toLowerCase() || test.split('"').length > 3; | |
}), 'String', O); | |
}; | |
/***/ }, | |
/* 142 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.3 String.prototype.big() | |
__webpack_require__(141)('big', function (createHTML) { | |
return function big() { | |
return createHTML(this, 'big', '', ''); | |
}; | |
}); | |
/***/ }, | |
/* 143 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.4 String.prototype.blink() | |
__webpack_require__(141)('blink', function (createHTML) { | |
return function blink() { | |
return createHTML(this, 'blink', '', ''); | |
}; | |
}); | |
/***/ }, | |
/* 144 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.5 String.prototype.bold() | |
__webpack_require__(141)('bold', function (createHTML) { | |
return function bold() { | |
return createHTML(this, 'b', '', ''); | |
}; | |
}); | |
/***/ }, | |
/* 145 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.6 String.prototype.fixed() | |
__webpack_require__(141)('fixed', function (createHTML) { | |
return function fixed() { | |
return createHTML(this, 'tt', '', ''); | |
}; | |
}); | |
/***/ }, | |
/* 146 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.7 String.prototype.fontcolor(color) | |
__webpack_require__(141)('fontcolor', function (createHTML) { | |
return function fontcolor(color) { | |
return createHTML(this, 'font', 'color', color); | |
}; | |
}); | |
/***/ }, | |
/* 147 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.8 String.prototype.fontsize(size) | |
__webpack_require__(141)('fontsize', function (createHTML) { | |
return function fontsize(size) { | |
return createHTML(this, 'font', 'size', size); | |
}; | |
}); | |
/***/ }, | |
/* 148 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.9 String.prototype.italics() | |
__webpack_require__(141)('italics', function (createHTML) { | |
return function italics() { | |
return createHTML(this, 'i', '', ''); | |
}; | |
}); | |
/***/ }, | |
/* 149 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.10 String.prototype.link(url) | |
__webpack_require__(141)('link', function (createHTML) { | |
return function link(url) { | |
return createHTML(this, 'a', 'href', url); | |
}; | |
}); | |
/***/ }, | |
/* 150 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.11 String.prototype.small() | |
__webpack_require__(141)('small', function (createHTML) { | |
return function small() { | |
return createHTML(this, 'small', '', ''); | |
}; | |
}); | |
/***/ }, | |
/* 151 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.12 String.prototype.strike() | |
__webpack_require__(141)('strike', function (createHTML) { | |
return function strike() { | |
return createHTML(this, 'strike', '', ''); | |
}; | |
}); | |
/***/ }, | |
/* 152 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.13 String.prototype.sub() | |
__webpack_require__(141)('sub', function (createHTML) { | |
return function sub() { | |
return createHTML(this, 'sub', '', ''); | |
}; | |
}); | |
/***/ }, | |
/* 153 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// B.2.3.14 String.prototype.sup() | |
__webpack_require__(141)('sup', function (createHTML) { | |
return function sup() { | |
return createHTML(this, 'sup', '', ''); | |
}; | |
}); | |
/***/ }, | |
/* 154 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.3.3.1 / 15.9.4.4 Date.now() | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Date', { now: function now() { | |
return new Date().getTime(); | |
} }); | |
/***/ }, | |
/* 155 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
toObject = __webpack_require__(58), | |
toPrimitive = __webpack_require__(16); | |
$export($export.P + $export.F * __webpack_require__(7)(function () { | |
return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({ toISOString: function toISOString() { | |
return 1; | |
} }) !== 1; | |
}), 'Date', { | |
toJSON: function toJSON(key) { | |
var O = toObject(this), | |
pv = toPrimitive(O); | |
return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); | |
} | |
}); | |
/***/ }, | |
/* 156 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() | |
var $export = __webpack_require__(8), | |
fails = __webpack_require__(7), | |
getTime = Date.prototype.getTime; | |
var lz = function lz(num) { | |
return num > 9 ? num : '0' + num; | |
}; | |
// PhantomJS / old WebKit has a broken implementations | |
$export($export.P + $export.F * (fails(function () { | |
return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; | |
}) || !fails(function () { | |
new Date(NaN).toISOString(); | |
})), 'Date', { | |
toISOString: function toISOString() { | |
if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); | |
var d = this, | |
y = d.getUTCFullYear(), | |
m = d.getUTCMilliseconds(), | |
s = y < 0 ? '-' : y > 9999 ? '+' : ''; | |
return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; | |
} | |
}); | |
/***/ }, | |
/* 157 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var DateProto = Date.prototype, | |
INVALID_DATE = 'Invalid Date', | |
TO_STRING = 'toString', | |
$toString = DateProto[TO_STRING], | |
getTime = DateProto.getTime; | |
if (new Date(NaN) + '' != INVALID_DATE) { | |
__webpack_require__(18)(DateProto, TO_STRING, function toString() { | |
var value = getTime.call(this); | |
return value === value ? $toString.call(this) : INVALID_DATE; | |
}); | |
} | |
/***/ }, | |
/* 158 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var TO_PRIMITIVE = __webpack_require__(25)('toPrimitive'), | |
proto = Date.prototype; | |
if (!(TO_PRIMITIVE in proto)) __webpack_require__(10)(proto, TO_PRIMITIVE, __webpack_require__(159)); | |
/***/ }, | |
/* 159 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var anObject = __webpack_require__(12), | |
toPrimitive = __webpack_require__(16), | |
NUMBER = 'number'; | |
module.exports = function (hint) { | |
if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); | |
return toPrimitive(anObject(this), hint != NUMBER); | |
}; | |
/***/ }, | |
/* 160 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Array', { isArray: __webpack_require__(45) }); | |
/***/ }, | |
/* 161 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var ctx = __webpack_require__(20), | |
$export = __webpack_require__(8), | |
toObject = __webpack_require__(58), | |
call = __webpack_require__(162), | |
isArrayIter = __webpack_require__(163), | |
toLength = __webpack_require__(37), | |
createProperty = __webpack_require__(164), | |
getIterFn = __webpack_require__(165); | |
$export($export.S + $export.F * !__webpack_require__(166)(function (iter) { | |
Array.from(iter); | |
}), 'Array', { | |
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) | |
from: function from(arrayLike /*, mapfn = undefined, thisArg = undefined*/) { | |
var O = toObject(arrayLike), | |
C = typeof this == 'function' ? this : Array, | |
aLen = arguments.length, | |
mapfn = aLen > 1 ? arguments[1] : undefined, | |
mapping = mapfn !== undefined, | |
index = 0, | |
iterFn = getIterFn(O), | |
length, | |
result, | |
step, | |
iterator; | |
if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); | |
// if object isn't iterable or it's array with default iterator - use simple case | |
if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { | |
for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { | |
createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); | |
} | |
} else { | |
length = toLength(O.length); | |
for (result = new C(length); length > index; index++) { | |
createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); | |
} | |
} | |
result.length = index; | |
return result; | |
} | |
}); | |
/***/ }, | |
/* 162 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// call something on iterator step with safe closing on error | |
var anObject = __webpack_require__(12); | |
module.exports = function (iterator, fn, value, entries) { | |
try { | |
return entries ? fn(anObject(value)[0], value[1]) : fn(value); | |
// 7.4.6 IteratorClose(iterator, completion) | |
} catch (e) { | |
var ret = iterator['return']; | |
if (ret !== undefined) anObject(ret.call(iterator)); | |
throw e; | |
} | |
}; | |
/***/ }, | |
/* 163 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// check on default Array iterator | |
var Iterators = __webpack_require__(130), | |
ITERATOR = __webpack_require__(25)('iterator'), | |
ArrayProto = Array.prototype; | |
module.exports = function (it) { | |
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); | |
}; | |
/***/ }, | |
/* 164 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $defineProperty = __webpack_require__(11), | |
createDesc = __webpack_require__(17); | |
module.exports = function (object, index, value) { | |
if (index in object) $defineProperty.f(object, index, createDesc(0, value));else object[index] = value; | |
}; | |
/***/ }, | |
/* 165 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var classof = __webpack_require__(75), | |
ITERATOR = __webpack_require__(25)('iterator'), | |
Iterators = __webpack_require__(130); | |
module.exports = __webpack_require__(9).getIteratorMethod = function (it) { | |
if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; | |
}; | |
/***/ }, | |
/* 166 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var ITERATOR = __webpack_require__(25)('iterator'), | |
SAFE_CLOSING = false; | |
try { | |
var riter = [7][ITERATOR](); | |
riter['return'] = function () { | |
SAFE_CLOSING = true; | |
}; | |
Array.from(riter, function () { | |
throw 2; | |
}); | |
} catch (e) {/* empty */} | |
module.exports = function (exec, skipClosing) { | |
if (!skipClosing && !SAFE_CLOSING) return false; | |
var safe = false; | |
try { | |
var arr = [7], | |
iter = arr[ITERATOR](); | |
iter.next = function () { | |
return { done: safe = true }; | |
}; | |
arr[ITERATOR] = function () { | |
return iter; | |
}; | |
exec(arr); | |
} catch (e) {/* empty */} | |
return safe; | |
}; | |
/***/ }, | |
/* 167 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
createProperty = __webpack_require__(164); | |
// WebKit Array.of isn't generic | |
$export($export.S + $export.F * __webpack_require__(7)(function () { | |
function F() {} | |
return !(Array.of.call(F) instanceof F); | |
}), 'Array', { | |
// 22.1.2.3 Array.of( ...items) | |
of: function of() /* ...args */{ | |
var index = 0, | |
aLen = arguments.length, | |
result = new (typeof this == 'function' ? this : Array)(aLen); | |
while (aLen > index) { | |
createProperty(result, index, arguments[index++]); | |
}result.length = aLen; | |
return result; | |
} | |
}); | |
/***/ }, | |
/* 168 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 22.1.3.13 Array.prototype.join(separator) | |
var $export = __webpack_require__(8), | |
toIObject = __webpack_require__(32), | |
arrayJoin = [].join; | |
// fallback for not array-like strings | |
$export($export.P + $export.F * (__webpack_require__(33) != Object || !__webpack_require__(169)(arrayJoin)), 'Array', { | |
join: function join(separator) { | |
return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); | |
} | |
}); | |
/***/ }, | |
/* 169 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var fails = __webpack_require__(7); | |
module.exports = function (method, arg) { | |
return !!method && fails(function () { | |
arg ? method.call(null, function () {}, 1) : method.call(null); | |
}); | |
}; | |
/***/ }, | |
/* 170 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
html = __webpack_require__(48), | |
cof = __webpack_require__(34), | |
toIndex = __webpack_require__(39), | |
toLength = __webpack_require__(37), | |
arraySlice = [].slice; | |
// fallback for not array-like ES3 strings and DOM objects | |
$export($export.P + $export.F * __webpack_require__(7)(function () { | |
if (html) arraySlice.call(html); | |
}), 'Array', { | |
slice: function slice(begin, end) { | |
var len = toLength(this.length), | |
klass = cof(this); | |
end = end === undefined ? len : end; | |
if (klass == 'Array') return arraySlice.call(this, begin, end); | |
var start = toIndex(begin, len), | |
upTo = toIndex(end, len), | |
size = toLength(upTo - start), | |
cloned = Array(size), | |
i = 0; | |
for (; i < size; i++) { | |
cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; | |
}return cloned; | |
} | |
}); | |
/***/ }, | |
/* 171 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
aFunction = __webpack_require__(21), | |
toObject = __webpack_require__(58), | |
fails = __webpack_require__(7), | |
$sort = [].sort, | |
test = [1, 2, 3]; | |
$export($export.P + $export.F * (fails(function () { | |
// IE8- | |
test.sort(undefined); | |
}) || !fails(function () { | |
// V8 bug | |
test.sort(null); | |
// Old WebKit | |
}) || !__webpack_require__(169)($sort)), 'Array', { | |
// 22.1.3.25 Array.prototype.sort(comparefn) | |
sort: function sort(comparefn) { | |
return comparefn === undefined ? $sort.call(toObject(this)) : $sort.call(toObject(this), aFunction(comparefn)); | |
} | |
}); | |
/***/ }, | |
/* 172 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$forEach = __webpack_require__(173)(0), | |
STRICT = __webpack_require__(169)([].forEach, true); | |
$export($export.P + $export.F * !STRICT, 'Array', { | |
// 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) | |
forEach: function forEach(callbackfn /* , thisArg */) { | |
return $forEach(this, callbackfn, arguments[1]); | |
} | |
}); | |
/***/ }, | |
/* 173 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 0 -> Array#forEach | |
// 1 -> Array#map | |
// 2 -> Array#filter | |
// 3 -> Array#some | |
// 4 -> Array#every | |
// 5 -> Array#find | |
// 6 -> Array#findIndex | |
var ctx = __webpack_require__(20), | |
IObject = __webpack_require__(33), | |
toObject = __webpack_require__(58), | |
toLength = __webpack_require__(37), | |
asc = __webpack_require__(174); | |
module.exports = function (TYPE, $create) { | |
var IS_MAP = TYPE == 1, | |
IS_FILTER = TYPE == 2, | |
IS_SOME = TYPE == 3, | |
IS_EVERY = TYPE == 4, | |
IS_FIND_INDEX = TYPE == 6, | |
NO_HOLES = TYPE == 5 || IS_FIND_INDEX, | |
create = $create || asc; | |
return function ($this, callbackfn, that) { | |
var O = toObject($this), | |
self = IObject(O), | |
f = ctx(callbackfn, that, 3), | |
length = toLength(self.length), | |
index = 0, | |
result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined, | |
val, | |
res; | |
for (; length > index; index++) { | |
if (NO_HOLES || index in self) { | |
val = self[index]; | |
res = f(val, index, O); | |
if (TYPE) { | |
if (IS_MAP) result[index] = res; // map | |
else if (res) switch (TYPE) { | |
case 3: | |
return true; // some | |
case 5: | |
return val; // find | |
case 6: | |
return index; // findIndex | |
case 2: | |
result.push(val); // filter | |
} else if (IS_EVERY) return false; // every | |
} | |
} | |
}return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; | |
}; | |
}; | |
/***/ }, | |
/* 174 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 9.4.2.3 ArraySpeciesCreate(originalArray, length) | |
var speciesConstructor = __webpack_require__(175); | |
module.exports = function (original, length) { | |
return new (speciesConstructor(original))(length); | |
}; | |
/***/ }, | |
/* 175 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObject = __webpack_require__(13), | |
isArray = __webpack_require__(45), | |
SPECIES = __webpack_require__(25)('species'); | |
module.exports = function (original) { | |
var C; | |
if (isArray(original)) { | |
C = original.constructor; | |
// cross-realm fallback | |
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; | |
if (isObject(C)) { | |
C = C[SPECIES]; | |
if (C === null) C = undefined; | |
} | |
}return C === undefined ? Array : C; | |
}; | |
/***/ }, | |
/* 176 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$map = __webpack_require__(173)(1); | |
$export($export.P + $export.F * !__webpack_require__(169)([].map, true), 'Array', { | |
// 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) | |
map: function map(callbackfn /* , thisArg */) { | |
return $map(this, callbackfn, arguments[1]); | |
} | |
}); | |
/***/ }, | |
/* 177 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$filter = __webpack_require__(173)(2); | |
$export($export.P + $export.F * !__webpack_require__(169)([].filter, true), 'Array', { | |
// 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) | |
filter: function filter(callbackfn /* , thisArg */) { | |
return $filter(this, callbackfn, arguments[1]); | |
} | |
}); | |
/***/ }, | |
/* 178 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$some = __webpack_require__(173)(3); | |
$export($export.P + $export.F * !__webpack_require__(169)([].some, true), 'Array', { | |
// 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) | |
some: function some(callbackfn /* , thisArg */) { | |
return $some(this, callbackfn, arguments[1]); | |
} | |
}); | |
/***/ }, | |
/* 179 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$every = __webpack_require__(173)(4); | |
$export($export.P + $export.F * !__webpack_require__(169)([].every, true), 'Array', { | |
// 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) | |
every: function every(callbackfn /* , thisArg */) { | |
return $every(this, callbackfn, arguments[1]); | |
} | |
}); | |
/***/ }, | |
/* 180 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$reduce = __webpack_require__(181); | |
$export($export.P + $export.F * !__webpack_require__(169)([].reduce, true), 'Array', { | |
// 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) | |
reduce: function reduce(callbackfn /* , initialValue */) { | |
return $reduce(this, callbackfn, arguments.length, arguments[1], false); | |
} | |
}); | |
/***/ }, | |
/* 181 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var aFunction = __webpack_require__(21), | |
toObject = __webpack_require__(58), | |
IObject = __webpack_require__(33), | |
toLength = __webpack_require__(37); | |
module.exports = function (that, callbackfn, aLen, memo, isRight) { | |
aFunction(callbackfn); | |
var O = toObject(that), | |
self = IObject(O), | |
length = toLength(O.length), | |
index = isRight ? length - 1 : 0, | |
i = isRight ? -1 : 1; | |
if (aLen < 2) for (;;) { | |
if (index in self) { | |
memo = self[index]; | |
index += i; | |
break; | |
} | |
index += i; | |
if (isRight ? index < 0 : length <= index) { | |
throw TypeError('Reduce of empty array with no initial value'); | |
} | |
} | |
for (; isRight ? index >= 0 : length > index; index += i) { | |
if (index in self) { | |
memo = callbackfn(memo, self[index], index, O); | |
} | |
}return memo; | |
}; | |
/***/ }, | |
/* 182 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$reduce = __webpack_require__(181); | |
$export($export.P + $export.F * !__webpack_require__(169)([].reduceRight, true), 'Array', { | |
// 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) | |
reduceRight: function reduceRight(callbackfn /* , initialValue */) { | |
return $reduce(this, callbackfn, arguments.length, arguments[1], true); | |
} | |
}); | |
/***/ }, | |
/* 183 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$indexOf = __webpack_require__(36)(false), | |
$native = [].indexOf, | |
NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; | |
$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(169)($native)), 'Array', { | |
// 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) | |
indexOf: function indexOf(searchElement /*, fromIndex = 0 */) { | |
return NEGATIVE_ZERO | |
// convert -0 to +0 | |
? $native.apply(this, arguments) || 0 : $indexOf(this, searchElement, arguments[1]); | |
} | |
}); | |
/***/ }, | |
/* 184 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
toIObject = __webpack_require__(32), | |
toInteger = __webpack_require__(38), | |
toLength = __webpack_require__(37), | |
$native = [].lastIndexOf, | |
NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; | |
$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(169)($native)), 'Array', { | |
// 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) | |
lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */) { | |
// convert -0 to +0 | |
if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; | |
var O = toIObject(this), | |
length = toLength(O.length), | |
index = length - 1; | |
if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); | |
if (index < 0) index = length + index; | |
for (; index >= 0; index--) { | |
if (index in O) if (O[index] === searchElement) return index || 0; | |
}return -1; | |
} | |
}); | |
/***/ }, | |
/* 185 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) | |
var $export = __webpack_require__(8); | |
$export($export.P, 'Array', { copyWithin: __webpack_require__(186) }); | |
__webpack_require__(187)('copyWithin'); | |
/***/ }, | |
/* 186 */ | |
/***/ function(module, exports, __webpack_require__) { | |
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) | |
'use strict'; | |
var toObject = __webpack_require__(58), | |
toIndex = __webpack_require__(39), | |
toLength = __webpack_require__(37); | |
module.exports = [].copyWithin || function copyWithin(target /*= 0*/, start /*= 0, end = @length*/) { | |
var O = toObject(this), | |
len = toLength(O.length), | |
to = toIndex(target, len), | |
from = toIndex(start, len), | |
end = arguments.length > 2 ? arguments[2] : undefined, | |
count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to), | |
inc = 1; | |
if (from < to && to < from + count) { | |
inc = -1; | |
from += count - 1; | |
to += count - 1; | |
} | |
while (count-- > 0) { | |
if (from in O) O[to] = O[from];else delete O[to]; | |
to += inc; | |
from += inc; | |
}return O; | |
}; | |
/***/ }, | |
/* 187 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 22.1.3.31 Array.prototype[@@unscopables] | |
var UNSCOPABLES = __webpack_require__(25)('unscopables'), | |
ArrayProto = Array.prototype; | |
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(10)(ArrayProto, UNSCOPABLES, {}); | |
module.exports = function (key) { | |
ArrayProto[UNSCOPABLES][key] = true; | |
}; | |
/***/ }, | |
/* 188 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) | |
var $export = __webpack_require__(8); | |
$export($export.P, 'Array', { fill: __webpack_require__(189) }); | |
__webpack_require__(187)('fill'); | |
/***/ }, | |
/* 189 */ | |
/***/ function(module, exports, __webpack_require__) { | |
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) | |
'use strict'; | |
var toObject = __webpack_require__(58), | |
toIndex = __webpack_require__(39), | |
toLength = __webpack_require__(37); | |
module.exports = function fill(value /*, start = 0, end = @length */) { | |
var O = toObject(this), | |
length = toLength(O.length), | |
aLen = arguments.length, | |
index = toIndex(aLen > 1 ? arguments[1] : undefined, length), | |
end = aLen > 2 ? arguments[2] : undefined, | |
endPos = end === undefined ? length : toIndex(end, length); | |
while (endPos > index) { | |
O[index++] = value; | |
}return O; | |
}; | |
/***/ }, | |
/* 190 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) | |
var $export = __webpack_require__(8), | |
$find = __webpack_require__(173)(5), | |
KEY = 'find', | |
forced = true; | |
// Shouldn't skip holes | |
if (KEY in []) Array(1)[KEY](function () { | |
forced = false; | |
}); | |
$export($export.P + $export.F * forced, 'Array', { | |
find: function find(callbackfn /*, that = undefined */) { | |
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); | |
} | |
}); | |
__webpack_require__(187)(KEY); | |
/***/ }, | |
/* 191 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) | |
var $export = __webpack_require__(8), | |
$find = __webpack_require__(173)(6), | |
KEY = 'findIndex', | |
forced = true; | |
// Shouldn't skip holes | |
if (KEY in []) Array(1)[KEY](function () { | |
forced = false; | |
}); | |
$export($export.P + $export.F * forced, 'Array', { | |
findIndex: function findIndex(callbackfn /*, that = undefined */) { | |
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); | |
} | |
}); | |
__webpack_require__(187)(KEY); | |
/***/ }, | |
/* 192 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(193)('Array'); | |
/***/ }, | |
/* 193 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var global = __webpack_require__(4), | |
dP = __webpack_require__(11), | |
DESCRIPTORS = __webpack_require__(6), | |
SPECIES = __webpack_require__(25)('species'); | |
module.exports = function (KEY) { | |
var C = global[KEY]; | |
if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { | |
configurable: true, | |
get: function get() { | |
return this; | |
} | |
}); | |
}; | |
/***/ }, | |
/* 194 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var addToUnscopables = __webpack_require__(187), | |
step = __webpack_require__(195), | |
Iterators = __webpack_require__(130), | |
toIObject = __webpack_require__(32); | |
// 22.1.3.4 Array.prototype.entries() | |
// 22.1.3.13 Array.prototype.keys() | |
// 22.1.3.29 Array.prototype.values() | |
// 22.1.3.30 Array.prototype[@@iterator]() | |
module.exports = __webpack_require__(129)(Array, 'Array', function (iterated, kind) { | |
this._t = toIObject(iterated); // target | |
this._i = 0; // next index | |
this._k = kind; // kind | |
// 22.1.5.2.1 %ArrayIteratorPrototype%.next() | |
}, function () { | |
var O = this._t, | |
kind = this._k, | |
index = this._i++; | |
if (!O || index >= O.length) { | |
this._t = undefined; | |
return step(1); | |
} | |
if (kind == 'keys') return step(0, index); | |
if (kind == 'values') return step(0, O[index]); | |
return step(0, [index, O[index]]); | |
}, 'values'); | |
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) | |
Iterators.Arguments = Iterators.Array; | |
addToUnscopables('keys'); | |
addToUnscopables('values'); | |
addToUnscopables('entries'); | |
/***/ }, | |
/* 195 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = function (done, value) { | |
return { value: value, done: !!done }; | |
}; | |
/***/ }, | |
/* 196 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var global = __webpack_require__(4), | |
inheritIfRequired = __webpack_require__(88), | |
dP = __webpack_require__(11).f, | |
gOPN = __webpack_require__(50).f, | |
isRegExp = __webpack_require__(135), | |
$flags = __webpack_require__(197), | |
$RegExp = global.RegExp, | |
Base = $RegExp, | |
proto = $RegExp.prototype, | |
re1 = /a/g, | |
re2 = /a/g | |
// "new" creates a new object, old webkit buggy here | |
, | |
CORRECT_NEW = new $RegExp(re1) !== re1; | |
if (__webpack_require__(6) && (!CORRECT_NEW || __webpack_require__(7)(function () { | |
re2[__webpack_require__(25)('match')] = false; | |
// RegExp constructor can alter flags and IsRegExp works correct with @@match | |
return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; | |
}))) { | |
$RegExp = function RegExp(p, f) { | |
var tiRE = this instanceof $RegExp, | |
piRE = isRegExp(p), | |
fiU = f === undefined; | |
return !tiRE && piRE && p.constructor === $RegExp && fiU ? p : inheritIfRequired(CORRECT_NEW ? new Base(piRE && !fiU ? p.source : p, f) : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f), tiRE ? this : proto, $RegExp); | |
}; | |
var proxy = function proxy(key) { | |
key in $RegExp || dP($RegExp, key, { | |
configurable: true, | |
get: function get() { | |
return Base[key]; | |
}, | |
set: function set(it) { | |
Base[key] = it; | |
} | |
}); | |
}; | |
for (var keys = gOPN(Base), i = 0; keys.length > i;) { | |
proxy(keys[i++]); | |
}proto.constructor = $RegExp; | |
$RegExp.prototype = proto; | |
__webpack_require__(18)(global, 'RegExp', $RegExp); | |
} | |
__webpack_require__(193)('RegExp'); | |
/***/ }, | |
/* 197 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 21.2.5.3 get RegExp.prototype.flags | |
var anObject = __webpack_require__(12); | |
module.exports = function () { | |
var that = anObject(this), | |
result = ''; | |
if (that.global) result += 'g'; | |
if (that.ignoreCase) result += 'i'; | |
if (that.multiline) result += 'm'; | |
if (that.unicode) result += 'u'; | |
if (that.sticky) result += 'y'; | |
return result; | |
}; | |
/***/ }, | |
/* 198 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(199); | |
var anObject = __webpack_require__(12), | |
$flags = __webpack_require__(197), | |
DESCRIPTORS = __webpack_require__(6), | |
TO_STRING = 'toString', | |
$toString = /./[TO_STRING]; | |
var define = function define(fn) { | |
__webpack_require__(18)(RegExp.prototype, TO_STRING, fn, true); | |
}; | |
// 21.2.5.14 RegExp.prototype.toString() | |
if (__webpack_require__(7)(function () { | |
return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; | |
})) { | |
define(function toString() { | |
var R = anObject(this); | |
return '/'.concat(R.source, '/', 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); | |
}); | |
// FF44- RegExp#toString has a wrong name | |
} else if ($toString.name != TO_STRING) { | |
define(function toString() { | |
return $toString.call(this); | |
}); | |
} | |
/***/ }, | |
/* 199 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 21.2.5.3 get RegExp.prototype.flags() | |
if (__webpack_require__(6) && /./g.flags != 'g') __webpack_require__(11).f(RegExp.prototype, 'flags', { | |
configurable: true, | |
get: __webpack_require__(197) | |
}); | |
/***/ }, | |
/* 200 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// @@match logic | |
__webpack_require__(201)('match', 1, function (defined, MATCH, $match) { | |
// 21.1.3.11 String.prototype.match(regexp) | |
return [function match(regexp) { | |
'use strict'; | |
var O = defined(this), | |
fn = regexp == undefined ? undefined : regexp[MATCH]; | |
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); | |
}, $match]; | |
}); | |
/***/ }, | |
/* 201 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var hide = __webpack_require__(10), | |
redefine = __webpack_require__(18), | |
fails = __webpack_require__(7), | |
defined = __webpack_require__(35), | |
wks = __webpack_require__(25); | |
module.exports = function (KEY, length, exec) { | |
var SYMBOL = wks(KEY), | |
fns = exec(defined, SYMBOL, ''[KEY]), | |
strfn = fns[0], | |
rxfn = fns[1]; | |
if (fails(function () { | |
var O = {}; | |
O[SYMBOL] = function () { | |
return 7; | |
}; | |
return ''[KEY](O) != 7; | |
})) { | |
redefine(String.prototype, KEY, strfn); | |
hide(RegExp.prototype, SYMBOL, length == 2 | |
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) | |
// 21.2.5.11 RegExp.prototype[@@split](string, limit) | |
? function (string, arg) { | |
return rxfn.call(string, this, arg); | |
} | |
// 21.2.5.6 RegExp.prototype[@@match](string) | |
// 21.2.5.9 RegExp.prototype[@@search](string) | |
: function (string) { | |
return rxfn.call(string, this); | |
}); | |
} | |
}; | |
/***/ }, | |
/* 202 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// @@replace logic | |
__webpack_require__(201)('replace', 2, function (defined, REPLACE, $replace) { | |
// 21.1.3.14 String.prototype.replace(searchValue, replaceValue) | |
return [function replace(searchValue, replaceValue) { | |
'use strict'; | |
var O = defined(this), | |
fn = searchValue == undefined ? undefined : searchValue[REPLACE]; | |
return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue); | |
}, $replace]; | |
}); | |
/***/ }, | |
/* 203 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// @@search logic | |
__webpack_require__(201)('search', 1, function (defined, SEARCH, $search) { | |
// 21.1.3.15 String.prototype.search(regexp) | |
return [function search(regexp) { | |
'use strict'; | |
var O = defined(this), | |
fn = regexp == undefined ? undefined : regexp[SEARCH]; | |
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); | |
}, $search]; | |
}); | |
/***/ }, | |
/* 204 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// @@split logic | |
__webpack_require__(201)('split', 2, function (defined, SPLIT, $split) { | |
'use strict'; | |
var isRegExp = __webpack_require__(135), | |
_split = $split, | |
$push = [].push, | |
$SPLIT = 'split', | |
LENGTH = 'length', | |
LAST_INDEX = 'lastIndex'; | |
if ('abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH]) { | |
var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group | |
// based on es5-shim implementation, need to rework it | |
$split = function $split(separator, limit) { | |
var string = String(this); | |
if (separator === undefined && limit === 0) return []; | |
// If `separator` is not a regex, use native split | |
if (!isRegExp(separator)) return _split.call(string, separator, limit); | |
var output = []; | |
var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); | |
var lastLastIndex = 0; | |
var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; | |
// Make `global` and avoid `lastIndex` issues by working with a copy | |
var separatorCopy = new RegExp(separator.source, flags + 'g'); | |
var separator2, match, lastIndex, lastLength, i; | |
// Doesn't need flags gy, but they don't hurt | |
if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); | |
while (match = separatorCopy.exec(string)) { | |
// `separatorCopy.lastIndex` is not reliable cross-browser | |
lastIndex = match.index + match[0][LENGTH]; | |
if (lastIndex > lastLastIndex) { | |
output.push(string.slice(lastLastIndex, match.index)); | |
// Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG | |
if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () { | |
for (i = 1; i < arguments[LENGTH] - 2; i++) { | |
if (arguments[i] === undefined) match[i] = undefined; | |
} | |
}); | |
if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); | |
lastLength = match[0][LENGTH]; | |
lastLastIndex = lastIndex; | |
if (output[LENGTH] >= splitLimit) break; | |
} | |
if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop | |
} | |
if (lastLastIndex === string[LENGTH]) { | |
if (lastLength || !separatorCopy.test('')) output.push(''); | |
} else output.push(string.slice(lastLastIndex)); | |
return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; | |
}; | |
// Chakra, V8 | |
} else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { | |
$split = function $split(separator, limit) { | |
return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); | |
}; | |
} | |
// 21.1.3.17 String.prototype.split(separator, limit) | |
return [function split(separator, limit) { | |
var O = defined(this), | |
fn = separator == undefined ? undefined : separator[SPLIT]; | |
return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); | |
}, $split]; | |
}); | |
/***/ }, | |
/* 205 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var LIBRARY = __webpack_require__(28), | |
global = __webpack_require__(4), | |
ctx = __webpack_require__(20), | |
classof = __webpack_require__(75), | |
$export = __webpack_require__(8), | |
isObject = __webpack_require__(13), | |
anObject = __webpack_require__(12), | |
aFunction = __webpack_require__(21), | |
anInstance = __webpack_require__(90), | |
forOf = __webpack_require__(206), | |
setProto = __webpack_require__(73).set, | |
speciesConstructor = __webpack_require__(207), | |
task = __webpack_require__(208).set, | |
microtask = __webpack_require__(209)(), | |
PROMISE = 'Promise', | |
TypeError = global.TypeError, | |
process = global.process, | |
$Promise = global[PROMISE], | |
process = global.process, | |
isNode = classof(process) == 'process', | |
empty = function empty() {/* empty */}, | |
Internal, | |
GenericPromiseCapability, | |
Wrapper; | |
var USE_NATIVE = !!function () { | |
try { | |
// correct subclassing with @@species support | |
var promise = $Promise.resolve(1), | |
FakePromise = (promise.constructor = {})[__webpack_require__(25)('species')] = function (exec) { | |
exec(empty, empty); | |
}; | |
// unhandled rejections tracking support, NodeJS Promise without it fails @@species test | |
return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; | |
} catch (e) {/* empty */} | |
}(); | |
// helpers | |
var sameConstructor = function sameConstructor(a, b) { | |
// with library wrapper special case | |
return a === b || a === $Promise && b === Wrapper; | |
}; | |
var isThenable = function isThenable(it) { | |
var then; | |
return isObject(it) && typeof (then = it.then) == 'function' ? then : false; | |
}; | |
var newPromiseCapability = function newPromiseCapability(C) { | |
return sameConstructor($Promise, C) ? new PromiseCapability(C) : new GenericPromiseCapability(C); | |
}; | |
var PromiseCapability = GenericPromiseCapability = function GenericPromiseCapability(C) { | |
var resolve, reject; | |
this.promise = new C(function ($$resolve, $$reject) { | |
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); | |
resolve = $$resolve; | |
reject = $$reject; | |
}); | |
this.resolve = aFunction(resolve); | |
this.reject = aFunction(reject); | |
}; | |
var perform = function perform(exec) { | |
try { | |
exec(); | |
} catch (e) { | |
return { error: e }; | |
} | |
}; | |
var notify = function notify(promise, isReject) { | |
if (promise._n) return; | |
promise._n = true; | |
var chain = promise._c; | |
microtask(function () { | |
var value = promise._v, | |
ok = promise._s == 1, | |
i = 0; | |
var run = function run(reaction) { | |
var handler = ok ? reaction.ok : reaction.fail, | |
resolve = reaction.resolve, | |
reject = reaction.reject, | |
domain = reaction.domain, | |
result, | |
then; | |
try { | |
if (handler) { | |
if (!ok) { | |
if (promise._h == 2) onHandleUnhandled(promise); | |
promise._h = 1; | |
} | |
if (handler === true) result = value;else { | |
if (domain) domain.enter(); | |
result = handler(value); | |
if (domain) domain.exit(); | |
} | |
if (result === reaction.promise) { | |
reject(TypeError('Promise-chain cycle')); | |
} else if (then = isThenable(result)) { | |
then.call(result, resolve, reject); | |
} else resolve(result); | |
} else reject(value); | |
} catch (e) { | |
reject(e); | |
} | |
}; | |
while (chain.length > i) { | |
run(chain[i++]); | |
} // variable length - can't use forEach | |
promise._c = []; | |
promise._n = false; | |
if (isReject && !promise._h) onUnhandled(promise); | |
}); | |
}; | |
var onUnhandled = function onUnhandled(promise) { | |
task.call(global, function () { | |
var value = promise._v, | |
abrupt, | |
handler, | |
console; | |
if (isUnhandled(promise)) { | |
abrupt = perform(function () { | |
if (isNode) { | |
process.emit('unhandledRejection', value, promise); | |
} else if (handler = global.onunhandledrejection) { | |
handler({ promise: promise, reason: value }); | |
} else if ((console = global.console) && console.error) { | |
console.error('Unhandled promise rejection', value); | |
} | |
}); | |
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should | |
promise._h = isNode || isUnhandled(promise) ? 2 : 1; | |
}promise._a = undefined; | |
if (abrupt) throw abrupt.error; | |
}); | |
}; | |
var isUnhandled = function isUnhandled(promise) { | |
if (promise._h == 1) return false; | |
var chain = promise._a || promise._c, | |
i = 0, | |
reaction; | |
while (chain.length > i) { | |
reaction = chain[i++]; | |
if (reaction.fail || !isUnhandled(reaction.promise)) return false; | |
}return true; | |
}; | |
var onHandleUnhandled = function onHandleUnhandled(promise) { | |
task.call(global, function () { | |
var handler; | |
if (isNode) { | |
process.emit('rejectionHandled', promise); | |
} else if (handler = global.onrejectionhandled) { | |
handler({ promise: promise, reason: promise._v }); | |
} | |
}); | |
}; | |
var $reject = function $reject(value) { | |
var promise = this; | |
if (promise._d) return; | |
promise._d = true; | |
promise = promise._w || promise; // unwrap | |
promise._v = value; | |
promise._s = 2; | |
if (!promise._a) promise._a = promise._c.slice(); | |
notify(promise, true); | |
}; | |
var $resolve = function $resolve(value) { | |
var promise = this, | |
then; | |
if (promise._d) return; | |
promise._d = true; | |
promise = promise._w || promise; // unwrap | |
try { | |
if (promise === value) throw TypeError("Promise can't be resolved itself"); | |
if (then = isThenable(value)) { | |
microtask(function () { | |
var wrapper = { _w: promise, _d: false }; // wrap | |
try { | |
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); | |
} catch (e) { | |
$reject.call(wrapper, e); | |
} | |
}); | |
} else { | |
promise._v = value; | |
promise._s = 1; | |
notify(promise, false); | |
} | |
} catch (e) { | |
$reject.call({ _w: promise, _d: false }, e); // wrap | |
} | |
}; | |
// constructor polyfill | |
if (!USE_NATIVE) { | |
// 25.4.3.1 Promise(executor) | |
$Promise = function Promise(executor) { | |
anInstance(this, $Promise, PROMISE, '_h'); | |
aFunction(executor); | |
Internal.call(this); | |
try { | |
executor(ctx($resolve, this, 1), ctx($reject, this, 1)); | |
} catch (err) { | |
$reject.call(this, err); | |
} | |
}; | |
Internal = function Promise(executor) { | |
this._c = []; // <- awaiting reactions | |
this._a = undefined; // <- checked in isUnhandled reactions | |
this._s = 0; // <- state | |
this._d = false; // <- done | |
this._v = undefined; // <- value | |
this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled | |
this._n = false; // <- notify | |
}; | |
Internal.prototype = __webpack_require__(210)($Promise.prototype, { | |
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) | |
then: function then(onFulfilled, onRejected) { | |
var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); | |
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; | |
reaction.fail = typeof onRejected == 'function' && onRejected; | |
reaction.domain = isNode ? process.domain : undefined; | |
this._c.push(reaction); | |
if (this._a) this._a.push(reaction); | |
if (this._s) notify(this, false); | |
return reaction.promise; | |
}, | |
// 25.4.5.1 Promise.prototype.catch(onRejected) | |
'catch': function _catch(onRejected) { | |
return this.then(undefined, onRejected); | |
} | |
}); | |
PromiseCapability = function PromiseCapability() { | |
var promise = new Internal(); | |
this.promise = promise; | |
this.resolve = ctx($resolve, promise, 1); | |
this.reject = ctx($reject, promise, 1); | |
}; | |
} | |
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); | |
__webpack_require__(24)($Promise, PROMISE); | |
__webpack_require__(193)(PROMISE); | |
Wrapper = __webpack_require__(9)[PROMISE]; | |
// statics | |
$export($export.S + $export.F * !USE_NATIVE, PROMISE, { | |
// 25.4.4.5 Promise.reject(r) | |
reject: function reject(r) { | |
var capability = newPromiseCapability(this), | |
$$reject = capability.reject; | |
$$reject(r); | |
return capability.promise; | |
} | |
}); | |
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { | |
// 25.4.4.6 Promise.resolve(x) | |
resolve: function resolve(x) { | |
// instanceof instead of internal slot check because we should fix it without replacement native Promise core | |
if (x instanceof $Promise && sameConstructor(x.constructor, this)) return x; | |
var capability = newPromiseCapability(this), | |
$$resolve = capability.resolve; | |
$$resolve(x); | |
return capability.promise; | |
} | |
}); | |
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(166)(function (iter) { | |
$Promise.all(iter)['catch'](empty); | |
})), PROMISE, { | |
// 25.4.4.1 Promise.all(iterable) | |
all: function all(iterable) { | |
var C = this, | |
capability = newPromiseCapability(C), | |
resolve = capability.resolve, | |
reject = capability.reject; | |
var abrupt = perform(function () { | |
var values = [], | |
index = 0, | |
remaining = 1; | |
forOf(iterable, false, function (promise) { | |
var $index = index++, | |
alreadyCalled = false; | |
values.push(undefined); | |
remaining++; | |
C.resolve(promise).then(function (value) { | |
if (alreadyCalled) return; | |
alreadyCalled = true; | |
values[$index] = value; | |
--remaining || resolve(values); | |
}, reject); | |
}); | |
--remaining || resolve(values); | |
}); | |
if (abrupt) reject(abrupt.error); | |
return capability.promise; | |
}, | |
// 25.4.4.4 Promise.race(iterable) | |
race: function race(iterable) { | |
var C = this, | |
capability = newPromiseCapability(C), | |
reject = capability.reject; | |
var abrupt = perform(function () { | |
forOf(iterable, false, function (promise) { | |
C.resolve(promise).then(capability.resolve, reject); | |
}); | |
}); | |
if (abrupt) reject(abrupt.error); | |
return capability.promise; | |
} | |
}); | |
/***/ }, | |
/* 206 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var ctx = __webpack_require__(20), | |
call = __webpack_require__(162), | |
isArrayIter = __webpack_require__(163), | |
anObject = __webpack_require__(12), | |
toLength = __webpack_require__(37), | |
getIterFn = __webpack_require__(165), | |
BREAK = {}, | |
RETURN = {}; | |
var _exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { | |
var iterFn = ITERATOR ? function () { | |
return iterable; | |
} : getIterFn(iterable), | |
f = ctx(fn, that, entries ? 2 : 1), | |
index = 0, | |
length, | |
step, | |
iterator, | |
result; | |
if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); | |
// fast case for arrays with default iterator | |
if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { | |
result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); | |
if (result === BREAK || result === RETURN) return result; | |
} else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { | |
result = call(iterator, f, step.value, entries); | |
if (result === BREAK || result === RETURN) return result; | |
} | |
}; | |
_exports.BREAK = BREAK; | |
_exports.RETURN = RETURN; | |
/***/ }, | |
/* 207 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 7.3.20 SpeciesConstructor(O, defaultConstructor) | |
var anObject = __webpack_require__(12), | |
aFunction = __webpack_require__(21), | |
SPECIES = __webpack_require__(25)('species'); | |
module.exports = function (O, D) { | |
var C = anObject(O).constructor, | |
S; | |
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); | |
}; | |
/***/ }, | |
/* 208 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var ctx = __webpack_require__(20), | |
invoke = __webpack_require__(78), | |
html = __webpack_require__(48), | |
cel = __webpack_require__(15), | |
global = __webpack_require__(4), | |
process = global.process, | |
setTask = global.setImmediate, | |
clearTask = global.clearImmediate, | |
MessageChannel = global.MessageChannel, | |
counter = 0, | |
queue = {}, | |
ONREADYSTATECHANGE = 'onreadystatechange', | |
defer, | |
channel, | |
port; | |
var run = function run() { | |
var id = +this; | |
if (queue.hasOwnProperty(id)) { | |
var fn = queue[id]; | |
delete queue[id]; | |
fn(); | |
} | |
}; | |
var listener = function listener(event) { | |
run.call(event.data); | |
}; | |
// Node.js 0.9+ & IE10+ has setImmediate, otherwise: | |
if (!setTask || !clearTask) { | |
setTask = function setImmediate(fn) { | |
var args = [], | |
i = 1; | |
while (arguments.length > i) { | |
args.push(arguments[i++]); | |
}queue[++counter] = function () { | |
invoke(typeof fn == 'function' ? fn : Function(fn), args); | |
}; | |
defer(counter); | |
return counter; | |
}; | |
clearTask = function clearImmediate(id) { | |
delete queue[id]; | |
}; | |
// Node.js 0.8- | |
if (__webpack_require__(34)(process) == 'process') { | |
defer = function defer(id) { | |
process.nextTick(ctx(run, id, 1)); | |
}; | |
// Browsers with MessageChannel, includes WebWorkers | |
} else if (MessageChannel) { | |
channel = new MessageChannel(); | |
port = channel.port2; | |
channel.port1.onmessage = listener; | |
defer = ctx(port.postMessage, port, 1); | |
// Browsers with postMessage, skip WebWorkers | |
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object' | |
} else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { | |
defer = function defer(id) { | |
global.postMessage(id + '', '*'); | |
}; | |
global.addEventListener('message', listener, false); | |
// IE8- | |
} else if (ONREADYSTATECHANGE in cel('script')) { | |
defer = function defer(id) { | |
html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { | |
html.removeChild(this); | |
run.call(id); | |
}; | |
}; | |
// Rest old browsers | |
} else { | |
defer = function defer(id) { | |
setTimeout(ctx(run, id, 1), 0); | |
}; | |
} | |
} | |
module.exports = { | |
set: setTask, | |
clear: clearTask | |
}; | |
/***/ }, | |
/* 209 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var global = __webpack_require__(4), | |
macrotask = __webpack_require__(208).set, | |
Observer = global.MutationObserver || global.WebKitMutationObserver, | |
process = global.process, | |
Promise = global.Promise, | |
isNode = __webpack_require__(34)(process) == 'process'; | |
module.exports = function () { | |
var head, last, notify; | |
var flush = function flush() { | |
var parent, fn; | |
if (isNode && (parent = process.domain)) parent.exit(); | |
while (head) { | |
fn = head.fn; | |
head = head.next; | |
try { | |
fn(); | |
} catch (e) { | |
if (head) notify();else last = undefined; | |
throw e; | |
} | |
}last = undefined; | |
if (parent) parent.enter(); | |
}; | |
// Node.js | |
if (isNode) { | |
notify = function notify() { | |
process.nextTick(flush); | |
}; | |
// browsers with MutationObserver | |
} else if (Observer) { | |
var toggle = true, | |
node = document.createTextNode(''); | |
new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new | |
notify = function notify() { | |
node.data = toggle = !toggle; | |
}; | |
// environments with maybe non-completely correct, but existent Promise | |
} else if (Promise && Promise.resolve) { | |
var promise = Promise.resolve(); | |
notify = function notify() { | |
promise.then(flush); | |
}; | |
// for other environments - macrotask based on: | |
// - setImmediate | |
// - MessageChannel | |
// - window.postMessag | |
// - onreadystatechange | |
// - setTimeout | |
} else { | |
notify = function notify() { | |
// strange IE + webpack dev server bug - use .call(global) | |
macrotask.call(global, flush); | |
}; | |
} | |
return function (fn) { | |
var task = { fn: fn, next: undefined }; | |
if (last) last.next = task; | |
if (!head) { | |
head = task; | |
notify(); | |
}last = task; | |
}; | |
}; | |
/***/ }, | |
/* 210 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var redefine = __webpack_require__(18); | |
module.exports = function (target, src, safe) { | |
for (var key in src) { | |
redefine(target, key, src[key], safe); | |
}return target; | |
}; | |
/***/ }, | |
/* 211 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var strong = __webpack_require__(212); | |
// 23.1 Map Objects | |
module.exports = __webpack_require__(213)('Map', function (get) { | |
return function Map() { | |
return get(this, arguments.length > 0 ? arguments[0] : undefined); | |
}; | |
}, { | |
// 23.1.3.6 Map.prototype.get(key) | |
get: function get(key) { | |
var entry = strong.getEntry(this, key); | |
return entry && entry.v; | |
}, | |
// 23.1.3.9 Map.prototype.set(key, value) | |
set: function set(key, value) { | |
return strong.def(this, key === 0 ? 0 : key, value); | |
} | |
}, strong, true); | |
/***/ }, | |
/* 212 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var dP = __webpack_require__(11).f, | |
create = __webpack_require__(46), | |
hide = __webpack_require__(10), | |
redefineAll = __webpack_require__(210), | |
ctx = __webpack_require__(20), | |
anInstance = __webpack_require__(90), | |
defined = __webpack_require__(35), | |
forOf = __webpack_require__(206), | |
$iterDefine = __webpack_require__(129), | |
step = __webpack_require__(195), | |
setSpecies = __webpack_require__(193), | |
DESCRIPTORS = __webpack_require__(6), | |
fastKey = __webpack_require__(22).fastKey, | |
SIZE = DESCRIPTORS ? '_s' : 'size'; | |
var getEntry = function getEntry(that, key) { | |
// fast case | |
var index = fastKey(key), | |
entry; | |
if (index !== 'F') return that._i[index]; | |
// frozen object case | |
for (entry = that._f; entry; entry = entry.n) { | |
if (entry.k == key) return entry; | |
} | |
}; | |
module.exports = { | |
getConstructor: function getConstructor(wrapper, NAME, IS_MAP, ADDER) { | |
var C = wrapper(function (that, iterable) { | |
anInstance(that, C, NAME, '_i'); | |
that._i = create(null); // index | |
that._f = undefined; // first entry | |
that._l = undefined; // last entry | |
that[SIZE] = 0; // size | |
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); | |
}); | |
redefineAll(C.prototype, { | |
// 23.1.3.1 Map.prototype.clear() | |
// 23.2.3.2 Set.prototype.clear() | |
clear: function clear() { | |
for (var that = this, data = that._i, entry = that._f; entry; entry = entry.n) { | |
entry.r = true; | |
if (entry.p) entry.p = entry.p.n = undefined; | |
delete data[entry.i]; | |
} | |
that._f = that._l = undefined; | |
that[SIZE] = 0; | |
}, | |
// 23.1.3.3 Map.prototype.delete(key) | |
// 23.2.3.4 Set.prototype.delete(value) | |
'delete': function _delete(key) { | |
var that = this, | |
entry = getEntry(that, key); | |
if (entry) { | |
var next = entry.n, | |
prev = entry.p; | |
delete that._i[entry.i]; | |
entry.r = true; | |
if (prev) prev.n = next; | |
if (next) next.p = prev; | |
if (that._f == entry) that._f = next; | |
if (that._l == entry) that._l = prev; | |
that[SIZE]--; | |
}return !!entry; | |
}, | |
// 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) | |
// 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) | |
forEach: function forEach(callbackfn /*, that = undefined */) { | |
anInstance(this, C, 'forEach'); | |
var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3), | |
entry; | |
while (entry = entry ? entry.n : this._f) { | |
f(entry.v, entry.k, this); | |
// revert to the last existing entry | |
while (entry && entry.r) { | |
entry = entry.p; | |
} | |
} | |
}, | |
// 23.1.3.7 Map.prototype.has(key) | |
// 23.2.3.7 Set.prototype.has(value) | |
has: function has(key) { | |
return !!getEntry(this, key); | |
} | |
}); | |
if (DESCRIPTORS) dP(C.prototype, 'size', { | |
get: function get() { | |
return defined(this[SIZE]); | |
} | |
}); | |
return C; | |
}, | |
def: function def(that, key, value) { | |
var entry = getEntry(that, key), | |
prev, | |
index; | |
// change existing entry | |
if (entry) { | |
entry.v = value; | |
// create new entry | |
} else { | |
that._l = entry = { | |
i: index = fastKey(key, true), // <- index | |
k: key, // <- key | |
v: value, // <- value | |
p: prev = that._l, // <- previous entry | |
n: undefined, // <- next entry | |
r: false // <- removed | |
}; | |
if (!that._f) that._f = entry; | |
if (prev) prev.n = entry; | |
that[SIZE]++; | |
// add to index | |
if (index !== 'F') that._i[index] = entry; | |
}return that; | |
}, | |
getEntry: getEntry, | |
setStrong: function setStrong(C, NAME, IS_MAP) { | |
// add .keys, .values, .entries, [@@iterator] | |
// 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 | |
$iterDefine(C, NAME, function (iterated, kind) { | |
this._t = iterated; // target | |
this._k = kind; // kind | |
this._l = undefined; // previous | |
}, function () { | |
var that = this, | |
kind = that._k, | |
entry = that._l; | |
// revert to the last existing entry | |
while (entry && entry.r) { | |
entry = entry.p; | |
} // get next entry | |
if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { | |
// or finish the iteration | |
that._t = undefined; | |
return step(1); | |
} | |
// return step by kind | |
if (kind == 'keys') return step(0, entry.k); | |
if (kind == 'values') return step(0, entry.v); | |
return step(0, [entry.k, entry.v]); | |
}, IS_MAP ? 'entries' : 'values', !IS_MAP, true); | |
// add [@@species], 23.1.2.2, 23.2.2.2 | |
setSpecies(NAME); | |
} | |
}; | |
/***/ }, | |
/* 213 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var global = __webpack_require__(4), | |
$export = __webpack_require__(8), | |
redefine = __webpack_require__(18), | |
redefineAll = __webpack_require__(210), | |
meta = __webpack_require__(22), | |
forOf = __webpack_require__(206), | |
anInstance = __webpack_require__(90), | |
isObject = __webpack_require__(13), | |
fails = __webpack_require__(7), | |
$iterDetect = __webpack_require__(166), | |
setToStringTag = __webpack_require__(24), | |
inheritIfRequired = __webpack_require__(88); | |
module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { | |
var Base = global[NAME], | |
C = Base, | |
ADDER = IS_MAP ? 'set' : 'add', | |
proto = C && C.prototype, | |
O = {}; | |
var fixMethod = function fixMethod(KEY) { | |
var fn = proto[KEY]; | |
redefine(proto, KEY, KEY == 'delete' ? function (a) { | |
return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); | |
} : KEY == 'has' ? function has(a) { | |
return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); | |
} : KEY == 'get' ? function get(a) { | |
return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); | |
} : KEY == 'add' ? function add(a) { | |
fn.call(this, a === 0 ? 0 : a);return this; | |
} : function set(a, b) { | |
fn.call(this, a === 0 ? 0 : a, b);return this; | |
}); | |
}; | |
if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { | |
new C().entries().next(); | |
}))) { | |
// create collection constructor | |
C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); | |
redefineAll(C.prototype, methods); | |
meta.NEED = true; | |
} else { | |
var instance = new C() | |
// early implementations not supports chaining | |
, | |
HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance | |
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false | |
, | |
THROWS_ON_PRIMITIVES = fails(function () { | |
instance.has(1); | |
}) | |
// most early implementations doesn't supports iterables, most modern - not close it correctly | |
, | |
ACCEPT_ITERABLES = $iterDetect(function (iter) { | |
new C(iter); | |
}) // eslint-disable-line no-new | |
// for early implementations -0 and +0 not the same | |
, | |
BUGGY_ZERO = !IS_WEAK && fails(function () { | |
// V8 ~ Chromium 42- fails only with 5+ elements | |
var $instance = new C(), | |
index = 5; | |
while (index--) { | |
$instance[ADDER](index, index); | |
}return !$instance.has(-0); | |
}); | |
if (!ACCEPT_ITERABLES) { | |
C = wrapper(function (target, iterable) { | |
anInstance(target, C, NAME); | |
var that = inheritIfRequired(new Base(), target, C); | |
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); | |
return that; | |
}); | |
C.prototype = proto; | |
proto.constructor = C; | |
} | |
if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { | |
fixMethod('delete'); | |
fixMethod('has'); | |
IS_MAP && fixMethod('get'); | |
} | |
if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); | |
// weak collections should not contains .clear method | |
if (IS_WEAK && proto.clear) delete proto.clear; | |
} | |
setToStringTag(C, NAME); | |
O[NAME] = C; | |
$export($export.G + $export.W + $export.F * (C != Base), O); | |
if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); | |
return C; | |
}; | |
/***/ }, | |
/* 214 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var strong = __webpack_require__(212); | |
// 23.2 Set Objects | |
module.exports = __webpack_require__(213)('Set', function (get) { | |
return function Set() { | |
return get(this, arguments.length > 0 ? arguments[0] : undefined); | |
}; | |
}, { | |
// 23.2.3.1 Set.prototype.add(value) | |
add: function add(value) { | |
return strong.def(this, value = value === 0 ? 0 : value, value); | |
} | |
}, strong); | |
/***/ }, | |
/* 215 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var each = __webpack_require__(173)(0), | |
redefine = __webpack_require__(18), | |
meta = __webpack_require__(22), | |
assign = __webpack_require__(69), | |
weak = __webpack_require__(216), | |
isObject = __webpack_require__(13), | |
has = __webpack_require__(5), | |
getWeak = meta.getWeak, | |
isExtensible = Object.isExtensible, | |
uncaughtFrozenStore = weak.ufstore, | |
tmp = {}, | |
InternalMap; | |
var wrapper = function wrapper(get) { | |
return function WeakMap() { | |
return get(this, arguments.length > 0 ? arguments[0] : undefined); | |
}; | |
}; | |
var methods = { | |
// 23.3.3.3 WeakMap.prototype.get(key) | |
get: function get(key) { | |
if (isObject(key)) { | |
var data = getWeak(key); | |
if (data === true) return uncaughtFrozenStore(this).get(key); | |
return data ? data[this._i] : undefined; | |
} | |
}, | |
// 23.3.3.5 WeakMap.prototype.set(key, value) | |
set: function set(key, value) { | |
return weak.def(this, key, value); | |
} | |
}; | |
// 23.3 WeakMap Objects | |
var $WeakMap = module.exports = __webpack_require__(213)('WeakMap', wrapper, methods, weak, true, true); | |
// IE11 WeakMap frozen keys fix | |
if (new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7) { | |
InternalMap = weak.getConstructor(wrapper); | |
assign(InternalMap.prototype, methods); | |
meta.NEED = true; | |
each(['delete', 'has', 'get', 'set'], function (key) { | |
var proto = $WeakMap.prototype, | |
method = proto[key]; | |
redefine(proto, key, function (a, b) { | |
// store frozen objects on internal weakmap shim | |
if (isObject(a) && !isExtensible(a)) { | |
if (!this._f) this._f = new InternalMap(); | |
var result = this._f[key](a, b); | |
return key == 'set' ? this : result; | |
// store all the rest on native weakmap | |
}return method.call(this, a, b); | |
}); | |
}); | |
} | |
/***/ }, | |
/* 216 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var redefineAll = __webpack_require__(210), | |
getWeak = __webpack_require__(22).getWeak, | |
anObject = __webpack_require__(12), | |
isObject = __webpack_require__(13), | |
anInstance = __webpack_require__(90), | |
forOf = __webpack_require__(206), | |
createArrayMethod = __webpack_require__(173), | |
$has = __webpack_require__(5), | |
arrayFind = createArrayMethod(5), | |
arrayFindIndex = createArrayMethod(6), | |
id = 0; | |
// fallback for uncaught frozen keys | |
var uncaughtFrozenStore = function uncaughtFrozenStore(that) { | |
return that._l || (that._l = new UncaughtFrozenStore()); | |
}; | |
var UncaughtFrozenStore = function UncaughtFrozenStore() { | |
this.a = []; | |
}; | |
var findUncaughtFrozen = function findUncaughtFrozen(store, key) { | |
return arrayFind(store.a, function (it) { | |
return it[0] === key; | |
}); | |
}; | |
UncaughtFrozenStore.prototype = { | |
get: function get(key) { | |
var entry = findUncaughtFrozen(this, key); | |
if (entry) return entry[1]; | |
}, | |
has: function has(key) { | |
return !!findUncaughtFrozen(this, key); | |
}, | |
set: function set(key, value) { | |
var entry = findUncaughtFrozen(this, key); | |
if (entry) entry[1] = value;else this.a.push([key, value]); | |
}, | |
'delete': function _delete(key) { | |
var index = arrayFindIndex(this.a, function (it) { | |
return it[0] === key; | |
}); | |
if (~index) this.a.splice(index, 1); | |
return !!~index; | |
} | |
}; | |
module.exports = { | |
getConstructor: function getConstructor(wrapper, NAME, IS_MAP, ADDER) { | |
var C = wrapper(function (that, iterable) { | |
anInstance(that, C, NAME, '_i'); | |
that._i = id++; // collection id | |
that._l = undefined; // leak store for uncaught frozen objects | |
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); | |
}); | |
redefineAll(C.prototype, { | |
// 23.3.3.2 WeakMap.prototype.delete(key) | |
// 23.4.3.3 WeakSet.prototype.delete(value) | |
'delete': function _delete(key) { | |
if (!isObject(key)) return false; | |
var data = getWeak(key); | |
if (data === true) return uncaughtFrozenStore(this)['delete'](key); | |
return data && $has(data, this._i) && delete data[this._i]; | |
}, | |
// 23.3.3.4 WeakMap.prototype.has(key) | |
// 23.4.3.4 WeakSet.prototype.has(value) | |
has: function has(key) { | |
if (!isObject(key)) return false; | |
var data = getWeak(key); | |
if (data === true) return uncaughtFrozenStore(this).has(key); | |
return data && $has(data, this._i); | |
} | |
}); | |
return C; | |
}, | |
def: function def(that, key, value) { | |
var data = getWeak(anObject(key), true); | |
if (data === true) uncaughtFrozenStore(that).set(key, value);else data[that._i] = value; | |
return that; | |
}, | |
ufstore: uncaughtFrozenStore | |
}; | |
/***/ }, | |
/* 217 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var weak = __webpack_require__(216); | |
// 23.4 WeakSet Objects | |
__webpack_require__(213)('WeakSet', function (get) { | |
return function WeakSet() { | |
return get(this, arguments.length > 0 ? arguments[0] : undefined); | |
}; | |
}, { | |
// 23.4.3.1 WeakSet.prototype.add(value) | |
add: function add(value) { | |
return weak.def(this, value, true); | |
} | |
}, weak, false, true); | |
/***/ }, | |
/* 218 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$typed = __webpack_require__(219), | |
buffer = __webpack_require__(220), | |
anObject = __webpack_require__(12), | |
toIndex = __webpack_require__(39), | |
toLength = __webpack_require__(37), | |
isObject = __webpack_require__(13), | |
TYPED_ARRAY = __webpack_require__(25)('typed_array'), | |
ArrayBuffer = __webpack_require__(4).ArrayBuffer, | |
speciesConstructor = __webpack_require__(207), | |
$ArrayBuffer = buffer.ArrayBuffer, | |
$DataView = buffer.DataView, | |
$isView = $typed.ABV && ArrayBuffer.isView, | |
$slice = $ArrayBuffer.prototype.slice, | |
VIEW = $typed.VIEW, | |
ARRAY_BUFFER = 'ArrayBuffer'; | |
$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); | |
$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { | |
// 24.1.3.1 ArrayBuffer.isView(arg) | |
isView: function isView(it) { | |
return $isView && $isView(it) || isObject(it) && VIEW in it; | |
} | |
}); | |
$export($export.P + $export.U + $export.F * __webpack_require__(7)(function () { | |
return !new $ArrayBuffer(2).slice(1, undefined).byteLength; | |
}), ARRAY_BUFFER, { | |
// 24.1.4.3 ArrayBuffer.prototype.slice(start, end) | |
slice: function slice(start, end) { | |
if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix | |
var len = anObject(this).byteLength, | |
first = toIndex(start, len), | |
final = toIndex(end === undefined ? len : end, len), | |
result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)), | |
viewS = new $DataView(this), | |
viewT = new $DataView(result), | |
index = 0; | |
while (first < final) { | |
viewT.setUint8(index++, viewS.getUint8(first++)); | |
}return result; | |
} | |
}); | |
__webpack_require__(193)(ARRAY_BUFFER); | |
/***/ }, | |
/* 219 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var global = __webpack_require__(4), | |
hide = __webpack_require__(10), | |
uid = __webpack_require__(19), | |
TYPED = uid('typed_array'), | |
VIEW = uid('view'), | |
ABV = !!(global.ArrayBuffer && global.DataView), | |
CONSTR = ABV, | |
i = 0, | |
l = 9, | |
Typed; | |
var TypedArrayConstructors = 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'.split(','); | |
while (i < l) { | |
if (Typed = global[TypedArrayConstructors[i++]]) { | |
hide(Typed.prototype, TYPED, true); | |
hide(Typed.prototype, VIEW, true); | |
} else CONSTR = false; | |
} | |
module.exports = { | |
ABV: ABV, | |
CONSTR: CONSTR, | |
TYPED: TYPED, | |
VIEW: VIEW | |
}; | |
/***/ }, | |
/* 220 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var global = __webpack_require__(4), | |
DESCRIPTORS = __webpack_require__(6), | |
LIBRARY = __webpack_require__(28), | |
$typed = __webpack_require__(219), | |
hide = __webpack_require__(10), | |
redefineAll = __webpack_require__(210), | |
fails = __webpack_require__(7), | |
anInstance = __webpack_require__(90), | |
toInteger = __webpack_require__(38), | |
toLength = __webpack_require__(37), | |
gOPN = __webpack_require__(50).f, | |
dP = __webpack_require__(11).f, | |
arrayFill = __webpack_require__(189), | |
setToStringTag = __webpack_require__(24), | |
ARRAY_BUFFER = 'ArrayBuffer', | |
DATA_VIEW = 'DataView', | |
PROTOTYPE = 'prototype', | |
WRONG_LENGTH = 'Wrong length!', | |
WRONG_INDEX = 'Wrong index!', | |
$ArrayBuffer = global[ARRAY_BUFFER], | |
$DataView = global[DATA_VIEW], | |
Math = global.Math, | |
parseInt = global.parseInt, | |
RangeError = global.RangeError, | |
Infinity = global.Infinity, | |
BaseBuffer = $ArrayBuffer, | |
abs = Math.abs, | |
pow = Math.pow, | |
min = Math.min, | |
floor = Math.floor, | |
log = Math.log, | |
LN2 = Math.LN2, | |
BUFFER = 'buffer', | |
BYTE_LENGTH = 'byteLength', | |
BYTE_OFFSET = 'byteOffset', | |
$BUFFER = DESCRIPTORS ? '_b' : BUFFER, | |
$LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH, | |
$OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; | |
// IEEE754 conversions based on https://github.com/feross/ieee754 | |
var packIEEE754 = function packIEEE754(value, mLen, nBytes) { | |
var buffer = Array(nBytes), | |
eLen = nBytes * 8 - mLen - 1, | |
eMax = (1 << eLen) - 1, | |
eBias = eMax >> 1, | |
rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0, | |
i = 0, | |
s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0, | |
e, | |
m, | |
c; | |
value = abs(value); | |
if (value != value || value === Infinity) { | |
m = value != value ? 1 : 0; | |
e = eMax; | |
} else { | |
e = floor(log(value) / LN2); | |
if (value * (c = pow(2, -e)) < 1) { | |
e--; | |
c *= 2; | |
} | |
if (e + eBias >= 1) { | |
value += rt / c; | |
} else { | |
value += rt * pow(2, 1 - eBias); | |
} | |
if (value * c >= 2) { | |
e++; | |
c /= 2; | |
} | |
if (e + eBias >= eMax) { | |
m = 0; | |
e = eMax; | |
} else if (e + eBias >= 1) { | |
m = (value * c - 1) * pow(2, mLen); | |
e = e + eBias; | |
} else { | |
m = value * pow(2, eBias - 1) * pow(2, mLen); | |
e = 0; | |
} | |
} | |
for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8) {} | |
e = e << mLen | m; | |
eLen += mLen; | |
for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8) {} | |
buffer[--i] |= s * 128; | |
return buffer; | |
}; | |
var unpackIEEE754 = function unpackIEEE754(buffer, mLen, nBytes) { | |
var eLen = nBytes * 8 - mLen - 1, | |
eMax = (1 << eLen) - 1, | |
eBias = eMax >> 1, | |
nBits = eLen - 7, | |
i = nBytes - 1, | |
s = buffer[i--], | |
e = s & 127, | |
m; | |
s >>= 7; | |
for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8) {} | |
m = e & (1 << -nBits) - 1; | |
e >>= -nBits; | |
nBits += mLen; | |
for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8) {} | |
if (e === 0) { | |
e = 1 - eBias; | |
} else if (e === eMax) { | |
return m ? NaN : s ? -Infinity : Infinity; | |
} else { | |
m = m + pow(2, mLen); | |
e = e - eBias; | |
}return (s ? -1 : 1) * m * pow(2, e - mLen); | |
}; | |
var unpackI32 = function unpackI32(bytes) { | |
return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; | |
}; | |
var packI8 = function packI8(it) { | |
return [it & 0xff]; | |
}; | |
var packI16 = function packI16(it) { | |
return [it & 0xff, it >> 8 & 0xff]; | |
}; | |
var packI32 = function packI32(it) { | |
return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; | |
}; | |
var packF64 = function packF64(it) { | |
return packIEEE754(it, 52, 8); | |
}; | |
var packF32 = function packF32(it) { | |
return packIEEE754(it, 23, 4); | |
}; | |
var addGetter = function addGetter(C, key, internal) { | |
dP(C[PROTOTYPE], key, { get: function get() { | |
return this[internal]; | |
} }); | |
}; | |
var get = function get(view, bytes, index, isLittleEndian) { | |
var numIndex = +index, | |
intIndex = toInteger(numIndex); | |
if (numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); | |
var store = view[$BUFFER]._b, | |
start = intIndex + view[$OFFSET], | |
pack = store.slice(start, start + bytes); | |
return isLittleEndian ? pack : pack.reverse(); | |
}; | |
var set = function set(view, bytes, index, conversion, value, isLittleEndian) { | |
var numIndex = +index, | |
intIndex = toInteger(numIndex); | |
if (numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); | |
var store = view[$BUFFER]._b, | |
start = intIndex + view[$OFFSET], | |
pack = conversion(+value); | |
for (var i = 0; i < bytes; i++) { | |
store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; | |
} | |
}; | |
var validateArrayBufferArguments = function validateArrayBufferArguments(that, length) { | |
anInstance(that, $ArrayBuffer, ARRAY_BUFFER); | |
var numberLength = +length, | |
byteLength = toLength(numberLength); | |
if (numberLength != byteLength) throw RangeError(WRONG_LENGTH); | |
return byteLength; | |
}; | |
if (!$typed.ABV) { | |
$ArrayBuffer = function ArrayBuffer(length) { | |
var byteLength = validateArrayBufferArguments(this, length); | |
this._b = arrayFill.call(Array(byteLength), 0); | |
this[$LENGTH] = byteLength; | |
}; | |
$DataView = function DataView(buffer, byteOffset, byteLength) { | |
anInstance(this, $DataView, DATA_VIEW); | |
anInstance(buffer, $ArrayBuffer, DATA_VIEW); | |
var bufferLength = buffer[$LENGTH], | |
offset = toInteger(byteOffset); | |
if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); | |
byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); | |
if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); | |
this[$BUFFER] = buffer; | |
this[$OFFSET] = offset; | |
this[$LENGTH] = byteLength; | |
}; | |
if (DESCRIPTORS) { | |
addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); | |
addGetter($DataView, BUFFER, '_b'); | |
addGetter($DataView, BYTE_LENGTH, '_l'); | |
addGetter($DataView, BYTE_OFFSET, '_o'); | |
} | |
redefineAll($DataView[PROTOTYPE], { | |
getInt8: function getInt8(byteOffset) { | |
return get(this, 1, byteOffset)[0] << 24 >> 24; | |
}, | |
getUint8: function getUint8(byteOffset) { | |
return get(this, 1, byteOffset)[0]; | |
}, | |
getInt16: function getInt16(byteOffset /*, littleEndian */) { | |
var bytes = get(this, 2, byteOffset, arguments[1]); | |
return (bytes[1] << 8 | bytes[0]) << 16 >> 16; | |
}, | |
getUint16: function getUint16(byteOffset /*, littleEndian */) { | |
var bytes = get(this, 2, byteOffset, arguments[1]); | |
return bytes[1] << 8 | bytes[0]; | |
}, | |
getInt32: function getInt32(byteOffset /*, littleEndian */) { | |
return unpackI32(get(this, 4, byteOffset, arguments[1])); | |
}, | |
getUint32: function getUint32(byteOffset /*, littleEndian */) { | |
return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; | |
}, | |
getFloat32: function getFloat32(byteOffset /*, littleEndian */) { | |
return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); | |
}, | |
getFloat64: function getFloat64(byteOffset /*, littleEndian */) { | |
return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); | |
}, | |
setInt8: function setInt8(byteOffset, value) { | |
set(this, 1, byteOffset, packI8, value); | |
}, | |
setUint8: function setUint8(byteOffset, value) { | |
set(this, 1, byteOffset, packI8, value); | |
}, | |
setInt16: function setInt16(byteOffset, value /*, littleEndian */) { | |
set(this, 2, byteOffset, packI16, value, arguments[2]); | |
}, | |
setUint16: function setUint16(byteOffset, value /*, littleEndian */) { | |
set(this, 2, byteOffset, packI16, value, arguments[2]); | |
}, | |
setInt32: function setInt32(byteOffset, value /*, littleEndian */) { | |
set(this, 4, byteOffset, packI32, value, arguments[2]); | |
}, | |
setUint32: function setUint32(byteOffset, value /*, littleEndian */) { | |
set(this, 4, byteOffset, packI32, value, arguments[2]); | |
}, | |
setFloat32: function setFloat32(byteOffset, value /*, littleEndian */) { | |
set(this, 4, byteOffset, packF32, value, arguments[2]); | |
}, | |
setFloat64: function setFloat64(byteOffset, value /*, littleEndian */) { | |
set(this, 8, byteOffset, packF64, value, arguments[2]); | |
} | |
}); | |
} else { | |
if (!fails(function () { | |
new $ArrayBuffer(); // eslint-disable-line no-new | |
}) || !fails(function () { | |
new $ArrayBuffer(.5); // eslint-disable-line no-new | |
})) { | |
$ArrayBuffer = function ArrayBuffer(length) { | |
return new BaseBuffer(validateArrayBufferArguments(this, length)); | |
}; | |
var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; | |
for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { | |
if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); | |
}; | |
if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; | |
} | |
// iOS Safari 7.x bug | |
var view = new $DataView(new $ArrayBuffer(2)), | |
$setInt8 = $DataView[PROTOTYPE].setInt8; | |
view.setInt8(0, 2147483648); | |
view.setInt8(1, 2147483649); | |
if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { | |
setInt8: function setInt8(byteOffset, value) { | |
$setInt8.call(this, byteOffset, value << 24 >> 24); | |
}, | |
setUint8: function setUint8(byteOffset, value) { | |
$setInt8.call(this, byteOffset, value << 24 >> 24); | |
} | |
}, true); | |
} | |
setToStringTag($ArrayBuffer, ARRAY_BUFFER); | |
setToStringTag($DataView, DATA_VIEW); | |
hide($DataView[PROTOTYPE], $typed.VIEW, true); | |
exports[ARRAY_BUFFER] = $ArrayBuffer; | |
exports[DATA_VIEW] = $DataView; | |
/***/ }, | |
/* 221 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8); | |
$export($export.G + $export.W + $export.F * !__webpack_require__(219).ABV, { | |
DataView: __webpack_require__(220).DataView | |
}); | |
/***/ }, | |
/* 222 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(223)('Int8', 1, function (init) { | |
return function Int8Array(data, byteOffset, length) { | |
return init(this, data, byteOffset, length); | |
}; | |
}); | |
/***/ }, | |
/* 223 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
if (__webpack_require__(6)) { | |
var LIBRARY = __webpack_require__(28), | |
global = __webpack_require__(4), | |
fails = __webpack_require__(7), | |
$export = __webpack_require__(8), | |
$typed = __webpack_require__(219), | |
$buffer = __webpack_require__(220), | |
ctx = __webpack_require__(20), | |
anInstance = __webpack_require__(90), | |
propertyDesc = __webpack_require__(17), | |
hide = __webpack_require__(10), | |
redefineAll = __webpack_require__(210), | |
isInteger = __webpack_require__(97), | |
toInteger = __webpack_require__(38), | |
toLength = __webpack_require__(37), | |
toIndex = __webpack_require__(39), | |
toPrimitive = __webpack_require__(16), | |
has = __webpack_require__(5), | |
same = __webpack_require__(71), | |
classof = __webpack_require__(75), | |
isObject = __webpack_require__(13), | |
toObject = __webpack_require__(58), | |
isArrayIter = __webpack_require__(163), | |
create = __webpack_require__(46), | |
getPrototypeOf = __webpack_require__(59), | |
gOPN = __webpack_require__(50).f, | |
isIterable = __webpack_require__(224), | |
getIterFn = __webpack_require__(165), | |
uid = __webpack_require__(19), | |
wks = __webpack_require__(25), | |
createArrayMethod = __webpack_require__(173), | |
createArrayIncludes = __webpack_require__(36), | |
speciesConstructor = __webpack_require__(207), | |
ArrayIterators = __webpack_require__(194), | |
Iterators = __webpack_require__(130), | |
$iterDetect = __webpack_require__(166), | |
setSpecies = __webpack_require__(193), | |
arrayFill = __webpack_require__(189), | |
arrayCopyWithin = __webpack_require__(186), | |
$DP = __webpack_require__(11), | |
$GOPD = __webpack_require__(51), | |
dP = $DP.f, | |
gOPD = $GOPD.f, | |
RangeError = global.RangeError, | |
TypeError = global.TypeError, | |
Uint8Array = global.Uint8Array, | |
ARRAY_BUFFER = 'ArrayBuffer', | |
SHARED_BUFFER = 'Shared' + ARRAY_BUFFER, | |
BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT', | |
PROTOTYPE = 'prototype', | |
ArrayProto = Array[PROTOTYPE], | |
$ArrayBuffer = $buffer.ArrayBuffer, | |
$DataView = $buffer.DataView, | |
arrayForEach = createArrayMethod(0), | |
arrayFilter = createArrayMethod(2), | |
arraySome = createArrayMethod(3), | |
arrayEvery = createArrayMethod(4), | |
arrayFind = createArrayMethod(5), | |
arrayFindIndex = createArrayMethod(6), | |
arrayIncludes = createArrayIncludes(true), | |
arrayIndexOf = createArrayIncludes(false), | |
arrayValues = ArrayIterators.values, | |
arrayKeys = ArrayIterators.keys, | |
arrayEntries = ArrayIterators.entries, | |
arrayLastIndexOf = ArrayProto.lastIndexOf, | |
arrayReduce = ArrayProto.reduce, | |
arrayReduceRight = ArrayProto.reduceRight, | |
arrayJoin = ArrayProto.join, | |
arraySort = ArrayProto.sort, | |
arraySlice = ArrayProto.slice, | |
arrayToString = ArrayProto.toString, | |
arrayToLocaleString = ArrayProto.toLocaleString, | |
ITERATOR = wks('iterator'), | |
TAG = wks('toStringTag'), | |
TYPED_CONSTRUCTOR = uid('typed_constructor'), | |
DEF_CONSTRUCTOR = uid('def_constructor'), | |
ALL_CONSTRUCTORS = $typed.CONSTR, | |
TYPED_ARRAY = $typed.TYPED, | |
VIEW = $typed.VIEW, | |
WRONG_LENGTH = 'Wrong length!'; | |
var $map = createArrayMethod(1, function (O, length) { | |
return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); | |
}); | |
var LITTLE_ENDIAN = fails(function () { | |
return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; | |
}); | |
var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { | |
new Uint8Array(1).set({}); | |
}); | |
var strictToLength = function strictToLength(it, SAME) { | |
if (it === undefined) throw TypeError(WRONG_LENGTH); | |
var number = +it, | |
length = toLength(it); | |
if (SAME && !same(number, length)) throw RangeError(WRONG_LENGTH); | |
return length; | |
}; | |
var toOffset = function toOffset(it, BYTES) { | |
var offset = toInteger(it); | |
if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); | |
return offset; | |
}; | |
var validate = function validate(it) { | |
if (isObject(it) && TYPED_ARRAY in it) return it; | |
throw TypeError(it + ' is not a typed array!'); | |
}; | |
var allocate = function allocate(C, length) { | |
if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { | |
throw TypeError('It is not a typed array constructor!'); | |
}return new C(length); | |
}; | |
var speciesFromList = function speciesFromList(O, list) { | |
return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); | |
}; | |
var fromList = function fromList(C, list) { | |
var index = 0, | |
length = list.length, | |
result = allocate(C, length); | |
while (length > index) { | |
result[index] = list[index++]; | |
}return result; | |
}; | |
var addGetter = function addGetter(it, key, internal) { | |
dP(it, key, { get: function get() { | |
return this._d[internal]; | |
} }); | |
}; | |
var $from = function from(source /*, mapfn, thisArg */) { | |
var O = toObject(source), | |
aLen = arguments.length, | |
mapfn = aLen > 1 ? arguments[1] : undefined, | |
mapping = mapfn !== undefined, | |
iterFn = getIterFn(O), | |
i, | |
length, | |
values, | |
result, | |
step, | |
iterator; | |
if (iterFn != undefined && !isArrayIter(iterFn)) { | |
for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { | |
values.push(step.value); | |
}O = values; | |
} | |
if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); | |
for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { | |
result[i] = mapping ? mapfn(O[i], i) : O[i]; | |
} | |
return result; | |
}; | |
var $of = function of() /*...items*/{ | |
var index = 0, | |
length = arguments.length, | |
result = allocate(this, length); | |
while (length > index) { | |
result[index] = arguments[index++]; | |
}return result; | |
}; | |
// iOS Safari 6.x fails here | |
var TO_LOCALE_BUG = !!Uint8Array && fails(function () { | |
arrayToLocaleString.call(new Uint8Array(1)); | |
}); | |
var $toLocaleString = function toLocaleString() { | |
return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); | |
}; | |
var proto = { | |
copyWithin: function copyWithin(target, start /*, end */) { | |
return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); | |
}, | |
every: function every(callbackfn /*, thisArg */) { | |
return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); | |
}, | |
fill: function fill(value /*, start, end */) { | |
// eslint-disable-line no-unused-vars | |
return arrayFill.apply(validate(this), arguments); | |
}, | |
filter: function filter(callbackfn /*, thisArg */) { | |
return speciesFromList(this, arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined)); | |
}, | |
find: function find(predicate /*, thisArg */) { | |
return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); | |
}, | |
findIndex: function findIndex(predicate /*, thisArg */) { | |
return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); | |
}, | |
forEach: function forEach(callbackfn /*, thisArg */) { | |
arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); | |
}, | |
indexOf: function indexOf(searchElement /*, fromIndex */) { | |
return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); | |
}, | |
includes: function includes(searchElement /*, fromIndex */) { | |
return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); | |
}, | |
join: function join(separator) { | |
// eslint-disable-line no-unused-vars | |
return arrayJoin.apply(validate(this), arguments); | |
}, | |
lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */) { | |
// eslint-disable-line no-unused-vars | |
return arrayLastIndexOf.apply(validate(this), arguments); | |
}, | |
map: function map(mapfn /*, thisArg */) { | |
return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); | |
}, | |
reduce: function reduce(callbackfn /*, initialValue */) { | |
// eslint-disable-line no-unused-vars | |
return arrayReduce.apply(validate(this), arguments); | |
}, | |
reduceRight: function reduceRight(callbackfn /*, initialValue */) { | |
// eslint-disable-line no-unused-vars | |
return arrayReduceRight.apply(validate(this), arguments); | |
}, | |
reverse: function reverse() { | |
var that = this, | |
length = validate(that).length, | |
middle = Math.floor(length / 2), | |
index = 0, | |
value; | |
while (index < middle) { | |
value = that[index]; | |
that[index++] = that[--length]; | |
that[length] = value; | |
}return that; | |
}, | |
some: function some(callbackfn /*, thisArg */) { | |
return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); | |
}, | |
sort: function sort(comparefn) { | |
return arraySort.call(validate(this), comparefn); | |
}, | |
subarray: function subarray(begin, end) { | |
var O = validate(this), | |
length = O.length, | |
$begin = toIndex(begin, length); | |
return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(O.buffer, O.byteOffset + $begin * O.BYTES_PER_ELEMENT, toLength((end === undefined ? length : toIndex(end, length)) - $begin)); | |
} | |
}; | |
var $slice = function slice(start, end) { | |
return speciesFromList(this, arraySlice.call(validate(this), start, end)); | |
}; | |
var $set = function set(arrayLike /*, offset */) { | |
validate(this); | |
var offset = toOffset(arguments[1], 1), | |
length = this.length, | |
src = toObject(arrayLike), | |
len = toLength(src.length), | |
index = 0; | |
if (len + offset > length) throw RangeError(WRONG_LENGTH); | |
while (index < len) { | |
this[offset + index] = src[index++]; | |
} | |
}; | |
var $iterators = { | |
entries: function entries() { | |
return arrayEntries.call(validate(this)); | |
}, | |
keys: function keys() { | |
return arrayKeys.call(validate(this)); | |
}, | |
values: function values() { | |
return arrayValues.call(validate(this)); | |
} | |
}; | |
var isTAIndex = function isTAIndex(target, key) { | |
return isObject(target) && target[TYPED_ARRAY] && (typeof key === 'undefined' ? 'undefined' : _typeof(key)) != 'symbol' && key in target && String(+key) == String(key); | |
}; | |
var $getDesc = function getOwnPropertyDescriptor(target, key) { | |
return isTAIndex(target, key = toPrimitive(key, true)) ? propertyDesc(2, target[key]) : gOPD(target, key); | |
}; | |
var $setDesc = function defineProperty(target, key, desc) { | |
if (isTAIndex(target, key = toPrimitive(key, true)) && isObject(desc) && has(desc, 'value') && !has(desc, 'get') && !has(desc, 'set') | |
// TODO: add validation descriptor w/o calling accessors | |
&& !desc.configurable && (!has(desc, 'writable') || desc.writable) && (!has(desc, 'enumerable') || desc.enumerable)) { | |
target[key] = desc.value; | |
return target; | |
} else return dP(target, key, desc); | |
}; | |
if (!ALL_CONSTRUCTORS) { | |
$GOPD.f = $getDesc; | |
$DP.f = $setDesc; | |
} | |
$export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { | |
getOwnPropertyDescriptor: $getDesc, | |
defineProperty: $setDesc | |
}); | |
if (fails(function () { | |
arrayToString.call({}); | |
})) { | |
arrayToString = arrayToLocaleString = function toString() { | |
return arrayJoin.call(this); | |
}; | |
} | |
var $TypedArrayPrototype$ = redefineAll({}, proto); | |
redefineAll($TypedArrayPrototype$, $iterators); | |
hide($TypedArrayPrototype$, ITERATOR, $iterators.values); | |
redefineAll($TypedArrayPrototype$, { | |
slice: $slice, | |
set: $set, | |
constructor: function constructor() {/* noop */}, | |
toString: arrayToString, | |
toLocaleString: $toLocaleString | |
}); | |
addGetter($TypedArrayPrototype$, 'buffer', 'b'); | |
addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); | |
addGetter($TypedArrayPrototype$, 'byteLength', 'l'); | |
addGetter($TypedArrayPrototype$, 'length', 'e'); | |
dP($TypedArrayPrototype$, TAG, { | |
get: function get() { | |
return this[TYPED_ARRAY]; | |
} | |
}); | |
module.exports = function (KEY, BYTES, wrapper, CLAMPED) { | |
CLAMPED = !!CLAMPED; | |
var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array', | |
ISNT_UINT8 = NAME != 'Uint8Array', | |
GETTER = 'get' + KEY, | |
SETTER = 'set' + KEY, | |
TypedArray = global[NAME], | |
Base = TypedArray || {}, | |
TAC = TypedArray && getPrototypeOf(TypedArray), | |
FORCED = !TypedArray || !$typed.ABV, | |
O = {}, | |
TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; | |
var getter = function getter(that, index) { | |
var data = that._d; | |
return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); | |
}; | |
var setter = function setter(that, index, value) { | |
var data = that._d; | |
if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; | |
data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); | |
}; | |
var addElement = function addElement(that, index) { | |
dP(that, index, { | |
get: function get() { | |
return getter(this, index); | |
}, | |
set: function set(value) { | |
return setter(this, index, value); | |
}, | |
enumerable: true | |
}); | |
}; | |
if (FORCED) { | |
TypedArray = wrapper(function (that, data, $offset, $length) { | |
anInstance(that, TypedArray, NAME, '_d'); | |
var index = 0, | |
offset = 0, | |
buffer, | |
byteLength, | |
length, | |
klass; | |
if (!isObject(data)) { | |
length = strictToLength(data, true); | |
byteLength = length * BYTES; | |
buffer = new $ArrayBuffer(byteLength); | |
} else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { | |
buffer = data; | |
offset = toOffset($offset, BYTES); | |
var $len = data.byteLength; | |
if ($length === undefined) { | |
if ($len % BYTES) throw RangeError(WRONG_LENGTH); | |
byteLength = $len - offset; | |
if (byteLength < 0) throw RangeError(WRONG_LENGTH); | |
} else { | |
byteLength = toLength($length) * BYTES; | |
if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); | |
} | |
length = byteLength / BYTES; | |
} else if (TYPED_ARRAY in data) { | |
return fromList(TypedArray, data); | |
} else { | |
return $from.call(TypedArray, data); | |
} | |
hide(that, '_d', { | |
b: buffer, | |
o: offset, | |
l: byteLength, | |
e: length, | |
v: new $DataView(buffer) | |
}); | |
while (index < length) { | |
addElement(that, index++); | |
} | |
}); | |
TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); | |
hide(TypedArrayPrototype, 'constructor', TypedArray); | |
} else if (!$iterDetect(function (iter) { | |
// V8 works with iterators, but fails in many other cases | |
// https://code.google.com/p/v8/issues/detail?id=4552 | |
new TypedArray(null); // eslint-disable-line no-new | |
new TypedArray(iter); // eslint-disable-line no-new | |
}, true)) { | |
TypedArray = wrapper(function (that, data, $offset, $length) { | |
anInstance(that, TypedArray, NAME); | |
var klass; | |
// `ws` module bug, temporarily remove validation length for Uint8Array | |
// https://github.com/websockets/ws/pull/645 | |
if (!isObject(data)) return new Base(strictToLength(data, ISNT_UINT8)); | |
if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { | |
return $length !== undefined ? new Base(data, toOffset($offset, BYTES), $length) : $offset !== undefined ? new Base(data, toOffset($offset, BYTES)) : new Base(data); | |
} | |
if (TYPED_ARRAY in data) return fromList(TypedArray, data); | |
return $from.call(TypedArray, data); | |
}); | |
arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { | |
if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); | |
}); | |
TypedArray[PROTOTYPE] = TypedArrayPrototype; | |
if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; | |
} | |
var $nativeIterator = TypedArrayPrototype[ITERATOR], | |
CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined), | |
$iterator = $iterators.values; | |
hide(TypedArray, TYPED_CONSTRUCTOR, true); | |
hide(TypedArrayPrototype, TYPED_ARRAY, NAME); | |
hide(TypedArrayPrototype, VIEW, true); | |
hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); | |
if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { | |
dP(TypedArrayPrototype, TAG, { | |
get: function get() { | |
return NAME; | |
} | |
}); | |
} | |
O[NAME] = TypedArray; | |
$export($export.G + $export.W + $export.F * (TypedArray != Base), O); | |
$export($export.S, NAME, { | |
BYTES_PER_ELEMENT: BYTES, | |
from: $from, | |
of: $of | |
}); | |
if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); | |
$export($export.P, NAME, proto); | |
setSpecies(NAME); | |
$export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); | |
$export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); | |
$export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, { toString: arrayToString }); | |
$export($export.P + $export.F * fails(function () { | |
new TypedArray(1).slice(); | |
}), NAME, { slice: $slice }); | |
$export($export.P + $export.F * (fails(function () { | |
return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); | |
}) || !fails(function () { | |
TypedArrayPrototype.toLocaleString.call([1, 2]); | |
})), NAME, { toLocaleString: $toLocaleString }); | |
Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; | |
if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); | |
}; | |
} else module.exports = function () {/* empty */}; | |
/***/ }, | |
/* 224 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var classof = __webpack_require__(75), | |
ITERATOR = __webpack_require__(25)('iterator'), | |
Iterators = __webpack_require__(130); | |
module.exports = __webpack_require__(9).isIterable = function (it) { | |
var O = Object(it); | |
return O[ITERATOR] !== undefined || '@@iterator' in O || Iterators.hasOwnProperty(classof(O)); | |
}; | |
/***/ }, | |
/* 225 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(223)('Uint8', 1, function (init) { | |
return function Uint8Array(data, byteOffset, length) { | |
return init(this, data, byteOffset, length); | |
}; | |
}); | |
/***/ }, | |
/* 226 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(223)('Uint8', 1, function (init) { | |
return function Uint8ClampedArray(data, byteOffset, length) { | |
return init(this, data, byteOffset, length); | |
}; | |
}, true); | |
/***/ }, | |
/* 227 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(223)('Int16', 2, function (init) { | |
return function Int16Array(data, byteOffset, length) { | |
return init(this, data, byteOffset, length); | |
}; | |
}); | |
/***/ }, | |
/* 228 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(223)('Uint16', 2, function (init) { | |
return function Uint16Array(data, byteOffset, length) { | |
return init(this, data, byteOffset, length); | |
}; | |
}); | |
/***/ }, | |
/* 229 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(223)('Int32', 4, function (init) { | |
return function Int32Array(data, byteOffset, length) { | |
return init(this, data, byteOffset, length); | |
}; | |
}); | |
/***/ }, | |
/* 230 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(223)('Uint32', 4, function (init) { | |
return function Uint32Array(data, byteOffset, length) { | |
return init(this, data, byteOffset, length); | |
}; | |
}); | |
/***/ }, | |
/* 231 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(223)('Float32', 4, function (init) { | |
return function Float32Array(data, byteOffset, length) { | |
return init(this, data, byteOffset, length); | |
}; | |
}); | |
/***/ }, | |
/* 232 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(223)('Float64', 8, function (init) { | |
return function Float64Array(data, byteOffset, length) { | |
return init(this, data, byteOffset, length); | |
}; | |
}); | |
/***/ }, | |
/* 233 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) | |
var $export = __webpack_require__(8), | |
aFunction = __webpack_require__(21), | |
anObject = __webpack_require__(12), | |
_apply = Function.apply; | |
$export($export.S, 'Reflect', { | |
apply: function apply(target, thisArgument, argumentsList) { | |
return _apply.call(aFunction(target), thisArgument, anObject(argumentsList)); | |
} | |
}); | |
/***/ }, | |
/* 234 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) | |
var $export = __webpack_require__(8), | |
create = __webpack_require__(46), | |
aFunction = __webpack_require__(21), | |
anObject = __webpack_require__(12), | |
isObject = __webpack_require__(13), | |
bind = __webpack_require__(77); | |
// MS Edge supports only 2 arguments | |
// FF Nightly sets third argument as `new.target`, but does not create `this` from it | |
$export($export.S + $export.F * __webpack_require__(7)(function () { | |
function F() {} | |
return !(Reflect.construct(function () {}, [], F) instanceof F); | |
}), 'Reflect', { | |
construct: function construct(Target, args /*, newTarget*/) { | |
aFunction(Target); | |
anObject(args); | |
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); | |
if (Target == newTarget) { | |
// w/o altered newTarget, optimization for 0-4 arguments | |
switch (args.length) { | |
case 0: | |
return new Target(); | |
case 1: | |
return new Target(args[0]); | |
case 2: | |
return new Target(args[0], args[1]); | |
case 3: | |
return new Target(args[0], args[1], args[2]); | |
case 4: | |
return new Target(args[0], args[1], args[2], args[3]); | |
} | |
// w/o altered newTarget, lot of arguments case | |
var $args = [null]; | |
$args.push.apply($args, args); | |
return new (bind.apply(Target, $args))(); | |
} | |
// with altered newTarget, not support built-in constructors | |
var proto = newTarget.prototype, | |
instance = create(isObject(proto) ? proto : Object.prototype), | |
result = Function.apply.call(Target, instance, args); | |
return isObject(result) ? result : instance; | |
} | |
}); | |
/***/ }, | |
/* 235 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) | |
var dP = __webpack_require__(11), | |
$export = __webpack_require__(8), | |
anObject = __webpack_require__(12), | |
toPrimitive = __webpack_require__(16); | |
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false | |
$export($export.S + $export.F * __webpack_require__(7)(function () { | |
Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); | |
}), 'Reflect', { | |
defineProperty: function defineProperty(target, propertyKey, attributes) { | |
anObject(target); | |
propertyKey = toPrimitive(propertyKey, true); | |
anObject(attributes); | |
try { | |
dP.f(target, propertyKey, attributes); | |
return true; | |
} catch (e) { | |
return false; | |
} | |
} | |
}); | |
/***/ }, | |
/* 236 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.4 Reflect.deleteProperty(target, propertyKey) | |
var $export = __webpack_require__(8), | |
gOPD = __webpack_require__(51).f, | |
anObject = __webpack_require__(12); | |
$export($export.S, 'Reflect', { | |
deleteProperty: function deleteProperty(target, propertyKey) { | |
var desc = gOPD(anObject(target), propertyKey); | |
return desc && !desc.configurable ? false : delete target[propertyKey]; | |
} | |
}); | |
/***/ }, | |
/* 237 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.5 Reflect.enumerate(target) | |
var $export = __webpack_require__(8), | |
anObject = __webpack_require__(12); | |
var Enumerate = function Enumerate(iterated) { | |
this._t = anObject(iterated); // target | |
this._i = 0; // next index | |
var keys = this._k = [] // keys | |
, | |
key; | |
for (key in iterated) { | |
keys.push(key); | |
} | |
}; | |
__webpack_require__(131)(Enumerate, 'Object', function () { | |
var that = this, | |
keys = that._k, | |
key; | |
do { | |
if (that._i >= keys.length) return { value: undefined, done: true }; | |
} while (!((key = keys[that._i++]) in that._t)); | |
return { value: key, done: false }; | |
}); | |
$export($export.S, 'Reflect', { | |
enumerate: function enumerate(target) { | |
return new Enumerate(target); | |
} | |
}); | |
/***/ }, | |
/* 238 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.6 Reflect.get(target, propertyKey [, receiver]) | |
var gOPD = __webpack_require__(51), | |
getPrototypeOf = __webpack_require__(59), | |
has = __webpack_require__(5), | |
$export = __webpack_require__(8), | |
isObject = __webpack_require__(13), | |
anObject = __webpack_require__(12); | |
function get(target, propertyKey /*, receiver*/) { | |
var receiver = arguments.length < 3 ? target : arguments[2], | |
desc, | |
proto; | |
if (anObject(target) === receiver) return target[propertyKey]; | |
if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') ? desc.value : desc.get !== undefined ? desc.get.call(receiver) : undefined; | |
if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); | |
} | |
$export($export.S, 'Reflect', { get: get }); | |
/***/ }, | |
/* 239 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) | |
var gOPD = __webpack_require__(51), | |
$export = __webpack_require__(8), | |
anObject = __webpack_require__(12); | |
$export($export.S, 'Reflect', { | |
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { | |
return gOPD.f(anObject(target), propertyKey); | |
} | |
}); | |
/***/ }, | |
/* 240 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.8 Reflect.getPrototypeOf(target) | |
var $export = __webpack_require__(8), | |
getProto = __webpack_require__(59), | |
anObject = __webpack_require__(12); | |
$export($export.S, 'Reflect', { | |
getPrototypeOf: function getPrototypeOf(target) { | |
return getProto(anObject(target)); | |
} | |
}); | |
/***/ }, | |
/* 241 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.9 Reflect.has(target, propertyKey) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Reflect', { | |
has: function has(target, propertyKey) { | |
return propertyKey in target; | |
} | |
}); | |
/***/ }, | |
/* 242 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.10 Reflect.isExtensible(target) | |
var $export = __webpack_require__(8), | |
anObject = __webpack_require__(12), | |
$isExtensible = Object.isExtensible; | |
$export($export.S, 'Reflect', { | |
isExtensible: function isExtensible(target) { | |
anObject(target); | |
return $isExtensible ? $isExtensible(target) : true; | |
} | |
}); | |
/***/ }, | |
/* 243 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.11 Reflect.ownKeys(target) | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Reflect', { ownKeys: __webpack_require__(244) }); | |
/***/ }, | |
/* 244 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// all object keys, includes non-enumerable and symbols | |
var gOPN = __webpack_require__(50), | |
gOPS = __webpack_require__(43), | |
anObject = __webpack_require__(12), | |
Reflect = __webpack_require__(4).Reflect; | |
module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { | |
var keys = gOPN.f(anObject(it)), | |
getSymbols = gOPS.f; | |
return getSymbols ? keys.concat(getSymbols(it)) : keys; | |
}; | |
/***/ }, | |
/* 245 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.12 Reflect.preventExtensions(target) | |
var $export = __webpack_require__(8), | |
anObject = __webpack_require__(12), | |
$preventExtensions = Object.preventExtensions; | |
$export($export.S, 'Reflect', { | |
preventExtensions: function preventExtensions(target) { | |
anObject(target); | |
try { | |
if ($preventExtensions) $preventExtensions(target); | |
return true; | |
} catch (e) { | |
return false; | |
} | |
} | |
}); | |
/***/ }, | |
/* 246 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) | |
var dP = __webpack_require__(11), | |
gOPD = __webpack_require__(51), | |
getPrototypeOf = __webpack_require__(59), | |
has = __webpack_require__(5), | |
$export = __webpack_require__(8), | |
createDesc = __webpack_require__(17), | |
anObject = __webpack_require__(12), | |
isObject = __webpack_require__(13); | |
function set(target, propertyKey, V /*, receiver*/) { | |
var receiver = arguments.length < 4 ? target : arguments[3], | |
ownDesc = gOPD.f(anObject(target), propertyKey), | |
existingDescriptor, | |
proto; | |
if (!ownDesc) { | |
if (isObject(proto = getPrototypeOf(target))) { | |
return set(proto, propertyKey, V, receiver); | |
} | |
ownDesc = createDesc(0); | |
} | |
if (has(ownDesc, 'value')) { | |
if (ownDesc.writable === false || !isObject(receiver)) return false; | |
existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); | |
existingDescriptor.value = V; | |
dP.f(receiver, propertyKey, existingDescriptor); | |
return true; | |
} | |
return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); | |
} | |
$export($export.S, 'Reflect', { set: set }); | |
/***/ }, | |
/* 247 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// 26.1.14 Reflect.setPrototypeOf(target, proto) | |
var $export = __webpack_require__(8), | |
setProto = __webpack_require__(73); | |
if (setProto) $export($export.S, 'Reflect', { | |
setPrototypeOf: function setPrototypeOf(target, proto) { | |
setProto.check(target, proto); | |
try { | |
setProto.set(target, proto); | |
return true; | |
} catch (e) { | |
return false; | |
} | |
} | |
}); | |
/***/ }, | |
/* 248 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/tc39/Array.prototype.includes | |
var $export = __webpack_require__(8), | |
$includes = __webpack_require__(36)(true); | |
$export($export.P, 'Array', { | |
includes: function includes(el /*, fromIndex = 0 */) { | |
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); | |
} | |
}); | |
__webpack_require__(187)('includes'); | |
/***/ }, | |
/* 249 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/mathiasbynens/String.prototype.at | |
var $export = __webpack_require__(8), | |
$at = __webpack_require__(128)(true); | |
$export($export.P, 'String', { | |
at: function at(pos) { | |
return $at(this, pos); | |
} | |
}); | |
/***/ }, | |
/* 250 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/tc39/proposal-string-pad-start-end | |
var $export = __webpack_require__(8), | |
$pad = __webpack_require__(251); | |
$export($export.P, 'String', { | |
padStart: function padStart(maxLength /*, fillString = ' ' */) { | |
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); | |
} | |
}); | |
/***/ }, | |
/* 251 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/tc39/proposal-string-pad-start-end | |
var toLength = __webpack_require__(37), | |
repeat = __webpack_require__(92), | |
defined = __webpack_require__(35); | |
module.exports = function (that, maxLength, fillString, left) { | |
var S = String(defined(that)), | |
stringLength = S.length, | |
fillStr = fillString === undefined ? ' ' : String(fillString), | |
intMaxLength = toLength(maxLength); | |
if (intMaxLength <= stringLength || fillStr == '') return S; | |
var fillLen = intMaxLength - stringLength, | |
stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); | |
if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); | |
return left ? stringFiller + S : S + stringFiller; | |
}; | |
/***/ }, | |
/* 252 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/tc39/proposal-string-pad-start-end | |
var $export = __webpack_require__(8), | |
$pad = __webpack_require__(251); | |
$export($export.P, 'String', { | |
padEnd: function padEnd(maxLength /*, fillString = ' ' */) { | |
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); | |
} | |
}); | |
/***/ }, | |
/* 253 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim | |
__webpack_require__(83)('trimLeft', function ($trim) { | |
return function trimLeft() { | |
return $trim(this, 1); | |
}; | |
}, 'trimStart'); | |
/***/ }, | |
/* 254 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim | |
__webpack_require__(83)('trimRight', function ($trim) { | |
return function trimRight() { | |
return $trim(this, 2); | |
}; | |
}, 'trimEnd'); | |
/***/ }, | |
/* 255 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://tc39.github.io/String.prototype.matchAll/ | |
var $export = __webpack_require__(8), | |
defined = __webpack_require__(35), | |
toLength = __webpack_require__(37), | |
isRegExp = __webpack_require__(135), | |
getFlags = __webpack_require__(197), | |
RegExpProto = RegExp.prototype; | |
var $RegExpStringIterator = function $RegExpStringIterator(regexp, string) { | |
this._r = regexp; | |
this._s = string; | |
}; | |
__webpack_require__(131)($RegExpStringIterator, 'RegExp String', function next() { | |
var match = this._r.exec(this._s); | |
return { value: match, done: match === null }; | |
}); | |
$export($export.P, 'String', { | |
matchAll: function matchAll(regexp) { | |
defined(this); | |
if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); | |
var S = String(this), | |
flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp), | |
rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); | |
rx.lastIndex = toLength(regexp.lastIndex); | |
return new $RegExpStringIterator(rx, S); | |
} | |
}); | |
/***/ }, | |
/* 256 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(27)('asyncIterator'); | |
/***/ }, | |
/* 257 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(27)('observable'); | |
/***/ }, | |
/* 258 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/tc39/proposal-object-getownpropertydescriptors | |
var $export = __webpack_require__(8), | |
ownKeys = __webpack_require__(244), | |
toIObject = __webpack_require__(32), | |
gOPD = __webpack_require__(51), | |
createProperty = __webpack_require__(164); | |
$export($export.S, 'Object', { | |
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { | |
var O = toIObject(object), | |
getDesc = gOPD.f, | |
keys = ownKeys(O), | |
result = {}, | |
i = 0, | |
key, | |
D; | |
while (keys.length > i) { | |
createProperty(result, key = keys[i++], getDesc(O, key)); | |
}return result; | |
} | |
}); | |
/***/ }, | |
/* 259 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/tc39/proposal-object-values-entries | |
var $export = __webpack_require__(8), | |
$values = __webpack_require__(260)(false); | |
$export($export.S, 'Object', { | |
values: function values(it) { | |
return $values(it); | |
} | |
}); | |
/***/ }, | |
/* 260 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var getKeys = __webpack_require__(30), | |
toIObject = __webpack_require__(32), | |
isEnum = __webpack_require__(44).f; | |
module.exports = function (isEntries) { | |
return function (it) { | |
var O = toIObject(it), | |
keys = getKeys(O), | |
length = keys.length, | |
i = 0, | |
result = [], | |
key; | |
while (length > i) { | |
if (isEnum.call(O, key = keys[i++])) { | |
result.push(isEntries ? [key, O[key]] : O[key]); | |
} | |
}return result; | |
}; | |
}; | |
/***/ }, | |
/* 261 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/tc39/proposal-object-values-entries | |
var $export = __webpack_require__(8), | |
$entries = __webpack_require__(260)(true); | |
$export($export.S, 'Object', { | |
entries: function entries(it) { | |
return $entries(it); | |
} | |
}); | |
/***/ }, | |
/* 262 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
toObject = __webpack_require__(58), | |
aFunction = __webpack_require__(21), | |
$defineProperty = __webpack_require__(11); | |
// B.2.2.2 Object.prototype.__defineGetter__(P, getter) | |
__webpack_require__(6) && $export($export.P + __webpack_require__(263), 'Object', { | |
__defineGetter__: function __defineGetter__(P, getter) { | |
$defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); | |
} | |
}); | |
/***/ }, | |
/* 263 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// Forced replacement prototype accessors methods | |
module.exports = __webpack_require__(28) || !__webpack_require__(7)(function () { | |
var K = Math.random(); | |
// In FF throws only define methods | |
__defineSetter__.call(null, K, function () {/* empty */}); | |
delete __webpack_require__(4)[K]; | |
}); | |
/***/ }, | |
/* 264 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
toObject = __webpack_require__(58), | |
aFunction = __webpack_require__(21), | |
$defineProperty = __webpack_require__(11); | |
// B.2.2.3 Object.prototype.__defineSetter__(P, setter) | |
__webpack_require__(6) && $export($export.P + __webpack_require__(263), 'Object', { | |
__defineSetter__: function __defineSetter__(P, setter) { | |
$defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); | |
} | |
}); | |
/***/ }, | |
/* 265 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
toObject = __webpack_require__(58), | |
toPrimitive = __webpack_require__(16), | |
getPrototypeOf = __webpack_require__(59), | |
getOwnPropertyDescriptor = __webpack_require__(51).f; | |
// B.2.2.4 Object.prototype.__lookupGetter__(P) | |
__webpack_require__(6) && $export($export.P + __webpack_require__(263), 'Object', { | |
__lookupGetter__: function __lookupGetter__(P) { | |
var O = toObject(this), | |
K = toPrimitive(P, true), | |
D; | |
do { | |
if (D = getOwnPropertyDescriptor(O, K)) return D.get; | |
} while (O = getPrototypeOf(O)); | |
} | |
}); | |
/***/ }, | |
/* 266 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
toObject = __webpack_require__(58), | |
toPrimitive = __webpack_require__(16), | |
getPrototypeOf = __webpack_require__(59), | |
getOwnPropertyDescriptor = __webpack_require__(51).f; | |
// B.2.2.5 Object.prototype.__lookupSetter__(P) | |
__webpack_require__(6) && $export($export.P + __webpack_require__(263), 'Object', { | |
__lookupSetter__: function __lookupSetter__(P) { | |
var O = toObject(this), | |
K = toPrimitive(P, true), | |
D; | |
do { | |
if (D = getOwnPropertyDescriptor(O, K)) return D.set; | |
} while (O = getPrototypeOf(O)); | |
} | |
}); | |
/***/ }, | |
/* 267 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/DavidBruant/Map-Set.prototype.toJSON | |
var $export = __webpack_require__(8); | |
$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(268)('Map') }); | |
/***/ }, | |
/* 268 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/DavidBruant/Map-Set.prototype.toJSON | |
var classof = __webpack_require__(75), | |
from = __webpack_require__(269); | |
module.exports = function (NAME) { | |
return function toJSON() { | |
if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); | |
return from(this); | |
}; | |
}; | |
/***/ }, | |
/* 269 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var forOf = __webpack_require__(206); | |
module.exports = function (iter, ITERATOR) { | |
var result = []; | |
forOf(iter, false, result.push, result, ITERATOR); | |
return result; | |
}; | |
/***/ }, | |
/* 270 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/DavidBruant/Map-Set.prototype.toJSON | |
var $export = __webpack_require__(8); | |
$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(268)('Set') }); | |
/***/ }, | |
/* 271 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/ljharb/proposal-global | |
var $export = __webpack_require__(8); | |
$export($export.S, 'System', { global: __webpack_require__(4) }); | |
/***/ }, | |
/* 272 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/ljharb/proposal-is-error | |
var $export = __webpack_require__(8), | |
cof = __webpack_require__(34); | |
$export($export.S, 'Error', { | |
isError: function isError(it) { | |
return cof(it) === 'Error'; | |
} | |
}); | |
/***/ }, | |
/* 273 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Math', { | |
iaddh: function iaddh(x0, x1, y0, y1) { | |
var $x0 = x0 >>> 0, | |
$x1 = x1 >>> 0, | |
$y0 = y0 >>> 0; | |
return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; | |
} | |
}); | |
/***/ }, | |
/* 274 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Math', { | |
isubh: function isubh(x0, x1, y0, y1) { | |
var $x0 = x0 >>> 0, | |
$x1 = x1 >>> 0, | |
$y0 = y0 >>> 0; | |
return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; | |
} | |
}); | |
/***/ }, | |
/* 275 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Math', { | |
imulh: function imulh(u, v) { | |
var UINT16 = 0xffff, | |
$u = +u, | |
$v = +v, | |
u0 = $u & UINT16, | |
v0 = $v & UINT16, | |
u1 = $u >> 16, | |
v1 = $v >> 16, | |
t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); | |
return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); | |
} | |
}); | |
/***/ }, | |
/* 276 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 | |
var $export = __webpack_require__(8); | |
$export($export.S, 'Math', { | |
umulh: function umulh(u, v) { | |
var UINT16 = 0xffff, | |
$u = +u, | |
$v = +v, | |
u0 = $u & UINT16, | |
v0 = $v & UINT16, | |
u1 = $u >>> 16, | |
v1 = $v >>> 16, | |
t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); | |
return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); | |
} | |
}); | |
/***/ }, | |
/* 277 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var metadata = __webpack_require__(278), | |
anObject = __webpack_require__(12), | |
toMetaKey = metadata.key, | |
ordinaryDefineOwnMetadata = metadata.set; | |
metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { | |
ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); | |
} }); | |
/***/ }, | |
/* 278 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
var Map = __webpack_require__(211), | |
$export = __webpack_require__(8), | |
shared = __webpack_require__(23)('metadata'), | |
store = shared.store || (shared.store = new (__webpack_require__(215))()); | |
var getOrCreateMetadataMap = function getOrCreateMetadataMap(target, targetKey, create) { | |
var targetMetadata = store.get(target); | |
if (!targetMetadata) { | |
if (!create) return undefined; | |
store.set(target, targetMetadata = new Map()); | |
} | |
var keyMetadata = targetMetadata.get(targetKey); | |
if (!keyMetadata) { | |
if (!create) return undefined; | |
targetMetadata.set(targetKey, keyMetadata = new Map()); | |
}return keyMetadata; | |
}; | |
var ordinaryHasOwnMetadata = function ordinaryHasOwnMetadata(MetadataKey, O, P) { | |
var metadataMap = getOrCreateMetadataMap(O, P, false); | |
return metadataMap === undefined ? false : metadataMap.has(MetadataKey); | |
}; | |
var ordinaryGetOwnMetadata = function ordinaryGetOwnMetadata(MetadataKey, O, P) { | |
var metadataMap = getOrCreateMetadataMap(O, P, false); | |
return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); | |
}; | |
var ordinaryDefineOwnMetadata = function ordinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) { | |
getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); | |
}; | |
var ordinaryOwnMetadataKeys = function ordinaryOwnMetadataKeys(target, targetKey) { | |
var metadataMap = getOrCreateMetadataMap(target, targetKey, false), | |
keys = []; | |
if (metadataMap) metadataMap.forEach(function (_, key) { | |
keys.push(key); | |
}); | |
return keys; | |
}; | |
var toMetaKey = function toMetaKey(it) { | |
return it === undefined || (typeof it === 'undefined' ? 'undefined' : _typeof(it)) == 'symbol' ? it : String(it); | |
}; | |
var exp = function exp(O) { | |
$export($export.S, 'Reflect', O); | |
}; | |
module.exports = { | |
store: store, | |
map: getOrCreateMetadataMap, | |
has: ordinaryHasOwnMetadata, | |
get: ordinaryGetOwnMetadata, | |
set: ordinaryDefineOwnMetadata, | |
keys: ordinaryOwnMetadataKeys, | |
key: toMetaKey, | |
exp: exp | |
}; | |
/***/ }, | |
/* 279 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var metadata = __webpack_require__(278), | |
anObject = __webpack_require__(12), | |
toMetaKey = metadata.key, | |
getOrCreateMetadataMap = metadata.map, | |
store = metadata.store; | |
metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */) { | |
var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]), | |
metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); | |
if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; | |
if (metadataMap.size) return true; | |
var targetMetadata = store.get(target); | |
targetMetadata['delete'](targetKey); | |
return !!targetMetadata.size || store['delete'](target); | |
} }); | |
/***/ }, | |
/* 280 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var metadata = __webpack_require__(278), | |
anObject = __webpack_require__(12), | |
getPrototypeOf = __webpack_require__(59), | |
ordinaryHasOwnMetadata = metadata.has, | |
ordinaryGetOwnMetadata = metadata.get, | |
toMetaKey = metadata.key; | |
var ordinaryGetMetadata = function ordinaryGetMetadata(MetadataKey, O, P) { | |
var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); | |
if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); | |
var parent = getPrototypeOf(O); | |
return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; | |
}; | |
metadata.exp({ getMetadata: function getMetadata(metadataKey, target /*, targetKey */) { | |
return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); | |
} }); | |
/***/ }, | |
/* 281 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var Set = __webpack_require__(214), | |
from = __webpack_require__(269), | |
metadata = __webpack_require__(278), | |
anObject = __webpack_require__(12), | |
getPrototypeOf = __webpack_require__(59), | |
ordinaryOwnMetadataKeys = metadata.keys, | |
toMetaKey = metadata.key; | |
var ordinaryMetadataKeys = function ordinaryMetadataKeys(O, P) { | |
var oKeys = ordinaryOwnMetadataKeys(O, P), | |
parent = getPrototypeOf(O); | |
if (parent === null) return oKeys; | |
var pKeys = ordinaryMetadataKeys(parent, P); | |
return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; | |
}; | |
metadata.exp({ getMetadataKeys: function getMetadataKeys(target /*, targetKey */) { | |
return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); | |
} }); | |
/***/ }, | |
/* 282 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var metadata = __webpack_require__(278), | |
anObject = __webpack_require__(12), | |
ordinaryGetOwnMetadata = metadata.get, | |
toMetaKey = metadata.key; | |
metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */) { | |
return ordinaryGetOwnMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); | |
} }); | |
/***/ }, | |
/* 283 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var metadata = __webpack_require__(278), | |
anObject = __webpack_require__(12), | |
ordinaryOwnMetadataKeys = metadata.keys, | |
toMetaKey = metadata.key; | |
metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */) { | |
return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); | |
} }); | |
/***/ }, | |
/* 284 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var metadata = __webpack_require__(278), | |
anObject = __webpack_require__(12), | |
getPrototypeOf = __webpack_require__(59), | |
ordinaryHasOwnMetadata = metadata.has, | |
toMetaKey = metadata.key; | |
var ordinaryHasMetadata = function ordinaryHasMetadata(MetadataKey, O, P) { | |
var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); | |
if (hasOwn) return true; | |
var parent = getPrototypeOf(O); | |
return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; | |
}; | |
metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */) { | |
return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); | |
} }); | |
/***/ }, | |
/* 285 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var metadata = __webpack_require__(278), | |
anObject = __webpack_require__(12), | |
ordinaryHasOwnMetadata = metadata.has, | |
toMetaKey = metadata.key; | |
metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */) { | |
return ordinaryHasOwnMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); | |
} }); | |
/***/ }, | |
/* 286 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var metadata = __webpack_require__(278), | |
anObject = __webpack_require__(12), | |
aFunction = __webpack_require__(21), | |
toMetaKey = metadata.key, | |
ordinaryDefineOwnMetadata = metadata.set; | |
metadata.exp({ metadata: function metadata(metadataKey, metadataValue) { | |
return function decorator(target, targetKey) { | |
ordinaryDefineOwnMetadata(metadataKey, metadataValue, (targetKey !== undefined ? anObject : aFunction)(target), toMetaKey(targetKey)); | |
}; | |
} }); | |
/***/ }, | |
/* 287 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask | |
var $export = __webpack_require__(8), | |
microtask = __webpack_require__(209)(), | |
process = __webpack_require__(4).process, | |
isNode = __webpack_require__(34)(process) == 'process'; | |
$export($export.G, { | |
asap: function asap(fn) { | |
var domain = isNode && process.domain; | |
microtask(domain ? domain.bind(fn) : fn); | |
} | |
}); | |
/***/ }, | |
/* 288 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/zenparsing/es-observable | |
var $export = __webpack_require__(8), | |
global = __webpack_require__(4), | |
core = __webpack_require__(9), | |
microtask = __webpack_require__(209)(), | |
OBSERVABLE = __webpack_require__(25)('observable'), | |
aFunction = __webpack_require__(21), | |
anObject = __webpack_require__(12), | |
anInstance = __webpack_require__(90), | |
redefineAll = __webpack_require__(210), | |
hide = __webpack_require__(10), | |
forOf = __webpack_require__(206), | |
RETURN = forOf.RETURN; | |
var getMethod = function getMethod(fn) { | |
return fn == null ? undefined : aFunction(fn); | |
}; | |
var cleanupSubscription = function cleanupSubscription(subscription) { | |
var cleanup = subscription._c; | |
if (cleanup) { | |
subscription._c = undefined; | |
cleanup(); | |
} | |
}; | |
var subscriptionClosed = function subscriptionClosed(subscription) { | |
return subscription._o === undefined; | |
}; | |
var closeSubscription = function closeSubscription(subscription) { | |
if (!subscriptionClosed(subscription)) { | |
subscription._o = undefined; | |
cleanupSubscription(subscription); | |
} | |
}; | |
var Subscription = function Subscription(observer, subscriber) { | |
anObject(observer); | |
this._c = undefined; | |
this._o = observer; | |
observer = new SubscriptionObserver(this); | |
try { | |
var cleanup = subscriber(observer), | |
subscription = cleanup; | |
if (cleanup != null) { | |
if (typeof cleanup.unsubscribe === 'function') cleanup = function cleanup() { | |
subscription.unsubscribe(); | |
};else aFunction(cleanup); | |
this._c = cleanup; | |
} | |
} catch (e) { | |
observer.error(e); | |
return; | |
}if (subscriptionClosed(this)) cleanupSubscription(this); | |
}; | |
Subscription.prototype = redefineAll({}, { | |
unsubscribe: function unsubscribe() { | |
closeSubscription(this); | |
} | |
}); | |
var SubscriptionObserver = function SubscriptionObserver(subscription) { | |
this._s = subscription; | |
}; | |
SubscriptionObserver.prototype = redefineAll({}, { | |
next: function next(value) { | |
var subscription = this._s; | |
if (!subscriptionClosed(subscription)) { | |
var observer = subscription._o; | |
try { | |
var m = getMethod(observer.next); | |
if (m) return m.call(observer, value); | |
} catch (e) { | |
try { | |
closeSubscription(subscription); | |
} finally { | |
throw e; | |
} | |
} | |
} | |
}, | |
error: function error(value) { | |
var subscription = this._s; | |
if (subscriptionClosed(subscription)) throw value; | |
var observer = subscription._o; | |
subscription._o = undefined; | |
try { | |
var m = getMethod(observer.error); | |
if (!m) throw value; | |
value = m.call(observer, value); | |
} catch (e) { | |
try { | |
cleanupSubscription(subscription); | |
} finally { | |
throw e; | |
} | |
}cleanupSubscription(subscription); | |
return value; | |
}, | |
complete: function complete(value) { | |
var subscription = this._s; | |
if (!subscriptionClosed(subscription)) { | |
var observer = subscription._o; | |
subscription._o = undefined; | |
try { | |
var m = getMethod(observer.complete); | |
value = m ? m.call(observer, value) : undefined; | |
} catch (e) { | |
try { | |
cleanupSubscription(subscription); | |
} finally { | |
throw e; | |
} | |
}cleanupSubscription(subscription); | |
return value; | |
} | |
} | |
}); | |
var $Observable = function Observable(subscriber) { | |
anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); | |
}; | |
redefineAll($Observable.prototype, { | |
subscribe: function subscribe(observer) { | |
return new Subscription(observer, this._f); | |
}, | |
forEach: function forEach(fn) { | |
var that = this; | |
return new (core.Promise || global.Promise)(function (resolve, reject) { | |
aFunction(fn); | |
var subscription = that.subscribe({ | |
next: function next(value) { | |
try { | |
return fn(value); | |
} catch (e) { | |
reject(e); | |
subscription.unsubscribe(); | |
} | |
}, | |
error: reject, | |
complete: resolve | |
}); | |
}); | |
} | |
}); | |
redefineAll($Observable, { | |
from: function from(x) { | |
var C = typeof this === 'function' ? this : $Observable; | |
var method = getMethod(anObject(x)[OBSERVABLE]); | |
if (method) { | |
var observable = anObject(method.call(x)); | |
return observable.constructor === C ? observable : new C(function (observer) { | |
return observable.subscribe(observer); | |
}); | |
} | |
return new C(function (observer) { | |
var done = false; | |
microtask(function () { | |
if (!done) { | |
try { | |
if (forOf(x, false, function (it) { | |
observer.next(it); | |
if (done) return RETURN; | |
}) === RETURN) return; | |
} catch (e) { | |
if (done) throw e; | |
observer.error(e); | |
return; | |
}observer.complete(); | |
} | |
}); | |
return function () { | |
done = true; | |
}; | |
}); | |
}, | |
of: function of() { | |
for (var i = 0, l = arguments.length, items = Array(l); i < l;) { | |
items[i] = arguments[i++]; | |
}return new (typeof this === 'function' ? this : $Observable)(function (observer) { | |
var done = false; | |
microtask(function () { | |
if (!done) { | |
for (var i = 0; i < items.length; ++i) { | |
observer.next(items[i]); | |
if (done) return; | |
}observer.complete(); | |
} | |
}); | |
return function () { | |
done = true; | |
}; | |
}); | |
} | |
}); | |
hide($Observable.prototype, OBSERVABLE, function () { | |
return this; | |
}); | |
$export($export.G, { Observable: $Observable }); | |
__webpack_require__(193)('Observable'); | |
/***/ }, | |
/* 289 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// ie9- setTimeout & setInterval additional parameters fix | |
var global = __webpack_require__(4), | |
$export = __webpack_require__(8), | |
invoke = __webpack_require__(78), | |
partial = __webpack_require__(290), | |
navigator = global.navigator, | |
MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check | |
var wrap = function wrap(set) { | |
return MSIE ? function (fn, time /*, ...args */) { | |
return set(invoke(partial, [].slice.call(arguments, 2), typeof fn == 'function' ? fn : Function(fn)), time); | |
} : set; | |
}; | |
$export($export.G + $export.B + $export.F * MSIE, { | |
setTimeout: wrap(global.setTimeout), | |
setInterval: wrap(global.setInterval) | |
}); | |
/***/ }, | |
/* 290 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var path = __webpack_require__(291), | |
invoke = __webpack_require__(78), | |
aFunction = __webpack_require__(21); | |
module.exports = function () /* ...pargs */{ | |
var fn = aFunction(this), | |
length = arguments.length, | |
pargs = Array(length), | |
i = 0, | |
_ = path._, | |
holder = false; | |
while (length > i) { | |
if ((pargs[i] = arguments[i++]) === _) holder = true; | |
}return function () /* ...args */{ | |
var that = this, | |
aLen = arguments.length, | |
j = 0, | |
k = 0, | |
args; | |
if (!holder && !aLen) return invoke(fn, pargs, that); | |
args = pargs.slice(); | |
if (holder) for (; length > j; j++) { | |
if (args[j] === _) args[j] = arguments[k++]; | |
}while (aLen > k) { | |
args.push(arguments[k++]); | |
}return invoke(fn, args, that); | |
}; | |
}; | |
/***/ }, | |
/* 291 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
module.exports = __webpack_require__(4); | |
/***/ }, | |
/* 292 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $export = __webpack_require__(8), | |
$task = __webpack_require__(208); | |
$export($export.G + $export.B, { | |
setImmediate: $task.set, | |
clearImmediate: $task.clear | |
}); | |
/***/ }, | |
/* 293 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var $iterators = __webpack_require__(194), | |
redefine = __webpack_require__(18), | |
global = __webpack_require__(4), | |
hide = __webpack_require__(10), | |
Iterators = __webpack_require__(130), | |
wks = __webpack_require__(25), | |
ITERATOR = wks('iterator'), | |
TO_STRING_TAG = wks('toStringTag'), | |
ArrayValues = Iterators.Array; | |
for (var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++) { | |
var NAME = collections[i], | |
Collection = global[NAME], | |
proto = Collection && Collection.prototype, | |
key; | |
if (proto) { | |
if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); | |
if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); | |
Iterators[NAME] = ArrayValues; | |
for (key in $iterators) { | |
if (!proto[key]) redefine(proto, key, $iterators[key], true); | |
} | |
} | |
} | |
/***/ }, | |
/* 294 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/* WEBPACK VAR INJECTION */(function(global, module, process) {"use strict"; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
/** | |
* Copyright (c) 2014, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* https://raw.github.com/facebook/regenerator/master/LICENSE file. An | |
* additional grant of patent rights can be found in the PATENTS file in | |
* the same directory. | |
*/ | |
!function (global) { | |
"use strict"; | |
var hasOwn = Object.prototype.hasOwnProperty; | |
var undefined; // More compressible than void 0. | |
var $Symbol = typeof Symbol === "function" ? Symbol : {}; | |
var iteratorSymbol = $Symbol.iterator || "@@iterator"; | |
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; | |
var inModule = ( false ? "undefined" : _typeof(module)) === "object"; | |
var runtime = global.regeneratorRuntime; | |
if (runtime) { | |
if (inModule) { | |
// If regeneratorRuntime is defined globally and we're in a module, | |
// make the exports object identical to regeneratorRuntime. | |
module.exports = runtime; | |
} | |
// Don't bother evaluating the rest of this file if the runtime was | |
// already defined globally. | |
return; | |
} | |
// Define the runtime globally (as expected by generated code) as either | |
// module.exports (if we're in a module) or a new, empty object. | |
runtime = global.regeneratorRuntime = inModule ? module.exports : {}; | |
function wrap(innerFn, outerFn, self, tryLocsList) { | |
// If outerFn provided, then outerFn.prototype instanceof Generator. | |
var generator = Object.create((outerFn || Generator).prototype); | |
var context = new Context(tryLocsList || []); | |
// The ._invoke method unifies the implementations of the .next, | |
// .throw, and .return methods. | |
generator._invoke = makeInvokeMethod(innerFn, self, context); | |
return generator; | |
} | |
runtime.wrap = wrap; | |
// Try/catch helper to minimize deoptimizations. Returns a completion | |
// record like context.tryEntries[i].completion. This interface could | |
// have been (and was previously) designed to take a closure to be | |
// invoked without arguments, but in all the cases we care about we | |
// already have an existing method we want to call, so there's no need | |
// to create a new function object. We can even get away with assuming | |
// the method takes exactly one argument, since that happens to be true | |
// in every case, so we don't have to touch the arguments object. The | |
// only additional allocation required is the completion record, which | |
// has a stable shape and so hopefully should be cheap to allocate. | |
function tryCatch(fn, obj, arg) { | |
try { | |
return { type: "normal", arg: fn.call(obj, arg) }; | |
} catch (err) { | |
return { type: "throw", arg: err }; | |
} | |
} | |
var GenStateSuspendedStart = "suspendedStart"; | |
var GenStateSuspendedYield = "suspendedYield"; | |
var GenStateExecuting = "executing"; | |
var GenStateCompleted = "completed"; | |
// Returning this object from the innerFn has the same effect as | |
// breaking out of the dispatch switch statement. | |
var ContinueSentinel = {}; | |
// Dummy constructor functions that we use as the .constructor and | |
// .constructor.prototype properties for functions that return Generator | |
// objects. For full spec compliance, you may wish to configure your | |
// minifier not to mangle the names of these two functions. | |
function Generator() {} | |
function GeneratorFunction() {} | |
function GeneratorFunctionPrototype() {} | |
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; | |
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; | |
GeneratorFunctionPrototype.constructor = GeneratorFunction; | |
GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; | |
// Helper for defining the .next, .throw, and .return methods of the | |
// Iterator interface in terms of a single ._invoke method. | |
function defineIteratorMethods(prototype) { | |
["next", "throw", "return"].forEach(function (method) { | |
prototype[method] = function (arg) { | |
return this._invoke(method, arg); | |
}; | |
}); | |
} | |
runtime.isGeneratorFunction = function (genFun) { | |
var ctor = typeof genFun === "function" && genFun.constructor; | |
return ctor ? ctor === GeneratorFunction || | |
// For the native GeneratorFunction constructor, the best we can | |
// do is to check its .name property. | |
(ctor.displayName || ctor.name) === "GeneratorFunction" : false; | |
}; | |
runtime.mark = function (genFun) { | |
if (Object.setPrototypeOf) { | |
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); | |
} else { | |
genFun.__proto__ = GeneratorFunctionPrototype; | |
if (!(toStringTagSymbol in genFun)) { | |
genFun[toStringTagSymbol] = "GeneratorFunction"; | |
} | |
} | |
genFun.prototype = Object.create(Gp); | |
return genFun; | |
}; | |
// Within the body of any async function, `await x` is transformed to | |
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test | |
// `value instanceof AwaitArgument` to determine if the yielded value is | |
// meant to be awaited. Some may consider the name of this method too | |
// cutesy, but they are curmudgeons. | |
runtime.awrap = function (arg) { | |
return new AwaitArgument(arg); | |
}; | |
function AwaitArgument(arg) { | |
this.arg = arg; | |
} | |
function AsyncIterator(generator) { | |
function invoke(method, arg, resolve, reject) { | |
var record = tryCatch(generator[method], generator, arg); | |
if (record.type === "throw") { | |
reject(record.arg); | |
} else { | |
var result = record.arg; | |
var value = result.value; | |
if (value instanceof AwaitArgument) { | |
return Promise.resolve(value.arg).then(function (value) { | |
invoke("next", value, resolve, reject); | |
}, function (err) { | |
invoke("throw", err, resolve, reject); | |
}); | |
} | |
return Promise.resolve(value).then(function (unwrapped) { | |
// When a yielded Promise is resolved, its final value becomes | |
// the .value of the Promise<{value,done}> result for the | |
// current iteration. If the Promise is rejected, however, the | |
// result for this iteration will be rejected with the same | |
// reason. Note that rejections of yielded Promises are not | |
// thrown back into the generator function, as is the case | |
// when an awaited Promise is rejected. This difference in | |
// behavior between yield and await is important, because it | |
// allows the consumer to decide what to do with the yielded | |
// rejection (swallow it and continue, manually .throw it back | |
// into the generator, abandon iteration, whatever). With | |
// await, by contrast, there is no opportunity to examine the | |
// rejection reason outside the generator function, so the | |
// only option is to throw it from the await expression, and | |
// let the generator function handle the exception. | |
result.value = unwrapped; | |
resolve(result); | |
}, reject); | |
} | |
} | |
if ((typeof process === "undefined" ? "undefined" : _typeof(process)) === "object" && process.domain) { | |
invoke = process.domain.bind(invoke); | |
} | |
var previousPromise; | |
function enqueue(method, arg) { | |
function callInvokeWithMethodAndArg() { | |
return new Promise(function (resolve, reject) { | |
invoke(method, arg, resolve, reject); | |
}); | |
} | |
return previousPromise = | |
// If enqueue has been called before, then we want to wait until | |
// all previous Promises have been resolved before calling invoke, | |
// so that results are always delivered in the correct order. If | |
// enqueue has not been called before, then it is important to | |
// call invoke immediately, without waiting on a callback to fire, | |
// so that the async generator function has the opportunity to do | |
// any necessary setup in a predictable way. This predictability | |
// is why the Promise constructor synchronously invokes its | |
// executor callback, and why async functions synchronously | |
// execute code before the first await. Since we implement simple | |
// async functions in terms of async generators, it is especially | |
// important to get this right, even though it requires care. | |
previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, | |
// Avoid propagating failures to Promises returned by later | |
// invocations of the iterator. | |
callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); | |
} | |
// Define the unified helper method that is used to implement .next, | |
// .throw, and .return (see defineIteratorMethods). | |
this._invoke = enqueue; | |
} | |
defineIteratorMethods(AsyncIterator.prototype); | |
// Note that simple async functions are implemented on top of | |
// AsyncIterator objects; they just return a Promise for the value of | |
// the final result produced by the iterator. | |
runtime.async = function (innerFn, outerFn, self, tryLocsList) { | |
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); | |
return runtime.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator. | |
: iter.next().then(function (result) { | |
return result.done ? result.value : iter.next(); | |
}); | |
}; | |
function makeInvokeMethod(innerFn, self, context) { | |
var state = GenStateSuspendedStart; | |
return function invoke(method, arg) { | |
if (state === GenStateExecuting) { | |
throw new Error("Generator is already running"); | |
} | |
if (state === GenStateCompleted) { | |
if (method === "throw") { | |
throw arg; | |
} | |
// Be forgiving, per 25.3.3.3.3 of the spec: | |
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume | |
return doneResult(); | |
} | |
while (true) { | |
var delegate = context.delegate; | |
if (delegate) { | |
if (method === "return" || method === "throw" && delegate.iterator[method] === undefined) { | |
// A return or throw (when the delegate iterator has no throw | |
// method) always terminates the yield* loop. | |
context.delegate = null; | |
// If the delegate iterator has a return method, give it a | |
// chance to clean up. | |
var returnMethod = delegate.iterator["return"]; | |
if (returnMethod) { | |
var record = tryCatch(returnMethod, delegate.iterator, arg); | |
if (record.type === "throw") { | |
// If the return method threw an exception, let that | |
// exception prevail over the original return or throw. | |
method = "throw"; | |
arg = record.arg; | |
continue; | |
} | |
} | |
if (method === "return") { | |
// Continue with the outer return, now that the delegate | |
// iterator has been terminated. | |
continue; | |
} | |
} | |
var record = tryCatch(delegate.iterator[method], delegate.iterator, arg); | |
if (record.type === "throw") { | |
context.delegate = null; | |
// Like returning generator.throw(uncaught), but without the | |
// overhead of an extra function call. | |
method = "throw"; | |
arg = record.arg; | |
continue; | |
} | |
// Delegate generator ran and handled its own exceptions so | |
// regardless of what the method was, we continue as if it is | |
// "next" with an undefined arg. | |
method = "next"; | |
arg = undefined; | |
var info = record.arg; | |
if (info.done) { | |
context[delegate.resultName] = info.value; | |
context.next = delegate.nextLoc; | |
} else { | |
state = GenStateSuspendedYield; | |
return info; | |
} | |
context.delegate = null; | |
} | |
if (method === "next") { | |
// Setting context._sent for legacy support of Babel's | |
// function.sent implementation. | |
context.sent = context._sent = arg; | |
} else if (method === "throw") { | |
if (state === GenStateSuspendedStart) { | |
state = GenStateCompleted; | |
throw arg; | |
} | |
if (context.dispatchException(arg)) { | |
// If the dispatched exception was caught by a catch block, | |
// then let that catch block handle the exception normally. | |
method = "next"; | |
arg = undefined; | |
} | |
} else if (method === "return") { | |
context.abrupt("return", arg); | |
} | |
state = GenStateExecuting; | |
var record = tryCatch(innerFn, self, context); | |
if (record.type === "normal") { | |
// If an exception is thrown from innerFn, we leave state === | |
// GenStateExecuting and loop back for another invocation. | |
state = context.done ? GenStateCompleted : GenStateSuspendedYield; | |
var info = { | |
value: record.arg, | |
done: context.done | |
}; | |
if (record.arg === ContinueSentinel) { | |
if (context.delegate && method === "next") { | |
// Deliberately forget the last sent value so that we don't | |
// accidentally pass it on to the delegate. | |
arg = undefined; | |
} | |
} else { | |
return info; | |
} | |
} else if (record.type === "throw") { | |
state = GenStateCompleted; | |
// Dispatch the exception by looping back around to the | |
// context.dispatchException(arg) call above. | |
method = "throw"; | |
arg = record.arg; | |
} | |
} | |
}; | |
} | |
// Define Generator.prototype.{next,throw,return} in terms of the | |
// unified ._invoke helper method. | |
defineIteratorMethods(Gp); | |
Gp[iteratorSymbol] = function () { | |
return this; | |
}; | |
Gp[toStringTagSymbol] = "Generator"; | |
Gp.toString = function () { | |
return "[object Generator]"; | |
}; | |
function pushTryEntry(locs) { | |
var entry = { tryLoc: locs[0] }; | |
if (1 in locs) { | |
entry.catchLoc = locs[1]; | |
} | |
if (2 in locs) { | |
entry.finallyLoc = locs[2]; | |
entry.afterLoc = locs[3]; | |
} | |
this.tryEntries.push(entry); | |
} | |
function resetTryEntry(entry) { | |
var record = entry.completion || {}; | |
record.type = "normal"; | |
delete record.arg; | |
entry.completion = record; | |
} | |
function Context(tryLocsList) { | |
// The root entry object (effectively a try statement without a catch | |
// or a finally block) gives us a place to store values thrown from | |
// locations where there is no enclosing try statement. | |
this.tryEntries = [{ tryLoc: "root" }]; | |
tryLocsList.forEach(pushTryEntry, this); | |
this.reset(true); | |
} | |
runtime.keys = function (object) { | |
var keys = []; | |
for (var key in object) { | |
keys.push(key); | |
} | |
keys.reverse(); | |
// Rather than returning an object with a next method, we keep | |
// things simple and return the next function itself. | |
return function next() { | |
while (keys.length) { | |
var key = keys.pop(); | |
if (key in object) { | |
next.value = key; | |
next.done = false; | |
return next; | |
} | |
} | |
// To avoid creating an additional object, we just hang the .value | |
// and .done properties off the next function object itself. This | |
// also ensures that the minifier will not anonymize the function. | |
next.done = true; | |
return next; | |
}; | |
}; | |
function values(iterable) { | |
if (iterable) { | |
var iteratorMethod = iterable[iteratorSymbol]; | |
if (iteratorMethod) { | |
return iteratorMethod.call(iterable); | |
} | |
if (typeof iterable.next === "function") { | |
return iterable; | |
} | |
if (!isNaN(iterable.length)) { | |
var i = -1, | |
next = function next() { | |
while (++i < iterable.length) { | |
if (hasOwn.call(iterable, i)) { | |
next.value = iterable[i]; | |
next.done = false; | |
return next; | |
} | |
} | |
next.value = undefined; | |
next.done = true; | |
return next; | |
}; | |
return next.next = next; | |
} | |
} | |
// Return an iterator with no values. | |
return { next: doneResult }; | |
} | |
runtime.values = values; | |
function doneResult() { | |
return { value: undefined, done: true }; | |
} | |
Context.prototype = { | |
constructor: Context, | |
reset: function reset(skipTempReset) { | |
this.prev = 0; | |
this.next = 0; | |
// Resetting context._sent for legacy support of Babel's | |
// function.sent implementation. | |
this.sent = this._sent = undefined; | |
this.done = false; | |
this.delegate = null; | |
this.tryEntries.forEach(resetTryEntry); | |
if (!skipTempReset) { | |
for (var name in this) { | |
// Not sure about the optimal order of these conditions: | |
if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { | |
this[name] = undefined; | |
} | |
} | |
} | |
}, | |
stop: function stop() { | |
this.done = true; | |
var rootEntry = this.tryEntries[0]; | |
var rootRecord = rootEntry.completion; | |
if (rootRecord.type === "throw") { | |
throw rootRecord.arg; | |
} | |
return this.rval; | |
}, | |
dispatchException: function dispatchException(exception) { | |
if (this.done) { | |
throw exception; | |
} | |
var context = this; | |
function handle(loc, caught) { | |
record.type = "throw"; | |
record.arg = exception; | |
context.next = loc; | |
return !!caught; | |
} | |
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | |
var entry = this.tryEntries[i]; | |
var record = entry.completion; | |
if (entry.tryLoc === "root") { | |
// Exception thrown outside of any try block that could handle | |
// it, so set the completion value of the entire function to | |
// throw the exception. | |
return handle("end"); | |
} | |
if (entry.tryLoc <= this.prev) { | |
var hasCatch = hasOwn.call(entry, "catchLoc"); | |
var hasFinally = hasOwn.call(entry, "finallyLoc"); | |
if (hasCatch && hasFinally) { | |
if (this.prev < entry.catchLoc) { | |
return handle(entry.catchLoc, true); | |
} else if (this.prev < entry.finallyLoc) { | |
return handle(entry.finallyLoc); | |
} | |
} else if (hasCatch) { | |
if (this.prev < entry.catchLoc) { | |
return handle(entry.catchLoc, true); | |
} | |
} else if (hasFinally) { | |
if (this.prev < entry.finallyLoc) { | |
return handle(entry.finallyLoc); | |
} | |
} else { | |
throw new Error("try statement without catch or finally"); | |
} | |
} | |
} | |
}, | |
abrupt: function abrupt(type, arg) { | |
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | |
var entry = this.tryEntries[i]; | |
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { | |
var finallyEntry = entry; | |
break; | |
} | |
} | |
if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { | |
// Ignore the finally entry if control is not jumping to a | |
// location outside the try/catch block. | |
finallyEntry = null; | |
} | |
var record = finallyEntry ? finallyEntry.completion : {}; | |
record.type = type; | |
record.arg = arg; | |
if (finallyEntry) { | |
this.next = finallyEntry.finallyLoc; | |
} else { | |
this.complete(record); | |
} | |
return ContinueSentinel; | |
}, | |
complete: function complete(record, afterLoc) { | |
if (record.type === "throw") { | |
throw record.arg; | |
} | |
if (record.type === "break" || record.type === "continue") { | |
this.next = record.arg; | |
} else if (record.type === "return") { | |
this.rval = record.arg; | |
this.next = "end"; | |
} else if (record.type === "normal" && afterLoc) { | |
this.next = afterLoc; | |
} | |
}, | |
finish: function finish(finallyLoc) { | |
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | |
var entry = this.tryEntries[i]; | |
if (entry.finallyLoc === finallyLoc) { | |
this.complete(entry.completion, entry.afterLoc); | |
resetTryEntry(entry); | |
return ContinueSentinel; | |
} | |
} | |
}, | |
"catch": function _catch(tryLoc) { | |
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | |
var entry = this.tryEntries[i]; | |
if (entry.tryLoc === tryLoc) { | |
var record = entry.completion; | |
if (record.type === "throw") { | |
var thrown = record.arg; | |
resetTryEntry(entry); | |
} | |
return thrown; | |
} | |
} | |
// The context.catch method must only be called with a location | |
// argument that corresponds to a known catch block. | |
throw new Error("illegal catch attempt"); | |
}, | |
delegateYield: function delegateYield(iterable, resultName, nextLoc) { | |
this.delegate = { | |
iterator: values(iterable), | |
resultName: resultName, | |
nextLoc: nextLoc | |
}; | |
return ContinueSentinel; | |
} | |
}; | |
}( | |
// Among the various tricks for obtaining a reference to the global | |
// object, this seems to be the most reliable technique that does not | |
// use indirect eval (which violates Content Security Policy). | |
(typeof global === "undefined" ? "undefined" : _typeof(global)) === "object" ? global : (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" ? window : (typeof self === "undefined" ? "undefined" : _typeof(self)) === "object" ? self : undefined); | |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(295)(module), __webpack_require__(296))) | |
/***/ }, | |
/* 295 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = function (module) { | |
if (!module.webpackPolyfill) { | |
module.deprecate = function () {}; | |
module.paths = []; | |
// module.parent = undefined by default | |
module.children = []; | |
module.webpackPolyfill = 1; | |
} | |
return module; | |
}; | |
/***/ }, | |
/* 296 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
// shim for using process in browser | |
var process = module.exports = {}; | |
// cached from whatever global is present so that test runners that stub it | |
// don't break things. But we need to wrap it in a try catch in case it is | |
// wrapped in strict mode code which doesn't define any globals. It's inside a | |
// function because try/catches deoptimize in certain engines. | |
var cachedSetTimeout; | |
var cachedClearTimeout; | |
(function () { | |
try { | |
cachedSetTimeout = setTimeout; | |
} catch (e) { | |
cachedSetTimeout = function cachedSetTimeout() { | |
throw new Error('setTimeout is not defined'); | |
}; | |
} | |
try { | |
cachedClearTimeout = clearTimeout; | |
} catch (e) { | |
cachedClearTimeout = function cachedClearTimeout() { | |
throw new Error('clearTimeout is not defined'); | |
}; | |
} | |
})(); | |
var queue = []; | |
var draining = false; | |
var currentQueue; | |
var queueIndex = -1; | |
function cleanUpNextTick() { | |
if (!draining || !currentQueue) { | |
return; | |
} | |
draining = false; | |
if (currentQueue.length) { | |
queue = currentQueue.concat(queue); | |
} else { | |
queueIndex = -1; | |
} | |
if (queue.length) { | |
drainQueue(); | |
} | |
} | |
function drainQueue() { | |
if (draining) { | |
return; | |
} | |
var timeout = cachedSetTimeout(cleanUpNextTick); | |
draining = true; | |
var len = queue.length; | |
while (len) { | |
currentQueue = queue; | |
queue = []; | |
while (++queueIndex < len) { | |
if (currentQueue) { | |
currentQueue[queueIndex].run(); | |
} | |
} | |
queueIndex = -1; | |
len = queue.length; | |
} | |
currentQueue = null; | |
draining = false; | |
cachedClearTimeout(timeout); | |
} | |
process.nextTick = function (fun) { | |
var args = new Array(arguments.length - 1); | |
if (arguments.length > 1) { | |
for (var i = 1; i < arguments.length; i++) { | |
args[i - 1] = arguments[i]; | |
} | |
} | |
queue.push(new Item(fun, args)); | |
if (queue.length === 1 && !draining) { | |
cachedSetTimeout(drainQueue, 0); | |
} | |
}; | |
// v8 likes predictible objects | |
function Item(fun, array) { | |
this.fun = fun; | |
this.array = array; | |
} | |
Item.prototype.run = function () { | |
this.fun.apply(null, this.array); | |
}; | |
process.title = 'browser'; | |
process.browser = true; | |
process.env = {}; | |
process.argv = []; | |
process.version = ''; // empty string to avoid regexp issues | |
process.versions = {}; | |
function noop() {} | |
process.on = noop; | |
process.addListener = noop; | |
process.once = noop; | |
process.off = noop; | |
process.removeListener = noop; | |
process.removeAllListeners = noop; | |
process.emit = noop; | |
process.binding = function (name) { | |
throw new Error('process.binding is not supported'); | |
}; | |
process.cwd = function () { | |
return '/'; | |
}; | |
process.chdir = function (dir) { | |
throw new Error('process.chdir is not supported'); | |
}; | |
process.umask = function () { | |
return 0; | |
}; | |
/***/ }, | |
/* 297 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
__webpack_require__(298); | |
module.exports = __webpack_require__(9).RegExp.escape; | |
/***/ }, | |
/* 298 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
// https://github.com/benjamingr/RexExp.escape | |
var $export = __webpack_require__(8), | |
$re = __webpack_require__(299)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); | |
$export($export.S, 'RegExp', { escape: function escape(it) { | |
return $re(it); | |
} }); | |
/***/ }, | |
/* 299 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = function (regExp, replace) { | |
var replacer = replace === Object(replace) ? function (part) { | |
return replace[part]; | |
} : replace; | |
return function (it) { | |
return String(it).replace(regExp, replacer); | |
}; | |
}; | |
/***/ }, | |
/* 300 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.injector = exports.loader = exports.ReactCSSReplaceTransition = exports.resolvers = exports.DefaultLoader = exports.styles = exports.processors = exports.types = exports.templates = exports.transitions = exports.warning = exports.validators = exports.tutils = exports.listenUtil = exports.eventable = exports.css = exports.ValueManager = exports.Template = exports.PropTypes = exports.Dom = exports.NewChildContext = exports.Form = exports.FieldSet = exports.Field = exports.Conditional = exports.loaderFactory = exports.RenderContent = exports.RenderTemplate = exports.injectorFactory = exports.stringInjector = undefined; | |
exports.newSubschemaContext = newSubschemaContext; | |
var _ReactCSSReplaceTransition2 = __webpack_require__(301); | |
var _ReactCSSReplaceTransition3 = _interopRequireDefault(_ReactCSSReplaceTransition2); | |
var _DefaultLoader2 = __webpack_require__(318); | |
var _DefaultLoader3 = _interopRequireDefault(_DefaultLoader2); | |
var _templates2 = __webpack_require__(403); | |
var _templates = _interopRequireWildcard(_templates2); | |
var _types2 = __webpack_require__(442); | |
var _types = _interopRequireWildcard(_types2); | |
var _processors2 = __webpack_require__(463); | |
var _processors = _interopRequireWildcard(_processors2); | |
var _styles2 = __webpack_require__(468); | |
var _styles = _interopRequireWildcard(_styles2); | |
var _resolvers2 = __webpack_require__(501); | |
var _resolvers = _interopRequireWildcard(_resolvers2); | |
var _transition = __webpack_require__(495); | |
var _subschemaInjection = __webpack_require__(543); | |
var _core = __webpack_require__(547); | |
var _core2 = _interopRequireDefault(_core); | |
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var stringInjector = exports.stringInjector = _core.stringInjector; | |
var injectorFactory = exports.injectorFactory = _subschemaInjection.injectorFactory; | |
var RenderTemplate = exports.RenderTemplate = _core.RenderTemplate; | |
var RenderContent = exports.RenderContent = _core.RenderContent; | |
var loaderFactory = exports.loaderFactory = _core.loaderFactory; | |
var Conditional = exports.Conditional = _core.Conditional; | |
var Field = exports.Field = _core.Field; | |
var FieldSet = exports.FieldSet = _core.FieldSet; | |
var Form = exports.Form = _core.Form; | |
var NewChildContext = exports.NewChildContext = _core.NewChildContext; | |
var Dom = exports.Dom = _core.Dom; | |
var PropTypes = exports.PropTypes = _core.PropTypes; | |
var Template = exports.Template = _core.Template; | |
var ValueManager = exports.ValueManager = _core.ValueManager; | |
var css = exports.css = _core.css; | |
var eventable = exports.eventable = _core.eventable; | |
var listenUtil = exports.listenUtil = _core.listenUtil; | |
var tutils = exports.tutils = _core.tutils; | |
var validators = exports.validators = _core.validators; | |
var warning = exports.warning = _core.warning; | |
var transitions = exports.transitions = _transition.transitions; | |
var templates = exports.templates = _templates; | |
var types = exports.types = _types; | |
var processors = exports.processors = _processors; | |
var styles = exports.styles = _styles; | |
var DefaultLoader = exports.DefaultLoader = _DefaultLoader3.default; | |
var resolvers = exports.resolvers = _resolvers; | |
var ReactCSSReplaceTransition = exports.ReactCSSReplaceTransition = _ReactCSSReplaceTransition3.default; | |
_core2.default.types = _types; | |
_core2.default.templates = _templates; | |
_core2.default.processors = _processors; | |
_core2.default.styles = _styles; | |
_core2.default.resolvers = _resolvers; | |
_core2.default.DefaultLoader = _DefaultLoader3.default; | |
var _initSubchemaContext = newSubschemaContext(); | |
var loader = exports.loader = _initSubchemaContext.loader; | |
var injector = exports.injector = _core2.default.injector = _initSubchemaContext.injector; | |
exports.default = _initSubchemaContext; | |
/** | |
* Allows for a new Subschema instance to be created. Mostly for testing, | |
* but for other stuff, may be useful. | |
* | |
* @param defaultLoaders | |
* @param defaultResolvers | |
* @param defaultPropTypes | |
*/ | |
function newSubschemaContext() { | |
var defaultLoaders = arguments.length <= 0 || arguments[0] === undefined ? [_DefaultLoader3.default] : arguments[0]; | |
var defaultResolvers = arguments.length <= 1 || arguments[1] === undefined ? _resolvers : arguments[1]; | |
var defaultPropTypes = arguments.length <= 2 || arguments[2] === undefined ? _core.PropTypes : arguments[2]; | |
var defaultInjectorFactory = arguments.length <= 3 || arguments[3] === undefined ? _subschemaInjection.injectorFactory : arguments[3]; | |
var defaultSubschema = arguments.length <= 4 || arguments[4] === undefined ? _core2.default : arguments[4]; | |
return (0, _core.newSubschemaContext)(defaultLoaders, defaultResolvers, defaultPropTypes, defaultInjectorFactory, defaultSubschema); | |
} | |
/***/ }, | |
/* 301 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _reactDom = __webpack_require__(303); | |
var _ReactCSSTransitionGroupChild = __webpack_require__(304); | |
var _ReactCSSTransitionGroupChild2 = _interopRequireDefault(_ReactCSSTransitionGroupChild); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** | |
* Adapted from ReactCSSTransitionGroup.js by Facebook | |
* Borrowed, with much thanks from - http://marnusw.github.io/react-css-transition-replace/ | |
* | |
* @providesModule ReactCSSTransitionReplace | |
*/ | |
var reactCSSTransitionGroupChild = _react2.default.createFactory(_ReactCSSTransitionGroupChild2.default); | |
var TICK = 17; | |
function createTransitionTimeoutPropValidator(transitionType) { | |
var timeoutPropName = 'transition' + transitionType + 'Timeout'; | |
var enabledPropName = 'transition' + transitionType; | |
return function (props) { | |
// If the transition is enabled | |
if (props[enabledPropName]) { | |
// If no timeout duration is provided | |
if (!props[timeoutPropName]) { | |
return new Error(timeoutPropName + ' wasn\'t supplied to ReactCSSTransitionReplace: ' + 'this can cause unreliable animations and won\'t be supported in ' + 'a future version of React. See ' + 'https://fb.me/react-animation-transition-group-timeout for more ' + 'information.'); | |
// If the duration isn't a number | |
} else if (typeof props[timeoutPropName] !== 'number') { | |
return new Error(timeoutPropName + ' must be a number (in milliseconds)'); | |
} | |
} | |
}; | |
} | |
var ReactCSSTransitionReplace = function (_React$Component) { | |
_inherits(ReactCSSTransitionReplace, _React$Component); | |
function ReactCSSTransitionReplace() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, ReactCSSTransitionReplace); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { | |
currentChild: _this.props.children ? _react.Children.only(_this.props.children) : null, | |
nextChild: null, | |
height: null | |
}, _this._handleDoneAppearing = function () { | |
_this.isTransitioning = false; | |
}, _this._handleDoneEntering = function () { | |
_this.isTransitioning = false; | |
_this.setState({ | |
currentChild: _this.state.nextChild, | |
nextChild: null, | |
height: null | |
}); | |
}, _this._handleDoneLeaving = function () { | |
if (_this.isTransitioning) { | |
var state = { currentChild: null }; | |
if (!_this.state.nextChild) { | |
_this.isTransitioning = false; | |
state.height = null; | |
} | |
_this.setState(state); | |
} | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
ReactCSSTransitionReplace.prototype.componentDidMount = function componentDidMount() { | |
if (this.props.transitionAppear && this.state.currentChild) { | |
this.appearCurrent(); | |
} | |
}; | |
ReactCSSTransitionReplace.prototype.componentWillUnmount = function componentWillUnmount() { | |
if (this.timeout) { | |
clearTimeout(this.timeout); | |
} | |
}; | |
ReactCSSTransitionReplace.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { | |
var _this2 = this; | |
// Setting false indicates that the child has changed, but it is a removal so there is no next child. | |
var nextChild = nextProps.children ? _react.Children.only(nextProps.children) : false; | |
var currentChild = this.state.currentChild; | |
if (currentChild && nextChild && nextChild.key === currentChild.key) { | |
// Nothing changed, but we are re-rendering so update the currentChild. | |
return this.setState({ | |
currentChild: nextChild | |
}); | |
} | |
// Set the next child to start the transition, and set the current height. | |
this.setState({ | |
nextChild: nextChild, | |
height: this.state.currentChild ? (0, _reactDom.findDOMNode)(this.refs.curr).offsetHeight : 0 | |
}); | |
// Enqueue setting the next height to trigger the height transition. | |
this.timeout = setTimeout(function () { | |
_this2.setState({ height: _this2.state.nextChild ? (0, _reactDom.findDOMNode)(_this2.refs.next).offsetHeight : 0 }); | |
_this2.timeout = null; | |
}, TICK); | |
}; | |
ReactCSSTransitionReplace.prototype.componentDidUpdate = function componentDidUpdate() { | |
if (!this.isTransitioning) { | |
if (this.state.nextChild) { | |
this.enterNext(); | |
} | |
if (this.state.currentChild && (this.state.nextChild || this.state.nextChild === false)) { | |
this.leaveCurrent(); | |
} | |
} | |
}; | |
ReactCSSTransitionReplace.prototype.appearCurrent = function appearCurrent() { | |
this.refs.curr.componentWillAppear(this._handleDoneAppearing); | |
this.isTransitioning = true; | |
}; | |
ReactCSSTransitionReplace.prototype.enterNext = function enterNext() { | |
this.refs.next.componentWillEnter(this._handleDoneEntering); | |
this.isTransitioning = true; | |
}; | |
ReactCSSTransitionReplace.prototype.leaveCurrent = function leaveCurrent() { | |
this.refs.curr.componentWillLeave(this._handleDoneLeaving); | |
this.isTransitioning = true; | |
}; | |
// When the leave transition time-out expires the animation classes are removed, so the | |
// element must be removed from the DOM if the enter transition is still in progress. | |
ReactCSSTransitionReplace.prototype._wrapChild = function _wrapChild(child, moreProps) { | |
// We need to provide this childFactory so that | |
// ReactCSSTransitionReplaceChild can receive updates to name, | |
// enter, and leave while it is leaving. | |
return reactCSSTransitionGroupChild(_extends({}, moreProps, { | |
name: this.props.transitionName, | |
appear: this.props.transitionAppear, | |
enter: this.props.transitionEnter, | |
leave: this.props.transitionLeave, | |
appearTimeout: this.props.transitionAppearTimeout, | |
enterTimeout: this.props.transitionEnterTimeout, | |
leaveTimeout: this.props.transitionLeaveTimeout | |
}), child); | |
}; | |
ReactCSSTransitionReplace.prototype.render = function render() { | |
var _state = this.state; | |
var currentChild = _state.currentChild; | |
var nextChild = _state.nextChild; | |
var height = _state.height; | |
var childrenToRender = []; | |
var _props = this.props; | |
var overflowHidden = _props.overflowHidden; | |
var containerProps = _objectWithoutProperties(_props, ['overflowHidden']); | |
if (currentChild) { | |
childrenToRender.push(this._wrapChild(currentChild, { | |
ref: 'curr', key: 'curr' | |
})); | |
} | |
if (height !== null) { | |
var transitionHeightClass = containerProps.transitionHeightClass; | |
var style = containerProps.style; | |
var className = containerProps.className; | |
containerProps.className = (className || '') + ' ' + transitionHeightClass; | |
containerProps.style = _extends({}, style, { | |
position: 'relative', | |
display: 'block', | |
height: height | |
}); | |
if (overflowHidden) { | |
containerProps.style.overflow = 'hidden'; | |
} | |
} | |
if (nextChild) { | |
childrenToRender.push((0, _react.createElement)('span', { | |
style: { | |
position: 'absolute', | |
top: 0, | |
left: 0, | |
right: 0, | |
bottom: 0 | |
}, | |
key: 'next' | |
}, this._wrapChild(nextChild, { ref: 'next' }))); | |
} | |
return (0, _react.createElement)(this.props.component, containerProps, childrenToRender); | |
}; | |
return ReactCSSTransitionReplace; | |
}(_react2.default.Component); | |
ReactCSSTransitionReplace.propTypes = { | |
transitionName: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.shape({ | |
enter: _react.PropTypes.string, | |
enterActive: _react.PropTypes.string, | |
leave: _react.PropTypes.string, | |
leaveActive: _react.PropTypes.string, | |
appear: _react.PropTypes.string, | |
appearActive: _react.PropTypes.string | |
})]), | |
transitionAppearTimeout: createTransitionTimeoutPropValidator('Appear'), | |
transitionEnterTimeout: createTransitionTimeoutPropValidator('Enter'), | |
transitionLeaveTimeout: createTransitionTimeoutPropValidator('Leave'), | |
transitionHeightClass: _react.PropTypes.string, | |
overflowHidden: _react.PropTypes.bool | |
}; | |
ReactCSSTransitionReplace.defaultProps = { | |
transitionAppear: false, | |
transitionEnter: true, | |
transitionLeave: true, | |
overflowHidden: true, | |
component: 'span', | |
style: {} | |
}; | |
exports.default = ReactCSSTransitionReplace; | |
/***/ }, | |
/* 302 */ | |
/***/ function(module, exports) { | |
module.exports = __WEBPACK_EXTERNAL_MODULE_302__; | |
/***/ }, | |
/* 303 */ | |
/***/ function(module, exports) { | |
module.exports = __WEBPACK_EXTERNAL_MODULE_303__; | |
/***/ }, | |
/* 304 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
module.exports = __webpack_require__(305); | |
/***/ }, | |
/* 305 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/** | |
* Copyright 2013-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
* @providesModule ReactCSSTransitionGroupChild | |
*/ | |
'use strict'; | |
var React = __webpack_require__(302); | |
var ReactDOM = __webpack_require__(303); | |
var CSSCore = __webpack_require__(306); | |
var ReactTransitionEvents = __webpack_require__(308); | |
var onlyChild = __webpack_require__(311); | |
var TICK = 17; | |
var ReactCSSTransitionGroupChild = React.createClass({ | |
displayName: 'ReactCSSTransitionGroupChild', | |
propTypes: { | |
name: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.shape({ | |
enter: React.PropTypes.string, | |
leave: React.PropTypes.string, | |
active: React.PropTypes.string | |
}), React.PropTypes.shape({ | |
enter: React.PropTypes.string, | |
enterActive: React.PropTypes.string, | |
leave: React.PropTypes.string, | |
leaveActive: React.PropTypes.string, | |
appear: React.PropTypes.string, | |
appearActive: React.PropTypes.string | |
})]).isRequired, | |
// Once we require timeouts to be specified, we can remove the | |
// boolean flags (appear etc.) and just accept a number | |
// or a bool for the timeout flags (appearTimeout etc.) | |
appear: React.PropTypes.bool, | |
enter: React.PropTypes.bool, | |
leave: React.PropTypes.bool, | |
appearTimeout: React.PropTypes.number, | |
enterTimeout: React.PropTypes.number, | |
leaveTimeout: React.PropTypes.number | |
}, | |
transition: function transition(animationType, finishCallback, userSpecifiedDelay) { | |
var node = ReactDOM.findDOMNode(this); | |
if (!node) { | |
if (finishCallback) { | |
finishCallback(); | |
} | |
return; | |
} | |
var className = this.props.name[animationType] || this.props.name + '-' + animationType; | |
var activeClassName = this.props.name[animationType + 'Active'] || className + '-active'; | |
var timeout = null; | |
var endListener = function endListener(e) { | |
if (e && e.target !== node) { | |
return; | |
} | |
clearTimeout(timeout); | |
CSSCore.removeClass(node, className); | |
CSSCore.removeClass(node, activeClassName); | |
ReactTransitionEvents.removeEndEventListener(node, endListener); | |
// Usually this optional callback is used for informing an owner of | |
// a leave animation and telling it to remove the child. | |
if (finishCallback) { | |
finishCallback(); | |
} | |
}; | |
CSSCore.addClass(node, className); | |
// Need to do this to actually trigger a transition. | |
this.queueClass(activeClassName); | |
// If the user specified a timeout delay. | |
if (userSpecifiedDelay) { | |
// Clean-up the animation after the specified delay | |
timeout = setTimeout(endListener, userSpecifiedDelay); | |
this.transitionTimeouts.push(timeout); | |
} else { | |
// DEPRECATED: this listener will be removed in a future version of react | |
ReactTransitionEvents.addEndEventListener(node, endListener); | |
} | |
}, | |
queueClass: function queueClass(className) { | |
this.classNameQueue.push(className); | |
if (!this.timeout) { | |
this.timeout = setTimeout(this.flushClassNameQueue, TICK); | |
} | |
}, | |
flushClassNameQueue: function flushClassNameQueue() { | |
if (this.isMounted()) { | |
this.classNameQueue.forEach(CSSCore.addClass.bind(CSSCore, ReactDOM.findDOMNode(this))); | |
} | |
this.classNameQueue.length = 0; | |
this.timeout = null; | |
}, | |
componentWillMount: function componentWillMount() { | |
this.classNameQueue = []; | |
this.transitionTimeouts = []; | |
}, | |
componentWillUnmount: function componentWillUnmount() { | |
if (this.timeout) { | |
clearTimeout(this.timeout); | |
} | |
this.transitionTimeouts.forEach(function (timeout) { | |
clearTimeout(timeout); | |
}); | |
}, | |
componentWillAppear: function componentWillAppear(done) { | |
if (this.props.appear) { | |
this.transition('appear', done, this.props.appearTimeout); | |
} else { | |
done(); | |
} | |
}, | |
componentWillEnter: function componentWillEnter(done) { | |
if (this.props.enter) { | |
this.transition('enter', done, this.props.enterTimeout); | |
} else { | |
done(); | |
} | |
}, | |
componentWillLeave: function componentWillLeave(done) { | |
if (this.props.leave) { | |
this.transition('leave', done, this.props.leaveTimeout); | |
} else { | |
done(); | |
} | |
}, | |
render: function render() { | |
return onlyChild(this.props.children); | |
} | |
}); | |
module.exports = ReactCSSTransitionGroupChild; | |
/***/ }, | |
/* 306 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
/** | |
* Copyright (c) 2013-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
* @typechecks | |
*/ | |
var invariant = __webpack_require__(307); | |
/** | |
* The CSSCore module specifies the API (and implements most of the methods) | |
* that should be used when dealing with the display of elements (via their | |
* CSS classes and visibility on screen. It is an API focused on mutating the | |
* display and not reading it as no logical state should be encoded in the | |
* display of elements. | |
*/ | |
/* Slow implementation for browsers that don't natively support .matches() */ | |
function matchesSelector_SLOW(element, selector) { | |
var root = element; | |
while (root.parentNode) { | |
root = root.parentNode; | |
} | |
var all = root.querySelectorAll(selector); | |
return Array.prototype.indexOf.call(all, element) !== -1; | |
} | |
var CSSCore = { | |
/** | |
* Adds the class passed in to the element if it doesn't already have it. | |
* | |
* @param {DOMElement} element the element to set the class on | |
* @param {string} className the CSS className | |
* @return {DOMElement} the element passed in | |
*/ | |
addClass: function addClass(element, className) { | |
!!/\s/.test(className) ? false ? invariant(false, 'CSSCore.addClass takes only a single class name. "%s" contains ' + 'multiple classes.', className) : invariant(false) : void 0; | |
if (className) { | |
if (element.classList) { | |
element.classList.add(className); | |
} else if (!CSSCore.hasClass(element, className)) { | |
element.className = element.className + ' ' + className; | |
} | |
} | |
return element; | |
}, | |
/** | |
* Removes the class passed in from the element | |
* | |
* @param {DOMElement} element the element to set the class on | |
* @param {string} className the CSS className | |
* @return {DOMElement} the element passed in | |
*/ | |
removeClass: function removeClass(element, className) { | |
!!/\s/.test(className) ? false ? invariant(false, 'CSSCore.removeClass takes only a single class name. "%s" contains ' + 'multiple classes.', className) : invariant(false) : void 0; | |
if (className) { | |
if (element.classList) { | |
element.classList.remove(className); | |
} else if (CSSCore.hasClass(element, className)) { | |
element.className = element.className.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ') // multiple spaces to one | |
.replace(/^\s*|\s*$/g, ''); // trim the ends | |
} | |
} | |
return element; | |
}, | |
/** | |
* Helper to add or remove a class from an element based on a condition. | |
* | |
* @param {DOMElement} element the element to set the class on | |
* @param {string} className the CSS className | |
* @param {*} bool condition to whether to add or remove the class | |
* @return {DOMElement} the element passed in | |
*/ | |
conditionClass: function conditionClass(element, className, bool) { | |
return (bool ? CSSCore.addClass : CSSCore.removeClass)(element, className); | |
}, | |
/** | |
* Tests whether the element has the class specified. | |
* | |
* @param {DOMNode|DOMWindow} element the element to check the class on | |
* @param {string} className the CSS className | |
* @return {boolean} true if the element has the class, false if not | |
*/ | |
hasClass: function hasClass(element, className) { | |
!!/\s/.test(className) ? false ? invariant(false, 'CSS.hasClass takes only a single class name.') : invariant(false) : void 0; | |
if (element.classList) { | |
return !!className && element.classList.contains(className); | |
} | |
return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1; | |
}, | |
/** | |
* Tests whether the element matches the selector specified | |
* | |
* @param {DOMNode|DOMWindow} element the element that we are querying | |
* @param {string} selector the CSS selector | |
* @return {boolean} true if the element matches the selector, false if not | |
*/ | |
matchesSelector: function matchesSelector(element, selector) { | |
var matchesImpl = element.matches || element.webkitMatchesSelector || element.mozMatchesSelector || element.msMatchesSelector || function (s) { | |
return matchesSelector_SLOW(element, s); | |
}; | |
return matchesImpl.call(element, selector); | |
} | |
}; | |
module.exports = CSSCore; | |
/***/ }, | |
/* 307 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/** | |
* Copyright (c) 2013-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
*/ | |
'use strict'; | |
/** | |
* Use invariant() to assert state which your program assumes to be true. | |
* | |
* Provide sprintf-style format (only %s is supported) and arguments | |
* to provide information about what broke and what you were | |
* expecting. | |
* | |
* The invariant message will be stripped in production, but the invariant | |
* will remain to ensure logic does not differ in production. | |
*/ | |
function invariant(condition, format, a, b, c, d, e, f) { | |
if (false) { | |
if (format === undefined) { | |
throw new Error('invariant requires an error message argument'); | |
} | |
} | |
if (!condition) { | |
var error; | |
if (format === undefined) { | |
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); | |
} else { | |
var args = [a, b, c, d, e, f]; | |
var argIndex = 0; | |
error = new Error(format.replace(/%s/g, function () { | |
return args[argIndex++]; | |
})); | |
error.name = 'Invariant Violation'; | |
} | |
error.framesToPop = 1; // we don't care about invariant's own frame | |
throw error; | |
} | |
} | |
module.exports = invariant; | |
/***/ }, | |
/* 308 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/** | |
* Copyright 2013-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
* @providesModule ReactTransitionEvents | |
*/ | |
'use strict'; | |
var ExecutionEnvironment = __webpack_require__(309); | |
var getVendorPrefixedEventName = __webpack_require__(310); | |
var endEvents = []; | |
function detectEvents() { | |
var animEnd = getVendorPrefixedEventName('animationend'); | |
var transEnd = getVendorPrefixedEventName('transitionend'); | |
if (animEnd) { | |
endEvents.push(animEnd); | |
} | |
if (transEnd) { | |
endEvents.push(transEnd); | |
} | |
} | |
if (ExecutionEnvironment.canUseDOM) { | |
detectEvents(); | |
} | |
// We use the raw {add|remove}EventListener() call because EventListener | |
// does not know how to remove event listeners and we really should | |
// clean up. Also, these events are not triggered in older browsers | |
// so we should be A-OK here. | |
function addEventListener(node, eventName, eventListener) { | |
node.addEventListener(eventName, eventListener, false); | |
} | |
function removeEventListener(node, eventName, eventListener) { | |
node.removeEventListener(eventName, eventListener, false); | |
} | |
var ReactTransitionEvents = { | |
addEndEventListener: function addEndEventListener(node, eventListener) { | |
if (endEvents.length === 0) { | |
// If CSS transitions are not supported, trigger an "end animation" | |
// event immediately. | |
window.setTimeout(eventListener, 0); | |
return; | |
} | |
endEvents.forEach(function (endEvent) { | |
addEventListener(node, endEvent, eventListener); | |
}); | |
}, | |
removeEndEventListener: function removeEndEventListener(node, eventListener) { | |
if (endEvents.length === 0) { | |
return; | |
} | |
endEvents.forEach(function (endEvent) { | |
removeEventListener(node, endEvent, eventListener); | |
}); | |
} | |
}; | |
module.exports = ReactTransitionEvents; | |
/***/ }, | |
/* 309 */ | |
/***/ function(module, exports) { | |
/** | |
* Copyright (c) 2013-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
*/ | |
'use strict'; | |
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); | |
/** | |
* Simple, lightweight module assisting with the detection and context of | |
* Worker. Helps avoid circular dependencies and allows code to reason about | |
* whether or not they are in a Worker, even if they never include the main | |
* `ReactWorker` dependency. | |
*/ | |
var ExecutionEnvironment = { | |
canUseDOM: canUseDOM, | |
canUseWorkers: typeof Worker !== 'undefined', | |
canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), | |
canUseViewport: canUseDOM && !!window.screen, | |
isInWorker: !canUseDOM // For now, this is true - might change in the future. | |
}; | |
module.exports = ExecutionEnvironment; | |
/***/ }, | |
/* 310 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/** | |
* Copyright 2013-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
* @providesModule getVendorPrefixedEventName | |
*/ | |
'use strict'; | |
var ExecutionEnvironment = __webpack_require__(309); | |
/** | |
* Generate a mapping of standard vendor prefixes using the defined style property and event name. | |
* | |
* @param {string} styleProp | |
* @param {string} eventName | |
* @returns {object} | |
*/ | |
function makePrefixMap(styleProp, eventName) { | |
var prefixes = {}; | |
prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); | |
prefixes['Webkit' + styleProp] = 'webkit' + eventName; | |
prefixes['Moz' + styleProp] = 'moz' + eventName; | |
prefixes['ms' + styleProp] = 'MS' + eventName; | |
prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); | |
return prefixes; | |
} | |
/** | |
* A list of event names to a configurable list of vendor prefixes. | |
*/ | |
var vendorPrefixes = { | |
animationend: makePrefixMap('Animation', 'AnimationEnd'), | |
animationiteration: makePrefixMap('Animation', 'AnimationIteration'), | |
animationstart: makePrefixMap('Animation', 'AnimationStart'), | |
transitionend: makePrefixMap('Transition', 'TransitionEnd') | |
}; | |
/** | |
* Event names that have already been detected and prefixed (if applicable). | |
*/ | |
var prefixedEventNames = {}; | |
/** | |
* Element to check for prefixes on. | |
*/ | |
var style = {}; | |
/** | |
* Bootstrap if a DOM exists. | |
*/ | |
if (ExecutionEnvironment.canUseDOM) { | |
style = document.createElement('div').style; | |
// On some platforms, in particular some releases of Android 4.x, | |
// the un-prefixed "animation" and "transition" properties are defined on the | |
// style object but the events that fire will still be prefixed, so we need | |
// to check if the un-prefixed events are usable, and if not remove them from the map. | |
if (!('AnimationEvent' in window)) { | |
delete vendorPrefixes.animationend.animation; | |
delete vendorPrefixes.animationiteration.animation; | |
delete vendorPrefixes.animationstart.animation; | |
} | |
// Same as above | |
if (!('TransitionEvent' in window)) { | |
delete vendorPrefixes.transitionend.transition; | |
} | |
} | |
/** | |
* Attempts to determine the correct vendor prefixed event name. | |
* | |
* @param {string} eventName | |
* @returns {string} | |
*/ | |
function getVendorPrefixedEventName(eventName) { | |
if (prefixedEventNames[eventName]) { | |
return prefixedEventNames[eventName]; | |
} else if (!vendorPrefixes[eventName]) { | |
return eventName; | |
} | |
var prefixMap = vendorPrefixes[eventName]; | |
for (var styleProp in prefixMap) { | |
if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { | |
return prefixedEventNames[eventName] = prefixMap[styleProp]; | |
} | |
} | |
return ''; | |
} | |
module.exports = getVendorPrefixedEventName; | |
/***/ }, | |
/* 311 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/** | |
* Copyright 2013-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
* @providesModule onlyChild | |
*/ | |
'use strict'; | |
var ReactElement = __webpack_require__(312); | |
var invariant = __webpack_require__(307); | |
/** | |
* Returns the first child in a collection of children and verifies that there | |
* is only one child in the collection. | |
* | |
* See https://facebook.github.io/react/docs/top-level-api.html#react.children.only | |
* | |
* The current implementation of this function assumes that a single child gets | |
* passed without a wrapper, but the purpose of this helper function is to | |
* abstract away the particular structure of children. | |
* | |
* @param {?object} children Child collection structure. | |
* @return {ReactElement} The first and only `ReactElement` contained in the | |
* structure. | |
*/ | |
function onlyChild(children) { | |
!ReactElement.isValidElement(children) ? false ? invariant(false, 'onlyChild must be passed a children with exactly one child.') : invariant(false) : void 0; | |
return children; | |
} | |
module.exports = onlyChild; | |
/***/ }, | |
/* 312 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/** | |
* Copyright 2014-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
* @providesModule ReactElement | |
*/ | |
'use strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
var _assign = __webpack_require__(313); | |
var ReactCurrentOwner = __webpack_require__(314); | |
var warning = __webpack_require__(315); | |
var canDefineProperty = __webpack_require__(317); | |
// The Symbol used to tag the ReactElement type. If there is no native Symbol | |
// nor polyfill, then a plain number is used for performance. | |
var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; | |
var RESERVED_PROPS = { | |
key: true, | |
ref: true, | |
__self: true, | |
__source: true | |
}; | |
var specialPropKeyWarningShown, specialPropRefWarningShown; | |
/** | |
* Factory method to create a new React element. This no longer adheres to | |
* the class pattern, so do not use new to call it. Also, no instanceof check | |
* will work. Instead test $$typeof field against Symbol.for('react.element') to check | |
* if something is a React Element. | |
* | |
* @param {*} type | |
* @param {*} key | |
* @param {string|object} ref | |
* @param {*} self A *temporary* helper to detect places where `this` is | |
* different from the `owner` when React.createElement is called, so that we | |
* can warn. We want to get rid of owner and replace string `ref`s with arrow | |
* functions, and as long as `this` and owner are the same, there will be no | |
* change in behavior. | |
* @param {*} source An annotation object (added by a transpiler or otherwise) | |
* indicating filename, line number, and/or other information. | |
* @param {*} owner | |
* @param {*} props | |
* @internal | |
*/ | |
var ReactElement = function ReactElement(type, key, ref, self, source, owner, props) { | |
var element = { | |
// This tag allow us to uniquely identify this as a React Element | |
$$typeof: REACT_ELEMENT_TYPE, | |
// Built-in properties that belong on the element | |
type: type, | |
key: key, | |
ref: ref, | |
props: props, | |
// Record the component responsible for creating this element. | |
_owner: owner | |
}; | |
if (false) { | |
// The validation flag is currently mutative. We put it on | |
// an external backing store so that we can freeze the whole object. | |
// This can be replaced with a WeakMap once they are implemented in | |
// commonly used development environments. | |
element._store = {}; | |
// To make comparing ReactElements easier for testing purposes, we make | |
// the validation flag non-enumerable (where possible, which should | |
// include every environment we run tests in), so the test framework | |
// ignores it. | |
if (canDefineProperty) { | |
Object.defineProperty(element._store, 'validated', { | |
configurable: false, | |
enumerable: false, | |
writable: true, | |
value: false | |
}); | |
// self and source are DEV only properties. | |
Object.defineProperty(element, '_self', { | |
configurable: false, | |
enumerable: false, | |
writable: false, | |
value: self | |
}); | |
// Two elements created in two different places should be considered | |
// equal for testing purposes and therefore we hide it from enumeration. | |
Object.defineProperty(element, '_source', { | |
configurable: false, | |
enumerable: false, | |
writable: false, | |
value: source | |
}); | |
} else { | |
element._store.validated = false; | |
element._self = self; | |
element._source = source; | |
} | |
if (Object.freeze) { | |
Object.freeze(element.props); | |
Object.freeze(element); | |
} | |
} | |
return element; | |
}; | |
/** | |
* Create and return a new ReactElement of the given type. | |
* See https://facebook.github.io/react/docs/top-level-api.html#react.createelement | |
*/ | |
ReactElement.createElement = function (type, config, children) { | |
var propName; | |
// Reserved names are extracted | |
var props = {}; | |
var key = null; | |
var ref = null; | |
var self = null; | |
var source = null; | |
if (config != null) { | |
if (false) { | |
process.env.NODE_ENV !== 'production' ? warning( | |
/* eslint-disable no-proto */ | |
config.__proto__ == null || config.__proto__ === Object.prototype, | |
/* eslint-enable no-proto */ | |
'React.createElement(...): Expected props argument to be a plain object. ' + 'Properties defined in its prototype chain will be ignored.') : void 0; | |
ref = !config.hasOwnProperty('ref') || Object.getOwnPropertyDescriptor(config, 'ref').get ? null : config.ref; | |
key = !config.hasOwnProperty('key') || Object.getOwnPropertyDescriptor(config, 'key').get ? null : '' + config.key; | |
} else { | |
ref = config.ref === undefined ? null : config.ref; | |
key = config.key === undefined ? null : '' + config.key; | |
} | |
self = config.__self === undefined ? null : config.__self; | |
source = config.__source === undefined ? null : config.__source; | |
// Remaining properties are added to a new props object | |
for (propName in config) { | |
if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { | |
props[propName] = config[propName]; | |
} | |
} | |
} | |
// Children can be more than one argument, and those are transferred onto | |
// the newly allocated props object. | |
var childrenLength = arguments.length - 2; | |
if (childrenLength === 1) { | |
props.children = children; | |
} else if (childrenLength > 1) { | |
var childArray = Array(childrenLength); | |
for (var i = 0; i < childrenLength; i++) { | |
childArray[i] = arguments[i + 2]; | |
} | |
props.children = childArray; | |
} | |
// Resolve default props | |
if (type && type.defaultProps) { | |
var defaultProps = type.defaultProps; | |
for (propName in defaultProps) { | |
if (props[propName] === undefined) { | |
props[propName] = defaultProps[propName]; | |
} | |
} | |
} | |
if (false) { | |
// Create dummy `key` and `ref` property to `props` to warn users | |
// against its use | |
if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { | |
if (!props.hasOwnProperty('key')) { | |
Object.defineProperty(props, 'key', { | |
get: function get() { | |
if (!specialPropKeyWarningShown) { | |
specialPropKeyWarningShown = true; | |
process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', typeof type === 'function' && 'displayName' in type ? type.displayName : 'Element') : void 0; | |
} | |
return undefined; | |
}, | |
configurable: true | |
}); | |
} | |
if (!props.hasOwnProperty('ref')) { | |
Object.defineProperty(props, 'ref', { | |
get: function get() { | |
if (!specialPropRefWarningShown) { | |
specialPropRefWarningShown = true; | |
process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', typeof type === 'function' && 'displayName' in type ? type.displayName : 'Element') : void 0; | |
} | |
return undefined; | |
}, | |
configurable: true | |
}); | |
} | |
} | |
} | |
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); | |
}; | |
/** | |
* Return a function that produces ReactElements of a given type. | |
* See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory | |
*/ | |
ReactElement.createFactory = function (type) { | |
var factory = ReactElement.createElement.bind(null, type); | |
// Expose the type on the factory and the prototype so that it can be | |
// easily accessed on elements. E.g. `<Foo />.type === Foo`. | |
// This should not be named `constructor` since this may not be the function | |
// that created the element, and it may not even be a constructor. | |
// Legacy hook TODO: Warn if this is accessed | |
factory.type = type; | |
return factory; | |
}; | |
ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { | |
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); | |
return newElement; | |
}; | |
/** | |
* Clone and return a new ReactElement using element as the starting point. | |
* See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement | |
*/ | |
ReactElement.cloneElement = function (element, config, children) { | |
var propName; | |
// Original props are copied | |
var props = _assign({}, element.props); | |
// Reserved names are extracted | |
var key = element.key; | |
var ref = element.ref; | |
// Self is preserved since the owner is preserved. | |
var self = element._self; | |
// Source is preserved since cloneElement is unlikely to be targeted by a | |
// transpiler, and the original source is probably a better indicator of the | |
// true owner. | |
var source = element._source; | |
// Owner will be preserved, unless ref is overridden | |
var owner = element._owner; | |
if (config != null) { | |
if (false) { | |
process.env.NODE_ENV !== 'production' ? warning( | |
/* eslint-disable no-proto */ | |
config.__proto__ == null || config.__proto__ === Object.prototype, | |
/* eslint-enable no-proto */ | |
'React.cloneElement(...): Expected props argument to be a plain object. ' + 'Properties defined in its prototype chain will be ignored.') : void 0; | |
} | |
if (config.ref !== undefined) { | |
// Silently steal the ref from the parent. | |
ref = config.ref; | |
owner = ReactCurrentOwner.current; | |
} | |
if (config.key !== undefined) { | |
key = '' + config.key; | |
} | |
// Remaining properties override existing props | |
var defaultProps; | |
if (element.type && element.type.defaultProps) { | |
defaultProps = element.type.defaultProps; | |
} | |
for (propName in config) { | |
if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { | |
if (config[propName] === undefined && defaultProps !== undefined) { | |
// Resolve default props | |
props[propName] = defaultProps[propName]; | |
} else { | |
props[propName] = config[propName]; | |
} | |
} | |
} | |
} | |
// Children can be more than one argument, and those are transferred onto | |
// the newly allocated props object. | |
var childrenLength = arguments.length - 2; | |
if (childrenLength === 1) { | |
props.children = children; | |
} else if (childrenLength > 1) { | |
var childArray = Array(childrenLength); | |
for (var i = 0; i < childrenLength; i++) { | |
childArray[i] = arguments[i + 2]; | |
} | |
props.children = childArray; | |
} | |
return ReactElement(element.type, key, ref, self, source, owner, props); | |
}; | |
/** | |
* Verifies the object is a ReactElement. | |
* See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement | |
* @param {?object} object | |
* @return {boolean} True if `object` is a valid component. | |
* @final | |
*/ | |
ReactElement.isValidElement = function (object) { | |
return (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | |
}; | |
module.exports = ReactElement; | |
/***/ }, | |
/* 313 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
/* eslint-disable no-unused-vars */ | |
var hasOwnProperty = Object.prototype.hasOwnProperty; | |
var propIsEnumerable = Object.prototype.propertyIsEnumerable; | |
function toObject(val) { | |
if (val === null || val === undefined) { | |
throw new TypeError('Object.assign cannot be called with null or undefined'); | |
} | |
return Object(val); | |
} | |
function shouldUseNative() { | |
try { | |
if (!Object.assign) { | |
return false; | |
} | |
// Detect buggy property enumeration order in older V8 versions. | |
// https://bugs.chromium.org/p/v8/issues/detail?id=4118 | |
var test1 = new String('abc'); // eslint-disable-line | |
test1[5] = 'de'; | |
if (Object.getOwnPropertyNames(test1)[0] === '5') { | |
return false; | |
} | |
// https://bugs.chromium.org/p/v8/issues/detail?id=3056 | |
var test2 = {}; | |
for (var i = 0; i < 10; i++) { | |
test2['_' + String.fromCharCode(i)] = i; | |
} | |
var order2 = Object.getOwnPropertyNames(test2).map(function (n) { | |
return test2[n]; | |
}); | |
if (order2.join('') !== '0123456789') { | |
return false; | |
} | |
// https://bugs.chromium.org/p/v8/issues/detail?id=3056 | |
var test3 = {}; | |
'abcdefghijklmnopqrst'.split('').forEach(function (letter) { | |
test3[letter] = letter; | |
}); | |
if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { | |
return false; | |
} | |
return true; | |
} catch (e) { | |
// We don't expect any of the above to throw, but better to be safe. | |
return false; | |
} | |
} | |
module.exports = shouldUseNative() ? Object.assign : function (target, source) { | |
var from; | |
var to = toObject(target); | |
var symbols; | |
for (var s = 1; s < arguments.length; s++) { | |
from = Object(arguments[s]); | |
for (var key in from) { | |
if (hasOwnProperty.call(from, key)) { | |
to[key] = from[key]; | |
} | |
} | |
if (Object.getOwnPropertySymbols) { | |
symbols = Object.getOwnPropertySymbols(from); | |
for (var i = 0; i < symbols.length; i++) { | |
if (propIsEnumerable.call(from, symbols[i])) { | |
to[symbols[i]] = from[symbols[i]]; | |
} | |
} | |
} | |
} | |
return to; | |
}; | |
/***/ }, | |
/* 314 */ | |
/***/ function(module, exports) { | |
/** | |
* Copyright 2013-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
* @providesModule ReactCurrentOwner | |
*/ | |
'use strict'; | |
/** | |
* Keeps track of the current owner. | |
* | |
* The current owner is the component who should own any components that are | |
* currently being constructed. | |
*/ | |
var ReactCurrentOwner = { | |
/** | |
* @internal | |
* @type {ReactComponent} | |
*/ | |
current: null | |
}; | |
module.exports = ReactCurrentOwner; | |
/***/ }, | |
/* 315 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/** | |
* Copyright 2014-2015, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
*/ | |
'use strict'; | |
var emptyFunction = __webpack_require__(316); | |
/** | |
* Similar to invariant but only logs a warning if the condition is not met. | |
* This can be used to log issues in development environments in critical | |
* paths. Removing the logging code for production environments will keep the | |
* same logic and follow the same code paths. | |
*/ | |
var warning = emptyFunction; | |
if (false) { | |
warning = function warning(condition, format) { | |
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { | |
args[_key - 2] = arguments[_key]; | |
} | |
if (format === undefined) { | |
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); | |
} | |
if (format.indexOf('Failed Composite propType: ') === 0) { | |
return; // Ignore CompositeComponent proptype check. | |
} | |
if (!condition) { | |
var argIndex = 0; | |
var message = 'Warning: ' + format.replace(/%s/g, function () { | |
return args[argIndex++]; | |
}); | |
if (typeof console !== 'undefined') { | |
console.error(message); | |
} | |
try { | |
// --- Welcome to debugging React --- | |
// This error was thrown as a convenience so that you can use this stack | |
// to find the callsite that caused this warning to fire. | |
throw new Error(message); | |
} catch (x) {} | |
} | |
}; | |
} | |
module.exports = warning; | |
/***/ }, | |
/* 316 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* Copyright (c) 2013-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
* | |
*/ | |
function makeEmptyFunction(arg) { | |
return function () { | |
return arg; | |
}; | |
} | |
/** | |
* This function accepts and discards inputs; it has no side effects. This is | |
* primarily useful idiomatically for overridable function endpoints which | |
* always need to be callable, since JS lacks a null-call idiom ala Cocoa. | |
*/ | |
var emptyFunction = function emptyFunction() {}; | |
emptyFunction.thatReturns = makeEmptyFunction; | |
emptyFunction.thatReturnsFalse = makeEmptyFunction(false); | |
emptyFunction.thatReturnsTrue = makeEmptyFunction(true); | |
emptyFunction.thatReturnsNull = makeEmptyFunction(null); | |
emptyFunction.thatReturnsThis = function () { | |
return this; | |
}; | |
emptyFunction.thatReturnsArgument = function (arg) { | |
return arg; | |
}; | |
module.exports = emptyFunction; | |
/***/ }, | |
/* 317 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/** | |
* Copyright 2013-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
* @providesModule canDefineProperty | |
*/ | |
'use strict'; | |
var canDefineProperty = false; | |
if (false) { | |
try { | |
Object.defineProperty({}, 'x', { get: function get() {} }); | |
canDefineProperty = true; | |
} catch (x) { | |
// IE will fail on defineProperty | |
} | |
} | |
module.exports = canDefineProperty; | |
/***/ }, | |
/* 318 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _loaderFactory = __webpack_require__(319); | |
var _loaderFactory2 = _interopRequireDefault(_loaderFactory); | |
var _templates = __webpack_require__(403); | |
var _templates2 = _interopRequireDefault(_templates); | |
var _types = __webpack_require__(442); | |
var _types2 = _interopRequireDefault(_types); | |
var _processors = __webpack_require__(463); | |
var _processors2 = _interopRequireDefault(_processors); | |
var _validators = __webpack_require__(467); | |
var _validators2 = _interopRequireDefault(_validators); | |
var _styles = __webpack_require__(468); | |
var _styles2 = _interopRequireDefault(_styles); | |
var _transition = __webpack_require__(495); | |
var _transition2 = _interopRequireDefault(_transition); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var loader = (0, _loaderFactory2.default)(); | |
loader.addTemplate(_templates2.default); | |
loader.addProcessor(_processors2.default); | |
loader.addType(Object.keys(_types2.default).reduce(function (ret, key) { | |
if (/^(index|.*Mixin)$/.test(key)) { | |
return ret; | |
} | |
ret[key] = _types2.default[key]; | |
return ret; | |
}, {})); | |
loader.addStyle(_styles2.default); | |
loader.addValidator(_validators2.default); | |
loader.addTransition(_transition2.default.transitions); | |
exports.default = loader; | |
/***/ }, | |
/* 319 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.__esModule = true; | |
exports.default = loaderFactory; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
var _warning = __webpack_require__(402); | |
var _warning2 = _interopRequireDefault(_warning); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var concat = Function.apply.bind(Array.prototype.concat, []); | |
function loaderFactory() { | |
var loaders = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; | |
var types = { load: load, list: list, add: add }, | |
api = { | |
addLoader: function addLoader(loader) { | |
if ((0, _tutils.isArray)(loader)) { | |
return loader.map(function (v) { | |
return this.addLoader(v); | |
}, this); | |
} | |
Object.keys(loader).forEach(function (key) { | |
if (!(key in this)) { | |
var parts = /^(load|list)(.*)/.exec(key); | |
if (parts && parts.length > 2 && parts[1] in types) { | |
this[key] = types[parts[1]](parts[2]); | |
} else {} | |
} | |
}, this); | |
loaders.unshift(loader); | |
return loader; | |
}, | |
removeLoader: function removeLoader(loader) { | |
var idx = loaders.indexOf(loader); | |
if (0 > idx) { | |
return; | |
} | |
var ret = loaders.splice(idx, 1)[0]; | |
if (ret && ret && ret.removeLoader) { | |
ret.removeLoader(); | |
} | |
return ret; | |
}, | |
clearLoaders: function clearLoaders() { | |
var ret = loaders.concat(); | |
loaders.length = 0; | |
return ret; | |
}, | |
loaderType: loaderType | |
}; | |
function list(method) { | |
var type = 'list' + method + 's'; | |
return function loader$list() { | |
return concat(loaders.filter(function (v) { | |
return typeof v[type] === 'function'; | |
}).map(function (v) { | |
return v[type](); | |
})); | |
}; | |
} | |
function load(method) { | |
method = 'load' + method; | |
return function load$load(load) { | |
var i = 0, | |
l = loaders.length, | |
ret = null, | |
scope; | |
for (; i < l; i++) { | |
var ret = loaders[i][method] && loaders[i][method].apply(this, arguments); | |
if (ret != null) { | |
return ret; | |
} | |
} | |
}; | |
} | |
function add(type) { | |
var listKey = 'list' + type + 's', | |
loadKey = 'load' + type, | |
lcType = type.toLowerCase(); | |
return function loader$add(key, value) { | |
var map, | |
_api = {}; | |
if ((0, _tutils.isString)(key)) { | |
map = {}; | |
map[key] = value; | |
} else { | |
map = key; | |
} | |
_api[listKey] = function () { | |
return Object.keys(map).map(function (name) { | |
var ret = { name: name }; | |
ret[lcType] = map[name]; | |
return ret; | |
}); | |
}; | |
_api[loadKey] = function (name) { | |
return map[name]; | |
}; | |
api.addLoader(_api); | |
return _api; | |
}; | |
} | |
function loaderType(name) { | |
var addF = arguments.length <= 1 || arguments[1] === undefined ? add : arguments[1]; | |
var loadF = arguments.length <= 2 || arguments[2] === undefined ? load : arguments[2]; | |
var listF = arguments.length <= 3 || arguments[3] === undefined ? list : arguments[3]; | |
if (addF) { | |
this['add' + name] = addF(name); | |
} | |
if (loadF) { | |
this['load' + name] = loadF(name); | |
} | |
if (listF) { | |
this['list' + name + 's'] = listF(name); | |
} | |
return this; | |
} | |
['Operator', 'Template', 'Processor', 'Type', 'Schema', 'Validator', 'Style', 'Transition'].forEach(function (v) { | |
return loaderType.call(api, v); | |
}); | |
return api; | |
} | |
/***/ }, | |
/* 320 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
//so they are compatible. because export * from 'subschema-prop-types'; does not seem to work. | |
module.exports = __webpack_require__(321); | |
/***/ }, | |
/* 321 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
//we'll re-export these for convenience in the babel6 world. | |
var string = _react.PropTypes.string; | |
var bool = _react.PropTypes.bool; | |
var number = _react.PropTypes.number; | |
var object = _react.PropTypes.object; | |
var func = _react.PropTypes.func; | |
var any = _react.PropTypes.any; | |
var node = _react.PropTypes.node; | |
var shape = _react.PropTypes.shape; | |
var arrayOf = _react.PropTypes.arrayOf; | |
var instanceOf = _react.PropTypes.instanceOf; | |
var oneOf = _react.PropTypes.oneOf; | |
var oneOfType = _react.PropTypes.oneOfType; | |
function customPropType(type, name) { | |
function customPropType$return() { | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return type.apply(api, args); | |
} | |
customPropType$return.isRequired = function customPropType$return$isRequired() { | |
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | |
args[_key2] = arguments[_key2]; | |
} | |
return type.isRequired.apply(type, args); | |
}; | |
if (name) customPropType$return.propTypeName = name; | |
return customPropType$return; | |
} | |
function propTypeToName(propType) { | |
var keys = Object.keys(api), | |
l = keys.length; | |
for (var i = 0; i < l; i++) { | |
var key = keys[i], | |
f = api[key]; | |
if (f.isRequired === propType) { | |
return '*' + key; | |
} | |
if (f === propType) { | |
return key; | |
} | |
} | |
} | |
function propTypesToNames(props) { | |
return Object.keys(props).reduce(function (ret, k) { | |
ret[k] = propTypeToName(props[k]); | |
return ret; | |
}, {}); | |
} | |
var deprecated = function deprecated(message) { | |
return function deprecated$propType(props, propName, componentName) { | |
return propName in props ? new Error("DEPRECATED: " + message + " in " + componentName + ".propTypes." + propName) : void 0; | |
}; | |
}; | |
var conditional = oneOfType([string, shape({ | |
operator: oneOfType([string, func]) | |
})]); | |
var domType = customPropType(node, 'domType'); | |
var fields = customPropType(arrayOf(string), 'fields'); | |
var title = customPropType(oneOfType([string, bool]), 'title'); | |
var injector = shape({ | |
inject: func.isRequired | |
}); | |
var blurValidate = customPropType(func, 'blurValidate'); | |
var changeValidate = customPropType(func, 'changeValidate'); | |
var validate = customPropType(func, 'validate'); | |
var value = customPropType(any, 'value'); | |
var message = customPropType(any, 'message'); | |
var error = customPropType(any, 'error'); | |
var errors = customPropType(any, 'errors'); | |
var promise = shape({ then: func }); | |
var id = customPropType(string, 'id'); | |
var htmlFor = customPropType(id, 'htmlFor'); | |
var fieldAttrs = customPropType(object, 'fieldAttrs'); | |
var cssClass = customPropType(string, 'cssClass'); | |
var style = customPropType(object, 'style'); | |
var typeClass = customPropType(cssClass, 'typeClass'); | |
var templateClass = customPropType(cssClass, 'templateClass'); | |
var injectedClass = customPropType(any, "injectedClass"); | |
var event = customPropType(func, 'event'); | |
var validator = customPropType(func, 'validator'); | |
var path = customPropType(string, 'path'); | |
var placeholder = customPropType(string, 'placeholder'); | |
var arrayString = oneOfType([string, arrayOf(string)]); | |
var submit = customPropType(func, 'submit'); | |
var listener = customPropType(any, 'listener'); | |
/** | |
* A valueEvent does not expect target.value | |
*/ | |
var valueEvent = customPropType(func, 'valueEvent'); | |
/** | |
* A targetEvent expects the first arg to have target.value | |
*/ | |
var targetEvent = customPropType(func, 'targetEvent'); | |
/** | |
* A errorEvent expects the first arg to be an error. | |
*/ | |
var errorEvent = customPropType(func, 'errorEvent'); | |
/** | |
* Signify this is a blur Event Listener. | |
*/ | |
var blurEvent = customPropType(func, 'blurEvent'); | |
/** | |
* Signify this is a onValid Event listener. | |
*/ | |
var validEvent = customPropType(func, 'validEvent'); | |
var dataType = customPropType(string, 'dataType'); | |
var type = oneOfType([string, func]); | |
var typeDescription = oneOfType([string, shape({ | |
type: string.isRequired | |
})]); | |
var _transitionTypes = oneOf(['appear', 'enter', 'leave']); | |
var transition = oneOfType([_react.PropTypes.string, shape({ | |
transition: _react.PropTypes.string, | |
on: _transitionTypes | |
})]); | |
/** | |
* Signify this property can take an expression. This | |
* allows properties to be tied to the valueManager. So | |
* it will evaluate the property against the valueManager. | |
* | |
* It will add a listener for each of the corresponding | |
* matching strings. | |
* | |
*/ | |
var expression = customPropType(string, 'expression'); | |
var loader = shape({ | |
loadTemplate: func, | |
loadType: func, | |
loadSchema: func, | |
loadValidator: func, | |
loadProcessor: func, | |
loadOperator: func | |
}); | |
var valueManager = shape({ | |
addListener: func, | |
addErrorListener: func, | |
addValidateListener: func, | |
addSubmitListener: func, | |
addStateListener: func | |
}); | |
var contentShape = { | |
className: cssClass, | |
type: string, | |
children: bool | |
}; | |
var pContentShape = shape(contentShape); | |
var contentType = oneOfType([pContentShape, string, bool, func, number, arrayOf(oneOfType([string, string, bool, number, func, pContentShape]))]); | |
contentShape.content = contentType; | |
var content = contentType; | |
var template = oneOfType([string, bool, shape({ | |
template: oneOfType([string, bool, func]), | |
content: content, | |
className: cssClass | |
}), func]); | |
var button = oneOfType([string, shape({ | |
onClick: event, | |
buttonClass: cssClass, | |
action: string, | |
name: string, | |
value: string, | |
iconClass: cssClass | |
})]); | |
var buttons = oneOfType([button, arrayOf(button), shape({ | |
buttonsClass: cssClass, | |
onButtonClick: event, | |
buttons: oneOfType(arrayString, arrayOf(button)), | |
buttonTemplate: template, | |
buttonsTemplate: template | |
})]); | |
var fieldset = shape({ | |
fields: arrayString, | |
legend: content, | |
className: cssClass, | |
buttons: buttons, | |
template: template | |
}); | |
var literal = oneOfType([string, bool, number, instanceOf(Date)]); | |
var options = oneOfType([arrayString, arrayOf(shape({ | |
label: string, | |
val: literal | |
}))]); | |
var optionsGroup = oneOfType([arrayString, arrayOf(shape({ | |
options: options, | |
group: string, | |
label: string, | |
labelHTML: string, | |
val: literal | |
}))]); | |
var schema = oneOfType([string, object, shape({ | |
fields: arrayString, | |
fieldsets: oneOfType([arrayString, fieldset, arrayOf(fieldset)]), | |
schema: object | |
})]); | |
var array = arrayOf(any); | |
var validators = oneOfType([arrayString, arrayOf(validators)]); | |
var operator = oneOfType([string, func, instanceOf(RegExp)]); | |
var events = { | |
onValidate: event, | |
onFocus: event, | |
onBlur: event, | |
onValid: event, | |
onChange: oneOfType(targetEvent, valueEvent) | |
}; | |
var field = customPropType(any, 'field'); | |
var mixin = { | |
events: events, | |
field: _extends({}, events, { | |
title: content, | |
help: content, | |
name: string, | |
placeholder: placeholder, | |
dataType: dataType, | |
editorClass: cssClass, | |
fieldClass: cssClass, | |
field: {} | |
}) | |
}; | |
var contextTypes = Object.freeze({ | |
valueManager: valueManager, | |
loader: loader, | |
injector: injector | |
}); | |
var processor = oneOfType([string, shape({ | |
fetch: func, | |
value: func, | |
format: func | |
})]); | |
var injectClass = oneOfType([func, shape({ | |
injectClass: func, | |
propTypes: object, | |
injectProps: object, | |
strict: bool | |
})]); | |
var api = { | |
conditional: conditional, | |
deprecated: deprecated, | |
transition: transition, | |
injectClass: injectClass, | |
blurValidate: blurValidate, | |
changeValidate: changeValidate, | |
promise: promise, | |
id: id, | |
injectedClass: injectedClass, | |
fieldAttrs: fieldAttrs, | |
cssClass: cssClass, | |
error: error, | |
errors: errors, | |
errorEvent: errorEvent, | |
event: event, | |
htmlFor: htmlFor, | |
validator: validator, | |
path: path, | |
placeholder: placeholder, | |
arrayString: arrayString, | |
listener: listener, | |
valueEvent: valueEvent, | |
targetEvent: targetEvent, | |
blurEvent: blurEvent, | |
validEvent: validEvent, | |
dataType: dataType, | |
type: type, | |
domType: domType, | |
typeDescription: typeDescription, | |
expression: expression, | |
loader: loader, | |
valueManager: valueManager, | |
content: content, | |
template: template, | |
button: button, | |
buttons: buttons, | |
fields: fields, | |
fieldset: fieldset, | |
literal: literal, | |
options: options, | |
submit: submit, | |
optionsGroup: optionsGroup, | |
schema: schema, | |
value: value, | |
validate: validate, | |
validators: validators, | |
operator: operator, | |
events: events, | |
field: field, | |
mixin: mixin, | |
style: style, | |
contextTypes: contextTypes, | |
processor: processor, | |
typeClass: typeClass, | |
string: string, bool: bool, number: number, object: object, func: func, any: any, node: node, shape: shape, arrayOf: arrayOf, instanceOf: instanceOf, oneOfType: oneOfType, oneOf: oneOf | |
}; | |
exports.default = { | |
propTypesToNames: propTypesToNames, | |
propTypeToName: propTypeToName, | |
customPropType: customPropType, | |
conditional: conditional, | |
blurValidate: blurValidate, | |
changeValidate: changeValidate, | |
promise: promise, | |
id: id, | |
fieldAttrs: fieldAttrs, | |
cssClass: cssClass, | |
error: error, | |
errors: errors, | |
event: event, | |
valueEvent: valueEvent, | |
targetEvent: targetEvent, | |
errorEvent: errorEvent, | |
validator: validator, | |
path: path, | |
placeholder: placeholder, | |
arrayString: arrayString, | |
listener: listener, | |
blurEvent: blurEvent, | |
validEvent: validEvent, | |
dataType: dataType, | |
domType: domType, | |
type: type, | |
typeDescription: typeDescription, | |
expression: expression, | |
loader: loader, | |
valueManager: valueManager, | |
content: content, | |
template: template, | |
button: button, | |
buttons: buttons, | |
fields: fields, | |
fieldset: fieldset, | |
injectedClass: injectedClass, | |
injector: injector, | |
literal: literal, | |
htmlFor: htmlFor, | |
options: options, | |
optionsGroup: optionsGroup, | |
schema: schema, | |
validators: validators, | |
operator: operator, | |
events: events, | |
field: field, | |
mixin: mixin, | |
contextTypes: contextTypes, | |
processor: processor, | |
submit: submit, | |
value: value, | |
validate: validate, | |
array: array, | |
title: title, | |
injectClass: injectClass, | |
typeClass: typeClass, | |
style: style, | |
transition: transition, | |
deprecated: deprecated, | |
string: string, bool: bool, number: number, object: object, func: func, any: any, node: node, shape: shape, arrayOf: arrayOf, instanceOf: instanceOf, oneOfType: oneOfType, oneOf: oneOf | |
}; | |
/***/ }, | |
/* 322 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.inherits = exports.nextFunc = exports.applyFuncs = exports.titlelize = exports.uppercase = exports.emptyCheck = exports.nullCheck = exports.debounce = exports.clone = exports.xtend = exports.toArray = exports.path = exports.result = exports.returnFirst = exports.resolveKey = exports.slice = exports.push = exports.flatten = exports.FREEZE_ARR = exports.FREEZE_OBJ = exports.isObject = exports.values = exports.each = exports.noop = exports.unique = exports.find = exports.isNumber = exports.isArray = exports.isBoolean = exports.isDate = exports.isRegExp = exports.isString = exports.isFunction = exports.extend = undefined; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
var _extend = __webpack_require__(323); | |
var _extend2 = _interopRequireDefault(_extend); | |
var _isFunction = __webpack_require__(329); | |
var _isFunction2 = _interopRequireDefault(_isFunction); | |
var _isString = __webpack_require__(348); | |
var _isString2 = _interopRequireDefault(_isString); | |
var _isRegExp = __webpack_require__(349); | |
var _isRegExp2 = _interopRequireDefault(_isRegExp); | |
var _isDate = __webpack_require__(350); | |
var _isDate2 = _interopRequireDefault(_isDate); | |
var _isBoolean = __webpack_require__(351); | |
var _isBoolean2 = _interopRequireDefault(_isBoolean); | |
var _isArray = __webpack_require__(338); | |
var _isArray2 = _interopRequireDefault(_isArray); | |
var _isNumber = __webpack_require__(352); | |
var _isNumber2 = _interopRequireDefault(_isNumber); | |
var _isObject = __webpack_require__(330); | |
var _isObject2 = _interopRequireDefault(_isObject); | |
var _find = __webpack_require__(353); | |
var _find2 = _interopRequireDefault(_find); | |
var _unique = __webpack_require__(385); | |
var _unique2 = _interopRequireDefault(_unique); | |
var _noop = __webpack_require__(395); | |
var _noop2 = _interopRequireDefault(_noop); | |
var _each = __webpack_require__(396); | |
var _each2 = _interopRequireDefault(_each); | |
var _values = __webpack_require__(400); | |
var _values2 = _interopRequireDefault(_values); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var FREEZE_OBJ = Object.freeze({}); | |
var FREEZE_ARR = Object.freeze([]); | |
var flatten = Function.apply.bind(Array.prototype.concat, []); | |
var push = Function.apply.bind(Array.prototype.push); | |
var slice = Function.call.bind(Array.prototype.slice); | |
function returnFirst(value) { | |
return value; | |
} | |
function resolveKey(path, key) { | |
if (!key) { | |
return path; | |
} | |
if (key[0] != '.') { | |
return key; | |
} | |
var parts = path ? path.split('.') : []; | |
key = key.substring(1); | |
while (key[0] === '.') { | |
key = key.substring(1); | |
parts.pop(); | |
} | |
if (key) { | |
parts.push(key); | |
} | |
return parts.length === 0 ? null : parts.join('.'); | |
} | |
function result(scope, key) { | |
if (!key) { | |
return null; | |
} | |
if (typeof key === 'string') { | |
return result(scope, scope[key]); | |
} | |
if (typeof key === 'function') { | |
return key.call(scope); | |
} | |
return key; | |
} | |
function path() { | |
var args = slice(arguments), | |
l = args.length, | |
i = 0, | |
j = 0, | |
p; | |
var ret = ''; | |
for (; i < l; i++) { | |
p = args[i]; | |
if (p == null || p === '') continue; | |
ret += j++ === 0 ? p : "." + p; | |
} | |
return ret; | |
} | |
function toArray(v) { | |
if ((0, _isArray2.default)(v)) { | |
return v; | |
} | |
if ((0, _isString2.default)(v)) { | |
return v.split(/\,\s*/); | |
} | |
if (v == null) { | |
return []; | |
} | |
return [v]; | |
} | |
function xtend(dest, args) { | |
dest = dest || {}; | |
for (var i = 1, l = arguments.length; i < l; i++) { | |
var arg = arguments[1]; | |
if (arg == null) continue; | |
for (var j in arg) { | |
dest[j] = args[j]; | |
} | |
} | |
return dest; | |
} | |
function clone(t) { | |
if (t == null) return t; | |
var tt = typeof t === 'undefined' ? 'undefined' : _typeof(t); | |
if (tt == 'boolean' || tt === 'number' || tt === 'string' || tt === 'function' || tt === 'symbol') { | |
return t; | |
} | |
if ((0, _isArray2.default)(t)) { | |
return t.concat(); | |
} | |
if (t instanceof Date) { | |
return new Date(t.getTime()); | |
} | |
return (0, _extend2.default)({}, t); | |
} | |
function debounce(fn, to) { | |
var ti; | |
return function f() { | |
clearTimeout(ti); | |
var args = Array.prototype.slice.call(arguments), | |
self = this; | |
ti = setTimeout(function () { | |
fn.apply(self, args); | |
}, to); | |
}; | |
} | |
function nullCheck(v) { | |
return v != null; | |
} | |
function emptyCheck(v) { | |
return v != null && v.length > 0; | |
} | |
function uppercase(v) { | |
return v.toUpperCase(); | |
} | |
function titlelize(value) { | |
return ((value || '') + '').replace(/([A-Z])/g, ' $1').replace(/^./, uppercase); | |
} | |
function applyFuncs(f1, f2) { | |
if (f1 && !f2) return f1; | |
if (!f1 && f2) return f2; | |
return function applyFuncs$bothFuncs() { | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
f1.apply(this, args); | |
f2.apply(this, args); | |
}; | |
} | |
function inherits(Clazz) { | |
var Proto = this; | |
do { | |
if (Proto === Clazz) { | |
return true; | |
} | |
Proto = Object.getPrototypeOf(Proto); | |
} while (Proto !== Object && Proto != null); | |
return false; | |
} | |
/** | |
* When f1 and f2 are defined- | |
* | |
* Calls f1 and f2 if f1 and f2 are defined and f1 does not return false. | |
* If f1 returns false, f2 is not called. | |
* | |
* If f2 is not defined f1 is returned. | |
* if f1 is not defined f2 is returned. | |
* | |
* @param f1 | |
* @param f2 | |
* @returns {function} | |
*/ | |
function nextFunc(f1, f2) { | |
if (f1 && !f2) return f1; | |
if (f2 && !f1) return f2; | |
return function nextFunc$wrapper() { | |
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | |
args[_key2] = arguments[_key2]; | |
} | |
if (f1.apply(this, args) !== false) { | |
return f2.apply(this, args); | |
} | |
}; | |
} | |
//re-exports | |
exports.extend = _extend2.default; | |
exports.isFunction = _isFunction2.default; | |
exports.isString = _isString2.default; | |
exports.isRegExp = _isRegExp2.default; | |
exports.isDate = _isDate2.default; | |
exports.isBoolean = _isBoolean2.default; | |
exports.isArray = _isArray2.default; | |
exports.isNumber = _isNumber2.default; | |
exports.find = _find2.default; | |
exports.unique = _unique2.default; | |
exports.noop = _noop2.default; | |
exports.each = _each2.default; | |
exports.values = _values2.default; | |
exports.isObject = _isObject2.default; | |
exports.FREEZE_OBJ = FREEZE_OBJ; | |
exports.FREEZE_ARR = FREEZE_ARR; | |
exports.flatten = flatten; | |
exports.push = push; | |
exports.slice = slice; | |
exports.resolveKey = resolveKey; | |
exports.returnFirst = returnFirst; | |
exports.result = result; | |
exports.path = path; | |
exports.toArray = toArray; | |
exports.xtend = xtend; | |
exports.clone = clone; | |
exports.debounce = debounce; | |
exports.nullCheck = nullCheck; | |
exports.emptyCheck = emptyCheck; | |
exports.uppercase = uppercase; | |
exports.titlelize = titlelize; | |
exports.applyFuncs = applyFuncs; | |
exports.nextFunc = nextFunc; | |
exports.inherits = inherits; | |
exports.default = { | |
extend: _extend2.default, | |
isFunction: _isFunction2.default, | |
isString: _isString2.default, | |
isRegExp: _isRegExp2.default, | |
isDate: _isDate2.default, | |
isBoolean: _isBoolean2.default, | |
isArray: _isArray2.default, | |
isNumber: _isNumber2.default, | |
find: _find2.default, | |
unique: _unique2.default, | |
noop: _noop2.default, | |
each: _each2.default, | |
values: _values2.default, | |
isObject: _isObject2.default, | |
FREEZE_OBJ: FREEZE_OBJ, | |
FREEZE_ARR: FREEZE_ARR, | |
flatten: flatten, | |
push: push, | |
resolveKey: resolveKey, | |
slice: slice, | |
inherits: inherits, | |
returnFirst: returnFirst, | |
result: result, | |
path: path, | |
toArray: toArray, | |
xtend: xtend, | |
clone: clone, | |
debounce: debounce, | |
nullCheck: nullCheck, | |
emptyCheck: emptyCheck, | |
uppercase: uppercase, | |
titlelize: titlelize, | |
applyFuncs: applyFuncs, | |
nextFunc: nextFunc | |
}; | |
/***/ }, | |
/* 323 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
module.exports = __webpack_require__(324); | |
/***/ }, | |
/* 324 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var assignWith = __webpack_require__(325), | |
baseAssign = __webpack_require__(341), | |
createAssigner = __webpack_require__(343); | |
/** | |
* Assigns own enumerable properties of source object(s) to the destination | |
* object. Subsequent sources overwrite property assignments of previous sources. | |
* If `customizer` is provided it's invoked to produce the assigned values. | |
* The `customizer` is bound to `thisArg` and invoked with five arguments: | |
* (objectValue, sourceValue, key, object, source). | |
* | |
* **Note:** This method mutates `object` and is based on | |
* [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign). | |
* | |
* @static | |
* @memberOf _ | |
* @alias extend | |
* @category Object | |
* @param {Object} object The destination object. | |
* @param {...Object} [sources] The source objects. | |
* @param {Function} [customizer] The function to customize assigned values. | |
* @param {*} [thisArg] The `this` binding of `customizer`. | |
* @returns {Object} Returns `object`. | |
* @example | |
* | |
* _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); | |
* // => { 'user': 'fred', 'age': 40 } | |
* | |
* // using a customizer callback | |
* var defaults = _.partialRight(_.assign, function(value, other) { | |
* return _.isUndefined(value) ? other : value; | |
* }); | |
* | |
* defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); | |
* // => { 'user': 'barney', 'age': 36 } | |
*/ | |
var assign = createAssigner(function (object, source, customizer) { | |
return customizer ? assignWith(object, source, customizer) : baseAssign(object, source); | |
}); | |
module.exports = assign; | |
/***/ }, | |
/* 325 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var keys = __webpack_require__(326); | |
/** | |
* A specialized version of `_.assign` for customizing assigned values without | |
* support for argument juggling, multiple sources, and `this` binding `customizer` | |
* functions. | |
* | |
* @private | |
* @param {Object} object The destination object. | |
* @param {Object} source The source object. | |
* @param {Function} customizer The function to customize assigned values. | |
* @returns {Object} Returns `object`. | |
*/ | |
function assignWith(object, source, customizer) { | |
var index = -1, | |
props = keys(source), | |
length = props.length; | |
while (++index < length) { | |
var key = props[index], | |
value = object[key], | |
result = customizer(value, source[key], key, object, source); | |
if ((result === result ? result !== value : value === value) || value === undefined && !(key in object)) { | |
object[key] = result; | |
} | |
} | |
return object; | |
} | |
module.exports = assignWith; | |
/***/ }, | |
/* 326 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var getNative = __webpack_require__(327), | |
isArrayLike = __webpack_require__(332), | |
isObject = __webpack_require__(330), | |
shimKeys = __webpack_require__(336); | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeKeys = getNative(Object, 'keys'); | |
/** | |
* Creates an array of the own enumerable property names of `object`. | |
* | |
* **Note:** Non-object values are coerced to objects. See the | |
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) | |
* for more details. | |
* | |
* @static | |
* @memberOf _ | |
* @category Object | |
* @param {Object} object The object to query. | |
* @returns {Array} Returns the array of property names. | |
* @example | |
* | |
* function Foo() { | |
* this.a = 1; | |
* this.b = 2; | |
* } | |
* | |
* Foo.prototype.c = 3; | |
* | |
* _.keys(new Foo); | |
* // => ['a', 'b'] (iteration order is not guaranteed) | |
* | |
* _.keys('hi'); | |
* // => ['0', '1'] | |
*/ | |
var keys = !nativeKeys ? shimKeys : function (object) { | |
var Ctor = object == null ? undefined : object.constructor; | |
if (typeof Ctor == 'function' && Ctor.prototype === object || typeof object != 'function' && isArrayLike(object)) { | |
return shimKeys(object); | |
} | |
return isObject(object) ? nativeKeys(object) : []; | |
}; | |
module.exports = keys; | |
/***/ }, | |
/* 327 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isNative = __webpack_require__(328); | |
/** | |
* 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 = object == null ? undefined : object[key]; | |
return isNative(value) ? value : undefined; | |
} | |
module.exports = getNative; | |
/***/ }, | |
/* 328 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isFunction = __webpack_require__(329), | |
isObjectLike = __webpack_require__(331); | |
/** Used to detect host constructors (Safari > 5). */ | |
var reIsHostCtor = /^\[object .+?Constructor\]$/; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to resolve the decompiled source of functions. */ | |
var fnToString = Function.prototype.toString; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** Used to detect if a method is native. */ | |
var reIsNative = RegExp('^' + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); | |
/** | |
* Checks if `value` is a native function. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is a native function, else `false`. | |
* @example | |
* | |
* _.isNative(Array.prototype.push); | |
* // => true | |
* | |
* _.isNative(_); | |
* // => false | |
*/ | |
function isNative(value) { | |
if (value == null) { | |
return false; | |
} | |
if (isFunction(value)) { | |
return reIsNative.test(fnToString.call(value)); | |
} | |
return isObjectLike(value) && reIsHostCtor.test(value); | |
} | |
module.exports = isNative; | |
/***/ }, | |
/* 329 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObject = __webpack_require__(330); | |
/** `Object#toString` result references. */ | |
var funcTag = '[object Function]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* Checks if `value` is classified as a `Function` object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isFunction(_); | |
* // => true | |
* | |
* _.isFunction(/abc/); | |
* // => false | |
*/ | |
function isFunction(value) { | |
// The use of `Object#toString` avoids issues with the `typeof` operator | |
// in older versions of Chrome and Safari which return 'function' for regexes | |
// and Safari 8 which returns 'object' for typed array constructors. | |
return isObject(value) && objToString.call(value) == funcTag; | |
} | |
module.exports = isFunction; | |
/***/ }, | |
/* 330 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
/** | |
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. | |
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | |
* | |
* @static | |
* @memberOf _ | |
* @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(1); | |
* // => false | |
*/ | |
function isObject(value) { | |
// Avoid a V8 JIT bug in Chrome 19-20. | |
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details. | |
var type = typeof value === 'undefined' ? 'undefined' : _typeof(value); | |
return !!value && (type == 'object' || type == 'function'); | |
} | |
module.exports = isObject; | |
/***/ }, | |
/* 331 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
/** | |
* Checks if `value` is object-like. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is object-like, else `false`. | |
*/ | |
function isObjectLike(value) { | |
return !!value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'object'; | |
} | |
module.exports = isObjectLike; | |
/***/ }, | |
/* 332 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var getLength = __webpack_require__(333), | |
isLength = __webpack_require__(335); | |
/** | |
* Checks if `value` is array-like. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is array-like, else `false`. | |
*/ | |
function isArrayLike(value) { | |
return value != null && isLength(getLength(value)); | |
} | |
module.exports = isArrayLike; | |
/***/ }, | |
/* 333 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseProperty = __webpack_require__(334); | |
/** | |
* Gets the "length" property value of `object`. | |
* | |
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) | |
* that affects Safari on at least iOS 8.1-8.3 ARM64. | |
* | |
* @private | |
* @param {Object} object The object to query. | |
* @returns {*} Returns the "length" value. | |
*/ | |
var getLength = baseProperty('length'); | |
module.exports = getLength; | |
/***/ }, | |
/* 334 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* The base implementation of `_.property` without support for deep paths. | |
* | |
* @private | |
* @param {string} key The key of the property to get. | |
* @returns {Function} Returns the new function. | |
*/ | |
function baseProperty(key) { | |
return function (object) { | |
return object == null ? undefined : object[key]; | |
}; | |
} | |
module.exports = baseProperty; | |
/***/ }, | |
/* 335 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
/** | |
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) | |
* of an array-like value. | |
*/ | |
var MAX_SAFE_INTEGER = 9007199254740991; | |
/** | |
* Checks if `value` is a valid array-like length. | |
* | |
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`. | |
*/ | |
function isLength(value) { | |
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; | |
} | |
module.exports = isLength; | |
/***/ }, | |
/* 336 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isArguments = __webpack_require__(337), | |
isArray = __webpack_require__(338), | |
isIndex = __webpack_require__(339), | |
isLength = __webpack_require__(335), | |
keysIn = __webpack_require__(340); | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* A fallback implementation of `Object.keys` which creates an array of the | |
* own enumerable property names of `object`. | |
* | |
* @private | |
* @param {Object} object The object to query. | |
* @returns {Array} Returns the array of property names. | |
*/ | |
function shimKeys(object) { | |
var props = keysIn(object), | |
propsLength = props.length, | |
length = propsLength && object.length; | |
var allowIndexes = !!length && isLength(length) && (isArray(object) || isArguments(object)); | |
var index = -1, | |
result = []; | |
while (++index < propsLength) { | |
var key = props[index]; | |
if (allowIndexes && isIndex(key, length) || hasOwnProperty.call(object, key)) { | |
result.push(key); | |
} | |
} | |
return result; | |
} | |
module.exports = shimKeys; | |
/***/ }, | |
/* 337 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isArrayLike = __webpack_require__(332), | |
isObjectLike = __webpack_require__(331); | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** Native method references. */ | |
var propertyIsEnumerable = objectProto.propertyIsEnumerable; | |
/** | |
* Checks if `value` is classified as an `arguments` object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isArguments(function() { return arguments; }()); | |
* // => true | |
* | |
* _.isArguments([1, 2, 3]); | |
* // => false | |
*/ | |
function isArguments(value) { | |
return isObjectLike(value) && isArrayLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); | |
} | |
module.exports = isArguments; | |
/***/ }, | |
/* 338 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var getNative = __webpack_require__(327), | |
isLength = __webpack_require__(335), | |
isObjectLike = __webpack_require__(331); | |
/** `Object#toString` result references. */ | |
var arrayTag = '[object Array]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var objToString = objectProto.toString; | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeIsArray = getNative(Array, 'isArray'); | |
/** | |
* Checks if `value` is classified as an `Array` object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isArray([1, 2, 3]); | |
* // => true | |
* | |
* _.isArray(function() { return arguments; }()); | |
* // => false | |
*/ | |
var isArray = nativeIsArray || function (value) { | |
return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; | |
}; | |
module.exports = isArray; | |
/***/ }, | |
/* 339 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
/** Used to detect unsigned integer values. */ | |
var reIsUint = /^\d+$/; | |
/** | |
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) | |
* of an array-like value. | |
*/ | |
var MAX_SAFE_INTEGER = 9007199254740991; | |
/** | |
* 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) { | |
value = typeof value == 'number' || reIsUint.test(value) ? +value : -1; | |
length = length == null ? MAX_SAFE_INTEGER : length; | |
return value > -1 && value % 1 == 0 && value < length; | |
} | |
module.exports = isIndex; | |
/***/ }, | |
/* 340 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isArguments = __webpack_require__(337), | |
isArray = __webpack_require__(338), | |
isIndex = __webpack_require__(339), | |
isLength = __webpack_require__(335), | |
isObject = __webpack_require__(330); | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* Creates an array of the own and inherited enumerable property names of `object`. | |
* | |
* **Note:** Non-object values are coerced to objects. | |
* | |
* @static | |
* @memberOf _ | |
* @category Object | |
* @param {Object} object The object to query. | |
* @returns {Array} Returns the array of property names. | |
* @example | |
* | |
* function Foo() { | |
* this.a = 1; | |
* this.b = 2; | |
* } | |
* | |
* Foo.prototype.c = 3; | |
* | |
* _.keysIn(new Foo); | |
* // => ['a', 'b', 'c'] (iteration order is not guaranteed) | |
*/ | |
function keysIn(object) { | |
if (object == null) { | |
return []; | |
} | |
if (!isObject(object)) { | |
object = Object(object); | |
} | |
var length = object.length; | |
length = length && isLength(length) && (isArray(object) || isArguments(object)) && length || 0; | |
var Ctor = object.constructor, | |
index = -1, | |
isProto = typeof Ctor == 'function' && Ctor.prototype === object, | |
result = Array(length), | |
skipIndexes = length > 0; | |
while (++index < length) { | |
result[index] = index + ''; | |
} | |
for (var key in object) { | |
if (!(skipIndexes && isIndex(key, length)) && !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { | |
result.push(key); | |
} | |
} | |
return result; | |
} | |
module.exports = keysIn; | |
/***/ }, | |
/* 341 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseCopy = __webpack_require__(342), | |
keys = __webpack_require__(326); | |
/** | |
* The base implementation of `_.assign` without support for argument juggling, | |
* multiple sources, and `customizer` functions. | |
* | |
* @private | |
* @param {Object} object The destination object. | |
* @param {Object} source The source object. | |
* @returns {Object} Returns `object`. | |
*/ | |
function baseAssign(object, source) { | |
return source == null ? object : baseCopy(source, keys(source), object); | |
} | |
module.exports = baseAssign; | |
/***/ }, | |
/* 342 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* Copies properties of `source` to `object`. | |
* | |
* @private | |
* @param {Object} source The object to copy properties from. | |
* @param {Array} props The property names to copy. | |
* @param {Object} [object={}] The object to copy properties to. | |
* @returns {Object} Returns `object`. | |
*/ | |
function baseCopy(source, props, object) { | |
object || (object = {}); | |
var index = -1, | |
length = props.length; | |
while (++index < length) { | |
var key = props[index]; | |
object[key] = source[key]; | |
} | |
return object; | |
} | |
module.exports = baseCopy; | |
/***/ }, | |
/* 343 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var bindCallback = __webpack_require__(344), | |
isIterateeCall = __webpack_require__(346), | |
restParam = __webpack_require__(347); | |
/** | |
* Creates a `_.assign`, `_.defaults`, or `_.merge` function. | |
* | |
* @private | |
* @param {Function} assigner The function to assign values. | |
* @returns {Function} Returns the new assigner function. | |
*/ | |
function createAssigner(assigner) { | |
return restParam(function (object, sources) { | |
var index = -1, | |
length = object == null ? 0 : sources.length, | |
customizer = length > 2 ? sources[length - 2] : undefined, | |
guard = length > 2 ? sources[2] : undefined, | |
thisArg = length > 1 ? sources[length - 1] : undefined; | |
if (typeof customizer == 'function') { | |
customizer = bindCallback(customizer, thisArg, 5); | |
length -= 2; | |
} else { | |
customizer = typeof thisArg == 'function' ? thisArg : undefined; | |
length -= customizer ? 1 : 0; | |
} | |
if (guard && isIterateeCall(sources[0], sources[1], guard)) { | |
customizer = length < 3 ? undefined : customizer; | |
length = 1; | |
} | |
while (++index < length) { | |
var source = sources[index]; | |
if (source) { | |
assigner(object, source, customizer); | |
} | |
} | |
return object; | |
}); | |
} | |
module.exports = createAssigner; | |
/***/ }, | |
/* 344 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var identity = __webpack_require__(345); | |
/** | |
* A specialized version of `baseCallback` which only supports `this` binding | |
* and specifying the number of arguments to provide to `func`. | |
* | |
* @private | |
* @param {Function} func The function to bind. | |
* @param {*} thisArg The `this` binding of `func`. | |
* @param {number} [argCount] The number of arguments to provide to `func`. | |
* @returns {Function} Returns the callback. | |
*/ | |
function bindCallback(func, thisArg, argCount) { | |
if (typeof func != 'function') { | |
return identity; | |
} | |
if (thisArg === undefined) { | |
return func; | |
} | |
switch (argCount) { | |
case 1: | |
return function (value) { | |
return func.call(thisArg, value); | |
}; | |
case 3: | |
return function (value, index, collection) { | |
return func.call(thisArg, value, index, collection); | |
}; | |
case 4: | |
return function (accumulator, value, index, collection) { | |
return func.call(thisArg, accumulator, value, index, collection); | |
}; | |
case 5: | |
return function (value, other, key, object, source) { | |
return func.call(thisArg, value, other, key, object, source); | |
}; | |
} | |
return function () { | |
return func.apply(thisArg, arguments); | |
}; | |
} | |
module.exports = bindCallback; | |
/***/ }, | |
/* 345 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* This method returns the first argument provided to it. | |
* | |
* @static | |
* @memberOf _ | |
* @category Utility | |
* @param {*} value Any value. | |
* @returns {*} Returns `value`. | |
* @example | |
* | |
* var object = { 'user': 'fred' }; | |
* | |
* _.identity(object) === object; | |
* // => true | |
*/ | |
function identity(value) { | |
return value; | |
} | |
module.exports = identity; | |
/***/ }, | |
/* 346 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
var isArrayLike = __webpack_require__(332), | |
isIndex = __webpack_require__(339), | |
isObject = __webpack_require__(330); | |
/** | |
* Checks if the provided 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(object)) { | |
return false; | |
} | |
var type = typeof index === 'undefined' ? 'undefined' : _typeof(index); | |
if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) { | |
var other = object[index]; | |
return value === value ? value === other : other !== other; | |
} | |
return false; | |
} | |
module.exports = isIterateeCall; | |
/***/ }, | |
/* 347 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
/** Used as the `TypeError` message for "Functions" methods. */ | |
var FUNC_ERROR_TEXT = 'Expected a function'; | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeMax = Math.max; | |
/** | |
* Creates a function that invokes `func` with the `this` binding of the | |
* created function and arguments from `start` and beyond provided as an array. | |
* | |
* **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). | |
* | |
* @static | |
* @memberOf _ | |
* @category Function | |
* @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. | |
* @example | |
* | |
* var say = _.restParam(function(what, names) { | |
* return what + ' ' + _.initial(names).join(', ') + | |
* (_.size(names) > 1 ? ', & ' : '') + _.last(names); | |
* }); | |
* | |
* say('hello', 'fred', 'barney', 'pebbles'); | |
* // => 'hello fred, barney, & pebbles' | |
*/ | |
function restParam(func, start) { | |
if (typeof func != 'function') { | |
throw new TypeError(FUNC_ERROR_TEXT); | |
} | |
start = nativeMax(start === undefined ? func.length - 1 : +start || 0, 0); | |
return function () { | |
var args = arguments, | |
index = -1, | |
length = nativeMax(args.length - start, 0), | |
rest = Array(length); | |
while (++index < length) { | |
rest[index] = args[start + index]; | |
} | |
switch (start) { | |
case 0: | |
return func.call(this, rest); | |
case 1: | |
return func.call(this, args[0], rest); | |
case 2: | |
return func.call(this, args[0], args[1], rest); | |
} | |
var otherArgs = Array(start + 1); | |
index = -1; | |
while (++index < start) { | |
otherArgs[index] = args[index]; | |
} | |
otherArgs[start] = rest; | |
return func.apply(this, otherArgs); | |
}; | |
} | |
module.exports = restParam; | |
/***/ }, | |
/* 348 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObjectLike = __webpack_require__(331); | |
/** `Object#toString` result references. */ | |
var stringTag = '[object String]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* Checks if `value` is classified as a `String` primitive or object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isString('abc'); | |
* // => true | |
* | |
* _.isString(1); | |
* // => false | |
*/ | |
function isString(value) { | |
return typeof value == 'string' || isObjectLike(value) && objToString.call(value) == stringTag; | |
} | |
module.exports = isString; | |
/***/ }, | |
/* 349 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObject = __webpack_require__(330); | |
/** `Object#toString` result references. */ | |
var regexpTag = '[object RegExp]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* Checks if `value` is classified as a `RegExp` object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isRegExp(/abc/); | |
* // => true | |
* | |
* _.isRegExp('/abc/'); | |
* // => false | |
*/ | |
function isRegExp(value) { | |
return isObject(value) && objToString.call(value) == regexpTag; | |
} | |
module.exports = isRegExp; | |
/***/ }, | |
/* 350 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObjectLike = __webpack_require__(331); | |
/** `Object#toString` result references. */ | |
var dateTag = '[object Date]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* Checks if `value` is classified as a `Date` object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isDate(new Date); | |
* // => true | |
* | |
* _.isDate('Mon April 23 2012'); | |
* // => false | |
*/ | |
function isDate(value) { | |
return isObjectLike(value) && objToString.call(value) == dateTag; | |
} | |
module.exports = isDate; | |
/***/ }, | |
/* 351 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObjectLike = __webpack_require__(331); | |
/** `Object#toString` result references. */ | |
var boolTag = '[object Boolean]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* Checks if `value` is classified as a boolean primitive or object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isBoolean(false); | |
* // => true | |
* | |
* _.isBoolean(null); | |
* // => false | |
*/ | |
function isBoolean(value) { | |
return value === true || value === false || isObjectLike(value) && objToString.call(value) == boolTag; | |
} | |
module.exports = isBoolean; | |
/***/ }, | |
/* 352 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObjectLike = __webpack_require__(331); | |
/** `Object#toString` result references. */ | |
var numberTag = '[object Number]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* Checks if `value` is classified as a `Number` primitive or object. | |
* | |
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified | |
* as numbers, use the `_.isFinite` method. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isNumber(8.4); | |
* // => true | |
* | |
* _.isNumber(NaN); | |
* // => true | |
* | |
* _.isNumber('8.4'); | |
* // => false | |
*/ | |
function isNumber(value) { | |
return typeof value == 'number' || isObjectLike(value) && objToString.call(value) == numberTag; | |
} | |
module.exports = isNumber; | |
/***/ }, | |
/* 353 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseEach = __webpack_require__(354), | |
createFind = __webpack_require__(360); | |
/** | |
* Iterates over elements of `collection`, returning the first element | |
* `predicate` returns truthy for. The predicate is bound to `thisArg` and | |
* invoked with three arguments: (value, index|key, collection). | |
* | |
* If a property name is provided for `predicate` the created `_.property` | |
* style callback returns the property value of the given element. | |
* | |
* If a value is also provided for `thisArg` the created `_.matchesProperty` | |
* style callback returns `true` for elements that have a matching property | |
* value, else `false`. | |
* | |
* If an object is provided for `predicate` the created `_.matches` style | |
* callback returns `true` for elements that have the properties of the given | |
* object, else `false`. | |
* | |
* @static | |
* @memberOf _ | |
* @alias detect | |
* @category Collection | |
* @param {Array|Object|string} collection The collection to search. | |
* @param {Function|Object|string} [predicate=_.identity] The function invoked | |
* per iteration. | |
* @param {*} [thisArg] The `this` binding of `predicate`. | |
* @returns {*} Returns the matched element, else `undefined`. | |
* @example | |
* | |
* var users = [ | |
* { 'user': 'barney', 'age': 36, 'active': true }, | |
* { 'user': 'fred', 'age': 40, 'active': false }, | |
* { 'user': 'pebbles', 'age': 1, 'active': true } | |
* ]; | |
* | |
* _.result(_.find(users, function(chr) { | |
* return chr.age < 40; | |
* }), 'user'); | |
* // => 'barney' | |
* | |
* // using the `_.matches` callback shorthand | |
* _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); | |
* // => 'pebbles' | |
* | |
* // using the `_.matchesProperty` callback shorthand | |
* _.result(_.find(users, 'active', false), 'user'); | |
* // => 'fred' | |
* | |
* // using the `_.property` callback shorthand | |
* _.result(_.find(users, 'active'), 'user'); | |
* // => 'barney' | |
*/ | |
var find = createFind(baseEach); | |
module.exports = find; | |
/***/ }, | |
/* 354 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseForOwn = __webpack_require__(355), | |
createBaseEach = __webpack_require__(359); | |
/** | |
* The base implementation of `_.forEach` without support for callback | |
* shorthands and `this` binding. | |
* | |
* @private | |
* @param {Array|Object|string} collection The collection to iterate over. | |
* @param {Function} iteratee The function invoked per iteration. | |
* @returns {Array|Object|string} Returns `collection`. | |
*/ | |
var baseEach = createBaseEach(baseForOwn); | |
module.exports = baseEach; | |
/***/ }, | |
/* 355 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseFor = __webpack_require__(356), | |
keys = __webpack_require__(326); | |
/** | |
* The base implementation of `_.forOwn` without support for callback | |
* shorthands and `this` binding. | |
* | |
* @private | |
* @param {Object} object The object to iterate over. | |
* @param {Function} iteratee The function invoked per iteration. | |
* @returns {Object} Returns `object`. | |
*/ | |
function baseForOwn(object, iteratee) { | |
return baseFor(object, iteratee, keys); | |
} | |
module.exports = baseForOwn; | |
/***/ }, | |
/* 356 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var createBaseFor = __webpack_require__(357); | |
/** | |
* The base implementation of `baseForIn` and `baseForOwn` which iterates | |
* over `object` properties returned by `keysFunc` invoking `iteratee` for | |
* each property. Iteratee functions may exit iteration early by explicitly | |
* returning `false`. | |
* | |
* @private | |
* @param {Object} object The object to iterate over. | |
* @param {Function} iteratee The function invoked per iteration. | |
* @param {Function} keysFunc The function to get the keys of `object`. | |
* @returns {Object} Returns `object`. | |
*/ | |
var baseFor = createBaseFor(); | |
module.exports = baseFor; | |
/***/ }, | |
/* 357 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var toObject = __webpack_require__(358); | |
/** | |
* Creates a base function for `_.forIn` or `_.forInRight`. | |
* | |
* @private | |
* @param {boolean} [fromRight] Specify iterating from right to left. | |
* @returns {Function} Returns the new base function. | |
*/ | |
function createBaseFor(fromRight) { | |
return function (object, iteratee, keysFunc) { | |
var iterable = toObject(object), | |
props = keysFunc(object), | |
length = props.length, | |
index = fromRight ? length : -1; | |
while (fromRight ? index-- : ++index < length) { | |
var key = props[index]; | |
if (iteratee(iterable[key], key, iterable) === false) { | |
break; | |
} | |
} | |
return object; | |
}; | |
} | |
module.exports = createBaseFor; | |
/***/ }, | |
/* 358 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObject = __webpack_require__(330); | |
/** | |
* Converts `value` to an object if it's not one. | |
* | |
* @private | |
* @param {*} value The value to process. | |
* @returns {Object} Returns the object. | |
*/ | |
function toObject(value) { | |
return isObject(value) ? value : Object(value); | |
} | |
module.exports = toObject; | |
/***/ }, | |
/* 359 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var getLength = __webpack_require__(333), | |
isLength = __webpack_require__(335), | |
toObject = __webpack_require__(358); | |
/** | |
* Creates a `baseEach` or `baseEachRight` function. | |
* | |
* @private | |
* @param {Function} eachFunc The function to iterate over a collection. | |
* @param {boolean} [fromRight] Specify iterating from right to left. | |
* @returns {Function} Returns the new base function. | |
*/ | |
function createBaseEach(eachFunc, fromRight) { | |
return function (collection, iteratee) { | |
var length = collection ? getLength(collection) : 0; | |
if (!isLength(length)) { | |
return eachFunc(collection, iteratee); | |
} | |
var index = fromRight ? length : -1, | |
iterable = toObject(collection); | |
while (fromRight ? index-- : ++index < length) { | |
if (iteratee(iterable[index], index, iterable) === false) { | |
break; | |
} | |
} | |
return collection; | |
}; | |
} | |
module.exports = createBaseEach; | |
/***/ }, | |
/* 360 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseCallback = __webpack_require__(361), | |
baseFind = __webpack_require__(383), | |
baseFindIndex = __webpack_require__(384), | |
isArray = __webpack_require__(338); | |
/** | |
* Creates a `_.find` or `_.findLast` function. | |
* | |
* @private | |
* @param {Function} eachFunc The function to iterate over a collection. | |
* @param {boolean} [fromRight] Specify iterating from right to left. | |
* @returns {Function} Returns the new find function. | |
*/ | |
function createFind(eachFunc, fromRight) { | |
return function (collection, predicate, thisArg) { | |
predicate = baseCallback(predicate, thisArg, 3); | |
if (isArray(collection)) { | |
var index = baseFindIndex(collection, predicate, fromRight); | |
return index > -1 ? collection[index] : undefined; | |
} | |
return baseFind(collection, predicate, eachFunc); | |
}; | |
} | |
module.exports = createFind; | |
/***/ }, | |
/* 361 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
var baseMatches = __webpack_require__(362), | |
baseMatchesProperty = __webpack_require__(374), | |
bindCallback = __webpack_require__(344), | |
identity = __webpack_require__(345), | |
property = __webpack_require__(381); | |
/** | |
* The base implementation of `_.callback` which supports specifying the | |
* number of arguments to provide to `func`. | |
* | |
* @private | |
* @param {*} [func=_.identity] The value to convert to a callback. | |
* @param {*} [thisArg] The `this` binding of `func`. | |
* @param {number} [argCount] The number of arguments to provide to `func`. | |
* @returns {Function} Returns the callback. | |
*/ | |
function baseCallback(func, thisArg, argCount) { | |
var type = typeof func === 'undefined' ? 'undefined' : _typeof(func); | |
if (type == 'function') { | |
return thisArg === undefined ? func : bindCallback(func, thisArg, argCount); | |
} | |
if (func == null) { | |
return identity; | |
} | |
if (type == 'object') { | |
return baseMatches(func); | |
} | |
return thisArg === undefined ? property(func) : baseMatchesProperty(func, thisArg); | |
} | |
module.exports = baseCallback; | |
/***/ }, | |
/* 362 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseIsMatch = __webpack_require__(363), | |
getMatchData = __webpack_require__(371), | |
toObject = __webpack_require__(358); | |
/** | |
* The base implementation of `_.matches` which does not clone `source`. | |
* | |
* @private | |
* @param {Object} source The object of property values to match. | |
* @returns {Function} Returns the new function. | |
*/ | |
function baseMatches(source) { | |
var matchData = getMatchData(source); | |
if (matchData.length == 1 && matchData[0][2]) { | |
var key = matchData[0][0], | |
value = matchData[0][1]; | |
return function (object) { | |
if (object == null) { | |
return false; | |
} | |
return object[key] === value && (value !== undefined || key in toObject(object)); | |
}; | |
} | |
return function (object) { | |
return baseIsMatch(object, matchData); | |
}; | |
} | |
module.exports = baseMatches; | |
/***/ }, | |
/* 363 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseIsEqual = __webpack_require__(364), | |
toObject = __webpack_require__(358); | |
/** | |
* The base implementation of `_.isMatch` without support for callback | |
* shorthands and `this` binding. | |
* | |
* @private | |
* @param {Object} object The object to inspect. | |
* @param {Array} matchData The propery names, values, and compare flags to match. | |
* @param {Function} [customizer] The function to customize comparing objects. | |
* @returns {boolean} Returns `true` if `object` is a match, else `false`. | |
*/ | |
function baseIsMatch(object, matchData, customizer) { | |
var index = matchData.length, | |
length = index, | |
noCustomizer = !customizer; | |
if (object == null) { | |
return !length; | |
} | |
object = toObject(object); | |
while (index--) { | |
var data = matchData[index]; | |
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { | |
return false; | |
} | |
} | |
while (++index < length) { | |
data = matchData[index]; | |
var key = data[0], | |
objValue = object[key], | |
srcValue = data[1]; | |
if (noCustomizer && data[2]) { | |
if (objValue === undefined && !(key in object)) { | |
return false; | |
} | |
} else { | |
var result = customizer ? customizer(objValue, srcValue, key) : undefined; | |
if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { | |
return false; | |
} | |
} | |
} | |
return true; | |
} | |
module.exports = baseIsMatch; | |
/***/ }, | |
/* 364 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseIsEqualDeep = __webpack_require__(365), | |
isObject = __webpack_require__(330), | |
isObjectLike = __webpack_require__(331); | |
/** | |
* The base implementation of `_.isEqual` without support for `this` binding | |
* `customizer` functions. | |
* | |
* @private | |
* @param {*} value The value to compare. | |
* @param {*} other The other value to compare. | |
* @param {Function} [customizer] The function to customize comparing values. | |
* @param {boolean} [isLoose] Specify performing partial comparisons. | |
* @param {Array} [stackA] Tracks traversed `value` objects. | |
* @param {Array} [stackB] Tracks traversed `other` objects. | |
* @returns {boolean} Returns `true` if the values are equivalent, else `false`. | |
*/ | |
function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { | |
if (value === other) { | |
return true; | |
} | |
if (value == null || other == null || !isObject(value) && !isObjectLike(other)) { | |
return value !== value && other !== other; | |
} | |
return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); | |
} | |
module.exports = baseIsEqual; | |
/***/ }, | |
/* 365 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var equalArrays = __webpack_require__(366), | |
equalByTag = __webpack_require__(368), | |
equalObjects = __webpack_require__(369), | |
isArray = __webpack_require__(338), | |
isTypedArray = __webpack_require__(370); | |
/** `Object#toString` result references. */ | |
var argsTag = '[object Arguments]', | |
arrayTag = '[object Array]', | |
objectTag = '[object Object]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* A specialized version of `baseIsEqual` for arrays and objects which performs | |
* deep comparisons and tracks traversed objects enabling objects with circular | |
* references to be compared. | |
* | |
* @private | |
* @param {Object} object The object to compare. | |
* @param {Object} other The other object to compare. | |
* @param {Function} equalFunc The function to determine equivalents of values. | |
* @param {Function} [customizer] The function to customize comparing objects. | |
* @param {boolean} [isLoose] Specify performing partial comparisons. | |
* @param {Array} [stackA=[]] Tracks traversed `value` objects. | |
* @param {Array} [stackB=[]] Tracks traversed `other` objects. | |
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`. | |
*/ | |
function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { | |
var objIsArr = isArray(object), | |
othIsArr = isArray(other), | |
objTag = arrayTag, | |
othTag = arrayTag; | |
if (!objIsArr) { | |
objTag = objToString.call(object); | |
if (objTag == argsTag) { | |
objTag = objectTag; | |
} else if (objTag != objectTag) { | |
objIsArr = isTypedArray(object); | |
} | |
} | |
if (!othIsArr) { | |
othTag = objToString.call(other); | |
if (othTag == argsTag) { | |
othTag = objectTag; | |
} else if (othTag != objectTag) { | |
othIsArr = isTypedArray(other); | |
} | |
} | |
var objIsObj = objTag == objectTag, | |
othIsObj = othTag == objectTag, | |
isSameTag = objTag == othTag; | |
if (isSameTag && !(objIsArr || objIsObj)) { | |
return equalByTag(object, other, objTag); | |
} | |
if (!isLoose) { | |
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), | |
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); | |
if (objIsWrapped || othIsWrapped) { | |
return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); | |
} | |
} | |
if (!isSameTag) { | |
return false; | |
} | |
// Assume cyclic values are equal. | |
// For more information on detecting circular references see https://es5.github.io/#JO. | |
stackA || (stackA = []); | |
stackB || (stackB = []); | |
var length = stackA.length; | |
while (length--) { | |
if (stackA[length] == object) { | |
return stackB[length] == other; | |
} | |
} | |
// Add `object` and `other` to the stack of traversed objects. | |
stackA.push(object); | |
stackB.push(other); | |
var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); | |
stackA.pop(); | |
stackB.pop(); | |
return result; | |
} | |
module.exports = baseIsEqualDeep; | |
/***/ }, | |
/* 366 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var arraySome = __webpack_require__(367); | |
/** | |
* A specialized version of `baseIsEqualDeep` for arrays with support for | |
* partial deep comparisons. | |
* | |
* @private | |
* @param {Array} array The array to compare. | |
* @param {Array} other The other array to compare. | |
* @param {Function} equalFunc The function to determine equivalents of values. | |
* @param {Function} [customizer] The function to customize comparing arrays. | |
* @param {boolean} [isLoose] Specify performing partial comparisons. | |
* @param {Array} [stackA] Tracks traversed `value` objects. | |
* @param {Array} [stackB] Tracks traversed `other` objects. | |
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. | |
*/ | |
function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { | |
var index = -1, | |
arrLength = array.length, | |
othLength = other.length; | |
if (arrLength != othLength && !(isLoose && othLength > arrLength)) { | |
return false; | |
} | |
// Ignore non-index properties. | |
while (++index < arrLength) { | |
var arrValue = array[index], | |
othValue = other[index], | |
result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; | |
if (result !== undefined) { | |
if (result) { | |
continue; | |
} | |
return false; | |
} | |
// Recursively compare arrays (susceptible to call stack limits). | |
if (isLoose) { | |
if (!arraySome(other, function (othValue) { | |
return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); | |
})) { | |
return false; | |
} | |
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { | |
return false; | |
} | |
} | |
return true; | |
} | |
module.exports = equalArrays; | |
/***/ }, | |
/* 367 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* A specialized version of `_.some` for arrays without support for callback | |
* shorthands and `this` binding. | |
* | |
* @private | |
* @param {Array} array The array to iterate over. | |
* @param {Function} predicate The function invoked per iteration. | |
* @returns {boolean} Returns `true` if any element passes the predicate check, | |
* else `false`. | |
*/ | |
function arraySome(array, predicate) { | |
var index = -1, | |
length = array.length; | |
while (++index < length) { | |
if (predicate(array[index], index, array)) { | |
return true; | |
} | |
} | |
return false; | |
} | |
module.exports = arraySome; | |
/***/ }, | |
/* 368 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
/** `Object#toString` result references. */ | |
var boolTag = '[object Boolean]', | |
dateTag = '[object Date]', | |
errorTag = '[object Error]', | |
numberTag = '[object Number]', | |
regexpTag = '[object RegExp]', | |
stringTag = '[object String]'; | |
/** | |
* A specialized version of `baseIsEqualDeep` for comparing objects of | |
* the same `toStringTag`. | |
* | |
* **Note:** This function only supports comparing values with tags of | |
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. | |
* | |
* @private | |
* @param {Object} object The object to compare. | |
* @param {Object} other The other object to compare. | |
* @param {string} tag The `toStringTag` of the objects to compare. | |
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`. | |
*/ | |
function equalByTag(object, other, tag) { | |
switch (tag) { | |
case boolTag: | |
case dateTag: | |
// Coerce dates and booleans to numbers, dates to milliseconds and booleans | |
// to `1` or `0` treating invalid dates coerced to `NaN` as not equal. | |
return +object == +other; | |
case errorTag: | |
return object.name == other.name && object.message == other.message; | |
case numberTag: | |
// Treat `NaN` vs. `NaN` as equal. | |
return object != +object ? other != +other : object == +other; | |
case regexpTag: | |
case stringTag: | |
// Coerce regexes to strings and treat strings primitives and string | |
// objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. | |
return object == other + ''; | |
} | |
return false; | |
} | |
module.exports = equalByTag; | |
/***/ }, | |
/* 369 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var keys = __webpack_require__(326); | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* A specialized version of `baseIsEqualDeep` for objects with support for | |
* partial deep comparisons. | |
* | |
* @private | |
* @param {Object} object The object to compare. | |
* @param {Object} other The other object to compare. | |
* @param {Function} equalFunc The function to determine equivalents of values. | |
* @param {Function} [customizer] The function to customize comparing values. | |
* @param {boolean} [isLoose] Specify performing partial comparisons. | |
* @param {Array} [stackA] Tracks traversed `value` objects. | |
* @param {Array} [stackB] Tracks traversed `other` objects. | |
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`. | |
*/ | |
function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { | |
var objProps = keys(object), | |
objLength = objProps.length, | |
othProps = keys(other), | |
othLength = othProps.length; | |
if (objLength != othLength && !isLoose) { | |
return false; | |
} | |
var index = objLength; | |
while (index--) { | |
var key = objProps[index]; | |
if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { | |
return false; | |
} | |
} | |
var skipCtor = isLoose; | |
while (++index < objLength) { | |
key = objProps[index]; | |
var objValue = object[key], | |
othValue = other[key], | |
result = customizer ? customizer(isLoose ? othValue : objValue, isLoose ? objValue : othValue, key) : undefined; | |
// Recursively compare objects (susceptible to call stack limits). | |
if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { | |
return false; | |
} | |
skipCtor || (skipCtor = key == 'constructor'); | |
} | |
if (!skipCtor) { | |
var objCtor = object.constructor, | |
othCtor = other.constructor; | |
// Non `Object` object instances with different constructors are not equal. | |
if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { | |
return false; | |
} | |
} | |
return true; | |
} | |
module.exports = equalObjects; | |
/***/ }, | |
/* 370 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isLength = __webpack_require__(335), | |
isObjectLike = __webpack_require__(331); | |
/** `Object#toString` result references. */ | |
var argsTag = '[object Arguments]', | |
arrayTag = '[object Array]', | |
boolTag = '[object Boolean]', | |
dateTag = '[object Date]', | |
errorTag = '[object Error]', | |
funcTag = '[object Function]', | |
mapTag = '[object Map]', | |
numberTag = '[object Number]', | |
objectTag = '[object Object]', | |
regexpTag = '[object RegExp]', | |
setTag = '[object Set]', | |
stringTag = '[object String]', | |
weakMapTag = '[object WeakMap]'; | |
var arrayBufferTag = '[object ArrayBuffer]', | |
float32Tag = '[object Float32Array]', | |
float64Tag = '[object Float64Array]', | |
int8Tag = '[object Int8Array]', | |
int16Tag = '[object Int16Array]', | |
int32Tag = '[object Int32Array]', | |
uint8Tag = '[object Uint8Array]', | |
uint8ClampedTag = '[object Uint8ClampedArray]', | |
uint16Tag = '[object Uint16Array]', | |
uint32Tag = '[object Uint32Array]'; | |
/** Used to identify `toStringTag` values of typed arrays. */ | |
var typedArrayTags = {}; | |
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; | |
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* Checks if `value` is classified as a typed array. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isTypedArray(new Uint8Array); | |
* // => true | |
* | |
* _.isTypedArray([]); | |
* // => false | |
*/ | |
function isTypedArray(value) { | |
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; | |
} | |
module.exports = isTypedArray; | |
/***/ }, | |
/* 371 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isStrictComparable = __webpack_require__(372), | |
pairs = __webpack_require__(373); | |
/** | |
* Gets the propery names, values, and compare flags of `object`. | |
* | |
* @private | |
* @param {Object} object The object to query. | |
* @returns {Array} Returns the match data of `object`. | |
*/ | |
function getMatchData(object) { | |
var result = pairs(object), | |
length = result.length; | |
while (length--) { | |
result[length][2] = isStrictComparable(result[length][1]); | |
} | |
return result; | |
} | |
module.exports = getMatchData; | |
/***/ }, | |
/* 372 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObject = __webpack_require__(330); | |
/** | |
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` if suitable for strict | |
* equality comparisons, else `false`. | |
*/ | |
function isStrictComparable(value) { | |
return value === value && !isObject(value); | |
} | |
module.exports = isStrictComparable; | |
/***/ }, | |
/* 373 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var keys = __webpack_require__(326), | |
toObject = __webpack_require__(358); | |
/** | |
* Creates a two dimensional array of the key-value pairs for `object`, | |
* e.g. `[[key1, value1], [key2, value2]]`. | |
* | |
* @static | |
* @memberOf _ | |
* @category Object | |
* @param {Object} object The object to query. | |
* @returns {Array} Returns the new array of key-value pairs. | |
* @example | |
* | |
* _.pairs({ 'barney': 36, 'fred': 40 }); | |
* // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) | |
*/ | |
function pairs(object) { | |
object = toObject(object); | |
var index = -1, | |
props = keys(object), | |
length = props.length, | |
result = Array(length); | |
while (++index < length) { | |
var key = props[index]; | |
result[index] = [key, object[key]]; | |
} | |
return result; | |
} | |
module.exports = pairs; | |
/***/ }, | |
/* 374 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseGet = __webpack_require__(375), | |
baseIsEqual = __webpack_require__(364), | |
baseSlice = __webpack_require__(376), | |
isArray = __webpack_require__(338), | |
isKey = __webpack_require__(377), | |
isStrictComparable = __webpack_require__(372), | |
last = __webpack_require__(378), | |
toObject = __webpack_require__(358), | |
toPath = __webpack_require__(379); | |
/** | |
* The base implementation of `_.matchesProperty` which does not clone `srcValue`. | |
* | |
* @private | |
* @param {string} path The path of the property to get. | |
* @param {*} srcValue The value to compare. | |
* @returns {Function} Returns the new function. | |
*/ | |
function baseMatchesProperty(path, srcValue) { | |
var isArr = isArray(path), | |
isCommon = isKey(path) && isStrictComparable(srcValue), | |
pathKey = path + ''; | |
path = toPath(path); | |
return function (object) { | |
if (object == null) { | |
return false; | |
} | |
var key = pathKey; | |
object = toObject(object); | |
if ((isArr || !isCommon) && !(key in object)) { | |
object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); | |
if (object == null) { | |
return false; | |
} | |
key = last(path); | |
object = toObject(object); | |
} | |
return object[key] === srcValue ? srcValue !== undefined || key in object : baseIsEqual(srcValue, object[key], undefined, true); | |
}; | |
} | |
module.exports = baseMatchesProperty; | |
/***/ }, | |
/* 375 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var toObject = __webpack_require__(358); | |
/** | |
* The base implementation of `get` without support for string paths | |
* and default values. | |
* | |
* @private | |
* @param {Object} object The object to query. | |
* @param {Array} path The path of the property to get. | |
* @param {string} [pathKey] The key representation of path. | |
* @returns {*} Returns the resolved value. | |
*/ | |
function baseGet(object, path, pathKey) { | |
if (object == null) { | |
return; | |
} | |
if (pathKey !== undefined && pathKey in toObject(object)) { | |
path = [pathKey]; | |
} | |
var index = 0, | |
length = path.length; | |
while (object != null && index < length) { | |
object = object[path[index++]]; | |
} | |
return index && index == length ? object : undefined; | |
} | |
module.exports = baseGet; | |
/***/ }, | |
/* 376 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* The base implementation of `_.slice` without an iteratee call guard. | |
* | |
* @private | |
* @param {Array} array The array to slice. | |
* @param {number} [start=0] The start position. | |
* @param {number} [end=array.length] The end position. | |
* @returns {Array} Returns the slice of `array`. | |
*/ | |
function baseSlice(array, start, end) { | |
var index = -1, | |
length = array.length; | |
start = start == null ? 0 : +start || 0; | |
if (start < 0) { | |
start = -start > length ? 0 : length + start; | |
} | |
end = end === undefined || end > length ? length : +end || 0; | |
if (end < 0) { | |
end += length; | |
} | |
length = start > end ? 0 : end - start >>> 0; | |
start >>>= 0; | |
var result = Array(length); | |
while (++index < length) { | |
result[index] = array[index + start]; | |
} | |
return result; | |
} | |
module.exports = baseSlice; | |
/***/ }, | |
/* 377 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
var isArray = __webpack_require__(338), | |
toObject = __webpack_require__(358); | |
/** Used to match property names within property paths. */ | |
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, | |
reIsPlainProp = /^\w*$/; | |
/** | |
* Checks if `value` is a property name and not a property path. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @param {Object} [object] The object to query keys on. | |
* @returns {boolean} Returns `true` if `value` is a property name, else `false`. | |
*/ | |
function isKey(value, object) { | |
var type = typeof value === 'undefined' ? 'undefined' : _typeof(value); | |
if (type == 'string' && reIsPlainProp.test(value) || type == 'number') { | |
return true; | |
} | |
if (isArray(value)) { | |
return false; | |
} | |
var result = !reIsDeepProp.test(value); | |
return result || object != null && value in toObject(object); | |
} | |
module.exports = isKey; | |
/***/ }, | |
/* 378 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* Gets the last element of `array`. | |
* | |
* @static | |
* @memberOf _ | |
* @category Array | |
* @param {Array} array The array to query. | |
* @returns {*} Returns the last element of `array`. | |
* @example | |
* | |
* _.last([1, 2, 3]); | |
* // => 3 | |
*/ | |
function last(array) { | |
var length = array ? array.length : 0; | |
return length ? array[length - 1] : undefined; | |
} | |
module.exports = last; | |
/***/ }, | |
/* 379 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseToString = __webpack_require__(380), | |
isArray = __webpack_require__(338); | |
/** Used to match property names within property paths. */ | |
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; | |
/** Used to match backslashes in property paths. */ | |
var reEscapeChar = /\\(\\)?/g; | |
/** | |
* Converts `value` to property path array if it's not one. | |
* | |
* @private | |
* @param {*} value The value to process. | |
* @returns {Array} Returns the property path array. | |
*/ | |
function toPath(value) { | |
if (isArray(value)) { | |
return value; | |
} | |
var result = []; | |
baseToString(value).replace(rePropName, function (match, number, quote, string) { | |
result.push(quote ? string.replace(reEscapeChar, '$1') : number || match); | |
}); | |
return result; | |
} | |
module.exports = toPath; | |
/***/ }, | |
/* 380 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
/** | |
* Converts `value` to a string if it's not one. An empty string is returned | |
* for `null` or `undefined` values. | |
* | |
* @private | |
* @param {*} value The value to process. | |
* @returns {string} Returns the string. | |
*/ | |
function baseToString(value) { | |
return value == null ? '' : value + ''; | |
} | |
module.exports = baseToString; | |
/***/ }, | |
/* 381 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseProperty = __webpack_require__(334), | |
basePropertyDeep = __webpack_require__(382), | |
isKey = __webpack_require__(377); | |
/** | |
* Creates a function that returns the property value at `path` on a | |
* given object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Utility | |
* @param {Array|string} path The path of the property to get. | |
* @returns {Function} Returns the new function. | |
* @example | |
* | |
* var objects = [ | |
* { 'a': { 'b': { 'c': 2 } } }, | |
* { 'a': { 'b': { 'c': 1 } } } | |
* ]; | |
* | |
* _.map(objects, _.property('a.b.c')); | |
* // => [2, 1] | |
* | |
* _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); | |
* // => [1, 2] | |
*/ | |
function property(path) { | |
return isKey(path) ? baseProperty(path) : basePropertyDeep(path); | |
} | |
module.exports = property; | |
/***/ }, | |
/* 382 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseGet = __webpack_require__(375), | |
toPath = __webpack_require__(379); | |
/** | |
* A specialized version of `baseProperty` which supports deep paths. | |
* | |
* @private | |
* @param {Array|string} path The path of the property to get. | |
* @returns {Function} Returns the new function. | |
*/ | |
function basePropertyDeep(path) { | |
var pathKey = path + ''; | |
path = toPath(path); | |
return function (object) { | |
return baseGet(object, path, pathKey); | |
}; | |
} | |
module.exports = basePropertyDeep; | |
/***/ }, | |
/* 383 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`, | |
* without support for callback shorthands and `this` binding, which iterates | |
* over `collection` using the provided `eachFunc`. | |
* | |
* @private | |
* @param {Array|Object|string} collection The collection to search. | |
* @param {Function} predicate The function invoked per iteration. | |
* @param {Function} eachFunc The function to iterate over `collection`. | |
* @param {boolean} [retKey] Specify returning the key of the found element | |
* instead of the element itself. | |
* @returns {*} Returns the found element or its key, else `undefined`. | |
*/ | |
function baseFind(collection, predicate, eachFunc, retKey) { | |
var result; | |
eachFunc(collection, function (value, key, collection) { | |
if (predicate(value, key, collection)) { | |
result = retKey ? key : value; | |
return false; | |
} | |
}); | |
return result; | |
} | |
module.exports = baseFind; | |
/***/ }, | |
/* 384 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* The base implementation of `_.findIndex` and `_.findLastIndex` without | |
* support for callback shorthands and `this` binding. | |
* | |
* @private | |
* @param {Array} array The array to search. | |
* @param {Function} predicate The function invoked per iteration. | |
* @param {boolean} [fromRight] Specify iterating from right to left. | |
* @returns {number} Returns the index of the matched value, else `-1`. | |
*/ | |
function baseFindIndex(array, predicate, fromRight) { | |
var length = array.length, | |
index = fromRight ? length : -1; | |
while (fromRight ? index-- : ++index < length) { | |
if (predicate(array[index], index, array)) { | |
return index; | |
} | |
} | |
return -1; | |
} | |
module.exports = baseFindIndex; | |
/***/ }, | |
/* 385 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
module.exports = __webpack_require__(386); | |
/***/ }, | |
/* 386 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseCallback = __webpack_require__(361), | |
baseUniq = __webpack_require__(387), | |
isIterateeCall = __webpack_require__(346), | |
sortedUniq = __webpack_require__(394); | |
/** | |
* Creates a duplicate-free version of an array, using | |
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) | |
* for equality comparisons, in which only the first occurence of each element | |
* is kept. Providing `true` for `isSorted` performs a faster search algorithm | |
* for sorted arrays. If an iteratee function is provided it's invoked for | |
* each element in the array to generate the criterion by which uniqueness | |
* is computed. The `iteratee` is bound to `thisArg` and invoked with three | |
* arguments: (value, index, array). | |
* | |
* If a property name is provided for `iteratee` the created `_.property` | |
* style callback returns the property value of the given element. | |
* | |
* If a value is also provided for `thisArg` the created `_.matchesProperty` | |
* style callback returns `true` for elements that have a matching property | |
* value, else `false`. | |
* | |
* If an object is provided for `iteratee` the created `_.matches` style | |
* callback returns `true` for elements that have the properties of the given | |
* object, else `false`. | |
* | |
* @static | |
* @memberOf _ | |
* @alias unique | |
* @category Array | |
* @param {Array} array The array to inspect. | |
* @param {boolean} [isSorted] Specify the array is sorted. | |
* @param {Function|Object|string} [iteratee] The function invoked per iteration. | |
* @param {*} [thisArg] The `this` binding of `iteratee`. | |
* @returns {Array} Returns the new duplicate-value-free array. | |
* @example | |
* | |
* _.uniq([2, 1, 2]); | |
* // => [2, 1] | |
* | |
* // using `isSorted` | |
* _.uniq([1, 1, 2], true); | |
* // => [1, 2] | |
* | |
* // using an iteratee function | |
* _.uniq([1, 2.5, 1.5, 2], function(n) { | |
* return this.floor(n); | |
* }, Math); | |
* // => [1, 2.5] | |
* | |
* // using the `_.property` callback shorthand | |
* _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); | |
* // => [{ 'x': 1 }, { 'x': 2 }] | |
*/ | |
function uniq(array, isSorted, iteratee, thisArg) { | |
var length = array ? array.length : 0; | |
if (!length) { | |
return []; | |
} | |
if (isSorted != null && typeof isSorted != 'boolean') { | |
thisArg = iteratee; | |
iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted; | |
isSorted = false; | |
} | |
iteratee = iteratee == null ? iteratee : baseCallback(iteratee, thisArg, 3); | |
return isSorted ? sortedUniq(array, iteratee) : baseUniq(array, iteratee); | |
} | |
module.exports = uniq; | |
/***/ }, | |
/* 387 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseIndexOf = __webpack_require__(388), | |
cacheIndexOf = __webpack_require__(390), | |
createCache = __webpack_require__(391); | |
/** Used as the size to enable large array optimizations. */ | |
var LARGE_ARRAY_SIZE = 200; | |
/** | |
* The base implementation of `_.uniq` without support for callback shorthands | |
* and `this` binding. | |
* | |
* @private | |
* @param {Array} array The array to inspect. | |
* @param {Function} [iteratee] The function invoked per iteration. | |
* @returns {Array} Returns the new duplicate free array. | |
*/ | |
function baseUniq(array, iteratee) { | |
var index = -1, | |
indexOf = baseIndexOf, | |
length = array.length, | |
isCommon = true, | |
isLarge = isCommon && length >= LARGE_ARRAY_SIZE, | |
seen = isLarge ? createCache() : null, | |
result = []; | |
if (seen) { | |
indexOf = cacheIndexOf; | |
isCommon = false; | |
} else { | |
isLarge = false; | |
seen = iteratee ? [] : result; | |
} | |
outer: while (++index < length) { | |
var value = array[index], | |
computed = iteratee ? iteratee(value, index, array) : value; | |
if (isCommon && value === value) { | |
var seenIndex = seen.length; | |
while (seenIndex--) { | |
if (seen[seenIndex] === computed) { | |
continue outer; | |
} | |
} | |
if (iteratee) { | |
seen.push(computed); | |
} | |
result.push(value); | |
} else if (indexOf(seen, computed, 0) < 0) { | |
if (iteratee || isLarge) { | |
seen.push(computed); | |
} | |
result.push(value); | |
} | |
} | |
return result; | |
} | |
module.exports = baseUniq; | |
/***/ }, | |
/* 388 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var indexOfNaN = __webpack_require__(389); | |
/** | |
* The base implementation of `_.indexOf` without support for binary searches. | |
* | |
* @private | |
* @param {Array} array The array to search. | |
* @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) { | |
if (value !== value) { | |
return indexOfNaN(array, fromIndex); | |
} | |
var index = fromIndex - 1, | |
length = array.length; | |
while (++index < length) { | |
if (array[index] === value) { | |
return index; | |
} | |
} | |
return -1; | |
} | |
module.exports = baseIndexOf; | |
/***/ }, | |
/* 389 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* Gets the index at which the first occurrence of `NaN` is found in `array`. | |
* | |
* @private | |
* @param {Array} array The array to search. | |
* @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 `NaN`, else `-1`. | |
*/ | |
function indexOfNaN(array, fromIndex, fromRight) { | |
var length = array.length, | |
index = fromIndex + (fromRight ? 0 : -1); | |
while (fromRight ? index-- : ++index < length) { | |
var other = array[index]; | |
if (other !== other) { | |
return index; | |
} | |
} | |
return -1; | |
} | |
module.exports = indexOfNaN; | |
/***/ }, | |
/* 390 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObject = __webpack_require__(330); | |
/** | |
* Checks if `value` is in `cache` mimicking the return signature of | |
* `_.indexOf` by returning `0` if the value is found, else `-1`. | |
* | |
* @private | |
* @param {Object} cache The cache to search. | |
* @param {*} value The value to search for. | |
* @returns {number} Returns `0` if `value` is found, else `-1`. | |
*/ | |
function cacheIndexOf(cache, value) { | |
var data = cache.data, | |
result = typeof value == 'string' || isObject(value) ? data.set.has(value) : data.hash[value]; | |
return result ? 0 : -1; | |
} | |
module.exports = cacheIndexOf; | |
/***/ }, | |
/* 391 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/* WEBPACK VAR INJECTION */(function(global) {'use strict'; | |
var SetCache = __webpack_require__(392), | |
getNative = __webpack_require__(327); | |
/** Native method references. */ | |
var Set = getNative(global, 'Set'); | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeCreate = getNative(Object, 'create'); | |
/** | |
* Creates a `Set` cache object to optimize linear searches of large arrays. | |
* | |
* @private | |
* @param {Array} [values] The values to cache. | |
* @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. | |
*/ | |
function createCache(values) { | |
return nativeCreate && Set ? new SetCache(values) : null; | |
} | |
module.exports = createCache; | |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) | |
/***/ }, | |
/* 392 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/* WEBPACK VAR INJECTION */(function(global) {'use strict'; | |
var cachePush = __webpack_require__(393), | |
getNative = __webpack_require__(327); | |
/** Native method references. */ | |
var Set = getNative(global, 'Set'); | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeCreate = getNative(Object, 'create'); | |
/** | |
* | |
* Creates a cache object to store unique values. | |
* | |
* @private | |
* @param {Array} [values] The values to cache. | |
*/ | |
function SetCache(values) { | |
var length = values ? values.length : 0; | |
this.data = { 'hash': nativeCreate(null), 'set': new Set() }; | |
while (length--) { | |
this.push(values[length]); | |
} | |
} | |
// Add functions to the `Set` cache. | |
SetCache.prototype.push = cachePush; | |
module.exports = SetCache; | |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) | |
/***/ }, | |
/* 393 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var isObject = __webpack_require__(330); | |
/** | |
* Adds `value` to the cache. | |
* | |
* @private | |
* @name push | |
* @memberOf SetCache | |
* @param {*} value The value to cache. | |
*/ | |
function cachePush(value) { | |
var data = this.data; | |
if (typeof value == 'string' || isObject(value)) { | |
data.set.add(value); | |
} else { | |
data.hash[value] = true; | |
} | |
} | |
module.exports = cachePush; | |
/***/ }, | |
/* 394 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* An implementation of `_.uniq` optimized for sorted arrays without support | |
* for callback shorthands and `this` binding. | |
* | |
* @private | |
* @param {Array} array The array to inspect. | |
* @param {Function} [iteratee] The function invoked per iteration. | |
* @returns {Array} Returns the new duplicate free array. | |
*/ | |
function sortedUniq(array, iteratee) { | |
var seen, | |
index = -1, | |
length = array.length, | |
resIndex = -1, | |
result = []; | |
while (++index < length) { | |
var value = array[index], | |
computed = iteratee ? iteratee(value, index, array) : value; | |
if (!index || seen !== computed) { | |
seen = computed; | |
result[++resIndex] = value; | |
} | |
} | |
return result; | |
} | |
module.exports = sortedUniq; | |
/***/ }, | |
/* 395 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* A no-operation function that returns `undefined` regardless of the | |
* arguments it receives. | |
* | |
* @static | |
* @memberOf _ | |
* @category Utility | |
* @example | |
* | |
* var object = { 'user': 'fred' }; | |
* | |
* _.noop(object) === undefined; | |
* // => true | |
*/ | |
function noop() { | |
// No operation performed. | |
} | |
module.exports = noop; | |
/***/ }, | |
/* 396 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
module.exports = __webpack_require__(397); | |
/***/ }, | |
/* 397 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var arrayEach = __webpack_require__(398), | |
baseEach = __webpack_require__(354), | |
createForEach = __webpack_require__(399); | |
/** | |
* Iterates over elements of `collection` invoking `iteratee` for each element. | |
* The `iteratee` is bound to `thisArg` and invoked with three arguments: | |
* (value, index|key, collection). Iteratee functions may exit iteration early | |
* by explicitly returning `false`. | |
* | |
* **Note:** As with other "Collections" methods, objects with a "length" property | |
* are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` | |
* may be used for object iteration. | |
* | |
* @static | |
* @memberOf _ | |
* @alias each | |
* @category Collection | |
* @param {Array|Object|string} collection The collection to iterate over. | |
* @param {Function} [iteratee=_.identity] The function invoked per iteration. | |
* @param {*} [thisArg] The `this` binding of `iteratee`. | |
* @returns {Array|Object|string} Returns `collection`. | |
* @example | |
* | |
* _([1, 2]).forEach(function(n) { | |
* console.log(n); | |
* }).value(); | |
* // => logs each value from left to right and returns the array | |
* | |
* _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { | |
* console.log(n, key); | |
* }); | |
* // => logs each value-key pair and returns the object (iteration order is not guaranteed) | |
*/ | |
var forEach = createForEach(arrayEach, baseEach); | |
module.exports = forEach; | |
/***/ }, | |
/* 398 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* A specialized version of `_.forEach` for arrays without support for callback | |
* shorthands and `this` binding. | |
* | |
* @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.length; | |
while (++index < length) { | |
if (iteratee(array[index], index, array) === false) { | |
break; | |
} | |
} | |
return array; | |
} | |
module.exports = arrayEach; | |
/***/ }, | |
/* 399 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var bindCallback = __webpack_require__(344), | |
isArray = __webpack_require__(338); | |
/** | |
* Creates a function for `_.forEach` or `_.forEachRight`. | |
* | |
* @private | |
* @param {Function} arrayFunc The function to iterate over an array. | |
* @param {Function} eachFunc The function to iterate over a collection. | |
* @returns {Function} Returns the new each function. | |
*/ | |
function createForEach(arrayFunc, eachFunc) { | |
return function (collection, iteratee, thisArg) { | |
return typeof iteratee == 'function' && thisArg === undefined && isArray(collection) ? arrayFunc(collection, iteratee) : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); | |
}; | |
} | |
module.exports = createForEach; | |
/***/ }, | |
/* 400 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseValues = __webpack_require__(401), | |
keys = __webpack_require__(326); | |
/** | |
* Creates an array of the own enumerable property values of `object`. | |
* | |
* **Note:** Non-object values are coerced to objects. | |
* | |
* @static | |
* @memberOf _ | |
* @category Object | |
* @param {Object} object The object to query. | |
* @returns {Array} Returns the array of property values. | |
* @example | |
* | |
* function Foo() { | |
* this.a = 1; | |
* this.b = 2; | |
* } | |
* | |
* Foo.prototype.c = 3; | |
* | |
* _.values(new Foo); | |
* // => [1, 2] (iteration order is not guaranteed) | |
* | |
* _.values('hi'); | |
* // => ['h', 'i'] | |
*/ | |
function values(object) { | |
return baseValues(object, keys(object)); | |
} | |
module.exports = values; | |
/***/ }, | |
/* 401 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* The base implementation of `_.values` and `_.valuesIn` which creates an | |
* array of `object` property values corresponding to the property names | |
* of `props`. | |
* | |
* @private | |
* @param {Object} object The object to query. | |
* @param {Array} props The property names to get values for. | |
* @returns {Object} Returns the array of property values. | |
*/ | |
function baseValues(object, props) { | |
var index = -1, | |
length = props.length, | |
result = Array(length); | |
while (++index < length) { | |
result[index] = object[props[index]]; | |
} | |
return result; | |
} | |
module.exports = baseValues; | |
/***/ }, | |
/* 402 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.__esModule = true; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
var _noop = __webpack_require__(395); | |
var _noop2 = _interopRequireDefault(_noop); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var warning = _noop2.default; | |
if (false) { | |
warning = function warning(check, format) { | |
if (format === undefined) { | |
throw new Error('`subschema: warning(condition, format, ...args)` requires a warning message argument'); | |
} | |
if (check) { | |
return; | |
} | |
var args = arguments, | |
i = 2, | |
message = 'Subschema Warning: ' + format.replace(/%s/g, function () { | |
return args[i++]; | |
}); | |
if ((typeof console === 'undefined' ? 'undefined' : _typeof(console)) !== void 0) { | |
console.error(message); | |
} | |
try { | |
//trigger debugger; | |
throw new Error(message); | |
} catch (x) {} | |
}; | |
} | |
exports.default = warning; | |
/***/ }, | |
/* 403 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var context = __webpack_require__(404), | |
api = {}; //make sure you have your directory and regex test set correctly! | |
context.keys().forEach(function (key) { | |
var k = key.replace(/^\.\/(.*)\.js(x)?$/, '$1'); | |
api[k] = context(key).default; | |
}); | |
module.exports = api; | |
/***/ }, | |
/* 404 */ | |
/***/ function(module, exports, __webpack_require__) { | |
var map = { | |
"./AutocompleteItemTemplate.jsx": 405, | |
"./ButtonTemplate.jsx": 406, | |
"./ButtonsTemplate.jsx": 407, | |
"./CheckboxTemplate.jsx": 409, | |
"./CheckboxesGroupTemplate.jsx": 410, | |
"./CheckboxesTemplate.jsx": 411, | |
"./CollectionCreateTemplate.jsx": 412, | |
"./ContentItemTemplate.jsx": 415, | |
"./EditorTemplate.jsx": 417, | |
"./FieldSetTemplate.jsx": 418, | |
"./FormTemplate.jsx": 419, | |
"./ListItemTemplate.jsx": 420, | |
"./ModalTemplate.jsx": 421, | |
"./ObjectTemplate.jsx": 430, | |
"./RadioItemTemplate.jsx": 431, | |
"./WizardProgressTemplate.jsx": 432, | |
"./WizardTemplate.jsx": 433 | |
}; | |
function webpackContext(req) { | |
return __webpack_require__(webpackContextResolve(req)); | |
}; | |
function webpackContextResolve(req) { | |
return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }()); | |
}; | |
webpackContext.keys = function webpackContextKeys() { | |
return Object.keys(map); | |
}; | |
webpackContext.resolve = webpackContextResolve; | |
module.exports = webpackContext; | |
webpackContext.id = 404; | |
/***/ }, | |
/* 405 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var AutocompleteItemTemplate = function (_Component) { | |
_inherits(AutocompleteItemTemplate, _Component); | |
function AutocompleteItemTemplate() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, AutocompleteItemTemplate); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.handleClick = function (e) { | |
e && e.preventDefault(); | |
_this.props.onSelect(_this.props.data); | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
AutocompleteItemTemplate.prototype.render = function render() { | |
var _props = this.props; | |
var data = _props.data; | |
var focus = _props.focus; | |
var itemClass = _props.itemClass; | |
var focusedClass = _props.focusedClass; | |
var value = _props.value; | |
var processor = _props.processor; | |
var __html = processor.format(data, value, true); | |
return __html == null ? null : _react2.default.createElement('li', { ref: 'item', className: itemClass + ' ' + (focus ? focusedClass : ''), onClick: this.handleClick, | |
dangerouslySetInnerHTML: { __html: __html } }); | |
}; | |
return AutocompleteItemTemplate; | |
}(_react.Component); | |
AutocompleteItemTemplate.defaultProps = { | |
data: null, | |
value: null, | |
focus: false, | |
processor: null | |
}; | |
AutocompleteItemTemplate.propTypes = { | |
onSelect: _PropTypes2.default.event, | |
style: _PropTypes2.default.style | |
}; | |
exports.default = AutocompleteItemTemplate; | |
/***/ }, | |
/* 406 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var Button = function (_Component) { | |
_inherits(Button, _Component); | |
function Button() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, Button); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.handleClick = function (e) { | |
var _this$props = _this.props; | |
var onChange = _this$props.onChange; | |
var value = _this$props.value; | |
var name = _this$props.name; | |
var action = _this$props.action; | |
var label = _this$props.label; | |
if (name && onChange) { | |
onChange(value, name); | |
} | |
_this.props.onClick(e, value || action || label, _this); | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
Button.prototype.render = function render() { | |
var _props = this.props; | |
var buttonClass = _props.buttonClass; | |
var className = _props.className; | |
var title = _props.title; | |
var iconClass = _props.iconClass; | |
var onClick = _props.onClick; | |
var label = _props.label; | |
var props = _objectWithoutProperties(_props, ["buttonClass", "className", "title", "iconClass", "onClick", "label"]); | |
return _react2.default.createElement( | |
"button", | |
_extends({ className: className || buttonClass }, props, { onClick: this.handleClick }), | |
iconClass ? _react2.default.createElement("i", { className: iconClass }) : null, | |
label | |
); | |
}; | |
return Button; | |
}(_react.Component); | |
Button.defaultProps = { | |
action: 'Submit', | |
label: 'Submit', | |
buttonClass: 'btn', | |
iconClass: null, | |
disabled: false | |
}; | |
Button.propTypes = { | |
onClick: _react.PropTypes.func, | |
disabled: _react.PropTypes.bool, | |
title: _react.PropTypes.string, | |
buttonClass: _react.PropTypes.string, | |
iconClass: _react.PropTypes.string, | |
action: _react.PropTypes.string, | |
label: _react.PropTypes.string, | |
name: _react.PropTypes.string, | |
type: _react.PropTypes.string, | |
value: _react.PropTypes.string, | |
className: _react.PropTypes.string, | |
formAction: _react.PropTypes.string, | |
formEncType: _react.PropTypes.string, | |
formMethod: _react.PropTypes.string, | |
formNoValidate: _react.PropTypes.string, | |
formTarget: _react.PropTypes.string | |
}; | |
exports.default = Button; | |
/***/ }, | |
/* 407 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _tutils = __webpack_require__(322); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _RenderTemplate = __webpack_require__(408); | |
var _RenderTemplate2 = _interopRequireDefault(_RenderTemplate); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var ButtonsTemplate = function (_Component) { | |
_inherits(ButtonsTemplate, _Component); | |
function ButtonsTemplate() { | |
_classCallCheck(this, ButtonsTemplate); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
ButtonsTemplate.prototype.makeButtons = function makeButtons(buttons) { | |
var _this2 = this; | |
var onClick = this.props.onButtonClick || this.props.onClick, | |
buttonTemplate = this.props.buttonTemplate; | |
return buttons.map(function (b) { | |
onClick = b.onClick || onClick; | |
var btn = (0, _tutils.isString)(b) ? { | |
action: b, | |
label: b, | |
onClick: onClick | |
} : (0, _tutils.extend)({}, b, { onClick: onClick, template: buttonTemplate }); | |
if (_this2.props.buttonClass) { | |
btn.buttonClass = (btn.buttonClass || '') + " " + (_this2.props.buttonClass || ''); | |
} | |
if (btn.primary) { | |
btn.buttonClass = btn.buttonClass + " " + _this2.props.primaryClass; | |
} | |
return btn; | |
}); | |
}; | |
ButtonsTemplate.prototype.render = function render() { | |
var _props = this.props; | |
var buttons = _props.buttons; | |
var buttonTemplate = _props.buttonTemplate; | |
var buttonsClass = _props.buttonsClass; | |
var buttonContainerClass = _props.buttonContainerClass; | |
if (buttons.buttons) { | |
buttonsClass = buttons.buttonsClass || buttonsClass; | |
buttons = buttons.buttons; | |
} | |
return _react2.default.createElement( | |
"div", | |
{ className: buttonContainerClass }, | |
_react2.default.createElement( | |
"div", | |
{ className: buttonsClass }, | |
this.makeButtons(buttons).map(function (b, i) { | |
return _react2.default.createElement(_RenderTemplate2.default, _extends({ template: buttonTemplate, key: "btn-" + i }, b)); | |
}) | |
) | |
); | |
}; | |
return ButtonsTemplate; | |
}(_react.Component); | |
ButtonsTemplate.defaultProps = { | |
buttonTemplate: 'ButtonTemplate', | |
buttons: [{ | |
action: 'submit', | |
label: 'Submit', | |
type: 'submit', | |
template: 'Button', | |
primary: true | |
}], | |
onButtonClick: function onButtonClick(event, action, btn, value) {} | |
}; | |
ButtonsTemplate.propTypes = { | |
buttonTemplate: _PropTypes2.default.template, | |
buttonClass: _PropTypes2.default.cssClass, | |
style: _PropTypes2.default.style | |
}; | |
exports.default = ButtonsTemplate; | |
/***/ }, | |
/* 408 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
/** | |
* This is to be used to render properties with templates. | |
* Just a convient wrapper so that things go well. | |
* | |
* @param props | |
* @returns {*} | |
* @constructor | |
*/ | |
function RenderTemplate(props) { | |
var children = props.children; | |
var _props$template = props.template; | |
var template = _props$template === undefined ? _tutils.FREEZE_OBJ : _props$template; | |
var rest = _objectWithoutProperties(props, ['children', 'template']); | |
var Template = void 0; | |
if (template === false || template == null) { | |
return children; | |
} else if (typeof template === 'function') { | |
Template = template; | |
template = _tutils.FREEZE_OBJ; | |
} else { | |
var _template = template; | |
Template = _template.Template; | |
template = _objectWithoutProperties(_template, ['Template']); | |
} | |
return _react2.default.createElement( | |
Template, | |
_extends({}, template, rest), | |
children | |
); | |
} | |
RenderTemplate.displayName = 'RenderTemplate'; | |
exports.default = RenderTemplate; | |
/***/ }, | |
/* 409 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var CheckboxTemplate = function (_Component) { | |
_inherits(CheckboxTemplate, _Component); | |
function CheckboxTemplate() { | |
_classCallCheck(this, CheckboxTemplate); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
CheckboxTemplate.prototype.render = function render() { | |
var _props = this.props; | |
var children = _props.children; | |
var checkboxClass = _props.checkboxClass; | |
var checked = _props.checked; | |
var checkedClass = _props.checkedClass; | |
var uncheckedClass = _props.uncheckedClass; | |
var label = _props.label; | |
return _react2.default.createElement( | |
'div', | |
{ className: checkboxClass + ' ' + (checked ? checkedClass : uncheckedClass) + ' ' }, | |
_react2.default.createElement( | |
'label', | |
null, | |
children, | |
label | |
) | |
); | |
}; | |
return CheckboxTemplate; | |
}(_react.Component); | |
CheckboxTemplate.propTypes = { | |
label: _PropTypes2.default.node, | |
style: _PropTypes2.default.style, | |
checked: _PropTypes2.default.bool | |
}; | |
CheckboxTemplate.defaultProps = { | |
style: "CheckboxTemplate", | |
checkedClass: "", | |
uncheckedClass: "", | |
checkboxClass: "" | |
}; | |
exports.default = CheckboxTemplate; | |
/***/ }, | |
/* 410 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var CheckboxesGroupTemplate = function (_Component) { | |
_inherits(CheckboxesGroupTemplate, _Component); | |
function CheckboxesGroupTemplate() { | |
_classCallCheck(this, CheckboxesGroupTemplate); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
CheckboxesGroupTemplate.prototype.render = function render() { | |
return _react2.default.createElement( | |
'fieldset', | |
{ className: this.props.groupClass }, | |
_react2.default.createElement( | |
'legend', | |
null, | |
this.props.legend | |
), | |
this.props.children | |
); | |
}; | |
return CheckboxesGroupTemplate; | |
}(_react.Component); | |
CheckboxesGroupTemplate.propTypes = { | |
legend: _PropTypes2.default.node, | |
style: _PropTypes2.default.style | |
}; | |
exports.default = CheckboxesGroupTemplate; | |
/***/ }, | |
/* 411 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
module.exports = __webpack_require__(409); | |
/***/ }, | |
/* 412 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _Content = __webpack_require__(413); | |
var _Content2 = _interopRequireDefault(_Content); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var CollectionCreateTemplate = function (_Component) { | |
_inherits(CollectionCreateTemplate, _Component); | |
function CollectionCreateTemplate() { | |
_classCallCheck(this, CollectionCreateTemplate); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
CollectionCreateTemplate.prototype.renderInline = function renderInline() { | |
return _react2.default.createElement( | |
'div', | |
{ className: this.props.inlineClass }, | |
this.props.children | |
); | |
}; | |
CollectionCreateTemplate.prototype.renderPanel = function renderPanel() { | |
var _props = this.props; | |
var title = _props.title; | |
var panelClass = _props.panelClass; | |
var editText = _props.editText; | |
var createText = _props.createText; | |
var panelTitleClass = _props.panelTitleClass; | |
var panelHeadingClass = _props.panelHeadingClass; | |
var panelBodyClass = _props.panelBodyClass; | |
var groupClass = _props.groupClass; | |
var create = _props.create; | |
if (title === false) { | |
title = ''; | |
} else if (title == null) { | |
title = create ? createText : editText; | |
} else if (typeof title === 'string') { | |
title = { | |
type: 'h3', | |
content: create ? createText + ' ' + title : editText + ' ' + title, | |
className: panelTitleClass | |
}; | |
} | |
return _react2.default.createElement( | |
'div', | |
{ className: panelClass }, | |
_react2.default.createElement(_Content2.default, { content: title, type: 'div', className: panelHeadingClass }), | |
_react2.default.createElement( | |
'div', | |
{ className: this.props.panelBodyClass }, | |
_react2.default.createElement( | |
'div', | |
{ className: this.props.groupClass }, | |
this.props.children | |
) | |
) | |
); | |
}; | |
CollectionCreateTemplate.prototype.render = function render() { | |
return this.props.inline ? this.renderInline() : this.renderPanel(); | |
}; | |
return CollectionCreateTemplate; | |
}(_react.Component); | |
CollectionCreateTemplate.propTypes = { | |
title: _PropTypes2.default.node, | |
style: _PropTypes2.default.style, | |
inline: _PropTypes2.default.bool, | |
create: _PropTypes2.default.bool, | |
editText: _PropTypes2.default.string, | |
createText: _PropTypes2.default.string | |
}; | |
CollectionCreateTemplate.defaultProps = { | |
create: true, | |
editText: 'Edit ', | |
createText: 'Create ' | |
}; | |
exports.default = CollectionCreateTemplate; | |
; | |
/***/ }, | |
/* 413 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _tutils = __webpack_require__(322); | |
var _warning = __webpack_require__(402); | |
var _warning2 = _interopRequireDefault(_warning); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _ContentWrapper = __webpack_require__(414); | |
var _ContentWrapper2 = _interopRequireDefault(_ContentWrapper); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var has = Function.call.bind(Object.prototype.hasOwnProperty); | |
/** | |
* Content allows for arbitrary html to be added to a component, | |
* if children is specified, than the children will be rendered. | |
* set to true and it will render the children, set to an object, | |
* and it will iterate through the children wrapping each child | |
* with the described content. If no children:true or true is supplied | |
* than the actual content will not be output. | |
* | |
* | |
*/ | |
var Content = function (_Component) { | |
_inherits(Content, _Component); | |
function Content() { | |
_classCallCheck(this, Content); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
//Expose for react-native subschema. | |
Content.prototype.renderChild = function renderChild(value, prefix, componentChildren) { | |
var _this2 = this; | |
//value true is a shortcut to {children:true}. This means content:true would also return the children. | |
var Content = value.Content; | |
var injected = value.injected; | |
var contentWrapper = value.contentWrapper; | |
var content = value.content; | |
var children = value.children; | |
var _value$type = value.type; | |
var type = _value$type === undefined ? this.props.type : _value$type; | |
var props = _objectWithoutProperties(value, ["Content", "injected", "contentWrapper", "content", "children", "type"]); | |
if (content === true) { | |
return componentChildren; | |
} | |
if ((0, _tutils.isString)(content)) { | |
var ContentWrapper = this.props.contentWrapper; | |
return _react2.default.createElement(ContentWrapper, { path: this.props.path, fieldAttrs: props, key: 'content-' + prefix, type: type, | |
content: content }); | |
} | |
var newChildren = void 0; | |
if (children) { | |
if (children === true) { | |
newChildren = componentChildren; | |
} else { | |
newChildren = _react.Children.map(componentChildren, function (child, i) { | |
(0, _warning2.default)(typeof children != 'string', "children property can not be a string"); | |
return _this2.renderChild(children, "child-" + prefix + "-" + i, child); | |
}); | |
} | |
} else if ((0, _tutils.isArray)(content)) { | |
newChildren = content.map(function (c, key) { | |
var newC = _this2.asContentObject(c); | |
return _this2.renderChild(newC, prefix + '-s-' + key, componentChildren); | |
}, this); | |
} else if (content === false) { | |
newChildren = null; | |
} else { | |
newChildren = children; | |
} | |
if (this.constructor.Types[type]) { | |
if ((0, _tutils.isArray)(newChildren)) { | |
return _react.createElement.apply(undefined, [type, props].concat(newChildren)); | |
} | |
return (0, _react.createElement)(type, props, newChildren); | |
} | |
var Ctype = this.context.injector.inject(this.context.loader.loadType(type)); | |
return _react2.default.createElement( | |
Ctype, | |
_extends({ path: this.props.path, content: content }, props), | |
children | |
); | |
}; | |
Content.prototype.asContentObject = function asContentObject(content, props) { | |
var _this3 = this; | |
if (content == null) { | |
return props; | |
} | |
if (has(content, 'content') || has(content, 'children')) { | |
return _extends({}, props, content); | |
} | |
if (typeof content === 'string' || Array.isArray(content) || content === true || content === false) { | |
return _extends({}, props, { | |
content: content | |
}); | |
} | |
//I made a mistake, I should not have allowed key, value types, but I did so, I'll try... | |
return _extends({}, props, { | |
content: Object.keys(content).map(function (type) { | |
return _this3.asContentObject(content[type], { type: type }); | |
}) | |
}); | |
}; | |
Content.prototype.render = function render() { | |
var _props = this.props; | |
var injected = _props.injected; | |
var contentWrapper = _props.contentWrapper; | |
var content = _props.content; | |
var children = _props.children; | |
var field = _props.field; | |
var context = _props.context; | |
var props = _objectWithoutProperties(_props, ["injected", "contentWrapper", "content", "children", "field", "context"]); | |
if (content === false) { | |
return null; | |
} | |
var normalContent = this.asContentObject(content, props); | |
return this.renderChild(normalContent, 'obj', children); | |
}; | |
return Content; | |
}(_react.Component); | |
Content.isContainer = true; | |
Content.contextTypes = { | |
loader: _PropTypes2.default.loader, | |
injector: _PropTypes2.default.injector | |
}; | |
Content.propTypes = { | |
content: _PropTypes2.default.any, | |
contentWrapper: _PropTypes2.default.injectClass, | |
value: _PropTypes2.default.any, | |
onChange: _PropTypes2.default.any, | |
title: _PropTypes2.default.any, | |
className: _PropTypes2.default.cssClass, | |
id: _PropTypes2.default.any, | |
name: _PropTypes2.default.any, | |
type: _PropTypes2.default.string, | |
injected: _PropTypes2.default.injectedClass, | |
dataType: _PropTypes2.default.dataType | |
}; | |
Content.defaultProps = { | |
type: 'span', | |
content: '', | |
contentWrapper: _ContentWrapper2.default, | |
injected: Content | |
}; | |
Content.Types = _react.DOM || {}; | |
exports.default = Content; | |
/***/ }, | |
/* 414 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var ContentWrapper = function (_Component) { | |
_inherits(ContentWrapper, _Component); | |
function ContentWrapper() { | |
_classCallCheck(this, ContentWrapper); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
ContentWrapper.prototype.render = function render() { | |
var _props = this.props; | |
var type = _props.type; | |
var content = _props.content; | |
var children = _props.children; | |
var context = _props.context; | |
var _props$fieldAttrs = _props.fieldAttrs; | |
var fieldAttrs = _props$fieldAttrs === undefined ? _tutils.FREEZE_OBJ : _props$fieldAttrs; | |
var props = _objectWithoutProperties(_props, ['type', 'content', 'children', 'context', 'fieldAttrs']); | |
if (typeof type == 'string') { | |
return _react2.default.createElement(type, _extends({}, fieldAttrs, props, { dangerouslySetInnerHTML: { __html: content } })); | |
} | |
var Type = type; | |
return _react2.default.createElement(Type, props); | |
}; | |
return ContentWrapper; | |
}(_react.Component); | |
ContentWrapper.defaultProps = { | |
type: 'span', | |
content: '' | |
}; | |
ContentWrapper.propTypes = { | |
content: _PropTypes2.default.expression, | |
type: _PropTypes2.default.domType, | |
value: _PropTypes2.default.any, | |
onChange: _PropTypes2.default.any, | |
title: _PropTypes2.default.any, | |
className: _PropTypes2.default.cssClass, | |
id: _PropTypes2.default.any, | |
name: _PropTypes2.default.any, | |
fieldAttrs: _PropTypes2.default.any | |
}; | |
exports.default = ContentWrapper; | |
/***/ }, | |
/* 415 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _get2 = __webpack_require__(416); | |
var _get3 = _interopRequireDefault(_get2); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var ContentItemTemplate = function (_Component) { | |
_inherits(ContentItemTemplate, _Component); | |
function ContentItemTemplate() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, ContentItemTemplate); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.handleClick = function (e) { | |
e && e.preventDefault(); | |
_this.props.onClick(_this.props.pos, _this.props.value.value, _this.props.pid); | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
//(pos, val, pid) | |
ContentItemTemplate.prototype.render = function render() { | |
var _props = this.props; | |
var value = _props.value; | |
var showKey = _props.showKey; | |
var children = _props.children; | |
var itemInnerClass = _props.itemInnerClass; | |
var itemClass = _props.itemClass; | |
var clickableClass = _props.clickableClass; | |
var labelKey = _props.labelKey; | |
var key = value.key || ''; | |
var _label = labelKey ? (0, _get3.default)(value.value, labelKey, '') : value.value; | |
return _react2.default.createElement( | |
'span', | |
{ onClick: this.handleClick, className: this.props.onClick ? clickableClass : '' }, | |
showKey ? _react2.default.createElement( | |
'h4', | |
{ className: itemClass }, | |
key | |
) : null, | |
_react2.default.createElement( | |
'span', | |
{ className: itemInnerClass }, | |
_label | |
), | |
children | |
); | |
}; | |
return ContentItemTemplate; | |
}(_react.Component); | |
ContentItemTemplate.propTypes = { | |
onClick: _PropTypes2.default.func, | |
pid: _PropTypes2.default.any, | |
pos: _PropTypes2.default.number, | |
showKey: _PropTypes2.default.bool, | |
labelKey: _PropTypes2.default.string, | |
itemInnerClass: _PropTypes2.default.string, | |
clickableClass: _PropTypes2.default.string, | |
value: function value(props, propName, componentName) { | |
var value = props[propName]; | |
var labelKey = props.labelKey; | |
if ('value' in props) { | |
if (labelKey) { | |
return _PropTypes2.default.node(props.value, labelKey, componentName); | |
} else return _PropTypes2.default.node(value, 'value', componentName); | |
} | |
if (props.showKey) { | |
return _PropTypes2.default.node(props, 'key', componentName); | |
} | |
} | |
}; | |
ContentItemTemplate.defaultProps = { | |
clickableClass: 'clickable' | |
}; | |
exports.default = ContentItemTemplate; | |
/***/ }, | |
/* 416 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseGet = __webpack_require__(375), | |
toPath = __webpack_require__(379); | |
/** | |
* Gets the property value at `path` of `object`. If the resolved value is | |
* `undefined` the `defaultValue` is used in its place. | |
* | |
* @static | |
* @memberOf _ | |
* @category Object | |
* @param {Object} object The object to query. | |
* @param {Array|string} path The path of the property to get. | |
* @param {*} [defaultValue] The value returned if the resolved value is `undefined`. | |
* @returns {*} Returns the resolved value. | |
* @example | |
* | |
* var object = { 'a': [{ 'b': { 'c': 3 } }] }; | |
* | |
* _.get(object, 'a[0].b.c'); | |
* // => 3 | |
* | |
* _.get(object, ['a', '0', 'b', 'c']); | |
* // => 3 | |
* | |
* _.get(object, 'a.b.c', 'default'); | |
* // => 'default' | |
*/ | |
function get(object, path, defaultValue) { | |
var result = object == null ? undefined : baseGet(object, toPath(path), path + ''); | |
return result === undefined ? defaultValue : result; | |
} | |
module.exports = get; | |
/***/ }, | |
/* 417 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _Content = __webpack_require__(413); | |
var _Content2 = _interopRequireDefault(_Content); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var EditorTemplate = function (_Component) { | |
_inherits(EditorTemplate, _Component); | |
function EditorTemplate() { | |
_classCallCheck(this, EditorTemplate); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
EditorTemplate.prototype.render = function render() { | |
var _props = this.props; | |
var Content = _props.Content; | |
var name = _props.name; | |
var htmlFor = _props.htmlFor; | |
var title = _props.title; | |
var help = _props.help; | |
var labelClass = _props.labelClass; | |
var hasTitleClass = _props.hasTitleClass; | |
var noTitleClass = _props.noTitleClass; | |
var errorClass = _props.errorClass; | |
var helpClass = _props.helpClass; | |
var error = _props.error; | |
var hasErrorClass = _props.hasErrorClass; | |
var errorClassName = _props.errorClassName; | |
var message = _props.message; | |
var fieldClass = _props.fieldClass; | |
var children = _props.children; | |
if (hasErrorClass) { | |
errorClassName = hasErrorClass; | |
} | |
var titleObj = typeof title == 'string' ? { htmlFor: htmlFor, content: title } : title; | |
return _react2.default.createElement( | |
"div", | |
{ className: fieldClass + " " + (error != null ? errorClassName || '' : '') }, | |
_react2.default.createElement(Content, { content: titleObj, className: labelClass, type: "label" }), | |
_react2.default.createElement( | |
"div", | |
{ className: title ? hasTitleClass : noTitleClass }, | |
children, | |
_react2.default.createElement(Content, { content: error || help, key: "error-block", type: "p", | |
className: error ? errorClass : helpClass }) | |
) | |
); | |
}; | |
return EditorTemplate; | |
}(_react.Component); | |
EditorTemplate.propTypes = { | |
error: _PropTypes2.default.error, | |
title: _PropTypes2.default.title, | |
name: _PropTypes2.default.string, | |
help: _PropTypes2.default.content, | |
style: _PropTypes2.default.style, | |
htmlFor: _PropTypes2.default.htmlFor, | |
Content: _PropTypes2.default.injectClass | |
}; | |
EditorTemplate.defaultProps = { | |
Content: _Content2.default | |
}; | |
exports.default = EditorTemplate; | |
; | |
/***/ }, | |
/* 418 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var FieldSetTemplate = function (_Component) { | |
_inherits(FieldSetTemplate, _Component); | |
function FieldSetTemplate() { | |
_classCallCheck(this, FieldSetTemplate); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
FieldSetTemplate.prototype.render = function render() { | |
var _props$field$props = _extends({}, this.props.field, this.props); | |
var legend = _props$field$props.legend; | |
var content = _props$field$props.content; | |
var legendClass = _props$field$props.legendClass; | |
var buttons = _props$field$props.buttons; | |
var className = _props$field$props.className; | |
var rest = _objectWithoutProperties(_props$field$props, ['legend', 'content', 'legendClass', 'buttons', 'className']); | |
return legend ? _react2.default.createElement( | |
'fieldset', | |
{ className: className }, | |
_react2.default.createElement( | |
'legend', | |
{ className: legendClass }, | |
legend | |
), | |
content, | |
this.props.children, | |
buttons | |
) : _react2.default.createElement( | |
'div', | |
{ className: className }, | |
content, | |
this.props.children, | |
buttons | |
); | |
}; | |
return FieldSetTemplate; | |
}(_react.Component); | |
FieldSetTemplate.propTypes = { | |
buttons: _PropTypes2.default.node, | |
legend: _PropTypes2.default.node, | |
className: _PropTypes2.default.cssClass, | |
field: _PropTypes2.default.any, | |
content: _PropTypes2.default.node | |
}; | |
FieldSetTemplate.defaultProps = { | |
field: _tutils.FREEZE_OBJ | |
}; | |
exports.default = FieldSetTemplate; | |
/***/ }, | |
/* 419 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var FormTemplate = function (_Component) { | |
_inherits(FormTemplate, _Component); | |
function FormTemplate() { | |
_classCallCheck(this, FormTemplate); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
FormTemplate.prototype.render = function render() { | |
var _props = this.props; | |
var children = _props.children; | |
var style = _props.style; | |
var fieldAttrs = _props.fieldAttrs; | |
var formClass = _props.formClass; | |
var className = _props.className; | |
var props = _objectWithoutProperties(_props, ["children", "style", "fieldAttrs", "formClass", "className"]); | |
return _react2.default.createElement( | |
"form", | |
_extends({}, props, { className: className || formClass }, fieldAttrs), | |
children | |
); | |
}; | |
return FormTemplate; | |
}(_react.Component); | |
FormTemplate.displayName = 'FormTemplate'; | |
FormTemplate.propTypes = { | |
style: _PropTypes2.default.style, | |
onSubmit: _PropTypes2.default.submit, | |
onReset: _PropTypes2.default.event, | |
accept: _PropTypes2.default.string, | |
acceptCharset: _PropTypes2.default.string, | |
action: _PropTypes2.default.string, | |
autocapitalize: _PropTypes2.default.oneOf(['on', 'off', 'words', 'sentences', 'charecters', 'none']), | |
autocomplete: _PropTypes2.default.oneOf(['on', 'off']), | |
encType: _PropTypes2.default.oneOf(['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']), | |
method: _PropTypes2.default.oneOf(['get', 'post']), | |
name: _PropTypes2.default.string, | |
target: _PropTypes2.default.string, | |
fieldAttrs: _PropTypes2.default.any, | |
charSet: _PropTypes2.default.string, | |
disabled: _PropTypes2.default.bool, | |
noValidate: _PropTypes2.default.bool, | |
novalidate: _PropTypes2.default.deprecated('Please use noValidate instead') | |
}; | |
FormTemplate.defaultProps = { | |
className: '', | |
method: 'post' | |
}; | |
exports.default = FormTemplate; | |
/***/ }, | |
/* 420 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _tutils = __webpack_require__(322); | |
var _ButtonsTemplate = __webpack_require__(407); | |
var _ButtonsTemplate2 = _interopRequireDefault(_ButtonsTemplate); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var ListItemTemplate = function (_Component) { | |
_inherits(ListItemTemplate, _Component); | |
function ListItemTemplate() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, ListItemTemplate); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.handleMoveUp = function (e) { | |
e.preventDefault(); | |
_this.props.onMoveUp(_this.props.pos, _this.props.value, _this.props.pid); | |
}, _this.handleMoveDown = function (e) { | |
e.preventDefault(); | |
_this.props.onMoveDown(_this.props.pos, _this.props.value, _this.props.pid); | |
}, _this.handleDelete = function (e) { | |
e.preventDefault(); | |
_this.props.onDelete(_this.props.pos, _this.props.value, _this.props.pid); | |
}, _this.handleEdit = function (e) { | |
e.preventDefault(); | |
var val = _this.props.value; | |
_this.props.onEdit(_this.props.pos, val.value, _this.props.pid); | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
ListItemTemplate.prototype.buttons = function buttons(pos, last, canReorder, canDelete) { | |
var buttons = []; | |
var buttonClass = this.props.buttonClass; | |
if (canReorder) { | |
if (pos > 0) { | |
buttons.push({ | |
onClick: this.handleMoveUp, | |
title: 'Move Up', | |
action: 'up', | |
label: '', | |
iconClass: this.props.moveUpClass, | |
buttonClass: buttonClass | |
}); | |
} | |
if (!last) { | |
buttons.push({ | |
onClick: this.handleMoveDown, | |
title: 'Move Down', | |
action: 'down', | |
iconClass: this.props.moveDownClass, | |
buttonClass: buttonClass, | |
label: '' | |
}); | |
} | |
} | |
if (canDelete) { | |
buttons.push({ | |
onClick: this.handleDelete, | |
title: 'Delete', | |
action: 'delete', | |
iconClass: this.props.deleteClass, | |
buttonClass: buttonClass, | |
label: '' | |
}); | |
} | |
return buttons; | |
}; | |
ListItemTemplate.prototype.render = function render() { | |
var _props = this.props; | |
var pos = _props.pos; | |
var Buttons = _props.Buttons; | |
var value = _props.value; | |
var errors = _props.errors; | |
var path = _props.path; | |
var ctrlButtonsClass = _props.ctrlButtonsClass; | |
var listGroupItemClass = _props.listGroupItemClass; | |
var helpClass = _props.helpClass; | |
var onValidate = _props.onValidate; | |
var type = _props.type; | |
var name = _props.name; | |
var hasErrorClass = _props.hasErrorClass; | |
var canReorder = _props.canReorder; | |
var canDelete = _props.canDelete; | |
var last = _props.last; | |
var onValueChange = _props.onValueChange; | |
var error = errors && errors[0] && errors[0].message; | |
return _react2.default.createElement( | |
'li', | |
{ className: listGroupItemClass + ' ' + (error ? hasErrorClass : '') }, | |
error ? _react2.default.createElement( | |
'p', | |
{ ref: 'error', key: 'error', className: helpClass }, | |
error | |
) : null, | |
_react2.default.createElement(Buttons, { key: 'buttons', buttons: this.buttons(pos, last, canReorder, canDelete), ref: 'buttons', | |
buttonsClass: ctrlButtonsClass, buttonContainerClass: ' ' }), | |
this.props.children | |
); | |
}; | |
return ListItemTemplate; | |
}(_react.Component); | |
ListItemTemplate.propTypes = { | |
style: _PropTypes2.default.style, | |
Buttons: _PropTypes2.default.injectClass | |
}; | |
ListItemTemplate.defaultProps = { | |
type: 'Text', | |
onMoveUp: _tutils.noop, | |
onMoveDown: _tutils.noop, | |
onDelete: _tutils.noop, | |
onValidate: _tutils.noop, | |
onValueChange: _tutils.noop, | |
onEdit: _tutils.noop, | |
canAdd: false, | |
canReorder: false, | |
canEdit: false, | |
canDelete: false, | |
last: false, | |
errors: null, | |
pos: 0, | |
style: "ListItemTemplate", | |
Buttons: _ButtonsTemplate2.default | |
}; | |
exports.default = ListItemTemplate; | |
/***/ }, | |
/* 421 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _cloneDeep = __webpack_require__(422); | |
var _cloneDeep2 = _interopRequireDefault(_cloneDeep); | |
var _RenderContent = __webpack_require__(429); | |
var _RenderContent2 = _interopRequireDefault(_RenderContent); | |
var _RenderTemplate = __webpack_require__(408); | |
var _RenderTemplate2 = _interopRequireDefault(_RenderTemplate); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var ModalTemplate = function (_Component) { | |
_inherits(ModalTemplate, _Component); | |
ModalTemplate.prototype.handleCancel = function handleCancel() { | |
this.props.onChange(this.value); | |
this.props.dismiss(); | |
}; | |
function ModalTemplate(props) { | |
_classCallCheck(this, ModalTemplate); | |
for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
rest[_key - 1] = arguments[_key]; | |
} | |
var _this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this, props].concat(rest))); | |
_this.handleClose = function (e) { | |
e && e.preventDefault(); | |
_this.props.dismiss(); | |
}; | |
_this.handleBtnClose = function (e, action) { | |
switch (action) { | |
case 'submit': | |
{ | |
if (_this.props.error) { | |
break; | |
} | |
_this.props.dismiss(); | |
break; | |
} | |
case 'close': | |
case 'cancel': | |
_this.props.onChange(_this.value); | |
_this.handleClose(e); | |
break; | |
} | |
}; | |
_this.value = !props.value ? null : (0, _cloneDeep2.default)(props.value); | |
return _this; | |
} | |
ModalTemplate.prototype.renderFooter = function renderFooter(buttons) { | |
if (buttons == false) return null; | |
if (buttons == null) buttons = _react2.default.createElement(_RenderTemplate2.default, _extends({ template: this.props.buttonsTemplate }, this.constructor.defaultBtns)); | |
return _react2.default.createElement( | |
"div", | |
{ | |
className: this.props.footerClass }, | |
_react2.default.cloneElement(buttons, { onButtonClick: this.handleBtnClose }) | |
); | |
}; | |
ModalTemplate.prototype.render = function render() { | |
var _props = this.props; | |
var title = _props.title; | |
var legend = _props.legend; | |
var buttons = _props.buttons; | |
var path = _props.path; | |
var value = _props.value; | |
var bodyClass = _props.bodyClass; | |
var headerClass = _props.headerClass; | |
var closeClass = _props.closeClass; | |
var contentClass = _props.contentClass; | |
var backdropClass = _props.backdropClass; | |
var dialogClass = _props.dialogClass; | |
var namespaceClass = _props.namespaceClass; | |
var overlayClass = _props.overlayClass; | |
var children = _props.children; | |
var rest = _objectWithoutProperties(_props, ["title", "legend", "buttons", "path", "value", "bodyClass", "headerClass", "closeClass", "contentClass", "backdropClass", "dialogClass", "namespaceClass", "overlayClass", "children"]); | |
return _react2.default.createElement( | |
"div", | |
{ className: namespaceClass + " " + overlayClass, style: { display: 'block' } }, | |
_react2.default.createElement("div", { className: backdropClass }), | |
_react2.default.createElement( | |
"div", | |
{ className: dialogClass, role: "document", style: { zIndex: 2000 } }, | |
_react2.default.createElement( | |
"div", | |
{ className: contentClass }, | |
_react2.default.createElement( | |
"div", | |
{ className: headerClass }, | |
_react2.default.createElement( | |
"button", | |
{ onClick: this.handleClose, className: closeClass, name: this.props.path + '@dismiss', | |
value: value, | |
"aria-label": "Close" }, | |
_react2.default.createElement( | |
"span", | |
{ "aria-hidden": "true" }, | |
"×" | |
) | |
), | |
_react2.default.createElement(_RenderContent2.default, { type: "h4", content: title || legend }) | |
), | |
_react2.default.createElement( | |
"div", | |
{ className: bodyClass }, | |
children | |
), | |
this.renderFooter(buttons) | |
) | |
) | |
); | |
}; | |
return ModalTemplate; | |
}(_react.Component); | |
ModalTemplate.defaultBtns = { | |
buttonsClass: 'pull-right btn-group', | |
buttons: [{ | |
label: "Cancel", | |
action: 'cancel', | |
className: 'btn' | |
}, { | |
label: "Save", | |
action: 'submit', | |
className: 'btn btn-primary' | |
}] | |
}; | |
ModalTemplate.propTypes = { | |
style: _PropTypes2.default.style, | |
title: _PropTypes2.default.content, | |
buttons: _PropTypes2.default.buttons, | |
path: _PropTypes2.default.path, | |
value: _PropTypes2.default.value, | |
onChange: _PropTypes2.default.valueEvent, | |
dismiss: _PropTypes2.default.valueEvent, | |
buttonsTemplate: _PropTypes2.default.template, | |
legend: _PropTypes2.default.content, | |
error: _PropTypes2.default.error | |
}; | |
ModalTemplate.defaultProps = { | |
buttonsTemplate: 'ButtonsTemplate', | |
onCancel: function onCancel() {} | |
}; | |
exports.default = ModalTemplate; | |
/***/ }, | |
/* 422 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseClone = __webpack_require__(423), | |
bindCallback = __webpack_require__(344); | |
/** | |
* Creates a deep clone of `value`. If `customizer` is provided it's invoked | |
* to produce the cloned values. If `customizer` returns `undefined` cloning | |
* is handled by the method instead. The `customizer` is bound to `thisArg` | |
* and invoked with up to three argument; (value [, index|key, object]). | |
* | |
* **Note:** This method is loosely based on the | |
* [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). | |
* The enumerable properties of `arguments` objects and objects created by | |
* constructors other than `Object` are cloned to plain `Object` objects. An | |
* empty object is returned for uncloneable values such as functions, DOM nodes, | |
* Maps, Sets, and WeakMaps. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to deep clone. | |
* @param {Function} [customizer] The function to customize cloning values. | |
* @param {*} [thisArg] The `this` binding of `customizer`. | |
* @returns {*} Returns the deep cloned value. | |
* @example | |
* | |
* var users = [ | |
* { 'user': 'barney' }, | |
* { 'user': 'fred' } | |
* ]; | |
* | |
* var deep = _.cloneDeep(users); | |
* deep[0] === users[0]; | |
* // => false | |
* | |
* // using a customizer callback | |
* var el = _.cloneDeep(document.body, function(value) { | |
* if (_.isElement(value)) { | |
* return value.cloneNode(true); | |
* } | |
* }); | |
* | |
* el === document.body | |
* // => false | |
* el.nodeName | |
* // => BODY | |
* el.childNodes.length; | |
* // => 20 | |
*/ | |
function cloneDeep(value, customizer, thisArg) { | |
return typeof customizer == 'function' ? baseClone(value, true, bindCallback(customizer, thisArg, 3)) : baseClone(value, true); | |
} | |
module.exports = cloneDeep; | |
/***/ }, | |
/* 423 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var arrayCopy = __webpack_require__(424), | |
arrayEach = __webpack_require__(398), | |
baseAssign = __webpack_require__(341), | |
baseForOwn = __webpack_require__(355), | |
initCloneArray = __webpack_require__(425), | |
initCloneByTag = __webpack_require__(426), | |
initCloneObject = __webpack_require__(428), | |
isArray = __webpack_require__(338), | |
isObject = __webpack_require__(330); | |
/** `Object#toString` result references. */ | |
var argsTag = '[object Arguments]', | |
arrayTag = '[object Array]', | |
boolTag = '[object Boolean]', | |
dateTag = '[object Date]', | |
errorTag = '[object Error]', | |
funcTag = '[object Function]', | |
mapTag = '[object Map]', | |
numberTag = '[object Number]', | |
objectTag = '[object Object]', | |
regexpTag = '[object RegExp]', | |
setTag = '[object Set]', | |
stringTag = '[object String]', | |
weakMapTag = '[object WeakMap]'; | |
var arrayBufferTag = '[object ArrayBuffer]', | |
float32Tag = '[object Float32Array]', | |
float64Tag = '[object Float64Array]', | |
int8Tag = '[object Int8Array]', | |
int16Tag = '[object Int16Array]', | |
int32Tag = '[object Int32Array]', | |
uint8Tag = '[object Uint8Array]', | |
uint8ClampedTag = '[object Uint8ClampedArray]', | |
uint16Tag = '[object Uint16Array]', | |
uint32Tag = '[object Uint32Array]'; | |
/** Used to identify `toStringTag` values supported by `_.clone`. */ | |
var cloneableTags = {}; | |
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[stringTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; | |
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[mapTag] = cloneableTags[setTag] = cloneableTags[weakMapTag] = false; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* The base implementation of `_.clone` without support for argument juggling | |
* and `this` binding `customizer` functions. | |
* | |
* @private | |
* @param {*} value The value to clone. | |
* @param {boolean} [isDeep] Specify a deep clone. | |
* @param {Function} [customizer] The function to customize cloning values. | |
* @param {string} [key] The key of `value`. | |
* @param {Object} [object] The object `value` belongs to. | |
* @param {Array} [stackA=[]] Tracks traversed source objects. | |
* @param {Array} [stackB=[]] Associates clones with source counterparts. | |
* @returns {*} Returns the cloned value. | |
*/ | |
function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { | |
var result; | |
if (customizer) { | |
result = object ? customizer(value, key, object) : customizer(value); | |
} | |
if (result !== undefined) { | |
return result; | |
} | |
if (!isObject(value)) { | |
return value; | |
} | |
var isArr = isArray(value); | |
if (isArr) { | |
result = initCloneArray(value); | |
if (!isDeep) { | |
return arrayCopy(value, result); | |
} | |
} else { | |
var tag = objToString.call(value), | |
isFunc = tag == funcTag; | |
if (tag == objectTag || tag == argsTag || isFunc && !object) { | |
result = initCloneObject(isFunc ? {} : value); | |
if (!isDeep) { | |
return baseAssign(result, value); | |
} | |
} else { | |
return cloneableTags[tag] ? initCloneByTag(value, tag, isDeep) : object ? value : {}; | |
} | |
} | |
// Check for circular references and return its corresponding clone. | |
stackA || (stackA = []); | |
stackB || (stackB = []); | |
var length = stackA.length; | |
while (length--) { | |
if (stackA[length] == value) { | |
return stackB[length]; | |
} | |
} | |
// Add the source value to the stack of traversed objects and associate it with its clone. | |
stackA.push(value); | |
stackB.push(result); | |
// Recursively populate clone (susceptible to call stack limits). | |
(isArr ? arrayEach : baseForOwn)(value, function (subValue, key) { | |
result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); | |
}); | |
return result; | |
} | |
module.exports = baseClone; | |
/***/ }, | |
/* 424 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* 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 arrayCopy(source, array) { | |
var index = -1, | |
length = source.length; | |
array || (array = Array(length)); | |
while (++index < length) { | |
array[index] = source[index]; | |
} | |
return array; | |
} | |
module.exports = arrayCopy; | |
/***/ }, | |
/* 425 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* Initializes an array clone. | |
* | |
* @private | |
* @param {Array} array The array to clone. | |
* @returns {Array} Returns the initialized clone. | |
*/ | |
function initCloneArray(array) { | |
var length = array.length, | |
result = new array.constructor(length); | |
// Add array properties assigned by `RegExp#exec`. | |
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { | |
result.index = array.index; | |
result.input = array.input; | |
} | |
return result; | |
} | |
module.exports = initCloneArray; | |
/***/ }, | |
/* 426 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var bufferClone = __webpack_require__(427); | |
/** `Object#toString` result references. */ | |
var boolTag = '[object Boolean]', | |
dateTag = '[object Date]', | |
numberTag = '[object Number]', | |
regexpTag = '[object RegExp]', | |
stringTag = '[object String]'; | |
var arrayBufferTag = '[object ArrayBuffer]', | |
float32Tag = '[object Float32Array]', | |
float64Tag = '[object Float64Array]', | |
int8Tag = '[object Int8Array]', | |
int16Tag = '[object Int16Array]', | |
int32Tag = '[object Int32Array]', | |
uint8Tag = '[object Uint8Array]', | |
uint8ClampedTag = '[object Uint8ClampedArray]', | |
uint16Tag = '[object Uint16Array]', | |
uint32Tag = '[object Uint32Array]'; | |
/** Used to match `RegExp` flags from their coerced string values. */ | |
var reFlags = /\w*$/; | |
/** | |
* Initializes an object clone based on its `toStringTag`. | |
* | |
* **Note:** This function only supports cloning values with tags of | |
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. | |
* | |
* @private | |
* @param {Object} object The object to clone. | |
* @param {string} tag The `toStringTag` of the object to clone. | |
* @param {boolean} [isDeep] Specify a deep clone. | |
* @returns {Object} Returns the initialized clone. | |
*/ | |
function initCloneByTag(object, tag, isDeep) { | |
var Ctor = object.constructor; | |
switch (tag) { | |
case arrayBufferTag: | |
return bufferClone(object); | |
case boolTag: | |
case dateTag: | |
return new Ctor(+object); | |
case float32Tag:case float64Tag: | |
case int8Tag:case int16Tag:case int32Tag: | |
case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag: | |
var buffer = object.buffer; | |
return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); | |
case numberTag: | |
case stringTag: | |
return new Ctor(object); | |
case regexpTag: | |
var result = new Ctor(object.source, reFlags.exec(object)); | |
result.lastIndex = object.lastIndex; | |
} | |
return result; | |
} | |
module.exports = initCloneByTag; | |
/***/ }, | |
/* 427 */ | |
/***/ function(module, exports) { | |
/* WEBPACK VAR INJECTION */(function(global) {"use strict"; | |
/** Native method references. */ | |
var ArrayBuffer = global.ArrayBuffer, | |
Uint8Array = global.Uint8Array; | |
/** | |
* Creates a clone of the given array buffer. | |
* | |
* @private | |
* @param {ArrayBuffer} buffer The array buffer to clone. | |
* @returns {ArrayBuffer} Returns the cloned array buffer. | |
*/ | |
function bufferClone(buffer) { | |
var result = new ArrayBuffer(buffer.byteLength), | |
view = new Uint8Array(result); | |
view.set(new Uint8Array(buffer)); | |
return result; | |
} | |
module.exports = bufferClone; | |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) | |
/***/ }, | |
/* 428 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
/** | |
* Initializes an object clone. | |
* | |
* @private | |
* @param {Object} object The object to clone. | |
* @returns {Object} Returns the initialized clone. | |
*/ | |
function initCloneObject(object) { | |
var Ctor = object.constructor; | |
if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { | |
Ctor = Object; | |
} | |
return new Ctor(); | |
} | |
module.exports = initCloneObject; | |
/***/ }, | |
/* 429 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
/** | |
* This is to be used to render properties with type content. | |
* Just a convient wrapper so that things go well. | |
* | |
* @param props | |
* @returns {*} | |
* @constructor | |
*/ | |
function RenderContent(props) { | |
if (props == null) { | |
return props; | |
} | |
var content = props.content; | |
var type = props.type; | |
var oprops = _objectWithoutProperties(props, ["content", "type"]); | |
var Content = content.Content; | |
var rest = _objectWithoutProperties(content, ["Content"]); | |
return _react2.default.createElement(Content, _extends({ content: rest }, oprops)); | |
} | |
RenderContent.displayName = 'RenderContent'; | |
exports.default = RenderContent; | |
/***/ }, | |
/* 430 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
exports.default = ObjectTemplate; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function ObjectTemplate(props) { | |
var children = props.children; | |
var className = props.className; | |
var fieldAttrs = props.fieldAttrs; | |
var rest = _objectWithoutProperties(props, ['children', 'className', 'fieldAttrs']); | |
return _react2.default.createElement( | |
'div', | |
_extends({ className: className }, fieldAttrs), | |
children | |
); | |
} | |
/***/ }, | |
/* 431 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _Content = __webpack_require__(413); | |
var _Content2 = _interopRequireDefault(_Content); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var RadioItemTemplate = function (_Component) { | |
_inherits(RadioItemTemplate, _Component); | |
function RadioItemTemplate() { | |
_classCallCheck(this, RadioItemTemplate); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
RadioItemTemplate.prototype.render = function render() { | |
var _props = this.props; | |
var Content = _props.Content; | |
var label = _props.label; | |
var namespaceClass = _props.namespaceClass; | |
var labelHTML = _props.labelHTML; | |
var children = _props.children; | |
var checked = _props.checked; | |
var checkedClass = _props.checkedClass; | |
var uncheckedClass = _props.uncheckedClass; | |
var id = _props.id; | |
var path = _props.path; | |
id = id || path; | |
label = labelHTML ? labelHTML : label; | |
checkedClass = checkedClass || ''; | |
label = typeof label === 'string' ? { | |
className: [namespaceClass, checked ? checkedClass : uncheckedClass].join(' '), | |
type: 'div', | |
content: [{ | |
type: 'label', | |
className: '', | |
htmlFor: id, | |
//true -outputs child. | |
content: [true, label] | |
}] | |
} : label; | |
return _react2.default.createElement( | |
Content, | |
{ content: label }, | |
children | |
); | |
}; | |
return RadioItemTemplate; | |
}(_react.Component); | |
RadioItemTemplate.propTypes = { | |
label: _PropTypes2.default.any, | |
labelHTML: _PropTypes2.default.any, | |
checked: _PropTypes2.default.bool, | |
checkedClass: _PropTypes2.default.string, | |
id: _PropTypes2.default.id, | |
path: _PropTypes2.default.path, | |
Content: _PropTypes2.default.injectClass, | |
style: _PropTypes2.default.style | |
}; | |
RadioItemTemplate.defaultProps = { | |
Content: _Content2.default, | |
namespaceClass: "radio", | |
checkedClass: "", | |
uncheckedClass: "" | |
}; | |
exports.default = RadioItemTemplate; | |
/***/ }, | |
/* 432 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var WizardProgressTemplate = function (_Component) { | |
_inherits(WizardProgressTemplate, _Component); | |
function WizardProgressTemplate() { | |
_classCallCheck(this, WizardProgressTemplate); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
WizardProgressTemplate.prototype.getStyle = function getStyle(i) { | |
var _props = this.props; | |
var length = _props.fieldsets.length; | |
var index = _props.index; | |
var doneClass = _props.doneClass; | |
var doingClass = _props.doingClass; | |
var todoClass = _props.todoClass; | |
if (i < index || index == length) { | |
return doneClass; | |
} | |
if (i === index) { | |
return doingClass; | |
} | |
return todoClass; | |
}; | |
WizardProgressTemplate.prototype.render = function render() { | |
var _this2 = this; | |
return _react2.default.createElement( | |
'ol', | |
{ className: this.props.namespaceClass }, | |
this.props.fieldsets.map(function (s, i) { | |
return _react2.default.createElement( | |
'li', | |
{ value: i, key: 'li' + i, | |
className: _this2.getStyle(i), | |
onClick: _this2.props.onClick }, | |
_react2.default.createElement( | |
'em', | |
null, | |
i + 1 | |
), | |
_react2.default.createElement( | |
'span', | |
null, | |
s.legend | |
) | |
); | |
}) | |
); | |
}; | |
return WizardProgressTemplate; | |
}(_react.Component); | |
WizardProgressTemplate.propTypes = { | |
style: _PropTypes2.default.style | |
}; | |
WizardProgressTemplate.defaultProps = { | |
index: 0, | |
fieldsets: [], | |
onClick: function onClick(e) {} | |
}; | |
exports.default = WizardProgressTemplate; | |
/***/ }, | |
/* 433 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _Object = __webpack_require__(434); | |
var _Object2 = _interopRequireDefault(_Object); | |
var _WizardMixin2 = __webpack_require__(438); | |
var _WizardMixin3 = _interopRequireDefault(_WizardMixin2); | |
var _ButtonsTemplate = __webpack_require__(407); | |
var _ButtonsTemplate2 = _interopRequireDefault(_ButtonsTemplate); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _defaults = __webpack_require__(439); | |
var _defaults2 = _interopRequireDefault(_defaults); | |
var _RenderTemplate = __webpack_require__(408); | |
var _RenderTemplate2 = _interopRequireDefault(_RenderTemplate); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
function donner(done) { | |
done(); | |
} | |
var WizardTemplate = function (_WizardMixin) { | |
_inherits(WizardTemplate, _WizardMixin); | |
function WizardTemplate() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, WizardTemplate); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _WizardMixin.call.apply(_WizardMixin, [this].concat(args))), _this), _initialiseProps.call(_this), _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
WizardTemplate.prototype.setNavState = function setNavState(next) { | |
var len = this.props.schema.fieldsets.length, | |
compState = this.state.compState; | |
next = Math.max(Math.min(len - 1, next), 0); | |
if (this.props.onNavChange(next, compState, this.props.schema.fieldsets[next]) !== false) { | |
this.setState({ | |
compState: next, | |
disabled: false, | |
prevState: next === compState ? this.state.prevState : compState | |
}); | |
} | |
}; | |
WizardTemplate.prototype.renderProgress = function renderProgress(fieldsets) { | |
return _react2.default.createElement(_RenderTemplate2.default, { key: 'progress-template-key', template: this.props.wizardProgressTemplate, | |
fieldsets: fieldsets, | |
index: this.state.done ? fieldsets.length : this.state.compState, | |
onClick: this.handleOnClick }); | |
}; | |
WizardTemplate.prototype.makeTransition = function makeTransition(compState) { | |
if (compState < this.state.prevState) { | |
return this.props.transitionForward; | |
} else { | |
return this.props.transitionBackward; | |
} | |
}; | |
WizardTemplate.prototype.render = function render() { | |
var _props = this.props; | |
var className = _props.className; | |
var Template = _props.Template; | |
var template = _props.template; | |
var fieldsets = _props.fieldsets; | |
var fields = _props.fields; | |
var onButtonClick = _props.onButtonClick; | |
var transitionLeaveTimeout = _props.transitionLeaveTimeout; | |
var transitionEnterTimeout = _props.transitionEnterTimeout; | |
var carouselHeightClass = _props.carouselHeightClass; | |
var children = _props.children; | |
var schema = _props.schema; | |
var rest = _objectWithoutProperties(_props, ['className', 'Template', 'template', 'fieldsets', 'fields', 'onButtonClick', 'transitionLeaveTimeout', 'transitionEnterTimeout', 'carouselHeightClass', 'children', 'schema']); | |
var _props$schema = this.props.schema; | |
fieldsets = _props$schema.fieldsets; | |
schema = _props$schema.schema; | |
var compState = this.state.compState; | |
var current = fieldsets[compState]; | |
var _makeTransition = this.makeTransition(compState); | |
var Transition = _makeTransition.Transition; | |
var transition = _objectWithoutProperties(_makeTransition, ['Transition']); | |
var buttons = current.buttons ? current.buttons : this.createButtons(compState); | |
var currentSchema = { schema: schema, fieldsets: [_extends({ buttons: buttons }, current, { legend: false })], template: Template }; | |
return _react2.default.createElement( | |
'div', | |
{ className: this.props.namespaceClass + ' ' + (this.state.animating ? this.props.animatingClass : ''), | |
onKeyDown: this.handleKeyDown }, | |
this.renderProgress(fieldsets), | |
_react2.default.createElement( | |
Transition, | |
_extends({ key: 'wizard-transition' }, transition), | |
_react2.default.createElement(_Object2.default, _extends({}, rest, { | |
className: 'clearfix state-' + compState, | |
key: "form-" + compState, | |
schema: currentSchema, | |
onButtonClick: this._handleBtn | |
})) | |
) | |
); | |
}; | |
return WizardTemplate; | |
}(_WizardMixin3.default); | |
WizardTemplate.defaultProps = (0, _defaults2.default)({ | |
wizardProgressTemplate: 'WizardProgressTemplate', | |
Template: 'ObjectTemplate', | |
onNext: donner, | |
onPrevious: donner, | |
onDone: donner, | |
buttons: { | |
'previous': { | |
label: 'Previous', | |
action: 'previous' | |
}, | |
'next': { | |
label: 'Next', | |
action: 'next', | |
primary: true | |
}, | |
'last': { | |
label: 'Done', | |
type: "submit", | |
action: 'submit', | |
primary: true | |
} | |
}, | |
onAction: function onAction(pos, action, wizard) {}, | |
onNavChange: function onNavChange(current, previous, wizard) {}, | |
transitionForward: "slideRight", | |
transitionBackward: "slideLeft", | |
namespaceClass: 'wizard' | |
}, _WizardMixin3.default.defaultProps); | |
WizardTemplate.propTypes = _extends({}, _WizardMixin3.default.propTypes, { | |
wizardProgressTemplate: _PropTypes2.default.template, | |
Template: _PropTypes2.default.template, | |
transitionForward: _PropTypes2.default.transition, | |
transitionBackward: _PropTypes2.default.transition, | |
style: _PropTypes2.default.style | |
}); | |
var _initialiseProps = function _initialiseProps() { | |
var _this2 = this; | |
this._handleBtn = function () { | |
return _this2.handleBtn.apply(_this2, arguments); | |
}; | |
}; | |
exports.default = WizardTemplate; | |
/***/ }, | |
/* 434 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
var _Field = __webpack_require__(435); | |
var _Field2 = _interopRequireDefault(_Field); | |
var _FieldSet = __webpack_require__(437); | |
var _FieldSet2 = _interopRequireDefault(_FieldSet); | |
var _warning = __webpack_require__(402); | |
var _warning2 = _interopRequireDefault(_warning); | |
var _RenderTemplate = __webpack_require__(408); | |
var _RenderTemplate2 = _interopRequireDefault(_RenderTemplate); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var ObjectType = function (_Component) { | |
_inherits(ObjectType, _Component); | |
function ObjectType() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, ObjectType); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.handleButtonClick = function (e, action) { | |
for (var _len2 = arguments.length, rest = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { | |
rest[_key2 - 2] = arguments[_key2]; | |
} | |
var _this$props; | |
if ((_this$props = _this.props).onButtonClick.apply(_this$props, [e, action].concat(rest)) !== false) { | |
if (action === 'submit') { | |
var _this$props2; | |
(_this$props2 = _this.props).onSubmit.apply(_this$props2, [e].concat(rest)); | |
} | |
} | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
ObjectType.prototype.addEditor = function addEditor(f, field, fields, Field, idx) { | |
if (field == null) { | |
(0, _warning2.default)(true, 'No field found for %s probably a key in fields does not match in schema', f); | |
return null; | |
} | |
f = typeof f === 'string' ? f : f.name || f; | |
return _react2.default.createElement(Field, { key: "field-" + idx, path: (0, _tutils.path)(this.props.path, f), conditional: field.conditional, | |
transition: field.transition, field: field, fields: fields }); | |
}; | |
ObjectType.prototype.makeFieldset = function makeFieldset(f, i, schema, FieldSet, Field) { | |
return _react2.default.createElement( | |
FieldSet, | |
_extends({ key: "fieldset-" + i }, f, { field: f, | |
onButtonClick: this.handleButtonClick }), | |
f.fields ? this.makeFields(f.fields, schema, Field) : this.makeFieldsets(f.fieldsets, schema, FieldSet, Field) | |
); | |
}; | |
ObjectType.prototype.makeFields = function makeFields(fields, schema, Field) { | |
var _this2 = this; | |
var fieldMap = {}; | |
var mappedfields = fields.map(function (field) { | |
(0, _warning2.default)(typeof field === 'string', 'Field is not a string, probably not nesting schema:{} correctly %s', field); | |
var _field$split = field.split('.', 2); | |
var f = _field$split[0]; | |
var rest = _field$split[1]; | |
if (rest) { | |
(fieldMap[f] || (fieldMap[f] = [])).push(rest); | |
} | |
return f; | |
}); | |
return (0, _tutils.unique)(mappedfields).map(function (f, i) { | |
return _this2.addEditor(f, schema[f] || f, fieldMap[f], Field, i); | |
}); | |
}; | |
ObjectType.prototype.makeFieldsets = function makeFieldsets(fieldsets, schema, FieldSet, Field) { | |
var _this3 = this; | |
if (fieldsets == null) { | |
return null; | |
} | |
return fieldsets.map(function (f, i) { | |
return _this3.makeFieldset(f, i, schema, FieldSet, Field); | |
}); | |
}; | |
ObjectType.prototype.renderSchema = function renderSchema(schema, FieldSet, Field) { | |
return this.makeFieldsets(schema.fieldsets, schema.schema, FieldSet, Field); | |
}; | |
ObjectType.prototype.render = function render() { | |
//capture the things that should not fall through. | |
var _props = this.props; | |
var schema = _props.schema; | |
var subSchema = _props.subSchema; | |
var onSubmit = _props.onSubmit; | |
var onButtonClick = _props.onButtonClick; | |
var submitButton = _props.submitButton; | |
var conditional = _props.conditional; | |
var FieldSet = _props.FieldSet; | |
var Field = _props.Field; | |
var children = _props.children; | |
var objectTemplate = _props.objectTemplate; | |
var fallbackTemplate = _props.fallbackTemplate; | |
var template = _props.template; | |
var props = _objectWithoutProperties(_props, ["schema", "subSchema", "onSubmit", "onButtonClick", "submitButton", "conditional", "FieldSet", "Field", "children", "objectTemplate", "fallbackTemplate", "template"]); | |
var _ref = schema || subSchema; | |
var rschema = _objectWithoutProperties(_ref, []); | |
template = rschema.template || template || objectTemplate || fallbackTemplate; | |
return _react2.default.createElement( | |
_RenderTemplate2.default, | |
_extends({ template: template, schema: rschema, onButtonClick: this.handleButtonClick }, props), | |
rschema != null ? this.renderSchema(rschema, FieldSet, Field) : null, | |
children | |
); | |
}; | |
return ObjectType; | |
}(_react.Component); | |
ObjectType.template = false; | |
ObjectType.inputClassName = ' '; | |
ObjectType.propTypes = { | |
objectTemplate: _PropTypes2.default.template, | |
fallbackTemplate: _PropTypes2.default.template, | |
schema: _PropTypes2.default.schema, | |
subSchema: _PropTypes2.default.schema, | |
onButtonClick: _PropTypes2.default.event, | |
onSubmit: _PropTypes2.default.submit, | |
buttons: _PropTypes2.default.buttons, | |
path: _PropTypes2.default.path, | |
fieldsets: _PropTypes2.default.fieldset, | |
fields: _PropTypes2.default.fields, | |
FieldSet: _PropTypes2.default.injectClass, | |
Field: _PropTypes2.default.injectClass | |
}; | |
ObjectType.defaultProps = { | |
onButtonClick: _tutils.noop, | |
fallbackTemplate: 'ObjectTemplate', | |
FieldSet: _FieldSet2.default, | |
Field: _Field2.default, | |
subSchema: {}, | |
value: {} | |
}; | |
ObjectType.injectedProps = { | |
value: "." | |
}; | |
ObjectType.contextTypes = _PropTypes2.default.contextTypes; | |
exports.default = ObjectType; | |
/***/ }, | |
/* 435 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _RenderTemplate = __webpack_require__(408); | |
var _RenderTemplate2 = _interopRequireDefault(_RenderTemplate); | |
var _validate = __webpack_require__(436); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var Field = function (_Component) { | |
_inherits(Field, _Component); | |
function Field() { | |
_classCallCheck(this, Field); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
Field.prototype.renderField = function renderField(field, propPath) { | |
var Type = field.Type; | |
var path = field.path; | |
var template = field.template; | |
var validators = field.validators; | |
var rest = _objectWithoutProperties(field, ["Type", "path", "template", "validators"]); | |
var cpath = propPath || path; | |
rest.validators = (0, _validate.createValidator)(validators, cpath, this.context); | |
return _react2.default.createElement( | |
_RenderTemplate2.default, | |
_extends({ key: cpath, template: template, path: cpath }, rest), | |
_react2.default.createElement(Type, _extends({ path: cpath }, rest)) | |
); | |
}; | |
Field.prototype.renderConditional = function renderConditional(conditional) { | |
var _props = this.props; | |
var field = _props.field; | |
var path = _props.path; | |
if (!conditional) { | |
return this.renderField(field, path); | |
} | |
var Conditional = conditional.Conditional; | |
var rest = _objectWithoutProperties(conditional, ["Conditional"]); | |
return _react2.default.createElement( | |
Conditional, | |
_extends({ path: path }, rest, { | |
field: field }), | |
this.renderField(field, conditional.path || path) | |
); | |
}; | |
Field.prototype.render = function render() { | |
if (this.props.transition) { | |
var _props$transition = this.props.transition; | |
var Transition = _props$transition.Transition; | |
var transition = _objectWithoutProperties(_props$transition, ["Transition"]); | |
return _react2.default.createElement( | |
Transition, | |
transition, | |
this.renderConditional(this.props.conditional) | |
); | |
} | |
return this.renderConditional(this.props.conditional); | |
}; | |
return Field; | |
}(_react.Component); | |
Field.displayName = "Field"; | |
Field.contextTypes = { | |
valueManager: _PropTypes2.default.valueManager, | |
loader: _PropTypes2.default.loader | |
}; | |
Field.propTypes = { | |
path: _PropTypes2.default.path.isRequired, | |
field: _PropTypes2.default.field, | |
transition: _PropTypes2.default.transition, | |
conditional: _PropTypes2.default.conditional | |
}; | |
exports.default = Field; | |
/***/ }, | |
/* 436 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.createValidator = createValidator; | |
exports.loadValidators = loadValidators; | |
exports.default = validate; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
var _warning = __webpack_require__(402); | |
var _warning2 = _interopRequireDefault(_warning); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function initValidators(nval) { | |
if (typeof nval === 'function') { | |
return nval; | |
} | |
if (typeof nval === 'string') { | |
var validator = this.loadValidator(nval); | |
(0, _warning2.default)(validator, 'No validator found with name %s', nval); | |
return validator({}); | |
} | |
return this.loadValidator(nval.type)(nval); | |
} | |
function createValidator(value, path, _ref) { | |
var loader = _ref.loader; | |
var valueManager = _ref.valueManager; | |
var validators = (0, _tutils.toArray)(value).map(initValidators, loader); | |
if (validators.length === 0) { | |
return null; | |
} | |
var validator = function validator() { | |
var v = void 0, | |
vm = valueManager; | |
if (arguments.length === 2) { | |
v = arguments.length <= 0 ? undefined : arguments[0]; | |
vm = arguments.length <= 1 ? undefined : arguments[1]; | |
} else { | |
v = vm.path(path); | |
} | |
var length = validators.length; | |
var errors = null; | |
for (var i = 0; i < length; i++) { | |
var error = validators[i](v, vm); | |
if (error != null) { | |
if (errors == null) { | |
errors = []; | |
} | |
if (!Array.isArray(error)) { | |
errors.push(error); | |
} else { | |
var _errors; | |
(_errors = errors).push.apply(_errors, error); | |
} | |
} | |
} | |
return errors; | |
}; | |
return validator; | |
} | |
function loadValidators(value, key, props, context) { | |
var validator = createValidator(value || props.validators, props.path, context); | |
if (validator == null) { | |
return _tutils.noop; | |
} | |
return function () { | |
var errors = validator.apply(undefined, arguments); | |
context.valueManager.updateErrors(props.path, errors); | |
return errors; | |
}; | |
} | |
function validate(Clazz, key) { | |
Clazz.contextTypes.loader = _PropTypes2.default.loader; | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
this.property.call(Clazz, key, loadValidators); | |
} | |
/***/ }, | |
/* 437 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _RenderContent = __webpack_require__(429); | |
var _RenderContent2 = _interopRequireDefault(_RenderContent); | |
var _RenderTemplate = __webpack_require__(408); | |
var _RenderTemplate2 = _interopRequireDefault(_RenderTemplate); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
/** | |
* Manages the the fieldset. It uses FieldSetTemplate or similar, but now | |
* it renders the buttons, so the Template does not have to handle that. | |
* | |
*/ | |
function cleanField(src) { | |
var buttons = src.buttons; | |
var field = src.field; | |
var template = src.template; | |
var legend = src.legend; | |
var transition = src.transition; | |
var content = src.content; | |
var conditional = src.conditional; | |
var fieldsets = src.fieldsets; | |
var rest = _objectWithoutProperties(src, ['buttons', 'field', 'template', 'legend', 'transition', 'content', 'conditional', 'fieldsets']); | |
return rest; | |
} | |
var FieldSet = function (_Component) { | |
_inherits(FieldSet, _Component); | |
function FieldSet() { | |
_classCallCheck(this, FieldSet); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
FieldSet.prototype.renderButtons = function renderButtons(buttons) { | |
if (!buttons) { | |
return null; | |
} | |
if (!buttons.buttons) { | |
buttons = { | |
buttons: buttons | |
}; | |
} | |
return _react2.default.createElement(_RenderTemplate2.default, _extends({ template: this.props.buttonsTemplate, key: 'buttons', | |
onButtonClick: this.props.onButtonClick, | |
onClick: this.props.onClick }, buttons)); | |
}; | |
FieldSet.prototype.renderFieldSet = function renderFieldSet(key) { | |
var _props = this.props; | |
var template = _props.template; | |
var children = _props.children; | |
var style = _props.style; | |
var buttons = _props.buttons; | |
var content = _props.content; | |
var field = _props.field; | |
var rest = _objectWithoutProperties(_props, ['template', 'children', 'style', 'buttons', 'content', 'field']); | |
var renderedContent = content ? _react2.default.createElement(_RenderContent2.default, { content: content, key: 'content-' + key }) : null; | |
return _react2.default.createElement( | |
_RenderTemplate2.default, | |
_extends({ template: template }, cleanField(field), { key: key }, rest, { field: field, | |
buttons: this.renderButtons(buttons), | |
content: renderedContent }), | |
children | |
); | |
}; | |
FieldSet.prototype.render = function render() { | |
if (this.props.transition) { | |
var _props$transition = this.props.transition; | |
var Transition = _props$transition.Transition; | |
var transition = _objectWithoutProperties(_props$transition, ['Transition']); | |
return _react2.default.createElement( | |
Transition, | |
transition, | |
this.renderFieldSet('transition') | |
); | |
} | |
if (this.props.conditional) { | |
var _props$conditional = this.props.conditional; | |
var Conditional = _props$conditional.Conditional; | |
var conditional = _objectWithoutProperties(_props$conditional, ['Conditional']); | |
return _react2.default.createElement( | |
Conditional, | |
conditional, | |
this.renderFieldSet('conditional') | |
); | |
} | |
return this.renderFieldSet(); | |
}; | |
return FieldSet; | |
}(_react.Component); | |
FieldSet.displayName = "FieldSet"; | |
FieldSet.propTypes = { | |
fieldsets: _PropTypes2.default.arrayOf(_PropTypes2.default.shape({ | |
field: _PropTypes2.default.field, | |
fieldsets: _PropTypes2.default.arrayOf(_PropTypes2.default.shape({ | |
field: _PropTypes2.default.field | |
})) | |
})), | |
conditional: _PropTypes2.default.conditional, | |
buttons: _PropTypes2.default.any, | |
onButtonClick: _PropTypes2.default.event, | |
onCancel: _PropTypes2.default.event, | |
field: _PropTypes2.default.any, | |
legend: _PropTypes2.default.any, | |
template: _PropTypes2.default.template, | |
transition: _PropTypes2.default.transition, | |
buttonsTemplate: _PropTypes2.default.template, | |
content: _PropTypes2.default.content | |
}; | |
FieldSet.defaultProps = { | |
template: 'FieldSetTemplate', | |
buttonsTemplate: 'ButtonsTemplate' | |
}; | |
exports.default = FieldSet; | |
/***/ }, | |
/* 438 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _Object = __webpack_require__(434); | |
var _Object2 = _interopRequireDefault(_Object); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _Field = __webpack_require__(435); | |
var _Field2 = _interopRequireDefault(_Field); | |
var _FieldSet = __webpack_require__(437); | |
var _FieldSet2 = _interopRequireDefault(_FieldSet); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
function donner(d) { | |
d && d(); | |
} | |
var WizardMixin = function (_Component) { | |
_inherits(WizardMixin, _Component); | |
function WizardMixin() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, WizardMixin); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = { compState: 0, prevState: 0, maxState: 0, done: false }, _this.handleOnClick = function (evt) { | |
var steps = _this.props.schema.fieldsets.length, | |
value = evt.target.value; | |
if (value < steps && value <= _this.state.maxState) { | |
_this.setNavState(value, true); | |
} | |
}, _this.handleKeyDown = function (e) { | |
if (e.which === 13) { | |
if (_this.state.compState < _this.props.schema.fieldsets.length - 1) { | |
return _this.handleBtn(e, 'next'); | |
} else { | |
return _this.handleBtn(e, 'submit'); | |
} | |
} | |
}, _this.handleValidate = function () {}, _this.handleEnter = function () { | |
_this.setState({ animating: true }); | |
}, _this.handleLeave = function (done) { | |
_this.setState({ animating: false }); | |
done(); | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
WizardMixin.prototype.handleSubmit = function handleSubmit(e) { | |
// e && e.preventDefault(); | |
this._validate(function (errors) { | |
if (errors) { | |
this.setState({ disabled: false, done: false }); | |
return; | |
} | |
this.setState({ done: true }); | |
this.props.onSubmit(e); | |
return; | |
}.bind(this)); | |
}; | |
WizardMixin.prototype.next = function next() { | |
var compState = this.state.compState, | |
nextState = compState + 1, | |
current = this.props.schema.fieldsets[compState]; | |
this.setState({ disabled: true }); | |
this._validate(function (e) { | |
var _this2 = this; | |
if (e) { | |
this.setState({ disabled: false, done: false }); | |
return; | |
} | |
if (this.props.onNext(function (resp) { | |
return _this2.go(nextState, resp); | |
}, nextState, current) === false) { | |
this.setState({ disabled: false, done: false, maxState: Math.max(nextState, this.state.maxState) }); | |
return; | |
} | |
}.bind(this)); | |
}; | |
WizardMixin.prototype.previous = function previous() { | |
var _this3 = this; | |
var compState = this.state.compState, | |
nextState = compState - 1, | |
current = this.props.schema.fieldsets[compState]; | |
this.setState({ disabled: true }); | |
if (this.props.onPrevious(function (resp) { | |
return _this3.go(nextState, resp); | |
}, nextState, current) === false) { | |
this.setState({ disabled: false, done: false }); | |
return; | |
} | |
}; | |
WizardMixin.prototype.go = function go(pos, resp) { | |
if (resp === false) { | |
this.setState({ disabled: false, done: false }); | |
return; | |
} | |
this.setNavState(resp == null ? pos : resp); | |
}; | |
WizardMixin.prototype._validate = function _validate(done) { | |
this.context.valueManager.validatePaths(this.props.schema.fieldsets[this.state.compState].fields, done); | |
}; | |
WizardMixin.prototype.createButtons = function createButtons(state) { | |
var buttons = this.props.schema.fieldsets[state].buttons; | |
var rest = {}; | |
if (buttons) { | |
if (buttons.buttons) { | |
var _buttons = buttons; | |
buttons = _buttons.buttons; | |
rest = _objectWithoutProperties(_buttons, ['buttons']); | |
} | |
if (!Array.isArray(buttons)) { | |
buttons = [buttons]; | |
} | |
} else { | |
buttons = []; | |
var _props$buttons = this.props.buttons; | |
var next = _props$buttons.next; | |
var previous = _props$buttons.previous; | |
var last = _props$buttons.last; | |
var restBtns = _objectWithoutProperties(_props$buttons, ['next', 'previous', 'last']); | |
rest = restBtns; | |
var isFirst = state == 0, | |
isLast = state + 1 === this.props.schema.fieldsets.length; | |
if (isLast) { | |
if (!isFirst) { | |
buttons.push(_extends({ buttonClass: this.props.previousClass }, previous)); | |
} | |
buttons.push(_extends({ buttonClass: this.props.lastClass, primary: true }, last)); | |
} else if (isFirst) { | |
buttons.push(_extends({ buttonClass: this.props.nextClass, primary: true }, next)); | |
} else { | |
buttons.push(_extends({ buttonClass: this.props.previousClass }, previous), _extends({ buttonClass: this.props.nextClass, primary: true }, next)); | |
} | |
} | |
buttons.forEach(function (b) { | |
if (b.action === 'next' || b.action === 'submit') { | |
b.disabled = this.disabled; | |
} | |
}, this.state); | |
return _extends({}, rest, { | |
buttons: buttons | |
}); | |
}; | |
WizardMixin.prototype.handleBtn = function handleBtn(e, action, btn) { | |
e && e.preventDefault(); | |
switch (action) { | |
case 'previous': | |
{ | |
this.previous(); | |
break; | |
} | |
case 'next': | |
{ | |
this.next(); | |
break; | |
} | |
case 'submit': | |
{ | |
this.handleSubmit(e); | |
break; | |
} | |
default: | |
{ | |
this.props.onAction(this.state.compState, action, this); | |
} | |
} | |
}; | |
return WizardMixin; | |
}(_react.Component); | |
WizardMixin.contextTypes = { | |
valueManager: _PropTypes2.default.valueManager | |
}; | |
WizardMixin.defaultProps = { | |
buttonsTemplate: 'ButtonsTemplate', | |
Field: _Field2.default, | |
FieldSet: _FieldSet2.default | |
}; | |
WizardMixin.propTypes = { | |
schema: _PropTypes2.default.any, | |
buttonsTemplate: _PropTypes2.default.template, | |
onSubmit: _PropTypes2.default.submit, | |
FieldSet: _PropTypes2.default.injectClass, | |
Field: _PropTypes2.default.injectClass | |
}; | |
exports.default = WizardMixin; | |
/***/ }, | |
/* 439 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var assign = __webpack_require__(324), | |
assignDefaults = __webpack_require__(440), | |
createDefaults = __webpack_require__(441); | |
/** | |
* Assigns own enumerable properties of source object(s) to the destination | |
* object for all destination properties that resolve to `undefined`. Once a | |
* property is set, additional values of the same property are ignored. | |
* | |
* **Note:** This method mutates `object`. | |
* | |
* @static | |
* @memberOf _ | |
* @category Object | |
* @param {Object} object The destination object. | |
* @param {...Object} [sources] The source objects. | |
* @returns {Object} Returns `object`. | |
* @example | |
* | |
* _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); | |
* // => { 'user': 'barney', 'age': 36 } | |
*/ | |
var defaults = createDefaults(assign, assignDefaults); | |
module.exports = defaults; | |
/***/ }, | |
/* 440 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* Used by `_.defaults` to customize its `_.assign` use. | |
* | |
* @private | |
* @param {*} objectValue The destination object property value. | |
* @param {*} sourceValue The source object property value. | |
* @returns {*} Returns the value to assign to the destination object. | |
*/ | |
function assignDefaults(objectValue, sourceValue) { | |
return objectValue === undefined ? sourceValue : objectValue; | |
} | |
module.exports = assignDefaults; | |
/***/ }, | |
/* 441 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var restParam = __webpack_require__(347); | |
/** | |
* Creates a `_.defaults` or `_.defaultsDeep` function. | |
* | |
* @private | |
* @param {Function} assigner The function to assign values. | |
* @param {Function} customizer The function to customize assigned values. | |
* @returns {Function} Returns the new defaults function. | |
*/ | |
function createDefaults(assigner, customizer) { | |
return restParam(function (args) { | |
var object = args[0]; | |
if (object == null) { | |
return object; | |
} | |
args.push(customizer); | |
return assigner.apply(undefined, args); | |
}); | |
} | |
module.exports = createDefaults; | |
/***/ }, | |
/* 442 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var context = __webpack_require__(443), | |
api = {}; //make sure you have your directory and regex test set correctly! | |
context.keys().forEach(function (key) { | |
var k = key.replace(/^\.\/(.*)\.js(x)?$/, '$1'); | |
api[k] = context(key).default; | |
}); | |
module.exports = api; | |
/***/ }, | |
/* 443 */ | |
/***/ function(module, exports, __webpack_require__) { | |
var map = { | |
"./Autocomplete.jsx": 444, | |
"./Checkbox.jsx": 447, | |
"./Checkboxes.jsx": 448, | |
"./CollectionMixin.jsx": 449, | |
"./Content.jsx": 413, | |
"./ContentWrapper.jsx": 414, | |
"./Date.jsx": 450, | |
"./Hidden.jsx": 451, | |
"./LazyType.jsx": 452, | |
"./List.jsx": 453, | |
"./Mixed.jsx": 454, | |
"./Number.jsx": 455, | |
"./Object.jsx": 434, | |
"./Password.jsx": 456, | |
"./Radio.jsx": 457, | |
"./Restricted.jsx": 458, | |
"./RestrictedMixin.js": 459, | |
"./Select.jsx": 460, | |
"./Text.jsx": 461, | |
"./TextArea.jsx": 462, | |
"./index.js": 442 | |
}; | |
function webpackContext(req) { | |
return __webpack_require__(webpackContextResolve(req)); | |
}; | |
function webpackContextResolve(req) { | |
return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }()); | |
}; | |
webpackContext.keys = function webpackContextKeys() { | |
return Object.keys(map); | |
}; | |
webpackContext.resolve = webpackContextResolve; | |
module.exports = webpackContext; | |
webpackContext.id = 443; | |
/***/ }, | |
/* 444 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _tutils = __webpack_require__(322); | |
var _Dom = __webpack_require__(445); | |
var _Dom2 = _interopRequireDefault(_Dom); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _RenderTemplate = __webpack_require__(408); | |
var _RenderTemplate2 = _interopRequireDefault(_RenderTemplate); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var Autocomplete = function (_Component) { | |
_inherits(Autocomplete, _Component); | |
function Autocomplete() { | |
var _temp, _this2, _ret; | |
_classCallCheck(this, Autocomplete); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this2 = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this2), _this2.state = { suggestions: [], showing: false, focus: -1 }, _this2.hide = function (selectValue) { | |
var _this2$state = _this2.state; | |
var selected = _this2$state.selected; | |
var input = _this2$state.input; | |
var suggestions = _this2$state.suggestions; | |
var focus = _this2$state.focus;var i = 0;var l;var options;var found = false; | |
suggestions = suggestions || []; | |
if (selectValue) { | |
var p = _this2.getProcessor(); | |
if (selectValue && focus > -1) { | |
selected = suggestions[focus]; | |
} else if (input == null || input.trim() === '') { | |
selected = null; | |
input = null; | |
} else if (!selected || input !== selected.label) { | |
if (suggestions.length === 1) { | |
selected = suggestions[0]; | |
input = selected.label; | |
} else { | |
selected = null; | |
options = suggestions; | |
l = options.length; | |
for (; i < l; i++) { | |
var opt = options[i]; | |
if (opt.label === input) { | |
selected = opt; | |
input = opt.label; | |
found = true; | |
break; | |
} | |
} | |
if (!found) { | |
input = null; | |
} | |
} | |
} | |
if (selected !== _this2.state.selected) { | |
_this2.onSelect(selected); | |
} else { | |
if (_this2.props.onBlur) _this2.props.onBlur(selected && selected.val, _this2.props.value, _this2.props.name, _this2.props.path); | |
_this2.setState({ suggestions: [], selected: selected, input: input, showing: false, focus: -1 }); | |
} | |
} else { | |
_this2.setState({ showing: false, focus: -1, suggestions: [] }, _this2.un); | |
} | |
// this.props.onBlur(); | |
}, _this2.bindDocument = function () { | |
if (_this2._bound) { | |
return; | |
} | |
_this2.unbindDocument(); | |
_this2._bound = true; | |
_this2._onDocumentClickListener = _Dom2.default.listen(_this2, 'click', _this2.handleDocumentClick); | |
_this2._onDocumentKeyupListener = _Dom2.default.listen(_this2, 'keyup', _this2.handleDocumentKeyUp); | |
_this2._onDocumentKeydownListener = _Dom2.default.listen(_this2, 'keypress', _this2.handleDocumentEnter); | |
}, _this2.handleDocumentEnter = function (e) { | |
if (e.keyCode === 13 && _this2.state.suggestions && _this2.state.suggestions.length) { | |
e.preventDefault(); | |
e.stopPropagation(); | |
_this2.hide(true); | |
} | |
}, _this2.handleDocumentKeyUp = function (e) { | |
if (e.keyCode === 27) { | |
_this2.hide(false); | |
} | |
}, _this2.handleDocumentClick = function (e) { | |
// If the click originated from within this component | |
// don't do anything. | |
if (_Dom2.default.isNodeInRoot(e.target, _this2)) { | |
return; | |
} | |
_this2.hide(false); | |
}, _this2.handleSuggestionClick = function (o) { | |
_this2.onSelect(o); | |
}, _this2.onSelect = function (o) { | |
if (_this2.props.onSelect(o) === false) { | |
return; | |
} | |
var p = _this2.processor(); | |
var value = p.value(o); | |
if (_this2.props.onChange(value) !== false) { | |
var input = p.format(o); | |
_this2.setState({ | |
suggestions: [], | |
showing: false, | |
focus: -1, | |
selected: o, | |
value: value, | |
input: input | |
}); | |
} | |
}, _this2._handleDispatch = function (input) { | |
_this2.setState({ | |
input: input, | |
selected: null | |
}); | |
if (_this2._fetch && _this2._fetch.cancel) { | |
_this2._fetch.cancel(); | |
} | |
var _this = _this2; | |
_this2._fetch = _this2.processor().fetch(_this2.props.url, input, _this2, function (err, suggestions) { | |
if (err) { | |
return; | |
} | |
if (_this.props.autoSelectSingle && suggestions && suggestions.length === 1) { | |
_this.onSelect(suggestions[0]); | |
} else { | |
_this.props.onInputChange(input); | |
_this.setState({ | |
suggestions: suggestions || [], | |
showing: true, | |
input: input | |
}); | |
} | |
}); | |
}, _this2.handleKeyUp = function (e) { | |
if (_this2.props.onKeyUp) { | |
_this2.props.onKeyUp.call(_this2, e); | |
} | |
var focus = _this2.state.focus, | |
s = _this2.state.suggestions; | |
if (s && s.length) { | |
var update = false; | |
switch (e.key || e.keyCode) { | |
case 'Up': | |
case 38: | |
case 'ArrowUp': | |
{ | |
focus = Math.max(-1, focus - 1); | |
update = true; | |
break; | |
} | |
case 40: | |
case 'Down': | |
case 'ArrowDown': | |
{ | |
focus = Math.min(s.length, focus + 1); | |
update = true; | |
break; | |
} | |
case 'Enter': | |
{ | |
if (e) { | |
e.preventDefault(); | |
e.stopPropagation(); | |
} | |
if (s.length) { | |
_this2.handleSuggestionClick(s[Math.max(_this2.state.focus, 0)]); | |
_this2.setState({ suggestions: [], showing: false, focus: -1 }); | |
return; | |
} | |
_this2.hide(); | |
break; | |
} | |
} | |
if (update) { | |
//e.preventDefault(); | |
_this2.setState({ focus: focus }); | |
} | |
} | |
}, _this2.handleChange = function (e) { | |
_this2._handleDispatch(e.target.value); | |
}, _this2.handlePaste = function (event) { | |
var items = event.clipboardData && event.clipboardData.items; | |
items && items[0] && items[0].getAsString(function (input) { | |
_this2.setState({ input: input, suggestions: [], showing: false }); | |
}); | |
}, _this2.handleBlur = function (event) { | |
var suggestions = _this2.state.suggestions || []; | |
if (suggestions.length === 1 && !_this2.state.selected) { | |
_this2.handleSuggestionClick(suggestions[Math.max(0, _this2.state.focus)]); | |
} | |
if (_this2.props.onBlur) _this2.props.onBlur(event); | |
}, _temp), _possibleConstructorReturn(_this2, _ret); | |
} | |
Autocomplete.prototype.componentWillMount = function componentWillMount() { | |
this._processProps(this.props); | |
}; | |
Autocomplete.prototype.componentWillReceiveProps = function componentWillReceiveProps(props, context) { | |
this._processProps(props); | |
}; | |
Autocomplete.prototype.componentWillUpdate = function componentWillUpdate(nextProps, nextState) { | |
if (nextState && nextState.suggestions && nextState.suggestions.length) { | |
this.bindDocument(); | |
} else { | |
this.unbindDocument(); | |
} | |
}; | |
Autocomplete.prototype.setValue = function setValue(v) { | |
var p = this.processor(); | |
var value = p.value(v); | |
var input = p.format(v); | |
this.setState({ | |
value: value, | |
selected: v, | |
input: input, | |
showing: false, | |
suggestions: [] | |
}); | |
}; | |
/** In the event that the value does not have the meta data for displaying | |
* We will try to fetch the object and format it. | |
* @param props | |
* @private | |
*/ | |
Autocomplete.prototype._processProps = function _processProps(props) { | |
var _this3 = this; | |
var value = props.value; | |
if (value && value !== this.state.value) { | |
//see if we can get the formatted value from the value, may not work. | |
var input = props.processor.format(value); | |
if (input == null) { | |
//It didn't format to a value, go fetch it so we can display it. | |
props.processor.fetch(props.url, value, this, function (e, o) { | |
if (o && o.length === 1) { | |
_this3.setValue(o[0]); | |
} else { | |
_this3.setState({ | |
suggestions: o, | |
showing: true | |
}); | |
} | |
}); | |
} else { | |
this.setState({ input: input, value: value }); | |
} | |
} | |
}; | |
/** | |
* Hide could be called when a user has not selected a value. | |
* | |
* If their is a selected value and input equals its label select it. | |
* So if there is only 1 selection select it. | |
* If | |
*/ | |
Autocomplete.prototype.componentWillUnmount = function componentWillUnmount() { | |
this.unbindDocument(); | |
}; | |
Autocomplete.prototype.unbindDocument = function unbindDocument() { | |
this._bound = false; | |
if (this._onDocumentClickListener) { | |
this._onDocumentClickListener.remove(); | |
} | |
if (this._onDocumentKeyupListener) { | |
this._onDocumentKeyupListener.remove(); | |
} | |
if (this._onDocumentKeydownListener) { | |
this._onDocumentKeydownListener.remove(); | |
} | |
}; | |
Autocomplete.prototype.processor = function processor() { | |
return this.props.processor; | |
}; | |
Autocomplete.prototype.renderSuggestions = function renderSuggestions() { | |
var suggestions = this.state.suggestions || []; | |
if (this.state.showing === false || suggestions.length === 0) { | |
return null; | |
} | |
var _state = this.state; | |
var focus = _state.focus; | |
var input = _state.input; | |
var processor = this.processor(); | |
var handleSuggestionClick = this.handleSuggestionClick; | |
var itemTemplate = this.props.itemTemplate; | |
return _react2.default.createElement( | |
"ul", | |
{ className: this.props.listGroupClass }, | |
suggestions.map(function (item, i) { | |
return _react2.default.createElement(_RenderTemplate2.default, { template: itemTemplate, | |
key: "autocomplete-" + i, | |
focus: focus === i, | |
value: input, | |
processor: processor, | |
onSelect: handleSuggestionClick, | |
data: item }); | |
}) | |
); | |
}; | |
Autocomplete.prototype.render = function render() { | |
var suggestions = this.state.suggestions || []; | |
var _props = this.props; | |
var foundClass = _props.foundClass; | |
var namespaceClass = _props.namespaceClass; | |
var inputType = _props.inputType; | |
var id = _props.id; | |
var input = _props.input; | |
var notFoundClass = _props.notFoundClass; | |
var inputProps = { | |
onPaste: this.handlePaste, | |
onKeyDown: this.handleKeyUp, | |
onBlur: this.handleBlur, | |
onChange: this.handleChange, | |
value: this.state.input, | |
id: id | |
}; | |
var Input = inputType; | |
return _react2.default.createElement( | |
"div", | |
{ className: namespaceClass + " " + (suggestions.length > 0 ? foundClass : notFoundClass) }, | |
_react2.default.createElement(Input, _extends({}, inputProps, { ref: "input" })), | |
this.renderSuggestions() | |
); | |
}; | |
return Autocomplete; | |
}(_react.Component); | |
Autocomplete.propTypes = { | |
inputType: _PropTypes2.default.type, | |
onChange: _PropTypes2.default.valueEvent, | |
onSelect: _PropTypes2.default.event, | |
minLength: _PropTypes2.default.number, | |
autoSelectSingle: _PropTypes2.default.bool, | |
useshowing: _PropTypes2.default.bool, | |
maxInputLength: _PropTypes2.default.number, | |
itemTemplate: _PropTypes2.default.template, | |
processor: _PropTypes2.default.processor, | |
showing: _PropTypes2.default.content, | |
foundClass: _PropTypes2.default.cssClass, | |
notFoundClass: _PropTypes2.default.cssClass, | |
options: _PropTypes2.default.options, | |
onInputChange: _PropTypes2.default.event, | |
style: _PropTypes2.default.style, | |
url: _PropTypes2.default.expression | |
}; | |
Autocomplete.defaultProps = { | |
country: 'US', | |
locale: 'en_US', | |
useshowing: true, | |
minLength: 1, | |
maxInputLength: 200, | |
itemTemplate: "AutocompleteItemTemplate", | |
inputType: { | |
type: 'Text', | |
propTypes: { value: _PropTypes2.default.any }, | |
defaultProps: { value: '' } | |
}, | |
processor: 'OptionsProcessor', | |
showing: 'Searching...', | |
input: 'input', | |
inputValue: 'input' | |
}; | |
exports.default = Autocomplete; | |
/***/ }, | |
/* 445 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
var EventListener = __webpack_require__(446); | |
var ReactDOM = __webpack_require__(303); | |
module.exports = { | |
EventListener: EventListener, | |
ownerDocument: ownerDocument, | |
isNodeInRoot: isNodeInRoot, | |
listen: listen | |
}; | |
/** | |
* listen | |
*/ | |
function listen(node, event, func) { | |
return EventListener.listen(ownerDocument(node), event, func); | |
} | |
/** | |
* Get elements owner document | |
* | |
* @param {ReactComponent|HTMLElement} componentOrElement | |
* @returns {HTMLElement} | |
*/ | |
function ownerDocument(componentOrElement) { | |
var elem = ReactDOM.findDOMNode(componentOrElement); | |
return elem && elem.ownerDocument || document; | |
} | |
/** | |
* Checks whether a node is within | |
* a root nodes tree | |
* | |
* @param {DOMElement} node | |
* @param {DOMElement} root | |
* @returns {boolean} | |
*/ | |
function isNodeInRoot(node, root) { | |
node = ReactDOM.findDOMNode(node), root = ReactDOM.findDOMNode(root); | |
return _isNodeInRoot(node, root); | |
} | |
function _isNodeInRoot(node, root) { | |
while (node) { | |
if (node === root) { | |
return true; | |
} | |
node = node.parentNode; | |
} | |
return false; | |
} | |
/***/ }, | |
/* 446 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
/** | |
* Copyright (c) 2013-present, Facebook, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
* | |
* @typechecks | |
*/ | |
var emptyFunction = __webpack_require__(316); | |
/** | |
* Upstream version of event listener. Does not take into account specific | |
* nature of platform. | |
*/ | |
var EventListener = { | |
/** | |
* Listen to DOM events during the bubble phase. | |
* | |
* @param {DOMEventTarget} target DOM element to register listener on. | |
* @param {string} eventType Event type, e.g. 'click' or 'mouseover'. | |
* @param {function} callback Callback function. | |
* @return {object} Object with a `remove` method. | |
*/ | |
listen: function listen(target, eventType, callback) { | |
if (target.addEventListener) { | |
target.addEventListener(eventType, callback, false); | |
return { | |
remove: function remove() { | |
target.removeEventListener(eventType, callback, false); | |
} | |
}; | |
} else if (target.attachEvent) { | |
target.attachEvent('on' + eventType, callback); | |
return { | |
remove: function remove() { | |
target.detachEvent('on' + eventType, callback); | |
} | |
}; | |
} | |
}, | |
/** | |
* Listen to DOM events during the capture phase. | |
* | |
* @param {DOMEventTarget} target DOM element to register listener on. | |
* @param {string} eventType Event type, e.g. 'click' or 'mouseover'. | |
* @param {function} callback Callback function. | |
* @return {object} Object with a `remove` method. | |
*/ | |
capture: function capture(target, eventType, callback) { | |
if (target.addEventListener) { | |
target.addEventListener(eventType, callback, true); | |
return { | |
remove: function remove() { | |
target.removeEventListener(eventType, callback, true); | |
} | |
}; | |
} else { | |
if (false) { | |
console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.'); | |
} | |
return { | |
remove: emptyFunction | |
}; | |
} | |
}, | |
registerDefault: function registerDefault() {} | |
}; | |
module.exports = EventListener; | |
/***/ }, | |
/* 447 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var Checkbox = function (_Component) { | |
_inherits(Checkbox, _Component); | |
function Checkbox() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, Checkbox); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.handleChange = function (e) { | |
var value = _this.props.value; | |
//Blur does not get called on checkbox, so we do check on change anyways. | |
var val = e.target.checked ? !value ? true : value : !value ? false : null; | |
_this.props.onChange(val); | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
Checkbox.prototype.render = function render() { | |
var _props = this.props; | |
var onChange = _props.onChange; | |
var value = _props.value; | |
var className = _props.className; | |
var checkedClass = _props.checkedClass; | |
var props = _objectWithoutProperties(_props, ["onChange", "value", "className", "checkedClass"]); | |
var checked = typeof value === 'boolean' ? value : value == null || value === '' ? this.props.checked : true; | |
return _react2.default.createElement("input", _extends({}, props, { value: value == null ? '' : value, | |
className: className + ' ' + (checked ? checkedClass : ''), | |
checked: checked, onChange: this.handleChange })); | |
}; | |
return Checkbox; | |
}(_react.Component); | |
Checkbox.inputClassName = ' '; | |
Checkbox.propTypes = { | |
onChange: _PropTypes2.default.valueEvent, | |
checkedClass: _PropTypes2.default.cssClass, | |
onValidate: _PropTypes2.default.changeValidate | |
}; | |
Checkbox.defaultProps = { | |
type: 'checkbox', | |
checkedClass: '' | |
}; | |
exports.default = Checkbox; | |
/***/ }, | |
/* 448 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
var _RenderTemplate = __webpack_require__(408); | |
var _RenderTemplate2 = _interopRequireDefault(_RenderTemplate); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var Checkboxes = function (_Component) { | |
_inherits(Checkboxes, _Component); | |
function Checkboxes() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, Checkboxes); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.handleCheckChange = function (e) { | |
if (_this.props.dataType === 'radio') { | |
_this.props.onChange(e.target.checked ? e.target.value : null); | |
if (_this.props.onBlur) { | |
_this.props.onBlur(); | |
} | |
return; | |
} | |
var newValues = _this.props.value.concat(); | |
var idx = newValues.indexOf(e.target.value); | |
if (e.target.checked) { | |
if (idx < 0) newValues.push(e.target.value); | |
} else { | |
if (idx > -1) newValues.splice(idx, 1); | |
} | |
_this.props.onChange(newValues); | |
_this.props.onBlur(); | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
//override added input Class Names. | |
Checkboxes.prototype._createCheckbox = function _createCheckbox(option, index, group) { | |
var id = (0, _tutils.path)(this.props.path, group, index); | |
var val = option.val; | |
var labelHTML = option.labelHTML; | |
var label = option.label; | |
val = val == null ? label || labelHTML : val; | |
label = labelHTML || label; | |
var value = this.props.value; | |
var labelContent = label ? _react2.default.createElement("span", { dangerouslySetInnerHTML: { __html: label } }) : val; | |
var opts = { | |
onChange: this.handleCheckChange, | |
name: group, | |
checked: value ? !!~value.indexOf(val) : false, | |
id: id, | |
value: val | |
}; | |
return _react2.default.createElement( | |
_RenderTemplate2.default, | |
_extends({ template: this.props.itemTemplate, key: "checkbox-" + index + "-" + group, label: labelContent, | |
type: "checkbox" }, opts), | |
_react2.default.createElement("input", _extends({ type: this.props.type }, opts)) | |
); | |
}; | |
Checkboxes.prototype._createGroup = function _createGroup(option, index, group) { | |
var _props = this.props; | |
var Checkboxes = _props.Checkboxes; | |
var groupTemplate = _props.groupTemplate; | |
var name = _props.name; | |
var value = _props.value; | |
var rest = _objectWithoutProperties(_props, ["Checkboxes", "groupTemplate", "name", "value"]); | |
return _react2.default.createElement( | |
_RenderTemplate2.default, | |
{ template: groupTemplate, key: "checkbox-group-" + index + "-" + option.group, | |
legend: option.legend || option.group }, | |
this.makeOptions(option.options, group + '-' + index) | |
); | |
}; | |
/** | |
* Create the checkbox list HTML | |
* @param {Array} Options as a simple array e.g. ['option1', 'option2'] | |
* or as an array of objects e.g. [{val: 543, label: 'Title for object 543'}] | |
* @return {String} HTML | |
*/ | |
Checkboxes.prototype.makeOptions = function makeOptions(array, group) { | |
var _this2 = this; | |
return array.map(function (option, index) { | |
return option.group ? _this2._createGroup(option, index, group) : _this2._createCheckbox(option, index, group); | |
}); | |
}; | |
Checkboxes.prototype.render = function render() { | |
return _react2.default.createElement( | |
"div", | |
{ className: this.props.className }, | |
this.makeOptions(this.props.options, this.props.path) | |
); | |
}; | |
return Checkboxes; | |
}(_react.Component); | |
Checkboxes.inputClassName = ' '; | |
Checkboxes.propTypes = { | |
onChange: _PropTypes2.default.valueEvent, | |
options: _PropTypes2.default.options, | |
item: _PropTypes2.default.type, | |
name: _PropTypes2.default.string, | |
itemTemplate: _PropTypes2.default.template, | |
groupTemplate: _PropTypes2.default.template, | |
path: _PropTypes2.default.path, | |
dataType: _PropTypes2.default.dataType, | |
onBlur: _PropTypes2.default.changeValidate | |
}; | |
Checkboxes.defaultProps = { | |
options: _tutils.FREEZE_ARR, | |
item: 'Text', | |
itemTemplate: 'CheckboxesTemplate', | |
groupTemplate: 'CheckboxesGroupTemplate', | |
//make the value an array regardless of input | |
value: { | |
processor: 'ArrayProcessor' | |
}, | |
dataType: "checkbox" | |
}; | |
exports.default = Checkboxes; | |
/***/ }, | |
/* 449 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _tutils = __webpack_require__(322); | |
var _Object = __webpack_require__(434); | |
var _Object2 = _interopRequireDefault(_Object); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _defaults = __webpack_require__(439); | |
var _defaults2 = _interopRequireDefault(_defaults); | |
var _RenderTemplate = __webpack_require__(408); | |
var _RenderTemplate2 = _interopRequireDefault(_RenderTemplate); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
function makeEditPid(path, pid) { | |
return '@' + path.replace(/\./g, '@') + (pid != null ? "@" + pid : ''); | |
} | |
function remove(obj, key) { | |
if (!obj) return; | |
if (Array.isArray(obj)) { | |
obj.splice(key, 1); | |
} else { | |
delete obj[key]; | |
} | |
return obj; | |
} | |
var CollectionMixin = function (_Component) { | |
_inherits(CollectionMixin, _Component); | |
function CollectionMixin(props) { | |
_classCallCheck(this, CollectionMixin); | |
for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
rest[_key - 1] = arguments[_key]; | |
} | |
var _this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this, props].concat(rest))); | |
_this.state = { | |
showAdd: _this.props.showAdd | |
}; | |
_this.handleMoveUp = function (pos, val) { | |
_this.reorder(pos, val, -1); | |
}; | |
_this.handleMoveDown = function (pos, val) { | |
_this.reorder(pos, val, 1); | |
}; | |
_this.handleDelete = function (pos, val, pid) { | |
var values = _this.props.value, | |
oval = values && values.concat(); | |
if (_this.props.onWillDelete(pos, val) !== false) { | |
values.splice(pos, 1); | |
_this.changeValue(values, oval); | |
} | |
}; | |
_this.changeValue = function (newValue, oldValue) { | |
if (_this.props.onChange(newValue) !== false) { | |
_this.setState({ | |
showAdd: _this.props.showAdd, | |
showEdit: false | |
}); | |
} | |
}; | |
_this.handleAddBtn = function (e) { | |
e && e.preventDefault(); | |
var key = _this.createPid(); | |
_this.context.valueManager.update(makeEditPid(_this.props.path, key), { | |
key: key | |
}); | |
_this.setState({ showAdd: true, editPid: key }); | |
}; | |
_this.handleEdit = function (pos, val, pid) { | |
_this.context.valueManager.update(makeEditPid(_this.props.path, pid), { | |
value: (0, _tutils.clone)(val), | |
key: pid | |
}); | |
_this.setState({ | |
showAdd: false, | |
showEdit: true, | |
editPid: pid | |
}); | |
}; | |
_this.handleCancelAdd = function (e) { | |
e && e.preventDefault(); | |
_this.setState({ showAdd: _this.props.showAdd, showEdit: false }); | |
}; | |
_this.handleBtnClick = function (e, action) { | |
e && e.preventDefault(); | |
if (action == 'submit') { | |
_this.handleSubmit(e); | |
} else { | |
_this.context.valueManager.update(makeEditPid(_this.props.path, _this.state.editPid)); | |
_this.setState({ | |
showAdd: _this.props.showAdd, | |
showEdit: false, | |
editPid: null | |
}); | |
} | |
}; | |
_this.handleSubmit = function (e) { | |
e && e.preventDefault(); | |
var valueManager = _this.context.valueManager; | |
var origKey = makeEditPid(_this.props.path, _this.state.editPid); | |
var origValue = valueManager.path(origKey) || {}; | |
var key = origValue.key; | |
var value = origValue.value; | |
var errors = valueManager.getErrors(); | |
if (errors == null || Object.keys(errors).length === 0) { | |
var currentPath = (0, _tutils.path)(_this.props.path, key); | |
//value fix. | |
var clonedValue = !_this.props.value ? _this.createDefValue() : (0, _tutils.clone)(_this.props.value); | |
if (!_this.props.onSubmit || _this.props.onSubmit(e, errors, value, currentPath) !== false) { | |
if (key) { | |
clonedValue[key] = value; | |
//if the key changed, remove the original. | |
if (origKey !== makeEditPid(currentPath)) { | |
remove(clonedValue, _this.state.editPid); | |
} | |
} else { | |
clonedValue.unshift(value); | |
} | |
valueManager.update(origKey); | |
_this.props.onChange(clonedValue); | |
} | |
//return false; | |
} else { | |
return false; | |
} | |
_this.setState({ | |
showAdd: _this.props.showAdd, | |
showEdit: false, | |
editPid: null | |
}); | |
}; | |
_this._length = _this.count(props.value); | |
return _this; | |
} | |
CollectionMixin.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) { | |
var showAdd = props.showAdd; | |
if (showAdd !== this.props.showAdd) { | |
this.setState({ showAdd: showAdd }); | |
} | |
this._length = this.count(props.value); | |
}; | |
CollectionMixin.prototype.count = function count(value) { | |
return value ? value.length : 0; | |
}; | |
CollectionMixin.prototype.getValue = function getValue() { | |
return this.props.value; | |
}; | |
CollectionMixin.prototype.setErrors = function setErrors(errors) { | |
this.setState({ errors: errors }); | |
}; | |
CollectionMixin.prototype.reorder = function reorder(pos, val, direction) { | |
var values = this.props.value, | |
oval = values && values.concat(); | |
var newPos = direction > 0 ? Math.min(pos + direction, values.length) : Math.max(pos + direction, 0); | |
if (this.props.onWillReorder(pos, val, direction) !== false) { | |
values.splice(newPos, 0, values.splice(pos, 1)[0]); | |
this.changeValue(values, oval); | |
} | |
}; | |
CollectionMixin.prototype.renderAddEditTemplate = function renderAddEditTemplate(edit, create) { | |
if (!(edit || create)) { | |
return null; | |
} | |
var childPath = (0, _tutils.path)(this.props.path, this.state.editPid); | |
var _props = this.props; | |
var ObjectType = _props.ObjectType; | |
var editTemplate = _props.editTemplate; | |
var createTemplate = _props.createTemplate; | |
return _react2.default.createElement( | |
_RenderTemplate2.default, | |
{ template: edit ? editTemplate : createTemplate, inline: edit ? this.props.inline : false, | |
create: edit ? false : create, | |
title: this.props.title, key: "addEditTemplate" }, | |
_react2.default.createElement(ObjectType, { key: "addEdit", | |
onButtonClick: this.handleBtnClick, | |
schema: this.createItemSchema(childPath, edit), | |
path: makeEditPid(this.props.path, this.state.editPid) | |
}) | |
); | |
}; | |
CollectionMixin.prototype.renderAddBtn = function renderAddBtn() { | |
if (!this.props.canAdd) { | |
return null; | |
} | |
var btn = (0, _defaults2.default)({}, this.props.addButton, CollectionMixin.defaultProps.addButton); | |
return _react2.default.createElement(_RenderTemplate2.default, _extends({ template: this.props.buttonTemplate, key: "addBtn" }, btn, { | |
onClick: this.handleAddBtn, | |
iconClass: this.props.iconAddClass })); | |
}; | |
CollectionMixin.prototype.renderAdd = function renderAdd() { | |
if (!(this.props.canAdd || this.props.canEdit)) { | |
return null; | |
} | |
var _state = this.state; | |
var showAdd = _state.showAdd; | |
var showEdit = _state.showEdit; | |
if (this.props.inline) { | |
if (showAdd) { | |
return this.renderAddEditTemplate(false, true); | |
} else { | |
return this.renderAddBtn(); | |
} | |
} else if (!(showAdd || showEdit)) { | |
return this.renderAddBtn(); | |
} | |
return this.renderAddEditTemplate(showEdit, showAdd); | |
}; | |
CollectionMixin.prototype.createItemSchema = function createItemSchema(edit) { | |
var schema = { | |
schema: this.getTemplateItem(edit), | |
fieldsets: [{ | |
fields: ['key', 'value'], | |
buttons: this.props.buttons | |
}] | |
}; | |
return schema; | |
}; | |
CollectionMixin.prototype.renderRowEach = function renderRowEach(data, rowId) { | |
return this.renderRow(data, null, rowId, rowId); | |
}; | |
CollectionMixin.prototype.renderRows = function renderRows() { | |
if (this.props.value) { | |
return this.props.value.map(this.renderRowEach, this); | |
} | |
return null; | |
}; | |
CollectionMixin.prototype.renderRow = function renderRow(value, sectionId, pos, key) { | |
var _props2 = this.props; | |
var itemTemplate = _props2.itemTemplate; | |
var contentTemplate = _props2.contentTemplate; | |
var v = { value: value }; | |
return _react2.default.createElement( | |
_RenderTemplate2.default, | |
{ template: itemTemplate, | |
key: this.props.path + '.' + pos, | |
pos: pos, | |
path: (0, _tutils.path)(this.props.path, key), | |
onMoveUp: this.handleMoveUp, | |
onMoveDown: this.handleMoveDown, | |
onDelete: this.handleDelete, | |
onEdit: this.handleEdit, | |
canReorder: this.props.canReorder, | |
canDelete: this.props.canDelete, | |
canEdit: this.props.canEdit, | |
value: v, | |
last: pos + 1 === this._length, | |
errors: this.props.errors }, | |
this.props.inline && this.state.editPid === pos ? this.renderAddEditTemplate(v, false) : _react2.default.createElement(_RenderTemplate2.default, { template: contentTemplate, | |
labelKey: this.props.labelKey, | |
pos: pos, | |
pid: key, | |
value: v, | |
showKey: this.props.showKey, | |
onClick: this.props.canEdit ? this.handleEdit : null }) | |
); | |
}; | |
CollectionMixin.prototype.render = function render() { | |
var _props3 = this.props; | |
var className = _props3.className; | |
var listContainerClass = _props3.listContainerClass; | |
return _react2.default.createElement( | |
"div", | |
{ className: className }, | |
this.renderAdd(), | |
_react2.default.createElement( | |
"ul", | |
{ className: listContainerClass }, | |
this.renderRows() | |
) | |
); | |
}; | |
return CollectionMixin; | |
}(_react.Component); | |
CollectionMixin.inputClassName = 'list-editor'; | |
CollectionMixin.contextTypes = { valueManager: _PropTypes2.default.valueManager }; | |
CollectionMixin.propTypes = { | |
onChange: _PropTypes2.default.valueEvent, | |
path: _PropTypes2.default.path, | |
showAdd: _PropTypes2.default.bool, | |
canEdit: _PropTypes2.default.bool, | |
canReorder: _PropTypes2.default.bool, | |
canDelete: _PropTypes2.default.bool, | |
canAdd: _PropTypes2.default.bool, | |
showKey: _PropTypes2.default.bool, | |
inline: _PropTypes2.default.bool, | |
labelKey: _PropTypes2.default.string, | |
itemType: _PropTypes2.default.typeDescription, | |
editType: _PropTypes2.default.typeDescription, | |
createType: _PropTypes2.default.typeDescription, | |
editTemplate: _PropTypes2.default.template, | |
createTemplate: _PropTypes2.default.template, | |
buttonTemplate: _PropTypes2.default.template, | |
itemTemplate: _PropTypes2.default.template, | |
contentTemplate: _PropTypes2.default.template, | |
buttons: _PropTypes2.default.buttons, | |
addButton: _PropTypes2.default.button, | |
listContainerClass: _PropTypes2.default.cssClass, | |
ObjectType: _PropTypes2.default.injectClass, | |
value: _PropTypes2.default.value, | |
title: _PropTypes2.default.title | |
}; | |
CollectionMixin.defaultProps = { | |
onWillReorder: _tutils.noop, | |
onWillChange: _tutils.noop, | |
onWillAdd: _tutils.noop, | |
onWillDelete: _tutils.noop, | |
createTemplate: 'CollectionCreateTemplate', | |
editTemplate: 'CollectionCreateTemplate', | |
buttonTemplate: 'ButtonTemplate', | |
itemTemplate: 'ListItemTemplate', | |
contentTemplate: "ContentItemTemplate", | |
showKey: false, | |
showAdd: false, | |
itemType: { | |
type: 'Text' | |
}, | |
addButton: { | |
"label": "Add", | |
"className": "btn btn-default btn-add" | |
}, | |
buttons: { | |
buttonsClass: 'btn-group pull-right', | |
buttons: [{ label: 'Cancel', action: 'cancel', buttonClass: 'btn btn-default' }, { label: 'Save', type: 'submit', action: 'submit', buttonClass: 'btn-primary btn' }] | |
}, | |
ObjectType: _Object2.default | |
}; | |
exports.default = CollectionMixin; | |
/***/ }, | |
/* 450 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var DateInput = function (_Component) { | |
_inherits(DateInput, _Component); | |
function DateInput() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, DateInput); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.handleDateChange = function (e) { | |
var value = e.target.value; | |
_this.props.onChange(new Date(value).getTime()); | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
DateInput.prototype.asInputValue = function asInputValue(value) { | |
if (!value) { | |
return ''; | |
} | |
return new Date(value).toISOString().substring(0, 10); | |
}; | |
DateInput.prototype.render = function render() { | |
var _props = this.props; | |
var value = _props.value; | |
var onChange = _props.onChange; | |
var props = _objectWithoutProperties(_props, ['value', 'onChange']); | |
return _react2.default.createElement('input', _extends({}, props, { onChange: this.handleDateChange, value: this.asInputValue(value) })); | |
}; | |
return DateInput; | |
}(_react.Component); | |
DateInput.propTypes = { | |
onChange: _PropTypes2.default.valueEvent | |
}; | |
DateInput.defaultProps = { | |
type: "date" | |
}; | |
exports.default = DateInput; | |
/***/ }, | |
/* 451 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
/** | |
* Hidden does need a template, and does not care about errors. | |
* but we will | |
*/ | |
var Hidden = function (_Component) { | |
_inherits(Hidden, _Component); | |
function Hidden() { | |
_classCallCheck(this, Hidden); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
Hidden.prototype.render = function render() { | |
var _props = this.props; | |
var value = _props.value; | |
var asJSON = _props.asJSON; | |
var props = _objectWithoutProperties(_props, ['value', 'asJSON']); | |
return _react2.default.createElement('input', _extends({}, props, { value: asJSON ? JSON.stringify(value) : value })); | |
}; | |
//only unnormal is asJSON, which will set the value to json rather than a string | |
// so that it can be used to hold hidden state of complex structures. | |
return Hidden; | |
}(_react.Component); | |
Hidden.noTemplate = true; | |
Hidden.propTypes = { | |
asJSON: _PropTypes2.default.bool | |
}; | |
Hidden.template = false; | |
Hidden.defaultProps = { | |
type: "hidden", | |
asJSON: false | |
}; | |
exports.default = Hidden; | |
/***/ }, | |
/* 452 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var LazyType = function (_Component) { | |
_inherits(LazyType, _Component); | |
function LazyType(props) { | |
_classCallCheck(this, LazyType); | |
var _this = _possibleConstructorReturn(this, _Component.call(this, props)); | |
_this.onResolve = function (resolved) { | |
_this.setState({ resolved: resolved, loaded: true }); | |
}; | |
_this.state = { loaded: false }; | |
return _this; | |
} | |
LazyType.prototype.componentWillMount = function componentWillMount() { | |
var promise = this.props.promise; | |
promise && promise.then(this.onResolve); | |
}; | |
LazyType.prototype.render = function render() { | |
if (this.state.loaded) { | |
var Type = this.state.resolved; | |
var _props = this.props; | |
var promise = _props.promise; | |
var props = _objectWithoutProperties(_props, ['promise']); | |
return _react2.default.createElement(Type, _extends({ key: 'resolved' }, props)); | |
} | |
return _react2.default.createElement('span', { className: 'lazy-loading-type', key: 'unresolved' }); | |
}; | |
return LazyType; | |
}(_react.Component); | |
LazyType.propTypes = { | |
promise: _PropTypes2.default.promise | |
}; | |
exports.default = LazyType; | |
/***/ }, | |
/* 453 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _tutils = __webpack_require__(322); | |
var _CollectionMixin2 = __webpack_require__(449); | |
var _CollectionMixin3 = _interopRequireDefault(_CollectionMixin2); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var ListInput = function (_CollectionMixin) { | |
_inherits(ListInput, _CollectionMixin); | |
function ListInput() { | |
_classCallCheck(this, ListInput); | |
return _possibleConstructorReturn(this, _CollectionMixin.apply(this, arguments)); | |
} | |
ListInput.prototype.createPid = function createPid() { | |
return this._length || 0; | |
}; | |
ListInput.prototype.getTemplateItem = function getTemplateItem(edit) { | |
var type = edit ? this.props.editType || this.props.itemType : this.props.itemType; | |
var value = (0, _tutils.isString)(type) ? { | |
type: type | |
} : type || {}; | |
value.title = false; | |
return { | |
value: value, | |
key: { title: false, template: false, type: 'Hidden' } | |
}; | |
}; | |
return ListInput; | |
}(_CollectionMixin3.default); | |
ListInput.inputClassName = _CollectionMixin3.default.inputClassName; | |
exports.default = ListInput; | |
/***/ }, | |
/* 454 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _CollectionMixin2 = __webpack_require__(449); | |
var _CollectionMixin3 = _interopRequireDefault(_CollectionMixin2); | |
var _tutils = __webpack_require__(322); | |
var _defaults = __webpack_require__(439); | |
var _defaults2 = _interopRequireDefault(_defaults); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var MixedInput = function (_CollectionMixin) { | |
_inherits(MixedInput, _CollectionMixin); | |
function MixedInput() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, MixedInput); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _CollectionMixin.call.apply(_CollectionMixin, [this].concat(args))), _this), _this.uniqueCheck = function (value) { | |
if (!value) { | |
return null; | |
} | |
if (_this.state.editPid == value) { | |
return null; | |
} | |
if (value in _this.props.value) { | |
return { | |
message: 'Keys must be unique' | |
}; | |
} | |
return null; | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
MixedInput.prototype.createPid = function createPid() { | |
return "" + this.props.newKeyPrefix + this._length; | |
}; | |
MixedInput.prototype.createDefValue = function createDefValue() { | |
return {}; | |
}; | |
MixedInput.prototype.count = function count(value) { | |
return value ? Object.keys(value).length : 0; | |
}; | |
MixedInput.prototype.renderRows = function renderRows() { | |
var _this2 = this; | |
var value = this.props.value; | |
return value ? Object.keys(value).map(function (key, i) { | |
return _this2.renderRow(value[key], null, i, key); | |
}, this) : null; | |
}; | |
MixedInput.prototype.getTemplateItem = function getTemplateItem(edit) { | |
var _props = this.props; | |
var keyType = _props.keyType; | |
var valueType = _props.valueType; | |
var editType = _props.editType; | |
var itemType = _props.itemType; | |
var type = edit ? editType || valueType || itemType : valueType || itemType; | |
var key = keyType ? (0, _tutils.isString)(keyType) ? { type: keyType } : keyType : { type: 'Text' }; | |
var value = (0, _tutils.isString)(type) ? { type: type } : type || {}; | |
var schema = { | |
key: key, | |
value: value | |
}; | |
(key.validators || (key.validators = [])).unshift('required', this.uniqueCheck); | |
return schema; | |
}; | |
return MixedInput; | |
}(_CollectionMixin3.default); | |
MixedInput.propTypes = (0, _defaults2.default)({ | |
labelKey: _PropTypes2.default.string, | |
keyType: _PropTypes2.default.typeDescription, | |
valueType: _PropTypes2.default.typeDescription, | |
value: _PropTypes2.default.value | |
}, _CollectionMixin3.default.propTypes); | |
MixedInput.defaultProps = (0, _defaults2.default)({ | |
value: {}, | |
newKeyPrefix: 'new_key', | |
showKey: true, | |
valueType: { type: 'Text' }, | |
keyType: { type: 'Text' } | |
}, _CollectionMixin3.default.defaultProps); | |
exports.default = MixedInput; | |
/***/ }, | |
/* 455 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var noRe = /^(-|\+)?([0-9]*\.)?$/, | |
numRe = /^(\-|\+)?([0-9]+(\.[0-9]+)?|Infinity)$/; | |
var NumberInput = function (_Component) { | |
_inherits(NumberInput, _Component); | |
function NumberInput(props) { | |
_classCallCheck(this, NumberInput); | |
for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
rest[_key - 1] = arguments[_key]; | |
} | |
var _this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this, props].concat(rest))); | |
_this.handleDateChange = function (e) { | |
var value = e.target.value; | |
//Not a valid number but valid to become a number | |
if (value === '') { | |
_this.props.onChange(null); | |
} else if (noRe.test(value)) { | |
if (/\.$/.test(value)) { | |
_this.props.onChange(parseFloat(value)); | |
_this.setValue(value); | |
} else { | |
_this.setValue(value); | |
} | |
} else | |
//check if real actual numbers. | |
if (numRe.test(value)) { | |
_this.props.onChange(parseFloat(value)); | |
} else { | |
_this.forceUpdate(); | |
return false; | |
} | |
}; | |
var state = _this.state || (_this.state = {}); | |
state.value = props.value; | |
return _this; | |
} | |
NumberInput.prototype.componentWillReceiveProps = function componentWillReceiveProps(newProps) { | |
if (newProps.value !== this.props.value) { | |
this.setState({ value: newProps.value }); | |
} | |
}; | |
NumberInput.prototype.render = function render() { | |
var _props = this.props; | |
var onChange = _props.onChange; | |
var value = _props.value; | |
var props = _objectWithoutProperties(_props, ['onChange', 'value']); | |
return _react2.default.createElement('input', _extends({}, props, { value: this.state.value, onChange: this.handleDateChange })); | |
}; | |
return NumberInput; | |
}(_react.Component); | |
NumberInput.propTypes = { | |
onChange: _PropTypes2.default.valueEvent | |
}; | |
exports.default = NumberInput; | |
/***/ }, | |
/* 456 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var Password = function (_Component) { | |
_inherits(Password, _Component); | |
function Password() { | |
_classCallCheck(this, Password); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
Password.prototype.render = function render() { | |
return _react2.default.createElement('input', this.props); | |
}; | |
return Password; | |
}(_react.Component); | |
Password.defaultProps = { | |
type: 'password' | |
}; | |
exports.default = Password; | |
/***/ }, | |
/* 457 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _tutils = __webpack_require__(322); | |
var _RenderTemplate = __webpack_require__(408); | |
var _RenderTemplate2 = _interopRequireDefault(_RenderTemplate); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
function compare(val, val2) { | |
if (val == null && val2 == null) { | |
return true; | |
} | |
if (val == null || val2 == null) return false; | |
return '' + val === '' + val2; | |
} | |
var RadioInput = function (_Component) { | |
_inherits(RadioInput, _Component); | |
function RadioInput() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, RadioInput); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.handleCheckChange = function (e) { | |
//Make a radio behave like a checkbox when there is only 1. | |
if (_this.props.forceSelection === false || _this.props.options && _this.props.options.length === 1) { | |
_this.props.onChange(compare(e.target.value, _this.props.value) ? null : e.target.value); | |
} else { | |
_this.props.onChange(e.target.value); | |
} | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
RadioInput.prototype.renderOptions = function renderOptions(options) { | |
var _this2 = this; | |
options = options || []; | |
var onChange = this.handleCheckChange; | |
var _props = this.props; | |
var value = _props.value; | |
var path = _props.path; | |
var name = _props.name; | |
var checkedClass = _props.checkedClass; | |
name = name || path; | |
return options.map(function (option, index) { | |
var val = option.val; | |
var label = option.label; | |
var labelHTML = option.labelHTML; | |
var rest = _objectWithoutProperties(option, ["val", "label", "labelHTML"]); | |
var ret = _extends({}, rest, { | |
id: (0, _tutils.path)(path, index), | |
name: name, | |
checked: compare(value, val) | |
}); | |
return _react2.default.createElement( | |
_RenderTemplate2.default, | |
_extends({ key: "radio-item-" + index, template: _this2.props.itemTemplate }, ret, { | |
checkedClass: checkedClass, label: label || labelHTML }), | |
_react2.default.createElement("input", _extends({ type: "radio", onChange: onChange }, ret, { value: val })) | |
); | |
}, this); | |
}; | |
RadioInput.prototype.render = function render() { | |
return _react2.default.createElement( | |
"div", | |
{ className: this.props.className }, | |
this.renderOptions(this.props.options) | |
); | |
}; | |
return RadioInput; | |
}(_react.Component); | |
RadioInput.inputClassName = ' '; | |
RadioInput.defaultProps = { | |
itemTemplate: 'RadioItemTemplate', | |
options: [], | |
forceSelection: false | |
}; | |
RadioInput.propTypes = { | |
onChange: _PropTypes2.default.valueEvent, | |
itemTemplate: _PropTypes2.default.template, | |
forceSelection: _PropTypes2.default.bool, | |
checkedClass: _PropTypes2.default.cssClass, | |
options: _PropTypes2.default.options.isRequired, | |
path: _PropTypes2.default.path | |
}; | |
exports.default = RadioInput; | |
/***/ }, | |
/* 458 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _reactDom = __webpack_require__(303); | |
var _reactDom2 = _interopRequireDefault(_reactDom); | |
var _RestrictedMixin2 = __webpack_require__(459); | |
var _RestrictedMixin3 = _interopRequireDefault(_RestrictedMixin2); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var Restricted = function (_RestrictedMixin) { | |
_inherits(Restricted, _RestrictedMixin); | |
function Restricted() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, Restricted); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _RestrictedMixin.call.apply(_RestrictedMixin, [this].concat(args))), _this), _this.handleSelectionRange = function (caret) { | |
var input = _this.refs && _reactDom2.default.findDOMNode(_this.refs.input); | |
if (!input) return; | |
if (_this.state.caret != null) input && input.setSelectionRange(_this.state.caret, _this.state.caret); | |
}, _this.handleValueChange = function (e) { | |
_this._value(e.target.value, false); | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
Restricted.prototype.render = function render() { | |
var _props = this.props; | |
var onValid = _props.onValid; | |
var formatter = _props.formatter; | |
var onChange = _props.onChange; | |
var onKeyDown = _props.onKeyDown; | |
var value = _props.value; | |
var props = _objectWithoutProperties(_props, ['onValid', 'formatter', 'onChange', 'onKeyDown', 'value']); | |
return _react2.default.createElement('input', _extends({ ref: 'input' }, props, { value: this.state.value, onKeyDown: this.handleKeyDown, | |
onChange: this.handleValueChange })); | |
}; | |
return Restricted; | |
}(_RestrictedMixin3.default); | |
Restricted.contextTypes = _PropTypes2.default.contextTypes; | |
Restricted.defaultProps = { | |
onValid: _tutils.noop, | |
value: '' | |
}; | |
Restricted.propTypes = { | |
onValid: _PropTypes2.default.validEvent, | |
onChange: _PropTypes2.default.valueEvent, | |
formatter: _PropTypes2.default.string | |
}; | |
Restricted.injectedProps = { | |
value: '.' | |
}; | |
exports.default = Restricted; | |
/***/ }, | |
/* 459 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _warning = __webpack_require__(402); | |
var _warning2 = _interopRequireDefault(_warning); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var zipRe = /^(\d{0,5})(?:[^\d]?(\d{0,4}))?$/, | |
reRe = /(#{1,}|A{1,}|a{1,}|0{1,}(?:\.0{1,})?)?(.+?)?/mg; | |
function lastEq(input, val) { | |
return input && input[input.length - 1] === val; | |
} | |
function fixDelim(str) { | |
return (str || '').replace(/([ ().-])/g, '\\$1'); | |
} | |
function ret(exact, val, d, backward) { | |
return exact != null && exact === d ? exact : exact == null || exact == '' ? val : exact; | |
} | |
function fmt(delim, placeholder) { | |
delim = delim || ''; | |
function fmt$return(exact, val, d, backward) { | |
if (placeholder && !backward) { | |
return delim; | |
} | |
if (exact === d) { | |
return exact || ''; | |
} | |
return exact == null || exact === '' ? val : backward ? exact : exact + delim; | |
}; | |
fmt$return.placeholder = placeholder; | |
return fmt$return; | |
} | |
function upper(delim) { | |
return function fmt$return(exact, val, d, backward) { | |
exact = (ret(exact, val, d) || '').toUpperCase(); | |
return backward ? exact : exact + delim; | |
}; | |
} | |
function lower(delim) { | |
return function fmt$return(exact, val, d, backward) { | |
exact = (ret(exact, val, d) || '').toUpperCase(); | |
return backward ? exact : exact + delim; | |
}; | |
} | |
function _pad(value, length, right) { | |
value = value || ''; | |
while (value.length < length) { | |
if (right) { | |
value += '0'; | |
} else { | |
value = '0' + value; | |
} | |
} | |
return value; | |
} | |
function pad(delim, padding) { | |
var parts = padding.split('.', 2); | |
return function fmt$return(exact, val, d, backward) { | |
exact = ret(exact, val, d).split('.', 2); | |
return _pad(exact[0], parts[0].length, false) + (parts.length > 1 ? '.' + _pad(exact[1], parts[1].length, true) : ''); | |
}; | |
} | |
function defaultValidator(value, regex) { | |
return regex.test(value); | |
} | |
function findCharPosAfter(value, char, pos) { | |
for (var i = pos, l = value.length; i < l; i++) { | |
if (value[i] === char) { | |
return i + 1; | |
} | |
} | |
return value.length; | |
} | |
function makeFormatter(format, validator) { | |
validator = validator || defaultValidator; | |
var parts; | |
var pattern = '', | |
validPattern = ''; | |
var handlers = []; | |
reRe.lastIndex = 0; | |
while ((parts = reRe.exec(format)) != null && parts.index < format.length) { | |
var first = parts[1], | |
delim = parts[2], | |
exact; | |
switch (first && first[0] || '') { | |
//mixed case | |
case 'M': | |
{ | |
exact = '(\\[a-zA-Z]{' + first.length + '})'; | |
pattern += exact + '|(\\[a-zA-Z]{0,' + (first.length - 1) + '})'; | |
validPattern += exact; | |
handlers.push(fmt(delim)); | |
break; | |
} | |
//upper case | |
case 'A': | |
{ | |
exact = '(\\[A-Z]{' + first.length + '})'; | |
pattern += exact + '|(\\[a-zA-Z]{0,' + (first.length - 1) + '})'; | |
validPattern += exact; | |
handlers.push(upper(delim)); | |
break; | |
} | |
//lower case | |
case 'a': | |
{ | |
exact = '(\\[A-Z]{' + first.length + '})'; | |
pattern += exact + '|(\\[a-zA-Z]{0,' + (first.length - 1) + '})'; | |
validPattern += exact; | |
handlers.push(lower(delim)); | |
break; | |
} | |
//padding | |
case '0': | |
exact = '(\\d{' + first.length + ',})'; | |
pattern += '(' + exact + '|(\\d{0,}))(?:[^\\d])?'; | |
validPattern += exact + fixDelim(delim); | |
handlers.push(pad(delim, first)); | |
break; | |
//Number | |
case '#': | |
{ | |
var fdelim = fixDelim(delim); | |
exact = '(\\d{' + first.length + '})'; | |
pattern += '(' + exact + '|(\\d{0,' + (first.length - 1) + '}))(?:' + fdelim + '|[^\\d]+?)?'; | |
validPattern += exact + fdelim; | |
handlers.push(fmt(delim)); | |
break; | |
} | |
default: | |
{ | |
//empty pattern so that the patterns | |
// and the input align when its a non matching pattern | |
var fdelim = fixDelim(delim); | |
exact = '(' + fdelim + ')'; | |
pattern += '(' + fdelim + '|)()(?:' + fdelim + '|(!' + fdelim + '))?'; | |
validPattern += '()(' + fdelim + ')'; | |
handlers.push(fmt(delim, true)); | |
break; | |
} | |
} | |
} | |
var re = new RegExp('^' + pattern), | |
vre = new RegExp('^' + validPattern + '$', 'g'); | |
return function makeFormatter$formatter(input, isBackward, end) { | |
vre.lastIndex = re.index = re.lastIndex = 0; | |
var idx = 0, | |
d = 0, | |
p, | |
parts = re.exec(input), | |
position = end || 0; | |
parts.shift(); | |
//remove delimeters | |
parts = re.exec(clean(parts)); | |
parts.shift(); | |
while (parts.length) { | |
p = parts[parts.length - 1]; | |
if (p == null || p == '') parts.pop();else break; | |
} | |
var incr = handlers.length; | |
var value = '', | |
done = false; | |
for (var i = 0, l = incr * 3; i < l; i += 3, d++) { | |
/*if (parts[i] == '' && parts[i + 1] == null) { | |
break; | |
}*/ | |
var isNextPlaceholder = parts[i] !== parts[i + 2] && handlers[d + 1] && handlers[d + 1].placeholder === true; | |
done = i + 3 !== l ? parts[i + 3] == null && parts[i + 4] == null ? isBackward ? true : !isNextPlaceholder : false : isNextPlaceholder; | |
value += handlers[d](parts[i], parts[i + 1], parts[i + 2], done ? isBackward : false); | |
if (done) { | |
break; | |
} | |
} | |
if (!isBackward && end) { | |
position = findCharPosAfter(value, input[end], end); | |
} | |
return { | |
isValid: validator(value, vre), | |
value: value, | |
position: position | |
}; | |
}; | |
} | |
//So we only care about every 3rd group. Remove delimeters | |
// and such, so the next parse can have something nice to work with. | |
function clean(parts) { | |
var p = ''; | |
for (var i = 0; i < parts.length; i += 3) { | |
p += parts[i] || ''; | |
} | |
return p; | |
} | |
function defaultValidator(value, regex) { | |
return regex.test(value); | |
} | |
var dd_yyyy = makeFormatter('##/####'); | |
function shortDate(value, isBackspace, caret) { | |
var ref = dd_yyyy(value, isBackspace, caret); | |
var parts = /(\d{1,2})([^\d]+?)?(\d{0,4})?/.exec(value) || []; | |
var position = ref.position; | |
var str = ''; | |
var whole = parts[0]; | |
var mm = parts[1]; | |
var delim = parts[2]; | |
var last = parts[3]; | |
var mmInt = parseInt(mm || '0', 10); | |
//invalid month, best guess | |
if (!isBackspace) { | |
//13->01/3 | |
if (parseInt(mm, 10) > 12) { | |
str = '0' + mm[0] + '/'; | |
last = mm[1] + (last == null ? '' : last); | |
} else | |
//11->11/ | |
if (delim) { | |
str = (mmInt < 10 ? '0' + mmInt : mmInt) + '/'; | |
} else if (mmInt > 9) { | |
str = mmInt + '/'; | |
} else if (mmInt > 1) { | |
str = '0' + mmInt + '/'; | |
} else if (!mm) { | |
//swallow | |
} else if (mm.length === 2) { | |
str = mm + '/'; | |
} else { | |
str = mm; | |
} | |
if (last) { | |
last = parseInt(last, 10); | |
if (last === 2) { | |
str += '2'; | |
} else if (last < 2) { | |
str += '20' + last; | |
} else if (last === 20) { | |
str += '20'; | |
} else if (last < 21) { | |
str += '20' + last; | |
} else if (last > 100) { | |
str += last; | |
} else if (last > 10) { | |
str += '20' + last; | |
} | |
} | |
} else { | |
str = ref.value; | |
} | |
var isValid = false; | |
if (str.length === 7) { | |
isValid = true; | |
var parts = str.split('/'); | |
parts.push(parts.pop().replace(/^20/, '')); | |
str = parts.join('/'); | |
} else { | |
str = str.substring(0, 7); | |
} | |
return { | |
value: str, | |
isValid: isValid, | |
position: position | |
}; | |
}; | |
function createValidator(validator, loader) { | |
if (validator === void 0) { | |
return defaultValidator; | |
} | |
if (typeof validator === 'function') { | |
return validator; | |
} | |
if (typeof validator === 'string') { | |
validator = loader.loadValidator(validator)(); | |
return function (value) { | |
return !validator(value); | |
}; | |
} | |
if (validator instanceof RegExp) { | |
return RegExp.prototype.test.bind(re); | |
} | |
throw 'Do not know what to do with ' + validator; | |
} | |
function _title(value) { | |
if (value.length === 0) { | |
return value; | |
} | |
return value.substring(0, 1).toUpperCase() + value.substring(1); | |
} | |
var RestrictedMixin = function (_Component) { | |
_inherits(RestrictedMixin, _Component); | |
function RestrictedMixin(props) { | |
_classCallCheck(this, RestrictedMixin); | |
for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
rest[_key - 1] = arguments[_key]; | |
} | |
var _this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this, props].concat(rest))); | |
_this.handleKeyDown = function (e) { | |
if (_this.props.onKeyDown) { | |
_this.props.onKeyDown.call(_this, e); | |
} | |
var pos = e.target.selectionStart, | |
end = e.target.selectionEnd, | |
value = _this.state.value || ''; | |
if (e.key === 'Enter') { | |
_this.props.onValid(_this.state.hasValidValue, { | |
isValid: _this.state.hasValidValue, | |
value: _this.state.value | |
}); | |
return; | |
} | |
if (e.key === 'Delete') { | |
e.preventDefault(); | |
value = value.substring(0, pos) + value.substring(end); | |
_this._value(value, false, pos); | |
return; | |
} | |
if (e.key === 'Backspace') { | |
e.preventDefault(); | |
e.stopPropagation(); | |
var back = false; | |
if (pos === end) { | |
value = value.trim().substring(0, value.length - 1); | |
back = true; | |
} else { | |
value = value.substring(0, pos) + value.substring(end); | |
} | |
_this._value(value, back, pos + value.length); | |
return; | |
} | |
if (e.key !== 'Unidentified') { | |
return; | |
} | |
/* if (e.key === 'Shift'){ | |
this._shift = true; | |
return | |
} | |
*/ | |
if (pos < value.length) { | |
//This prevents onChange from firing. | |
e.preventDefault(); | |
e.stopPropagation(); | |
var nvalue = value.split(''); | |
var char = String.fromCharCode(e.keyCode); | |
if (!e.shiftKey) { | |
char = char.toLowerCase(); | |
} | |
nvalue.splice(pos, Math.max(end - pos, 1), char); | |
_this._value(nvalue.join(''), false, pos); | |
} | |
}; | |
if (!_this.state) { | |
_this.state = {}; | |
} | |
return _this; | |
} | |
RestrictedMixin.prototype.componentWillMount = function componentWillMount() { | |
this._handleProps(this.props); | |
}; | |
RestrictedMixin.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) { | |
this._handleProps(props); | |
}; | |
RestrictedMixin.prototype.componentDidMount = function componentDidMount() { | |
this.handleSelectionRange(this.state.caret); | |
}; | |
RestrictedMixin.prototype.componentDidUpdate = function componentDidUpdate() { | |
this.handleSelectionRange(this.state.caret); | |
}; | |
RestrictedMixin.prototype._handleProps = function _handleProps(props) { | |
if (props && 'value' in props && props.value !== this.state.value) { | |
var value = props.value ? this.formatter(props.value) : { | |
isValid: false, | |
value: '' | |
}; | |
this.state.value = value.value; | |
this.state.hasValidValue = value.isValid; | |
} | |
}; | |
RestrictedMixin.prototype.formatter = function formatter(value, isBackspace, caret) { | |
if (this._formatter) { | |
return this._formatter.call(this, value, isBackspace, caret); | |
} | |
var formatter = this.props.formatter; | |
if (typeof formatter === 'string') { | |
formatter = RestrictedMixin.formatters[formatter] || formatter; | |
if (typeof formatter === 'function') { | |
return (this._formatter = formatter).call(this, value, isBackspace, caret); | |
} else { | |
return (this._formatter = makeFormatter(formatter, createValidator(this.props.validator, this.context.loader))).call(this, value, isBackspace); | |
} | |
} else if (typeof formatter === 'function') { | |
return (this._formatter = formatter).call(this, value, isBackspace, caret); | |
} | |
(0, _warning2.default)(false, 'Did not find a formatter for %s', this.props.formatter); | |
return { value: value }; | |
}; | |
RestrictedMixin.prototype.handleState = function handleState(str, isBackspace, caret) { | |
var value = this.formatter(str, isBackspace, caret) || { isValid: false }; | |
if (caret != null && typeof value.position === 'number') { | |
if (isBackspace) { | |
caret += value.position - 1; | |
} else { | |
caret = value.position; | |
} | |
} | |
var state = this.state; | |
state.caret = caret; | |
state.value = value.value; | |
state.hasValue = value.value != null && value.value.length !== 0; | |
state.hasValidValue = value.isValid; | |
/* | |
this.setState({ | |
caret, | |
value: value.value, | |
hasValue: value.value != null && value.value.length !== 0, | |
hasValidValue: value.isValid | |
}, this.handleSelectionRange); | |
*/ | |
return value; | |
}; | |
RestrictedMixin.prototype._value = function _value(str, isBackspace, caret) { | |
var value = this.handleState(str, isBackspace, caret); | |
this.props.onChange(value.value); | |
this.props.onValid(value.isValid, value); | |
}; | |
return RestrictedMixin; | |
}(_react.Component); | |
RestrictedMixin.makeFormatter = makeFormatter; | |
RestrictedMixin.formatters = { | |
uszip: function uszip(value, isBackspace, position) { | |
value = (value || '').substring(0, 10); | |
var parts = zipRe.exec(value) || [], | |
isValid = false; | |
if (parts) { | |
if (parts[2]) { | |
value = parts[1] + '-' + parts[2]; | |
} else { | |
value = parts[1] || ''; | |
} | |
isValid = value.length === 5 || value.length === 10; | |
} else { | |
value = ''; | |
} | |
return { | |
value: value, | |
isValid: isValid | |
}; | |
}, | |
capitalize: function capitalize(value, isBackward, position) { | |
value = value || ''; | |
var isValid = value && value.length > 2 || false; | |
if (isBackward) { | |
position--; | |
} else { | |
position++; | |
value = _title(value); | |
} | |
return { | |
value: value, | |
isValid: isValid, | |
position: position | |
}; | |
}, | |
title: function title(value, isBackward, position) { | |
value = value || ''; | |
var isValid = value && value.length > 2 || false; | |
if (isBackward) { | |
position--; | |
} else { | |
value = value.replace(/([^\s]*)(\s*)/g, _title); | |
position++; | |
} | |
return { | |
value: value, | |
isValid: isValid, | |
position: position | |
}; | |
}, | |
creditcard: '#### #### #### ####', | |
mm20YY: shortDate, | |
shortDate: shortDate | |
}; | |
exports.default = RestrictedMixin; | |
/***/ }, | |
/* 460 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var Select = function (_Component) { | |
_inherits(Select, _Component); | |
function Select() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, Select); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.handleSelect = function (e) { | |
var _this$props = _this.props; | |
var multiple = _this$props.multiple; | |
var placeholder = _this$props.placeholder; | |
if (multiple) { | |
//normalize multiple selection | |
var values = [], | |
options = e.target.options, | |
i = 0, | |
l = options.length, | |
option; | |
for (; i < l; i++) { | |
option = options[i]; | |
if (option.selected) { | |
if (option.label != placeholder) values.push(option.value); | |
} | |
} | |
_this.props.onChange(values); | |
return; | |
} else if (e.target.value === placeholder) { | |
_this.props.onChange(null); | |
return; | |
} | |
_this.props.onChange(e.target.value); | |
}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
Select.prototype.renderOptions = function renderOptions(value) { | |
var _props = this.props; | |
var multiple = _props.multiple; | |
var options = _props.options; | |
var placeholder = _props.placeholder; | |
options = options || []; | |
var hasValue = false, | |
ret = options.map(multiple ? function (o, i) { | |
return _react2.default.createElement( | |
"option", | |
{ key: 's' + i, value: o.val }, | |
o.label | |
); | |
} : function (o, i) { | |
if (!hasValue && o.val + '' == value + '') hasValue = true; | |
return _react2.default.createElement( | |
"option", | |
{ key: 's' + i, value: o.val }, | |
o.label | |
); | |
}); | |
if (placeholder) { | |
ret.unshift(_react2.default.createElement( | |
"option", | |
{ key: 'null-' + options.length }, | |
placeholder | |
)); | |
} | |
return ret; | |
}; | |
Select.prototype.render = function render() { | |
var _props2 = this.props; | |
var onChange = _props2.onChange; | |
var value = _props2.value; | |
var props = _objectWithoutProperties(_props2, ["onChange", "value"]); | |
if (props.multiple && !(0, _tutils.isArray)(value)) { | |
value = value ? [value] : []; | |
} | |
return _react2.default.createElement( | |
"select", | |
_extends({}, props, { value: value, onChange: this.handleSelect }), | |
this.renderOptions(value) | |
); | |
}; | |
return Select; | |
}(_react.Component); | |
Select.propTypes = { | |
options: _PropTypes2.default.options, | |
multiple: _PropTypes2.default.bool, | |
onChange: _PropTypes2.default.valueEvent, | |
placeholder: _PropTypes2.default.placeholder, | |
onValidate: _PropTypes2.default.changeValidate | |
}; | |
Select.defaultProps = { | |
options: [], | |
multiple: false, | |
value: '' | |
}; | |
Select.injectedProps = { | |
value: '.' | |
}; | |
exports.default = Select; | |
/***/ }, | |
/* 461 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var TextInput = function (_Component) { | |
_inherits(TextInput, _Component); | |
function TextInput() { | |
_classCallCheck(this, TextInput); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
TextInput.prototype.render = function render() { | |
return _react2.default.createElement("input", this.props); | |
}; | |
return TextInput; | |
}(_react.Component); | |
TextInput.defaultProps = { | |
type: 'text', | |
value: '' | |
}; | |
TextInput.injectedProps = { | |
value: "." | |
}; | |
exports.default = TextInput; | |
/***/ }, | |
/* 462 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var TextArea = function (_Component) { | |
_inherits(TextArea, _Component); | |
function TextArea() { | |
_classCallCheck(this, TextArea); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
TextArea.prototype.render = function render() { | |
return _react2.default.createElement("textarea", this.props); | |
}; | |
return TextArea; | |
}(_react.Component); | |
exports.default = TextArea; | |
/***/ }, | |
/* 463 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var context = __webpack_require__(464), | |
api = {}; //make sure you have your directory and regex test set correctly! | |
context.keys().forEach(function (key) { | |
var k = key.replace(/^\.\/(.*)\.js(x)?$/, '$1'); | |
api[k] = context(key).default; | |
}); | |
module.exports = api; | |
/***/ }, | |
/* 464 */ | |
/***/ function(module, exports, __webpack_require__) { | |
var map = { | |
"./ArrayProcessor.js": 465, | |
"./OptionsProcessor.js": 466, | |
"./index.js": 463 | |
}; | |
function webpackContext(req) { | |
return __webpack_require__(webpackContextResolve(req)); | |
}; | |
function webpackContextResolve(req) { | |
return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }()); | |
}; | |
webpackContext.keys = function webpackContextKeys() { | |
return Object.keys(map); | |
}; | |
webpackContext.resolve = webpackContextResolve; | |
module.exports = webpackContext; | |
webpackContext.id = 464; | |
/***/ }, | |
/* 465 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _tutils = __webpack_require__(322); | |
var api = { value: _tutils.toArray }; | |
exports.default = api; | |
/***/ }, | |
/* 466 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
exports.__esModule = true; | |
var api = { | |
/** fetch will be called when value changes **/ | |
fetch: function fetch(url, value, component, cb) { | |
value = value && value.toLowerCase(); | |
var data = (component.props.options || []).filter(function (v) { | |
var l = ('' + v.val).toLowerCase(); | |
if (l.indexOf(value) > -1) { | |
return true; | |
} | |
}); | |
cb(null, data); | |
}, | |
/**Value returns the value of the object, not necessarily whats in the input box**/ | |
value: function value(obj) { | |
return obj == null ? null : obj.val || obj; | |
}, | |
/** | |
* Format returns the format. | |
* @param v | |
* @returns {null} | |
*/ | |
format: function format(v) { | |
return v == null ? null : v.label || v; | |
} | |
}; | |
exports.default = api; | |
/***/ }, | |
/* 467 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
//================================================================================================== | |
//VALIDATORS | |
//================================================================================================== | |
//Borrowed from backbone-forms, thanks! | |
module.exports = function (_) { | |
var validators = {}; | |
validators.errMessages = { | |
required: 'Required', | |
regexp: 'Invalid', | |
number: 'Must be a number', | |
email: 'Invalid email address', | |
url: 'Invalid URL', | |
match: function match(field) { | |
return 'Must match field "{}"'; | |
} | |
}; | |
validators.required = function (options) { | |
options = _.extend({ | |
type: 'required', | |
message: validators.errMessages.required | |
}, options); | |
return function required(value) { | |
options.value = value; | |
var err = { | |
type: options.type, | |
message: _.isFunction(options.message) ? options.message(options) : options.message | |
}; | |
if (value === null || value === undefined || value === false || value === '') return err; | |
}; | |
}; | |
validators.regexp = function (options) { | |
if (!options.regexp) throw new Error('Missing required "regexp" option for "regexp" validator'); | |
options = _.extend({ | |
type: 'regexp', | |
match: true, | |
message: validators.errMessages.regexp | |
}, options); | |
return function regexp(value) { | |
options.value = value; | |
var err = { | |
type: options.type, | |
message: _.isFunction(options.message) ? options.message(options) : options.message | |
}; | |
//Don't check empty values (add a 'required' validator for validators) | |
if (value === null || value === undefined || value === '') return; | |
//Create RegExp from string if it's valid | |
if ('string' === typeof options.regexp) options.regexp = new RegExp(options.regexp.replace(/^\/(.*)\/$/, '$1'), options.flags); | |
if (options.match ? !options.regexp.test(value) : options.regexp.test(value)) return err; | |
}; | |
}; | |
validators.number = function (options) { | |
options = _.extend({ | |
type: 'number', | |
message: validators.errMessages.number, | |
regexp: /^[0-9]*\.?[0-9]*?$/ | |
}, options); | |
return validators.regexp(options); | |
}; | |
validators.email = function (options) { | |
options = _.extend({ | |
type: 'email', | |
message: validators.errMessages.email, | |
regexp: /^[\w\-]{1,}([\w\-\+.]{1,1}[\w\-]{1,}){0,}[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/ | |
}, options); | |
return validators.regexp(options); | |
}; | |
validators.url = function (options) { | |
options = _.extend({ | |
type: 'url', | |
message: validators.errMessages.url, | |
regexp: /^(http|https):\/\/(([A-Z0-9][A-Z0-9_\-]*)(\.[A-Z0-9][A-Z0-9_\-]*)+)(:(\d+))?\/?/i | |
}, options); | |
return validators.regexp(options); | |
}; | |
validators.match = function (options) { | |
if (!options.field) throw new Error('Missing required "field" options for "match" validator'); | |
options = _.extend({ | |
type: 'match', | |
message: validators.errMessages.match | |
}, options); | |
return function match(value, attrs) { | |
options.value = value; | |
var err = { | |
type: options.type, | |
message: _.isFunction(options.message) ? options.message(options) : options.message | |
}; | |
//Don't check empty values (add a 'required' validator for validators) | |
if (value === null || value === undefined || value === '') return; | |
if (value !== attrs.path(options.field)) return err; | |
}; | |
}; | |
return validators; | |
}(__webpack_require__(322)); | |
/***/ }, | |
/* 468 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
var styleCtx = __webpack_require__(469); | |
var lessCtx = __webpack_require__(484); | |
var api = {}; | |
/** | |
* This loads the style.js and then the less/css files merging | |
* the styles from the css if they exist. | |
*/ | |
styleCtx.keys().reduce(function (obj, key) { | |
obj[key.replace(/^\.\/(.*)-style\.js$/, '$1')] = styleCtx(key); | |
return obj; | |
}, api); | |
lessCtx.keys().reduce(function (obj, key) { | |
var nkey = key.replace(/^\.\/(.*)\.(less|css)$/, '$1'); | |
var cobj = obj[nkey]; | |
var Style = lessCtx(key); | |
if (cobj) { | |
Object.keys(Style).forEach(function (skey) { | |
if (cobj[skey]) { | |
cobj[skey] += ' ' + Style[skey]; | |
} else { | |
cobj[skey] = Style[skey]; | |
} | |
}); | |
} else { | |
obj[nkey] = Style; | |
} | |
return obj; | |
}, api); | |
module.exports = api; | |
/***/ }, | |
/* 469 */ | |
/***/ function(module, exports, __webpack_require__) { | |
var map = { | |
"./AutocompleteItemTemplate-style.js": 470, | |
"./ButtonsTemplate-style.js": 471, | |
"./CheckboxTemplate-style.js": 472, | |
"./CheckboxesGroupTemplate-style.js": 473, | |
"./CollectionCreateTemplate-style.js": 474, | |
"./CollectionMixin-style.js": 475, | |
"./EditorTemplate-style.js": 476, | |
"./FormTemplate-style.js": 477, | |
"./ItemToStringTemplate-style.js": 478, | |
"./List-style.js": 479, | |
"./ListItemTemplate-style.js": 480, | |
"./Mixed-style.js": 481, | |
"./ModalTemplate-style.js": 482, | |
"./RadioItemTemplate-style.js": 483 | |
}; | |
function webpackContext(req) { | |
return __webpack_require__(webpackContextResolve(req)); | |
}; | |
function webpackContextResolve(req) { | |
return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }()); | |
}; | |
webpackContext.keys = function webpackContextKeys() { | |
return Object.keys(map); | |
}; | |
webpackContext.resolve = webpackContextResolve; | |
module.exports = webpackContext; | |
webpackContext.id = 469; | |
/***/ }, | |
/* 470 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
module.exports = { | |
item: 'addr_itm list-group-item ', | |
focused: 'focused' | |
}; | |
/***/ }, | |
/* 471 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
module.exports = { | |
buttons: 'col-sm-offset-2 col-sm-10 btn-group', | |
button: 'btn', | |
buttonContainer: "form-group", | |
primary: 'btn-primary' | |
}; | |
/***/ }, | |
/* 472 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = { | |
"checkbox": "checkbox", | |
"checked": "checked" | |
}; | |
/***/ }, | |
/* 473 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = { | |
"group": "group" | |
}; | |
/***/ }, | |
/* 474 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
module.exports = { | |
panel: "panel panel-default clearfix", | |
panelTitle: 'panel-title clearfix', | |
panelHeading: 'panel-heading', | |
panelBody: "panel-body", | |
group: "form-group", | |
inline: "clearfix" | |
}; | |
/***/ }, | |
/* 475 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = { | |
addBtn: 'btn btn-xs btn-default', | |
iconAdd: "icon-add" | |
}; | |
/***/ }, | |
/* 476 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
module.exports = { | |
field: 'form-group field-name ', | |
label: "col-sm-2 control-label", | |
error: 'error-block help-block', | |
help: 'help-block', | |
hasError: 'has-error', | |
hasTitle: "col-sm-10", | |
noTitle: "col-sm-12" | |
}; | |
/***/ }, | |
/* 477 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
module.exports = { | |
//use to be form-horizontal | |
formClass: '' | |
}; | |
/***/ }, | |
/* 478 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = { | |
label: "brf-value list-group-item-text" | |
}; | |
/***/ }, | |
/* 479 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = { | |
item: "brf-value list-group-item-text" | |
}; | |
/***/ }, | |
/* 480 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
module.exports = { | |
moveUp: 'glyphicon glyphicon-chevron-up btn-up', | |
moveDown: 'glyphicon glyphicon-chevron-down btn-down', | |
delete: 'glyphicon glyphicon-remove btn-delete', | |
itemValue: "item-value btn-edit", | |
button: 'btn btn-xs btn-default', | |
listGroupItem: 'list-group-item', | |
hasError: 'has-error', | |
help: "help-block", | |
clickable: 'clickable', | |
ctrlButtons: 'btn-group' | |
}; | |
/***/ }, | |
/* 481 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = { | |
item: "brf-key list-group-item-heading", | |
itemInner: "brf-value list-group-item-text", | |
buttonsClass: 'btn-group pull-right', | |
buttonCancel: 'btn btn-default', | |
buttonSave: 'btn-primary btn' | |
}; | |
/***/ }, | |
/* 482 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = { | |
namespace: 'modal', | |
backdrop: "modal-backdrop fade in", | |
dialog: "modal-dialog", | |
content: "modal-content", | |
close: 'close', | |
body: 'modal-body clearfix', | |
header: 'modal-header', | |
footer: "modal-footer", | |
overlay: '' | |
}; | |
/***/ }, | |
/* 483 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
module.exports = { | |
namespace: "radio", | |
checked: '', | |
unchecked: '' | |
}; | |
/***/ }, | |
/* 484 */ | |
/***/ function(module, exports, __webpack_require__) { | |
var map = { | |
"./Autocomplete.less": 485, | |
"./ListItemTemplate.less": 489, | |
"./WizardProgressTemplate.less": 491, | |
"./WizardTemplate.less": 493 | |
}; | |
function webpackContext(req) { | |
return __webpack_require__(webpackContextResolve(req)); | |
}; | |
function webpackContextResolve(req) { | |
return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }()); | |
}; | |
webpackContext.keys = function webpackContextKeys() { | |
return Object.keys(map); | |
}; | |
webpackContext.resolve = webpackContextResolve; | |
module.exports = webpackContext; | |
webpackContext.id = 484; | |
/***/ }, | |
/* 485 */ | |
/***/ function(module, exports, __webpack_require__) { | |
// style-loader: Adds some css to the DOM by adding a <style> tag | |
// load the styles | |
var content = __webpack_require__(486); | |
if(typeof content === 'string') content = [[module.id, content, '']]; | |
// add the styles to the DOM | |
var update = __webpack_require__(488)(content, {}); | |
if(content.locals) module.exports = content.locals; | |
// Hot Module Replacement | |
if(false) { | |
// When the styles change, update the <style> tags | |
if(!content.locals) { | |
module.hot.accept("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!./../../node_modules/postcss-loader/index.js!./../../node_modules/less-loader/index.js!./Autocomplete.less", function() { | |
var newContent = require("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!./../../node_modules/postcss-loader/index.js!./../../node_modules/less-loader/index.js!./Autocomplete.less"); | |
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; | |
update(newContent); | |
}); | |
} | |
// When the module is disposed, remove the <style> tags | |
module.hot.dispose(function() { update(); }); | |
} | |
/***/ }, | |
/* 486 */ | |
/***/ function(module, exports, __webpack_require__) { | |
exports = module.exports = __webpack_require__(487)(); | |
// imports | |
// module | |
exports.push([module.id, ".Autocomplete__namespace___KKoOj {\n position: relative;\n}\n.Autocomplete__found___u5u_V .form-control {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.Autocomplete__found___u5u_V .Autocomplete__listGroup___1j4tB {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n width: 100%;\n padding-left: 0;\n}\n.Autocomplete__found___u5u_V .list-group-item:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n border-top: none;\n}\n.Autocomplete__found___u5u_V .list-group-item {\n cursor: pointer;\n}\n.Autocomplete__found___u5u_V .list-group-item:hover {\n background-color: #eee;\n}\n.Autocomplete__found___u5u_V .focused {\n background-color: #ddd;\n}\n", ""]); | |
// exports | |
exports.locals = { | |
"namespace": "Autocomplete__namespace___KKoOj", | |
"found": "Autocomplete__found___u5u_V", | |
"listGroup": "Autocomplete__listGroup___1j4tB" | |
}; | |
/***/ }, | |
/* 487 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/* | |
MIT License http://www.opensource.org/licenses/mit-license.php | |
Author Tobias Koppers @sokra | |
*/ | |
// css base code, injected by the css-loader | |
module.exports = function () { | |
var list = []; | |
// return the list of modules as css string | |
list.toString = function toString() { | |
var result = []; | |
for (var i = 0; i < this.length; i++) { | |
var item = this[i]; | |
if (item[2]) { | |
result.push("@media " + item[2] + "{" + item[1] + "}"); | |
} else { | |
result.push(item[1]); | |
} | |
} | |
return result.join(""); | |
}; | |
// import a list of modules into the list | |
list.i = function (modules, mediaQuery) { | |
if (typeof modules === "string") modules = [[null, modules, ""]]; | |
var alreadyImportedModules = {}; | |
for (var i = 0; i < this.length; i++) { | |
var id = this[i][0]; | |
if (typeof id === "number") alreadyImportedModules[id] = true; | |
} | |
for (i = 0; i < modules.length; i++) { | |
var item = modules[i]; | |
// skip already imported module | |
// this implementation is not 100% perfect for weird media query combinations | |
// when a module is imported multiple times with different media queries. | |
// I hope this will never occur (Hey this way we have smaller bundles) | |
if (typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { | |
if (mediaQuery && !item[2]) { | |
item[2] = mediaQuery; | |
} else if (mediaQuery) { | |
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; | |
} | |
list.push(item); | |
} | |
} | |
}; | |
return list; | |
}; | |
/***/ }, | |
/* 488 */ | |
/***/ function(module, exports, __webpack_require__) { | |
/* | |
MIT License http://www.opensource.org/licenses/mit-license.php | |
Author Tobias Koppers @sokra | |
*/ | |
var stylesInDom = {}, | |
memoize = function(fn) { | |
var memo; | |
return function () { | |
if (typeof memo === "undefined") memo = fn.apply(this, arguments); | |
return memo; | |
}; | |
}, | |
isOldIE = memoize(function() { | |
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase()); | |
}), | |
getHeadElement = memoize(function () { | |
return document.head || document.getElementsByTagName("head")[0]; | |
}), | |
singletonElement = null, | |
singletonCounter = 0, | |
styleElementsInsertedAtTop = []; | |
module.exports = function(list, options) { | |
if(false) { | |
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); | |
} | |
options = options || {}; | |
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style> | |
// tags it will allow on a page | |
if (typeof options.singleton === "undefined") options.singleton = isOldIE(); | |
// By default, add <style> tags to the bottom of <head>. | |
if (typeof options.insertAt === "undefined") options.insertAt = "bottom"; | |
var styles = listToStyles(list); | |
addStylesToDom(styles, options); | |
return function update(newList) { | |
var mayRemove = []; | |
for(var i = 0; i < styles.length; i++) { | |
var item = styles[i]; | |
var domStyle = stylesInDom[item.id]; | |
domStyle.refs--; | |
mayRemove.push(domStyle); | |
} | |
if(newList) { | |
var newStyles = listToStyles(newList); | |
addStylesToDom(newStyles, options); | |
} | |
for(var i = 0; i < mayRemove.length; i++) { | |
var domStyle = mayRemove[i]; | |
if(domStyle.refs === 0) { | |
for(var j = 0; j < domStyle.parts.length; j++) | |
domStyle.parts[j](); | |
delete stylesInDom[domStyle.id]; | |
} | |
} | |
}; | |
} | |
function addStylesToDom(styles, options) { | |
for(var i = 0; i < styles.length; i++) { | |
var item = styles[i]; | |
var domStyle = stylesInDom[item.id]; | |
if(domStyle) { | |
domStyle.refs++; | |
for(var j = 0; j < domStyle.parts.length; j++) { | |
domStyle.parts[j](item.parts[j]); | |
} | |
for(; j < item.parts.length; j++) { | |
domStyle.parts.push(addStyle(item.parts[j], options)); | |
} | |
} else { | |
var parts = []; | |
for(var j = 0; j < item.parts.length; j++) { | |
parts.push(addStyle(item.parts[j], options)); | |
} | |
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts}; | |
} | |
} | |
} | |
function listToStyles(list) { | |
var styles = []; | |
var newStyles = {}; | |
for(var i = 0; i < list.length; i++) { | |
var item = list[i]; | |
var id = item[0]; | |
var css = item[1]; | |
var media = item[2]; | |
var sourceMap = item[3]; | |
var part = {css: css, media: media, sourceMap: sourceMap}; | |
if(!newStyles[id]) | |
styles.push(newStyles[id] = {id: id, parts: [part]}); | |
else | |
newStyles[id].parts.push(part); | |
} | |
return styles; | |
} | |
function insertStyleElement(options, styleElement) { | |
var head = getHeadElement(); | |
var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1]; | |
if (options.insertAt === "top") { | |
if(!lastStyleElementInsertedAtTop) { | |
head.insertBefore(styleElement, head.firstChild); | |
} else if(lastStyleElementInsertedAtTop.nextSibling) { | |
head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling); | |
} else { | |
head.appendChild(styleElement); | |
} | |
styleElementsInsertedAtTop.push(styleElement); | |
} else if (options.insertAt === "bottom") { | |
head.appendChild(styleElement); | |
} else { | |
throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'."); | |
} | |
} | |
function removeStyleElement(styleElement) { | |
styleElement.parentNode.removeChild(styleElement); | |
var idx = styleElementsInsertedAtTop.indexOf(styleElement); | |
if(idx >= 0) { | |
styleElementsInsertedAtTop.splice(idx, 1); | |
} | |
} | |
function createStyleElement(options) { | |
var styleElement = document.createElement("style"); | |
styleElement.type = "text/css"; | |
insertStyleElement(options, styleElement); | |
return styleElement; | |
} | |
function createLinkElement(options) { | |
var linkElement = document.createElement("link"); | |
linkElement.rel = "stylesheet"; | |
insertStyleElement(options, linkElement); | |
return linkElement; | |
} | |
function addStyle(obj, options) { | |
var styleElement, update, remove; | |
if (options.singleton) { | |
var styleIndex = singletonCounter++; | |
styleElement = singletonElement || (singletonElement = createStyleElement(options)); | |
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false); | |
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true); | |
} else if(obj.sourceMap && | |
typeof URL === "function" && | |
typeof URL.createObjectURL === "function" && | |
typeof URL.revokeObjectURL === "function" && | |
typeof Blob === "function" && | |
typeof btoa === "function") { | |
styleElement = createLinkElement(options); | |
update = updateLink.bind(null, styleElement); | |
remove = function() { | |
removeStyleElement(styleElement); | |
if(styleElement.href) | |
URL.revokeObjectURL(styleElement.href); | |
}; | |
} else { | |
styleElement = createStyleElement(options); | |
update = applyToTag.bind(null, styleElement); | |
remove = function() { | |
removeStyleElement(styleElement); | |
}; | |
} | |
update(obj); | |
return function updateStyle(newObj) { | |
if(newObj) { | |
if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) | |
return; | |
update(obj = newObj); | |
} else { | |
remove(); | |
} | |
}; | |
} | |
var replaceText = (function () { | |
var textStore = []; | |
return function (index, replacement) { | |
textStore[index] = replacement; | |
return textStore.filter(Boolean).join('\n'); | |
}; | |
})(); | |
function applyToSingletonTag(styleElement, index, remove, obj) { | |
var css = remove ? "" : obj.css; | |
if (styleElement.styleSheet) { | |
styleElement.styleSheet.cssText = replaceText(index, css); | |
} else { | |
var cssNode = document.createTextNode(css); | |
var childNodes = styleElement.childNodes; | |
if (childNodes[index]) styleElement.removeChild(childNodes[index]); | |
if (childNodes.length) { | |
styleElement.insertBefore(cssNode, childNodes[index]); | |
} else { | |
styleElement.appendChild(cssNode); | |
} | |
} | |
} | |
function applyToTag(styleElement, obj) { | |
var css = obj.css; | |
var media = obj.media; | |
if(media) { | |
styleElement.setAttribute("media", media) | |
} | |
if(styleElement.styleSheet) { | |
styleElement.styleSheet.cssText = css; | |
} else { | |
while(styleElement.firstChild) { | |
styleElement.removeChild(styleElement.firstChild); | |
} | |
styleElement.appendChild(document.createTextNode(css)); | |
} | |
} | |
function updateLink(linkElement, obj) { | |
var css = obj.css; | |
var sourceMap = obj.sourceMap; | |
if(sourceMap) { | |
// http://stackoverflow.com/a/26603875 | |
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */"; | |
} | |
var blob = new Blob([css], { type: "text/css" }); | |
var oldSrc = linkElement.href; | |
linkElement.href = URL.createObjectURL(blob); | |
if(oldSrc) | |
URL.revokeObjectURL(oldSrc); | |
} | |
/***/ }, | |
/* 489 */ | |
/***/ function(module, exports, __webpack_require__) { | |
// style-loader: Adds some css to the DOM by adding a <style> tag | |
// load the styles | |
var content = __webpack_require__(490); | |
if(typeof content === 'string') content = [[module.id, content, '']]; | |
// add the styles to the DOM | |
var update = __webpack_require__(488)(content, {}); | |
if(content.locals) module.exports = content.locals; | |
// Hot Module Replacement | |
if(false) { | |
// When the styles change, update the <style> tags | |
if(!content.locals) { | |
module.hot.accept("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!./../../node_modules/postcss-loader/index.js!./../../node_modules/less-loader/index.js!./ListItemTemplate.less", function() { | |
var newContent = require("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!./../../node_modules/postcss-loader/index.js!./../../node_modules/less-loader/index.js!./ListItemTemplate.less"); | |
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; | |
update(newContent); | |
}); | |
} | |
// When the module is disposed, remove the <style> tags | |
module.hot.dispose(function() { update(); }); | |
} | |
/***/ }, | |
/* 490 */ | |
/***/ function(module, exports, __webpack_require__) { | |
exports = module.exports = __webpack_require__(487)(); | |
// imports | |
// module | |
exports.push([module.id, ".ListItemTemplate__ctrlButtons___2euWn {\n position: absolute;\n top: 5px;\n right: 5px;\n display: inline-block;\n min-width: 10px;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: 10px;\n}\n.ListItemTemplate__listEditor___1qxat > ul {\n margin-top: 10px;\n padding-left: 0;\n}\n", ""]); | |
// exports | |
exports.locals = { | |
"ctrlButtons": "ListItemTemplate__ctrlButtons___2euWn", | |
"listEditor": "ListItemTemplate__listEditor___1qxat" | |
}; | |
/***/ }, | |
/* 491 */ | |
/***/ function(module, exports, __webpack_require__) { | |
// style-loader: Adds some css to the DOM by adding a <style> tag | |
// load the styles | |
var content = __webpack_require__(492); | |
if(typeof content === 'string') content = [[module.id, content, '']]; | |
// add the styles to the DOM | |
var update = __webpack_require__(488)(content, {}); | |
if(content.locals) module.exports = content.locals; | |
// Hot Module Replacement | |
if(false) { | |
// When the styles change, update the <style> tags | |
if(!content.locals) { | |
module.hot.accept("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!./../../node_modules/postcss-loader/index.js!./../../node_modules/less-loader/index.js!./WizardProgressTemplate.less", function() { | |
var newContent = require("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!./../../node_modules/postcss-loader/index.js!./../../node_modules/less-loader/index.js!./WizardProgressTemplate.less"); | |
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; | |
update(newContent); | |
}); | |
} | |
// When the module is disposed, remove the <style> tags | |
module.hot.dispose(function() { update(); }); | |
} | |
/***/ }, | |
/* 492 */ | |
/***/ function(module, exports, __webpack_require__) { | |
exports = module.exports = __webpack_require__(487)(); | |
// imports | |
// module | |
exports.push([module.id, ".WizardProgressTemplate__namespace___137p7 {\n margin: 0;\n padding-bottom: 2.2rem;\n list-style-type: none;\n display: table;\n padding-left: 0;\n padding-right: 0;\n width: 100%;\n}\n.WizardProgressTemplate__todo___13UJc,\n.WizardProgressTemplate__doing___1z7u3,\n.WizardProgressTemplate__done___3rFio {\n text-align: center;\n line-height: 4.5rem;\n padding: 0 0.7rem;\n cursor: pointer;\n display: table-cell;\n}\n.WizardProgressTemplate__todo___13UJc {\n color: silver;\n border-bottom: 4px solid silver;\n}\n.WizardProgressTemplate__doing___1z7u3 {\n color: black;\n border-bottom: 4px solid #33C3F0;\n}\n.WizardProgressTemplate__done___3rFio {\n color: black;\n border-bottom: 4px solid #33C3F0;\n}\n.WizardProgressTemplate__todo___13UJc span,\n.WizardProgressTemplate__doing___1z7u3 span,\n.WizardProgressTemplate__done___3rFio span {\n padding: 0 1.5rem;\n}\n.WizardProgressTemplate__todo___13UJc em,\n.WizardProgressTemplate__doing___1z7u3 em,\n.WizardProgressTemplate__done___3rFio em {\n display: none;\n font-weight: 700;\n padding-left: 1rem;\n}\n.WizardProgressTemplate__todo___13UJc:before,\n.WizardProgressTemplate__doing___1z7u3:before,\n.WizardProgressTemplate__done___3rFio:before {\n position: relative;\n bottom: -3.7rem;\n float: left;\n left: 50%;\n}\n.WizardProgressTemplate__doing___1z7u3:hover:before,\n.WizardProgressTemplate__done___3rFio:hover:before {\n color: #0FA0CE;\n}\n.WizardProgressTemplate__todo___13UJc:hover:before {\n color: #203c31;\n}\n.WizardProgressTemplate__todo___13UJc:before {\n content: \"\\2022\";\n color: white;\n background-color: silver;\n border-color: white;\n border-width: 1px;\n width: 1.2em;\n height: 1.2em;\n border-width: 0px;\n line-height: 1.2em;\n border-radius: 1.2em;\n}\n.WizardProgressTemplate__doing___1z7u3:before {\n content: \"\\2022\";\n color: white;\n background-color: #33C3F0;\n width: 1.2em;\n line-height: 1.2em;\n border-radius: 1.2em;\n}\n.WizardProgressTemplate__done___3rFio:before {\n content: \"\\2713\";\n color: white;\n background-color: #33C3F0;\n width: 1.2em;\n line-height: 1.2em;\n border-radius: 1.2em;\n}\n", ""]); | |
// exports | |
exports.locals = { | |
"namespace": "WizardProgressTemplate__namespace___137p7", | |
"todo": "WizardProgressTemplate__todo___13UJc", | |
"doing": "WizardProgressTemplate__doing___1z7u3", | |
"done": "WizardProgressTemplate__done___3rFio" | |
}; | |
/***/ }, | |
/* 493 */ | |
/***/ function(module, exports, __webpack_require__) { | |
// style-loader: Adds some css to the DOM by adding a <style> tag | |
// load the styles | |
var content = __webpack_require__(494); | |
if(typeof content === 'string') content = [[module.id, content, '']]; | |
// add the styles to the DOM | |
var update = __webpack_require__(488)(content, {}); | |
if(content.locals) module.exports = content.locals; | |
// Hot Module Replacement | |
if(false) { | |
// When the styles change, update the <style> tags | |
if(!content.locals) { | |
module.hot.accept("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!./../../node_modules/postcss-loader/index.js!./../../node_modules/less-loader/index.js!./WizardTemplate.less", function() { | |
var newContent = require("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!./../../node_modules/postcss-loader/index.js!./../../node_modules/less-loader/index.js!./WizardTemplate.less"); | |
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; | |
update(newContent); | |
}); | |
} | |
// When the module is disposed, remove the <style> tags | |
module.hot.dispose(function() { update(); }); | |
} | |
/***/ }, | |
/* 494 */ | |
/***/ function(module, exports, __webpack_require__) { | |
exports = module.exports = __webpack_require__(487)(); | |
// imports | |
// module | |
exports.push([module.id, ".WizardTemplate__transitionContainer___2v4Li {\n display: inline-block;\n white-space: nowrap;\n vertical-align: top;\n min-width: 100%;\n}\n.WizardTemplate__transitionContainer___2v4Li form {\n background-color: #fff;\n display: inline-block;\n min-width: 100%;\n white-space: normal;\n vertical-align: top;\n}\n", ""]); | |
// exports | |
exports.locals = { | |
"transitionContainer": "WizardTemplate__transitionContainer___2v4Li" | |
}; | |
/***/ }, | |
/* 495 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
var styleCtx = __webpack_require__(496); | |
var lessCtx = __webpack_require__(498); | |
/** | |
* This loads the style.js and then the less/css files merging | |
* the styles from the css if they exist. | |
*/ | |
module.exports = lessCtx.keys().reduce(function (obj, key) { | |
var nkey = key.replace(/^\.\/(.*)\.(less|css)$/, '$1'); | |
var cobj = obj[nkey]; | |
var Style = lessCtx(key); | |
if (cobj) { | |
Object.keys(cobj).forEach(function (skey) { | |
['Enter', 'Leave', 'Appear'].reduce(function (obj, k) { | |
var lkey = k.toLowerCase(); | |
var nobj = obj.transitionName || (obj.transitionName = {}); | |
if (Style['' + skey + k]) { | |
nobj[lkey] = Style['' + skey + k]; | |
nobj[lkey + 'Active'] = Style['' + skey + k + 'Active']; | |
} | |
return obj; | |
}, cobj[skey])['transitionHeightClass'] = Style[skey + 'Height']; | |
}); | |
} else { | |
obj[nkey] = Style; | |
} | |
return obj; | |
}, | |
//First find the style.js. | |
styleCtx.keys().reduce(function (obj, key) { | |
obj[key.replace(/^\.\/(.*)-style\.js$/, '$1')] = styleCtx(key); | |
return obj; | |
}, {})); | |
/***/ }, | |
/* 496 */ | |
/***/ function(module, exports, __webpack_require__) { | |
var map = { | |
"./transitions-style.js": 497 | |
}; | |
function webpackContext(req) { | |
return __webpack_require__(webpackContextResolve(req)); | |
}; | |
function webpackContextResolve(req) { | |
return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }()); | |
}; | |
webpackContext.keys = function webpackContextKeys() { | |
return Object.keys(map); | |
}; | |
webpackContext.resolve = webpackContextResolve; | |
module.exports = webpackContext; | |
webpackContext.id = 496; | |
/***/ }, | |
/* 497 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
module.exports = { | |
rollUp: { | |
transitionAppearTimeout: 800, | |
transitionEnterTimeout: 800, | |
transitionLeaveTimeout: 800 | |
}, | |
slideLeft: { | |
transitionAppearTimeout: 500, | |
transitionEnterTimeout: 500, | |
transitionLeaveTimeout: 500 | |
}, | |
slideRight: { | |
transitionAppearTimeout: 500, | |
transitionEnterTimeout: 500, | |
transitionLeaveTimeout: 500 | |
} | |
}; | |
/***/ }, | |
/* 498 */ | |
/***/ function(module, exports, __webpack_require__) { | |
var map = { | |
"./transitions.less": 499 | |
}; | |
function webpackContext(req) { | |
return __webpack_require__(webpackContextResolve(req)); | |
}; | |
function webpackContextResolve(req) { | |
return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }()); | |
}; | |
webpackContext.keys = function webpackContextKeys() { | |
return Object.keys(map); | |
}; | |
webpackContext.resolve = webpackContextResolve; | |
module.exports = webpackContext; | |
webpackContext.id = 498; | |
/***/ }, | |
/* 499 */ | |
/***/ function(module, exports, __webpack_require__) { | |
// style-loader: Adds some css to the DOM by adding a <style> tag | |
// load the styles | |
var content = __webpack_require__(500); | |
if(typeof content === 'string') content = [[module.id, content, '']]; | |
// add the styles to the DOM | |
var update = __webpack_require__(488)(content, {}); | |
if(content.locals) module.exports = content.locals; | |
// Hot Module Replacement | |
if(false) { | |
// When the styles change, update the <style> tags | |
if(!content.locals) { | |
module.hot.accept("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!./../../node_modules/postcss-loader/index.js!./../../node_modules/less-loader/index.js!./transitions.less", function() { | |
var newContent = require("!!./../../node_modules/css-loader/index.js?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!./../../node_modules/postcss-loader/index.js!./../../node_modules/less-loader/index.js!./transitions.less"); | |
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; | |
update(newContent); | |
}); | |
} | |
// When the module is disposed, remove the <style> tags | |
module.hot.dispose(function() { update(); }); | |
} | |
/***/ }, | |
/* 500 */ | |
/***/ function(module, exports, __webpack_require__) { | |
exports = module.exports = __webpack_require__(487)(); | |
// imports | |
// module | |
exports.push([module.id, ".transitions__rollUpLeave___dcXZj {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n opacity: 1;\n}\n.transitions__rollUpLeave___dcXZj.transitions__rollUpLeaveActive___2oih0 {\n -webkit-transform: translate(0, -100%);\n -ms-transform: translate(0, -100%);\n -o-transform: translate(0, -100%);\n transform: translate(0, -100%);\n opacity: 0;\n -webkit-transition: opacity 800ms ease-in-out, -webkit-transform 800ms ease-in-out;\n transition: opacity 800ms ease-in-out, -webkit-transform 800ms ease-in-out;\n -o-transition: opacity 800ms ease-in-out, transform 800ms ease-in-out, -o-transform 800ms ease-in-out;\n transition: opacity 800ms ease-in-out, transform 800ms ease-in-out;\n transition: opacity 800ms ease-in-out, transform 800ms ease-in-out, -webkit-transform 800ms ease-in-out, -o-transform 800ms ease-in-out;\n}\n.transitions__rollUpEnter___3nlrP,\n.transitions__rollUpAppear___1BrrP {\n -webkit-transform: translate(0, -100%);\n -ms-transform: translate(0, -100%);\n -o-transform: translate(0, -100%);\n transform: translate(0, -100%);\n opacity: 0;\n}\n.transitions__rollUpEnter___3nlrP.transitions__rollUpEnterActive___RyoLh,\n.transitions__rollUpAppear___1BrrP.transitions__rollUpEnterActive___RyoLh,\n.transitions__rollUpEnter___3nlrP.transitions__rollUpAppearActive___2WClb,\n.transitions__rollUpAppear___1BrrP.transitions__rollUpAppearActive___2WClb {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n opacity: 1;\n -webkit-transition: opacity 800ms ease-in-out, -webkit-transform 800ms ease-in-out;\n transition: opacity 800ms ease-in-out, -webkit-transform 800ms ease-in-out;\n -o-transition: opacity 800ms ease-in-out, transform 800ms ease-in-out, -o-transform 800ms ease-in-out;\n transition: opacity 800ms ease-in-out, transform 800ms ease-in-out;\n transition: opacity 800ms ease-in-out, transform 800ms ease-in-out, -webkit-transform 800ms ease-in-out, -o-transform 800ms ease-in-out;\n}\n.transitions__rollUpHeight___1JM7L {\n -webkit-transition: height 800ms ease-in-out;\n -o-transition: height 800ms ease-in-out;\n transition: height 800ms ease-in-out;\n}\n.transitions__slideRightLeave___2VH1Q {\n -webkit-transition: -webkit-transform 500ms ease-in-out;\n transition: -webkit-transform 500ms ease-in-out;\n -o-transition: transform 500ms ease-in-out, -o-transform 500ms ease-in-out;\n transition: transform 500ms ease-in-out;\n transition: transform 500ms ease-in-out, -webkit-transform 500ms ease-in-out, -o-transform 500ms ease-in-out;\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.transitions__slideRightLeaveActive___25WqC {\n -webkit-transform: translate(100%, 0);\n -ms-transform: translate(100%, 0);\n -o-transform: translate(100%, 0);\n transform: translate(100%, 0);\n}\n.transitions__slideRightEnter___3Ai4x,\n.transitions__slideRightAppear___3wMre {\n -webkit-transition: -webkit-transform 500ms ease-in-out;\n transition: -webkit-transform 500ms ease-in-out;\n -o-transition: transform 500ms ease-in-out, -o-transform 500ms ease-in-out;\n transition: transform 500ms ease-in-out;\n transition: transform 500ms ease-in-out, -webkit-transform 500ms ease-in-out, -o-transform 500ms ease-in-out;\n -webkit-transform: translate(-100%, 0);\n -ms-transform: translate(-100%, 0);\n -o-transform: translate(-100%, 0);\n transform: translate(-100%, 0);\n}\n.transitions__slideRightEnterActive___2bwbt,\n.transitions__slideRightAppearActive___2idjo {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.transitions__slideRightHeight___gMylg {\n -webkit-transition: height 500ms ease-in-out;\n -o-transition: height 500ms ease-in-out;\n transition: height 500ms ease-in-out;\n}\n.transitions__slideLeftLeave___24rsJ {\n -webkit-transition: -webkit-transform 500ms ease-in-out;\n transition: -webkit-transform 500ms ease-in-out;\n -o-transition: transform 500ms ease-in-out, -o-transform 500ms ease-in-out;\n transition: transform 500ms ease-in-out;\n transition: transform 500ms ease-in-out, -webkit-transform 500ms ease-in-out, -o-transform 500ms ease-in-out;\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.transitions__slideLeftLeaveActive___sDy30 {\n -webkit-transform: translate(-100%, 0);\n -ms-transform: translate(-100%, 0);\n -o-transform: translate(-100%, 0);\n transform: translate(-100%, 0);\n}\n.transitions__slideLeftEnter___oJrK8,\n.transitions__slideLeftAppear___3RgXT {\n -webkit-transition: -webkit-transform 500ms ease-in-out;\n transition: -webkit-transform 500ms ease-in-out;\n -o-transition: transform 500ms ease-in-out, -o-transform 500ms ease-in-out;\n transition: transform 500ms ease-in-out;\n transition: transform 500ms ease-in-out, -webkit-transform 500ms ease-in-out, -o-transform 500ms ease-in-out;\n -webkit-transform: translate(100%, 0);\n -ms-transform: translate(100%, 0);\n -o-transform: translate(100%, 0);\n transform: translate(100%, 0);\n}\n.transitions__slideLeftEnterActive___3wYvw,\n.transitions__slideLeftAppearActive___2aZMw {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.transitions__slideLeftHeight____sUUi {\n -webkit-transition: height 500ms ease-in-out;\n -o-transition: height 500ms ease-in-out;\n transition: height 500ms ease-in-out;\n}\n", ""]); | |
// exports | |
exports.locals = { | |
"rollUpLeave": "transitions__rollUpLeave___dcXZj", | |
"rollUpLeaveActive": "transitions__rollUpLeaveActive___2oih0", | |
"rollUpEnter": "transitions__rollUpEnter___3nlrP", | |
"rollUpAppear": "transitions__rollUpAppear___1BrrP", | |
"rollUpEnterActive": "transitions__rollUpEnterActive___RyoLh", | |
"rollUpAppearActive": "transitions__rollUpAppearActive___2WClb", | |
"rollUpHeight": "transitions__rollUpHeight___1JM7L", | |
"slideRightLeave": "transitions__slideRightLeave___2VH1Q", | |
"slideRightLeaveActive": "transitions__slideRightLeaveActive___25WqC", | |
"slideRightEnter": "transitions__slideRightEnter___3Ai4x", | |
"slideRightAppear": "transitions__slideRightAppear___3wMre", | |
"slideRightEnterActive": "transitions__slideRightEnterActive___2bwbt", | |
"slideRightAppearActive": "transitions__slideRightAppearActive___2idjo", | |
"slideRightHeight": "transitions__slideRightHeight___gMylg", | |
"slideLeftLeave": "transitions__slideLeftLeave___24rsJ", | |
"slideLeftLeaveActive": "transitions__slideLeftLeaveActive___sDy30", | |
"slideLeftEnter": "transitions__slideLeftEnter___oJrK8", | |
"slideLeftAppear": "transitions__slideLeftAppear___3RgXT", | |
"slideLeftEnterActive": "transitions__slideLeftEnterActive___3wYvw", | |
"slideLeftAppearActive": "transitions__slideLeftAppearActive___2aZMw", | |
"slideLeftHeight": "transitions__slideLeftHeight____sUUi" | |
}; | |
/***/ }, | |
/* 501 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
var ctx = __webpack_require__(502); | |
module.exports = ctx.keys().reduce(function (ret, key) { | |
var imp = ctx(key); | |
ret[key.replace(/.*\/(.*)\.jsx?$/, '$1')] = Object.keys(imp).reduce(function (o, k) { | |
o[k] = imp[k]; | |
return o; | |
}, imp.default); | |
return ret; | |
}, {}); | |
/***/ }, | |
/* 502 */ | |
/***/ function(module, exports, __webpack_require__) { | |
var map = { | |
"./blurValidate.js": 503, | |
"./changeValidate.js": 504, | |
"./conditional.js": 505, | |
"./content.js": 507, | |
"./dataType.js": 508, | |
"./domType.js": 509, | |
"./error.js": 510, | |
"./errorEvent.js": 511, | |
"./errors.js": 512, | |
"./event.js": 513, | |
"./expression.js": 514, | |
"./field.js": 518, | |
"./fieldAttrs.js": 521, | |
"./fields.js": 522, | |
"./fieldset.js": 523, | |
"./htmlFor.js": 524, | |
"./id.js": 525, | |
"./injectClass.js": 526, | |
"./injectedClass.js": 527, | |
"./listener.js": 528, | |
"./operator.js": 529, | |
"./options.js": 530, | |
"./processor.js": 531, | |
"./schema.js": 532, | |
"./style.js": 533, | |
"./submit.js": 534, | |
"./targetEvent.js": 535, | |
"./template.js": 519, | |
"./title.js": 536, | |
"./transition.js": 537, | |
"./type.js": 520, | |
"./typeClass.js": 538, | |
"./validate.js": 436, | |
"./value.js": 539, | |
"./valueEvent.js": 542 | |
}; | |
function webpackContext(req) { | |
return __webpack_require__(webpackContextResolve(req)); | |
}; | |
function webpackContextResolve(req) { | |
return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }()); | |
}; | |
webpackContext.keys = function webpackContextKeys() { | |
return Object.keys(map); | |
}; | |
webpackContext.resolve = webpackContextResolve; | |
module.exports = webpackContext; | |
webpackContext.id = 502; | |
/***/ }, | |
/* 503 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = blurValidate; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
/** | |
* Blur validate follows the behaviour | |
* | |
* if a field has not changed and blurred no validation. | |
* if a field has changed and blurred validate. | |
* if a validate listener is called validate. | |
* | |
* @param Clazz | |
* @param key | |
*/ | |
function blurValidate(Clazz, key) { | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
this.property.call(Clazz, key, function blurValidate$prop(validate, key, _ref, _ref2) { | |
var validators = _ref.validators; | |
var path = _ref.path; | |
var valueManager = _ref2.valueManager; | |
validate = typeof validate === 'function' ? validate : validators; | |
if (validate == null) { | |
return null; | |
} | |
var hasChanged = false, | |
hasBlurred = false; | |
this._validateListener = valueManager.addValidateListener(path, function () { | |
//after validation it don't matter | |
hasBlurred = true; | |
valueManager.updateErrors(path, validate()); | |
}).remove; | |
this._validateChangeListeners = valueManager.addListener(path, function (val) { | |
//fires onChange so its true. | |
hasChanged = true; | |
//at some point it has blurred | |
if (hasBlurred) { | |
valueManager.updateErrors(path, validate(val, valueManager)); | |
} | |
}, this, false).remove; | |
//blur event if its changed we will validate. | |
return function handleBlur(e) { | |
hasBlurred = true; | |
if (hasChanged) { | |
valueManager.updateErrors(path, validate()); | |
} | |
}.bind(this); | |
}); | |
this.unmount.call(Clazz, function () { | |
this._validateChangeListeners && this._validateChangeListeners(); | |
this._validateListener && this._validateListener(); | |
}); | |
} | |
/***/ }, | |
/* 504 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = changeValidate; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
/** | |
* Validates on change, used in checkbox. As it needs validation without blur. In cases like text, | |
* the behaviour is different. This can also be used for any component that needs to be validated | |
* after any value change. | |
* | |
* @param Clazz | |
* @param key | |
*/ | |
function changeValidate(Clazz, key) { | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
Clazz.contextTypes.loader = _PropTypes2.default.loader; | |
this.property.call(Clazz, key, function blurValidate$prop(value, key, props, _ref) { | |
var valueManager = _ref.valueManager; | |
var validate = typeof value === 'function' ? value : props.validators; | |
if (validate == null) return _tutils.noop; | |
var path = (0, _tutils.resolveKey)(props.path, value); | |
this._validateListener = valueManager.addValidateListener(path, function () { | |
return valueManager.updateErrors(path, validate()); | |
}).remove; | |
this._validateChangeListeners = valueManager.addListener(path, function (val) { | |
valueManager.updateErrors(path, validate(val, valueManager)); | |
}, this, false).remove; | |
//blur event if its changed we will validate. | |
return validate; | |
}); | |
this.unmount.call(Clazz, function () { | |
this._validateChangeListeners && this._validateChangeListeners(); | |
this._validateListener && this._validateListener(); | |
}); | |
} | |
/***/ }, | |
/* 505 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.settings = undefined; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
exports.normalize = normalize; | |
exports.default = conditional; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _Conditional = __webpack_require__(506); | |
var _Conditional2 = _interopRequireDefault(_Conditional); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var settings = exports.settings = { | |
operator: "truthy", | |
Conditional: _Conditional2.default | |
}; | |
function normalize(value, key, props, _ref) { | |
var injector = _ref.injector; | |
if (value == null || value === false) { | |
return value; | |
} | |
var Conditional = injector.inject(settings.Conditional); | |
var conditional = typeof value === 'string' ? _extends({}, settings, { Conditional: Conditional, operator: value }) : _extends({}, settings, { | |
Conditional: Conditional | |
}, value); | |
return conditional; | |
} | |
/** | |
* Configures the configurable object. | |
* | |
* @param Clazz | |
* @param key | |
*/ | |
function conditional(Clazz, key) { | |
Clazz.contextTypes.injector = _PropTypes2.default.injector; | |
this.property.call(Clazz, key, normalize); | |
} | |
/***/ }, | |
/* 506 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _ReactCSSReplaceTransition = __webpack_require__(301); | |
var _ReactCSSReplaceTransition2 = _interopRequireDefault(_ReactCSSReplaceTransition); | |
var _tutils = __webpack_require__(322); | |
var _RenderTemplate = __webpack_require__(408); | |
var _RenderTemplate2 = _interopRequireDefault(_RenderTemplate); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var Conditional = function (_Component) { | |
_inherits(Conditional, _Component); | |
function Conditional() { | |
_classCallCheck(this, Conditional); | |
return _possibleConstructorReturn(this, _Component.apply(this, arguments)); | |
} | |
Conditional.prototype.renderTemplate = function renderTemplate() { | |
var _props = this.props; | |
var value = _props.value; | |
var listen = _props.listen; | |
var error = _props.error; | |
var template = _props.template; | |
var falseTemplate = _props.falseTemplate; | |
var dismiss = _props.dismiss; | |
var operator = _props.operator; | |
var transition = _props.transition; | |
var children = _props.children; | |
var props = _objectWithoutProperties(_props, ['value', 'listen', 'error', 'template', 'falseTemplate', 'dismiss', 'operator', 'transition', 'children']); | |
if (dismiss) { | |
children = _react2.default.cloneElement(children, { dismiss: dismiss }); | |
} | |
return _react2.default.createElement( | |
_RenderTemplate2.default, | |
_extends({ key: 'true-conditional', template: template }, props), | |
children | |
); | |
}; | |
Conditional.prototype.renderFalseTemplate = function renderFalseTemplate() { | |
var _props2 = this.props; | |
var value = _props2.value; | |
var listen = _props2.listen; | |
var error = _props2.error; | |
var template = _props2.template; | |
var falseTemplate = _props2.falseTemplate; | |
var dismiss = _props2.dismiss; | |
var operator = _props2.operator; | |
var transition = _props2.transition; | |
var children = _props2.children; | |
var props = _objectWithoutProperties(_props2, ['value', 'listen', 'error', 'template', 'falseTemplate', 'dismiss', 'operator', 'transition', 'children']); | |
return falseTemplate ? _react2.default.createElement( | |
_RenderTemplate2.default, | |
_extends({ key: 'false-conditional', template: falseTemplate }, props), | |
children | |
) : _react2.default.createElement('span', { key: 'false-conditional' }); | |
}; | |
Conditional.prototype.renderContent = function renderContent() { | |
var isMatch = this.props.operator(this.props.listen, this.props.value); | |
// console.log('isMatch', this.props.listen, this.props.value); | |
return isMatch ? this.renderTemplate() : this.renderFalseTemplate(); | |
}; | |
Conditional.prototype.render = function render() { | |
if (!this.props.transition) { | |
return this.renderContent(); | |
} | |
return _react2.default.createElement( | |
_ReactCSSReplaceTransition2.default, | |
this.props.transition, | |
this.renderContent() | |
); | |
}; | |
return Conditional; | |
}(_react.Component); | |
Conditional.contextTypes = _PropTypes2.default.contextTypes; | |
Conditional.displayName = "Conditional"; | |
Conditional.defaultProps = { | |
operator: "!=", | |
animate: false, | |
error: null, | |
listen: '.', | |
value: null | |
}; | |
Conditional.propTypes = { | |
/** | |
* Current path of the component | |
*/ | |
path: _PropTypes2.default.path, | |
/** | |
* The value to use too compare against if not given, than | |
* it will be a compare against null. | |
*/ | |
value: _PropTypes2.default.any, | |
/** | |
* The path to listen to can be empty, | |
* in which case will look for | |
* defaults to the current path. | |
*/ | |
listen: _PropTypes2.default.listener, | |
/** | |
* The template to use if it evaluates to true | |
* IE - Modal, ShowHide | |
*/ | |
template: _PropTypes2.default.template, | |
/** | |
* The template to use if it evaluates to false | |
* defaults to a null span | |
*/ | |
falseTemplate: _PropTypes2.default.template, | |
/** | |
* A string to use a named transition,or a boolean. | |
* | |
* if a string that string will be the "name" to use to animate. | |
* If an object is passed than it will passed as props to the transition group. | |
* If === true than the default animation will be used. | |
* If === false than no animation is used | |
* | |
*/ | |
transition: _PropTypes2.default.transition, | |
/** | |
* How to compare the value to the matched value. | |
* If ommitted and a value is given than === is used. | |
* If ommitted and the value is omitted than a !(value == null) is used. | |
* | |
*/ | |
operator: _PropTypes2.default.operator, | |
/** | |
* Listen to an error rather than the mutually exclusive with listen. | |
*/ | |
error: _PropTypes2.default.error, | |
/** | |
* Path to update to make conditional false. | |
*/ | |
dismiss: _PropTypes2.default.path, | |
buttons: _PropTypes2.default.buttons, | |
field: _PropTypes2.default.any | |
}; | |
exports.default = Conditional; | |
/***/ }, | |
/* 507 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.settings = undefined; | |
exports.loadContent = loadContent; | |
exports.default = content; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _Content = __webpack_require__(413); | |
var _Content2 = _interopRequireDefault(_Content); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var settings = exports.settings = { | |
Content: _Content2.default | |
}; | |
function loadContent(content, key, props, _ref) { | |
var injector = _ref.injector; | |
if (content === false || content == null) { | |
return null; | |
} | |
var Content = injector.inject(settings.Content); | |
return { | |
Content: Content, | |
content: content | |
}; | |
} | |
function content(Clazz, key) { | |
Clazz.contextTypes.injector = _PropTypes2.default.injector; | |
this.property.call(Clazz, key, loadContent); | |
}; | |
/***/ }, | |
/* 508 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* Convert the dataType property to the type property. Only | |
* useful for making schema conversions easier, and avoid conflicts with | |
* type types. | |
* | |
* @param Clazz | |
* @param props | |
* @param key | |
* @param value | |
*/ | |
exports.__esModule = true; | |
exports.default = dataType; | |
function dataType(Clazz, key, propTypeKeys) { | |
//array of keys to allow for prop type renames. This should not happen much, but we have dataType->type conversion. | |
var idx = propTypeKeys.indexOf(key); | |
if (idx > -1) { | |
propTypeKeys.splice(idx, 1, 'type'); | |
} | |
this.extendPrototype.call(Clazz, 'componentWillMount', function dataType$willMount() { | |
if (!this.injected) this.injected = {}; | |
this.injected.type = this.props[key] || this.props.type; | |
}); | |
this.extendPrototype.call(Clazz, 'componentWillReceiveProps', function dataType$willRecieveProps(newProps) { | |
if (!this.injected) this.injected = {}; | |
if (this.props[key] !== newProps[key]) { | |
this.injected.type = this.props[key] || this.props.type; | |
} | |
}); | |
} | |
/***/ }, | |
/* 509 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.settings = undefined; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
exports.loadType = loadType; | |
exports.default = type; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
var DOM = _react2.default.DOM || _tutils.FREEZE_OBJ; | |
//Expose for configurability | |
var settings = exports.settings = { | |
type: 'span' | |
}; | |
function loadType(val, key, props, _ref) { | |
var loader = _ref.loader; | |
var injector = _ref.injector; | |
var _ref2 = typeof val === 'string' ? _extends({}, settings, { | |
type: val | |
}) : val == null ? settings : _extends({}, settings, val); | |
var type = _ref2.type; | |
var rest = _objectWithoutProperties(_ref2, ['type']); | |
if (DOM[type]) { | |
return type; | |
} | |
var Type = loader.loadType(type); | |
var injectedClazz = injector.inject(Type, null, rest); | |
return injectedClazz; | |
} | |
function type(Clazz, key, propList, OrigClazz) { | |
Clazz.contextTypes.loader = _PropTypes2.default.loader; | |
Clazz.contextTypes.injector = _PropTypes2.default.injector; | |
this.property.call(Clazz, key, loadType); | |
} | |
/***/ }, | |
/* 510 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = error; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function handleErrorListeners(value, key, props, _ref) { | |
var _this = this; | |
var valueManager = _ref.valueManager; | |
var validate = _ref.validate; | |
var resolvedPath = (0, _tutils.resolveKey)(props.path, value); | |
var errors = valueManager.errorsFor(resolvedPath); | |
//If we are validate mode and not having errors, we will validate. | |
if (validate && props.validators && !errors) { | |
errors = props.validators(); | |
} | |
//no matter what we will show errors at this point | |
if (errors && errors[0]) { | |
this.injected[key] = errors[0].message; | |
} | |
return valueManager.addErrorListener(resolvedPath, function (err) { | |
_this.injected[key] = err && err[0] && err[0].message; | |
_this.mounted && _this.forceUpdate(); | |
}, this, /**false so it doesn't override*/false).remove; | |
} | |
function error(Clazz, key) { | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
Clazz.contextTypes.validate = _PropTypes2.default.bool; | |
this.listener.call(Clazz, key, handleErrorListeners); | |
} | |
/***/ }, | |
/* 511 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = errorEvent; | |
var _tutils = __webpack_require__(322); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function errorUpdate(value, key, props, _ref) { | |
var valueManager = _ref.valueManager; | |
var resolvedKey = (0, _tutils.resolveKey)(props.path, value); | |
return function (val) { | |
return valueManager.updateErrors(resolvedKey, val); | |
}; | |
} | |
function errorEvent(Clazz, key) { | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
this.property.call(Clazz, key, errorUpdate); | |
} | |
/***/ }, | |
/* 512 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = errors; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function handleErrorsListeners(value, key, props, _ref) { | |
var _this = this; | |
var valueManager = _ref.valueManager; | |
return valueManager.addErrorListener((0, _tutils.resolveKey)(props.path, value), function (err, old, path) { | |
var errors = _this.injected[key] || (_this.injected[key] = {}); | |
if (err) { | |
errors[path] = err; | |
} else { | |
delete errors[path]; | |
} | |
_this.injected[key] = Object.keys(errors).length > 0 ? errors : null; | |
_this.mounted && _this.forceUpdate(); | |
}, this, true).remove; | |
} | |
/** | |
* Listens to errors on the path and returns them. This is similar to resolvers/error except | |
* that it provides the path and all errors. | |
* | |
* @param Clazz | |
* @param key | |
*/ | |
function errors(Clazz, key) { | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
this.listener.call(Clazz, key, handleErrorsListeners); | |
} | |
/***/ }, | |
/* 513 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = event; | |
var _tutils = __webpack_require__(322); | |
function handleEvent(value) { | |
if (value == null) return _tutils.noop; | |
return value; | |
} | |
function event(Clazz, key) { | |
this.property.call(Clazz, key, handleEvent); | |
} | |
/***/ }, | |
/* 514 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = expression$resolver; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _subschemaExpression = __webpack_require__(515); | |
var _subschemaExpression2 = _interopRequireDefault(_subschemaExpression); | |
var _tutils = __webpack_require__(322); | |
var _warning = __webpack_require__(402); | |
var _warning2 = _interopRequireDefault(_warning); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function handleExpression(value, key, props, _ref) { | |
var valueManager = _ref.valueManager; | |
var loader = _ref.loader; | |
var scope = this; | |
var expressionVals = {}; | |
var _expression = (0, _subschemaExpression2.default)(value); | |
var listen = _expression.listen; | |
var format = _expression.format; | |
var _expression$formatter = _expression.formatters; | |
var formatters = _expression$formatter === undefined ? [] : _expression$formatter; | |
var injected = this.injected; | |
var path = props.path; | |
var fmts = loader && loader.loadFormatter && formatters.reduce(function (obj, key) { | |
obj[key] = loader.loadFormatter(key); | |
(0, _warning2.default)(obj[key], 'No formatter loaded for %s', key); | |
return obj; | |
}, {}) || _tutils.FREEZE_OBJ; | |
//if there is a formatter without any listeners we need to format it. | |
if (listen.length === 0 && formatters.length) { | |
injected[key] = format({}, fmts); | |
} | |
var ret = listen.reduce(function (fn, v) { | |
if (!(v in expressionVals)) { | |
//only need to listen to a value once. | |
var resolvedKey = (0, _tutils.resolveKey)(path, v); | |
return (0, _tutils.applyFuncs)(valueManager.addListener(resolvedKey, function (val) { | |
if (!(v in expressionVals) || expressionVals[v] !== val) { | |
//if the values don't cange the state don't change. | |
expressionVals[v] = val == null ? '' : val; | |
injected[key] = format(expressionVals, fmts); | |
scope.forceUpdate(); | |
} | |
}, null, true).remove, fn); | |
} | |
return fn; | |
}, null); | |
return ret; | |
} | |
function expression$resolver(Clazz, key) { | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
Clazz.contextTypes.loader = _PropTypes2.default.loader; | |
this.listener.call(Clazz, key, handleExpression); | |
} | |
/***/ }, | |
/* 515 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = substitute; | |
var _escape = __webpack_require__(516); | |
var _escape2 = _interopRequireDefault(_escape); | |
var _get = __webpack_require__(416); | |
var _get2 = _interopRequireDefault(_get); | |
function _interopRequireDefault(obj) { | |
return obj && obj.__esModule ? obj : { default: obj }; | |
} | |
function escapeGet(obj, key) { | |
return (0, _escape2.default)((0, _get2.default)(obj, key, '')); | |
} | |
function isQuoted(v) { | |
if (!v) return false; | |
var first = v[0], | |
last = v[v.length - 1]; | |
if (first === '"' && last === '"' || first === "'" && last === "'") { | |
return true; | |
} | |
return false; | |
} | |
function requote(v) { | |
return JSON.stringify(v.substring(1, v.length - 1)); | |
} | |
function addArg(obj, key) { | |
if (!isQuoted(key)) { | |
obj[key] = true; | |
} | |
return obj; | |
} | |
function toArg(v) { | |
return isQuoted(v) ? requote(v) : "loget(obj, " + JSON.stringify(v) + ")"; | |
} | |
function maybeEscape(v) { | |
var parts = /^--(.*?)--$/.exec(v); | |
if (parts) { | |
return parts[1]; | |
} | |
return (0, _escape2.default)(v); | |
} | |
var reexpr = /\{([^\\}]*(?:\\.[^\\}]*)*)\}|$/g; | |
function substitute(str) { | |
if (str == null) { | |
str = ''; | |
} | |
var checks = {}; | |
var funcs = {}; | |
var source = "obj = obj || {}; return "; | |
var prevIdx = 0; | |
function substitute$inner(match, key, offset) { | |
source += JSON.stringify(str.substring(prevIdx, offset)) + "+"; | |
if (key) { | |
prevIdx = offset + match.length; | |
} | |
var f = /\s*(\w+?)\s*\(\s*([^)]+?)\s*\)/.exec(key); | |
if (f) { | |
funcs[f[1]] = true; | |
var args = f[2].split(/\,\s*/); | |
args.reduce(addArg, checks); | |
key = "$fns." + f[1] + "(" + args.map(toArg).join(', ') + ")"; | |
source += "(maybeEscape(" + key + "))+"; | |
} else if (key) { | |
checks[key] = true; | |
source += "(escapeGet(obj, " + JSON.stringify(key) + "))+"; | |
} | |
} | |
str.replace(reexpr, substitute$inner); | |
source += '""'; | |
var format = new Function('escapeGet', 'loget', 'escape', 'maybeEscape', 'obj', '$fns', source).bind(null, escapeGet, _get2.default, _escape2.default, maybeEscape); | |
var listen = Object.keys(checks); | |
var formatters = Object.keys(funcs); | |
return { | |
format: format, | |
listen: listen, | |
formatters: formatters | |
}; | |
} | |
//# sourceMappingURL=expression.js.map | |
/***/ }, | |
/* 516 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseToString = __webpack_require__(380), | |
escapeHtmlChar = __webpack_require__(517); | |
/** Used to match HTML entities and HTML characters. */ | |
var reUnescapedHtml = /[&<>"'`]/g, | |
reHasUnescapedHtml = RegExp(reUnescapedHtml.source); | |
/** | |
* Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to | |
* their corresponding HTML entities. | |
* | |
* **Note:** No other characters are escaped. To escape additional characters | |
* use a third-party library like [_he_](https://mths.be/he). | |
* | |
* Though the ">" character is escaped for symmetry, characters like | |
* ">" and "/" don't need escaping in HTML and have no special meaning | |
* unless they're part of a tag or unquoted attribute value. | |
* See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) | |
* (under "semi-related fun fact") for more details. | |
* | |
* Backticks are escaped because in Internet Explorer < 9, they can break out | |
* of attribute values or HTML comments. See [#59](https://html5sec.org/#59), | |
* [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and | |
* [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) | |
* for more details. | |
* | |
* When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) | |
* to reduce XSS vectors. | |
* | |
* @static | |
* @memberOf _ | |
* @category String | |
* @param {string} [string=''] The string to escape. | |
* @returns {string} Returns the escaped string. | |
* @example | |
* | |
* _.escape('fred, barney, & pebbles'); | |
* // => 'fred, barney, & pebbles' | |
*/ | |
function escape(string) { | |
// Reset `lastIndex` because in IE < 9 `String#replace` does not. | |
string = baseToString(string); | |
return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string; | |
} | |
module.exports = escape; | |
/***/ }, | |
/* 517 */ | |
/***/ function(module, exports) { | |
'use strict'; | |
/** Used to map characters to HTML entities. */ | |
var htmlEscapes = { | |
'&': '&', | |
'<': '<', | |
'>': '>', | |
'"': '"', | |
"'": ''', | |
'`': '`' | |
}; | |
/** | |
* Used by `_.escape` to convert characters to HTML entities. | |
* | |
* @private | |
* @param {string} chr The matched character to escape. | |
* @returns {string} Returns the escaped character. | |
*/ | |
function escapeHtmlChar(chr) { | |
return htmlEscapes[chr]; | |
} | |
module.exports = escapeHtmlChar; | |
/***/ }, | |
/* 518 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.settings = undefined; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
exports.default = field; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
var _template = __webpack_require__(519); | |
var _type = __webpack_require__(520); | |
var _Conditional = __webpack_require__(506); | |
var _Conditional2 = _interopRequireDefault(_Conditional); | |
var _warning = __webpack_require__(402); | |
var _warning2 = _interopRequireDefault(_warning); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var settings = exports.settings = { | |
type: 'Text', | |
template: 'EditorTemplate' | |
}; | |
function toTemplate(template) { | |
var tType = typeof template === 'undefined' ? 'undefined' : _typeof(template); | |
if (template === false || tType === 'string' || tType === 'function') { | |
return { | |
template: template | |
}; | |
} | |
return template; | |
} | |
function field(Clazz, key, propList) { | |
Clazz.contextTypes.loader = _PropTypes2.default.loader; | |
Clazz.contextTypes.injector = _PropTypes2.default.injector; | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
this.property.call(Clazz, key, function field$prop(value, key, props, context, OrigClazz) { | |
var normal = {}; | |
if (value == null) { | |
value = _tutils.FREEZE_OBJ; | |
} else if (typeof value === 'string') { | |
value = { type: value }; | |
} else { | |
if (value.conditional) { | |
if (value.conditional === 'string') { | |
normal.conditional = { operator: value.conditional }; | |
} | |
} | |
} | |
var Type = (0, _type.loadType)(value.type || settings.type, null, null, context); | |
(0, _warning2.default)(Type, 'No Type found for %s at path "%s"', value.type, props.path); | |
var template = Object.assign({}, toTemplate(settings.template), toTemplate(Type.template), toTemplate(value.template)); | |
var ret = _extends({}, settings, value, normal, { | |
template: (0, _template.loadTemplate)(template, key, props, context), | |
Type: Type | |
}); | |
delete ret.type; | |
return ret; | |
}); | |
} | |
/***/ }, | |
/* 519 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.settings = undefined; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
exports.loadTemplateRecursive = loadTemplateRecursive; | |
exports.loadTemplate = loadTemplate; | |
exports.default = resolve$template; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
var _warning = __webpack_require__(402); | |
var _warning2 = _interopRequireDefault(_warning); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
var settings = exports.settings = { | |
propTypes: { | |
className: _PropTypes2.default.cssClass, | |
id: _PropTypes2.default.id, | |
htmlFor: _PropTypes2.default.htmlFor | |
// fieldClass: PropTypes.fieldClass | |
} | |
}; | |
function loadTemplateRecursive(current) { | |
var next = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | |
var context = arguments[2]; | |
if (current === false) { | |
return false; | |
} | |
if (current == null) { | |
return null; | |
} | |
if (typeof current === 'string') { | |
var Template = context.loader.loadTemplate(current); | |
if (!Template) { | |
(0, _warning2.default)(Template, 'Template for name "%s" is not defined', current); | |
return null; | |
} | |
if (typeof Template === 'function') { | |
if (!Template.displayName) { | |
Template.displayName = current; | |
} | |
} | |
return loadTemplateRecursive(Template, next, context); | |
} else if (typeof current === 'function') { | |
var propTypes = next.propTypes; | |
var defaultProps = next.defaultProps; | |
var template = next.template; | |
var restNext = _objectWithoutProperties(next, ['propTypes', 'defaultProps', 'template']); | |
return _extends({}, restNext, { | |
Template: context.injector.inject(current, propTypes, defaultProps) | |
}); | |
} else if ('template' in current) { | |
return loadTemplateRecursive(current.template, _extends({}, next, current), context); | |
} | |
return _extends({}, next, current); | |
} | |
function loadTemplate(value, key, props, context) { | |
return loadTemplateRecursive(value, settings, context); | |
} | |
function resolve$template(Clazz, key) { | |
Clazz.contextTypes.loader = _PropTypes2.default.loader; | |
Clazz.contextTypes.injector = _PropTypes2.default.injector; | |
this.property.call(Clazz, key, loadTemplate); | |
}; | |
/***/ }, | |
/* 520 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.settings = exports.defaultPropTypes = undefined; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
exports.loadType = loadType; | |
exports.default = type; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _warning = __webpack_require__(402); | |
var _warning2 = _interopRequireDefault(_warning); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
var defaultPropTypes = exports.defaultPropTypes = { | |
onChange: _PropTypes2.default.targetEvent, | |
onBlur: _PropTypes2.default.blurValidate, | |
onKeyDown: _PropTypes2.default.event, | |
onKeyUp: _PropTypes2.default.event, | |
onFocus: _PropTypes2.default.event, | |
onPaste: _PropTypes2.default.event, | |
value: _PropTypes2.default.value, | |
id: _PropTypes2.default.id, | |
name: _PropTypes2.default.htmlFor, | |
className: _PropTypes2.default.typeClass, | |
placeholder: _PropTypes2.default.string, | |
fieldAttrs: _PropTypes2.default.fieldAttrs, | |
validators: _PropTypes2.default.array | |
}; | |
//Expose for configurability | |
var settings = exports.settings = { | |
type: 'Text' | |
}; | |
function loadType(val, key, props, context) { | |
var _ref = typeof val === 'string' ? _extends({}, settings, { | |
type: val | |
}) : val == null ? settings : _extends({}, settings, val); | |
var type = _ref.type; | |
var propTypes = _ref.propTypes; | |
var rest = _objectWithoutProperties(_ref, ["type", "propTypes"]); | |
if (!propTypes) { | |
propTypes = defaultPropTypes; | |
} else { | |
propTypes = _extends({}, defaultPropTypes, propTypes); | |
} | |
var Type = void 0; | |
if (typeof type === 'string') { | |
Type = context.loader.loadType(type); | |
(0, _warning2.default)(Type, 'Could not find a type for %s', type); | |
if (!Type.displayName) { | |
Type.displayName = type; | |
} | |
} else { | |
Type = type; | |
} | |
var injectedClazz = context.injector.inject(Type, propTypes, rest.defaultProps); | |
if ('template' in Type) { | |
injectedClazz.template = Type.template; | |
} | |
return injectedClazz; | |
} | |
function type(Clazz, key, propList, OrigClazz) { | |
Clazz.contextTypes.loader = _PropTypes2.default.loader; | |
Clazz.contextTypes.injector = _PropTypes2.default.injector; | |
this.property.call(Clazz, key, loadType); | |
} | |
/***/ }, | |
/* 521 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = fieldAttrs; | |
var _tutils = __webpack_require__(322); | |
function handleAttrs(value, attr, propKeys) { | |
if (!value) return; | |
if (!this.injected) this.injected = {}; | |
var keys = Object.keys(value); | |
for (var i = 0, l = keys.length; i < l; i++) { | |
var key = keys[i]; | |
if (propKeys.indexOf(key) === -1) { | |
propKeys.push(key); | |
} | |
//This may be indeterminate, depending if something sets it later. | |
this.injected[key] = value[key]; | |
} | |
} | |
function fieldAttrs(Clazz, key, propKeys) { | |
var ClazzP = Clazz.prototype; | |
ClazzP.componentWillMount = (0, _tutils.applyFuncs)(function () { | |
var idx = propKeys.indexOf(key); | |
if (idx > -1) { | |
propKeys.splice(idx, 1); | |
} | |
handleAttrs.call(this, this.props[key], key, propKeys); | |
}, ClazzP.componentWillMount); | |
ClazzP.componentWillReceiveProps = (0, _tutils.applyFuncs)(function (newProps) { | |
if (this.props[key] !== newProps[key]) { | |
handleAttrs.call(this, newProps[key], key); | |
} | |
}, ClazzP.componentWillReceiveProps); | |
} | |
/***/ }, | |
/* 522 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.normalizeFields = normalizeFields; | |
exports.default = fields; | |
var _tutils = __webpack_require__(322); | |
function normalizeFields(fields) { | |
if (fields == null) { | |
return fields; | |
} | |
fields = (0, _tutils.toArray)(fields); | |
if (fields.length === 0) { | |
return null; | |
} | |
return fields; | |
} | |
function fields(Clazz, key) { | |
this.property.call(Clazz, key, normalizeFields); | |
} | |
/***/ }, | |
/* 523 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.normalizeFieldsets = normalizeFieldsets; | |
var _tutils = __webpack_require__(322); | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function normalizeFieldsets(fieldsets, fields) { | |
if (!(fieldsets || fields)) return {}; | |
fields = (0, _tutils.toArray)(fields); | |
//fields trump fieldsets | |
//otherwise recurse | |
fieldsets = (0, _tutils.toArray)(fieldsets).map(function (f) { | |
if (f.fields) { | |
var rest = _objectWithoutProperties(f, []); | |
rest.fields = (0, _tutils.toArray)(rest.fields); | |
(0, _tutils.push)(fields, rest.fields); | |
return rest; | |
} else if (f.fieldsets) { | |
var fieldsets = f.fieldsets; | |
var rest = _objectWithoutProperties(f, ["fieldsets"]); | |
rest.fieldsets = normalizeFieldsets(fieldsets, fields).fieldsets; | |
return rest; | |
} else if ((0, _tutils.isString)(f) || Array.isArray(f)) { | |
var processFields = (0, _tutils.toArray)(f); | |
(0, _tutils.push)(fields, processFields); | |
return { | |
fields: processFields | |
}; | |
} else if (f.fieldsets) { | |
var fieldsets = f.fieldsets; | |
var rest = _objectWithoutProperties(f, ["fieldsets"]); | |
rest.fieldsets = normalizeFieldsets(fieldsets, fields).fieldsets; | |
return rest; | |
} else { | |
return f; | |
// warning(false, 'do not know what %s this is ', f); | |
} | |
}); | |
if (fieldsets.length === 0) { | |
fieldsets = [{ fields: fields }]; | |
} | |
return { | |
fieldsets: fieldsets, | |
fields: fields | |
}; | |
} | |
function normal(value) { | |
return normalizeFieldsets(value, []); | |
} | |
function fieldsets(Clazz, key) { | |
this.property.call(Clazz, key, normal); | |
} | |
fieldsets.normalizeFieldsets = normalizeFieldsets; | |
exports.default = fieldsets; | |
/***/ }, | |
/* 524 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = htmlFor; | |
function idValue(value, key, props) { | |
if (value == null) return props.id || props.path; | |
return value; | |
} | |
function htmlFor(Clazz, key) { | |
this.property.call(Clazz, key, idValue); | |
} | |
/***/ }, | |
/* 525 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = id; | |
function idValue(value, key, props) { | |
if (value == null) return props.path; | |
return value; | |
} | |
function id(Clazz, key) { | |
this.property.call(Clazz, key, idValue); | |
} | |
/***/ }, | |
/* 526 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.injectClass = injectClass; | |
exports.default = inject; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function injectClass(value, key, props, _ref) { | |
var injector = _ref.injector; | |
if (value == null) return; | |
if (value.injectClass) { | |
var _injectClass = value.injectClass; | |
var propTypes = value.propTypes; | |
var injectProps = value.injectProps; | |
var strict = value.strict; | |
return injector.inject(_injectClass, propTypes, injectProps, strict); | |
} | |
return injector.inject(value); | |
} | |
function inject(Clazz, key) { | |
Clazz.contextTypes.injector = _PropTypes2.default.injector; | |
this.property.call(Clazz, key, injectClass); | |
} | |
/***/ }, | |
/* 527 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
/** | |
* Returns the injected class as a property to the child class. | |
* Useful for Content. | |
* | |
* @param Clazz | |
* @param key | |
*/ | |
exports.__esModule = true; | |
exports.default = injected; | |
function injected(Clazz, key) { | |
this.property.call(Clazz, key, function () { | |
return Clazz; | |
}); | |
} | |
/***/ }, | |
/* 528 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = listen; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function handleListeners(value, key, props, context) { | |
var _this = this; | |
if (value == null) { | |
return null; | |
} | |
var resolvedPath = (0, _tutils.resolveKey)(props.path, value); | |
var injected = this.injected; | |
return context.valueManager.addListener(resolvedPath, function (v) { | |
injected[key] = v; | |
_this.mounted && _this.forceUpdate(); | |
}, null, true).remove; | |
} | |
function listen(Clazz, key) { | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
this.listener.call(Clazz, key, handleListeners); | |
} | |
/***/ }, | |
/* 529 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.loadOperator = loadOperator; | |
exports.default = operator; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var opRe = /^(==|===|!=|!==|>=|>|truthy|falsey|<|<=|(\!)?\/(.*)\/([gimy])?)$/; | |
var eq = function eq(compare, value) { | |
return value == compare; | |
}, | |
eqeq = function eqeq(compare, value) { | |
return value === compare; | |
}, | |
ne = function ne(compare, value) { | |
return value != compare; | |
}, | |
neeq = function neeq(compare, value) { | |
return value !== compare; | |
}, | |
gt = function gt(compare, value) { | |
return value > compare; | |
}, | |
gteq = function gteq(compare, value) { | |
return value >= compare; | |
}, | |
lt = function lt(compare, value) { | |
return value < compare; | |
}, | |
lteq = function lteq(compare, value) { | |
return value <= compare; | |
}, | |
truthy = function truthy(compare) { | |
return !!compare; | |
}, | |
falsey = function falsey(compare) { | |
return !compare; | |
}; | |
var opFactory = function opFactory$factory(scope) { | |
return function (operator) { | |
switch (operator) { | |
case 'truthy': | |
return truthy; | |
case 'falsey': | |
return falsey; | |
case '==': | |
return eq; | |
case '===': | |
return eqeq; | |
case '!=': | |
return ne; | |
case '!==': | |
return neeq; | |
case '>': | |
return gt; | |
case '>=': | |
return gteq; | |
case '<': | |
return lt; | |
case '<=': | |
return lteq; | |
default: | |
{ | |
throw new Error('Unknown operator [' + operator + ']'); | |
} | |
} | |
}; | |
}(); | |
function loadOperator(operator, key, props, context) { | |
if (operator instanceof RegExp) { | |
return function (compare, value) { | |
return operator.test(compare, value); | |
}; | |
} | |
if (typeof operator === 'function') { | |
return operator; | |
} | |
if (typeof operator === 'string') { | |
var os = opRe.exec(operator); | |
if (os) { | |
if (os[3] != null) { | |
operator = new RegExp(os[3], os[4]); | |
if (os[2] == null) { | |
return function (compare, value) { | |
return operator.test(compare); | |
}; | |
} else { | |
return function (compare, value) { | |
return !operator.test(compare); | |
}; | |
} | |
} | |
return opFactory(operator); | |
} else { | |
return context.loader.loadOperator(operator); | |
} | |
} | |
return operator; | |
} | |
function operator(Clazz, key) { | |
Clazz.contextTypes.loader = _PropTypes2.default.loader; | |
this.property.call(Clazz, key, loadOperator); | |
} | |
/***/ }, | |
/* 530 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
exports.default = options; | |
var _tutils = __webpack_require__(322); | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function toOptions(nval) { | |
var tnval = typeof nval === "undefined" ? "undefined" : _typeof(nval); | |
if (tnval === 'string' || tnval === 'number' || tnval === 'boolean') { | |
return { label: nval + '', val: nval + '' }; | |
} | |
if ('label' in nval && 'val' in nval) { | |
return nval; | |
} | |
var label = nval.label; | |
var val = nval.val; | |
var rest = _objectWithoutProperties(nval, ["label", "val"]); | |
if (!val) { | |
rest.val = label; | |
rest.label = label; | |
} | |
if (!label) { | |
rest.label = val; | |
rest.val = val; | |
} | |
return rest; | |
} | |
function asOptions(val) { | |
return (0, _tutils.toArray)(val).map(toOptions); | |
} | |
function options(Clazz, key) { | |
this.property.call(Clazz, key, asOptions); | |
} | |
/***/ }, | |
/* 531 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = processor; | |
function loadProcessor(value, key, props, _ref) { | |
var loader = _ref.loader; | |
return loader.loadProcessor(value); | |
} | |
function processor(Clazz, key) { | |
this.property.call(Clazz, key, loadProcessor); | |
} | |
/***/ }, | |
/* 532 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.settings = undefined; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
exports.normalize = normalize; | |
exports.normalizeSchema = normalizeSchema; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
var _fieldset = __webpack_require__(523); | |
var _template = __webpack_require__(519); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
/** | |
* So a schema can be | |
* EX: { | |
* key:'Text' | |
* } | |
* or | |
* { | |
* schema:{ | |
* key:'Text' | |
* } | |
* } | |
* or | |
* | |
* { | |
* schema:{ | |
* f1:'Text', | |
* f2:'Text' | |
* }, | |
* fields:['f1'] | |
* | |
* } | |
* or | |
* | |
* { | |
* schema:'Hello' | |
* } | |
* | |
* or | |
* | |
* 'Hello' | |
* | |
* @param oschema | |
* @param ofields | |
* @param ofieldsets | |
* @param loader | |
* @param orest | |
* @returns {*} | |
*/ | |
function normalize(oschema, ofields, ofieldsets, context) { | |
var orest = arguments.length <= 4 || arguments[4] === undefined ? _tutils.FREEZE_OBJ : arguments[4]; | |
if (oschema == null) { | |
return oschema; | |
} | |
var loader = context.loader; | |
if (typeof oschema === 'string') { | |
return normalize(loader.loadSchema(oschema), ofields, ofieldsets, loader, orest); | |
} | |
//use the overrided fieldsets. | |
if (ofields || ofieldsets) { | |
if (oschema.schema) { | |
var _fields = oschema.fields; | |
var fieldsets = oschema.fieldsets; | |
var _schema = oschema.schema; | |
var rest = _objectWithoutProperties(oschema, ["fields", "fieldsets", "schema"]); | |
if (typeof _schema === 'string') { | |
return normalize(loader.loadSchema(_schema), ofields, ofieldsets, context, rest); | |
} | |
return _extends({}, rest, (0, _fieldset.normalizeFieldsets)(ofieldsets, ofields), { | |
schema: _schema | |
}); | |
} else { | |
return _extends({}, orest, (0, _fieldset.normalizeFieldsets)(ofieldsets, ofields), { | |
schema: oschema | |
}); | |
} | |
} | |
if (oschema.fields || oschema.fieldsets) { | |
var _fields2 = oschema.fields; | |
var _fieldsets = oschema.fieldsets; | |
var _schema2 = oschema.schema; | |
var _rest = _objectWithoutProperties(oschema, ["fields", "fieldsets", "schema"]); | |
if (typeof _schema2 === 'string') { | |
return normalize(_schema2, _fields2, _fieldsets, context, _rest); | |
} | |
return _extends({}, _rest, (0, _fieldset.normalizeFieldsets)(oschema.fieldsets, oschema.fields), { | |
schema: _schema2 | |
}); | |
} | |
//schema without fields, or fieldsets | |
if (oschema.schema) { | |
var _schema3 = oschema.schema; | |
var _rest2 = _objectWithoutProperties(oschema, ["schema"]); | |
if (typeof _schema3 === 'string') { | |
//ofields and ofields should be null here. | |
return normalize(_schema3, ofields, ofieldsets, context, _rest2); | |
} | |
var _fields3 = Object.keys(_schema3); | |
return _extends({}, _rest2, { | |
schema: _schema3, | |
fields: _fields3, | |
fieldsets: [{ fields: _fields3 }] | |
}); | |
} else if (oschema.subSchema) { | |
var subSchema = oschema.subSchema; | |
var _rest3 = _objectWithoutProperties(oschema, ["subSchema"]); | |
if (typeof subSchema === 'string') { | |
//ofields and ofields should be null here. | |
return normalize(subSchema, ofields, ofieldsets, context, _rest3); | |
} | |
var _fields4 = Object.keys(subSchema); | |
return _extends({}, _rest3, { | |
schema: subSchema, | |
fields: _fields4, | |
fieldsets: [{ fields: _fields4 }] | |
}); | |
} | |
var fields = Object.keys(oschema); | |
return _extends({}, orest, { | |
fields: fields, | |
fieldsets: [{ fields: fields }], | |
schema: oschema | |
}); | |
} | |
var settings = exports.settings = { | |
template: 'ObjectTemplate' | |
}; | |
function normalizeSchema(oschema, key, props, context) { | |
if (oschema == null) return oschema; | |
var schema = normalize(oschema, props.fieldsets, props.fields, context); | |
if (props.objectTemplate) { | |
schema.template = (0, _template.loadTemplate)(props.objectTemplate, key, props, context); | |
} else if (schema.template) { | |
schema.template = (0, _template.loadTemplate)(schema.template, key, props, context); | |
} else if (props.fallbackTemplate) { | |
schema.template = (0, _template.loadTemplate)(props.fallbackTemplate, key, props, context); | |
} else { | |
schema.template = (0, _template.loadTemplate)(settings.template, key, props, context); | |
} | |
return schema; | |
} | |
function schema(Clazz, key) { | |
Clazz.contextTypes.loader = _PropTypes2.default.loader; | |
this.property.call(Clazz, key, normalizeSchema); | |
} | |
schema.normalizeSchema = normalizeSchema; | |
exports.default = schema; | |
/***/ }, | |
/* 533 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.styleToProps = styleToProps; | |
exports.default = style; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
/** | |
* Takes the keys of a style object and converts them to an object | |
* suitable to default props with the default value being the styles | |
* resolved default style. | |
* | |
* @param styles | |
* @param props | |
* @param preFix | |
* @param postFix | |
* @returns {*} | |
*/ | |
function styleToProps(styles) { | |
var props = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | |
var preFix = arguments.length <= 2 || arguments[2] === undefined ? '' : arguments[2]; | |
var postFix = arguments.length <= 3 || arguments[3] === undefined ? "Class" : arguments[3]; | |
return Object.keys(styles).reduce(function (ret, key) { | |
ret['' + preFix + key + postFix] = styles[key]; | |
return ret; | |
}, props); | |
} | |
/** | |
* So styles tries toload via loader.loadStyle(ClassName or the value of the style) which | |
* should return an object. | |
* | |
* It will iterate over said object and properties with the key being renamed ${key}Class | |
* and the value being installed. | |
* | |
* If a value is passed to the object, for a field, than that value is used. Rather | |
* than the | |
* | |
* | |
* @param Clazz | |
* @param key | |
* @param propList | |
* @param OrigClazz | |
*/ | |
function style(Clazz, key, propList, OrigClazz) { | |
Clazz.contextTypes.loader = _PropTypes2.default.loader; | |
this.property.call(Clazz, key, function style$resolver$property(value, key, props, _ref) { | |
var loader = _ref.loader; | |
var injected = this.injected; | |
var Style = value == null || typeof value === 'string' ? loader.loadStyle(value || OrigClazz.displayName || OrigClazz.name) : value; | |
if (Style == null) { | |
return Style; | |
} | |
var obj = styleToProps(Style, {}); | |
Object.keys(obj).forEach(function (key) { | |
if (key in props) { | |
injected[key] = props[key] || ''; | |
} else { | |
injected[key] = obj[key]; | |
} | |
if (propList.indexOf(key) === -1) { | |
propList.push(key); | |
} | |
}); | |
return Style; | |
}); | |
} | |
/***/ }, | |
/* 534 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = submit; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function resolve(value, key, props, _ref) { | |
var valueManager = _ref.valueManager; | |
var noValidate = _ref.noValidate; | |
if (typeof value === 'function') { | |
return value; | |
} | |
var resolvedPath = props.name || (0, _tutils.resolveKey)(props.path, value); | |
return function targetEvent$resolve(e) { | |
var value = valueManager.getValue(); | |
var errors = void 0; | |
if (!noValidate) { | |
valueManager.validate(null, value); | |
errors = valueManager.getErrors(); | |
} | |
valueManager.onSubmit(e, errors, value, resolvedPath); | |
}; | |
} | |
function submit(Clazz, key) { | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
Clazz.contextTypes.noValidate = _PropTypes2.default.bool; | |
this.property.call(Clazz, key, resolve); | |
} | |
/***/ }, | |
/* 535 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = targetEvent; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function resolve(value, key, props, _ref) { | |
var valueManager = _ref.valueManager; | |
if (typeof value === 'function') { | |
return value; | |
} | |
var resolvedPath = (0, _tutils.resolveKey)(props.path, value); | |
return function targetEvent$resolve(e) { | |
valueManager.update(resolvedPath, e.target.value); | |
}; | |
} | |
function targetEvent(Clazz, key) { | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
this.property.call(Clazz, key, resolve); | |
} | |
/***/ }, | |
/* 536 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = valueEvent; | |
var _tutils = __webpack_require__(322); | |
function resolve(value, key, props) { | |
if (value === false) { | |
return ''; | |
} | |
if (value) { | |
return value; | |
} | |
var val = props.name || props.id || props.path || ''; | |
return (0, _tutils.titlelize)(val.split(/\./).pop()); | |
} | |
function valueEvent(Clazz, key) { | |
this.property.call(Clazz, key, resolve); | |
} | |
/***/ }, | |
/* 537 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.settings = undefined; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
exports.handleTransition = handleTransition; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _ReactCSSReplaceTransition = __webpack_require__(301); | |
var _ReactCSSReplaceTransition2 = _interopRequireDefault(_ReactCSSReplaceTransition); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
var settings = exports.settings = { | |
transition: 'rollUp', | |
on: ['enter', 'leave'], | |
Transition: _ReactCSSReplaceTransition2.default | |
}; | |
function handleTransition(value, key, props, _ref) { | |
var loader = _ref.loader; | |
if (value == null || value === false || value.transition === false) { | |
return null; | |
} | |
if (typeof value === 'string') { | |
value = { transition: value }; | |
} | |
var _settings$value = _extends({}, settings, value); | |
var transition = _settings$value.transition; | |
var config = _objectWithoutProperties(_settings$value, ['transition']); | |
var _ref2 = typeof transition === 'string' ? _extends({}, config, loader.loadTransition(transition)) : transition; | |
var transitionAppearTimeout = _ref2.transitionAppearTimeout; | |
var transitionLeaveTimeout = _ref2.transitionLeaveTimeout; | |
var transitionEnterTimeout = _ref2.transitionEnterTimeout; | |
var on = _ref2.on; | |
var _ref2$transitionName = _ref2.transitionName; | |
var enter = _ref2$transitionName.enter; | |
var enterActive = _ref2$transitionName.enterActive; | |
var appear = _ref2$transitionName.appear; | |
var appearActive = _ref2$transitionName.appearActive; | |
var leave = _ref2$transitionName.leave; | |
var leaveActive = _ref2$transitionName.leaveActive; | |
var rest = _objectWithoutProperties(_ref2, ['transitionAppearTimeout', 'transitionLeaveTimeout', 'transitionEnterTimeout', 'on', 'transitionName']); | |
var _on = Array.isArray(on) ? on : [on]; | |
var transitionName = rest.transitionName = {}; | |
//either the original value has the timeout or we have an on | |
if (value.transitionEnterTimeout || _on.indexOf('enter') != -1) { | |
rest.transitionEnterTimeout = transitionEnterTimeout; | |
transitionName.enter = enter; | |
transitionName.enterActive = enterActive; | |
rest.transitionEnter = true; | |
} else { | |
rest.transitionEnter = false; | |
} | |
if (value.transitionAppearTimeout || _on.indexOf('appear') != -1) { | |
rest.transitionAppearTimeout = transitionAppearTimeout; | |
transitionName.appear = appear; | |
transitionName.appearActive = appearActive; | |
rest.transitionAppear = true; | |
} else { | |
rest.transitionAppear = false; | |
} | |
if (value.transitionLeaveTimeout || _on.indexOf('leave') != -1) { | |
rest.transitionLeaveTimeout = transitionLeaveTimeout; | |
transitionName.leave = leave; | |
transitionName.leaveActive = leaveActive; | |
rest.transitionLeave = true; | |
} else { | |
rest.transitionLeave = false; | |
} | |
return rest; | |
} | |
function transition(Clazz, key) { | |
Clazz.contextTypes.loader = _PropTypes2.default.loader; | |
this.property.call(Clazz, key, handleTransition); | |
} | |
//because es6 modules. | |
transition.handleTransition = handleTransition; | |
exports.default = transition; | |
/***/ }, | |
/* 538 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.settings = undefined; | |
exports.addClasses = addClasses; | |
exports.forType = forType; | |
exports.default = typeClass; | |
var _tutils = __webpack_require__(322); | |
var settings = exports.settings = { | |
inputClassName: 'form-control' | |
}; | |
function addClasses(classes) { | |
for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
rest[_key - 1] = arguments[_key]; | |
} | |
if (rest == null || rest.length === 0) { | |
return classes; | |
} | |
for (var i = 0, l = rest.length; i < l; i++) { | |
var str = rest[i]; | |
if (str == null) continue; | |
if ((0, _tutils.isString)(str)) { | |
var parts = str.split(/\s+?/); | |
if (parts.length > 1) { | |
addClasses.apply(undefined, [classes].concat(parts)); | |
} else { | |
if (classes.indexOf(str) === -1) { | |
classes.push(str); | |
} | |
} | |
} else if ((0, _tutils.isArray)(str)) { | |
addClasses.apply(undefined, [classes].concat(str)); | |
} else if ((0, _tutils.isFunction)(str)) { | |
addClasses(classes, str.call(this)); | |
} | |
} | |
return classes; | |
} | |
/** | |
* Determines the classes for a type. | |
* Takes a react node as the first argument. | |
* @param {Reactnode} node - node to create for. | |
* @param {String|Function|Array<String|Function|Array>} [clases] -classes to add. | |
*/ | |
function forType(OrigClazz, value) { | |
return addClasses([], value || OrigClazz.inputClassName || settings.inputClassName).join(' '); | |
} | |
function typeClass(Clazz, key, propList, OrigClazz) { | |
this.property.call(Clazz, key, function (value) { | |
return forType(OrigClazz, value); | |
}); | |
} | |
/***/ }, | |
/* 539 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.settings = undefined; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
exports.handleListeners = handleListeners; | |
exports.default = value; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
var _isPlainObject = __webpack_require__(540); | |
var _isPlainObject2 = _interopRequireDefault(_isPlainObject); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function createHandler(value, key, loader) { | |
if (value.processor) { | |
var _ret = function () { | |
var process = typeof value.processor == 'function' ? value.processor : loader.loadProcessor(value.processor).value; | |
return { | |
v: function value$processsorHandler(v) { | |
this.injected[key] = process(v); | |
this.mounted && this.forceUpdate(); | |
} | |
}; | |
}(); | |
if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; | |
} | |
return function value$handler(v) { | |
this.injected[key] = v == null ? '' : v; | |
this.mounted && this.forceUpdate(); | |
}; | |
} | |
function handleListeners(value, key, props, _ref) { | |
var valueManager = _ref.valueManager; | |
var loader = _ref.loader; | |
var resolvedPath = void 0; | |
if (value == null || typeof value === 'string') { | |
resolvedPath = (0, _tutils.resolveKey)(props.path, value); | |
value = settings; | |
} else if ((0, _isPlainObject2.default)(value)) { | |
resolvedPath = (0, _tutils.resolveKey)(props.path, value.value); | |
value = _extends({}, settings, value); | |
} | |
return valueManager.addListener(resolvedPath, createHandler(value, key, loader), this, value.init).remove; | |
} | |
var settings = exports.settings = { | |
//fire the listener immediately, do not wait for a change. | |
init: true | |
}; | |
function value(Clazz, key) { | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
Clazz.contextTypes.loader = _PropTypes2.default.loader; | |
this.listener.call(Clazz, key, handleListeners); | |
} | |
/***/ }, | |
/* 540 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseForIn = __webpack_require__(541), | |
isArguments = __webpack_require__(337), | |
isObjectLike = __webpack_require__(331); | |
/** `Object#toString` result references. */ | |
var objectTag = '[object Object]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* Checks if `value` is a plain object, that is, an object created by the | |
* `Object` constructor or one with a `[[Prototype]]` of `null`. | |
* | |
* **Note:** This method assumes objects created by the `Object` constructor | |
* have no inherited enumerable properties. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`. | |
* @example | |
* | |
* function Foo() { | |
* this.a = 1; | |
* } | |
* | |
* _.isPlainObject(new Foo); | |
* // => false | |
* | |
* _.isPlainObject([1, 2, 3]); | |
* // => false | |
* | |
* _.isPlainObject({ 'x': 0, 'y': 0 }); | |
* // => true | |
* | |
* _.isPlainObject(Object.create(null)); | |
* // => true | |
*/ | |
function isPlainObject(value) { | |
var Ctor; | |
// Exit early for non `Object` objects. | |
if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) || !hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor))) { | |
return false; | |
} | |
// IE < 9 iterates inherited properties before own properties. If the first | |
// iterated property is an object's own property then there are no inherited | |
// enumerable properties. | |
var result; | |
// In most environments an object's own properties are iterated before | |
// its inherited properties. If the last iterated property is an object's | |
// own property then there are no inherited enumerable properties. | |
baseForIn(value, function (subValue, key) { | |
result = key; | |
}); | |
return result === undefined || hasOwnProperty.call(value, result); | |
} | |
module.exports = isPlainObject; | |
/***/ }, | |
/* 541 */ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
var baseFor = __webpack_require__(356), | |
keysIn = __webpack_require__(340); | |
/** | |
* The base implementation of `_.forIn` without support for callback | |
* shorthands and `this` binding. | |
* | |
* @private | |
* @param {Object} object The object to iterate over. | |
* @param {Function} iteratee The function invoked per iteration. | |
* @returns {Object} Returns `object`. | |
*/ | |
function baseForIn(object, iteratee) { | |
return baseFor(object, iteratee, keysIn); | |
} | |
module.exports = baseForIn; | |
/***/ }, | |
/* 542 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = valueEvent; | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function resolve(value, key, props, context) { | |
if (typeof value === 'function') { | |
return value; | |
} | |
var resolvedPath = (0, _tutils.resolveKey)(props.path, value); | |
if (props.path == null && resolvedPath == null) { | |
return _tutils.noop; | |
} | |
return function (v, overridePath) { | |
context.valueManager.update(overridePath || resolvedPath, v); | |
}; | |
} | |
function valueEvent(Clazz, key) { | |
Clazz.contextTypes.valueManager = _PropTypes2.default.valueManager; | |
this.property.call(Clazz, key, resolve); | |
} | |
/***/ }, | |
/* 543 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.PropTypes = exports.injectorFactory = exports.util = undefined; | |
var _react = __webpack_require__(302); | |
var _injector = __webpack_require__(544); | |
var _injector2 = _interopRequireDefault(_injector); | |
var _injectorFactory = __webpack_require__(545); | |
var _injectorFactory2 = _interopRequireDefault(_injectorFactory); | |
var _util = __webpack_require__(546); | |
var _util2 = _interopRequireDefault(_util); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var util = exports.util = _util2.default; | |
var injectorFactory = exports.injectorFactory = _injectorFactory2.default; | |
var PropTypes = exports.PropTypes = { | |
injector: _react.PropTypes.shape({ | |
inject: _react.PropTypes.func.isRequired | |
}) | |
}; | |
exports.default = _injector2.default; | |
/***/ }, | |
/* 544 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _injectorFactory = __webpack_require__(545); | |
var _injectorFactory2 = _interopRequireDefault(_injectorFactory); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
exports.default = (0, _injectorFactory2.default)(); | |
/***/ }, | |
/* 545 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.BaseInjectComponent = undefined; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
exports.default = injector; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _util = __webpack_require__(546); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var BaseInjectComponent = exports.BaseInjectComponent = function (_Component) { | |
_inherits(BaseInjectComponent, _Component); | |
function BaseInjectComponent() { | |
var _temp, _this, _ret; | |
_classCallCheck(this, BaseInjectComponent); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {}, _this.injected = {}, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
BaseInjectComponent.prototype.render = function render() { | |
var _constructor = this.constructor; | |
var _copyPropTypeKeys = _constructor._copyPropTypeKeys; | |
var Clazz = _constructor.Clazz; | |
var props = (0, _util.onlyKeys)(_copyPropTypeKeys, this.injected, this.props); | |
return _react2.default.createElement( | |
Clazz, | |
_extends({}, props, this.injected), | |
this.props.children | |
); | |
}; | |
return BaseInjectComponent; | |
}(_react.Component); | |
function hasAnyKeys(obj) { | |
if (!obj) return false; | |
return Object.keys(obj).length > 0; | |
} | |
function isIterable(obj) { | |
// checks for null and undefined | |
if (obj == null) { | |
return false; | |
} | |
return obj[Symbol.iterator] !== void 0; | |
} | |
function injector() { | |
var resolvers = arguments.length <= 0 || arguments[0] === undefined ? new Map() : arguments[0]; | |
if (!(resolvers instanceof Map)) { | |
if (isIterable(resolvers)) { | |
resolvers = new Map(resolvers); | |
} else { | |
throw new Error('resolvers must be iterable'); | |
} | |
} | |
function resolveProp(propType) { | |
if (propType == null) return propType; | |
var resolved = resolvers.get(propType); | |
return resolved; | |
} | |
var Injector = { | |
resolveProp: resolveProp, | |
resolver: function resolver(propType, resolve) { | |
if (propType == null || resolve == null) { | |
throw new Error('must define both a propType and a resolver'); | |
} | |
if (propType.isRequired) { | |
resolvers.set(propType.isRequired, resolve); | |
} | |
resolvers.set(propType, resolve); | |
}, | |
unmount: _util.unmount, | |
listener: _util.listener, | |
property: _util.prop, | |
extendPrototype: _util.extendPrototype, | |
createWrapperClass: function createWrapperClass(Clazz, copyPropTypeKeys) { | |
var name = Clazz.name; | |
var displayName = Clazz.displayName; | |
//BaseInjectComponent is just a marker class. | |
var InjectedClass = function (_BaseInjectComponent) { | |
_inherits(InjectedClass, _BaseInjectComponent); | |
function InjectedClass() { | |
_classCallCheck(this, InjectedClass); | |
return _possibleConstructorReturn(this, _BaseInjectComponent.apply(this, arguments)); | |
} | |
return InjectedClass; | |
}(BaseInjectComponent); | |
InjectedClass.defaultProps = {}; | |
InjectedClass.contextTypes = {}; | |
InjectedClass.displayName = (displayName || name) + "$Wrapper"; | |
InjectedClass.Clazz = Clazz; | |
InjectedClass._copyPropTypeKeys = copyPropTypeKeys; | |
return InjectedClass; | |
}, | |
/** | |
* Injects properties based propType. | |
* | |
* @param Clazz - class to wrap. | |
* @param extraPropTypes - extra prop types if the component does not have the propType than it will use this propType, otherwise the | |
* the class'es default propType will be used. | |
* @param extraProps - If a component has a defaultProp than it will use that otherwise it will use this. | |
* @returns {*} | |
*/ | |
inject: function inject(Clazz, extraPropTypes, extraProps) { | |
var _this3 = this; | |
var hasExtra = hasAnyKeys(extraPropTypes) || hasAnyKeys(extraProps); | |
var defaultProps = Clazz.defaultProps; | |
var propTypes = Clazz.propTypes; | |
var injectedProps = Clazz.injectedProps; | |
var injectedPropTypes = Clazz.injectedPropTypes; | |
var propTypeKeys = (0, _util.uniqueKeys)(injectedProps, injectedPropTypes, propTypes, defaultProps, extraPropTypes); | |
var copyPropTypeKeys = propTypeKeys; | |
var start = hasExtra ? this.createWrapperClass(Clazz, copyPropTypeKeys) : null; | |
var injected = propTypeKeys.reduce(function (injectedClass, key) { | |
var resolver = _this3.resolveProp((0, _util.keyIn)(key, injectedPropTypes, propTypes, extraPropTypes)); | |
//resolver is null, nothing to do just return. | |
if (resolver == null) { | |
return injectedClass; | |
} | |
//injectedClass may be null if it didn't have any extras. So we will create if it is. | |
injectedClass = injectedClass || _this3.createWrapperClass(Clazz, copyPropTypeKeys); | |
//Add default props to this thing. | |
injectedClass.defaultProps[key] = (0, _util.keyIn)(key, injectedProps, defaultProps, extraProps); | |
//Resolver could return a different class. | |
var nextClass = resolver.call(Injector, injectedClass, key, propTypeKeys, Clazz); | |
//If a different class was null, return the original class. | |
return nextClass == null ? injectedClass : nextClass; | |
}, start); | |
return injected || Clazz; | |
} | |
}; | |
return Injector; | |
} | |
/***/ }, | |
/* 546 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
exports.__esModule = true; | |
function applyNice(f1, f2) { | |
if (f1 === f2 || !f2) return f1; | |
if (!f1) return f2; | |
return function applyNice$return() { | |
f1.call.apply(f1, [this].concat(Array.prototype.slice.call(arguments))); | |
f2.call.apply(f2, [this].concat(Array.prototype.slice.call(arguments))); | |
}; | |
} | |
function extendPrototype(property, fn) { | |
this.prototype[property] = applyNice(fn, this.prototype[property]); | |
return this; | |
} | |
function execArg(v) { | |
v && v(); | |
} | |
var push = Function.apply.bind(Array.prototype.push); | |
function keyIn(key) { | |
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
args[_key - 1] = arguments[_key]; | |
} | |
for (var _iterator = args, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { | |
var _ref; | |
if (_isArray) { | |
if (_i >= _iterator.length) break; | |
_ref = _iterator[_i++]; | |
} else { | |
_i = _iterator.next(); | |
if (_i.done) break; | |
_ref = _i.value; | |
} | |
var arg = _ref; | |
if (arg == null) continue; | |
if (key in arg) return arg[key]; | |
} | |
return; | |
} | |
function onlyKeys(keys) { | |
var ret = {}; | |
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | |
args[_key2 - 1] = arguments[_key2]; | |
} | |
for (var _iterator2 = keys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { | |
var _ref2; | |
if (_isArray2) { | |
if (_i2 >= _iterator2.length) break; | |
_ref2 = _iterator2[_i2++]; | |
} else { | |
_i2 = _iterator2.next(); | |
if (_i2.done) break; | |
_ref2 = _i2.value; | |
} | |
var key = _ref2; | |
for (var _iterator3 = args, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { | |
var _ref3; | |
if (_isArray3) { | |
if (_i3 >= _iterator3.length) break; | |
_ref3 = _iterator3[_i3++]; | |
} else { | |
_i3 = _iterator3.next(); | |
if (_i3.done) break; | |
_ref3 = _i3.value; | |
} | |
var arg = _ref3; | |
if (arg == null) continue; | |
if (key in arg) { | |
ret[key] = arg[key]; | |
break; | |
} | |
} | |
} | |
return ret; | |
} | |
function uniqueKeys() { | |
var keys = []; | |
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | |
args[_key3] = arguments[_key3]; | |
} | |
for (var _iterator4 = args, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { | |
var _ref4; | |
if (_isArray4) { | |
if (_i4 >= _iterator4.length) break; | |
_ref4 = _iterator4[_i4++]; | |
} else { | |
_i4 = _iterator4.next(); | |
if (_i4.done) break; | |
_ref4 = _i4.value; | |
} | |
var arg = _ref4; | |
if (arg == null) continue; | |
for (var _iterator5 = Object.keys(arg), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { | |
var _ref5; | |
if (_isArray5) { | |
if (_i5 >= _iterator5.length) break; | |
_ref5 = _iterator5[_i5++]; | |
} else { | |
_i5 = _iterator5.next(); | |
if (_i5.done) break; | |
_ref5 = _i5.value; | |
} | |
var key = _ref5; | |
if (keys.indexOf(key) === -1) { | |
keys.push(key); | |
} | |
} | |
} | |
return keys; | |
} | |
function extend(name, fn) { | |
var fn2 = this.prototype[name]; | |
this.prototype[name] = applyNice(fn, fn2); | |
} | |
function didMount() { | |
this.mounted = true; | |
} | |
function listener(key, fn) { | |
function listener$listen(props, context) { | |
if (!this.injected) { | |
this.injected = {}; | |
} | |
if (!this._listeners) { | |
this._listeners = {}; | |
} else if (this._listeners[key]) { | |
this._listeners[key](); | |
} | |
this._listeners[key] = fn.call(this, props[key], key, props, context); | |
} | |
extend.call(this, 'componentDidMount', didMount); | |
extend.call(this, 'componentWillMount', function listener$willMount() { | |
this.mounted = false; | |
listener$listen.call(this, this.props, this.context); | |
}); | |
extend.call(this, 'componentWillReceiveProps', listener$listen); | |
unmount.call(this, function () { | |
this.mounted = false; | |
this._listeners && this._listeners[key] && this._listeners[key](); | |
}); | |
} | |
function prop(key, fn) { | |
//this is class scope. | |
extend.call(this, 'componentWillMount', function util$prop$willMount() { | |
//this is instance scope. | |
if (!this.injected) this.injected = {}; | |
this.injected[key] = fn.call(this, this.props[key], key, this.props, this.context); | |
}); | |
extend.call(this, 'componentWillReceiveProps', function util$prop$receiveProps(props, context) { | |
if (!this.injected) this.injected = {}; | |
if (props[key] !== this.props[key]) { | |
this.injected[key] = fn.call(this, props[key], key, props, context); | |
} | |
}); | |
return this; | |
} | |
function extendStatic(name, value) { | |
this[name] = value; | |
} | |
function removeListeners(listeners) { | |
if (listeners) { | |
listeners.forEach(execArg); | |
listeners.length = 0; | |
} | |
return listeners; | |
} | |
function clearListeners() { | |
if (this.listeners) { | |
return removeListeners(this.listeners); | |
} | |
} | |
function unmount(fn) { | |
this.prototype.componentWillUnmount = applyNice(fn, this.prototype.componentWillUnmount); | |
} | |
exports.applyNice = applyNice; | |
exports.listener = listener; | |
exports.extend = extend; | |
exports.prop = prop; | |
exports.unmount = unmount; | |
exports.extendStatic = extendStatic; | |
exports.extendPrototype = extendPrototype; | |
exports.onlyKeys = onlyKeys; | |
exports.keyIn = keyIn; | |
exports.uniqueKeys = uniqueKeys; | |
exports.execArg = execArg; | |
exports.push = push; | |
exports.removeListeners = removeListeners; | |
exports.clearListeners = clearListeners; | |
/***/ }, | |
/* 547 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.newSubschemaContext = exports.cachedInjector = exports.stringInjector = exports.injectorFactory = exports.warning = exports.validators = exports.tutils = exports.loaderFactory = exports.eventable = exports.css = exports.ValueManager = exports.PropTypes = exports.Dom = exports.NewChildContext = exports.Form = exports.RenderTemplate = exports.RenderContent = exports.FieldSet = exports.Field = exports.Conditional = undefined; | |
var _Conditional = __webpack_require__(506); | |
var _Conditional2 = _interopRequireDefault(_Conditional); | |
var _Field = __webpack_require__(435); | |
var _Field2 = _interopRequireDefault(_Field); | |
var _FieldSet = __webpack_require__(437); | |
var _FieldSet2 = _interopRequireDefault(_FieldSet); | |
var _RenderContent = __webpack_require__(429); | |
var _RenderContent2 = _interopRequireDefault(_RenderContent); | |
var _RenderTemplate = __webpack_require__(408); | |
var _RenderTemplate2 = _interopRequireDefault(_RenderTemplate); | |
var _NewChildContext = __webpack_require__(548); | |
var _NewChildContext2 = _interopRequireDefault(_NewChildContext); | |
var _Form = __webpack_require__(551); | |
var _Form2 = _interopRequireDefault(_Form); | |
var _Dom = __webpack_require__(445); | |
var _Dom2 = _interopRequireDefault(_Dom); | |
var _eventable = __webpack_require__(550); | |
var _eventable2 = _interopRequireDefault(_eventable); | |
var _loaderFactory = __webpack_require__(319); | |
var _loaderFactory2 = _interopRequireDefault(_loaderFactory); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _validators = __webpack_require__(467); | |
var _validators2 = _interopRequireDefault(_validators); | |
var _warning = __webpack_require__(402); | |
var _warning2 = _interopRequireDefault(_warning); | |
var _tutils = __webpack_require__(322); | |
var tutils = _interopRequireWildcard(_tutils); | |
var _ValueManager = __webpack_require__(549); | |
var _ValueManager2 = _interopRequireDefault(_ValueManager); | |
var _css = __webpack_require__(552); | |
var _css2 = _interopRequireDefault(_css); | |
var _subschemaInjection = __webpack_require__(543); | |
var _cachedInjector = __webpack_require__(553); | |
var _cachedInjector2 = _interopRequireDefault(_cachedInjector); | |
var _stringInjector = __webpack_require__(555); | |
var _stringInjector2 = _interopRequireDefault(_stringInjector); | |
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
exports.Conditional = _Conditional2.default; | |
exports.Field = _Field2.default; | |
exports.FieldSet = _FieldSet2.default; | |
exports.RenderContent = _RenderContent2.default; | |
exports.RenderTemplate = _RenderTemplate2.default; | |
exports.Form = _Form2.default; | |
exports.NewChildContext = _NewChildContext2.default; | |
exports.Dom = _Dom2.default; | |
exports.PropTypes = _PropTypes2.default; | |
exports.ValueManager = _ValueManager2.default; | |
exports.css = _css2.default; | |
exports.eventable = _eventable2.default; | |
exports.loaderFactory = _loaderFactory2.default; | |
exports.tutils = tutils; | |
exports.validators = _validators2.default; | |
exports.warning = _warning2.default; | |
exports.injectorFactory = _subschemaInjection.injectorFactory; | |
exports.stringInjector = _stringInjector2.default; | |
exports.cachedInjector = _cachedInjector2.default; | |
exports.newSubschemaContext = newSubschemaContext; | |
exports.default = { | |
Conditional: _Conditional2.default, | |
Field: _Field2.default, | |
FieldSet: _FieldSet2.default, | |
RenderContent: _RenderContent2.default, | |
RenderTemplate: _RenderTemplate2.default, | |
Form: _Form2.default, | |
NewChildContext: _NewChildContext2.default, | |
Dom: _Dom2.default, | |
PropTypes: _PropTypes2.default, | |
ValueManager: _ValueManager2.default, | |
css: _css2.default, | |
eventable: _eventable2.default, | |
cachedInjector: _cachedInjector2.default, | |
injectorFactory: _subschemaInjection.injectorFactory, | |
loaderFactory: _loaderFactory2.default, | |
tutils: tutils, | |
validators: _validators2.default, | |
warning: _warning2.default, | |
newSubschemaContext: newSubschemaContext | |
}; | |
/** | |
* Used to initialize new subschema for testing. But also to override behaviours if necessary. | |
* | |
* @param defaultLoaders | |
* @param defaultResolvers | |
* @param defaultPropTypes | |
* @param defaultInjectorFactory | |
* @param Subschema | |
*/ | |
function newSubschemaContext() { | |
var defaultLoaders = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; | |
var defaultResolvers = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | |
var defaultPropTypes = arguments.length <= 2 || arguments[2] === undefined ? _PropTypes2.default : arguments[2]; | |
var defaultInjectorFactory = arguments.length <= 3 || arguments[3] === undefined ? _subschemaInjection.injectorFactory : arguments[3]; | |
var Subschema = arguments.length <= 4 || arguments[4] === undefined ? { | |
Conditional: _Conditional2.default, | |
Field: _Field2.default, | |
FieldSet: _FieldSet2.default, | |
RenderContent: _RenderContent2.default, | |
RenderTemplate: _RenderTemplate2.default, | |
Form: _Form2.default, | |
NewChildContext: _NewChildContext2.default, | |
Dom: _Dom2.default, | |
PropTypes: _PropTypes2.default, | |
ValueManager: _ValueManager2.default, | |
css: _css2.default, | |
eventable: _eventable2.default, | |
loaderFactory: _loaderFactory2.default, | |
tutils: tutils, | |
validators: _validators2.default, | |
warning: _warning2.default, | |
injectorFactory: _subschemaInjection.injectorFactory, | |
cachedInjector: _cachedInjector2.default, | |
stringInjector: _stringInjector2.default | |
} : arguments[4]; | |
var loader = Subschema.loader; | |
var injector = Subschema.injector; | |
var rest = _objectWithoutProperties(Subschema, ['loader', 'injector']); | |
var _injector = defaultInjectorFactory(); | |
for (var _iterator = Object.keys(defaultResolvers), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { | |
var _ref; | |
if (_isArray) { | |
if (_i >= _iterator.length) break; | |
_ref = _iterator[_i++]; | |
} else { | |
_i = _iterator.next(); | |
if (_i.done) break; | |
_ref = _i.value; | |
} | |
var key = _ref; | |
if (key in defaultPropTypes) { | |
_injector.resolver(defaultPropTypes[key], defaultResolvers[key]); | |
} | |
} | |
var defaultLoader = (0, _loaderFactory2.default)(defaultLoaders); | |
var defaultInjector = (0, _cachedInjector2.default)((0, _stringInjector2.default)(_injector, defaultPropTypes)); | |
//Form needs these to kick off the whole thing. Its defaults can be overriden with | |
// properties. | |
rest.Form.defaultProps.loader = defaultLoader; | |
rest.Form.defaultProps.injector = defaultInjector; | |
rest.loader = defaultLoader; | |
rest.injector = defaultInjector; | |
return rest; | |
} | |
/***/ }, | |
/* 548 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _ValueManager = __webpack_require__(549); | |
var _ValueManager2 = _interopRequireDefault(_ValueManager); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var NewChildContext = function (_Component) { | |
_inherits(NewChildContext, _Component); | |
function NewChildContext(props, context) { | |
_classCallCheck(this, NewChildContext); | |
for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { | |
rest[_key - 2] = arguments[_key]; | |
} | |
var _this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this, props, context].concat(rest))); | |
_this.handleSubmit = function (e) { | |
//t(e, vm.getErrors(), vm.getValue(), this.props.path) | |
var value = _this.valueManager.path(_this.props.path), | |
errors = _this.valueManager.getErrors(); | |
if (_this.props.onSubmit) { | |
if (_this.props.onSubmit(e, errors, value, _this.props.path) !== false) { | |
_this.props.valueManager.update(_this.props.path, value); | |
} | |
} else { | |
_this.props.valueManager.update(_this.props.path, value); | |
} | |
return false; | |
}; | |
var parentValueManager = _this.props.valueManager; | |
_this.valueManager = (0, _ValueManager2.default)(parentValueManager.getValue(), parentValueManager.getErrors()); | |
return _this; | |
} | |
NewChildContext.prototype.getChildContext = function getChildContext() { | |
return { | |
valueManager: this.valueManager, | |
parentValueManager: this.props.valueManager, | |
loader: this.props.loader | |
}; | |
}; | |
NewChildContext.prototype.render = function render() { | |
return _react2.default.cloneElement(this.props.children, { onSubmit: this.handleSubmit }); | |
}; | |
return NewChildContext; | |
}(_react.Component); | |
NewChildContext.displayName = "NewChildContext"; | |
NewChildContext.propTypes = { | |
valueManager: _PropTypes2.default.valueManager, | |
loader: _PropTypes2.default.loader, | |
path: _PropTypes2.default.string.isRequired | |
}; | |
NewChildContext.childContextTypes = { | |
valueManager: _PropTypes2.default.valueManager, | |
loader: _PropTypes2.default.loader, | |
parentValueManager: _PropTypes2.default.valueManager | |
}; | |
exports.default = NewChildContext; | |
/***/ }, | |
/* 549 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = ValueManager; | |
var _tutils = __webpack_require__(322); | |
var _eventable = __webpack_require__(550); | |
var _eventable2 = _interopRequireDefault(_eventable); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function reduceKeys(arr, v, b, c) { | |
if (canDescend(v)) { | |
(0, _tutils.push)(arr, Object.keys(v)); | |
} | |
return arr; | |
} | |
var has = Function.call.bind(Object.prototype.hasOwnProperty); | |
function canDescend(obj) { | |
if (obj == null || (0, _tutils.isNumber)(obj) || (0, _tutils.isBoolean)(obj) || (0, _tutils.isString)(obj) || (0, _tutils.isDate)(obj) || (0, _tutils.isArray)(obj)) { | |
return false; | |
} | |
return true; | |
} | |
function copy(obj) { | |
return obj == null ? null : (0, _tutils.isArray)(obj) ? obj.slice(0) : (0, _tutils.extend)({}, obj); | |
} | |
function _keys() { | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return (0, _tutils.unique)(args.reduce(reduceKeys, [])); | |
} | |
/** | |
* Value manager listens and changes values on the objects. | |
* It can be passed a property to any subschema type, or form. | |
* | |
* @param value | |
* @param errors | |
* @returns {ValueManager} | |
* @constructor | |
*/ | |
function ValueManager(value, errors) { | |
if (!(this instanceof ValueManager)) { | |
return new ValueManager(value, errors); | |
} | |
this.listeners = []; | |
this.errorListeners = []; | |
this.validateListeners = []; | |
this.stateListeners = []; | |
this.setValue(value || {}); | |
this.setErrors(errors); | |
this.oldValue = (0, _tutils.extend)({}, this.value); | |
var self = this; | |
/** | |
* Adds a value listener | |
* @param {String} [path] - Path to listen to, null or no value will listen to all changes. | |
* @param {ValueManagerListener} listener - The listener to execute. | |
* @param {Object} [scope] - The scope to execute the listener in. | |
* @param {boolean|Function} init - true or a function will execute when the listener is added. | |
* */ | |
this.addListener = (0, _eventable2.default)(this.listeners, function (prop) { | |
return self.path(prop, self.value); | |
}, function (prop) { | |
return self.path(prop, self.oldValue); | |
}); | |
/** | |
* Adds an error listener | |
* @param {String} [path] - Path to listen to, null or no value will listen to all changes. | |
* @param {ValueManagerListener} listener - The listener to execute. | |
* @param {Object} [scope] - The scope to execute the listener in. | |
* @param {boolean|Function} init - true or a function will execute when the listener is added. | |
* */ | |
this.addErrorListener = (0, _eventable2.default)(this.errorListeners, function (prop) { | |
return self.errorsFor(prop); | |
}, _tutils.noop); | |
/** | |
* Adds a validate listener | |
* @param {String} [path] - Path to listen to, null or no value will listen to all changes. | |
* @param {ValueManagerListener} listener - The listener to execute. | |
* @param {Object} [scope] - The scope to execute the listener in. | |
* @param {boolean|Function} init - true or a function will execute when the listener is added. | |
* */ | |
this.addValidateListener = (0, _eventable2.default)(this.validateListeners, _tutils.noop, _tutils.noop); | |
this.submitListeners = []; | |
/** | |
* adds a submit listener. | |
* @param {String} [path] - path to listen to. | |
* @param {Function} [ValueManagerListener] - the listener to look for. | |
* @param {Listener} [listener] - the listener returned from eventable(); | |
*/ | |
this.addSubmitListener = (0, _eventable2.default)(this.submitListeners); | |
/** | |
* adds a submit listener. | |
* @param {String} [path] - path to listen to. | |
* @param {Function} [ValueManagerListener] - the listener to look for. | |
* @param {Listener} [listener] - the listener returned from eventable(); | |
*/ | |
this.addStateListener = (0, _eventable2.default)(this.stateListeners); | |
} | |
function remove(v) { | |
v && v.remove && v.remove(); | |
} | |
var listenersTypes = ['listeners', 'errorListeners', 'validateListeners', 'stateListeners', 'submitListeners']; | |
function _removeAll(v) { | |
var listeners = this[v]; | |
if (listeners) { | |
listeners.forEach(remove); | |
listeners.length = 0; | |
} | |
} | |
ValueManager.prototype = { | |
removeListener: function removeListener() { | |
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | |
args[_key2] = arguments[_key2]; | |
} | |
args.forEach(remove); | |
}, | |
/** | |
* Removes all listeners, both error and value. | |
*/ | |
removeAll: function removeAll() { | |
listenersTypes.forEach(_removeAll, this); | |
}, | |
/** | |
* When onSubmit is called this is fired | |
*/ | |
onSubmit: function onSubmit(e, errors, value, path) { | |
var parts = path && path.split('.') || [], | |
i = 0, | |
l = parts.length, | |
pp = null; | |
do { | |
if (this.submitListeners.some(function (v) { | |
if (v.path === pp) { | |
return v.listener.call(v.scope, e, errors, value, path) === false; | |
} | |
}, this) === true) { | |
return false; | |
} | |
pp = (0, _tutils.path)(pp, parts[i]); | |
} while (i++ < l); | |
return true; | |
}, | |
/** | |
* Triggers the value change on all listeneners. | |
*/ | |
onValueChange: function onValueChange(path, value, oldValue) { | |
var _this = this; | |
var parts = path && path.split('.') || [], | |
i = 0, | |
l = parts.length, | |
pp = null; | |
do { | |
if (this.listeners.some(function (v) { | |
if (v.path === pp) { | |
return v.listener.call(v.scope, _this.path(pp, _this.value), _this.path(pp, _this.oldValue), path) === false; | |
} | |
}, this) === true) { | |
return false; | |
} | |
pp = (0, _tutils.path)(pp, parts[i]); | |
} while (i++ < l); | |
return true; | |
}, | |
/** | |
* Returns the path of an object | |
* @param {String} - a dot deliminted string. | |
* @param {Object} [object] - defaults to the current value. | |
*/ | |
path: function path(p, obj) { | |
if (arguments.length < 2) { | |
obj = this.value; | |
} | |
if (!p) return obj; | |
var parts = p.split('.'); | |
for (var i = 0, l = parts.length; i < l; i++) { | |
var key = parts[i]; | |
if (obj == null || !has(obj, key)) { | |
return null; | |
} | |
obj = obj[key]; | |
} | |
return obj; | |
}, | |
/** | |
* Updates the value at a given path. This will trigger the value listeners. | |
* @param {String} path - Path to update | |
* @param {*} value - Value to update.argument. | |
*/ | |
update: function update(path, value) { | |
var parts = path.split('.'), | |
obj = this.value || (this.value = {}), | |
oobj = this.oldValue, | |
last = parts[parts.length - 1]; | |
for (var i = 0, l = parts.length - 1; i < l; i++) { | |
var key = parts[i]; | |
if (has(obj, key)) { | |
//We won't build the oobj tree, we may need to in the case of multiple changes to the object. The question becomes | |
// are old values the original values or the last change. | |
oobj = oobj && oobj[key]; | |
//We copy it so that when oldValues and value share a nested object, they do not conflict, but we only need to do it when | |
// they are referencing the same instance, note we are parts -1 levels up, so really only arrays and objects. | |
if (obj[key] == null) { | |
if (/^\d+?$/.test(key)) { | |
obj = obj[key] = []; | |
} else { | |
obj = obj[key] = {}; | |
} | |
} else { | |
obj = obj[key] = oobj === obj[key] ? copy(obj[key]) : obj[key]; | |
} | |
} else { | |
//So the object tree isn't reached yet, we will create an array or object. if the key | |
// is an integer we will guess its an array, this will probably be correct 99% of the time, and | |
// horrible wrong 1%, se la vie. | |
if (/^\d+?$/.test(parts[i + 1])) { | |
obj = obj[key] = []; | |
} else { | |
obj = obj[key] = {}; | |
} | |
} | |
} | |
if (value === void 0) { | |
delete obj[last]; | |
} else { | |
obj[last] = value; | |
} | |
//We will build a path for the new value, but not for the oldvalue. This | |
// might break whean a value changes multiple times. | |
return this.onValueChange(path, value, oobj && oobj[last]) !== false; | |
}, | |
/** | |
* Returns the current value. | |
*/ | |
getValue: function getValue() { | |
return this.value; | |
}, | |
/** | |
* @param {Object} value - The new value for the params. Will trigger | |
* changes on all listeners. | |
*/ | |
setValue: function setValue(value) { | |
this.oldValue = (0, _tutils.extend)({}, this.value); | |
this.value = (0, _tutils.extend)({}, value); | |
if (this._setValue(value, this.oldValue) !== false) {} | |
}, | |
_setValue: function _setValue(value, oldValue, path) { | |
if (canDescend(value) || canDescend(oldValue)) { | |
_keys(value, oldValue).forEach(function (key) { | |
this._setValue(value && value[key], oldValue && oldValue[key], (0, _tutils.path)(path, key)); | |
}, this); | |
} else { | |
return this.onValueChange(path, value, oldValue); | |
} | |
}, | |
/** | |
* Triggers error handlers. | |
* @param {String} path - path to trigger the error. | |
* @param {Object[]} errors - Errors to set. | |
* @param {String} errors.name - Name of the error. | |
* @param {String} errors.message - Message of the error. | |
*/ | |
onError: function onError(path, errors, value) { | |
errors = errors && errors[0] ? errors : null; | |
var oErrors = this.errors || {}, | |
listeners = this.errorListeners; | |
return listeners.some(function (v) { | |
if (path == null || v.path == null || v.path === path || path.indexOf(v.path + '.') === 0) { | |
return v.listener.call(v.scope, errors, oErrors[path], path, value) === false; | |
} | |
}, this); | |
}, | |
/** | |
* Sets the current errors and triggers the error listeners. | |
* | |
* @param {Object} errors - object containing errors. The key is the full qualified path to the value in error | |
* | |
*/ | |
setErrors: function setErrors(errors) { | |
var keys = _keys(errors, this.errors); | |
this.errors = (0, _tutils.extend)({}, errors); | |
return keys.some(function (key) { | |
return this.onError(key, this.errors[key]); | |
}, this) !== true; | |
}, | |
getErrors: function getErrors() { | |
var ret = {}; | |
Object.keys(this.errors).filter(function (v) { | |
return this[v] != null; | |
}, this.errors).forEach(function (v) { | |
ret[v] = this[v]; | |
}, this.errors); | |
return ret; | |
}, | |
updateErrors: function updateErrors(path, errors, value) { | |
errors = (0, _tutils.isArray)(errors) ? errors : [errors]; | |
errors = errors && errors[0] ? errors : null; | |
this.errors[path] = errors; | |
this.onError(path, errors, value); | |
}, | |
errorsFor: function errorsFor(path) { | |
var pathe = path + '.', | |
keys = Object.keys(this.errors).filter(function (key) { | |
return this[key] != null && (path == null || key === path || key.indexOf(pathe) === 0); | |
}, this.errors), | |
errors = []; | |
if (keys.length < 2) { | |
return this.errors[keys[0]]; | |
} | |
keys.forEach(function (key) { | |
(0, _tutils.push)(errors, this[key]); | |
}, this.errors); | |
return errors; | |
}, | |
/** | |
* Trigger the validators. | |
* | |
*/ | |
validate: function validate(path, value) { | |
var pp = path && path + '.'; | |
this.validateListeners.forEach(function ValueManager$validate$forEach(v) { | |
if (path == null || v.path === path || pp.indexOf(path) === 0) v.listener.call(v.scope, path, value); | |
}); | |
}, | |
/** | |
* Trigger Validators And Callback with Errors for paths. | |
*/ | |
validatePaths: function validatePaths(paths, callback) { | |
var _this2 = this; | |
var errors = null; | |
paths.forEach(function (path) { | |
//validate does not return the error, it just triggers the error handler, | |
// so we add a listener for that path, trigger it and remove the listener. | |
// so that we can get the listener. We should probably change validate | |
// to return the error (or a promise) but not today. | |
_this2.addErrorListener(path, function (e) { | |
if (e) { | |
(errors == null ? errors = {} : errors)[path] = e; | |
} | |
}).once(); | |
_this2.validate(path); | |
}, this); | |
if (callback) { | |
callback(errors); | |
} | |
return errors; | |
}, | |
/** | |
* Pretty much the same as update, except that it does not, store | |
* the values. It just fires, listeners. | |
*/ | |
updateState: function updateState(path, value) { | |
return this.onChangeState(path, value) !== false; | |
}, | |
onChangeState: function onChangeState(path, value) { | |
var parts = path && path.split('.') || [], | |
i = 0, | |
l = parts.length, | |
pp = null; | |
do { | |
if (this.stateListeners.some(function (v) { | |
if (v.path === pp) { | |
return v.listener.call(v.scope, value, path) === false; | |
} | |
}, this) === true) { | |
return false; | |
} | |
pp = (0, _tutils.path)(pp, parts[i]); | |
} while (i++ < l); | |
return true; | |
}, | |
copy: function copy() { | |
return new ValueManager(this.getValue(), this.getErrors()); | |
} | |
}; | |
/***/ }, | |
/* 550 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = eventable; | |
var _tutils = __webpack_require__(322); | |
var _warning = __webpack_require__(402); | |
var _warning2 = _interopRequireDefault(_warning); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
/** | |
* This callback is displayed as a global member. | |
* It will call them in order of most distant to least distance path. | |
* In the event of two paths being the same distance, it will call the last | |
* added first. | |
* | |
* @callback ValueManagerListener | |
* @param {*} newValue - The new value to be updated | |
* @param {*} oldValue - The previous value updated. | |
* @param {String} path - The path to value updated | |
*/ | |
function eventable(listeners) { | |
var find = arguments.length <= 1 || arguments[1] === undefined ? _tutils.returnFirst : arguments[1]; | |
var findOld = arguments.length <= 2 || arguments[2] === undefined ? _tutils.returnFirst : arguments[2]; | |
listeners = listeners || []; | |
//Remove if called more than once don't do anything. | |
function remove() { | |
var idx = listeners.indexOf(this); | |
if (idx > -1) { | |
listeners.splice(idx, 1); | |
} | |
return this; | |
} | |
function once() { | |
var rem = this.remove, | |
listener = this.listener, | |
self = this; | |
this.listener = function () { | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
var ret = listener.apply.apply(listener, [self].concat(args)); | |
rem(); | |
return ret; | |
}; | |
return this; | |
} | |
/** | |
* @param path {string} | |
* @param listener {function} | |
* @param scope {object} | |
* @param init {boolean|function} | |
*/ | |
return function eventable$addListener(path, listener, scope, init) { | |
if (listener == null) { | |
(0, _warning2.default)(listener, 'trying to add a null listener %s', path); | |
return; | |
} | |
var obj = { path: path, listener: listener, scope: scope, once: once }; | |
obj.remove = remove.bind(obj); | |
init = init === true ? obj.listener : (0, _tutils.isFunction)(init) ? init : null; | |
if (init) { | |
init.call(obj.scope, find(path), findOld(path), path); | |
} | |
if (listeners.length === 0) { | |
listeners.push(obj); | |
} else { | |
var plength = path ? path.split('.').length : 0; | |
for (var i = 0, l = listeners.length; i < l; i++) { | |
var lp = listeners[i].path, | |
cllength = lp ? lp.split('.').length : 0; | |
if (plength >= cllength || i + 1 === l) { | |
listeners.splice(i, 0, obj); | |
break; | |
} | |
} | |
} | |
return obj; | |
}; | |
} | |
/***/ }, | |
/* 551 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
var _react = __webpack_require__(302); | |
var _react2 = _interopRequireDefault(_react); | |
var _PropTypes = __webpack_require__(320); | |
var _PropTypes2 = _interopRequireDefault(_PropTypes); | |
var _ValueManager = __webpack_require__(549); | |
var _ValueManager2 = _interopRequireDefault(_ValueManager); | |
var _Object = __webpack_require__(434); | |
var _Object2 = _interopRequireDefault(_Object); | |
var _tutils = __webpack_require__(322); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var Form = function (_Component) { | |
_inherits(Form, _Component); | |
function Form(props, context, whatever) { | |
_classCallCheck(this, Form); | |
var _this = _possibleConstructorReturn(this, _Component.call(this, props, context, whatever)); | |
_this.setErrors = function (errors) { | |
_this.valueManager.setErrors(errors); | |
}; | |
_this.loader = props.loader; | |
_this.injector = props.injector; | |
if (!props.valueManager) { | |
_this.valueManager = (0, _ValueManager2.default)(props.value, props.errors); | |
} else { | |
_this.valueManager = props.valueManager; | |
if (props.value) { | |
_this.valueManager.setValue(props.value); | |
} | |
if (props.errors) { | |
_this.valueManager.setErrors(props.errors); | |
} | |
} | |
_this.ObjectWrapper = _this.injector.inject(_Object2.default); | |
if (props.onSubmit) _this._submitListener = _this.valueManager.addSubmitListener(null, props.onSubmit).remove; | |
return _this; | |
} | |
Form.prototype.getChildContext = function getChildContext() { | |
return { | |
valueManager: this.valueManager, | |
loader: this.loader, | |
injector: this.injector, | |
validate: this.props.validate, | |
noValidate: this.props.noValidate | |
}; | |
}; | |
Form.prototype.componentWillReceiveProps = function componentWillReceiveProps(newProps) { | |
if (newProps.loader !== this.props.loader) { | |
this.loader = newProps.loader; | |
} | |
if (newProps.valueManager !== this.props.valueManager) { | |
if (this._submitListener) { | |
this._submitListener(); | |
} | |
this.valueManager = newProps.valueManager; | |
this.forceUpdate(); | |
} | |
if (this.props.value !== newProps.value) { | |
this.valueManager.setValue(newProps.value); | |
} | |
if (this.props.errors !== newProps.errors) { | |
this.valueManager.setErrors(newProps.errors); | |
} | |
if (this.props.injector !== newProps.injector) { | |
this.injector = newProps.injector; | |
this.ObjectWrapper = this.injector.inject(_Object2.default); | |
} | |
if (newProps.onSubmit) { | |
if (this._submitListener) { | |
this._submitListener(); | |
} | |
this._submitListener = this.valueManager.addSubmitListener(null, newProps.onSubmit).remove; | |
} | |
}; | |
Form.prototype.componentWillUnmount = function componentWillUnmount() { | |
this._submitListener && this._submitListener(); | |
}; | |
Form.prototype.getValue = function getValue() { | |
return this.valueManager.getValue(); | |
}; | |
Form.prototype.render = function render() { | |
var _props = this.props; | |
var valueManager = _props.valueManager; | |
var injector = _props.injector; | |
var loader = _props.loader; | |
var validate = _props.validate; | |
var template = _props.template; | |
var onSubmit = _props.onSubmit; | |
var props = _objectWithoutProperties(_props, ["valueManager", "injector", "loader", "validate", "template", "onSubmit"]); | |
var ObjectWrapper = this.ObjectWrapper; | |
return _react2.default.createElement(ObjectWrapper, _extends({}, props, { objectTemplate: template })); | |
}; | |
return Form; | |
}(_react.Component); | |
Form.displayName = "Form"; | |
Form.childContextTypes = _extends({ validate: _PropTypes2.default.bool, noValidate: _PropTypes2.default.bool }, _PropTypes2.default.contextTypes); | |
Form.propTypes = { | |
schema: _PropTypes2.default.schema.isRequired, | |
loader: _PropTypes2.default.loader, | |
injector: _PropTypes2.default.injector, | |
valueManager: _PropTypes2.default.valueManager, | |
template: _PropTypes2.default.string, | |
method: _PropTypes2.default.string, | |
action: _PropTypes2.default.string, | |
enctype: _PropTypes2.default.string, | |
//handy submit handler. | |
onSubmit: _PropTypes2.default.event, | |
//Set this to true if you don't want validation to run on submit. | |
noValidate: _PropTypes2.default.bool, | |
//Set this to true, if you want validators to be called against the current schema. I.E. after a POST. | |
validate: _PropTypes2.default.bool | |
}; | |
Form.defaultProps = { | |
fallbackTemplate: 'FormTemplate', | |
noValidate: false, | |
validate: false | |
}; | |
exports.default = Form; | |
/***/ }, | |
/* 552 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.addClasses = addClasses; | |
exports.addClass = addClass; | |
exports.hasClass = hasClass; | |
exports.removeClass = removeClass; | |
var _tutils = __webpack_require__(322); | |
function addClasses(classes, str) { | |
if (str == null) { | |
return; | |
} | |
if ((0, _tutils.isString)(str)) { | |
(0, _tutils.push)(classes, str.split(/\s+?/)); | |
} | |
if ((0, _tutils.isArray)(str)) { | |
str.forEach(function (v) { | |
return addClasses(classes, v); | |
}); | |
} | |
if ((0, _tutils.isFunction)(str)) { | |
addClasses(classes, str.call(this)); | |
} | |
} | |
function addClass(node, className) { | |
if (className) { | |
if (node.classList) { | |
node.classList.add(className); | |
} else if (!api.hasClass(node, className)) { | |
node.className = node.className + ' ' + className; | |
} | |
} | |
return node; | |
} | |
function hasClass(node, className) { | |
if (node.classList) { | |
return !!className && node.classList.contains(className); | |
} | |
return node.className.split(/\s+?/).indexOf(className) > -1; | |
} | |
function removeClass(node, className) { | |
if (className) { | |
if (node.classList) { | |
node.classList.remove(className); | |
} else { | |
var parts = node.className.split(/\s+?/), | |
idx; | |
while ((idx = parts.indexOf(className)) > -1) { | |
parts.splice(idx, 1); | |
} | |
node.className = parts.join(' '); | |
} | |
} | |
return node; | |
} | |
exports.default = { | |
hasClass: hasClass, | |
removeClass: removeClass, | |
addClass: addClass, | |
addClasses: addClasses | |
}; | |
/***/ }, | |
/* 553 */ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.__esModule = true; | |
exports.default = cachedInject; | |
var _hash = __webpack_require__(554); | |
function cachedInject(injector) { | |
var cache = void 0; | |
var count = 0; | |
/** | |
* Resolver gets called a bunch of times, | |
* rather than initing WeakMap a million times, | |
* let's just do it in the main inject loop. | |
* | |
* @param propType | |
* @param resolver | |
* @returns {*} | |
*/ | |
function resolver(propType, resolver) { | |
if (propType && resolver) { | |
//invalidate cache with new resolver | |
cache = null; | |
count = 0; | |
} | |
return injector.resolver(propType, resolver); | |
} | |
function inject(Clazz, extraPropTypes, extraProps, strictProps) { | |
if (Clazz == null) { | |
return Clazz; | |
} | |
//we need to generate the hash regardless of having a cache. | |
var hash = new _hash.HashBuilder(strictProps).addObject(extraPropTypes).addObject(extraProps).toString(); | |
var cur = void 0; | |
//no cache so no point in checking it. | |
if (cache == null) { | |
cache = new WeakMap(); | |
cur = new Map(); | |
cache.set(Clazz, cur); | |
} else { | |
cur = cache.get(Clazz); | |
if (cur) { | |
var klazz = cur.get(hash); | |
if (klazz != null) { | |
return klazz; | |
} | |
} else { | |
cur = new Map(); | |
cache.set(Clazz, cur); | |
} | |
} | |
var injected = injector.inject(Clazz, extraPropTypes, extraProps, strictProps); | |
injected.displayName = injected.displayName + "$" + hash; | |
injected.$hash = hash; | |
cur.set(hash, injected); | |
count++; | |
return injected; | |
} | |
function size() { | |
return count; | |
} | |
return { | |
resolver: resolver, | |
inject: inject, | |
size: size | |
}; | |
} | |
/***/ }, | |
/* 554 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
exports.__esModule = true; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |
exports.hashFunc = hashFunc; | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function hash(string) { | |
string = string == null ? '' : string + ''; | |
var hash = 0; | |
if (!string) return '' + hash; | |
var length = string.length; | |
for (var i = 0; i < length; i++) { | |
hash = (hash << 5) - hash + string.charCodeAt(i); | |
hash = hash & hash; // Convert to 32bit integer | |
} | |
return hash.toString(16); | |
} | |
var HashBuilder = exports.HashBuilder = function () { | |
function HashBuilder(str) { | |
_classCallCheck(this, HashBuilder); | |
this.hash = 0; | |
this.add(str); | |
} | |
HashBuilder.prototype.addValue = function addValue(val) { | |
if (val == null) { | |
return this; | |
} | |
var tval = typeof val === 'undefined' ? 'undefined' : _typeof(val); | |
if (tval === 'string') { | |
return this.add(val); | |
} | |
if (tval === 'number') { | |
this.hash += val; | |
return this; | |
} | |
if (tval === 'boolean') { | |
return this.add('' + val); | |
} | |
if (tval === 'function') { | |
return this.addFunction(val); | |
} | |
return this.addObject(val); | |
}; | |
HashBuilder.prototype.addObject = function addObject(obj) { | |
this.addChar('='); | |
if (obj != null) { | |
var keys = Object.keys(obj); | |
for (var i = 0, l = keys.length; i < l; i++) { | |
var key = keys[i]; | |
this.addKey(key).addValue(obj[key]); | |
} | |
} | |
return this; | |
}; | |
HashBuilder.prototype.addKey = function addKey(key) { | |
return this.addChar(',').add(key).addChar(':'); | |
}; | |
HashBuilder.prototype.addFunction = function addFunction(func) { | |
this.hash += parseInt(hashFunc(func), 16); | |
return this; | |
}; | |
HashBuilder.prototype.addChar = function addChar(val) { | |
var hash = this.hash; | |
hash = (hash << 5) - hash + val.charCodeAt(0); | |
this.hash = hash & hash; // Convert to 32bit integer | |
return this; | |
}; | |
HashBuilder.prototype.add = function add(str) { | |
str = str == null ? '' : str + ''; | |
var hash = this.hash; | |
for (var i = 0, l = str.length; i < l; i++) { | |
hash = (hash << 5) - hash + str.charCodeAt(i); | |
hash = hash & hash; // Convert to 32bit integer | |
} | |
this.hash = hash; | |
return this; | |
}; | |
HashBuilder.prototype.toString = function toString() { | |
return this.hash.toString(16); | |
}; | |
return HashBuilder; | |
}(); | |
function hashFunc(func) { | |
return func == null ? 0 : func.$hash || (func.$hash = hash(func.toString())); | |
} | |
exports.default = hash; | |
/***/ }, | |
/* 555 */ | |
/***/ function(module, exports) { | |
"use strict"; | |
exports.__esModule = true; | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
exports.default = stringInjector; | |
function stringInjector(injector, PropTypes) { | |
if (!PropTypes) { | |
return injector; | |
} | |
//reimplement resolveProp | |
function resolveProp(propType) { | |
if (typeof propType === 'string') { | |
return injector.resolveProp(PropTypes[propType]); | |
} | |
return injector.resolveProp(propType); | |
}; | |
//return a copy. | |
return _extends({}, injector, { | |
resolveProp: resolveProp | |
}); | |
} | |
/***/ } | |
/******/ ]) | |
}); | |
; | |
//# sourceMappingURL=subschema-noreact.js.map |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment